@ionic/core 8.5.4-dev.11744646756.1244bf71 → 8.5.4-dev.11744657992.1bb14c4f

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 +23 -37
  2. package/components/alert.js +25 -41
  3. package/components/animation.js +1 -1
  4. package/components/backdrop.js +4 -11
  5. package/components/button-active.js +1 -1
  6. package/components/button.js +23 -29
  7. package/components/buttons.js +4 -14
  8. package/components/capacitor.js +1 -1
  9. package/components/checkbox.js +16 -40
  10. package/components/content.js +5 -24
  11. package/components/data.js +5 -30
  12. package/components/gesture-controller.js +1 -1
  13. package/components/haptic.js +1 -1
  14. package/components/hardware-back-button.js +1 -1
  15. package/components/header.js +7 -12
  16. package/components/helpers.js +5 -2
  17. package/components/icon.js +2 -1
  18. package/components/index3.js +5 -3
  19. package/components/index4.js +1 -1
  20. package/components/index5.js +3 -28
  21. package/components/index7.js +27 -163
  22. package/components/index8.js +1 -1
  23. package/components/index9.js +163 -3
  24. package/components/input-shims.js +2 -2
  25. package/components/input.utils.js +1 -1
  26. package/components/ion-accordion-group.js +6 -19
  27. package/components/ion-accordion.js +14 -32
  28. package/components/ion-app.js +4 -3
  29. package/components/ion-avatar.js +4 -2
  30. package/components/ion-back-button.js +13 -12
  31. package/components/ion-badge.js +5 -2
  32. package/components/ion-breadcrumb.js +20 -22
  33. package/components/ion-breadcrumbs.js +10 -14
  34. package/components/ion-card-content.js +4 -2
  35. package/components/ion-card-header.js +5 -7
  36. package/components/ion-card-subtitle.js +5 -2
  37. package/components/ion-card-title.js +5 -2
  38. package/components/ion-card.js +11 -16
  39. package/components/ion-chip.js +5 -8
  40. package/components/ion-col.js +26 -1
  41. package/components/ion-datetime-button.js +13 -15
  42. package/components/ion-datetime.js +81 -196
  43. package/components/ion-fab-button.js +20 -37
  44. package/components/ion-fab-list.js +2 -7
  45. package/components/ion-fab.js +4 -10
  46. package/components/ion-footer.js +8 -13
  47. package/components/ion-grid.js +2 -4
  48. package/components/ion-img.js +6 -1
  49. package/components/ion-infinite-scroll-content.js +6 -2
  50. package/components/ion-infinite-scroll.js +6 -27
  51. package/components/ion-input-password-toggle.js +9 -7
  52. package/components/ion-input.js +44 -72
  53. package/components/ion-item-divider.js +5 -9
  54. package/components/ion-item-group.js +4 -2
  55. package/components/ion-item-option.js +12 -14
  56. package/components/ion-item-options.js +4 -6
  57. package/components/ion-item-sliding.js +2 -4
  58. package/components/ion-loading.js +19 -36
  59. package/components/ion-menu-button.js +10 -15
  60. package/components/ion-menu-toggle.js +5 -9
  61. package/components/ion-menu.js +9 -25
  62. package/components/ion-nav-link.js +6 -6
  63. package/components/ion-nav.js +10 -7
  64. package/components/ion-note.js +5 -2
  65. package/components/ion-picker-legacy.js +24 -44
  66. package/components/ion-progress-bar.js +6 -19
  67. package/components/ion-range.js +25 -65
  68. package/components/ion-refresher-content.js +5 -1
  69. package/components/ion-refresher.js +6 -54
  70. package/components/ion-reorder-group.js +4 -6
  71. package/components/ion-reorder.js +5 -3
  72. package/components/ion-route-redirect.js +2 -0
  73. package/components/ion-route.js +7 -9
  74. package/components/ion-router-link.js +9 -7
  75. package/components/ion-router-outlet.js +8 -10
  76. package/components/ion-router.js +0 -18
  77. package/components/ion-row.js +2 -1
  78. package/components/ion-searchbar.js +29 -78
  79. package/components/ion-segment-button.js +10 -19
  80. package/components/ion-segment-content.js +2 -1
  81. package/components/ion-segment-view.js +5 -5
  82. package/components/ion-segment.js +11 -22
  83. package/components/ion-select-option.js +3 -4
  84. package/components/ion-select.js +41 -61
  85. package/components/ion-skeleton-text.js +2 -4
  86. package/components/ion-split-pane.js +5 -10
  87. package/components/ion-tab-bar.js +6 -7
  88. package/components/ion-tab-button.js +12 -10
  89. package/components/ion-tab.js +5 -2
  90. package/components/ion-tabs.js +4 -3
  91. package/components/ion-text.js +3 -1
  92. package/components/ion-textarea.js +36 -64
  93. package/components/ion-thumbnail.js +2 -1
  94. package/components/ion-toast.js +32 -55
  95. package/components/ion-toggle.js +24 -55
  96. package/components/item.js +14 -20
  97. package/components/keyboard-controller.js +2 -2
  98. package/components/keyboard.js +69 -134
  99. package/components/keyboard2.js +134 -69
  100. package/components/label.js +6 -2
  101. package/components/list-header.js +6 -2
  102. package/components/list.js +5 -5
  103. package/components/modal.js +39 -117
  104. package/components/notch-controller.js +1 -1
  105. package/components/overlays.js +2 -2
  106. package/components/picker-column-option.js +5 -18
  107. package/components/picker-column.js +10 -25
  108. package/components/picker-column2.js +8 -5
  109. package/components/picker.js +4 -2
  110. package/components/popover.js +37 -129
  111. package/components/radio-group.js +10 -10
  112. package/components/radio.js +13 -27
  113. package/components/refresher.utils.js +2 -2
  114. package/components/ripple-effect.js +2 -10
  115. package/components/select-modal.js +8 -3
  116. package/components/select-popover.js +8 -5
  117. package/components/spinner.js +5 -4
  118. package/components/swipe-back.js +1 -1
  119. package/components/title.js +6 -2
  120. package/components/toolbar.js +5 -2
  121. package/css/global.bundle.css +1 -1
  122. package/css/global.bundle.css.map +1 -1
  123. package/css/ionic.bundle.css +1 -1
  124. package/css/ionic.bundle.css.map +1 -1
  125. package/css/structure.css +1 -1
  126. package/css/structure.css.map +1 -1
  127. package/dist/cjs/{animation-Bz5ImL40.js → animation-b4fdf128.js} +1 -1
  128. package/dist/cjs/{app-globals-CSpnImi2.js → app-globals-dd592863.js} +1 -1
  129. package/dist/cjs/{button-active-BzpKQ5zN.js → button-active-43e2b419.js} +3 -3
  130. package/dist/cjs/{capacitor-DmA66EwP.js → capacitor-c04564bf.js} +1 -1
  131. package/dist/cjs/{data-BQSLLJwc.js → data-27cc2c9c.js} +5 -30
  132. package/dist/cjs/{framework-delegate-B0-bTZ_Y.js → framework-delegate-50a86d56.js} +1 -1
  133. package/dist/cjs/{gesture-controller-dtqlP_q4.js → gesture-controller-9436f482.js} +1 -1
  134. package/dist/cjs/{haptic-ClPPQ_PS.js → haptic-f6b37aa3.js} +1 -1
  135. package/dist/cjs/{hardware-back-button-B0yu2YGK.js → hardware-back-button-5a99001f.js} +3 -3
  136. package/dist/cjs/{helpers-CLmZlPvl.js → helpers-3a248559.js} +4 -1
  137. package/dist/cjs/{index-CPbAsnJK.js → index-073c7cdc.js} +0 -1
  138. package/dist/cjs/{index-qOuhvt-6.js → index-2e236a04.js} +668 -1392
  139. package/dist/cjs/{index-D7kGM2E_.js → index-48b2a28e.js} +1 -1
  140. package/dist/cjs/{index-BjVGGb_k.js → index-4b70187a.js} +9 -9
  141. package/dist/cjs/{index-3N0K8CTt.js → index-509ca0d3.js} +3 -3
  142. package/dist/cjs/{index-B4SdCKIQ.js → index-e36bd277.js} +2 -2
  143. package/dist/cjs/{index-04WNNW0S.js → index-e630fd95.js} +6 -6
  144. package/dist/cjs/{index-CAvQ7Tka.js → index-ee07ed59.js} +4 -3
  145. package/dist/cjs/index.cjs.js +20 -18
  146. package/dist/cjs/{input-shims-B23RZ_yw.js → input-shims-22a9973f.js} +8 -8
  147. package/dist/cjs/{input.utils-BvrpMdKU.js → input.utils-e82b8ed0.js} +3 -3
  148. package/dist/cjs/ion-accordion_2.cjs.entry.js +25 -54
  149. package/dist/cjs/ion-action-sheet.cjs.entry.js +38 -50
  150. package/dist/cjs/ion-alert.cjs.entry.js +41 -55
  151. package/dist/cjs/ion-app_8.cjs.entry.js +65 -96
  152. package/dist/cjs/ion-avatar_3.cjs.entry.js +16 -8
  153. package/dist/cjs/ion-back-button.cjs.entry.js +18 -15
  154. package/dist/cjs/ion-backdrop.cjs.entry.js +8 -13
  155. package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +34 -38
  156. package/dist/cjs/ion-button_2.cjs.entry.js +30 -33
  157. package/dist/cjs/ion-card_5.cjs.entry.js +35 -32
  158. package/dist/cjs/ion-checkbox.cjs.entry.js +22 -44
  159. package/dist/cjs/ion-chip.cjs.entry.js +10 -11
  160. package/dist/cjs/ion-col_3.cjs.entry.js +34 -8
  161. package/dist/cjs/ion-datetime-button.cjs.entry.js +20 -20
  162. package/dist/cjs/ion-datetime_3.cjs.entry.js +122 -251
  163. package/dist/cjs/ion-fab_3.cjs.entry.js +31 -57
  164. package/dist/cjs/ion-img.cjs.entry.js +11 -4
  165. package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +20 -35
  166. package/dist/cjs/ion-input-password-toggle.cjs.entry.js +15 -11
  167. package/dist/cjs/ion-input.cjs.entry.js +53 -79
  168. package/dist/cjs/ion-item-option_3.cjs.entry.js +28 -32
  169. package/dist/cjs/ion-item_8.cjs.entry.js +52 -49
  170. package/dist/cjs/ion-loading.cjs.entry.js +31 -46
  171. package/dist/cjs/ion-menu_3.cjs.entry.js +39 -62
  172. package/dist/cjs/ion-modal.cjs.entry.js +52 -128
  173. package/dist/cjs/ion-nav_2.cjs.entry.js +22 -17
  174. package/dist/cjs/ion-picker-column-option.cjs.entry.js +11 -22
  175. package/dist/cjs/ion-picker-column.cjs.entry.js +17 -30
  176. package/dist/cjs/ion-picker.cjs.entry.js +8 -4
  177. package/dist/cjs/ion-popover.cjs.entry.js +47 -137
  178. package/dist/cjs/ion-progress-bar.cjs.entry.js +11 -22
  179. package/dist/cjs/ion-radio_2.cjs.entry.js +30 -42
  180. package/dist/cjs/ion-range.cjs.entry.js +33 -71
  181. package/dist/cjs/ion-refresher_2.cjs.entry.js +26 -68
  182. package/dist/cjs/ion-reorder_2.cjs.entry.js +19 -17
  183. package/dist/cjs/ion-ripple-effect.cjs.entry.js +6 -12
  184. package/dist/cjs/ion-route_4.cjs.entry.js +20 -34
  185. package/dist/cjs/ion-searchbar.cjs.entry.js +36 -83
  186. package/dist/cjs/ion-segment-content.cjs.entry.js +5 -2
  187. package/dist/cjs/ion-segment-view.cjs.entry.js +8 -6
  188. package/dist/cjs/ion-segment_2.cjs.entry.js +29 -47
  189. package/dist/cjs/ion-select-modal.cjs.entry.js +20 -13
  190. package/dist/cjs/ion-select_3.cjs.entry.js +65 -82
  191. package/dist/cjs/ion-spinner.cjs.entry.js +11 -8
  192. package/dist/cjs/ion-split-pane.cjs.entry.js +9 -12
  193. package/dist/cjs/ion-tab-bar_2.cjs.entry.js +28 -25
  194. package/dist/cjs/ion-tab_2.cjs.entry.js +14 -8
  195. package/dist/cjs/ion-text.cjs.entry.js +8 -4
  196. package/dist/cjs/ion-textarea.cjs.entry.js +45 -71
  197. package/dist/cjs/ion-toast.cjs.entry.js +44 -65
  198. package/dist/cjs/ion-toggle.cjs.entry.js +34 -63
  199. package/dist/cjs/{ionic-global-D0fKFhpt.js → ionic-global-acb665ad.js} +1 -1
  200. package/dist/cjs/ionic.cjs.js +8 -8
  201. package/dist/cjs/{ios.transition-Cyrk-CkT.js → ios.transition-ae7afca9.js} +7 -7
  202. package/dist/cjs/{keyboard-UuAS4D_9.js → keyboard-0272231f.js} +1 -1
  203. package/dist/cjs/{keyboard-hHzlEQpk.js → keyboard-af1bb365.js} +3 -3
  204. package/dist/cjs/{keyboard-controller-GXBiBRKS.js → keyboard-controller-c05e747a.js} +2 -2
  205. package/dist/cjs/loader.cjs.js +6 -4
  206. package/dist/cjs/{md.transition-Bh2J94f4.js → md.transition-26003e25.js} +7 -7
  207. package/dist/cjs/{notch-controller-DNfj7cO6.js → notch-controller-ae03a497.js} +2 -2
  208. package/dist/cjs/{overlays-hvRku41m.js → overlays-32e1b66b.js} +7 -7
  209. package/dist/cjs/{status-tap-EJ9Sb5hb.js → status-tap-03023755.js} +5 -5
  210. package/dist/cjs/{swipe-back-Di-t3rsI.js → swipe-back-cd0d9f77.js} +4 -4
  211. package/dist/collection/collection-manifest.json +2 -2
  212. package/dist/collection/components/accordion/accordion.js +13 -43
  213. package/dist/collection/components/accordion-group/accordion-group.js +8 -35
  214. package/dist/collection/components/action-sheet/action-sheet.js +31 -84
  215. package/dist/collection/components/alert/alert.js +34 -94
  216. package/dist/collection/components/back-button/back-button.js +14 -30
  217. package/dist/collection/components/backdrop/backdrop.js +3 -18
  218. package/dist/collection/components/badge/badge.js +4 -3
  219. package/dist/collection/components/breadcrumb/breadcrumb.js +26 -57
  220. package/dist/collection/components/breadcrumbs/breadcrumbs.js +10 -24
  221. package/dist/collection/components/button/button.js +33 -74
  222. package/dist/collection/components/buttons/buttons.js +1 -15
  223. package/dist/collection/components/card/card.js +16 -44
  224. package/dist/collection/components/card-header/card-header.js +3 -11
  225. package/dist/collection/components/card-subtitle/card-subtitle.js +4 -3
  226. package/dist/collection/components/card-title/card-title.js +4 -3
  227. package/dist/collection/components/checkbox/checkbox.js +24 -74
  228. package/dist/collection/components/chip/chip.js +4 -15
  229. package/dist/collection/components/col/col.js +50 -72
  230. package/dist/collection/components/content/content.js +9 -43
  231. package/dist/collection/components/datetime/datetime.ios.css +2 -7
  232. package/dist/collection/components/datetime/datetime.js +98 -298
  233. package/dist/collection/components/datetime/datetime.md.css +3 -9
  234. package/dist/collection/components/datetime/utils/data.js +4 -29
  235. package/dist/collection/components/datetime-button/datetime-button.js +11 -21
  236. package/dist/collection/components/fab/fab.js +6 -21
  237. package/dist/collection/components/fab-button/fab-button.js +28 -76
  238. package/dist/collection/components/fab-list/fab-list.js +2 -12
  239. package/dist/collection/components/footer/footer.js +5 -16
  240. package/dist/collection/components/grid/grid.js +1 -6
  241. package/dist/collection/components/header/header.js +4 -15
  242. package/dist/collection/components/img/img.js +6 -6
  243. package/dist/collection/components/infinite-scroll/infinite-scroll.js +7 -35
  244. package/dist/collection/components/infinite-scroll-content/infinite-scroll-content.js +4 -6
  245. package/dist/collection/components/input/input.js +72 -171
  246. package/dist/collection/components/input-password-toggle/input-password-toggle.js +8 -16
  247. package/dist/collection/components/item/item.js +21 -56
  248. package/dist/collection/components/item-divider/item-divider.js +3 -13
  249. package/dist/collection/components/item-option/item-option.js +16 -36
  250. package/dist/collection/components/item-options/item-options.js +1 -7
  251. package/dist/collection/components/item-sliding/item-sliding.js +1 -6
  252. package/dist/collection/components/label/label.js +4 -6
  253. package/dist/collection/components/list/list.js +3 -9
  254. package/dist/collection/components/list-header/list-header.js +6 -6
  255. package/dist/collection/components/loading/loading.js +29 -86
  256. package/dist/collection/components/menu/menu.js +10 -42
  257. package/dist/collection/components/menu-button/menu-button.js +10 -27
  258. package/dist/collection/components/menu-toggle/menu-toggle.js +5 -14
  259. package/dist/collection/components/modal/modal.js +51 -188
  260. package/dist/collection/components/nav/nav.js +11 -24
  261. package/dist/collection/components/nav-link/nav-link.js +8 -18
  262. package/dist/collection/components/note/note.js +4 -3
  263. package/dist/collection/components/picker-column/picker-column.js +10 -34
  264. package/dist/collection/components/picker-column-option/picker-column-option.js +4 -25
  265. package/dist/collection/components/picker-legacy/picker.js +31 -91
  266. package/dist/collection/components/picker-legacy-column/picker-column.js +2 -4
  267. package/dist/collection/components/popover/popover.js +55 -208
  268. package/dist/collection/components/progress-bar/progress-bar.js +6 -31
  269. package/dist/collection/components/radio/radio.js +16 -46
  270. package/dist/collection/components/radio-group/radio-group.js +12 -26
  271. package/dist/collection/components/range/range.js +34 -109
  272. package/dist/collection/components/refresher/refresher.js +6 -68
  273. package/dist/collection/components/refresher-content/refresher-content.js +8 -12
  274. package/dist/collection/components/reorder-group/reorder-group.js +1 -6
  275. package/dist/collection/components/ripple-effect/ripple-effect.js +1 -12
  276. package/dist/collection/components/route/route.js +9 -24
  277. package/dist/collection/components/route-redirect/route-redirect.js +6 -6
  278. package/dist/collection/components/router/router.js +2 -24
  279. package/dist/collection/components/router-link/router-link.js +12 -24
  280. package/dist/collection/components/router-outlet/router-outlet.js +8 -24
  281. package/dist/collection/components/searchbar/searchbar.js +46 -141
  282. package/dist/collection/components/segment/segment.js +13 -38
  283. package/dist/collection/components/segment-button/segment-button.js +11 -32
  284. package/dist/collection/components/segment-view/segment-view.js +2 -6
  285. package/dist/collection/components/select/select.ios.css +5 -3
  286. package/dist/collection/components/select/select.js +55 -121
  287. package/dist/collection/components/select/select.md.css +61 -16
  288. package/dist/collection/components/select-modal/select-modal.js +4 -9
  289. package/dist/collection/components/select-option/select-option.js +3 -9
  290. package/dist/collection/components/select-popover/select-popover.js +8 -18
  291. package/dist/collection/components/skeleton-text/skeleton-text.js +1 -6
  292. package/dist/collection/components/spinner/spinner.js +7 -15
  293. package/dist/collection/components/split-pane/split-pane.js +4 -17
  294. package/dist/collection/components/tab/tab.js +7 -14
  295. package/dist/collection/components/tab-bar/tab-bar.js +5 -14
  296. package/dist/collection/components/tab-button/tab-button.js +16 -32
  297. package/dist/collection/components/tabs/tabs.js +3 -5
  298. package/dist/collection/components/text/text.js +4 -3
  299. package/dist/collection/components/textarea/textarea.js +59 -146
  300. package/dist/collection/components/title/title.js +6 -6
  301. package/dist/collection/components/toast/toast.js +45 -119
  302. package/dist/collection/components/toggle/toggle.js +28 -86
  303. package/dist/collection/components/toolbar/toolbar.js +2 -3
  304. package/dist/docs.d.ts +0 -8
  305. package/dist/docs.json +584 -1823
  306. package/dist/esm/{animation-CCtpQcsN.js → animation-eab5a4ca.js} +1 -1
  307. package/dist/esm/{app-globals-C0a0o4Av.js → app-globals-7b6cbf1a.js} +1 -1
  308. package/dist/esm/{button-active-BQqkZ_sm.js → button-active-90f1dbc4.js} +3 -3
  309. package/dist/esm/{capacitor-CFERIeaU.js → capacitor-59395cbd.js} +1 -1
  310. package/dist/esm/{data-omKWOMer.js → data-174ad5e0.js} +6 -31
  311. package/dist/esm/{framework-delegate-D3CI7y6x.js → framework-delegate-2eea1763.js} +1 -1
  312. package/dist/esm/{gesture-controller-BTEOs1at.js → gesture-controller-314a54f6.js} +1 -1
  313. package/dist/esm/{haptic-DzAMWJuk.js → haptic-ac164e4c.js} +2 -2
  314. package/dist/esm/{hardware-back-button-RMajLSrZ.js → hardware-back-button-864101a3.js} +3 -3
  315. package/dist/esm/{helpers-Di6ciXLG.js → helpers-78efeec3.js} +5 -2
  316. package/dist/esm/{index-CfgBF1SE.js → index-39782642.js} +6 -4
  317. package/dist/esm/{index-B2_fY2up.js → index-40894f4b.js} +2 -2
  318. package/dist/esm/{index-EP3pwcdb.js → index-527b9e34.js} +648 -1392
  319. package/dist/esm/{index-DR2njD_q.js → index-738d7504.js} +2 -2
  320. package/dist/esm/{index-BLV6ykCk.js → index-e2cf2ceb.js} +1 -2
  321. package/dist/esm/{index-CDohRbVJ.js → index-e919e353.js} +3 -3
  322. package/dist/esm/{index-BKfOgUuW.js → index-ecb55b8d.js} +6 -6
  323. package/dist/esm/{index-C7r3mIlB.js → index-f9f5d018.js} +6 -6
  324. package/dist/esm/index.js +18 -18
  325. package/dist/esm/{input-shims-Clcc9pEO.js → input-shims-7dc1f6dc.js} +8 -8
  326. package/dist/esm/{input.utils-BeGXuyDm.js → input.utils-28bf4ef0.js} +3 -3
  327. package/dist/esm/ion-accordion_2.entry.js +23 -54
  328. package/dist/esm/ion-action-sheet.entry.js +36 -50
  329. package/dist/esm/ion-alert.entry.js +39 -55
  330. package/dist/esm/ion-app_8.entry.js +63 -96
  331. package/dist/esm/ion-avatar_3.entry.js +14 -8
  332. package/dist/esm/ion-back-button.entry.js +16 -15
  333. package/dist/esm/ion-backdrop.entry.js +6 -13
  334. package/dist/esm/ion-breadcrumb_2.entry.js +32 -38
  335. package/dist/esm/ion-button_2.entry.js +28 -33
  336. package/dist/esm/ion-card_5.entry.js +33 -32
  337. package/dist/esm/ion-checkbox.entry.js +20 -44
  338. package/dist/esm/ion-chip.entry.js +8 -11
  339. package/dist/esm/ion-col_3.entry.js +32 -8
  340. package/dist/esm/ion-datetime-button.entry.js +18 -20
  341. package/dist/esm/ion-datetime_3.entry.js +120 -251
  342. package/dist/esm/ion-fab_3.entry.js +29 -57
  343. package/dist/esm/ion-img.entry.js +9 -4
  344. package/dist/esm/ion-infinite-scroll_2.entry.js +18 -35
  345. package/dist/esm/ion-input-password-toggle.entry.js +13 -11
  346. package/dist/esm/ion-input.entry.js +51 -79
  347. package/dist/esm/ion-item-option_3.entry.js +26 -32
  348. package/dist/esm/ion-item_8.entry.js +50 -49
  349. package/dist/esm/ion-loading.entry.js +29 -46
  350. package/dist/esm/ion-menu_3.entry.js +37 -62
  351. package/dist/esm/ion-modal.entry.js +50 -128
  352. package/dist/esm/ion-nav_2.entry.js +20 -17
  353. package/dist/esm/ion-picker-column-option.entry.js +9 -22
  354. package/dist/esm/ion-picker-column.entry.js +15 -30
  355. package/dist/esm/ion-picker.entry.js +6 -4
  356. package/dist/esm/ion-popover.entry.js +45 -137
  357. package/dist/esm/ion-progress-bar.entry.js +9 -22
  358. package/dist/esm/ion-radio_2.entry.js +28 -42
  359. package/dist/esm/ion-range.entry.js +31 -71
  360. package/dist/esm/ion-refresher_2.entry.js +24 -68
  361. package/dist/esm/ion-reorder_2.entry.js +17 -17
  362. package/dist/esm/ion-ripple-effect.entry.js +4 -12
  363. package/dist/esm/ion-route_4.entry.js +18 -34
  364. package/dist/esm/ion-searchbar.entry.js +34 -83
  365. package/dist/esm/ion-segment-content.entry.js +3 -2
  366. package/dist/esm/ion-segment-view.entry.js +6 -6
  367. package/dist/esm/ion-segment_2.entry.js +27 -47
  368. package/dist/esm/ion-select-modal.entry.js +18 -13
  369. package/dist/esm/ion-select_3.entry.js +63 -82
  370. package/dist/esm/ion-spinner.entry.js +9 -8
  371. package/dist/esm/ion-split-pane.entry.js +7 -12
  372. package/dist/esm/ion-tab-bar_2.entry.js +26 -25
  373. package/dist/esm/ion-tab_2.entry.js +12 -8
  374. package/dist/esm/ion-text.entry.js +6 -4
  375. package/dist/esm/ion-textarea.entry.js +43 -71
  376. package/dist/esm/ion-toast.entry.js +42 -65
  377. package/dist/esm/ion-toggle.entry.js +32 -63
  378. package/dist/esm/{ionic-global-CrB2BPUW.js → ionic-global-ca86cf32.js} +1 -1
  379. package/dist/esm/ionic.js +6 -7
  380. package/dist/esm/{ios.transition-BObaMu_w.js → ios.transition-7fe5dbea.js} +7 -7
  381. package/dist/esm/{keyboard-ywgs5efA.js → keyboard-52278bd7.js} +3 -3
  382. package/dist/esm/{keyboard-CUw4ekVy.js → keyboard-73175e24.js} +1 -1
  383. package/dist/esm/{keyboard-controller-BaaVITYt.js → keyboard-controller-ec5c2bfa.js} +2 -2
  384. package/dist/esm/loader.js +5 -5
  385. package/dist/esm/{md.transition-BYk9oj5T.js → md.transition-8dc58b46.js} +7 -7
  386. package/dist/esm/{notch-controller-PoOhjO4o.js → notch-controller-00d92e89.js} +2 -2
  387. package/dist/esm/{overlays-DUDTB6a2.js → overlays-41a5d51b.js} +7 -7
  388. package/dist/esm/polyfills/core-js.js +11 -0
  389. package/dist/esm/polyfills/dom.js +79 -0
  390. package/dist/esm/polyfills/es5-html-element.js +1 -0
  391. package/dist/esm/polyfills/index.js +34 -0
  392. package/dist/esm/polyfills/system.js +6 -0
  393. package/dist/esm/{status-tap-Az5SFsVV.js → status-tap-f6d08e9e.js} +5 -5
  394. package/dist/esm/{swipe-back-Df75PJ2J.js → swipe-back-07df2095.js} +4 -4
  395. package/dist/esm-es5/animation-eab5a4ca.js +4 -0
  396. package/dist/esm-es5/app-globals-7b6cbf1a.js +4 -0
  397. package/dist/esm-es5/button-active-90f1dbc4.js +4 -0
  398. package/dist/esm-es5/capacitor-59395cbd.js +4 -0
  399. package/dist/esm-es5/compare-with-utils-a96ff2ea.js +4 -0
  400. package/dist/esm-es5/config-49c88215.js +4 -0
  401. package/dist/esm-es5/cubic-bezier-fe2083dc.js +4 -0
  402. package/dist/esm-es5/data-174ad5e0.js +4 -0
  403. package/dist/esm-es5/dir-babeabeb.js +4 -0
  404. package/dist/esm-es5/focus-visible-dd40d69f.js +4 -0
  405. package/dist/esm-es5/framework-delegate-2eea1763.js +4 -0
  406. package/dist/esm-es5/gesture-controller-314a54f6.js +4 -0
  407. package/dist/esm-es5/haptic-ac164e4c.js +4 -0
  408. package/dist/esm-es5/hardware-back-button-864101a3.js +4 -0
  409. package/dist/esm-es5/helpers-78efeec3.js +4 -0
  410. package/dist/esm-es5/index-39782642.js +4 -0
  411. package/dist/esm-es5/index-40894f4b.js +4 -0
  412. package/dist/esm-es5/index-527b9e34.js +5 -0
  413. package/dist/esm-es5/index-738d7504.js +4 -0
  414. package/dist/esm-es5/index-a5d50daf.js +4 -0
  415. package/dist/esm-es5/index-e2cf2ceb.js +4 -0
  416. package/dist/esm-es5/index-e919e353.js +4 -0
  417. package/dist/esm-es5/index-ecb55b8d.js +4 -0
  418. package/dist/esm-es5/index-f9f5d018.js +4 -0
  419. package/dist/esm-es5/index.js +4 -0
  420. package/dist/esm-es5/input-shims-7dc1f6dc.js +4 -0
  421. package/dist/esm-es5/input.utils-28bf4ef0.js +4 -0
  422. package/dist/esm-es5/ion-accordion_2.entry.js +4 -0
  423. package/dist/esm-es5/ion-action-sheet.entry.js +4 -0
  424. package/dist/esm-es5/ion-alert.entry.js +4 -0
  425. package/dist/esm-es5/ion-app_8.entry.js +4 -0
  426. package/dist/esm-es5/ion-avatar_3.entry.js +4 -0
  427. package/dist/esm-es5/ion-back-button.entry.js +4 -0
  428. package/dist/esm-es5/ion-backdrop.entry.js +4 -0
  429. package/dist/esm-es5/ion-breadcrumb_2.entry.js +4 -0
  430. package/dist/esm-es5/ion-button_2.entry.js +4 -0
  431. package/dist/esm-es5/ion-card_5.entry.js +4 -0
  432. package/dist/esm-es5/ion-checkbox.entry.js +4 -0
  433. package/dist/esm-es5/ion-chip.entry.js +4 -0
  434. package/dist/esm-es5/ion-col_3.entry.js +4 -0
  435. package/dist/esm-es5/ion-datetime-button.entry.js +4 -0
  436. package/dist/esm-es5/ion-datetime_3.entry.js +4 -0
  437. package/dist/esm-es5/ion-fab_3.entry.js +4 -0
  438. package/dist/esm-es5/ion-img.entry.js +4 -0
  439. package/dist/esm-es5/ion-infinite-scroll_2.entry.js +4 -0
  440. package/dist/esm-es5/ion-input-password-toggle.entry.js +4 -0
  441. package/dist/esm-es5/ion-input.entry.js +4 -0
  442. package/dist/esm-es5/ion-item-option_3.entry.js +4 -0
  443. package/dist/esm-es5/ion-item_8.entry.js +4 -0
  444. package/dist/esm-es5/ion-loading.entry.js +4 -0
  445. package/dist/esm-es5/ion-menu_3.entry.js +4 -0
  446. package/dist/esm-es5/ion-modal.entry.js +4 -0
  447. package/dist/esm-es5/ion-nav_2.entry.js +4 -0
  448. package/dist/esm-es5/ion-picker-column-option.entry.js +4 -0
  449. package/dist/esm-es5/ion-picker-column.entry.js +4 -0
  450. package/dist/esm-es5/ion-picker.entry.js +4 -0
  451. package/dist/esm-es5/ion-popover.entry.js +4 -0
  452. package/dist/esm-es5/ion-progress-bar.entry.js +4 -0
  453. package/dist/esm-es5/ion-radio_2.entry.js +4 -0
  454. package/dist/esm-es5/ion-range.entry.js +4 -0
  455. package/dist/esm-es5/ion-refresher_2.entry.js +4 -0
  456. package/dist/esm-es5/ion-reorder_2.entry.js +4 -0
  457. package/dist/esm-es5/ion-ripple-effect.entry.js +4 -0
  458. package/dist/esm-es5/ion-route_4.entry.js +4 -0
  459. package/dist/esm-es5/ion-searchbar.entry.js +4 -0
  460. package/dist/esm-es5/ion-segment-content.entry.js +4 -0
  461. package/dist/esm-es5/ion-segment-view.entry.js +4 -0
  462. package/dist/esm-es5/ion-segment_2.entry.js +4 -0
  463. package/dist/esm-es5/ion-select-modal.entry.js +4 -0
  464. package/dist/esm-es5/ion-select_3.entry.js +4 -0
  465. package/dist/esm-es5/ion-spinner.entry.js +4 -0
  466. package/dist/esm-es5/ion-split-pane.entry.js +4 -0
  467. package/dist/esm-es5/ion-tab-bar_2.entry.js +4 -0
  468. package/dist/esm-es5/ion-tab_2.entry.js +4 -0
  469. package/dist/esm-es5/ion-text.entry.js +4 -0
  470. package/dist/esm-es5/ion-textarea.entry.js +4 -0
  471. package/dist/esm-es5/ion-toast.entry.js +4 -0
  472. package/dist/esm-es5/ion-toggle.entry.js +4 -0
  473. package/dist/esm-es5/ionic-global-ca86cf32.js +4 -0
  474. package/dist/esm-es5/ionic.js +4 -0
  475. package/dist/esm-es5/ios.transition-7fe5dbea.js +4 -0
  476. package/dist/esm-es5/keyboard-52278bd7.js +4 -0
  477. package/dist/esm-es5/keyboard-73175e24.js +4 -0
  478. package/dist/esm-es5/keyboard-controller-ec5c2bfa.js +4 -0
  479. package/dist/esm-es5/loader.js +4 -0
  480. package/dist/esm-es5/lock-controller-316928be.js +4 -0
  481. package/dist/esm-es5/md.transition-8dc58b46.js +4 -0
  482. package/dist/esm-es5/notch-controller-00d92e89.js +4 -0
  483. package/dist/esm-es5/overlays-41a5d51b.js +4 -0
  484. package/dist/esm-es5/spinner-configs-964f7cf3.js +4 -0
  485. package/dist/esm-es5/status-tap-f6d08e9e.js +4 -0
  486. package/dist/esm-es5/swipe-back-07df2095.js +4 -0
  487. package/dist/esm-es5/theme-01f3f29c.js +4 -0
  488. package/dist/esm-es5/watch-options-c2911ace.js +4 -0
  489. package/dist/html.html-data.json +0 -216
  490. package/dist/index.js +1 -1
  491. package/dist/ionic/index.esm.js +1 -1
  492. package/dist/ionic/ionic.esm.js +1 -1
  493. package/dist/ionic/ionic.js +127 -0
  494. package/dist/ionic/p-012c3ceb.system.js +4 -0
  495. package/dist/ionic/p-027a48f1.entry.js +4 -0
  496. package/dist/ionic/p-058b7f35.js +4 -0
  497. package/dist/ionic/p-05b65d7a.entry.js +4 -0
  498. package/dist/ionic/p-08e01816.system.js +4 -0
  499. package/dist/ionic/p-09d185ff.system.js +4 -0
  500. package/dist/ionic/p-0a456b7f.entry.js +4 -0
  501. package/dist/ionic/p-0adb6909.system.entry.js +4 -0
  502. package/dist/ionic/p-0bedc891.system.entry.js +4 -0
  503. package/dist/ionic/p-0c8386d3.entry.js +4 -0
  504. package/dist/ionic/p-0d1be7c9.system.entry.js +4 -0
  505. package/dist/ionic/p-0ec5b7cf.system.js +4 -0
  506. package/dist/ionic/p-14114a59.system.entry.js +4 -0
  507. package/dist/ionic/p-14e041cd.system.entry.js +4 -0
  508. package/dist/ionic/p-15bb1dde.system.js +4 -0
  509. package/dist/ionic/p-180b4f9a.entry.js +4 -0
  510. package/dist/ionic/p-19c32a76.entry.js +4 -0
  511. package/dist/ionic/p-1b0b2210.entry.js +4 -0
  512. package/dist/ionic/p-1bf5ec17.system.js +4 -0
  513. package/dist/ionic/p-1c1d781d.system.entry.js +4 -0
  514. package/dist/ionic/p-1c8b3ac9.entry.js +4 -0
  515. package/dist/ionic/p-1de5dfcd.system.entry.js +4 -0
  516. package/dist/ionic/p-1dfc11b3.system.js +4 -0
  517. package/dist/ionic/p-1e4371bd.js +4 -0
  518. package/dist/ionic/p-1e955a45.system.js +4 -0
  519. package/dist/ionic/p-20d469d0.system.js +4 -0
  520. package/dist/ionic/p-21891ead.js +4 -0
  521. package/dist/ionic/{p-CwbsDRzJ.js → p-22bc235f.js} +1 -1
  522. package/dist/ionic/{p-9cac4dc7.entry.js → p-2567237c.entry.js} +1 -1
  523. package/dist/ionic/{p-D13Eaw-8.js → p-27281edd.js} +1 -1
  524. package/dist/ionic/p-28c81576.entry.js +4 -0
  525. package/dist/ionic/p-29a5b4e4.entry.js +4 -0
  526. package/dist/ionic/p-2a2c6bf4.system.entry.js +4 -0
  527. package/dist/ionic/p-2b7827c7.js +4 -0
  528. package/dist/ionic/p-33518a04.entry.js +4 -0
  529. package/dist/ionic/p-35f14792.entry.js +4 -0
  530. package/dist/ionic/p-383a6058.entry.js +4 -0
  531. package/dist/ionic/p-3855fef7.system.js +4 -0
  532. package/dist/ionic/p-38eaf9cf.system.entry.js +4 -0
  533. package/dist/ionic/p-3ba2a2cd.system.js +4 -0
  534. package/dist/ionic/p-3e1e14d9.system.js +4 -0
  535. package/dist/ionic/{p-C-oNjncL.js → p-3f4327f7.js} +1 -1
  536. package/dist/ionic/p-41e70fa2.entry.js +4 -0
  537. package/dist/ionic/p-44fde7d5.system.entry.js +4 -0
  538. package/dist/ionic/{p-uzIBoXdl.js → p-44ff75ea.js} +1 -1
  539. package/dist/ionic/p-455cd7cc.system.js +4 -0
  540. package/dist/ionic/p-4609d030.system.js +4 -0
  541. package/dist/ionic/p-4630688e.system.entry.js +4 -0
  542. package/dist/ionic/p-4662a25c.system.entry.js +4 -0
  543. package/dist/ionic/p-49d53551.system.entry.js +4 -0
  544. package/dist/ionic/p-4b07c60a.system.js +4 -0
  545. package/dist/ionic/p-4c7e6fec.system.entry.js +4 -0
  546. package/dist/ionic/p-4d5bce60.system.entry.js +4 -0
  547. package/dist/ionic/p-4ea4c73a.system.entry.js +4 -0
  548. package/dist/ionic/p-4eeca839.system.entry.js +4 -0
  549. package/dist/ionic/p-4f255d5a.system.js +4 -0
  550. package/dist/ionic/p-50e0ce13.entry.js +4 -0
  551. package/dist/ionic/p-51479be0.system.entry.js +4 -0
  552. package/dist/ionic/p-5578033e.system.entry.js +4 -0
  553. package/dist/ionic/{p-HRylM0tf.js → p-597ff9af.js} +1 -1
  554. package/dist/ionic/p-5fb1321f.entry.js +4 -0
  555. package/dist/ionic/p-607aa181.entry.js +4 -0
  556. package/dist/ionic/p-61373098.js +4 -0
  557. package/dist/ionic/p-6155027f.system.entry.js +4 -0
  558. package/dist/ionic/p-61e794fb.entry.js +4 -0
  559. package/dist/ionic/{p-RyPJq84W.js → p-624ecf03.js} +1 -1
  560. package/dist/ionic/p-64d8ac48.js +4 -0
  561. package/dist/ionic/p-657ada6a.entry.js +4 -0
  562. package/dist/ionic/p-65943bec.system.entry.js +4 -0
  563. package/dist/ionic/p-65e732b9.entry.js +4 -0
  564. package/dist/ionic/p-66a5d6a8.js +5 -0
  565. package/dist/ionic/p-69a96be9.system.entry.js +4 -0
  566. package/dist/ionic/p-6c044a1d.system.js +4 -0
  567. package/dist/ionic/p-7058a5e4.system.entry.js +4 -0
  568. package/dist/ionic/p-705fda69.system.js +4 -0
  569. package/dist/ionic/p-707408c5.system.entry.js +4 -0
  570. package/dist/ionic/p-70abb1f2.system.entry.js +4 -0
  571. package/dist/ionic/p-747f9517.entry.js +4 -0
  572. package/dist/ionic/{p-DSMkBmnY.js → p-756e4559.js} +1 -1
  573. package/dist/ionic/p-772d1657.system.js +4 -0
  574. package/dist/ionic/p-77aa5fef.system.entry.js +4 -0
  575. package/dist/ionic/p-792919fd.system.js +4 -0
  576. package/dist/ionic/p-7c9daa6f.entry.js +4 -0
  577. package/dist/ionic/p-7cc33a9a.system.js +4 -0
  578. package/dist/ionic/p-7e3b5638.system.entry.js +4 -0
  579. package/dist/ionic/p-7f49a9c4.entry.js +4 -0
  580. package/dist/ionic/p-843ac05d.system.entry.js +4 -0
  581. package/dist/ionic/p-87b0d2c9.entry.js +4 -0
  582. package/dist/ionic/p-8985cdb6.system.js +4 -0
  583. package/dist/ionic/{p-CKvCXMs9.js → p-89b61afc.js} +1 -1
  584. package/dist/ionic/p-8b1c1fd7.entry.js +4 -0
  585. package/dist/ionic/p-8b22be32.system.entry.js +4 -0
  586. package/dist/ionic/p-8d98e2bb.entry.js +4 -0
  587. package/dist/ionic/p-8ededb41.js +4 -0
  588. package/dist/ionic/p-9146695e.system.js +4 -0
  589. package/dist/ionic/p-959cf042.system.entry.js +4 -0
  590. package/dist/ionic/p-96eec056.entry.js +4 -0
  591. package/dist/ionic/p-978bdf4c.system.js +4 -0
  592. package/dist/ionic/p-979d4f5c.system.js +4 -0
  593. package/dist/ionic/p-9870728f.js +4 -0
  594. package/dist/ionic/p-99803283.entry.js +4 -0
  595. package/dist/ionic/p-9af7f110.js +4 -0
  596. package/dist/ionic/{p-7cdee842.entry.js → p-9b069739.entry.js} +1 -1
  597. package/dist/ionic/p-9e45532a.system.js +4 -0
  598. package/dist/ionic/p-a26d7667.system.entry.js +4 -0
  599. package/dist/ionic/p-a3c931ad.system.js +4 -0
  600. package/dist/ionic/p-a4866e3e.system.js +4 -0
  601. package/dist/ionic/p-a520973b.entry.js +4 -0
  602. package/dist/ionic/p-a6625de8.system.js +4 -0
  603. package/dist/ionic/p-a75a9e5a.system.entry.js +4 -0
  604. package/dist/ionic/p-a768ae50.entry.js +4 -0
  605. package/dist/ionic/p-a7830ff8.entry.js +4 -0
  606. package/dist/ionic/p-a9198501.system.entry.js +4 -0
  607. package/dist/ionic/p-a93873de.system.js +4 -0
  608. package/dist/ionic/p-ab7337e1.entry.js +4 -0
  609. package/dist/ionic/p-abe101da.system.js +4 -0
  610. package/dist/ionic/p-ac09b6e9.system.entry.js +4 -0
  611. package/dist/ionic/p-ac58d726.system.entry.js +4 -0
  612. package/dist/ionic/p-b06ac4a5.system.js +4 -0
  613. package/dist/ionic/p-b1673667.entry.js +4 -0
  614. package/dist/ionic/p-b1f9fbe8.system.entry.js +4 -0
  615. package/dist/ionic/p-b2ee0628.system.entry.js +4 -0
  616. package/dist/ionic/{p-f1f6326a.entry.js → p-b87a9f1d.entry.js} +1 -1
  617. package/dist/ionic/p-b8a461f5.system.entry.js +4 -0
  618. package/dist/ionic/{p-mxKP5hf-.js → p-b9fa7882.js} +1 -1
  619. package/dist/ionic/p-ba29521b.entry.js +4 -0
  620. package/dist/ionic/p-bf64af90.system.js +4 -0
  621. package/dist/ionic/{p-189c7fe9.entry.js → p-c005cc37.entry.js} +1 -1
  622. package/dist/ionic/p-c27c57ea.system.entry.js +4 -0
  623. package/dist/ionic/p-c3f9d9fe.js +4 -0
  624. package/dist/ionic/p-c468af8a.system.js +4 -0
  625. package/dist/ionic/p-c53c414d.system.entry.js +4 -0
  626. package/dist/ionic/p-c61cc894.js +4 -0
  627. package/dist/ionic/p-c63d8dc1.js +4 -0
  628. package/dist/ionic/p-c7e16491.js +4 -0
  629. package/dist/ionic/p-ccb740ea.entry.js +4 -0
  630. package/dist/ionic/p-cec54707.system.entry.js +4 -0
  631. package/dist/ionic/p-cfc08422.entry.js +4 -0
  632. package/dist/ionic/p-cff4f96c.entry.js +4 -0
  633. package/dist/ionic/p-d40f2b7a.js +4 -0
  634. package/dist/ionic/p-d70a9e6d.system.js +4 -0
  635. package/dist/ionic/p-d882f1e2.system.entry.js +4 -0
  636. package/dist/ionic/p-d8d84afa.system.js +4 -0
  637. package/dist/ionic/{p-BLV6ykCk.js → p-da2b833b.js} +1 -1
  638. package/dist/ionic/p-dcc0d747.entry.js +4 -0
  639. package/dist/ionic/p-e0b7569c.system.entry.js +4 -0
  640. package/dist/ionic/p-e11ff516.entry.js +4 -0
  641. package/dist/ionic/p-e29c5aab.system.entry.js +4 -0
  642. package/dist/ionic/p-e2ce5f8b.entry.js +4 -0
  643. package/dist/ionic/p-e3284879.system.entry.js +4 -0
  644. package/dist/ionic/p-e3e4eed7.entry.js +4 -0
  645. package/dist/ionic/p-e4683bfd.system.entry.js +4 -0
  646. package/dist/ionic/p-e4d2c281.entry.js +4 -0
  647. package/dist/ionic/p-e65b8460.entry.js +4 -0
  648. package/dist/ionic/p-e673a0a2.system.js +4 -0
  649. package/dist/ionic/p-e6cdfa96.system.entry.js +4 -0
  650. package/dist/ionic/{p-46f82b82.entry.js → p-e8245753.entry.js} +1 -1
  651. package/dist/ionic/p-ece78e7b.js +4 -0
  652. package/dist/ionic/p-ee86cfff.system.js +4 -0
  653. package/dist/ionic/p-f11a9436.system.js +5 -0
  654. package/dist/ionic/p-f201b53a.system.js +4 -0
  655. package/dist/ionic/p-f23124c4.system.js +4 -0
  656. package/dist/ionic/p-f233f1e0.system.js +4 -0
  657. package/dist/ionic/p-f387b3c6.system.entry.js +4 -0
  658. package/dist/ionic/{p-D_2UPtUV.js → p-f53ee2e7.js} +1 -1
  659. package/dist/ionic/p-f5a04e5e.system.entry.js +4 -0
  660. package/dist/ionic/p-f6bb9be7.system.entry.js +4 -0
  661. package/dist/ionic/p-f70fc14a.entry.js +4 -0
  662. package/dist/ionic/{p-Cg19OPuo.js → p-f7ce606e.js} +1 -1
  663. package/dist/ionic/p-f834322a.entry.js +4 -0
  664. package/dist/ionic/p-f896194a.system.entry.js +4 -0
  665. package/dist/ionic/p-fa70eaab.entry.js +4 -0
  666. package/dist/ionic/p-ffa3ba3c.js +4 -0
  667. package/dist/types/components/datetime/datetime-interface.d.ts +0 -1
  668. package/dist/types/components/datetime/datetime.d.ts +0 -6
  669. package/dist/types/components/datetime/utils/data.d.ts +1 -3
  670. package/dist/types/components/datetime/utils/manipulation.d.ts +0 -1
  671. package/dist/types/components/input/input.d.ts +8 -0
  672. package/dist/types/components/select/select.d.ts +9 -0
  673. package/dist/types/components/textarea/textarea.d.ts +8 -0
  674. package/dist/types/components.d.ts +0 -8
  675. package/dist/types/index.d.ts +0 -1
  676. package/dist/types/stencil-public-runtime.d.ts +0 -9
  677. package/hydrate/index.d.ts +5 -40
  678. package/hydrate/index.js +2229 -4687
  679. package/hydrate/index.mjs +2228 -4686
  680. package/loader/cdn.js +2 -1
  681. package/loader/index.cjs.js +2 -1
  682. package/loader/index.es2017.js +1 -0
  683. package/loader/index.js +2 -1
  684. package/loader/package.json +11 -0
  685. package/package.json +2 -2
  686. package/dist/ionic/p-006975c7.entry.js +0 -4
  687. package/dist/ionic/p-00acbe36.entry.js +0 -4
  688. package/dist/ionic/p-03abd858.entry.js +0 -4
  689. package/dist/ionic/p-141822bc.entry.js +0 -4
  690. package/dist/ionic/p-17e8ff6b.entry.js +0 -4
  691. package/dist/ionic/p-18b4709f.entry.js +0 -4
  692. package/dist/ionic/p-1bea6291.entry.js +0 -4
  693. package/dist/ionic/p-1f3d9d38.entry.js +0 -4
  694. package/dist/ionic/p-20b45b04.entry.js +0 -4
  695. package/dist/ionic/p-2959ef70.entry.js +0 -4
  696. package/dist/ionic/p-2b9a91c2.entry.js +0 -4
  697. package/dist/ionic/p-2c58164d.entry.js +0 -4
  698. package/dist/ionic/p-2d142503.entry.js +0 -4
  699. package/dist/ionic/p-3129a2c6.entry.js +0 -4
  700. package/dist/ionic/p-3a5bc7b1.entry.js +0 -4
  701. package/dist/ionic/p-40e55257.entry.js +0 -4
  702. package/dist/ionic/p-45f3c7d9.entry.js +0 -4
  703. package/dist/ionic/p-47ccb59d.entry.js +0 -4
  704. package/dist/ionic/p-4bd5bd61.entry.js +0 -4
  705. package/dist/ionic/p-52043361.entry.js +0 -4
  706. package/dist/ionic/p-527660e0.entry.js +0 -4
  707. package/dist/ionic/p-601f0d27.entry.js +0 -4
  708. package/dist/ionic/p-644759cb.entry.js +0 -4
  709. package/dist/ionic/p-657e9085.entry.js +0 -4
  710. package/dist/ionic/p-67178c9b.entry.js +0 -4
  711. package/dist/ionic/p-67b4c53d.entry.js +0 -4
  712. package/dist/ionic/p-6cab60b7.entry.js +0 -4
  713. package/dist/ionic/p-6ceef433.entry.js +0 -4
  714. package/dist/ionic/p-6d8983d1.entry.js +0 -4
  715. package/dist/ionic/p-79851759.entry.js +0 -4
  716. package/dist/ionic/p-7d026411.entry.js +0 -4
  717. package/dist/ionic/p-7d4b2506.entry.js +0 -4
  718. package/dist/ionic/p-8b6eb546.entry.js +0 -4
  719. package/dist/ionic/p-8fc1959d.entry.js +0 -4
  720. package/dist/ionic/p-9092b7fb.entry.js +0 -4
  721. package/dist/ionic/p-9eeaBrnk.js +0 -4
  722. package/dist/ionic/p-9fe56809.entry.js +0 -4
  723. package/dist/ionic/p-BBmUb2In.js +0 -4
  724. package/dist/ionic/p-C-xl6pej.js +0 -4
  725. package/dist/ionic/p-C5Aon1Kb.js +0 -4
  726. package/dist/ionic/p-CIGNaXM1.js +0 -4
  727. package/dist/ionic/p-Cl0B-RWe.js +0 -4
  728. package/dist/ionic/p-CtWGkNnJ.js +0 -4
  729. package/dist/ionic/p-D0SqsSaH.js +0 -4
  730. package/dist/ionic/p-DCi8BSH3.js +0 -4
  731. package/dist/ionic/p-DFllLYu2.js +0 -4
  732. package/dist/ionic/p-DGw3g412.js +0 -4
  733. package/dist/ionic/p-Di6ciXLG.js +0 -4
  734. package/dist/ionic/p-DonNC93r.js +0 -4
  735. package/dist/ionic/p-EP3pwcdb.js +0 -5
  736. package/dist/ionic/p-Uz6zKimy.js +0 -4
  737. package/dist/ionic/p-a5570370.entry.js +0 -4
  738. package/dist/ionic/p-a5ee3eb8.entry.js +0 -4
  739. package/dist/ionic/p-a92657fc.entry.js +0 -4
  740. package/dist/ionic/p-a9997b1b.entry.js +0 -4
  741. package/dist/ionic/p-b1f3c158.entry.js +0 -4
  742. package/dist/ionic/p-be19e061.entry.js +0 -4
  743. package/dist/ionic/p-c5157026.entry.js +0 -4
  744. package/dist/ionic/p-c6e0f544.entry.js +0 -4
  745. package/dist/ionic/p-e116bb40.entry.js +0 -4
  746. package/dist/ionic/p-e8526b09.entry.js +0 -4
  747. package/dist/ionic/p-umtghMQY.js +0 -4
  748. package/dist/ionic/p-yluxF5qo.js +0 -4
  749. /package/dist/cjs/{compare-with-utils-DSicavqM.js → compare-with-utils-df1001d7.js} +0 -0
  750. /package/dist/cjs/{config-BHiHGeHc.js → config-4f60b98a.js} +0 -0
  751. /package/dist/cjs/{cubic-bezier-DAjy1V-e.js → cubic-bezier-f2dccc53.js} +0 -0
  752. /package/dist/cjs/{dir-Cn0z1rJH.js → dir-94c21456.js} +0 -0
  753. /package/dist/cjs/{focus-visible-CCvKiLh3.js → focus-visible-7a0ce04f.js} +0 -0
  754. /package/dist/cjs/{index-DkNv4J_i.js → index-c8d52405.js} +0 -0
  755. /package/dist/cjs/{lock-controller-aDB9wrEf.js → lock-controller-6585a42a.js} +0 -0
  756. /package/dist/cjs/{spinner-configs-DxHKnd3-.js → spinner-configs-282fd50a.js} +0 -0
  757. /package/dist/cjs/{theme-CeDs6Hcv.js → theme-d1c573d2.js} +0 -0
  758. /package/dist/cjs/{watch-options-CviOsrTS.js → watch-options-f5f3e158.js} +0 -0
  759. /package/dist/esm/{compare-with-utils-sObYyvOy.js → compare-with-utils-a96ff2ea.js} +0 -0
  760. /package/dist/esm/{config-O8NobGs3.js → config-49c88215.js} +0 -0
  761. /package/dist/esm/{cubic-bezier-hHmYLOfE.js → cubic-bezier-fe2083dc.js} +0 -0
  762. /package/dist/esm/{dir-C53feagD.js → dir-babeabeb.js} +0 -0
  763. /package/dist/esm/{focus-visible-BmVRXR1y.js → focus-visible-dd40d69f.js} +0 -0
  764. /package/dist/esm/{index-ZjP4CjeZ.js → index-a5d50daf.js} +0 -0
  765. /package/dist/esm/{lock-controller-B-hirT0v.js → lock-controller-316928be.js} +0 -0
  766. /package/dist/esm/{spinner-configs-D4RIp70E.js → spinner-configs-964f7cf3.js} +0 -0
  767. /package/dist/esm/{theme-DiVJyqlX.js → theme-01f3f29c.js} +0 -0
  768. /package/dist/esm/{watch-options-Dtdm8lKC.js → watch-options-c2911ace.js} +0 -0
  769. /package/dist/ionic/{p-hHmYLOfE.js → p-2408c236.js} +0 -0
  770. /package/dist/ionic/{p-O8NobGs3.js → p-41d5544e.js} +0 -0
  771. /package/dist/ionic/{p-Dtdm8lKC.js → p-459d13d5.js} +0 -0
  772. /package/dist/ionic/{p-DiVJyqlX.js → p-47794def.js} +0 -0
  773. /package/dist/ionic/{p-ZjP4CjeZ.js → p-7b30edcc.js} +0 -0
  774. /package/dist/ionic/{p-BTEOs1at.js → p-9b97df10.js} +0 -0
  775. /package/dist/ionic/{p-B-hirT0v.js → p-ccd02320.js} +0 -0
  776. /package/dist/ionic/{p-BmVRXR1y.js → p-d47265c8.js} +0 -0
  777. /package/dist/ionic/{p-sObYyvOy.js → p-de756e5c.js} +0 -0
  778. /package/dist/ionic/{p-D4RIp70E.js → p-f0c2a614.js} +0 -0
  779. /package/dist/ionic/{p-C53feagD.js → p-fb813dab.js} +0 -0
