@ionic/core 8.4.2-dev.11736797843.16cc5058 → 8.4.2-dev.11737633140.1934dd0f

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 (587) hide show
  1. package/components/action-sheet.js +16 -32
  2. package/components/alert.js +18 -36
  3. package/components/backdrop.js +0 -9
  4. package/components/button.js +17 -25
  5. package/components/buttons.js +0 -12
  6. package/components/checkbox.js +15 -36
  7. package/components/content.js +2 -22
  8. package/components/header.js +2 -9
  9. package/components/ion-accordion-group.js +2 -17
  10. package/components/ion-accordion.js +8 -28
  11. package/components/ion-back-button.js +7 -8
  12. package/components/ion-badge.js +1 -0
  13. package/components/ion-breadcrumb.js +13 -17
  14. package/components/ion-breadcrumbs.js +6 -12
  15. package/components/ion-card-header.js +1 -5
  16. package/components/ion-card-subtitle.js +1 -0
  17. package/components/ion-card-title.js +1 -0
  18. package/components/ion-card.js +6 -13
  19. package/components/ion-chip.js +1 -6
  20. package/components/ion-col.js +24 -0
  21. package/components/ion-datetime-button.js +8 -12
  22. package/components/ion-datetime.js +42 -117
  23. package/components/ion-fab-button.js +14 -33
  24. package/components/ion-fab-list.js +0 -6
  25. package/components/ion-fab.js +2 -9
  26. package/components/ion-footer.js +3 -10
  27. package/components/ion-grid.js +0 -3
  28. package/components/ion-img.js +4 -0
  29. package/components/ion-infinite-scroll-content.js +2 -0
  30. package/components/ion-infinite-scroll.js +4 -26
  31. package/components/ion-input-password-toggle.js +4 -4
  32. package/components/ion-input.js +35 -65
  33. package/components/ion-item-divider.js +1 -7
  34. package/components/ion-item-option.js +8 -12
  35. package/components/ion-item-options.js +0 -4
  36. package/components/ion-item-sliding.js +0 -3
  37. package/components/ion-loading.js +12 -31
  38. package/components/ion-menu-button.js +5 -12
  39. package/components/ion-menu-toggle.js +3 -8
  40. package/components/ion-menu.js +3 -21
  41. package/components/ion-nav-link.js +4 -4
  42. package/components/ion-nav.js +5 -3
  43. package/components/ion-note.js +1 -0
  44. package/components/ion-picker-legacy.js +17 -39
  45. package/components/ion-progress-bar.js +1 -16
  46. package/components/ion-range.js +19 -61
  47. package/components/ion-refresher-content.js +4 -0
  48. package/components/ion-refresher.js +0 -50
  49. package/components/ion-reorder-group.js +0 -3
  50. package/components/ion-route-redirect.js +2 -0
  51. package/components/ion-route.js +4 -6
  52. package/components/ion-router-link.js +6 -5
  53. package/components/ion-router-outlet.js +3 -6
  54. package/components/ion-router.js +0 -18
  55. package/components/ion-searchbar.js +24 -75
  56. package/components/ion-segment-button.js +6 -17
  57. package/components/ion-segment-view.js +1 -3
  58. package/components/ion-segment.js +7 -20
  59. package/components/ion-select-option.js +1 -3
  60. package/components/ion-select.js +26 -49
  61. package/components/ion-skeleton-text.js +0 -3
  62. package/components/ion-split-pane.js +1 -8
  63. package/components/ion-tab-bar.js +2 -5
  64. package/components/ion-tab-button.js +8 -8
  65. package/components/ion-tab.js +3 -1
  66. package/components/ion-tabs.js +2 -2
  67. package/components/ion-text.js +1 -0
  68. package/components/ion-textarea.js +29 -59
  69. package/components/ion-toast.js +23 -48
  70. package/components/ion-toggle.js +16 -37
  71. package/components/item.js +8 -16
  72. package/components/label.js +2 -0
  73. package/components/list-header.js +2 -0
  74. package/components/list.js +1 -3
  75. package/components/modal.js +25 -92
  76. package/components/picker-column-option.js +1 -16
  77. package/components/picker-column.js +6 -22
  78. package/components/picker-column2.js +1 -0
  79. package/components/popover.js +28 -122
  80. package/components/radio-group.js +8 -10
  81. package/components/radio.js +9 -25
  82. package/components/ripple-effect.js +0 -9
  83. package/components/select-modal.js +2 -0
  84. package/components/select-popover.js +4 -3
  85. package/components/spinner.js +3 -3
  86. package/components/title.js +2 -0
  87. package/components/toolbar.js +1 -0
  88. package/dist/cjs/{app-globals-d2d85416.js → app-globals-21afee77.js} +1 -1
  89. package/dist/cjs/{button-active-8d4c8099.js → button-active-3f2f60b4.js} +1 -1
  90. package/dist/cjs/{hardware-back-button-f0972dab.js → hardware-back-button-9e8a2c4f.js} +2 -2
  91. package/dist/cjs/{index-2e7a27db.js → index-73f75efb.js} +847 -1215
  92. package/dist/cjs/{index-38a015a8.js → index-8e789962.js} +2 -2
  93. package/dist/cjs/{index-213cabf1.js → index-f05acd21.js} +4 -4
  94. package/dist/cjs/index.cjs.js +8 -8
  95. package/dist/cjs/ion-accordion_2.cjs.entry.js +12 -47
  96. package/dist/cjs/ion-action-sheet.cjs.entry.js +21 -37
  97. package/dist/cjs/ion-alert.cjs.entry.js +23 -41
  98. package/dist/cjs/ion-app_8.cjs.entry.js +19 -65
  99. package/dist/cjs/ion-avatar_3.cjs.entry.js +3 -2
  100. package/dist/cjs/ion-back-button.cjs.entry.js +9 -10
  101. package/dist/cjs/ion-backdrop.cjs.entry.js +2 -11
  102. package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +21 -31
  103. package/dist/cjs/ion-button_2.cjs.entry.js +19 -27
  104. package/dist/cjs/ion-card_5.cjs.entry.js +11 -20
  105. package/dist/cjs/ion-checkbox.cjs.entry.js +16 -38
  106. package/dist/cjs/ion-chip.cjs.entry.js +3 -8
  107. package/dist/cjs/ion-col_3.cjs.entry.js +26 -5
  108. package/dist/cjs/ion-datetime-button.cjs.entry.js +10 -14
  109. package/dist/cjs/ion-datetime_3.cjs.entry.js +64 -160
  110. package/dist/cjs/ion-fab_3.cjs.entry.js +18 -50
  111. package/dist/cjs/ion-img.cjs.entry.js +6 -2
  112. package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +8 -28
  113. package/dist/cjs/ion-input-password-toggle.cjs.entry.js +6 -6
  114. package/dist/cjs/ion-input.cjs.entry.js +37 -67
  115. package/dist/cjs/ion-item-option_3.cjs.entry.js +10 -21
  116. package/dist/cjs/ion-item_8.cjs.entry.js +17 -31
  117. package/dist/cjs/ion-loading.cjs.entry.js +16 -35
  118. package/dist/cjs/ion-menu_3.cjs.entry.js +16 -46
  119. package/dist/cjs/ion-modal.cjs.entry.js +30 -97
  120. package/dist/cjs/ion-nav_2.cjs.entry.js +12 -10
  121. package/dist/cjs/ion-picker-column-option.cjs.entry.js +3 -18
  122. package/dist/cjs/ion-picker-column.cjs.entry.js +8 -24
  123. package/dist/cjs/ion-picker.cjs.entry.js +1 -1
  124. package/dist/cjs/ion-popover.cjs.entry.js +33 -127
  125. package/dist/cjs/ion-progress-bar.cjs.entry.js +3 -18
  126. package/dist/cjs/ion-radio_2.cjs.entry.js +18 -37
  127. package/dist/cjs/ion-range.cjs.entry.js +21 -63
  128. package/dist/cjs/ion-refresher_2.cjs.entry.js +6 -52
  129. package/dist/cjs/ion-reorder_2.cjs.entry.js +2 -5
  130. package/dist/cjs/ion-ripple-effect.cjs.entry.js +2 -11
  131. package/dist/cjs/ion-route_4.cjs.entry.js +14 -31
  132. package/dist/cjs/ion-searchbar.cjs.entry.js +26 -77
  133. package/dist/cjs/ion-segment-content.cjs.entry.js +1 -1
  134. package/dist/cjs/ion-segment-view.cjs.entry.js +2 -4
  135. package/dist/cjs/ion-segment_2.cjs.entry.js +15 -39
  136. package/dist/cjs/ion-select-modal.cjs.entry.js +6 -4
  137. package/dist/cjs/ion-select_3.cjs.entry.js +34 -59
  138. package/dist/cjs/ion-spinner.cjs.entry.js +5 -5
  139. package/dist/cjs/ion-split-pane.cjs.entry.js +3 -10
  140. package/dist/cjs/ion-tab-bar_2.cjs.entry.js +12 -15
  141. package/dist/cjs/ion-tab_2.cjs.entry.js +6 -4
  142. package/dist/cjs/ion-text.cjs.entry.js +3 -2
  143. package/dist/cjs/ion-textarea.cjs.entry.js +31 -61
  144. package/dist/cjs/ion-toast.cjs.entry.js +27 -52
  145. package/dist/cjs/ion-toggle.cjs.entry.js +17 -39
  146. package/dist/cjs/{ionic-global-3c758a1a.js → ionic-global-d9a8bb5b.js} +1 -1
  147. package/dist/cjs/ionic.cjs.js +5 -5
  148. package/dist/cjs/{ios.transition-ac964d6c.js → ios.transition-cf40433b.js} +3 -3
  149. package/dist/cjs/loader.cjs.js +4 -4
  150. package/dist/cjs/{md.transition-45089eda.js → md.transition-ededf99f.js} +3 -3
  151. package/dist/cjs/{overlays-56fecd6c.js → overlays-aa669eb8.js} +2 -2
  152. package/dist/cjs/{status-tap-84e22ef3.js → status-tap-37681226.js} +1 -1
  153. package/dist/collection/collection-manifest.json +2 -2
  154. package/dist/collection/components/accordion/accordion.js +8 -38
  155. package/dist/collection/components/accordion-group/accordion-group.js +2 -29
  156. package/dist/collection/components/action-sheet/action-sheet.js +20 -68
  157. package/dist/collection/components/alert/alert.js +22 -76
  158. package/dist/collection/components/back-button/back-button.js +8 -23
  159. package/dist/collection/components/backdrop/backdrop.js +0 -15
  160. package/dist/collection/components/badge/badge.js +3 -2
  161. package/dist/collection/components/breadcrumb/breadcrumb.js +14 -44
  162. package/dist/collection/components/breadcrumbs/breadcrumbs.js +6 -20
  163. package/dist/collection/components/button/button.js +18 -58
  164. package/dist/collection/components/buttons/buttons.js +0 -14
  165. package/dist/collection/components/card/card.js +7 -34
  166. package/dist/collection/components/card-header/card-header.js +1 -9
  167. package/dist/collection/components/card-subtitle/card-subtitle.js +3 -2
  168. package/dist/collection/components/card-title/card-title.js +3 -2
  169. package/dist/collection/components/checkbox/checkbox.js +32 -54
  170. package/dist/collection/components/chip/chip.js +1 -12
  171. package/dist/collection/components/col/col.js +26 -48
  172. package/dist/collection/components/content/content.js +2 -36
  173. package/dist/collection/components/datetime/datetime.js +46 -181
  174. package/dist/collection/components/datetime-button/datetime-button.js +8 -18
  175. package/dist/collection/components/fab/fab.js +2 -17
  176. package/dist/collection/components/fab-button/fab-button.js +15 -62
  177. package/dist/collection/components/fab-list/fab-list.js +0 -10
  178. package/dist/collection/components/footer/footer.js +3 -14
  179. package/dist/collection/components/grid/grid.js +0 -5
  180. package/dist/collection/components/header/header.js +2 -13
  181. package/dist/collection/components/img/img.js +4 -4
  182. package/dist/collection/components/infinite-scroll/infinite-scroll.js +4 -32
  183. package/dist/collection/components/infinite-scroll-content/infinite-scroll-content.js +2 -4
  184. package/dist/collection/components/input/input.js +36 -134
  185. package/dist/collection/components/input-password-toggle/input-password-toggle.js +4 -12
  186. package/dist/collection/components/item/item.js +9 -43
  187. package/dist/collection/components/item-divider/item-divider.js +1 -11
  188. package/dist/collection/components/item-option/item-option.js +8 -28
  189. package/dist/collection/components/item-options/item-options.js +0 -6
  190. package/dist/collection/components/item-sliding/item-sliding.js +0 -5
  191. package/dist/collection/components/label/label.js +2 -4
  192. package/dist/collection/components/list/list.js +1 -7
  193. package/dist/collection/components/list-header/list-header.js +4 -4
  194. package/dist/collection/components/loading/loading.js +16 -69
  195. package/dist/collection/components/menu/menu.js +3 -35
  196. package/dist/collection/components/menu-button/menu-button.js +5 -22
  197. package/dist/collection/components/menu-toggle/menu-toggle.js +3 -12
  198. package/dist/collection/components/modal/modal.js +32 -147
  199. package/dist/collection/components/nav/nav.js +8 -18
  200. package/dist/collection/components/nav-link/nav-link.js +6 -14
  201. package/dist/collection/components/note/note.js +3 -2
  202. package/dist/collection/components/picker-column/picker-column.js +6 -30
  203. package/dist/collection/components/picker-column-option/picker-column-option.js +1 -22
  204. package/dist/collection/components/picker-legacy/picker.js +21 -75
  205. package/dist/collection/components/picker-legacy-column/picker-column.js +2 -3
  206. package/dist/collection/components/popover/popover.js +33 -181
  207. package/dist/collection/components/progress-bar/progress-bar.js +1 -26
  208. package/dist/collection/components/radio/radio.js +9 -39
  209. package/dist/collection/components/radio-group/radio-group.js +25 -18
  210. package/dist/collection/components/range/range.js +19 -93
  211. package/dist/collection/components/refresher/refresher.js +0 -62
  212. package/dist/collection/components/refresher-content/refresher-content.js +4 -8
  213. package/dist/collection/components/reorder-group/reorder-group.js +0 -5
  214. package/dist/collection/components/ripple-effect/ripple-effect.js +0 -11
  215. package/dist/collection/components/route/route.js +7 -19
  216. package/dist/collection/components/route-redirect/route-redirect.js +4 -4
  217. package/dist/collection/components/router/router.js +0 -22
  218. package/dist/collection/components/router-link/router-link.js +7 -18
  219. package/dist/collection/components/router-outlet/router-outlet.js +6 -19
  220. package/dist/collection/components/searchbar/searchbar.js +24 -119
  221. package/dist/collection/components/segment/segment.js +7 -32
  222. package/dist/collection/components/segment-button/segment-button.js +6 -27
  223. package/dist/collection/components/segment-view/segment-view.js +1 -5
  224. package/dist/collection/components/select/select.js +43 -87
  225. package/dist/collection/components/select-modal/select-modal.js +2 -6
  226. package/dist/collection/components/select-option/select-option.js +1 -7
  227. package/dist/collection/components/select-popover/select-popover.js +4 -13
  228. package/dist/collection/components/skeleton-text/skeleton-text.js +0 -5
  229. package/dist/collection/components/spinner/spinner.js +3 -11
  230. package/dist/collection/components/split-pane/split-pane.js +1 -14
  231. package/dist/collection/components/tab/tab.js +4 -10
  232. package/dist/collection/components/tab-bar/tab-bar.js +2 -11
  233. package/dist/collection/components/tab-button/tab-button.js +8 -24
  234. package/dist/collection/components/tabs/tabs.js +2 -4
  235. package/dist/collection/components/text/text.js +3 -2
  236. package/dist/collection/components/textarea/textarea.js +30 -116
  237. package/dist/collection/components/title/title.js +4 -4
  238. package/dist/collection/components/toast/toast.js +28 -97
  239. package/dist/collection/components/toggle/toggle.js +33 -55
  240. package/dist/collection/components/toolbar/toolbar.js +1 -2
  241. package/dist/docs.d.ts +0 -8
  242. package/dist/docs.json +660 -1710
  243. package/dist/esm/{app-globals-1318774c.js → app-globals-5dbb61a5.js} +1 -1
  244. package/dist/esm/{button-active-10b36beb.js → button-active-f6503382.js} +1 -1
  245. package/dist/esm/{hardware-back-button-0a284222.js → hardware-back-button-06ef3c3e.js} +2 -2
  246. package/dist/esm/{index-ed9a6c67.js → index-24b48b06.js} +2 -2
  247. package/dist/esm/{index-fcdfc1aa.js → index-28849c61.js} +847 -1215
  248. package/dist/esm/{index-13b48bcb.js → index-3ad7f18b.js} +4 -4
  249. package/dist/esm/index.js +8 -8
  250. package/dist/esm/ion-accordion_2.entry.js +12 -47
  251. package/dist/esm/ion-action-sheet.entry.js +21 -37
  252. package/dist/esm/ion-alert.entry.js +23 -41
  253. package/dist/esm/ion-app_8.entry.js +19 -65
  254. package/dist/esm/ion-avatar_3.entry.js +3 -2
  255. package/dist/esm/ion-back-button.entry.js +9 -10
  256. package/dist/esm/ion-backdrop.entry.js +2 -11
  257. package/dist/esm/ion-breadcrumb_2.entry.js +21 -31
  258. package/dist/esm/ion-button_2.entry.js +19 -27
  259. package/dist/esm/ion-card_5.entry.js +11 -20
  260. package/dist/esm/ion-checkbox.entry.js +16 -38
  261. package/dist/esm/ion-chip.entry.js +3 -8
  262. package/dist/esm/ion-col_3.entry.js +26 -5
  263. package/dist/esm/ion-datetime-button.entry.js +10 -14
  264. package/dist/esm/ion-datetime_3.entry.js +64 -160
  265. package/dist/esm/ion-fab_3.entry.js +18 -50
  266. package/dist/esm/ion-img.entry.js +6 -2
  267. package/dist/esm/ion-infinite-scroll_2.entry.js +8 -28
  268. package/dist/esm/ion-input-password-toggle.entry.js +6 -6
  269. package/dist/esm/ion-input.entry.js +37 -67
  270. package/dist/esm/ion-item-option_3.entry.js +10 -21
  271. package/dist/esm/ion-item_8.entry.js +17 -31
  272. package/dist/esm/ion-loading.entry.js +16 -35
  273. package/dist/esm/ion-menu_3.entry.js +16 -46
  274. package/dist/esm/ion-modal.entry.js +30 -97
  275. package/dist/esm/ion-nav_2.entry.js +12 -10
  276. package/dist/esm/ion-picker-column-option.entry.js +3 -18
  277. package/dist/esm/ion-picker-column.entry.js +8 -24
  278. package/dist/esm/ion-picker.entry.js +1 -1
  279. package/dist/esm/ion-popover.entry.js +33 -127
  280. package/dist/esm/ion-progress-bar.entry.js +3 -18
  281. package/dist/esm/ion-radio_2.entry.js +18 -37
  282. package/dist/esm/ion-range.entry.js +21 -63
  283. package/dist/esm/ion-refresher_2.entry.js +6 -52
  284. package/dist/esm/ion-reorder_2.entry.js +2 -5
  285. package/dist/esm/ion-ripple-effect.entry.js +2 -11
  286. package/dist/esm/ion-route_4.entry.js +14 -31
  287. package/dist/esm/ion-searchbar.entry.js +26 -77
  288. package/dist/esm/ion-segment-content.entry.js +1 -1
  289. package/dist/esm/ion-segment-view.entry.js +2 -4
  290. package/dist/esm/ion-segment_2.entry.js +15 -39
  291. package/dist/esm/ion-select-modal.entry.js +6 -4
  292. package/dist/esm/ion-select_3.entry.js +34 -59
  293. package/dist/esm/ion-spinner.entry.js +5 -5
  294. package/dist/esm/ion-split-pane.entry.js +3 -10
  295. package/dist/esm/ion-tab-bar_2.entry.js +12 -15
  296. package/dist/esm/ion-tab_2.entry.js +6 -4
  297. package/dist/esm/ion-text.entry.js +3 -2
  298. package/dist/esm/ion-textarea.entry.js +31 -61
  299. package/dist/esm/ion-toast.entry.js +27 -52
  300. package/dist/esm/ion-toggle.entry.js +17 -39
  301. package/dist/esm/{ionic-global-6b9f2b5a.js → ionic-global-c81d82ab.js} +1 -1
  302. package/dist/esm/ionic.js +6 -6
  303. package/dist/esm/{ios.transition-1cb16beb.js → ios.transition-4ee1a3af.js} +3 -3
  304. package/dist/esm/loader.js +5 -5
  305. package/dist/esm/{md.transition-20f80721.js → md.transition-5106a0d2.js} +3 -3
  306. package/dist/esm/{overlays-6163edd5.js → overlays-e7b9d6d9.js} +2 -2
  307. package/dist/esm/{status-tap-6971c722.js → status-tap-f472b09f.js} +1 -1
  308. package/dist/esm-es5/app-globals-5dbb61a5.js +4 -0
  309. package/dist/esm-es5/{button-active-10b36beb.js → button-active-f6503382.js} +1 -1
  310. package/dist/esm-es5/{hardware-back-button-0a284222.js → hardware-back-button-06ef3c3e.js} +1 -1
  311. package/dist/esm-es5/{index-ed9a6c67.js → index-24b48b06.js} +1 -1
  312. package/dist/esm-es5/index-28849c61.js +5 -0
  313. package/dist/esm-es5/{index-13b48bcb.js → index-3ad7f18b.js} +1 -1
  314. package/dist/esm-es5/index.js +1 -1
  315. package/dist/esm-es5/ion-accordion_2.entry.js +1 -1
  316. package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
  317. package/dist/esm-es5/ion-alert.entry.js +1 -1
  318. package/dist/esm-es5/ion-app_8.entry.js +1 -1
  319. package/dist/esm-es5/ion-avatar_3.entry.js +1 -1
  320. package/dist/esm-es5/ion-back-button.entry.js +1 -1
  321. package/dist/esm-es5/ion-backdrop.entry.js +1 -1
  322. package/dist/esm-es5/ion-breadcrumb_2.entry.js +1 -1
  323. package/dist/esm-es5/ion-button_2.entry.js +1 -1
  324. package/dist/esm-es5/ion-card_5.entry.js +1 -1
  325. package/dist/esm-es5/ion-checkbox.entry.js +1 -1
  326. package/dist/esm-es5/ion-chip.entry.js +1 -1
  327. package/dist/esm-es5/ion-col_3.entry.js +1 -1
  328. package/dist/esm-es5/ion-datetime-button.entry.js +1 -1
  329. package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
  330. package/dist/esm-es5/ion-fab_3.entry.js +1 -1
  331. package/dist/esm-es5/ion-img.entry.js +1 -1
  332. package/dist/esm-es5/ion-infinite-scroll_2.entry.js +1 -1
  333. package/dist/esm-es5/ion-input-password-toggle.entry.js +1 -1
  334. package/dist/esm-es5/ion-input.entry.js +1 -1
  335. package/dist/esm-es5/ion-item-option_3.entry.js +1 -1
  336. package/dist/esm-es5/ion-item_8.entry.js +1 -1
  337. package/dist/esm-es5/ion-loading.entry.js +1 -1
  338. package/dist/esm-es5/ion-menu_3.entry.js +1 -1
  339. package/dist/esm-es5/ion-modal.entry.js +1 -1
  340. package/dist/esm-es5/ion-nav_2.entry.js +1 -1
  341. package/dist/esm-es5/ion-picker-column-option.entry.js +1 -1
  342. package/dist/esm-es5/ion-picker-column.entry.js +1 -1
  343. package/dist/esm-es5/ion-picker.entry.js +1 -1
  344. package/dist/esm-es5/ion-popover.entry.js +1 -1
  345. package/dist/esm-es5/ion-progress-bar.entry.js +1 -1
  346. package/dist/esm-es5/ion-radio_2.entry.js +1 -1
  347. package/dist/esm-es5/ion-range.entry.js +1 -1
  348. package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
  349. package/dist/esm-es5/ion-reorder_2.entry.js +1 -1
  350. package/dist/esm-es5/ion-ripple-effect.entry.js +1 -1
  351. package/dist/esm-es5/ion-route_4.entry.js +1 -1
  352. package/dist/esm-es5/ion-searchbar.entry.js +1 -1
  353. package/dist/esm-es5/ion-segment-content.entry.js +1 -1
  354. package/dist/esm-es5/ion-segment-view.entry.js +1 -1
  355. package/dist/esm-es5/ion-segment_2.entry.js +1 -1
  356. package/dist/esm-es5/ion-select-modal.entry.js +1 -1
  357. package/dist/esm-es5/ion-select_3.entry.js +1 -1
  358. package/dist/esm-es5/ion-spinner.entry.js +1 -1
  359. package/dist/esm-es5/ion-split-pane.entry.js +1 -1
  360. package/dist/esm-es5/ion-tab-bar_2.entry.js +1 -1
  361. package/dist/esm-es5/ion-tab_2.entry.js +1 -1
  362. package/dist/esm-es5/ion-text.entry.js +1 -1
  363. package/dist/esm-es5/ion-textarea.entry.js +1 -1
  364. package/dist/esm-es5/ion-toast.entry.js +1 -1
  365. package/dist/esm-es5/ion-toggle.entry.js +1 -1
  366. package/dist/esm-es5/{ionic-global-6b9f2b5a.js → ionic-global-c81d82ab.js} +1 -1
  367. package/dist/esm-es5/ionic.js +1 -1
  368. package/dist/esm-es5/{ios.transition-1cb16beb.js → ios.transition-4ee1a3af.js} +1 -1
  369. package/dist/esm-es5/loader.js +1 -1
  370. package/dist/esm-es5/md.transition-5106a0d2.js +4 -0
  371. package/dist/esm-es5/{overlays-6163edd5.js → overlays-e7b9d6d9.js} +1 -1
  372. package/dist/esm-es5/{status-tap-6971c722.js → status-tap-f472b09f.js} +1 -1
  373. package/dist/html.html-data.json +16 -0
  374. package/dist/ionic/index.esm.js +1 -1
  375. package/dist/ionic/ionic.esm.js +1 -1
  376. package/dist/ionic/ionic.js +1 -1
  377. package/dist/ionic/p-001f0962.entry.js +4 -0
  378. package/dist/ionic/p-01186920.system.entry.js +4 -0
  379. package/dist/ionic/{p-2e092bfc.js → p-0303d0f8.js} +1 -1
  380. package/dist/ionic/{p-e992e256.js → p-0574e87e.js} +1 -1
  381. package/dist/ionic/p-081a4ce4.entry.js +4 -0
  382. package/dist/ionic/{p-de104ff8.system.js → p-0aa833fb.system.js} +1 -1
  383. package/dist/ionic/p-0abaa255.entry.js +4 -0
  384. package/dist/ionic/{p-9b48727c.system.entry.js → p-1046866e.system.entry.js} +1 -1
  385. package/dist/ionic/p-12a722b8.system.entry.js +4 -0
  386. package/dist/ionic/{p-58f53534.entry.js → p-14be4015.entry.js} +1 -1
  387. package/dist/ionic/{p-825e7bd7.system.entry.js → p-14e159ea.system.entry.js} +1 -1
  388. package/dist/ionic/p-15e76dd1.entry.js +4 -0
  389. package/dist/ionic/p-16188af7.entry.js +4 -0
  390. package/dist/ionic/{p-e3177e13.system.entry.js → p-16799667.system.entry.js} +1 -1
  391. package/dist/ionic/p-16bfb979.system.entry.js +4 -0
  392. package/dist/ionic/p-17474161.system.js +4 -0
  393. package/dist/ionic/p-19a5be0a.entry.js +4 -0
  394. package/dist/ionic/p-19ec4f42.entry.js +4 -0
  395. package/dist/ionic/{p-39f7d87a.system.entry.js → p-1e010627.system.entry.js} +1 -1
  396. package/dist/ionic/p-1e67b266.system.entry.js +4 -0
  397. package/dist/ionic/p-1fe02220.system.entry.js +4 -0
  398. package/dist/ionic/p-2172893e.system.entry.js +4 -0
  399. package/dist/ionic/{p-576c3a98.js → p-21e5e7e4.js} +1 -1
  400. package/dist/ionic/{p-639d0578.system.entry.js → p-2507278c.system.entry.js} +1 -1
  401. package/dist/ionic/p-25180df3.system.js +5 -0
  402. package/dist/ionic/{p-fca658be.system.entry.js → p-2799c6d3.system.entry.js} +1 -1
  403. package/dist/ionic/{p-515d6848.system.entry.js → p-29a5d6ed.system.entry.js} +1 -1
  404. package/dist/ionic/{p-ccba2087.system.entry.js → p-2abae1cc.system.entry.js} +1 -1
  405. package/dist/ionic/p-2b838f86.system.entry.js +4 -0
  406. package/dist/ionic/{p-b84b4728.system.entry.js → p-2bd0ae94.system.entry.js} +2 -2
  407. package/dist/ionic/{p-ae304d51.system.entry.js → p-2e46590d.system.entry.js} +1 -1
  408. package/dist/ionic/p-2fc0dafe.entry.js +4 -0
  409. package/dist/ionic/p-322c5fb4.system.js +4 -0
  410. package/dist/ionic/p-32d44024.system.entry.js +4 -0
  411. package/dist/ionic/{p-20034878.entry.js → p-33a8a71b.entry.js} +1 -1
  412. package/dist/ionic/{p-95902a17.system.js → p-372ae7f4.system.js} +1 -1
  413. package/dist/ionic/{p-d46804b1.system.entry.js → p-37cb43bd.system.entry.js} +1 -1
  414. package/dist/ionic/{p-7a1241fe.system.js → p-3c8e5c23.system.js} +1 -1
  415. package/dist/ionic/{p-25ffd217.system.entry.js → p-424eb140.system.entry.js} +1 -1
  416. package/dist/ionic/{p-2e25154e.entry.js → p-4439fc2a.entry.js} +1 -1
  417. package/dist/ionic/p-45693d7e.entry.js +4 -0
  418. package/dist/ionic/p-49a0e74c.entry.js +4 -0
  419. package/dist/ionic/p-4ec778aa.entry.js +4 -0
  420. package/dist/ionic/p-508d024a.entry.js +4 -0
  421. package/dist/ionic/{p-fbebb25d.entry.js → p-52d7a191.entry.js} +1 -1
  422. package/dist/ionic/{p-cdf6fc3a.system.entry.js → p-567de071.system.entry.js} +1 -1
  423. package/dist/ionic/{p-50d264fa.system.entry.js → p-5823babc.system.entry.js} +1 -1
  424. package/dist/ionic/p-58d5df0c.system.entry.js +4 -0
  425. package/dist/ionic/{p-e8d1ae44.system.entry.js → p-58dc63cc.system.entry.js} +1 -1
  426. package/dist/ionic/p-5b932840.entry.js +4 -0
  427. package/dist/ionic/{p-3e9fea9e.system.js → p-5da94421.system.js} +1 -1
  428. package/dist/ionic/{p-900bf295.system.entry.js → p-5fce0c0b.system.entry.js} +1 -1
  429. package/dist/ionic/p-61e3f887.entry.js +4 -0
  430. package/dist/ionic/p-62af944c.entry.js +4 -0
  431. package/dist/ionic/{p-47dc25dc.system.entry.js → p-63b0abde.system.entry.js} +1 -1
  432. package/dist/ionic/{p-4e9cfad5.system.entry.js → p-6499df44.system.entry.js} +2 -2
  433. package/dist/ionic/p-66640ff7.system.entry.js +4 -0
  434. package/dist/ionic/{p-78c786a5.system.entry.js → p-677f0eb7.system.entry.js} +1 -1
  435. package/dist/ionic/p-69066a53.js +4 -0
  436. package/dist/ionic/p-6b280620.entry.js +4 -0
  437. package/dist/ionic/{p-8318c25d.entry.js → p-6d32975a.entry.js} +1 -1
  438. package/dist/ionic/p-73dc4950.entry.js +4 -0
  439. package/dist/ionic/p-7458862e.system.entry.js +4 -0
  440. package/dist/ionic/p-797eeea8.system.entry.js +4 -0
  441. package/dist/ionic/p-7b9a2b23.entry.js +4 -0
  442. package/dist/ionic/{p-6d119deb.system.entry.js → p-7ed1657c.system.entry.js} +1 -1
  443. package/dist/ionic/{p-40b63137.js → p-88e63c7d.js} +1 -1
  444. package/dist/ionic/{p-1c152e5e.entry.js → p-8b8be2fd.entry.js} +1 -1
  445. package/dist/ionic/p-91545b88.entry.js +4 -0
  446. package/dist/ionic/p-937a7e21.entry.js +4 -0
  447. package/dist/ionic/p-942b5e13.entry.js +4 -0
  448. package/dist/ionic/p-95775830.entry.js +4 -0
  449. package/dist/ionic/p-982315a6.entry.js +4 -0
  450. package/dist/ionic/p-98231c01.system.entry.js +4 -0
  451. package/dist/ionic/p-985a7e17.system.entry.js +4 -0
  452. package/dist/ionic/p-98ff6b32.entry.js +4 -0
  453. package/dist/ionic/p-9df2c6fb.entry.js +4 -0
  454. package/dist/ionic/p-9e33104d.entry.js +4 -0
  455. package/dist/ionic/p-9ee1e8a6.entry.js +4 -0
  456. package/dist/ionic/p-9f3008d4.system.js +4 -0
  457. package/dist/ionic/p-9fa07aec.entry.js +4 -0
  458. package/dist/ionic/p-a43467d8.entry.js +4 -0
  459. package/dist/ionic/{p-1fd5d9bc.system.js → p-a4565eb5.system.js} +1 -1
  460. package/dist/ionic/p-a49378bb.system.entry.js +4 -0
  461. package/dist/ionic/{p-78667ff0.entry.js → p-a61cba41.entry.js} +1 -1
  462. package/dist/ionic/{p-c7d9e292.system.js → p-a69b9fc5.system.js} +1 -1
  463. package/dist/ionic/p-afecb188.entry.js +4 -0
  464. package/dist/ionic/{p-fc8bdbc9.system.entry.js → p-b25a40f6.system.entry.js} +1 -1
  465. package/dist/ionic/{p-3be897c8.system.entry.js → p-b335ffed.system.entry.js} +1 -1
  466. package/dist/ionic/p-b79ba17c.entry.js +4 -0
  467. package/dist/ionic/p-b82d4cab.js +4 -0
  468. package/dist/ionic/p-b9d7015f.entry.js +4 -0
  469. package/dist/ionic/p-bb0db172.entry.js +4 -0
  470. package/dist/ionic/p-bb5d8e9e.entry.js +4 -0
  471. package/dist/ionic/{p-9437291a.system.entry.js → p-bc36ad98.system.entry.js} +1 -1
  472. package/dist/ionic/p-bdad26e3.entry.js +4 -0
  473. package/dist/ionic/p-c29f8157.system.entry.js +4 -0
  474. package/dist/ionic/p-c41ac815.entry.js +4 -0
  475. package/dist/ionic/{p-b13c5a74.system.js → p-c449820c.system.js} +1 -1
  476. package/dist/ionic/p-c4b53b16.system.entry.js +4 -0
  477. package/dist/ionic/p-c9f3a539.entry.js +4 -0
  478. package/dist/ionic/{p-548a72aa.system.entry.js → p-ca065903.system.entry.js} +1 -1
  479. package/dist/ionic/{p-12f321c2.system.entry.js → p-cac0e0b3.system.entry.js} +1 -1
  480. package/dist/ionic/p-cdc83025.entry.js +4 -0
  481. package/dist/ionic/p-d18ab582.system.entry.js +4 -0
  482. package/dist/ionic/{p-178f8860.js → p-d6841eac.js} +1 -1
  483. package/dist/ionic/{p-782beb5a.js → p-d743e981.js} +1 -1
  484. package/dist/ionic/p-d7aa6b00.entry.js +4 -0
  485. package/dist/ionic/p-d836d43e.js +5 -0
  486. package/dist/ionic/p-da074ff7.entry.js +4 -0
  487. package/dist/ionic/p-ddaa748a.system.entry.js +4 -0
  488. package/dist/ionic/p-de930745.entry.js +4 -0
  489. package/dist/ionic/p-e4ee80be.system.entry.js +4 -0
  490. package/dist/ionic/{p-dc75988a.system.entry.js → p-e4f69534.system.entry.js} +1 -1
  491. package/dist/ionic/p-e563a35c.entry.js +4 -0
  492. package/dist/ionic/{p-fe10600c.js → p-e6635685.js} +1 -1
  493. package/dist/ionic/p-e7ed4a7f.system.js +4 -0
  494. package/dist/ionic/{p-13672c38.system.entry.js → p-e85d901b.system.entry.js} +1 -1
  495. package/dist/ionic/p-eba29931.entry.js +4 -0
  496. package/dist/ionic/{p-8ef7a3d4.js → p-ecceeb90.js} +1 -1
  497. package/dist/ionic/{p-00d0d756.system.entry.js → p-ed75fcfb.system.entry.js} +1 -1
  498. package/dist/ionic/p-efaffe74.entry.js +4 -0
  499. package/dist/ionic/{p-f5aef6f1.system.entry.js → p-f1acf541.system.entry.js} +1 -1
  500. package/dist/ionic/{p-87ce1c7b.system.entry.js → p-f3102647.system.entry.js} +1 -1
  501. package/dist/ionic/{p-cec30029.system.js → p-f9a53abb.system.js} +1 -1
  502. package/dist/ionic/{p-6b6a8f94.system.entry.js → p-fca6ef5f.system.entry.js} +1 -1
  503. package/dist/types/components/checkbox/checkbox.d.ts +4 -0
  504. package/dist/types/components/radio-group/radio-group.d.ts +4 -0
  505. package/dist/types/components/select/select.d.ts +4 -0
  506. package/dist/types/components/toggle/toggle.d.ts +4 -0
  507. package/dist/types/components.d.ts +32 -0
  508. package/dist/types/stencil-public-runtime.d.ts +0 -6
  509. package/hydrate/index.d.ts +4 -10
  510. package/hydrate/index.js +1471 -3034
  511. package/hydrate/index.mjs +1471 -3034
  512. package/package.json +4 -4
  513. package/dist/esm-es5/app-globals-1318774c.js +0 -4
  514. package/dist/esm-es5/index-fcdfc1aa.js +0 -5
  515. package/dist/esm-es5/md.transition-20f80721.js +0 -4
  516. package/dist/ionic/p-009f82b0.entry.js +0 -4
  517. package/dist/ionic/p-02a67bb6.entry.js +0 -4
  518. package/dist/ionic/p-06db9f72.system.entry.js +0 -4
  519. package/dist/ionic/p-0b7a6f61.system.entry.js +0 -4
  520. package/dist/ionic/p-0e3657b4.system.entry.js +0 -4
  521. package/dist/ionic/p-0f461830.entry.js +0 -4
  522. package/dist/ionic/p-1050c06b.entry.js +0 -4
  523. package/dist/ionic/p-10e0c150.entry.js +0 -4
  524. package/dist/ionic/p-12130ed6.entry.js +0 -4
  525. package/dist/ionic/p-1424bf51.system.entry.js +0 -4
  526. package/dist/ionic/p-14862d17.js +0 -4
  527. package/dist/ionic/p-15764963.entry.js +0 -4
  528. package/dist/ionic/p-19d9e3c1.entry.js +0 -4
  529. package/dist/ionic/p-1a02bce6.system.js +0 -4
  530. package/dist/ionic/p-231bc1a6.entry.js +0 -4
  531. package/dist/ionic/p-256d6439.system.entry.js +0 -4
  532. package/dist/ionic/p-2799a566.entry.js +0 -4
  533. package/dist/ionic/p-27c32980.system.entry.js +0 -4
  534. package/dist/ionic/p-28dfa27e.entry.js +0 -4
  535. package/dist/ionic/p-2af55ad8.entry.js +0 -4
  536. package/dist/ionic/p-2d31d826.entry.js +0 -4
  537. package/dist/ionic/p-33e4b80b.entry.js +0 -4
  538. package/dist/ionic/p-39d3c108.entry.js +0 -4
  539. package/dist/ionic/p-48da821c.system.js +0 -4
  540. package/dist/ionic/p-49e8212a.entry.js +0 -4
  541. package/dist/ionic/p-4c553a2a.system.entry.js +0 -4
  542. package/dist/ionic/p-550a3b74.system.entry.js +0 -4
  543. package/dist/ionic/p-56b2ba69.system.entry.js +0 -4
  544. package/dist/ionic/p-5d9ac963.entry.js +0 -4
  545. package/dist/ionic/p-5ed6403e.system.entry.js +0 -4
  546. package/dist/ionic/p-64bbdc67.entry.js +0 -4
  547. package/dist/ionic/p-65d01407.entry.js +0 -4
  548. package/dist/ionic/p-6b2e506b.entry.js +0 -4
  549. package/dist/ionic/p-7148eaf9.system.js +0 -4
  550. package/dist/ionic/p-72bfbdb8.entry.js +0 -4
  551. package/dist/ionic/p-7b5771f9.entry.js +0 -4
  552. package/dist/ionic/p-7e58bbf9.system.js +0 -5
  553. package/dist/ionic/p-81757650.entry.js +0 -4
  554. package/dist/ionic/p-861176bf.js +0 -5
  555. package/dist/ionic/p-87a5a16c.system.entry.js +0 -4
  556. package/dist/ionic/p-8dd3da91.entry.js +0 -4
  557. package/dist/ionic/p-8e640927.entry.js +0 -4
  558. package/dist/ionic/p-976cffa3.js +0 -4
  559. package/dist/ionic/p-9a87fe2d.entry.js +0 -4
  560. package/dist/ionic/p-a049797d.system.entry.js +0 -4
  561. package/dist/ionic/p-a09686af.system.entry.js +0 -4
  562. package/dist/ionic/p-aa92906a.entry.js +0 -4
  563. package/dist/ionic/p-ae830361.entry.js +0 -4
  564. package/dist/ionic/p-aee73160.entry.js +0 -4
  565. package/dist/ionic/p-af19e17f.entry.js +0 -4
  566. package/dist/ionic/p-b5400a4e.entry.js +0 -4
  567. package/dist/ionic/p-bc35609f.system.entry.js +0 -4
  568. package/dist/ionic/p-c29e3a26.entry.js +0 -4
  569. package/dist/ionic/p-c5bbf6c1.system.entry.js +0 -4
  570. package/dist/ionic/p-d3e8f550.entry.js +0 -4
  571. package/dist/ionic/p-da1d2cb3.entry.js +0 -4
  572. package/dist/ionic/p-dbdccd05.entry.js +0 -4
  573. package/dist/ionic/p-dc480111.entry.js +0 -4
  574. package/dist/ionic/p-e4e3296d.system.js +0 -4
  575. package/dist/ionic/p-eb82a2ad.entry.js +0 -4
  576. package/dist/ionic/p-ebef8e16.system.entry.js +0 -4
  577. package/dist/ionic/p-f03983ca.system.entry.js +0 -4
  578. package/dist/ionic/p-f244eea8.system.entry.js +0 -4
  579. package/dist/ionic/p-f2e5ec87.entry.js +0 -4
  580. package/dist/ionic/p-f5b1cfba.entry.js +0 -4
  581. package/dist/ionic/p-f8ff5ad1.entry.js +0 -4
  582. package/dist/ionic/p-fa459c81.entry.js +0 -4
  583. package/dist/ionic/p-fa7120fe.entry.js +0 -4
  584. package/dist/ionic/p-fdb92b6d.entry.js +0 -4
  585. package/dist/ionic/p-fe5dca01.system.entry.js +0 -4
  586. package/dist/ionic/p-fe6ab8d4.entry.js +0 -4
  587. package/dist/ionic/p-fee6c9c2.system.entry.js +0 -4
