@ionic/core 8.4.2-dev.11734462711.1a2281e0 → 8.4.2-dev.11736265112.120bf7af

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 (430) hide show
  1. package/dist/cjs/{app-globals-21afee77.js → app-globals-16893c1e.js} +1 -1
  2. package/dist/cjs/{button-active-3f2f60b4.js → button-active-ec3d9ca2.js} +1 -1
  3. package/dist/cjs/{hardware-back-button-9e8a2c4f.js → hardware-back-button-5a19da86.js} +2 -2
  4. package/dist/cjs/{index-f05acd21.js → index-29ad8b24.js} +4 -4
  5. package/dist/cjs/{index-8e789962.js → index-2b28acc8.js} +2 -2
  6. package/dist/cjs/{index-73f75efb.js → index-55b6245a.js} +1117 -744
  7. package/dist/cjs/index.cjs.js +8 -8
  8. package/dist/cjs/ion-accordion_2.cjs.entry.js +2 -2
  9. package/dist/cjs/ion-action-sheet.cjs.entry.js +5 -5
  10. package/dist/cjs/ion-alert.cjs.entry.js +5 -5
  11. package/dist/cjs/ion-app_8.cjs.entry.js +6 -6
  12. package/dist/cjs/ion-avatar_3.cjs.entry.js +2 -2
  13. package/dist/cjs/ion-back-button.cjs.entry.js +2 -2
  14. package/dist/cjs/ion-backdrop.cjs.entry.js +2 -2
  15. package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +2 -2
  16. package/dist/cjs/ion-button_2.cjs.entry.js +2 -2
  17. package/dist/cjs/ion-card_5.cjs.entry.js +2 -2
  18. package/dist/cjs/ion-checkbox.cjs.entry.js +2 -2
  19. package/dist/cjs/ion-chip.cjs.entry.js +2 -2
  20. package/dist/cjs/ion-col_3.cjs.entry.js +2 -2
  21. package/dist/cjs/ion-datetime-button.cjs.entry.js +2 -2
  22. package/dist/cjs/ion-datetime_3.cjs.entry.js +4 -4
  23. package/dist/cjs/ion-fab_3.cjs.entry.js +2 -2
  24. package/dist/cjs/ion-img.cjs.entry.js +2 -2
  25. package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +2 -2
  26. package/dist/cjs/ion-input-password-toggle.cjs.entry.js +2 -2
  27. package/dist/cjs/ion-input.cjs.entry.js +2 -2
  28. package/dist/cjs/ion-item-option_3.cjs.entry.js +2 -2
  29. package/dist/cjs/ion-item_8.cjs.entry.js +2 -2
  30. package/dist/cjs/ion-loading.cjs.entry.js +4 -4
  31. package/dist/cjs/ion-menu_3.cjs.entry.js +5 -5
  32. package/dist/cjs/ion-modal.cjs.entry.js +5 -5
  33. package/dist/cjs/ion-nav_2.cjs.entry.js +3 -3
  34. package/dist/cjs/ion-picker-column-option.cjs.entry.js +2 -2
  35. package/dist/cjs/ion-picker-column.cjs.entry.js +2 -2
  36. package/dist/cjs/ion-picker.cjs.entry.js +1 -1
  37. package/dist/cjs/ion-popover.cjs.entry.js +5 -5
  38. package/dist/cjs/ion-progress-bar.cjs.entry.js +2 -2
  39. package/dist/cjs/ion-radio_2.cjs.entry.js +2 -2
  40. package/dist/cjs/ion-range.cjs.entry.js +2 -2
  41. package/dist/cjs/ion-refresher_2.cjs.entry.js +2 -2
  42. package/dist/cjs/ion-reorder_2.cjs.entry.js +2 -2
  43. package/dist/cjs/ion-ripple-effect.cjs.entry.js +2 -2
  44. package/dist/cjs/ion-route_4.cjs.entry.js +2 -2
  45. package/dist/cjs/ion-searchbar.cjs.entry.js +2 -2
  46. package/dist/cjs/ion-segment-content.cjs.entry.js +1 -1
  47. package/dist/cjs/ion-segment-view.cjs.entry.js +1 -1
  48. package/dist/cjs/ion-segment_2.cjs.entry.js +2 -2
  49. package/dist/cjs/ion-select-modal.cjs.entry.js +4 -4
  50. package/dist/cjs/ion-select_3.cjs.entry.js +4 -4
  51. package/dist/cjs/ion-spinner.cjs.entry.js +2 -2
  52. package/dist/cjs/ion-split-pane.cjs.entry.js +2 -2
  53. package/dist/cjs/ion-tab-bar_2.cjs.entry.js +2 -2
  54. package/dist/cjs/ion-tab_2.cjs.entry.js +1 -1
  55. package/dist/cjs/ion-text.cjs.entry.js +2 -2
  56. package/dist/cjs/ion-textarea.cjs.entry.js +2 -2
  57. package/dist/cjs/ion-toast.cjs.entry.js +4 -4
  58. package/dist/cjs/ion-toggle.cjs.entry.js +2 -2
  59. package/dist/cjs/{ionic-global-d9a8bb5b.js → ionic-global-aa46b97c.js} +1 -1
  60. package/dist/cjs/ionic.cjs.js +4 -4
  61. package/dist/cjs/{ios.transition-cf40433b.js → ios.transition-9820d3dc.js} +3 -3
  62. package/dist/cjs/loader.cjs.js +3 -3
  63. package/dist/cjs/{md.transition-ededf99f.js → md.transition-a35e0839.js} +3 -3
  64. package/dist/cjs/{overlays-aa669eb8.js → overlays-43ae7e1d.js} +2 -2
  65. package/dist/cjs/{status-tap-37681226.js → status-tap-f98e43a0.js} +1 -1
  66. package/dist/collection/collection-manifest.json +2 -2
  67. package/dist/collection/components/accordion/accordion.js +10 -0
  68. package/dist/collection/components/accordion-group/accordion-group.js +12 -0
  69. package/dist/collection/components/action-sheet/action-sheet.js +36 -4
  70. package/dist/collection/components/alert/alert.js +40 -4
  71. package/dist/collection/components/back-button/back-button.js +15 -1
  72. package/dist/collection/components/backdrop/backdrop.js +6 -0
  73. package/dist/collection/components/badge/badge.js +2 -0
  74. package/dist/collection/components/breadcrumb/breadcrumb.js +27 -1
  75. package/dist/collection/components/breadcrumbs/breadcrumbs.js +8 -0
  76. package/dist/collection/components/button/button.js +33 -1
  77. package/dist/collection/components/buttons/buttons.js +2 -0
  78. package/dist/collection/components/card/card.js +21 -1
  79. package/dist/collection/components/card-header/card-header.js +4 -0
  80. package/dist/collection/components/card-subtitle/card-subtitle.js +2 -0
  81. package/dist/collection/components/card-title/card-title.js +2 -0
  82. package/dist/collection/components/checkbox/checkbox.js +18 -0
  83. package/dist/collection/components/chip/chip.js +6 -0
  84. package/dist/collection/components/col/col.js +48 -0
  85. package/dist/collection/components/content/content.js +14 -0
  86. package/dist/collection/components/datetime/datetime.js +64 -4
  87. package/dist/collection/components/datetime-button/datetime-button.js +6 -0
  88. package/dist/collection/components/fab/fab.js +8 -0
  89. package/dist/collection/components/fab-button/fab-button.js +29 -1
  90. package/dist/collection/components/fab-list/fab-list.js +4 -0
  91. package/dist/collection/components/footer/footer.js +4 -0
  92. package/dist/collection/components/grid/grid.js +2 -0
  93. package/dist/collection/components/header/header.js +4 -0
  94. package/dist/collection/components/img/img.js +4 -0
  95. package/dist/collection/components/infinite-scroll/infinite-scroll.js +6 -0
  96. package/dist/collection/components/infinite-scroll-content/infinite-scroll-content.js +4 -0
  97. package/dist/collection/components/input/input.js +69 -1
  98. package/dist/collection/components/input-password-toggle/input-password-toggle.js +8 -0
  99. package/dist/collection/components/item/item.js +27 -1
  100. package/dist/collection/components/item-divider/item-divider.js +4 -0
  101. package/dist/collection/components/item-option/item-option.js +16 -0
  102. package/dist/collection/components/item-options/item-options.js +2 -0
  103. package/dist/collection/components/item-sliding/item-sliding.js +2 -0
  104. package/dist/collection/components/label/label.js +4 -0
  105. package/dist/collection/components/list/list.js +4 -0
  106. package/dist/collection/components/list-header/list-header.js +4 -0
  107. package/dist/collection/components/loading/loading.js +38 -4
  108. package/dist/collection/components/menu/menu.js +14 -0
  109. package/dist/collection/components/menu-button/menu-button.js +10 -0
  110. package/dist/collection/components/menu-toggle/menu-toggle.js +4 -0
  111. package/dist/collection/components/modal/modal.js +55 -7
  112. package/dist/collection/components/nav/nav.js +15 -3
  113. package/dist/collection/components/nav-link/nav-link.js +10 -2
  114. package/dist/collection/components/note/note.js +2 -0
  115. package/dist/collection/components/picker-column/picker-column.js +8 -0
  116. package/dist/collection/components/picker-column-option/picker-column-option.js +6 -0
  117. package/dist/collection/components/picker-legacy/picker.js +36 -4
  118. package/dist/collection/components/picker-legacy-column/picker-column.js +3 -1
  119. package/dist/collection/components/popover/popover.js +59 -5
  120. package/dist/collection/components/progress-bar/progress-bar.js +10 -0
  121. package/dist/collection/components/radio/radio.js +14 -0
  122. package/dist/collection/components/radio-group/radio-group.js +8 -0
  123. package/dist/collection/components/range/range.js +32 -0
  124. package/dist/collection/components/refresher/refresher.js +12 -0
  125. package/dist/collection/components/refresher-content/refresher-content.js +8 -0
  126. package/dist/collection/components/reorder-group/reorder-group.js +2 -0
  127. package/dist/collection/components/ripple-effect/ripple-effect.js +2 -0
  128. package/dist/collection/components/route/route.js +13 -3
  129. package/dist/collection/components/route-redirect/route-redirect.js +4 -0
  130. package/dist/collection/components/router/router.js +4 -0
  131. package/dist/collection/components/router-link/router-link.js +13 -1
  132. package/dist/collection/components/router-outlet/router-outlet.js +13 -3
  133. package/dist/collection/components/searchbar/searchbar.js +44 -0
  134. package/dist/collection/components/segment/segment.js +12 -0
  135. package/dist/collection/components/segment-button/segment-button.js +10 -0
  136. package/dist/collection/components/segment-view/segment-view.js +2 -0
  137. package/dist/collection/components/select/select.js +38 -0
  138. package/dist/collection/components/select-modal/select-modal.js +6 -0
  139. package/dist/collection/components/select-option/select-option.js +4 -0
  140. package/dist/collection/components/select-popover/select-popover.js +10 -0
  141. package/dist/collection/components/skeleton-text/skeleton-text.js +2 -0
  142. package/dist/collection/components/spinner/spinner.js +8 -0
  143. package/dist/collection/components/split-pane/split-pane.js +6 -0
  144. package/dist/collection/components/tab/tab.js +9 -1
  145. package/dist/collection/components/tab-bar/tab-bar.js +6 -0
  146. package/dist/collection/components/tab-button/tab-button.js +16 -0
  147. package/dist/collection/components/tabs/tabs.js +2 -0
  148. package/dist/collection/components/text/text.js +2 -0
  149. package/dist/collection/components/textarea/textarea.js +57 -1
  150. package/dist/collection/components/title/title.js +4 -0
  151. package/dist/collection/components/toast/toast.js +49 -5
  152. package/dist/collection/components/toggle/toggle.js +18 -0
  153. package/dist/collection/components/toolbar/toolbar.js +2 -0
  154. package/dist/docs.d.ts +8 -0
  155. package/dist/docs.json +1710 -572
  156. package/dist/esm/{app-globals-5dbb61a5.js → app-globals-32740a0d.js} +1 -1
  157. package/dist/esm/{button-active-f6503382.js → button-active-0e590bc4.js} +1 -1
  158. package/dist/esm/{hardware-back-button-06ef3c3e.js → hardware-back-button-18d38325.js} +2 -2
  159. package/dist/esm/{index-28849c61.js → index-0f61352c.js} +1117 -744
  160. package/dist/esm/{index-3ad7f18b.js → index-4f0570f4.js} +4 -4
  161. package/dist/esm/{index-24b48b06.js → index-7bdf1ee6.js} +2 -2
  162. package/dist/esm/index.js +8 -8
  163. package/dist/esm/ion-accordion_2.entry.js +2 -2
  164. package/dist/esm/ion-action-sheet.entry.js +5 -5
  165. package/dist/esm/ion-alert.entry.js +5 -5
  166. package/dist/esm/ion-app_8.entry.js +6 -6
  167. package/dist/esm/ion-avatar_3.entry.js +2 -2
  168. package/dist/esm/ion-back-button.entry.js +2 -2
  169. package/dist/esm/ion-backdrop.entry.js +2 -2
  170. package/dist/esm/ion-breadcrumb_2.entry.js +2 -2
  171. package/dist/esm/ion-button_2.entry.js +2 -2
  172. package/dist/esm/ion-card_5.entry.js +2 -2
  173. package/dist/esm/ion-checkbox.entry.js +2 -2
  174. package/dist/esm/ion-chip.entry.js +2 -2
  175. package/dist/esm/ion-col_3.entry.js +2 -2
  176. package/dist/esm/ion-datetime-button.entry.js +2 -2
  177. package/dist/esm/ion-datetime_3.entry.js +4 -4
  178. package/dist/esm/ion-fab_3.entry.js +2 -2
  179. package/dist/esm/ion-img.entry.js +2 -2
  180. package/dist/esm/ion-infinite-scroll_2.entry.js +2 -2
  181. package/dist/esm/ion-input-password-toggle.entry.js +2 -2
  182. package/dist/esm/ion-input.entry.js +2 -2
  183. package/dist/esm/ion-item-option_3.entry.js +2 -2
  184. package/dist/esm/ion-item_8.entry.js +2 -2
  185. package/dist/esm/ion-loading.entry.js +4 -4
  186. package/dist/esm/ion-menu_3.entry.js +5 -5
  187. package/dist/esm/ion-modal.entry.js +5 -5
  188. package/dist/esm/ion-nav_2.entry.js +3 -3
  189. package/dist/esm/ion-picker-column-option.entry.js +2 -2
  190. package/dist/esm/ion-picker-column.entry.js +2 -2
  191. package/dist/esm/ion-picker.entry.js +1 -1
  192. package/dist/esm/ion-popover.entry.js +5 -5
  193. package/dist/esm/ion-progress-bar.entry.js +2 -2
  194. package/dist/esm/ion-radio_2.entry.js +2 -2
  195. package/dist/esm/ion-range.entry.js +2 -2
  196. package/dist/esm/ion-refresher_2.entry.js +2 -2
  197. package/dist/esm/ion-reorder_2.entry.js +2 -2
  198. package/dist/esm/ion-ripple-effect.entry.js +2 -2
  199. package/dist/esm/ion-route_4.entry.js +2 -2
  200. package/dist/esm/ion-searchbar.entry.js +2 -2
  201. package/dist/esm/ion-segment-content.entry.js +1 -1
  202. package/dist/esm/ion-segment-view.entry.js +1 -1
  203. package/dist/esm/ion-segment_2.entry.js +2 -2
  204. package/dist/esm/ion-select-modal.entry.js +4 -4
  205. package/dist/esm/ion-select_3.entry.js +4 -4
  206. package/dist/esm/ion-spinner.entry.js +2 -2
  207. package/dist/esm/ion-split-pane.entry.js +2 -2
  208. package/dist/esm/ion-tab-bar_2.entry.js +2 -2
  209. package/dist/esm/ion-tab_2.entry.js +1 -1
  210. package/dist/esm/ion-text.entry.js +2 -2
  211. package/dist/esm/ion-textarea.entry.js +2 -2
  212. package/dist/esm/ion-toast.entry.js +4 -4
  213. package/dist/esm/ion-toggle.entry.js +2 -2
  214. package/dist/esm/{ionic-global-c81d82ab.js → ionic-global-35cabcff.js} +1 -1
  215. package/dist/esm/ionic.js +5 -5
  216. package/dist/esm/{ios.transition-4ee1a3af.js → ios.transition-72ec83a8.js} +3 -3
  217. package/dist/esm/loader.js +4 -4
  218. package/dist/esm/{md.transition-5106a0d2.js → md.transition-1f612b9f.js} +3 -3
  219. package/dist/esm/{overlays-e7b9d6d9.js → overlays-cba25d39.js} +2 -2
  220. package/dist/esm/{status-tap-f472b09f.js → status-tap-a7026a46.js} +1 -1
  221. package/dist/esm-es5/app-globals-32740a0d.js +4 -0
  222. package/dist/esm-es5/{button-active-f6503382.js → button-active-0e590bc4.js} +1 -1
  223. package/dist/esm-es5/{hardware-back-button-06ef3c3e.js → hardware-back-button-18d38325.js} +1 -1
  224. package/dist/esm-es5/index-0f61352c.js +5 -0
  225. package/dist/esm-es5/{index-3ad7f18b.js → index-4f0570f4.js} +1 -1
  226. package/dist/esm-es5/{index-24b48b06.js → index-7bdf1ee6.js} +1 -1
  227. package/dist/esm-es5/index.js +1 -1
  228. package/dist/esm-es5/ion-accordion_2.entry.js +1 -1
  229. package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
  230. package/dist/esm-es5/ion-alert.entry.js +1 -1
  231. package/dist/esm-es5/ion-app_8.entry.js +1 -1
  232. package/dist/esm-es5/ion-avatar_3.entry.js +1 -1
  233. package/dist/esm-es5/ion-back-button.entry.js +1 -1
  234. package/dist/esm-es5/ion-backdrop.entry.js +1 -1
  235. package/dist/esm-es5/ion-breadcrumb_2.entry.js +1 -1
  236. package/dist/esm-es5/ion-button_2.entry.js +1 -1
  237. package/dist/esm-es5/ion-card_5.entry.js +1 -1
  238. package/dist/esm-es5/ion-checkbox.entry.js +1 -1
  239. package/dist/esm-es5/ion-chip.entry.js +1 -1
  240. package/dist/esm-es5/ion-col_3.entry.js +1 -1
  241. package/dist/esm-es5/ion-datetime-button.entry.js +1 -1
  242. package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
  243. package/dist/esm-es5/ion-fab_3.entry.js +1 -1
  244. package/dist/esm-es5/ion-img.entry.js +1 -1
  245. package/dist/esm-es5/ion-infinite-scroll_2.entry.js +1 -1
  246. package/dist/esm-es5/ion-input-password-toggle.entry.js +1 -1
  247. package/dist/esm-es5/ion-input.entry.js +1 -1
  248. package/dist/esm-es5/ion-item-option_3.entry.js +1 -1
  249. package/dist/esm-es5/ion-item_8.entry.js +1 -1
  250. package/dist/esm-es5/ion-loading.entry.js +1 -1
  251. package/dist/esm-es5/ion-menu_3.entry.js +1 -1
  252. package/dist/esm-es5/ion-modal.entry.js +1 -1
  253. package/dist/esm-es5/ion-nav_2.entry.js +1 -1
  254. package/dist/esm-es5/ion-picker-column-option.entry.js +1 -1
  255. package/dist/esm-es5/ion-picker-column.entry.js +1 -1
  256. package/dist/esm-es5/ion-picker.entry.js +1 -1
  257. package/dist/esm-es5/ion-popover.entry.js +1 -1
  258. package/dist/esm-es5/ion-progress-bar.entry.js +1 -1
  259. package/dist/esm-es5/ion-radio_2.entry.js +1 -1
  260. package/dist/esm-es5/ion-range.entry.js +1 -1
  261. package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
  262. package/dist/esm-es5/ion-reorder_2.entry.js +1 -1
  263. package/dist/esm-es5/ion-ripple-effect.entry.js +1 -1
  264. package/dist/esm-es5/ion-route_4.entry.js +1 -1
  265. package/dist/esm-es5/ion-searchbar.entry.js +1 -1
  266. package/dist/esm-es5/ion-segment-content.entry.js +1 -1
  267. package/dist/esm-es5/ion-segment-view.entry.js +1 -1
  268. package/dist/esm-es5/ion-segment_2.entry.js +1 -1
  269. package/dist/esm-es5/ion-select-modal.entry.js +1 -1
  270. package/dist/esm-es5/ion-select_3.entry.js +1 -1
  271. package/dist/esm-es5/ion-spinner.entry.js +1 -1
  272. package/dist/esm-es5/ion-split-pane.entry.js +1 -1
  273. package/dist/esm-es5/ion-tab-bar_2.entry.js +1 -1
  274. package/dist/esm-es5/ion-tab_2.entry.js +1 -1
  275. package/dist/esm-es5/ion-text.entry.js +1 -1
  276. package/dist/esm-es5/ion-textarea.entry.js +1 -1
  277. package/dist/esm-es5/ion-toast.entry.js +1 -1
  278. package/dist/esm-es5/ion-toggle.entry.js +1 -1
  279. package/dist/esm-es5/{ionic-global-c81d82ab.js → ionic-global-35cabcff.js} +1 -1
  280. package/dist/esm-es5/ionic.js +1 -1
  281. package/dist/esm-es5/{ios.transition-4ee1a3af.js → ios.transition-72ec83a8.js} +1 -1
  282. package/dist/esm-es5/loader.js +1 -1
  283. package/dist/esm-es5/{md.transition-5106a0d2.js → md.transition-1f612b9f.js} +1 -1
  284. package/dist/esm-es5/{overlays-e7b9d6d9.js → overlays-cba25d39.js} +1 -1
  285. package/dist/esm-es5/{status-tap-f472b09f.js → status-tap-a7026a46.js} +1 -1
  286. package/dist/ionic/index.esm.js +1 -1
  287. package/dist/ionic/ionic.esm.js +1 -1
  288. package/dist/ionic/ionic.js +1 -1
  289. package/dist/ionic/{p-ed75fcfb.system.entry.js → p-00751c2a.system.entry.js} +1 -1
  290. package/dist/ionic/p-024da823.js +4 -0
  291. package/dist/ionic/{p-16188af7.entry.js → p-047eabc5.entry.js} +1 -1
  292. package/dist/ionic/{p-372ae7f4.system.js → p-04f14c79.system.js} +1 -1
  293. package/dist/ionic/{p-fec61c32.entry.js → p-05562a80.entry.js} +1 -1
  294. package/dist/ionic/{p-d18ab582.system.entry.js → p-07d1dbe2.system.entry.js} +2 -2
  295. package/dist/ionic/{p-58d5df0c.system.entry.js → p-085dbcb4.system.entry.js} +1 -1
  296. package/dist/ionic/{p-7ed1657c.system.entry.js → p-08c16f05.system.entry.js} +1 -1
  297. package/dist/ionic/{p-7ddc46c3.system.entry.js → p-0ba102ec.system.entry.js} +1 -1
  298. package/dist/ionic/{p-fca6ef5f.system.entry.js → p-0c093fae.system.entry.js} +1 -1
  299. package/dist/ionic/{p-de930745.entry.js → p-0c64a077.entry.js} +1 -1
  300. package/dist/ionic/{p-937a7e21.entry.js → p-11330967.entry.js} +1 -1
  301. package/dist/ionic/{p-b9d7015f.entry.js → p-1179c304.entry.js} +1 -1
  302. package/dist/ionic/{p-66640ff7.system.entry.js → p-12f711f4.system.entry.js} +1 -1
  303. package/dist/ionic/{p-c9f3a539.entry.js → p-17290742.entry.js} +1 -1
  304. package/dist/ionic/p-18094a7c.system.entry.js +4 -0
  305. package/dist/ionic/{p-88e63c7d.js → p-19bfac92.js} +1 -1
  306. package/dist/ionic/{p-01186920.system.entry.js → p-255d9087.system.entry.js} +1 -1
  307. package/dist/ionic/{p-3c8e5c23.system.js → p-2564d9b9.system.js} +1 -1
  308. package/dist/ionic/{p-9ee1e8a6.entry.js → p-265d65cb.entry.js} +1 -1
  309. package/dist/ionic/{p-f3102647.system.entry.js → p-27e81076.system.entry.js} +1 -1
  310. package/dist/ionic/{p-bc36ad98.system.entry.js → p-2e396991.system.entry.js} +1 -1
  311. package/dist/ionic/{p-c41ac815.entry.js → p-2e520289.entry.js} +1 -1
  312. package/dist/ionic/p-2e78561b.js +5 -0
  313. package/dist/ionic/{p-5da94421.system.js → p-2f9f5bea.system.js} +1 -1
  314. package/dist/ionic/p-30019f0b.system.js +4 -0
  315. package/dist/ionic/{p-a43467d8.entry.js → p-32e1825e.entry.js} +1 -1
  316. package/dist/ionic/{p-4ec778aa.entry.js → p-35f02a74.entry.js} +1 -1
  317. package/dist/ionic/{p-37cb43bd.system.entry.js → p-38dac839.system.entry.js} +1 -1
  318. package/dist/ionic/{p-ecceeb90.js → p-39539749.js} +1 -1
  319. package/dist/ionic/{p-942b5e13.entry.js → p-3e2c05a8.entry.js} +1 -1
  320. package/dist/ionic/{p-98ff6b32.entry.js → p-41cabce4.entry.js} +1 -1
  321. package/dist/ionic/{p-afecb188.entry.js → p-43679a42.entry.js} +1 -1
  322. package/dist/ionic/{p-2172893e.system.entry.js → p-43febc77.system.entry.js} +1 -1
  323. package/dist/ionic/{p-2b838f86.system.entry.js → p-45e4a1e3.system.entry.js} +1 -1
  324. package/dist/ionic/{p-45693d7e.entry.js → p-4a57dd17.entry.js} +1 -1
  325. package/dist/ionic/{p-9fa07aec.entry.js → p-4ab93cfa.entry.js} +1 -1
  326. package/dist/ionic/{p-b2272f51.system.entry.js → p-52f6a5cc.system.entry.js} +1 -1
  327. package/dist/ionic/{p-6499df44.system.entry.js → p-53ad8ff4.system.entry.js} +1 -1
  328. package/dist/ionic/{p-2bd0ae94.system.entry.js → p-56667886.system.entry.js} +2 -2
  329. package/dist/ionic/{p-a61cba41.entry.js → p-57f92640.entry.js} +1 -1
  330. package/dist/ionic/{p-6d6cedc5.entry.js → p-5ae14e75.entry.js} +1 -1
  331. package/dist/ionic/{p-19a5be0a.entry.js → p-64b0068b.entry.js} +1 -1
  332. package/dist/ionic/{p-e4f69534.system.entry.js → p-65774bef.system.entry.js} +1 -1
  333. package/dist/ionic/{p-e4ee80be.system.entry.js → p-67d3729b.system.entry.js} +1 -1
  334. package/dist/ionic/{p-eba29931.entry.js → p-6828136c.entry.js} +1 -1
  335. package/dist/ionic/{p-1046866e.system.entry.js → p-6a131e4b.system.entry.js} +1 -1
  336. package/dist/ionic/{p-982315a6.entry.js → p-6b6ccc63.entry.js} +1 -1
  337. package/dist/ionic/{p-73dc4950.entry.js → p-6c29e51f.entry.js} +1 -1
  338. package/dist/ionic/{p-6b280620.entry.js → p-6d350e1f.entry.js} +1 -1
  339. package/dist/ionic/p-6d7a98cc.system.entry.js +4 -0
  340. package/dist/ionic/{p-e85d901b.system.entry.js → p-6d9fa95e.system.entry.js} +1 -1
  341. package/dist/ionic/{p-cac0e0b3.system.entry.js → p-6e1c1cf1.system.entry.js} +1 -1
  342. package/dist/ionic/{p-17474161.system.js → p-6f04bf2f.system.js} +1 -1
  343. package/dist/ionic/p-711fd7fc.js +4 -0
  344. package/dist/ionic/{p-5fce0c0b.system.entry.js → p-735f093b.system.entry.js} +1 -1
  345. package/dist/ionic/{p-15e76dd1.entry.js → p-75be4567.entry.js} +1 -1
  346. package/dist/ionic/p-779acec8.entry.js +4 -0
  347. package/dist/ionic/{p-a4565eb5.system.js → p-78067282.system.js} +1 -1
  348. package/dist/ionic/{p-d7aa6b00.entry.js → p-78841a31.entry.js} +1 -1
  349. package/dist/ionic/{p-508d024a.entry.js → p-7fa854a7.entry.js} +1 -1
  350. package/dist/ionic/{p-1e67b266.system.entry.js → p-81494564.system.entry.js} +1 -1
  351. package/dist/ionic/{p-424eb140.system.entry.js → p-84827719.system.entry.js} +1 -1
  352. package/dist/ionic/{p-797eeea8.system.entry.js → p-84a6d0da.system.entry.js} +1 -1
  353. package/dist/ionic/{p-cdc83025.entry.js → p-86bc3e6f.entry.js} +1 -1
  354. package/dist/ionic/{p-2fc0dafe.entry.js → p-876d7e0d.entry.js} +1 -1
  355. package/dist/ionic/{p-c29f8157.system.entry.js → p-89b075f4.system.entry.js} +1 -1
  356. package/dist/ionic/{p-0aa833fb.system.js → p-8b2d8ddb.system.js} +1 -1
  357. package/dist/ionic/{p-b79ba17c.entry.js → p-8c9954a1.entry.js} +1 -1
  358. package/dist/ionic/{p-322c5fb4.system.js → p-8ceead8f.system.js} +1 -1
  359. package/dist/ionic/p-8e8839c4.system.js +5 -0
  360. package/dist/ionic/{p-e6635685.js → p-938a029f.js} +1 -1
  361. package/dist/ionic/{p-2b9b78c7.entry.js → p-93bc2080.entry.js} +1 -1
  362. package/dist/ionic/{p-ddaa748a.system.entry.js → p-979f352d.system.entry.js} +1 -1
  363. package/dist/ionic/{p-33a8a71b.entry.js → p-99658fa2.entry.js} +1 -1
  364. package/dist/ionic/{p-7b9a2b23.entry.js → p-99c5a3a0.entry.js} +1 -1
  365. package/dist/ionic/{p-5823babc.system.entry.js → p-9c4f4367.system.entry.js} +1 -1
  366. package/dist/ionic/{p-ca065903.system.entry.js → p-a2e5c294.system.entry.js} +1 -1
  367. package/dist/ionic/{p-2799c6d3.system.entry.js → p-a3bea030.system.entry.js} +1 -1
  368. package/dist/ionic/{p-a49378bb.system.entry.js → p-a64f199d.system.entry.js} +1 -1
  369. package/dist/ionic/{p-0303d0f8.js → p-a772be95.js} +1 -1
  370. package/dist/ionic/{p-2abae1cc.system.entry.js → p-a8cf7e93.system.entry.js} +1 -1
  371. package/dist/ionic/{p-98231c01.system.entry.js → p-a915830c.system.entry.js} +1 -1
  372. package/dist/ionic/{p-985a7e17.system.entry.js → p-add1b61c.system.entry.js} +1 -1
  373. package/dist/ionic/{p-6d32975a.entry.js → p-ae2e0f50.entry.js} +1 -1
  374. package/dist/ionic/{p-1e010627.system.entry.js → p-afe932a1.system.entry.js} +1 -1
  375. package/dist/ionic/{p-62af944c.entry.js → p-b2ef1bb0.entry.js} +1 -1
  376. package/dist/ionic/{p-f1acf541.system.entry.js → p-b2f788b9.system.entry.js} +1 -1
  377. package/dist/ionic/{p-1fe02220.system.entry.js → p-b50c6cd6.system.entry.js} +1 -1
  378. package/dist/ionic/{p-b335ffed.system.entry.js → p-b52ddc18.system.entry.js} +1 -1
  379. package/dist/ionic/{p-c449820c.system.js → p-b6c8f5dc.system.js} +1 -1
  380. package/dist/ionic/{p-95775830.entry.js → p-b7027235.entry.js} +1 -1
  381. package/dist/ionic/{p-e7ed4a7f.system.js → p-bb750ac0.system.js} +1 -1
  382. package/dist/ionic/{p-63b0abde.system.entry.js → p-bf9210c7.system.entry.js} +1 -1
  383. package/dist/ionic/{p-7458862e.system.entry.js → p-c2496925.system.entry.js} +1 -1
  384. package/dist/ionic/{p-69666e8a.system.entry.js → p-c4dc27a0.system.entry.js} +1 -1
  385. package/dist/ionic/{p-c4b53b16.system.entry.js → p-c505bde7.system.entry.js} +1 -1
  386. package/dist/ionic/{p-bb0db172.entry.js → p-c60e41c7.entry.js} +1 -1
  387. package/dist/ionic/{p-bdad26e3.entry.js → p-cb37f97d.entry.js} +1 -1
  388. package/dist/ionic/{p-ebf042e0.system.entry.js → p-ce32a54b.system.entry.js} +1 -1
  389. package/dist/ionic/{p-a69b9fc5.system.js → p-cf110b0b.system.js} +1 -1
  390. package/dist/ionic/{p-626fd66d.system.entry.js → p-d09b25f9.system.entry.js} +1 -1
  391. package/dist/ionic/{p-9df2c6fb.entry.js → p-d18dc399.entry.js} +1 -1
  392. package/dist/ionic/{p-f9a53abb.system.js → p-d37524be.system.js} +1 -1
  393. package/dist/ionic/{p-9e33104d.entry.js → p-d737a7d9.entry.js} +1 -1
  394. package/dist/ionic/{p-2e46590d.system.entry.js → p-d83d0d32.system.entry.js} +1 -1
  395. package/dist/ionic/{p-081a4ce4.entry.js → p-d8d37758.entry.js} +1 -1
  396. package/dist/ionic/{p-567de071.system.entry.js → p-dcad1a3d.system.entry.js} +1 -1
  397. package/dist/ionic/{p-5b932840.entry.js → p-dddb317f.entry.js} +1 -1
  398. package/dist/ionic/{p-d743e981.js → p-de758235.js} +1 -1
  399. package/dist/ionic/{p-908d6080.entry.js → p-e11ef2b7.entry.js} +1 -1
  400. package/dist/ionic/{p-14be4015.entry.js → p-e3c8fb01.entry.js} +1 -1
  401. package/dist/ionic/{p-14e159ea.system.entry.js → p-e3f626ea.system.entry.js} +1 -1
  402. package/dist/ionic/{p-0574e87e.js → p-e46ba5cd.js} +1 -1
  403. package/dist/ionic/{p-52d7a191.entry.js → p-e4966716.entry.js} +1 -1
  404. package/dist/ionic/{p-5ab1b709.entry.js → p-e5c69948.entry.js} +1 -1
  405. package/dist/ionic/{p-4439fc2a.entry.js → p-e837530a.entry.js} +1 -1
  406. package/dist/ionic/p-e85e6e02.js +4 -0
  407. package/dist/ionic/{p-8b8be2fd.entry.js → p-e8784b73.entry.js} +1 -1
  408. package/dist/ionic/{p-12a722b8.system.entry.js → p-e896891b.system.entry.js} +1 -1
  409. package/dist/ionic/{p-d6841eac.js → p-e9bd3df9.js} +1 -1
  410. package/dist/ionic/{p-e563a35c.entry.js → p-ea2ee20f.entry.js} +1 -1
  411. package/dist/ionic/{p-efaffe74.entry.js → p-eb717568.entry.js} +1 -1
  412. package/dist/ionic/{p-da074ff7.entry.js → p-f2986b60.entry.js} +1 -1
  413. package/dist/ionic/{p-2507278c.system.entry.js → p-f8a8295c.system.entry.js} +1 -1
  414. package/dist/ionic/{p-19ec4f42.entry.js → p-fb7b7319.entry.js} +1 -1
  415. package/dist/types/stencil-public-runtime.d.ts +6 -0
  416. package/hydrate/index.d.ts +10 -4
  417. package/hydrate/index.js +1354 -742
  418. package/hydrate/index.mjs +1354 -742
  419. package/package.json +2 -2
  420. package/dist/esm-es5/app-globals-5dbb61a5.js +0 -4
  421. package/dist/esm-es5/index-28849c61.js +0 -5
  422. package/dist/ionic/p-16799667.system.entry.js +0 -4
  423. package/dist/ionic/p-16bfb979.system.entry.js +0 -4
  424. package/dist/ionic/p-21e5e7e4.js +0 -4
  425. package/dist/ionic/p-25180df3.system.js +0 -5
  426. package/dist/ionic/p-49a0e74c.entry.js +0 -4
  427. package/dist/ionic/p-69066a53.js +0 -4
  428. package/dist/ionic/p-9f3008d4.system.js +0 -4
  429. package/dist/ionic/p-b82d4cab.js +0 -4
  430. package/dist/ionic/p-d836d43e.js +0 -5