@@ -3,11 +3,31 @@
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
+
6
26
  const NAMESPACE = 'ionic';
7
- const BUILD = /* ionic */ { experimentalSlotFixes: true, hydratedSelectorName: "hydrated", lazyLoad: true, shadowDom: true, slotRelocation: true, updatable: true};
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 };
8
28
 
9
29
  /*
10
- Stencil Client Platform v4.29.3 | MIT Licensed | https://stenciljs.com
30
+ Stencil Client Platform v4.20.0 | MIT Licensed | https://stenciljs.com
11
31
  */
12
32
  var __defProp = Object.defineProperty;
13
33
  var __export = (target, all) => {
@@ -15,47 +35,14 @@ var __export = (target, all) => {
15
35
  __defProp(target, name, { get: all[name], enumerable: true });
16
36
  };
17
37
  var Build = {
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
- };
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);
59
46
  var registerHost = (hostElement, cmpMeta) => {
60
47
  const hostRef = {
61
48
  $flags$: 0,
@@ -71,9 +58,7 @@ var registerHost = (hostElement, cmpMeta) => {
71
58
  hostElement["s-p"] = [];
72
59
  hostElement["s-rc"] = [];
73
60
  }
74
- const ref = hostRef;
75
- hostElement.__stencil__getHostRef = () => ref;
76
- return ref;
61
+ return hostRefs.set(hostElement, hostRef);
77
62
  };
78
63
  var isMemberInElement = (elm, memberName) => memberName in elm;
79
64
  var consoleError = (e, el) => (0, console.error)(e, el);
@@ -91,23 +76,18 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
91
76
  return module[exportName];
92
77
  }
