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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (430) hide show
  1. package/dist/cjs/{app-globals-21afee77.js → app-globals-16893c1e.js} +1 -1
  2. package/dist/cjs/{button-active-3f2f60b4.js → button-active-ec3d9ca2.js} +1 -1
  3. package/dist/cjs/{hardware-back-button-9e8a2c4f.js → hardware-back-button-5a19da86.js} +2 -2
  4. package/dist/cjs/{index-f05acd21.js → index-29ad8b24.js} +4 -4
  5. package/dist/cjs/{index-8e789962.js → index-2b28acc8.js} +2 -2
  6. package/dist/cjs/{index-73f75efb.js → index-55b6245a.js} +1117 -744
  7. package/dist/cjs/index.cjs.js +8 -8
  8. package/dist/cjs/ion-accordion_2.cjs.entry.js +2 -2
  9. package/dist/cjs/ion-action-sheet.cjs.entry.js +5 -5
  10. package/dist/cjs/ion-alert.cjs.entry.js +5 -5
  11. package/dist/cjs/ion-app_8.cjs.entry.js +6 -6
  12. package/dist/cjs/ion-avatar_3.cjs.entry.js +2 -2
  13. package/dist/cjs/ion-back-button.cjs.entry.js +2 -2
  14. package/dist/cjs/ion-backdrop.cjs.entry.js +2 -2
  15. package/dist/cjs/ion-breadcrumb_2.cjs.entry.js +2 -2
  16. package/dist/cjs/ion-button_2.cjs.entry.js +2 -2
  17. package/dist/cjs/ion-card_5.cjs.entry.js +2 -2
  18. package/dist/cjs/ion-checkbox.cjs.entry.js +2 -2
  19. package/dist/cjs/ion-chip.cjs.entry.js +2 -2
  20. package/dist/cjs/ion-col_3.cjs.entry.js +2 -2
  21. package/dist/cjs/ion-datetime-button.cjs.entry.js +2 -2
  22. package/dist/cjs/ion-datetime_3.cjs.entry.js +4 -4
  23. package/dist/cjs/ion-fab_3.cjs.entry.js +2 -2
  24. package/dist/cjs/ion-img.cjs.entry.js +2 -2
  25. package/dist/cjs/ion-infinite-scroll_2.cjs.entry.js +2 -2
  26. package/dist/cjs/ion-input-password-toggle.cjs.entry.js +2 -2
  27. package/dist/cjs/ion-input.cjs.entry.js +2 -2
  28. package/dist/cjs/ion-item-option_3.cjs.entry.js +2 -2
  29. package/dist/cjs/ion-item_8.cjs.entry.js +2 -2
  30. package/dist/cjs/ion-loading.cjs.entry.js +4 -4
  31. package/dist/cjs/ion-menu_3.cjs.entry.js +5 -5
  32. package/dist/cjs/ion-modal.cjs.entry.js +5 -5
  33. package/dist/cjs/ion-nav_2.cjs.entry.js +3 -3
  34. package/dist/cjs/ion-picker-column-option.cjs.entry.js +2 -2
  35. package/dist/cjs/ion-picker-column.cjs.entry.js +2 -2
  36. package/dist/cjs/ion-picker.cjs.entry.js +1 -1
  37. package/dist/cjs/ion-popover.cjs.entry.js +5 -5
  38. package/dist/cjs/ion-progress-bar.cjs.entry.js +2 -2
  39. package/dist/cjs/ion-radio_2.cjs.entry.js +2 -2
  40. package/dist/cjs/ion-range.cjs.entry.js +2 -2
  41. package/dist/cjs/ion-refresher_2.cjs.entry.js +2 -2
  42. package/dist/cjs/ion-reorder_2.cjs.entry.js +2 -2
  43. package/dist/cjs/ion-ripple-effect.cjs.entry.js +2 -2
  44. package/dist/cjs/ion-route_4.cjs.entry.js +2 -2
  45. package/dist/cjs/ion-searchbar.cjs.entry.js +2 -2
  46. package/dist/cjs/ion-segment-content.cjs.entry.js +1 -1
  47. package/dist/cjs/ion-segment-view.cjs.entry.js +1 -1
  48. package/dist/cjs/ion-segment_2.cjs.entry.js +2 -2
  49. package/dist/cjs/ion-select-modal.cjs.entry.js +4 -4
  50. package/dist/cjs/ion-select_3.cjs.entry.js +4 -4
  51. package/dist/cjs/ion-spinner.cjs.entry.js +2 -2
  52. package/dist/cjs/ion-split-pane.cjs.entry.js +2 -2
  53. package/dist/cjs/ion-tab-bar_2.cjs.entry.js +2 -2
  54. package/dist/cjs/ion-tab_2.cjs.entry.js +1 -1
  55. package/dist/cjs/ion-text.cjs.entry.js +2 -2
  56. package/dist/cjs/ion-textarea.cjs.entry.js +2 -2
  57. package/dist/cjs/ion-toast.cjs.entry.js +4 -4
  58. package/dist/cjs/ion-toggle.cjs.entry.js +2 -2
  59. package/dist/cjs/{ionic-global-d9a8bb5b.js → ionic-global-aa46b97c.js} +1 -1
  60. package/dist/cjs/ionic.cjs.js +4 -4
  61. package/dist/cjs/{ios.transition-cf40433b.js → ios.transition-9820d3dc.js} +3 -3
  62. package/dist/cjs/loader.cjs.js +3 -3
  63. package/dist/cjs/{md.transition-ededf99f.js → md.transition-a35e0839.js} +3 -3
  64. package/dist/cjs/{overlays-aa669eb8.js → overlays-43ae7e1d.js} +2 -2
  65. package/dist/cjs/{status-tap-37681226.js → status-tap-f98e43a0.js} +1 -1
  66. package/dist/collection/collection-manifest.json +2 -2
  67. package/dist/collection/components/accordion/accordion.js +10 -0
  68. package/dist/collection/components/accordion-group/accordion-group.js +12 -0
  69. package/dist/collection/components/action-sheet/action-sheet.js +36 -4
  70. package/dist/collection/components/alert/alert.js +40 -4
  71. package/dist/collection/components/back-button/back-button.js +15 -1
  72. package/dist/collection/components/backdrop/backdrop.js +6 -0
  73. package/dist/collection/components/badge/badge.js +2 -0
  74. package/dist/collection/components/breadcrumb/breadcrumb.js +27 -1
  75. package/dist/collection/components/breadcrumbs/breadcrumbs.js +8 -0
  76. package/dist/collection/components/button/button.js +33 -1
  77. package/dist/collection/components/buttons/buttons.js +2 -0
  78. package/dist/collection/components/card/card.js +21 -1
  79. package/dist/collection/components/card-header/card-header.js +4 -0
  80. package/dist/collection/components/card-subtitle/card-subtitle.js +2 -0
  81. package/dist/collection/components/card-title/card-title.js +2 -0
  82. package/dist/collection/components/checkbox/checkbox.js +18 -0
  83. package/dist/collection/components/chip/chip.js +6 -0
  84. package/dist/collection/components/col/col.js +48 -0
  85. package/dist/collection/components/content/content.js +14 -0
  86. package/dist/collection/components/datetime/datetime.js +64 -4
  87. package/dist/collection/components/datetime-button/datetime-button.js +6 -0
  88. package/dist/collection/components/fab/fab.js +8 -0
  89. package/dist/collection/components/fab-button/fab-button.js +29 -1
  90. package/dist/collection/components/fab-list/fab-list.js +4 -0
  91. package/dist/collection/components/footer/footer.js +4 -0
  92. package/dist/collection/components/grid/grid.js +2 -0
  93. package/dist/collection/components/header/header.js +4 -0
  94. package/dist/collection/components/img/img.js +4 -0
  95. package/dist/collection/components/infinite-scroll/infinite-scroll.js +6 -0
  96. package/dist/collection/components/infinite-scroll-content/infinite-scroll-content.js +4 -0
  97. package/dist/collection/components/input/input.js +69 -1
  98. package/dist/collection/components/input-password-toggle/input-password-toggle.js +8 -0
  99. package/dist/collection/components/item/item.js +27 -1
  100. package/dist/collection/components/item-divider/item-divider.js +4 -0
  101. package/dist/collection/components/item-option/item-option.js +16 -0
  102. package/dist/collection/components/item-options/item-options.js +2 -0
  103. package/dist/collection/components/item-sliding/item-sliding.js +2 -0
  104. package/dist/collection/components/label/label.js +4 -0
  105. package/dist/collection/components/list/list.js +4 -0
  106. package/dist/collection/components/list-header/list-header.js +4 -0
  107. package/dist/collection/components/loading/loading.js +38 -4
  108. package/dist/collection/components/menu/menu.js +14 -0
  109. package/dist/collection/components/menu-button/menu-button.js +10 -0
  110. package/dist/collection/components/menu-toggle/menu-toggle.js +4 -0
  111. package/dist/collection/components/modal/modal.js +55 -7
  112. package/dist/collection/components/nav/nav.js +15 -3
  113. package/dist/collection/components/nav-link/nav-link.js +10 -2
  114. package/dist/collection/components/note/note.js +2 -0
  115. package/dist/collection/components/picker-column/picker-column.js +8 -0
  116. package/dist/collection/components/picker-column-option/picker-column-option.js +6 -0
  117. package/dist/collection/components/picker-legacy/picker.js +36 -4
  118. package/dist/collection/components/picker-legacy-column/picker-column.js +3 -1
  119. package/dist/collection/components/popover/popover.js +59 -5
  120. package/dist/collection/components/progress-bar/progress-bar.js +10 -0
  121. package/dist/collection/components/radio/radio.js +14 -0
  122. package/dist/collection/components/radio-group/radio-group.js +8 -0
  123. package/dist/collection/components/range/range.js +32 -0
  124. package/dist/collection/components/refresher/refresher.js +12 -0
  125. package/dist/collection/components/refresher-content/refresher-content.js +8 -0
  126. package/dist/collection/components/reorder-group/reorder-group.js +2 -0
  127. package/dist/collection/components/ripple-effect/ripple-effect.js +2 -0
  128. package/dist/collection/components/route/route.js +13 -3
  129. package/dist/collection/components/route-redirect/route-redirect.js +4 -0
  130. package/dist/collection/components/router/router.js +4 -0
  131. package/dist/collection/components/router-link/router-link.js +13 -1
  132. package/dist/collection/components/router-outlet/router-outlet.js +13 -3
  133. package/dist/collection/components/searchbar/searchbar.js +44 -0
  134. package/dist/collection/components/segment/segment.js +12 -0
  135. package/dist/collection/components/segment-button/segment-button.js +10 -0
  136. package/dist/collection/components/segment-view/segment-view.js +2 -0
  137. package/dist/collection/components/select/select.js +38 -0
  138. package/dist/collection/components/select-modal/select-modal.js +6 -0
  139. package/dist/collection/components/select-option/select-option.js +4 -0
  140. package/dist/collection/components/select-popover/select-popover.js +10 -0
  141. package/dist/collection/components/skeleton-text/skeleton-text.js +2 -0
  142. package/dist/collection/components/spinner/spinner.js +8 -0
  143. package/dist/collection/components/split-pane/split-pane.js +6 -0
  144. package/dist/collection/components/tab/tab.js +9 -1
  145. package/dist/collection/components/tab-bar/tab-bar.js +6 -0
  146. package/dist/collection/components/tab-button/tab-button.js +16 -0
  147. package/dist/collection/components/tabs/tabs.js +2 -0
  148. package/dist/collection/components/text/text.js +2 -0
  149. package/dist/collection/components/textarea/textarea.js +57 -1
  150. package/dist/collection/components/title/title.js +4 -0
  151. package/dist/collection/components/toast/toast.js +49 -5
  152. package/dist/collection/components/toggle/toggle.js +18 -0
  153. package/dist/collection/components/toolbar/toolbar.js +2 -0
  154. package/dist/docs.d.ts +8 -0
  155. package/dist/docs.json +1710 -572
  156. package/dist/esm/{app-globals-5dbb61a5.js → app-globals-32740a0d.js} +1 -1
  157. package/dist/esm/{button-active-f6503382.js → button-active-0e590bc4.js} +1 -1
  158. package/dist/esm/{hardware-back-button-06ef3c3e.js → hardware-back-button-18d38325.js} +2 -2
  159. package/dist/esm/{index-28849c61.js → index-0f61352c.js} +1117 -744
  160. package/dist/esm/{index-3ad7f18b.js → index-4f0570f4.js} +4 -4
  161. package/dist/esm/{index-24b48b06.js → index-7bdf1ee6.js} +2 -2
  162. package/dist/esm/index.js +8 -8
  163. package/dist/esm/ion-accordion_2.entry.js +2 -2
  164. package/dist/esm/ion-action-sheet.entry.js +5 -5
  165. package/dist/esm/ion-alert.entry.js +5 -5
  166. package/dist/esm/ion-app_8.entry.js +6 -6
  167. package/dist/esm/ion-avatar_3.entry.js +2 -2
  168. package/dist/esm/ion-back-button.entry.js +2 -2
  169. package/dist/esm/ion-backdrop.entry.js +2 -2
  170. package/dist/esm/ion-breadcrumb_2.entry.js +2 -2
  171. package/dist/esm/ion-button_2.entry.js +2 -2
  172. package/dist/esm/ion-card_5.entry.js +2 -2
  173. package/dist/esm/ion-checkbox.entry.js +2 -2
  174. package/dist/esm/ion-chip.entry.js +2 -2
  175. package/dist/esm/ion-col_3.entry.js +2 -2
  176. package/dist/esm/ion-datetime-button.entry.js +2 -2
  177. package/dist/esm/ion-datetime_3.entry.js +4 -4
  178. package/dist/esm/ion-fab_3.entry.js +2 -2
  179. package/dist/esm/ion-img.entry.js +2 -2
  180. package/dist/esm/ion-infinite-scroll_2.entry.js +2 -2
  181. package/dist/esm/ion-input-password-toggle.entry.js +2 -2
  182. package/dist/esm/ion-input.entry.js +2 -2
  183. package/dist/esm/ion-item-option_3.entry.js +2 -2
  184. package/dist/esm/ion-item_8.entry.js +2 -2
  185. package/dist/esm/ion-loading.entry.js +4 -4
  186. package/dist/esm/ion-menu_3.entry.js +5 -5
  187. package/dist/esm/ion-modal.entry.js +5 -5
  188. package/dist/esm/ion-nav_2.entry.js +3 -3
  189. package/dist/esm/ion-picker-column-option.entry.js +2 -2
  190. package/dist/esm/ion-picker-column.entry.js +2 -2
  191. package/dist/esm/ion-picker.entry.js +1 -1
  192. package/dist/esm/ion-popover.entry.js +5 -5
  193. package/dist/esm/ion-progress-bar.entry.js +2 -2
  194. package/dist/esm/ion-radio_2.entry.js +2 -2
  195. package/dist/esm/ion-range.entry.js +2 -2
  196. package/dist/esm/ion-refresher_2.entry.js +2 -2
  197. package/dist/esm/ion-reorder_2.entry.js +2 -2
  198. package/dist/esm/ion-ripple-effect.entry.js +2 -2
  199. package/dist/esm/ion-route_4.entry.js +2 -2
  200. package/dist/esm/ion-searchbar.entry.js +2 -2
  201. package/dist/esm/ion-segment-content.entry.js +1 -1
  202. package/dist/esm/ion-segment-view.entry.js +1 -1
  203. package/dist/esm/ion-segment_2.entry.js +2 -2
  204. package/dist/esm/ion-select-modal.entry.js +4 -4
  205. package/dist/esm/ion-select_3.entry.js +4 -4
  206. package/dist/esm/ion-spinner.entry.js +2 -2
  207. package/dist/esm/ion-split-pane.entry.js +2 -2
  208. package/dist/esm/ion-tab-bar_2.entry.js +2 -2
  209. package/dist/esm/ion-tab_2.entry.js +1 -1
  210. package/dist/esm/ion-text.entry.js +2 -2
  211. package/dist/esm/ion-textarea.entry.js +2 -2
  212. package/dist/esm/ion-toast.entry.js +4 -4
  213. package/dist/esm/ion-toggle.entry.js +2 -2
  214. package/dist/esm/{ionic-global-c81d82ab.js → ionic-global-35cabcff.js} +1 -1
  215. package/dist/esm/ionic.js +5 -5
  216. package/dist/esm/{ios.transition-4ee1a3af.js → ios.transition-72ec83a8.js} +3 -3
  217. package/dist/esm/loader.js +4 -4
  218. package/dist/esm/{md.transition-5106a0d2.js → md.transition-1f612b9f.js} +3 -3
  219. package/dist/esm/{overlays-e7b9d6d9.js → overlays-cba25d39.js} +2 -2
  220. package/dist/esm/{status-tap-f472b09f.js → status-tap-a7026a46.js} +1 -1
  221. package/dist/esm-es5/app-globals-32740a0d.js +4 -0
  222. package/dist/esm-es5/{button-active-f6503382.js → button-active-0e590bc4.js} +1 -1
  223. package/dist/esm-es5/{hardware-back-button-06ef3c3e.js → hardware-back-button-18d38325.js} +1 -1
  224. package/dist/esm-es5/index-0f61352c.js +5 -0
  225. package/dist/esm-es5/{index-3ad7f18b.js → index-4f0570f4.js} +1 -1
  226. package/dist/esm-es5/{index-24b48b06.js → index-7bdf1ee6.js} +1 -1
  227. package/dist/esm-es5/index.js +1 -1
  228. package/dist/esm-es5/ion-accordion_2.entry.js +1 -1
  229. package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
  230. package/dist/esm-es5/ion-alert.entry.js +1 -1
  231. package/dist/esm-es5/ion-app_8.entry.js +1 -1
  232. package/dist/esm-es5/ion-avatar_3.entry.js +1 -1
  233. package/dist/esm-es5/ion-back-button.entry.js +1 -1
  234. package/dist/esm-es5/ion-backdrop.entry.js +1 -1
  235. package/dist/esm-es5/ion-breadcrumb_2.entry.js +1 -1
  236. package/dist/esm-es5/ion-button_2.entry.js +1 -1
  237. package/dist/esm-es5/ion-card_5.entry.js +1 -1
  238. package/dist/esm-es5/ion-checkbox.entry.js +1 -1
  239. package/dist/esm-es5/ion-chip.entry.js +1 -1
  240. package/dist/esm-es5/ion-col_3.entry.js +1 -1
  241. package/dist/esm-es5/ion-datetime-button.entry.js +1 -1
  242. package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
  243. package/dist/esm-es5/ion-fab_3.entry.js +1 -1
  244. package/dist/esm-es5/ion-img.entry.js +1 -1
  245. package/dist/esm-es5/ion-infinite-scroll_2.entry.js +1 -1
  246. package/dist/esm-es5/ion-input-password-toggle.entry.js +1 -1
  247. package/dist/esm-es5/ion-input.entry.js +1 -1
  248. package/dist/esm-es5/ion-item-option_3.entry.js +1 -1
  249. package/dist/esm-es5/ion-item_8.entry.js +1 -1
  250. package/dist/esm-es5/ion-loading.entry.js +1 -1
  251. package/dist/esm-es5/ion-menu_3.entry.js +1 -1
  252. package/dist/esm-es5/ion-modal.entry.js +1 -1
  253. package/dist/esm-es5/ion-nav_2.entry.js +1 -1
  254. package/dist/esm-es5/ion-picker-column-option.entry.js +1 -1
  255. package/dist/esm-es5/ion-picker-column.entry.js +1 -1
  256. package/dist/esm-es5/ion-picker.entry.js +1 -1
  257. package/dist/esm-es5/ion-popover.entry.js +1 -1
  258. package/dist/esm-es5/ion-progress-bar.entry.js +1 -1
  259. package/dist/esm-es5/ion-radio_2.entry.js +1 -1
  260. package/dist/esm-es5/ion-range.entry.js +1 -1
  261. package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
  262. package/dist/esm-es5/ion-reorder_2.entry.js +1 -1
  263. package/dist/esm-es5/ion-ripple-effect.entry.js +1 -1
  264. package/dist/esm-es5/ion-route_4.entry.js +1 -1
  265. package/dist/esm-es5/ion-searchbar.entry.js +1 -1
  266. package/dist/esm-es5/ion-segment-content.entry.js +1 -1
  267. package/dist/esm-es5/ion-segment-view.entry.js +1 -1
  268. package/dist/esm-es5/ion-segment_2.entry.js +1 -1
  269. package/dist/esm-es5/ion-select-modal.entry.js +1 -1
  270. package/dist/esm-es5/ion-select_3.entry.js +1 -1
  271. package/dist/esm-es5/ion-spinner.entry.js +1 -1
  272. package/dist/esm-es5/ion-split-pane.entry.js +1 -1
  273. package/dist/esm-es5/ion-tab-bar_2.entry.js +1 -1
  274. package/dist/esm-es5/ion-tab_2.entry.js +1 -1
  275. package/dist/esm-es5/ion-text.entry.js +1 -1
  276. package/dist/esm-es5/ion-textarea.entry.js +1 -1
  277. package/dist/esm-es5/ion-toast.entry.js +1 -1
  278. package/dist/esm-es5/ion-toggle.entry.js +1 -1
  279. package/dist/esm-es5/{ionic-global-c81d82ab.js → ionic-global-35cabcff.js} +1 -1
  280. package/dist/esm-es5/ionic.js +1 -1
  281. package/dist/esm-es5/{ios.transition-4ee1a3af.js → ios.transition-72ec83a8.js} +1 -1
  282. package/dist/esm-es5/loader.js +1 -1
  283. package/dist/esm-es5/{md.transition-5106a0d2.js → md.transition-1f612b9f.js} +1 -1
  284. package/dist/esm-es5/{overlays-e7b9d6d9.js → overlays-cba25d39.js} +1 -1
  285. package/dist/esm-es5/{status-tap-f472b09f.js → status-tap-a7026a46.js} +1 -1
  286. package/dist/ionic/index.esm.js +1 -1
  287. package/dist/ionic/ionic.esm.js +1 -1
  288. package/dist/ionic/ionic.js +1 -1
  289. package/dist/ionic/{p-ed75fcfb.system.entry.js → p-00751c2a.system.entry.js} +1 -1
  290. package/dist/ionic/p-024da823.js +4 -0
  291. package/dist/ionic/{p-16188af7.entry.js → p-047eabc5.entry.js} +1 -1
  292. package/dist/ionic/{p-372ae7f4.system.js → p-04f14c79.system.js} +1 -1
  293. package/dist/ionic/{p-fec61c32.entry.js → p-05562a80.entry.js} +1 -1
  294. package/dist/ionic/{p-d18ab582.system.entry.js → p-07d1dbe2.system.entry.js} +2 -2
  295. package/dist/ionic/{p-58d5df0c.system.entry.js → p-085dbcb4.system.entry.js} +1 -1
  296. package/dist/ionic/{p-7ed1657c.system.entry.js → p-08c16f05.system.entry.js} +1 -1
  297. package/dist/ionic/{p-7ddc46c3.system.entry.js → p-0ba102ec.system.entry.js} +1 -1
  298. package/dist/ionic/{p-fca6ef5f.system.entry.js → p-0c093fae.system.entry.js} +1 -1
  299. package/dist/ionic/{p-de930745.entry.js → p-0c64a077.entry.js} +1 -1
  300. package/dist/ionic/{p-937a7e21.entry.js → p-11330967.entry.js} +1 -1
  301. package/dist/ionic/{p-b9d7015f.entry.js → p-1179c304.entry.js} +1 -1
  302. package/dist/ionic/{p-66640ff7.system.entry.js → p-12f711f4.system.entry.js} +1 -1
  303. package/dist/ionic/{p-c9f3a539.entry.js → p-17290742.entry.js} +1 -1
  304. package/dist/ionic/p-18094a7c.system.entry.js +4 -0
  305. package/dist/ionic/{p-88e63c7d.js → p-19bfac92.js} +1 -1
  306. package/dist/ionic/{p-01186920.system.entry.js → p-255d9087.system.entry.js} +1 -1
  307. package/dist/ionic/{p-3c8e5c23.system.js → p-2564d9b9.system.js} +1 -1
  308. package/dist/ionic/{p-9ee1e8a6.entry.js → p-265d65cb.entry.js} +1 -1
  309. package/dist/ionic/{p-f3102647.system.entry.js → p-27e81076.system.entry.js} +1 -1
  310. package/dist/ionic/{p-bc36ad98.system.entry.js → p-2e396991.system.entry.js} +1 -1
  311. package/dist/ionic/{p-c41ac815.entry.js → p-2e520289.entry.js} +1 -1
  312. package/dist/ionic/p-2e78561b.js +5 -0
  313. package/dist/ionic/{p-5da94421.system.js → p-2f9f5bea.system.js} +1 -1
  314. package/dist/ionic/p-30019f0b.system.js +4 -0
  315. package/dist/ionic/{p-a43467d8.entry.js → p-32e1825e.entry.js} +1 -1
  316. package/dist/ionic/{p-4ec778aa.entry.js → p-35f02a74.entry.js} +1 -1
  317. package/dist/ionic/{p-37cb43bd.system.entry.js → p-38dac839.system.entry.js} +1 -1
  318. package/dist/ionic/{p-ecceeb90.js → p-39539749.js} +1 -1
  319. package/dist/ionic/{p-942b5e13.entry.js → p-3e2c05a8.entry.js} +1 -1
  320. package/dist/ionic/{p-98ff6b32.entry.js → p-41cabce4.entry.js} +1 -1
  321. package/dist/ionic/{p-afecb188.entry.js → p-43679a42.entry.js} +1 -1
  322. package/dist/ionic/{p-2172893e.system.entry.js → p-43febc77.system.entry.js} +1 -1
  323. package/dist/ionic/{p-2b838f86.system.entry.js → p-45e4a1e3.system.entry.js} +1 -1
  324. package/dist/ionic/{p-45693d7e.entry.js → p-4a57dd17.entry.js} +1 -1
  325. package/dist/ionic/{p-9fa07aec.entry.js → p-4ab93cfa.entry.js} +1 -1
  326. package/dist/ionic/{p-b2272f51.system.entry.js → p-52f6a5cc.system.entry.js} +1 -1
  327. package/dist/ionic/{p-6499df44.system.entry.js → p-53ad8ff4.system.entry.js} +1 -1
  328. package/dist/ionic/{p-2bd0ae94.system.entry.js → p-56667886.system.entry.js} +2 -2
  329. package/dist/ionic/{p-a61cba41.entry.js → p-57f92640.entry.js} +1 -1
  330. package/dist/ionic/{p-6d6cedc5.entry.js → p-5ae14e75.entry.js} +1 -1
  331. package/dist/ionic/{p-19a5be0a.entry.js → p-64b0068b.entry.js} +1 -1
  332. package/dist/ionic/{p-e4f69534.system.entry.js → p-65774bef.system.entry.js} +1 -1
  333. package/dist/ionic/{p-e4ee80be.system.entry.js → p-67d3729b.system.entry.js} +1 -1
  334. package/dist/ionic/{p-eba29931.entry.js → p-6828136c.entry.js} +1 -1
  335. package/dist/ionic/{p-1046866e.system.entry.js → p-6a131e4b.system.entry.js} +1 -1
  336. package/dist/ionic/{p-982315a6.entry.js → p-6b6ccc63.entry.js} +1 -1
  337. package/dist/ionic/{p-73dc4950.entry.js → p-6c29e51f.entry.js} +1 -1
  338. package/dist/ionic/{p-6b280620.entry.js → p-6d350e1f.entry.js} +1 -1
  339. package/dist/ionic/p-6d7a98cc.system.entry.js +4 -0
  340. package/dist/ionic/{p-e85d901b.system.entry.js → p-6d9fa95e.system.entry.js} +1 -1
  341. package/dist/ionic/{p-cac0e0b3.system.entry.js → p-6e1c1cf1.system.entry.js} +1 -1
  342. package/dist/ionic/{p-17474161.system.js → p-6f04bf2f.system.js} +1 -1
  343. package/dist/ionic/p-711fd7fc.js +4 -0
  344. package/dist/ionic/{p-5fce0c0b.system.entry.js → p-735f093b.system.entry.js} +1 -1
  345. package/dist/ionic/{p-15e76dd1.entry.js → p-75be4567.entry.js} +1 -1
  346. package/dist/ionic/p-779acec8.entry.js +4 -0
  347. package/dist/ionic/{p-a4565eb5.system.js → p-78067282.system.js} +1 -1
  348. package/dist/ionic/{p-d7aa6b00.entry.js → p-78841a31.entry.js} +1 -1
  349. package/dist/ionic/{p-508d024a.entry.js → p-7fa854a7.entry.js} +1 -1
  350. package/dist/ionic/{p-1e67b266.system.entry.js → p-81494564.system.entry.js} +1 -1
  351. package/dist/ionic/{p-424eb140.system.entry.js → p-84827719.system.entry.js} +1 -1
  352. package/dist/ionic/{p-797eeea8.system.entry.js → p-84a6d0da.system.entry.js} +1 -1
  353. package/dist/ionic/{p-cdc83025.entry.js → p-86bc3e6f.entry.js} +1 -1
  354. package/dist/ionic/{p-2fc0dafe.entry.js → p-876d7e0d.entry.js} +1 -1
  355. package/dist/ionic/{p-c29f8157.system.entry.js → p-89b075f4.system.entry.js} +1 -1
  356. package/dist/ionic/{p-0aa833fb.system.js → p-8b2d8ddb.system.js} +1 -1
  357. package/dist/ionic/{p-b79ba17c.entry.js → p-8c9954a1.entry.js} +1 -1
  358. package/dist/ionic/{p-322c5fb4.system.js → p-8ceead8f.system.js} +1 -1
  359. package/dist/ionic/p-8e8839c4.system.js +5 -0
  360. package/dist/ionic/{p-e6635685.js → p-938a029f.js} +1 -1
  361. package/dist/ionic/{p-2b9b78c7.entry.js → p-93bc2080.entry.js} +1 -1
  362. package/dist/ionic/{p-ddaa748a.system.entry.js → p-979f352d.system.entry.js} +1 -1
  363. package/dist/ionic/{p-33a8a71b.entry.js → p-99658fa2.entry.js} +1 -1
  364. package/dist/ionic/{p-7b9a2b23.entry.js → p-99c5a3a0.entry.js} +1 -1
  365. package/dist/ionic/{p-5823babc.system.entry.js → p-9c4f4367.system.entry.js} +1 -1
  366. package/dist/ionic/{p-ca065903.system.entry.js → p-a2e5c294.system.entry.js} +1 -1
  367. package/dist/ionic/{p-2799c6d3.system.entry.js → p-a3bea030.system.entry.js} +1 -1
  368. package/dist/ionic/{p-a49378bb.system.entry.js → p-a64f199d.system.entry.js} +1 -1
  369. package/dist/ionic/{p-0303d0f8.js → p-a772be95.js} +1 -1
  370. package/dist/ionic/{p-2abae1cc.system.entry.js → p-a8cf7e93.system.entry.js} +1 -1
  371. package/dist/ionic/{p-98231c01.system.entry.js → p-a915830c.system.entry.js} +1 -1
  372. package/dist/ionic/{p-985a7e17.system.entry.js → p-add1b61c.system.entry.js} +1 -1
  373. package/dist/ionic/{p-6d32975a.entry.js → p-ae2e0f50.entry.js} +1 -1
  374. package/dist/ionic/{p-1e010627.system.entry.js → p-afe932a1.system.entry.js} +1 -1
  375. package/dist/ionic/{p-62af944c.entry.js → p-b2ef1bb0.entry.js} +1 -1
  376. package/dist/ionic/{p-f1acf541.system.entry.js → p-b2f788b9.system.entry.js} +1 -1
  377. package/dist/ionic/{p-1fe02220.system.entry.js → p-b50c6cd6.system.entry.js} +1 -1
  378. package/dist/ionic/{p-b335ffed.system.entry.js → p-b52ddc18.system.entry.js} +1 -1
  379. package/dist/ionic/{p-c449820c.system.js → p-b6c8f5dc.system.js} +1 -1
  380. package/dist/ionic/{p-95775830.entry.js → p-b7027235.entry.js} +1 -1
  381. package/dist/ionic/{p-e7ed4a7f.system.js → p-bb750ac0.system.js} +1 -1
  382. package/dist/ionic/{p-63b0abde.system.entry.js → p-bf9210c7.system.entry.js} +1 -1
  383. package/dist/ionic/{p-7458862e.system.entry.js → p-c2496925.system.entry.js} +1 -1
  384. package/dist/ionic/{p-69666e8a.system.entry.js → p-c4dc27a0.system.entry.js} +1 -1
  385. package/dist/ionic/{p-c4b53b16.system.entry.js → p-c505bde7.system.entry.js} +1 -1
  386. package/dist/ionic/{p-bb0db172.entry.js → p-c60e41c7.entry.js} +1 -1
  387. package/dist/ionic/{p-bdad26e3.entry.js → p-cb37f97d.entry.js} +1 -1
  388. package/dist/ionic/{p-ebf042e0.system.entry.js → p-ce32a54b.system.entry.js} +1 -1
  389. package/dist/ionic/{p-a69b9fc5.system.js → p-cf110b0b.system.js} +1 -1
  390. package/dist/ionic/{p-626fd66d.system.entry.js → p-d09b25f9.system.entry.js} +1 -1
  391. package/dist/ionic/{p-9df2c6fb.entry.js → p-d18dc399.entry.js} +1 -1
  392. package/dist/ionic/{p-f9a53abb.system.js → p-d37524be.system.js} +1 -1
  393. package/dist/ionic/{p-9e33104d.entry.js → p-d737a7d9.entry.js} +1 -1
  394. package/dist/ionic/{p-2e46590d.system.entry.js → p-d83d0d32.system.entry.js} +1 -1
  395. package/dist/ionic/{p-081a4ce4.entry.js → p-d8d37758.entry.js} +1 -1
  396. package/dist/ionic/{p-567de071.system.entry.js → p-dcad1a3d.system.entry.js} +1 -1
  397. package/dist/ionic/{p-5b932840.entry.js → p-dddb317f.entry.js} +1 -1
  398. package/dist/ionic/{p-d743e981.js → p-de758235.js} +1 -1
  399. package/dist/ionic/{p-908d6080.entry.js → p-e11ef2b7.entry.js} +1 -1
  400. package/dist/ionic/{p-14be4015.entry.js → p-e3c8fb01.entry.js} +1 -1
  401. package/dist/ionic/{p-14e159ea.system.entry.js → p-e3f626ea.system.entry.js} +1 -1
  402. package/dist/ionic/{p-0574e87e.js → p-e46ba5cd.js} +1 -1
  403. package/dist/ionic/{p-52d7a191.entry.js → p-e4966716.entry.js} +1 -1
  404. package/dist/ionic/{p-5ab1b709.entry.js → p-e5c69948.entry.js} +1 -1
  405. package/dist/ionic/{p-4439fc2a.entry.js → p-e837530a.entry.js} +1 -1
  406. package/dist/ionic/p-e85e6e02.js +4 -0
  407. package/dist/ionic/{p-8b8be2fd.entry.js → p-e8784b73.entry.js} +1 -1
  408. package/dist/ionic/{p-12a722b8.system.entry.js → p-e896891b.system.entry.js} +1 -1
  409. package/dist/ionic/{p-d6841eac.js → p-e9bd3df9.js} +1 -1
  410. package/dist/ionic/{p-e563a35c.entry.js → p-ea2ee20f.entry.js} +1 -1
  411. package/dist/ionic/{p-efaffe74.entry.js → p-eb717568.entry.js} +1 -1
  412. package/dist/ionic/{p-da074ff7.entry.js → p-f2986b60.entry.js} +1 -1
  413. package/dist/ionic/{p-2507278c.system.entry.js → p-f8a8295c.system.entry.js} +1 -1
  414. package/dist/ionic/{p-19ec4f42.entry.js → p-fb7b7319.entry.js} +1 -1
  415. package/dist/types/stencil-public-runtime.d.ts +6 -0
  416. package/hydrate/index.d.ts +10 -4
  417. package/hydrate/index.js +1354 -742
  418. package/hydrate/index.mjs +1354 -742
  419. package/package.json +2 -2
  420. package/dist/esm-es5/app-globals-5dbb61a5.js +0 -4
  421. package/dist/esm-es5/index-28849c61.js +0 -5
  422. package/dist/ionic/p-16799667.system.entry.js +0 -4
  423. package/dist/ionic/p-16bfb979.system.entry.js +0 -4
  424. package/dist/ionic/p-21e5e7e4.js +0 -4
  425. package/dist/ionic/p-25180df3.system.js +0 -5
  426. package/dist/ionic/p-49a0e74c.entry.js +0 -4
  427. package/dist/ionic/p-69066a53.js +0 -4
  428. package/dist/ionic/p-9f3008d4.system.js +0 -4
  429. package/dist/ionic/p-b82d4cab.js +0 -4
  430. package/dist/ionic/p-d836d43e.js +0 -5