@@ -5,7 +5,7 @@ const NAMESPACE = 'ionic';
5
5
  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 };
6
6
 
7
7
  /*
8
- Stencil Client Platform v4.20.0 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Platform v4.23.0-dev.1735628762.fb8335e | MIT Licensed | https://stenciljs.com
9
9
  */
10
10
  var __defProp = Object.defineProperty;
11
11
  var __export = (target, all) => {
@@ -19,8 +19,13 @@ var Build = {
19
19
  isTesting: false
20
20
  };
21
21
  var hostRefs = /* @__PURE__ */ new WeakMap();
22
+ var hostRefKeys = [];
22
23
  var getHostRef = (ref) => hostRefs.get(ref);
23
- var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
24
+ var registerInstance = (lazyInstance, hostRef) => {
25
+ hostRef.$lazyInstance$ = lazyInstance;
26
+ hostRefKeys.push(lazyInstance);
27
+ return hostRefs.set(lazyInstance, hostRef);
28
+ };
24
29
  var registerHost = (hostElement, cmpMeta) => {
25
30
  const hostRef = {
26
31
  $flags$: 0,
@@ -36,9 +41,29 @@ var registerHost = (hostElement, cmpMeta) => {
36
41
  hostElement["s-p"] = [];
37
42
  hostElement["s-rc"] = [];
38
43
  }
44
+ hostRefKeys.push(hostElement);
39
45
  return hostRefs.set(hostElement, hostRef);
40
46
  };
41
47
  var isMemberInElement = (elm, memberName) => memberName in elm;
48
+ function isNodeAttached(node) {
49
+ return node === document || node === document.documentElement || document.contains(node);
50
+ }
51
+ var hostRefCleanup = () => {
52
+ const keysToRemove = [];
53
+ for (const key of hostRefKeys) {
54
+ if (key instanceof Node && !isNodeAttached(key)) {
55
+ keysToRemove.push(key);
56
+ }
57
+ const elem = hostRefs.get(key);
58
+ if (elem && (elem.$hostElement$ && !isNodeAttached(elem.$hostElement$) || elem.$ancestorComponent$ && !isNodeAttached(elem.$ancestorComponent$))) {
59
+ keysToRemove.push(key);
60
+ }
61
+ }
62
+ for (const key of keysToRemove) {
63
+ hostRefs.delete(key);
64
+ hostRefKeys.splice(hostRefKeys.indexOf(key), 1);
65
+ }
66
+ };
42
67
  var consoleError = (e, el) => (0, console.error)(e, el);
43
68
 
44
69
  // src/client/client-load-module.ts
@@ -77,6 +102,7 @@ var CONTENT_REF_ID = "r";
77
102
  var ORG_LOCATION_ID = "o";
78
103
  var SLOT_NODE_ID = "s";
79
104
  var TEXT_NODE_ID = "t";
105
+ var COMMENT_NODE_ID = "c";
80
106
  var HYDRATE_ID = "s-id";
81
107
  var HYDRATED_STYLE_ID = "sty-id";
82
108
  var HYDRATE_CHILD_ID = "c-id";
@@ -234,20 +260,6 @@ var unwrapErr = (result) => {
234
260
  throw result.value;
235
261
  }
236
262
  };
237
- var createTime = (fnName, tagName = "") => {
238
- {
239
- return () => {
240
- return;
241
- };
242
- }
243
- };
244
- var uniqueTime = (key, measureText) => {
245
- {
246
- return () => {
247
- return;
248
- };
249
- }
250
- };
251
263
  var h = (nodeName, vnodeData, ...children) => {
252
264
  let child = null;
253
265
  let key = null;
@@ -359,436 +371,132 @@ var convertToPrivate = (node) => {
359
371
  vnode.$name$ = node.vname;
360
372
  return vnode;
361
373
  };
362
-
363
- // src/runtime/client-hydrate.ts
364
- var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
365
- const endHydrate = createTime("hydrateClient", tagName);
366
- const shadowRoot = hostElm.shadowRoot;
367
- const childRenderNodes = [];
368
- const slotNodes = [];
369
- const shadowRootNodes = shadowRoot ? [] : null;
370
- const vnode = hostRef.$vnode$ = newVNode(tagName, null);
371
- if (!plt.$orgLocNodes$) {
372
- initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
373
- }
374
- hostElm[HYDRATE_ID] = hostId;
375
- hostElm.removeAttribute(HYDRATE_ID);
376
- clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
377
- childRenderNodes.map((c) => {
378
- const orgLocationId = c.$hostId$ + "." + c.$nodeId$;
379
- const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
380
- const node = c.$elm$;
381
- if (orgLocationNode && supportsShadow && orgLocationNode["s-en"] === "") {
382
- orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
383
- }
384
- if (!shadowRoot) {
385
- node["s-hn"] = tagName;
386
- if (orgLocationNode) {
387
- node["s-ol"] = orgLocationNode;
388
- node["s-ol"]["s-nr"] = node;
389
- }
390
- }
391
- plt.$orgLocNodes$.delete(orgLocationId);
392
- });
393
- if (shadowRoot) {
394
- shadowRootNodes.map((shadowRootNode) => {
395
- if (shadowRootNode) {
396
- shadowRoot.appendChild(shadowRootNode);
374
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
375
+ if (oldValue !== newValue) {
376
+ let isProp = isMemberInElement(elm, memberName);
377
+ let ln = memberName.toLowerCase();
378
+ if (memberName === "class") {
379
+ const classList = elm.classList;
380
+ const oldClasses = parseClassList(oldValue);
381
+ const newClasses = parseClassList(newValue);
382
+ if (elm["s-si"] && newClasses.indexOf(elm["s-si"]) < 0) {
383
+ newClasses.push(elm["s-si"]);
397
384
  }
398
- });
399
- }
400
- endHydrate();
401
- };
402
- var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
403
- let childNodeType;
404
- let childIdSplt;
405
- let childVNode;
406
- let i2;
407
- if (node.nodeType === 1 /* ElementNode */) {
408
- childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
409
- if (childNodeType) {
410
- childIdSplt = childNodeType.split(".");
411
- if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
412
- childVNode = {
413
- $flags$: 0,
414
- $hostId$: childIdSplt[0],
415
- $nodeId$: childIdSplt[1],
416
- $depth$: childIdSplt[2],
417
- $index$: childIdSplt[3],
418
- $tag$: node.tagName.toLowerCase(),
419
- $elm$: node,
420
- $attrs$: null,
421
- $children$: null,
422
- $key$: null,
423
- $name$: null,
424
- $text$: null
425
- };
426
- childRenderNodes.push(childVNode);
427
- node.removeAttribute(HYDRATE_CHILD_ID);
428
- if (!parentVNode.$children$) {
429
- parentVNode.$children$ = [];
385
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
386
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
387
+ } else if (memberName === "style") {
388
+ {
389
+ for (const prop in oldValue) {
390
+ if (!newValue || newValue[prop] == null) {
391
+ if (prop.includes("-")) {
392
+ elm.style.removeProperty(prop);
393
+ } else {
394
+ elm.style[prop] = "";
395
+ }
396
+ }
430
397
  }
431
- parentVNode.$children$[childVNode.$index$] = childVNode;
432
- parentVNode = childVNode;
433
- if (shadowRootNodes && childVNode.$depth$ === "0") {
434
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
398
+ }
399
+ for (const prop in newValue) {
400
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
401
+ if (prop.includes("-")) {
402
+ elm.style.setProperty(prop, newValue[prop]);
403
+ } else {
404
+ elm.style[prop] = newValue[prop];
405
+ }
435
406
  }
436
407
  }
437
- }
438
- if (node.shadowRoot) {
439
- for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
440
- clientHydrate(
441
- parentVNode,
442
- childRenderNodes,
443
- slotNodes,
444
- shadowRootNodes,
445
- hostElm,
446
- node.shadowRoot.childNodes[i2],
447
- hostId
448
- );
408
+ } else if (memberName === "key") ; else if (memberName === "ref") {
409
+ if (newValue) {
410
+ newValue(elm);
449
411
  }
450
- }
451
- for (i2 = node.childNodes.length - 1; i2 >= 0; i2--) {
452
- clientHydrate(
453
- parentVNode,
454
- childRenderNodes,
455
- slotNodes,
456
- shadowRootNodes,
457
- hostElm,
458
- node.childNodes[i2],
459
- hostId
460
- );
461
- }
462
- } else if (node.nodeType === 8 /* CommentNode */) {
463
- childIdSplt = node.nodeValue.split(".");
464
- if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
465
- childNodeType = childIdSplt[0];
466
- childVNode = {
467
- $flags$: 0,
468
- $hostId$: childIdSplt[1],
469
- $nodeId$: childIdSplt[2],
470
- $depth$: childIdSplt[3],
471
- $index$: childIdSplt[4],
472
- $elm$: node,
473
- $attrs$: null,
474
- $children$: null,
475
- $key$: null,
476
- $name$: null,
477
- $tag$: null,
478
- $text$: null
479
- };
480
- if (childNodeType === TEXT_NODE_ID) {
481
- childVNode.$elm$ = node.nextSibling;
482
- if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
483
- childVNode.$text$ = childVNode.$elm$.textContent;
484
- childRenderNodes.push(childVNode);
485
- node.remove();
486
- if (!parentVNode.$children$) {
487
- parentVNode.$children$ = [];
488
- }
489
- parentVNode.$children$[childVNode.$index$] = childVNode;
490
- if (shadowRootNodes && childVNode.$depth$ === "0") {
491
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
492
- }
412
+ } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
413
+ if (memberName[2] === "-") {
414
+ memberName = memberName.slice(3);
415
+ } else if (isMemberInElement(win, ln)) {
416
+ memberName = ln.slice(2);
417
+ } else {
418
+ memberName = ln[2] + memberName.slice(3);
419
+ }
420
+ if (oldValue || newValue) {
421
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
422
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
423
+ if (oldValue) {
424
+ plt.rel(elm, memberName, oldValue, capture);
493
425
  }
494
- } else if (childVNode.$hostId$ === hostId) {
495
- if (childNodeType === SLOT_NODE_ID) {
496
- childVNode.$tag$ = "slot";
497
- if (childIdSplt[5]) {
498
- node["s-sn"] = childVNode.$name$ = childIdSplt[5];
499
- } else {
500
- node["s-sn"] = "";
501
- }
502
- node["s-sr"] = true;
503
- if (shadowRootNodes) {
504
- childVNode.$elm$ = doc.createElement(childVNode.$tag$);
505
- if (childVNode.$name$) {
506
- childVNode.$elm$.setAttribute("name", childVNode.$name$);
507
- }
508
- node.parentNode.insertBefore(childVNode.$elm$, node);
509
- node.remove();
510
- if (childVNode.$depth$ === "0") {
511
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
426
+ if (newValue) {
427
+ plt.ael(elm, memberName, newValue, capture);
428
+ }
429
+ }
430
+ } else {
431
+ const isComplex = isComplexType(newValue);
432
+ if ((isProp || isComplex && newValue !== null) && !isSvg) {
433
+ try {
434
+ if (!elm.tagName.includes("-")) {
435
+ const n = newValue == null ? "" : newValue;
436
+ if (memberName === "list") {
437
+ isProp = false;
438
+ } else if (oldValue == null || elm[memberName] != n) {
439
+ if (typeof elm.__lookupSetter__(memberName) === "function") {
440
+ elm[memberName] = n;
441
+ } else {
442
+ elm.setAttribute(memberName, n);
443
+ }
512
444
  }
445
+ } else {
446
+ elm[memberName] = newValue;
513
447
  }
514
- slotNodes.push(childVNode);
515
- if (!parentVNode.$children$) {
516
- parentVNode.$children$ = [];
517
- }
518
- parentVNode.$children$[childVNode.$index$] = childVNode;
519
- } else if (childNodeType === CONTENT_REF_ID) {
520
- if (shadowRootNodes) {
521
- node.remove();
448
+ } catch (e) {
449
+ }
450
+ }
451
+ let xlink = false;
452
+ {
453
+ if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
454
+ memberName = ln;
455
+ xlink = true;
456
+ }
457
+ }
458
+ if (newValue == null || newValue === false) {
459
+ if (newValue !== false || elm.getAttribute(memberName) === "") {
460
+ if (xlink) {
461
+ elm.removeAttributeNS(XLINK_NS, memberName);
522
462
  } else {
523
- hostElm["s-cr"] = node;
524
- node["s-cn"] = true;
463
+ elm.removeAttribute(memberName);
525
464
  }
526
465
  }
466
+ } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
467
+ newValue = newValue === true ? "" : newValue;
468
+ if (xlink) {
469
+ elm.setAttributeNS(XLINK_NS, memberName, newValue);
470
+ } else {
471
+ elm.setAttribute(memberName, newValue);
472
+ }
527
473
  }
528
474
  }
529
- } else if (parentVNode && parentVNode.$tag$ === "style") {
530
- const vnode = newVNode(null, node.textContent);
531
- vnode.$elm$ = node;
532
- vnode.$index$ = "0";
533
- parentVNode.$children$ = [vnode];
534
475
  }
535
476
  };
536
- var initializeDocumentHydrate = (node, orgLocNodes) => {
537
- if (node.nodeType === 1 /* ElementNode */) {
538
- let i2 = 0;
539
- if (node.shadowRoot) {
540
- for (; i2 < node.shadowRoot.childNodes.length; i2++) {
541
- initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
542
- }
543
- }
544
- for (i2 = 0; i2 < node.childNodes.length; i2++) {
545
- initializeDocumentHydrate(node.childNodes[i2], orgLocNodes);
546
- }
547
- } else if (node.nodeType === 8 /* CommentNode */) {
548
- const childIdSplt = node.nodeValue.split(".");
549
- if (childIdSplt[0] === ORG_LOCATION_ID) {
550
- orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
551
- node.nodeValue = "";
552
- node["s-en"] = childIdSplt[3];
553
- }
477
+ var parseClassListRegex = /\s/;
478
+ var parseClassList = (value) => {
479
+ if (typeof value === "object" && "baseVal" in value) {
480
+ value = value.baseVal;
481
+ }
482
+ if (!value) {
483
+ return [];
554
484
  }
485
+ return value.split(parseClassListRegex);
555
486
  };
487
+ var CAPTURE_EVENT_SUFFIX = "Capture";
488
+ var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
556
489
 
557
- // src/runtime/mode.ts
558
- var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
559
- var setMode = (handler) => modeResolutionChain.push(handler);
560
- var getMode = (ref) => getHostRef(ref).$modeName$;
561
- var parsePropertyValue = (propValue, propType) => {
562
- if (propValue != null && !isComplexType(propValue)) {
563
- if (propType & 4 /* Boolean */) {
564
- return propValue === "false" ? false : propValue === "" || !!propValue;
565
- }
566
- if (propType & 2 /* Number */) {
567
- return parseFloat(propValue);
568
- }
569
- if (propType & 1 /* String */) {
570
- return String(propValue);
571
- }
572
- return propValue;
573
- }
574
- return propValue;
575
- };
576
- var getElement = (ref) => getHostRef(ref).$hostElement$ ;
577
-
578
- // src/runtime/event-emitter.ts
579
- var createEvent = (ref, name, flags) => {
580
- const elm = getElement(ref);
581
- return {
582
- emit: (detail) => {
583
- return emitEvent(elm, name, {
584
- bubbles: !!(flags & 4 /* Bubbles */),
585
- composed: !!(flags & 2 /* Composed */),
586
- cancelable: !!(flags & 1 /* Cancellable */),
587
- detail
588
- });
589
- }
590
- };
591
- };
592
- var emitEvent = (elm, name, opts) => {
593
- const ev = plt.ce(name, opts);
594
- elm.dispatchEvent(ev);
595
- return ev;
596
- };
597
- var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
598
- var registerStyle = (scopeId2, cssText, allowCS) => {
599
- let style = styles.get(scopeId2);
600
- if (supportsConstructableStylesheets && allowCS) {
601
- style = style || new CSSStyleSheet();
602
- if (typeof style === "string") {
603
- style = cssText;
604
- } else {
605
- style.replaceSync(cssText);
606
- }
607
- } else {
608
- style = cssText;
609
- }
610
- styles.set(scopeId2, style);
611
- };
612
- var addStyle = (styleContainerNode, cmpMeta, mode) => {
613
- var _a;
614
- const scopeId2 = getScopeId(cmpMeta, mode);
615
- const style = styles.get(scopeId2);
616
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
617
- if (style) {
618
- if (typeof style === "string") {
619
- styleContainerNode = styleContainerNode.head || styleContainerNode;
620
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
621
- let styleElm;
622
- if (!appliedStyles) {
623
- rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
624
- }
625
- if (!appliedStyles.has(scopeId2)) {
626
- if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
627
- styleElm.innerHTML = style;
628
- } else {
629
- styleElm = doc.createElement("style");
630
- styleElm.innerHTML = style;
631
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
632
- if (nonce != null) {
633
- styleElm.setAttribute("nonce", nonce);
634
- }
635
- const injectStyle = (
636
- /**
637
- * we render a scoped component
638
- */
639
- !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) || /**
640
- * we are using shadow dom and render the style tag within the shadowRoot
641
- */
642
- cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD"
643
- );
644
- if (injectStyle) {
645
- styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
646
- }
647
- }
648
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
649
- styleElm.innerHTML += SLOT_FB_CSS;
650
- }
651
- if (appliedStyles) {
652
- appliedStyles.add(scopeId2);
653
- }
654
- }
655
- } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
656
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
657
- }
658
- }
659
- return scopeId2;
660
- };
661
- var attachStyles = (hostRef) => {
662
- const cmpMeta = hostRef.$cmpMeta$;
663
- const elm = hostRef.$hostElement$;
664
- const flags = cmpMeta.$flags$;
665
- const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
666
- const scopeId2 = addStyle(
667
- elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
668
- cmpMeta,
669
- hostRef.$modeName$
670
- );
671
- if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
672
- elm["s-sc"] = scopeId2;
673
- elm.classList.add(scopeId2 + "-h");
674
- if (flags & 2 /* scopedCssEncapsulation */) {
675
- elm.classList.add(scopeId2 + "-s");
676
- }
677
- }
678
- endAttachStyles();
679
- };
680
- var getScopeId = (cmp, mode) => "sc-" + (mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
681
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
682
- if (oldValue !== newValue) {
683
- let isProp = isMemberInElement(elm, memberName);
684
- let ln = memberName.toLowerCase();
685
- if (memberName === "class") {
686
- const classList = elm.classList;
687
- const oldClasses = parseClassList(oldValue);
688
- const newClasses = parseClassList(newValue);
689
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
690
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
691
- } else if (memberName === "style") {
692
- {
693
- for (const prop in oldValue) {
694
- if (!newValue || newValue[prop] == null) {
695
- if (prop.includes("-")) {
696
- elm.style.removeProperty(prop);
697
- } else {
698
- elm.style[prop] = "";
699
- }
700
- }
701
- }
702
- }
703
- for (const prop in newValue) {
704
- if (!oldValue || newValue[prop] !== oldValue[prop]) {
705
- if (prop.includes("-")) {
706
- elm.style.setProperty(prop, newValue[prop]);
707
- } else {
708
- elm.style[prop] = newValue[prop];
709
- }
710
- }
711
- }
712
- } else if (memberName === "key") ; else if (memberName === "ref") {
713
- if (newValue) {
714
- newValue(elm);
715
- }
716
- } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
717
- if (memberName[2] === "-") {
718
- memberName = memberName.slice(3);
719
- } else if (isMemberInElement(win, ln)) {
720
- memberName = ln.slice(2);
721
- } else {
722
- memberName = ln[2] + memberName.slice(3);
723
- }
724
- if (oldValue || newValue) {
725
- const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
726
- memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
727
- if (oldValue) {
728
- plt.rel(elm, memberName, oldValue, capture);
729
- }
730
- if (newValue) {
731
- plt.ael(elm, memberName, newValue, capture);
732
- }
733
- }
734
- } else {
735
- const isComplex = isComplexType(newValue);
736
- if ((isProp || isComplex && newValue !== null) && !isSvg) {
737
- try {
738
- if (!elm.tagName.includes("-")) {
739
- const n = newValue == null ? "" : newValue;
740
- if (memberName === "list") {
741
- isProp = false;
742
- } else if (oldValue == null || elm[memberName] != n) {
743
- elm[memberName] = n;
744
- }
745
- } else {
746
- elm[memberName] = newValue;
747
- }
748
- } catch (e) {
749
- }
750
- }
751
- let xlink = false;
752
- {
753
- if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
754
- memberName = ln;
755
- xlink = true;
756
- }
757
- }
758
- if (newValue == null || newValue === false) {
759
- if (newValue !== false || elm.getAttribute(memberName) === "") {
760
- if (xlink) {
761
- elm.removeAttributeNS(XLINK_NS, memberName);
762
- } else {
763
- elm.removeAttribute(memberName);
764
- }
765
- }
766
- } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
767
- newValue = newValue === true ? "" : newValue;
768
- if (xlink) {
769
- elm.setAttributeNS(XLINK_NS, memberName, newValue);
770
- } else {
771
- elm.setAttribute(memberName, newValue);
772
- }
773
- }
774
- }
775
- }
776
- };
777
- var parseClassListRegex = /\s/;
778
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
779
- var CAPTURE_EVENT_SUFFIX = "Capture";
780
- var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
781
-
782
- // src/runtime/vdom/update-element.ts
783
- var updateElement = (oldVnode, newVnode, isSvgMode2) => {
784
- const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
785
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
786
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
787
- {
788
- for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
789
- if (!(memberName in newVnodeAttrs)) {
790
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
791
- }
490
+ // src/runtime/vdom/update-element.ts
491
+ var updateElement = (oldVnode, newVnode, isSvgMode2) => {
492
+ const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
493
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
494
+ const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
495
+ {
496
+ for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
497
+ if (!(memberName in newVnodeAttrs)) {
498
+ setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
499
+ }
792
500
  }
793
501
  }
794
502
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
@@ -901,8 +609,12 @@ var relocateToHostRoot = (parentElm) => {
901
609
  plt.$flags$ |= 1 /* isTmpDisconnected */;
902
610
  const host = parentElm.closest(hostTagName.toLowerCase());
903
611
  if (host != null) {
904
- const contentRefNode = Array.from(host.childNodes).find((ref) => ref["s-cr"]);
905
- const childNodeArray = Array.from(parentElm.childNodes);
612
+ const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
613
+ (ref) => ref["s-cr"]
614
+ );
615
+ const childNodeArray = Array.from(
616
+ parentElm.__childNodes || parentElm.childNodes
617
+ );
906
618
  for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
907
619
  if (childNode["s-sh"] != null) {
908
620
  insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
@@ -915,7 +627,7 @@ var relocateToHostRoot = (parentElm) => {
915
627
  };
916
628
  var putBackInOriginalLocation = (parentElm, recursive) => {
917
629
  plt.$flags$ |= 1 /* isTmpDisconnected */;
918
- const oldSlotChildNodes = Array.from(parentElm.childNodes);
630
+ const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
919
631
  if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
920
632
  let node = parentElm;
921
633
  while (node = node.nextSibling) {
@@ -1134,7 +846,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1134
846
  }
1135
847
  };
1136
848
  var updateFallbackSlotVisibility = (elm) => {
1137
- const childNodes = elm.childNodes;
849
+ const childNodes = elm.__childNodes || elm.childNodes;
1138
850
  for (const childNode of childNodes) {
1139
851
  if (childNode.nodeType === 1 /* ElementNode */) {
1140
852
  if (childNode["s-sr"]) {
@@ -1147,7 +859,7 @@ var updateFallbackSlotVisibility = (elm) => {
1147
859
  childNode.hidden = true;
1148
860
  break;
1149
861
  }
1150
- } else {
862
+ } else if (slotName === siblingNode["s-sn"]) {
1151
863
  if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
1152
864
  childNode.hidden = true;
1153
865
  break;
@@ -1165,9 +877,10 @@ var markSlotContentForRelocation = (elm) => {
1165
877
  let node;
1166
878
  let hostContentNodes;
1167
879
  let j;
1168
- for (const childNode of elm.childNodes) {
880
+ const children = elm.__childNodes || elm.childNodes;
881
+ for (const childNode of children) {
1169
882
  if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
1170
- hostContentNodes = node.parentNode.childNodes;
883
+ hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
1171
884
  const slotName = childNode["s-sn"];
1172
885
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
1173
886
  node = hostContentNodes[j];
@@ -1254,9 +967,9 @@ var updateElementScopeIds = (element, parent, iterateChildNodes = false) => {
1254
967
  if (element && parent && element.nodeType === 1 /* ElementNode */) {
1255
968
  const scopeIds = new Set(findScopeIds(parent).filter(Boolean));
1256
969
  if (scopeIds.size) {
1257
- (_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] = [...scopeIds]);
970
+ (_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] = Array.from(scopeIds));
1258
971
  if (element["s-ol"] || iterateChildNodes) {
1259
- for (const childNode of Array.from(element.childNodes)) {
972
+ for (const childNode of Array.from(element.__childNodes || element.childNodes)) {
1260
973
  updateElementScopeIds(childNode, element, true);
1261
974
  }
1262
975
  }
@@ -1345,29 +1058,906 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1345
1058
  if (isInitialLoad) {
1346
1059
  nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
1347
1060
  }
1348
- nodeToRelocate.hidden = true;
1061
+ nodeToRelocate.hidden = true;
1062
+ }
1063
+ }
1064
+ }
1065
+ }
1066
+ if (checkSlotFallbackVisibility) {
1067
+ updateFallbackSlotVisibility(rootVnode.$elm$);
1068
+ }
1069
+ plt.$flags$ &= ~1 /* isTmpDisconnected */;
1070
+ relocateNodes.length = 0;
1071
+ }
1072
+ if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1073
+ const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
1074
+ for (const childNode of children) {
1075
+ if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
1076
+ if (isInitialLoad && childNode["s-ih"] == null) {
1077
+ childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
1078
+ }
1079
+ childNode.hidden = true;
1080
+ }
1081
+ }
1082
+ }
1083
+ contentRef = void 0;
1084
+ };
1085
+
1086
+ // src/runtime/dom-extras.ts
1087
+ var patchPseudoShadowDom = (hostElementPrototype) => {
1088
+ patchCloneNode(hostElementPrototype);
1089
+ patchSlotAppendChild(hostElementPrototype);
1090
+ patchSlotAppend(hostElementPrototype);
1091
+ patchSlotPrepend(hostElementPrototype);
1092
+ patchSlotInsertAdjacentElement(hostElementPrototype);
1093
+ patchSlotInsertAdjacentHTML(hostElementPrototype);
1094
+ patchSlotInsertAdjacentText(hostElementPrototype);
1095
+ patchTextContent(hostElementPrototype);
1096
+ patchChildSlotNodes(hostElementPrototype);
1097
+ patchSlotRemoveChild(hostElementPrototype);
1098
+ };
1099
+ var patchCloneNode = (HostElementPrototype) => {
1100
+ const orgCloneNode = HostElementPrototype.cloneNode;
1101
+ HostElementPrototype.cloneNode = function(deep) {
1102
+ const srcNode = this;
1103
+ const isShadowDom = srcNode.shadowRoot && supportsShadow ;
1104
+ const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
1105
+ if (!isShadowDom && deep) {
1106
+ let i2 = 0;
1107
+ let slotted, nonStencilNode;
1108
+ const stencilPrivates = [
1109
+ "s-id",
1110
+ "s-cr",
1111
+ "s-lr",
1112
+ "s-rc",
1113
+ "s-sc",
1114
+ "s-p",
1115
+ "s-cn",
1116
+ "s-sr",
1117
+ "s-sn",
1118
+ "s-hn",
1119
+ "s-ol",
1120
+ "s-nr",
1121
+ "s-si",
1122
+ "s-rf",
1123
+ "s-scs"
1124
+ ];
1125
+ const childNodes = this.__childNodes || this.childNodes;
1126
+ for (; i2 < childNodes.length; i2++) {
1127
+ slotted = childNodes[i2]["s-nr"];
1128
+ nonStencilNode = stencilPrivates.every((privateField) => !childNodes[i2][privateField]);
1129
+ if (slotted) {
1130
+ if (clonedNode.__appendChild) {
1131
+ clonedNode.__appendChild(slotted.cloneNode(true));
1132
+ } else {
1133
+ clonedNode.appendChild(slotted.cloneNode(true));
1134
+ }
1135
+ }
1136
+ if (nonStencilNode) {
1137
+ clonedNode.appendChild(childNodes[i2].cloneNode(true));
1138
+ }
1139
+ }
1140
+ }
1141
+ return clonedNode;
1142
+ };
1143
+ };
1144
+ var patchSlotAppendChild = (HostElementPrototype) => {
1145
+ HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
1146
+ HostElementPrototype.appendChild = function(newChild) {
1147
+ const slotName = newChild["s-sn"] = getSlotName(newChild);
1148
+ const slotNode = getHostSlotNode(this.__childNodes || this.childNodes, slotName, this.tagName);
1149
+ if (slotNode) {
1150
+ addSlotRelocateNode(newChild, slotNode);
1151
+ const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1152
+ const appendAfter = slotChildNodes[slotChildNodes.length - 1];
1153
+ const insertedNode = insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1154
+ updateFallbackSlotVisibility(this);
1155
+ return insertedNode;
1156
+ }
1157
+ return this.__appendChild(newChild);
1158
+ };
1159
+ };
1160
+ var patchSlotRemoveChild = (ElementPrototype) => {
1161
+ ElementPrototype.__removeChild = ElementPrototype.removeChild;
1162
+ ElementPrototype.removeChild = function(toRemove) {
1163
+ if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
1164
+ const childNodes = this.__childNodes || this.childNodes;
1165
+ const slotNode = getHostSlotNode(childNodes, toRemove["s-sn"], this.tagName);
1166
+ if (slotNode && toRemove.isConnected) {
1167
+ toRemove.remove();
1168
+ updateFallbackSlotVisibility(this);
1169
+ return;
1170
+ }
1171
+ }
1172
+ return this.__removeChild(toRemove);
1173
+ };
1174
+ };
1175
+ var patchSlotPrepend = (HostElementPrototype) => {
1176
+ HostElementPrototype.__prepend = HostElementPrototype.prepend;
1177
+ HostElementPrototype.prepend = function(...newChildren) {
1178
+ newChildren.forEach((newChild) => {
1179
+ if (typeof newChild === "string") {
1180
+ newChild = this.ownerDocument.createTextNode(newChild);
1181
+ }
1182
+ const slotName = newChild["s-sn"] = getSlotName(newChild);
1183
+ const childNodes = this.__childNodes || this.childNodes;
1184
+ const slotNode = getHostSlotNode(childNodes, slotName, this.tagName);
1185
+ if (slotNode) {
1186
+ addSlotRelocateNode(newChild, slotNode, true);
1187
+ const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1188
+ const appendAfter = slotChildNodes[0];
1189
+ return insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1190
+ }
1191
+ if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
1192
+ newChild.hidden = true;
1193
+ }
1194
+ return HostElementPrototype.__prepend(newChild);
1195
+ });
1196
+ };
1197
+ };
1198
+ var patchSlotAppend = (HostElementPrototype) => {
1199
+ HostElementPrototype.__append = HostElementPrototype.append;
1200
+ HostElementPrototype.append = function(...newChildren) {
1201
+ newChildren.forEach((newChild) => {
1202
+ if (typeof newChild === "string") {
1203
+ newChild = this.ownerDocument.createTextNode(newChild);
1204
+ }
1205
+ this.appendChild(newChild);
1206
+ });
1207
+ };
1208
+ };
1209
+ var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
1210
+ const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
1211
+ HostElementPrototype.insertAdjacentHTML = function(position, text) {
1212
+ if (position !== "afterbegin" && position !== "beforeend") {
1213
+ return originalInsertAdjacentHtml.call(this, position, text);
1214
+ }
1215
+ const container = this.ownerDocument.createElement("_");
1216
+ let node;
1217
+ container.innerHTML = text;
1218
+ if (position === "afterbegin") {
1219
+ while (node = container.firstChild) {
1220
+ this.prepend(node);
1221
+ }
1222
+ } else if (position === "beforeend") {
1223
+ while (node = container.firstChild) {
1224
+ this.append(node);
1225
+ }
1226
+ }
1227
+ };
1228
+ };
1229
+ var patchSlotInsertAdjacentText = (HostElementPrototype) => {
1230
+ HostElementPrototype.insertAdjacentText = function(position, text) {
1231
+ this.insertAdjacentHTML(position, text);
1232
+ };
1233
+ };
1234
+ var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
1235
+ const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
1236
+ HostElementPrototype.insertAdjacentElement = function(position, element) {
1237
+ if (position !== "afterbegin" && position !== "beforeend") {
1238
+ return originalInsertAdjacentElement.call(this, position, element);
1239
+ }
1240
+ if (position === "afterbegin") {
1241
+ this.prepend(element);
1242
+ return element;
1243
+ } else if (position === "beforeend") {
1244
+ this.append(element);
1245
+ return element;
1246
+ }
1247
+ return element;
1248
+ };
1249
+ };
1250
+ var patchTextContent = (hostElementPrototype) => {
1251
+ patchHostOriginalAccessor("textContent", hostElementPrototype);
1252
+ Object.defineProperty(hostElementPrototype, "textContent", {
1253
+ get: function() {
1254
+ let text = "";
1255
+ const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
1256
+ childNodes.forEach((node) => text += node.textContent || "");
1257
+ return text;
1258
+ },
1259
+ set: function(value) {
1260
+ const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
1261
+ childNodes.forEach((node) => {
1262
+ if (node["s-ol"]) node["s-ol"].remove();
1263
+ node.remove();
1264
+ });
1265
+ this.insertAdjacentHTML("beforeend", value);
1266
+ }
1267
+ });
1268
+ };
1269
+ var patchChildSlotNodes = (elm) => {
1270
+ class FakeNodeList extends Array {
1271
+ item(n) {
1272
+ return this[n];
1273
+ }
1274
+ }
1275
+ patchHostOriginalAccessor("children", elm);
1276
+ Object.defineProperty(elm, "children", {
1277
+ get() {
1278
+ return this.childNodes.filter((n) => n.nodeType === 1);
1279
+ }
1280
+ });
1281
+ Object.defineProperty(elm, "childElementCount", {
1282
+ get() {
1283
+ return this.children.length;
1284
+ }
1285
+ });
1286
+ patchHostOriginalAccessor("firstChild", elm);
1287
+ Object.defineProperty(elm, "firstChild", {
1288
+ get() {
1289
+ return this.childNodes[0];
1290
+ }
1291
+ });
1292
+ patchHostOriginalAccessor("lastChild", elm);
1293
+ Object.defineProperty(elm, "lastChild", {
1294
+ get() {
1295
+ return this.childNodes[this.childNodes.length - 1];
1296
+ }
1297
+ });
1298
+ patchHostOriginalAccessor("childNodes", elm);
1299
+ Object.defineProperty(elm, "childNodes", {
1300
+ get() {
1301
+ var _a, _b;
1302
+ if (!plt.$flags$ || !((_a = getHostRef(this)) == null ? void 0 : _a.$flags$) || (plt.$flags$ & 1 /* isTmpDisconnected */) === 0 && ((_b = getHostRef(this)) == null ? void 0 : _b.$flags$) & 2 /* hasRendered */) {
1303
+ const result = new FakeNodeList();
1304
+ const nodes = getSlottedChildNodes(this.__childNodes);
1305
+ result.push(...nodes);
1306
+ return result;
1307
+ }
1308
+ return FakeNodeList.from(this.__childNodes);
1309
+ }
1310
+ });
1311
+ };
1312
+ var patchNextPrev = (node) => {
1313
+ if (!node || node.__nextSibling || !globalThis.Node) return;
1314
+ patchNextSibling(node);
1315
+ patchPreviousSibling(node);
1316
+ if (node.nodeType === Node.ELEMENT_NODE) {
1317
+ patchNextElementSibling(node);
1318
+ patchPreviousElementSibling(node);
1319
+ }
1320
+ };
1321
+ var patchNextSibling = (node) => {
1322
+ if (!node || node.__nextSibling) return;
1323
+ patchHostOriginalAccessor("nextSibling", node);
1324
+ Object.defineProperty(node, "nextSibling", {
1325
+ get: function() {
1326
+ var _a;
1327
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
1328
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1329
+ if (parentNodes && index > -1) {
1330
+ return parentNodes[index + 1];
1331
+ }
1332
+ return this.__nextSibling;
1333
+ }
1334
+ });
1335
+ };
1336
+ var patchNextElementSibling = (element) => {
1337
+ if (!element || element.__nextElementSibling) return;
1338
+ patchHostOriginalAccessor("nextElementSibling", element);
1339
+ Object.defineProperty(element, "nextElementSibling", {
1340
+ get: function() {
1341
+ var _a;
1342
+ const parentEles = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
1343
+ const index = parentEles == null ? void 0 : parentEles.indexOf(this);
1344
+ if (parentEles && index > -1) {
1345
+ return parentEles[index + 1];
1346
+ }
1347
+ return this.__nextElementSibling;
1348
+ }
1349
+ });
1350
+ };
1351
+ var patchPreviousSibling = (node) => {
1352
+ if (!node || node.__previousSibling) return;
1353
+ patchHostOriginalAccessor("previousSibling", node);
1354
+ Object.defineProperty(node, "previousSibling", {
1355
+ get: function() {
1356
+ var _a;
1357
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
1358
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1359
+ if (parentNodes && index > -1) {
1360
+ return parentNodes[index - 1];
1361
+ }
1362
+ return this.__previousSibling;
1363
+ }
1364
+ });
1365
+ };
1366
+ var patchPreviousElementSibling = (element) => {
1367
+ if (!element || element.__previousElementSibling) return;
1368
+ patchHostOriginalAccessor("previousElementSibling", element);
1369
+ Object.defineProperty(element, "previousElementSibling", {
1370
+ get: function() {
1371
+ var _a;
1372
+ const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
1373
+ const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1374
+ if (parentNodes && index > -1) {
1375
+ return parentNodes[index - 1];
1376
+ }
1377
+ return this.__previousElementSibling;
1378
+ }
1379
+ });
1380
+ };
1381
+ var validElementPatches = ["children", "nextElementSibling", "previousElementSibling"];
1382
+ var validNodesPatches = [
1383
+ "childNodes",
1384
+ "firstChild",
1385
+ "lastChild",
1386
+ "nextSibling",
1387
+ "previousSibling",
1388
+ "textContent"
1389
+ ];
1390
+ function patchHostOriginalAccessor(accessorName, node) {
1391
+ let accessor;
1392
+ if (validElementPatches.includes(accessorName)) {
1393
+ accessor = Object.getOwnPropertyDescriptor(Element.prototype, accessorName);
1394
+ } else if (validNodesPatches.includes(accessorName)) {
1395
+ accessor = Object.getOwnPropertyDescriptor(Node.prototype, accessorName);
1396
+ }
1397
+ if (!accessor) {
1398
+ accessor = Object.getOwnPropertyDescriptor(node, accessorName);
1399
+ }
1400
+ if (accessor) Object.defineProperty(node, "__" + accessorName, accessor);
1401
+ }
1402
+ var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
1403
+ let slottedNodeLocation;
1404
+ if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
1405
+ slottedNodeLocation = newChild["s-ol"];
1406
+ } else {
1407
+ slottedNodeLocation = document.createTextNode("");
1408
+ slottedNodeLocation["s-nr"] = newChild;
1409
+ }
1410
+ if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
1411
+ const parent = slotNode["s-cr"].parentNode;
1412
+ const appendMethod = prepend ? parent.__prepend || parent.prepend : parent.__appendChild || parent.appendChild;
1413
+ if (typeof position !== "undefined") {
1414
+ {
1415
+ slottedNodeLocation["s-oo"] = position;
1416
+ const childNodes = parent.__childNodes || parent.childNodes;
1417
+ const slotRelocateNodes = [slottedNodeLocation];
1418
+ childNodes.forEach((n) => {
1419
+ if (n["s-nr"]) slotRelocateNodes.push(n);
1420
+ });
1421
+ slotRelocateNodes.sort((a, b) => {
1422
+ if (!a["s-oo"] || a["s-oo"] < b["s-oo"]) return -1;
1423
+ else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
1424
+ return 0;
1425
+ });
1426
+ slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
1427
+ }
1428
+ } else {
1429
+ appendMethod.call(parent, slottedNodeLocation);
1430
+ }
1431
+ newChild["s-ol"] = slottedNodeLocation;
1432
+ newChild["s-sh"] = slotNode["s-hn"];
1433
+ };
1434
+ var getSlottedChildNodes = (childNodes) => {
1435
+ const result = [];
1436
+ for (let i2 = 0; i2 < childNodes.length; i2++) {
1437
+ const slottedNode = childNodes[i2]["s-nr"];
1438
+ if (slottedNode && slottedNode.isConnected) {
1439
+ result.push(slottedNode);
1440
+ }
1441
+ }
1442
+ return result;
1443
+ };
1444
+ var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
1445
+ var getHostSlotNode = (childNodes, slotName, hostName) => {
1446
+ let i2 = 0;
1447
+ let childNode;
1448
+ for (; i2 < childNodes.length; i2++) {
1449
+ childNode = childNodes[i2];
1450
+ if (childNode["s-sr"] && childNode["s-sn"] === slotName && childNode["s-hn"] === hostName) {
1451
+ return childNode;
1452
+ }
1453
+ childNode = getHostSlotNode(childNode.childNodes, slotName, hostName);
1454
+ if (childNode) {
1455
+ return childNode;
1456
+ }
1457
+ }
1458
+ return null;
1459
+ };
1460
+ var getHostSlotChildNodes = (n, slotName) => {
1461
+ const childNodes = [n];
1462
+ while ((n = n.nextSibling) && n["s-sn"] === slotName) {
1463
+ childNodes.push(n);
1464
+ }
1465
+ return childNodes;
1466
+ };
1467
+ var createTime = (fnName, tagName = "") => {
1468
+ {
1469
+ return () => {
1470
+ return;
1471
+ };
1472
+ }
1473
+ };
1474
+ var uniqueTime = (key, measureText) => {
1475
+ {
1476
+ return () => {
1477
+ return;
1478
+ };
1479
+ }
1480
+ };
1481
+
1482
+ // src/runtime/client-hydrate.ts
1483
+ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1484
+ const endHydrate = createTime("hydrateClient", tagName);
1485
+ const shadowRoot = hostElm.shadowRoot;
1486
+ const childRenderNodes = [];
1487
+ const slotNodes = [];
1488
+ const slottedNodes = [];
1489
+ const shadowRootNodes = shadowRoot ? [] : null;
1490
+ const vnode = newVNode(tagName, null);
1491
+ vnode.$elm$ = hostElm;
1492
+ if (!plt.$orgLocNodes$) {
1493
+ initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
1494
+ }
1495
+ hostElm[HYDRATE_ID] = hostId;
1496
+ hostElm.removeAttribute(HYDRATE_ID);
1497
+ hostRef.$vnode$ = clientHydrate(
1498
+ vnode,
1499
+ childRenderNodes,
1500
+ slotNodes,
1501
+ shadowRootNodes,
1502
+ hostElm,
1503
+ hostElm,
1504
+ hostId,
1505
+ slottedNodes
1506
+ );
1507
+ let crIndex = 0;
1508
+ const crLength = childRenderNodes.length;
1509
+ let childRenderNode;
1510
+ for (crIndex; crIndex < crLength; crIndex++) {
1511
+ childRenderNode = childRenderNodes[crIndex];
1512
+ const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
1513
+ const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
1514
+ const node = childRenderNode.$elm$;
1515
+ if (!shadowRoot) {
1516
+ node["s-hn"] = tagName.toUpperCase();
1517
+ if (childRenderNode.$tag$ === "slot") {
1518
+ node["s-cr"] = hostElm["s-cr"];
1519
+ }
1520
+ }
1521
+ if (orgLocationNode && orgLocationNode.isConnected) {
1522
+ if (shadowRoot && orgLocationNode["s-en"] === "") {
1523
+ orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
1524
+ }
1525
+ orgLocationNode.parentNode.removeChild(orgLocationNode);
1526
+ if (!shadowRoot) {
1527
+ node["s-oo"] = parseInt(childRenderNode.$nodeId$);
1528
+ }
1529
+ }
1530
+ plt.$orgLocNodes$.delete(orgLocationId);
1531
+ }
1532
+ const hosts = [];
1533
+ let snIndex = 0;
1534
+ const snLen = slottedNodes.length;
1535
+ let slotGroup;
1536
+ let snGroupIdx;
1537
+ let snGroupLen;
1538
+ let slottedItem;
1539
+ for (snIndex; snIndex < snLen; snIndex++) {
1540
+ slotGroup = slottedNodes[snIndex];
1541
+ if (!slotGroup || !slotGroup.length) continue;
1542
+ snGroupLen = slotGroup.length;
1543
+ snGroupIdx = 0;
1544
+ for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
1545
+ slottedItem = slotGroup[snGroupIdx];
1546
+ if (!hosts[slottedItem.hostId]) {
1547
+ hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
1548
+ }
1549
+ if (!hosts[slottedItem.hostId]) continue;
1550
+ const hostEle = hosts[slottedItem.hostId];
1551
+ if (!hostEle.shadowRoot || !shadowRoot) {
1552
+ slottedItem.slot["s-cr"] = hostEle["s-cr"];
1553
+ if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
1554
+ slottedItem.slot["s-cr"] = hostEle;
1555
+ } else {
1556
+ const hostChildren = hostEle.__childNodes || hostEle.childNodes;
1557
+ slottedItem.slot["s-cr"] = hostChildren[0];
1558
+ }
1559
+ addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
1560
+ {
1561
+ patchNextPrev(slottedItem.node);
1562
+ }
1563
+ }
1564
+ if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
1565
+ hostEle.appendChild(slottedItem.node);
1566
+ }
1567
+ }
1568
+ }
1569
+ if (shadowRoot) {
1570
+ let rnIdex = 0;
1571
+ const rnLen = shadowRootNodes.length;
1572
+ for (rnIdex; rnIdex < rnLen; rnIdex++) {
1573
+ shadowRoot.appendChild(shadowRootNodes[rnIdex]);
1574
+ }
1575
+ Array.from(hostElm.childNodes).forEach((node) => {
1576
+ if (node.nodeType === 8 /* CommentNode */ && typeof node["s-sn"] !== "string") {
1577
+ node.parentNode.removeChild(node);
1578
+ }
1579
+ });
1580
+ }
1581
+ hostRef.$hostElement$ = hostElm;
1582
+ endHydrate();
1583
+ };
1584
+ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
1585
+ let childNodeType;
1586
+ let childIdSplt;
1587
+ let childVNode;
1588
+ let i2;
1589
+ const scopeId2 = hostElm["s-sc"];
1590
+ if (node.nodeType === 1 /* ElementNode */) {
1591
+ childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
1592
+ if (childNodeType) {
1593
+ childIdSplt = childNodeType.split(".");
1594
+ if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
1595
+ childVNode = createSimpleVNode({
1596
+ $flags$: 0,
1597
+ $hostId$: childIdSplt[0],
1598
+ $nodeId$: childIdSplt[1],
1599
+ $depth$: childIdSplt[2],
1600
+ $index$: childIdSplt[3],
1601
+ $tag$: node.tagName.toLowerCase(),
1602
+ $elm$: node,
1603
+ // If we don't add the initial classes to the VNode, the first `vdom-render.ts` reconciliation will fail:
1604
+ // client side changes before componentDidLoad will be ignored, `set-accessor.ts` will just take the element's initial classes
1605
+ $attrs$: { class: node.className }
1606
+ });
1607
+ childRenderNodes.push(childVNode);
1608
+ node.removeAttribute(HYDRATE_CHILD_ID);
1609
+ if (!parentVNode.$children$) {
1610
+ parentVNode.$children$ = [];
1611
+ }
1612
+ const slotName = childVNode.$elm$.getAttribute("s-sn");
1613
+ if (typeof slotName === "string") {
1614
+ if (childVNode.$tag$ === "slot-fb") {
1615
+ addSlot(
1616
+ slotName,
1617
+ childIdSplt[2],
1618
+ childVNode,
1619
+ node,
1620
+ parentVNode,
1621
+ childRenderNodes,
1622
+ slotNodes,
1623
+ shadowRootNodes,
1624
+ slottedNodes
1625
+ );
1626
+ }
1627
+ childVNode.$elm$["s-sn"] = slotName;
1628
+ childVNode.$elm$.removeAttribute("s-sn");
1629
+ }
1630
+ if (childVNode.$index$ !== void 0) {
1631
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1632
+ }
1633
+ if (scopeId2) node["s-si"] = scopeId2;
1634
+ parentVNode = childVNode;
1635
+ if (shadowRootNodes && childVNode.$depth$ === "0") {
1636
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1637
+ }
1638
+ }
1639
+ }
1640
+ if (node.shadowRoot) {
1641
+ for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
1642
+ clientHydrate(
1643
+ parentVNode,
1644
+ childRenderNodes,
1645
+ slotNodes,
1646
+ shadowRootNodes,
1647
+ hostElm,
1648
+ node.shadowRoot.childNodes[i2],
1649
+ hostId,
1650
+ slottedNodes
1651
+ );
1652
+ }
1653
+ }
1654
+ const nonShadowNodes = node.__childNodes || node.childNodes;
1655
+ for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
1656
+ clientHydrate(
1657
+ parentVNode,
1658
+ childRenderNodes,
1659
+ slotNodes,
1660
+ shadowRootNodes,
1661
+ hostElm,
1662
+ nonShadowNodes[i2],
1663
+ hostId,
1664
+ slottedNodes
1665
+ );
1666
+ }
1667
+ } else if (node.nodeType === 8 /* CommentNode */) {
1668
+ childIdSplt = node.nodeValue.split(".");
1669
+ if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
1670
+ childNodeType = childIdSplt[0];
1671
+ childVNode = createSimpleVNode({
1672
+ $hostId$: childIdSplt[1],
1673
+ $nodeId$: childIdSplt[2],
1674
+ $depth$: childIdSplt[3],
1675
+ $index$: childIdSplt[4] || "0",
1676
+ $elm$: node,
1677
+ $attrs$: null,
1678
+ $children$: null,
1679
+ $key$: null,
1680
+ $name$: null,
1681
+ $tag$: null,
1682
+ $text$: null
1683
+ });
1684
+ if (childNodeType === TEXT_NODE_ID) {
1685
+ childVNode.$elm$ = node.nextSibling;
1686
+ if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
1687
+ childVNode.$text$ = childVNode.$elm$.textContent;
1688
+ childRenderNodes.push(childVNode);
1689
+ node.remove();
1690
+ if (hostId === childVNode.$hostId$) {
1691
+ if (!parentVNode.$children$) {
1692
+ parentVNode.$children$ = [];
1693
+ }
1694
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1695
+ }
1696
+ if (shadowRootNodes && childVNode.$depth$ === "0") {
1697
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1698
+ }
1699
+ }
1700
+ } else if (childNodeType === COMMENT_NODE_ID) {
1701
+ childVNode.$elm$ = node.nextSibling;
1702
+ if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
1703
+ childRenderNodes.push(childVNode);
1704
+ node.remove();
1705
+ }
1706
+ } else if (childVNode.$hostId$ === hostId) {
1707
+ if (childNodeType === SLOT_NODE_ID) {
1708
+ childVNode.$tag$ = "slot";
1709
+ const slotName = node["s-sn"] = childVNode.$name$ = childIdSplt[5] || "";
1710
+ addSlot(
1711
+ slotName,
1712
+ childIdSplt[2],
1713
+ childVNode,
1714
+ node,
1715
+ parentVNode,
1716
+ childRenderNodes,
1717
+ slotNodes,
1718
+ shadowRootNodes,
1719
+ slottedNodes
1720
+ );
1721
+ } else if (childNodeType === CONTENT_REF_ID) {
1722
+ if (shadowRootNodes) {
1723
+ node.remove();
1724
+ } else {
1725
+ hostElm["s-cr"] = node;
1726
+ node["s-cn"] = true;
1727
+ }
1728
+ }
1729
+ }
1730
+ }
1731
+ } else if (parentVNode && parentVNode.$tag$ === "style") {
1732
+ const vnode = newVNode(null, node.textContent);
1733
+ vnode.$elm$ = node;
1734
+ vnode.$index$ = "0";
1735
+ parentVNode.$children$ = [vnode];
1736
+ }
1737
+ return parentVNode;
1738
+ };
1739
+ var initializeDocumentHydrate = (node, orgLocNodes) => {
1740
+ if (node.nodeType === 1 /* ElementNode */) {
1741
+ const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
1742
+ if (componentId) {
1743
+ orgLocNodes.set(componentId, node);
1744
+ }
1745
+ let i2 = 0;
1746
+ if (node.shadowRoot) {
1747
+ for (; i2 < node.shadowRoot.childNodes.length; i2++) {
1748
+ initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
1749
+ }
1750
+ }
1751
+ const nonShadowNodes = node.__childNodes || node.childNodes;
1752
+ for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
1753
+ initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
1754
+ }
1755
+ } else if (node.nodeType === 8 /* CommentNode */) {
1756
+ const childIdSplt = node.nodeValue.split(".");
1757
+ if (childIdSplt[0] === ORG_LOCATION_ID) {
1758
+ orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
1759
+ node.nodeValue = "";
1760
+ node["s-en"] = childIdSplt[3];
1761
+ }
1762
+ }
1763
+ };
1764
+ var createSimpleVNode = (vnode) => {
1765
+ const defaultVNode = {
1766
+ $flags$: 0,
1767
+ $hostId$: null,
1768
+ $nodeId$: null,
1769
+ $depth$: null,
1770
+ $index$: "0",
1771
+ $elm$: null,
1772
+ $attrs$: null,
1773
+ $children$: null,
1774
+ $key$: null,
1775
+ $name$: null,
1776
+ $tag$: null,
1777
+ $text$: null
1778
+ };
1779
+ return { ...defaultVNode, ...vnode };
1780
+ };
1781
+ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
1782
+ node["s-sr"] = true;
1783
+ const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
1784
+ if (shadowRootNodes) {
1785
+ const slot = childVNode.$elm$ = doc.createElement(childVNode.$tag$);
1786
+ if (childVNode.$name$) {
1787
+ childVNode.$elm$.setAttribute("name", slotName);
1788
+ }
1789
+ if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
1790
+ parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1791
+ } else {
1792
+ node.parentNode.insertBefore(childVNode.$elm$, node);
1793
+ }
1794
+ addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
1795
+ node.remove();
1796
+ if (childVNode.$depth$ === "0") {
1797
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1798
+ }
1799
+ } else {
1800
+ const slot = childVNode.$elm$;
1801
+ const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
1802
+ addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
1803
+ if (shouldMove) {
1804
+ parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1805
+ }
1806
+ childRenderNodes.push(childVNode);
1807
+ }
1808
+ slotNodes.push(childVNode);
1809
+ if (!parentVNode.$children$) {
1810
+ parentVNode.$children$ = [];
1811
+ }
1812
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1813
+ }
1814
+ var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
1815
+ let slottedNode = slotNode.nextSibling;
1816
+ slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
1817
+ 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 */))) {
1818
+ slottedNode["s-sn"] = slotName;
1819
+ slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
1820
+ slottedNode = slottedNode.nextSibling;
1821
+ }
1822
+ };
1823
+
1824
+ // src/runtime/mode.ts
1825
+ var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
1826
+ var setMode = (handler) => modeResolutionChain.push(handler);
1827
+ var getMode = (ref) => getHostRef(ref).$modeName$;
1828
+ var parsePropertyValue = (propValue, propType) => {
1829
+ if (propValue != null && !isComplexType(propValue)) {
1830
+ if (propType & 4 /* Boolean */) {
1831
+ return propValue === "false" ? false : propValue === "" || !!propValue;
1832
+ }
1833
+ if (propType & 2 /* Number */) {
1834
+ return parseFloat(propValue);
1835
+ }
1836
+ if (propType & 1 /* String */) {
1837
+ return String(propValue);
1838
+ }
1839
+ return propValue;
1840
+ }
1841
+ return propValue;
1842
+ };
1843
+ var getElement = (ref) => getHostRef(ref).$hostElement$ ;
1844
+
1845
+ // src/runtime/event-emitter.ts
1846
+ var createEvent = (ref, name, flags) => {
1847
+ const elm = getElement(ref);
1848
+ return {
1849
+ emit: (detail) => {
1850
+ return emitEvent(elm, name, {
1851
+ bubbles: !!(flags & 4 /* Bubbles */),
1852
+ composed: !!(flags & 2 /* Composed */),
1853
+ cancelable: !!(flags & 1 /* Cancellable */),
1854
+ detail
1855
+ });
1856
+ }
1857
+ };
1858
+ };
1859
+ var emitEvent = (elm, name, opts) => {
1860
+ const ev = plt.ce(name, opts);
1861
+ elm.dispatchEvent(ev);
1862
+ return ev;
1863
+ };
1864
+ var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
1865
+ var registerStyle = (scopeId2, cssText, allowCS) => {
1866
+ let style = styles.get(scopeId2);
1867
+ if (supportsConstructableStylesheets && allowCS) {
1868
+ style = style || new CSSStyleSheet();
1869
+ if (typeof style === "string") {
1870
+ style = cssText;
1871
+ } else {
1872
+ style.replaceSync(cssText);
1873
+ }
1874
+ } else {
1875
+ style = cssText;
1876
+ }
1877
+ styles.set(scopeId2, style);
1878
+ };
1879
+ var addStyle = (styleContainerNode, cmpMeta, mode) => {
1880
+ var _a;
1881
+ const scopeId2 = getScopeId(cmpMeta, mode);
1882
+ const style = styles.get(scopeId2);
1883
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
1884
+ if (style) {
1885
+ if (typeof style === "string") {
1886
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
1887
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
1888
+ let styleElm;
1889
+ if (!appliedStyles) {
1890
+ rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
1891
+ }
1892
+ if (!appliedStyles.has(scopeId2)) {
1893
+ if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
1894
+ styleElm.innerHTML = style;
1895
+ } else {
1896
+ styleElm = doc.createElement("style");
1897
+ styleElm.innerHTML = style;
1898
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
1899
+ if (nonce != null) {
1900
+ styleElm.setAttribute("nonce", nonce);
1901
+ }
1902
+ if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
1903
+ if (styleContainerNode.nodeName === "HEAD") {
1904
+ const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
1905
+ const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
1906
+ styleContainerNode.insertBefore(styleElm, referenceNode2);
1907
+ } else if ("host" in styleContainerNode) {
1908
+ if (supportsConstructableStylesheets) {
1909
+ const stylesheet = new CSSStyleSheet();
1910
+ stylesheet.replaceSync(style);
1911
+ styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
1912
+ } else {
1913
+ const existingStyleContainer = styleContainerNode.querySelector("style");
1914
+ if (existingStyleContainer) {
1915
+ existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
1916
+ } else {
1917
+ styleContainerNode.prepend(styleElm);
1918
+ }
1919
+ }
1920
+ } else {
1921
+ styleContainerNode.append(styleElm);
1922
+ }
1923
+ }
1924
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
1925
+ styleContainerNode.insertBefore(styleElm, null);
1349
1926
  }
1350
1927
  }
1928
+ if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
1929
+ styleElm.innerHTML += SLOT_FB_CSS;
1930
+ }
1931
+ if (appliedStyles) {
1932
+ appliedStyles.add(scopeId2);
1933
+ }
1351
1934
  }
