@ionic/core 8.5.7-dev.11746044124.147aab6c → 8.5.7-dev.11747180955.1e468923

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 (779) hide show
  1. package/components/action-sheet.js +37 -23
  2. package/components/alert.js +42 -26
  3. package/components/animation.js +2 -2
  4. package/components/backdrop.js +11 -4
  5. package/components/button-active.js +1 -1
  6. package/components/button.js +30 -24
  7. package/components/buttons.js +14 -4
  8. package/components/capacitor.js +1 -1
  9. package/components/checkbox.js +43 -26
  10. package/components/config.js +1 -1
  11. package/components/content.js +24 -5
  12. package/components/data.js +31 -6
  13. package/components/gesture-controller.js +1 -1
  14. package/components/haptic.js +1 -1
  15. package/components/hardware-back-button.js +2 -2
  16. package/components/header.js +12 -7
  17. package/components/helpers.js +3 -6
  18. package/components/icon.js +1 -2
  19. package/components/index2.js +1 -1
  20. package/components/index3.js +3 -5
  21. package/components/index4.js +1 -1
  22. package/components/index5.js +2 -2
  23. package/components/index6.js +28 -3
  24. package/components/index7.js +163 -27
  25. package/components/index8.js +1 -1
  26. package/components/index9.js +3 -163
  27. package/components/input-shims.js +20 -2
  28. package/components/input.utils.js +2 -2
  29. package/components/ion-accordion-group.js +20 -7
  30. package/components/ion-accordion.js +32 -14
  31. package/components/ion-app.js +4 -5
  32. package/components/ion-avatar.js +2 -4
  33. package/components/ion-back-button.js +12 -13
  34. package/components/ion-badge.js +2 -5
  35. package/components/ion-breadcrumb.js +22 -20
  36. package/components/ion-breadcrumbs.js +14 -10
  37. package/components/ion-card-content.js +2 -4
  38. package/components/ion-card-header.js +7 -5
  39. package/components/ion-card-subtitle.js +2 -5
  40. package/components/ion-card-title.js +2 -5
  41. package/components/ion-card.js +16 -11
  42. package/components/ion-chip.js +8 -5
  43. package/components/ion-col.js +1 -26
  44. package/components/ion-datetime-button.js +16 -14
  45. package/components/ion-datetime.js +197 -82
  46. package/components/ion-fab-button.js +37 -20
  47. package/components/ion-fab-list.js +7 -2
  48. package/components/ion-fab.js +10 -4
  49. package/components/ion-footer.js +13 -8
  50. package/components/ion-grid.js +4 -2
  51. package/components/ion-img.js +1 -6
  52. package/components/ion-infinite-scroll-content.js +2 -6
  53. package/components/ion-infinite-scroll.js +27 -6
  54. package/components/ion-input-password-toggle.js +8 -10
  55. package/components/ion-input.js +80 -63
  56. package/components/ion-item-divider.js +9 -5
  57. package/components/ion-item-group.js +2 -4
  58. package/components/ion-item-option.js +14 -12
  59. package/components/ion-item-options.js +6 -4
  60. package/components/ion-item-sliding.js +5 -3
  61. package/components/ion-loading.js +36 -19
  62. package/components/ion-menu-button.js +15 -10
  63. package/components/ion-menu-toggle.js +9 -5
  64. package/components/ion-menu.js +26 -10
  65. package/components/ion-nav-link.js +6 -6
  66. package/components/ion-nav.js +8 -11
  67. package/components/ion-note.js +2 -5
  68. package/components/ion-picker-legacy.js +45 -25
  69. package/components/ion-progress-bar.js +19 -6
  70. package/components/ion-range.js +66 -26
  71. package/components/ion-refresher-content.js +1 -5
  72. package/components/ion-refresher.js +55 -7
  73. package/components/ion-reorder-group.js +6 -4
  74. package/components/ion-reorder.js +3 -5
  75. package/components/ion-route-redirect.js +0 -2
  76. package/components/ion-route.js +9 -7
  77. package/components/ion-router-link.js +7 -9
  78. package/components/ion-router-outlet.js +11 -9
  79. package/components/ion-router.js +19 -1
  80. package/components/ion-row.js +1 -2
  81. package/components/ion-searchbar.js +78 -29
  82. package/components/ion-segment-button.js +20 -11
  83. package/components/ion-segment-content.js +1 -2
  84. package/components/ion-segment-view.js +5 -5
  85. package/components/ion-segment.js +22 -11
  86. package/components/ion-select-option.js +4 -3
  87. package/components/ion-select.js +68 -45
  88. package/components/ion-skeleton-text.js +4 -2
  89. package/components/ion-split-pane.js +11 -6
  90. package/components/ion-tab-bar.js +7 -6
  91. package/components/ion-tab-button.js +10 -12
  92. package/components/ion-tab.js +3 -6
  93. package/components/ion-tabs.js +4 -5
  94. package/components/ion-text.js +1 -3
  95. package/components/ion-textarea.js +72 -47
  96. package/components/ion-thumbnail.js +1 -2
  97. package/components/ion-toast.js +56 -33
  98. package/components/ion-toggle.js +55 -31
  99. package/components/ionic-global.js +1 -1
  100. package/components/item.js +20 -14
  101. package/components/keyboard-controller.js +2 -2
  102. package/components/keyboard.js +134 -69
  103. package/components/keyboard2.js +69 -134
  104. package/components/label.js +2 -6
  105. package/components/list-header.js +2 -6
  106. package/components/list.js +5 -5
  107. package/components/modal.js +118 -40
  108. package/components/notch-controller.js +1 -1
  109. package/components/overlays.js +3 -3
  110. package/components/picker-column-option.js +18 -5
  111. package/components/picker-column.js +25 -10
  112. package/components/picker-column2.js +5 -8
  113. package/components/picker.js +2 -4
  114. package/components/popover.js +130 -38
  115. package/components/radio-group.js +10 -10
  116. package/components/radio.js +27 -13
  117. package/components/refresher.utils.js +2 -2
  118. package/components/ripple-effect.js +10 -2
  119. package/components/select-modal.js +3 -8
  120. package/components/select-popover.js +5 -8
  121. package/components/spinner.js +4 -5
  122. package/components/swipe-back.js +1 -1
  123. package/components/title.js +2 -6
  124. package/components/toolbar.js +2 -5
  125. package/css/global.bundle.css +1 -1
  126. package/css/global.bundle.css.map +1 -1
  127. package/css/ionic.bundle.css +1 -1
  128. package/css/ionic.bundle.css.map +1 -1
  129. package/css/structure.css +1 -1
  130. package/css/structure.css.map +1 -1
  131. package/dist/cjs/{animation-ab2d3449.js → animation-CIZtxug4.js} +2 -2
  132. package/dist/cjs/{app-globals-ddceb1f4.js → app-globals-CWtQHdcK.js} +1 -1
  133. package/dist/cjs/{button-active-43e2b419.js → button-active-BzpKQ5zN.js} +3 -3
  134. package/dist/cjs/{capacitor-c04564bf.js → capacitor-DmA66EwP.js} +1 -1
  135. package/dist/cjs/{config-f6225ae7.js → config-ByqNVsV-.js} +1 -1
  136. package/dist/cjs/{data-94e8d392.js → data-BOIdk4ZX.js} +30 -5
  137. package/dist/cjs/{framework-delegate-862d9d00.js → framework-delegate-BZr8Dger.js} +1 -1
  138. package/dist/cjs/{gesture-controller-9436f482.js → gesture-controller-dtqlP_q4.js} +1 -1
  139. package/dist/cjs/{haptic-f6b37aa3.js → haptic-ClPPQ_PS.js} +1 -1
  140. package/dist/cjs/{hardware-back-button-3d2b1004.js → hardware-back-button-BhLS9ov9.js} +2 -2
  141. package/dist/cjs/{helpers-8a48fdea.js → helpers-BWWnt1yc.js} +2 -5
  142. package/dist/cjs/{index-1eff7149.js → index-C6GLB0dQ.js} +5 -5
  143. package/dist/cjs/{index-ee07ed59.js → index-CAvQ7Tka.js} +3 -4
  144. package/dist/cjs/{index-073c7cdc.js → index-CPbAsnJK.js} +1 -0
  145. package/dist/cjs/{index-31b07b9c.js → index-CfS4TqIo.js} +3 -3
  146. package/dist/cjs/{index-a96d31ae.js → index-CrE5792q.js} +9 -9
  147. package/dist/cjs/{index-dbe01e08.js → index-CrVjA49i.js} +3 -3
  148. package/dist/cjs/{index-2e236a04.js → index-qOuhvt-6.js} +1395 -671
  149. package/dist/cjs/index.cjs.js +20 -24
  150. package/dist/cjs/{input-shims-415be7ee.js → input-shims-BIfSj_O3.js} +24 -6
  151. package/dist/cjs/{input.utils-a7957fd6.js → input.utils-DQKGaXXm.js} +3 -3
  152. package/dist/cjs/ion-accordion_2.cjs.entry.js +56 -27
  153. package/dist/cjs/ion-action-sheet.cjs.entry.js +50 -38
  154. package/dist/cjs/ion-alert.cjs.entry.js +55 -41
  155. package/dist/cjs/ion-app_8.cjs.entry.js +96 -65
  156. package/dist/cjs/ion-avatar_3.cjs.entry.js +9 -17
  157. package/dist/cjs/ion-back-button.cjs.entry.js +16 -19
  158. package/dist/cjs/ion-backdrop.cjs.entry.js +14 -9
  159. package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +39 -35
  160. package/dist/cjs/ion-button_2.cjs.entry.js +33 -30
  161. package/dist/cjs/ion-card_5.cjs.entry.js +33 -36
  162. package/dist/cjs/ion-checkbox.cjs.entry.js +48 -33
  163. package/dist/cjs/ion-chip.cjs.entry.js +12 -11
  164. package/dist/cjs/ion-col_3.cjs.entry.js +9 -35
  165. package/dist/cjs/ion-datetime-button.cjs.entry.js +20 -20
  166. package/dist/cjs/ion-datetime_3.cjs.entry.js +251 -122
  167. package/dist/cjs/ion-fab_3.cjs.entry.js +58 -32
  168. package/dist/cjs/ion-img.cjs.entry.js +5 -12
  169. package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +35 -20
  170. package/dist/cjs/ion-input-password-toggle.cjs.entry.js +11 -15
  171. package/dist/cjs/ion-input.cjs.entry.js +87 -72
  172. package/dist/cjs/ion-item-option_3.cjs.entry.js +32 -28
  173. package/dist/cjs/ion-item_8.cjs.entry.js +50 -53
  174. package/dist/cjs/ion-loading.cjs.entry.js +46 -31
  175. package/dist/cjs/ion-menu_3.cjs.entry.js +62 -39
  176. package/dist/cjs/ion-modal.cjs.entry.js +128 -52
  177. package/dist/cjs/ion-nav_2.cjs.entry.js +17 -22
  178. package/dist/cjs/ion-picker-column-option.cjs.entry.js +23 -12
  179. package/dist/cjs/ion-picker-column.cjs.entry.js +31 -18
  180. package/dist/cjs/ion-picker.cjs.entry.js +5 -9
  181. package/dist/cjs/ion-popover.cjs.entry.js +137 -47
  182. package/dist/cjs/ion-progress-bar.cjs.entry.js +23 -12
  183. package/dist/cjs/ion-radio_2.cjs.entry.js +43 -31
  184. package/dist/cjs/ion-range.cjs.entry.js +71 -33
  185. package/dist/cjs/ion-refresher_2.cjs.entry.js +68 -26
  186. package/dist/cjs/ion-reorder_2.cjs.entry.js +17 -19
  187. package/dist/cjs/ion-ripple-effect.cjs.entry.js +13 -7
  188. package/dist/cjs/ion-route_4.cjs.entry.js +35 -21
  189. package/dist/cjs/ion-searchbar.cjs.entry.js +84 -37
  190. package/dist/cjs/ion-segment-content.cjs.entry.js +2 -5
  191. package/dist/cjs/ion-segment-view.cjs.entry.js +6 -8
  192. package/dist/cjs/ion-segment_2.cjs.entry.js +48 -30
  193. package/dist/cjs/ion-select-modal.cjs.entry.js +13 -20
  194. package/dist/cjs/ion-select_3.cjs.entry.js +88 -69
  195. package/dist/cjs/ion-spinner.cjs.entry.js +9 -12
  196. package/dist/cjs/ion-split-pane.cjs.entry.js +13 -10
  197. package/dist/cjs/ion-tab-bar_2.cjs.entry.js +26 -29
  198. package/dist/cjs/ion-tab_2.cjs.entry.js +9 -15
  199. package/dist/cjs/ion-text.cjs.entry.js +5 -9
  200. package/dist/cjs/ion-textarea.cjs.entry.js +79 -56
  201. package/dist/cjs/ion-toast.cjs.entry.js +65 -44
  202. package/dist/cjs/ion-toggle.cjs.entry.js +66 -44
  203. package/dist/cjs/{ionic-global-6dea5a96.js → ionic-global-BC3ee-Wa.js} +2 -2
  204. package/dist/cjs/ionic.cjs.js +9 -9
  205. package/dist/cjs/{ios.transition-a131cd4d.js → ios.transition-C9J4bBGV.js} +6 -6
  206. package/dist/cjs/{keyboard-0272231f.js → keyboard-UuAS4D_9.js} +1 -1
  207. package/dist/cjs/{keyboard-controller-c05e747a.js → keyboard-controller-GXBiBRKS.js} +2 -2
  208. package/dist/cjs/{keyboard-af1bb365.js → keyboard-hHzlEQpk.js} +3 -3
  209. package/dist/cjs/loader.cjs.js +5 -7
  210. package/dist/cjs/{md.transition-e018ebe5.js → md.transition-DT8PB4eS.js} +6 -6
  211. package/dist/cjs/{notch-controller-09b7f358.js → notch-controller-CARhSI1k.js} +2 -2
  212. package/dist/cjs/{overlays-4c291a05.js → overlays-B4rlyxhY.js} +7 -7
  213. package/dist/cjs/{status-tap-f1acefac.js → status-tap-B8fjNFjq.js} +4 -4
  214. package/dist/cjs/{swipe-back-4918e56b.js → swipe-back-N5-bJv4m.js} +5 -5
  215. package/dist/collection/collection-manifest.json +2 -2
  216. package/dist/collection/components/accordion/accordion.js +43 -13
  217. package/dist/collection/components/accordion-group/accordion-group.js +35 -8
  218. package/dist/collection/components/action-sheet/action-sheet.js +84 -31
  219. package/dist/collection/components/alert/alert.js +94 -34
  220. package/dist/collection/components/back-button/back-button.js +30 -14
  221. package/dist/collection/components/backdrop/backdrop.js +18 -3
  222. package/dist/collection/components/badge/badge.js +3 -4
  223. package/dist/collection/components/breadcrumb/breadcrumb.js +57 -26
  224. package/dist/collection/components/breadcrumbs/breadcrumbs.js +24 -10
  225. package/dist/collection/components/button/button.js +74 -33
  226. package/dist/collection/components/buttons/buttons.js +15 -1
  227. package/dist/collection/components/card/card.js +44 -16
  228. package/dist/collection/components/card-header/card-header.js +11 -3
  229. package/dist/collection/components/card-subtitle/card-subtitle.js +3 -4
  230. package/dist/collection/components/card-title/card-title.js +3 -4
  231. package/dist/collection/components/checkbox/checkbox.js +77 -34
  232. package/dist/collection/components/chip/chip.js +15 -4
  233. package/dist/collection/components/col/col.js +72 -50
  234. package/dist/collection/components/content/content.js +43 -9
  235. package/dist/collection/components/datetime/datetime.ios.css +7 -2
  236. package/dist/collection/components/datetime/datetime.js +298 -98
  237. package/dist/collection/components/datetime/datetime.md.css +9 -3
  238. package/dist/collection/components/datetime/utils/data.js +29 -4
  239. package/dist/collection/components/datetime-button/datetime-button.js +21 -11
  240. package/dist/collection/components/fab/fab.js +21 -6
  241. package/dist/collection/components/fab-button/fab-button.js +76 -28
  242. package/dist/collection/components/fab-list/fab-list.js +12 -2
  243. package/dist/collection/components/footer/footer.js +16 -5
  244. package/dist/collection/components/grid/grid.js +6 -1
  245. package/dist/collection/components/header/header.js +15 -4
  246. package/dist/collection/components/img/img.js +6 -6
  247. package/dist/collection/components/infinite-scroll/infinite-scroll.js +35 -7
  248. package/dist/collection/components/infinite-scroll-content/infinite-scroll-content.js +6 -4
  249. package/dist/collection/components/input/input.js +179 -91
  250. package/dist/collection/components/input-password-toggle/input-password-toggle.js +16 -8
  251. package/dist/collection/components/item/item.js +56 -21
  252. package/dist/collection/components/item-divider/item-divider.js +13 -3
  253. package/dist/collection/components/item-option/item-option.js +36 -16
  254. package/dist/collection/components/item-options/item-options.js +7 -1
  255. package/dist/collection/components/item-sliding/item-sliding.js +6 -1
  256. package/dist/collection/components/label/label.js +6 -4
  257. package/dist/collection/components/list/list.js +9 -3
  258. package/dist/collection/components/list-header/list-header.js +6 -6
  259. package/dist/collection/components/loading/loading.js +86 -29
  260. package/dist/collection/components/menu/menu.js +42 -10
  261. package/dist/collection/components/menu-button/menu-button.js +27 -10
  262. package/dist/collection/components/menu-toggle/menu-toggle.js +14 -5
  263. package/dist/collection/components/modal/modal.js +188 -51
  264. package/dist/collection/components/nav/nav.js +24 -11
  265. package/dist/collection/components/nav-link/nav-link.js +18 -8
  266. package/dist/collection/components/note/note.js +3 -4
  267. package/dist/collection/components/picker-column/picker-column.js +34 -10
  268. package/dist/collection/components/picker-column-option/picker-column-option.js +25 -4
  269. package/dist/collection/components/picker-legacy/picker.js +91 -31
  270. package/dist/collection/components/picker-legacy-column/picker-column.js +4 -2
  271. package/dist/collection/components/popover/popover.js +208 -55
  272. package/dist/collection/components/progress-bar/progress-bar.js +31 -6
  273. package/dist/collection/components/radio/radio.js +46 -16
  274. package/dist/collection/components/radio-group/radio-group.js +26 -12
  275. package/dist/collection/components/range/range.js +109 -34
  276. package/dist/collection/components/refresher/refresher.js +68 -6
  277. package/dist/collection/components/refresher-content/refresher-content.js +12 -8
  278. package/dist/collection/components/reorder-group/reorder-group.js +6 -1
  279. package/dist/collection/components/ripple-effect/ripple-effect.js +12 -1
  280. package/dist/collection/components/route/route.js +24 -9
  281. package/dist/collection/components/route-redirect/route-redirect.js +6 -6
  282. package/dist/collection/components/router/router.js +24 -2
  283. package/dist/collection/components/router-link/router-link.js +24 -12
  284. package/dist/collection/components/router-outlet/router-outlet.js +24 -8
  285. package/dist/collection/components/searchbar/searchbar.js +141 -46
  286. package/dist/collection/components/segment/segment.js +38 -13
  287. package/dist/collection/components/segment-button/segment-button.js +32 -11
  288. package/dist/collection/components/segment-view/segment-view.js +6 -2
  289. package/dist/collection/components/select/select.js +128 -59
  290. package/dist/collection/components/select-modal/select-modal.js +9 -4
  291. package/dist/collection/components/select-option/select-option.js +9 -3
  292. package/dist/collection/components/select-popover/select-popover.js +18 -8
  293. package/dist/collection/components/skeleton-text/skeleton-text.js +6 -1
  294. package/dist/collection/components/spinner/spinner.js +15 -7
  295. package/dist/collection/components/split-pane/split-pane.js +17 -4
  296. package/dist/collection/components/tab/tab.js +14 -7
  297. package/dist/collection/components/tab-bar/tab-bar.js +14 -5
  298. package/dist/collection/components/tab-button/tab-button.js +32 -16
  299. package/dist/collection/components/tabs/tabs.js +5 -3
  300. package/dist/collection/components/text/text.js +3 -4
  301. package/dist/collection/components/textarea/textarea.js +154 -70
  302. package/dist/collection/components/title/title.js +6 -6
  303. package/dist/collection/components/toast/toast.js +119 -45
  304. package/dist/collection/components/toggle/toggle.js +86 -35
  305. package/dist/collection/components/toolbar/toolbar.js +3 -2
  306. package/dist/collection/utils/input-shims/hacks/scroll-assist.js +18 -0
  307. package/dist/docs.d.ts +8 -0
  308. package/dist/docs.json +1823 -584
  309. package/dist/esm/{animation-8b25e105.js → animation-D4bve5rR.js} +2 -2
  310. package/dist/esm/{app-globals-dbdbb3df.js → app-globals-Ts_E1ch0.js} +1 -1
  311. package/dist/esm/{button-active-90f1dbc4.js → button-active-BQqkZ_sm.js} +3 -3
  312. package/dist/esm/{capacitor-59395cbd.js → capacitor-CFERIeaU.js} +1 -1
  313. package/dist/esm/{config-9898ed97.js → config-DTWRsyX5.js} +1 -1
  314. package/dist/esm/{data-0d7ea6eb.js → data-Iz8JZ8Jy.js} +31 -6
  315. package/dist/esm/{framework-delegate-56b467ad.js → framework-delegate-BEwxd9AM.js} +1 -1
  316. package/dist/esm/{gesture-controller-314a54f6.js → gesture-controller-BTEOs1at.js} +1 -1
  317. package/dist/esm/{haptic-ac164e4c.js → haptic-DzAMWJuk.js} +2 -2
  318. package/dist/esm/{hardware-back-button-a7eb8233.js → hardware-back-button-pnZ0X1YR.js} +2 -2
  319. package/dist/esm/{helpers-d94bc8ad.js → helpers-CzIihwFO.js} +3 -6
  320. package/dist/esm/{index-68c0d151.js → index-B83thFnh.js} +5 -5
  321. package/dist/esm/{index-e2cf2ceb.js → index-BLV6ykCk.js} +2 -1
  322. package/dist/esm/{index-be190feb.js → index-BjwCqtOY.js} +3 -3
  323. package/dist/esm/{index-cfd9c1f2.js → index-CEo1SqXS.js} +1 -1
  324. package/dist/esm/{index-39782642.js → index-CfgBF1SE.js} +4 -6
  325. package/dist/esm/{index-527b9e34.js → index-EP3pwcdb.js} +1395 -651
  326. package/dist/esm/{index-9a17db3d.js → index-M5ufqlzF.js} +3 -3
  327. package/dist/esm/{index-18f31305.js → index-RyWq7qIc.js} +6 -6
  328. package/dist/esm/index.js +18 -18
  329. package/dist/esm/{input-shims-279903e2.js → input-shims-BbXgvAcA.js} +24 -6
  330. package/dist/esm/{input.utils-40504d6d.js → input.utils-CWgOv5Mm.js} +3 -3
  331. package/dist/esm/ion-accordion_2.entry.js +54 -23
  332. package/dist/esm/ion-action-sheet.entry.js +50 -36
  333. package/dist/esm/ion-alert.entry.js +55 -39
  334. package/dist/esm/ion-app_8.entry.js +96 -63
  335. package/dist/esm/ion-avatar_3.entry.js +9 -15
  336. package/dist/esm/ion-back-button.entry.js +16 -17
  337. package/dist/esm/ion-backdrop.entry.js +14 -7
  338. package/dist/esm/ion-breadcrumb_2.entry.js +39 -33
  339. package/dist/esm/ion-button_2.entry.js +33 -28
  340. package/dist/esm/ion-card_5.entry.js +33 -34
  341. package/dist/esm/ion-checkbox.entry.js +48 -31
  342. package/dist/esm/ion-chip.entry.js +12 -9
  343. package/dist/esm/ion-col_3.entry.js +9 -33
  344. package/dist/esm/ion-datetime-button.entry.js +20 -18
  345. package/dist/esm/ion-datetime_3.entry.js +251 -120
  346. package/dist/esm/ion-fab_3.entry.js +58 -30
  347. package/dist/esm/ion-img.entry.js +5 -10
  348. package/dist/esm/ion-infinite-scroll_2.entry.js +35 -18
  349. package/dist/esm/ion-input-password-toggle.entry.js +11 -13
  350. package/dist/esm/ion-input.entry.js +87 -70
  351. package/dist/esm/ion-item-option_3.entry.js +32 -26
  352. package/dist/esm/ion-item_8.entry.js +50 -51
  353. package/dist/esm/ion-loading.entry.js +46 -29
  354. package/dist/esm/ion-menu_3.entry.js +62 -37
  355. package/dist/esm/ion-modal.entry.js +128 -50
  356. package/dist/esm/ion-nav_2.entry.js +17 -20
  357. package/dist/esm/ion-picker-column-option.entry.js +23 -10
  358. package/dist/esm/ion-picker-column.entry.js +31 -16
  359. package/dist/esm/ion-picker.entry.js +5 -7
  360. package/dist/esm/ion-popover.entry.js +137 -45
  361. package/dist/esm/ion-progress-bar.entry.js +23 -10
  362. package/dist/esm/ion-radio_2.entry.js +43 -29
  363. package/dist/esm/ion-range.entry.js +71 -31
  364. package/dist/esm/ion-refresher_2.entry.js +68 -24
  365. package/dist/esm/ion-reorder_2.entry.js +17 -17
  366. package/dist/esm/ion-ripple-effect.entry.js +13 -5
  367. package/dist/esm/ion-route_4.entry.js +35 -19
  368. package/dist/esm/ion-searchbar.entry.js +84 -35
  369. package/dist/esm/ion-segment-content.entry.js +2 -3
  370. package/dist/esm/ion-segment-view.entry.js +6 -6
  371. package/dist/esm/ion-segment_2.entry.js +48 -28
  372. package/dist/esm/ion-select-modal.entry.js +13 -18
  373. package/dist/esm/ion-select_3.entry.js +88 -67
  374. package/dist/esm/ion-spinner.entry.js +9 -10
  375. package/dist/esm/ion-split-pane.entry.js +13 -8
  376. package/dist/esm/ion-tab-bar_2.entry.js +26 -27
  377. package/dist/esm/ion-tab_2.entry.js +9 -13
  378. package/dist/esm/ion-text.entry.js +5 -7
  379. package/dist/esm/ion-textarea.entry.js +79 -54
  380. package/dist/esm/ion-toast.entry.js +65 -42
  381. package/dist/esm/ion-toggle.entry.js +64 -40
  382. package/dist/esm/{ionic-global-b26f573e.js → ionic-global-DapnXdYs.js} +2 -2
  383. package/dist/esm/ionic.js +8 -7
  384. package/dist/esm/{ios.transition-4047cb68.js → ios.transition-DN6Dy4K4.js} +6 -6
  385. package/dist/esm/{keyboard-73175e24.js → keyboard-CUw4ekVy.js} +1 -1
  386. package/dist/esm/{keyboard-controller-ec5c2bfa.js → keyboard-controller-BaaVITYt.js} +2 -2
  387. package/dist/esm/{keyboard-52278bd7.js → keyboard-ywgs5efA.js} +3 -3
  388. package/dist/esm/loader.js +6 -6
  389. package/dist/esm/{md.transition-30ce8d1b.js → md.transition-DR8zuFnL.js} +6 -6
  390. package/dist/esm/{notch-controller-1a1f7183.js → notch-controller-B3wZOqJe.js} +2 -2
  391. package/dist/esm/{overlays-d99dcb0a.js → overlays-Blhb_0oI.js} +7 -7
  392. package/dist/esm/{status-tap-42a8af65.js → status-tap-CZEjiztV.js} +4 -4
  393. package/dist/esm/{swipe-back-0184f6b3.js → swipe-back-DKV4csu9.js} +5 -5
  394. package/dist/html.html-data.json +216 -0
  395. package/dist/index.js +1 -1
  396. package/dist/ionic/index.esm.js +1 -1
  397. package/dist/ionic/ionic.esm.js +1 -1
  398. package/dist/ionic/p-030daf32.entry.js +4 -0
  399. package/dist/ionic/p-0434efbb.entry.js +4 -0
  400. package/dist/ionic/p-07a47eb6.entry.js +4 -0
  401. package/dist/ionic/p-08232f2d.entry.js +4 -0
  402. package/dist/ionic/{p-393ffcc2.entry.js → p-0c2a069d.entry.js} +1 -1
  403. package/dist/ionic/p-112af08b.entry.js +4 -0
  404. package/dist/ionic/{p-2469240b.entry.js → p-12b44c66.entry.js} +1 -1
  405. package/dist/ionic/p-1a19090e.entry.js +4 -0
  406. package/dist/ionic/p-306eab7a.entry.js +4 -0
  407. package/dist/ionic/p-38598652.entry.js +4 -0
  408. package/dist/ionic/p-38921e2f.entry.js +4 -0
  409. package/dist/ionic/p-38dcbd40.entry.js +4 -0
  410. package/dist/ionic/{p-b445ff65.entry.js → p-3edb2346.entry.js} +1 -1
  411. package/dist/ionic/p-4119d144.entry.js +4 -0
  412. package/dist/ionic/p-46a1ce99.entry.js +4 -0
  413. package/dist/ionic/p-46c15fe2.entry.js +4 -0
  414. package/dist/ionic/{p-e8245753.entry.js → p-46f82b82.entry.js} +1 -1
  415. package/dist/ionic/p-484073b5.entry.js +4 -0
  416. package/dist/ionic/p-49122d48.entry.js +4 -0
  417. package/dist/ionic/p-4a5cf7ac.entry.js +4 -0
  418. package/dist/ionic/p-5459e444.entry.js +4 -0
  419. package/dist/ionic/{p-12914457.entry.js → p-5b8abc2f.entry.js} +1 -1
  420. package/dist/ionic/p-5fb997f8.entry.js +4 -0
  421. package/dist/ionic/p-61f52724.entry.js +4 -0
  422. package/dist/ionic/{p-0f5e6225.js → p-7QgQi64o.js} +1 -1
  423. package/dist/ionic/p-83fdd9f6.entry.js +4 -0
  424. package/dist/ionic/p-89e3b3c6.entry.js +4 -0
  425. package/dist/ionic/p-8dda7cd4.entry.js +4 -0
  426. package/dist/ionic/p-93996b12.entry.js +4 -0
  427. package/dist/ionic/p-99c93730.entry.js +4 -0
  428. package/dist/ionic/p-9a0bde6e.entry.js +4 -0
  429. package/dist/ionic/p-9eeaBrnk.js +4 -0
  430. package/dist/ionic/p-B0af2jd_.js +4 -0
  431. package/dist/ionic/{p-da2b833b.js → p-BLV6ykCk.js} +1 -1
  432. package/dist/ionic/p-BNIA2meb.js +4 -0
  433. package/dist/ionic/{p-aded71ec.js → p-BSMFLyVh.js} +1 -1
  434. package/dist/ionic/{p-2bb55ebc.js → p-Bj2C9kIj.js} +1 -1
  435. package/dist/ionic/{p-b6d324f0.js → p-BoW9sZxI.js} +1 -1
  436. package/dist/ionic/{p-10a1bddc.js → p-C719rkLH.js} +1 -1
  437. package/dist/ionic/{p-17e21141.js → p-CEo1SqXS.js} +1 -1
  438. package/dist/ionic/p-CG4wBMWx.js +4 -0
  439. package/dist/ionic/p-CGDL9pFJ.js +4 -0
  440. package/dist/ionic/p-CIGNaXM1.js +4 -0
  441. package/dist/ionic/{p-89b61afc.js → p-CKvCXMs9.js} +1 -1
  442. package/dist/ionic/{p-8d2d39d0.js → p-CgRZM5_E.js} +1 -1
  443. package/dist/ionic/{p-ed005d9c.js → p-Ck7uSZOL.js} +1 -1
  444. package/dist/ionic/p-Cl0B-RWe.js +4 -0
  445. package/dist/ionic/p-CqNf-A5G.js +4 -0
  446. package/dist/ionic/p-CtWGkNnJ.js +4 -0
  447. package/dist/ionic/{p-f08a92cc.js → p-D-bDfEy0.js} +1 -1
  448. package/dist/ionic/{p-27281edd.js → p-D13Eaw-8.js} +1 -1
  449. package/dist/ionic/{p-809483ac.js → p-DCstKNei.js} +1 -1
  450. package/dist/ionic/p-DPhSdjFK.js +4 -0
  451. package/dist/ionic/p-DWFxQD6t.js +4 -0
  452. package/dist/ionic/{p-5b67b447.js → p-Dnc554yu.js} +1 -1
  453. package/dist/ionic/p-EP3pwcdb.js +5 -0
  454. package/dist/ionic/p-EglNvYQn.js +4 -0
  455. package/dist/ionic/{p-95001a19.js → p-LpklIrOy.js} +1 -1
  456. package/dist/ionic/{p-b7b1d91a.js → p-RuOFleJd.js} +1 -1
  457. package/dist/ionic/p-Uz6zKimy.js +4 -0
  458. package/dist/ionic/p-a178af33.entry.js +4 -0
  459. package/dist/ionic/p-a26637b1.entry.js +4 -0
  460. package/dist/ionic/p-a4bcf305.entry.js +4 -0
  461. package/dist/ionic/p-a9997b1b.entry.js +4 -0
  462. package/dist/ionic/p-ade7bda6.entry.js +4 -0
  463. package/dist/ionic/p-aeb7297a.entry.js +4 -0
  464. package/dist/ionic/p-b2b0f539.entry.js +4 -0
  465. package/dist/ionic/p-bc9feb4b.entry.js +4 -0
  466. package/dist/ionic/p-c19bc276.entry.js +4 -0
  467. package/dist/ionic/p-c3abde95.entry.js +4 -0
  468. package/dist/ionic/p-ce26cd7d.entry.js +4 -0
  469. package/dist/ionic/p-d77d0b41.entry.js +4 -0
  470. package/dist/ionic/p-d887000e.entry.js +4 -0
  471. package/dist/ionic/p-d9c08f93.entry.js +4 -0
  472. package/dist/ionic/p-df87cf2d.entry.js +4 -0
  473. package/dist/ionic/p-e2e4b1f1.entry.js +4 -0
  474. package/dist/ionic/p-e426331f.entry.js +4 -0
  475. package/dist/ionic/p-e471e1e5.entry.js +4 -0
  476. package/dist/ionic/p-e5e82fa5.entry.js +4 -0
  477. package/dist/ionic/p-f0c5ea4c.entry.js +4 -0
  478. package/dist/ionic/{p-481e0885.entry.js → p-ff362ebc.entry.js} +1 -1
  479. package/dist/types/components/checkbox/checkbox.d.ts +0 -5
  480. package/dist/types/components/datetime/datetime-interface.d.ts +1 -0
  481. package/dist/types/components/datetime/datetime.d.ts +6 -0
  482. package/dist/types/components/datetime/utils/data.d.ts +3 -1
  483. package/dist/types/components/datetime/utils/manipulation.d.ts +1 -0
  484. package/dist/types/components/input/input.d.ts +0 -5
  485. package/dist/types/components/select/select.d.ts +0 -5
  486. package/dist/types/components/textarea/textarea.d.ts +0 -5
  487. package/dist/types/components/toggle/toggle.d.ts +0 -5
  488. package/dist/types/components.d.ts +8 -0
  489. package/dist/types/stencil-public-runtime.d.ts +9 -0
  490. package/hydrate/index.d.ts +40 -5
  491. package/hydrate/index.js +4753 -2320
  492. package/hydrate/index.mjs +4752 -2319
  493. package/loader/cdn.js +1 -2
  494. package/loader/index.cjs.js +1 -2
  495. package/loader/index.es2017.js +0 -1
  496. package/loader/index.js +1 -2
  497. package/package.json +2 -2
  498. package/dist/esm/polyfills/core-js.js +0 -11
  499. package/dist/esm/polyfills/dom.js +0 -79
  500. package/dist/esm/polyfills/es5-html-element.js +0 -1
  501. package/dist/esm/polyfills/index.js +0 -34
  502. package/dist/esm/polyfills/system.js +0 -6
  503. package/dist/esm-es5/animation-8b25e105.js +0 -4
  504. package/dist/esm-es5/app-globals-dbdbb3df.js +0 -4
  505. package/dist/esm-es5/button-active-90f1dbc4.js +0 -4
  506. package/dist/esm-es5/capacitor-59395cbd.js +0 -4
  507. package/dist/esm-es5/compare-with-utils-a96ff2ea.js +0 -4
  508. package/dist/esm-es5/config-9898ed97.js +0 -4
  509. package/dist/esm-es5/cubic-bezier-fe2083dc.js +0 -4
  510. package/dist/esm-es5/data-0d7ea6eb.js +0 -4
  511. package/dist/esm-es5/dir-babeabeb.js +0 -4
  512. package/dist/esm-es5/focus-visible-dd40d69f.js +0 -4
  513. package/dist/esm-es5/framework-delegate-56b467ad.js +0 -4
  514. package/dist/esm-es5/gesture-controller-314a54f6.js +0 -4
  515. package/dist/esm-es5/haptic-ac164e4c.js +0 -4
  516. package/dist/esm-es5/hardware-back-button-a7eb8233.js +0 -4
  517. package/dist/esm-es5/helpers-d94bc8ad.js +0 -4
  518. package/dist/esm-es5/index-18f31305.js +0 -4
  519. package/dist/esm-es5/index-39782642.js +0 -4
  520. package/dist/esm-es5/index-527b9e34.js +0 -5
  521. package/dist/esm-es5/index-68c0d151.js +0 -4
  522. package/dist/esm-es5/index-9a17db3d.js +0 -4
  523. package/dist/esm-es5/index-a5d50daf.js +0 -4
  524. package/dist/esm-es5/index-be190feb.js +0 -4
  525. package/dist/esm-es5/index-cfd9c1f2.js +0 -5
  526. package/dist/esm-es5/index-e2cf2ceb.js +0 -4
  527. package/dist/esm-es5/index.js +0 -4
  528. package/dist/esm-es5/input-shims-279903e2.js +0 -4
  529. package/dist/esm-es5/input.utils-40504d6d.js +0 -4
  530. package/dist/esm-es5/ion-accordion_2.entry.js +0 -4
  531. package/dist/esm-es5/ion-action-sheet.entry.js +0 -4
  532. package/dist/esm-es5/ion-alert.entry.js +0 -4
  533. package/dist/esm-es5/ion-app_8.entry.js +0 -4
  534. package/dist/esm-es5/ion-avatar_3.entry.js +0 -4
  535. package/dist/esm-es5/ion-back-button.entry.js +0 -4
  536. package/dist/esm-es5/ion-backdrop.entry.js +0 -4
  537. package/dist/esm-es5/ion-breadcrumb_2.entry.js +0 -4
  538. package/dist/esm-es5/ion-button_2.entry.js +0 -4
  539. package/dist/esm-es5/ion-card_5.entry.js +0 -4
  540. package/dist/esm-es5/ion-checkbox.entry.js +0 -4
  541. package/dist/esm-es5/ion-chip.entry.js +0 -4
  542. package/dist/esm-es5/ion-col_3.entry.js +0 -4
  543. package/dist/esm-es5/ion-datetime-button.entry.js +0 -4
  544. package/dist/esm-es5/ion-datetime_3.entry.js +0 -4
  545. package/dist/esm-es5/ion-fab_3.entry.js +0 -4
  546. package/dist/esm-es5/ion-img.entry.js +0 -4
  547. package/dist/esm-es5/ion-infinite-scroll_2.entry.js +0 -4
  548. package/dist/esm-es5/ion-input-password-toggle.entry.js +0 -4
  549. package/dist/esm-es5/ion-input.entry.js +0 -4
  550. package/dist/esm-es5/ion-item-option_3.entry.js +0 -4
  551. package/dist/esm-es5/ion-item_8.entry.js +0 -4
  552. package/dist/esm-es5/ion-loading.entry.js +0 -4
  553. package/dist/esm-es5/ion-menu_3.entry.js +0 -4
  554. package/dist/esm-es5/ion-modal.entry.js +0 -4
  555. package/dist/esm-es5/ion-nav_2.entry.js +0 -4
  556. package/dist/esm-es5/ion-picker-column-option.entry.js +0 -4
  557. package/dist/esm-es5/ion-picker-column.entry.js +0 -4
  558. package/dist/esm-es5/ion-picker.entry.js +0 -4
  559. package/dist/esm-es5/ion-popover.entry.js +0 -4
  560. package/dist/esm-es5/ion-progress-bar.entry.js +0 -4
  561. package/dist/esm-es5/ion-radio_2.entry.js +0 -4
  562. package/dist/esm-es5/ion-range.entry.js +0 -4
  563. package/dist/esm-es5/ion-refresher_2.entry.js +0 -4
  564. package/dist/esm-es5/ion-reorder_2.entry.js +0 -4
  565. package/dist/esm-es5/ion-ripple-effect.entry.js +0 -4
  566. package/dist/esm-es5/ion-route_4.entry.js +0 -4
  567. package/dist/esm-es5/ion-searchbar.entry.js +0 -4
  568. package/dist/esm-es5/ion-segment-content.entry.js +0 -4
  569. package/dist/esm-es5/ion-segment-view.entry.js +0 -4
  570. package/dist/esm-es5/ion-segment_2.entry.js +0 -4
  571. package/dist/esm-es5/ion-select-modal.entry.js +0 -4
  572. package/dist/esm-es5/ion-select_3.entry.js +0 -4
  573. package/dist/esm-es5/ion-spinner.entry.js +0 -4
  574. package/dist/esm-es5/ion-split-pane.entry.js +0 -4
  575. package/dist/esm-es5/ion-tab-bar_2.entry.js +0 -4
  576. package/dist/esm-es5/ion-tab_2.entry.js +0 -4
  577. package/dist/esm-es5/ion-text.entry.js +0 -4
  578. package/dist/esm-es5/ion-textarea.entry.js +0 -4
  579. package/dist/esm-es5/ion-toast.entry.js +0 -4
  580. package/dist/esm-es5/ion-toggle.entry.js +0 -4
  581. package/dist/esm-es5/ionic-global-b26f573e.js +0 -4
  582. package/dist/esm-es5/ionic.js +0 -4
  583. package/dist/esm-es5/ios.transition-4047cb68.js +0 -4
  584. package/dist/esm-es5/keyboard-52278bd7.js +0 -4
  585. package/dist/esm-es5/keyboard-73175e24.js +0 -4
  586. package/dist/esm-es5/keyboard-controller-ec5c2bfa.js +0 -4
  587. package/dist/esm-es5/loader.js +0 -4
  588. package/dist/esm-es5/lock-controller-316928be.js +0 -4
  589. package/dist/esm-es5/md.transition-30ce8d1b.js +0 -4
  590. package/dist/esm-es5/notch-controller-1a1f7183.js +0 -4
  591. package/dist/esm-es5/overlays-d99dcb0a.js +0 -4
  592. package/dist/esm-es5/spinner-configs-964f7cf3.js +0 -4
  593. package/dist/esm-es5/status-tap-42a8af65.js +0 -4
  594. package/dist/esm-es5/swipe-back-0184f6b3.js +0 -4
  595. package/dist/esm-es5/theme-01f3f29c.js +0 -4
  596. package/dist/esm-es5/watch-options-c2911ace.js +0 -4
  597. package/dist/ionic/ionic.js +0 -127
  598. package/dist/ionic/p-00023f5a.system.js +0 -4
  599. package/dist/ionic/p-012c3ceb.system.js +0 -4
  600. package/dist/ionic/p-019e30a3.system.entry.js +0 -4
  601. package/dist/ionic/p-03480b95.system.entry.js +0 -4
  602. package/dist/ionic/p-08cef0b1.entry.js +0 -4
  603. package/dist/ionic/p-08e01816.system.js +0 -4
  604. package/dist/ionic/p-105b2e8b.entry.js +0 -4
  605. package/dist/ionic/p-117d0013.system.entry.js +0 -4
  606. package/dist/ionic/p-11dca959.entry.js +0 -4
  607. package/dist/ionic/p-12193821.system.js +0 -4
  608. package/dist/ionic/p-12830298.system.entry.js +0 -4
  609. package/dist/ionic/p-14154301.system.entry.js +0 -4
  610. package/dist/ionic/p-14bdb5aa.entry.js +0 -4
  611. package/dist/ionic/p-1706b406.system.entry.js +0 -4
  612. package/dist/ionic/p-171ca87d.system.js +0 -4
  613. package/dist/ionic/p-19494658.system.entry.js +0 -4
  614. package/dist/ionic/p-1966a13c.system.js +0 -4
  615. package/dist/ionic/p-1974d5b2.system.js +0 -4
  616. package/dist/ionic/p-1a81ac09.system.js +0 -4
  617. package/dist/ionic/p-1b9c59ab.js +0 -4
  618. package/dist/ionic/p-1d307396.system.js +0 -4
  619. package/dist/ionic/p-1dfc11b3.system.js +0 -4
  620. package/dist/ionic/p-1e4371bd.js +0 -4
  621. package/dist/ionic/p-1e955a45.system.js +0 -4
  622. package/dist/ionic/p-20d469d0.system.js +0 -4
  623. package/dist/ionic/p-21891ead.js +0 -4
  624. package/dist/ionic/p-2233344a.system.js +0 -4
  625. package/dist/ionic/p-24a6c8a3.system.entry.js +0 -4
  626. package/dist/ionic/p-257fb777.entry.js +0 -4
  627. package/dist/ionic/p-25b10f81.js +0 -4
  628. package/dist/ionic/p-2b7827c7.js +0 -4
  629. package/dist/ionic/p-2bff0e69.system.entry.js +0 -4
  630. package/dist/ionic/p-31dc303d.entry.js +0 -4
  631. package/dist/ionic/p-3535d6b5.entry.js +0 -4
  632. package/dist/ionic/p-35cdfd77.system.entry.js +0 -4
  633. package/dist/ionic/p-39fa7dd1.system.entry.js +0 -4
  634. package/dist/ionic/p-3a30f31b.system.entry.js +0 -4
  635. package/dist/ionic/p-3e1e14d9.system.js +0 -4
  636. package/dist/ionic/p-42f08b26.system.entry.js +0 -4
  637. package/dist/ionic/p-4609d030.system.js +0 -4
  638. package/dist/ionic/p-4a5be299.system.entry.js +0 -4
  639. package/dist/ionic/p-4c667fce.js +0 -4
  640. package/dist/ionic/p-4cf4172e.entry.js +0 -4
  641. package/dist/ionic/p-4da92dac.entry.js +0 -4
  642. package/dist/ionic/p-4ed5db19.system.js +0 -4
  643. package/dist/ionic/p-4f255d5a.system.js +0 -4
  644. package/dist/ionic/p-50cb2e8b.system.entry.js +0 -4
  645. package/dist/ionic/p-57957c0f.entry.js +0 -4
  646. package/dist/ionic/p-57d6e18e.entry.js +0 -4
  647. package/dist/ionic/p-57e55ecb.system.js +0 -4
  648. package/dist/ionic/p-5c9feddc.system.entry.js +0 -4
  649. package/dist/ionic/p-5fac20aa.system.entry.js +0 -4
  650. package/dist/ionic/p-612096e6.system.entry.js +0 -4
  651. package/dist/ionic/p-6201c4ba.entry.js +0 -4
  652. package/dist/ionic/p-625248d0.system.js +0 -4
  653. package/dist/ionic/p-663413be.system.js +0 -4
  654. package/dist/ionic/p-6636a436.js +0 -4
  655. package/dist/ionic/p-66a5d6a8.js +0 -5
  656. package/dist/ionic/p-66df5468.system.entry.js +0 -4
  657. package/dist/ionic/p-67077d48.entry.js +0 -4
  658. package/dist/ionic/p-6835ebdd.system.entry.js +0 -4
  659. package/dist/ionic/p-6a03fc0f.entry.js +0 -4
  660. package/dist/ionic/p-6b8530f5.system.entry.js +0 -4
  661. package/dist/ionic/p-6c474e87.entry.js +0 -4
  662. package/dist/ionic/p-6dd86ff5.system.entry.js +0 -4
  663. package/dist/ionic/p-6ec0c94a.entry.js +0 -4
  664. package/dist/ionic/p-6f832afe.system.entry.js +0 -4
  665. package/dist/ionic/p-707408c5.system.entry.js +0 -4
  666. package/dist/ionic/p-712c0131.entry.js +0 -4
  667. package/dist/ionic/p-721f43f9.entry.js +0 -4
  668. package/dist/ionic/p-72b3050b.system.entry.js +0 -4
  669. package/dist/ionic/p-7445a2e5.system.js +0 -4
  670. package/dist/ionic/p-7611ede3.system.entry.js +0 -4
  671. package/dist/ionic/p-781e2dbb.system.js +0 -4
  672. package/dist/ionic/p-792919fd.system.js +0 -4
  673. package/dist/ionic/p-7b8c12c3.entry.js +0 -4
  674. package/dist/ionic/p-7c5c7ae1.system.entry.js +0 -4
  675. package/dist/ionic/p-7e3e6ed2.entry.js +0 -4
  676. package/dist/ionic/p-7ffedf77.system.entry.js +0 -4
  677. package/dist/ionic/p-81904a80.entry.js +0 -4
  678. package/dist/ionic/p-84096b45.system.js +0 -4
  679. package/dist/ionic/p-8450f761.entry.js +0 -4
  680. package/dist/ionic/p-8460d95a.entry.js +0 -4
  681. package/dist/ionic/p-85b01465.js +0 -4
  682. package/dist/ionic/p-865fe95c.entry.js +0 -4
  683. package/dist/ionic/p-8674af94.entry.js +0 -4
  684. package/dist/ionic/p-890a4ee2.entry.js +0 -4
  685. package/dist/ionic/p-891553d8.entry.js +0 -4
  686. package/dist/ionic/p-8985cdb6.system.js +0 -4
  687. package/dist/ionic/p-8ab2f7a4.system.entry.js +0 -4
  688. package/dist/ionic/p-8b050e84.system.js +0 -4
  689. package/dist/ionic/p-8dacf4e2.entry.js +0 -4
  690. package/dist/ionic/p-8ededb41.js +0 -4
  691. package/dist/ionic/p-94551927.js +0 -4
  692. package/dist/ionic/p-965287fb.system.entry.js +0 -4
  693. package/dist/ionic/p-979d4f5c.system.js +0 -4
  694. package/dist/ionic/p-98fd942b.system.entry.js +0 -4
  695. package/dist/ionic/p-9df5043e.system.entry.js +0 -4
  696. package/dist/ionic/p-a0fd2fe5.system.entry.js +0 -4
  697. package/dist/ionic/p-a4866e3e.system.js +0 -4
  698. package/dist/ionic/p-a5dbe0ff.system.entry.js +0 -4
  699. package/dist/ionic/p-a7a97bf4.system.entry.js +0 -4
  700. package/dist/ionic/p-a835aca8.entry.js +0 -4
  701. package/dist/ionic/p-a83e3290.system.js +0 -4
  702. package/dist/ionic/p-a93873de.system.js +0 -4
  703. package/dist/ionic/p-aad57e35.entry.js +0 -4
  704. package/dist/ionic/p-ab7337e1.entry.js +0 -4
  705. package/dist/ionic/p-abe101da.system.js +0 -4
  706. package/dist/ionic/p-ad592db9.entry.js +0 -4
  707. package/dist/ionic/p-ae039072.entry.js +0 -4
  708. package/dist/ionic/p-aebfab05.system.entry.js +0 -4
  709. package/dist/ionic/p-b06ac4a5.system.js +0 -4
  710. package/dist/ionic/p-b22ab9f4.js +0 -4
  711. package/dist/ionic/p-b2e7eda0.system.entry.js +0 -4
  712. package/dist/ionic/p-b4d17da0.system.entry.js +0 -4
  713. package/dist/ionic/p-b5432d15.entry.js +0 -4
  714. package/dist/ionic/p-b8050298.system.entry.js +0 -4
  715. package/dist/ionic/p-b904cfe2.system.entry.js +0 -4
  716. package/dist/ionic/p-b9c793d4.entry.js +0 -4
  717. package/dist/ionic/p-bafc3eae.system.entry.js +0 -4
  718. package/dist/ionic/p-bf184319.system.entry.js +0 -4
  719. package/dist/ionic/p-c16443a8.system.js +0 -4
  720. package/dist/ionic/p-c1b7d311.system.entry.js +0 -4
  721. package/dist/ionic/p-c2160d8c.entry.js +0 -4
  722. package/dist/ionic/p-c468af8a.system.js +0 -4
  723. package/dist/ionic/p-c5b77054.entry.js +0 -4
  724. package/dist/ionic/p-c5bfa3e9.entry.js +0 -4
  725. package/dist/ionic/p-c61cc894.js +0 -4
  726. package/dist/ionic/p-cad82569.entry.js +0 -4
  727. package/dist/ionic/p-cec902a0.system.entry.js +0 -4
  728. package/dist/ionic/p-d16fab3f.entry.js +0 -4
  729. package/dist/ionic/p-d1eb2d7f.entry.js +0 -4
  730. package/dist/ionic/p-d382f09c.system.js +0 -4
  731. package/dist/ionic/p-d8d84afa.system.js +0 -4
  732. package/dist/ionic/p-d984c1ab.system.entry.js +0 -4
  733. package/dist/ionic/p-dabe3bd4.js +0 -4
  734. package/dist/ionic/p-df069a0d.entry.js +0 -4
  735. package/dist/ionic/p-e1678e42.entry.js +0 -4
  736. package/dist/ionic/p-e673a0a2.system.js +0 -4
  737. package/dist/ionic/p-e727e32d.system.entry.js +0 -4
  738. package/dist/ionic/p-e887b6a9.system.js +0 -4
  739. package/dist/ionic/p-edd2e3c7.entry.js +0 -4
  740. package/dist/ionic/p-f0c9f8e3.system.entry.js +0 -4
  741. package/dist/ionic/p-f0ef39ab.entry.js +0 -4
  742. package/dist/ionic/p-f11a9436.system.js +0 -5
  743. package/dist/ionic/p-f22490a7.system.entry.js +0 -4
  744. package/dist/ionic/p-f6bb9be7.system.entry.js +0 -4
  745. package/dist/ionic/p-f6e7d104.system.js +0 -4
  746. package/dist/ionic/p-f725bf9e.system.js +0 -4
  747. package/dist/ionic/p-f9a87db2.system.entry.js +0 -4
  748. package/dist/ionic/p-fa3f4b96.system.js +0 -4
  749. package/dist/ionic/p-fe063952.system.entry.js +0 -4
  750. package/loader/package.json +0 -11
  751. /package/dist/cjs/{compare-with-utils-df1001d7.js → compare-with-utils-DSicavqM.js} +0 -0
  752. /package/dist/cjs/{cubic-bezier-f2dccc53.js → cubic-bezier-DAjy1V-e.js} +0 -0
  753. /package/dist/cjs/{dir-94c21456.js → dir-Cn0z1rJH.js} +0 -0
  754. /package/dist/cjs/{focus-visible-7a0ce04f.js → focus-visible-CCvKiLh3.js} +0 -0
  755. /package/dist/cjs/{index-cc858e97.js → index-CAT7dkq1.js} +0 -0
  756. /package/dist/cjs/{index-c8d52405.js → index-DkNv4J_i.js} +0 -0
  757. /package/dist/cjs/{lock-controller-6585a42a.js → lock-controller-aDB9wrEf.js} +0 -0
  758. /package/dist/cjs/{spinner-configs-282fd50a.js → spinner-configs-DxHKnd3-.js} +0 -0
  759. /package/dist/cjs/{theme-d1c573d2.js → theme-CeDs6Hcv.js} +0 -0
  760. /package/dist/cjs/{watch-options-f5f3e158.js → watch-options-CviOsrTS.js} +0 -0
  761. /package/dist/esm/{compare-with-utils-a96ff2ea.js → compare-with-utils-sObYyvOy.js} +0 -0
  762. /package/dist/esm/{cubic-bezier-fe2083dc.js → cubic-bezier-hHmYLOfE.js} +0 -0
  763. /package/dist/esm/{dir-babeabeb.js → dir-C53feagD.js} +0 -0
  764. /package/dist/esm/{focus-visible-dd40d69f.js → focus-visible-BmVRXR1y.js} +0 -0
  765. /package/dist/esm/{index-a5d50daf.js → index-ZjP4CjeZ.js} +0 -0
  766. /package/dist/esm/{lock-controller-316928be.js → lock-controller-B-hirT0v.js} +0 -0
  767. /package/dist/esm/{spinner-configs-964f7cf3.js → spinner-configs-D4RIp70E.js} +0 -0
  768. /package/dist/esm/{theme-01f3f29c.js → theme-DiVJyqlX.js} +0 -0
  769. /package/dist/esm/{watch-options-c2911ace.js → watch-options-Dtdm8lKC.js} +0 -0
  770. /package/dist/ionic/{p-ccd02320.js → p-B-hirT0v.js} +0 -0
  771. /package/dist/ionic/{p-9b97df10.js → p-BTEOs1at.js} +0 -0
  772. /package/dist/ionic/{p-d47265c8.js → p-BmVRXR1y.js} +0 -0
  773. /package/dist/ionic/{p-fb813dab.js → p-C53feagD.js} +0 -0
  774. /package/dist/ionic/{p-f0c2a614.js → p-D4RIp70E.js} +0 -0
  775. /package/dist/ionic/{p-47794def.js → p-DiVJyqlX.js} +0 -0
  776. /package/dist/ionic/{p-459d13d5.js → p-Dtdm8lKC.js} +0 -0
  777. /package/dist/ionic/{p-7b30edcc.js → p-ZjP4CjeZ.js} +0 -0
  778. /package/dist/ionic/{p-2408c236.js → p-hHmYLOfE.js} +0 -0
  779. /package/dist/ionic/{p-de756e5c.js → p-sObYyvOy.js} +0 -0