@@ -2,10 +2,10 @@
2
2
  * (C) Ionic http://ionicframework.com - MIT License
3
3
  */
4
4
  const NAMESPACE = 'ionic';
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, modernPropertyDecls: false, 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 };
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.23.2 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Platform v4.20.0 | MIT Licensed | https://stenciljs.com
9
9
  */
10
10
  var __defProp = Object.defineProperty;
11
11
  var __export = (target, all) => {
@@ -18,17 +18,9 @@ var Build = {
18
18
  isServer: false,
19
19
  isTesting: false
20
20
  };
21
-
22
- // src/utils/constants.ts
23
- var SVG_NS = "http://www.w3.org/2000/svg";
24
- var HTML_NS = "http://www.w3.org/1999/xhtml";
25
-
26
- // src/client/client-host-ref.ts
27
21
  var hostRefs = /* @__PURE__ */ new WeakMap();
28
22
  var getHostRef = (ref) => hostRefs.get(ref);
29
- var registerInstance = (lazyInstance, hostRef) => {
30
- hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
31
- };
23
+ var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
32
24
  var registerHost = (hostElement, cmpMeta) => {
33
25
  const hostRef = {
34
26
  $flags$: 0,
@@ -44,8 +36,7 @@ var registerHost = (hostElement, cmpMeta) => {
44
36
  hostElement["s-p"] = [];
45
37
  hostElement["s-rc"] = [];
46
38
  }
47
- const ref = hostRefs.set(hostElement, hostRef);
48
- return ref;
39
+ return hostRefs.set(hostElement, hostRef);
49
40
  };
50
41
  var isMemberInElement = (elm, memberName) => memberName in elm;
51
42
  var consoleError = (e, el) => (0, console.error)(e, el);
@@ -86,7 +77,6 @@ var CONTENT_REF_ID = "r";
86
77
  var ORG_LOCATION_ID = "o";
87
78
  var SLOT_NODE_ID = "s";
88
79
  var TEXT_NODE_ID = "t";
89
- var COMMENT_NODE_ID = "c";
90
80
  var HYDRATE_ID = "s-id";
91
81
  var HYDRATED_STYLE_ID = "sty-id";
92
82
  var HYDRATE_CHILD_ID = "c-id";
@@ -178,8 +168,13 @@ var getAssetPath = (path) => {
178
168
  return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
179
169
  };
180
170
 
171
+ // src/utils/constants.ts
172
+ var EMPTY_OBJ = {};
173
+ var SVG_NS = "http://www.w3.org/2000/svg";
174
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
175
+
181
176
  // src/utils/helpers.ts
182
- var isDef = (v) => v != null && v !== void 0;
177
+ var isDef = (v) => v != null;
183
178
  var isComplexType = (o) => {
184
179
  o = typeof o;
185
180
  return o === "object" || o === "function";
@@ -239,106 +234,20 @@ var unwrapErr = (result) => {
239
234
  throw result.value;
240
235
  }
241
236
  };
242
- var updateFallbackSlotVisibility = (elm) => {
243
- const childNodes = elm.__childNodes || elm.childNodes;
244
- if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
245
- getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
246
- var _a;
247
- if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
248
- if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
249
- slotNode.hidden = true;
250
- } else {
251
- slotNode.hidden = false;
252
- }
253
- }
254
- });
255
- }
256
- for (const childNode of childNodes) {
257
- if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
258
- updateFallbackSlotVisibility(childNode);
259
- }
260
- }
261
- };
262
- var getSlottedChildNodes = (childNodes) => {
263
- const result = [];
264
- for (let i2 = 0; i2 < childNodes.length; i2++) {
265
- const slottedNode = childNodes[i2]["s-nr"];
266
- if (slottedNode && slottedNode.isConnected) {
267
- result.push(slottedNode);
268
- }
269
- }
270
- return result;
271
- };
272
- var getHostSlotNodes = (childNodes, hostName, slotName) => {
273
- let i2 = 0;
274
- let slottedNodes = [];
275
- let childNode;
276
- for (; i2 < childNodes.length; i2++) {
277
- childNode = childNodes[i2];
278
- if (childNode["s-sr"] && childNode["s-hn"] === hostName && (!slotName || childNode["s-sn"] === slotName)) {
279
- slottedNodes.push(childNode);
280
- if (typeof slotName !== "undefined") return slottedNodes;
281
- }
282
- slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
283
- }
284
- return slottedNodes;
285
- };
286
- var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
287
- const childNodes = [];
288
- if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
289
- while ((node = node.nextSibling) && node["s-sn"] === slotName) {
290
- childNodes.push(node);
291
- }
292
- return childNodes;
293
- };
294
- var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
295
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
296
- if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
297
- return true;
298
- }
299
- if (nodeToRelocate.getAttribute("slot") === slotName) {
300
- return true;
301
- }
302
- return false;
303
- }
304
- if (nodeToRelocate["s-sn"] === slotName) {
305
- return true;
237
+ var createTime = (fnName, tagName = "") => {
238
+ {
239
+ return () => {
240
+ return;
241
+ };
306
242
  }
307
- return slotName === "";
308
243
  };
309
- var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
310
- let slottedNodeLocation;
311
- if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
312
- slottedNodeLocation = newChild["s-ol"];
313
- } else {
314
- slottedNodeLocation = document.createTextNode("");
315
- slottedNodeLocation["s-nr"] = newChild;
316
- }
317
- if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
318
- const parent = slotNode["s-cr"].parentNode;
319
- const appendMethod = prepend ? parent.__prepend || parent.prepend : parent.__appendChild || parent.appendChild;
320
- if (typeof position !== "undefined") {
321
- {
322
- slottedNodeLocation["s-oo"] = position;
323
- const childNodes = parent.__childNodes || parent.childNodes;
324
- const slotRelocateNodes = [slottedNodeLocation];
325
- childNodes.forEach((n) => {
326
- if (n["s-nr"]) slotRelocateNodes.push(n);
327
- });
328
- slotRelocateNodes.sort((a, b) => {
329
- if (!a["s-oo"] || a["s-oo"] < b["s-oo"]) return -1;
330
- else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
331
- return 0;
332
- });
333
- slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
334
- }
335
- } else {
336
- appendMethod.call(parent, slottedNodeLocation);
244
+ var uniqueTime = (key, measureText) => {
245
+ {
246
+ return () => {
247
+ return;
248
+ };
337
249
  }
338
- newChild["s-ol"] = slottedNodeLocation;
339
- newChild["s-sh"] = slotNode["s-hn"];
340
250
  };
341
- var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
342
251
  var h = (nodeName, vnodeData, ...children) => {
343
252
  let child = null;
344
253
  let key = null;
@@ -450,134 +359,431 @@ var convertToPrivate = (node) => {
450
359
  vnode.$name$ = node.vname;
451
360
  return vnode;
452
361
  };
453
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
454
- if (oldValue !== newValue) {
455
- let isProp = isMemberInElement(elm, memberName);
456
- let ln = memberName.toLowerCase();
457
- if (memberName === "class") {
458
- const classList = elm.classList;
459
- const oldClasses = parseClassList(oldValue);
460
- let newClasses = parseClassList(newValue);
461
- if (elm["s-si"]) {
462
- newClasses.push(elm["s-si"]);
463
- oldClasses.forEach((c) => {
464
- if (c.startsWith(elm["s-si"])) newClasses.push(c);
465
- });
466
- newClasses = [...new Set(newClasses)];
467
- classList.add(...newClasses);
468
- delete elm["s-si"];
469
- } else {
470
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
471
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
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;
472
389
  }
473
- } else if (memberName === "style") {
474
- {
475
- for (const prop in oldValue) {
476
- if (!newValue || newValue[prop] == null) {
477
- if (prop.includes("-")) {
478
- elm.style.removeProperty(prop);
479
- } else {
480
- elm.style[prop] = "";
481
- }
482
- }
483
- }
390
+ }
391
+ plt.$orgLocNodes$.delete(orgLocationId);
392
+ });
393
+ if (shadowRoot) {
394
+ shadowRootNodes.map((shadowRootNode) => {
395
+ if (shadowRootNode) {
396
+ shadowRoot.appendChild(shadowRootNode);
484
397
  }
485
- for (const prop in newValue) {
486
- if (!oldValue || newValue[prop] !== oldValue[prop]) {
487
- if (prop.includes("-")) {
488
- elm.style.setProperty(prop, newValue[prop]);
489
- } else {
490
- elm.style[prop] = newValue[prop];
491
- }
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$ = [];
430
+ }
431
+ parentVNode.$children$[childVNode.$index$] = childVNode;
432
+ parentVNode = childVNode;
433
+ if (shadowRootNodes && childVNode.$depth$ === "0") {
434
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
492
435
  }
493
436
  }
494
- } else if (memberName === "key") ; else if (memberName === "ref") {
495
- if (newValue) {
496
- newValue(elm);
497
- }
498
- } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
499
- if (memberName[2] === "-") {
500
- memberName = memberName.slice(3);
501
- } else if (isMemberInElement(win, ln)) {
502
- memberName = ln.slice(2);
503
- } else {
504
- memberName = ln[2] + memberName.slice(3);
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
+ );
505
449
  }
506
- if (oldValue || newValue) {
507
- const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
508
- memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
509
- if (oldValue) {
510
- plt.rel(elm, memberName, oldValue, capture);
511
- }
512
- if (newValue) {
513
- plt.ael(elm, memberName, newValue, capture);
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
+ }
514
493
  }
515
- }
516
- } else {
517
- const isComplex = isComplexType(newValue);
518
- if ((isProp || isComplex && newValue !== null) && !isSvg) {
519
- try {
520
- if (!elm.tagName.includes("-")) {
521
- const n = newValue == null ? "" : newValue;
522
- if (memberName === "list") {
523
- isProp = false;
524
- } else if (oldValue == null || elm[memberName] != n) {
525
- if (typeof elm.__lookupSetter__(memberName) === "function") {
526
- elm[memberName] = n;
527
- } else {
528
- elm.setAttribute(memberName, n);
529
- }
530
- }
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];
531
499
  } else {
532
- elm[memberName] = newValue;
500
+ node["s-sn"] = "";
533
501
  }
534
- } catch (e) {
535
- }
536
- }
537
- let xlink = false;
538
- {
539
- if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
540
- memberName = ln;
541
- xlink = true;
542
- }
543
- }
544
- if (newValue == null || newValue === false) {
545
- if (newValue !== false || elm.getAttribute(memberName) === "") {
546
- if (xlink) {
547
- elm.removeAttributeNS(XLINK_NS, memberName);
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$;
512
+ }
513
+ }
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();
548
522
  } else {
549
- elm.removeAttribute(memberName);
523
+ hostElm["s-cr"] = node;
524
+ node["s-cn"] = true;
550
525
  }