93
78
  /*!__STENCIL_STATIC_IMPORT_SWITCH__*/
94
- return import(
79
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
95
80
  /* @vite-ignore */
96
81
  /* webpackInclude: /\.entry\.js$/ */
97
82
  /* webpackExclude: /\.system\.entry\.js$/ */
98
83
  /* webpackMode: "lazy" */
99
84
  `./${bundleId}.entry.js${""}`
100
- ).then(
101
- (importedModule) => {
102
- {
103
- cmpModules.set(bundleId, importedModule);
104
- }
105
- return importedModule[exportName];
106
- },
107
- (e) => {
108
- consoleError(e, hostRef.$hostElement$);
85
+ )); }).then((importedModule) => {
86
+ {
87
+ cmpModules.set(bundleId, importedModule);
109
88
  }
110
- );
89
+ return importedModule[exportName];
90
+ }, consoleError);
111
91
  };
112
92
 
113
93
  // src/client/client-style.ts
@@ -119,7 +99,6 @@ var CONTENT_REF_ID = "r";
119
99
  var ORG_LOCATION_ID = "o";
120
100
  var SLOT_NODE_ID = "s";
121
101
  var TEXT_NODE_ID = "t";
122
- var COMMENT_NODE_ID = "c";
123
102
  var HYDRATE_ID = "s-id";