1935
+ } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
1936
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
1352
1937
  }
1353
- if (checkSlotFallbackVisibility) {
1354
- updateFallbackSlotVisibility(rootVnode.$elm$);
1355
- }
1356
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
1357
- relocateNodes.length = 0;
1358
1938
  }
1359
- if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1360
- for (const childNode of rootVnode.$elm$.childNodes) {
1361
- if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
1362
- if (isInitialLoad && childNode["s-ih"] == null) {
1363
- childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
1364
- }
1365
- childNode.hidden = true;
1366
- }
1939
+ return scopeId2;
1940
+ };
1941
+ var attachStyles = (hostRef) => {
1942
+ const cmpMeta = hostRef.$cmpMeta$;
1943
+ const elm = hostRef.$hostElement$;
1944
+ const flags = cmpMeta.$flags$;
1945
+ const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
1946
+ const scopeId2 = addStyle(
1947
+ elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
1948
+ cmpMeta,
1949
+ hostRef.$modeName$
1950
+ );
1951
+ if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
1952
+ elm["s-sc"] = scopeId2;
1953
+ elm.classList.add(scopeId2 + "-h");
1954
+ if (flags & 2 /* scopedCssEncapsulation */) {
1955
+ elm.classList.add(scopeId2 + "-s");
1367
1956
  }
1368
1957
  }