551
526
  }
552
- } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
553
- newValue = newValue === true ? "" : newValue;
554
- if (xlink) {
555
- elm.setAttributeNS(XLINK_NS, memberName, newValue);
556
- } else {
557
- elm.setAttribute(memberName, newValue);
558
- }
559
527
  }
560
528
  }
561
- }
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
+ }
562
535
  };
563
- var parseClassListRegex = /\s/;
564
- var parseClassList = (value) => {
565
- if (typeof value === "object" && "baseVal" in value) {
566
- value = value.baseVal;
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
+ }
554
+ }
555
+ };
556
+
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
+ }
567
677
  }
568
- if (!value) {
569
- return [];
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
+ }
570
775
  }
571
- return value.split(parseClassListRegex);
572
776
  };
777
+ var parseClassListRegex = /\s/;
778
+ var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
573
779
  var CAPTURE_EVENT_SUFFIX = "Capture";
574
780
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
575
781
 
576
782
  // src/runtime/vdom/update-element.ts
577
783
  var updateElement = (oldVnode, newVnode, isSvgMode2) => {
578
784
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
579
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
580
- const newVnodeAttrs = newVnode.$attrs$ || {};
785
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
786
+ const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
581
787
  {
582
788
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
583
789
  if (!(memberName in newVnodeAttrs)) {
@@ -607,7 +813,7 @@ var useNativeShadowDom = false;
607
813
  var checkSlotFallbackVisibility = false;
608
814
  var checkSlotRelocate = false;
609
815
  var isSvgMode = false;
610
- var createElm = (oldParentVNode, newParentVNode, childIndex) => {
816
+ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
611
817
  var _a;
612
818
  const newVNode2 = newParentVNode.$children$[childIndex];
613
819
  let i2 = 0;
@@ -617,6 +823,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
617
823
  if (!useNativeShadowDom) {
618
824
  checkSlotRelocate = true;
619
825
  if (newVNode2.$tag$ === "slot") {
826
+ if (scopeId) {
827
+ parentElm.classList.add(scopeId + "-s");
828
+ }
620
829
  newVNode2.$flags$ |= newVNode2.$children$ ? (
621
830
  // slot element has fallback content
622
831
  // still create an element that "mocks" the slot element
@@ -647,12 +856,17 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
647
856
  {
648
857
  updateElement(null, newVNode2, isSvgMode);
649
858
  }
650
- if (isDef(scopeId) && elm["s-si"] !== scopeId) {
859
+ const rootNode = elm.getRootNode();
860
+ const isElementWithinShadowRoot = !rootNode.querySelector("body");
861
+ if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
651
862
  elm.classList.add(elm["s-si"] = scopeId);
652
863
  }
864
+ {
865
+ updateElementScopeIds(elm, parentElm);
866
+ }
653
867
  if (newVNode2.$children$) {
654
868
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
655
- childNode = createElm(oldParentVNode, newVNode2, i2);
869
+ childNode = createElm(oldParentVNode, newVNode2, i2, elm);
656
870
  if (childNode) {
657
871
  elm.appendChild(childNode);
658
872
  }
@@ -679,9 +893,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
679
893
  relocateToHostRoot(oldParentVNode.$elm$);
680
894
  }
681
895
  }
682
- {
683
- addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
684
- }
685
896
  }
686
897
  }
687
898
  return elm;
@@ -690,12 +901,8 @@ var relocateToHostRoot = (parentElm) => {
690
901
  plt.$flags$ |= 1 /* isTmpDisconnected */;
691
902
  const host = parentElm.closest(hostTagName.toLowerCase());
692
903
  if (host != null) {
693
- const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
694
- (ref) => ref["s-cr"]
695
- );
696
- const childNodeArray = Array.from(
697
- parentElm.__childNodes || parentElm.childNodes
698
- );
904
+ const contentRefNode = Array.from(host.childNodes).find((ref) => ref["s-cr"]);
905
+ const childNodeArray = Array.from(parentElm.childNodes);
699
906
  for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
700
907
  if (childNode["s-sh"] != null) {
701
908
  insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
@@ -708,7 +915,7 @@ var relocateToHostRoot = (parentElm) => {
708
915
  };
709
916
  var putBackInOriginalLocation = (parentElm, recursive) => {
710
917
  plt.$flags$ |= 1 /* isTmpDisconnected */;
711
- const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
918
+ const oldSlotChildNodes = Array.from(parentElm.childNodes);
712
919
  if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
713
920
  let node = parentElm;
714
921
  while (node = node.nextSibling) {
@@ -720,7 +927,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
720
927
  for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
721
928
  const childNode = oldSlotChildNodes[i2];
722
929
  if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
723
- insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
930
+ insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
724
931
  childNode["s-ol"].remove();
725
932
  childNode["s-ol"] = void 0;
726
933
  childNode["s-sh"] = void 0;
@@ -740,7 +947,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
740
947
  }
741
948
  for (; startIdx <= endIdx; ++startIdx) {
742
949
  if (vnodes[startIdx]) {
743
- childNode = createElm(null, parentVNode, startIdx);
950
+ childNode = createElm(null, parentVNode, startIdx, parentElm);
744
951
  if (childNode) {
745
952
  vnodes[startIdx].$elm$ = childNode;
746
953
  insertBefore(containerElm, childNode, referenceNode(before) );
@@ -827,7 +1034,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
827
1034
  if (idxInOld >= 0) {
828
1035
  elmToMove = oldCh[idxInOld];
829
1036
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
830
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
1037
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
831
1038
  } else {
832
1039
  patch(elmToMove, newStartVnode, isInitialRender);
833
1040
  oldCh[idxInOld] = void 0;
@@ -835,16 +1042,12 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
835
1042
  }
836
1043
  newStartVnode = newCh[++newStartIdx];
837
1044
  } else {
838
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
1045
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
839
1046
  newStartVnode = newCh[++newStartIdx];
840
1047
  }
841
1048
  if (node) {
842
1049
  {
843
- insertBefore(
844
- referenceNode(oldStartVnode.$elm$).parentNode,
845
- node,
846
- referenceNode(oldStartVnode.$elm$)
847
- );
1050
+ insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
848
1051
  }
849
1052
  }
850
1053
  }
@@ -865,19 +1068,28 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
865
1068
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
866
1069
  if (leftVNode.$tag$ === rightVNode.$tag$) {
867
1070
  if (leftVNode.$tag$ === "slot") {
1071
+ if (
1072
+ // The component gets hydrated and no VDOM has been initialized.
1073
+ // Here the comparison can't happen as $name$ property is not set for `leftNode`.
1074
+ "$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
1075
+ // hydration comments to be removed
1076
+ leftVNode.$elm$.nodeType !== 8
1077
+ ) {
1078
+ return false;
1079
+ }
868
1080
  return leftVNode.$name$ === rightVNode.$name$;
869
1081
  }
870
1082
  if (!isInitialRender) {
871
1083
  return leftVNode.$key$ === rightVNode.$key$;
872
1084
  }
873
- if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
874
- leftVNode.$key$ = rightVNode.$key$;
875
- }
876
1085
  return true;
877
1086
  }
878
1087
  return false;
879
1088
  };
880
- var referenceNode = (node) => node && node["s-ol"] || node;
1089
+ var referenceNode = (node) => {
1090
+ return node && node["s-ol"] || node;
1091
+ };
1092
+ var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
881
1093
  var patch = (oldVNode, newVNode2, isInitialRender = false) => {
882
1094
  const elm = newVNode2.$elm$ = oldVNode.$elm$;
883
1095
  const oldChildren = oldVNode.$children$;
@@ -921,15 +1133,41 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
921
1133
  elm.data = text;
922
1134
  }
923
1135
  };
1136
+ var updateFallbackSlotVisibility = (elm) => {
1137
+ const childNodes = elm.childNodes;
1138
+ for (const childNode of childNodes) {
1139
+ if (childNode.nodeType === 1 /* ElementNode */) {
1140
+ if (childNode["s-sr"]) {
1141
+ const slotName = childNode["s-sn"];
1142
+ childNode.hidden = false;
1143
+ for (const siblingNode of childNodes) {
1144
+ if (siblingNode !== childNode) {
1145
+ if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
1146
+ if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
1147
+ childNode.hidden = true;
1148
+ break;
1149
+ }
1150
+ } else {
1151
+ if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
1152
+ childNode.hidden = true;
1153
+ break;
1154
+ }
1155
+ }
1156
+ }
1157
+ }
1158
+ }
1159
+ updateFallbackSlotVisibility(childNode);
1160
+ }
1161
+ }
1162
+ };
924
1163
  var relocateNodes = [];
925
1164
  var markSlotContentForRelocation = (elm) => {
926
1165
  let node;
927
1166
  let hostContentNodes;
928
1167
  let j;
929
- const children = elm.__childNodes || elm.childNodes;
930
- for (const childNode of children) {
1168
+ for (const childNode of elm.childNodes) {
931
1169
  if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
932
- hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
1170
+ hostContentNodes = node.parentNode.childNodes;
933
1171
  const slotName = childNode["s-sn"];
934
1172
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
935
1173
  node = hostContentNodes[j];
@@ -971,40 +1209,60 @@ var markSlotContentForRelocation = (elm) => {
971
1209
  }
972
1210
  }
973
1211
  };
974
- var nullifyVNodeRefs = (vNode) => {
975
- {
976
- vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
977
- vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
1212
+ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
1213
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1214
+ if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
1215
+ return true;
1216
+ }
1217
+ if (nodeToRelocate.getAttribute("slot") === slotName) {
1218
+ return true;
1219
+ }
1220
+ return false;
1221
+ }
1222
+ if (nodeToRelocate["s-sn"] === slotName) {
1223
+ return true;
978
1224
  }
1225
+ return slotName === "";
979
1226
  };
980
- var insertBefore = (parent, newNode, reference) => {
981
- if (typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
982
- addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
1227
+ var nullifyVNodeRefs = (vNode) => {
1228
+ {
1229
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
1230
+ vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
983
1231
  }
1232
+ };
1233
+ var insertBefore = (parent, newNode, reference) => {
984
1234
  const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
1235
+ {
1236
+ updateElementScopeIds(newNode, parent);
1237
+ }
985
1238
  return inserted;
986
1239
  };
987
- function addRemoveSlotScopedClass(reference, slotNode, newParent, oldParent) {
1240
+ var findScopeIds = (element) => {
1241
+ const scopeIds = [];
1242
+ if (element) {
1243
+ scopeIds.push(
1244
+ ...element["s-scs"] || [],
1245
+ element["s-si"],
1246
+ element["s-sc"],
1247
+ ...findScopeIds(element.parentElement)
1248
+ );
1249
+ }
1250
+ return scopeIds;
1251
+ };
1252
+ var updateElementScopeIds = (element, parent, iterateChildNodes = false) => {
988
1253
  var _a;
989
- let scopeId2;
990
- if (reference && typeof slotNode["s-sn"] === "string" && !!slotNode["s-sr"] && reference.parentNode && reference.parentNode["s-sc"] && (scopeId2 = slotNode["s-si"] || reference.parentNode["s-sc"])) {
991
- const scopeName = slotNode["s-sn"];
992
- const hostName = slotNode["s-hn"];
993
- (_a = newParent.classList) == null ? void 0 : _a.add(scopeId2 + "-s");
994
- if (oldParent && oldParent.classList.contains(scopeId2 + "-s")) {
995
- let child = (oldParent.__childNodes || oldParent.childNodes)[0];
996
- let found = false;
997
- while (child) {
998
- if (child["s-sn"] !== scopeName && child["s-hn"] === hostName && !!child["s-sr"]) {
999
- found = true;
1000
- break;
1254
+ if (element && parent && element.nodeType === 1 /* ElementNode */) {
1255
+ const scopeIds = new Set(findScopeIds(parent).filter(Boolean));
1256
+ if (scopeIds.size) {
1257
+ (_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] = [...scopeIds]);
1258
+ if (element["s-ol"] || iterateChildNodes) {
1259
+ for (const childNode of Array.from(element.childNodes)) {
1260
+ updateElementScopeIds(childNode, element, true);
1001
1261
  }
1002
- child = child.nextSibling;
1003
1262
  }
1004
- if (!found) oldParent.classList.remove(scopeId2 + "-s");
1005
1263
  }
1006
1264
  }
1007
- }
1265
+ };
1008
1266
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1009
1267
  var _a, _b, _c, _d, _e;
1010
1268
  const hostElm = hostRef.$hostElement$;
@@ -1056,7 +1314,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1056
1314
  if (slotRefNode) {
1057
1315
  const parentNodeRef = slotRefNode.parentNode;
1058
1316
  let insertBeforeNode = slotRefNode.nextSibling;
1059
- if ((insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */)) {
1317
+ if (insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
1060
1318
  let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
1061
1319
  while (orgLocationNode) {
1062
1320
  let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
@@ -1072,886 +1330,44 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1072
1330
  }
1073
1331
  orgLocationNode = orgLocationNode.previousSibling;
1074
1332
  }
1075
- }
1076
- if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
1077
- if (nodeToRelocate !== insertBeforeNode) {
1078
- insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
1079
- if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
1080
- nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
1081
- }
1082
- }
1083
- }
1084
- nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](nodeToRelocate);
1085
- } else {
1086
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1087
- if (isInitialLoad) {
1088
- nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
1089
- }
1090
- nodeToRelocate.hidden = true;
1091
- }
1092
- }
1093
- }
1094
- }
1095
- if (checkSlotFallbackVisibility) {
1096
- updateFallbackSlotVisibility(rootVnode.$elm$);
1097
- }
1098
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
1099
- relocateNodes.length = 0;
1100
- }
1101
- if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1102
- const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
1103
- for (const childNode of children) {
1104
- if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
1105
- if (isInitialLoad && childNode["s-ih"] == null) {
1106
- childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
1107
- }
1108
- childNode.hidden = true;
1109
- }
1110
- }
1111
- }
1112
- contentRef = void 0;
1113
- };
1114
-
1115
- // src/runtime/dom-extras.ts
1116
- var patchPseudoShadowDom = (hostElementPrototype) => {
1117
- patchCloneNode(hostElementPrototype);
1118
- patchSlotAppendChild(hostElementPrototype);
1119
- patchSlotAppend(hostElementPrototype);
1120
- patchSlotPrepend(hostElementPrototype);
1121
- patchSlotInsertAdjacentElement(hostElementPrototype);
1122
- patchSlotInsertAdjacentHTML(hostElementPrototype);
1123
- patchSlotInsertAdjacentText(hostElementPrototype);
1124
- patchTextContent(hostElementPrototype);
1125
- patchChildSlotNodes(hostElementPrototype);
1126
- patchSlotRemoveChild(hostElementPrototype);
1127
- };
1128
- var patchCloneNode = (HostElementPrototype) => {
1129
- const orgCloneNode = HostElementPrototype.cloneNode;
1130
- HostElementPrototype.cloneNode = function(deep) {
1131
- const srcNode = this;
1132
- const isShadowDom = srcNode.shadowRoot && supportsShadow ;
1133
- const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
1134
- if (!isShadowDom && deep) {
1135
- let i2 = 0;
1136
- let slotted, nonStencilNode;
1137
- const stencilPrivates = [
1138
- "s-id",
1139
- "s-cr",
1140
- "s-lr",
1141
- "s-rc",
1142
- "s-sc",
1143
- "s-p",
1144
- "s-cn",
1145
- "s-sr",
1146
- "s-sn",
1147
- "s-hn",
1148
- "s-ol",
1149
- "s-nr",
1150
- "s-si",
1151
- "s-rf",
1152
- "s-scs"
1153
- ];
1154
- const childNodes = this.__childNodes || this.childNodes;
1155
- for (; i2 < childNodes.length; i2++) {
1156
- slotted = childNodes[i2]["s-nr"];
1157
- nonStencilNode = stencilPrivates.every((privateField) => !childNodes[i2][privateField]);
1158
- if (slotted) {
1159
- if (clonedNode.__appendChild) {
1160
- clonedNode.__appendChild(slotted.cloneNode(true));
1161
- } else {
1162
- clonedNode.appendChild(slotted.cloneNode(true));
1163
- }
1164
- }
1165
- if (nonStencilNode) {
1166
- clonedNode.appendChild(childNodes[i2].cloneNode(true));
1167
- }
1168
- }
1169
- }
1170
- return clonedNode;
1171
- };
1172
- };
1173
- var patchSlotAppendChild = (HostElementPrototype) => {
1174
- HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
1175
- HostElementPrototype.appendChild = function(newChild) {
1176
- const slotName = newChild["s-sn"] = getSlotName(newChild);
1177
- const slotNode = getHostSlotNodes(this.__childNodes || this.childNodes, this.tagName, slotName)[0];
1178
- if (slotNode) {
1179
- addSlotRelocateNode(newChild, slotNode);
1180
- const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1181
- const appendAfter = slotChildNodes[slotChildNodes.length - 1];
1182
- const insertedNode = insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1183
- updateFallbackSlotVisibility(this);
1184
- return insertedNode;
1185
- }
1186
- return this.__appendChild(newChild);
1187
- };
1188
- };
1189
- var patchSlotRemoveChild = (ElementPrototype) => {
1190
- ElementPrototype.__removeChild = ElementPrototype.removeChild;
1191
- ElementPrototype.removeChild = function(toRemove) {
1192
- if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
1193
- const childNodes = this.__childNodes || this.childNodes;
1194
- const slotNode = getHostSlotNodes(childNodes, this.tagName, toRemove["s-sn"]);
1195
- if (slotNode && toRemove.isConnected) {
1196
- toRemove.remove();
1197
- updateFallbackSlotVisibility(this);
1198
- return;
1199
- }
1200
- }
1201
- return this.__removeChild(toRemove);
1202
- };
1203
- };
1204
- var patchSlotPrepend = (HostElementPrototype) => {
1205
- HostElementPrototype.__prepend = HostElementPrototype.prepend;
1206
- HostElementPrototype.prepend = function(...newChildren) {
1207
- newChildren.forEach((newChild) => {
1208
- if (typeof newChild === "string") {
1209
- newChild = this.ownerDocument.createTextNode(newChild);
1210
- }
1211
- const slotName = newChild["s-sn"] = getSlotName(newChild);
1212
- const childNodes = this.__childNodes || this.childNodes;
1213
- const slotNode = getHostSlotNodes(childNodes, this.tagName, slotName)[0];
1214
- if (slotNode) {
1215
- addSlotRelocateNode(newChild, slotNode, true);
1216
- const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1217
- const appendAfter = slotChildNodes[0];
1218
- return insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1219
- }
1220
- if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
1221
- newChild.hidden = true;
1222
- }
1223
- return HostElementPrototype.__prepend(newChild);
1224
- });
1225
- };
1226
- };
1227
- var patchSlotAppend = (HostElementPrototype) => {
1228
- HostElementPrototype.__append = HostElementPrototype.append;
1229
- HostElementPrototype.append = function(...newChildren) {
1230
- newChildren.forEach((newChild) => {
1231
- if (typeof newChild === "string") {
1232
- newChild = this.ownerDocument.createTextNode(newChild);
1233
- }
1234
- this.appendChild(newChild);
1235
- });
1236
- };
1237
- };
1238
- var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
1239
- const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
1240
- HostElementPrototype.insertAdjacentHTML = function(position, text) {
1241
- if (position !== "afterbegin" && position !== "beforeend") {
1242
- return originalInsertAdjacentHtml.call(this, position, text);
1243
- }
1244
- const container = this.ownerDocument.createElement("_");
1245
- let node;
1246
- container.innerHTML = text;
1247
- if (position === "afterbegin") {
1248
- while (node = container.firstChild) {
1249
- this.prepend(node);
1250
- }
1251
- } else if (position === "beforeend") {
1252
- while (node = container.firstChild) {
1253
- this.append(node);
1254
- }
1255
- }
1256
- };
1257
- };
1258
- var patchSlotInsertAdjacentText = (HostElementPrototype) => {
1259
- HostElementPrototype.insertAdjacentText = function(position, text) {
1260
- this.insertAdjacentHTML(position, text);
1261
- };
1262
- };
1263
- var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
1264
- const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
1265
- HostElementPrototype.insertAdjacentElement = function(position, element) {
1266
- if (position !== "afterbegin" && position !== "beforeend") {
1267
- return originalInsertAdjacentElement.call(this, position, element);
1268
- }
1269
- if (position === "afterbegin") {
1270
- this.prepend(element);
1271
- return element;
1272
- } else if (position === "beforeend") {
1273
- this.append(element);
1274
- return element;
1275
- }
1276
- return element;
1277
- };
1278
- };
1279
- var patchTextContent = (hostElementPrototype) => {
1280
- patchHostOriginalAccessor("textContent", hostElementPrototype);
1281
- Object.defineProperty(hostElementPrototype, "textContent", {
1282
- get: function() {
1283
- let text = "";
1284
- const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
1285
- childNodes.forEach((node) => text += node.textContent || "");
1286
- return text;
1287
- },
1288
- set: function(value) {
1289
- const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
1290
- childNodes.forEach((node) => {
1291
- if (node["s-ol"]) node["s-ol"].remove();
1292
- node.remove();
1293
- });
1294
- this.insertAdjacentHTML("beforeend", value);
1295
- }
1296
- });
1297
- };
1298
- var patchChildSlotNodes = (elm) => {
1299
- class FakeNodeList extends Array {
1300
- item(n) {
1301
- return this[n];
1302
- }
1303
- }
1304
- patchHostOriginalAccessor("children", elm);
1305
- Object.defineProperty(elm, "children", {
1306
- get() {
1307
- return this.childNodes.filter((n) => n.nodeType === 1);
1308
- }
1309
- });
1310
- Object.defineProperty(elm, "childElementCount", {
1311
- get() {
1312
- return this.children.length;
1313
- }
1314
- });
1315
- patchHostOriginalAccessor("firstChild", elm);
1316
- Object.defineProperty(elm, "firstChild", {
1317
- get() {
1318
- return this.childNodes[0];
1319
- }
1320
- });
1321
- patchHostOriginalAccessor("lastChild", elm);
1322
- Object.defineProperty(elm, "lastChild", {
1323
- get() {
1324
- return this.childNodes[this.childNodes.length - 1];
1325
- }
1326
- });
1327
- patchHostOriginalAccessor("childNodes", elm);
1328
- Object.defineProperty(elm, "childNodes", {
1329
- get() {
1330
- var _a, _b;
1331
- 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 */) {
1332
- const result = new FakeNodeList();
1333
- const nodes = getSlottedChildNodes(this.__childNodes);
1334
- result.push(...nodes);
1335
- return result;
1336
- }
1337
- return FakeNodeList.from(this.__childNodes);
1338
- }
1339
- });
1340
- };
1341
- var patchNextPrev = (node) => {
1342
- if (!node || node.__nextSibling || !globalThis.Node) return;
1343
- patchNextSibling(node);
1344
- patchPreviousSibling(node);
1345
- if (node.nodeType === Node.ELEMENT_NODE) {
1346
- patchNextElementSibling(node);
1347
- patchPreviousElementSibling(node);
1348
- }
1349
- };
1350
- var patchNextSibling = (node) => {
1351
- if (!node || node.__nextSibling) return;
1352
- patchHostOriginalAccessor("nextSibling", node);
1353
- Object.defineProperty(node, "nextSibling", {
1354
- get: function() {
1355
- var _a;
1356
- const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
1357
- const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1358
- if (parentNodes && index > -1) {
1359
- return parentNodes[index + 1];
1360
- }
1361
- return this.__nextSibling;
1362
- }
1363
- });
1364
- };
1365
- var patchNextElementSibling = (element) => {
1366
- if (!element || element.__nextElementSibling) return;
1367
- patchHostOriginalAccessor("nextElementSibling", element);
1368
- Object.defineProperty(element, "nextElementSibling", {
1369
- get: function() {
1370
- var _a;
1371
- const parentEles = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
1372
- const index = parentEles == null ? void 0 : parentEles.indexOf(this);
1373
- if (parentEles && index > -1) {
1374
- return parentEles[index + 1];
1375
- }
1376
- return this.__nextElementSibling;
1377
- }
1378
- });
1379
- };
1380
- var patchPreviousSibling = (node) => {
1381
- if (!node || node.__previousSibling) return;
1382
- patchHostOriginalAccessor("previousSibling", node);
1383
- Object.defineProperty(node, "previousSibling", {
1384
- get: function() {
1385
- var _a;
1386
- const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
1387
- const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1388
- if (parentNodes && index > -1) {
1389
- return parentNodes[index - 1];
1390
- }
1391
- return this.__previousSibling;
1392
- }
1393
- });
1394
- };
1395
- var patchPreviousElementSibling = (element) => {
1396
- if (!element || element.__previousElementSibling) return;
1397
- patchHostOriginalAccessor("previousElementSibling", element);
1398
- Object.defineProperty(element, "previousElementSibling", {
1399
- get: function() {
1400
- var _a;
1401
- const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
1402
- const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1403
- if (parentNodes && index > -1) {
1404
- return parentNodes[index - 1];
1405
- }
1406
- return this.__previousElementSibling;
1407
- }
1408
- });
1409
- };
1410
- var validElementPatches = ["children", "nextElementSibling", "previousElementSibling"];
1411
- var validNodesPatches = [
1412
- "childNodes",
1413
- "firstChild",
1414
- "lastChild",
1415
- "nextSibling",
1416
- "previousSibling",
1417
- "textContent"
1418
- ];
1419
- function patchHostOriginalAccessor(accessorName, node) {
1420
- let accessor;
1421
- if (validElementPatches.includes(accessorName)) {
1422
- accessor = Object.getOwnPropertyDescriptor(Element.prototype, accessorName);
1423
- } else if (validNodesPatches.includes(accessorName)) {
1424
- accessor = Object.getOwnPropertyDescriptor(Node.prototype, accessorName);
1425
- }
1426
- if (!accessor) {
1427
- accessor = Object.getOwnPropertyDescriptor(node, accessorName);
1428
- }
1429
- if (accessor) Object.defineProperty(node, "__" + accessorName, accessor);
1430
- }
1431
- var createTime = (fnName, tagName = "") => {
1432
- {
1433
- return () => {
1434
- return;
1435
- };
1436
- }
1437
- };
1438
- var uniqueTime = (key, measureText) => {
1439
- {
1440
- return () => {
1441
- return;
1442
- };
1443
- }
1444
- };
1445
-
1446
- // src/runtime/client-hydrate.ts
1447
- var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1448
- const endHydrate = createTime("hydrateClient", tagName);
1449
- const shadowRoot = hostElm.shadowRoot;
1450
- const childRenderNodes = [];
1451
- const slotNodes = [];
1452
- const slottedNodes = [];
1453
- const shadowRootNodes = shadowRoot ? [] : null;
1454
- const vnode = newVNode(tagName, null);
1455
- vnode.$elm$ = hostElm;
1456
- let scopeId2;
1457
- {
1458
- const cmpMeta = hostRef.$cmpMeta$;
1459
- if (cmpMeta && cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */ && hostElm["s-sc"]) {
1460
- scopeId2 = hostElm["s-sc"];
1461
- hostElm.classList.add(scopeId2 + "-h");
1462
- } else if (hostElm["s-sc"]) {
1463
- delete hostElm["s-sc"];
1464
- }
1465
- }
1466
- if (!plt.$orgLocNodes$) {
1467
- initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
1468
- }
1469
- hostElm[HYDRATE_ID] = hostId;
1470
- hostElm.removeAttribute(HYDRATE_ID);
1471
- hostRef.$vnode$ = clientHydrate(
1472
- vnode,
1473
- childRenderNodes,
1474
- slotNodes,
1475
- shadowRootNodes,
1476
- hostElm,
1477
- hostElm,
1478
- hostId,
1479
- slottedNodes
1480
- );
1481
- let crIndex = 0;
1482
- const crLength = childRenderNodes.length;
1483
- let childRenderNode;
1484
- for (crIndex; crIndex < crLength; crIndex++) {
1485
- childRenderNode = childRenderNodes[crIndex];
1486
- const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
1487
- const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
1488
- const node = childRenderNode.$elm$;
1489
- if (!shadowRoot) {
1490
- node["s-hn"] = tagName.toUpperCase();
1491
- if (childRenderNode.$tag$ === "slot") {
1492
- node["s-cr"] = hostElm["s-cr"];
1493
- }
1494
- }
1495
- if (childRenderNode.$tag$ === "slot") {
1496
- if (childRenderNode.$children$) {
1497
- childRenderNode.$flags$ |= 2 /* isSlotFallback */;
1498
- if (!childRenderNode.$elm$.childNodes.length) {
1499
- childRenderNode.$children$.forEach((c) => {
1500
- childRenderNode.$elm$.appendChild(c.$elm$);
1501
- });
1502
- }
1503
- } else {
1504
- childRenderNode.$flags$ |= 1 /* isSlotReference */;
1505
- }
1506
- }
1507
- if (orgLocationNode && orgLocationNode.isConnected) {
1508
- if (shadowRoot && orgLocationNode["s-en"] === "") {
1509
- orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
1510
- }
1511
- orgLocationNode.parentNode.removeChild(orgLocationNode);
1512
- if (!shadowRoot) {
1513
- node["s-oo"] = parseInt(childRenderNode.$nodeId$);
1514
- }
1515
- }
1516
- plt.$orgLocNodes$.delete(orgLocationId);
1517
- }
1518
- const hosts = [];
1519
- const snLen = slottedNodes.length;
1520
- let snIndex = 0;
1521
- let slotGroup;
1522
- let snGroupIdx;
1523
- let snGroupLen;
1524
- let slottedItem;
1525
- for (snIndex; snIndex < snLen; snIndex++) {
1526
- slotGroup = slottedNodes[snIndex];
1527
- if (!slotGroup || !slotGroup.length) continue;
1528
- snGroupLen = slotGroup.length;
1529
- snGroupIdx = 0;
1530
- for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
1531
- slottedItem = slotGroup[snGroupIdx];
1532
- if (!hosts[slottedItem.hostId]) {
1533
- hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
1534
- }
1535
- if (!hosts[slottedItem.hostId]) continue;
1536
- const hostEle = hosts[slottedItem.hostId];
1537
- if (!hostEle.shadowRoot || !shadowRoot) {
1538
- slottedItem.slot["s-cr"] = hostEle["s-cr"];
1539
- if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
1540
- slottedItem.slot["s-cr"] = hostEle;
1541
- } else {
1542
- slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
1543
- }
1544
- addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
1545
- {
1546
- patchNextPrev(slottedItem.node);
1547
- }
1548
- }
1549
- if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
1550
- hostEle.appendChild(slottedItem.node);
1551
- }
1552
- }
1553
- }
1554
- if (scopeId2 && slotNodes.length) {
1555
- slotNodes.forEach((slot) => {
1556
- slot.$elm$.parentElement.classList.add(scopeId2 + "-s");
1557
- });
1558
- }
1559
- if (shadowRoot) {
1560
- let rnIdex = 0;
1561
- const rnLen = shadowRootNodes.length;
1562
- for (rnIdex; rnIdex < rnLen; rnIdex++) {
1563
- shadowRoot.appendChild(shadowRootNodes[rnIdex]);
1564
- }
1565
- Array.from(hostElm.childNodes).forEach((node) => {
1566
- if (node.nodeType === 8 /* CommentNode */ && typeof node["s-sn"] !== "string") {
1567
- node.parentNode.removeChild(node);
1568
- }
1569
- });
1570
- }
1571
- hostRef.$hostElement$ = hostElm;
1572
- endHydrate();
1573
- };
1574
- var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
1575
- let childNodeType;
1576
- let childIdSplt;
1577
- let childVNode;
1578
- let i2;
1579
- const scopeId2 = hostElm["s-sc"];
1580
- if (node.nodeType === 1 /* ElementNode */) {
1581
- childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
1582
- if (childNodeType) {
1583
- childIdSplt = childNodeType.split(".");
1584
- if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
1585
- childVNode = createSimpleVNode({
1586
- $flags$: 0,
1587
- $hostId$: childIdSplt[0],
1588
- $nodeId$: childIdSplt[1],
1589
- $depth$: childIdSplt[2],
1590
- $index$: childIdSplt[3],
1591
- $tag$: node.tagName.toLowerCase(),
1592
- $elm$: node,
1593
- // If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
1594
- // won't try to reconcile them. Classes set on the node will be blown away.
1595
- $attrs$: { class: node.className || "" }
1596
- });
1597
- childRenderNodes.push(childVNode);
1598
- node.removeAttribute(HYDRATE_CHILD_ID);
1599
- if (!parentVNode.$children$) {
1600
- parentVNode.$children$ = [];
1601
- }
1602
- if (scopeId2) {
1603
- node["s-si"] = scopeId2;
1604
- childVNode.$attrs$.class += " " + scopeId2;
1605
- }
1606
- const slotName = childVNode.$elm$.getAttribute("s-sn");
1607
- if (typeof slotName === "string") {
1608
- if (childVNode.$tag$ === "slot-fb") {
1609
- addSlot(
1610
- slotName,
1611
- childIdSplt[2],
1612
- childVNode,
1613
- node,
1614
- parentVNode,
1615
- childRenderNodes,
1616
- slotNodes,
1617
- shadowRootNodes,
1618
- slottedNodes
1619
- );
1620
- if (scopeId2) {
1621
- node.classList.add(scopeId2);
1622
- }
1623
- }
1624
- childVNode.$elm$["s-sn"] = slotName;
1625
- childVNode.$elm$.removeAttribute("s-sn");
1626
- }
1627
- if (childVNode.$index$ !== void 0) {
1628
- parentVNode.$children$[childVNode.$index$] = childVNode;
1629
- }
1630
- parentVNode = childVNode;
1631
- if (shadowRootNodes && childVNode.$depth$ === "0") {
1632
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1633
- }
1634
- }
1635
- }
1636
- if (node.shadowRoot) {
1637
- for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
1638
- clientHydrate(
1639
- parentVNode,
1640
- childRenderNodes,
1641
- slotNodes,
1642
- shadowRootNodes,
1643
- hostElm,
1644
- node.shadowRoot.childNodes[i2],
1645
- hostId,
1646
- slottedNodes
1647
- );
1648
- }
1649
- }
1650
- const nonShadowNodes = node.__childNodes || node.childNodes;
1651
- for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
1652
- clientHydrate(
1653
- parentVNode,
1654
- childRenderNodes,
1655
- slotNodes,
1656
- shadowRootNodes,
1657
- hostElm,
1658
- nonShadowNodes[i2],
1659
- hostId,
1660
- slottedNodes
1661
- );
1662
- }
1663
- } else if (node.nodeType === 8 /* CommentNode */) {
1664
- childIdSplt = node.nodeValue.split(".");
1665
- if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
1666
- childNodeType = childIdSplt[0];
1667
- childVNode = createSimpleVNode({
1668
- $hostId$: childIdSplt[1],
1669
- $nodeId$: childIdSplt[2],
1670
- $depth$: childIdSplt[3],
1671
- $index$: childIdSplt[4] || "0",
1672
- $elm$: node,
1673
- $attrs$: null,
1674
- $children$: null,
1675
- $key$: null,
1676
- $name$: null,
1677
- $tag$: null,
1678
- $text$: null
1679
- });
1680
- if (childNodeType === TEXT_NODE_ID) {
1681
- childVNode.$elm$ = node.nextSibling;
1682
- if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
1683
- childVNode.$text$ = childVNode.$elm$.textContent;
1684
- childRenderNodes.push(childVNode);
1685
- node.remove();
1686
- if (hostId === childVNode.$hostId$) {
1687
- if (!parentVNode.$children$) {
1688
- parentVNode.$children$ = [];
1689
- }
1690
- parentVNode.$children$[childVNode.$index$] = childVNode;
1691
- }
1692
- if (shadowRootNodes && childVNode.$depth$ === "0") {
1693
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1694
- }
1695
- }
1696
- } else if (childNodeType === COMMENT_NODE_ID) {
1697
- childVNode.$elm$ = node.nextSibling;
1698
- if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
1699
- childRenderNodes.push(childVNode);
1700
- node.remove();
1701
- }
1702
- } else if (childVNode.$hostId$ === hostId) {
1703
- if (childNodeType === SLOT_NODE_ID) {
1704
- const slotName = node["s-sn"] = childIdSplt[5] || "";
1705
- addSlot(
1706
- slotName,
1707
- childIdSplt[2],
1708
- childVNode,
1709
- node,
1710
- parentVNode,
1711
- childRenderNodes,
1712
- slotNodes,
1713
- shadowRootNodes,
1714
- slottedNodes
1715
- );
1716
- } else if (childNodeType === CONTENT_REF_ID) {
1717
- if (shadowRootNodes) {
1718
- node.remove();
1719
- } else {
1720
- hostElm["s-cr"] = node;
1721
- node["s-cn"] = true;
1722
- }
1723
- }
1724
- }
1725
- }
1726
- } else if (parentVNode && parentVNode.$tag$ === "style") {
1727
- const vnode = newVNode(null, node.textContent);
1728
- vnode.$elm$ = node;
1729
- vnode.$index$ = "0";
1730
- parentVNode.$children$ = [vnode];
1731
- }
1732
- return parentVNode;
1733
- };
1734
- var initializeDocumentHydrate = (node, orgLocNodes) => {
1735
- if (node.nodeType === 1 /* ElementNode */) {
1736
- const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
1737
- if (componentId) {
1738
- orgLocNodes.set(componentId, node);
1739
- }
1740
- let i2 = 0;
1741
- if (node.shadowRoot) {
1742
- for (; i2 < node.shadowRoot.childNodes.length; i2++) {
1743
- initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
1744
- }
1745
- }
1746
- const nonShadowNodes = node.__childNodes || node.childNodes;
1747
- for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
1748
- initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
1749
- }
1750
- } else if (node.nodeType === 8 /* CommentNode */) {
1751
- const childIdSplt = node.nodeValue.split(".");
1752
- if (childIdSplt[0] === ORG_LOCATION_ID) {
1753
- orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
1754
- node.nodeValue = "";
1755
- node["s-en"] = childIdSplt[3];
1756
- }
1757
- }
1758
- };
1759
- var createSimpleVNode = (vnode) => {
1760
- const defaultVNode = {
1761
- $flags$: 0,
1762
- $hostId$: null,
1763
- $nodeId$: null,
1764
- $depth$: null,
1765
- $index$: "0",
1766
- $elm$: null,
1767
- $attrs$: null,
1768
- $children$: null,
1769
- $key$: null,
1770
- $name$: null,
1771
- $tag$: null,
1772
- $text$: null
1773
- };
1774
- return { ...defaultVNode, ...vnode };
1775
- };
1776
- function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
1777
- node["s-sr"] = true;
1778
- childVNode.$name$ = slotName || null;
1779
- childVNode.$tag$ = "slot";
1780
- const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
1781
- if (shadowRootNodes) {
1782
- const slot = childVNode.$elm$ = doc.createElement(childVNode.$tag$);
1783
- if (childVNode.$name$) {
1784
- childVNode.$elm$.setAttribute("name", slotName);
1785
- }
1786
- if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
1787
- parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1788
- } else {
1789
- node.parentNode.insertBefore(childVNode.$elm$, node);
1790
- }
1791
- addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
1792
- node.remove();
1793
- if (childVNode.$depth$ === "0") {
1794
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1795
- }
1796
- } else {
1797
- const slot = childVNode.$elm$;
1798
- const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
1799
- addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
1800
- if (shouldMove) {
1801
- parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1802
- }
1803
- childRenderNodes.push(childVNode);
1804
- }
1805
- slotNodes.push(childVNode);
1806
- if (!parentVNode.$children$) {
1807
- parentVNode.$children$ = [];
1808
- }
1809
- parentVNode.$children$[childVNode.$index$] = childVNode;
1810
- }
1811
- var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
1812
- let slottedNode = slotNode.nextSibling;
1813
- slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
1814
- 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 */))) {
1815
- slottedNode["s-sn"] = slotName;
1816
- slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
1817
- slottedNode = slottedNode.nextSibling;
1818
- }
1819
- };
1820
-
1821
- // src/runtime/mode.ts
1822
- var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
1823
- var setMode = (handler) => modeResolutionChain.push(handler);
1824
- var getMode = (ref) => getHostRef(ref).$modeName$;
1825
- var parsePropertyValue = (propValue, propType) => {
1826
- if (propValue != null && !isComplexType(propValue)) {
1827
- if (propType & 4 /* Boolean */) {
1828
- return propValue === "false" ? false : propValue === "" || !!propValue;
1829
- }
1830
- if (propType & 2 /* Number */) {
1831
- return parseFloat(propValue);
1832
- }
1833
- if (propType & 1 /* String */) {
1834
- return String(propValue);
1835
- }
1836
- return propValue;
1837
- }
1838
- return propValue;
1839
- };
1840
- var getElement = (ref) => getHostRef(ref).$hostElement$ ;
1841
-
1842
- // src/runtime/event-emitter.ts
1843
- var createEvent = (ref, name, flags) => {
1844
- const elm = getElement(ref);
1845
- return {
1846
- emit: (detail) => {
1847
- return emitEvent(elm, name, {
1848
- bubbles: !!(flags & 4 /* Bubbles */),
1849
- composed: !!(flags & 2 /* Composed */),
1850
- cancelable: !!(flags & 1 /* Cancellable */),
1851
- detail
1852
- });
1853
- }
1854
- };
1855
- };
1856
- var emitEvent = (elm, name, opts) => {
1857
- const ev = plt.ce(name, opts);
1858
- elm.dispatchEvent(ev);
1859
- return ev;
1860
- };
1861
- var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
1862
- var registerStyle = (scopeId2, cssText, allowCS) => {
1863
- let style = styles.get(scopeId2);
1864
- if (supportsConstructableStylesheets && allowCS) {
1865
- style = style || new CSSStyleSheet();
1866
- if (typeof style === "string") {
1867
- style = cssText;
1868
- } else {
1869
- style.replaceSync(cssText);
1870
- }
1871
- } else {
1872
- style = cssText;
1873
- }
1874
- styles.set(scopeId2, style);
1875
- };
1876
- var addStyle = (styleContainerNode, cmpMeta, mode) => {
1877
- var _a;
1878
- const scopeId2 = getScopeId(cmpMeta, mode);
1879
- const style = styles.get(scopeId2);
1880
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
1881
- if (style) {
1882
- if (typeof style === "string") {
1883
- styleContainerNode = styleContainerNode.head || styleContainerNode;
1884
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
1885
- let styleElm;
1886
- if (!appliedStyles) {
1887
- rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
1888
- }
1889
- if (!appliedStyles.has(scopeId2)) {
1890
- if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
1891
- styleElm.innerHTML = style;
1892
- } else {
1893
- styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
1894
- styleElm.innerHTML = style;
1895
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
1896
- if (nonce != null) {
1897
- styleElm.setAttribute("nonce", nonce);
1898
- }
1899
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
1900
- if (styleContainerNode.nodeName === "HEAD") {
1901
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
1902
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
1903
- styleContainerNode.insertBefore(styleElm, referenceNode2);
1904
- } else if ("host" in styleContainerNode) {
1905
- if (supportsConstructableStylesheets) {
1906
- const stylesheet = new CSSStyleSheet();
1907
- stylesheet.replaceSync(style);
1908
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
1909
- } else {
1910
- const existingStyleContainer = styleContainerNode.querySelector("style");
1911
- if (existingStyleContainer) {
1912
- existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
1913
- } else {
1914
- styleContainerNode.prepend(styleElm);
1915
- }
1333
+ }
1334
+ if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
1335
+ if (nodeToRelocate !== insertBeforeNode) {
1336
+ insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
1337
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1338
+ nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
1916
1339
  }
1917
- } else {
1918
- styleContainerNode.append(styleElm);
1919
1340
  }
1920
1341
  }
1921
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
1922
- styleContainerNode.insertBefore(styleElm, null);
1342
+ nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](nodeToRelocate);
1343
+ } else {
1344
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1345
+ if (isInitialLoad) {
1346
+ nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
1347
+ }
1348
+ nodeToRelocate.hidden = true;
1923
1349
  }
1924
1350
  }