package/hydrate/index.js CHANGED
@@ -7,6 +7,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
8
  var stream = require('stream');
9
9
 
10
+ const modeResolutionChain = [];
11
+
10
12
  function hydrateFactory($stencilWindow, $stencilHydrateOpts, $stencilHydrateResults, $stencilAfterHydrate, $stencilHydrateResolve) {
11
13
  var globalThis = $stencilWindow;
12
14
  var self = $stencilWindow;
@@ -38,6 +40,7 @@ function hydrateFactory($stencilWindow, $stencilHydrateOpts, $stencilHydrateResu
38
40
  var CSS = $stencilWindow.CSS;
39
41
  var CustomEvent = $stencilWindow.CustomEvent;
40
42
  var Document = $stencilWindow.Document;
43
+ var ShadowRoot = $stencilWindow.ShadowRoot;
41
44
  var DocumentFragment = $stencilWindow.DocumentFragment;
42
45
  var DocumentType = $stencilWindow.DocumentType;
43
46
  var DOMTokenList = $stencilWindow.DOMTokenList;
@@ -58,6 +61,7 @@ function hydrateFactory($stencilWindow, $stencilHydrateOpts, $stencilHydrateResu
58
61
  var HTMLTemplateElement = $stencilWindow.HTMLTemplateElement;
59
62
  var HTMLTitleElement = $stencilWindow.HTMLTitleElement;
60
63
  var IntersectionObserver = $stencilWindow.IntersectionObserver;
64
+ var ResizeObserver = $stencilWindow.ResizeObserver;
61
65
  var KeyboardEvent = $stencilWindow.KeyboardEvent;
62
66
  var MouseEvent = $stencilWindow.MouseEvent;
63
67
  var Node = $stencilWindow.Node;
@@ -129,8 +133,235 @@ function hydrateFactory($stencilWindow, $stencilHydrateOpts, $stencilHydrateResu
129
133
  const NAMESPACE = 'ionic';
130
134
  const BUILD = /* ionic */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: true, constructableCSS: false, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: true, hydrateServerSide: true, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", 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, shadowDomShim: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: true, taskQueue: true, 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 };
131
135
 
136
+ // TODO(FW-2832): types
137
+ class Config {
138
+ constructor() {
139
+ this.m = new Map();
140
+ }
141
+ reset(configObj) {
142
+ this.m = new Map(Object.entries(configObj));
143
+ }
144
+ get(key, fallback) {
145
+ const value = this.m.get(key);
146
+ return value !== undefined ? value : fallback;
147
+ }
148
+ getBoolean(key, fallback = false) {
149
+ const val = this.m.get(key);
150
+ if (val === undefined) {
151
+ return fallback;
152
+ }
153
+ if (typeof val === 'string') {
154
+ return val === 'true';
155
+ }
156
+ return !!val;
157
+ }
158
+ getNumber(key, fallback) {
159
+ const val = parseFloat(this.m.get(key));
160
+ return isNaN(val) ? (fallback !== undefined ? fallback : NaN) : val;
161
+ }
162
+ set(key, value) {
163
+ this.m.set(key, value);
164
+ }
165
+ }
166
+ const config = /*@__PURE__*/ new Config();
167
+ const configFromSession = (win) => {
168
+ try {
169
+ const configStr = win.sessionStorage.getItem(IONIC_SESSION_KEY);
170
+ return configStr !== null ? JSON.parse(configStr) : {};
171
+ }
172
+ catch (e) {
173
+ return {};
174
+ }
175
+ };
176
+ const saveConfig = (win, c) => {
177
+ try {
178
+ win.sessionStorage.setItem(IONIC_SESSION_KEY, JSON.stringify(c));
179
+ }
180
+ catch (e) {
181
+ return;
182
+ }
183
+ };
184
+ const configFromURL = (win) => {
185
+ const configObj = {};
186
+ win.location.search
187
+ .slice(1)
188
+ .split('&')
189
+ .map((entry) => entry.split('='))
190
+ .map(([key, value]) => {
191
+ try {
192
+ return [decodeURIComponent(key), decodeURIComponent(value)];
193
+ }
194
+ catch (e) {
195
+ return ['', ''];
196
+ }
197
+ })
198
+ .filter(([key]) => startsWith(key, IONIC_PREFIX))
199
+ .map(([key, value]) => [key.slice(IONIC_PREFIX.length), value])
200
+ .forEach(([key, value]) => {
201
+ configObj[key] = value;
202
+ });
203
+ return configObj;
204
+ };
205
+ const startsWith = (input, search) => {
206
+ return input.substr(0, search.length) === search;
207
+ };
208
+ const IONIC_PREFIX = 'ionic:';
209
+ const IONIC_SESSION_KEY = 'ionic-persist-config';
210
+
211
+ const getPlatforms = (win) => setupPlatforms(win);
212
+ const isPlatform = (winOrPlatform, platform) => {
213
+ if (typeof winOrPlatform === 'string') {
214
+ platform = winOrPlatform;
215
+ winOrPlatform = undefined;
216
+ }
217
+ return getPlatforms(winOrPlatform).includes(platform);
218
+ };
219
+ const setupPlatforms = (win = window) => {
220
+ if (typeof win === 'undefined') {
221
+ return [];
222
+ }
223
+ win.Ionic = win.Ionic || {};
224
+ let platforms = win.Ionic.platforms;
225
+ if (platforms == null) {
226
+ platforms = win.Ionic.platforms = detectPlatforms(win);
227
+ platforms.forEach((p) => win.document.documentElement.classList.add(`plt-${p}`));
228
+ }
229
+ return platforms;
230
+ };
231
+ const detectPlatforms = (win) => {
232
+ const customPlatformMethods = config.get('platform');
233
+ return Object.keys(PLATFORMS_MAP).filter((p) => {
234
+ const customMethod = customPlatformMethods === null || customPlatformMethods === void 0 ? void 0 : customPlatformMethods[p];
235
+ return typeof customMethod === 'function' ? customMethod(win) : PLATFORMS_MAP[p](win);
236
+ });
237
+ };
238
+ const isMobileWeb = (win) => isMobile(win) && !isHybrid(win);
239
+ const isIpad = (win) => {
240
+ // iOS 12 and below
241
+ if (testUserAgent(win, /iPad/i)) {
242
+ return true;
243
+ }
244
+ // iOS 13+
245
+ if (testUserAgent(win, /Macintosh/i) && isMobile(win)) {
246
+ return true;
247
+ }
248
+ return false;
249
+ };
250
+ const isIphone = (win) => testUserAgent(win, /iPhone/i);
251
+ const isIOS = (win) => testUserAgent(win, /iPhone|iPod/i) || isIpad(win);
252
+ const isAndroid = (win) => testUserAgent(win, /android|sink/i);
253
+ const isAndroidTablet = (win) => {
254
+ return isAndroid(win) && !testUserAgent(win, /mobile/i);
255
+ };
256
+ const isPhablet = (win) => {
257
+ const width = win.innerWidth;
258
+ const height = win.innerHeight;
259
+ const smallest = Math.min(width, height);
260
+ const largest = Math.max(width, height);
261
+ return smallest > 390 && smallest < 520 && largest > 620 && largest < 800;
262
+ };
263
+ const isTablet = (win) => {
264
+ const width = win.innerWidth;
265
+ const height = win.innerHeight;
266
+ const smallest = Math.min(width, height);
267
+ const largest = Math.max(width, height);
268
+ return isIpad(win) || isAndroidTablet(win) || (smallest > 460 && smallest < 820 && largest > 780 && largest < 1400);
269
+ };
270
+ const isMobile = (win) => matchMedia$1(win, '(any-pointer:coarse)');
271
+ const isDesktop = (win) => !isMobile(win);
272
+ const isHybrid = (win) => isCordova(win) || isCapacitorNative(win);
273
+ const isCordova = (win) => !!(win['cordova'] || win['phonegap'] || win['PhoneGap']);
274
+ const isCapacitorNative = (win) => {
275
+ const capacitor = win['Capacitor'];
276
+ return !!(capacitor === null || capacitor === void 0 ? void 0 : capacitor.isNative);
277
+ };
278
+ const isElectron = (win) => testUserAgent(win, /electron/i);
279
+ const isPWA = (win) => { var _a; return !!(((_a = win.matchMedia) === null || _a === void 0 ? void 0 : _a.call(win, '(display-mode: standalone)').matches) || win.navigator.standalone); };
280
+ const testUserAgent = (win, expr) => expr.test(win.navigator.userAgent);
281
+ const matchMedia$1 = (win, query) => { var _a; return (_a = win.matchMedia) === null || _a === void 0 ? void 0 : _a.call(win, query).matches; };
282
+ const PLATFORMS_MAP = {
283
+ ipad: isIpad,
284
+ iphone: isIphone,
285
+ ios: isIOS,
286
+ android: isAndroid,
287
+ phablet: isPhablet,
288
+ tablet: isTablet,
289
+ cordova: isCordova,
290
+ capacitor: isCapacitorNative,
291
+ electron: isElectron,
292
+ pwa: isPWA,
293
+ mobile: isMobile,
294
+ mobileweb: isMobileWeb,
295
+ desktop: isDesktop,
296
+ hybrid: isHybrid,
297
+ };
298
+
299
+ // TODO(FW-2832): types
300
+ let defaultMode;
301
+ const getIonMode$1 = (ref) => {
302
+ return (ref && getMode(ref)) || defaultMode;
303
+ };
304
+ const initialize = (userConfig = {}) => {
305
+ if (typeof window === 'undefined') {
306
+ return;
307
+ }
308
+ const doc = window.document;
309
+ const win = window;
310
+ const Ionic = (win.Ionic = win.Ionic || {});
311
+ const platformHelpers = {};
312
+ if (userConfig._ael) {
313
+ platformHelpers.ael = userConfig._ael;
314
+ }
315
+ if (userConfig._rel) {
316
+ platformHelpers.rel = userConfig._rel;
317
+ }
318
+ if (userConfig._ce) {
319
+ platformHelpers.ce = userConfig._ce;
320
+ }
321
+ setPlatformHelpers(platformHelpers);
322
+ // create the Ionic.config from raw config object (if it exists)
323
+ // and convert Ionic.config into a ConfigApi that has a get() fn
324
+ const configObj = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, configFromSession(win)), { persistConfig: false }), Ionic.config), configFromURL(win)), userConfig);
325
+ config.reset(configObj);
326
+ if (config.getBoolean('persistConfig')) {
327
+ saveConfig(win, configObj);
328
+ }
329
+ // Setup platforms
330
+ setupPlatforms(win);
331
+ // first see if the mode was set as an attribute on <html>
332
+ // which could have been set by the user, or by pre-rendering
333
+ // otherwise get the mode via config settings, and fallback to md
334
+ Ionic.config = config;
335
+ Ionic.mode = defaultMode = config.get('mode', doc.documentElement.getAttribute('mode') || (isPlatform(win, 'ios') ? 'ios' : 'md'));
336
+ config.set('mode', defaultMode);
337
+ doc.documentElement.setAttribute('mode', defaultMode);
338
+ doc.documentElement.classList.add(defaultMode);
339
+ if (config.getBoolean('_testing')) {
340
+ config.set('animated', false);
341
+ }
342
+ const isIonicElement = (elm) => { var _a; return (_a = elm.tagName) === null || _a === void 0 ? void 0 : _a.startsWith('ION-'); };
343
+ const isAllowedIonicModeValue = (elmMode) => ['ios', 'md'].includes(elmMode);
344
+ setMode((elm) => {
345
+ while (elm) {
346
+ const elmMode = elm.mode || elm.getAttribute('mode');
347
+ if (elmMode) {
348
+ if (isAllowedIonicModeValue(elmMode)) {
349
+ return elmMode;
350
+ }
351
+ else if (isIonicElement(elm)) {
352
+ console.warn('Invalid ionic mode: "' + elmMode + '", expected: "ios" or "md"');
353
+ }
354
+ }
355
+ elm = elm.parentElement;
356
+ }
357
+ return defaultMode;
358
+ });
359
+ };
360
+
361
+ const globalScripts = initialize;
362
+
132
363
  /*
133
- Stencil Hydrate Platform v4.20.0 | MIT Licensed | https://stenciljs.com
364
+ Stencil Hydrate Platform v4.23.0-dev.1735628762.fb8335e | MIT Licensed | https://stenciljs.com
134
365
  */