124
103
  var HYDRATED_STYLE_ID = "sty-id";
125
104
  var HYDRATE_CHILD_ID = "c-id";
@@ -127,6 +106,7 @@ var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
127
106
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
128
107
  var XLINK_NS = "http://www.w3.org/1999/xlink";
129
108
  var win = typeof window !== "undefined" ? window : {};
109
+ var doc = win.document || { head: {} };
130
110
  var H = win.HTMLElement || class {
131
111
  };
132
112
  var plt = {
@@ -140,10 +120,9 @@ var plt = {
140
120
  };
141
121
  var supportsShadow = BUILD.shadowDom;
142
122
  var supportsListenerOptions = /* @__PURE__ */ (() => {
143
- var _a;
144
123
  let supportsListenerOptions2 = false;
145
124
  try {
146
- (_a = win.document) == null ? void 0 : _a.addEventListener(
125
+ doc.addEventListener(
147
126
  "e",
148
127
  null,
149
128
  Object.defineProperty({}, "passive", {
@@ -208,119 +187,24 @@ var getAssetPath = (path) => {
208
187
  return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
209
188
  };
210
189
 
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
+
211
195
  // src/utils/helpers.ts
212
- var isDef = (v) => v != null && v !== void 0;
196
+ var isDef = (v) => v != null;
213
197
  var isComplexType = (o) => {
214
198
  o = typeof o;
215
199
  return o === "object" || o === "function";
216
200
  };
217
201
 
218
202
  // src/utils/query-nonce-meta-tag-content.ts
219
- function queryNonceMetaTagContent(doc) {
203
+ function queryNonceMetaTagContent(doc2) {
220
204
  var _a, _b, _c;
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;
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;
222
206
  }
223
207
 
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
-
324
208
  // src/utils/result.ts
325
209
  var result_exports = {};
326
210
  __export(result_exports, {
@@ -369,527 +253,6 @@ var unwrapErr = (result) => {
369
253
  throw result.value;
370
254
  }
371
255
  };
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
- }
893
256
  var createTime = (fnName, tagName = "") => {
894
257
  {
895
258
  return () => {
@@ -1018,166 +381,54 @@ var convertToPrivate = (node) => {
1018
381
 
1019
382
  // src/runtime/client-hydrate.ts
1020
383
  var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1021
- var _a;
1022
384
  const endHydrate = createTime("hydrateClient", tagName);
1023
385
  const shadowRoot = hostElm.shadowRoot;
1024
386
  const childRenderNodes = [];
1025
387
  const slotNodes = [];
1026
- const slottedNodes = [];
1027
388
  const shadowRootNodes = shadowRoot ? [] : null;
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());
389
+ const vnode = hostRef.$vnode$ = newVNode(tagName, null);
390
+ if (!plt.$orgLocNodes$) {
391
+ initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
1055
392
  }
1056
393
  hostElm[HYDRATE_ID] = hostId;
1057
394
  hostElm.removeAttribute(HYDRATE_ID);
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$;
395
+ clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
396
+ childRenderNodes.map((c) => {
397
+ const orgLocationId = c.$hostId$ + "." + c.$nodeId$;
1074
398
  const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
1075
- const node = childRenderNode.$elm$;
1076
- if (!shadowRoot) {
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
- }
399
+ const node = c.$elm$;
400
+ if (orgLocationNode && supportsShadow && orgLocationNode["s-en"] === "") {
401
+ orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
1094
402
  }
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$);
403
+ if (!shadowRoot) {
404
+ node["s-hn"] = tagName;
405
+ if (orgLocationNode) {
406
+ node["s-ol"] = orgLocationNode;
407
+ node["s-ol"]["s-nr"] = node;
1102
408
  }
1103
409
  }
1104
410
  plt.$orgLocNodes$.delete(orgLocationId);
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);
411
+ });
412
+ if (shadowRoot) {
413
+ shadowRootNodes.map((shadowRootNode) => {
414
+ if (shadowRootNode) {
415
+ shadowRoot.appendChild(shadowRootNode);
1139
416
  }
1140
- }
1141
- }
1142
- if (scopeId2 && slotNodes.length) {
1143
- slotNodes.forEach((slot) => {
1144
- slot.$elm$.parentElement.classList.add(scopeId2 + "-s");
1145
417
  });
1146
418
  }
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;
1167
419
  endHydrate();
1168
420
  };
1169
- var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
421
+ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
1170
422
  let childNodeType;
1171
423
  let childIdSplt;
1172
424
  let childVNode;
1173
425
  let i2;
1174
- const scopeId2 = hostElm["s-sc"];
1175
426
  if (node.nodeType === 1 /* ElementNode */) {
1176
427
  childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
1177
428
  if (childNodeType) {
1178
429
  childIdSplt = childNodeType.split(".");
1179
430
  if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
1180
- childVNode = createSimpleVNode({
431
+ childVNode = {
1181
432
  $flags$: 0,
1182
433
  $hostId$: childIdSplt[0],
1183
434
  $nodeId$: childIdSplt[1],
@@ -1185,43 +436,18 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1185
436
  $index$: childIdSplt[3],
1186
437
  $tag$: node.tagName.toLowerCase(),
1187
438
  $elm$: node,
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
- });
439
+ $attrs$: null,
440
+ $children$: null,
441
+ $key$: null,
442
+ $name$: null,
443
+ $text$: null
444
+ };
1192
445
  childRenderNodes.push(childVNode);
1193
446
  node.removeAttribute(HYDRATE_CHILD_ID);
1194
447
  if (!parentVNode.$children$) {
1195
448
  parentVNode.$children$ = [];
1196
449
  }
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
- }
450
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1225
451
  parentVNode = childVNode;
1226
452
  if (shadowRootNodes && childVNode.$depth$ === "0") {
1227
453
  shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
@@ -1237,33 +463,31 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1237
463
  shadowRootNodes,
1238
464
  hostElm,
1239
465
  node.shadowRoot.childNodes[i2],
1240
- hostId,
1241
- slottedNodes
466
+ hostId
1242
467
  );
1243
468
  }
1244
469
  }
1245
- const nonShadowNodes = node.__childNodes || node.childNodes;
1246
- for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
470
+ for (i2 = node.childNodes.length - 1; i2 >= 0; i2--) {
1247
471
  clientHydrate(
1248
472
  parentVNode,
1249
473
  childRenderNodes,
1250
474
  slotNodes,
1251
475
  shadowRootNodes,
1252
476
  hostElm,
1253
- nonShadowNodes[i2],
1254
- hostId,
1255
- slottedNodes
477
+ node.childNodes[i2],
478
+ hostId
1256
479
  );
1257
480
  }
1258
481
  } else if (node.nodeType === 8 /* CommentNode */) {
1259
482
  childIdSplt = node.nodeValue.split(".");
1260
483
  if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
1261
484
  childNodeType = childIdSplt[0];
1262
- childVNode = createSimpleVNode({
485
+ childVNode = {
486
+ $flags$: 0,
1263
487
  $hostId$: childIdSplt[1],
1264
488
  $nodeId$: childIdSplt[2],
1265
489
  $depth$: childIdSplt[3],
1266
- $index$: childIdSplt[4] || "0",
490
+ $index$: childIdSplt[4],
1267
491
  $elm$: node,
1268
492
  $attrs$: null,
1269
493
  $children$: null,
@@ -1271,43 +495,46 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1271
495
  $name$: null,
1272
496
  $tag$: null,
1273
497
  $text$: null
1274
- });
498
+ };
1275
499
  if (childNodeType === TEXT_NODE_ID) {
1276
- childVNode.$elm$ = findCorrespondingNode(node, 3 /* TextNode */);
500
+ childVNode.$elm$ = node.nextSibling;
1277
501
  if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
1278
502
  childVNode.$text$ = childVNode.$elm$.textContent;
1279
503
  childRenderNodes.push(childVNode);
1280
504
  node.remove();
1281
- if (hostId === childVNode.$hostId$) {
1282
- if (!parentVNode.$children$) {
1283
- parentVNode.$children$ = [];
1284
- }
1285
- parentVNode.$children$[childVNode.$index$] = childVNode;
505
+ if (!parentVNode.$children$) {
506
+ parentVNode.$children$ = [];
1286
507
  }
508
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1287
509
  if (shadowRootNodes && childVNode.$depth$ === "0") {
1288
510
  shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1289
511
  }
1290
512
  }
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
- }
1297
513
  } else if (childVNode.$hostId$ === hostId) {
1298
514
  if (childNodeType === SLOT_NODE_ID) {
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
- );
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;
1311
538
  } else if (childNodeType === CONTENT_REF_ID) {
1312
539
  if (shadowRootNodes) {
1313
540
  node.remove();
@@ -1323,28 +550,18 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1323
550
  vnode.$elm$ = node;
1324
551
  vnode.$index$ = "0";
1325
552
  parentVNode.$children$ = [vnode];
1326
- } else {
1327
- if (node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
1328
- node.remove();
1329
- }
1330
553
  }
1331
- return parentVNode;
1332
554
  };
1333
555
  var initializeDocumentHydrate = (node, orgLocNodes) => {
1334
556
  if (node.nodeType === 1 /* ElementNode */) {
1335
- const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
1336
- if (componentId) {
1337
- orgLocNodes.set(componentId, node);
1338
- }
1339
557
  let i2 = 0;
1340
558
  if (node.shadowRoot) {
1341
559
  for (; i2 < node.shadowRoot.childNodes.length; i2++) {
1342
560
  initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
1343
561
  }
1344
562
  }
1345
- const nonShadowNodes = node.__childNodes || node.childNodes;
1346
- for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
1347
- initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
563
+ for (i2 = 0; i2 < node.childNodes.length; i2++) {
564
+ initializeDocumentHydrate(node.childNodes[i2], orgLocNodes);
1348
565
  }
1349
566
  } else if (node.nodeType === 8 /* CommentNode */) {
1350
567
  const childIdSplt = node.nodeValue.split(".");
@@ -1355,110 +572,18 @@ var initializeDocumentHydrate = (node, orgLocNodes) => {
1355
572
  }
1356
573
  }
1357
574
  };
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");
1439
575
 
1440
576
  // src/runtime/mode.ts
1441
577
  var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
1442
578
  var setMode = (handler) => modeResolutionChain.push(handler);
1443
579
  var getMode = (ref) => getHostRef(ref).$modeName$;
1444
580
  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
- }
1456
581
  if (propValue != null && !isComplexType(propValue)) {
1457
582
  if (propType & 4 /* Boolean */) {
1458
583
  return propValue === "false" ? false : propValue === "" || !!propValue;
1459
584
  }
1460
585
  if (propType & 2 /* Number */) {
1461
- return typeof propValue === "string" ? parseFloat(propValue) : typeof propValue === "number" ? propValue : NaN;
586
+ return parseFloat(propValue);
1462
587
  }
1463
588
  if (propType & 1 /* String */) {
1464
589
  return String(propValue);
@@ -1507,10 +632,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
1507
632
  var _a;
1508
633
  const scopeId2 = getScopeId(cmpMeta, mode);
1509
634
  const style = styles.get(scopeId2);
1510
- if (!win.document) {
1511
- return scopeId2;
1512
- }
1513
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
635
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
1514
636
  if (style) {
1515
637
  if (typeof style === "string") {
1516
638
  styleContainerNode = styleContainerNode.head || styleContainerNode;
@@ -1523,39 +645,23 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
1523
645
  if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
1524
646
  styleElm.innerHTML = style;
1525
647
  } else {
1526
- styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || win.document.createElement("style");
648
+ styleElm = doc.createElement("style");
1527
649
  styleElm.innerHTML = style;
1528
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
650
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
1529
651
  if (nonce != null) {
1530
652
  styleElm.setAttribute("nonce", nonce);
1531
653
  }
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);
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"));
1559
665
  }
1560
666
  }
1561
667
  if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
@@ -1581,177 +687,131 @@ var attachStyles = (hostRef) => {
1581
687
  cmpMeta,
1582
688
  hostRef.$modeName$
1583
689
  );
1584
- if (flags & 10 /* needsScopedEncapsulation */) {
690
+ if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
1585
691
  elm["s-sc"] = scopeId2;
1586
692
  elm.classList.add(scopeId2 + "-h");
693
+ if (flags & 2 /* scopedCssEncapsulation */) {
694
+ elm.classList.add(scopeId2 + "-s");
695
+ }
1587
696
  }
1588
697
  endAttachStyles();
1589
698
  };
1590
699
  var getScopeId = (cmp, mode) => "sc-" + (mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
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 {
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);
1620
708
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
1621
709
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
1622
- }
1623
- } else if (memberName === "style") {
1624
- {
1625
- for (const prop in oldValue) {
1626
- if (!newValue || newValue[prop] == null) {
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]) {
1627
724
  if (prop.includes("-")) {
1628
- elm.style.removeProperty(prop);
725
+ elm.style.setProperty(prop, newValue[prop]);
1629
726
  } else {
1630
- elm.style[prop] = "";
727
+ elm.style[prop] = newValue[prop];
1631
728
  }
1632
729
  }
1633
730
  }
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];
1641
- }
731
+ } else if (memberName === "key") ; else if (memberName === "ref") {
732
+ if (newValue) {
733
+ newValue(elm);
1642
734
  }
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);
1653
- } else {
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);
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);
1661
742
  }
1662
- if (newValue) {
1663
- plt.ael(elm, memberName, newValue, capture);
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);
751
+ }
1664
752
  }
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") {
753
+ } 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) {
1676
762
  elm[memberName] = n;
1677
- } else {
1678
- elm.setAttribute(memberName, n);
1679
763
  }