1925
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
1926
- styleElm.innerHTML += SLOT_FB_CSS;
1927
- }
1928
- if (appliedStyles) {
1929
- appliedStyles.add(scopeId2);
1930
- }
1931
1351
  }
1932
- } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
1933
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
1934
1352
  }
1353
+ if (checkSlotFallbackVisibility) {
1354
+ updateFallbackSlotVisibility(rootVnode.$elm$);
1355
+ }
1356
+ plt.$flags$ &= ~1 /* isTmpDisconnected */;
1357
+ relocateNodes.length = 0;
1935
1358
  }
1936
- return scopeId2;
1937
- };
1938
- var attachStyles = (hostRef) => {
1939
- const cmpMeta = hostRef.$cmpMeta$;
1940
- const elm = hostRef.$hostElement$;
1941
- const flags = cmpMeta.$flags$;
1942
- const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
1943
- const scopeId2 = addStyle(
1944
- elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
1945
- cmpMeta,
1946
- hostRef.$modeName$
1947
- );
1948
- if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
1949
- elm["s-sc"] = scopeId2;
1950
- elm.classList.add(scopeId2 + "-h");
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
+ }
1367
+ }
1951
1368
  }
1952
- endAttachStyles();
1369
+ contentRef = void 0;
1953
1370
  };