135
366
  var __defProp = Object.defineProperty;
136
367
  var __export = (target, all) => {
@@ -204,29 +435,22 @@ var unwrapErr = (result) => {
204
435
  throw result.value;
205
436
  }
206
437
  };
207
- var createTime = (fnName, tagName = "") => {
208
- {
209
- return () => {
210
- return;
211
- };
212
- }
213
- };
214
- var uniqueTime = (key, measureText) => {
215
- {
216
- return () => {
217
- return;
218
- };
219
- }
220
- };
221
438
 
222
439
  // src/runtime/runtime-constants.ts
223
440
  var CONTENT_REF_ID = "r";
224
441
  var ORG_LOCATION_ID = "o";
225
442
  var SLOT_NODE_ID = "s";
226
443
  var TEXT_NODE_ID = "t";
444
+ var COMMENT_NODE_ID = "c";
227
445
  var HYDRATE_ID = "s-id";
228
446
  var HYDRATED_STYLE_ID = "sty-id";
229
447
  var HYDRATE_CHILD_ID = "c-id";
448
+ var STENCIL_DOC_DATA = "_stencilDocData";
449
+ var DEFAULT_DOC_DATA = {
450
+ hostIds: 0,
451
+ rootLevelIds: 0,
452
+ staticComponents: /* @__PURE__ */ new Set()
453
+ };
230
454
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
231
455
  var XLINK_NS = "http://www.w3.org/1999/xlink";
232
456
  var h = (nodeName, vnodeData, ...children) => {
@@ -340,318 +564,6 @@ var convertToPrivate = (node) => {
340
564
  vnode.$name$ = node.vname;
341
565
  return vnode;
342
566
  };
343
-
344
- // src/runtime/client-hydrate.ts
345
- var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
346
- const endHydrate = createTime("hydrateClient", tagName);
347
- const shadowRoot = hostElm.shadowRoot;
348
- const childRenderNodes = [];
349
- const slotNodes = [];
350
- const shadowRootNodes = shadowRoot ? [] : null;
351
- const vnode = hostRef.$vnode$ = newVNode(tagName, null);
352
- if (!plt.$orgLocNodes$) {
353
- initializeDocumentHydrate(doc$1.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
354
- }
355
- hostElm[HYDRATE_ID] = hostId;
356
- hostElm.removeAttribute(HYDRATE_ID);
357
- clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
358
- childRenderNodes.map((c) => {
359
- const orgLocationId = c.$hostId$ + "." + c.$nodeId$;
360
- const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
361
- const node = c.$elm$;
362
- if (orgLocationNode && supportsShadow && orgLocationNode["s-en"] === "") {
363
- orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
364
- }
365
- if (!shadowRoot) {
366
- node["s-hn"] = tagName;
367
- if (orgLocationNode) {
368
- node["s-ol"] = orgLocationNode;
369
- node["s-ol"]["s-nr"] = node;
370
- }
371
- }
372
- plt.$orgLocNodes$.delete(orgLocationId);
373
- });
374
- if (shadowRoot) {
375
- shadowRootNodes.map((shadowRootNode) => {
376
- if (shadowRootNode) {
377
- shadowRoot.appendChild(shadowRootNode);
378
- }
379
- });
380
- }
381
- endHydrate();
382
- };
383
- var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
384
- let childNodeType;
385
- let childIdSplt;
386
- let childVNode;
387
- let i2;
388
- if (node.nodeType === 1 /* ElementNode */) {
389
- childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
390
- if (childNodeType) {
391
- childIdSplt = childNodeType.split(".");
392
- if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
393
- childVNode = {
394
- $flags$: 0,
395
- $hostId$: childIdSplt[0],
396
- $nodeId$: childIdSplt[1],
397
- $depth$: childIdSplt[2],
398
- $index$: childIdSplt[3],
399
- $tag$: node.tagName.toLowerCase(),
400
- $elm$: node,
401
- $attrs$: null,
402
- $children$: null,
403
- $key$: null,
404
- $name$: null,
405
- $text$: null
406
- };
407
- childRenderNodes.push(childVNode);
408
- node.removeAttribute(HYDRATE_CHILD_ID);
409
- if (!parentVNode.$children$) {
410
- parentVNode.$children$ = [];
411
- }
412
- parentVNode.$children$[childVNode.$index$] = childVNode;
413
- parentVNode = childVNode;
414
- if (shadowRootNodes && childVNode.$depth$ === "0") {
415
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
416
- }
417
- }
418
- }
419
- if (node.shadowRoot) {
420
- for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
421
- clientHydrate(
422
- parentVNode,
423
- childRenderNodes,
424
- slotNodes,
425
- shadowRootNodes,
426
- hostElm,
427
- node.shadowRoot.childNodes[i2],
428
- hostId
429
- );
430
- }
431
- }
432
- for (i2 = node.childNodes.length - 1; i2 >= 0; i2--) {
433
- clientHydrate(
434
- parentVNode,
435
- childRenderNodes,
436
- slotNodes,
437
- shadowRootNodes,
438
- hostElm,
439
- node.childNodes[i2],
440
- hostId
441
- );
442
- }
443
- } else if (node.nodeType === 8 /* CommentNode */) {
444
- childIdSplt = node.nodeValue.split(".");
445
- if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
446
- childNodeType = childIdSplt[0];
447
- childVNode = {
448
- $flags$: 0,
449
- $hostId$: childIdSplt[1],
450
- $nodeId$: childIdSplt[2],
451
- $depth$: childIdSplt[3],
452
- $index$: childIdSplt[4],
453
- $elm$: node,
454
- $attrs$: null,
455
- $children$: null,
456
- $key$: null,
457
- $name$: null,
458
- $tag$: null,
459
- $text$: null
460
- };
461
- if (childNodeType === TEXT_NODE_ID) {
462
- childVNode.$elm$ = node.nextSibling;
463
- if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
464
- childVNode.$text$ = childVNode.$elm$.textContent;
465
- childRenderNodes.push(childVNode);
466
- node.remove();
467
- if (!parentVNode.$children$) {
468
- parentVNode.$children$ = [];
469
- }
470
- parentVNode.$children$[childVNode.$index$] = childVNode;
471
- if (shadowRootNodes && childVNode.$depth$ === "0") {
472
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
473
- }
474
- }
475
- } else if (childVNode.$hostId$ === hostId) {
476
- if (childNodeType === SLOT_NODE_ID) {
477
- childVNode.$tag$ = "slot";
478
- if (childIdSplt[5]) {
479
- node["s-sn"] = childVNode.$name$ = childIdSplt[5];
480
- } else {
481
- node["s-sn"] = "";
482
- }
483
- node["s-sr"] = true;
484
- if (shadowRootNodes) {
485
- childVNode.$elm$ = doc$1.createElement(childVNode.$tag$);
486
- if (childVNode.$name$) {
487
- childVNode.$elm$.setAttribute("name", childVNode.$name$);
488
- }
489
- node.parentNode.insertBefore(childVNode.$elm$, node);
490
- node.remove();
491
- if (childVNode.$depth$ === "0") {
492
- shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
493
- }
494
- }
495
- slotNodes.push(childVNode);
496
- if (!parentVNode.$children$) {
497
- parentVNode.$children$ = [];
498
- }
499
- parentVNode.$children$[childVNode.$index$] = childVNode;
500
- } else if (childNodeType === CONTENT_REF_ID) {
501
- if (shadowRootNodes) {
502
- node.remove();
503
- } else {
504
- hostElm["s-cr"] = node;
505
- node["s-cn"] = true;
506
- }
507
- }
508
- }
509
- }
510
- } else if (parentVNode && parentVNode.$tag$ === "style") {
511
- const vnode = newVNode(null, node.textContent);
512
- vnode.$elm$ = node;
513
- vnode.$index$ = "0";
514
- parentVNode.$children$ = [vnode];
515
- }
516
- };
517
- var initializeDocumentHydrate = (node, orgLocNodes) => {
518
- if (node.nodeType === 1 /* ElementNode */) {
519
- let i2 = 0;
520
- if (node.shadowRoot) {
521
- for (; i2 < node.shadowRoot.childNodes.length; i2++) {
522
- initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
523
- }
524
- }
525
- for (i2 = 0; i2 < node.childNodes.length; i2++) {
526
- initializeDocumentHydrate(node.childNodes[i2], orgLocNodes);
527
- }
528
- } else if (node.nodeType === 8 /* CommentNode */) {
529
- const childIdSplt = node.nodeValue.split(".");
530
- if (childIdSplt[0] === ORG_LOCATION_ID) {
531
- orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
532
- node.nodeValue = "";
533
- node["s-en"] = childIdSplt[3];
534
- }
535
- }
536
- };
537
-
538
- // src/runtime/mode.ts
539
- var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
540
- var getMode = (ref) => getHostRef(ref).$modeName$;
541
- var parsePropertyValue = (propValue, propType) => {
542
- if (propValue != null && !isComplexType(propValue)) {
543
- if (propType & 4 /* Boolean */) {
544
- return propValue === "false" ? false : propValue === "" || !!propValue;
545
- }
546
- if (propType & 2 /* Number */) {
547
- return parseFloat(propValue);
548
- }
549
- if (propType & 1 /* String */) {
550
- return String(propValue);
551
- }
552
- return propValue;
553
- }
554
- return propValue;
555
- };
556
- var getElement = (ref) => getHostRef(ref).$hostElement$ ;
557
-
558
- // src/runtime/event-emitter.ts
559
- var createEvent = (ref, name, flags) => {
560
- const elm = getElement(ref);
561
- return {
562
- emit: (detail) => {
563
- return emitEvent(elm, name, {
564
- bubbles: !!(flags & 4 /* Bubbles */),
565
- composed: !!(flags & 2 /* Composed */),
566
- cancelable: !!(flags & 1 /* Cancellable */),
567
- detail
568
- });
569
- }
570
- };
571
- };
572
- var emitEvent = (elm, name, opts) => {
573
- const ev = plt.ce(name, opts);
574
- elm.dispatchEvent(ev);
575
- return ev;
576
- };
577
- var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
578
- var registerStyle = (scopeId2, cssText, allowCS) => {
579
- let style = styles.get(scopeId2);
580
- {
581
- style = cssText;
582
- }
583
- styles.set(scopeId2, style);
584
- };
585
- var addStyle = (styleContainerNode, cmpMeta, mode) => {
586
- var _a;
587
- const scopeId2 = getScopeId(cmpMeta, mode);
588
- const style = styles.get(scopeId2);
589
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc$1;
590
- if (style) {
591
- if (typeof style === "string") {
592
- styleContainerNode = styleContainerNode.head || styleContainerNode;
593
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
594
- let styleElm;
595
- if (!appliedStyles) {
596
- rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
597
- }
598
- if (!appliedStyles.has(scopeId2)) {
599
- if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
600
- styleElm.innerHTML = style;
601
- } else {
602
- styleElm = doc$1.createElement("style");
603
- styleElm.innerHTML = style;
604
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc$1);
605
- if (nonce != null) {
606
- styleElm.setAttribute("nonce", nonce);
607
- }
608
- if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
609
- styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
610
- }
611
- const injectStyle = (
612
- /**
613
- * we render a scoped component
614
- */
615
- !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) || /**
616
- * we are using shadow dom and render the style tag within the shadowRoot
617
- */
618
- cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD"
619
- );
620
- if (injectStyle) {
621
- styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
622
- }
623
- }
624
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
625
- styleElm.innerHTML += SLOT_FB_CSS;
626
- }
627
- if (appliedStyles) {
628
- appliedStyles.add(scopeId2);
629
- }
630
- }
631
- }
632
- }
633
- return scopeId2;
634
- };
635
- var attachStyles = (hostRef) => {
636
- const cmpMeta = hostRef.$cmpMeta$;
637
- const elm = hostRef.$hostElement$;
638
- const flags = cmpMeta.$flags$;
639
- const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
640
- const scopeId2 = addStyle(
641
- elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
642
- cmpMeta,
643
- hostRef.$modeName$
644
- );
645
- if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
646
- elm["s-sc"] = scopeId2;
647
- elm.classList.add(scopeId2 + "-h");
648
- if (flags & 2 /* scopedCssEncapsulation */) {
649
- elm.classList.add(scopeId2 + "-s");
650
- }
651
- }
652
- endAttachStyles();
653
- };
654
- var getScopeId = (cmp, mode) => "sc-" + (mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
655
567
  var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
656
568
  if (oldValue !== newValue) {
657
569
  let isProp = isMemberInElement(elm, memberName);
@@ -660,6 +572,9 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
660
572
  const classList = elm.classList;
661
573
  const oldClasses = parseClassList(oldValue);
662
574
  const newClasses = parseClassList(newValue);
575
+ if (elm["s-si"] && newClasses.indexOf(elm["s-si"]) < 0) {
576
+ newClasses.push(elm["s-si"]);
577
+ }
663
578
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
664
579
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
665
580
  } else if (memberName === "style") {
@@ -710,7 +625,11 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
710
625
  if (memberName === "list") {
711
626
  isProp = false;
712
627
  } else if (oldValue == null || elm[memberName] != n) {
713
- elm[memberName] = n;
628
+ if (typeof elm.__lookupSetter__(memberName) === "function") {
629
+ elm[memberName] = n;
630
+ } else {
631
+ elm.setAttribute(memberName, n);
632
+ }
714
633
  }
715
634
  } else {
716
635
  elm[memberName] = newValue;
@@ -745,7 +664,15 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
745
664
  }
746
665
  };
747
666
  var parseClassListRegex = /\s/;
748
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
667
+ var parseClassList = (value) => {
668
+ if (typeof value === "object" && "baseVal" in value) {
669
+ value = value.baseVal;
670
+ }
671
+ if (!value) {
672
+ return [];
673
+ }
674
+ return value.split(parseClassListRegex);
675
+ };
749
676
  var CAPTURE_EVENT_SUFFIX = "Capture";
750
677
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
751
678
 
@@ -869,7 +796,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
869
796
  };
870
797
  var putBackInOriginalLocation = (parentElm, recursive) => {
871
798
  plt.$flags$ |= 1 /* isTmpDisconnected */;
872
- const oldSlotChildNodes = Array.from(parentElm.childNodes);
799
+ const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
873
800
  if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
874
801
  let node = parentElm;
875
802
  while (node = node.nextSibling) {
@@ -1083,7 +1010,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1083
1010
  }
1084
1011
  };
