@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
@@ -24,10 +24,10 @@ function _interopNamespace(e) {
24
24
  }
25
25
 
26
26
  const NAMESPACE = 'ionic';
27
- const BUILD = /* ionic */ { allRenderFn: false, appendChildSlotFix: true, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: true, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: true, experimentalSlotFixes: true, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: true, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: true, 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 };
27
+ const BUILD = /* ionic */ { allRenderFn: false, appendChildSlotFix: true, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: true, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: true, experimentalSlotFixes: true, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: true, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: true, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: true, scopedSlotTextContentFix: true, scriptDataOpts: false, shadowDelegatesFocus: true, shadowDom: true, slot: true, slotChildNodesFix: true, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
28
28
 
29
29
  /*
30
- Stencil Client Platform v4.23.2 | MIT Licensed | https://stenciljs.com
30
+ Stencil Client Platform v4.20.0 | MIT Licensed | https://stenciljs.com
31
31
  */
32
32
  var __defProp = Object.defineProperty;
33
33
  var __export = (target, all) => {
@@ -40,17 +40,9 @@ var Build = {
40
40
  isServer: false,
41
41
  isTesting: false
42
42
  };
43
-
44
- // src/utils/constants.ts
45
- var SVG_NS = "http://www.w3.org/2000/svg";
46
- var HTML_NS = "http://www.w3.org/1999/xhtml";
47
-
48
- // src/client/client-host-ref.ts
49
43
  var hostRefs = /* @__PURE__ */ new WeakMap();
50
44
  var getHostRef = (ref) => hostRefs.get(ref);
51
- var registerInstance = (lazyInstance, hostRef) => {
52
- hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
53
- };
45
+ var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
54
46
  var registerHost = (hostElement, cmpMeta) => {
55
47
  const hostRef = {
56
48
  $flags$: 0,
@@ -66,8 +58,7 @@ var registerHost = (hostElement, cmpMeta) => {
66
58
  hostElement["s-p"] = [];
67
59
  hostElement["s-rc"] = [];
68
60
  }
69
- const ref = hostRefs.set(hostElement, hostRef);
70
- return ref;
61
+ return hostRefs.set(hostElement, hostRef);
71
62
  };
72
63
  var isMemberInElement = (elm, memberName) => memberName in elm;
73
64
  var consoleError = (e, el) => (0, console.error)(e, el);
@@ -108,7 +99,6 @@ var CONTENT_REF_ID = "r";
108
99
  var ORG_LOCATION_ID = "o";
109
100
  var SLOT_NODE_ID = "s";
110
101
  var TEXT_NODE_ID = "t";
111
- var COMMENT_NODE_ID = "c";
112
102
  var HYDRATE_ID = "s-id";
113
103
  var HYDRATED_STYLE_ID = "sty-id";
114
104
  var HYDRATE_CHILD_ID = "c-id";
@@ -200,8 +190,13 @@ var getAssetPath = (path) => {
200
190
  return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
201
191
  };
202
192
 
193
+ // src/utils/constants.ts
194
+ var EMPTY_OBJ = {};
195
+ var SVG_NS = "http://www.w3.org/2000/svg";
196
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
197
+
203
198
  // src/utils/helpers.ts
204
- var isDef = (v) => v != null && v !== void 0;
199
+ var isDef = (v) => v != null;
205
200
  var isComplexType = (o) => {
206
201
  o = typeof o;
207
202
  return o === "object" || o === "function";
@@ -261,106 +256,20 @@ var unwrapErr = (result) => {
261
256
  throw result.value;
262
257
  }
263
258
  };
264
- var updateFallbackSlotVisibility = (elm) => {
265
- const childNodes = elm.__childNodes || elm.childNodes;
266
- if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
267
- getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
268
- var _a;
269
- if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
270
- if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
271
- slotNode.hidden = true;
272
- } else {
273
- slotNode.hidden = false;
274
- }
275
- }
276
- });
277
- }
278
- for (const childNode of childNodes) {
279
- if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
280
- updateFallbackSlotVisibility(childNode);
281
- }
282
- }
283
- };
284
- var getSlottedChildNodes = (childNodes) => {
285
- const result = [];
286
- for (let i2 = 0; i2 < childNodes.length; i2++) {
287
- const slottedNode = childNodes[i2]["s-nr"];
288
- if (slottedNode && slottedNode.isConnected) {
289
- result.push(slottedNode);
290
- }
291
- }
292
- return result;
293
- };
294
- var getHostSlotNodes = (childNodes, hostName, slotName) => {
295
- let i2 = 0;
296
- let slottedNodes = [];
297
- let childNode;
298
- for (; i2 < childNodes.length; i2++) {
299
- childNode = childNodes[i2];
300
- if (childNode["s-sr"] && childNode["s-hn"] === hostName && (!slotName || childNode["s-sn"] === slotName)) {
301
- slottedNodes.push(childNode);
302
- if (typeof slotName !== "undefined") return slottedNodes;
303
- }
304
- slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
305
- }
306
- return slottedNodes;
307
- };
308
- var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
309
- const childNodes = [];
310
- if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
311
- while ((node = node.nextSibling) && node["s-sn"] === slotName) {
312
- childNodes.push(node);
313
- }
314
- return childNodes;
315
- };
316
- var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
317
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
318
- if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
319
- return true;
320
- }
321
- if (nodeToRelocate.getAttribute("slot") === slotName) {
322
- return true;
323
- }
324
- return false;
325
- }
326
- if (nodeToRelocate["s-sn"] === slotName) {
327
- return true;
259
+ var createTime = (fnName, tagName = "") => {
260
+ {
261
+ return () => {
262
+ return;
263
+ };
328
264
  }
329
- return slotName === "";
330
265
  };
331
- var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
332
- let slottedNodeLocation;
333
- if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
334
- slottedNodeLocation = newChild["s-ol"];
335
- } else {
336
- slottedNodeLocation = document.createTextNode("");
337
- slottedNodeLocation["s-nr"] = newChild;
338
- }
339
- if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
340
- const parent = slotNode["s-cr"].parentNode;
341
- const appendMethod = prepend ? parent.__prepend || parent.prepend : parent.__appendChild || parent.appendChild;
342
- if (typeof position !== "undefined") {
343
- {
344
- slottedNodeLocation["s-oo"] = position;
345
- const childNodes = parent.__childNodes || parent.childNodes;
346
- const slotRelocateNodes = [slottedNodeLocation];
347
- childNodes.forEach((n) => {
348
- if (n["s-nr"]) slotRelocateNodes.push(n);
349
- });
350
- slotRelocateNodes.sort((a, b) => {
351
- if (!a["s-oo"] || a["s-oo"] < b["s-oo"]) return -1;
352
- else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
353
- return 0;
354
- });
355
- slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
356
- }
357
- } else {
358
- appendMethod.call(parent, slottedNodeLocation);
266
+ var uniqueTime = (key, measureText) => {
267
+ {
268
+ return () => {
269
+ return;
270
+ };
359
271
  }
360
- newChild["s-ol"] = slottedNodeLocation;
361
- newChild["s-sh"] = slotNode["s-hn"];
362
272
  };
363
- var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
364
273
  var h = (nodeName, vnodeData, ...children) => {
365
274
  let child = null;
366
275
  let key = null;
@@ -472,134 +381,431 @@ var convertToPrivate = (node) => {
472
381
  vnode.$name$ = node.vname;
473
382
  return vnode;
474
383
  };
475
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
476
- if (oldValue !== newValue) {
477
- let isProp = isMemberInElement(elm, memberName);
478
- let ln = memberName.toLowerCase();
479
- if (memberName === "class") {
480
- const classList = elm.classList;
481
- const oldClasses = parseClassList(oldValue);
482
- let newClasses = parseClassList(newValue);
483
- if (elm["s-si"]) {
484
- newClasses.push(elm["s-si"]);
485
- oldClasses.forEach((c) => {
486
- if (c.startsWith(elm["s-si"])) newClasses.push(c);
487
- });
488
- newClasses = [...new Set(newClasses)];
489
- classList.add(...newClasses);
490
- delete elm["s-si"];
491
- } else {
492
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
493
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
384
+
385
+ // src/runtime/client-hydrate.ts
386
+ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
387
+ const endHydrate = createTime("hydrateClient", tagName);
388
+ const shadowRoot = hostElm.shadowRoot;
389
+ const childRenderNodes = [];
390
+ const slotNodes = [];
391
+ const shadowRootNodes = shadowRoot ? [] : null;
392
+ const vnode = hostRef.$vnode$ = newVNode(tagName, null);
393
+ if (!plt.$orgLocNodes$) {
394
+ initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
395
+ }
396
+ hostElm[HYDRATE_ID] = hostId;
397
+ hostElm.removeAttribute(HYDRATE_ID);
398
+ clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
399
+ childRenderNodes.map((c) => {
400
+ const orgLocationId = c.$hostId$ + "." + c.$nodeId$;
401
+ const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
402
+ const node = c.$elm$;
403
+ if (orgLocationNode && supportsShadow && orgLocationNode["s-en"] === "") {
404
+ orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
405
+ }
406
+ if (!shadowRoot) {
407
+ node["s-hn"] = tagName;
408
+ if (orgLocationNode) {
409
+ node["s-ol"] = orgLocationNode;
410
+ node["s-ol"]["s-nr"] = node;
494
411
  }
495
- } else if (memberName === "style") {
496
- {
497
- for (const prop in oldValue) {
498
- if (!newValue || newValue[prop] == null) {
499
- if (prop.includes("-")) {
500
- elm.style.removeProperty(prop);
501
- } else {
502
- elm.style[prop] = "";
503
- }
504
- }
505
- }
412
+ }
413
+ plt.$orgLocNodes$.delete(orgLocationId);
414
+ });
415
+ if (shadowRoot) {
416
+ shadowRootNodes.map((shadowRootNode) => {
417
+ if (shadowRootNode) {
418
+ shadowRoot.appendChild(shadowRootNode);
506
419
  }
507
- for (const prop in newValue) {
508
- if (!oldValue || newValue[prop] !== oldValue[prop]) {
509
- if (prop.includes("-")) {
510
- elm.style.setProperty(prop, newValue[prop]);
511
- } else {
512
- elm.style[prop] = newValue[prop];
513
- }
420
+ });
421
+ }
422
+ endHydrate();
423
+ };
424
+ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
425
+ let childNodeType;
426
+ let childIdSplt;
427
+ let childVNode;
428
+ let i2;
429
+ if (node.nodeType === 1 /* ElementNode */) {
430
+ childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
431
+ if (childNodeType) {
432
+ childIdSplt = childNodeType.split(".");
433
+ if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
434
+ childVNode = {
435
+ $flags$: 0,
436
+ $hostId$: childIdSplt[0],
437
+ $nodeId$: childIdSplt[1],
438
+ $depth$: childIdSplt[2],
439
+ $index$: childIdSplt[3],
440
+ $tag$: node.tagName.toLowerCase(),
441
+ $elm$: node,
442
+ $attrs$: null,
443
+ $children$: null,
444
+ $key$: null,
445
+ $name$: null,
446
+ $text$: null
447
+ };
448
+ childRenderNodes.push(childVNode);
449
+ node.removeAttribute(HYDRATE_CHILD_ID);
450
+ if (!parentVNode.$children$) {
451
+ parentVNode.$children$ = [];
452
+ }
453
+ parentVNode.$children$[childVNode.$index$] = childVNode;
454
+ parentVNode = childVNode;
455
+ if (shadowRootNodes && childVNode.$depth$ === "0") {
456
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
514
457
  }
515
458
  }
516
- } else if (memberName === "key") ; else if (memberName === "ref") {
517
- if (newValue) {
518
- newValue(elm);
519
- }
520
- } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
521
- if (memberName[2] === "-") {
522
- memberName = memberName.slice(3);
523
- } else if (isMemberInElement(win, ln)) {
524
- memberName = ln.slice(2);
525
- } else {
526
- memberName = ln[2] + memberName.slice(3);
459
+ }
460
+ if (node.shadowRoot) {
461
+ for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
462
+ clientHydrate(
463
+ parentVNode,
464
+ childRenderNodes,
465
+ slotNodes,
466
+ shadowRootNodes,
467
+ hostElm,
468
+ node.shadowRoot.childNodes[i2],
469
+ hostId
470
+ );
527
471
  }
528
- if (oldValue || newValue) {
529
- const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
530
- memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
531
- if (oldValue) {
532
- plt.rel(elm, memberName, oldValue, capture);
533
- }
534
- if (newValue) {
535
- plt.ael(elm, memberName, newValue, capture);
472
+ }
473
+ for (i2 = node.childNodes.length - 1; i2 >= 0; i2--) {
474
+ clientHydrate(
475
+ parentVNode,
476
+ childRenderNodes,
477
+ slotNodes,
478
+ shadowRootNodes,
479
+ hostElm,
480
+ node.childNodes[i2],
481
+ hostId
482
+ );
483
+ }
484
+ } else if (node.nodeType === 8 /* CommentNode */) {
485
+ childIdSplt = node.nodeValue.split(".");
486
+ if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
487
+ childNodeType = childIdSplt[0];
488
+ childVNode = {
489
+ $flags$: 0,
490
+ $hostId$: childIdSplt[1],
491
+ $nodeId$: childIdSplt[2],
492
+ $depth$: childIdSplt[3],
493
+ $index$: childIdSplt[4],
494
+ $elm$: node,
495
+ $attrs$: null,
496
+ $children$: null,
497
+ $key$: null,
498
+ $name$: null,
499
+ $tag$: null,
500
+ $text$: null
501
+ };
502
+ if (childNodeType === TEXT_NODE_ID) {
503
+ childVNode.$elm$ = node.nextSibling;
504
+ if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
505
+ childVNode.$text$ = childVNode.$elm$.textContent;
506
+ childRenderNodes.push(childVNode);
507
+ node.remove();
508
+ if (!parentVNode.$children$) {
509
+ parentVNode.$children$ = [];
510
+ }
511
+ parentVNode.$children$[childVNode.$index$] = childVNode;
512
+ if (shadowRootNodes && childVNode.$depth$ === "0") {
513
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
514
+ }
536
515
  }
537
- }
538
- } else {
539
- const isComplex = isComplexType(newValue);
540
- if ((isProp || isComplex && newValue !== null) && !isSvg) {
541
- try {
542
- if (!elm.tagName.includes("-")) {
543
- const n = newValue == null ? "" : newValue;
544
- if (memberName === "list") {
545
- isProp = false;
546
- } else if (oldValue == null || elm[memberName] != n) {
547
- if (typeof elm.__lookupSetter__(memberName) === "function") {
548
- elm[memberName] = n;
549
- } else {
550
- elm.setAttribute(memberName, n);
551
- }
552
- }
516
+ } else if (childVNode.$hostId$ === hostId) {
517
+ if (childNodeType === SLOT_NODE_ID) {
518
+ childVNode.$tag$ = "slot";
519
+ if (childIdSplt[5]) {
520
+ node["s-sn"] = childVNode.$name$ = childIdSplt[5];
553
521
  } else {
554
- elm[memberName] = newValue;
522
+ node["s-sn"] = "";
555
523
  }
556
- } catch (e) {
557
- }
558
- }
559
- let xlink = false;
560
- {
561
- if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
562
- memberName = ln;
563
- xlink = true;
564
- }
565
- }
566
- if (newValue == null || newValue === false) {
567
- if (newValue !== false || elm.getAttribute(memberName) === "") {
568
- if (xlink) {
569
- elm.removeAttributeNS(XLINK_NS, memberName);
524
+ node["s-sr"] = true;
525
+ if (shadowRootNodes) {
526
+ childVNode.$elm$ = doc.createElement(childVNode.$tag$);
527
+ if (childVNode.$name$) {
528
+ childVNode.$elm$.setAttribute("name", childVNode.$name$);
529
+ }
530
+ node.parentNode.insertBefore(childVNode.$elm$, node);
531
+ node.remove();
532
+ if (childVNode.$depth$ === "0") {
533
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
534
+ }
535
+ }
536
+ slotNodes.push(childVNode);
537
+ if (!parentVNode.$children$) {
538
+ parentVNode.$children$ = [];
539
+ }
540
+ parentVNode.$children$[childVNode.$index$] = childVNode;
541
+ } else if (childNodeType === CONTENT_REF_ID) {
542
+ if (shadowRootNodes) {
543
+ node.remove();
570
544
  } else {
571
- elm.removeAttribute(memberName);
545
+ hostElm["s-cr"] = node;
546
+ node["s-cn"] = true;
572
547
  }
573
548
  }
574
- } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
575
- newValue = newValue === true ? "" : newValue;
576
- if (xlink) {
577
- elm.setAttributeNS(XLINK_NS, memberName, newValue);
578
- } else {
579
- elm.setAttribute(memberName, newValue);
580
- }
581
549
  }
582
550
  }
583
- }
551
+ } else if (parentVNode && parentVNode.$tag$ === "style") {
552
+ const vnode = newVNode(null, node.textContent);
553
+ vnode.$elm$ = node;
554
+ vnode.$index$ = "0";
555
+ parentVNode.$children$ = [vnode];
556
+ }
584
557
  };
585
- var parseClassListRegex = /\s/;
586
- var parseClassList = (value) => {
587
- if (typeof value === "object" && "baseVal" in value) {
588
- value = value.baseVal;
558
+ var initializeDocumentHydrate = (node, orgLocNodes) => {
559
+ if (node.nodeType === 1 /* ElementNode */) {
560
+ let i2 = 0;
561
+ if (node.shadowRoot) {
562
+ for (; i2 < node.shadowRoot.childNodes.length; i2++) {
563
+ initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
564
+ }
565
+ }
566
+ for (i2 = 0; i2 < node.childNodes.length; i2++) {
567
+ initializeDocumentHydrate(node.childNodes[i2], orgLocNodes);
568
+ }
569
+ } else if (node.nodeType === 8 /* CommentNode */) {
570
+ const childIdSplt = node.nodeValue.split(".");
571
+ if (childIdSplt[0] === ORG_LOCATION_ID) {
572
+ orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
573
+ node.nodeValue = "";
574
+ node["s-en"] = childIdSplt[3];
575
+ }
576
+ }
577
+ };
578
+
579
+ // src/runtime/mode.ts
580
+ var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
581
+ var setMode = (handler) => modeResolutionChain.push(handler);
582
+ var getMode = (ref) => getHostRef(ref).$modeName$;
583
+ var parsePropertyValue = (propValue, propType) => {
584
+ if (propValue != null && !isComplexType(propValue)) {
585
+ if (propType & 4 /* Boolean */) {
586
+ return propValue === "false" ? false : propValue === "" || !!propValue;
587
+ }
588
+ if (propType & 2 /* Number */) {
589
+ return parseFloat(propValue);
590
+ }
591
+ if (propType & 1 /* String */) {
592
+ return String(propValue);
593
+ }
594
+ return propValue;
595
+ }
596
+ return propValue;
597
+ };
598
+ var getElement = (ref) => getHostRef(ref).$hostElement$ ;
599
+
600
+ // src/runtime/event-emitter.ts
601
+ var createEvent = (ref, name, flags) => {
602
+ const elm = getElement(ref);
603
+ return {
604
+ emit: (detail) => {
605
+ return emitEvent(elm, name, {
606
+ bubbles: !!(flags & 4 /* Bubbles */),
607
+ composed: !!(flags & 2 /* Composed */),
608
+ cancelable: !!(flags & 1 /* Cancellable */),
609
+ detail
610
+ });
611
+ }
612
+ };
613
+ };
614
+ var emitEvent = (elm, name, opts) => {
615
+ const ev = plt.ce(name, opts);
616
+ elm.dispatchEvent(ev);
617
+ return ev;
618
+ };
619
+ var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
620
+ var registerStyle = (scopeId2, cssText, allowCS) => {
621
+ let style = styles.get(scopeId2);
622
+ if (supportsConstructableStylesheets && allowCS) {
623
+ style = style || new CSSStyleSheet();
624
+ if (typeof style === "string") {
625
+ style = cssText;
626
+ } else {
627
+ style.replaceSync(cssText);
628
+ }
629
+ } else {
630
+ style = cssText;
631
+ }
632
+ styles.set(scopeId2, style);
633
+ };
634
+ var addStyle = (styleContainerNode, cmpMeta, mode) => {
635
+ var _a;
636
+ const scopeId2 = getScopeId(cmpMeta, mode);
637
+ const style = styles.get(scopeId2);
638
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
639
+ if (style) {
640
+ if (typeof style === "string") {
641
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
642
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
643
+ let styleElm;
644
+ if (!appliedStyles) {
645
+ rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
646
+ }
647
+ if (!appliedStyles.has(scopeId2)) {
648
+ if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
649
+ styleElm.innerHTML = style;
650
+ } else {
651
+ styleElm = doc.createElement("style");
652
+ styleElm.innerHTML = style;
653
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
654
+ if (nonce != null) {
655
+ styleElm.setAttribute("nonce", nonce);
656
+ }
657
+ const injectStyle = (
658
+ /**
659
+ * we render a scoped component
660
+ */
661
+ !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) || /**
662
+ * we are using shadow dom and render the style tag within the shadowRoot
663
+ */
664
+ cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD"
665
+ );
666
+ if (injectStyle) {
667
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
668
+ }
669
+ }
670
+ if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
671
+ styleElm.innerHTML += SLOT_FB_CSS;
672
+ }
673
+ if (appliedStyles) {
674
+ appliedStyles.add(scopeId2);
675
+ }
676
+ }
677
+ } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
678
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
679
+ }
680
+ }
681
+ return scopeId2;
682
+ };
683
+ var attachStyles = (hostRef) => {
684
+ const cmpMeta = hostRef.$cmpMeta$;
685
+ const elm = hostRef.$hostElement$;
686
+ const flags = cmpMeta.$flags$;
687
+ const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
688
+ const scopeId2 = addStyle(
689
+ elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
690
+ cmpMeta,
691
+ hostRef.$modeName$
692
+ );
693
+ if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
694
+ elm["s-sc"] = scopeId2;
695
+ elm.classList.add(scopeId2 + "-h");
696
+ if (flags & 2 /* scopedCssEncapsulation */) {
697
+ elm.classList.add(scopeId2 + "-s");
698
+ }
589
699
  }
590
- if (!value) {
591
- return [];
700
+ endAttachStyles();
701
+ };
702
+ var getScopeId = (cmp, mode) => "sc-" + (mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
703
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
704
+ if (oldValue !== newValue) {
705
+ let isProp = isMemberInElement(elm, memberName);
706
+ let ln = memberName.toLowerCase();
707
+ if (memberName === "class") {
708
+ const classList = elm.classList;
709
+ const oldClasses = parseClassList(oldValue);
710
+ const newClasses = parseClassList(newValue);
711
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
712
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
713
+ } else if (memberName === "style") {
714
+ {
715
+ for (const prop in oldValue) {
716
+ if (!newValue || newValue[prop] == null) {
717
+ if (prop.includes("-")) {
718
+ elm.style.removeProperty(prop);
719
+ } else {
720
+ elm.style[prop] = "";
721
+ }
722
+ }
723
+ }
724
+ }
725
+ for (const prop in newValue) {
726
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
727
+ if (prop.includes("-")) {
728
+ elm.style.setProperty(prop, newValue[prop]);
729
+ } else {
730
+ elm.style[prop] = newValue[prop];
731
+ }
732
+ }
733
+ }
734
+ } else if (memberName === "key") ; else if (memberName === "ref") {
735
+ if (newValue) {
736
+ newValue(elm);
737
+ }
738
+ } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
739
+ if (memberName[2] === "-") {
740
+ memberName = memberName.slice(3);
741
+ } else if (isMemberInElement(win, ln)) {
742
+ memberName = ln.slice(2);
743
+ } else {
744
+ memberName = ln[2] + memberName.slice(3);
745
+ }
746
+ if (oldValue || newValue) {
747
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
748
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
749
+ if (oldValue) {
750
+ plt.rel(elm, memberName, oldValue, capture);
751
+ }
752
+ if (newValue) {
753
+ plt.ael(elm, memberName, newValue, capture);
754
+ }
755
+ }
756
+ } else {
757
+ const isComplex = isComplexType(newValue);
758
+ if ((isProp || isComplex && newValue !== null) && !isSvg) {
759
+ try {
760
+ if (!elm.tagName.includes("-")) {
761
+ const n = newValue == null ? "" : newValue;
762
+ if (memberName === "list") {
763
+ isProp = false;
764
+ } else if (oldValue == null || elm[memberName] != n) {
765
+ elm[memberName] = n;
766
+ }
767
+ } else {
768
+ elm[memberName] = newValue;
769
+ }
770
+ } catch (e) {
771
+ }
772
+ }
773
+ let xlink = false;
774
+ {
775
+ if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
776
+ memberName = ln;
777
+ xlink = true;
778
+ }
779
+ }
780
+ if (newValue == null || newValue === false) {
781
+ if (newValue !== false || elm.getAttribute(memberName) === "") {
782
+ if (xlink) {
783
+ elm.removeAttributeNS(XLINK_NS, memberName);
784
+ } else {
785
+ elm.removeAttribute(memberName);
786
+ }
787
+ }
788
+ } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
789
+ newValue = newValue === true ? "" : newValue;
790
+ if (xlink) {
791
+ elm.setAttributeNS(XLINK_NS, memberName, newValue);
792
+ } else {
793
+ elm.setAttribute(memberName, newValue);
794
+ }
795
+ }
796
+ }
592
797
  }