1954
- var getScopeId = (cmp, mode) => "sc-" + (mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
1955
1371
 
1956
1372
  // src/runtime/update-component.ts
1957
1373
  var attachToAncestor = (hostRef, ancestorComponent) => {
@@ -2179,62 +1595,16 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
2179
1595
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
2180
1596
  members.map(([memberName, [memberFlags]]) => {
2181
1597
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
2182
- if ((memberFlags & 2048 /* Getter */) === 0) {
2183
- Object.defineProperty(prototype, memberName, {
2184
- get() {
2185
- return getValue(this, memberName);
2186
- },
2187
- set(newValue) {
2188
- setValue(this, memberName, newValue, cmpMeta);
2189
- },
2190
- configurable: true,
2191
- enumerable: true
2192
- });
2193
- } else if (flags & 1 /* isElementConstructor */ && memberFlags & 2048 /* Getter */) {
2194
- {
2195
- Object.defineProperty(prototype, memberName, {
2196
- get() {
2197
- const ref = getHostRef(this);
2198
- const instance = ref ? ref.$lazyInstance$ : prototype;
2199
- if (!instance) return;
2200
- return instance[memberName];
2201
- },
2202
- configurable: true,
2203
- enumerable: true
2204
- });
2205
- }
2206
- if (memberFlags & 4096 /* Setter */) {
2207
- const origSetter = Object.getOwnPropertyDescriptor(prototype, memberName).set;
2208
- Object.defineProperty(prototype, memberName, {
2209
- set(newValue) {
2210
- const ref = getHostRef(this);
2211
- if (origSetter) {
2212
- const currentValue = ref.$hostElement$[memberName];
2213
- if (!ref.$instanceValues$.get(memberName) && currentValue) {
2214
- ref.$instanceValues$.set(memberName, currentValue);
2215
- }
2216
- origSetter.apply(this, [parsePropertyValue(newValue, cmpMeta.$members$[memberName][0])]);
2217
- setValue(this, memberName, ref.$hostElement$[memberName], cmpMeta);
2218
- return;
2219
- }
2220
- if (!ref) return;
2221
- const setterSetVal = () => {
2222
- const currentValue = ref.$lazyInstance$[memberName];
2223
- if (!ref.$instanceValues$.get(memberName) && currentValue) {
2224
- ref.$instanceValues$.set(memberName, currentValue);
2225
- }
2226
- ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, cmpMeta.$members$[memberName][0]);
2227
- setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
2228
- };
2229
- if (ref.$lazyInstance$) {
2230
- setterSetVal();
2231
- } else {
2232
- ref.$onReadyPromise$.then(() => setterSetVal());
2233
- }
2234
- }
2235
- });
2236
- }
2237
- }
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
+ });
2238
1608
  } else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