1369
- contentRef = void 0;
1958
+ endAttachStyles();
1370
1959
  };
1960
+ var getScopeId = (cmp, mode) => "sc-" + (mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
1371
1961
 
1372
1962
  // src/runtime/update-component.ts
1373
1963
  var attachToAncestor = (hostRef, ancestorComponent) => {
@@ -1595,16 +2185,62 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1595
2185
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1596
2186
  members.map(([memberName, [memberFlags]]) => {
1597
2187
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
1598
- Object.defineProperty(prototype, memberName, {
1599
- get() {
1600
- return getValue(this, memberName);
1601
- },
1602
- set(newValue) {
1603
- setValue(this, memberName, newValue, cmpMeta);
1604
- },
1605
- configurable: true,
1606
- enumerable: true
1607
- });
2188
+ if ((memberFlags & 2048 /* Getter */) === 0) {
2189
+ Object.defineProperty(prototype, memberName, {
2190
+ get() {
2191
+ return getValue(this, memberName);
2192
+ },
2193
+ set(newValue) {
2194
+ setValue(this, memberName, newValue, cmpMeta);
2195
+ },
2196
+ configurable: true,
2197
+ enumerable: true
2198
+ });
2199
+ } else if (flags & 1 /* isElementConstructor */ && memberFlags & 2048 /* Getter */) {
2200
+ {
2201
+ Object.defineProperty(prototype, memberName, {
2202
+ get() {
2203
+ const ref = getHostRef(this);
2204
+ const instance = ref ? ref.$lazyInstance$ : prototype;
2205
+ if (!instance) return;
2206
+ return instance[memberName];
2207
+ },
2208
+ configurable: true,
2209
+ enumerable: true
2210
+ });
2211
+ }
2212
+ if (memberFlags & 4096 /* Setter */) {
2213
+ const origSetter = Object.getOwnPropertyDescriptor(prototype, memberName).set;
2214
+ Object.defineProperty(prototype, memberName, {
2215
+ set(newValue) {
2216
+ const ref = getHostRef(this);
2217
+ if (origSetter) {
2218
+ const currentValue = ref.$hostElement$[memberName];
2219
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
2220
+ ref.$instanceValues$.set(memberName, currentValue);
2221
+ }
2222
+ origSetter.apply(this, [parsePropertyValue(newValue, cmpMeta.$members$[memberName][0])]);
2223
+ setValue(this, memberName, ref.$hostElement$[memberName], cmpMeta);
2224
+ return;
2225
+ }
2226
+ if (!ref) return;
2227
+ const setterSetVal = () => {
2228
+ const currentValue = ref.$lazyInstance$[memberName];
2229
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
2230
+ ref.$instanceValues$.set(memberName, currentValue);
2231
+ }
2232
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, cmpMeta.$members$[memberName][0]);
2233
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
2234
+ };
2235
+ if (ref.$lazyInstance$) {
2236
+ setterSetVal();
2237
+ } else {
2238
+ ref.$onReadyPromise$.then(() => setterSetVal());
2239
+ }
2240
+ }
2241
+ });
2242
+ }
2243
+ }
1608
2244
  } else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