593
- return value.split(parseClassListRegex);
594
798
  };
799
+ var parseClassListRegex = /\s/;
800
+ var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
595
801
  var CAPTURE_EVENT_SUFFIX = "Capture";
596
802
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
597
803
 
598
804
  // src/runtime/vdom/update-element.ts
599
805
  var updateElement = (oldVnode, newVnode, isSvgMode2) => {
600
806
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
601
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
602
- const newVnodeAttrs = newVnode.$attrs$ || {};
807
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
808
+ const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
603
809
  {
604
810
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
605
811
  if (!(memberName in newVnodeAttrs)) {
@@ -629,7 +835,7 @@ var useNativeShadowDom = false;
629
835
  var checkSlotFallbackVisibility = false;
630
836
  var checkSlotRelocate = false;
631
837
  var isSvgMode = false;
632
- var createElm = (oldParentVNode, newParentVNode, childIndex) => {
838
+ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
633
839
  var _a;
634
840
  const newVNode2 = newParentVNode.$children$[childIndex];
635
841
  let i2 = 0;
@@ -639,6 +845,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
639
845
  if (!useNativeShadowDom) {
640
846
  checkSlotRelocate = true;
641
847
  if (newVNode2.$tag$ === "slot") {
848
+ if (scopeId) {
849
+ parentElm.classList.add(scopeId + "-s");
850
+ }
642
851
  newVNode2.$flags$ |= newVNode2.$children$ ? (
643
852
  // slot element has fallback content
644
853
  // still create an element that "mocks" the slot element
@@ -669,12 +878,17 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
669
878
  {
670
879
  updateElement(null, newVNode2, isSvgMode);
671
880
  }
672
- if (isDef(scopeId) && elm["s-si"] !== scopeId) {
881
+ const rootNode = elm.getRootNode();
882
+ const isElementWithinShadowRoot = !rootNode.querySelector("body");
883
+ if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
673
884
  elm.classList.add(elm["s-si"] = scopeId);
674
885
  }
886
+ {
887
+ updateElementScopeIds(elm, parentElm);
888
+ }
675
889
  if (newVNode2.$children$) {
676
890
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
677
- childNode = createElm(oldParentVNode, newVNode2, i2);
891
+ childNode = createElm(oldParentVNode, newVNode2, i2, elm);
678
892
  if (childNode) {
679
893
  elm.appendChild(childNode);
680
894
  }
@@ -701,9 +915,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
701
915
  relocateToHostRoot(oldParentVNode.$elm$);
702
916
  }
703
917
  }
704
- {
705
- addRemoveSlotScopedClass(contentRef, elm, newParentVNode.$elm$, oldParentVNode == null ? void 0 : oldParentVNode.$elm$);
706
- }
707
918
  }
708
919
  }
709
920
  return elm;
@@ -712,12 +923,8 @@ var relocateToHostRoot = (parentElm) => {
712
923
  plt.$flags$ |= 1 /* isTmpDisconnected */;
713
924
  const host = parentElm.closest(hostTagName.toLowerCase());
714
925
  if (host != null) {
715
- const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
716
- (ref) => ref["s-cr"]
717
- );
718
- const childNodeArray = Array.from(
719
- parentElm.__childNodes || parentElm.childNodes
720
- );
926
+ const contentRefNode = Array.from(host.childNodes).find((ref) => ref["s-cr"]);
927
+ const childNodeArray = Array.from(parentElm.childNodes);
721
928
  for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
722
929
  if (childNode["s-sh"] != null) {
723
930
  insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
@@ -730,7 +937,7 @@ var relocateToHostRoot = (parentElm) => {
730
937
  };
731
938
  var putBackInOriginalLocation = (parentElm, recursive) => {
732
939
  plt.$flags$ |= 1 /* isTmpDisconnected */;
733
- const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
940
+ const oldSlotChildNodes = Array.from(parentElm.childNodes);
734
941
  if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
735
942
  let node = parentElm;
736
943
  while (node = node.nextSibling) {
@@ -742,7 +949,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
742
949
  for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
743
950
  const childNode = oldSlotChildNodes[i2];
744
951
  if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
745
- insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
952
+ insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
746
953
  childNode["s-ol"].remove();
747
954
  childNode["s-ol"] = void 0;
748
955
  childNode["s-sh"] = void 0;
@@ -762,7 +969,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
762
969
  }
763
970
  for (; startIdx <= endIdx; ++startIdx) {
764
971
  if (vnodes[startIdx]) {
765
- childNode = createElm(null, parentVNode, startIdx);
972
+ childNode = createElm(null, parentVNode, startIdx, parentElm);
766
973
  if (childNode) {
767
974
  vnodes[startIdx].$elm$ = childNode;
768
975
  insertBefore(containerElm, childNode, referenceNode(before) );
@@ -849,7 +1056,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
849
1056
  if (idxInOld >= 0) {
850
1057
  elmToMove = oldCh[idxInOld];
851
1058
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
852
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
1059
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
853
1060
  } else {
854
1061
  patch(elmToMove, newStartVnode, isInitialRender);
855
1062
  oldCh[idxInOld] = void 0;
@@ -857,16 +1064,12 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
857
1064
  }
858
1065
  newStartVnode = newCh[++newStartIdx];
859
1066
  } else {
860
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
1067
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
861
1068
  newStartVnode = newCh[++newStartIdx];
862
1069
  }
863
1070
  if (node) {
864
1071
  {
865
- insertBefore(
866
- referenceNode(oldStartVnode.$elm$).parentNode,
867
- node,
868
- referenceNode(oldStartVnode.$elm$)
869
- );
1072
+ insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
870
1073
  }
871
1074
  }
872
1075
  }
@@ -887,19 +1090,28 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
887
1090
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
888
1091
  if (leftVNode.$tag$ === rightVNode.$tag$) {
889
1092
  if (leftVNode.$tag$ === "slot") {
1093
+ if (
1094
+ // The component gets hydrated and no VDOM has been initialized.
1095
+ // Here the comparison can't happen as $name$ property is not set for `leftNode`.
1096
+ "$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
1097
+ // hydration comments to be removed
1098
+ leftVNode.$elm$.nodeType !== 8
1099
+ ) {
1100
+ return false;
1101
+ }
890
1102
  return leftVNode.$name$ === rightVNode.$name$;
891
1103
  }
892
1104
  if (!isInitialRender) {
893
1105
  return leftVNode.$key$ === rightVNode.$key$;
894
1106
  }
895
- if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
896
- leftVNode.$key$ = rightVNode.$key$;
897
- }
898
1107
  return true;
899
1108
  }
900
1109
  return false;
901
1110
  };
902
- var referenceNode = (node) => node && node["s-ol"] || node;
1111
+ var referenceNode = (node) => {
1112
+ return node && node["s-ol"] || node;
1113
+ };
1114
+ var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
903
1115
  var patch = (oldVNode, newVNode2, isInitialRender = false) => {
904
1116
  const elm = newVNode2.$elm$ = oldVNode.$elm$;
905
1117
  const oldChildren = oldVNode.$children$;
@@ -943,15 +1155,41 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
943
1155
  elm.data = text;
944
1156
  }
945
1157
  };
1158
+ var updateFallbackSlotVisibility = (elm) => {
1159
+ const childNodes = elm.childNodes;
1160
+ for (const childNode of childNodes) {
1161
+ if (childNode.nodeType === 1 /* ElementNode */) {
1162
+ if (childNode["s-sr"]) {
1163
+ const slotName = childNode["s-sn"];
1164
+ childNode.hidden = false;
1165
+ for (const siblingNode of childNodes) {
1166
+ if (siblingNode !== childNode) {
1167
+ if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
1168
+ if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
1169
+ childNode.hidden = true;
1170
+ break;
1171
+ }
1172
+ } else {
1173
+ if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
1174
+ childNode.hidden = true;
1175
+ break;
1176
+ }
1177
+ }
1178
+ }
1179
+ }
1180
+ }
1181
+ updateFallbackSlotVisibility(childNode);
1182
+ }
1183
+ }
1184
+ };
946
1185
  var relocateNodes = [];
947
1186
  var markSlotContentForRelocation = (elm) => {
948
1187
  let node;
949
1188
  let hostContentNodes;
950
1189
  let j;
951
- const children = elm.__childNodes || elm.childNodes;
952
- for (const childNode of children) {
1190
+ for (const childNode of elm.childNodes) {
953
1191
  if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
954
- hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
1192
+ hostContentNodes = node.parentNode.childNodes;
955
1193
  const slotName = childNode["s-sn"];
956
1194
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
957
1195
  node = hostContentNodes[j];
@@ -993,40 +1231,60 @@ var markSlotContentForRelocation = (elm) => {
993
1231
  }
994
1232
  }
995
1233
  };
996
- var nullifyVNodeRefs = (vNode) => {
997
- {
998
- vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
999
- vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
1234
+ var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
1235
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1236
+ if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
1237
+ return true;
1238
+ }
1239
+ if (nodeToRelocate.getAttribute("slot") === slotName) {
1240
+ return true;
1241
+ }
1242
+ return false;
1243
+ }
1244
+ if (nodeToRelocate["s-sn"] === slotName) {
1245
+ return true;
1000
1246
  }
1247
+ return slotName === "";
1001
1248
  };
1002
- var insertBefore = (parent, newNode, reference) => {
1003
- if (typeof newNode["s-sn"] === "string" && !!newNode["s-sr"] && !!newNode["s-cr"]) {
1004
- addRemoveSlotScopedClass(newNode["s-cr"], newNode, parent, newNode.parentElement);
1249
+ var nullifyVNodeRefs = (vNode) => {
1250
+ {
1251
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
1252
+ vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
1005
1253
  }
1254
+ };
1255
+ var insertBefore = (parent, newNode, reference) => {
1006
1256
  const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
1257
+ {
1258
+ updateElementScopeIds(newNode, parent);
1259
+ }
1007
1260
  return inserted;
1008
1261
  };
1009
- function addRemoveSlotScopedClass(reference, slotNode, newParent, oldParent) {
1262
+ var findScopeIds = (element) => {
1263
+ const scopeIds = [];
1264
+ if (element) {
1265
+ scopeIds.push(
1266
+ ...element["s-scs"] || [],
1267
+ element["s-si"],
1268
+ element["s-sc"],
1269
+ ...findScopeIds(element.parentElement)
1270
+ );
1271
+ }
1272
+ return scopeIds;
1273
+ };
1274
+ var updateElementScopeIds = (element, parent, iterateChildNodes = false) => {
1010
1275
  var _a;
1011
- let scopeId2;
1012
- if (reference && typeof slotNode["s-sn"] === "string" && !!slotNode["s-sr"] && reference.parentNode && reference.parentNode["s-sc"] && (scopeId2 = slotNode["s-si"] || reference.parentNode["s-sc"])) {
1013
- const scopeName = slotNode["s-sn"];
1014
- const hostName = slotNode["s-hn"];
1015
- (_a = newParent.classList) == null ? void 0 : _a.add(scopeId2 + "-s");
1016
- if (oldParent && oldParent.classList.contains(scopeId2 + "-s")) {
1017
- let child = (oldParent.__childNodes || oldParent.childNodes)[0];
1018
- let found = false;
1019
- while (child) {
1020
- if (child["s-sn"] !== scopeName && child["s-hn"] === hostName && !!child["s-sr"]) {
1021
- found = true;
1022
- break;
1276
+ if (element && parent && element.nodeType === 1 /* ElementNode */) {
1277
+ const scopeIds = new Set(findScopeIds(parent).filter(Boolean));
1278
+ if (scopeIds.size) {
1279
+ (_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] = [...scopeIds]);
1280
+ if (element["s-ol"] || iterateChildNodes) {
1281
+ for (const childNode of Array.from(element.childNodes)) {
1282
+ updateElementScopeIds(childNode, element, true);
1023
1283
  }
1024
- child = child.nextSibling;
1025
1284
  }
1026
- if (!found) oldParent.classList.remove(scopeId2 + "-s");
1027
1285
  }
1028
1286
  }
1029
- }
1287
+ };
1030
1288
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1031
1289
  var _a, _b, _c, _d, _e;
1032
1290
  const hostElm = hostRef.$hostElement$;
@@ -1078,7 +1336,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1078
1336
  if (slotRefNode) {
1079
1337
  const parentNodeRef = slotRefNode.parentNode;
1080
1338
  let insertBeforeNode = slotRefNode.nextSibling;
1081
- if ((insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */)) {
1339
+ if (insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
1082
1340
  let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
1083
1341
  while (orgLocationNode) {
1084
1342
  let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
@@ -1094,886 +1352,44 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1094
1352
  }
1095
1353
  orgLocationNode = orgLocationNode.previousSibling;
1096
1354
  }
1097
- }
1098
- if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
1099
- if (nodeToRelocate !== insertBeforeNode) {
1100
- insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
1101
- if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
1102
- nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
1103
- }
1104
- }
1105
- }
1106
- nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](nodeToRelocate);
1107
- } else {
1108
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1109
- if (isInitialLoad) {
1110
- nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
1111
- }
1112
- nodeToRelocate.hidden = true;
1113
- }
1114
- }
1115
- }
1116
- }
1117
- if (checkSlotFallbackVisibility) {
1118
- updateFallbackSlotVisibility(rootVnode.$elm$);
1119
- }
1120
- plt.$flags$ &= ~1 /* isTmpDisconnected */;
1121
- relocateNodes.length = 0;
1122
- }
1123
- if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1124
- const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
1125
- for (const childNode of children) {
1126
- if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
1127
- if (isInitialLoad && childNode["s-ih"] == null) {
1128
- childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
1129
- }
1130
- childNode.hidden = true;
1131
- }
1132
- }
1133
- }
1134
- contentRef = void 0;
1135
- };
1136
-
1137
- // src/runtime/dom-extras.ts
1138
- var patchPseudoShadowDom = (hostElementPrototype) => {
1139
- patchCloneNode(hostElementPrototype);
1140
- patchSlotAppendChild(hostElementPrototype);
1141
- patchSlotAppend(hostElementPrototype);
1142
- patchSlotPrepend(hostElementPrototype);
1143
- patchSlotInsertAdjacentElement(hostElementPrototype);
1144
- patchSlotInsertAdjacentHTML(hostElementPrototype);
1145
- patchSlotInsertAdjacentText(hostElementPrototype);
1146
- patchTextContent(hostElementPrototype);
1147
- patchChildSlotNodes(hostElementPrototype);
1148
- patchSlotRemoveChild(hostElementPrototype);
1149
- };
1150
- var patchCloneNode = (HostElementPrototype) => {
1151
- const orgCloneNode = HostElementPrototype.cloneNode;
1152
- HostElementPrototype.cloneNode = function(deep) {
1153
- const srcNode = this;
1154
- const isShadowDom = srcNode.shadowRoot && supportsShadow ;
1155
- const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
1156
- if (!isShadowDom && deep) {
1157
- let i2 = 0;
1158
- let slotted, nonStencilNode;
1159
- const stencilPrivates = [
1160
- "s-id",
1161
- "s-cr",
1162
- "s-lr",
1163
- "s-rc",
1164
- "s-sc",
1165
- "s-p",
1166
- "s-cn",
1167
- "s-sr",
1168
- "s-sn",
1169
- "s-hn",
1170
- "s-ol",
1171
- "s-nr",
1172
- "s-si",
1173
- "s-rf",
1174
- "s-scs"
1175
- ];
1176
- const childNodes = this.__childNodes || this.childNodes;
1177
- for (; i2 < childNodes.length; i2++) {
1178
- slotted = childNodes[i2]["s-nr"];
1179
- nonStencilNode = stencilPrivates.every((privateField) => !childNodes[i2][privateField]);
1180
- if (slotted) {
1181
- if (clonedNode.__appendChild) {
1182
- clonedNode.__appendChild(slotted.cloneNode(true));
1183
- } else {
1184
- clonedNode.appendChild(slotted.cloneNode(true));
1185
- }
1186
- }
1187
- if (nonStencilNode) {
1188
- clonedNode.appendChild(childNodes[i2].cloneNode(true));
1189
- }
1190
- }
1191
- }
1192
- return clonedNode;
1193
- };
1194
- };
1195
- var patchSlotAppendChild = (HostElementPrototype) => {
1196
- HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
1197
- HostElementPrototype.appendChild = function(newChild) {
1198
- const slotName = newChild["s-sn"] = getSlotName(newChild);
1199
- const slotNode = getHostSlotNodes(this.__childNodes || this.childNodes, this.tagName, slotName)[0];
1200
- if (slotNode) {
1201
- addSlotRelocateNode(newChild, slotNode);
1202
- const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1203
- const appendAfter = slotChildNodes[slotChildNodes.length - 1];
1204
- const insertedNode = insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1205
- updateFallbackSlotVisibility(this);
1206
- return insertedNode;
1207
- }
1208
- return this.__appendChild(newChild);
1209
- };
1210
- };
1211
- var patchSlotRemoveChild = (ElementPrototype) => {
1212
- ElementPrototype.__removeChild = ElementPrototype.removeChild;
1213
- ElementPrototype.removeChild = function(toRemove) {
1214
- if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
1215
- const childNodes = this.__childNodes || this.childNodes;
1216
- const slotNode = getHostSlotNodes(childNodes, this.tagName, toRemove["s-sn"]);
1217
- if (slotNode && toRemove.isConnected) {
1218
- toRemove.remove();
1219
- updateFallbackSlotVisibility(this);
1220
- return;
1221
- }
1222
- }
1223
- return this.__removeChild(toRemove);
1224
- };
1225
- };
1226
- var patchSlotPrepend = (HostElementPrototype) => {
1227
- HostElementPrototype.__prepend = HostElementPrototype.prepend;
1228
- HostElementPrototype.prepend = function(...newChildren) {
1229
- newChildren.forEach((newChild) => {
1230
- if (typeof newChild === "string") {
1231
- newChild = this.ownerDocument.createTextNode(newChild);
1232
- }
1233
- const slotName = newChild["s-sn"] = getSlotName(newChild);
1234
- const childNodes = this.__childNodes || this.childNodes;
1235
- const slotNode = getHostSlotNodes(childNodes, this.tagName, slotName)[0];
1236
- if (slotNode) {
1237
- addSlotRelocateNode(newChild, slotNode, true);
1238
- const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1239
- const appendAfter = slotChildNodes[0];
1240
- return insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1241
- }
1242
- if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
1243
- newChild.hidden = true;
1244
- }
1245
- return HostElementPrototype.__prepend(newChild);
1246
- });
1247
- };
1248
- };
1249
- var patchSlotAppend = (HostElementPrototype) => {
1250
- HostElementPrototype.__append = HostElementPrototype.append;
1251
- HostElementPrototype.append = function(...newChildren) {
1252
- newChildren.forEach((newChild) => {
1253
- if (typeof newChild === "string") {
1254
- newChild = this.ownerDocument.createTextNode(newChild);
1255
- }
1256
- this.appendChild(newChild);
1257
- });
1258
- };
1259
- };
1260
- var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
1261
- const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
1262
- HostElementPrototype.insertAdjacentHTML = function(position, text) {
1263
- if (position !== "afterbegin" && position !== "beforeend") {
1264
- return originalInsertAdjacentHtml.call(this, position, text);
1265
- }
1266
- const container = this.ownerDocument.createElement("_");
1267
- let node;
1268
- container.innerHTML = text;
1269
- if (position === "afterbegin") {
1270
- while (node = container.firstChild) {
1271
- this.prepend(node);
1272
- }
1273
- } else if (position === "beforeend") {
1274
- while (node = container.firstChild) {
1275
- this.append(node);
1276
- }
1277
- }
1278
- };
1279
- };
1280
- var patchSlotInsertAdjacentText = (HostElementPrototype) => {
1281
- HostElementPrototype.insertAdjacentText = function(position, text) {
1282
- this.insertAdjacentHTML(position, text);
1283
- };
1284
- };
1285
- var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
1286
- const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
1287
- HostElementPrototype.insertAdjacentElement = function(position, element) {
1288
- if (position !== "afterbegin" && position !== "beforeend") {
1289
- return originalInsertAdjacentElement.call(this, position, element);
1290
- }
1291
- if (position === "afterbegin") {
1292
- this.prepend(element);
1293
- return element;
1294
- } else if (position === "beforeend") {
1295
- this.append(element);
1296
- return element;
1297
- }
1298
- return element;
1299
- };
1300
- };
1301
- var patchTextContent = (hostElementPrototype) => {
1302
- patchHostOriginalAccessor("textContent", hostElementPrototype);
1303
- Object.defineProperty(hostElementPrototype, "textContent", {
1304
- get: function() {
1305
- let text = "";
1306
- const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
1307
- childNodes.forEach((node) => text += node.textContent || "");
1308
- return text;
1309
- },
1310
- set: function(value) {
1311
- const childNodes = this.__childNodes ? this.childNodes : getSlottedChildNodes(this.childNodes);
1312
- childNodes.forEach((node) => {
1313
- if (node["s-ol"]) node["s-ol"].remove();
1314
- node.remove();
1315
- });
1316
- this.insertAdjacentHTML("beforeend", value);
1317
- }
1318
- });
1319
- };
1320
- var patchChildSlotNodes = (elm) => {
1321
- class FakeNodeList extends Array {
1322
- item(n) {
1323
- return this[n];
1324
- }
1325
- }
1326
- patchHostOriginalAccessor("children", elm);
1327
- Object.defineProperty(elm, "children", {
1328
- get() {
1329
- return this.childNodes.filter((n) => n.nodeType === 1);
1330
- }
1331
- });
1332
- Object.defineProperty(elm, "childElementCount", {
1333
- get() {
1334
- return this.children.length;
1335
- }
1336
- });
1337
- patchHostOriginalAccessor("firstChild", elm);
1338
- Object.defineProperty(elm, "firstChild", {
1339
- get() {
1340
- return this.childNodes[0];
1341
- }
1342
- });
1343
- patchHostOriginalAccessor("lastChild", elm);
1344
- Object.defineProperty(elm, "lastChild", {
1345
- get() {
1346
- return this.childNodes[this.childNodes.length - 1];
1347
- }
1348
- });
1349
- patchHostOriginalAccessor("childNodes", elm);
1350
- Object.defineProperty(elm, "childNodes", {
1351
- get() {
1352
- var _a, _b;
1353
- 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 */) {
1354
- const result = new FakeNodeList();
1355
- const nodes = getSlottedChildNodes(this.__childNodes);
1356
- result.push(...nodes);
1357
- return result;
1358
- }
1359
- return FakeNodeList.from(this.__childNodes);
1360
- }
1361
- });
1362
- };
1363
- var patchNextPrev = (node) => {
1364
- if (!node || node.__nextSibling || !globalThis.Node) return;
1365
- patchNextSibling(node);
1366
- patchPreviousSibling(node);
1367
- if (node.nodeType === Node.ELEMENT_NODE) {
1368
- patchNextElementSibling(node);
1369
- patchPreviousElementSibling(node);
1370
- }
1371
- };
1372
- var patchNextSibling = (node) => {
1373
- if (!node || node.__nextSibling) return;
1374
- patchHostOriginalAccessor("nextSibling", node);
1375
- Object.defineProperty(node, "nextSibling", {
1376
- get: function() {
1377
- var _a;
1378
- const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
1379
- const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1380
- if (parentNodes && index > -1) {
1381
- return parentNodes[index + 1];
1382
- }
1383
- return this.__nextSibling;
1384
- }
1385
- });
1386
- };
1387
- var patchNextElementSibling = (element) => {
1388
- if (!element || element.__nextElementSibling) return;
1389
- patchHostOriginalAccessor("nextElementSibling", element);
1390
- Object.defineProperty(element, "nextElementSibling", {
1391
- get: function() {
1392
- var _a;
1393
- const parentEles = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
1394
- const index = parentEles == null ? void 0 : parentEles.indexOf(this);
1395
- if (parentEles && index > -1) {
1396
- return parentEles[index + 1];
1397
- }
1398
- return this.__nextElementSibling;
1399
- }
1400
- });
1401
- };
1402
- var patchPreviousSibling = (node) => {
1403
- if (!node || node.__previousSibling) return;
1404
- patchHostOriginalAccessor("previousSibling", node);
1405
- Object.defineProperty(node, "previousSibling", {
1406
- get: function() {
1407
- var _a;
1408
- const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.childNodes;
1409
- const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1410
- if (parentNodes && index > -1) {
1411
- return parentNodes[index - 1];
1412
- }
1413
- return this.__previousSibling;
1414
- }
1415
- });
1416
- };
1417
- var patchPreviousElementSibling = (element) => {
1418
- if (!element || element.__previousElementSibling) return;
1419
- patchHostOriginalAccessor("previousElementSibling", element);
1420
- Object.defineProperty(element, "previousElementSibling", {
1421
- get: function() {
1422
- var _a;
1423
- const parentNodes = (_a = this["s-ol"]) == null ? void 0 : _a.parentNode.children;
1424
- const index = parentNodes == null ? void 0 : parentNodes.indexOf(this);
1425
- if (parentNodes && index > -1) {
1426
- return parentNodes[index - 1];
1427
- }
1428
- return this.__previousElementSibling;
1429
- }
1430
- });
1431
- };
1432
- var validElementPatches = ["children", "nextElementSibling", "previousElementSibling"];
1433
- var validNodesPatches = [
1434
- "childNodes",
1435
- "firstChild",
1436
- "lastChild",
1437
- "nextSibling",
1438
- "previousSibling",
1439
- "textContent"
1440
- ];
1441
- function patchHostOriginalAccessor(accessorName, node) {
1442
- let accessor;
1443
- if (validElementPatches.includes(accessorName)) {
1444
- accessor = Object.getOwnPropertyDescriptor(Element.prototype, accessorName);
1445
- } else if (validNodesPatches.includes(accessorName)) {
1446
- accessor = Object.getOwnPropertyDescriptor(Node.prototype, accessorName);
1447
- }
1448
- if (!accessor) {
1449
- accessor = Object.getOwnPropertyDescriptor(node, accessorName);
1450
- }
1451
- if (accessor) Object.defineProperty(node, "__" + accessorName, accessor);
1452
- }
1453
- var createTime = (fnName, tagName = "") => {
1454
- {
1455
- return () => {
1456
- return;
1457
- };
1458
- }
1459
- };
1460
- var uniqueTime = (key, measureText) => {
1461
- {
1462
- return () => {
1463
- return;
1464
- };
1465
- }
1466
- };
1467
-
1468
- // src/runtime/client-hydrate.ts
1469
- var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1470
- const endHydrate = createTime("hydrateClient", tagName);
1471
- const shadowRoot = hostElm.shadowRoot;
1472
- const childRenderNodes = [];
1473
- const slotNodes = [];
1474
- const slottedNodes = [];
1475
- const shadowRootNodes = shadowRoot ? [] : null;
1476
- const vnode = newVNode(tagName, null);
1477
- vnode.$elm$ = hostElm;
1478
- let scopeId2;
1479
- {
1480
- const cmpMeta = hostRef.$cmpMeta$;
1481
- if (cmpMeta && cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */ && hostElm["s-sc"]) {
1482
- scopeId2 = hostElm["s-sc"];
1483
- hostElm.classList.add(scopeId2 + "-h");
1484
- } else if (hostElm["s-sc"]) {
1485
- delete hostElm["s-sc"];
1486
- }
1487
- }
1488
- if (!plt.$orgLocNodes$) {
1489
- initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
1490
- }
1491
- hostElm[HYDRATE_ID] = hostId;
1492
- hostElm.removeAttribute(HYDRATE_ID);
1493
- hostRef.$vnode$ = clientHydrate(
1494
- vnode,
1495
- childRenderNodes,
1496
- slotNodes,
1497
- shadowRootNodes,
1498
- hostElm,
1499
- hostElm,
1500
- hostId,
1501
- slottedNodes
1502
- );
1503
- let crIndex = 0;
1504
- const crLength = childRenderNodes.length;
1505
- let childRenderNode;
1506
- for (crIndex; crIndex < crLength; crIndex++) {
1507
- childRenderNode = childRenderNodes[crIndex];
1508
- const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
1509
- const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
1510
- const node = childRenderNode.$elm$;
1511
- if (!shadowRoot) {
1512
- node["s-hn"] = tagName.toUpperCase();
1513
- if (childRenderNode.$tag$ === "slot") {
1514
- node["s-cr"] = hostElm["s-cr"];
1515
- }
1516
- }
1517
- if (childRenderNode.$tag$ === "slot") {
1518
- if (childRenderNode.$children$) {
1519
- childRenderNode.$flags$ |= 2 /* isSlotFallback */;
1520
- if (!childRenderNode.$elm$.childNodes.length) {
1521
- childRenderNode.$children$.forEach((c) => {
1522
- childRenderNode.$elm$.appendChild(c.$elm$);
1523
- });
1524
- }
1525
- } else {
1526
- childRenderNode.$flags$ |= 1 /* isSlotReference */;
1527
- }
1528
- }
1529
- if (orgLocationNode && orgLocationNode.isConnected) {
1530
- if (shadowRoot && orgLocationNode["s-en"] === "") {
1531
- orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
1532
- }
1533
- orgLocationNode.parentNode.removeChild(orgLocationNode);
1534
- if (!shadowRoot) {
1535
- node["s-oo"] = parseInt(childRenderNode.$nodeId$);
1536
- }
1537
- }
1538
- plt.$orgLocNodes$.delete(orgLocationId);
1539
- }
1540
- const hosts = [];
1541
- const snLen = slottedNodes.length;
1542
- let snIndex = 0;
1543
- let slotGroup;
1544
- let snGroupIdx;
1545
- let snGroupLen;
1546
- let slottedItem;
1547
- for (snIndex; snIndex < snLen; snIndex++) {
1548
- slotGroup = slottedNodes[snIndex];
1549
- if (!slotGroup || !slotGroup.length) continue;
1550
- snGroupLen = slotGroup.length;
1551
- snGroupIdx = 0;
1552
- for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
1553
- slottedItem = slotGroup[snGroupIdx];
1554
- if (!hosts[slottedItem.hostId]) {
1555
- hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
1556
- }
1557
- if (!hosts[slottedItem.hostId]) continue;
1558
- const hostEle = hosts[slottedItem.hostId];
1559
- if (!hostEle.shadowRoot || !shadowRoot) {
1560
- slottedItem.slot["s-cr"] = hostEle["s-cr"];
1561
- if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
1562
- slottedItem.slot["s-cr"] = hostEle;
1563
- } else {
1564
- slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
1565
- }
1566
- addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
1567
- {
1568
- patchNextPrev(slottedItem.node);
1569
- }
1570
- }
1571
- if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
1572
- hostEle.appendChild(slottedItem.node);
1573
- }
1574
- }
1575
- }
1576
- if (scopeId2 && slotNodes.length) {
1577
- slotNodes.forEach((slot) => {
1578
- slot.$elm$.parentElement.classList.add(scopeId2 + "-s");
1579
- });
1580
- }
1581
- if (shadowRoot) {
1582
- let rnIdex = 0;
1583
- const rnLen = shadowRootNodes.length;
1584
- for (rnIdex; rnIdex < rnLen; rnIdex++) {
1585
- shadowRoot.appendChild(shadowRootNodes[rnIdex]);
1586
- }
1587
- Array.from(hostElm.childNodes).forEach((node) => {
1588
- if (node.nodeType === 8 /* CommentNode */ && typeof node["s-sn"] !== "string") {
1589
- node.parentNode.removeChild(node);
1590
- }
1591
- });
1592
- }
1593
- hostRef.$hostElement$ = hostElm;
1594
- endHydrate();
1595
- };
1596
- var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
1597
- let childNodeType;
1598
- let childIdSplt;
1599
- let childVNode;
1600
- let i2;
1601
- const scopeId2 = hostElm["s-sc"];
1602
- if (node.nodeType === 1 /* ElementNode */) {
1603
- childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
1604
- if (childNodeType) {
1605
- childIdSplt = childNodeType.split(".");
1606
- if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
1607
- childVNode = createSimpleVNode({
1608
- $flags$: 0,
1609
- $hostId$: childIdSplt[0],
1610
- $nodeId$: childIdSplt[1],
1611
- $depth$: childIdSplt[2],
1612
- $index$: childIdSplt[3],
1613
- $tag$: node.tagName.toLowerCase(),
1614
- $elm$: node,
1615
- // If we don't add the initial classes to the VNode, the first `vdom-render.ts` patch
1616
- // won't try to reconcile them. Classes set on the node will be blown away.
1617
- $attrs$: { class: node.className || "" }
1618
- });
1619
- childRenderNodes.push(childVNode);
1620
- node.removeAttribute(HYDRATE_CHILD_ID);
1621
- if (!parentVNode.$children$) {
1622
- parentVNode.$children$ = [];
1623
- }
1624
- if (scopeId2) {
1625
- node["s-si"] = scopeId2;
1626
- childVNode.$attrs$.class += " " + scopeId2;
1627
- }
1628
- const slotName = childVNode.$elm$.getAttribute("s-sn");
1629
- if (typeof slotName === "string") {
1630
- if (childVNode.$tag$ === "slot-fb") {
1631
- addSlot(
1632
- slotName,
1633
- childIdSplt[2],
1634
- childVNode,
1635
- node,
1636
- parentVNode,
1637
- childRenderNodes,
1638
- slotNodes,
1639
- shadowRootNodes,
1640
- slottedNodes
1641
- );
1642
- if (scopeId2) {
1643
- node.classList.add(scopeId2);
1644
- }
1645
- }
1646
- childVNode.$elm$["s-sn"] = slotName;
1647
- childVNode.$elm$.removeAttribute("s-sn");
1648
- }
1649
- if (childVNode.$index$ !== void 0) {
1650
- parentVNode.$children$[childVNode.$index$] = childVNode;
1651
- }
1652
- parentVNode = childVNode;
1653
- if (shadowRootNodes && childVNode.$depth$ === "0") {
1654
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1655
- }
1656
- }
1657
- }
1658
- if (node.shadowRoot) {
1659
- for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
1660
- clientHydrate(
1661
- parentVNode,
1662
- childRenderNodes,
1663
- slotNodes,
1664
- shadowRootNodes,
1665
- hostElm,
1666
- node.shadowRoot.childNodes[i2],
1667
- hostId,
1668
- slottedNodes
1669
- );
1670
- }
1671
- }
1672
- const nonShadowNodes = node.__childNodes || node.childNodes;
1673
- for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
1674
- clientHydrate(
1675
- parentVNode,
1676
- childRenderNodes,
1677
- slotNodes,
1678
- shadowRootNodes,
1679
- hostElm,
1680
- nonShadowNodes[i2],
1681
- hostId,
1682
- slottedNodes
1683
- );
1684
- }
1685
- } else if (node.nodeType === 8 /* CommentNode */) {
1686
- childIdSplt = node.nodeValue.split(".");
1687
- if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
1688
- childNodeType = childIdSplt[0];
1689
- childVNode = createSimpleVNode({
1690
- $hostId$: childIdSplt[1],
1691
- $nodeId$: childIdSplt[2],
1692
- $depth$: childIdSplt[3],
1693
- $index$: childIdSplt[4] || "0",
1694
- $elm$: node,
1695
- $attrs$: null,
1696
- $children$: null,
1697
- $key$: null,
1698
- $name$: null,
1699
- $tag$: null,
1700
- $text$: null
1701
- });
1702
- if (childNodeType === TEXT_NODE_ID) {
1703
- childVNode.$elm$ = node.nextSibling;
1704
- if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
1705
- childVNode.$text$ = childVNode.$elm$.textContent;
1706
- childRenderNodes.push(childVNode);
1707
- node.remove();
1708
- if (hostId === childVNode.$hostId$) {
1709
- if (!parentVNode.$children$) {
1710
- parentVNode.$children$ = [];
1711
- }
1712
- parentVNode.$children$[childVNode.$index$] = childVNode;
1713
- }
1714
- if (shadowRootNodes && childVNode.$depth$ === "0") {
1715
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1716
- }
1717
- }
1718
- } else if (childNodeType === COMMENT_NODE_ID) {
1719
- childVNode.$elm$ = node.nextSibling;
1720
- if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
1721
- childRenderNodes.push(childVNode);
1722
- node.remove();
1723
- }
1724
- } else if (childVNode.$hostId$ === hostId) {
1725
- if (childNodeType === SLOT_NODE_ID) {
1726
- const slotName = node["s-sn"] = childIdSplt[5] || "";
1727
- addSlot(
1728
- slotName,
1729
- childIdSplt[2],
1730
- childVNode,
1731
- node,
1732
- parentVNode,
1733
- childRenderNodes,
1734
- slotNodes,
1735
- shadowRootNodes,
1736
- slottedNodes
1737
- );
1738
- } else if (childNodeType === CONTENT_REF_ID) {
1739
- if (shadowRootNodes) {
1740
- node.remove();
1741
- } else {
1742
- hostElm["s-cr"] = node;
1743
- node["s-cn"] = true;
1744
- }
1745
- }
1746
- }
1747
- }
1748
- } else if (parentVNode && parentVNode.$tag$ === "style") {
1749
- const vnode = newVNode(null, node.textContent);
1750
- vnode.$elm$ = node;
1751
- vnode.$index$ = "0";
1752
- parentVNode.$children$ = [vnode];
1753
- }
1754
- return parentVNode;
1755
- };
1756
- var initializeDocumentHydrate = (node, orgLocNodes) => {
1757
- if (node.nodeType === 1 /* ElementNode */) {
1758
- const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
1759
- if (componentId) {
1760
- orgLocNodes.set(componentId, node);
1761
- }
1762
- let i2 = 0;
1763
- if (node.shadowRoot) {
1764
- for (; i2 < node.shadowRoot.childNodes.length; i2++) {
1765
- initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
1766
- }
1767
- }
1768
- const nonShadowNodes = node.__childNodes || node.childNodes;
1769
- for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
1770
- initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
1771
- }
1772
- } else if (node.nodeType === 8 /* CommentNode */) {
1773
- const childIdSplt = node.nodeValue.split(".");
1774
- if (childIdSplt[0] === ORG_LOCATION_ID) {
1775
- orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
1776
- node.nodeValue = "";
1777
- node["s-en"] = childIdSplt[3];
1778
- }
1779
- }
1780
- };
1781
- var createSimpleVNode = (vnode) => {
1782
- const defaultVNode = {
1783
- $flags$: 0,
1784
- $hostId$: null,
1785
- $nodeId$: null,
1786
- $depth$: null,
1787
- $index$: "0",
1788
- $elm$: null,
1789
- $attrs$: null,
1790
- $children$: null,
1791
- $key$: null,
1792
- $name$: null,
1793
- $tag$: null,
1794
- $text$: null
1795
- };
1796
- return { ...defaultVNode, ...vnode };
1797
- };
1798
- function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
1799
- node["s-sr"] = true;
1800
- childVNode.$name$ = slotName || null;
1801
- childVNode.$tag$ = "slot";
1802
- const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
1803
- if (shadowRootNodes) {
1804
- const slot = childVNode.$elm$ = doc.createElement(childVNode.$tag$);
1805
- if (childVNode.$name$) {
1806
- childVNode.$elm$.setAttribute("name", slotName);
1807
- }
1808
- if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
1809
- parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1810
- } else {
1811
- node.parentNode.insertBefore(childVNode.$elm$, node);
1812
- }
1813
- addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
1814
- node.remove();
1815
- if (childVNode.$depth$ === "0") {
1816
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1817
- }
1818
- } else {
1819
- const slot = childVNode.$elm$;
1820
- const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
1821
- addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
1822
- if (shouldMove) {
1823
- parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1824
- }
1825
- childRenderNodes.push(childVNode);
1826
- }
1827
- slotNodes.push(childVNode);
1828
- if (!parentVNode.$children$) {
1829
- parentVNode.$children$ = [];
1830
- }
1831
- parentVNode.$children$[childVNode.$index$] = childVNode;
1832
- }
1833
- var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
1834
- let slottedNode = slotNode.nextSibling;
1835
- slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
1836
- 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 */))) {
1837
- slottedNode["s-sn"] = slotName;
1838
- slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
1839
- slottedNode = slottedNode.nextSibling;
1840
- }
1841
- };
1842
-
1843
- // src/runtime/mode.ts
1844
- var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
1845
- var setMode = (handler) => modeResolutionChain.push(handler);
1846
- var getMode = (ref) => getHostRef(ref).$modeName$;
1847
- var parsePropertyValue = (propValue, propType) => {
1848
- if (propValue != null && !isComplexType(propValue)) {
1849
- if (propType & 4 /* Boolean */) {
1850
- return propValue === "false" ? false : propValue === "" || !!propValue;
1851
- }
1852
- if (propType & 2 /* Number */) {
1853
- return parseFloat(propValue);
1854
- }
1855
- if (propType & 1 /* String */) {
1856
- return String(propValue);
1857
- }
1858
- return propValue;
1859
- }
1860
- return propValue;
1861
- };
1862
- var getElement = (ref) => getHostRef(ref).$hostElement$ ;
1863
-
1864
- // src/runtime/event-emitter.ts
1865
- var createEvent = (ref, name, flags) => {
1866
- const elm = getElement(ref);
1867
- return {
1868
- emit: (detail) => {
1869
- return emitEvent(elm, name, {
1870
- bubbles: !!(flags & 4 /* Bubbles */),
1871
- composed: !!(flags & 2 /* Composed */),
1872
- cancelable: !!(flags & 1 /* Cancellable */),
1873
- detail
1874
- });
1875
- }
1876
- };
1877
- };
1878
- var emitEvent = (elm, name, opts) => {
1879
- const ev = plt.ce(name, opts);
1880
- elm.dispatchEvent(ev);
1881
- return ev;
1882
- };
1883
- var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
1884
- var registerStyle = (scopeId2, cssText, allowCS) => {
1885
- let style = styles.get(scopeId2);
1886
- if (supportsConstructableStylesheets && allowCS) {
1887
- style = style || new CSSStyleSheet();
1888
- if (typeof style === "string") {
1889
- style = cssText;
1890
- } else {
1891
- style.replaceSync(cssText);
1892
- }
1893
- } else {
1894
- style = cssText;
1895
- }
1896
- styles.set(scopeId2, style);
1897
- };
1898
- var addStyle = (styleContainerNode, cmpMeta, mode) => {
1899
- var _a;
1900
- const scopeId2 = getScopeId(cmpMeta, mode);
1901
- const style = styles.get(scopeId2);
1902
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
1903
- if (style) {
1904
- if (typeof style === "string") {
1905
- styleContainerNode = styleContainerNode.head || styleContainerNode;
1906
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
1907
- let styleElm;
1908
- if (!appliedStyles) {
1909
- rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
1910
- }
1911
- if (!appliedStyles.has(scopeId2)) {
1912
- if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
1913
- styleElm.innerHTML = style;
1914
- } else {
1915
- styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
1916
- styleElm.innerHTML = style;
1917
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
1918
- if (nonce != null) {
1919
- styleElm.setAttribute("nonce", nonce);
1920
- }
1921
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
1922
- if (styleContainerNode.nodeName === "HEAD") {
1923
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
1924
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
1925
- styleContainerNode.insertBefore(styleElm, referenceNode2);
1926
- } else if ("host" in styleContainerNode) {
1927
- if (supportsConstructableStylesheets) {
1928
- const stylesheet = new CSSStyleSheet();
1929
- stylesheet.replaceSync(style);
1930
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
1931
- } else {
1932
- const existingStyleContainer = styleContainerNode.querySelector("style");
1933
- if (existingStyleContainer) {
1934
- existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
1935
- } else {
1936
- styleContainerNode.prepend(styleElm);
1937
- }
1355
+ }
1356
+ if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
1357
+ if (nodeToRelocate !== insertBeforeNode) {
1358
+ insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
1359
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1360
+ nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
1938
1361
  }
1939
- } else {
1940
- styleContainerNode.append(styleElm);
1941
1362
  }
1942
1363
  }
1943
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
1944
- styleContainerNode.insertBefore(styleElm, null);
1364
+ nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](nodeToRelocate);
1365
+ } else {
1366
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1367
+ if (isInitialLoad) {
1368
+ nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
1369
+ }
1370
+ nodeToRelocate.hidden = true;
1945
1371
  }
1946
1372
  }