2239
1609
  Object.defineProperty(prototype, memberName, {
2240
1610
  value(...args) {
@@ -2254,7 +1624,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
2254
1624
  plt.jmp(() => {
2255
1625
  var _a2;
2256
1626
  const propName = attrNameToPropName.get(attrName);
2257
- if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
1627
+ if (this.hasOwnProperty(propName)) {
2258
1628
  newValue = this[propName];
2259
1629
  delete this[propName];
2260
1630
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -2274,10 +1644,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
2274
1644
  }
2275
1645
  return;
2276
1646
  }
2277
- const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
2278
- if (!propDesc.get || !!propDesc.set) {
2279
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2280
- }
1647
+ this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2281
1648
  });
2282
1649
  };
2283
1650
  Cstr.observedAttributes = Array.from(
@@ -2393,9 +1760,6 @@ var connectedCallback = (elm) => {
2393
1760
  if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2394
1761
  const scopeId2 = addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) ;
2395
1762
  elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
2396
- } else if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2397
- const scopeId2 = getScopeId(cmpMeta, elm.getAttribute("s-mode") );
2398
- elm["s-sc"] = scopeId2;
2399
1763
  }
2400
1764
  initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
2401
1765
  }
@@ -2465,12 +1829,287 @@ var disconnectedCallback = async (elm) => {
2465
1829
  hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
2466
1830
  }