1609
2245
  Object.defineProperty(prototype, memberName, {
1610
2246
  value(...args) {
@@ -1644,7 +2280,10 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1644
2280
  }
1645
2281
  return;
1646
2282
  }
1647
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2283
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
2284
+ if (!propDesc.get || !!propDesc.set) {
2285
+ this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2286
+ }
1648
2287
  });
1649
2288
  };
1650
2289
  Cstr.observedAttributes = Array.from(
@@ -1760,6 +2399,9 @@ var connectedCallback = (elm) => {
1760
2399
  if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1761
2400
  const scopeId2 = addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) ;
1762
2401
  elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
2402
+ } else if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2403
+ const scopeId2 = getScopeId(cmpMeta, elm.getAttribute("s-mode") );
2404
+ elm["s-sc"] = scopeId2;
1763
2405
  }
1764
2406
  initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
1765
2407
  }
@@ -1810,9 +2452,13 @@ var setContentReference = (elm) => {
1810
2452
  insertBefore(elm, contentRefElm, elm.firstChild);
1811
2453
  };
1812
2454
  var disconnectInstance = (instance) => {
2455
+ const callbackResult = [];
1813
2456
  {
1814
- safeCall(instance, "disconnectedCallback");
2457
+ callbackResult.push(safeCall(instance, "disconnectedCallback"));
1815
2458
  }
2459
+ Promise.all(
2460
+ callbackResult.filter((item) => typeof item === "object").filter((promise) => "then" in promise && typeof promise.then === "function")
2461
+ ).finally(() => setTimeout(() => hostRefCleanup()));
1816
2462
  };