1085
1012
  var updateFallbackSlotVisibility = (elm) => {
1086
- const childNodes = elm.childNodes;
1013
+ const childNodes = elm.__childNodes || elm.childNodes;
1087
1014
  for (const childNode of childNodes) {
1088
1015
  if (childNode.nodeType === 1 /* ElementNode */) {
1089
1016
  if (childNode["s-sr"]) {
@@ -1096,7 +1023,7 @@ var updateFallbackSlotVisibility = (elm) => {
1096
1023
  childNode.hidden = true;
1097
1024
  break;
1098
1025
  }
1099
- } else {
1026
+ } else if (slotName === siblingNode["s-sn"]) {
1100
1027
  if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
1101
1028
  childNode.hidden = true;
1102
1029
  break;
@@ -1114,9 +1041,10 @@ var markSlotContentForRelocation = (elm) => {
1114
1041
  let node;
1115
1042
  let hostContentNodes;
1116
1043
  let j;
1117
- for (const childNode of elm.childNodes) {
1044
+ const children = elm.__childNodes || elm.childNodes;
1045
+ for (const childNode of children) {
1118
1046
  if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
1119
- hostContentNodes = node.parentNode.childNodes;
1047
+ hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
1120
1048
  const slotName = childNode["s-sn"];
1121
1049
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
1122
1050
  node = hostContentNodes[j];
@@ -1203,9 +1131,9 @@ var updateElementScopeIds = (element, parent, iterateChildNodes = false) => {
1203
1131
  if (element && parent && element.nodeType === 1 /* ElementNode */) {
1204
1132
  const scopeIds = new Set(findScopeIds(parent).filter(Boolean));
1205
1133
  if (scopeIds.size) {
1206
- (_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] = [...scopeIds]);
1134
+ (_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] = Array.from(scopeIds));
1207
1135
  if (element["s-ol"] || iterateChildNodes) {
1208
- for (const childNode of Array.from(element.childNodes)) {
1136
+ for (const childNode of Array.from(element.__childNodes || element.childNodes)) {
1209
1137
  updateElementScopeIds(childNode, element, true);
1210
1138
  }
1211
1139
  }
@@ -1316,6 +1244,519 @@ var slotReferenceDebugNode = (slotVNode) => doc$1.createComment(
1316
1244
  var originalLocationDebugNode = (nodeToRelocate) => doc$1.createComment(
1317
1245
  `org-location for ` + (nodeToRelocate.localName ? `<${nodeToRelocate.localName}> (host=${nodeToRelocate["s-hn"]})` : `[${nodeToRelocate.textContent}]`)
1318
1246
  );
1247
+ var addSlotRelocateNode = (newChild, slotNode, prepend, position) => {
1248
+ let slottedNodeLocation;
1249
+ if (newChild["s-ol"] && newChild["s-ol"].isConnected) {
1250
+ slottedNodeLocation = newChild["s-ol"];
1251
+ } else {
1252
+ slottedNodeLocation = document.createTextNode("");
1253
+ slottedNodeLocation["s-nr"] = newChild;
1254
+ }
1255
+ if (!slotNode["s-cr"] || !slotNode["s-cr"].parentNode) return;
1256
+ const parent = slotNode["s-cr"].parentNode;
1257
+ const appendMethod = prepend ? parent.__prepend || parent.prepend : parent.__appendChild || parent.appendChild;
1258
+ if (typeof position !== "undefined") {
1259
+ {
1260
+ slottedNodeLocation["s-oo"] = position;
1261
+ const childNodes = parent.__childNodes || parent.childNodes;
1262
+ const slotRelocateNodes = [slottedNodeLocation];
1263
+ childNodes.forEach((n) => {
1264
+ if (n["s-nr"]) slotRelocateNodes.push(n);
1265
+ });
1266
+ slotRelocateNodes.sort((a, b) => {
1267
+ if (!a["s-oo"] || a["s-oo"] < b["s-oo"]) return -1;
1268
+ else if (!b["s-oo"] || b["s-oo"] < a["s-oo"]) return 1;
1269
+ return 0;
1270
+ });
1271
+ slotRelocateNodes.forEach((n) => appendMethod.call(parent, n));
1272
+ }
1273
+ } else {
1274
+ appendMethod.call(parent, slottedNodeLocation);
1275
+ }
1276
+ newChild["s-ol"] = slottedNodeLocation;
1277
+ newChild["s-sh"] = slotNode["s-hn"];
1278
+ };
1279
+ var createTime = (fnName, tagName = "") => {
1280
+ {
1281
+ return () => {
1282
+ return;
1283
+ };
1284
+ }
1285
+ };
1286
+ var uniqueTime = (key, measureText) => {
1287
+ {
1288
+ return () => {
1289
+ return;
1290
+ };
1291
+ }
1292
+ };
1293
+
1294
+ // src/runtime/client-hydrate.ts
1295
+ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
1296
+ const endHydrate = createTime("hydrateClient", tagName);
1297
+ const shadowRoot = hostElm.shadowRoot;
1298
+ const childRenderNodes = [];
1299
+ const slotNodes = [];
1300
+ const slottedNodes = [];
1301
+ const shadowRootNodes = shadowRoot ? [] : null;
1302
+ const vnode = newVNode(tagName, null);
1303
+ vnode.$elm$ = hostElm;
1304
+ if (!plt.$orgLocNodes$) {
1305
+ initializeDocumentHydrate(doc$1.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
1306
+ }
1307
+ hostElm[HYDRATE_ID] = hostId;
1308
+ hostElm.removeAttribute(HYDRATE_ID);
1309
+ hostRef.$vnode$ = clientHydrate(
1310
+ vnode,
1311
+ childRenderNodes,
1312
+ slotNodes,
1313
+ shadowRootNodes,
1314
+ hostElm,
1315
+ hostElm,
1316
+ hostId,
1317
+ slottedNodes
1318
+ );
1319
+ let crIndex = 0;
1320
+ const crLength = childRenderNodes.length;
1321
+ let childRenderNode;
1322
+ for (crIndex; crIndex < crLength; crIndex++) {
1323
+ childRenderNode = childRenderNodes[crIndex];
1324
+ const orgLocationId = childRenderNode.$hostId$ + "." + childRenderNode.$nodeId$;
1325
+ const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
1326
+ const node = childRenderNode.$elm$;
1327
+ if (!shadowRoot) {
1328
+ node["s-hn"] = tagName.toUpperCase();
1329
+ if (childRenderNode.$tag$ === "slot") {
1330
+ node["s-cr"] = hostElm["s-cr"];
1331
+ }
1332
+ }
1333
+ if (orgLocationNode && orgLocationNode.isConnected) {
1334
+ if (shadowRoot && orgLocationNode["s-en"] === "") {
1335
+ orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
1336
+ }
1337
+ orgLocationNode.parentNode.removeChild(orgLocationNode);
1338
+ if (!shadowRoot) {
1339
+ node["s-oo"] = parseInt(childRenderNode.$nodeId$);
1340
+ }
1341
+ }
1342
+ plt.$orgLocNodes$.delete(orgLocationId);
1343
+ }
1344
+ const hosts = [];
1345
+ let snIndex = 0;
1346
+ const snLen = slottedNodes.length;
1347
+ let slotGroup;
1348
+ let snGroupIdx;
1349
+ let snGroupLen;
1350
+ let slottedItem;
1351
+ for (snIndex; snIndex < snLen; snIndex++) {
1352
+ slotGroup = slottedNodes[snIndex];
1353
+ if (!slotGroup || !slotGroup.length) continue;
1354
+ snGroupLen = slotGroup.length;
1355
+ snGroupIdx = 0;
1356
+ for (snGroupIdx; snGroupIdx < snGroupLen; snGroupIdx++) {
1357
+ slottedItem = slotGroup[snGroupIdx];
1358
+ if (!hosts[slottedItem.hostId]) {
1359
+ hosts[slottedItem.hostId] = plt.$orgLocNodes$.get(slottedItem.hostId);
1360
+ }
1361
+ if (!hosts[slottedItem.hostId]) continue;
1362
+ const hostEle = hosts[slottedItem.hostId];
1363
+ if (!hostEle.shadowRoot || !shadowRoot) {
1364
+ slottedItem.slot["s-cr"] = hostEle["s-cr"];
1365
+ if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
1366
+ slottedItem.slot["s-cr"] = hostEle;
1367
+ } else {
1368
+ const hostChildren = hostEle.__childNodes || hostEle.childNodes;
1369
+ slottedItem.slot["s-cr"] = hostChildren[0];
1370
+ }
1371
+ addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
1372
+ }
1373
+ if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
1374
+ hostEle.appendChild(slottedItem.node);
1375
+ }
1376
+ }
1377
+ }
1378
+ if (shadowRoot) {
1379
+ let rnIdex = 0;
1380
+ const rnLen = shadowRootNodes.length;
1381
+ for (rnIdex; rnIdex < rnLen; rnIdex++) {
1382
+ shadowRoot.appendChild(shadowRootNodes[rnIdex]);
1383
+ }
1384
+ Array.from(hostElm.childNodes).forEach((node) => {
1385
+ if (node.nodeType === 8 /* CommentNode */ && typeof node["s-sn"] !== "string") {
1386
+ node.parentNode.removeChild(node);
1387
+ }
1388
+ });
1389
+ }
1390
+ hostRef.$hostElement$ = hostElm;
1391
+ endHydrate();
1392
+ };
1393
+ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId, slottedNodes = []) => {
1394
+ let childNodeType;
1395
+ let childIdSplt;
1396
+ let childVNode;
1397
+ let i2;
1398
+ const scopeId2 = hostElm["s-sc"];
1399
+ if (node.nodeType === 1 /* ElementNode */) {
1400
+ childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
1401
+ if (childNodeType) {
1402
+ childIdSplt = childNodeType.split(".");
1403
+ if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
1404
+ childVNode = createSimpleVNode({
1405
+ $flags$: 0,
1406
+ $hostId$: childIdSplt[0],
1407
+ $nodeId$: childIdSplt[1],
1408
+ $depth$: childIdSplt[2],
1409
+ $index$: childIdSplt[3],
1410
+ $tag$: node.tagName.toLowerCase(),
1411
+ $elm$: node,
1412
+ // If we don't add the initial classes to the VNode, the first `vdom-render.ts` reconciliation will fail:
1413
+ // client side changes before componentDidLoad will be ignored, `set-accessor.ts` will just take the element's initial classes
1414
+ $attrs$: { class: node.className }
1415
+ });
1416
+ childRenderNodes.push(childVNode);
1417
+ node.removeAttribute(HYDRATE_CHILD_ID);
1418
+ if (!parentVNode.$children$) {
1419
+ parentVNode.$children$ = [];
1420
+ }
1421
+ const slotName = childVNode.$elm$.getAttribute("s-sn");
1422
+ if (typeof slotName === "string") {
1423
+ if (childVNode.$tag$ === "slot-fb") {
1424
+ addSlot(
1425
+ slotName,
1426
+ childIdSplt[2],
1427
+ childVNode,
1428
+ node,
1429
+ parentVNode,
1430
+ childRenderNodes,
1431
+ slotNodes,
1432
+ shadowRootNodes,
1433
+ slottedNodes
1434
+ );
1435
+ }
1436
+ childVNode.$elm$["s-sn"] = slotName;
1437
+ childVNode.$elm$.removeAttribute("s-sn");
1438
+ }
1439
+ if (childVNode.$index$ !== void 0) {
1440
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1441
+ }
1442
+ if (scopeId2) node["s-si"] = scopeId2;
1443
+ parentVNode = childVNode;
1444
+ if (shadowRootNodes && childVNode.$depth$ === "0") {
1445
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1446
+ }
1447
+ }
1448
+ }
1449
+ if (node.shadowRoot) {
1450
+ for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
1451
+ clientHydrate(
1452
+ parentVNode,
1453
+ childRenderNodes,
1454
+ slotNodes,
1455
+ shadowRootNodes,
1456
+ hostElm,
1457
+ node.shadowRoot.childNodes[i2],
1458
+ hostId,
1459
+ slottedNodes
1460
+ );
1461
+ }
1462
+ }
1463
+ const nonShadowNodes = node.__childNodes || node.childNodes;
1464
+ for (i2 = nonShadowNodes.length - 1; i2 >= 0; i2--) {
1465
+ clientHydrate(
1466
+ parentVNode,
1467
+ childRenderNodes,
1468
+ slotNodes,
1469
+ shadowRootNodes,
1470
+ hostElm,
1471
+ nonShadowNodes[i2],
1472
+ hostId,
1473
+ slottedNodes
1474
+ );
1475
+ }
1476
+ } else if (node.nodeType === 8 /* CommentNode */) {
1477
+ childIdSplt = node.nodeValue.split(".");
1478
+ if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
1479
+ childNodeType = childIdSplt[0];
1480
+ childVNode = createSimpleVNode({
1481
+ $hostId$: childIdSplt[1],
1482
+ $nodeId$: childIdSplt[2],
1483
+ $depth$: childIdSplt[3],
1484
+ $index$: childIdSplt[4] || "0",
1485
+ $elm$: node,
1486
+ $attrs$: null,
1487
+ $children$: null,
1488
+ $key$: null,
1489
+ $name$: null,
1490
+ $tag$: null,
1491
+ $text$: null
1492
+ });
1493
+ if (childNodeType === TEXT_NODE_ID) {
1494
+ childVNode.$elm$ = node.nextSibling;
1495
+ if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
1496
+ childVNode.$text$ = childVNode.$elm$.textContent;
1497
+ childRenderNodes.push(childVNode);
1498
+ node.remove();
1499
+ if (hostId === childVNode.$hostId$) {
1500
+ if (!parentVNode.$children$) {
1501
+ parentVNode.$children$ = [];
1502
+ }
1503
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1504
+ }
1505
+ if (shadowRootNodes && childVNode.$depth$ === "0") {
1506
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1507
+ }
1508
+ }
1509
+ } else if (childNodeType === COMMENT_NODE_ID) {
1510
+ childVNode.$elm$ = node.nextSibling;
1511
+ if (childVNode.$elm$ && childVNode.$elm$.nodeType === 8 /* CommentNode */) {
1512
+ childRenderNodes.push(childVNode);
1513
+ node.remove();
1514
+ }
1515
+ } else if (childVNode.$hostId$ === hostId) {
1516
+ if (childNodeType === SLOT_NODE_ID) {
1517
+ childVNode.$tag$ = "slot";
1518
+ const slotName = node["s-sn"] = childVNode.$name$ = childIdSplt[5] || "";
1519
+ addSlot(
1520
+ slotName,
1521
+ childIdSplt[2],
1522
+ childVNode,
1523
+ node,
1524
+ parentVNode,
1525
+ childRenderNodes,
1526
+ slotNodes,
1527
+ shadowRootNodes,
1528
+ slottedNodes
1529
+ );
1530
+ } else if (childNodeType === CONTENT_REF_ID) {
1531
+ if (shadowRootNodes) {
1532
+ node.remove();
1533
+ } else {
1534
+ hostElm["s-cr"] = node;
1535
+ node["s-cn"] = true;
1536
+ }
1537
+ }
1538
+ }
1539
+ }
1540
+ } else if (parentVNode && parentVNode.$tag$ === "style") {
1541
+ const vnode = newVNode(null, node.textContent);
1542
+ vnode.$elm$ = node;
1543
+ vnode.$index$ = "0";
1544
+ parentVNode.$children$ = [vnode];
1545
+ }
1546
+ return parentVNode;
1547
+ };
1548
+ var initializeDocumentHydrate = (node, orgLocNodes) => {
1549
+ if (node.nodeType === 1 /* ElementNode */) {
1550
+ const componentId = node[HYDRATE_ID] || node.getAttribute(HYDRATE_ID);
1551
+ if (componentId) {
1552
+ orgLocNodes.set(componentId, node);
1553
+ }
1554
+ let i2 = 0;
1555
+ if (node.shadowRoot) {
1556
+ for (; i2 < node.shadowRoot.childNodes.length; i2++) {
1557
+ initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
1558
+ }
1559
+ }
1560
+ const nonShadowNodes = node.__childNodes || node.childNodes;
1561
+ for (i2 = 0; i2 < nonShadowNodes.length; i2++) {
1562
+ initializeDocumentHydrate(nonShadowNodes[i2], orgLocNodes);
1563
+ }
1564
+ } else if (node.nodeType === 8 /* CommentNode */) {
1565
+ const childIdSplt = node.nodeValue.split(".");
1566
+ if (childIdSplt[0] === ORG_LOCATION_ID) {
1567
+ orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
1568
+ node.nodeValue = "";
1569
+ node["s-en"] = childIdSplt[3];
1570
+ }
1571
+ }
1572
+ };
1573
+ var createSimpleVNode = (vnode) => {
1574
+ const defaultVNode = {
1575
+ $flags$: 0,
1576
+ $hostId$: null,
1577
+ $nodeId$: null,
1578
+ $depth$: null,
1579
+ $index$: "0",
1580
+ $elm$: null,
1581
+ $attrs$: null,
1582
+ $children$: null,
1583
+ $key$: null,
1584
+ $name$: null,
1585
+ $tag$: null,
1586
+ $text$: null
1587
+ };
1588
+ return { ...defaultVNode, ...vnode };
1589
+ };
1590
+ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNodes, slotNodes, shadowRootNodes, slottedNodes) {
1591
+ node["s-sr"] = true;
1592
+ const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
1593
+ if (shadowRootNodes) {
1594
+ const slot = childVNode.$elm$ = doc$1.createElement(childVNode.$tag$);
1595
+ if (childVNode.$name$) {
1596
+ childVNode.$elm$.setAttribute("name", slotName);
1597
+ }
1598
+ if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
1599
+ parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1600
+ } else {
1601
+ node.parentNode.insertBefore(childVNode.$elm$, node);
1602
+ }
1603
+ addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
1604
+ node.remove();
1605
+ if (childVNode.$depth$ === "0") {
1606
+ shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
1607
+ }
1608
+ } else {
1609
+ const slot = childVNode.$elm$;
1610
+ const shouldMove = parentNodeId && parentNodeId !== childVNode.$hostId$ && parentVNode.$elm$.shadowRoot;
1611
+ addSlottedNodes(slottedNodes, slotId, slotName, node, shouldMove ? parentNodeId : childVNode.$hostId$);
1612
+ if (shouldMove) {
1613
+ parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1614
+ }
1615
+ childRenderNodes.push(childVNode);
1616
+ }
1617
+ slotNodes.push(childVNode);
1618
+ if (!parentVNode.$children$) {
1619
+ parentVNode.$children$ = [];
1620
+ }
1621
+ parentVNode.$children$[childVNode.$index$] = childVNode;
1622
+ }
1623
+ var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
1624
+ let slottedNode = slotNode.nextSibling;
1625
+ slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
1626
+ 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 */))) {
1627
+ slottedNode["s-sn"] = slotName;
1628
+ slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
1629
+ slottedNode = slottedNode.nextSibling;
1630
+ }
1631
+ };
1632
+
1633
+ // src/runtime/mode.ts
1634
+ var computeMode = (elm) => modeResolutionChain.map((h2) => h2(elm)).find((m) => !!m);
1635
+ var setMode = (handler) => modeResolutionChain.push(handler);
1636
+ var getMode = (ref) => getHostRef(ref).$modeName$;
1637
+ var parsePropertyValue = (propValue, propType) => {
1638
+ if (propValue != null && !isComplexType(propValue)) {
1639
+ if (propType & 4 /* Boolean */) {
1640
+ return propValue === "false" ? false : propValue === "" || !!propValue;
1641
+ }
1642
+ if (propType & 2 /* Number */) {
1643
+ return parseFloat(propValue);
1644
+ }
1645
+ if (propType & 1 /* String */) {
1646
+ return String(propValue);
1647
+ }
1648
+ return propValue;
1649
+ }
1650
+ return propValue;
1651
+ };
1652
+ var getElement = (ref) => getHostRef(ref).$hostElement$ ;
1653
+
1654
+ // src/runtime/event-emitter.ts
1655
+ var createEvent = (ref, name, flags) => {
1656
+ const elm = getElement(ref);
1657
+ return {
1658
+ emit: (detail) => {
1659
+ return emitEvent(elm, name, {
1660
+ bubbles: !!(flags & 4 /* Bubbles */),
1661
+ composed: !!(flags & 2 /* Composed */),
1662
+ cancelable: !!(flags & 1 /* Cancellable */),
1663
+ detail
1664
+ });
1665
+ }
1666
+ };
1667
+ };
1668
+ var emitEvent = (elm, name, opts) => {
1669
+ const ev = plt.ce(name, opts);
1670
+ elm.dispatchEvent(ev);
1671
+ return ev;
1672
+ };
1673
+ var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
1674
+ var registerStyle = (scopeId2, cssText, allowCS) => {
1675
+ let style = styles.get(scopeId2);
1676
+ {
1677
+ style = cssText;
1678
+ }
1679
+ styles.set(scopeId2, style);
1680
+ };
1681
+ var addStyle = (styleContainerNode, cmpMeta, mode) => {
1682
+ var _a;
1683
+ const scopeId2 = getScopeId(cmpMeta, mode);
1684
+ const style = styles.get(scopeId2);
1685
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc$1;
1686
+ if (style) {
1687
+ if (typeof style === "string") {
1688
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
1689
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
1690
+ let styleElm;
1691
+ if (!appliedStyles) {
1692
+ rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
1693
+ }
1694
+ if (!appliedStyles.has(scopeId2)) {
1695
+ if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
1696
+ styleElm.innerHTML = style;
1697
+ } else {
1698
+ styleElm = doc$1.createElement("style");
1699
+ styleElm.innerHTML = style;
1700
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc$1);
1701
+ if (nonce != null) {
1702
+ styleElm.setAttribute("nonce", nonce);
1703
+ }
1704
+ if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
1705
+ styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
1706
+ }
1707
+ if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
1708
+ if (styleContainerNode.nodeName === "HEAD") {
1709
+ const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
1710
+ const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
1711
+ styleContainerNode.insertBefore(styleElm, referenceNode2);
1712
+ } else if ("host" in styleContainerNode) {
1713
+ {
1714
+ const existingStyleContainer = styleContainerNode.querySelector("style");
1715
+ if (existingStyleContainer) {
1716
+ existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
1717
+ } else {
1718
+ styleContainerNode.prepend(styleElm);
1719
+ }
1720
+ }
1721
+ } else {
1722
+ styleContainerNode.append(styleElm);
1723
+ }
1724
+ }
1725
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
1726
+ styleContainerNode.insertBefore(styleElm, null);
1727
+ }
1728
+ }
1729
+ if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
1730
+ styleElm.innerHTML += SLOT_FB_CSS;
1731
+ }
1732
+ if (appliedStyles) {
1733
+ appliedStyles.add(scopeId2);
1734
+ }
1735
+ }
1736
+ }
1737
+ }
1738
+ return scopeId2;
1739
+ };
1740
+ var attachStyles = (hostRef) => {
1741
+ const cmpMeta = hostRef.$cmpMeta$;
1742
+ const elm = hostRef.$hostElement$;
1743
+ const flags = cmpMeta.$flags$;
1744
+ const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
1745
+ const scopeId2 = addStyle(
1746
+ elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
1747
+ cmpMeta,
1748
+ hostRef.$modeName$
1749
+ );
1750
+ if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
1751
+ elm["s-sc"] = scopeId2;
1752
+ elm.classList.add(scopeId2 + "-h");
1753
+ if (flags & 2 /* scopedCssEncapsulation */) {
1754
+ elm.classList.add(scopeId2 + "-s");
1755
+ }
1756
+ }
1757
+ endAttachStyles();
1758
+ };
1759
+ var getScopeId = (cmp, mode) => "sc-" + (mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
1319
1760
 
1320
1761
  // src/runtime/update-component.ts
1321
1762
  var attachToAncestor = (hostRef, ancestorComponent) => {
@@ -1562,16 +2003,62 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1562
2003
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1563
2004
  members.map(([memberName, [memberFlags]]) => {
1564
2005
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
1565
- Object.defineProperty(prototype, memberName, {
1566
- get() {
1567
- return getValue(this, memberName);
1568
- },
1569
- set(newValue) {
1570
- setValue(this, memberName, newValue, cmpMeta);
1571
- },
1572
- configurable: true,
1573
- enumerable: true
1574
- });
2006
+ if ((memberFlags & 2048 /* Getter */) === 0) {
2007
+ Object.defineProperty(prototype, memberName, {
2008
+ get() {
2009
+ return getValue(this, memberName);
2010
+ },
2011
+ set(newValue) {
2012
+ setValue(this, memberName, newValue, cmpMeta);
2013
+ },
2014
+ configurable: true,
2015
+ enumerable: true
2016
+ });
2017
+ } else if (flags & 1 /* isElementConstructor */ && memberFlags & 2048 /* Getter */) {
2018
+ {
2019
+ Object.defineProperty(prototype, memberName, {
2020
+ get() {
2021
+ const ref = getHostRef(this);
2022
+ const instance = ref ? ref.$lazyInstance$ : prototype;
2023
+ if (!instance) return;
2024
+ return instance[memberName];
2025
+ },
2026
+ configurable: true,
2027
+ enumerable: true
2028
+ });
2029
+ }
2030
+ if (memberFlags & 4096 /* Setter */) {
2031
+ const origSetter = Object.getOwnPropertyDescriptor(prototype, memberName).set;
2032
+ Object.defineProperty(prototype, memberName, {
2033
+ set(newValue) {
2034
+ const ref = getHostRef(this);
2035
+ if (origSetter) {
2036
+ const currentValue = ref.$hostElement$[memberName];
2037
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
2038
+ ref.$instanceValues$.set(memberName, currentValue);
2039
+ }
2040
+ origSetter.apply(this, [parsePropertyValue(newValue, cmpMeta.$members$[memberName][0])]);
2041
+ setValue(this, memberName, ref.$hostElement$[memberName], cmpMeta);
2042
+ return;
2043
+ }
2044
+ if (!ref) return;
2045
+ const setterSetVal = () => {
2046
+ const currentValue = ref.$lazyInstance$[memberName];
2047
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
2048
+ ref.$instanceValues$.set(memberName, currentValue);
2049
+ }
2050
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, cmpMeta.$members$[memberName][0]);
2051
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
2052
+ };
2053
+ if (ref.$lazyInstance$) {
2054
+ setterSetVal();
2055
+ } else {
2056
+ ref.$onReadyPromise$.then(() => setterSetVal());
2057
+ }
2058
+ }
2059
+ });
2060
+ }
2061
+ }
1575
2062
  } else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