1947
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
1948
- styleElm.innerHTML += SLOT_FB_CSS;
1949
- }
1950
- if (appliedStyles) {
1951
- appliedStyles.add(scopeId2);
1952
- }
1953
1373
  }
1954
- } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
1955
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
1956
1374
  }
1375
+ if (checkSlotFallbackVisibility) {
1376
+ updateFallbackSlotVisibility(rootVnode.$elm$);
1377
+ }
1378
+ plt.$flags$ &= ~1 /* isTmpDisconnected */;
1379
+ relocateNodes.length = 0;
1957
1380
  }
1958
- return scopeId2;
1959
- };
1960
- var attachStyles = (hostRef) => {
1961
- const cmpMeta = hostRef.$cmpMeta$;
1962
- const elm = hostRef.$hostElement$;
1963
- const flags = cmpMeta.$flags$;
1964
- const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
1965
- const scopeId2 = addStyle(
1966
- elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
1967
- cmpMeta,
1968
- hostRef.$modeName$
1969
- );
1970
- if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
1971
- elm["s-sc"] = scopeId2;
1972
- elm.classList.add(scopeId2 + "-h");
1381
+ if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1382
+ for (const childNode of rootVnode.$elm$.childNodes) {
1383
+ if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
1384
+ if (isInitialLoad && childNode["s-ih"] == null) {
1385
+ childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
1386
+ }
1387
+ childNode.hidden = true;
1388
+ }
1389
+ }
1973
1390
  }