764
+ } else {
765
+ elm[memberName] = newValue;
1680
766
  }
1681
- } else if (elm[memberName] !== newValue) {
1682
- elm[memberName] = newValue;
767
+ } catch (e) {
1683
768
  }
1684
- } catch (e) {
1685
769
  }
1686
- }
1687
- let xlink = false;
1688
- {
1689
- if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
1690
- memberName = ln;
1691
- xlink = true;
770
+ let xlink = false;
771
+ {
772
+ if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
773
+ memberName = ln;
774
+ xlink = true;
775
+ }
1692
776
  }
1693
- }
1694
- if (newValue == null || newValue === false) {
1695
- if (newValue !== false || elm.getAttribute(memberName) === "") {
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;
1696
787
  if (xlink) {
1697
- elm.removeAttributeNS(XLINK_NS, memberName);
788
+ elm.setAttributeNS(XLINK_NS, memberName, newValue);
1698
789
  } else {
1699
- elm.removeAttribute(memberName);
790
+ elm.setAttribute(memberName, newValue);
1700
791
  }
1701
792
  }
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
- }
1709
793
  }
1710
794
  }
1711
795
  };
1712
796
  var parseClassListRegex = /\s/;
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
- };
797
+ var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
1722
798
  var CAPTURE_EVENT_SUFFIX = "Capture";