1817
2463
  var disconnectedCallback = async (elm) => {
1818
2464
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
@@ -1827,289 +2473,16 @@ var disconnectedCallback = async (elm) => {
1827
2473
  disconnectInstance(hostRef.$lazyInstance$);
1828
2474
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1829
2475
  hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
2476
+ } else {
2477
+ setTimeout(() => hostRefCleanup());
1830
2478
  }
1831
2479
  }
1832
- };
1833
- var patchPseudoShadowDom = (hostElementPrototype, descriptorPrototype) => {
1834
- patchCloneNode(hostElementPrototype);
1835
- patchSlotAppendChild(hostElementPrototype);
1836
- patchSlotAppend(hostElementPrototype);
1837
- patchSlotPrepend(hostElementPrototype);
1838
- patchSlotInsertAdjacentElement(hostElementPrototype);
1839
- patchSlotInsertAdjacentHTML(hostElementPrototype);
1840
- patchSlotInsertAdjacentText(hostElementPrototype);
1841
- patchTextContent(hostElementPrototype);
1842
- patchChildSlotNodes(hostElementPrototype, descriptorPrototype);
1843
- patchSlotRemoveChild(hostElementPrototype);
1844
- };
1845
- var patchCloneNode = (HostElementPrototype) => {
1846
- const orgCloneNode = HostElementPrototype.cloneNode;
1847
- HostElementPrototype.cloneNode = function(deep) {
1848
- const srcNode = this;
1849
- const isShadowDom = srcNode.shadowRoot && supportsShadow ;
1850
- const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
1851
- if (!isShadowDom && deep) {
1852
- let i2 = 0;
1853
- let slotted, nonStencilNode;
1854
- const stencilPrivates = [
1855
- "s-id",
1856
- "s-cr",
1857
- "s-lr",
1858
- "s-rc",
1859
- "s-sc",
1860
- "s-p",
1861
- "s-cn",
1862
- "s-sr",
1863
- "s-sn",
1864
- "s-hn",
1865
- "s-ol",
1866
- "s-nr",
1867
- "s-si",
1868
- "s-rf",
1869
- "s-scs"
1870
- ];
1871
- for (; i2 < srcNode.childNodes.length; i2++) {
1872
- slotted = srcNode.childNodes[i2]["s-nr"];
1873
- nonStencilNode = stencilPrivates.every((privateField) => !srcNode.childNodes[i2][privateField]);
1874
- if (slotted) {
1875
- if (clonedNode.__appendChild) {
1876
- clonedNode.__appendChild(slotted.cloneNode(true));
1877
- } else {
1878
- clonedNode.appendChild(slotted.cloneNode(true));
1879
- }
1880
- }
1881
- if (nonStencilNode) {
1882
- clonedNode.appendChild(srcNode.childNodes[i2].cloneNode(true));
1883
- }
1884
- }
1885
- }
1886
- return clonedNode;
1887
- };
1888
- };
1889
- var patchSlotAppendChild = (HostElementPrototype) => {
1890
- HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
1891
- HostElementPrototype.appendChild = function(newChild) {
1892
- const slotName = newChild["s-sn"] = getSlotName(newChild);
1893
- const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
1894
- if (slotNode) {
1895
- const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1896
- const appendAfter = slotChildNodes[slotChildNodes.length - 1];
1897
- const insertedNode = insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1898
- updateFallbackSlotVisibility(this);
1899
- return insertedNode;
1900
- }
1901
- return this.__appendChild(newChild);
1902
- };
1903
- };
1904
- var patchSlotRemoveChild = (ElementPrototype) => {
1905
- ElementPrototype.__removeChild = ElementPrototype.removeChild;
1906
- ElementPrototype.removeChild = function(toRemove) {
1907
- if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
1908
- const slotNode = getHostSlotNode(this.childNodes, toRemove["s-sn"], this.tagName);
1909
- if (slotNode) {
1910
- const slotChildNodes = getHostSlotChildNodes(slotNode, toRemove["s-sn"]);
1911
- const existingNode = slotChildNodes.find((n) => n === toRemove);
1912
- if (existingNode) {
1913
- existingNode.remove();
1914
- updateFallbackSlotVisibility(this);
1915
- return;
1916
- }
1917
- }
1918
- }
1919
- return this.__removeChild(toRemove);
1920
- };
1921
- };
1922
- var patchSlotPrepend = (HostElementPrototype) => {
1923
- const originalPrepend = HostElementPrototype.prepend;
1924
- HostElementPrototype.prepend = function(...newChildren) {
1925
- newChildren.forEach((newChild) => {
1926
- if (typeof newChild === "string") {
1927
- newChild = this.ownerDocument.createTextNode(newChild);
1928
- }
1929
- const slotName = newChild["s-sn"] = getSlotName(newChild);
1930
- const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
1931
- if (slotNode) {
1932
- const slotPlaceholder = document.createTextNode("");
1933
- slotPlaceholder["s-nr"] = newChild;
1934
- slotNode["s-cr"].parentNode.__appendChild(slotPlaceholder);
1935
- newChild["s-ol"] = slotPlaceholder;
1936
- const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1937
- const appendAfter = slotChildNodes[0];
1938
- return insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1939
- }
1940
- if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
1941
- newChild.hidden = true;
1942
- }
1943
- return originalPrepend.call(this, newChild);
1944
- });
1945
- };
1946
- };
1947
- var patchSlotAppend = (HostElementPrototype) => {
1948
- HostElementPrototype.append = function(...newChildren) {
1949
- newChildren.forEach((newChild) => {
1950
- if (typeof newChild === "string") {
1951
- newChild = this.ownerDocument.createTextNode(newChild);
1952
- }
1953
- this.appendChild(newChild);
1954
- });
1955
- };
1956
- };
1957
- var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
1958
- const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
1959
- HostElementPrototype.insertAdjacentHTML = function(position, text) {
1960
- if (position !== "afterbegin" && position !== "beforeend") {
1961
- return originalInsertAdjacentHtml.call(this, position, text);
1962
- }
1963
- const container = this.ownerDocument.createElement("_");
1964
- let node;
1965
- container.innerHTML = text;
1966
- if (position === "afterbegin") {
1967
- while (node = container.firstChild) {
1968
- this.prepend(node);
1969
- }
1970
- } else if (position === "beforeend") {
1971
- while (node = container.firstChild) {
1972
- this.append(node);
1973
- }
1974
- }
1975
- };
1976
- };
1977
- var patchSlotInsertAdjacentText = (HostElementPrototype) => {
1978
- HostElementPrototype.insertAdjacentText = function(position, text) {
1979
- this.insertAdjacentHTML(position, text);
1980
- };
1981
- };
1982
- var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
1983
- const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
1984
- HostElementPrototype.insertAdjacentElement = function(position, element) {
1985
- if (position !== "afterbegin" && position !== "beforeend") {
1986
- return originalInsertAdjacentElement.call(this, position, element);
1987
- }
1988
- if (position === "afterbegin") {
1989
- this.prepend(element);
1990
- return element;
1991
- } else if (position === "beforeend") {
1992
- this.append(element);
1993
- return element;
1994
- }
1995
- return element;
1996
- };
1997
- };
1998
- var patchTextContent = (hostElementPrototype) => {
1999
- const descriptor = Object.getOwnPropertyDescriptor(Node.prototype, "textContent");
2000
- Object.defineProperty(hostElementPrototype, "__textContent", descriptor);
2001
- {
2002
- Object.defineProperty(hostElementPrototype, "textContent", {
2003
- // To mimic shadow root behavior, we need to return the text content of all
2004
- // nodes in a slot reference node
2005
- get() {
2006
- const slotRefNodes = getAllChildSlotNodes(this.childNodes);
2007
- const textContent = slotRefNodes.map((node) => {
2008
- var _a, _b;
2009
- const text = [];
2010
- let slotContent = node.nextSibling;
2011
- while (slotContent && slotContent["s-sn"] === node["s-sn"]) {
2012
- if (slotContent.nodeType === 3 /* TEXT_NODE */ || slotContent.nodeType === 1 /* ELEMENT_NODE */) {
2013
- text.push((_b = (_a = slotContent.textContent) == null ? void 0 : _a.trim()) != null ? _b : "");
2014
- }
2015
- slotContent = slotContent.nextSibling;
2016
- }
2017
- return text.filter((ref) => ref !== "").join(" ");
2018
- }).filter((text) => text !== "").join(" ");
2019
- return " " + textContent + " ";
2020
- },
2021
- // To mimic shadow root behavior, we need to overwrite all nodes in a slot
2022
- // reference node. If a default slot reference node exists, the text content will be
2023
- // placed there. Otherwise, the new text node will be hidden
2024
- set(value) {
2025
- const slotRefNodes = getAllChildSlotNodes(this.childNodes);
2026
- slotRefNodes.forEach((node) => {
2027
- let slotContent = node.nextSibling;
2028
- while (slotContent && slotContent["s-sn"] === node["s-sn"]) {
2029
- const tmp = slotContent;
2030
- slotContent = slotContent.nextSibling;
2031
- tmp.remove();
2032
- }
2033
- if (node["s-sn"] === "") {
2034
- const textNode = this.ownerDocument.createTextNode(value);
2035
- textNode["s-sn"] = "";
2036
- insertBefore(node.parentElement, textNode, node.nextSibling);
2037
- } else {
2038
- node.remove();
2039
- }
2040
- });
2041
- }
2042
- });
2043
- }
2044
- };
2045
- var patchChildSlotNodes = (elm, cmpMeta) => {
2046
- class FakeNodeList extends Array {
2047
- item(n) {
2048
- return this[n];
2049
- }
2050
- }
2051
- if (cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
2052
- const childNodesFn = elm.__lookupGetter__("childNodes");
2053
- Object.defineProperty(elm, "children", {
2054
- get() {
2055
- return this.childNodes.map((n) => n.nodeType === 1);
2056
- }
2057
- });
2058
- Object.defineProperty(elm, "childElementCount", {
2059
- get() {
2060
- return elm.children.length;
2061
- }
2062
- });
2063
- Object.defineProperty(elm, "childNodes", {
2064
- get() {
2065
- const childNodes = childNodesFn.call(this);
2066
- if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0 && getHostRef(this).$flags$ & 2 /* hasRendered */) {
2067
- const result = new FakeNodeList();
2068
- for (let i2 = 0; i2 < childNodes.length; i2++) {
2069
- const slot = childNodes[i2]["s-nr"];
2070
- if (slot) {
2071
- result.push(slot);
2072
- }
2073
- }
2074
- return result;
2075
- }
2076
- return FakeNodeList.from(childNodes);
2077
- }
2078
- });
2079
- }
2080
- };
2081
- var getAllChildSlotNodes = (childNodes) => {
2082
- const slotRefNodes = [];
2083
- for (const childNode of Array.from(childNodes)) {
2084
- if (childNode["s-sr"]) {
2085
- slotRefNodes.push(childNode);
2086
- }
2087
- slotRefNodes.push(...getAllChildSlotNodes(childNode.childNodes));
2088
- }
2089
- return slotRefNodes;
2090
- };
2091
- var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
2092
- var getHostSlotNode = (childNodes, slotName, hostName) => {
2093
- let i2 = 0;
2094
- let childNode;
2095
- for (; i2 < childNodes.length; i2++) {
2096
- childNode = childNodes[i2];
2097
- if (childNode["s-sr"] && childNode["s-sn"] === slotName && childNode["s-hn"] === hostName) {
2098
- return childNode;
2099
- }
2100
- childNode = getHostSlotNode(childNode.childNodes, slotName, hostName);
2101
- if (childNode) {
2102
- return childNode;
2103
- }
2480
+ if (rootAppliedStyles.has(elm)) {
2481
+ rootAppliedStyles.delete(elm);
2104
2482
  }
2105
- return null;
2106
- };
2107
- var getHostSlotChildNodes = (n, slotName) => {
2108
- const childNodes = [n];
2109
- while ((n = n.nextSibling) && n["s-sn"] === slotName) {
2110
- childNodes.push(n);
2483
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
2484
+ rootAppliedStyles.delete(elm.shadowRoot);
2111
2485
  }
2112
- return childNodes;
2113
2486
  };
2114
2487
 
2115
2488
  // src/runtime/bootstrap-lazy.ts
@@ -2207,7 +2580,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2207
2580
  };
2208
2581
  {
2209
2582
  if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2210
- patchPseudoShadowDom(HostElement.prototype, cmpMeta);
2583
+ patchPseudoShadowDom(HostElement.prototype);
2211
2584
  }
2212
2585
  }
2213
2586
  cmpMeta.$lazyBundleId$ = lazyBundle[0];