2467
1831
  }
2468
- if (rootAppliedStyles.has(elm)) {
2469
- rootAppliedStyles.delete(elm);
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
+ }
2470
2104
  }
2471
- if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
2472
- rootAppliedStyles.delete(elm.shadowRoot);
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);
2473
2111
  }
2112
+ return childNodes;
2474
2113
  };
2475
2114
 
2476
2115
  // src/runtime/bootstrap-lazy.ts
@@ -2561,13 +2200,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2561
2200
  }
2562
2201
  disconnectedCallback() {
2563
2202
  plt.jmp(() => disconnectedCallback(this));
2564
- plt.raf(() => {
2565
- var _a3;
2566
- const hostRef = getHostRef(this);
2567
- if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
2568
- delete hostRef.$vnode$.$elm$;
2569
- }
2570
- });
2571
2203
  }
2572
2204
  componentOnReady() {
2573
2205
  return getHostRef(this).$onReadyPromise$;
@@ -2575,7 +2207,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2575
2207
  };
2576
2208
  {
2577
2209
  if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2578
- patchPseudoShadowDom(HostElement.prototype);
2210
+ patchPseudoShadowDom(HostElement.prototype, cmpMeta);
2579
2211
  }
2580
2212
  }
2581
2213
  cmpMeta.$lazyBundleId$ = lazyBundle[0];