@@ -3,31 +3,11 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- function _interopNamespace(e) {
7
- if (e && e.__esModule) return e;
8
- var n = Object.create(null);
9
- if (e) {
10
- Object.keys(e).forEach(function (k) {
11
- if (k !== 'default') {
12
- var d = Object.getOwnPropertyDescriptor(e, k);
13
- Object.defineProperty(n, k, d.get ? d : {
14
- enumerable: true,
15
- get: function () {
16
- return e[k];
17
- }
18
- });
19
- }
20
- });
21
- }
22
- n['default'] = e;
23
- return Object.freeze(n);
24
- }
25
-
26
6
  const NAMESPACE = 'ionic';
27
- const BUILD = /* ionic */ { allRenderFn: false, appendChildSlotFix: true, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: true, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: true, experimentalSlotFixes: true, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: true, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: true, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: true, scopedSlotTextContentFix: true, scriptDataOpts: false, shadowDelegatesFocus: true, shadowDom: true, slot: true, slotChildNodesFix: true, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
7
+ const BUILD = /* ionic */ { experimentalSlotFixes: true, hydratedSelectorName: "hydrated", lazyLoad: true, shadowDom: true, slotRelocation: true, updatable: true};
28
8
 
29
9
  /*
30
- Stencil Client Platform v4.20.0 | MIT Licensed | https://stenciljs.com
10
+ Stencil Client Platform v4.29.3 | MIT Licensed | https://stenciljs.com
31
11
  */
32
12
  var __defProp = Object.defineProperty;
33
13
  var __export = (target, all) => {
@@ -35,14 +15,47 @@ var __export = (target, all) => {
35
15
  __defProp(target, name, { get: all[name], enumerable: true });
36
16
  };
37
17
  var Build = {
38
- isDev: false,
39
- isBrowser: true,
40
- isServer: false,
41
- isTesting: false
42
- };
43
- var hostRefs = /* @__PURE__ */ new WeakMap();
44
- var getHostRef = (ref) => hostRefs.get(ref);
45
- var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
18
+ isBrowser: true};
19
+
20
+ // src/utils/constants.ts
21
+ var SVG_NS = "http://www.w3.org/2000/svg";
22
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
23
+ var PrimitiveType = /* @__PURE__ */ ((PrimitiveType2) => {
24
+ PrimitiveType2["Undefined"] = "undefined";
25
+ PrimitiveType2["Null"] = "null";
26
+ PrimitiveType2["String"] = "string";
27
+ PrimitiveType2["Number"] = "number";
28
+ PrimitiveType2["SpecialNumber"] = "number";
29
+ PrimitiveType2["Boolean"] = "boolean";
30
+ PrimitiveType2["BigInt"] = "bigint";
31
+ return PrimitiveType2;
32
+ })(PrimitiveType || {});
33
+ var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
34
+ NonPrimitiveType2["Array"] = "array";
35
+ NonPrimitiveType2["Date"] = "date";
36
+ NonPrimitiveType2["Map"] = "map";
37
+ NonPrimitiveType2["Object"] = "object";
38
+ NonPrimitiveType2["RegularExpression"] = "regexp";
39
+ NonPrimitiveType2["Set"] = "set";
40
+ NonPrimitiveType2["Channel"] = "channel";
41
+ NonPrimitiveType2["Symbol"] = "symbol";
42
+ return NonPrimitiveType2;
43
+ })(NonPrimitiveType || {});
44
+ var TYPE_CONSTANT = "type";
45
+ var VALUE_CONSTANT = "value";
46
+ var SERIALIZED_PREFIX = "serialized:";
47
+
48
+ // src/client/client-host-ref.ts
49
+ var getHostRef = (ref) => {
50
+ if (ref.__stencil__getHostRef) {
51
+ return ref.__stencil__getHostRef();
52
+ }
53
+ return void 0;
54
+ };
55
+ var registerInstance = (lazyInstance, hostRef) => {
56
+ lazyInstance.__stencil__getHostRef = () => hostRef;
57
+ hostRef.$lazyInstance$ = lazyInstance;
58
+ };
46
59
  var registerHost = (hostElement, cmpMeta) => {
47
60
  const hostRef = {
48
61
  $flags$: 0,
@@ -58,7 +71,9 @@ var registerHost = (hostElement, cmpMeta) => {
58
71
  hostElement["s-p"] = [];
59
72
  hostElement["s-rc"] = [];
60
73
  }
61
- return hostRefs.set(hostElement, hostRef);
74
+ const ref = hostRef;
75
+ hostElement.__stencil__getHostRef = () => ref;
76
+ return ref;
62
77
  };
63
78
  var isMemberInElement = (elm, memberName) => memberName in elm;
64
79
  var consoleError = (e, el) => (0, console.error)(e, el);
@@ -76,18 +91,23 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
76
91
  return module[exportName];
77
92
  }