1723
799
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
1724
800
 
1725
801
  // src/runtime/vdom/update-element.ts
1726
- var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
802
+ var updateElement = (oldVnode, newVnode, isSvgMode2) => {
1727
803
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
1728
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
1729
- const newVnodeAttrs = newVnode.$attrs$ || {};
804
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
805
+ const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
1730
806
  {
1731
807
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
1732
808
  if (!(memberName in newVnodeAttrs)) {
1733
- setAccessor(
1734
- elm,
1735
- memberName,
1736
- oldVnodeAttrs[memberName],
1737
- void 0,
1738
- isSvgMode2,
1739
- newVnode.$flags$,
1740
- isInitialRender
1741
- );
809
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
1742
810
  }
1743
811
  }
1744
812
  }
1745
813
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
1746
- setAccessor(
1747
- elm,
1748
- memberName,
1749
- oldVnodeAttrs[memberName],
1750
- newVnodeAttrs[memberName],
1751
- isSvgMode2,
1752
- newVnode.$flags$,
1753
- isInitialRender
1754
- );
814
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
1755
815
  }
1756
816
  };
1757
817
  function sortedAttrNames(attrNames) {
@@ -1772,7 +832,7 @@ var useNativeShadowDom = false;
1772
832
  var checkSlotFallbackVisibility = false;
1773
833
  var checkSlotRelocate = false;
1774
834
  var isSvgMode = false;
1775
- var createElm = (oldParentVNode, newParentVNode, childIndex) => {
835
+ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
1776
836
  var _a;
1777
837
  const newVNode2 = newParentVNode.$children$[childIndex];
1778
838
  let i2 = 0;
@@ -1782,6 +842,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
1782
842
  if (!useNativeShadowDom) {
1783
843
  checkSlotRelocate = true;
1784
844
  if (newVNode2.$tag$ === "slot") {
845
+ if (scopeId) {
846
+ parentElm.classList.add(scopeId + "-s");
847
+ }
1785
848
  newVNode2.$flags$ |= newVNode2.$children$ ? (
1786
849
  // slot element has fallback content
1787
850
  // still create an element that "mocks" the slot element
@@ -1795,22 +858,14 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
1795
858
  }
1796
859
  }
1797
860
  if (newVNode2.$text$ !== null) {
1798
- elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
861
+ elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
1799
862
  } else if (newVNode2.$flags$ & 1 /* isSlotReference */) {
1800
- elm = newVNode2.$elm$ = win.document.createTextNode("");
1801
- {
1802
- updateElement(null, newVNode2, isSvgMode);
1803
- }
863
+ elm = newVNode2.$elm$ = doc.createTextNode("");
1804
864
  } else {
1805
865
  if (!isSvgMode) {
1806
866
  isSvgMode = newVNode2.$tag$ === "svg";
1807
867
  }
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(
868
+ elm = newVNode2.$elm$ = doc.createElementNS(
1814
869
  isSvgMode ? SVG_NS : HTML_NS,
1815
870
  !useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
1816
871
  ) ;
@@ -1820,12 +875,17 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
1820
875
  {
1821
876
  updateElement(null, newVNode2, isSvgMode);
1822
877
  }
1823
- if (isDef(scopeId) && elm["s-si"] !== scopeId) {
878
+ const rootNode = elm.getRootNode();
879
+ const isElementWithinShadowRoot = !rootNode.querySelector("body");
880
+ if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
1824
881
  elm.classList.add(elm["s-si"] = scopeId);
1825
882
  }
883
+ {
884
+ updateElementScopeIds(elm, parentElm);
885
+ }
1826
886
  if (newVNode2.$children$) {
1827
887
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
1828
- childNode = createElm(oldParentVNode, newVNode2, i2);
888
+ childNode = createElm(oldParentVNode, newVNode2, i2, elm);
1829
889
  if (childNode) {
1830
890
  elm.appendChild(childNode);
1831
891
  }
@@ -1846,16 +906,12 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
1846
906
  elm["s-cr"] = contentRef;
1847
907
  elm["s-sn"] = newVNode2.$name$ || "";
1848
908
  elm["s-rf"] = (_a = newVNode2.$attrs$) == null ? void 0 : _a.ref;
1849
- patchSlotNode(elm);
1850
909
  oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
1851
910
  if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
1852
911
  {
1853
912
  relocateToHostRoot(oldParentVNode.$elm$);
1854
913
  }
1855
914
  }
1856
- {
1857
- addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
1858
- }
1859
915
  }
1860
916
  }
1861
917
  return elm;
@@ -1864,12 +920,8 @@ var relocateToHostRoot = (parentElm) => {
1864
920
  plt.$flags$ |= 1 /* isTmpDisconnected */;
1865
921
  const host = parentElm.closest(hostTagName.toLowerCase());
1866
922
  if (host != null) {
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
- );
923
+ const contentRefNode = Array.from(host.childNodes).find((ref) => ref["s-cr"]);
924
+ const childNodeArray = Array.from(parentElm.childNodes);
1873
925
  for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
1874
926
  if (childNode["s-sh"] != null) {
1875
927
  insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
@@ -1878,11 +930,11 @@ var relocateToHostRoot = (parentElm) => {
1878
930
  }
1879
931
  }
1880
932
  }
1881
- plt.$flags$ &= -2 /* isTmpDisconnected */;
933
+ plt.$flags$ &= ~1 /* isTmpDisconnected */;
1882
934
  };
1883
935
  var putBackInOriginalLocation = (parentElm, recursive) => {
1884
936
  plt.$flags$ |= 1 /* isTmpDisconnected */;
1885
- const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
937
+ const oldSlotChildNodes = Array.from(parentElm.childNodes);
1886
938
  if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
1887
939
  let node = parentElm;
1888
940
  while (node = node.nextSibling) {
@@ -1894,7 +946,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
1894
946
  for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
1895
947
  const childNode = oldSlotChildNodes[i2];
1896
948
  if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
1897
- insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
949
+ insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
1898
950
  childNode["s-ol"].remove();
1899
951
  childNode["s-ol"] = void 0;
1900
952
  childNode["s-sh"] = void 0;
@@ -1904,7 +956,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
1904
956
  putBackInOriginalLocation(childNode, recursive);
1905
957
  }
1906
958
  }
1907
- plt.$flags$ &= -2 /* isTmpDisconnected */;
959
+ plt.$flags$ &= ~1 /* isTmpDisconnected */;
1908
960
  };
1909
961
  var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
1910
962
  let containerElm = parentElm["s-cr"] && parentElm["s-cr"].parentNode || parentElm;
@@ -1914,7 +966,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
1914
966
  }