1576
2063
  Object.defineProperty(prototype, memberName, {
1577
2064
  value(...args) {
@@ -1611,7 +2098,10 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1611
2098
  }
1612
2099
  return;
1613
2100
  }
1614
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2101
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
2102
+ if (!propDesc.get || !!propDesc.set) {
2103
+ this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2104
+ }
1615
2105
  });
1616
2106
  };
1617
2107
  Cstr.observedAttributes = Array.from(
@@ -1730,6 +2220,9 @@ var connectedCallback = (elm) => {
1730
2220
  if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1731
2221
  const scopeId2 = addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute("s-mode")) ;
1732
2222
  elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
2223
+ } else if (cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
2224
+ const scopeId2 = getScopeId(cmpMeta, elm.getAttribute("s-mode") );
2225
+ elm["s-sc"] = scopeId2;
1733
2226
  }
1734
2227
  initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
1735
2228
  }
@@ -1805,11 +2298,8 @@ var hostListenerOpts = (flags) => (flags & 2 /* Capture */) !== 0;
1805
2298
  // src/runtime/vdom/vdom-annotations.ts
1806
2299
  var insertVdomAnnotations = (doc2, staticComponents) => {
1807
2300
  if (doc2 != null) {
1808
- const docData = {
1809
- hostIds: 0,
1810
- rootLevelIds: 0,
1811
- staticComponents: new Set(staticComponents)
1812
- };
2301
+ const docData = STENCIL_DOC_DATA in doc2 ? doc2[STENCIL_DOC_DATA] : { ...DEFAULT_DOC_DATA };
2302
+ docData.staticComponents = new Set(staticComponents);
1813
2303
  const orgLocationNodes = [];
1814
2304
  parseVNodeAnnotations(doc2, doc2.body, docData, orgLocationNodes);
1815
2305
  orgLocationNodes.forEach((orgLocationNode) => {
@@ -1826,6 +2316,9 @@ var insertVdomAnnotations = (doc2, staticComponents) => {
1826
2316
  childId = `${hostId}.${nodeId}`;
1827
2317
  if (nodeRef.nodeType === 1 /* ElementNode */) {
1828
2318
  nodeRef.setAttribute(HYDRATE_CHILD_ID, childId);
2319
+ if (typeof nodeRef["s-sn"] === "string" && !nodeRef.getAttribute("slot")) {
2320
+ nodeRef.setAttribute("s-sn", nodeRef["s-sn"]);
2321
+ }
1829
2322
  } else if (nodeRef.nodeType === 3 /* TextNode */) {
1830
2323
  if (hostId === 0) {
1831
2324
  const textContent = (_a = nodeRef.nodeValue) == null ? void 0 : _a.trim();
@@ -1837,6 +2330,10 @@ var insertVdomAnnotations = (doc2, staticComponents) => {
1837
2330
  const commentBeforeTextNode = doc2.createComment(childId);
1838
2331
  commentBeforeTextNode.nodeValue = `${TEXT_NODE_ID}.${childId}`;
1839
2332
  insertBefore(nodeRef.parentNode, commentBeforeTextNode, nodeRef);
2333
+ } else if (nodeRef.nodeType === 8 /* CommentNode */) {
2334
+ const commentBeforeTextNode = doc2.createComment(childId);
2335
+ commentBeforeTextNode.nodeValue = `${COMMENT_NODE_ID}.${childId}`;
2336
+ nodeRef.parentNode.insertBefore(commentBeforeTextNode, nodeRef);
1840
2337
  }
1841
2338
  }
1842
2339
  let orgLocationNodeId = `${ORG_LOCATION_ID}.${childId}`;
@@ -1917,6 +2414,9 @@ var insertChildVNodeAnnotations = (doc2, vnodeChild, cmpData, hostId, depth, ind
1917
2414
  childElm["s-node-id"] = nodeId;
1918
2415
  if (childElm.nodeType === 1 /* ElementNode */) {
1919
2416
  childElm.setAttribute(HYDRATE_CHILD_ID, childId);
2417
+ if (typeof childElm["s-sn"] === "string" && !childElm.getAttribute("slot")) {
2418
+ childElm.setAttribute("s-sn", childElm["s-sn"]);
2419
+ }
1920
2420
  } else if (childElm.nodeType === 3 /* TextNode */) {
1921
2421
  const parentNode = childElm.parentNode;
1922
2422
  const nodeName = parentNode == null ? void 0 : parentNode.nodeName;
@@ -2118,6 +2618,7 @@ function hydrateApp(win2, opts, results, afterHydrate, resolve) {
2118
2618
  };
2119
2619
  tmrId = globalThis.setTimeout(timeoutExceeded, opts.timeout);
2120
2620
  plt.$resourcesUrl$ = new URL(opts.resourcesUrl || "./", doc$1.baseURI).href;
2621
+ globalScripts();
2121
2622
  patchChild2(win2.document.body);
2122
2623
  waitLoop2().then(hydratedComplete).catch(hydratedError);
2123
2624
  } catch (e) {
@@ -2341,7 +2842,9 @@ var plt = {
2341
2842
  rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
2342
2843
  ce: (eventName, opts) => new win$2.CustomEvent(eventName, opts)
2343
2844
  };
2344
- var supportsShadow = BUILD.shadowDom;
2845
+ var setPlatformHelpers = (helpers) => {
2846
+ Object.assign(plt, helpers);
2847
+ };
2345
2848
  var hostRefs = /* @__PURE__ */ new WeakMap();
2346
2849
  var getHostRef = (ref) => hostRefs.get(ref);
2347
2850
  var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
@@ -2366,7 +2869,7 @@ var Build = {
2366
2869
  isTesting: false
2367
2870
  };
2368
2871
  var styles = /* @__PURE__ */ new Map();
2369
- var modeResolutionChain = [];
2872
+
2370
2873
 
2371
2874
  const transitionEndAsync = (el, expectedDuration = 0) => {
2372
2875
  return new Promise((resolve) => {
@@ -2738,132 +3241,6 @@ const reorderTwoSharp = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2
2738
3241
  const searchOutline = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path d='M221.09 64a157.09 157.09 0 10157.09 157.09A157.1 157.1 0 00221.09 64z' stroke-miterlimit='10' class='ionicon-fill-none ionicon-stroke-width'/><path stroke-linecap='round' stroke-miterlimit='10' d='M338.29 338.29L448 448' class='ionicon-fill-none ionicon-stroke-width'/></svg>";
2739
3242
  const searchSharp = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path d='M464 428L339.92 303.9a160.48 160.48 0 0030.72-94.58C370.64 120.37 298.27 48 209.32 48S48 120.37 48 209.32s72.37 161.32 161.32 161.32a160.48 160.48 0 0094.58-30.72L428 464zM209.32 319.69a110.38 110.38 0 11110.37-110.37 110.5 110.5 0 01-110.37 110.37z'/></svg>";
2740
3243
 
2741
- // TODO(FW-2832): types
2742
- class Config {
2743
- constructor() {
2744
- this.m = new Map();
2745
- }
2746
- reset(configObj) {
2747
- this.m = new Map(Object.entries(configObj));
2748
- }
2749
- get(key, fallback) {
2750
- const value = this.m.get(key);
2751
- return value !== undefined ? value : fallback;
2752
- }
2753
- getBoolean(key, fallback = false) {
2754
- const val = this.m.get(key);
2755
- if (val === undefined) {
2756
- return fallback;
2757
- }
2758
- if (typeof val === 'string') {
2759
- return val === 'true';
2760
- }
2761
- return !!val;
2762
- }
2763
- getNumber(key, fallback) {
2764
- const val = parseFloat(this.m.get(key));
2765
- return isNaN(val) ? (fallback !== undefined ? fallback : NaN) : val;
2766
- }
2767
- set(key, value) {
2768
- this.m.set(key, value);
2769
- }
2770
- }
2771
- const config = /*@__PURE__*/ new Config();
2772
-
2773
- const getPlatforms = (win) => setupPlatforms(win);
2774
- const isPlatform = (winOrPlatform, platform) => {
2775
- if (typeof winOrPlatform === 'string') {
2776
- platform = winOrPlatform;
2777
- winOrPlatform = undefined;
2778
- }
2779
- return getPlatforms(winOrPlatform).includes(platform);
2780
- };
2781
- const setupPlatforms = (win = window) => {
2782
- if (typeof win === 'undefined') {
2783
- return [];
2784
- }
2785
- win.Ionic = win.Ionic || {};
2786
- let platforms = win.Ionic.platforms;
2787
- if (platforms == null) {
2788
- platforms = win.Ionic.platforms = detectPlatforms(win);
2789
- platforms.forEach((p) => win.document.documentElement.classList.add(`plt-${p}`));
2790
- }
2791
- return platforms;
2792
- };
2793
- const detectPlatforms = (win) => {
2794
- const customPlatformMethods = config.get('platform');
2795
- return Object.keys(PLATFORMS_MAP).filter((p) => {
2796
- const customMethod = customPlatformMethods === null || customPlatformMethods === void 0 ? void 0 : customPlatformMethods[p];
2797
- return typeof customMethod === 'function' ? customMethod(win) : PLATFORMS_MAP[p](win);
2798
- });
2799
- };
2800
- const isMobileWeb = (win) => isMobile(win) && !isHybrid(win);
2801
- const isIpad = (win) => {
2802
- // iOS 12 and below
2803
- if (testUserAgent(win, /iPad/i)) {
2804
- return true;
2805
- }
2806
- // iOS 13+
2807
- if (testUserAgent(win, /Macintosh/i) && isMobile(win)) {
2808
- return true;
2809
- }
2810
- return false;
2811
- };
2812
- const isIphone = (win) => testUserAgent(win, /iPhone/i);
2813
- const isIOS = (win) => testUserAgent(win, /iPhone|iPod/i) || isIpad(win);
2814
- const isAndroid = (win) => testUserAgent(win, /android|sink/i);
2815
- const isAndroidTablet = (win) => {
2816
- return isAndroid(win) && !testUserAgent(win, /mobile/i);
2817
- };
2818
- const isPhablet = (win) => {
2819
- const width = win.innerWidth;
2820
- const height = win.innerHeight;
2821
- const smallest = Math.min(width, height);
2822
- const largest = Math.max(width, height);
2823
- return smallest > 390 && smallest < 520 && largest > 620 && largest < 800;
2824
- };
2825
- const isTablet = (win) => {
2826
- const width = win.innerWidth;
2827
- const height = win.innerHeight;
2828
- const smallest = Math.min(width, height);
2829
- const largest = Math.max(width, height);
2830
- return isIpad(win) || isAndroidTablet(win) || (smallest > 460 && smallest < 820 && largest > 780 && largest < 1400);
2831
- };
2832
- const isMobile = (win) => matchMedia$1(win, '(any-pointer:coarse)');
2833
- const isDesktop = (win) => !isMobile(win);
2834
- const isHybrid = (win) => isCordova(win) || isCapacitorNative(win);
2835
- const isCordova = (win) => !!(win['cordova'] || win['phonegap'] || win['PhoneGap']);
2836
- const isCapacitorNative = (win) => {
2837
- const capacitor = win['Capacitor'];
2838
- return !!(capacitor === null || capacitor === void 0 ? void 0 : capacitor.isNative);
2839
- };
2840
- const isElectron = (win) => testUserAgent(win, /electron/i);
2841
- const isPWA = (win) => { var _a; return !!(((_a = win.matchMedia) === null || _a === void 0 ? void 0 : _a.call(win, '(display-mode: standalone)').matches) || win.navigator.standalone); };
2842
- const testUserAgent = (win, expr) => expr.test(win.navigator.userAgent);
2843
- const matchMedia$1 = (win, query) => { var _a; return (_a = win.matchMedia) === null || _a === void 0 ? void 0 : _a.call(win, query).matches; };
2844
- const PLATFORMS_MAP = {
2845
- ipad: isIpad,
2846
- iphone: isIphone,
2847
- ios: isIOS,
2848
- android: isAndroid,
2849
- phablet: isPhablet,
2850
- tablet: isTablet,
2851
- cordova: isCordova,
2852
- capacitor: isCapacitorNative,
2853
- electron: isElectron,
2854
- pwa: isPWA,
2855
- mobile: isMobile,
2856
- mobileweb: isMobileWeb,
2857
- desktop: isDesktop,
2858
- hybrid: isHybrid,
2859
- };
2860
-
2861
- // TODO(FW-2832): types
2862
- let defaultMode;
2863
- const getIonMode$1 = (ref) => {
2864
- return (ref && getMode(ref)) || defaultMode;
2865
- };
2866
-
2867
3244
  const accordionIosCss = ":host{display:block;position:relative;width:100%;background-color:var(--ion-background-color, #ffffff);overflow:hidden;z-index:0}:host(.accordion-expanding) ::slotted(ion-item[slot=header]),:host(.accordion-expanded) ::slotted(ion-item[slot=header]){--border-width:0px}:host(.accordion-animated){-webkit-transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:all 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}:host(.accordion-animated) #content{-webkit-transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1);transition:max-height 300ms cubic-bezier(0.25, 0.8, 0.5, 1)}#content{overflow:hidden;will-change:max-height}:host(.accordion-collapsing) #content{max-height:0 !important}:host(.accordion-collapsed) #content{display:none}:host(.accordion-expanding) #content{max-height:0}:host(.accordion-expanding) #content-wrapper{overflow:auto}:host(.accordion-disabled) #header,:host(.accordion-readonly) #header,:host(.accordion-disabled) #content,:host(.accordion-readonly) #content{pointer-events:none}:host(.accordion-disabled) #header,:host(.accordion-disabled) #content{opacity:0.4}@media (prefers-reduced-motion: reduce){:host,#content{-webkit-transition:none !important;transition:none !important}}:host(.accordion-next) ::slotted(ion-item[slot=header]){--border-width:0.55px 0px 0.55px 0px}";
2868
3245
  var IonAccordionIosStyle0 = accordionIosCss;
2869
3246
 
@@ -4282,9 +4659,9 @@ const now = (ev) => {
4282
4659
  };
4283
4660
 
4284
4661
  var index = /*#__PURE__*/Object.freeze({
4285
- __proto__: null,
4286
- createGesture: createGesture,
4287
- GESTURE_CONTROLLER: GESTURE_CONTROLLER
4662
+ __proto__: null,
4663
+ createGesture: createGesture,
4664
+ GESTURE_CONTROLLER: GESTURE_CONTROLLER
4288
4665
  });
4289
4666
 
4290
4667
  const createButtonActiveGesture = (el, isButton) => {
@@ -33677,9 +34054,9 @@ const iosTransitionAnimation = (navEl, opts) => {
33677
34054
  const LARGE_TITLE_SIZE_OFFSET = 10;
33678
34055
 
33679
34056
  var ios_transition = /*#__PURE__*/Object.freeze({
33680
- __proto__: null,
33681
- shadow: shadow,
33682
- iosTransitionAnimation: iosTransitionAnimation
34057
+ __proto__: null,
34058
+ shadow: shadow,
34059
+ iosTransitionAnimation: iosTransitionAnimation
33683
34060
  });
33684
34061
 
33685
34062
  const mdTransitionAnimation = (_, opts) => {
@@ -33730,8 +34107,8 @@ const mdTransitionAnimation = (_, opts) => {
33730
34107
  };
33731
34108
 
33732
34109
  var md_transition = /*#__PURE__*/Object.freeze({
33733
- __proto__: null,
33734
- mdTransitionAnimation: mdTransitionAnimation
34110
+ __proto__: null,
34111
+ mdTransitionAnimation: mdTransitionAnimation
33735
34112
  });
33736
34113
 
33737
34114
  const createSwipeBackGesture = (el, canStartHandler, onStartHandler, onMoveHandler, onEndHandler) => {
@@ -33805,8 +34182,8 @@ const createSwipeBackGesture = (el, canStartHandler, onStartHandler, onMoveHandl
33805
34182
  };
33806
34183
 
33807
34184
  var swipeBack = /*#__PURE__*/Object.freeze({
33808
- __proto__: null,
33809
- createSwipeBackGesture: createSwipeBackGesture
34185
+ __proto__: null,
34186
+ createSwipeBackGesture: createSwipeBackGesture
33810
34187
  });
33811
34188
 
33812
34189
  exports.hydrateApp = hydrateApp;
@@ -33819,8 +34196,105 @@ exports.hydrateApp = hydrateApp;
33819
34196
  hydrateAppClosure($stencilWindow);
33820
34197
  }
33821
34198
 
34199
+ // src/app-data/index.ts
34200
+ var BUILD = {
34201
+ allRenderFn: false,
34202
+ cmpDidLoad: true,
34203
+ cmpDidUnload: false,
34204
+ cmpDidUpdate: true,
34205
+ cmpDidRender: true,
34206
+ cmpWillLoad: true,
34207
+ cmpWillUpdate: true,
34208
+ cmpWillRender: true,
34209
+ connectedCallback: true,
34210
+ disconnectedCallback: true,
34211
+ element: true,
34212
+ event: true,
34213
+ hasRenderFn: true,
34214
+ lifecycle: true,
34215
+ hostListener: true,
34216
+ hostListenerTargetWindow: true,
34217
+ hostListenerTargetDocument: true,
34218
+ hostListenerTargetBody: true,
34219
+ hostListenerTargetParent: false,
34220
+ hostListenerTarget: true,
34221
+ member: true,
34222
+ method: true,
34223
+ mode: true,
34224
+ observeAttribute: true,
34225
+ prop: true,
34226
+ propMutable: true,
34227
+ reflect: true,
34228
+ scoped: true,
34229
+ shadowDom: true,
34230
+ slot: true,
34231
+ cssAnnotations: true,
34232
+ state: true,
34233
+ style: true,
34234
+ formAssociated: false,
34235
+ svg: true,
34236
+ updatable: true,
34237
+ vdomAttribute: true,
34238
+ vdomXlink: true,
34239
+ vdomClass: true,
34240
+ vdomFunctional: true,
34241
+ vdomKey: true,
34242
+ vdomListener: true,
34243
+ vdomRef: true,
34244
+ vdomPropOrAttr: true,
34245
+ vdomRender: true,
34246
+ vdomStyle: true,
34247
+ vdomText: true,
34248
+ watchCallback: true,
34249
+ taskQueue: true,
34250
+ hotModuleReplacement: false,
34251
+ isDebug: false,
34252
+ isDev: false,
34253
+ isTesting: false,
34254
+ hydrateServerSide: false,
34255
+ hydrateClientSide: false,
34256
+ lifecycleDOMEvents: false,
34257
+ lazyLoad: false,
34258
+ profile: false,
34259
+ slotRelocation: true,
34260
+ // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
34261
+ appendChildSlotFix: false,
34262
+ // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
34263
+ cloneNodeFix: false,
34264
+ hydratedAttribute: false,
34265
+ hydratedClass: true,
34266
+ // TODO(STENCIL-1305): remove this option
34267
+ scriptDataOpts: false,
34268
+ // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
34269
+ scopedSlotTextContentFix: false,
34270
+ // TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
34271
+ shadowDomShim: false,
34272
+ // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
34273
+ slotChildNodesFix: false,
34274
+ invisiblePrehydration: true,
34275
+ propBoolean: true,
34276
+ propNumber: true,
34277
+ propString: true,
34278
+ constructableCSS: true,
34279
+ cmpShouldUpdate: true,
34280
+ devTools: false,
34281
+ shadowDelegatesFocus: true,
34282
+ initializeNextTick: false,
34283
+ asyncLoading: true,
34284
+ asyncQueue: false,
34285
+ transformTagName: false,
34286
+ attachStyles: true,
34287
+ // TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
34288
+ experimentalSlotFixes: false
34289
+ };
34290
+ var Env = {};
34291
+ var NAMESPACE = (
34292
+ /* default */
34293
+ "app"
34294
+ );
34295
+
33822
34296
  /*
33823
- Stencil Hydrate Runner v4.20.0 | MIT Licensed | https://stenciljs.com
34297
+ Stencil Hydrate Runner v4.23.0-dev.1735628762.fb8335e | MIT Licensed | https://stenciljs.com
33824
34298
  */
33825
34299
  var __defProp = Object.defineProperty;
33826
34300
  var __export = (target, all) => {
@@ -33833,6 +34307,8 @@ var CONTENT_REF_ID = "r";
33833
34307
  var ORG_LOCATION_ID = "o";
33834
34308
  var SLOT_NODE_ID = "s";
33835
34309
  var TEXT_NODE_ID = "t";
34310
+ var HYDRATE_ID = "s-id";
34311
+ var STENCIL_DOC_DATA = "_stencilDocData";
33836
34312
  var XLINK_NS = "http://www.w3.org/1999/xlink";
33837
34313
 
33838
34314
  // src/mock-doc/attribute.ts
@@ -34141,8 +34617,8 @@ function jsCaseToCssCase(str) {
34141
34617
 
34142
34618
  // src/mock-doc/custom-element-registry.ts
34143
34619
  var MockCustomElementRegistry = class {
34144
- constructor(win) {
34145
- this.win = win;
34620
+ constructor(win2) {
34621
+ this.win = win2;
34146
34622
  }
34147
34623
  define(tagName, cstr, options) {
34148
34624
  if (tagName.toLowerCase() !== tagName) {
@@ -34164,19 +34640,19 @@ var MockCustomElementRegistry = class {
34164
34640
  this.__whenDefined.delete(tagName);
34165
34641
  }
34166
34642
  }
34167
- const doc = this.win.document;
34168
- if (doc != null) {
34169
- const hosts = doc.querySelectorAll(tagName);
34643
+ const doc2 = this.win.document;
34644
+ if (doc2 != null) {
34645
+ const hosts = doc2.querySelectorAll(tagName);
34170
34646
  hosts.forEach((host) => {
34171
34647
  if (upgradedElements.has(host) === false) {
34172
- tempDisableCallbacks.add(doc);
34173
- const upgradedCmp = createCustomElement(this, doc, tagName);
34648
+ tempDisableCallbacks.add(doc2);
34649
+ const upgradedCmp = createCustomElement(this, doc2, tagName);
34174
34650
  for (let i = 0; i < host.childNodes.length; i++) {
34175
34651
  const childNode = host.childNodes[i];
34176
34652
  childNode.remove();
34177
34653
  upgradedCmp.appendChild(childNode);
34178
34654
  }
34179
- tempDisableCallbacks.delete(doc);
34655
+ tempDisableCallbacks.delete(doc2);
34180
34656
  if (proxyElements.has(host)) {
34181
34657
  proxyElements.set(host, upgradedCmp);
34182
34658
  }
@@ -34230,8 +34706,8 @@ var MockCustomElementRegistry = class {
34230
34706
  });
34231
34707
  }
34232
34708
  };
34233
- function createCustomElement(customElements, ownerDocument, tagName) {
34234
- const Cstr = customElements.get(tagName);
34709
+ function createCustomElement(customElements2, ownerDocument, tagName) {
34710
+ const Cstr = customElements2.get(tagName);
34235
34711
  if (Cstr != null) {
34236
34712
  const cmp = new Cstr(ownerDocument);
34237
34713
  cmp.nodeName = tagName.toUpperCase();
@@ -34279,8 +34755,8 @@ function connectNode(ownerDocument, node) {
34279
34755
  node.ownerDocument = ownerDocument;
34280
34756
  if (node.nodeType === 1 /* ELEMENT_NODE */) {
34281
34757
  if (ownerDocument != null && node.nodeName.includes("-")) {
34282
- const win = ownerDocument.defaultView;
34283
- if (win != null && typeof node.connectedCallback === "function" && node.isConnected) {
34758
+ const win2 = ownerDocument.defaultView;
34759
+ if (win2 != null && typeof node.connectedCallback === "function" && node.isConnected) {
34284
34760
  fireConnectedCallback(node);
34285
34761
  }
34286
34762
  const shadowRoot = node.shadowRoot;
@@ -38688,7 +39164,7 @@ var OpenElementStack = class {
38688
39164
  get currentTmplContentOrNode() {
38689
39165
  return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current;
38690
39166
  }
38691
- constructor(document, treeAdapter, handler) {
39167
+ constructor(document2, treeAdapter, handler) {
38692
39168
  this.treeAdapter = treeAdapter;
38693
39169
  this.handler = handler;
38694
39170
  this.items = [];
@@ -38696,7 +39172,7 @@ var OpenElementStack = class {
38696
39172
  this.stackTop = -1;
38697
39173
  this.tmplCount = 0;
38698
39174
  this.currentTagId = TAG_ID.UNKNOWN;
38699
- this.current = document;
39175
+ this.current = document2;
38700
39176
  }
38701
39177
  //Index of element
38702
39178
  _indexOf(element) {
@@ -39113,8 +39589,8 @@ var defaultTreeAdapter = {
39113
39589
  getTemplateContent(templateElement) {
39114
39590
  return templateElement.content;
39115
39591
  },
39116
- setDocumentType(document, name, publicId, systemId) {
39117
- const doctypeNode = document.childNodes.find((node) => node.nodeName === "#documentType");
39592
+ setDocumentType(document2, name, publicId, systemId) {
39593
+ const doctypeNode = document2.childNodes.find((node) => node.nodeName === "#documentType");
39118
39594
  if (doctypeNode) {
39119
39595
  doctypeNode.name = name;
39120
39596
  doctypeNode.publicId = publicId;
@@ -39127,14 +39603,14 @@ var defaultTreeAdapter = {
39127
39603
  systemId,
39128
39604
  parentNode: null
39129
39605
  };
39130
- defaultTreeAdapter.appendChild(document, node);
39606
+ defaultTreeAdapter.appendChild(document2, node);
39131
39607
  }
39132
39608
  },
39133
- setDocumentMode(document, mode) {
39134
- document.mode = mode;
39609
+ setDocumentMode(document2, mode) {
39610
+ document2.mode = mode;
39135
39611
  },
39136
- getDocumentMode(document) {
39137
- return document.mode;
39612
+ getDocumentMode(document2) {
39613
+ return document2.mode;
39138
39614
  },
39139
39615
  detachNode(node) {
39140
39616
  if (node.parentNode) {
@@ -39615,7 +40091,7 @@ var defaultParserOptions = {
39615
40091
  onParseError: null
39616
40092
  };
39617
40093
  var Parser = class {
39618
- constructor(options, document, fragmentContext = null, scriptHandler = null) {
40094
+ constructor(options, document2, fragmentContext = null, scriptHandler = null) {
39619
40095
  this.fragmentContext = fragmentContext;
39620
40096
  this.scriptHandler = scriptHandler;
39621
40097
  this.currentToken = null;
@@ -39640,7 +40116,7 @@ var Parser = class {
39640
40116
  if (this.onParseError) {
39641
40117
  this.options.sourceCodeLocationInfo = true;
39642
40118
  }
39643
- this.document = document !== null && document !== void 0 ? document : this.treeAdapter.createDocument();
40119
+ this.document = document2 !== null && document2 !== void 0 ? document2 : this.treeAdapter.createDocument();
39644
40120
  this.tokenizer = new Tokenizer(this.options, this);
39645
40121
  this.activeFormattingElements = new FormattingElementList(this.treeAdapter);
39646
40122
  this.fragmentContextID = fragmentContext ? getTagID(this.treeAdapter.getTagName(fragmentContext)) : TAG_ID.UNKNOWN;
@@ -42617,11 +43093,11 @@ function parseFragment(fragmentContext, html, options) {
42617
43093
  // src/mock-doc/parse-util.ts
42618
43094
  var docParser = /* @__PURE__ */ new WeakMap();
42619
43095
  function parseDocumentUtil(ownerDocument, html) {
42620
- const doc = parse(html.trim(), getParser(ownerDocument));
42621
- doc.documentElement = doc.firstElementChild;
42622
- doc.head = doc.documentElement.firstElementChild;
42623
- doc.body = doc.head.nextElementSibling;
42624
- return doc;
43096
+ const doc2 = parse(html.trim(), getParser(ownerDocument));
43097
+ doc2.documentElement = doc2.firstElementChild;
43098
+ doc2.head = doc2.documentElement.firstElementChild;
43099
+ doc2.body = doc2.head.nextElementSibling;
43100
+ return doc2;
42625
43101
  }
42626
43102
  function parseFragmentUtil(ownerDocument, html) {
42627
43103
  if (typeof html === "string") {
@@ -42639,9 +43115,9 @@ function getParser(ownerDocument) {
42639
43115
  }
42640
43116
  const treeAdapter = {
42641
43117
  createDocument() {
42642
- const doc = ownerDocument.createElement("#document" /* DOCUMENT_NODE */);
42643
- doc["x-mode"] = "no-quirks";
42644
- return doc;
43118
+ const doc2 = ownerDocument.createElement("#document" /* DOCUMENT_NODE */);
43119
+ doc2["x-mode"] = "no-quirks";
43120
+ return doc2;
42645
43121
  },
42646
43122
  setNodeSourceCodeLocation(node, location2) {
42647
43123
  node.sourceCodeLocation = location2;
@@ -42679,22 +43155,22 @@ function getParser(ownerDocument) {
42679
43155
  getTemplateContent(templateElement) {
42680
43156
  return templateElement.content;
42681
43157
  },
42682
- setDocumentType(doc, name, publicId, systemId) {
42683
- let doctypeNode = doc.childNodes.find((n) => n.nodeType === 10 /* DOCUMENT_TYPE_NODE */);
43158
+ setDocumentType(doc2, name, publicId, systemId) {
43159
+ let doctypeNode = doc2.childNodes.find((n) => n.nodeType === 10 /* DOCUMENT_TYPE_NODE */);
42684
43160
  if (doctypeNode == null) {
42685
43161
  doctypeNode = ownerDocument.createDocumentTypeNode();
42686
- doc.insertBefore(doctypeNode, doc.firstChild);
43162
+ doc2.insertBefore(doctypeNode, doc2.firstChild);
42687
43163
  }
42688
43164
  doctypeNode.nodeValue = "!DOCTYPE";
42689
43165
  doctypeNode["x-name"] = name;
42690
43166
  doctypeNode["x-publicId"] = publicId;
42691
43167
  doctypeNode["x-systemId"] = systemId;
42692
43168
  },
42693
- setDocumentMode(doc, mode) {
42694
- doc["x-mode"] = mode;
43169
+ setDocumentMode(doc2, mode) {
43170
+ doc2["x-mode"] = mode;
42695
43171
  },
42696
- getDocumentMode(doc) {
42697
- return doc["x-mode"];
43172
+ getDocumentMode(doc2) {
43173
+ return doc2["x-mode"];
42698
43174
  },
42699
43175
  detachNode(node) {
42700
43176
  node.remove();
@@ -42826,9 +43302,9 @@ var jquery_default = (
42826
43302
  nodeName: "HTML"
42827
43303
  }
42828
43304
  }
42829
- }, function(window, noGlobal) {
43305
+ }, function(window2, noGlobal) {
42830
43306
  "use strict";
42831
- if (!window.document) {
43307
+ if (!window2.document) {
42832
43308
  throw new Error("jQuery requires a window with a document");
42833
43309
  }
42834
43310
  var arr = [];
@@ -42863,16 +43339,16 @@ var jquery_default = (
42863
43339
  }
42864
43340
  return type === "array" || length === 0 || typeof length === "number" && length > 0 && length - 1 in obj;
42865
43341
  }
42866
- var document = window.document;
43342
+ var document2 = window2.document;
42867
43343
  var preservedScriptAttributes = {
42868
43344
  type: true,
42869
43345
  src: true,
42870
43346
  nonce: true,
42871
43347
  noModule: true
42872
43348
  };
42873
- function DOMEval(code, node, doc) {
42874
- doc = doc || document;
42875
- var i2, script = doc.createElement("script");
43349
+ function DOMEval(code, node, doc2) {
43350
+ doc2 = doc2 || document2;
43351
+ var i2, script = doc2.createElement("script");
42876
43352
  script.text = code;
42877
43353
  if (node) {
42878
43354
  for (i2 in preservedScriptAttributes) {
@@ -42881,7 +43357,7 @@ var jquery_default = (
42881
43357
  }
42882
43358
  }
42883
43359
  }
42884
- doc.head.appendChild(script).parentNode.removeChild(script);
43360
+ doc2.head.appendChild(script).parentNode.removeChild(script);
42885
43361
  }
42886
43362
  const jQuery = {};
42887
43363
  var version = "4.0.0-pre+9352011a7.dirty +selector", rhtmlSuffix = /HTML$/i, jQueryOrig = function(selector, context) {
@@ -43018,8 +43494,8 @@ var jquery_default = (
43018
43494
  },
43019
43495
  // Evaluates a script in a provided context; falls back to the global one
43020
43496
  // if not specified.
43021
- globalEval: function(code, options, doc) {
43022
- DOMEval(code, { nonce: options && options.nonce }, doc);
43497
+ globalEval: function(code, options, doc2) {
43498
+ DOMEval(code, { nonce: options && options.nonce }, doc2);
43023
43499
  },
43024
43500
  each: function(obj, callback) {
43025
43501
  var length, i2 = 0;
@@ -43146,9 +43622,9 @@ var jquery_default = (
43146
43622
  }
43147
43623
  var pop = arr.pop;
43148
43624
  var whitespace = "[\\x20\\t\\r\\n\\f]";
43149
- var isIE = document.documentMode;
43625
+ var isIE = document2.documentMode;
43150
43626
  try {
43151
- document.querySelector(":has(*,:jqfake)");
43627
+ document2.querySelector(":has(*,:jqfake)");
43152
43628
  support.cssHas = false;
43153
43629
  } catch (e) {
43154
43630
  support.cssHas = true;
@@ -43180,7 +43656,7 @@ var jquery_default = (
43180
43656
  var rleadingCombinator = new RegExp("^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*");
43181
43657
  var rdescend = new RegExp(whitespace + "|>");
43182
43658
  var rsibling = /[+~]/;
43183
- var documentElement = document.documentElement;
43659
+ var documentElement = document2.documentElement;
43184
43660
  var matches2 = documentElement.matches || documentElement.msMatchesSelector;
43185
43661
  function createCache() {
43186
43662
  var keys = [];
@@ -43349,10 +43825,10 @@ var jquery_default = (
43349
43825
  1
43350
43826
  );
43351
43827
  if (compare & 1) {
43352
- if (a == document || a.ownerDocument == document && jQuery.contains(document, a)) {
43828
+ if (a == document2 || a.ownerDocument == document2 && jQuery.contains(document2, a)) {
43353
43829
  return -1;
43354
43830
  }
43355
- if (b == document || b.ownerDocument == document && jQuery.contains(document, b)) {
43831
+ if (b == document2 || b.ownerDocument == document2 && jQuery.contains(document2, b)) {
43356
43832
  return 1;
43357
43833
  }
43358
43834
  return 0;
@@ -43508,14 +43984,14 @@ var jquery_default = (
43508
43984
  });
43509
43985
  }
43510
43986
  function setDocument(node) {
43511
- var subWindow, doc = node ? node.ownerDocument || node : document;
43512
- if (doc == document$1 || doc.nodeType !== 9) {
43987
+ var subWindow, doc2 = node ? node.ownerDocument || node : document2;
43988
+ if (doc2 == document$1 || doc2.nodeType !== 9) {
43513
43989
  return;
43514
43990
  }
43515
- document$1 = doc;
43991
+ document$1 = doc2;
43516
43992
  documentElement$1 = document$1.documentElement;
43517
43993
  documentIsHTML = !jQuery.isXMLDoc(document$1);
43518
- if (isIE && document != document$1 && (subWindow = document$1.defaultView) && subWindow.top !== subWindow) {
43994
+ if (isIE && document2 != document$1 && (subWindow = document$1.defaultView) && subWindow.top !== subWindow) {
43519
43995
  subWindow.addEventListener("unload", unloadHandler);
43520
43996
  }
43521
43997
  }
@@ -43746,7 +44222,7 @@ var jquery_default = (
43746
44222
  }),
43747
44223
  // Miscellaneous
43748
44224
  target: function(elem) {
43749
- var hash = window.location && window.location.hash;
44225
+ var hash = window2.location && window2.location.hash;
43750
44226
  return hash && hash.slice(1) === elem.id;
43751
44227
  },
43752
44228
  root: function(elem) {
@@ -44248,7 +44724,7 @@ function serializeNodeToHtml(elm, serializationOptions = {}) {
44248
44724
  text: []
44249
44725
  };
44250
44726
  let renderedNode = "";
44251
- const children = !opts.fullDocument && elm.body ? Array.from(elm.body.childNodes) : opts.outerHtml ? [elm] : Array.from(elm.childNodes);
44727
+ const children = !opts.fullDocument && elm.body ? Array.from(elm.body.childNodes) : opts.outerHtml ? [elm] : Array.from(getChildNodes(elm));
44252
44728
  for (let i = 0, ii = children.length; i < ii; i++) {
44253
44729
  const child = children[i];
44254
44730
  const chunks = Array.from(streamToHtml(child, opts, output));
@@ -44281,7 +44757,10 @@ function* streamToHtml(node, opts, output) {
44281
44757
  const tag = tagName === shadowRootTag ? "template" : tagName;
44282
44758
  yield "<" + tag;
44283
44759
  output.currentLineWidth += tag.length + 1;
44284
- if (tag === "template") {
44760
+ if (tag === "template" && (!node.getAttribute || !node.getAttribute("shadowrootmode")) && /**
44761
+ * If the node is a shadow root, we want to add the `shadowrootmode` attribute
44762
+ */
44763
+ ("host" in node || node.nodeName.toLocaleLowerCase() === shadowRootTag)) {
44285
44764
  const mode = ` shadowrootmode="open"`;
44286
44765
  yield mode;
44287
44766
  output.currentLineWidth += mode.length;
@@ -44365,7 +44844,8 @@ style="${cssText}">`;
44365
44844
  output.indent = output.indent + ((_c = opts.indentSpaces) != null ? _c : 0);
44366
44845
  yield* streamToHtml(shadowRoot, opts, output);
44367
44846
  output.indent = output.indent - ((_d = opts.indentSpaces) != null ? _d : 0);
44368
- if (opts.newLines && (node.childNodes.length === 0 || node.childNodes.length === 1 && node.childNodes[0].nodeType === 3 /* TEXT_NODE */ && ((_e = node.childNodes[0].nodeValue) == null ? void 0 : _e.trim()) === "")) {
44847
+ const childNodes = getChildNodes(node);
44848
+ if (opts.newLines && (childNodes.length === 0 || childNodes.length === 1 && childNodes[0].nodeType === 3 /* TEXT_NODE */ && ((_e = childNodes[0].nodeValue) == null ? void 0 : _e.trim()) === "")) {
44369
44849
  yield "\n";
44370
44850
  output.currentLineWidth = 0;
44371
44851
  for (let i = 0; i < output.indent; i++) {
@@ -44376,7 +44856,7 @@ style="${cssText}">`;
44376
44856
  }
44377
44857
  if (opts.excludeTagContent == null || opts.excludeTagContent.includes(tagName) === false) {
44378
44858
  const tag = tagName === shadowRootTag ? "template" : tagName;
44379
- const childNodes = tagName === "template" ? node.content.childNodes : node.childNodes;
44859
+ const childNodes = tagName === "template" ? node.content.childNodes : getChildNodes(node);
44380
44860
  const childNodeLength = childNodes.length;
44381
44861
  if (childNodeLength > 0) {
44382
44862
  if (childNodeLength === 1 && childNodes[0].nodeType === 3 /* TEXT_NODE */ && (typeof childNodes[0].nodeValue !== "string" || childNodes[0].nodeValue.trim() === "")) {
@@ -44386,6 +44866,13 @@ style="${cssText}">`;
44386
44866
  output.indent = output.indent + ((_h = opts.indentSpaces) != null ? _h : 0);
44387
44867
  }
44388
44868
  for (let i = 0; i < childNodeLength; i++) {
44869
+ const sId = node.attributes.getNamedItem(HYDRATE_ID);
44870
+ const isStencilDeclarativeShadowDOM = childNodes[i].nodeName.toLowerCase() === "template" && sId;
44871
+ if (isStencilDeclarativeShadowDOM) {
44872
+ yield `
44873
+ ${" ".repeat(output.indent)}<!--r.${sId.value}-->`;
44874
+ continue;
44875
+ }
44389
44876
  yield* streamToHtml(childNodes[i], opts, output);
44390
44877
  }
44391
44878
  if (ignoreTag === false) {
@@ -44542,6 +45029,9 @@ function isWithinWhitespaceSensitive(node) {
44542
45029
  }
44543
45030
  return false;
44544
45031
  }
45032
+ function getChildNodes(node) {
45033
+ return node.__childNodes || node.childNodes;
45034
+ }
44545
45035
  var NON_ESCAPABLE_CONTENT = /* @__PURE__ */ new Set([
44546
45036
  "STYLE",
44547
45037
  "SCRIPT",
@@ -44811,10 +45301,12 @@ var MockElement = class extends MockNode2 {
44811
45301
  attachInternals() {
44812
45302
  return new Proxy({}, {
44813
45303
  get: function(_target, prop, _receiver) {
44814
- console.error(
44815
- `NOTE: Property ${String(prop)} was accessed on ElementInternals, but this property is not implemented.
44816
- Testing components with ElementInternals is fully supported in e2e tests.`
44817
- );
45304
+ if ("process" in globalThis && globalThis.process.env.__STENCIL_SPEC_TESTS__) {
45305
+ console.error(
45306
+ `NOTE: Property ${String(prop)} was accessed on ElementInternals, but this property is not implemented.
45307
+ Testing components with ElementInternals is fully supported in e2e tests.`
45308
+ );
45309
+ }
44818
45310
  }
44819
45311
  });
44820
45312
  }
@@ -45736,9 +46228,9 @@ function createElement(ownerDocument, tagName) {
45736
46228
  return new MockUListElement(ownerDocument);
45737
46229
  }
45738
46230
  if (ownerDocument != null && tagName.includes("-")) {
45739
- const win = ownerDocument.defaultView;
45740
- if (win != null && win.customElements != null) {
45741
- return createCustomElement(win.customElements, ownerDocument, tagName);
46231
+ const win2 = ownerDocument.defaultView;
46232
+ if (win2 != null && win2.customElements != null) {
46233
+ return createCustomElement(win2.customElements, ownerDocument, tagName);
45742
46234
  }
45743
46235
  }
45744
46236
  return new MockHTMLElement(ownerDocument, tagName);
@@ -45784,6 +46276,9 @@ var MockAnchorElement = class extends MockHTMLElement {
45784
46276
  this.setAttribute("href", value);
45785
46277
  }
45786
46278
  get pathname() {
46279
+ if (!this.href) {
46280
+ return "";
46281
+ }
45787
46282
  return new URL(this.href).pathname;
45788
46283
  }
45789
46284
  };
@@ -45801,6 +46296,11 @@ patchPropAttributes(
45801
46296
  type: "submit"
45802
46297
  }
45803
46298
  );
46299
+ Object.defineProperty(MockButtonElement.prototype, "form", {
46300
+ get() {
46301
+ return this.hasAttribute("form") ? this.getAttribute("form") : null;
46302
+ }
46303
+ });
45804
46304
  var MockImageElement = class extends MockHTMLElement {
45805
46305
  constructor(ownerDocument) {
45806
46306
  super(ownerDocument, "img");
@@ -46155,9 +46655,9 @@ var CanvasRenderingContext = class {
46155
46655
  }
46156
46656
  clearRect() {
46157
46657
  }
46158
- getImageData(_, __, w, h) {
46658
+ getImageData(_, __, w, h2) {
46159
46659
  return {
46160
- data: new Array(w * h * 4)
46660
+ data: new Array(w * h2 * 4)
46161
46661
  };
46162
46662
  }
46163
46663
  toDataURL() {
@@ -46219,9 +46719,9 @@ var MockCanvasElement = class extends MockHTMLElement {
46219
46719
  function fullUrl(elm, attrName) {
46220
46720
  const val = elm.getAttribute(attrName) || "";
46221
46721
  if (elm.ownerDocument != null) {
46222
- const win = elm.ownerDocument.defaultView;
46223
- if (win != null) {
46224
- const loc = win.location;
46722
+ const win2 = elm.ownerDocument.defaultView;
46723
+ if (win2 != null) {
46724
+ const loc = win2.location;
46225
46725
  if (loc != null) {
46226
46726
  try {
46227
46727
  const url = new URL(val, loc.href);
@@ -46826,6 +47326,71 @@ function resetPerformance(perf) {
46826
47326
  }
46827
47327
  }
46828
47328
 
47329
+ // src/mock-doc/resize-observer.ts
47330
+ var MockResizeObserver = class {
47331
+ constructor() {
47332
+ }
47333
+ disconnect() {
47334
+ }
47335
+ observe() {
47336
+ }
47337
+ takeRecords() {
47338
+ return [];
47339
+ }
47340
+ unobserve() {
47341
+ }
47342
+ };
47343
+
47344
+ // src/mock-doc/shadow-root.ts
47345
+ var MockShadowRoot = class extends MockDocumentFragment {
47346
+ get activeElement() {
47347
+ return null;
47348
+ }
47349
+ set adoptedStyleSheets(_adoptedStyleSheets) {
47350
+ throw new Error("Unimplemented");
47351
+ }
47352
+ get adoptedStyleSheets() {
47353
+ return [];
47354
+ }
47355
+ get cloneable() {
47356
+ return false;
47357
+ }
47358
+ get delegatesFocus() {
47359
+ return false;
47360
+ }
47361
+ get fullscreenElement() {
47362
+ return null;
47363
+ }
47364
+ get host() {
47365
+ let parent = this.parentElement();
47366
+ while (parent) {
47367
+ if (parent.nodeType === 11) {
47368
+ return parent;
47369
+ }
47370
+ parent = parent.parentElement();
47371
+ }
47372
+ return null;
47373
+ }
47374
+ get mode() {
47375
+ return "open";
47376
+ }
47377
+ get pictureInPictureElement() {
47378
+ return null;
47379
+ }
47380
+ get pointerLockElement() {
47381
+ return null;
47382
+ }
47383
+ get serializable() {
47384
+ return false;
47385
+ }
47386
+ get slotAssignment() {
47387
+ return "named";
47388
+ }
47389
+ get styleSheets() {
47390
+ return [];
47391
+ }
47392
+ };
47393
+
46829
47394
  // src/mock-doc/storage.ts
46830
47395
  var MockStorage = class {
46831
47396
  constructor() {
@@ -46855,11 +47420,11 @@ var MockStorage = class {
46855
47420
  };
46856
47421
 
46857
47422
  // src/mock-doc/window.ts
46858
- var nativeClearInterval = clearInterval;
46859
- var nativeClearTimeout = clearTimeout;
46860
- var nativeSetInterval = setInterval;
46861
- var nativeSetTimeout = setTimeout;
46862
- var nativeURL = URL;
47423
+ var nativeClearInterval = globalThis.clearInterval;
47424
+ var nativeClearTimeout = globalThis.clearTimeout;
47425
+ var nativeSetInterval = globalThis.setInterval;
47426
+ var nativeSetTimeout = globalThis.setTimeout;
47427
+ var nativeURL = globalThis.URL;
46863
47428
  var nativeWindow = globalThis.window;
46864
47429
  var MockWindow = class {
46865
47430
  constructor(html = null) {
@@ -46926,10 +47491,10 @@ var MockWindow = class {
46926
47491
  }
46927
47492
  get Document() {
46928
47493
  if (this.__docCstr == null) {
46929
- const win = this;
47494
+ const win2 = this;
46930
47495
  this.__docCstr = class extends MockDocument {
46931
47496
  constructor() {
46932
- super(false, win);
47497
+ super(false, win2);
46933
47498
  throw new Error("Illegal constructor: cannot construct Document");
46934
47499
  }
46935
47500
  };
@@ -46954,6 +47519,9 @@ var MockWindow = class {
46954
47519
  set DocumentFragment(docFragCstr) {
46955
47520
  this.__docFragCstr = docFragCstr;
46956
47521
  }
47522
+ get ShadowRoot() {
47523
+ return MockShadowRoot;
47524
+ }
46957
47525
  get DocumentType() {
46958
47526
  if (this.__docTypeCstr == null) {
46959
47527
  const ownerDocument = this.document;
@@ -47065,6 +47633,9 @@ var MockWindow = class {
47065
47633
  get IntersectionObserver() {
47066
47634
  return MockIntersectionObserver;
47067
47635
  }
47636
+ get ResizeObserver() {
47637
+ return MockResizeObserver;
47638
+ }
47068
47639
  get localStorage() {
47069
47640
  if (this.__localStorage == null) {
47070
47641
  this.__localStorage = new MockStorage();
@@ -47446,14 +48017,14 @@ var MockWindow = class {
47446
48017
  }
47447
48018
  };
47448
48019
  addGlobalsToWindowPrototype(MockWindow.prototype);
47449
- function resetWindowDefaults(win) {
47450
- win.__clearInterval = nativeClearInterval;
47451
- win.__clearTimeout = nativeClearTimeout;
47452
- win.__setInterval = nativeSetInterval;
47453
- win.__setTimeout = nativeSetTimeout;
47454
- win.__maxTimeout = 3e4;
47455
- win.__allowInterval = true;
47456
- win.URL = nativeURL;
48020
+ function resetWindowDefaults(win2) {
48021
+ win2.__clearInterval = nativeClearInterval;
48022
+ win2.__clearTimeout = nativeClearTimeout;
48023
+ win2.__setInterval = nativeSetInterval;
48024
+ win2.__setTimeout = nativeSetTimeout;
48025
+ win2.__maxTimeout = 3e4;
48026
+ win2.__allowInterval = true;
48027
+ win2.URL = nativeURL;
47457
48028
  }
47458
48029
  function cloneWindow(srcWin, opts = {}) {
47459
48030
  if (srcWin == null) {
@@ -47472,72 +48043,72 @@ function cloneWindow(srcWin, opts = {}) {
47472
48043
  }
47473
48044
  return clonedWin;
47474
48045
  }
47475
- function constrainTimeouts(win) {
47476
- win.__allowInterval = false;
47477
- win.__maxTimeout = 0;
48046
+ function constrainTimeouts(win2) {
48047
+ win2.__allowInterval = false;
48048
+ win2.__maxTimeout = 0;
47478
48049
  }
47479
- function resetWindow(win) {
47480
- if (win != null) {
47481
- if (win.__timeouts) {
47482
- win.__timeouts.forEach((timeoutId) => {
48050
+ function resetWindow(win2) {
48051
+ if (win2 != null) {
48052
+ if (win2.__timeouts) {
48053
+ win2.__timeouts.forEach((timeoutId) => {
47483
48054
  nativeClearInterval(timeoutId);
47484
48055
  nativeClearTimeout(timeoutId);
47485
48056
  });
47486
- win.__timeouts.clear();
48057
+ win2.__timeouts.clear();
47487
48058
  }
47488
- if (win.customElements && win.customElements.clear) {
47489
- win.customElements.clear();
48059
+ if (win2.customElements && win2.customElements.clear) {
48060
+ win2.customElements.clear();
47490
48061
  }
47491
- resetDocument(win.document);
47492
- resetPerformance(win.performance);
47493
- for (const key in win) {
47494
- if (win.hasOwnProperty(key) && key !== "document" && key !== "performance" && key !== "customElements") {
47495
- delete win[key];
48062
+ resetDocument(win2.document);
48063
+ resetPerformance(win2.performance);
48064
+ for (const key in win2) {
48065
+ if (win2.hasOwnProperty(key) && key !== "document" && key !== "performance" && key !== "customElements") {
48066
+ delete win2[key];
47496
48067
  }
47497
48068
  }
47498
- resetWindowDefaults(win);
47499
- resetWindowDimensions(win);
47500
- resetEventListeners(win);
47501
- if (win.document != null) {
48069
+ resetWindowDefaults(win2);
48070
+ resetWindowDimensions(win2);
48071
+ resetEventListeners(win2);
48072
+ if (win2.document != null) {
47502
48073
  try {
47503
- win.document.defaultView = win;
48074
+ win2.document.defaultView = win2;
47504
48075
  } catch (e) {
47505
48076
  }
47506
48077
  }
47507
- win.fetch = null;
47508
- win.Headers = null;
47509
- win.Request = null;
47510
- win.Response = null;
47511
- win.FetchError = null;
48078
+ win2.fetch = null;
48079
+ win2.Headers = null;
48080
+ win2.Request = null;
48081
+ win2.Response = null;
48082
+ win2.FetchError = null;
47512
48083
  }
47513
48084
  }
47514
- function resetWindowDimensions(win) {
48085
+ function resetWindowDimensions(win2) {
47515
48086
  try {
47516
- win.devicePixelRatio = 1;
47517
- win.innerHeight = 768;
47518
- win.innerWidth = 1366;
47519
- win.pageXOffset = 0;
47520
- win.pageYOffset = 0;
47521
- win.screenLeft = 0;
47522
- win.screenTop = 0;
47523
- win.screenX = 0;
47524
- win.screenY = 0;
47525
- win.scrollX = 0;
47526
- win.scrollY = 0;
47527
- win.screen = {
47528
- availHeight: win.innerHeight,
48087
+ win2.devicePixelRatio = 1;
48088
+ win2.innerHeight = 768;
48089
+ win2.innerWidth = 1366;
48090
+ win2.pageXOffset = 0;
48091
+ win2.pageYOffset = 0;
48092
+ win2.screenLeft = 0;
48093
+ win2.screenTop = 0;
48094
+ win2.screenX = 0;
48095
+ win2.screenY = 0;
48096
+ win2.scrollX = 0;
48097
+ win2.scrollY = 0;
48098
+ win2.screen = {
48099
+ availHeight: win2.innerHeight,
47529
48100
  availLeft: 0,
47530
48101
  availTop: 0,
47531
- availWidth: win.innerWidth,
48102
+ availWidth: win2.innerWidth,
47532
48103
  colorDepth: 24,
47533
- height: win.innerHeight,
48104
+ height: win2.innerHeight,
47534
48105
  keepAwake: false,
47535
48106
  orientation: {
47536
48107
  angle: 0,
47537
48108
  type: "portrait-primary"
47538
48109
  },
47539
48110
  pixelDepth: 24,
47540
- width: win.innerWidth
48111
+ width: win2.innerWidth
47541
48112
  };
47542
48113
  } catch (e) {
47543
48114
  }
@@ -47545,11 +48116,11 @@ function resetWindowDimensions(win) {
47545
48116
 
47546
48117
  // src/mock-doc/document.ts
47547
48118
  var MockDocument = class _MockDocument extends MockHTMLElement {
47548
- constructor(html = null, win = null) {
48119
+ constructor(html = null, win2 = null) {
47549
48120
  super(null, null);
47550
48121
  this.nodeName = "#document" /* DOCUMENT_NODE */;
47551
48122
  this.nodeType = 9 /* DOCUMENT_NODE */;
47552
- this.defaultView = win;
48123
+ this.defaultView = win2;
47553
48124
  this.cookie = "";
47554
48125
  this.referrer = "";
47555
48126
  this.appendChild(this.createDocumentTypeNode());
@@ -47696,10 +48267,10 @@ var MockDocument = class _MockDocument extends MockHTMLElement {
47696
48267
  }
47697
48268
  createElement(tagName) {
47698
48269
  if (tagName === "#document" /* DOCUMENT_NODE */) {
47699
- const doc = new _MockDocument(false);
47700
- doc.nodeName = tagName;
47701
- doc.parentNode = null;
47702
- return doc;
48270
+ const doc2 = new _MockDocument(false);
48271
+ doc2.nodeName = tagName;
48272
+ doc2.parentNode = null;
48273
+ return doc2;
47703
48274
  }
47704
48275
  return createElement(this, tagName);
47705
48276
  }
@@ -47739,10 +48310,10 @@ var MockDocument = class _MockDocument extends MockHTMLElement {
47739
48310
  title.textContent = value;
47740
48311
  }
47741
48312
  };
47742
- function resetDocument(doc) {
47743
- if (doc != null) {
47744
- resetEventListeners(doc);
47745
- const documentElement = doc.documentElement;
48313
+ function resetDocument(doc2) {
48314
+ if (doc2 != null) {
48315
+ resetEventListeners(doc2);
48316
+ const documentElement = doc2.documentElement;
47746
48317
  if (documentElement != null) {
47747
48318
  resetElement(documentElement);
47748
48319
  for (let i = 0, ii = documentElement.childNodes.length; i < ii; i++) {
@@ -47751,25 +48322,25 @@ function resetDocument(doc) {
47751
48322
  childNode.childNodes.length = 0;
47752
48323
  }
47753
48324
  }
47754
- for (const key in doc) {
47755
- if (doc.hasOwnProperty(key) && !DOC_KEY_KEEPERS.has(key)) {
47756
- delete doc[key];
48325
+ for (const key in doc2) {
48326
+ if (doc2.hasOwnProperty(key) && !DOC_KEY_KEEPERS.has(key)) {
48327
+ delete doc2[key];
47757
48328
  }
47758
48329
  }
47759
48330
  try {
47760
- doc.nodeName = "#document" /* DOCUMENT_NODE */;
48331
+ doc2.nodeName = "#document" /* DOCUMENT_NODE */;
47761
48332
  } catch (e) {
47762
48333
  }
47763
48334
  try {
47764
- doc.nodeType = 9 /* DOCUMENT_NODE */;
48335
+ doc2.nodeType = 9 /* DOCUMENT_NODE */;
47765
48336
  } catch (e) {
47766
48337
  }
47767
48338
  try {
47768
- doc.cookie = "";
48339
+ doc2.cookie = "";
47769
48340
  } catch (e) {
47770
48341
  }
47771
48342
  try {
47772
- doc.referrer = "";
48343
+ doc2.referrer = "";
47773
48344
  } catch (e) {
47774
48345
  }
47775
48346
  }
@@ -47825,9 +48396,33 @@ function createWindowFromHtml(templateHtml, uniqueId) {
47825
48396
  templateWindow = new MockWindow(templateHtml);
47826
48397
  templateWindows.set(uniqueId, templateWindow);
47827
48398
  }
47828
- const win = cloneWindow(templateWindow);
47829
- return win;
48399
+ const win2 = cloneWindow(templateWindow);
48400
+ return win2;
47830
48401
  }
48402
+ var Build = {
48403
+ isDev: BUILD.isDev ? true : false,
48404
+ isBrowser: true,
48405
+ isServer: false,
48406
+ isTesting: BUILD.isTesting ? true : false
48407
+ };
48408
+ var hostRefs = BUILD.hotModuleReplacement ? window.__STENCIL_HOSTREFS__ || (window.__STENCIL_HOSTREFS__ = /* @__PURE__ */ new WeakMap()) : /* @__PURE__ */ new WeakMap();
48409
+ var STENCIL_DEV_MODE = BUILD.isTesting ? ["STENCIL:"] : [
48410
+ "%cstencil",
48411
+ "color: white;background:#4c47ff;font-weight: bold; font-size:10px; padding:2px 6px; border-radius: 5px"
48412
+ ];
48413
+ var win = typeof window !== "undefined" ? window : {};
48414
+ var doc = win.document || { head: {} };
48415
+ var H = win.HTMLElement || class {
48416
+ };
48417
+ var supportsShadow = BUILD.shadowDom;
48418
+ var supportsConstructableStylesheets = BUILD.constructableCSS ? /* @__PURE__ */ (() => {
48419
+ try {
48420
+ new CSSStyleSheet();
48421
+ return typeof new CSSStyleSheet().replaceSync === "function";
48422
+ } catch (e) {
48423
+ }
48424
+ return false;
48425
+ })() : false;
47831
48426
 
47832
48427
  // src/utils/helpers.ts
47833
48428
  var isString = (v) => typeof v === "string";
@@ -47918,16 +48513,21 @@ var unwrapErr = (result) => {
47918
48513
  throw result.value;
47919
48514
  }
47920
48515
  };
48516
+ var CAPTURE_EVENT_SUFFIX = "Capture";
48517
+ var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
48518
+
48519
+ // src/runtime/mode.ts
48520
+ var setMode = (handler) => modeResolutionChain.push(handler);
47921
48521
 
47922
48522
  // src/compiler/html/canonical-link.ts
47923
- var updateCanonicalLink = (doc, href) => {
48523
+ var updateCanonicalLink = (doc2, href) => {
47924
48524
  var _a2;
47925
- let canonicalLinkElm = doc.head.querySelector('link[rel="canonical"]');
48525
+ let canonicalLinkElm = doc2.head.querySelector('link[rel="canonical"]');
47926
48526
  if (typeof href === "string") {
47927
48527
  if (canonicalLinkElm == null) {
47928
- canonicalLinkElm = doc.createElement("link");
48528
+ canonicalLinkElm = doc2.createElement("link");
47929
48529
  canonicalLinkElm.setAttribute("rel", "canonical");
47930
- doc.head.appendChild(canonicalLinkElm);
48530
+ doc2.head.appendChild(canonicalLinkElm);
47931
48531
  }
47932
48532
  canonicalLinkElm.setAttribute("href", href);
47933
48533
  } else {
@@ -47941,11 +48541,11 @@ var updateCanonicalLink = (doc, href) => {
47941
48541
  };
47942
48542
 
47943
48543
  // src/compiler/html/relocate-meta-charset.ts
47944
- var relocateMetaCharset = (doc) => {
47945
- const head = doc.head;
48544
+ var relocateMetaCharset = (doc2) => {
48545
+ const head = doc2.head;
47946
48546
  let charsetElm = head.querySelector("meta[charset]");
47947
48547
  if (charsetElm == null) {
47948
- charsetElm = doc.createElement("meta");
48548
+ charsetElm = doc2.createElement("meta");
47949
48549
  charsetElm.setAttribute("charset", "utf-8");
47950
48550
  } else {
47951
48551
  charsetElm.remove();
@@ -48220,13 +48820,13 @@ var parseCss = (css, filePath) => {
48220
48820
  const m = match(/^@([-\w]+)?document *([^{]+)/);
48221
48821
  if (!m) return null;
48222
48822
  const vendor = trim(m[1]);
48223
- const doc = trim(m[2]);
48823
+ const doc2 = trim(m[2]);
48224
48824
  if (!open()) return error(`@document missing '{'`);
48225
48825
  const style = comments().concat(rules());
48226
48826
  if (!close()) return error(`@document missing '}'`);
48227
48827
  return pos({
48228
48828
  type: 3 /* Document */,
48229
- document: doc,
48829
+ document: doc2,
48230
48830
  vendor,
48231
48831
  rules: style
48232
48832
  });
@@ -48552,11 +49152,11 @@ var serializeCssPage = (opts, node) => {
48552
49152
  };
48553
49153
  var serializeCssDocument = (opts, node) => {
48554
49154
  const documentCss = serializeCssMapVisit(opts, node.rules);
48555
- const doc = "@" + (node.vendor || "") + "document " + node.document;
49155
+ const doc2 = "@" + (node.vendor || "") + "document " + node.document;
48556
49156
  if (documentCss === "") {
48557
49157
  return "";
48558
49158
  }
48559
- return doc + "{" + documentCss + "}";
49159
+ return doc2 + "{" + documentCss + "}";
48560
49160
  };
48561
49161
  var serializeCssMapVisit = (opts, nodes) => {
48562
49162
  let rtn = "";
@@ -48654,12 +49254,12 @@ var collectUsedSelectors = (usedSelectors, elm) => {
48654
49254
  };
48655
49255
 
48656
49256
  // src/compiler/html/remove-unused-styles.ts
48657
- var removeUnusedStyles = (doc, diagnostics) => {
49257
+ var removeUnusedStyles = (doc2, diagnostics) => {
48658
49258
  try {
48659
- const styleElms = doc.head.querySelectorAll(`style[data-styles]`);
49259
+ const styleElms = doc2.head.querySelectorAll(`style[data-styles]`);
48660
49260
  const styleLen = styleElms.length;
48661
49261
  if (styleLen > 0) {
48662
- const usedSelectors = getUsedSelectors(doc.documentElement);
49262
+ const usedSelectors = getUsedSelectors(doc2.documentElement);
48663
49263
  for (let i = 0; i < styleLen; i++) {
48664
49264
  removeUnusedStyleText(usedSelectors, diagnostics, styleElms[i]);
48665
49265
  }
@@ -48792,49 +49392,49 @@ function collectAttributes(node) {
48792
49392
  var SKIP_ATTRS = /* @__PURE__ */ new Set(["s-id", "c-id"]);
48793
49393
 
48794
49394
  // src/hydrate/runner/patch-dom-implementation.ts
48795
- function patchDomImplementation(doc, opts) {
48796
- let win;
48797
- if (doc.defaultView != null) {
49395
+ function patchDomImplementation(doc2, opts) {
49396
+ let win2;
49397
+ if (doc2.defaultView != null) {
48798
49398
  opts.destroyWindow = true;
48799
- patchWindow(doc.defaultView);
48800
- win = doc.defaultView;
49399
+ patchWindow(doc2.defaultView);
49400
+ win2 = doc2.defaultView;
48801
49401
  } else {
48802
49402
  opts.destroyWindow = true;
48803
49403
  opts.destroyDocument = false;
48804
- win = new MockWindow(false);
49404
+ win2 = new MockWindow(false);
48805
49405
  }
48806
- if (win.document !== doc) {
48807
- win.document = doc;
49406
+ if (win2.document !== doc2) {
49407
+ win2.document = doc2;
48808
49408
  }
48809
- if (doc.defaultView !== win) {
48810
- doc.defaultView = win;
49409
+ if (doc2.defaultView !== win2) {
49410
+ doc2.defaultView = win2;
48811
49411
  }
48812
- const HTMLElement = doc.documentElement.constructor.prototype;
48813
- if (typeof HTMLElement.getRootNode !== "function") {
48814
- const elm = doc.createElement("unknown-element");
49412
+ const HTMLElement2 = doc2.documentElement.constructor.prototype;
49413
+ if (typeof HTMLElement2.getRootNode !== "function") {
49414
+ const elm = doc2.createElement("unknown-element");
48815
49415
  const HTMLUnknownElement = elm.constructor.prototype;
48816
49416
  HTMLUnknownElement.getRootNode = getRootNode;
48817
49417
  }
48818
- if (typeof doc.createEvent === "function") {
48819
- const CustomEvent = doc.createEvent("CustomEvent").constructor;
48820
- if (win.CustomEvent !== CustomEvent) {
48821
- win.CustomEvent = CustomEvent;
49418
+ if (typeof doc2.createEvent === "function") {
49419
+ const CustomEvent2 = doc2.createEvent("CustomEvent").constructor;
49420
+ if (win2.CustomEvent !== CustomEvent2) {
49421
+ win2.CustomEvent = CustomEvent2;
48822
49422
  }
48823
49423
  }
48824
49424
  try {
48825
- win.__stencil_baseURI = doc.baseURI;
49425
+ win2.__stencil_baseURI = doc2.baseURI;
48826
49426
  } catch (e) {
48827
- Object.defineProperty(doc, "baseURI", {
49427
+ Object.defineProperty(doc2, "baseURI", {
48828
49428
  get() {
48829
- const baseElm = doc.querySelector("base[href]");
49429
+ const baseElm = doc2.querySelector("base[href]");
48830
49430
  if (baseElm) {
48831
- return new URL(baseElm.getAttribute("href"), win.location.href).href;
49431
+ return new URL(baseElm.getAttribute("href"), win2.location.href).href;
48832
49432
  }
48833
- return win.location.href;
49433
+ return win2.location.href;
48834
49434
  }
48835
49435
  });
48836
49436
  }
48837
- return win;
49437
+ return win2;
48838
49438
  }
48839
49439
  function getRootNode(opts) {
48840
49440
  const isComposed = opts != null && opts.composed === true;
@@ -48987,10 +49587,10 @@ function renderCatchError(results, err2) {
48987
49587
  }
48988
49588
 
48989
49589
  // src/hydrate/runner/runtime-log.ts
48990
- function runtimeLogging(win, opts, results) {
49590
+ function runtimeLogging(win2, opts, results) {
48991
49591
  try {
48992
- const pathname = win.location.pathname;
48993
- win.console.error = (...msgs) => {
49592
+ const pathname = win2.location.pathname;
49593
+ win2.console.error = (...msgs) => {
48994
49594
  const errMsg = msgs.reduce((errMsg2, m) => {
48995
49595
  if (m) {
48996
49596
  if (m.stack != null) {
@@ -49010,7 +49610,7 @@ function runtimeLogging(win, opts, results) {
49010
49610
  }
49011
49611
  }
49012
49612
  };
49013
- win.console.debug = (...msgs) => {
49613
+ win2.console.debug = (...msgs) => {
49014
49614
  renderBuildDiagnostic(results, "debug", "Hydrate Debug", [...msgs].join(", "));
49015
49615
  if (opts.runtimeLogging) {
49016
49616
  runtimeLog(pathname, "debug", msgs);
@@ -49018,7 +49618,7 @@ function runtimeLogging(win, opts, results) {
49018
49618
  };
49019
49619
  if (opts.runtimeLogging) {
49020
49620
  ["log", "warn", "assert", "info", "trace"].forEach((type) => {
49021
- win.console[type] = (...msgs) => {
49621
+ win2.console[type] = (...msgs) => {
49022
49622
  runtimeLog(pathname, type, msgs);
49023
49623
  };
49024
49624
  });
@@ -49032,58 +49632,64 @@ function runtimeLog(pathname, type, msgs) {
49032
49632
  }
49033
49633
 
49034
49634
  // src/hydrate/runner/window-initialize.ts
49035
- function initializeWindow(win, doc, opts, results) {
49635
+ var docData = {
49636
+ hostIds: 0,
49637
+ rootLevelIds: 0,
49638
+ staticComponents: /* @__PURE__ */ new Set()
49639
+ };
49640
+ function initializeWindow(win2, doc2, opts, results) {
49036
49641
  if (typeof opts.url === "string") {
49037
49642
  try {
49038
- win.location.href = opts.url;
49643
+ win2.location.href = opts.url;
49039
49644
  } catch (e) {
49040
49645
  }
49041
49646
  }
49042
49647
  if (typeof opts.userAgent === "string") {
49043
49648
  try {
49044
- win.navigator.userAgent = opts.userAgent;
49649
+ win2.navigator.userAgent = opts.userAgent;
49045
49650
  } catch (e) {
49046
49651
  }
49047
49652
  }
49048
49653
  if (typeof opts.cookie === "string") {
49049
49654
  try {
49050
- doc.cookie = opts.cookie;
49655
+ doc2.cookie = opts.cookie;
49051
49656
  } catch (e) {
49052
49657
  }
49053
49658
  }
49054
49659
  if (typeof opts.referrer === "string") {
49055
49660
  try {
49056
- doc.referrer = opts.referrer;
49661
+ doc2.referrer = opts.referrer;
49057
49662
  } catch (e) {
49058
49663
  }
49059
49664
  }
49060
49665
  if (typeof opts.direction === "string") {
49061
49666
  try {
49062
- doc.documentElement.setAttribute("dir", opts.direction);
49667
+ doc2.documentElement.setAttribute("dir", opts.direction);
49063
49668
  } catch (e) {
49064
49669
  }
49065
49670
  }
49066
49671
  if (typeof opts.language === "string") {
49067
49672
  try {
49068
- doc.documentElement.setAttribute("lang", opts.language);
49673
+ doc2.documentElement.setAttribute("lang", opts.language);
49069
49674
  } catch (e) {
49070
49675
  }
49071
49676
  }
49072
49677
  if (typeof opts.buildId === "string") {
49073
49678
  try {
49074
- doc.documentElement.setAttribute("data-stencil-build", opts.buildId);
49679
+ doc2.documentElement.setAttribute("data-stencil-build", opts.buildId);
49075
49680
  } catch (e) {
49076
49681
  }
49077
49682
  }
49078
49683
  try {
49079
- win.customElements = null;
49684
+ win2.customElements = null;
49080
49685
  } catch (e) {
49081
49686
  }
49082
49687
  if (opts.constrainTimeouts) {
49083
- constrainTimeouts(win);
49688
+ constrainTimeouts(win2);
49084
49689
  }
49085
- runtimeLogging(win, opts, results);
49086
- return win;
49690
+ runtimeLogging(win2, opts, results);
49691
+ doc2[STENCIL_DOC_DATA] = docData;
49692
+ return win2;
49087
49693
  }
49088
49694
 
49089
49695
  // src/hydrate/runner/render.ts
@@ -49100,44 +49706,44 @@ function renderToString(html, options, asStream) {
49100
49706
  opts.constrainTimeouts = false;
49101
49707
  return hydrateDocument(html, opts, asStream);
49102
49708
  }
49103
- function hydrateDocument(doc, options, asStream) {
49709
+ function hydrateDocument(doc2, options, asStream) {
49104
49710
  const opts = normalizeHydrateOptions(options);
49105
- let win = null;
49711
+ let win2 = null;
49106
49712
  const results = generateHydrateResults(opts);
49107
49713
  if (hasError(results.diagnostics)) {
49108
49714
  return Promise.resolve(results);
49109
49715
  }
49110
- if (typeof doc === "string") {
49716
+ if (typeof doc2 === "string") {
49111
49717
  try {
49112
49718
  opts.destroyWindow = true;
49113
49719
  opts.destroyDocument = true;
49114
- win = new MockWindow(doc);
49720
+ win2 = new MockWindow(doc2);
49115
49721
  if (!asStream) {
49116
- return render(win, opts, results).then(() => results);
49722
+ return render(win2, opts, results).then(() => results);
49117
49723
  }
49118
- return renderStream(win, opts, results);
49724
+ return renderStream(win2, opts, results);
49119
49725
  } catch (e) {
49120
- if (win && win.close) {
49121
- win.close();
49726
+ if (win2 && win2.close) {
49727
+ win2.close();
49122
49728
  }
49123
- win = null;
49729
+ win2 = null;
49124
49730
  renderCatchError(results, e);
49125
49731
  return Promise.resolve(results);
49126
49732
  }
49127
49733
  }
49128
- if (isValidDocument(doc)) {
49734
+ if (isValidDocument(doc2)) {
49129
49735
  try {
49130
49736
  opts.destroyDocument = false;
49131
- win = patchDomImplementation(doc, opts);
49737
+ win2 = patchDomImplementation(doc2, opts);
49132
49738
  if (!asStream) {
49133
- return render(win, opts, results).then(() => results);
49739
+ return render(win2, opts, results).then(() => results);
49134
49740
  }
49135
- return renderStream(win, opts, results);
49741
+ return renderStream(win2, opts, results);
49136
49742
  } catch (e) {
49137
- if (win && win.close) {
49138
- win.close();
49743
+ if (win2 && win2.close) {
49744
+ win2.close();
49139
49745
  }
49140
- win = null;
49746
+ win2 = null;
49141
49747
  renderCatchError(results, e);
49142
49748
  return Promise.resolve(results);
49143
49749
  }
@@ -49145,75 +49751,81 @@ function hydrateDocument(doc, options, asStream) {
49145
49751
  renderBuildError(results, `Invalid html or document. Must be either a valid "html" string, or DOM "document".`);
49146
49752
  return Promise.resolve(results);
49147
49753
  }
49148
- async function render(win, opts, results) {
49754
+ async function render(win2, opts, results) {
49149
49755
  if ("process" in globalThis && typeof process.on === "function" && !process.__stencilErrors) {
49150
49756
  process.__stencilErrors = true;
49151
49757
  process.on("unhandledRejection", (e) => {
49152
49758
  console.log("unhandledRejection", e);
49153
49759
  });
49154
49760
  }
49155
- initializeWindow(win, win.document, opts, results);
49761
+ initializeWindow(win2, win2.document, opts, results);
49156
49762
  const beforeHydrateFn = typeof opts.beforeHydrate === "function" ? opts.beforeHydrate : NOOP;
49157
49763
  try {
49158
- await Promise.resolve(beforeHydrateFn(win.document));
49159
- return new Promise((resolve) => hydrateFactory(win, opts, results, afterHydrate, resolve));
49764
+ await Promise.resolve(beforeHydrateFn(win2.document));
49765
+ return new Promise((resolve) => {
49766
+ if (Array.isArray(opts.modes)) {
49767
+ modeResolutionChain.length = 0;
49768
+ opts.modes.forEach((mode) => setMode(mode));
49769
+ }
49770
+ return hydrateFactory(win2, opts, results, afterHydrate, resolve);
49771
+ });
49160
49772
  } catch (e) {
49161
49773
  renderCatchError(results, e);
49162
- return finalizeHydrate(win, win.document, opts, results);
49774
+ return finalizeHydrate(win2, win2.document, opts, results);
49163
49775
  }
49164
49776
  }
49165
- function renderStream(win, opts, results) {
49777
+ function renderStream(win2, opts, results) {
49166
49778
  async function* processRender() {
49167
- const renderResult = await render(win, opts, results);
49779
+ const renderResult = await render(win2, opts, results);
49168
49780
  yield renderResult.html;
49169
49781
  }
49170
49782
  return stream.Readable.from(processRender());
49171
49783
  }
49172
- async function afterHydrate(win, opts, results, resolve) {
49784
+ async function afterHydrate(win2, opts, results, resolve) {
49173
49785
  const afterHydrateFn = typeof opts.afterHydrate === "function" ? opts.afterHydrate : NOOP;
49174
49786
  try {
49175
- await Promise.resolve(afterHydrateFn(win.document));
49176
- return resolve(finalizeHydrate(win, win.document, opts, results));
49787
+ await Promise.resolve(afterHydrateFn(win2.document));
49788
+ return resolve(finalizeHydrate(win2, win2.document, opts, results));
49177
49789
  } catch (e) {
49178
49790
  renderCatchError(results, e);
49179
- return resolve(finalizeHydrate(win, win.document, opts, results));
49791
+ return resolve(finalizeHydrate(win2, win2.document, opts, results));
49180
49792
  }
49181
49793
  }
49182
- function finalizeHydrate(win, doc, opts, results) {
49794
+ function finalizeHydrate(win2, doc2, opts, results) {
49183
49795
  try {
49184
- inspectElement(results, doc.documentElement, 0);
49796
+ inspectElement(results, doc2.documentElement, 0);
49185
49797
  if (opts.removeUnusedStyles !== false) {
49186
49798
  try {
49187
- removeUnusedStyles(doc, results.diagnostics);
49799
+ removeUnusedStyles(doc2, results.diagnostics);
49188
49800
  } catch (e) {
49189
49801
  renderCatchError(results, e);
49190
49802
  }
49191
49803
  }
49192
49804
  if (typeof opts.title === "string") {
49193
49805
  try {
49194
- doc.title = opts.title;
49806
+ doc2.title = opts.title;
49195
49807
  } catch (e) {
49196
49808
  renderCatchError(results, e);
49197
49809
  }
49198
49810
  }
49199
- results.title = doc.title;
49811
+ results.title = doc2.title;
49200
49812
  if (opts.removeScripts) {
49201
- removeScripts(doc.documentElement);
49813
+ removeScripts(doc2.documentElement);
49202
49814
  }
49203
49815
  try {
49204
- updateCanonicalLink(doc, opts.canonicalUrl);
49816
+ updateCanonicalLink(doc2, opts.canonicalUrl);
49205
49817
  } catch (e) {
49206
49818
  renderCatchError(results, e);
49207
49819
  }
49208
49820
  try {
49209
- relocateMetaCharset(doc);
49821
+ relocateMetaCharset(doc2);
49210
49822
  } catch (e) {
49211
49823
  }
49212
49824
  if (!hasError(results.diagnostics)) {
49213
49825
  results.httpStatus = 200;
49214
49826
  }
49215
49827
  try {
49216
- const metaStatus = doc.head.querySelector('meta[http-equiv="status"]');
49828
+ const metaStatus = doc2.head.querySelector('meta[http-equiv="status"]');
49217
49829
  if (metaStatus != null) {
49218
49830
  const metaStatusContent = metaStatus.getAttribute("content");
49219
49831
  if (metaStatusContent && metaStatusContent.length > 0) {
@@ -49223,35 +49835,35 @@ function finalizeHydrate(win, doc, opts, results) {
49223
49835
  } catch (e) {
49224
49836
  }
49225
49837
  if (opts.clientHydrateAnnotations) {
49226
- doc.documentElement.classList.add("hydrated");
49838
+ doc2.documentElement.classList.add("hydrated");
49227
49839
  }
49228
49840
  if (opts.serializeToHtml) {
49229
- results.html = serializeDocumentToString(doc, opts);
49841
+ results.html = serializeDocumentToString(doc2, opts);
49230
49842
  }
49231
49843
  } catch (e) {
49232
49844
  renderCatchError(results, e);
49233
49845
  }
49234
- destroyWindow(win, doc, opts, results);
49846
+ destroyWindow(win2, doc2, opts, results);
49235
49847
  return results;
49236
49848
  }
49237
- function destroyWindow(win, doc, opts, results) {
49849
+ function destroyWindow(win2, doc2, opts, results) {
49238
49850
  if (!opts.destroyWindow) {
49239
49851
  return;
49240
49852
  }
49241
49853
  try {
49242
49854
  if (!opts.destroyDocument) {
49243
- win.document = null;
49244
- doc.defaultView = null;
49855
+ win2.document = null;
49856
+ doc2.defaultView = null;
49245
49857
  }
49246
- if (win.close) {
49247
- win.close();
49858
+ if (win2.close) {
49859
+ win2.close();
49248
49860
  }
49249
49861
  } catch (e) {
49250
49862
  renderCatchError(results, e);
49251
49863
  }
49252
49864
  }
49253
- function serializeDocumentToString(doc, opts) {
49254
- return serializeNodeToHtml(doc, {
49865
+ function serializeDocumentToString(doc2, opts) {
49866
+ return serializeNodeToHtml(doc2, {
49255
49867
  approximateLineWidth: opts.approximateLineWidth,
49256
49868
  outerHtml: false,
49257
49869
  prettyHtml: opts.prettyHtml,
@@ -49263,8 +49875,8 @@ function serializeDocumentToString(doc, opts) {
49263
49875
  fullDocument: opts.fullDocument
49264
49876
  });
49265
49877
  }
49266
- function isValidDocument(doc) {
49267
- return doc != null && doc.nodeType === 9 && doc.documentElement != null && doc.documentElement.nodeType === 1 && doc.body != null && doc.body.nodeType === 1;
49878
+ function isValidDocument(doc2) {
49879
+ return doc2 != null && doc2.nodeType === 9 && doc2.documentElement != null && doc2.documentElement.nodeType === 1 && doc2.body != null && doc2.body.nodeType === 1;
49268
49880
  }
49269
49881
  function removeScripts(elm) {
49270
49882
  const children = elm.children;