78
93
  /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
79
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
94
+ return import(
80
95
  /* @vite-ignore */
81
96
  /* webpackInclude: /\.entry\.js$/ */
82
97
  /* webpackExclude: /\.system\.entry\.js$/ */
83
98
  /* webpackMode: "lazy" */
84
99
  `./${bundleId}.entry.js${""}`
85
- )); }).then((importedModule) => {
86
- {
87
- cmpModules.set(bundleId, importedModule);
100
+ ).then(
101
+ (importedModule) => {
102
+ {
103
+ cmpModules.set(bundleId, importedModule);
104
+ }
105
+ return importedModule[exportName];
106
+ },
107
+ (e) => {
108
+ consoleError(e, hostRef.$hostElement$);
88
109
  }
89
- return importedModule[exportName];
90
- }, consoleError);
110
+ );
91
111
  };
92
112
 
93
113
  // src/client/client-style.ts
@@ -99,6 +119,7 @@ var CONTENT_REF_ID = "r";
99
119
  var ORG_LOCATION_ID = "o";
100
120
  var SLOT_NODE_ID = "s";
101
121
  var TEXT_NODE_ID = "t";
122
+ var COMMENT_NODE_ID = "c";
102
123
  var HYDRATE_ID = "s-id";
103
124
  var HYDRATED_STYLE_ID = "sty-id";