1915
967
  for (; startIdx <= endIdx; ++startIdx) {
1916
968
  if (vnodes[startIdx]) {
1917
- childNode = createElm(null, parentVNode, startIdx);
969
+ childNode = createElm(null, parentVNode, startIdx, parentElm);
1918
970
  if (childNode) {
1919
971
  vnodes[startIdx].$elm$ = childNode;
1920
972
  insertBefore(containerElm, childNode, referenceNode(before) );
@@ -2001,7 +1053,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
2001
1053
  if (idxInOld >= 0) {
2002
1054
  elmToMove = oldCh[idxInOld];
2003
1055
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
2004
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
1056
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
2005
1057
  } else {
2006
1058
  patch(elmToMove, newStartVnode, isInitialRender);
2007
1059
  oldCh[idxInOld] = void 0;
@@ -2009,16 +1061,12 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
2009
1061
  }
2010
1062
  newStartVnode = newCh[++newStartIdx];
2011
1063
  } else {
2012
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
1064
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
2013
1065
  newStartVnode = newCh[++newStartIdx];
2014
1066
  }
2015
1067
  if (node) {
2016
1068
  {
2017
- insertBefore(
2018
- referenceNode(oldStartVnode.$elm$).parentNode,
2019
- node,
2020
- referenceNode(oldStartVnode.$elm$)
2021
- );
1069
+ insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
2022
1070
  }
2023
1071
  }
2024
1072
  }
@@ -2039,19 +1087,28 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
2039
1087
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
2040
1088
  if (leftVNode.$tag$ === rightVNode.$tag$) {
2041
1089
  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
+ }
2042
1099
  return leftVNode.$name$ === rightVNode.$name$;
2043
1100
  }
2044
1101
  if (!isInitialRender) {
2045
1102
  return leftVNode.$key$ === rightVNode.$key$;
2046
1103
  }
2047
- if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
2048
- leftVNode.$key$ = rightVNode.$key$;
2049
- }
2050
1104
  return true;
2051
1105
  }
2052
1106
  return false;
2053
1107
  };
2054
- var referenceNode = (node) => node && node["s-ol"] || node;
1108
+ var referenceNode = (node) => {
1109
+ return node && node["s-ol"] || node;
1110
+ };
1111
+ var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
2055
1112
  var patch = (oldVNode, newVNode2, isInitialRender = false) => {
2056
1113
  const elm = newVNode2.$elm$ = oldVNode.$elm$;
2057
1114
  const oldChildren = oldVNode.$children$;
@@ -2069,8 +1126,9 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
2069
1126
  newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
2070
1127
  relocateToHostRoot(newVNode2.$elm$.parentElement);
2071
1128
  }
1129
+ } else {
1130
+ updateElement(oldVNode, newVNode2, isSvgMode);
2072
1131
  }
2073
- updateElement(oldVNode, newVNode2, isSvgMode, isInitialRender);
2074
1132
  }
2075
1133
  if (oldChildren !== null && newChildren !== null) {
2076
1134
  updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
@@ -2094,15 +1152,41 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
2094
1152
  elm.data = text;
2095
1153
  }
2096
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
+ }
1180
+ }
1181
+ };
2097
1182
  var relocateNodes = [];
2098
1183
  var markSlotContentForRelocation = (elm) => {
2099
1184
  let node;
2100
1185
  let hostContentNodes;
2101
1186
  let j;
2102
- const children = elm.__childNodes || elm.childNodes;
2103
- for (const childNode of children) {
1187
+ for (const childNode of elm.childNodes) {
2104
1188
  if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
2105
- hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
1189
+ hostContentNodes = node.parentNode.childNodes;
2106
1190
  const slotName = childNode["s-sn"];
2107
1191
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
2108
1192
  node = hostContentNodes[j];
@@ -2144,6 +1228,21 @@ var markSlotContentForRelocation = (elm) => {
2144
1228
  }
2145
1229
  }
2146
1230
  };
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
+ };
2147
1246
  var nullifyVNodeRefs = (vNode) => {
2148
1247
  {
2149
1248
  vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
@@ -2151,51 +1250,44 @@ var nullifyVNodeRefs = (vNode) => {
2151
1250
  }
2152
1251
  };
2153
1252
  var insertBefore = (parent, newNode, reference) => {
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);
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
+ );
2169
1268
  }
1269
+ return scopeIds;
2170
1270
  };
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;
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);
2185
1280
  }
2186
- child = child.nextSibling;
2187
1281
  }
2188
- if (!found) oldParent.classList.remove(scopeId2 + "-s");
2189
1282
  }
2190
1283
  }
2191
- }
1284
+ };
2192
1285
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
2193
1286
  var _a, _b, _c, _d, _e;
2194
1287
  const hostElm = hostRef.$hostElement$;
2195
1288
  const cmpMeta = hostRef.$cmpMeta$;
2196
1289
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
2197
- const isHostElement = isHost(renderFnResults);
2198
- const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
1290
+ const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
2199
1291
  hostTagName = hostElm.tagName;