1974
- endAttachStyles();
1391
+ contentRef = void 0;
1975
1392
  };
1976
- var getScopeId = (cmp, mode) => "sc-" + (mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
1977
1393
 
1978
1394
  // src/runtime/update-component.ts
1979
1395
  var attachToAncestor = (hostRef, ancestorComponent) => {
@@ -2201,62 +1617,16 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
2201
1617
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
2202
1618
  members.map(([memberName, [memberFlags]]) => {
2203
1619
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
2204
- if ((memberFlags & 2048 /* Getter */) === 0) {
2205
- Object.defineProperty(prototype, memberName, {
2206
- get() {
2207
- return getValue(this, memberName);
2208
- },
2209
- set(newValue) {
2210
- setValue(this, memberName, newValue, cmpMeta);
2211
- },
2212
- configurable: true,
2213
- enumerable: true
2214
- });
2215
- } else if (flags & 1 /* isElementConstructor */ && memberFlags & 2048 /* Getter */) {
2216
- {
2217
- Object.defineProperty(prototype, memberName, {
2218
- get() {
2219
- const ref = getHostRef(this);
2220
- const instance = ref ? ref.$lazyInstance$ : prototype;
2221
- if (!instance) return;
2222
- return instance[memberName];
2223
- },
2224
- configurable: true,
2225
- enumerable: true
2226
- });
2227
- }
2228
- if (memberFlags & 4096 /* Setter */) {
2229
- const origSetter = Object.getOwnPropertyDescriptor(prototype, memberName).set;
2230
- Object.defineProperty(prototype, memberName, {
2231
- set(newValue) {
2232
- const ref = getHostRef(this);
2233
- if (origSetter) {
2234
- const currentValue = ref.$hostElement$[memberName];
2235
- if (!ref.$instanceValues$.get(memberName) && currentValue) {
2236
- ref.$instanceValues$.set(memberName, currentValue);
2237
- }
2238
- origSetter.apply(this, [parsePropertyValue(newValue, cmpMeta.$members$[memberName][0])]);
2239
- setValue(this, memberName, ref.$hostElement$[memberName], cmpMeta);
2240
- return;
2241
- }
2242
- if (!ref) return;
2243
- const setterSetVal = () => {
2244
- const currentValue = ref.$lazyInstance$[memberName];
2245
- if (!ref.$instanceValues$.get(memberName) && currentValue) {
2246
- ref.$instanceValues$.set(memberName, currentValue);
2247
- }
2248
- ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, cmpMeta.$members$[memberName][0]);
2249
- setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
2250
- };
2251
- if (ref.$lazyInstance$) {
2252
- setterSetVal();
2253
- } else {
2254
- ref.$onReadyPromise$.then(() => setterSetVal());
2255
- }
2256
- }
2257
- });
2258
- }
2259
- }
1620
+ Object.defineProperty(prototype, memberName, {
1621
+ get() {
1622
+ return getValue(this, memberName);
1623
+ },
1624
+ set(newValue) {
1625
+ setValue(this, memberName, newValue, cmpMeta);
1626
+ },
1627
+ configurable: true,
1628
+ enumerable: true
1629
+ });
2260
1630
  } else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
2261
1631
  Object.defineProperty(prototype, memberName, {
2262
1632
  value(...args) {
@@ -2276,7 +1646,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
2276
1646
  plt.jmp(() => {
2277
1647
  var _a2;
2278
1648
  const propName = attrNameToPropName.get(attrName);
2279
- if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
1649
+ if (this.hasOwnProperty(propName)) {
2280
1650
  newValue = this[propName];
2281
1651
  delete this[propName];
2282
1652
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -2296,10 +1666,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
2296
1666
  }
2297
1667
  return;
2298
1668
  }
2299
- const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
2300
- if (!propDesc.get || !!propDesc.set) {
2301
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2302
- }
1669
+ this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2303
1670
  });
2304
1671
  };
2305
1672
  Cstr.observedAttributes = Array.from(
@@ -2415,9 +1782,6 @@ var connectedCallback = (elm) => {
2415
1782
  if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2416
1783
  const scopeId2 = addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) ;
2417
1784
  elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
2418
- } else if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2419
- const scopeId2 = getScopeId(cmpMeta, elm.getAttribute("s-mode") );
2420
- elm["s-sc"] = scopeId2;
2421
1785
  }
2422
1786
  initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
2423
1787
  }
@@ -2487,12 +1851,287 @@ var disconnectedCallback = async (elm) => {
2487
1851
  hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
2488
1852
  }
2489
1853
  }