104
125
  var HYDRATE_CHILD_ID = "c-id";
@@ -106,7 +127,6 @@ var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
106
127
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
107
128
  var XLINK_NS = "http://www.w3.org/1999/xlink";
108
129
  var win = typeof window !== "undefined" ? window : {};
109
- var doc = win.document || { head: {} };
110
130
  var H = win.HTMLElement || class {
111
131
  };
112
132
  var plt = {
@@ -120,9 +140,10 @@ var plt = {
120
140
  };
121
141
  var supportsShadow = BUILD.shadowDom;
122
142
  var supportsListenerOptions = /* @__PURE__ */ (() => {
143
+ var _a;
123
144
  let supportsListenerOptions2 = false;
124
145
  try {
125
- doc.addEventListener(
146
+ (_a = win.document) == null ? void 0 : _a.addEventListener(
126
147
  "e",
127
148
  null,
128
149
  Object.defineProperty({}, "passive", {
@@ -187,24 +208,119 @@ var getAssetPath = (path) => {
187
208
  return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
188
209
  };
189
210
 
190
- // src/utils/constants.ts
191
- var EMPTY_OBJ = {};
192
- var SVG_NS = "http://www.w3.org/2000/svg";
193
- var HTML_NS = "http://www.w3.org/1999/xhtml";
194
-
195
211
  // src/utils/helpers.ts
196
- var isDef = (v) => v != null;
212
+ var isDef = (v) => v != null && v !== void 0;
197
213
  var isComplexType = (o) => {
198
214
  o = typeof o;
199
215
  return o === "object" || o === "function";
200
216
  };
201
217
 
202
218
  // src/utils/query-nonce-meta-tag-content.ts
203
- function queryNonceMetaTagContent(doc2) {
219
+ function queryNonceMetaTagContent(doc) {
204
220
  var _a, _b, _c;
205
- return (_c = (_b = (_a = doc2.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
221
+ return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
206
222
  }
207
223
 
224
+ // src/utils/regular-expression.ts
225
+ var escapeRegExpSpecialCharacters = (text) => {
226
+ return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
227
+ };
228
+
229
+ // src/utils/remote-value.ts
230
+ var RemoteValue = class _RemoteValue {
231
+ /**
232
+ * Deserializes a LocalValue serialized object back to its original JavaScript representation
233
+ *
234
+ * @param serialized The serialized LocalValue object
235
+ * @returns The original JavaScript value/object
236
+ */
237
+ static fromLocalValue(serialized) {
238
+ const type = serialized[TYPE_CONSTANT];
239
+ const value = VALUE_CONSTANT in serialized ? serialized[VALUE_CONSTANT] : void 0;
240
+ switch (type) {
241
+ case "string" /* String */:
242
+ return value;
243
+ case "boolean" /* Boolean */:
244
+ return value;
245
+ case "bigint" /* BigInt */:
246
+ return BigInt(value);
247
+ case "undefined" /* Undefined */:
248
+ return void 0;
249
+ case "null" /* Null */:
250
+ return null;
251
+ case "number" /* Number */:
252
+ if (value === "NaN") return NaN;
253
+ if (value === "-0") return -0;
254
+ if (value === "Infinity") return Infinity;
255
+ if (value === "-Infinity") return -Infinity;
256
+ return value;
257
+ case "array" /* Array */:
258
+ return value.map((item) => _RemoteValue.fromLocalValue(item));
259
+ case "date" /* Date */:
260
+ return new Date(value);
261
+ case "map" /* Map */:
262
+ const map2 = /* @__PURE__ */ new Map();
263
+ for (const [key, val] of value) {
264
+ const deserializedKey = typeof key === "object" && key !== null ? _RemoteValue.fromLocalValue(key) : key;
265
+ const deserializedValue = _RemoteValue.fromLocalValue(val);
266
+ map2.set(deserializedKey, deserializedValue);
267
+ }
268
+ return map2;
269
+ case "object" /* Object */:
270
+ const obj = {};
271
+ for (const [key, val] of value) {
272
+ obj[key] = _RemoteValue.fromLocalValue(val);
273
+ }
274
+ return obj;
275
+ case "regexp" /* RegularExpression */:
276
+ const { pattern, flags } = value;
277
+ return new RegExp(pattern, flags);
278
+ case "set" /* Set */:
279
+ const set = /* @__PURE__ */ new Set();
280
+ for (const item of value) {
281
+ set.add(_RemoteValue.fromLocalValue(item));
282
+ }
283
+ return set;
284
+ case "symbol" /* Symbol */:
285
+ return Symbol(value);
286
+ default:
287
+ throw new Error(`Unsupported type: ${type}`);
288
+ }
289
+ }
290
+ /**
291
+ * Utility method to deserialize multiple LocalValues at once
292
+ *
293
+ * @param serializedValues Array of serialized LocalValue objects
294
+ * @returns Array of deserialized JavaScript values
295
+ */
296
+ static fromLocalValueArray(serializedValues) {
297
+ return serializedValues.map((value) => _RemoteValue.fromLocalValue(value));
298
+ }
299
+ /**
300
+ * Verifies if the given object matches the structure of a serialized LocalValue
301
+ *
302
+ * @param obj Object to verify
303
+ * @returns boolean indicating if the object has LocalValue structure
304
+ */
305
+ static isLocalValueObject(obj) {
306
+ if (typeof obj !== "object" || obj === null) {
307
+ return false;
308
+ }
309
+ if (!obj.hasOwnProperty(TYPE_CONSTANT)) {
310
+ return false;
311
+ }
312
+ const type = obj[TYPE_CONSTANT];
313
+ const hasTypeProperty = Object.values({ ...PrimitiveType, ...NonPrimitiveType }).includes(type);
314
+ if (!hasTypeProperty) {
315
+ return false;
316
+ }
317
+ if (type !== "null" /* Null */ && type !== "undefined" /* Undefined */) {
318
+ return obj.hasOwnProperty(VALUE_CONSTANT);
319
+ }
320
+ return true;
321
+ }
322
+ };
323
+
208
324
  // src/utils/result.ts
209
325
  var result_exports = {};
210
326
  __export(result_exports, {
@@ -253,6 +369,527 @@ var unwrapErr = (result) => {
253
369
  throw result.value;
254
370
  }
255
371
  };
372
+
373
+ // src/utils/serialize.ts
374
+ function deserializeProperty(value) {
375
+ if (typeof value !== "string" || !value.startsWith(SERIALIZED_PREFIX)) {
376
+ return value;
377
+ }
378
+ return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
379
+ }
380
+ var updateFallbackSlotVisibility = (elm) => {
381
+ const childNodes = internalCall(elm, "childNodes");
382
+ if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
383
+ getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
384
+ if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
385
+ if (getSlotChildSiblings(slotNode, getSlotName(slotNode), false).length) {
386
+ slotNode.hidden = true;
387
+ } else {
388
+ slotNode.hidden = false;
389
+ }
390
+ }
391
+ });
392
+ }
393
+ let i2 = 0;
394
+ for (i2 = 0; i2 < childNodes.length; i2++) {
395
+ const childNode = childNodes[i2];
396
+ if (childNode.nodeType === 1 /* ElementNode */ && internalCall(childNode, "childNodes").length) {
397
+ updateFallbackSlotVisibility(childNode);
398
+ }
399
+ }
400
+ };
401
+ var getSlottedChildNodes = (childNodes) => {
402
+ const result = [];
403
+ for (let i2 = 0; i2 < childNodes.length; i2++) {
404
+ const slottedNode = childNodes[i2]["s-nr"] || void 0;
405
+ if (slottedNode && slottedNode.isConnected) {
406
+ result.push(slottedNode);
407
+ }
408
+ }
409
+ return result;
410
+ };
411
+ function getHostSlotNodes(childNodes, hostName, slotName) {
412
+ let i2 = 0;
413
+ let slottedNodes = [];
414
+ let childNode;
415
+ for (; i2 < childNodes.length; i2++) {
416
+ childNode = childNodes[i2];
417
+ if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0 || getSlotName(childNode) === slotName)) {
418
+ slottedNodes.push(childNode);
419
+ if (typeof slotName !== "undefined") return slottedNodes;
420
+ }
421
+ slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
422
+ }
423
+ return slottedNodes;
424
+ }
425
+ var getSlotChildSiblings = (slot, slotName, includeSlot = true) => {
426
+ const childNodes = [];
427
+ if (includeSlot && slot["s-sr"] || !slot["s-sr"]) childNodes.push(slot);
428
+ let node = slot;
429
+ while (node = node.nextSibling) {
430
+ if (getSlotName(node) === slotName && (includeSlot || !node["s-sr"])) childNodes.push(node);
431
+ }
432
+ return childNodes;
433
+ };
434
+ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
435
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
436
+ if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
437
+ return true;
438
+ }
439
+ if (nodeToRelocate.getAttribute("slot") === slotName) {
440
+ return true;
441
+ }
442
+ return false;
443
+ }
444
+ if (nodeToRelocate["s-sn"] === slotName) {
445
+ return true;
446
+ }
447
+ return slotName === "";
448
+ };
449
+ var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
450
+ if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
451
+ return;
452
+ }
453
+ const slottedNodeLocation = document.createTextNode("");
454
+ slottedNodeLocation["s-nr"] = newChild;
455
+ if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
456
+ const parent = slotNode["s-cr"].parentNode;
457
+ const appendMethod = prepend ? internalCall(parent, "prepend") : internalCall(parent, "appendChild");
458
+ if (typeof position !== "undefined") {
459
+ slottedNodeLocation["s-oo"] = position;
460
+ const childNodes = internalCall(parent, "childNodes");
461
+ const slotRelocateNodes = [slottedNodeLocation];
462
+ childNodes.forEach((n) => {
463
+ if (n["s-nr"]) slotRelocateNodes.push(n);
464
+ });
465
+ slotRelocateNodes.sort((a, b) => {
466
+ if (!a["s-oo"] || a["s-oo"] < (b["s-oo"] || 0)) return -1;
467
+ else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
468
+ return 0;
469
+ });
470
+ slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
471
+ } else {
472
+ appendMethod.call(parent, slottedNodeLocation);
473
+ }
474
+ newChild["s-ol"] = slottedNodeLocation;
475
+ newChild["s-sh"] = slotNode["s-hn"];
476
+ };
477
+ var getSlotName = (node) => typeof node["s-sn"] === "string" ? node["s-sn"] : node.nodeType === 1 && node.getAttribute("slot") || void 0;
478
+ function patchSlotNode(node) {
479
+ if (node.assignedElements || node.assignedNodes || !node["s-sr"]) return;
480
+ const assignedFactory = (elementsOnly) => (function(opts) {
481
+ const toReturn = [];
482
+ const slotName = this["s-sn"];
483
+ if (opts == null ? void 0 : opts.flatten) {
484
+ console.error(`
485
+ Flattening is not supported for Stencil non-shadow slots.
486
+ You can use \`.childNodes\` to nested slot fallback content.
487
+ If you have a particular use case, please open an issue on the Stencil repo.
488
+ `);
489
+ }
490
+ const parent = this["s-cr"].parentElement;
491
+ const slottedNodes = parent.__childNodes ? parent.childNodes : getSlottedChildNodes(parent.childNodes);
492
+ slottedNodes.forEach((n) => {
493
+ if (slotName === getSlotName(n)) {
494
+ toReturn.push(n);
495
+ }
496
+ });
497
+ if (elementsOnly) {
498
+ return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
499
+ }
500
+ return toReturn;
501
+ }).bind(node);
502
+ node.assignedElements = assignedFactory(true);
503
+ node.assignedNodes = assignedFactory(false);
504
+ }
505
+ function dispatchSlotChangeEvent(elm) {
506
+ elm.dispatchEvent(new CustomEvent("slotchange", { bubbles: false, cancelable: false, composed: false }));
507
+ }
508
+ function findSlotFromSlottedNode(slottedNode, parentHost) {
509
+ var _a;
510
+ parentHost = parentHost || ((_a = slottedNode["s-ol"]) == null ? void 0 : _a.parentElement);
511
+ if (!parentHost) return { slotNode: null, slotName: "" };
512
+ const slotName = slottedNode["s-sn"] = getSlotName(slottedNode) || "";
513
+ const childNodes = internalCall(parentHost, "childNodes");
514
+ const slotNode = getHostSlotNodes(childNodes, parentHost.tagName, slotName)[0];
515
+ return { slotNode, slotName };
516
+ }
517
+
518
+ // src/runtime/dom-extras.ts
519
+ var patchPseudoShadowDom = (hostElementPrototype) => {
520
+ patchCloneNode(hostElementPrototype);
521
+ patchSlotAppendChild(hostElementPrototype);
522
+ patchSlotAppend(hostElementPrototype);
523
+ patchSlotPrepend(hostElementPrototype);
524
+ patchSlotInsertAdjacentElement(hostElementPrototype);
525
+ patchSlotInsertAdjacentHTML(hostElementPrototype);
526
+ patchSlotInsertAdjacentText(hostElementPrototype);
527
+ patchInsertBefore(hostElementPrototype);
528
+ patchTextContent(hostElementPrototype);
529
+ patchChildSlotNodes(hostElementPrototype);
530
+ patchSlotRemoveChild(hostElementPrototype);
531
+ };
532
+ var patchCloneNode = (HostElementPrototype) => {
533
+ const orgCloneNode = HostElementPrototype.cloneNode;
534
+ HostElementPrototype.cloneNode = function(deep) {
535
+ const srcNode = this;
536
+ const isShadowDom = srcNode.shadowRoot && supportsShadow ;
537
+ const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
538
+ if (!isShadowDom && deep) {
539
+ let i2 = 0;
540
+ let slotted, nonStencilNode;
541
+ const stencilPrivates = [
542
+ "s-id",
543
+ "s-cr",
544
+ "s-lr",
545
+ "s-rc",
546
+ "s-sc",
547
+ "s-p",
548
+ "s-cn",
549
+ "s-sr",
550
+ "s-sn",
551
+ "s-hn",
552
+ "s-ol",
553
+ "s-nr",
554
+ "s-si",
555
+ "s-rf",
556
+ "s-scs"
557
+ ];
558
+ const childNodes = this.__childNodes || this.childNodes;
559
+ for (; i2 < childNodes.length; i2++) {
560
+ slotted = childNodes[i2]["s-nr"];
561
+ nonStencilNode = stencilPrivates.every((privateField) => !childNodes[i2][privateField]);
562
+ if (slotted) {
563
+ if (clonedNode.__appendChild) {
564
+ clonedNode.__appendChild(slotted.cloneNode(true));
565
+ } else {
566
+ clonedNode.appendChild(slotted.cloneNode(true));
567
+ }
568
+ }
569
+ if (nonStencilNode) {
570
+ clonedNode.appendChild(childNodes[i2].cloneNode(true));
571
+ }
572
+ }
573
+ }
574
+ return clonedNode;
575
+ };
576
+ };
577
+ var patchSlotAppendChild = (HostElementPrototype) => {
578
+ HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
579
+ HostElementPrototype.appendChild = function(newChild) {
580
+ const { slotName, slotNode } = findSlotFromSlottedNode(newChild, this);
581
+ if (slotNode) {
582
+ addSlotRelocateNode(newChild, slotNode);
583
+ const slotChildNodes = getSlotChildSiblings(slotNode, slotName);
584
+ const appendAfter = slotChildNodes[slotChildNodes.length - 1];
585
+ const parent = internalCall(appendAfter, "parentNode");
586
+ const insertedNode = internalCall(parent, "insertBefore")(newChild, appendAfter.nextSibling);
587
+ dispatchSlotChangeEvent(slotNode);
588
+ updateFallbackSlotVisibility(this);
589
+ return insertedNode;
590
+ }
591
+ return this.__appendChild(newChild);
592
+ };
593
+ };
594
+ var patchSlotRemoveChild = (ElementPrototype) => {
595
+ ElementPrototype.__removeChild = ElementPrototype.removeChild;
596
+ ElementPrototype.removeChild = function(toRemove) {
597
+ if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
598
+ const childNodes = this.__childNodes || this.childNodes;
599
+ const slotNode = getHostSlotNodes(childNodes, this.tagName, toRemove["s-sn"]);
600
+ if (slotNode && toRemove.isConnected) {
601
+ toRemove.remove();
602
+ updateFallbackSlotVisibility(this);
603
+ return;
604
+ }
605
+ }
606
+ return this.__removeChild(toRemove);
607
+ };
608
+ };
609
+ var patchSlotPrepend = (HostElementPrototype) => {
610
+ HostElementPrototype.__prepend = HostElementPrototype.prepend;
611
+ HostElementPrototype.prepend = function(...newChildren) {
612
+ newChildren.forEach((newChild) => {
613
+ if (typeof newChild === "string") {
614
+ newChild = this.ownerDocument.createTextNode(newChild);
615
+ }
616
+ const slotName = (newChild["s-sn"] = getSlotName(newChild)) || "";
617
+ const childNodes = internalCall(this, "childNodes");
618
+ const slotNode = getHostSlotNodes(childNodes, this.tagName, slotName)[0];
619
+ if (slotNode) {
620
+ addSlotRelocateNode(newChild, slotNode, true);
621
+ const slotChildNodes = getSlotChildSiblings(slotNode, slotName);
622
+ const appendAfter = slotChildNodes[0];
623
+ const parent = internalCall(appendAfter, "parentNode");
624
+ const toReturn = internalCall(parent, "insertBefore")(newChild, internalCall(appendAfter, "nextSibling"));
625
+ dispatchSlotChangeEvent(slotNode);
626
+ return toReturn;
627
+ }
628
+ if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
629
+ newChild.hidden = true;
630
+ }
631
+ return HostElementPrototype.__prepend(newChild);
632
+ });
633
+ };
634
+ };
635
+ var patchSlotAppend = (HostElementPrototype) => {
636
+ HostElementPrototype.__append = HostElementPrototype.append;
637
+ HostElementPrototype.append = function(...newChildren) {
638
+ newChildren.forEach((newChild) => {
639
+ if (typeof newChild === "string") {
640
+ newChild = this.ownerDocument.createTextNode(newChild);
641
+ }
642
+ this.appendChild(newChild);
643
+ });
644
+ };
645
+ };
646
+ var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
647
+ const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
648
+ HostElementPrototype.insertAdjacentHTML = function(position, text) {
649
+ if (position !== "afterbegin" && position !== "beforeend") {
650
+ return originalInsertAdjacentHtml.call(this, position, text);
651
+ }
652
+ const container = this.ownerDocument.createElement("_");
653
+ let node;
654
+ container.innerHTML = text;
655
+ if (position === "afterbegin") {
656
+ while (node = container.firstChild) {
657
+ this.prepend(node);
658
+ }
659
+ } else if (position === "beforeend") {
660
+ while (node = container.firstChild) {
661
+ this.append(node);
662
+ }
663
+ }
664
+ };
665
+ };
666
+ var patchSlotInsertAdjacentText = (HostElementPrototype) => {
667
+ HostElementPrototype.insertAdjacentText = function(position, text) {
668
+ this.insertAdjacentHTML(position, text);
669
+ };
670
+ };
671
+ var patchInsertBefore = (HostElementPrototype) => {
672
+ const eleProto = HostElementPrototype;
673
+ if (eleProto.__insertBefore) return;
674
+ eleProto.__insertBefore = HostElementPrototype.insertBefore;
675
+ HostElementPrototype.insertBefore = function(newChild, currentChild) {
676
+ const { slotName, slotNode } = findSlotFromSlottedNode(newChild, this);
677
+ const slottedNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
678
+ if (slotNode) {
679
+ let found = false;
680
+ slottedNodes.forEach((childNode) => {
681
+ if (childNode === currentChild || currentChild === null) {
682
+ found = true;
683
+ if (currentChild === null || slotName !== currentChild["s-sn"]) {
684
+ this.appendChild(newChild);
685
+ return;
686
+ }
687
+ if (slotName === currentChild["s-sn"]) {
688
+ addSlotRelocateNode(newChild, slotNode);
689
+ const parent = internalCall(currentChild, "parentNode");
690
+ internalCall(parent, "insertBefore")(newChild, currentChild);
691
+ dispatchSlotChangeEvent(slotNode);
692
+ }
693
+ return;
694
+ }
695
+ });
696
+ if (found) return newChild;
697
+ }
698
+ const parentNode = currentChild == null ? void 0 : currentChild.__parentNode;
699
+ if (parentNode && !this.isSameNode(parentNode)) {
700
+ return this.appendChild(newChild);
701
+ }
702
+ return this.__insertBefore(newChild, currentChild);
703
+ };
704
+ };
705
+ var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
706
+ const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
707
+ HostElementPrototype.insertAdjacentElement = function(position, element) {
708
+ if (position !== "afterbegin" && position !== "beforeend") {
709
+ return originalInsertAdjacentElement.call(this, position, element);
710
+ }
711
+ if (position === "afterbegin") {
712
+ this.prepend(element);
713
+ return element;
714
+ } else if (position === "beforeend") {
715
+ this.append(element);
716
+ return element;
717
+ }
718
+ return element;
719
+ };
720
+ };
721
+ var patchTextContent = (hostElementPrototype) => {
722
+ patchHostOriginalAccessor("textContent", hostElementPrototype);
723
+ Object.defineProperty(hostElementPrototype, "textContent", {
724
+ get: function() {
725
+ let text = "";
726
+ const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
727
+ childNodes.forEach((node) => text += node.textContent || "");
728
+ return text;
729
+ },
730
+ set: function(value) {
731
+ const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
732
+ childNodes.forEach((node) => {
733
+ if (node["s-ol"]) node["s-ol"].remove();
734
+ node.remove();
735
+ });
736
+ this.insertAdjacentHTML("beforeend", value);
737
+ }
738
+ });
739
+ };
740
+ var patchChildSlotNodes = (elm) => {
741
+ class FakeNodeList extends Array {
742
+ item(n) {
743
+ return this[n];
744
+ }
745
+ }
746
+ patchHostOriginalAccessor("children", elm);
747
+ Object.defineProperty(elm, "children", {
748
+ get() {
749
+ return this.childNodes.filter((n) => n.nodeType === 1);
750
+ }
751
+ });
752
+ Object.defineProperty(elm, "childElementCount", {
753
+ get() {
754
+ return this.children.length;
755
+ }
756
+ });
757
+ patchHostOriginalAccessor("firstChild", elm);
758
+ Object.defineProperty(elm, "firstChild", {
759
+ get() {
760
+ return this.childNodes[0];
761
+ }
762
+ });
763
+ patchHostOriginalAccessor("lastChild", elm);
764
+ Object.defineProperty(elm, "lastChild", {
765
+ get() {
766
+ return this.childNodes[this.childNodes.length - 1];
767
+ }
768
+ });
769
+ patchHostOriginalAccessor("childNodes", elm);
770
+ Object.defineProperty(elm, "childNodes", {
771
+ get() {
772
+ const result = new FakeNodeList();
773
+ result.push(...getSlottedChildNodes(this.__childNodes));
774
+ return result;
775
+ }
776
+ });
777
+ };
778
+ var patchSlottedNode = (node) => {
779
+ if (!node || node.__nextSibling !== void 0 || !globalThis.Node) return;
780
+ patchNextSibling(node);
781
+ patchPreviousSibling(node);
782
+ patchParentNode(node);
783
+ if (node.nodeType === Node.ELEMENT_NODE) {
784
+ patchNextElementSibling(node);
785
+ patchPreviousElementSibling(node);
786
+ }
787
+ };
788
+ var patchNextSibling = (node) => {
789
+ if (!node || node.__nextSibling) return;
790
+ patchHostOriginalAccessor("nextSibling", node);
791
+ Object.defineProperty(node, "nextSibling", {
792
+ get: function() {
793
+ var _a;
794
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
795
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
796
+ if (parentNodes && index > -1) {
797
+ return parentNodes[index + 1];
798
+ }
799
+ return this.__nextSibling;
800
+ }
801
+ });
802
+ };
803
+ var patchNextElementSibling = (element) => {
804
+ if (!element || element.__nextElementSibling) return;
805
+ patchHostOriginalAccessor("nextElementSibling", element);
806
+ Object.defineProperty(element, "nextElementSibling", {
807
+ get: function() {
808
+ var _a;
809
+ const parentEles = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
810
+ const index = parentEles == null ? void 0 : parentEles.indexOf(this);
811
+ if (parentEles && index > -1) {
812
+ return parentEles[index + 1];
813
+ }
814
+ return this.__nextElementSibling;
815
+ }
816
+ });
817
+ };
818
+ var patchPreviousSibling = (node) => {
819
+ if (!node || node.__previousSibling) return;
820
+ patchHostOriginalAccessor("previousSibling", node);
821
+ Object.defineProperty(node, "previousSibling", {
822
+ get: function() {
823
+ var _a;
824
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
825
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
826
+ if (parentNodes && index > -1) {
827
+ return parentNodes[index - 1];
828
+ }
829
+ return this.__previousSibling;
830
+ }
831
+ });
832
+ };
833
+ var patchPreviousElementSibling = (element) => {
834
+ if (!element || element.__previousElementSibling) return;
835
+ patchHostOriginalAccessor("previousElementSibling", element);
836
+ Object.defineProperty(element, "previousElementSibling", {
837
+ get: function() {
838
+ var _a;
839
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
840
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
841
+ if (parentNodes && index > -1) {
842
+ return parentNodes[index - 1];
843
+ }
844
+ return this.__previousElementSibling;
845
+ }
846
+ });
847
+ };
848
+ var patchParentNode = (node) => {
849
+ if (!node || node.__parentNode) return;
850
+ patchHostOriginalAccessor("parentNode", node);
851
+ Object.defineProperty(node, "parentNode", {
852
+ get: function() {
853
+ var _a;
854
+ return ((_a = this["s-ol"]) == null ? void 0 : _a.parentNode) || this.__parentNode;
855
+ },
856
+ set: function(value) {
857
+ this.__parentNode = value;
858
+ }
859
+ });
860
+ };
861
+ var validElementPatches = ["children", "nextElementSibling", "previousElementSibling"];
862
+ var validNodesPatches = [
863
+ "childNodes",
864
+ "firstChild",
865
+ "lastChild",
866
+ "nextSibling",
867
+ "previousSibling",
868
+ "textContent",
869
+ "parentNode"
870
+ ];
871
+ function patchHostOriginalAccessor(accessorName, node) {
872
+ let accessor;
873
+ if (validElementPatches.includes(accessorName)) {
874
+ accessor = Object.getOwnPropertyDescriptor(Element.prototype, accessorName);
875
+ } else if (validNodesPatches.includes(accessorName)) {
876
+ accessor = Object.getOwnPropertyDescriptor(Node.prototype, accessorName);
877
+ }
878
+ if (!accessor) {
879
+ accessor = Object.getOwnPropertyDescriptor(node, accessorName);
880
+ }
881
+ if (accessor) Object.defineProperty(node, "__" + accessorName, accessor);
882
+ }
883
+ function internalCall(node, method) {
884
+ if ("__" + method in node) {
885
+ const toReturn = node["__" + method];
886
+ if (typeof toReturn !== "function") return toReturn;
887
+ return toReturn.bind(node);
888
+ } else {
889
+ if (typeof node[method] !== "function") return node[method];
890
+ return node[method].bind(node);
891
+ }
892
+ }
256
893
  var createTime = (fnName, tagName = "") => {
257
894
  {
258
895
  return () => {
@@ -381,54 +1018,166 @@ var convertToPrivate = (node) => {
381
1018
 
382
1019
  // src/runtime/client-hydrate.ts
383
1020
  var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1021
+ var _a;
384
1022
  const endHydrate = createTime("hydrateClient", tagName);
385
1023
  const shadowRoot = hostElm.shadowRoot;
386
1024
  const childRenderNodes = [];
387
1025
  const slotNodes = [];
1026
+ const slottedNodes = [];
388
1027
  const shadowRootNodes = shadowRoot ? [] : null;
389
- const vnode = hostRef.$vnode$ = newVNode(tagName, null);
390
- if (!plt.$orgLocNodes$) {
391
- initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
1028
+ const vnode = newVNode(tagName, null);
1029
+ vnode.$elm$ = hostElm;
1030
+ const members = Object.entries(((_a = hostRef.$cmpMeta$) == null ? void 0 : _a.$members$) || {});
1031
+ members.forEach(([memberName, [memberFlags, metaAttributeName]]) => {
1032
+ var _a2;
1033
+ if (!(memberFlags & 31 /* Prop */)) {
1034
+ return;
1035
+ }
1036
+ const attributeName = metaAttributeName || memberName;
1037
+ const attrVal = hostElm.getAttribute(attributeName);
1038
+ if (attrVal !== null) {
1039
+ const attrPropVal = parsePropertyValue(attrVal, memberFlags);
1040
+ (_a2 = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _a2.set(memberName, attrPropVal);
1041
+ }
1042
+ });
1043
+ let scopeId2;
1044
+ {
1045
+ const cmpMeta = hostRef.$cmpMeta$;
1046
+ if (cmpMeta && cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */ && hostElm["s-sc"]) {
1047
+ scopeId2 = hostElm["s-sc"];
1048
+ hostElm.classList.add(scopeId2 + "-h");
1049
+ } else if (hostElm["s-sc"]) {
1050
+ delete hostElm["s-sc"];
1051
+ }
1052
+ }
1053
+ if (win.document && (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size)) {
1054
+ initializeDocumentHydrate(win.document.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
392
1055
  }
393
1056
  hostElm[HYDRATE_ID] = hostId;
394
1057
  hostElm.removeAttribute(HYDRATE_ID);
395
- clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
396
- childRenderNodes.map((c) => {
397
- const orgLocationId = c.$hostId$ + "." + c.$nodeId$;
1058
+ hostRef.$vnode$ = clientHydrate(
1059
+ vnode,
1060
+ childRenderNodes,
1061
+ slotNodes,
1062
+ shadowRootNodes,
1063
+ hostElm,
1064
+ hostElm,
1065
+ hostId,
1066
+ slottedNodes
1067
+ );
1068
+ let crIndex = 0;
1069
+ const crLength = childRenderNodes.length;
1070
+ let childRenderNode;
1071
+ for (crIndex; crIndex < crLength; crIndex++) {
1072
+ childRenderNode = childRenderNodes[crIndex];
1073
+ const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
398
1074
  const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
399
- const node = c.$elm$;
400
- if (orgLocationNode && supportsShadow && orgLocationNode["s-en"] === "") {
401
- orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
402
- }
1075
+ const node = childRenderNode.$elm$;
403
1076
  if (!shadowRoot) {
404
- node["s-hn"] = tagName;
405
- if (orgLocationNode) {
406
- node["s-ol"] = orgLocationNode;
407
- node["s-ol"]["s-nr"] = node;
1077
+ node["s-hn"] = tagName.toUpperCase();
1078
+ if (childRenderNode.$tag$ === "slot") {
1079
+ node["s-cr"] = hostElm["s-cr"];
1080
+ }
1081
+ }
1082
+ if (childRenderNode.$tag$ === "slot") {
1083
+ childRenderNode.$name$ = childRenderNode.$elm$["s-sn"] || childRenderNode.$elm$["name"] || null;
1084
+ if (childRenderNode.$children$) {
1085
+ childRenderNode.$flags$ |= 2 /* isSlotFallback */;
1086
+ if (!childRenderNode.$elm$.childNodes.length) {
1087
+ childRenderNode.$children$.forEach((c) => {
1088
+ childRenderNode.$elm$.appendChild(c.$elm$);
1089
+ });
1090
+ }
1091
+ } else {
1092
+ childRenderNode.$flags$ |= 1 /* isSlotReference */;
1093
+ }
1094
+ }
1095
+ if (orgLocationNode && orgLocationNode.isConnected) {
1096
+ if (shadowRoot && orgLocationNode["s-en"] === "") {
1097
+ orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
1098
+ }
1099
+ orgLocationNode.parentNode.removeChild(orgLocationNode);
1100
+ if (!shadowRoot) {
1101
+ node["s-oo"] = parseInt(childRenderNode.$nodeId$);
408
1102
  }
409
1103
  }
410
1104
  plt.$orgLocNodes$.delete(orgLocationId);
411
- });
412
- if (shadowRoot) {
413
- shadowRootNodes.map((shadowRootNode) => {
414
- if (shadowRootNode) {
415
- shadowRoot.appendChild(shadowRootNode);
1105
+ }
1106
+ const hosts = [];
1107
+ const snLen = slottedNodes.length;
1108
+ let snIndex = 0;
1109
+ let slotGroup;
1110
+ let snGroupIdx;
1111
+ let snGroupLen;
1112
+ let slottedItem;
1113
+ for (snIndex; snIndex < snLen; snIndex++) {
1114
+ slotGroup = slottedNodes[snIndex];
1115
+ if (!slotGroup || !slotGroup.length) continue;
1116
+ snGroupLen = slotGroup.length;
1117
+ snGroupIdx = 0;
1118
+ for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
1119
+ slottedItem = slotGroup[snGroupIdx];
1120
+ if (!hosts[slottedItem.hostId]) {
1121
+ hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
1122
+ }
1123
+ if (!hosts[slottedItem.hostId]) continue;
1124
+ const hostEle = hosts[slottedItem.hostId];
1125
+ if (!hostEle.shadowRoot || !shadowRoot) {
1126
+ slottedItem.slot["s-cr"] = hostEle["s-cr"];
1127
+ if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
1128
+ slottedItem.slot["s-cr"] = hostEle;
1129
+ } else {
1130
+ slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
1131
+ }
1132
+ addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
1133
+ {
1134
+ patchSlottedNode(slottedItem.node);
1135
+ }
1136
+ }
1137
+ if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
1138
+ hostEle.appendChild(slottedItem.node);
416
1139
  }
1140
+ }
1141
+ }
1142
+ if (scopeId2 && slotNodes.length) {
1143
+ slotNodes.forEach((slot) => {
1144
+ slot.$elm$.parentElement.classList.add(scopeId2 + "-s");
417
1145
  });
418
1146
  }
1147
+ if (shadowRoot && !shadowRoot.childNodes.length) {
1148
+ let rnIdex = 0;
1149
+ const rnLen = shadowRootNodes.length;
1150
+ if (rnLen) {
1151
+ for (rnIdex; rnIdex < rnLen; rnIdex++) {
1152
+ shadowRoot.appendChild(shadowRootNodes[rnIdex]);
1153
+ }
1154
+ Array.from(hostElm.childNodes).forEach((node) => {
1155
+ if (typeof node["s-sn"] !== "string") {
1156
+ if (node.nodeType === 1 /* ElementNode */ && node.slot && node.hidden) {
1157
+ node.removeAttribute("hidden");
1158
+ } else if (node.nodeType === 8 /* CommentNode */ || node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
1159
+ node.parentNode.removeChild(node);
1160
+ }
1161
+ }
1162
+ });
1163
+ }
1164
+ }
1165
+ plt.$orgLocNodes$.delete(hostElm["s-id"]);
1166
+ hostRef.$hostElement$ = hostElm;
419
1167
  endHydrate();
420
1168
  };
421
- var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
1169
+ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
422
1170
  let childNodeType;
423
1171
  let childIdSplt;
424
1172
  let childVNode;
425
1173
  let i2;
1174
+ const scopeId2 = hostElm["s-sc"];
426
1175
  if (node.nodeType === 1 /* ElementNode */) {
427
1176
  childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
428
1177
  if (childNodeType) {
429
1178
  childIdSplt = childNodeType.split(".");
430
1179
  if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
431
- childVNode = {
1180
+ childVNode = createSimpleVNode({
432
1181
  $flags$: 0,
433
1182
  $hostId$: childIdSplt[0],
434
1183
  $nodeId$: childIdSplt[1],
@@ -436,18 +1185,43 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
436
1185
  $index$: childIdSplt[3],
437
1186
  $tag$: node.tagName.toLowerCase(),
438
1187
  $elm$: node,
439
- $attrs$: null,
440
- $children$: null,
441
- $key$: null,
442
- $name$: null,
443
- $text$: null
444
- };
1188
+ // If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
1189
+ // won't try to reconcile them. Classes set on the node will be blown away.
1190
+ $attrs$: { class: node.className || "" }
1191
+ });
445
1192
  childRenderNodes.push(childVNode);
446
1193
  node.removeAttribute(HYDRATE_CHILD_ID);
447
1194
  if (!parentVNode.$children$) {
448
1195
  parentVNode.$children$ = [];
449
1196
  }
450
- parentVNode.$children$[childVNode.$index$] = childVNode;
1197
+ if (scopeId2) {
1198
+ node["s-si"] = scopeId2;
1199
+ childVNode.$attrs$.class += " " + scopeId2;
1200
+ }
1201
+ const slotName = childVNode.$elm$.getAttribute("s-sn");
1202
+ if (typeof slotName === "string") {
1203
+ if (childVNode.$tag$ === "slot-fb") {
1204
+ addSlot(
1205
+ slotName,
1206
+ childIdSplt[2],
1207
+ childVNode,
1208
+ node,
1209
+ parentVNode,
1210
+ childRenderNodes,
1211
+ slotNodes,
1212
+ shadowRootNodes,
1213
+ slottedNodes
1214
+ );
1215
+ if (scopeId2) {
1216
+ node.classList.add(scopeId2);
1217
+ }
1218
+ }
1219
+ childVNode.$elm$["s-sn"] = slotName;
1220
+ childVNode.$elm$.removeAttribute("s-sn");
1221
+ }
1222
+ if (childVNode.$index$ !== void 0) {
1223
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1224
+ }
451
1225
  parentVNode = childVNode;
452
1226
  if (shadowRootNodes && childVNode.$depth$ === "0") {
453
1227
  shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
@@ -463,31 +1237,33 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
463
1237
  shadowRootNodes,
464
1238
  hostElm,
465
1239
  node.shadowRoot.childNodes[i2],
466
- hostId
1240
+ hostId,
1241
+ slottedNodes
467
1242
  );
468
1243
  }
469
1244
  }
470
- for (i2 = node.childNodes.length - 1; i2 >= 0; i2--) {
1245
+ const nonShadowNodes = node.__childNodes || node.childNodes;
1246
+ for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
471
1247
  clientHydrate(
472
1248
  parentVNode,
473
1249
  childRenderNodes,
474
1250
  slotNodes,
475
1251
  shadowRootNodes,
476
1252
  hostElm,
477
- node.childNodes[i2],
478
- hostId
1253
+ nonShadowNodes[i2],
1254
+ hostId,
1255
+ slottedNodes
479
1256
  );
480
1257
  }
481
1258
  } else if (node.nodeType === 8 /* CommentNode */) {
482
1259
  childIdSplt = node.nodeValue.split(".");
483
1260
  if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
484
1261
  childNodeType = childIdSplt[0];
485
- childVNode = {
486
- $flags$: 0,
1262
+ childVNode = createSimpleVNode({
487
1263
  $hostId$: childIdSplt[1],
488
1264
  $nodeId$: childIdSplt[2],
489
1265
  $depth$: childIdSplt[3],
490
- $index$: childIdSplt[4],
1266
+ $index$: childIdSplt[4] || "0",
491
1267
  $elm$: node,
492
1268
  $attrs$: null,
493
1269
  $children$: null,
@@ -495,46 +1271,43 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
495
1271
  $name$: null,
496
1272
  $tag$: null,
497
1273
  $text$: null
498
- };
1274
+ });
499
1275
  if (childNodeType === TEXT_NODE_ID) {
500
- childVNode.$elm$ = node.nextSibling;
1276
+ childVNode.$elm$ = findCorrespondingNode(node, 3 /* TextNode */);
501
1277
  if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
502
1278
  childVNode.$text$ = childVNode.$elm$.textContent;
503
1279
  childRenderNodes.push(childVNode);
504
1280
  node.remove();
505
- if (!parentVNode.$children$) {
506
- parentVNode.$children$ = [];
1281
+ if (hostId === childVNode.$hostId$) {
1282
+ if (!parentVNode.$children$) {
1283
+ parentVNode.$children$ = [];
1284
+ }
1285
+ parentVNode.$children$[childVNode.$index$] = childVNode;
507
1286
  }
508
- parentVNode.$children$[childVNode.$index$] = childVNode;
509
1287
  if (shadowRootNodes && childVNode.$depth$ === "0") {
510
1288
  shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
511
1289
  }
512
1290
  }
1291
+ } else if (childNodeType === COMMENT_NODE_ID) {
1292
+ childVNode.$elm$ = findCorrespondingNode(node, 8 /* CommentNode */);
1293
+ if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
1294
+ childRenderNodes.push(childVNode);
1295
+ node.remove();
1296
+ }
513
1297
  } else if (childVNode.$hostId$ === hostId) {
514
1298
  if (childNodeType === SLOT_NODE_ID) {
515
- childVNode.$tag$ = "slot";
516
- if (childIdSplt[5]) {
517
- node["s-sn"] = childVNode.$name$ = childIdSplt[5];
518
- } else {
519
- node["s-sn"] = "";
520
- }
521
- node["s-sr"] = true;
522
- if (shadowRootNodes) {
523
- childVNode.$elm$ = doc.createElement(childVNode.$tag$);
524
- if (childVNode.$name$) {
525
- childVNode.$elm$.setAttribute("name", childVNode.$name$);
526
- }
527
- node.parentNode.insertBefore(childVNode.$elm$, node);
528
- node.remove();
529
- if (childVNode.$depth$ === "0") {
530
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
531
- }
532
- }
533
- slotNodes.push(childVNode);
534
- if (!parentVNode.$children$) {
535
- parentVNode.$children$ = [];
536
- }
537
- parentVNode.$children$[childVNode.$index$] = childVNode;
1299
+ const slotName = node["s-sn"] = childIdSplt[5] || "";
1300
+ addSlot(
1301
+ slotName,
1302
+ childIdSplt[2],
1303
+ childVNode,
1304
+ node,
1305
+ parentVNode,
1306
+ childRenderNodes,
1307
+ slotNodes,
1308
+ shadowRootNodes,
1309
+ slottedNodes
1310
+ );
538
1311
  } else if (childNodeType === CONTENT_REF_ID) {
539
1312
  if (shadowRootNodes) {
540
1313
  node.remove();
@@ -550,18 +1323,28 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
550
1323
  vnode.$elm$ = node;
551
1324
  vnode.$index$ = "0";
552
1325
  parentVNode.$children$ = [vnode];
1326
+ } else {
1327
+ if (node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
1328
+ node.remove();
1329
+ }
553
1330
  }
1331
+ return parentVNode;
554
1332
  };
555
1333
  var initializeDocumentHydrate = (node, orgLocNodes) => {
556
1334
  if (node.nodeType === 1 /* ElementNode */) {
1335
+ const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
1336
+ if (componentId) {
1337
+ orgLocNodes.set(componentId, node);
1338
+ }
557
1339
  let i2 = 0;
558
1340
  if (node.shadowRoot) {
559
1341
  for (; i2 < node.shadowRoot.childNodes.length; i2++) {
560
1342
  initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
561
1343
  }
562
1344
  }
563
- for (i2 = 0; i2 < node.childNodes.length; i2++) {
564
- initializeDocumentHydrate(node.childNodes[i2], orgLocNodes);
1345
+ const nonShadowNodes = node.__childNodes || node.childNodes;
1346
+ for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
1347
+ initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
565
1348
  }
566
1349
  } else if (node.nodeType === 8 /* CommentNode */) {
567
1350
  const childIdSplt = node.nodeValue.split(".");
@@ -572,18 +1355,110 @@ var initializeDocumentHydrate = (node, orgLocNodes) => {
572
1355
  }
573
1356
  }
574
1357
  };
1358
+ var createSimpleVNode = (vnode) => {
1359
+ const defaultVNode = {
1360
+ $flags$: 0,
1361
+ $hostId$: null,
1362
+ $nodeId$: null,
1363
+ $depth$: null,
1364
+ $index$: "0",
1365
+ $elm$: null,
1366
+ $attrs$: null,
1367
+ $children$: null,
1368
+ $key$: null,
1369
+ $name$: null,
1370
+ $tag$: null,
1371
+ $text$: null
1372
+ };
1373
+ return { ...defaultVNode, ...vnode };
1374
+ };
1375
+ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
1376
+ node["s-sr"] = true;
1377
+ childVNode.$name$ = slotName || null;
1378
+ childVNode.$tag$ = "slot";
1379
+ const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
1380
+ if (shadowRootNodes && win.document) {
1381
+ const slot = childVNode.$elm$ = win.document.createElement(childVNode.$tag$);
1382
+ if (childVNode.$name$) {
1383
+ childVNode.$elm$.setAttribute("name", slotName);
1384
+ }
1385
+ if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
1386
+ parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1387
+ } else {
1388
+ node.parentNode.insertBefore(childVNode.$elm$, node);
1389
+ }
1390
+ addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
1391
+ node.remove();
1392
+ if (childVNode.$depth$ === "0") {
1393
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1394
+ }
1395
+ } else {
1396
+ const slot = childVNode.$elm$;
1397
+ const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
1398
+ addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
1399
+ patchSlotNode(node);
1400
+ if (shouldMove) {
1401
+ parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1402
+ }
1403
+ childRenderNodes.push(childVNode);
1404
+ }
1405
+ slotNodes.push(childVNode);
1406
+ if (!parentVNode.$children$) {
1407
+ parentVNode.$children$ = [];
1408
+ }
1409
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1410
+ }
1411
+ var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
1412
+ let slottedNode = slotNode.nextSibling;
1413
+ slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
1414
+ while (slottedNode && ((slottedNode["getAttribute"] && slottedNode.getAttribute("slot") || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && (slottedNode.nodeType === 8 /* CommentNode */ && slottedNode.nodeValue.indexOf(".") !== 1 || slottedNode.nodeType === 3 /* TextNode */))) {
1415
+ slottedNode["s-sn"] = slotName;
1416
+ slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
1417
+ slottedNode = slottedNode.nextSibling;
1418
+ }
1419
+ };
1420
+ var findCorrespondingNode = (node, type) => {
1421
+ let sibling = node;
1422
+ do {
1423
+ sibling = sibling.nextSibling;
1424
+ } while (sibling && (sibling.nodeType !== type || !sibling.nodeValue));
1425
+ return sibling;
1426
+ };
1427
+ var createSupportsRuleRe = (selector) => {
1428
+ const safeSelector2 = escapeRegExpSpecialCharacters(selector);
1429
+ return new RegExp(
1430
+ // First capture group: match any context before the selector that's not inside @supports selector()
1431
+ // Using negative lookahead to avoid matching inside @supports selector(...) condition
1432
+ `(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
1433
+ "g"
1434
+ );
1435
+ };
1436
+ createSupportsRuleRe("::slotted");
1437
+ createSupportsRuleRe(":host");
1438
+ createSupportsRuleRe(":host-context");
575
1439
 
576
1440
  // src/runtime/mode.ts
577
1441
  var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
578
1442
  var setMode = (handler) => modeResolutionChain.push(handler);
579
1443
  var getMode = (ref) => getHostRef(ref).$modeName$;
580
1444
  var parsePropertyValue = (propValue, propType) => {
1445
+ if (typeof propValue === "string" && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
1446
+ try {
1447
+ propValue = JSON.parse(propValue);
1448
+ return propValue;
1449
+ } catch (e) {
1450
+ }
1451
+ }
1452
+ if (typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
1453
+ propValue = deserializeProperty(propValue);
1454
+ return propValue;
1455
+ }
581
1456
  if (propValue != null && !isComplexType(propValue)) {
582
1457
  if (propType & 4 /* Boolean */) {
583
1458
  return propValue === "false" ? false : propValue === "" || !!propValue;
584
1459
  }
585
1460
  if (propType & 2 /* Number */) {
586
- return parseFloat(propValue);
1461
+ return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
587
1462
  }
588
1463
  if (propType & 1 /* String */) {
589
1464
  return String(propValue);
@@ -632,7 +1507,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
632
1507
  var _a;
633
1508
  const scopeId2 = getScopeId(cmpMeta, mode);
634
1509
  const style = styles.get(scopeId2);
635
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
1510
+ if (!win.document) {
1511
+ return scopeId2;
1512
+ }
1513
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
636
1514
  if (style) {
637
1515
  if (typeof style === "string") {
638
1516
  styleContainerNode = styleContainerNode.head || styleContainerNode;
@@ -645,23 +1523,39 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
645
1523
  if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
646
1524
  styleElm.innerHTML = style;
647
1525
  } else {
648
- styleElm = doc.createElement("style");
1526
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || win.document.createElement("style");
649
1527
  styleElm.innerHTML = style;
650
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
1528
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
651
1529
  if (nonce != null) {
652
1530
  styleElm.setAttribute("nonce", nonce);
653
1531
  }
654
- const injectStyle = (
655
- /**
656
- * we render a scoped component
657
- */
658
- !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) || /**
659
- * we are using shadow dom and render the style tag within the shadowRoot
660
- */
661
- cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD"
662
- );
663
- if (injectStyle) {
664
- styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
1532
+ if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
1533
+ if (styleContainerNode.nodeName === "HEAD") {
1534
+ const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
1535
+ const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
1536
+ styleContainerNode.insertBefore(
1537
+ styleElm,
1538
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
1539
+ );
1540
+ } else if ("host" in styleContainerNode) {
1541
+ if (supportsConstructableStylesheets) {
1542
+ const stylesheet = new CSSStyleSheet();
1543
+ stylesheet.replaceSync(style);
1544
+ styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
1545
+ } else {
1546
+ const existingStyleContainer = styleContainerNode.querySelector("style");
1547
+ if (existingStyleContainer) {
1548
+ existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
1549
+ } else {
1550
+ styleContainerNode.prepend(styleElm);
1551
+ }
1552
+ }
1553
+ } else {
1554
+ styleContainerNode.append(styleElm);
1555
+ }
1556
+ }
1557
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1558
+ styleContainerNode.insertBefore(styleElm, null);
665
1559
  }
666
1560
  }
667
1561
  if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
@@ -687,131 +1581,177 @@ var attachStyles = (hostRef) => {
687
1581
  cmpMeta,
688
1582
  hostRef.$modeName$
689
1583
  );
690
- if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
1584
+ if (flags & 10 /* needsScopedEncapsulation */) {
691
1585
  elm["s-sc"] = scopeId2;
692
1586
  elm.classList.add(scopeId2 + "-h");
693
- if (flags & 2 /* scopedCssEncapsulation */) {
694
- elm.classList.add(scopeId2 + "-s");
695
- }
696
1587
  }
697
1588
  endAttachStyles();
698
1589
  };
699
1590
  var getScopeId = (cmp, mode) => "sc-" + (mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
700
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
701
- if (oldValue !== newValue) {
702
- let isProp = isMemberInElement(elm, memberName);
703
- let ln = memberName.toLowerCase();
704
- if (memberName === "class") {
705
- const classList = elm.classList;
706
- const oldClasses = parseClassList(oldValue);
707
- const newClasses = parseClassList(newValue);
1591
+ var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
1592
+ var hydrateScopedToShadow = () => {
1593
+ if (!win.document) {
1594
+ return;
1595
+ }
1596
+ const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
1597
+ let i2 = 0;
1598
+ for (; i2 < styles2.length; i2++) {
1599
+ registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
1600
+ }
1601
+ };
1602
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
1603
+ if (oldValue === newValue) {
1604
+ return;
1605
+ }
1606
+ let isProp = isMemberInElement(elm, memberName);
1607
+ let ln = memberName.toLowerCase();
1608
+ if (memberName === "class") {
1609
+ const classList = elm.classList;
1610
+ const oldClasses = parseClassList(oldValue);
1611
+ let newClasses = parseClassList(newValue);
1612
+ if (elm["s-si"] && initialRender) {
1613
+ newClasses.push(elm["s-si"]);
1614
+ oldClasses.forEach((c) => {
1615
+ if (c.startsWith(elm["s-si"])) newClasses.push(c);
1616
+ });
1617
+ newClasses = [...new Set(newClasses)];
1618
+ classList.add(...newClasses);
1619
+ } else {
708
1620
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
709
1621
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
710
- } else if (memberName === "style") {
711
- {
712
- for (const prop in oldValue) {
713
- if (!newValue || newValue[prop] == null) {
714
- if (prop.includes("-")) {
715
- elm.style.removeProperty(prop);
716
- } else {
717
- elm.style[prop] = "";
718
- }
719
- }
720
- }
721
- }
722
- for (const prop in newValue) {
723
- if (!oldValue || newValue[prop] !== oldValue[prop]) {
1622
+ }
1623
+ } else if (memberName === "style") {
1624
+ {
1625
+ for (const prop in oldValue) {
1626
+ if (!newValue || newValue[prop] == null) {
724
1627
  if (prop.includes("-")) {
725
- elm.style.setProperty(prop, newValue[prop]);
1628
+ elm.style.removeProperty(prop);
726
1629
  } else {
727
- elm.style[prop] = newValue[prop];
1630
+ elm.style[prop] = "";
728
1631
  }
729
1632
  }
730
1633
  }
731
- } else if (memberName === "key") ; else if (memberName === "ref") {
732
- if (newValue) {
733
- newValue(elm);
734
- }
735
- } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
736
- if (memberName[2] === "-") {
737
- memberName = memberName.slice(3);
738
- } else if (isMemberInElement(win, ln)) {
739
- memberName = ln.slice(2);
740
- } else {
741
- memberName = ln[2] + memberName.slice(3);
742
- }
743
- if (oldValue || newValue) {
744
- const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
745
- memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
746
- if (oldValue) {
747
- plt.rel(elm, memberName, oldValue, capture);
748
- }
749
- if (newValue) {
750
- plt.ael(elm, memberName, newValue, capture);
1634
+ }
1635
+ for (const prop in newValue) {
1636
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
1637
+ if (prop.includes("-")) {
1638
+ elm.style.setProperty(prop, newValue[prop]);
1639
+ } else {
1640
+ elm.style[prop] = newValue[prop];
751
1641
  }
752
1642
  }
1643
+ }
1644
+ } else if (memberName === "key") ; else if (memberName === "ref") {
1645
+ if (newValue) {
1646
+ newValue(elm);
1647
+ }
1648
+ } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
1649
+ if (memberName[2] === "-") {
1650
+ memberName = memberName.slice(3);
1651
+ } else if (isMemberInElement(win, ln)) {
1652
+ memberName = ln.slice(2);
753
1653
  } else {
754
- const isComplex = isComplexType(newValue);
755
- if ((isProp || isComplex && newValue !== null) && !isSvg) {
756
- try {
757
- if (!elm.tagName.includes("-")) {
758
- const n = newValue == null ? "" : newValue;
759
- if (memberName === "list") {
760
- isProp = false;
761
- } else if (oldValue == null || elm[memberName] != n) {
1654
+ memberName = ln[2] + memberName.slice(3);
1655
+ }
1656
+ if (oldValue || newValue) {
1657
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
1658
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
1659
+ if (oldValue) {
1660
+ plt.rel(elm, memberName, oldValue, capture);
1661
+ }
1662
+ if (newValue) {
1663
+ plt.ael(elm, memberName, newValue, capture);
1664
+ }
1665
+ }
1666
+ } else {
1667
+ const isComplex = isComplexType(newValue);
1668
+ if ((isProp || isComplex && newValue !== null) && !isSvg) {
1669
+ try {
1670
+ if (!elm.tagName.includes("-")) {
1671
+ const n = newValue == null ? "" : newValue;
1672
+ if (memberName === "list") {
1673
+ isProp = false;
1674
+ } else if (oldValue == null || elm[memberName] != n) {
1675
+ if (typeof elm.__lookupSetter__(memberName) === "function") {
762
1676
  elm[memberName] = n;
1677
+ } else {
1678
+ elm.setAttribute(memberName, n);
763
1679
  }
764
- } else {
765
- elm[memberName] = newValue;
766
1680
  }
767
- } catch (e) {
1681
+ } else if (elm[memberName] !== newValue) {
1682
+ elm[memberName] = newValue;
768
1683
  }
1684
+ } catch (e) {
769
1685
  }
770
- let xlink = false;
771
- {
772
- if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
773
- memberName = ln;
774
- xlink = true;
775
- }
1686
+ }
1687
+ let xlink = false;
1688
+ {
1689
+ if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
1690
+ memberName = ln;
1691
+ xlink = true;
776
1692
  }
777
- if (newValue == null || newValue === false) {
778
- if (newValue !== false || elm.getAttribute(memberName) === "") {
779
- if (xlink) {
780
- elm.removeAttributeNS(XLINK_NS, memberName);
781
- } else {
782
- elm.removeAttribute(memberName);
783
- }
784
- }
785
- } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
786
- newValue = newValue === true ? "" : newValue;
1693
+ }
1694
+ if (newValue == null || newValue === false) {
1695
+ if (newValue !== false || elm.getAttribute(memberName) === "") {
787
1696
  if (xlink) {
788
- elm.setAttributeNS(XLINK_NS, memberName, newValue);
1697
+ elm.removeAttributeNS(XLINK_NS, memberName);
789
1698
  } else {
790
- elm.setAttribute(memberName, newValue);
1699
+ elm.removeAttribute(memberName);
791
1700
  }
792
1701
  }
1702
+ } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
1703
+ newValue = newValue === true ? "" : newValue;
1704
+ if (xlink) {
1705
+ elm.setAttributeNS(XLINK_NS, memberName, newValue);
1706
+ } else {
1707
+ elm.setAttribute(memberName, newValue);
1708
+ }
793
1709
  }
794
1710
  }
795
1711
  };
796
1712
  var parseClassListRegex = /\s/;
797
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
1713
+ var parseClassList = (value) => {
1714
+ if (typeof value === "object" && value && "baseVal" in value) {
1715
+ value = value.baseVal;
1716
+ }
1717
+ if (!value || typeof value !== "string") {
1718
+ return [];
1719
+ }
1720
+ return value.split(parseClassListRegex);
1721
+ };
798
1722
  var CAPTURE_EVENT_SUFFIX = "Capture";
799
1723
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
800
1724
 
801
1725
  // src/runtime/vdom/update-element.ts
802
- var updateElement = (oldVnode, newVnode, isSvgMode2) => {
1726
+ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
803
1727
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
804
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
805
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
1728
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
1729
+ const newVnodeAttrs = newVnode.$attrs$ || {};
806
1730
  {
807
1731
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
808
1732
  if (!(memberName in newVnodeAttrs)) {
809
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
1733
+ setAccessor(
1734
+ elm,
1735
+ memberName,
1736
+ oldVnodeAttrs[memberName],
1737
+ void 0,
1738
+ isSvgMode2,
1739
+ newVnode.$flags$,
1740
+ isInitialRender
1741
+ );
810
1742
  }
811
1743
  }
812
1744
  }
813
1745
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
814
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
1746
+ setAccessor(
1747
+ elm,
1748
+ memberName,
1749
+ oldVnodeAttrs[memberName],
1750
+ newVnodeAttrs[memberName],
1751
+ isSvgMode2,
1752
+ newVnode.$flags$,
1753
+ isInitialRender
1754
+ );
815
1755
  }
816
1756
  };
817
1757
  function sortedAttrNames(attrNames) {
@@ -832,7 +1772,7 @@ var useNativeShadowDom = false;
832
1772
  var checkSlotFallbackVisibility = false;
833
1773
  var checkSlotRelocate = false;
834
1774
  var isSvgMode = false;
835
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
1775
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
836
1776
  var _a;
837
1777
  const newVNode2 = newParentVNode.$children$[childIndex];
838
1778
  let i2 = 0;
@@ -842,9 +1782,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
842
1782
  if (!useNativeShadowDom) {
843
1783
  checkSlotRelocate = true;
844
1784
  if (newVNode2.$tag$ === "slot") {
845
- if (scopeId) {
846
- parentElm.classList.add(scopeId + "-s");
847
- }
848
1785
  newVNode2.$flags$ |= newVNode2.$children$ ? (
849
1786
  // slot element has fallback content
850
1787
  // still create an element that "mocks" the slot element
@@ -858,14 +1795,22 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
858
1795
  }
859
1796
  }
860
1797
  if (newVNode2.$text$ !== null) {
861
- elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
1798
+ elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
862
1799
  } else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
863
- elm = newVNode2.$elm$ = doc.createTextNode("");
1800
+ elm = newVNode2.$elm$ = win.document.createTextNode("");
1801
+ {
1802
+ updateElement(null, newVNode2, isSvgMode);
1803
+ }
864
1804
  } else {
865
1805
  if (!isSvgMode) {
866
1806
  isSvgMode = newVNode2.$tag$ === "svg";
867
1807
  }
868
- elm = newVNode2.$elm$ = doc.createElementNS(
1808
+ if (!win.document) {
1809
+ throw new Error(
1810
+ "You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
1811
+ );
1812
+ }
1813
+ elm = newVNode2.$elm$ = win.document.createElementNS(
869
1814
  isSvgMode ? SVG_NS : HTML_NS,
870
1815
  !useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
871
1816
  ) ;
@@ -875,17 +1820,12 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
875
1820
  {
876
1821
  updateElement(null, newVNode2, isSvgMode);
877
1822
  }
878
- const rootNode = elm.getRootNode();
879
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
880
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
1823
+ if (isDef(scopeId) && elm["s-si"] !== scopeId) {
881
1824
  elm.classList.add(elm["s-si"] = scopeId);
882
1825
  }
883
- {
884
- updateElementScopeIds(elm, parentElm);
885
- }
886
1826
  if (newVNode2.$children$) {
887
1827
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
888
- childNode = createElm(oldParentVNode, newVNode2, i2, elm);
1828
+ childNode = createElm(oldParentVNode, newVNode2, i2);
889
1829
  if (childNode) {
890
1830
  elm.appendChild(childNode);
891
1831
  }
@@ -906,12 +1846,16 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
906
1846
  elm["s-cr"] = contentRef;
907
1847
  elm["s-sn"] = newVNode2.$name$ || "";
908
1848
  elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
1849
+ patchSlotNode(elm);
909
1850
  oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
910
1851
  if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
911
1852
  {
912
1853
  relocateToHostRoot(oldParentVNode.$elm$);
913
1854
  }
914
1855
  }
1856
+ {
1857
+ addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
1858
+ }
915
1859
  }
916
1860
  }
917
1861
  return elm;
@@ -920,8 +1864,12 @@ var relocateToHostRoot = (parentElm) => {
920
1864
  plt.$flags$ |= 1 /* isTmpDisconnected */;
921
1865
  const host = parentElm.closest(hostTagName.toLowerCase());
922
1866
  if (host != null) {
923
- const contentRefNode = Array.from(host.childNodes).find((ref) => ref["s-cr"]);
924
- const childNodeArray = Array.from(parentElm.childNodes);
1867
+ const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
1868
+ (ref) => ref["s-cr"]
1869
+ );
1870
+ const childNodeArray = Array.from(
1871
+ parentElm.__childNodes || parentElm.childNodes
1872
+ );
925
1873
  for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
926
1874
  if (childNode["s-sh"] != null) {
927
1875
  insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
@@ -930,11 +1878,11 @@ var relocateToHostRoot = (parentElm) => {
930
1878
  }
931
1879
  }
932
1880
  }
933
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
1881
+ plt.$flags$ &= -2 /* isTmpDisconnected */;
934
1882
  };
935
1883
  var putBackInOriginalLocation = (parentElm, recursive) => {
936
1884
  plt.$flags$ |= 1 /* isTmpDisconnected */;
937
- const oldSlotChildNodes = Array.from(parentElm.childNodes);
1885
+ const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
938
1886
  if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
939
1887
  let node = parentElm;
940
1888
  while (node = node.nextSibling) {
@@ -946,7 +1894,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
946
1894
  for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
947
1895
  const childNode = oldSlotChildNodes[i2];
948
1896
  if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
949
- insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
1897
+ insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
950
1898
  childNode["s-ol"].remove();
951
1899
  childNode["s-ol"] = void 0;
952
1900
  childNode["s-sh"] = void 0;
@@ -956,7 +1904,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
956
1904
  putBackInOriginalLocation(childNode, recursive);
957
1905
  }
958
1906
  }
959
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
1907
+ plt.$flags$ &= -2 /* isTmpDisconnected */;
960
1908
  };
961
1909
  var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
962
1910
  let containerElm = parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
@@ -966,7 +1914,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
966
1914
  }
967
1915
  for (; startIdx <= endIdx; ++startIdx) {
968
1916
  if (vnodes[startIdx]) {
969
- childNode = createElm(null, parentVNode, startIdx, parentElm);
1917
+ childNode = createElm(null, parentVNode, startIdx);
970
1918
  if (childNode) {
971
1919
  vnodes[startIdx].$elm$ = childNode;
972
1920
  insertBefore(containerElm, childNode, referenceNode(before) );
@@ -1053,7 +2001,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1053
2001
  if (idxInOld >= 0) {
1054
2002
  elmToMove = oldCh[idxInOld];
1055
2003
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
1056
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
2004
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
1057
2005
  } else {
1058
2006
  patch(elmToMove, newStartVnode, isInitialRender);
1059
2007
  oldCh[idxInOld] = void 0;
@@ -1061,12 +2009,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1061
2009
  }
1062
2010
  newStartVnode = newCh[++newStartIdx];
1063
2011
  } else {
1064
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
2012
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
1065
2013
  newStartVnode = newCh[++newStartIdx];
1066
2014
  }
1067
2015
  if (node) {
1068
2016
  {
1069
- insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
2017
+ insertBefore(
2018
+ referenceNode(oldStartVnode.$elm$).parentNode,
2019
+ node,
2020
+ referenceNode(oldStartVnode.$elm$)
2021
+ );
1070
2022
  }
1071
2023
  }
1072
2024
  }
@@ -1087,28 +2039,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1087
2039
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
1088
2040
  if (leftVNode.$tag$ === rightVNode.$tag$) {
1089
2041
  if (leftVNode.$tag$ === "slot") {
1090
- if (
1091
- // The component gets hydrated and no VDOM has been initialized.
1092
- // Here the comparison can't happen as $name$ property is not set for `leftNode`.
1093
- "$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
1094
- // hydration comments to be removed
1095
- leftVNode.$elm$.nodeType !== 8
1096
- ) {
1097
- return false;
1098
- }
1099
2042
  return leftVNode.$name$ === rightVNode.$name$;
1100
2043
  }
1101
2044
  if (!isInitialRender) {
1102
2045
  return leftVNode.$key$ === rightVNode.$key$;
1103
2046
  }
2047
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
2048
+ leftVNode.$key$ = rightVNode.$key$;
2049
+ }
1104
2050
  return true;
1105
2051
  }
1106
2052
  return false;
1107
2053
  };
1108
- var referenceNode = (node) => {
1109
- return node && node["s-ol"] || node;
1110
- };
1111
- var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
2054
+ var referenceNode = (node) => node && node["s-ol"] || node;
1112
2055
  var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1113
2056
  const elm = newVNode2.$elm$ = oldVNode.$elm$;
1114
2057
  const oldChildren = oldVNode.$children$;
@@ -1126,9 +2069,8 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1126
2069
  newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
1127
2070
  relocateToHostRoot(newVNode2.$elm$.parentElement);
1128
2071
  }
1129
- } else {
1130
- updateElement(oldVNode, newVNode2, isSvgMode);
1131
2072
  }
2073
+ updateElement(oldVNode, newVNode2, isSvgMode, isInitialRender);
1132
2074
  }
1133
2075
  if (oldChildren !== null && newChildren !== null) {
1134
2076
  updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
@@ -1147,36 +2089,9 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1147
2089
  isSvgMode = false;
1148
2090
  }
1149
2091
  } else if ((defaultHolder = elm["s-cr"])) {
1150
- defaultHolder.parentNode.textContent = text;
1151
- } else if (oldVNode.$text$ !== text) {
1152
- elm.data = text;
1153
- }
1154
- };
1155
- var updateFallbackSlotVisibility = (elm) => {
1156
- const childNodes = elm.childNodes;
1157
- for (const childNode of childNodes) {
1158
- if (childNode.nodeType === 1 /* ElementNode */) {
1159
- if (childNode["s-sr"]) {
1160
- const slotName = childNode["s-sn"];
1161
- childNode.hidden = false;
1162
- for (const siblingNode of childNodes) {
1163
- if (siblingNode !== childNode) {
1164
- if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
1165
- if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
1166
- childNode.hidden = true;
1167
- break;
1168
- }
1169
- } else {
1170
- if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
1171
- childNode.hidden = true;
1172
- break;
1173
- }
1174
- }
1175
- }
1176
- }
1177
- }
1178
- updateFallbackSlotVisibility(childNode);
1179
- }
2092
+ defaultHolder.parentNode.textContent = text;
2093
+ } else if (oldVNode.$text$ !== text) {
2094
+ elm.data = text;
1180
2095
  }
1181
2096
  };
1182
2097
  var relocateNodes = [];
@@ -1184,9 +2099,10 @@ var markSlotContentForRelocation = (elm) => {
1184
2099
  let node;
1185
2100
  let hostContentNodes;
1186
2101
  let j;
1187
- for (const childNode of elm.childNodes) {
2102
+ const children = elm.__childNodes || elm.childNodes;
2103
+ for (const childNode of children) {
1188
2104
  if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
1189
- hostContentNodes = node.parentNode.childNodes;
2105
+ hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
1190
2106
  const slotName = childNode["s-sn"];
1191
2107
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
1192
2108
  node = hostContentNodes[j];
@@ -1228,21 +2144,6 @@ var markSlotContentForRelocation = (elm) => {
1228
2144
  }
1229
2145
  }
1230
2146
  };
1231
- var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
1232
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1233
- if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
1234
- return true;
1235
- }
1236
- if (nodeToRelocate.getAttribute("slot") === slotName) {
1237
- return true;
1238
- }
1239
- return false;
1240
- }
1241
- if (nodeToRelocate["s-sn"] === slotName) {
1242
- return true;
1243
- }
1244
- return slotName === "";
1245
- };
1246
2147
  var nullifyVNodeRefs = (vNode) => {
1247
2148
  {
1248
2149
  vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
@@ -1250,44 +2151,51 @@ var nullifyVNodeRefs = (vNode) => {
1250
2151
  }
1251
2152
  };
1252
2153
  var insertBefore = (parent, newNode, reference) => {
1253
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
1254
- {
1255
- updateElementScopeIds(newNode, parent);
1256
- }
1257
- return inserted;
1258
- };
1259
- var findScopeIds = (element) => {
1260
- const scopeIds = [];
1261
- if (element) {
1262
- scopeIds.push(
1263
- ...element["s-scs"] || [],
1264
- element["s-si"],
1265
- element["s-sc"],
1266
- ...findScopeIds(element.parentElement)
1267
- );
2154
+ if (typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
2155
+ addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
2156
+ } else if (typeof newNode["s-sn"] === "string") {
2157
+ if (parent.getRootNode().nodeType !== 11 /* DOCUMENT_FRAGMENT_NODE */) {
2158
+ patchParentNode(newNode);
2159
+ }
2160
+ parent.insertBefore(newNode, reference);
2161
+ const { slotNode } = findSlotFromSlottedNode(newNode);
2162
+ if (slotNode) dispatchSlotChangeEvent(slotNode);
2163
+ return newNode;
2164
+ }
2165
+ if (parent.__insertBefore) {
2166
+ return parent.__insertBefore(newNode, reference);
2167
+ } else {
2168
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
1268
2169
  }
1269
- return scopeIds;
1270
2170
  };
1271
- var updateElementScopeIds = (element, parent, iterateChildNodes = false) => {
1272
- var _a;
1273
- if (element && parent && element.nodeType === 1 /* ElementNode */) {
1274
- const scopeIds = new Set(findScopeIds(parent).filter(Boolean));
1275
- if (scopeIds.size) {
1276
- (_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] = [...scopeIds]);
1277
- if (element["s-ol"] || iterateChildNodes) {
1278
- for (const childNode of Array.from(element.childNodes)) {
1279
- updateElementScopeIds(childNode, element, true);
2171
+ function addRemoveSlotScopedClass(reference, slotNode, newParent, oldParent) {
2172
+ var _a, _b;
2173
+ let scopeId2;
2174
+ if (reference && typeof slotNode["s-sn"] === "string" && !!slotNode["s-sr"] && reference.parentNode && reference.parentNode["s-sc"] && (scopeId2 = slotNode["s-si"] || reference.parentNode["s-sc"])) {
2175
+ const scopeName = slotNode["s-sn"];
2176
+ const hostName = slotNode["s-hn"];
2177
+ (_a = newParent.classList) == null ? void 0 : _a.add(scopeId2 + "-s");
2178
+ if (oldParent && ((_b = oldParent.classList) == null ? void 0 : _b.contains(scopeId2 + "-s"))) {
2179
+ let child = (oldParent.__childNodes || oldParent.childNodes)[0];
2180
+ let found = false;
2181
+ while (child) {
2182
+ if (child["s-sn"] !== scopeName && child["s-hn"] === hostName && !!child["s-sr"]) {
2183
+ found = true;
2184
+ break;
1280
2185
  }
2186
+ child = child.nextSibling;
1281
2187
  }
2188
+ if (!found) oldParent.classList.remove(scopeId2 + "-s");
1282
2189
  }
1283
2190
  }
1284
- };
2191
+ }
1285
2192
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1286
2193
  var _a, _b, _c, _d, _e;
1287
2194
  const hostElm = hostRef.$hostElement$;
1288
2195
  const cmpMeta = hostRef.$cmpMeta$;
1289
2196
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
1290
- const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
2197
+ const isHostElement = isHost(renderFnResults);
2198
+ const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
1291
2199
  hostTagName = hostElm.tagName;
1292
2200
  if (cmpMeta.$attrsToReflect$) {
1293
2201
  rootVnode.$attrs$ = rootVnode.$attrs$ || {};
@@ -1309,7 +2217,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1309
2217
  {
1310
2218
  scopeId = hostElm["s-sc"];
1311
2219
  }
1312
- useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
2220
+ useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
1313
2221
  {
1314
2222
  contentRef = hostElm["s-cr"];
1315
2223
  checkSlotFallbackVisibility = false;
@@ -1321,8 +2229,8 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1321
2229
  markSlotContentForRelocation(rootVnode.$elm$);
1322
2230
  for (const relocateData of relocateNodes) {
1323
2231
  const nodeToRelocate = relocateData.$nodeToRelocate$;
1324
- if (!nodeToRelocate["s-ol"]) {
1325
- const orgLocationNode = doc.createTextNode("");
2232
+ if (!nodeToRelocate["s-ol"] && win.document) {
2233
+ const orgLocationNode = win.document.createTextNode("");
1326
2234
  orgLocationNode["s-nr"] = nodeToRelocate;
1327
2235
  insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
1328
2236
  }
@@ -1333,11 +2241,11 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1333
2241
  if (slotRefNode) {
1334
2242
  const parentNodeRef = slotRefNode.parentNode;
1335
2243
  let insertBeforeNode = slotRefNode.nextSibling;
1336
- if (insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
2244
+ if ((insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */)) {
1337
2245
  let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
1338
2246
  while (orgLocationNode) {
1339
2247
  let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
1340
- if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
2248
+ if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
1341
2249
  refNode = refNode.nextSibling;
1342
2250
  while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
1343
2251
  refNode = refNode == null ? void 0 : refNode.nextSibling;
@@ -1350,15 +2258,17 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1350
2258
  orgLocationNode = orgLocationNode.previousSibling;
1351
2259
  }
1352
2260
  }
1353
- if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
2261
+ const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
2262
+ const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
2263
+ if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
1354
2264
  if (nodeToRelocate !== insertBeforeNode) {
1355
2265
  insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
1356
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
2266
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
1357
2267
  nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
1358
2268
  }
1359
2269
  }
1360
2270
  }
1361
- nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](nodeToRelocate);
2271
+ nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](slotRefNode);
1362
2272
  } else {
1363
2273
  if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1364
2274
  if (isInitialLoad) {
@@ -1372,11 +2282,12 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1372
2282
  if (checkSlotFallbackVisibility) {
1373
2283
  updateFallbackSlotVisibility(rootVnode.$elm$);
1374
2284
  }
1375
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
2285
+ plt.$flags$ &= -2 /* isTmpDisconnected */;
1376
2286
  relocateNodes.length = 0;
1377
2287
  }
1378
2288
  if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1379
- for (const childNode of rootVnode.$elm$.childNodes) {
2289
+ const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
2290
+ for (const childNode of children) {
1380
2291
  if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
1381
2292
  if (isInitialLoad && childNode["s-ih"] == null) {
1382
2293
  childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
@@ -1391,7 +2302,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1391
2302
  // src/runtime/update-component.ts
1392
2303
  var attachToAncestor = (hostRef, ancestorComponent) => {
1393
2304
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
1394
- ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
2305
+ const index = ancestorComponent["s-p"].push(
2306
+ new Promise(
2307
+ (r) => hostRef.$onRenderResolve$ = () => {
2308
+ ancestorComponent["s-p"].splice(index - 1, 1);
2309
+ r();
2310
+ }
2311
+ )
2312
+ );
1395
2313
  }
1396
2314
  };
1397
2315
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -1420,17 +2338,15 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
1420
2338
  {
1421
2339
  hostRef.$flags$ |= 256 /* isListenReady */;
1422
2340
  if (hostRef.$queuedListeners$) {
1423
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
2341
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
1424
2342
  hostRef.$queuedListeners$ = void 0;
1425
2343
  }
1426
2344
  }
1427
- {
1428
- maybePromise = safeCall(instance, "componentWillLoad");
1429
- }
1430
- }
1431
- {
1432
- maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
2345
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
2346
+ } else {
2347
+ maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
1433
2348
  }
2349
+ maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
1434
2350
  endSchedule();
1435
2351
  return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
1436
2352
  };
@@ -1473,7 +2389,7 @@ var callRender = (hostRef, instance, elm, isInitialLoad) => {
1473
2389
  try {
1474
2390
  instance = instance.render && instance.render();
1475
2391
  {
1476
- hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
2392
+ hostRef.$flags$ &= -17 /* isQueuedForUpdate */;
1477
2393
  }
1478
2394
  {
1479
2395
  hostRef.$flags$ |= 2 /* hasRendered */;
@@ -1496,17 +2412,13 @@ var postUpdateComponent = (hostRef) => {
1496
2412
  const endPostUpdate = createTime("postUpdate", tagName);
1497
2413
  const instance = hostRef.$lazyInstance$ ;
1498
2414
  const ancestorComponent = hostRef.$ancestorComponent$;
1499
- {
1500
- safeCall(instance, "componentDidRender");
1501
- }
2415
+ safeCall(instance, "componentDidRender", void 0, elm);
1502
2416
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
1503
2417
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
1504
2418
  {
1505
2419
  addHydratedFlag(elm);
1506
2420
  }
1507
- {
1508
- safeCall(instance, "componentDidLoad");
1509
- }
2421
+ safeCall(instance, "componentDidLoad", void 0, elm);
1510
2422
  endPostUpdate();
1511
2423
  {
1512
2424
  hostRef.$onReadyResolve$(elm);
@@ -1515,9 +2427,7 @@ var postUpdateComponent = (hostRef) => {
1515
2427
  }
1516
2428
  }
1517
2429
  } else {
1518
- {
1519
- safeCall(instance, "componentDidUpdate");
1520
- }
2430
+ safeCall(instance, "componentDidUpdate", void 0, elm);
1521
2431
  endPostUpdate();
1522
2432
  }
1523
2433
  {
@@ -1531,7 +2441,7 @@ var postUpdateComponent = (hostRef) => {
1531
2441
  if (hostRef.$flags$ & 512 /* needsRerender */) {
1532
2442
  nextTick(() => scheduleUpdate(hostRef, false));
1533
2443
  }
1534
- hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
2444
+ hostRef.$flags$ &= -517;
1535
2445
  }
1536
2446
  };
1537
2447
  var forceUpdate = (ref) => {
@@ -1545,17 +2455,14 @@ var forceUpdate = (ref) => {
1545
2455
  }
1546
2456
  };
1547
2457
  var appDidLoad = (who) => {
1548
- {
1549
- addHydratedFlag(doc.documentElement);
1550
- }
1551
2458
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
1552
2459
  };
1553
- var safeCall = (instance, method, arg) => {
2460
+ var safeCall = (instance, method, arg, elm) => {
1554
2461
  if (instance && instance[method]) {
1555
2462
  try {
1556
2463
  return instance[method](arg);
1557
2464
  } catch (e) {
1558
- consoleError(e);
2465
+ consoleError(e, elm);
1559
2466
  }
1560
2467
  }
1561
2468
  return void 0;
@@ -1571,7 +2478,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
1571
2478
  const hostRef = getHostRef(ref);
1572
2479
  if (!hostRef) {
1573
2480
  throw new Error(
1574
- `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`
2481
+ `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
1575
2482
  );
1576
2483
  }
1577
2484
  const elm = hostRef.$hostElement$ ;
@@ -1597,6 +2504,11 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
1597
2504
  }
1598
2505
  }
1599
2506
  if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
2507
+ if (instance.componentShouldUpdate) {
2508
+ if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
2509
+ return;
2510
+ }
2511
+ }
1600
2512
  scheduleUpdate(hostRef, false);
1601
2513
  }
1602
2514
  }
@@ -1614,15 +2526,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1614
2526
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1615
2527
  members.map(([memberName, [memberFlags]]) => {
1616
2528
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
2529
+ const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
2530
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
2531
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
2532
+ if (flags & 1 /* isElementConstructor */ || !origGetter) {
2533
+ Object.defineProperty(prototype, memberName, {
2534
+ get() {
2535
+ {
2536
+ if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
2537
+ return getValue(this, memberName);
2538
+ }
2539
+ const ref = getHostRef(this);
2540
+ const instance = ref ? ref.$lazyInstance$ : prototype;
2541
+ if (!instance) return;
2542
+ return instance[memberName];
2543
+ }
2544
+ },
2545
+ configurable: true,
2546
+ enumerable: true
2547
+ });
2548
+ }
1617
2549
  Object.defineProperty(prototype, memberName, {
1618
- get() {
1619
- return getValue(this, memberName);
1620
- },
1621
2550
  set(newValue) {
1622
- setValue(this, memberName, newValue, cmpMeta);
1623
- },
1624
- configurable: true,
1625
- enumerable: true
2551
+ const ref = getHostRef(this);
2552
+ if (origSetter) {
2553
+ const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
2554
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
2555
+ newValue = ref.$instanceValues$.get(memberName);
2556
+ } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
2557
+ ref.$instanceValues$.set(memberName, currentValue);
2558
+ }
2559
+ origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
2560
+ newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
2561
+ setValue(this, memberName, newValue, cmpMeta);
2562
+ return;
2563
+ }
2564
+ {
2565
+ if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
2566
+ setValue(this, memberName, newValue, cmpMeta);
2567
+ if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
2568
+ ref.$onReadyPromise$.then(() => {
2569
+ if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
2570
+ ref.$lazyInstance$[memberName] = newValue;
2571
+ }
2572
+ });
2573
+ }
2574
+ return;
2575
+ }
2576
+ const setterSetVal = () => {
2577
+ const currentValue = ref.$lazyInstance$[memberName];
2578
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
2579
+ ref.$instanceValues$.set(memberName, currentValue);
2580
+ }
2581
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
2582
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
2583
+ };
2584
+ if (ref.$lazyInstance$) {
2585
+ setterSetVal();
2586
+ } else {
2587
+ ref.$onReadyPromise$.then(() => setterSetVal());
2588
+ }
2589
+ }
2590
+ }
1626
2591
  });