2200
1292
  if (cmpMeta.$attrsToReflect$) {
2201
1293
  rootVnode.$attrs$ = rootVnode.$attrs$ || {};
@@ -2217,7 +1309,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
2217
1309
  {
2218
1310
  scopeId = hostElm["s-sc"];
2219
1311
  }
2220
- useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
1312
+ useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
2221
1313
  {
2222
1314
  contentRef = hostElm["s-cr"];
2223
1315
  checkSlotFallbackVisibility = false;
@@ -2229,8 +1321,8 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
2229
1321
  markSlotContentForRelocation(rootVnode.$elm$);
2230
1322
  for (const relocateData of relocateNodes) {
2231
1323
  const nodeToRelocate = relocateData.$nodeToRelocate$;
2232
- if (!nodeToRelocate["s-ol"] && win.document) {
2233
- const orgLocationNode = win.document.createTextNode("");
1324
+ if (!nodeToRelocate["s-ol"]) {
1325
+ const orgLocationNode = doc.createTextNode("");
2234
1326
  orgLocationNode["s-nr"] = nodeToRelocate;
2235
1327
  insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
2236
1328
  }
@@ -2241,11 +1333,11 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
2241
1333
  if (slotRefNode) {
2242
1334
  const parentNodeRef = slotRefNode.parentNode;
2243
1335
  let insertBeforeNode = slotRefNode.nextSibling;
2244
- if ((insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */)) {
1336
+ if (insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
2245
1337
  let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
2246
1338
  while (orgLocationNode) {
2247
1339
  let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
2248
- if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
1340
+ if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
2249
1341
  refNode = refNode.nextSibling;
2250
1342
  while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
2251
1343
  refNode = refNode == null ? void 0 : refNode.nextSibling;
@@ -2258,17 +1350,15 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
2258
1350
  orgLocationNode = orgLocationNode.previousSibling;
2259
1351
  }
2260
1352
  }
2261
- const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
2262
- const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
2263
- if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
1353
+ if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
2264
1354
  if (nodeToRelocate !== insertBeforeNode) {
2265
1355
  insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
2266
- if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
1356
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
2267
1357
  nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
2268
1358
  }
2269
1359
  }
2270
1360
  }
2271
- nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](slotRefNode);
1361
+ nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](nodeToRelocate);
2272
1362
  } else {
2273
1363
  if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
2274
1364
  if (isInitialLoad) {
@@ -2282,12 +1372,11 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
2282
1372
  if (checkSlotFallbackVisibility) {
2283
1373
  updateFallbackSlotVisibility(rootVnode.$elm$);
2284
1374
  }
2285
- plt.$flags$ &= -2 /* isTmpDisconnected */;
1375
+ plt.$flags$ &= ~1 /* isTmpDisconnected */;
2286
1376
  relocateNodes.length = 0;
2287
1377
  }
2288
1378
  if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2289
- const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
2290
- for (const childNode of children) {
1379
+ for (const childNode of rootVnode.$elm$.childNodes) {
2291
1380
  if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
2292
1381
  if (isInitialLoad && childNode["s-ih"] == null) {
2293
1382
  childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
@@ -2302,14 +1391,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
2302
1391
  // src/runtime/update-component.ts
2303
1392
  var attachToAncestor = (hostRef, ancestorComponent) => {
2304
1393
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
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
- );
1394
+ ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
2313
1395
  }
2314
1396
  };
2315
1397
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -2338,15 +1420,17 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
2338
1420
  {
2339
1421
  hostRef.$flags$ |= 256 /* isListenReady */;
2340
1422
  if (hostRef.$queuedListeners$) {
2341
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
1423
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
2342
1424
  hostRef.$queuedListeners$ = void 0;
2343
1425
  }
2344
1426
  }
2345
- maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
2346
- } else {
2347
- maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
1427
+ {
1428
+ maybePromise = safeCall(instance, "componentWillLoad");
1429
+ }
1430
+ }
1431
+ {
1432
+ maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
2348
1433
  }
2349
- maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
2350
1434
  endSchedule();
2351
1435
  return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
2352
1436
  };
@@ -2389,7 +1473,7 @@ var callRender = (hostRef, instance, elm, isInitialLoad) => {
2389
1473
  try {
2390
1474
  instance = instance.render && instance.render();
2391
1475
  {
2392
- hostRef.$flags$ &= -17 /* isQueuedForUpdate */;
1476
+ hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;
2393
1477
  }
2394
1478
  {
2395
1479
  hostRef.$flags$ |= 2 /* hasRendered */;
@@ -2412,13 +1496,17 @@ var postUpdateComponent = (hostRef) => {
2412
1496
  const endPostUpdate = createTime("postUpdate", tagName);
2413
1497
  const instance = hostRef.$lazyInstance$ ;
2414
1498
  const ancestorComponent = hostRef.$ancestorComponent$;
2415
- safeCall(instance, "componentDidRender", void 0, elm);
1499
+ {
1500
+ safeCall(instance, "componentDidRender");
1501
+ }
2416
1502
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
2417
1503
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
2418
1504
  {
2419
1505
  addHydratedFlag(elm);
2420
1506
  }
2421
- safeCall(instance, "componentDidLoad", void 0, elm);
1507
+ {
1508
+ safeCall(instance, "componentDidLoad");
1509
+ }
2422
1510
  endPostUpdate();
2423
1511
  {
2424
1512
  hostRef.$onReadyResolve$(elm);
@@ -2427,7 +1515,9 @@ var postUpdateComponent = (hostRef) => {
2427
1515
  }
2428
1516
  }
2429
1517
  } else {
2430
- safeCall(instance, "componentDidUpdate", void 0, elm);
1518
+ {
1519
+ safeCall(instance, "componentDidUpdate");
1520
+ }
2431
1521
  endPostUpdate();
2432
1522
  }
2433
1523
  {
@@ -2441,7 +1531,7 @@ var postUpdateComponent = (hostRef) => {
2441
1531
  if (hostRef.$flags$ & 512 /* needsRerender */) {
2442
1532
  nextTick(() => scheduleUpdate(hostRef, false));
2443
1533
  }
2444
- hostRef.$flags$ &= -517;
1534
+ hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
2445
1535
  }
2446
1536
  };
2447
1537
  var forceUpdate = (ref) => {
@@ -2455,14 +1545,17 @@ var forceUpdate = (ref) => {
2455
1545
  }
2456
1546
  };
2457
1547
  var appDidLoad = (who) => {
1548
+ {
1549
+ addHydratedFlag(doc.documentElement);
1550
+ }
2458
1551
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
2459
1552
  };
2460
- var safeCall = (instance, method, arg, elm) => {
1553
+ var safeCall = (instance, method, arg) => {
2461
1554
  if (instance && instance[method]) {
2462
1555
  try {
2463
1556
  return instance[method](arg);
2464
1557
  } catch (e) {
2465
- consoleError(e, elm);
1558
+ consoleError(e);
2466
1559
  }
2467
1560
  }
2468
1561
  return void 0;
@@ -2478,7 +1571,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
2478
1571
  const hostRef = getHostRef(ref);
2479
1572
  if (!hostRef) {
2480
1573
  throw new Error(
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).`
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).`
2482
1575
  );
2483
1576
  }
2484
1577
  const elm = hostRef.$hostElement$ ;
@@ -2504,11 +1597,6 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
2504
1597
  }
2505
1598
  }
2506
1599
  if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
2507
- if (instance.componentShouldUpdate) {
2508
- if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
2509
- return;
2510
- }
2511
- }
2512
1600
  scheduleUpdate(hostRef, false);
2513
1601
  }
2514
1602
  }
@@ -2526,68 +1614,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
2526
1614
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
2527
1615
  members.map(([memberName, [memberFlags]]) => {
2528
1616
  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
- }
2549
1617
  Object.defineProperty(prototype, memberName, {
1618
+ get() {
1619
+ return getValue(this, memberName);
1620
+ },
2550
1621
  set(newValue) {
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
- }
1622
+ setValue(this, memberName, newValue, cmpMeta);
1623
+ },
1624
+ configurable: true,
1625
+ enumerable: true
2591
1626
  });
2592
1627
  } else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
2593
1628
  Object.defineProperty(prototype, memberName, {
@@ -2608,7 +1643,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
2608
1643
  plt.jmp(() => {
2609
1644
  var _a2;
2610
1645
  const propName = attrNameToPropName.get(attrName);
2611
- if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
1646
+ if (this.hasOwnProperty(propName)) {
2612
1647
  newValue = this[propName];
2613
1648
  delete this[propName];
2614
1649
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -2628,11 +1663,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
2628
1663
  }
2629
1664
  return;
2630
1665
  }
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
- }
1666
+ this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2636
1667
  });
2637
1668
  };
2638
1669
  Cstr.observedAttributes = Array.from(
@@ -2661,7 +1692,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2661
1692
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
2662
1693
  const bundleId = cmpMeta.$lazyBundleId$;
2663
1694
  if (bundleId) {
2664
- const CstrImport = loadModule(cmpMeta, hostRef);
1695
+ const CstrImport = loadModule(cmpMeta);
2665
1696
  if (CstrImport && "then" in CstrImport) {
2666
1697
  const endLoad = uniqueTime();
2667
1698
  Cstr = await CstrImport;
@@ -2686,16 +1717,16 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2686
1717
  try {
2687
1718
  new Cstr(hostRef);
2688
1719
  } catch (e) {
2689
- consoleError(e, elm);
1720
+ consoleError(e);
2690
1721
  }
2691
1722
  {
2692
- hostRef.$flags$ &= -9 /* isConstructingInstance */;
1723
+ hostRef.$flags$ &= ~8 /* isConstructingInstance */;
2693
1724
  }
2694
1725
  {
2695
1726
  hostRef.$flags$ |= 128 /* isWatchReady */;
2696
1727
  }
2697
1728
  endNewInstance();
2698
- fireConnectedCallback(hostRef.$lazyInstance$, elm);
1729
+ fireConnectedCallback(hostRef.$lazyInstance$);
2699
1730
  } else {
2700
1731
  Cstr = elm.constructor;
2701
1732
  const cmpTag = elm.localName;
@@ -2727,9 +1758,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2727
1758
  schedule();
2728
1759
  }
2729
1760
  };
2730
- var fireConnectedCallback = (instance, elm) => {
1761
+ var fireConnectedCallback = (instance) => {
2731
1762
  {
2732
- safeCall(instance, "connectedCallback", void 0, elm);
1763
+ safeCall(instance, "connectedCallback");
2733
1764
  }
2734
1765
  };
2735
1766
 
@@ -2748,9 +1779,6 @@ var connectedCallback = (elm) => {
2748
1779
  if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2749
1780
  const scopeId2 = addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) ;
2750
1781
  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;
2754
1782
  }
2755
1783
  initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
2756
1784
  }
@@ -2785,27 +1813,24 @@ var connectedCallback = (elm) => {
2785
1813
  } else {
2786
1814
  addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
2787
1815
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
2788
- fireConnectedCallback(hostRef.$lazyInstance$, elm);
1816
+ fireConnectedCallback(hostRef.$lazyInstance$);
2789
1817
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
2790
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
1818
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
2791
1819
  }
2792
1820
  }
2793
1821
  endConnected();
2794
1822
  }
2795
1823
  };
2796
1824
  var setContentReference = (elm) => {
2797
- if (!win.document) {
2798
- return;
2799
- }
2800
- const contentRefElm = elm["s-cr"] = win.document.createComment(
1825
+ const contentRefElm = elm["s-cr"] = doc.createComment(
2801
1826
  ""
2802
1827
  );
2803
1828
  contentRefElm["s-cn"] = true;
2804
1829
  insertBefore(elm, contentRefElm, elm.firstChild);
2805
1830
  };
2806
- var disconnectInstance = (instance, elm) => {
1831
+ var disconnectInstance = (instance) => {
2807
1832
  {
2808
- safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1833
+ safeCall(instance, "disconnectedCallback");
2809
1834
  }
2810
1835
  };
2811
1836
  var disconnectedCallback = async (elm) => {
@@ -2818,44 +1843,312 @@ var disconnectedCallback = async (elm) => {
2818
1843
  }
2819
1844
  }
2820
1845
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
2821
- disconnectInstance(hostRef.$lazyInstance$, elm);
1846
+ disconnectInstance(hostRef.$lazyInstance$);
2822
1847
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
2823
- hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
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);
2824
2105
  }
2106
+ slotRefNodes.push(...getAllChildSlotNodes(childNode.childNodes));
2825
2107
  }
2826
- if (rootAppliedStyles.has(elm)) {
2827
- rootAppliedStyles.delete(elm);
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
+ }
2828
2123
  }
2829
- if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
2830
- rootAppliedStyles.delete(elm.shadowRoot);
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);
2831
2130
  }
2131
+ return childNodes;
2832
2132
  };
2833
2133
 
2834
2134
  // src/runtime/bootstrap-lazy.ts
2835
2135
  var bootstrapLazy = (lazyBundles, options = {}) => {
2836
2136
  var _a;
2837
- if (!win.document) {
2838
- console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
2839
- return;
2840
- }
2841
2137
  const endBootstrap = createTime();
2842
2138
  const cmpTags = [];
2843
2139
  const exclude = options.exclude || [];
2844
2140
  const customElements2 = win.customElements;
2845
- const head = win.document.head;
2141
+ const head = doc.head;
2846
2142
  const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
2847
- const dataStyles = /* @__PURE__ */ win.document.createElement("style");
2143
+ const dataStyles = /* @__PURE__ */ doc.createElement("style");
2848
2144
  const deferredConnectedCallbacks = [];
2849
2145
  let appLoadFallback;
2850
2146
  let isBootstrapping = true;
2851
2147
  Object.assign(plt, options);
2852
- plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
2148
+ plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
2853
2149
  {
2854
2150
  plt.$flags$ |= 2 /* appLoaded */;
2855
2151
  }
2856
- {
2857
- hydrateScopedToShadow();
2858
- }
2859
2152
  let hasSlotRelocation = false;
2860
2153
  lazyBundles.map((lazyBundle) => {
2861
2154
  lazyBundle[1].map((compactMeta) => {
@@ -2926,17 +2219,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2926
2219
  }
2927
2220
  disconnectedCallback() {
2928
2221
  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
- });
2940
2222
  }
2941
2223
  componentOnReady() {
2942
2224
  return getHostRef(this).$onReadyPromise$;
@@ -2944,7 +2226,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2944
2226
  };
2945
2227
  {
2946
2228
  if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2947
- patchPseudoShadowDom(HostElement.prototype);
2229
+ patchPseudoShadowDom(HostElement.prototype, cmpMeta);
2948
2230
  }
2949
2231
  }
2950
2232
  cmpMeta.$lazyBundleId$ = lazyBundle[0];
@@ -2966,7 +2248,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2966
2248
  }
2967
2249
  if (dataStyles.innerHTML.length) {
2968
2250
  dataStyles.setAttribute("data-styles", "");
2969
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
2251
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
2970
2252
  if (nonce != null) {
2971
2253
  dataStyles.setAttribute("nonce", nonce);
2972
2254
  }
@@ -2984,9 +2266,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2984
2266
  endBootstrap();
2985
2267
  };
2986
2268
  var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
2987
- if (listeners && win.document) {
2269
+ if (listeners) {
2988
2270
  listeners.map(([flags, name, method]) => {
2989
- const target = getHostListenerTarget(win.document, elm, flags) ;
2271
+ const target = getHostListenerTarget(elm, flags) ;
2990
2272
  const handler = hostListenerProxy(hostRef, method);
2991
2273
  const opts = hostListenerOpts(flags);
2992
2274
  plt.ael(target, name, handler, opts);
@@ -3005,19 +2287,13 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
3005
2287
  }
3006
2288
  }
3007
2289
  } catch (e) {
3008
- consoleError(e, hostRef.$hostElement$);
2290
+ consoleError(e);
3009
2291
  }
3010
2292
  };
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
- }
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;
3021
2297
  return elm;
3022
2298
  };
3023
2299
  var hostListenerOpts = (flags) => supportsListenerOptions ? {