2490
- if (rootAppliedStyles.has(elm)) {
2491
- rootAppliedStyles.delete(elm);
1854
+ };
1855
+ var patchPseudoShadowDom = (hostElementPrototype, descriptorPrototype) => {
1856
+ patchCloneNode(hostElementPrototype);
1857
+ patchSlotAppendChild(hostElementPrototype);
1858
+ patchSlotAppend(hostElementPrototype);
1859
+ patchSlotPrepend(hostElementPrototype);
1860
+ patchSlotInsertAdjacentElement(hostElementPrototype);
1861
+ patchSlotInsertAdjacentHTML(hostElementPrototype);
1862
+ patchSlotInsertAdjacentText(hostElementPrototype);
1863
+ patchTextContent(hostElementPrototype);
1864
+ patchChildSlotNodes(hostElementPrototype, descriptorPrototype);
1865
+ patchSlotRemoveChild(hostElementPrototype);
1866
+ };
1867
+ var patchCloneNode = (HostElementPrototype) => {
1868
+ const orgCloneNode = HostElementPrototype.cloneNode;
1869
+ HostElementPrototype.cloneNode = function(deep) {
1870
+ const srcNode = this;
1871
+ const isShadowDom = srcNode.shadowRoot && supportsShadow ;
1872
+ const clonedNode = orgCloneNode.call(srcNode, isShadowDom ? deep : false);
1873
+ if (!isShadowDom && deep) {
1874
+ let i2 = 0;
1875
+ let slotted, nonStencilNode;
1876
+ const stencilPrivates = [
1877
+ "s-id",
1878
+ "s-cr",
1879
+ "s-lr",
1880
+ "s-rc",
1881
+ "s-sc",
1882
+ "s-p",
1883
+ "s-cn",
1884
+ "s-sr",
1885
+ "s-sn",
1886
+ "s-hn",
1887
+ "s-ol",
1888
+ "s-nr",
1889
+ "s-si",
1890
+ "s-rf",
1891
+ "s-scs"
1892
+ ];
1893
+ for (; i2 < srcNode.childNodes.length; i2++) {
1894
+ slotted = srcNode.childNodes[i2]["s-nr"];
1895
+ nonStencilNode = stencilPrivates.every((privateField) => !srcNode.childNodes[i2][privateField]);
1896
+ if (slotted) {
1897
+ if (clonedNode.__appendChild) {
1898
+ clonedNode.__appendChild(slotted.cloneNode(true));
1899
+ } else {
1900
+ clonedNode.appendChild(slotted.cloneNode(true));
1901
+ }
1902
+ }
1903
+ if (nonStencilNode) {
1904
+ clonedNode.appendChild(srcNode.childNodes[i2].cloneNode(true));
1905
+ }
1906
+ }
1907
+ }
1908
+ return clonedNode;
1909
+ };
1910
+ };
1911
+ var patchSlotAppendChild = (HostElementPrototype) => {
1912
+ HostElementPrototype.__appendChild = HostElementPrototype.appendChild;
1913
+ HostElementPrototype.appendChild = function(newChild) {
1914
+ const slotName = newChild["s-sn"] = getSlotName(newChild);
1915
+ const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
1916
+ if (slotNode) {
1917
+ const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1918
+ const appendAfter = slotChildNodes[slotChildNodes.length - 1];
1919
+ const insertedNode = insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1920
+ updateFallbackSlotVisibility(this);
1921
+ return insertedNode;
1922
+ }
1923
+ return this.__appendChild(newChild);
1924
+ };
1925
+ };
1926
+ var patchSlotRemoveChild = (ElementPrototype) => {
1927
+ ElementPrototype.__removeChild = ElementPrototype.removeChild;
1928
+ ElementPrototype.removeChild = function(toRemove) {
1929
+ if (toRemove && typeof toRemove["s-sn"] !== "undefined") {
1930
+ const slotNode = getHostSlotNode(this.childNodes, toRemove["s-sn"], this.tagName);
1931
+ if (slotNode) {
1932
+ const slotChildNodes = getHostSlotChildNodes(slotNode, toRemove["s-sn"]);
1933
+ const existingNode = slotChildNodes.find((n) => n === toRemove);
1934
+ if (existingNode) {
1935
+ existingNode.remove();
1936
+ updateFallbackSlotVisibility(this);
1937
+ return;
1938
+ }
1939
+ }
1940
+ }
1941
+ return this.__removeChild(toRemove);
1942
+ };
1943
+ };
1944
+ var patchSlotPrepend = (HostElementPrototype) => {
1945
+ const originalPrepend = HostElementPrototype.prepend;
1946
+ HostElementPrototype.prepend = function(...newChildren) {
1947
+ newChildren.forEach((newChild) => {
1948
+ if (typeof newChild === "string") {
1949
+ newChild = this.ownerDocument.createTextNode(newChild);
1950
+ }
1951
+ const slotName = newChild["s-sn"] = getSlotName(newChild);
1952
+ const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
1953
+ if (slotNode) {
1954
+ const slotPlaceholder = document.createTextNode("");
1955
+ slotPlaceholder["s-nr"] = newChild;
1956
+ slotNode["s-cr"].parentNode.__appendChild(slotPlaceholder);
1957
+ newChild["s-ol"] = slotPlaceholder;
1958
+ const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
1959
+ const appendAfter = slotChildNodes[0];
1960
+ return insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
1961
+ }
1962
+ if (newChild.nodeType === 1 && !!newChild.getAttribute("slot")) {
1963
+ newChild.hidden = true;
1964
+ }
1965
+ return originalPrepend.call(this, newChild);
1966
+ });
1967
+ };
1968
+ };
1969
+ var patchSlotAppend = (HostElementPrototype) => {
1970
+ HostElementPrototype.append = function(...newChildren) {
1971
+ newChildren.forEach((newChild) => {
1972
+ if (typeof newChild === "string") {
1973
+ newChild = this.ownerDocument.createTextNode(newChild);
1974
+ }
1975
+ this.appendChild(newChild);
1976
+ });
1977
+ };
1978
+ };
1979
+ var patchSlotInsertAdjacentHTML = (HostElementPrototype) => {
1980
+ const originalInsertAdjacentHtml = HostElementPrototype.insertAdjacentHTML;
1981
+ HostElementPrototype.insertAdjacentHTML = function(position, text) {
1982
+ if (position !== "afterbegin" && position !== "beforeend") {
1983
+ return originalInsertAdjacentHtml.call(this, position, text);
1984
+ }
1985
+ const container = this.ownerDocument.createElement("_");
1986
+ let node;
1987
+ container.innerHTML = text;
1988
+ if (position === "afterbegin") {
1989
+ while (node = container.firstChild) {
1990
+ this.prepend(node);
1991
+ }
1992
+ } else if (position === "beforeend") {
1993
+ while (node = container.firstChild) {
1994
+ this.append(node);
1995
+ }
1996
+ }
1997
+ };
1998
+ };
1999
+ var patchSlotInsertAdjacentText = (HostElementPrototype) => {
2000
+ HostElementPrototype.insertAdjacentText = function(position, text) {
2001
+ this.insertAdjacentHTML(position, text);
2002
+ };
2003
+ };
2004
+ var patchSlotInsertAdjacentElement = (HostElementPrototype) => {
2005
+ const originalInsertAdjacentElement = HostElementPrototype.insertAdjacentElement;
2006
+ HostElementPrototype.insertAdjacentElement = function(position, element) {
2007
+ if (position !== "afterbegin" && position !== "beforeend") {
2008
+ return originalInsertAdjacentElement.call(this, position, element);
2009
+ }
2010
+ if (position === "afterbegin") {
2011
+ this.prepend(element);
2012
+ return element;
2013
+ } else if (position === "beforeend") {
2014
+ this.append(element);
2015
+ return element;
2016
+ }
2017
+ return element;
2018
+ };
2019
+ };
2020
+ var patchTextContent = (hostElementPrototype) => {
2021
+ const descriptor = Object.getOwnPropertyDescriptor(Node.prototype, "textContent");
2022
+ Object.defineProperty(hostElementPrototype, "__textContent", descriptor);
2023
+ {
2024
+ Object.defineProperty(hostElementPrototype, "textContent", {
2025
+ // To mimic shadow root behavior, we need to return the text content of all
2026
+ // nodes in a slot reference node
2027
+ get() {
2028
+ const slotRefNodes = getAllChildSlotNodes(this.childNodes);
2029
+ const textContent = slotRefNodes.map((node) => {
2030
+ var _a, _b;
2031
+ const text = [];
2032
+ let slotContent = node.nextSibling;
2033
+ while (slotContent && slotContent["s-sn"] === node["s-sn"]) {
2034
+ if (slotContent.nodeType === 3 /* TEXT_NODE */ || slotContent.nodeType === 1 /* ELEMENT_NODE */) {
2035
+ text.push((_b = (_a = slotContent.textContent) == null ? void 0 : _a.trim()) != null ? _b : "");
2036
+ }
2037
+ slotContent = slotContent.nextSibling;
2038
+ }
2039
+ return text.filter((ref) => ref !== "").join(" ");
2040
+ }).filter((text) => text !== "").join(" ");
2041
+ return " " + textContent + " ";
2042
+ },
2043
+ // To mimic shadow root behavior, we need to overwrite all nodes in a slot
2044
+ // reference node. If a default slot reference node exists, the text content will be
2045
+ // placed there. Otherwise, the new text node will be hidden
2046
+ set(value) {
2047
+ const slotRefNodes = getAllChildSlotNodes(this.childNodes);
2048
+ slotRefNodes.forEach((node) => {
2049
+ let slotContent = node.nextSibling;
2050
+ while (slotContent && slotContent["s-sn"] === node["s-sn"]) {
2051
+ const tmp = slotContent;
2052
+ slotContent = slotContent.nextSibling;
2053
+ tmp.remove();
2054
+ }
2055
+ if (node["s-sn"] === "") {
2056
+ const textNode = this.ownerDocument.createTextNode(value);
2057
+ textNode["s-sn"] = "";
2058
+ insertBefore(node.parentElement, textNode, node.nextSibling);
2059
+ } else {
2060
+ node.remove();
2061
+ }
2062
+ });
2063
+ }
2064
+ });
2065
+ }
2066
+ };
2067
+ var patchChildSlotNodes = (elm, cmpMeta) => {
2068
+ class FakeNodeList extends Array {
2069
+ item(n) {
2070
+ return this[n];
2071
+ }
2072
+ }
2073
+ if (cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
2074
+ const childNodesFn = elm.__lookupGetter__("childNodes");
2075
+ Object.defineProperty(elm, "children", {
2076
+ get() {
2077
+ return this.childNodes.map((n) => n.nodeType === 1);
2078
+ }
2079
+ });
2080
+ Object.defineProperty(elm, "childElementCount", {
2081
+ get() {
2082
+ return elm.children.length;
2083
+ }
2084
+ });
2085
+ Object.defineProperty(elm, "childNodes", {
2086
+ get() {
2087
+ const childNodes = childNodesFn.call(this);
2088
+ if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0 && getHostRef(this).$flags$ & 2 /* hasRendered */) {
2089
+ const result = new FakeNodeList();
2090
+ for (let i2 = 0; i2 < childNodes.length; i2++) {
2091
+ const slot = childNodes[i2]["s-nr"];
2092
+ if (slot) {
2093
+ result.push(slot);
2094
+ }
2095
+ }
2096
+ return result;
2097
+ }
2098
+ return FakeNodeList.from(childNodes);
2099
+ }
2100
+ });
2101
+ }
2102
+ };
2103
+ var getAllChildSlotNodes = (childNodes) => {
2104
+ const slotRefNodes = [];
2105
+ for (const childNode of Array.from(childNodes)) {
2106
+ if (childNode["s-sr"]) {
2107
+ slotRefNodes.push(childNode);
2108
+ }
2109
+ slotRefNodes.push(...getAllChildSlotNodes(childNode.childNodes));
2110
+ }
2111
+ return slotRefNodes;
2112
+ };
2113
+ var getSlotName = (node) => node["s-sn"] || node.nodeType === 1 && node.getAttribute("slot") || "";
2114
+ var getHostSlotNode = (childNodes, slotName, hostName) => {
2115
+ let i2 = 0;
2116
+ let childNode;
2117
+ for (; i2 < childNodes.length; i2++) {
2118
+ childNode = childNodes[i2];
2119
+ if (childNode["s-sr"] && childNode["s-sn"] === slotName && childNode["s-hn"] === hostName) {
2120
+ return childNode;
2121
+ }
2122
+ childNode = getHostSlotNode(childNode.childNodes, slotName, hostName);
2123
+ if (childNode) {
2124
+ return childNode;
2125
+ }
2492
2126
  }
2493
- if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
2494
- rootAppliedStyles.delete(elm.shadowRoot);
2127
+ return null;
2128
+ };
2129
+ var getHostSlotChildNodes = (n, slotName) => {
2130
+ const childNodes = [n];
2131
+ while ((n = n.nextSibling) && n["s-sn"] === slotName) {
2132
+ childNodes.push(n);
2495
2133
  }
2134
+ return childNodes;
2496
2135
  };
2497
2136
 
2498
2137
  // src/runtime/bootstrap-lazy.ts
@@ -2583,13 +2222,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2583
2222
  }
2584
2223
  disconnectedCallback() {
2585
2224
  plt.jmp(() => disconnectedCallback(this));
2586
- plt.raf(() => {
2587
- var _a3;
2588
- const hostRef = getHostRef(this);
2589
- if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
2590
- delete hostRef.$vnode$.$elm$;
2591
- }
2592
- });
2593
2225
  }
2594
2226
  componentOnReady() {
2595
2227
  return getHostRef(this).$onReadyPromise$;
@@ -2597,7 +2229,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2597
2229
  };
2598
2230
  {
2599
2231
  if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2600
- patchPseudoShadowDom(HostElement.prototype);
2232
+ patchPseudoShadowDom(HostElement.prototype, cmpMeta);
2601
2233
  }
2602
2234
  }
2603
2235
  cmpMeta.$lazyBundleId$ = lazyBundle[0];