1627
2592
  } else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
1628
2593
  Object.defineProperty(prototype, memberName, {
@@ -1643,7 +2608,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1643
2608
  plt.jmp(() => {
1644
2609
  var _a2;
1645
2610
  const propName = attrNameToPropName.get(attrName);
1646
- if (this.hasOwnProperty(propName)) {
2611
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
1647
2612
  newValue = this[propName];
1648
2613
  delete this[propName];
1649
2614
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -1663,7 +2628,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1663
2628
  }
1664
2629
  return;
1665
2630
  }
1666
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2631
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
2632
+ newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2633
+ if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
2634
+ this[propName] = newValue;
2635
+ }
1667
2636
  });
1668
2637
  };
1669
2638
  Cstr.observedAttributes = Array.from(
@@ -1692,7 +2661,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1692
2661
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1693
2662
  const bundleId = cmpMeta.$lazyBundleId$;
1694
2663
  if (bundleId) {
1695
- const CstrImport = loadModule(cmpMeta);
2664
+ const CstrImport = loadModule(cmpMeta, hostRef);
1696
2665
  if (CstrImport && "then" in CstrImport) {
1697
2666
  const endLoad = uniqueTime();
1698
2667
  Cstr = await CstrImport;
@@ -1717,16 +2686,16 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1717
2686
  try {
1718
2687
  new Cstr(hostRef);
1719
2688
  } catch (e) {
1720
- consoleError(e);
2689
+ consoleError(e, elm);
1721
2690
  }
1722
2691
  {
1723
- hostRef.$flags$ &= ~8 /* isConstructingInstance */;
2692
+ hostRef.$flags$ &= -9 /* isConstructingInstance */;
1724
2693
  }
1725
2694
  {
1726
2695
  hostRef.$flags$ |= 128 /* isWatchReady */;
1727
2696
  }
1728
2697
  endNewInstance();
1729
- fireConnectedCallback(hostRef.$lazyInstance$);
2698
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1730
2699
  } else {
1731
2700
  Cstr = elm.constructor;
1732
2701
  const cmpTag = elm.localName;
@@ -1758,9 +2727,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1758
2727
  schedule();
1759
2728
  }
1760
2729
  };
1761
- var fireConnectedCallback = (instance) => {
2730
+ var fireConnectedCallback = (instance, elm) => {
1762
2731
  {
1763
- safeCall(instance, "connectedCallback");
2732
+ safeCall(instance, "connectedCallback", void 0, elm);
1764
2733
  }
1765
2734
  };
1766
2735
 
@@ -1779,6 +2748,9 @@ var connectedCallback = (elm) => {
1779
2748
  if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1780
2749
  const scopeId2 = addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) ;
1781
2750
  elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
2751
+ } else if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2752
+ const scopeId2 = getScopeId(cmpMeta, elm.getAttribute("s-mode") );
2753
+ elm["s-sc"] = scopeId2;
1782
2754
  }
1783
2755
  initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
1784
2756
  }
@@ -1813,24 +2785,27 @@ var connectedCallback = (elm) => {
1813
2785
  } else {
1814
2786
  addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1815
2787
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1816
- fireConnectedCallback(hostRef.$lazyInstance$);
2788
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1817
2789
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1818
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
2790
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
1819
2791
  }
1820
2792
  }
1821
2793
  endConnected();
1822
2794
  }
1823
2795
  };
1824
2796
  var setContentReference = (elm) => {
1825
- const contentRefElm = elm["s-cr"] = doc.createComment(
2797
+ if (!win.document) {
2798
+ return;
2799
+ }
2800
+ const contentRefElm = elm["s-cr"] = win.document.createComment(
1826
2801
  ""
1827
2802
  );
1828
2803
  contentRefElm["s-cn"] = true;
1829
2804
  insertBefore(elm, contentRefElm, elm.firstChild);
1830
2805
  };
1831
- var disconnectInstance = (instance) => {
2806
+ var disconnectInstance = (instance, elm) => {
1832
2807
  {
1833
- safeCall(instance, "disconnectedCallback");
2808
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1834
2809
  }
1835
2810
  };
1836
2811
  var disconnectedCallback = async (elm) => {
@@ -1843,312 +2818,44 @@ var disconnectedCallback = async (elm) => {
1843
2818
  }
1844
2819
  }
1845
2820
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1846
- disconnectInstance(hostRef.$lazyInstance$);
2821
+ disconnectInstance(hostRef.$lazyInstance$, elm);
1847
2822
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1848
- hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1849
- }
1850
- }
1851
- };
1852
- var patchPseudoShadowDom = (hostElementPrototype, descriptorPrototype) => {
1853
- patchCloneNode(hostElementPrototype);
1854
- patchSlotAppendChild(hostElementPrototype);
1855
- patchSlotAppend(hostElementPrototype);
1856
- patchSlotPrepend(hostElementPrototype);
1857
- patchSlotInsertAdjacentElement(hostElementPrototype);
1858
- patchSlotInsertAdjacentHTML(hostElementPrototype);
1859
- patchSlotInsertAdjacentText(hostElementPrototype);
1860
- patchTextContent(hostElementPrototype);
1861
- patchChildSlotNodes(hostElementPrototype, descriptorPrototype);
1862
- patchSlotRemoveChild(hostElementPrototype);
1863
- };
1864
- var patchCloneNode = (HostElementPrototype) => {
1865
- const orgCloneNode = HostElementPrototype.cloneNode;
1866
- HostElementPrototype.cloneNode = function(deep) {
1867
- const srcNode = this;
1868
- const isShadowDom = srcNode.shadowRoot && supportsShadow ;
1869
- const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
1870
- if (!isShadowDom && deep) {
1871
- let i2 = 0;
1872
- let slotted, nonStencilNode;
1873
- const stencilPrivates = [
1874
- "s-id",
1875
- "s-cr",
1876
- "s-lr",
1877
- "s-rc",
1878
- "s-sc",
1879
- "s-p",
1880
- "s-cn",
1881
- "s-sr",
1882
- "s-sn",
1883
- "s-hn",
1884
- "s-ol",
1885
- "s-nr",
1886
- "s-si",
1887
- "s-rf",
1888
- "s-scs"
1889
- ];
1890
- for (; i2 < srcNode.childNodes.length; i2++) {
1891
- slotted = srcNode.childNodes[i2]["s-nr"];
1892
- nonStencilNode = stencilPrivates.every((privateField) => !srcNode.childNodes[i2][privateField]);
1893
- if (slotted) {
1894
- if (clonedNode.__appendChild) {
1895
- clonedNode.__appendChild(slotted.cloneNode(true));
1896
- } else {
1897
- clonedNode.appendChild(slotted.cloneNode(true));
1898
- }
1899
- }
1900
- if (nonStencilNode) {
1901
- clonedNode.appendChild(srcNode.childNodes[i2].cloneNode(true));
1902
- }
1903
- }
1904
- }
1905
- return clonedNode;
1906
- };
1907
- };
1908
- var patchSlotAppendChild = (HostElementPrototype) => {
1909
- HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
1910
- HostElementPrototype.appendChild = function(newChild) {
1911
- const slotName = newChild["s-sn"] = getSlotName(newChild);
1912
- const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
1913
- if (slotNode) {
1914
- const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1915
- const appendAfter = slotChildNodes[slotChildNodes.length - 1];
1916
- const insertedNode = insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1917
- updateFallbackSlotVisibility(this);
1918
- return insertedNode;
1919
- }
1920
- return this.__appendChild(newChild);
1921
- };
1922
- };
1923
- var patchSlotRemoveChild = (ElementPrototype) => {
1924
- ElementPrototype.__removeChild = ElementPrototype.removeChild;
1925
- ElementPrototype.removeChild = function(toRemove) {
1926
- if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
1927
- const slotNode = getHostSlotNode(this.childNodes, toRemove["s-sn"], this.tagName);
1928
- if (slotNode) {
1929
- const slotChildNodes = getHostSlotChildNodes(slotNode, toRemove["s-sn"]);
1930
- const existingNode = slotChildNodes.find((n) => n === toRemove);
1931
- if (existingNode) {
1932
- existingNode.remove();
1933
- updateFallbackSlotVisibility(this);
1934
- return;
1935
- }
1936
- }
1937
- }
1938
- return this.__removeChild(toRemove);
1939
- };
1940
- };
1941
- var patchSlotPrepend = (HostElementPrototype) => {
1942
- const originalPrepend = HostElementPrototype.prepend;
1943
- HostElementPrototype.prepend = function(...newChildren) {
1944
- newChildren.forEach((newChild) => {
1945
- if (typeof newChild === "string") {
1946
- newChild = this.ownerDocument.createTextNode(newChild);
1947
- }
1948
- const slotName = newChild["s-sn"] = getSlotName(newChild);
1949
- const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
1950
- if (slotNode) {
1951
- const slotPlaceholder = document.createTextNode("");
1952
- slotPlaceholder["s-nr"] = newChild;
1953
- slotNode["s-cr"].parentNode.__appendChild(slotPlaceholder);
1954
- newChild["s-ol"] = slotPlaceholder;
1955
- const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1956
- const appendAfter = slotChildNodes[0];
1957
- return insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1958
- }
1959
- if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
1960
- newChild.hidden = true;
1961
- }
1962
- return originalPrepend.call(this, newChild);
1963
- });
1964
- };
1965
- };
1966
- var patchSlotAppend = (HostElementPrototype) => {
1967
- HostElementPrototype.append = function(...newChildren) {
1968
- newChildren.forEach((newChild) => {
1969
- if (typeof newChild === "string") {
1970
- newChild = this.ownerDocument.createTextNode(newChild);
1971
- }
1972
- this.appendChild(newChild);
1973
- });
1974
- };
1975
- };
1976
- var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
1977
- const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
1978
- HostElementPrototype.insertAdjacentHTML = function(position, text) {
1979
- if (position !== "afterbegin" && position !== "beforeend") {
1980
- return originalInsertAdjacentHtml.call(this, position, text);
1981
- }
1982
- const container = this.ownerDocument.createElement("_");
1983
- let node;
1984
- container.innerHTML = text;
1985
- if (position === "afterbegin") {
1986
- while (node = container.firstChild) {
1987
- this.prepend(node);
1988
- }
1989
- } else if (position === "beforeend") {
1990
- while (node = container.firstChild) {
1991
- this.append(node);
1992
- }
1993
- }
1994
- };
1995
- };
1996
- var patchSlotInsertAdjacentText = (HostElementPrototype) => {
1997
- HostElementPrototype.insertAdjacentText = function(position, text) {
1998
- this.insertAdjacentHTML(position, text);
1999
- };
2000
- };
2001
- var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
2002
- const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
2003
- HostElementPrototype.insertAdjacentElement = function(position, element) {
2004
- if (position !== "afterbegin" && position !== "beforeend") {
2005
- return originalInsertAdjacentElement.call(this, position, element);
2006
- }
2007
- if (position === "afterbegin") {
2008
- this.prepend(element);
2009
- return element;
2010
- } else if (position === "beforeend") {
2011
- this.append(element);
2012
- return element;
2013
- }
2014
- return element;
2015
- };
2016
- };
2017
- var patchTextContent = (hostElementPrototype) => {
2018
- const descriptor = Object.getOwnPropertyDescriptor(Node.prototype, "textContent");
2019
- Object.defineProperty(hostElementPrototype, "__textContent", descriptor);
2020
- {
2021
- Object.defineProperty(hostElementPrototype, "textContent", {
2022
- // To mimic shadow root behavior, we need to return the text content of all
2023
- // nodes in a slot reference node
2024
- get() {
2025
- const slotRefNodes = getAllChildSlotNodes(this.childNodes);
2026
- const textContent = slotRefNodes.map((node) => {
2027
- var _a, _b;
2028
- const text = [];
2029
- let slotContent = node.nextSibling;
2030
- while (slotContent && slotContent["s-sn"] === node["s-sn"]) {
2031
- if (slotContent.nodeType === 3 /* TEXT_NODE */ || slotContent.nodeType === 1 /* ELEMENT_NODE */) {
2032
- text.push((_b = (_a = slotContent.textContent) == null ? void 0 : _a.trim()) != null ? _b : "");
2033
- }
2034
- slotContent = slotContent.nextSibling;
2035
- }
2036
- return text.filter((ref) => ref !== "").join(" ");
2037
- }).filter((text) => text !== "").join(" ");
2038
- return " " + textContent + " ";
2039
- },
2040
- // To mimic shadow root behavior, we need to overwrite all nodes in a slot
2041
- // reference node. If a default slot reference node exists, the text content will be
2042
- // placed there. Otherwise, the new text node will be hidden
2043
- set(value) {
2044
- const slotRefNodes = getAllChildSlotNodes(this.childNodes);
2045
- slotRefNodes.forEach((node) => {
2046
- let slotContent = node.nextSibling;
2047
- while (slotContent && slotContent["s-sn"] === node["s-sn"]) {
2048
- const tmp = slotContent;
2049
- slotContent = slotContent.nextSibling;
2050
- tmp.remove();
2051
- }
2052
- if (node["s-sn"] === "") {
2053
- const textNode = this.ownerDocument.createTextNode(value);
2054
- textNode["s-sn"] = "";
2055
- insertBefore(node.parentElement, textNode, node.nextSibling);
2056
- } else {
2057
- node.remove();
2058
- }
2059
- });
2060
- }
2061
- });
2062
- }
2063
- };
2064
- var patchChildSlotNodes = (elm, cmpMeta) => {
2065
- class FakeNodeList extends Array {
2066
- item(n) {
2067
- return this[n];
2068
- }
2069
- }
2070
- if (cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
2071
- const childNodesFn = elm.__lookupGetter__("childNodes");
2072
- Object.defineProperty(elm, "children", {
2073
- get() {
2074
- return this.childNodes.map((n) => n.nodeType === 1);
2075
- }
2076
- });
2077
- Object.defineProperty(elm, "childElementCount", {
2078
- get() {
2079
- return elm.children.length;
2080
- }
2081
- });
2082
- Object.defineProperty(elm, "childNodes", {
2083
- get() {
2084
- const childNodes = childNodesFn.call(this);
2085
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0 && getHostRef(this).$flags$ & 2 /* hasRendered */) {
2086
- const result = new FakeNodeList();
2087
- for (let i2 = 0; i2 < childNodes.length; i2++) {
2088
- const slot = childNodes[i2]["s-nr"];
2089
- if (slot) {
2090
- result.push(slot);
2091
- }
2092
- }
2093
- return result;
2094
- }
2095
- return FakeNodeList.from(childNodes);
2096
- }
2097
- });
2098
- }
2099
- };
2100
- var getAllChildSlotNodes = (childNodes) => {
2101
- const slotRefNodes = [];
2102
- for (const childNode of Array.from(childNodes)) {
2103
- if (childNode["s-sr"]) {
2104
- slotRefNodes.push(childNode);
2823
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
2105
2824
  }
2106
- slotRefNodes.push(...getAllChildSlotNodes(childNode.childNodes));
2107
2825
  }
2108
- return slotRefNodes;
2109
- };
2110
- var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
2111
- var getHostSlotNode = (childNodes, slotName, hostName) => {
2112
- let i2 = 0;
2113
- let childNode;
2114
- for (; i2 < childNodes.length; i2++) {
2115
- childNode = childNodes[i2];
2116
- if (childNode["s-sr"] && childNode["s-sn"] === slotName && childNode["s-hn"] === hostName) {
2117
- return childNode;
2118
- }
2119
- childNode = getHostSlotNode(childNode.childNodes, slotName, hostName);
2120
- if (childNode) {
2121
- return childNode;
2122
- }
2826
+ if (rootAppliedStyles.has(elm)) {
2827
+ rootAppliedStyles.delete(elm);
2123
2828
  }
2124
- return null;
2125
- };
2126
- var getHostSlotChildNodes = (n, slotName) => {
2127
- const childNodes = [n];
2128
- while ((n = n.nextSibling) && n["s-sn"] === slotName) {
2129
- childNodes.push(n);
2829
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
2830
+ rootAppliedStyles.delete(elm.shadowRoot);
2130
2831
  }
2131
- return childNodes;
2132
2832
  };
2133
2833
 
2134
2834
  // src/runtime/bootstrap-lazy.ts
2135
2835
  var bootstrapLazy = (lazyBundles, options = {}) => {
2136
2836
  var _a;
2837
+ if (!win.document) {
2838
+ console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
2839
+ return;
2840
+ }
2137
2841
  const endBootstrap = createTime();
2138
2842
  const cmpTags = [];
2139
2843
  const exclude = options.exclude || [];
2140
2844
  const customElements2 = win.customElements;
2141
- const head = doc.head;
2845
+ const head = win.document.head;
2142
2846
  const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
2143
- const dataStyles = /* @__PURE__ */ doc.createElement("style");
2847
+ const dataStyles = /* @__PURE__ */ win.document.createElement("style");
2144
2848
  const deferredConnectedCallbacks = [];
2145
2849
  let appLoadFallback;
2146
2850
  let isBootstrapping = true;
2147
2851
  Object.assign(plt, options);
2148
- plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
2852
+ plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
2149
2853
  {
2150
2854
  plt.$flags$ |= 2 /* appLoaded */;
2151
2855
  }
2856
+ {
2857
+ hydrateScopedToShadow();
2858
+ }
2152
2859
  let hasSlotRelocation = false;
2153
2860
  lazyBundles.map((lazyBundle) => {
2154
2861
  lazyBundle[1].map((compactMeta) => {
@@ -2219,6 +2926,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2219
2926
  }
2220
2927
  disconnectedCallback() {
2221
2928
  plt.jmp(() => disconnectedCallback(this));
2929
+ plt.raf(() => {
2930
+ var _a3;
2931
+ const hostRef = getHostRef(this);
2932
+ const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
2933
+ if (i2 > -1) {
2934
+ deferredConnectedCallbacks.splice(i2, 1);
2935
+ }
2936
+ if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
2937
+ delete hostRef.$vnode$.$elm$;
2938
+ }
2939
+ });
2222
2940
  }
2223
2941
  componentOnReady() {
2224
2942
  return getHostRef(this).$onReadyPromise$;
@@ -2226,7 +2944,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2226
2944
  };
2227
2945
  {
2228
2946
  if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2229
- patchPseudoShadowDom(HostElement.prototype, cmpMeta);
2947
+ patchPseudoShadowDom(HostElement.prototype);
2230
2948
  }
2231
2949
  }
2232
2950
  cmpMeta.$lazyBundleId$ = lazyBundle[0];
@@ -2248,7 +2966,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2248
2966
  }
2249
2967
  if (dataStyles.innerHTML.length) {
2250
2968
  dataStyles.setAttribute("data-styles", "");
2251
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
2969
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
2252
2970
  if (nonce != null) {
2253
2971
  dataStyles.setAttribute("nonce", nonce);
2254
2972
  }
@@ -2266,9 +2984,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2266
2984
  endBootstrap();
2267
2985
  };
2268
2986
  var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
2269
- if (listeners) {
2987
+ if (listeners && win.document) {
2270
2988
  listeners.map(([flags, name, method]) => {
2271
- const target = getHostListenerTarget(elm, flags) ;
2989
+ const target = getHostListenerTarget(win.document, elm, flags) ;
2272
2990
  const handler = hostListenerProxy(hostRef, method);
2273
2991
  const opts = hostListenerOpts(flags);
2274
2992
  plt.ael(target, name, handler, opts);
@@ -2287,13 +3005,19 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
2287
3005
  }
2288
3006
  }
2289
3007
  } catch (e) {
2290
- consoleError(e);
3008
+ consoleError(e, hostRef.$hostElement$);
2291
3009
  }
2292
3010
  };
2293
- var getHostListenerTarget = (elm, flags) => {
2294
- if (flags & 4 /* TargetDocument */) return doc;
2295
- if (flags & 8 /* TargetWindow */) return win;
2296
- if (flags & 16 /* TargetBody */) return doc.body;
3011
+ var getHostListenerTarget = (doc, elm, flags) => {
3012
+ if (flags & 4 /* TargetDocument */) {
3013
+ return doc;
3014
+ }
3015
+ if (flags & 8 /* TargetWindow */) {
3016
+ return win;
3017
+ }
3018
+ if (flags & 16 /* TargetBody */) {
3019
+ return doc.body;
3020
+ }
2297
3021
  return elm;
2298
3022
  };
2299
3023
  var hostListenerOpts = (flags) => supportsListenerOptions ? {