@swisspost/design-system-components 10.0.0-next.55 → 10.0.0-next.57

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 (443) hide show
  1. package/dist/{components/react/p-CJ80BZ06.js → cjs/breakpoints-Df03Ct7n.js} +103 -5
  2. package/dist/cjs/debounce-BsIBi_-2.js +13 -0
  3. package/dist/cjs/environment-BQE9Unf_.js +52 -0
  4. package/dist/cjs/{event-from-CLvtSUKf.js → event-from-CwMw19f8.js} +2 -2
  5. package/dist/cjs/fade-CPQhl1fP.js +26 -0
  6. package/dist/cjs/fade-slide-dPhQa-I1.js +38 -0
  7. package/dist/cjs/{get-focusable-children-Bx63XUQg.js → get-focusable-children-ChETM1wK.js} +29 -21
  8. package/dist/cjs/{get-root-CyMf3Vsd.js → get-root-CUAv4k4C.js} +2 -2
  9. package/dist/cjs/{index-B4gYpuJF.js → index-B4rc1pqu.js} +2150 -292
  10. package/dist/cjs/loader.cjs.js +2 -2
  11. package/dist/cjs/{package-DkJrv93P.js → package-uQ5oiSiN.js} +1 -1
  12. package/dist/cjs/post-accordion_2.cjs.entry.js +19 -15
  13. package/dist/cjs/post-avatar.cjs.entry.js +27 -17
  14. package/dist/cjs/post-back-to-top.cjs.entry.js +23 -43
  15. package/dist/cjs/post-banner.cjs.entry.js +15 -12
  16. package/dist/cjs/post-breadcrumb-item_2.cjs.entry.js +14 -12
  17. package/dist/cjs/post-breadcrumbs.cjs.entry.js +33 -34
  18. package/dist/cjs/post-card-control.cjs.entry.js +42 -26
  19. package/dist/cjs/{post-closebutton_15.cjs.entry.js → post-closebutton_13.cjs.entry.js} +618 -531
  20. package/dist/cjs/post-collapsible_2.cjs.entry.js +41 -37
  21. package/dist/cjs/post-components.cjs.js +3 -3
  22. package/dist/cjs/post-env-test.cjs.entry.js +15 -0
  23. package/dist/cjs/post-footer.cjs.entry.js +24 -20
  24. package/dist/cjs/post-linkarea.cjs.entry.js +5 -5
  25. package/dist/cjs/post-pagination.cjs.entry.js +615 -0
  26. package/dist/cjs/post-popover-trigger.cjs.entry.js +54 -34
  27. package/dist/cjs/post-popover.cjs.entry.js +26 -17
  28. package/dist/cjs/post-rating.cjs.entry.js +24 -18
  29. package/dist/cjs/post-stepper-item.cjs.entry.js +5 -5
  30. package/dist/cjs/post-stepper.cjs.entry.js +40 -29
  31. package/dist/cjs/post-tab-item.cjs.entry.js +51 -0
  32. package/dist/cjs/post-tab-panel.cjs.entry.js +13 -11
  33. package/dist/cjs/post-tabs.cjs.entry.js +195 -40
  34. package/dist/cjs/post-tooltip-trigger.cjs.entry.js +13 -11
  35. package/dist/cjs/post-tooltip.cjs.entry.js +14 -12
  36. package/dist/cjs/utils-s05L2ulk.js +26 -0
  37. package/dist/collection/animations/collapse.js +3 -3
  38. package/dist/collection/animations/fade-slide.js +33 -0
  39. package/dist/collection/animations/fade.js +19 -7
  40. package/dist/collection/animations/index.js +2 -0
  41. package/dist/collection/animations/slide.js +25 -21
  42. package/dist/collection/animations/types.js +14 -0
  43. package/dist/collection/animations/utils.js +8 -0
  44. package/dist/collection/collection-manifest.json +8 -8
  45. package/dist/collection/components/post-accordion/post-accordion.css +1 -1
  46. package/dist/collection/components/post-accordion/post-accordion.js +5 -4
  47. package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
  48. package/dist/collection/components/post-accordion-item/post-accordion-item.js +9 -8
  49. package/dist/collection/components/post-avatar/post-avatar.js +11 -11
  50. package/dist/collection/components/post-back-to-top/post-back-to-top.js +15 -15
  51. package/dist/collection/components/post-banner/post-banner.css +4 -1
  52. package/dist/collection/components/post-banner/post-banner.js +6 -5
  53. package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.js +3 -3
  54. package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +29 -29
  55. package/dist/collection/components/post-card-control/post-card-control.js +18 -18
  56. package/dist/collection/components/post-closebutton/post-closebutton.css +1 -1
  57. package/dist/collection/components/post-closebutton/post-closebutton.js +4 -3
  58. package/dist/collection/components/post-collapsible/post-collapsible.js +28 -28
  59. package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +3 -3
  60. package/dist/collection/components/post-footer/post-footer.css +1 -1
  61. package/dist/collection/components/post-footer/post-footer.js +18 -16
  62. package/dist/collection/components/post-header/post-header.css +1 -1
  63. package/dist/collection/components/post-header/post-header.js +144 -82
  64. package/dist/collection/components/post-icon/post-icon.js +18 -16
  65. package/dist/collection/components/post-language-menu/post-language-menu.css +1 -0
  66. package/dist/collection/components/{post-language-switch/post-language-switch.js → post-language-menu/post-language-menu.js} +45 -36
  67. package/dist/collection/components/post-language-menu-item/post-language-menu-item.css +1 -0
  68. package/dist/collection/components/{post-language-option/post-language-option.js → post-language-menu-item/post-language-menu-item.js} +24 -23
  69. package/dist/collection/components/post-linkarea/post-linkarea.js +1 -1
  70. package/dist/collection/components/post-logo/post-logo.css +3 -1
  71. package/dist/collection/components/post-logo/post-logo.js +3 -3
  72. package/dist/collection/components/post-mainnavigation/post-mainnavigation.css +1 -1
  73. package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +41 -29
  74. package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
  75. package/dist/collection/components/post-megadropdown/post-megadropdown.js +183 -74
  76. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +3 -1
  77. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +81 -75
  78. package/dist/collection/components/post-menu/post-menu.css +1 -1
  79. package/dist/collection/components/post-menu/post-menu.js +39 -38
  80. package/dist/collection/components/post-menu-item/post-menu-item.js +1 -1
  81. package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +3 -3
  82. package/dist/collection/components/post-pagination/post-pagination.css +1 -0
  83. package/dist/collection/components/post-pagination/post-pagination.js +838 -0
  84. package/dist/collection/components/post-popover/post-popover.js +22 -16
  85. package/dist/collection/components/post-popover-trigger/post-popover-trigger.js +45 -29
  86. package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
  87. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +82 -131
  88. package/dist/collection/components/post-rating/post-rating.js +7 -7
  89. package/dist/collection/components/post-stepper/post-stepper.js +38 -35
  90. package/dist/collection/components/post-stepper-item/post-stepper-item.css +2 -2
  91. package/dist/collection/components/post-stepper-item/post-stepper-item.js +1 -1
  92. package/dist/collection/components/post-tab-item/post-tab-item.css +1 -0
  93. package/dist/collection/components/post-tab-item/post-tab-item.js +86 -0
  94. package/dist/collection/components/post-tab-panel/post-tab-panel.js +10 -10
  95. package/dist/collection/components/post-tabs/post-tabs.js +232 -59
  96. package/dist/collection/components/post-togglebutton/post-togglebutton.js +2 -2
  97. package/dist/collection/components/post-tooltip/post-tooltip.js +9 -27
  98. package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +4 -4
  99. package/dist/collection/utils/environment.js +47 -2
  100. package/dist/collection/utils/event-from.js +2 -2
  101. package/dist/collection/utils/get-focusable-children.js +29 -21
  102. package/dist/collection/utils/is-motion-reduced.js +1 -1
  103. package/dist/collection/utils/tests/environment/hydrate-app-helper.js +16 -0
  104. package/dist/collection/utils/tests/environment/post-env-test.js +9 -0
  105. package/dist/component-names.json +4 -5
  106. package/dist/components/breakpoints.js +1 -178
  107. package/dist/components/debounce.js +1 -0
  108. package/dist/components/environment.js +1 -0
  109. package/dist/components/event-from.js +1 -119
  110. package/dist/components/fade-slide.js +1 -0
  111. package/dist/components/fade.js +1 -11
  112. package/dist/components/focusable.js +1 -5018
  113. package/dist/components/get-focusable-children.js +1 -64
  114. package/dist/components/get-root.js +1 -15
  115. package/dist/components/heading-levels.js +1 -3
  116. package/dist/components/index.browser.js +1 -14
  117. package/dist/components/index.d.ts +11 -10
  118. package/dist/components/index.js +1 -39
  119. package/dist/components/long-press-event.js +1 -257
  120. package/dist/components/package.js +1 -3
  121. package/dist/components/post-accordion-item.js +1 -6
  122. package/dist/components/post-accordion-item2.js +1 -113
  123. package/dist/components/post-accordion.js +1 -6
  124. package/dist/components/post-accordion2.js +1 -138
  125. package/dist/components/post-avatar.js +1 -217
  126. package/dist/components/post-back-to-top.js +1 -144
  127. package/dist/components/post-banner.js +1 -98
  128. package/dist/components/post-breadcrumb-item.js +1 -6
  129. package/dist/components/post-breadcrumb-item2.js +1 -79
  130. package/dist/components/post-breadcrumbs.js +1 -196
  131. package/dist/components/post-card-control.js +1 -326
  132. package/dist/components/post-closebutton.js +1 -6
  133. package/dist/components/post-closebutton2.js +1 -77
  134. package/dist/components/post-collapsible-trigger.js +1 -6
  135. package/dist/components/post-collapsible-trigger2.js +1 -136
  136. package/dist/components/post-collapsible.js +1 -6
  137. package/dist/components/post-collapsible2.js +1 -110
  138. package/dist/components/{post-list.d.ts → post-env-test.d.ts} +4 -4
  139. package/dist/components/post-env-test.js +1 -0
  140. package/dist/components/post-footer.js +1 -116
  141. package/dist/components/post-header.js +1 -372
  142. package/dist/components/post-icon.js +1 -6
  143. package/dist/components/post-icon2.js +1 -159
  144. package/dist/components/post-language-menu-item.d.ts +11 -0
  145. package/dist/components/post-language-menu-item.js +1 -0
  146. package/dist/components/{post-language-switch.d.ts → post-language-menu.d.ts} +4 -4
  147. package/dist/components/post-language-menu.js +1 -0
  148. package/dist/components/post-linkarea.js +1 -58
  149. package/dist/components/post-logo.js +1 -58
  150. package/dist/components/post-mainnavigation.js +1 -180
  151. package/dist/components/post-megadropdown-trigger.js +1 -136
  152. package/dist/components/post-megadropdown.js +1 -267
  153. package/dist/components/post-menu-item.js +1 -6
  154. package/dist/components/post-menu-item2.js +1 -30
  155. package/dist/components/post-menu-trigger.js +1 -6
  156. package/dist/components/post-menu-trigger2.js +1 -110
  157. package/dist/components/post-menu.js +1 -6
  158. package/dist/components/post-menu2.js +1 -242
  159. package/dist/components/{post-tab-header.d.ts → post-pagination.d.ts} +4 -4
  160. package/dist/components/post-pagination.js +1 -0
  161. package/dist/components/post-popover-trigger.js +1 -132
  162. package/dist/components/post-popover.js +1 -118
  163. package/dist/components/post-popovercontainer.js +1 -6
  164. package/dist/components/post-popovercontainer2.js +1 -3127
  165. package/dist/components/post-rating.js +1 -148
  166. package/dist/components/post-stepper-item.js +1 -33
  167. package/dist/components/post-stepper.js +1 -134
  168. package/dist/components/{post-list-item.d.ts → post-tab-item.d.ts} +4 -4
  169. package/dist/components/post-tab-item.js +1 -0
  170. package/dist/components/post-tab-panel.js +1 -54
  171. package/dist/components/post-tabs.js +1 -196
  172. package/dist/components/post-togglebutton.js +1 -56
  173. package/dist/components/post-togglebutton2.js +1 -0
  174. package/dist/components/post-tooltip-trigger.js +1 -206
  175. package/dist/components/post-tooltip.js +1 -114
  176. package/dist/components/react/index.d.ts +2 -0
  177. package/dist/components/react/index.js +1 -2315
  178. package/dist/components/react/p-B8YiQ3mz.js +1 -0
  179. package/dist/components/react/p-BC5nlBvn.js +1 -0
  180. package/dist/components/react/p-BLchVpF6.js +1 -14
  181. package/dist/components/react/p-BVCjnh6Q.js +1 -0
  182. package/dist/{post-components/p-CBFgkSgY.js → components/react/p-BVGcVycs.js} +1 -1
  183. package/dist/components/react/p-B_XPj2c8.js +1 -0
  184. package/dist/components/react/p-BllOMLDs.js +1 -0
  185. package/dist/components/react/p-BmRNjQUZ.js +1 -0
  186. package/dist/components/react/p-ByFh05IW.js +1 -0
  187. package/dist/components/react/p-C9hMpmsD.js +1 -0
  188. package/dist/components/react/p-CJ13r5fi.js +1 -0
  189. package/dist/components/react/p-CZvbetqX.js +1 -0
  190. package/dist/components/react/p-C_2k3G1c.js +1 -257
  191. package/dist/components/react/p-CoDiS_Ik.js +1 -0
  192. package/dist/components/react/p-Cou17ld8.js +1 -0
  193. package/dist/components/react/p-D5knoiyy.js +1 -0
  194. package/dist/components/react/p-D9DDtvFM.js +1 -0
  195. package/dist/components/react/p-DY2U5CQt.js +1 -0
  196. package/dist/components/react/p-DjIHLduJ.js +1 -3
  197. package/dist/components/react/p-DpATRD2W.js +1 -0
  198. package/dist/components/react/p-FxUVQ4Tx.js +1 -0
  199. package/dist/components/react/p-HygIVKXC.js +1 -5018
  200. package/dist/components/react/p-YR7U0Z_g.js +1 -0
  201. package/dist/components/react/p-ZeKXASQs.js +1 -0
  202. package/dist/components/react/p-r4txK0AC.js +1 -3
  203. package/dist/components/react/p-sSn0kXFi.js +1 -0
  204. package/dist/components/react/post-accordion-item.js +1 -6
  205. package/dist/components/react/post-accordion.js +1 -6
  206. package/dist/components/react/post-avatar.js +1 -218
  207. package/dist/components/react/post-back-to-top.js +1 -145
  208. package/dist/components/react/post-banner.js +1 -99
  209. package/dist/components/react/post-breadcrumb-item.js +1 -6
  210. package/dist/components/react/post-breadcrumbs.js +1 -197
  211. package/dist/components/react/post-card-control.js +1 -327
  212. package/dist/components/react/post-closebutton.js +1 -6
  213. package/dist/components/react/post-collapsible-trigger.js +1 -6
  214. package/dist/components/react/post-collapsible.js +1 -6
  215. package/dist/components/react/{post-list.d.ts → post-env-test.d.ts} +4 -4
  216. package/dist/components/react/post-env-test.js +1 -0
  217. package/dist/components/react/post-footer.js +1 -117
  218. package/dist/components/react/post-header.js +1 -373
  219. package/dist/components/react/post-icon.js +1 -6
  220. package/dist/components/react/post-language-menu-item.d.ts +11 -0
  221. package/dist/components/react/post-language-menu-item.js +1 -0
  222. package/dist/components/react/{post-language-option.d.ts → post-language-menu.d.ts} +4 -4
  223. package/dist/components/react/post-language-menu.js +1 -0
  224. package/dist/components/react/post-linkarea.js +1 -59
  225. package/dist/components/react/post-logo.js +1 -59
  226. package/dist/components/react/post-mainnavigation.js +1 -181
  227. package/dist/components/react/post-megadropdown-trigger.js +1 -137
  228. package/dist/components/react/post-megadropdown.js +1 -268
  229. package/dist/components/react/post-menu-item.js +1 -6
  230. package/dist/components/react/post-menu-trigger.js +1 -6
  231. package/dist/components/react/post-menu.js +1 -6
  232. package/dist/components/react/{post-tab-header.d.ts → post-pagination.d.ts} +4 -4
  233. package/dist/components/react/post-pagination.js +1 -0
  234. package/dist/components/react/post-popover-trigger.js +1 -133
  235. package/dist/components/react/post-popover.js +1 -119
  236. package/dist/components/react/post-popovercontainer.js +1 -6
  237. package/dist/components/react/post-rating.js +1 -149
  238. package/dist/components/react/post-stepper-item.js +1 -34
  239. package/dist/components/react/post-stepper.js +1 -135
  240. package/dist/components/react/{post-list-item.d.ts → post-tab-item.d.ts} +4 -4
  241. package/dist/components/react/post-tab-item.js +1 -0
  242. package/dist/components/react/post-tab-panel.js +1 -55
  243. package/dist/components/react/post-tabs.js +1 -197
  244. package/dist/components/react/post-togglebutton.js +1 -57
  245. package/dist/components/react/post-tooltip-trigger.js +1 -207
  246. package/dist/components/react/post-tooltip.js +1 -115
  247. package/dist/components/switch-variants.js +1 -3
  248. package/dist/components/utils.js +1 -0
  249. package/dist/docs.d.ts +11 -0
  250. package/dist/docs.json +873 -631
  251. package/dist/{cjs/breakpoints-CEkeixld.js → esm/breakpoints-DYoSKGHO.js} +89 -6
  252. package/dist/esm/debounce-C9hMpmsD.js +11 -0
  253. package/dist/esm/environment-CEmnRoA6.js +49 -0
  254. package/dist/{components/react/p-CzIKqBrS.js → esm/event-from-rEfV4v4a.js} +2 -2
  255. package/dist/esm/fade-DsgPYmAa.js +24 -0
  256. package/dist/esm/fade-slide-CvOvauo9.js +36 -0
  257. package/dist/esm/{get-focusable-children-D9ZHp2FP.js → get-focusable-children-BXNs2_sw.js} +29 -21
  258. package/dist/{components/react/p-CBFgkSgY.js → esm/get-root-CXfAA093.js} +1 -1
  259. package/dist/esm/{index-wEFJ-c34.js → index-CDZBzSdV.js} +2150 -292
  260. package/dist/esm/loader.js +3 -3
  261. package/dist/esm/package-CZvbetqX.js +3 -0
  262. package/dist/esm/post-accordion_2.entry.js +17 -13
  263. package/dist/esm/post-avatar.entry.js +22 -12
  264. package/dist/esm/post-back-to-top.entry.js +23 -43
  265. package/dist/esm/post-banner.entry.js +14 -11
  266. package/dist/esm/post-breadcrumb-item_2.entry.js +13 -11
  267. package/dist/esm/post-breadcrumbs.entry.js +31 -32
  268. package/dist/esm/post-card-control.entry.js +32 -16
  269. package/dist/esm/{post-closebutton_15.entry.js → post-closebutton_13.entry.js} +599 -510
  270. package/dist/esm/post-collapsible_2.entry.js +38 -34
  271. package/dist/esm/post-components.js +4 -4
  272. package/dist/esm/post-env-test.entry.js +13 -0
  273. package/dist/esm/post-footer.entry.js +21 -17
  274. package/dist/esm/post-linkarea.entry.js +5 -5
  275. package/dist/esm/post-pagination.entry.js +613 -0
  276. package/dist/esm/post-popover-trigger.entry.js +52 -32
  277. package/dist/esm/post-popover.entry.js +25 -16
  278. package/dist/esm/post-rating.entry.js +16 -10
  279. package/dist/esm/post-stepper-item.entry.js +5 -5
  280. package/dist/esm/post-stepper.entry.js +39 -28
  281. package/dist/esm/post-tab-item.entry.js +49 -0
  282. package/dist/esm/post-tab-panel.entry.js +13 -11
  283. package/dist/esm/post-tabs.entry.js +195 -40
  284. package/dist/esm/post-tooltip-trigger.entry.js +10 -8
  285. package/dist/esm/post-tooltip.entry.js +13 -11
  286. package/dist/esm/utils-CoDiS_Ik.js +24 -0
  287. package/dist/post-components/p-09ba7cf9.entry.js +1 -0
  288. package/dist/post-components/p-0c091898.entry.js +1 -0
  289. package/dist/post-components/{p-cd03e6f2.entry.js → p-0e97fcfd.entry.js} +1 -1
  290. package/dist/post-components/p-296f1dd5.entry.js +1 -0
  291. package/dist/post-components/p-32ad2b21.entry.js +1 -0
  292. package/dist/post-components/p-366c28cb.entry.js +1 -0
  293. package/dist/post-components/p-41ae68d5.entry.js +1 -0
  294. package/dist/post-components/p-448e7265.entry.js +1 -0
  295. package/dist/post-components/p-554da188.entry.js +1 -0
  296. package/dist/post-components/p-5912f8f1.entry.js +1 -0
  297. package/dist/post-components/p-790f300d.entry.js +1 -0
  298. package/dist/post-components/p-7ed5a493.entry.js +1 -0
  299. package/dist/post-components/p-85bea1b6.entry.js +1 -0
  300. package/dist/post-components/p-8bcff4d2.entry.js +1 -0
  301. package/dist/post-components/p-9dc9c245.entry.js +1 -0
  302. package/dist/post-components/p-B7ebLhHc.js +1 -0
  303. package/dist/post-components/p-BVCjnh6Q.js +1 -0
  304. package/dist/post-components/p-BXNs2_sw.js +1 -0
  305. package/dist/post-components/p-C9hMpmsD.js +1 -0
  306. package/dist/post-components/p-CDZBzSdV.js +2 -0
  307. package/dist/post-components/p-CEmnRoA6.js +1 -0
  308. package/dist/post-components/p-CZvbetqX.js +1 -0
  309. package/dist/post-components/p-CoDiS_Ik.js +1 -0
  310. package/dist/post-components/p-D5knoiyy.js +1 -0
  311. package/dist/post-components/p-DI-h_mEL.js +1 -0
  312. package/dist/post-components/p-a06f9695.entry.js +1 -0
  313. package/dist/post-components/p-a191f1df.entry.js +1 -0
  314. package/dist/post-components/p-c5d19d62.entry.js +1 -0
  315. package/dist/post-components/{p-24dc54d1.entry.js → p-c8c4d05b.entry.js} +1 -1
  316. package/dist/post-components/{p-57288cb2.entry.js → p-d1a5c980.entry.js} +1 -1
  317. package/dist/post-components/p-d4e2c556.entry.js +1 -0
  318. package/dist/post-components/p-f96a310c.entry.js +1 -0
  319. package/dist/post-components/p-fab2327d.entry.js +1 -0
  320. package/dist/post-components/p-rEfV4v4a.js +1 -0
  321. package/dist/post-components/post-components.css +1 -1
  322. package/dist/post-components/post-components.esm.js +1 -1
  323. package/dist/prebuild.js +46 -0
  324. package/dist/types/animations/collapse.d.ts +1 -0
  325. package/dist/types/animations/fade-slide.d.ts +11 -0
  326. package/dist/types/animations/fade.d.ts +2 -2
  327. package/dist/types/animations/index.d.ts +2 -0
  328. package/dist/types/animations/slide.d.ts +9 -2
  329. package/dist/types/animations/types.d.ts +13 -0
  330. package/dist/types/animations/utils.d.ts +2 -0
  331. package/dist/types/components/post-accordion-item/heading-levels.d.ts +1 -1
  332. package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +2 -2
  333. package/dist/types/components/post-back-to-top/post-back-to-top.d.ts +2 -2
  334. package/dist/types/components/post-breadcrumbs/post-breadcrumbs.d.ts +6 -6
  335. package/dist/types/components/post-collapsible/post-collapsible.d.ts +4 -5
  336. package/dist/types/components/post-footer/post-footer.d.ts +4 -4
  337. package/dist/types/components/post-header/post-header.d.ts +23 -13
  338. package/dist/types/components/{post-language-switch/post-language-switch.d.ts → post-language-menu/post-language-menu.d.ts} +12 -11
  339. package/dist/types/components/{post-language-option/post-language-option.d.ts → post-language-menu-item/post-language-menu-item.d.ts} +5 -5
  340. package/dist/types/components/post-mainnavigation/post-mainnavigation.d.ts +6 -5
  341. package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +20 -2
  342. package/dist/types/components/post-megadropdown-trigger/post-megadropdown-trigger.d.ts +17 -23
  343. package/dist/types/components/post-menu/post-menu.d.ts +4 -4
  344. package/dist/types/components/post-pagination/post-pagination.d.ts +224 -0
  345. package/dist/types/components/post-popover/post-popover.d.ts +4 -3
  346. package/dist/types/components/post-popover-trigger/post-popover-trigger.d.ts +2 -1
  347. package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +23 -21
  348. package/dist/types/components/post-rating/post-rating.d.ts +1 -1
  349. package/dist/types/components/post-stepper/post-stepper.d.ts +9 -8
  350. package/dist/types/components/post-tab-item/post-tab-item.d.ts +19 -0
  351. package/dist/types/components/post-tab-panel/post-tab-panel.d.ts +3 -3
  352. package/dist/types/components/post-tabs/post-tabs.d.ts +33 -12
  353. package/dist/types/components/post-tooltip/post-tooltip.d.ts +1 -5
  354. package/dist/types/components.d.ts +322 -219
  355. package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/prebuild.d.ts +9 -0
  356. package/dist/types/stencil-public-runtime.d.ts +147 -10
  357. package/dist/types/types/heading-levels.d.ts +1 -1
  358. package/dist/types/utils/environment.d.ts +25 -1
  359. package/dist/types/utils/get-focusable-children.d.ts +2 -2
  360. package/dist/types/utils/tests/environment/hydrate-app-helper.d.ts +5 -0
  361. package/dist/types/utils/tests/environment/post-env-test.d.ts +3 -0
  362. package/hydrate/index.d.ts +14 -0
  363. package/hydrate/index.js +7494 -2714
  364. package/hydrate/index.mjs +7493 -2715
  365. package/package.json +7 -8
  366. package/dist/cjs/fade-nS5zzDQS.js +0 -14
  367. package/dist/cjs/index-UFKR6Ok0.js +0 -98
  368. package/dist/cjs/post-tab-header.cjs.entry.js +0 -31
  369. package/dist/collection/animations/slide-and-fade.js +0 -25
  370. package/dist/collection/components/post-language-option/post-language-option.css +0 -1
  371. package/dist/collection/components/post-language-switch/post-language-switch.css +0 -1
  372. package/dist/collection/components/post-list/post-list.css +0 -1
  373. package/dist/collection/components/post-list/post-list.js +0 -97
  374. package/dist/collection/components/post-list-item/post-list-item.css +0 -1
  375. package/dist/collection/components/post-list-item/post-list-item.js +0 -26
  376. package/dist/collection/components/post-tab-header/post-tab-header.css +0 -1
  377. package/dist/collection/components/post-tab-header/post-tab-header.js +0 -65
  378. package/dist/components/index2.js +0 -89
  379. package/dist/components/post-language-option.d.ts +0 -11
  380. package/dist/components/post-language-option.js +0 -99
  381. package/dist/components/post-language-switch.js +0 -157
  382. package/dist/components/post-list-item.js +0 -38
  383. package/dist/components/post-list.js +0 -61
  384. package/dist/components/post-tab-header.js +0 -52
  385. package/dist/components/react/p-BVXiQdHq.js +0 -64
  386. package/dist/components/react/p-BhxZzOEC.js +0 -3
  387. package/dist/components/react/p-CSAMO7iJ.js +0 -243
  388. package/dist/components/react/p-CYkf_7Y5.js +0 -89
  389. package/dist/components/react/p-Ccrl2AQn.js +0 -111
  390. package/dist/components/react/p-CewRvBtg.js +0 -139
  391. package/dist/components/react/p-Cwiv86_f.js +0 -111
  392. package/dist/components/react/p-D2waO0Zc.js +0 -31
  393. package/dist/components/react/p-DBPOV12C.js +0 -160
  394. package/dist/components/react/p-DVGEExot.js +0 -3128
  395. package/dist/components/react/p-Djvj8fd2.js +0 -80
  396. package/dist/components/react/p-LtiDhYis.js +0 -137
  397. package/dist/components/react/p-SbIC4aZX.js +0 -11
  398. package/dist/components/react/p-XrZzCOKT.js +0 -78
  399. package/dist/components/react/p-v3pOrMNQ.js +0 -114
  400. package/dist/components/react/post-language-option.js +0 -100
  401. package/dist/components/react/post-language-switch.d.ts +0 -11
  402. package/dist/components/react/post-language-switch.js +0 -158
  403. package/dist/components/react/post-list-item.js +0 -39
  404. package/dist/components/react/post-list.js +0 -62
  405. package/dist/components/react/post-tab-header.js +0 -53
  406. package/dist/esm/breakpoints-CJ80BZ06.js +0 -178
  407. package/dist/esm/event-from-CzIKqBrS.js +0 -119
  408. package/dist/esm/fade-SbIC4aZX.js +0 -11
  409. package/dist/esm/get-root-BkQ3CrLq.js +0 -15
  410. package/dist/esm/index-Beaz8wEe.js +0 -89
  411. package/dist/esm/package-BhxZzOEC.js +0 -3
  412. package/dist/esm/post-tab-header.entry.js +0 -29
  413. package/dist/post-components/p-01e678c9.entry.js +0 -1
  414. package/dist/post-components/p-034a453f.entry.js +0 -1
  415. package/dist/post-components/p-15a4cdbf.entry.js +0 -1
  416. package/dist/post-components/p-2a2030bf.entry.js +0 -1
  417. package/dist/post-components/p-2ed84cc3.entry.js +0 -1
  418. package/dist/post-components/p-3228968f.entry.js +0 -1
  419. package/dist/post-components/p-3c01ddfe.entry.js +0 -1
  420. package/dist/post-components/p-748b1f01.entry.js +0 -1
  421. package/dist/post-components/p-7745e46e.entry.js +0 -1
  422. package/dist/post-components/p-7f635728.entry.js +0 -1
  423. package/dist/post-components/p-82c178a3.entry.js +0 -1
  424. package/dist/post-components/p-9b5f8319.entry.js +0 -1
  425. package/dist/post-components/p-Beaz8wEe.js +0 -1
  426. package/dist/post-components/p-BhxZzOEC.js +0 -1
  427. package/dist/post-components/p-CJ80BZ06.js +0 -1
  428. package/dist/post-components/p-D9ZHp2FP.js +0 -1
  429. package/dist/post-components/p-SbIC4aZX.js +0 -1
  430. package/dist/post-components/p-a9644e54.entry.js +0 -1
  431. package/dist/post-components/p-af030a3a.entry.js +0 -1
  432. package/dist/post-components/p-b8ba8139.entry.js +0 -1
  433. package/dist/post-components/p-db935e8e.entry.js +0 -1
  434. package/dist/post-components/p-e62e1f57.entry.js +0 -1
  435. package/dist/post-components/p-fb4b1641.entry.js +0 -1
  436. package/dist/post-components/p-wEFJ-c34.js +0 -2
  437. package/dist/types/animations/slide-and-fade.d.ts +0 -2
  438. package/dist/types/components/post-list/post-list.d.ts +0 -24
  439. package/dist/types/components/post-list-item/post-list-item.d.ts +0 -8
  440. package/dist/types/components/post-tab-header/post-tab-header.d.ts +0 -14
  441. /package/dist/collection/components/{post-language-switch → post-language-menu}/switch-variants.js +0 -0
  442. /package/dist/{post-components/p-CzIKqBrS.js → components/react/p-rEfV4v4a.js} +0 -0
  443. /package/dist/types/components/{post-language-switch → post-language-menu}/switch-variants.d.ts +0 -0
@@ -19,19 +19,260 @@ function _interopNamespace(e) {
19
19
  }
20
20
 
21
21
  const NAMESPACE = 'post-components';
22
- const BUILD = /* post-components */ { hydratedSelectorName: "data-hydrated", lazyLoad: true, slotRelocation: true, updatable: true};
22
+ const BUILD = /* post-components */ { hotModuleReplacement: false, hydratedSelectorName: "data-hydrated", lazyLoad: true, propChangeCallback: true, slotRelocation: true, state: true, updatable: true};
23
23
 
24
24
  const globalScripts = () => {};
25
- const globalStyles = ":where(post-accordion,post-accordion-item,post-avatar,post-back-to-top,post-banner,post-breadcrumb-item,post-breadcrumbs,post-card-control,post-closebutton,post-collapsible,post-collapsible-trigger,post-footer,post-header,post-icon,post-language-option,post-language-switch,post-linkarea,post-list,post-list-item,post-logo,post-mainnavigation,post-megadropdown,post-megadropdown-trigger,post-menu,post-menu-item,post-menu-trigger,post-popover,post-popover-trigger,post-popovercontainer,post-rating,post-stepper,post-stepper-item,post-tab-header,post-tab-panel,post-tabs,post-togglebutton,post-tooltip,post-tooltip-trigger):not([data-hydrated],:defined){visibility:hidden}";
25
+ const globalStyles = ":where(post-accordion,post-accordion-item,post-avatar,post-back-to-top,post-banner,post-breadcrumb-item,post-breadcrumbs,post-card-control,post-closebutton,post-collapsible,post-collapsible-trigger,post-footer,post-header,post-icon,post-language-menu,post-language-menu-item,post-linkarea,post-logo,post-mainnavigation,post-megadropdown,post-megadropdown-trigger,post-menu,post-menu-item,post-menu-trigger,post-pagination,post-popover,post-popover-trigger,post-popovercontainer,post-rating,post-stepper,post-stepper-item,post-tab-item,post-tab-panel,post-tabs,post-togglebutton,post-tooltip,post-tooltip-trigger):not([data-hydrated],:defined){visibility:hidden}";
26
26
 
27
27
  /*
28
- Stencil Client Platform v4.35.0 | MIT Licensed | https://stenciljs.com
28
+ Stencil Client Platform v4.41.1 | MIT Licensed | https://stenciljs.com
29
29
  */
30
+ var __create = Object.create;
30
31
  var __defProp = Object.defineProperty;
32
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
33
+ var __getOwnPropNames = Object.getOwnPropertyNames;
34
+ var __getProtoOf = Object.getPrototypeOf;
35
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
36
+ var __typeError = (msg) => {
37
+ throw TypeError(msg);
38
+ };
39
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
40
+ var __commonJS = (cb, mod) => function __require() {
41
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
42
+ };
31
43
  var __export = (target, all) => {
32
44
  for (var name in all)
33
45
  __defProp(target, name, { get: all[name], enumerable: true });
34
46
  };
47
+ var __copyProps = (to, from, except, desc) => {
48
+ if (from && typeof from === "object" || typeof from === "function") {
49
+ for (let key of __getOwnPropNames(from))
50
+ if (!__hasOwnProp.call(to, key) && key !== except)
51
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
52
+ }
53
+ return to;
54
+ };
55
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
56
+ // If the importer is in node compatibility mode or this is not an ESM
57
+ // file that has been converted to a CommonJS file using a Babel-
58
+ // compatible transform (i.e. "__esModule" has not been set), then set
59
+ // "default" to the CommonJS "module.exports" for node compatibility.
60
+ __defProp(target, "default", { value: mod, enumerable: true }) ,
61
+ mod
62
+ ));
63
+ var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
64
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
65
+ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
66
+ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
67
+ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);
68
+ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
69
+
70
+ // node_modules/balanced-match/index.js
71
+ var require_balanced_match = __commonJS({
72
+ "node_modules/balanced-match/index.js"(exports, module) {
73
+ module.exports = balanced;
74
+ function balanced(a, b, str) {
75
+ if (a instanceof RegExp) a = maybeMatch(a, str);
76
+ if (b instanceof RegExp) b = maybeMatch(b, str);
77
+ var r = range(a, b, str);
78
+ return r && {
79
+ start: r[0],
80
+ end: r[1],
81
+ pre: str.slice(0, r[0]),
82
+ body: str.slice(r[0] + a.length, r[1]),
83
+ post: str.slice(r[1] + b.length)
84
+ };
85
+ }
86
+ function maybeMatch(reg, str) {
87
+ var m = str.match(reg);
88
+ return m ? m[0] : null;
89
+ }
90
+ balanced.range = range;
91
+ function range(a, b, str) {
92
+ var begs, beg, left, right, result;
93
+ var ai = str.indexOf(a);
94
+ var bi = str.indexOf(b, ai + 1);
95
+ var i2 = ai;
96
+ if (ai >= 0 && bi > 0) {
97
+ if (a === b) {
98
+ return [ai, bi];
99
+ }
100
+ begs = [];
101
+ left = str.length;
102
+ while (i2 >= 0 && !result) {
103
+ if (i2 == ai) {
104
+ begs.push(i2);
105
+ ai = str.indexOf(a, i2 + 1);
106
+ } else if (begs.length == 1) {
107
+ result = [begs.pop(), bi];
108
+ } else {
109
+ beg = begs.pop();
110
+ if (beg < left) {
111
+ left = beg;
112
+ right = bi;
113
+ }
114
+ bi = str.indexOf(b, i2 + 1);
115
+ }
116
+ i2 = ai < bi && ai >= 0 ? ai : bi;
117
+ }
118
+ if (begs.length) {
119
+ result = [left, right];
120
+ }
121
+ }
122
+ return result;
123
+ }
124
+ }
125
+ });
126
+
127
+ // node_modules/brace-expansion/index.js
128
+ var require_brace_expansion = __commonJS({
129
+ "node_modules/brace-expansion/index.js"(exports, module) {
130
+ var balanced = require_balanced_match();
131
+ module.exports = expandTop;
132
+ var escSlash = "\0SLASH" + Math.random() + "\0";
133
+ var escOpen = "\0OPEN" + Math.random() + "\0";
134
+ var escClose = "\0CLOSE" + Math.random() + "\0";
135
+ var escComma = "\0COMMA" + Math.random() + "\0";
136
+ var escPeriod = "\0PERIOD" + Math.random() + "\0";
137
+ function numeric(str) {
138
+ return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
139
+ }
140
+ function escapeBraces(str) {
141
+ return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
142
+ }
143
+ function unescapeBraces(str) {
144
+ return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
145
+ }
146
+ function parseCommaParts(str) {
147
+ if (!str)
148
+ return [""];
149
+ var parts = [];
150
+ var m = balanced("{", "}", str);
151
+ if (!m)
152
+ return str.split(",");
153
+ var pre = m.pre;
154
+ var body = m.body;
155
+ var post = m.post;
156
+ var p = pre.split(",");
157
+ p[p.length - 1] += "{" + body + "}";
158
+ var postParts = parseCommaParts(post);
159
+ if (post.length) {
160
+ p[p.length - 1] += postParts.shift();
161
+ p.push.apply(p, postParts);
162
+ }
163
+ parts.push.apply(parts, p);
164
+ return parts;
165
+ }
166
+ function expandTop(str) {
167
+ if (!str)
168
+ return [];
169
+ if (str.substr(0, 2) === "{}") {
170
+ str = "\\{\\}" + str.substr(2);
171
+ }
172
+ return expand2(escapeBraces(str), true).map(unescapeBraces);
173
+ }
174
+ function embrace(str) {
175
+ return "{" + str + "}";
176
+ }
177
+ function isPadded(el) {
178
+ return /^-?0\d/.test(el);
179
+ }
180
+ function lte(i2, y) {
181
+ return i2 <= y;
182
+ }
183
+ function gte(i2, y) {
184
+ return i2 >= y;
185
+ }
186
+ function expand2(str, isTop) {
187
+ var expansions = [];
188
+ var m = balanced("{", "}", str);
189
+ if (!m) return [str];
190
+ var pre = m.pre;
191
+ var post = m.post.length ? expand2(m.post, false) : [""];
192
+ if (/\$$/.test(m.pre)) {
193
+ for (var k = 0; k < post.length; k++) {
194
+ var expansion = pre + "{" + m.body + "}" + post[k];
195
+ expansions.push(expansion);
196
+ }
197
+ } else {
198
+ var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
199
+ var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
200
+ var isSequence = isNumericSequence || isAlphaSequence;
201
+ var isOptions = m.body.indexOf(",") >= 0;
202
+ if (!isSequence && !isOptions) {
203
+ if (m.post.match(/,(?!,).*\}/)) {
204
+ str = m.pre + "{" + m.body + escClose + m.post;
205
+ return expand2(str);
206
+ }
207
+ return [str];
208
+ }
209
+ var n;
210
+ if (isSequence) {
211
+ n = m.body.split(/\.\./);
212
+ } else {
213
+ n = parseCommaParts(m.body);
214
+ if (n.length === 1) {
215
+ n = expand2(n[0], false).map(embrace);
216
+ if (n.length === 1) {
217
+ return post.map(function(p) {
218
+ return m.pre + n[0] + p;
219
+ });
220
+ }
221
+ }
222
+ }
223
+ var N;
224
+ if (isSequence) {
225
+ var x = numeric(n[0]);
226
+ var y = numeric(n[1]);
227
+ var width = Math.max(n[0].length, n[1].length);
228
+ var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
229
+ var test = lte;
230
+ var reverse = y < x;
231
+ if (reverse) {
232
+ incr *= -1;
233
+ test = gte;
234
+ }
235
+ var pad = n.some(isPadded);
236
+ N = [];
237
+ for (var i2 = x; test(i2, y); i2 += incr) {
238
+ var c;
239
+ if (isAlphaSequence) {
240
+ c = String.fromCharCode(i2);
241
+ if (c === "\\")
242
+ c = "";
243
+ } else {
244
+ c = String(i2);
245
+ if (pad) {
246
+ var need = width - c.length;
247
+ if (need > 0) {
248
+ var z = new Array(need + 1).join("0");
249
+ if (i2 < 0)
250
+ c = "-" + z + c.slice(1);
251
+ else
252
+ c = z + c;
253
+ }
254
+ }
255
+ }
256
+ N.push(c);
257
+ }
258
+ } else {
259
+ N = [];
260
+ for (var j = 0; j < n.length; j++) {
261
+ N.push.apply(N, expand2(n[j], false));
262
+ }
263
+ }
264
+ for (var j = 0; j < N.length; j++) {
265
+ for (var k = 0; k < post.length; k++) {
266
+ var expansion = pre + N[j] + post[k];
267
+ if (!isTop || isSequence || expansion)
268
+ expansions.push(expansion);
269
+ }
270
+ }
271
+ }
272
+ return expansions;
273
+ }
274
+ }
275
+ });
35
276
 
36
277
  // src/utils/constants.ts
37
278
  var SVG_NS = "http://www.w3.org/2000/svg";
@@ -60,6 +301,38 @@ var NonPrimitiveType = /* @__PURE__ */ ((NonPrimitiveType2) => {
60
301
  var TYPE_CONSTANT = "type";
61
302
  var VALUE_CONSTANT = "value";
62
303
  var SERIALIZED_PREFIX = "serialized:";
304
+ var reWireGetterSetter = (instance, hostRef) => {
305
+ var _a;
306
+ const cmpMeta = hostRef.$cmpMeta$;
307
+ const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
308
+ members.map(([memberName, [memberFlags]]) => {
309
+ if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
310
+ const ogValue = instance[memberName];
311
+ const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName) || Object.getOwnPropertyDescriptor(instance, memberName);
312
+ if (ogDescriptor) {
313
+ Object.defineProperty(instance, memberName, {
314
+ get() {
315
+ return ogDescriptor.get.call(this);
316
+ },
317
+ set(newValue) {
318
+ ogDescriptor.set.call(this, newValue);
319
+ },
320
+ configurable: true,
321
+ enumerable: true
322
+ });
323
+ }
324
+ instance[memberName] = hostRef.$instanceValues$.has(memberName) ? hostRef.$instanceValues$.get(memberName) : ogValue;
325
+ }
326
+ });
327
+ };
328
+ function getPropertyDescriptor(obj, memberName) {
329
+ while (obj) {
330
+ const desc = Object.getOwnPropertyDescriptor(obj, memberName);
331
+ if (desc == null ? void 0 : desc.get) return desc;
332
+ obj = Object.getPrototypeOf(obj);
333
+ }
334
+ return void 0;
335
+ }
63
336
 
64
337
  // src/client/client-host-ref.ts
65
338
  var getHostRef = (ref) => {
@@ -69,15 +342,20 @@ var getHostRef = (ref) => {
69
342
  return void 0;
70
343
  };
71
344
  var registerInstance = (lazyInstance, hostRef) => {
345
+ if (!hostRef) return;
72
346
  lazyInstance.__stencil__getHostRef = () => hostRef;
73
347
  hostRef.$lazyInstance$ = lazyInstance;
348
+ if (hostRef.$cmpMeta$.$flags$ & 512 /* hasModernPropertyDecls */ && (BUILD.state)) {
349
+ reWireGetterSetter(lazyInstance, hostRef);
350
+ }
74
351
  };
75
352
  var registerHost = (hostElement, cmpMeta) => {
76
353
  const hostRef = {
77
354
  $flags$: 0,
78
355
  $hostElement$: hostElement,
79
356
  $cmpMeta$: cmpMeta,
80
- $instanceValues$: /* @__PURE__ */ new Map()
357
+ $instanceValues$: /* @__PURE__ */ new Map(),
358
+ $serializerValues$: /* @__PURE__ */ new Map()
81
359
  };
82
360
  {
83
361
  hostRef.$onInstancePromise$ = new Promise((r) => hostRef.$onInstanceResolve$ = r);
@@ -87,6 +365,9 @@ var registerHost = (hostElement, cmpMeta) => {
87
365
  hostElement["s-p"] = [];
88
366
  hostElement["s-rc"] = [];
89
367
  }
368
+ {
369
+ hostRef.$fetchedCbList$ = [];
370
+ }
90
371
  const ref = hostRef;
91
372
  hostElement.__stencil__getHostRef = () => ref;
92
373
  return ref;
@@ -114,6 +395,18 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
114
395
  }
115
396
  switch(bundleId) {
116
397
 
398
+ case 'post-env-test.cjs':
399
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
400
+ /* webpackMode: "lazy" */
401
+ './post-env-test.cjs.entry.js')); }).then(processMod, consoleError);
402
+ case 'post-back-to-top.cjs':
403
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
404
+ /* webpackMode: "lazy" */
405
+ './post-back-to-top.cjs.entry.js')); }).then(processMod, consoleError);
406
+ case 'post-breadcrumbs.cjs':
407
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
408
+ /* webpackMode: "lazy" */
409
+ './post-breadcrumbs.cjs.entry.js')); }).then(processMod, consoleError);
117
410
  case 'post-card-control.cjs':
118
411
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
119
412
  /* webpackMode: "lazy" */
@@ -126,6 +419,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
126
419
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
127
420
  /* webpackMode: "lazy" */
128
421
  './post-linkarea.cjs.entry.js')); }).then(processMod, consoleError);
422
+ case 'post-pagination.cjs':
423
+ return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
424
+ /* webpackMode: "lazy" */
425
+ './post-pagination.cjs.entry.js')); }).then(processMod, consoleError);
129
426
  case 'post-popover.cjs':
130
427
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
131
428
  /* webpackMode: "lazy" */
@@ -146,10 +443,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
146
443
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
147
444
  /* webpackMode: "lazy" */
148
445
  './post-stepper-item.cjs.entry.js')); }).then(processMod, consoleError);
149
- case 'post-tab-header.cjs':
446
+ case 'post-tab-item.cjs':
150
447
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
151
448
  /* webpackMode: "lazy" */
152
- './post-tab-header.cjs.entry.js')); }).then(processMod, consoleError);
449
+ './post-tab-item.cjs.entry.js')); }).then(processMod, consoleError);
153
450
  case 'post-tab-panel.cjs':
154
451
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
155
452
  /* webpackMode: "lazy" */
@@ -166,18 +463,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
166
463
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
167
464
  /* webpackMode: "lazy" */
168
465
  './post-avatar.cjs.entry.js')); }).then(processMod, consoleError);
169
- case 'post-back-to-top.cjs':
170
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
171
- /* webpackMode: "lazy" */
172
- './post-back-to-top.cjs.entry.js')); }).then(processMod, consoleError);
173
466
  case 'post-banner.cjs':
174
467
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
175
468
  /* webpackMode: "lazy" */
176
469
  './post-banner.cjs.entry.js')); }).then(processMod, consoleError);
177
- case 'post-breadcrumbs.cjs':
178
- return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
179
- /* webpackMode: "lazy" */
180
- './post-breadcrumbs.cjs.entry.js')); }).then(processMod, consoleError);
181
470
  case 'post-tabs.cjs':
182
471
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
183
472
  /* webpackMode: "lazy" */
@@ -194,10 +483,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
194
483
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
195
484
  /* webpackMode: "lazy" */
196
485
  './post-collapsible_2.cjs.entry.js')); }).then(processMod, consoleError);
197
- case 'post-closebutton_15.cjs':
486
+ case 'post-closebutton_13.cjs':
198
487
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
199
488
  /* webpackMode: "lazy" */
200
- './post-closebutton_15.cjs.entry.js')); }).then(processMod, consoleError);
489
+ './post-closebutton_13.cjs.entry.js')); }).then(processMod, consoleError);
201
490
  }
202
491
  }
203
492
  return (function (t) { return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(t)); }); })(
@@ -269,12 +558,16 @@ var supportsListenerOptions = /* @__PURE__ */ (() => {
269
558
  var promiseResolve = (v) => Promise.resolve(v);
270
559
  var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
271
560
  try {
561
+ if (!win.document.adoptedStyleSheets) {
562
+ return false;
563
+ }
272
564
  new CSSStyleSheet();
273
565
  return typeof new CSSStyleSheet().replaceSync === "function";
274
566
  } catch (e) {
275
567
  }
276
568
  return false;
277
569
  })() ;
570
+ var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @__PURE__ */ (() => !!win.document && Object.getOwnPropertyDescriptor(win.document.adoptedStyleSheets, "length").writable)() : false;
278
571
  var queuePending = false;
279
572
  var queueDomReads = [];
280
573
  var queueDomWrites = [];
@@ -315,6 +608,1359 @@ var isComplexType = (o) => {
315
608
  return o === "object" || o === "function";
316
609
  };
317
610
 
611
+ // node_modules/minimatch/dist/esm/index.js
612
+ var import_brace_expansion = __toESM(require_brace_expansion());
613
+
614
+ // node_modules/minimatch/dist/esm/assert-valid-pattern.js
615
+ var MAX_PATTERN_LENGTH = 1024 * 64;
616
+ var assertValidPattern = (pattern) => {
617
+ if (typeof pattern !== "string") {
618
+ throw new TypeError("invalid pattern");
619
+ }
620
+ if (pattern.length > MAX_PATTERN_LENGTH) {
621
+ throw new TypeError("pattern is too long");
622
+ }
623
+ };
624
+
625
+ // node_modules/minimatch/dist/esm/brace-expressions.js
626
+ var posixClasses = {
627
+ "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
628
+ "[:alpha:]": ["\\p{L}\\p{Nl}", true],
629
+ "[:ascii:]": ["\\x00-\\x7f", false],
630
+ "[:blank:]": ["\\p{Zs}\\t", true],
631
+ "[:cntrl:]": ["\\p{Cc}", true],
632
+ "[:digit:]": ["\\p{Nd}", true],
633
+ "[:graph:]": ["\\p{Z}\\p{C}", true, true],
634
+ "[:lower:]": ["\\p{Ll}", true],
635
+ "[:print:]": ["\\p{C}", true],
636
+ "[:punct:]": ["\\p{P}", true],
637
+ "[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", true],
638
+ "[:upper:]": ["\\p{Lu}", true],
639
+ "[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", true],
640
+ "[:xdigit:]": ["A-Fa-f0-9", false]
641
+ };
642
+ var braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&");
643
+ var regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
644
+ var rangesToString = (ranges) => ranges.join("");
645
+ var parseClass = (glob, position) => {
646
+ const pos = position;
647
+ if (glob.charAt(pos) !== "[") {
648
+ throw new Error("not in a brace expression");
649
+ }
650
+ const ranges = [];
651
+ const negs = [];
652
+ let i2 = pos + 1;
653
+ let sawStart = false;
654
+ let uflag = false;
655
+ let escaping = false;
656
+ let negate = false;
657
+ let endPos = pos;
658
+ let rangeStart = "";
659
+ WHILE: while (i2 < glob.length) {
660
+ const c = glob.charAt(i2);
661
+ if ((c === "!" || c === "^") && i2 === pos + 1) {
662
+ negate = true;
663
+ i2++;
664
+ continue;
665
+ }
666
+ if (c === "]" && sawStart && !escaping) {
667
+ endPos = i2 + 1;
668
+ break;
669
+ }
670
+ sawStart = true;
671
+ if (c === "\\") {
672
+ if (!escaping) {
673
+ escaping = true;
674
+ i2++;
675
+ continue;
676
+ }
677
+ }
678
+ if (c === "[" && !escaping) {
679
+ for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
680
+ if (glob.startsWith(cls, i2)) {
681
+ if (rangeStart) {
682
+ return ["$.", false, glob.length - pos, true];
683
+ }
684
+ i2 += cls.length;
685
+ if (neg)
686
+ negs.push(unip);
687
+ else
688
+ ranges.push(unip);
689
+ uflag = uflag || u;
690
+ continue WHILE;
691
+ }
692
+ }
693
+ }
694
+ escaping = false;
695
+ if (rangeStart) {
696
+ if (c > rangeStart) {
697
+ ranges.push(braceEscape(rangeStart) + "-" + braceEscape(c));
698
+ } else if (c === rangeStart) {
699
+ ranges.push(braceEscape(c));
700
+ }
701
+ rangeStart = "";
702
+ i2++;
703
+ continue;
704
+ }
705
+ if (glob.startsWith("-]", i2 + 1)) {
706
+ ranges.push(braceEscape(c + "-"));
707
+ i2 += 2;
708
+ continue;
709
+ }
710
+ if (glob.startsWith("-", i2 + 1)) {
711
+ rangeStart = c;
712
+ i2 += 2;
713
+ continue;
714
+ }
715
+ ranges.push(braceEscape(c));
716
+ i2++;
717
+ }
718
+ if (endPos < i2) {
719
+ return ["", false, 0, false];
720
+ }
721
+ if (!ranges.length && !negs.length) {
722
+ return ["$.", false, glob.length - pos, true];
723
+ }
724
+ if (negs.length === 0 && ranges.length === 1 && /^\\?.$/.test(ranges[0]) && !negate) {
725
+ const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
726
+ return [regexpEscape(r), false, endPos - pos, false];
727
+ }
728
+ const sranges = "[" + (negate ? "^" : "") + rangesToString(ranges) + "]";
729
+ const snegs = "[" + (negate ? "" : "^") + rangesToString(negs) + "]";
730
+ const comb = ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs;
731
+ return [comb, uflag, endPos - pos, true];
732
+ };
733
+
734
+ // node_modules/minimatch/dist/esm/unescape.js
735
+ var unescape = (s, { windowsPathsNoEscape = false } = {}) => {
736
+ return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
737
+ };
738
+
739
+ // node_modules/minimatch/dist/esm/ast.js
740
+ var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
741
+ var isExtglobType = (c) => types.has(c);
742
+ var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
743
+ var startNoDot = "(?!\\.)";
744
+ var addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
745
+ var justDots = /* @__PURE__ */ new Set(["..", "."]);
746
+ var reSpecials = new Set("().*{}+?[]^$\\!");
747
+ var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
748
+ var qmark = "[^/]";
749
+ var star = qmark + "*?";
750
+ var starNoEmpty = qmark + "+?";
751
+ var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, partsToRegExp_fn, parseGlob_fn;
752
+ var _AST = class _AST {
753
+ constructor(type, parent, options = {}) {
754
+ __privateAdd(this, _AST_instances);
755
+ __publicField(this, "type");
756
+ __privateAdd(this, _root);
757
+ __privateAdd(this, _hasMagic);
758
+ __privateAdd(this, _uflag, false);
759
+ __privateAdd(this, _parts, []);
760
+ __privateAdd(this, _parent);
761
+ __privateAdd(this, _parentIndex);
762
+ __privateAdd(this, _negs);
763
+ __privateAdd(this, _filledNegs, false);
764
+ __privateAdd(this, _options);
765
+ __privateAdd(this, _toString);
766
+ // set to true if it's an extglob with no children
767
+ // (which really means one child of '')
768
+ __privateAdd(this, _emptyExt, false);
769
+ this.type = type;
770
+ if (type)
771
+ __privateSet(this, _hasMagic, true);
772
+ __privateSet(this, _parent, parent);
773
+ __privateSet(this, _root, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _root) : this);
774
+ __privateSet(this, _options, __privateGet(this, _root) === this ? options : __privateGet(__privateGet(this, _root), _options));
775
+ __privateSet(this, _negs, __privateGet(this, _root) === this ? [] : __privateGet(__privateGet(this, _root), _negs));
776
+ if (type === "!" && !__privateGet(__privateGet(this, _root), _filledNegs))
777
+ __privateGet(this, _negs).push(this);
778
+ __privateSet(this, _parentIndex, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0);
779
+ }
780
+ get hasMagic() {
781
+ if (__privateGet(this, _hasMagic) !== void 0)
782
+ return __privateGet(this, _hasMagic);
783
+ for (const p of __privateGet(this, _parts)) {
784
+ if (typeof p === "string")
785
+ continue;
786
+ if (p.type || p.hasMagic)
787
+ return __privateSet(this, _hasMagic, true);
788
+ }
789
+ return __privateGet(this, _hasMagic);
790
+ }
791
+ // reconstructs the pattern
792
+ toString() {
793
+ if (__privateGet(this, _toString) !== void 0)
794
+ return __privateGet(this, _toString);
795
+ if (!this.type) {
796
+ return __privateSet(this, _toString, __privateGet(this, _parts).map((p) => String(p)).join(""));
797
+ } else {
798
+ return __privateSet(this, _toString, this.type + "(" + __privateGet(this, _parts).map((p) => String(p)).join("|") + ")");
799
+ }
800
+ }
801
+ push(...parts) {
802
+ for (const p of parts) {
803
+ if (p === "")
804
+ continue;
805
+ if (typeof p !== "string" && !(p instanceof _AST && __privateGet(p, _parent) === this)) {
806
+ throw new Error("invalid part: " + p);
807
+ }
808
+ __privateGet(this, _parts).push(p);
809
+ }
810
+ }
811
+ toJSON() {
812
+ var _a;
813
+ const ret = this.type === null ? __privateGet(this, _parts).slice().map((p) => typeof p === "string" ? p : p.toJSON()) : [this.type, ...__privateGet(this, _parts).map((p) => p.toJSON())];
814
+ if (this.isStart() && !this.type)
815
+ ret.unshift([]);
816
+ if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")) {
817
+ ret.push({});
818
+ }
819
+ return ret;
820
+ }
821
+ isStart() {
822
+ var _a;
823
+ if (__privateGet(this, _root) === this)
824
+ return true;
825
+ if (!((_a = __privateGet(this, _parent)) == null ? void 0 : _a.isStart()))
826
+ return false;
827
+ if (__privateGet(this, _parentIndex) === 0)
828
+ return true;
829
+ const p = __privateGet(this, _parent);
830
+ for (let i2 = 0; i2 < __privateGet(this, _parentIndex); i2++) {
831
+ const pp = __privateGet(p, _parts)[i2];
832
+ if (!(pp instanceof _AST && pp.type === "!")) {
833
+ return false;
834
+ }
835
+ }
836
+ return true;
837
+ }
838
+ isEnd() {
839
+ var _a, _b, _c;
840
+ if (__privateGet(this, _root) === this)
841
+ return true;
842
+ if (((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")
843
+ return true;
844
+ if (!((_b = __privateGet(this, _parent)) == null ? void 0 : _b.isEnd()))
845
+ return false;
846
+ if (!this.type)
847
+ return (_c = __privateGet(this, _parent)) == null ? void 0 : _c.isEnd();
848
+ const pl = __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0;
849
+ return __privateGet(this, _parentIndex) === pl - 1;
850
+ }
851
+ copyIn(part) {
852
+ if (typeof part === "string")
853
+ this.push(part);
854
+ else
855
+ this.push(part.clone(this));
856
+ }
857
+ clone(parent) {
858
+ const c = new _AST(this.type, parent);
859
+ for (const p of __privateGet(this, _parts)) {
860
+ c.copyIn(p);
861
+ }
862
+ return c;
863
+ }
864
+ static fromGlob(pattern, options = {}) {
865
+ var _a;
866
+ const ast = new _AST(null, void 0, options);
867
+ __privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, pattern, ast, 0, options);
868
+ return ast;
869
+ }
870
+ // returns the regular expression if there's magic, or the unescaped
871
+ // string if not.
872
+ toMMPattern() {
873
+ if (this !== __privateGet(this, _root))
874
+ return __privateGet(this, _root).toMMPattern();
875
+ const glob = this.toString();
876
+ const [re, body, hasMagic, uflag] = this.toRegExpSource();
877
+ const anyMagic = hasMagic || __privateGet(this, _hasMagic) || __privateGet(this, _options).nocase && !__privateGet(this, _options).nocaseMagicOnly && glob.toUpperCase() !== glob.toLowerCase();
878
+ if (!anyMagic) {
879
+ return body;
880
+ }
881
+ const flags = (__privateGet(this, _options).nocase ? "i" : "") + (uflag ? "u" : "");
882
+ return Object.assign(new RegExp(`^${re}$`, flags), {
883
+ _src: re,
884
+ _glob: glob
885
+ });
886
+ }
887
+ get options() {
888
+ return __privateGet(this, _options);
889
+ }
890
+ // returns the string match, the regexp source, whether there's magic
891
+ // in the regexp (so a regular expression is required) and whether or
892
+ // not the uflag is needed for the regular expression (for posix classes)
893
+ // TODO: instead of injecting the start/end at this point, just return
894
+ // the BODY of the regexp, along with the start/end portions suitable
895
+ // for binding the start/end in either a joined full-path makeRe context
896
+ // (where we bind to (^|/), or a standalone matchPart context (where
897
+ // we bind to ^, and not /). Otherwise slashes get duped!
898
+ //
899
+ // In part-matching mode, the start is:
900
+ // - if not isStart: nothing
901
+ // - if traversal possible, but not allowed: ^(?!\.\.?$)
902
+ // - if dots allowed or not possible: ^
903
+ // - if dots possible and not allowed: ^(?!\.)
904
+ // end is:
905
+ // - if not isEnd(): nothing
906
+ // - else: $
907
+ //
908
+ // In full-path matching mode, we put the slash at the START of the
909
+ // pattern, so start is:
910
+ // - if first pattern: same as part-matching mode
911
+ // - if not isStart(): nothing
912
+ // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
913
+ // - if dots allowed or not possible: /
914
+ // - if dots possible and not allowed: /(?!\.)
915
+ // end is:
916
+ // - if last pattern, same as part-matching mode
917
+ // - else nothing
918
+ //
919
+ // Always put the (?:$|/) on negated tails, though, because that has to be
920
+ // there to bind the end of the negated pattern portion, and it's easier to
921
+ // just stick it in now rather than try to inject it later in the middle of
922
+ // the pattern.
923
+ //
924
+ // We can just always return the same end, and leave it up to the caller
925
+ // to know whether it's going to be used joined or in parts.
926
+ // And, if the start is adjusted slightly, can do the same there:
927
+ // - if not isStart: nothing
928
+ // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
929
+ // - if dots allowed or not possible: (?:/|^)
930
+ // - if dots possible and not allowed: (?:/|^)(?!\.)
931
+ //
932
+ // But it's better to have a simpler binding without a conditional, for
933
+ // performance, so probably better to return both start options.
934
+ //
935
+ // Then the caller just ignores the end if it's not the first pattern,
936
+ // and the start always gets applied.
937
+ //
938
+ // But that's always going to be $ if it's the ending pattern, or nothing,
939
+ // so the caller can just attach $ at the end of the pattern when building.
940
+ //
941
+ // So the todo is:
942
+ // - better detect what kind of start is needed
943
+ // - return both flavors of starting pattern
944
+ // - attach $ at the end of the pattern when creating the actual RegExp
945
+ //
946
+ // Ah, but wait, no, that all only applies to the root when the first pattern
947
+ // is not an extglob. If the first pattern IS an extglob, then we need all
948
+ // that dot prevention biz to live in the extglob portions, because eg
949
+ // +(*|.x*) can match .xy but not .yx.
950
+ //
951
+ // So, return the two flavors if it's #root and the first child is not an
952
+ // AST, otherwise leave it to the child AST to handle it, and there,
953
+ // use the (?:^|/) style of start binding.
954
+ //
955
+ // Even simplified further:
956
+ // - Since the start for a join is eg /(?!\.) and the start for a part
957
+ // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
958
+ // or start or whatever) and prepend ^ or / at the Regexp construction.
959
+ toRegExpSource(allowDot) {
960
+ var _a;
961
+ const dot = allowDot != null ? allowDot : !!__privateGet(this, _options).dot;
962
+ if (__privateGet(this, _root) === this)
963
+ __privateMethod(this, _AST_instances, fillNegs_fn).call(this);
964
+ if (!this.type) {
965
+ const noEmpty = this.isStart() && this.isEnd();
966
+ const src = __privateGet(this, _parts).map((p) => {
967
+ var _a2;
968
+ const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a2 = _AST, _AST_static, parseGlob_fn).call(_a2, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot);
969
+ __privateSet(this, _hasMagic, __privateGet(this, _hasMagic) || hasMagic);
970
+ __privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
971
+ return re;
972
+ }).join("");
973
+ let start2 = "";
974
+ if (this.isStart()) {
975
+ if (typeof __privateGet(this, _parts)[0] === "string") {
976
+ const dotTravAllowed = __privateGet(this, _parts).length === 1 && justDots.has(__privateGet(this, _parts)[0]);
977
+ if (!dotTravAllowed) {
978
+ const aps = addPatternStart;
979
+ const needNoTrav = (
980
+ // dots are allowed, and the pattern starts with [ or .
981
+ dot && aps.has(src.charAt(0)) || // the pattern starts with \., and then [ or .
982
+ src.startsWith("\\.") && aps.has(src.charAt(2)) || // the pattern starts with \.\., and then [ or .
983
+ src.startsWith("\\.\\.") && aps.has(src.charAt(4))
984
+ );
985
+ const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
986
+ start2 = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : "";
987
+ }
988
+ }
989
+ }
990
+ let end = "";
991
+ if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!") {
992
+ end = "(?:$|\\/)";
993
+ }
994
+ const final2 = start2 + src + end;
995
+ return [
996
+ final2,
997
+ unescape(src),
998
+ __privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)),
999
+ __privateGet(this, _uflag)
1000
+ ];
1001
+ }
1002
+ const repeated = this.type === "*" || this.type === "+";
1003
+ const start = this.type === "!" ? "(?:(?!(?:" : "(?:";
1004
+ let body = __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, dot);
1005
+ if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
1006
+ const s = this.toString();
1007
+ __privateSet(this, _parts, [s]);
1008
+ this.type = null;
1009
+ __privateSet(this, _hasMagic, void 0);
1010
+ return [s, unescape(this.toString()), false, false];
1011
+ }
1012
+ let bodyDotAllowed = !repeated || allowDot || dot || false ? "" : __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, true);
1013
+ if (bodyDotAllowed === body) {
1014
+ bodyDotAllowed = "";
1015
+ }
1016
+ if (bodyDotAllowed) {
1017
+ body = `(?:${body})(?:${bodyDotAllowed})*?`;
1018
+ }
1019
+ let final = "";
1020
+ if (this.type === "!" && __privateGet(this, _emptyExt)) {
1021
+ final = (this.isStart() && !dot ? startNoDot : "") + starNoEmpty;
1022
+ } else {
1023
+ const close = this.type === "!" ? (
1024
+ // !() must match something,but !(x) can match ''
1025
+ "))" + (this.isStart() && !dot && !allowDot ? startNoDot : "") + star + ")"
1026
+ ) : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && bodyDotAllowed ? ")" : this.type === "*" && bodyDotAllowed ? `)?` : `)${this.type}`;
1027
+ final = start + body + close;
1028
+ }
1029
+ return [
1030
+ final,
1031
+ unescape(body),
1032
+ __privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)),
1033
+ __privateGet(this, _uflag)
1034
+ ];
1035
+ }
1036
+ };
1037
+ _root = new WeakMap();
1038
+ _hasMagic = new WeakMap();
1039
+ _uflag = new WeakMap();
1040
+ _parts = new WeakMap();
1041
+ _parent = new WeakMap();
1042
+ _parentIndex = new WeakMap();
1043
+ _negs = new WeakMap();
1044
+ _filledNegs = new WeakMap();
1045
+ _options = new WeakMap();
1046
+ _toString = new WeakMap();
1047
+ _emptyExt = new WeakMap();
1048
+ _AST_instances = new WeakSet();
1049
+ fillNegs_fn = function() {
1050
+ if (this !== __privateGet(this, _root))
1051
+ throw new Error("should only call on root");
1052
+ if (__privateGet(this, _filledNegs))
1053
+ return this;
1054
+ this.toString();
1055
+ __privateSet(this, _filledNegs, true);
1056
+ let n;
1057
+ while (n = __privateGet(this, _negs).pop()) {
1058
+ if (n.type !== "!")
1059
+ continue;
1060
+ let p = n;
1061
+ let pp = __privateGet(p, _parent);
1062
+ while (pp) {
1063
+ for (let i2 = __privateGet(p, _parentIndex) + 1; !pp.type && i2 < __privateGet(pp, _parts).length; i2++) {
1064
+ for (const part of __privateGet(n, _parts)) {
1065
+ if (typeof part === "string") {
1066
+ throw new Error("string part in extglob AST??");
1067
+ }
1068
+ part.copyIn(__privateGet(pp, _parts)[i2]);
1069
+ }
1070
+ }
1071
+ p = pp;
1072
+ pp = __privateGet(p, _parent);
1073
+ }
1074
+ }
1075
+ return this;
1076
+ };
1077
+ _AST_static = new WeakSet();
1078
+ parseAST_fn = function(str, ast, pos, opt) {
1079
+ var _a, _b;
1080
+ let escaping = false;
1081
+ let inBrace = false;
1082
+ let braceStart = -1;
1083
+ let braceNeg = false;
1084
+ if (ast.type === null) {
1085
+ let i3 = pos;
1086
+ let acc2 = "";
1087
+ while (i3 < str.length) {
1088
+ const c = str.charAt(i3++);
1089
+ if (escaping || c === "\\") {
1090
+ escaping = !escaping;
1091
+ acc2 += c;
1092
+ continue;
1093
+ }
1094
+ if (inBrace) {
1095
+ if (i3 === braceStart + 1) {
1096
+ if (c === "^" || c === "!") {
1097
+ braceNeg = true;
1098
+ }
1099
+ } else if (c === "]" && !(i3 === braceStart + 2 && braceNeg)) {
1100
+ inBrace = false;
1101
+ }
1102
+ acc2 += c;
1103
+ continue;
1104
+ } else if (c === "[") {
1105
+ inBrace = true;
1106
+ braceStart = i3;
1107
+ braceNeg = false;
1108
+ acc2 += c;
1109
+ continue;
1110
+ }
1111
+ if (!opt.noext && isExtglobType(c) && str.charAt(i3) === "(") {
1112
+ ast.push(acc2);
1113
+ acc2 = "";
1114
+ const ext2 = new _AST(c, ast);
1115
+ i3 = __privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, str, ext2, i3, opt);
1116
+ ast.push(ext2);
1117
+ continue;
1118
+ }
1119
+ acc2 += c;
1120
+ }
1121
+ ast.push(acc2);
1122
+ return i3;
1123
+ }
1124
+ let i2 = pos + 1;
1125
+ let part = new _AST(null, ast);
1126
+ const parts = [];
1127
+ let acc = "";
1128
+ while (i2 < str.length) {
1129
+ const c = str.charAt(i2++);
1130
+ if (escaping || c === "\\") {
1131
+ escaping = !escaping;
1132
+ acc += c;
1133
+ continue;
1134
+ }
1135
+ if (inBrace) {
1136
+ if (i2 === braceStart + 1) {
1137
+ if (c === "^" || c === "!") {
1138
+ braceNeg = true;
1139
+ }
1140
+ } else if (c === "]" && !(i2 === braceStart + 2 && braceNeg)) {
1141
+ inBrace = false;
1142
+ }
1143
+ acc += c;
1144
+ continue;
1145
+ } else if (c === "[") {
1146
+ inBrace = true;
1147
+ braceStart = i2;
1148
+ braceNeg = false;
1149
+ acc += c;
1150
+ continue;
1151
+ }
1152
+ if (isExtglobType(c) && str.charAt(i2) === "(") {
1153
+ part.push(acc);
1154
+ acc = "";
1155
+ const ext2 = new _AST(c, part);
1156
+ part.push(ext2);
1157
+ i2 = __privateMethod(_b = _AST, _AST_static, parseAST_fn).call(_b, str, ext2, i2, opt);
1158
+ continue;
1159
+ }
1160
+ if (c === "|") {
1161
+ part.push(acc);
1162
+ acc = "";
1163
+ parts.push(part);
1164
+ part = new _AST(null, ast);
1165
+ continue;
1166
+ }
1167
+ if (c === ")") {
1168
+ if (acc === "" && __privateGet(ast, _parts).length === 0) {
1169
+ __privateSet(ast, _emptyExt, true);
1170
+ }
1171
+ part.push(acc);
1172
+ acc = "";
1173
+ ast.push(...parts, part);
1174
+ return i2;
1175
+ }
1176
+ acc += c;
1177
+ }
1178
+ ast.type = null;
1179
+ __privateSet(ast, _hasMagic, void 0);
1180
+ __privateSet(ast, _parts, [str.substring(pos - 1)]);
1181
+ return i2;
1182
+ };
1183
+ partsToRegExp_fn = function(dot) {
1184
+ return __privateGet(this, _parts).map((p) => {
1185
+ if (typeof p === "string") {
1186
+ throw new Error("string type in extglob ast??");
1187
+ }
1188
+ const [re, _, _hasMagic2, uflag] = p.toRegExpSource(dot);
1189
+ __privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
1190
+ return re;
1191
+ }).filter((p) => !(this.isStart() && this.isEnd()) || !!p).join("|");
1192
+ };
1193
+ parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
1194
+ let escaping = false;
1195
+ let re = "";
1196
+ let uflag = false;
1197
+ for (let i2 = 0; i2 < glob.length; i2++) {
1198
+ const c = glob.charAt(i2);
1199
+ if (escaping) {
1200
+ escaping = false;
1201
+ re += (reSpecials.has(c) ? "\\" : "") + c;
1202
+ continue;
1203
+ }
1204
+ if (c === "\\") {
1205
+ if (i2 === glob.length - 1) {
1206
+ re += "\\\\";
1207
+ } else {
1208
+ escaping = true;
1209
+ }
1210
+ continue;
1211
+ }
1212
+ if (c === "[") {
1213
+ const [src, needUflag, consumed, magic] = parseClass(glob, i2);
1214
+ if (consumed) {
1215
+ re += src;
1216
+ uflag = uflag || needUflag;
1217
+ i2 += consumed - 1;
1218
+ hasMagic = hasMagic || magic;
1219
+ continue;
1220
+ }
1221
+ }
1222
+ if (c === "*") {
1223
+ if (noEmpty && glob === "*")
1224
+ re += starNoEmpty;
1225
+ else
1226
+ re += star;
1227
+ hasMagic = true;
1228
+ continue;
1229
+ }
1230
+ if (c === "?") {
1231
+ re += qmark;
1232
+ hasMagic = true;
1233
+ continue;
1234
+ }
1235
+ re += regExpEscape(c);
1236
+ }
1237
+ return [re, unescape(glob), !!hasMagic, uflag];
1238
+ };
1239
+ __privateAdd(_AST, _AST_static);
1240
+ var AST = _AST;
1241
+
1242
+ // node_modules/minimatch/dist/esm/escape.js
1243
+ var escape = (s, { windowsPathsNoEscape = false } = {}) => {
1244
+ return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
1245
+ };
1246
+
1247
+ // node_modules/minimatch/dist/esm/index.js
1248
+ var minimatch = (p, pattern, options = {}) => {
1249
+ assertValidPattern(pattern);
1250
+ if (!options.nocomment && pattern.charAt(0) === "#") {
1251
+ return false;
1252
+ }
1253
+ return new Minimatch(pattern, options).match(p);
1254
+ };
1255
+ var starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
1256
+ var starDotExtTest = (ext2) => (f) => !f.startsWith(".") && f.endsWith(ext2);
1257
+ var starDotExtTestDot = (ext2) => (f) => f.endsWith(ext2);
1258
+ var starDotExtTestNocase = (ext2) => {
1259
+ ext2 = ext2.toLowerCase();
1260
+ return (f) => !f.startsWith(".") && f.toLowerCase().endsWith(ext2);
1261
+ };
1262
+ var starDotExtTestNocaseDot = (ext2) => {
1263
+ ext2 = ext2.toLowerCase();
1264
+ return (f) => f.toLowerCase().endsWith(ext2);
1265
+ };
1266
+ var starDotStarRE = /^\*+\.\*+$/;
1267
+ var starDotStarTest = (f) => !f.startsWith(".") && f.includes(".");
1268
+ var starDotStarTestDot = (f) => f !== "." && f !== ".." && f.includes(".");
1269
+ var dotStarRE = /^\.\*+$/;
1270
+ var dotStarTest = (f) => f !== "." && f !== ".." && f.startsWith(".");
1271
+ var starRE = /^\*+$/;
1272
+ var starTest = (f) => f.length !== 0 && !f.startsWith(".");
1273
+ var starTestDot = (f) => f.length !== 0 && f !== "." && f !== "..";
1274
+ var qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
1275
+ var qmarksTestNocase = ([$0, ext2 = ""]) => {
1276
+ const noext = qmarksTestNoExt([$0]);
1277
+ if (!ext2)
1278
+ return noext;
1279
+ ext2 = ext2.toLowerCase();
1280
+ return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
1281
+ };
1282
+ var qmarksTestNocaseDot = ([$0, ext2 = ""]) => {
1283
+ const noext = qmarksTestNoExtDot([$0]);
1284
+ if (!ext2)
1285
+ return noext;
1286
+ ext2 = ext2.toLowerCase();
1287
+ return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
1288
+ };
1289
+ var qmarksTestDot = ([$0, ext2 = ""]) => {
1290
+ const noext = qmarksTestNoExtDot([$0]);
1291
+ return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
1292
+ };
1293
+ var qmarksTest = ([$0, ext2 = ""]) => {
1294
+ const noext = qmarksTestNoExt([$0]);
1295
+ return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
1296
+ };
1297
+ var qmarksTestNoExt = ([$0]) => {
1298
+ const len = $0.length;
1299
+ return (f) => f.length === len && !f.startsWith(".");
1300
+ };
1301
+ var qmarksTestNoExtDot = ([$0]) => {
1302
+ const len = $0.length;
1303
+ return (f) => f.length === len && f !== "." && f !== "..";
1304
+ };
1305
+ var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
1306
+ var path = {
1307
+ win32: { sep: "\\" },
1308
+ posix: { sep: "/" }
1309
+ };
1310
+ var sep = defaultPlatform === "win32" ? path.win32.sep : path.posix.sep;
1311
+ minimatch.sep = sep;
1312
+ var GLOBSTAR = Symbol("globstar **");
1313
+ minimatch.GLOBSTAR = GLOBSTAR;
1314
+ var qmark2 = "[^/]";
1315
+ var star2 = qmark2 + "*?";
1316
+ var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
1317
+ var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
1318
+ var filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
1319
+ minimatch.filter = filter;
1320
+ var ext = (a, b = {}) => Object.assign({}, a, b);
1321
+ var defaults = (def) => {
1322
+ if (!def || typeof def !== "object" || !Object.keys(def).length) {
1323
+ return minimatch;
1324
+ }
1325
+ const orig = minimatch;
1326
+ const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));
1327
+ return Object.assign(m, {
1328
+ Minimatch: class Minimatch extends orig.Minimatch {
1329
+ constructor(pattern, options = {}) {
1330
+ super(pattern, ext(def, options));
1331
+ }
1332
+ static defaults(options) {
1333
+ return orig.defaults(ext(def, options)).Minimatch;
1334
+ }
1335
+ },
1336
+ AST: class AST extends orig.AST {
1337
+ /* c8 ignore start */
1338
+ constructor(type, parent, options = {}) {
1339
+ super(type, parent, ext(def, options));
1340
+ }
1341
+ /* c8 ignore stop */
1342
+ static fromGlob(pattern, options = {}) {
1343
+ return orig.AST.fromGlob(pattern, ext(def, options));
1344
+ }
1345
+ },
1346
+ unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),
1347
+ escape: (s, options = {}) => orig.escape(s, ext(def, options)),
1348
+ filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),
1349
+ defaults: (options) => orig.defaults(ext(def, options)),
1350
+ makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),
1351
+ braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),
1352
+ match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),
1353
+ sep: orig.sep,
1354
+ GLOBSTAR
1355
+ });
1356
+ };
1357
+ minimatch.defaults = defaults;
1358
+ var braceExpand = (pattern, options = {}) => {
1359
+ assertValidPattern(pattern);
1360
+ if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
1361
+ return [pattern];
1362
+ }
1363
+ return (0, import_brace_expansion.default)(pattern);
1364
+ };
1365
+ minimatch.braceExpand = braceExpand;
1366
+ var makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
1367
+ minimatch.makeRe = makeRe;
1368
+ var match = (list, pattern, options = {}) => {
1369
+ const mm = new Minimatch(pattern, options);
1370
+ list = list.filter((f) => mm.match(f));
1371
+ if (mm.options.nonull && !list.length) {
1372
+ list.push(pattern);
1373
+ }
1374
+ return list;
1375
+ };
1376
+ minimatch.match = match;
1377
+ var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
1378
+ var regExpEscape2 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
1379
+ var Minimatch = class {
1380
+ options;
1381
+ set;
1382
+ pattern;
1383
+ windowsPathsNoEscape;
1384
+ nonegate;
1385
+ negate;
1386
+ comment;
1387
+ empty;
1388
+ preserveMultipleSlashes;
1389
+ partial;
1390
+ globSet;
1391
+ globParts;
1392
+ nocase;
1393
+ isWindows;
1394
+ platform;
1395
+ windowsNoMagicRoot;
1396
+ regexp;
1397
+ constructor(pattern, options = {}) {
1398
+ assertValidPattern(pattern);
1399
+ options = options || {};
1400
+ this.options = options;
1401
+ this.pattern = pattern;
1402
+ this.platform = options.platform || defaultPlatform;
1403
+ this.isWindows = this.platform === "win32";
1404
+ this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
1405
+ if (this.windowsPathsNoEscape) {
1406
+ this.pattern = this.pattern.replace(/\\/g, "/");
1407
+ }
1408
+ this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
1409
+ this.regexp = null;
1410
+ this.negate = false;
1411
+ this.nonegate = !!options.nonegate;
1412
+ this.comment = false;
1413
+ this.empty = false;
1414
+ this.partial = !!options.partial;
1415
+ this.nocase = !!this.options.nocase;
1416
+ this.windowsNoMagicRoot = options.windowsNoMagicRoot !== void 0 ? options.windowsNoMagicRoot : !!(this.isWindows && this.nocase);
1417
+ this.globSet = [];
1418
+ this.globParts = [];
1419
+ this.set = [];
1420
+ this.make();
1421
+ }
1422
+ hasMagic() {
1423
+ if (this.options.magicalBraces && this.set.length > 1) {
1424
+ return true;
1425
+ }
1426
+ for (const pattern of this.set) {
1427
+ for (const part of pattern) {
1428
+ if (typeof part !== "string")
1429
+ return true;
1430
+ }
1431
+ }
1432
+ return false;
1433
+ }
1434
+ debug(..._) {
1435
+ }
1436
+ make() {
1437
+ const pattern = this.pattern;
1438
+ const options = this.options;
1439
+ if (!options.nocomment && pattern.charAt(0) === "#") {
1440
+ this.comment = true;
1441
+ return;
1442
+ }
1443
+ if (!pattern) {
1444
+ this.empty = true;
1445
+ return;
1446
+ }
1447
+ this.parseNegate();
1448
+ this.globSet = [...new Set(this.braceExpand())];
1449
+ if (options.debug) {
1450
+ this.debug = (...args) => console.error(...args);
1451
+ }
1452
+ this.debug(this.pattern, this.globSet);
1453
+ const rawGlobParts = this.globSet.map((s) => this.slashSplit(s));
1454
+ this.globParts = this.preprocess(rawGlobParts);
1455
+ this.debug(this.pattern, this.globParts);
1456
+ let set = this.globParts.map((s, _, __) => {
1457
+ if (this.isWindows && this.windowsNoMagicRoot) {
1458
+ const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && !globMagic.test(s[3]);
1459
+ const isDrive = /^[a-z]:/i.test(s[0]);
1460
+ if (isUNC) {
1461
+ return [...s.slice(0, 4), ...s.slice(4).map((ss) => this.parse(ss))];
1462
+ } else if (isDrive) {
1463
+ return [s[0], ...s.slice(1).map((ss) => this.parse(ss))];
1464
+ }
1465
+ }
1466
+ return s.map((ss) => this.parse(ss));
1467
+ });
1468
+ this.debug(this.pattern, set);
1469
+ this.set = set.filter((s) => s.indexOf(false) === -1);
1470
+ if (this.isWindows) {
1471
+ for (let i2 = 0; i2 < this.set.length; i2++) {
1472
+ const p = this.set[i2];
1473
+ if (p[0] === "" && p[1] === "" && this.globParts[i2][2] === "?" && typeof p[3] === "string" && /^[a-z]:$/i.test(p[3])) {
1474
+ p[2] = "?";
1475
+ }
1476
+ }
1477
+ }
1478
+ this.debug(this.pattern, this.set);
1479
+ }
1480
+ // various transforms to equivalent pattern sets that are
1481
+ // faster to process in a filesystem walk. The goal is to
1482
+ // eliminate what we can, and push all ** patterns as far
1483
+ // to the right as possible, even if it increases the number
1484
+ // of patterns that we have to process.
1485
+ preprocess(globParts) {
1486
+ if (this.options.noglobstar) {
1487
+ for (let i2 = 0; i2 < globParts.length; i2++) {
1488
+ for (let j = 0; j < globParts[i2].length; j++) {
1489
+ if (globParts[i2][j] === "**") {
1490
+ globParts[i2][j] = "*";
1491
+ }
1492
+ }
1493
+ }
1494
+ }
1495
+ const { optimizationLevel = 1 } = this.options;
1496
+ if (optimizationLevel >= 2) {
1497
+ globParts = this.firstPhasePreProcess(globParts);
1498
+ globParts = this.secondPhasePreProcess(globParts);
1499
+ } else if (optimizationLevel >= 1) {
1500
+ globParts = this.levelOneOptimize(globParts);
1501
+ } else {
1502
+ globParts = this.adjascentGlobstarOptimize(globParts);
1503
+ }
1504
+ return globParts;
1505
+ }
1506
+ // just get rid of adjascent ** portions
1507
+ adjascentGlobstarOptimize(globParts) {
1508
+ return globParts.map((parts) => {
1509
+ let gs = -1;
1510
+ while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
1511
+ let i2 = gs;
1512
+ while (parts[i2 + 1] === "**") {
1513
+ i2++;
1514
+ }
1515
+ if (i2 !== gs) {
1516
+ parts.splice(gs, i2 - gs);
1517
+ }
1518
+ }
1519
+ return parts;
1520
+ });
1521
+ }
1522
+ // get rid of adjascent ** and resolve .. portions
1523
+ levelOneOptimize(globParts) {
1524
+ return globParts.map((parts) => {
1525
+ parts = parts.reduce((set, part) => {
1526
+ const prev = set[set.length - 1];
1527
+ if (part === "**" && prev === "**") {
1528
+ return set;
1529
+ }
1530
+ if (part === "..") {
1531
+ if (prev && prev !== ".." && prev !== "." && prev !== "**") {
1532
+ set.pop();
1533
+ return set;
1534
+ }
1535
+ }
1536
+ set.push(part);
1537
+ return set;
1538
+ }, []);
1539
+ return parts.length === 0 ? [""] : parts;
1540
+ });
1541
+ }
1542
+ levelTwoFileOptimize(parts) {
1543
+ if (!Array.isArray(parts)) {
1544
+ parts = this.slashSplit(parts);
1545
+ }
1546
+ let didSomething = false;
1547
+ do {
1548
+ didSomething = false;
1549
+ if (!this.preserveMultipleSlashes) {
1550
+ for (let i2 = 1; i2 < parts.length - 1; i2++) {
1551
+ const p = parts[i2];
1552
+ if (i2 === 1 && p === "" && parts[0] === "")
1553
+ continue;
1554
+ if (p === "." || p === "") {
1555
+ didSomething = true;
1556
+ parts.splice(i2, 1);
1557
+ i2--;
1558
+ }
1559
+ }
1560
+ if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
1561
+ didSomething = true;
1562
+ parts.pop();
1563
+ }
1564
+ }
1565
+ let dd = 0;
1566
+ while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
1567
+ const p = parts[dd - 1];
1568
+ if (p && p !== "." && p !== ".." && p !== "**") {
1569
+ didSomething = true;
1570
+ parts.splice(dd - 1, 2);
1571
+ dd -= 2;
1572
+ }
1573
+ }
1574
+ } while (didSomething);
1575
+ return parts.length === 0 ? [""] : parts;
1576
+ }
1577
+ // First phase: single-pattern processing
1578
+ // <pre> is 1 or more portions
1579
+ // <rest> is 1 or more portions
1580
+ // <p> is any portion other than ., .., '', or **
1581
+ // <e> is . or ''
1582
+ //
1583
+ // **/.. is *brutal* for filesystem walking performance, because
1584
+ // it effectively resets the recursive walk each time it occurs,
1585
+ // and ** cannot be reduced out by a .. pattern part like a regexp
1586
+ // or most strings (other than .., ., and '') can be.
1587
+ //
1588
+ // <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>}
1589
+ // <pre>/<e>/<rest> -> <pre>/<rest>
1590
+ // <pre>/<p>/../<rest> -> <pre>/<rest>
1591
+ // **/**/<rest> -> **/<rest>
1592
+ //
1593
+ // **/*/<rest> -> */**/<rest> <== not valid because ** doesn't follow
1594
+ // this WOULD be allowed if ** did follow symlinks, or * didn't
1595
+ firstPhasePreProcess(globParts) {
1596
+ let didSomething = false;
1597
+ do {
1598
+ didSomething = false;
1599
+ for (let parts of globParts) {
1600
+ let gs = -1;
1601
+ while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
1602
+ let gss = gs;
1603
+ while (parts[gss + 1] === "**") {
1604
+ gss++;
1605
+ }
1606
+ if (gss > gs) {
1607
+ parts.splice(gs + 1, gss - gs);
1608
+ }
1609
+ let next = parts[gs + 1];
1610
+ const p = parts[gs + 2];
1611
+ const p2 = parts[gs + 3];
1612
+ if (next !== "..")
1613
+ continue;
1614
+ if (!p || p === "." || p === ".." || !p2 || p2 === "." || p2 === "..") {
1615
+ continue;
1616
+ }
1617
+ didSomething = true;
1618
+ parts.splice(gs, 1);
1619
+ const other = parts.slice(0);
1620
+ other[gs] = "**";
1621
+ globParts.push(other);
1622
+ gs--;
1623
+ }
1624
+ if (!this.preserveMultipleSlashes) {
1625
+ for (let i2 = 1; i2 < parts.length - 1; i2++) {
1626
+ const p = parts[i2];
1627
+ if (i2 === 1 && p === "" && parts[0] === "")
1628
+ continue;
1629
+ if (p === "." || p === "") {
1630
+ didSomething = true;
1631
+ parts.splice(i2, 1);
1632
+ i2--;
1633
+ }
1634
+ }
1635
+ if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
1636
+ didSomething = true;
1637
+ parts.pop();
1638
+ }
1639
+ }
1640
+ let dd = 0;
1641
+ while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
1642
+ const p = parts[dd - 1];
1643
+ if (p && p !== "." && p !== ".." && p !== "**") {
1644
+ didSomething = true;
1645
+ const needDot = dd === 1 && parts[dd + 1] === "**";
1646
+ const splin = needDot ? ["."] : [];
1647
+ parts.splice(dd - 1, 2, ...splin);
1648
+ if (parts.length === 0)
1649
+ parts.push("");
1650
+ dd -= 2;
1651
+ }
1652
+ }
1653
+ }
1654
+ } while (didSomething);
1655
+ return globParts;
1656
+ }
1657
+ // second phase: multi-pattern dedupes
1658
+ // {<pre>/*/<rest>,<pre>/<p>/<rest>} -> <pre>/*/<rest>
1659
+ // {<pre>/<rest>,<pre>/<rest>} -> <pre>/<rest>
1660
+ // {<pre>/**/<rest>,<pre>/<rest>} -> <pre>/**/<rest>
1661
+ //
1662
+ // {<pre>/**/<rest>,<pre>/**/<p>/<rest>} -> <pre>/**/<rest>
1663
+ // ^-- not valid because ** doens't follow symlinks
1664
+ secondPhasePreProcess(globParts) {
1665
+ for (let i2 = 0; i2 < globParts.length - 1; i2++) {
1666
+ for (let j = i2 + 1; j < globParts.length; j++) {
1667
+ const matched = this.partsMatch(globParts[i2], globParts[j], !this.preserveMultipleSlashes);
1668
+ if (!matched)
1669
+ continue;
1670
+ globParts[i2] = matched;
1671
+ globParts[j] = [];
1672
+ }
1673
+ }
1674
+ return globParts.filter((gs) => gs.length);
1675
+ }
1676
+ partsMatch(a, b, emptyGSMatch = false) {
1677
+ let ai = 0;
1678
+ let bi = 0;
1679
+ let result = [];
1680
+ let which = "";
1681
+ while (ai < a.length && bi < b.length) {
1682
+ if (a[ai] === b[bi]) {
1683
+ result.push(which === "b" ? b[bi] : a[ai]);
1684
+ ai++;
1685
+ bi++;
1686
+ } else if (emptyGSMatch && a[ai] === "**" && b[bi] === a[ai + 1]) {
1687
+ result.push(a[ai]);
1688
+ ai++;
1689
+ } else if (emptyGSMatch && b[bi] === "**" && a[ai] === b[bi + 1]) {
1690
+ result.push(b[bi]);
1691
+ bi++;
1692
+ } else if (a[ai] === "*" && b[bi] && (this.options.dot || !b[bi].startsWith(".")) && b[bi] !== "**") {
1693
+ if (which === "b")
1694
+ return false;
1695
+ which = "a";
1696
+ result.push(a[ai]);
1697
+ ai++;
1698
+ bi++;
1699
+ } else if (b[bi] === "*" && a[ai] && (this.options.dot || !a[ai].startsWith(".")) && a[ai] !== "**") {
1700
+ if (which === "a")
1701
+ return false;
1702
+ which = "b";
1703
+ result.push(b[bi]);
1704
+ ai++;
1705
+ bi++;
1706
+ } else {
1707
+ return false;
1708
+ }
1709
+ }
1710
+ return a.length === b.length && result;
1711
+ }
1712
+ parseNegate() {
1713
+ if (this.nonegate)
1714
+ return;
1715
+ const pattern = this.pattern;
1716
+ let negate = false;
1717
+ let negateOffset = 0;
1718
+ for (let i2 = 0; i2 < pattern.length && pattern.charAt(i2) === "!"; i2++) {
1719
+ negate = !negate;
1720
+ negateOffset++;
1721
+ }
1722
+ if (negateOffset)
1723
+ this.pattern = pattern.slice(negateOffset);
1724
+ this.negate = negate;
1725
+ }
1726
+ // set partial to true to test if, for example,
1727
+ // "/a/b" matches the start of "/*/b/*/d"
1728
+ // Partial means, if you run out of file before you run
1729
+ // out of pattern, then that's fine, as long as all
1730
+ // the parts match.
1731
+ matchOne(file, pattern, partial = false) {
1732
+ const options = this.options;
1733
+ if (this.isWindows) {
1734
+ const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
1735
+ const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
1736
+ const patternDrive = typeof pattern[0] === "string" && /^[a-z]:$/i.test(pattern[0]);
1737
+ const patternUNC = !patternDrive && pattern[0] === "" && pattern[1] === "" && pattern[2] === "?" && typeof pattern[3] === "string" && /^[a-z]:$/i.test(pattern[3]);
1738
+ const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
1739
+ const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
1740
+ if (typeof fdi === "number" && typeof pdi === "number") {
1741
+ const [fd, pd] = [file[fdi], pattern[pdi]];
1742
+ if (fd.toLowerCase() === pd.toLowerCase()) {
1743
+ pattern[pdi] = fd;
1744
+ if (pdi > fdi) {
1745
+ pattern = pattern.slice(pdi);
1746
+ } else if (fdi > pdi) {
1747
+ file = file.slice(fdi);
1748
+ }
1749
+ }
1750
+ }
1751
+ }
1752
+ const { optimizationLevel = 1 } = this.options;
1753
+ if (optimizationLevel >= 2) {
1754
+ file = this.levelTwoFileOptimize(file);
1755
+ }
1756
+ this.debug("matchOne", this, { file, pattern });
1757
+ this.debug("matchOne", file.length, pattern.length);
1758
+ for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
1759
+ this.debug("matchOne loop");
1760
+ var p = pattern[pi];
1761
+ var f = file[fi];
1762
+ this.debug(pattern, p, f);
1763
+ if (p === false) {
1764
+ return false;
1765
+ }
1766
+ if (p === GLOBSTAR) {
1767
+ this.debug("GLOBSTAR", [pattern, p, f]);
1768
+ var fr = fi;
1769
+ var pr = pi + 1;
1770
+ if (pr === pl) {
1771
+ this.debug("** at the end");
1772
+ for (; fi < fl; fi++) {
1773
+ if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
1774
+ return false;
1775
+ }
1776
+ return true;
1777
+ }
1778
+ while (fr < fl) {
1779
+ var swallowee = file[fr];
1780
+ this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
1781
+ if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
1782
+ this.debug("globstar found match!", fr, fl, swallowee);
1783
+ return true;
1784
+ } else {
1785
+ if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
1786
+ this.debug("dot detected!", file, fr, pattern, pr);
1787
+ break;
1788
+ }
1789
+ this.debug("globstar swallow a segment, and continue");
1790
+ fr++;
1791
+ }
1792
+ }
1793
+ if (partial) {
1794
+ this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
1795
+ if (fr === fl) {
1796
+ return true;
1797
+ }
1798
+ }
1799
+ return false;
1800
+ }
1801
+ let hit;
1802
+ if (typeof p === "string") {
1803
+ hit = f === p;
1804
+ this.debug("string match", p, f, hit);
1805
+ } else {
1806
+ hit = p.test(f);
1807
+ this.debug("pattern match", p, f, hit);
1808
+ }
1809
+ if (!hit)
1810
+ return false;
1811
+ }
1812
+ if (fi === fl && pi === pl) {
1813
+ return true;
1814
+ } else if (fi === fl) {
1815
+ return partial;
1816
+ } else if (pi === pl) {
1817
+ return fi === fl - 1 && file[fi] === "";
1818
+ } else {
1819
+ throw new Error("wtf?");
1820
+ }
1821
+ }
1822
+ braceExpand() {
1823
+ return braceExpand(this.pattern, this.options);
1824
+ }
1825
+ parse(pattern) {
1826
+ assertValidPattern(pattern);
1827
+ const options = this.options;
1828
+ if (pattern === "**")
1829
+ return GLOBSTAR;
1830
+ if (pattern === "")
1831
+ return "";
1832
+ let m;
1833
+ let fastTest = null;
1834
+ if (m = pattern.match(starRE)) {
1835
+ fastTest = options.dot ? starTestDot : starTest;
1836
+ } else if (m = pattern.match(starDotExtRE)) {
1837
+ fastTest = (options.nocase ? options.dot ? starDotExtTestNocaseDot : starDotExtTestNocase : options.dot ? starDotExtTestDot : starDotExtTest)(m[1]);
1838
+ } else if (m = pattern.match(qmarksRE)) {
1839
+ fastTest = (options.nocase ? options.dot ? qmarksTestNocaseDot : qmarksTestNocase : options.dot ? qmarksTestDot : qmarksTest)(m);
1840
+ } else if (m = pattern.match(starDotStarRE)) {
1841
+ fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
1842
+ } else if (m = pattern.match(dotStarRE)) {
1843
+ fastTest = dotStarTest;
1844
+ }
1845
+ const re = AST.fromGlob(pattern, this.options).toMMPattern();
1846
+ if (fastTest && typeof re === "object") {
1847
+ Reflect.defineProperty(re, "test", { value: fastTest });
1848
+ }
1849
+ return re;
1850
+ }
1851
+ makeRe() {
1852
+ if (this.regexp || this.regexp === false)
1853
+ return this.regexp;
1854
+ const set = this.set;
1855
+ if (!set.length) {
1856
+ this.regexp = false;
1857
+ return this.regexp;
1858
+ }
1859
+ const options = this.options;
1860
+ const twoStar = options.noglobstar ? star2 : options.dot ? twoStarDot : twoStarNoDot;
1861
+ const flags = new Set(options.nocase ? ["i"] : []);
1862
+ let re = set.map((pattern) => {
1863
+ const pp = pattern.map((p) => {
1864
+ if (p instanceof RegExp) {
1865
+ for (const f of p.flags.split(""))
1866
+ flags.add(f);
1867
+ }
1868
+ return typeof p === "string" ? regExpEscape2(p) : p === GLOBSTAR ? GLOBSTAR : p._src;
1869
+ });
1870
+ pp.forEach((p, i2) => {
1871
+ const next = pp[i2 + 1];
1872
+ const prev = pp[i2 - 1];
1873
+ if (p !== GLOBSTAR || prev === GLOBSTAR) {
1874
+ return;
1875
+ }
1876
+ if (prev === void 0) {
1877
+ if (next !== void 0 && next !== GLOBSTAR) {
1878
+ pp[i2 + 1] = "(?:\\/|" + twoStar + "\\/)?" + next;
1879
+ } else {
1880
+ pp[i2] = twoStar;
1881
+ }
1882
+ } else if (next === void 0) {
1883
+ pp[i2 - 1] = prev + "(?:\\/|" + twoStar + ")?";
1884
+ } else if (next !== GLOBSTAR) {
1885
+ pp[i2 - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
1886
+ pp[i2 + 1] = GLOBSTAR;
1887
+ }
1888
+ });
1889
+ return pp.filter((p) => p !== GLOBSTAR).join("/");
1890
+ }).join("|");
1891
+ const [open, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
1892
+ re = "^" + open + re + close + "$";
1893
+ if (this.negate)
1894
+ re = "^(?!" + re + ").+$";
1895
+ try {
1896
+ this.regexp = new RegExp(re, [...flags].join(""));
1897
+ } catch (ex) {
1898
+ this.regexp = false;
1899
+ }
1900
+ return this.regexp;
1901
+ }
1902
+ slashSplit(p) {
1903
+ if (this.preserveMultipleSlashes) {
1904
+ return p.split("/");
1905
+ } else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
1906
+ return ["", ...p.split(/\/+/)];
1907
+ } else {
1908
+ return p.split(/\/+/);
1909
+ }
1910
+ }
1911
+ match(f, partial = this.partial) {
1912
+ this.debug("match", f, this.pattern);
1913
+ if (this.comment) {
1914
+ return false;
1915
+ }
1916
+ if (this.empty) {
1917
+ return f === "";
1918
+ }
1919
+ if (f === "/" && partial) {
1920
+ return true;
1921
+ }
1922
+ const options = this.options;
1923
+ if (this.isWindows) {
1924
+ f = f.split("\\").join("/");
1925
+ }
1926
+ const ff = this.slashSplit(f);
1927
+ this.debug(this.pattern, "split", ff);
1928
+ const set = this.set;
1929
+ this.debug(this.pattern, "set", set);
1930
+ let filename = ff[ff.length - 1];
1931
+ if (!filename) {
1932
+ for (let i2 = ff.length - 2; !filename && i2 >= 0; i2--) {
1933
+ filename = ff[i2];
1934
+ }
1935
+ }
1936
+ for (let i2 = 0; i2 < set.length; i2++) {
1937
+ const pattern = set[i2];
1938
+ let file = ff;
1939
+ if (options.matchBase && pattern.length === 1) {
1940
+ file = [filename];
1941
+ }
1942
+ const hit = this.matchOne(file, pattern, partial);
1943
+ if (hit) {
1944
+ if (options.flipNegate) {
1945
+ return true;
1946
+ }
1947
+ return !this.negate;
1948
+ }
1949
+ }
1950
+ if (options.flipNegate) {
1951
+ return false;
1952
+ }
1953
+ return this.negate;
1954
+ }
1955
+ static defaults(def) {
1956
+ return minimatch.defaults(def).Minimatch;
1957
+ }
1958
+ };
1959
+ minimatch.AST = AST;
1960
+ minimatch.Minimatch = Minimatch;
1961
+ minimatch.escape = escape;
1962
+ minimatch.unescape = unescape;
1963
+
318
1964
  // src/utils/query-nonce-meta-tag-content.ts
319
1965
  function queryNonceMetaTagContent(doc) {
320
1966
  var _a, _b, _c;
@@ -477,12 +2123,32 @@ function deserializeProperty(value) {
477
2123
  }
478
2124
  return RemoteValue.fromLocalValue(JSON.parse(atob(value.slice(SERIALIZED_PREFIX.length))));
479
2125
  }
2126
+
2127
+ // src/utils/style.ts
2128
+ function createStyleSheetIfNeededAndSupported(styles2) {
2129
+ if (!supportsConstructableStylesheets) return void 0;
2130
+ const sheet = new CSSStyleSheet();
2131
+ sheet.replaceSync(styles2);
2132
+ return sheet;
2133
+ }
2134
+
2135
+ // src/utils/shadow-root.ts
2136
+ var globalStyleSheet;
480
2137
  function createShadowRoot(cmpMeta) {
481
- const shadowRoot = this.attachShadow({ mode: "open" });
482
- if (supportsConstructableStylesheets) {
483
- const sheet = new CSSStyleSheet();
484
- sheet.replaceSync(globalStyles);
485
- shadowRoot.adoptedStyleSheets.push(sheet);
2138
+ var _a;
2139
+ const opts = { mode: "open" };
2140
+ const shadowRoot = this.attachShadow(opts);
2141
+ if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported(globalStyles)) != null ? _a : null;
2142
+ if (globalStyleSheet) {
2143
+ if (supportsMutableAdoptedStyleSheets) {
2144
+ shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
2145
+ } else {
2146
+ shadowRoot.adoptedStyleSheets = [...shadowRoot.adoptedStyleSheets, globalStyleSheet];
2147
+ }
2148
+ } else if (!supportsConstructableStylesheets) {
2149
+ const styleElm = document.createElement("style");
2150
+ styleElm.innerHTML = globalStyles;
2151
+ shadowRoot.prepend(styleElm);
486
2152
  }
487
2153
  }
488
2154
  var updateFallbackSlotVisibility = (elm) => {
@@ -522,8 +2188,9 @@ function getHostSlotNodes(childNodes, hostName, slotName) {
522
2188
  let childNode;
523
2189
  for (; i2 < childNodes.length; i2++) {
524
2190
  childNode = childNodes[i2];
525
- if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0)) {
2191
+ if (childNode["s-sr"] && (!hostName || childNode["s-hn"] === hostName) && (slotName === void 0 || getSlotName(childNode) === slotName)) {
526
2192
  slottedNodes.push(childNode);
2193
+ if (typeof slotName !== "undefined") return slottedNodes;
527
2194
  }
528
2195
  slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
529
2196
  }
@@ -600,40 +2267,189 @@ function patchSlotNode(node) {
600
2267
  if (slotName === getSlotName(n)) {
601
2268
  toReturn.push(n);
602
2269
  }
603
- });
604
- if (elementsOnly) {
605
- return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
2270
+ });
2271
+ if (elementsOnly) {
2272
+ return toReturn.filter((n) => n.nodeType === 1 /* ElementNode */);
2273
+ }
2274
+ return toReturn;
2275
+ }).bind(node);
2276
+ node.assignedElements = assignedFactory(true);
2277
+ node.assignedNodes = assignedFactory(false);
2278
+ }
2279
+ function dispatchSlotChangeEvent(elm) {
2280
+ elm.dispatchEvent(new CustomEvent("slotchange", { bubbles: false, cancelable: false, composed: false }));
2281
+ }
2282
+ function findSlotFromSlottedNode(slottedNode, parentHost) {
2283
+ var _a;
2284
+ parentHost = parentHost || ((_a = slottedNode["s-ol"]) == null ? void 0 : _a.parentElement);
2285
+ if (!parentHost) return { slotNode: null, slotName: "" };
2286
+ const slotName = slottedNode["s-sn"] = getSlotName(slottedNode) || "";
2287
+ const childNodes = internalCall(parentHost, "childNodes");
2288
+ const slotNode = getHostSlotNodes(childNodes, parentHost.tagName, slotName)[0];
2289
+ return { slotNode, slotName };
2290
+ }
2291
+ function internalCall(node, method) {
2292
+ if ("__" + method in node) {
2293
+ const toReturn = node["__" + method];
2294
+ if (typeof toReturn !== "function") return toReturn;
2295
+ return toReturn.bind(node);
2296
+ } else {
2297
+ if (typeof node[method] !== "function") return node[method];
2298
+ return node[method].bind(node);
2299
+ }
2300
+ }
2301
+ var createTime = (fnName, tagName = "") => {
2302
+ {
2303
+ return () => {
2304
+ return;
2305
+ };
2306
+ }
2307
+ };
2308
+ var uniqueTime = (key, measureText) => {
2309
+ {
2310
+ return () => {
2311
+ return;
2312
+ };
2313
+ }
2314
+ };
2315
+ var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
2316
+ var registerStyle = (scopeId2, cssText, allowCS) => {
2317
+ let style = styles.get(scopeId2);
2318
+ if (supportsConstructableStylesheets && allowCS) {
2319
+ style = style || new CSSStyleSheet();
2320
+ if (typeof style === "string") {
2321
+ style = cssText;
2322
+ } else {
2323
+ style.replaceSync(cssText);
2324
+ }
2325
+ } else {
2326
+ style = cssText;
2327
+ }
2328
+ styles.set(scopeId2, style);
2329
+ };
2330
+ var addStyle = (styleContainerNode, cmpMeta, mode) => {
2331
+ var _a, _b, _c;
2332
+ const scopeId2 = getScopeId(cmpMeta);
2333
+ const style = styles.get(scopeId2);
2334
+ if (!win.document) {
2335
+ return scopeId2;
2336
+ }
2337
+ styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
2338
+ if (style) {
2339
+ if (typeof style === "string") {
2340
+ styleContainerNode = styleContainerNode.head || styleContainerNode;
2341
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
2342
+ let styleElm;
2343
+ if (!appliedStyles) {
2344
+ rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
2345
+ }
2346
+ const existingStyleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`);
2347
+ if (existingStyleElm) {
2348
+ existingStyleElm.innerHTML = style;
2349
+ } else if (!appliedStyles.has(scopeId2)) {
2350
+ styleElm = win.document.createElement("style");
2351
+ styleElm.innerHTML = style;
2352
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
2353
+ if (nonce != null) {
2354
+ styleElm.setAttribute("nonce", nonce);
2355
+ }
2356
+ if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
2357
+ if (styleContainerNode.nodeName === "HEAD") {
2358
+ const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
2359
+ const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
2360
+ styleContainerNode.insertBefore(
2361
+ styleElm,
2362
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
2363
+ );
2364
+ } else if ("host" in styleContainerNode) {
2365
+ if (supportsConstructableStylesheets) {
2366
+ const currentWindow = (_b = styleContainerNode.defaultView) != null ? _b : styleContainerNode.ownerDocument.defaultView;
2367
+ const stylesheet = new currentWindow.CSSStyleSheet();
2368
+ stylesheet.replaceSync(style);
2369
+ if (supportsMutableAdoptedStyleSheets) {
2370
+ styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
2371
+ } else {
2372
+ styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
2373
+ }
2374
+ } else {
2375
+ const existingStyleContainer = styleContainerNode.querySelector("style");
2376
+ if (existingStyleContainer) {
2377
+ existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
2378
+ } else {
2379
+ styleContainerNode.prepend(styleElm);
2380
+ }
2381
+ }
2382
+ } else {
2383
+ styleContainerNode.append(styleElm);
2384
+ }
2385
+ }
2386
+ if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
2387
+ styleContainerNode.insertBefore(styleElm, null);
2388
+ }
2389
+ if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
2390
+ styleElm.innerHTML += SLOT_FB_CSS;
2391
+ }
2392
+ if (appliedStyles) {
2393
+ appliedStyles.add(scopeId2);
2394
+ }
2395
+ }
2396
+ } else {
2397
+ let appliedStyles = rootAppliedStyles.get(styleContainerNode);
2398
+ if (!appliedStyles) {
2399
+ rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
2400
+ }
2401
+ if (!appliedStyles.has(scopeId2)) {
2402
+ const currentWindow = (_c = styleContainerNode.defaultView) != null ? _c : styleContainerNode.ownerDocument.defaultView;
2403
+ let stylesheet;
2404
+ if (style.constructor === currentWindow.CSSStyleSheet) {
2405
+ stylesheet = style;
2406
+ } else {
2407
+ stylesheet = new currentWindow.CSSStyleSheet();
2408
+ for (let i2 = 0; i2 < style.cssRules.length; i2++) {
2409
+ stylesheet.insertRule(style.cssRules[i2].cssText, i2);
2410
+ }
2411
+ }
2412
+ if (supportsMutableAdoptedStyleSheets) {
2413
+ styleContainerNode.adoptedStyleSheets.push(stylesheet);
2414
+ } else {
2415
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, stylesheet];
2416
+ }
2417
+ appliedStyles.add(scopeId2);
2418
+ }
606
2419
  }
607
- return toReturn;
608
- }).bind(node);
609
- node.assignedElements = assignedFactory(true);
610
- node.assignedNodes = assignedFactory(false);
611
- }
612
- function internalCall(node, method) {
613
- if ("__" + method in node) {
614
- const toReturn = node["__" + method];
615
- if (typeof toReturn !== "function") return toReturn;
616
- return toReturn.bind(node);
617
- } else {
618
- if (typeof node[method] !== "function") return node[method];
619
- return node[method].bind(node);
620
2420
  }
621
- }
622
- var createTime = (fnName, tagName = "") => {
623
- {
624
- return () => {
625
- return;
626
- };
2421
+ return scopeId2;
2422
+ };
2423
+ var attachStyles = (hostRef) => {
2424
+ const cmpMeta = hostRef.$cmpMeta$;
2425
+ const elm = hostRef.$hostElement$;
2426
+ const flags = cmpMeta.$flags$;
2427
+ const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
2428
+ const scopeId2 = addStyle(
2429
+ elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
2430
+ cmpMeta);
2431
+ if (flags & 10 /* needsScopedEncapsulation */) {
2432
+ elm["s-sc"] = scopeId2;
2433
+ elm.classList.add(scopeId2 + "-h");
627
2434
  }
2435
+ endAttachStyles();
628
2436
  };
629
- var uniqueTime = (key, measureText) => {
630
- {
631
- return () => {
632
- return;
633
- };
2437
+ var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
2438
+ var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
2439
+ var hydrateScopedToShadow = () => {
2440
+ if (!win.document) {
2441
+ return;
2442
+ }
2443
+ const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
2444
+ let i2 = 0;
2445
+ for (; i2 < styles2.length; i2++) {
2446
+ registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
634
2447
  }
635
2448
  };
636
2449
  var h = (nodeName, vnodeData, ...children) => {
2450
+ if (typeof nodeName === "string") {
2451
+ nodeName = transformTag(nodeName);
2452
+ }
637
2453
  let child = null;
638
2454
  let key = null;
639
2455
  let slotName = null;
@@ -747,7 +2563,7 @@ var convertToPrivate = (node) => {
747
2563
 
748
2564
  // src/runtime/client-hydrate.ts
749
2565
  var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
750
- var _a;
2566
+ var _a, _b, _c, _d;
751
2567
  const endHydrate = createTime("hydrateClient", tagName);
752
2568
  const shadowRoot = hostElm.shadowRoot;
753
2569
  const childRenderNodes = [];
@@ -756,23 +2572,6 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
756
2572
  const shadowRootNodes = shadowRoot ? [] : null;
757
2573
  const vnode = newVNode(tagName, null);
758
2574
  vnode.$elm$ = hostElm;
759
- const members = Object.entries(((_a = hostRef.$cmpMeta$) == null ? void 0 : _a.$members$) || {});
760
- members.forEach(([memberName, [memberFlags, metaAttributeName]]) => {
761
- var _a2, _b;
762
- if (!(memberFlags & 31 /* Prop */)) {
763
- return;
764
- }
765
- const attributeName = metaAttributeName || memberName;
766
- const attrVal = hostElm.getAttribute(attributeName);
767
- if (attrVal !== null) {
768
- const attrPropVal = parsePropertyValue(
769
- attrVal,
770
- memberFlags,
771
- !!(((_a2 = hostRef.$cmpMeta$) == null ? void 0 : _a2.$flags$) & 64 /* formAssociated */)
772
- );
773
- (_b = hostRef == null ? void 0 : hostRef.$instanceValues$) == null ? void 0 : _b.set(memberName, attrPropVal);
774
- }
775
- });
776
2575
  if (win.document && (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size)) {
777
2576
  initializeDocumentHydrate(win.document.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
778
2577
  }
@@ -797,10 +2596,20 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
797
2596
  const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
798
2597
  const node = childRenderNode.$elm$;
799
2598
  if (!shadowRoot) {
800
- node["s-hn"] = tagName.toUpperCase();
2599
+ node["s-hn"] = transformTag(tagName).toUpperCase();
801
2600
  if (childRenderNode.$tag$ === "slot") {
802
2601
  node["s-cr"] = hostElm["s-cr"];
803
2602
  }
2603
+ } else if (((_a = childRenderNode.$tag$) == null ? void 0 : _a.toString().includes("-")) && childRenderNode.$tag$ !== "slot-fb" && !childRenderNode.$elm$.shadowRoot) {
2604
+ const cmpMeta = getHostRef(childRenderNode.$elm$);
2605
+ if (cmpMeta) {
2606
+ const scopeId3 = getScopeId(
2607
+ cmpMeta.$cmpMeta$);
2608
+ const styleSheet = win.document.querySelector(`style[sty-id="${scopeId3}"]`);
2609
+ if (styleSheet) {
2610
+ hostElm.shadowRoot.append(styleSheet.cloneNode(true));
2611
+ }
2612
+ }
804
2613
  }
805
2614
  if (childRenderNode.$tag$ === "slot") {
806
2615
  childRenderNode.$name$ = childRenderNode.$elm$["s-sn"] || childRenderNode.$elm$["name"] || null;
@@ -816,7 +2625,7 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
816
2625
  }
817
2626
  }
818
2627
  if (orgLocationNode && orgLocationNode.isConnected) {
819
- if (shadowRoot && orgLocationNode["s-en"] === "") {
2628
+ if (orgLocationNode.parentElement.shadowRoot && orgLocationNode["s-en"] === "") {
820
2629
  orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
821
2630
  }
822
2631
  orgLocationNode.parentNode.removeChild(orgLocationNode);
@@ -824,7 +2633,9 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
824
2633
  node["s-oo"] = parseInt(childRenderNode.$nodeId$);
825
2634
  }
826
2635
  }
827
- plt.$orgLocNodes$.delete(orgLocationId);
2636
+ if (orgLocationNode && !orgLocationNode["s-id"]) {
2637
+ plt.$orgLocNodes$.delete(orgLocationId);
2638
+ }
828
2639
  }
829
2640
  const hosts = [];
830
2641
  const snLen = slottedNodes.length;
@@ -833,6 +2644,7 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
833
2644
  let snGroupIdx;
834
2645
  let snGroupLen;
835
2646
  let slottedItem;
2647
+ let currentPos = 0;
836
2648
  for (snIndex; snIndex < snLen; snIndex++) {
837
2649
  slotGroup = slottedNodes[snIndex];
838
2650
  if (!slotGroup || !slotGroup.length) continue;
@@ -845,39 +2657,47 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
845
2657
  }
846
2658
  if (!hosts[slottedItem.hostId]) continue;
847
2659
  const hostEle = hosts[slottedItem.hostId];
2660
+ if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
2661
+ hostEle.insertBefore(slottedItem.node, (_c = (_b = slotGroup[snGroupIdx - 1]) == null ? void 0 : _b.node) == null ? void 0 : _c.nextSibling);
2662
+ }
848
2663
  if (!hostEle.shadowRoot || !shadowRoot) {
849
- slottedItem.slot["s-cr"] = hostEle["s-cr"];
850
- if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
851
- slottedItem.slot["s-cr"] = hostEle;
852
- } else {
853
- slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
2664
+ if (!slottedItem.slot["s-cr"]) {
2665
+ slottedItem.slot["s-cr"] = hostEle["s-cr"];
2666
+ if (!slottedItem.slot["s-cr"] && hostEle.shadowRoot) {
2667
+ slottedItem.slot["s-cr"] = hostEle;
2668
+ } else {
2669
+ slottedItem.slot["s-cr"] = (hostEle.__childNodes || hostEle.childNodes)[0];
2670
+ }
2671
+ }
2672
+ addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"] || currentPos);
2673
+ if (((_d = slottedItem.node.parentElement) == null ? void 0 : _d.shadowRoot) && slottedItem.node["getAttribute"] && slottedItem.node.getAttribute("slot")) {
2674
+ slottedItem.node.removeAttribute("slot");
854
2675
  }
855
- addSlotRelocateNode(slottedItem.node, slottedItem.slot, false, slottedItem.node["s-oo"]);
856
- }
857
- if (hostEle.shadowRoot && slottedItem.node.parentElement !== hostEle) {
858
- hostEle.appendChild(slottedItem.node);
859
2676
  }
2677
+ currentPos = (slottedItem.node["s-oo"] || currentPos) + 1;
860
2678
  }
861
2679
  }
862
- if (shadowRoot && !shadowRoot.childNodes.length) {
2680
+ if (shadowRoot) {
863
2681
  let rnIdex = 0;
864
2682
  const rnLen = shadowRootNodes.length;
865
2683
  if (rnLen) {
866
2684
  for (rnIdex; rnIdex < rnLen; rnIdex++) {
867
- shadowRoot.appendChild(shadowRootNodes[rnIdex]);
2685
+ const node = shadowRootNodes[rnIdex];
2686
+ if (node) {
2687
+ shadowRoot.appendChild(node);
2688
+ }
868
2689
  }
869
2690
  Array.from(hostElm.childNodes).forEach((node) => {
870
2691
  if (typeof node["s-en"] !== "string" && typeof node["s-sn"] !== "string") {
871
2692
  if (node.nodeType === 1 /* ElementNode */ && node.slot && node.hidden) {
872
2693
  node.removeAttribute("hidden");
873
- } else if (node.nodeType === 8 /* CommentNode */ || node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
2694
+ } else if (node.nodeType === 8 /* CommentNode */ && !node.nodeValue) {
874
2695
  node.parentNode.removeChild(node);
875
2696
  }
876
2697
  }
877
2698
  });
878
2699
  }
879
2700
  }
880
- plt.$orgLocNodes$.delete(hostElm["s-id"]);
881
2701
  hostRef.$hostElement$ = hostElm;
882
2702
  endHydrate();
883
2703
  };
@@ -1030,10 +2850,6 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
1030
2850
  vnode.$elm$ = node;
1031
2851
  vnode.$index$ = "0";
1032
2852
  parentVNode.$children$ = [vnode];
1033
- } else {
1034
- if (node.nodeType === 3 /* TextNode */ && !node.wholeText.trim()) {
1035
- node.remove();
1036
- }
1037
2853
  }
1038
2854
  return parentVNode;
1039
2855
  };
@@ -1089,10 +2905,10 @@ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNod
1089
2905
  if (childVNode.$name$) {
1090
2906
  childVNode.$elm$.setAttribute("name", slotName);
1091
2907
  }
1092
- if (parentNodeId && parentNodeId !== childVNode.$hostId$) {
1093
- parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
2908
+ if (parentVNode.$elm$.shadowRoot && parentNodeId && parentNodeId !== childVNode.$hostId$) {
2909
+ internalCall(parentVNode.$elm$, "insertBefore")(slot, internalCall(parentVNode.$elm$, "children")[0]);
1094
2910
  } else {
1095
- node.parentNode.insertBefore(childVNode.$elm$, node);
2911
+ internalCall(internalCall(node, "parentNode"), "insertBefore")(slot, node);
1096
2912
  }
1097
2913
  addSlottedNodes(slottedNodes, slotId, slotName, node, childVNode.$hostId$);
1098
2914
  node.remove();
@@ -1107,8 +2923,8 @@ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNod
1107
2923
  if (shouldMove) {
1108
2924
  parentVNode.$elm$.insertBefore(slot, parentVNode.$elm$.children[0]);
1109
2925
  }
1110
- childRenderNodes.push(childVNode);
1111
2926
  }
2927
+ childRenderNodes.push(childVNode);
1112
2928
  slotNodes.push(childVNode);
1113
2929
  if (!parentVNode.$children$) {
1114
2930
  parentVNode.$children$ = [];
@@ -1116,13 +2932,17 @@ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNod
1116
2932
  parentVNode.$children$[childVNode.$index$] = childVNode;
1117
2933
  }
1118
2934
  var addSlottedNodes = (slottedNodes, slotNodeId, slotName, slotNode, hostId) => {
2935
+ var _a, _b;
1119
2936
  let slottedNode = slotNode.nextSibling;
1120
2937
  slottedNodes[slotNodeId] = slottedNodes[slotNodeId] || [];
1121
- 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 */))) {
1122
- slottedNode["s-sn"] = slotName;
1123
- slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
1124
- slottedNode = slottedNode.nextSibling;
1125
- }
2938
+ if (!slottedNode || ((_a = slottedNode.nodeValue) == null ? void 0 : _a.startsWith(SLOT_NODE_ID + "."))) return;
2939
+ do {
2940
+ if (slottedNode && ((slottedNode["getAttribute"] && slottedNode.getAttribute("slot") || slottedNode["s-sn"]) === slotName || slotName === "" && !slottedNode["s-sn"] && (!slottedNode["getAttribute"] || !slottedNode.getAttribute("slot")) && (slottedNode.nodeType === 8 /* CommentNode */ || slottedNode.nodeType === 3 /* TextNode */))) {
2941
+ slottedNode["s-sn"] = slotName;
2942
+ slottedNodes[slotNodeId].push({ slot: slotNode, node: slottedNode, hostId });
2943
+ }
2944
+ slottedNode = slottedNode == null ? void 0 : slottedNode.nextSibling;
2945
+ } while (slottedNode && !((_b = slottedNode.nodeValue) == null ? void 0 : _b.startsWith(SLOT_NODE_ID + ".")));
1126
2946
  };
1127
2947
  var findCorrespondingNode = (node, type) => {
1128
2948
  let sibling = node;
@@ -1144,13 +2964,6 @@ createSupportsRuleRe("::slotted");
1144
2964
  createSupportsRuleRe(":host");
1145
2965
  createSupportsRuleRe(":host-context");
1146
2966
  var parsePropertyValue = (propValue, propType, isFormAssociated) => {
1147
- if (typeof propValue === "string" && (propValue.startsWith("{") && propValue.endsWith("}") || propValue.startsWith("[") && propValue.endsWith("]"))) {
1148
- try {
1149
- propValue = JSON.parse(propValue);
1150
- return propValue;
1151
- } catch (e) {
1152
- }
1153
- }
1154
2967
  if (typeof propValue === "string" && propValue.startsWith(SERIALIZED_PREFIX)) {
1155
2968
  propValue = deserializeProperty(propValue);
1156
2969
  return propValue;
@@ -1173,7 +2986,10 @@ var parsePropertyValue = (propValue, propType, isFormAssociated) => {
1173
2986
  }
1174
2987
  return propValue;
1175
2988
  };
1176
- var getElement = (ref) => getHostRef(ref).$hostElement$ ;
2989
+ var getElement = (ref) => {
2990
+ var _a;
2991
+ return (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ ;
2992
+ };
1177
2993
 
1178
2994
  // src/runtime/event-emitter.ts
1179
2995
  var createEvent = (ref, name, flags) => {
@@ -1194,115 +3010,6 @@ var emitEvent = (elm, name, opts) => {
1194
3010
  elm.dispatchEvent(ev);
1195
3011
  return ev;
1196
3012
  };
1197
- var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
1198
- var registerStyle = (scopeId2, cssText, allowCS) => {
1199
- let style = styles.get(scopeId2);
1200
- if (supportsConstructableStylesheets && allowCS) {
1201
- style = style || new CSSStyleSheet();
1202
- if (typeof style === "string") {
1203
- style = cssText;
1204
- } else {
1205
- style.replaceSync(cssText);
1206
- }
1207
- } else {
1208
- style = cssText;
1209
- }
1210
- styles.set(scopeId2, style);
1211
- };
1212
- var addStyle = (styleContainerNode, cmpMeta, mode) => {
1213
- var _a;
1214
- const scopeId2 = getScopeId(cmpMeta);
1215
- const style = styles.get(scopeId2);
1216
- if (!win.document) {
1217
- return scopeId2;
1218
- }
1219
- styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
1220
- if (style) {
1221
- if (typeof style === "string") {
1222
- styleContainerNode = styleContainerNode.head || styleContainerNode;
1223
- let appliedStyles = rootAppliedStyles.get(styleContainerNode);
1224
- let styleElm;
1225
- if (!appliedStyles) {
1226
- rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
1227
- }
1228
- if (!appliedStyles.has(scopeId2)) {
1229
- if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
1230
- styleElm.innerHTML = style;
1231
- } else {
1232
- styleElm = win.document.createElement("style");
1233
- styleElm.innerHTML = style;
1234
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
1235
- if (nonce != null) {
1236
- styleElm.setAttribute("nonce", nonce);
1237
- }
1238
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
1239
- if (styleContainerNode.nodeName === "HEAD") {
1240
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
1241
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
1242
- styleContainerNode.insertBefore(
1243
- styleElm,
1244
- (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
1245
- );
1246
- } else if ("host" in styleContainerNode) {
1247
- if (supportsConstructableStylesheets) {
1248
- const stylesheet = new CSSStyleSheet();
1249
- stylesheet.replaceSync(style);
1250
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
1251
- } else {
1252
- const existingStyleContainer = styleContainerNode.querySelector("style");
1253
- if (existingStyleContainer) {
1254
- existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
1255
- } else {
1256
- styleContainerNode.prepend(styleElm);
1257
- }
1258
- }
1259
- } else {
1260
- styleContainerNode.append(styleElm);
1261
- }
1262
- }
1263
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1264
- styleContainerNode.insertBefore(styleElm, null);
1265
- }
1266
- }
1267
- if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
1268
- styleElm.innerHTML += SLOT_FB_CSS;
1269
- }
1270
- if (appliedStyles) {
1271
- appliedStyles.add(scopeId2);
1272
- }
1273
- }
1274
- } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
1275
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
1276
- }
1277
- }
1278
- return scopeId2;
1279
- };
1280
- var attachStyles = (hostRef) => {
1281
- const cmpMeta = hostRef.$cmpMeta$;
1282
- const elm = hostRef.$hostElement$;
1283
- const flags = cmpMeta.$flags$;
1284
- const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
1285
- const scopeId2 = addStyle(
1286
- elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
1287
- cmpMeta);
1288
- if (flags & 10 /* needsScopedEncapsulation */) {
1289
- elm["s-sc"] = scopeId2;
1290
- elm.classList.add(scopeId2 + "-h");
1291
- }
1292
- endAttachStyles();
1293
- };
1294
- var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
1295
- var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
1296
- var hydrateScopedToShadow = () => {
1297
- if (!win.document) {
1298
- return;
1299
- }
1300
- const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
1301
- let i2 = 0;
1302
- for (; i2 < styles2.length; i2++) {
1303
- registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
1304
- }
1305
- };
1306
3013
  var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
1307
3014
  if (oldValue === newValue) {
1308
3015
  return;
@@ -1313,12 +3020,13 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
1313
3020
  const classList = elm.classList;
1314
3021
  const oldClasses = parseClassList(oldValue);
1315
3022
  let newClasses = parseClassList(newValue);
1316
- if (elm["s-si"] && initialRender) {
1317
- newClasses.push(elm["s-si"]);
3023
+ if ((elm["s-si"] || elm["s-sc"]) && initialRender) {
3024
+ const scopeId2 = elm["s-sc"] || elm["s-si"];
3025
+ newClasses.push(scopeId2);
1318
3026
  oldClasses.forEach((c) => {
1319
- if (c.startsWith(elm["s-si"])) newClasses.push(c);
3027
+ if (c.startsWith(scopeId2)) newClasses.push(c);
1320
3028
  });
1321
- newClasses = [...new Set(newClasses)];
3029
+ newClasses = [...new Set(newClasses)].filter((c) => c);
1322
3030
  classList.add(...newClasses);
1323
3031
  } else {
1324
3032
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
@@ -1522,10 +3230,11 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
1522
3230
  updateElement(null, newVNode2, isSvgMode);
1523
3231
  }
1524
3232
  if (newVNode2.$children$) {
3233
+ const appendTarget = newVNode2.$tag$ === "template" ? elm.content : elm;
1525
3234
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
1526
3235
  childNode = createElm(oldParentVNode, newVNode2, i2);
1527
3236
  if (childNode) {
1528
- elm.appendChild(childNode);
3237
+ appendTarget.appendChild(childNode);
1529
3238
  }
1530
3239
  }
1531
3240
  }
@@ -1547,17 +3256,43 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
1547
3256
  patchSlotNode(elm);
1548
3257
  oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];
1549
3258
  if (oldVNode && oldVNode.$tag$ === newVNode2.$tag$ && oldParentVNode.$elm$) {
1550
- {
1551
- putBackInOriginalLocation(oldParentVNode.$elm$, false);
1552
- }
3259
+ relocateToHostRoot(oldParentVNode.$elm$);
1553
3260
  }
1554
3261
  }
1555
3262
  }
1556
3263
  return elm;
1557
3264
  };
3265
+ var relocateToHostRoot = (parentElm) => {
3266
+ plt.$flags$ |= 1 /* isTmpDisconnected */;
3267
+ const host = parentElm.closest(hostTagName.toLowerCase());
3268
+ if (host != null) {
3269
+ const contentRefNode = Array.from(host.__childNodes || host.childNodes).find(
3270
+ (ref) => ref["s-cr"]
3271
+ );
3272
+ const childNodeArray = Array.from(
3273
+ parentElm.__childNodes || parentElm.childNodes
3274
+ );
3275
+ for (const childNode of contentRefNode ? childNodeArray.reverse() : childNodeArray) {
3276
+ if (childNode["s-sh"] != null) {
3277
+ insertBefore(host, childNode, contentRefNode != null ? contentRefNode : null);
3278
+ childNode["s-sh"] = void 0;
3279
+ checkSlotRelocate = true;
3280
+ }
3281
+ }
3282
+ }
3283
+ plt.$flags$ &= -2 /* isTmpDisconnected */;
3284
+ };
1558
3285
  var putBackInOriginalLocation = (parentElm, recursive) => {
1559
3286
  plt.$flags$ |= 1 /* isTmpDisconnected */;
1560
3287
  const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
3288
+ if (parentElm["s-sr"]) {
3289
+ let node = parentElm;
3290
+ while (node = node.nextSibling) {
3291
+ if (node && node["s-sn"] === parentElm["s-sn"] && node["s-sh"] === hostTagName) {
3292
+ oldSlotChildNodes.push(node);
3293
+ }
3294
+ }
3295
+ }
1561
3296
  for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
1562
3297
  const childNode = oldSlotChildNodes[i2];
1563
3298
  if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
@@ -1579,6 +3314,9 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
1579
3314
  if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {
1580
3315
  containerElm = containerElm.shadowRoot;
1581
3316
  }
3317
+ if (parentVNode.$tag$ === "template") {
3318
+ containerElm = containerElm.content;
3319
+ }
1582
3320
  for (; startIdx <= endIdx; ++startIdx) {
1583
3321
  if (vnodes[startIdx]) {
1584
3322
  childNode = createElm(null, parentVNode, startIdx);
@@ -1622,6 +3360,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1622
3360
  let newEndVnode = newCh[newEndIdx];
1623
3361
  let node;
1624
3362
  let elmToMove;
3363
+ const containerElm = newVNode2.$tag$ === "template" ? parentElm.content : parentElm;
1625
3364
  while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
1626
3365
  if (oldStartVnode == null) {
1627
3366
  oldStartVnode = oldCh[++oldStartIdx];
@@ -1644,7 +3383,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1644
3383
  putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
1645
3384
  }
1646
3385
  patch(oldStartVnode, newEndVnode, isInitialRender);
1647
- insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
3386
+ insertBefore(containerElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
1648
3387
  oldStartVnode = oldCh[++oldStartIdx];
1649
3388
  newEndVnode = newCh[--newEndIdx];
1650
3389
  } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
@@ -1652,7 +3391,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1652
3391
  putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
1653
3392
  }
1654
3393
  patch(oldEndVnode, newStartVnode, isInitialRender);
1655
- insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
3394
+ insertBefore(containerElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
1656
3395
  oldEndVnode = oldCh[--oldEndIdx];
1657
3396
  newStartVnode = newCh[++newStartIdx];
1658
3397
  } else {
@@ -1731,6 +3470,12 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1731
3470
  isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
1732
3471
  }
1733
3472
  {
3473
+ if (tag === "slot" && !useNativeShadowDom) {
3474
+ if (oldVNode.$name$ !== newVNode2.$name$) {
3475
+ newVNode2.$elm$["s-sn"] = newVNode2.$name$ || "";
3476
+ relocateToHostRoot(newVNode2.$elm$.parentElement);
3477
+ }
3478
+ }
1734
3479
  updateElement(oldVNode, newVNode2, isSvgMode, isInitialRender);
1735
3480
  }
1736
3481
  if (oldChildren !== null && newChildren !== null) {
@@ -1745,6 +3490,8 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
1745
3490
  !isInitialRender && BUILD.updatable && oldChildren !== null
1746
3491
  ) {
1747
3492
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
3493
+ } else if (isInitialRender && BUILD.updatable && oldChildren !== null && newChildren === null) {
3494
+ newVNode2.$children$ = oldChildren;
1748
3495
  }
1749
3496
  if (isSvgMode && tag === "svg") {
1750
3497
  isSvgMode = false;
@@ -1767,7 +3514,7 @@ var markSlotContentForRelocation = (elm) => {
1767
3514
  const slotName = childNode["s-sn"];
1768
3515
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
1769
3516
  node = hostContentNodes[j];
1770
- if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (true)) {
3517
+ if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
1771
3518
  if (isNodeLocatedInSlot(node, slotName)) {
1772
3519
  let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1773
3520
  checkSlotFallbackVisibility = true;
@@ -1811,13 +3558,21 @@ var nullifyVNodeRefs = (vNode) => {
1811
3558
  vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
1812
3559
  }
1813
3560
  };
1814
- var insertBefore = (parent, newNode, reference) => {
1815
- {
3561
+ var insertBefore = (parent, newNode, reference, isInitialLoad) => {
3562
+ if (typeof newNode["s-sn"] === "string") {
3563
+ parent.insertBefore(newNode, reference);
3564
+ const { slotNode } = findSlotFromSlottedNode(newNode);
3565
+ if (slotNode && !isInitialLoad) dispatchSlotChangeEvent(slotNode);
3566
+ return newNode;
3567
+ }
3568
+ if (parent.__insertBefore) {
3569
+ return parent.__insertBefore(newNode, reference);
3570
+ } else {
1816
3571
  return parent == null ? void 0 : parent.insertBefore(newNode, reference);
1817
3572
  }
1818
3573
  };
1819
3574
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1820
- var _a, _b, _c, _d;
3575
+ var _a, _b, _c, _d, _e;
1821
3576
  const hostElm = hostRef.$hostElement$;
1822
3577
  const cmpMeta = hostRef.$cmpMeta$;
1823
3578
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
@@ -1826,9 +3581,11 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1826
3581
  hostTagName = hostElm.tagName;
1827
3582
  if (cmpMeta.$attrsToReflect$) {
1828
3583
  rootVnode.$attrs$ = rootVnode.$attrs$ || {};
1829
- cmpMeta.$attrsToReflect$.map(
1830
- ([propName, attribute]) => rootVnode.$attrs$[attribute] = hostElm[propName]
1831
- );
3584
+ cmpMeta.$attrsToReflect$.forEach(([propName, attribute]) => {
3585
+ {
3586
+ rootVnode.$attrs$[attribute] = hostElm[propName];
3587
+ }
3588
+ });
1832
3589
  }
1833
3590
  if (isInitialLoad && rootVnode.$attrs$) {
1834
3591
  for (const key of Object.keys(rootVnode.$attrs$)) {
@@ -1856,19 +3613,27 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1856
3613
  if (!nodeToRelocate["s-ol"] && win.document) {
1857
3614
  const orgLocationNode = win.document.createTextNode("");
1858
3615
  orgLocationNode["s-nr"] = nodeToRelocate;
1859
- insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
3616
+ insertBefore(
3617
+ nodeToRelocate.parentNode,
3618
+ nodeToRelocate["s-ol"] = orgLocationNode,
3619
+ nodeToRelocate,
3620
+ isInitialLoad
3621
+ );
1860
3622
  }
1861
3623
  }
1862
3624
  for (const relocateData of relocateNodes) {
1863
3625
  const nodeToRelocate = relocateData.$nodeToRelocate$;
1864
3626
  const slotRefNode = relocateData.$slotRefNode$;
3627
+ if (nodeToRelocate.nodeType === 1 /* ElementNode */ && isInitialLoad) {
3628
+ nodeToRelocate["s-ih"] = (_a = nodeToRelocate.hidden) != null ? _a : false;
3629
+ }
1865
3630
  if (slotRefNode) {
1866
3631
  const parentNodeRef = slotRefNode.parentNode;
1867
3632
  let insertBeforeNode = slotRefNode.nextSibling;
1868
- {
1869
- let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
3633
+ if (insertBeforeNode && insertBeforeNode.nodeType === 1 /* ElementNode */) {
3634
+ let orgLocationNode = (_b = nodeToRelocate["s-ol"]) == null ? void 0 : _b.previousSibling;
1870
3635
  while (orgLocationNode) {
1871
- let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
3636
+ let refNode = (_c = orgLocationNode["s-nr"]) != null ? _c : null;
1872
3637
  if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
1873
3638
  refNode = refNode.nextSibling;
1874
3639
  while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
@@ -1886,23 +3651,26 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1886
3651
  const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
1887
3652
  if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
1888
3653
  if (nodeToRelocate !== insertBeforeNode) {
1889
- if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
1890
- nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
3654
+ insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode, isInitialLoad);
3655
+ if (nodeToRelocate.nodeType === 8 /* CommentNode */ && nodeToRelocate.nodeValue.startsWith("s-nt-")) {
3656
+ const textNode = win.document.createTextNode(nodeToRelocate.nodeValue.replace(/^s-nt-/, ""));
3657
+ textNode["s-hn"] = nodeToRelocate["s-hn"];
3658
+ textNode["s-sn"] = nodeToRelocate["s-sn"];
3659
+ textNode["s-sh"] = nodeToRelocate["s-sh"];
3660
+ textNode["s-sr"] = nodeToRelocate["s-sr"];
3661
+ textNode["s-ol"] = nodeToRelocate["s-ol"];
3662
+ textNode["s-ol"]["s-nr"] = textNode;
3663
+ insertBefore(nodeToRelocate.parentNode, textNode, nodeToRelocate, isInitialLoad);
3664
+ nodeToRelocate.parentNode.removeChild(nodeToRelocate);
1891
3665
  }
1892
- insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
1893
3666
  if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
1894
- nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
3667
+ nodeToRelocate.hidden = (_d = nodeToRelocate["s-ih"]) != null ? _d : false;
1895
3668
  }
1896
3669
  }
1897
3670
  }
1898
3671
  nodeToRelocate && typeof slotRefNode["s-rf"] === "function" && slotRefNode["s-rf"](slotRefNode);
1899
- } else {
1900
- if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
1901
- if (isInitialLoad) {
1902
- nodeToRelocate["s-ih"] = (_d = nodeToRelocate.hidden) != null ? _d : false;
1903
- }
1904
- nodeToRelocate.hidden = true;
1905
- }
3672
+ } else if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
3673
+ nodeToRelocate.hidden = true;
1906
3674
  }
1907
3675
  }
1908
3676
  }
@@ -1912,6 +3680,24 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1912
3680
  plt.$flags$ &= -2 /* isTmpDisconnected */;
1913
3681
  relocateNodes.length = 0;
1914
3682
  }
3683
+ if (!useNativeShadowDom && !(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && hostElm["s-cr"]) {
3684
+ const children = rootVnode.$elm$.__childNodes || rootVnode.$elm$.childNodes;
3685
+ for (const childNode of children) {
3686
+ if (childNode["s-hn"] !== hostTagName && !childNode["s-sh"]) {
3687
+ if (isInitialLoad && childNode["s-ih"] == null) {
3688
+ childNode["s-ih"] = (_e = childNode.hidden) != null ? _e : false;
3689
+ }
3690
+ if (childNode.nodeType === 1 /* ElementNode */) {
3691
+ childNode.hidden = true;
3692
+ } else if (childNode.nodeType === 3 /* TextNode */ && !!childNode.nodeValue.trim()) {
3693
+ const textCommentNode = win.document.createComment("s-nt-" + childNode.nodeValue);
3694
+ textCommentNode["s-sn"] = childNode["s-sn"];
3695
+ insertBefore(childNode.parentNode, textCommentNode, childNode, isInitialLoad);
3696
+ childNode.parentNode.removeChild(childNode);
3697
+ }
3698
+ }
3699
+ }
3700
+ }
1915
3701
  contentRef = void 0;
1916
3702
  };
1917
3703
 
@@ -1938,6 +3724,12 @@ var scheduleUpdate = (hostRef, isInitialLoad) => {
1938
3724
  }
1939
3725
  attachToAncestor(hostRef, hostRef.$ancestorComponent$);
1940
3726
  const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
3727
+ if (isInitialLoad) {
3728
+ queueMicrotask(() => {
3729
+ dispatch();
3730
+ });
3731
+ return;
3732
+ }
1941
3733
  return writeTask(dispatch) ;
1942
3734
  };
1943
3735
  var dispatchHooks = (hostRef, isInitialLoad) => {
@@ -1952,10 +3744,19 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
1952
3744
  let maybePromise;
1953
3745
  if (isInitialLoad) {
1954
3746
  {
1955
- hostRef.$flags$ |= 256 /* isListenReady */;
1956
- if (hostRef.$queuedListeners$) {
1957
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
1958
- hostRef.$queuedListeners$ = void 0;
3747
+ if (hostRef.$deferredConnectedCallback$) {
3748
+ hostRef.$deferredConnectedCallback$ = false;
3749
+ safeCall(instance, "connectedCallback", void 0, elm);
3750
+ }
3751
+ {
3752
+ hostRef.$flags$ |= 256 /* isListenReady */;
3753
+ if (hostRef.$queuedListeners$) {
3754
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
3755
+ hostRef.$queuedListeners$ = void 0;
3756
+ }
3757
+ }
3758
+ if (hostRef.$fetchedCbList$.length) {
3759
+ hostRef.$fetchedCbList$.forEach((cb) => cb(elm));
1959
3760
  }
1960
3761
  }
1961
3762
  maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
@@ -2061,7 +3862,13 @@ var postUpdateComponent = (hostRef) => {
2061
3862
  }
2062
3863
  };
2063
3864
  var appDidLoad = (who) => {
3865
+ var _a;
2064
3866
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
3867
+ {
3868
+ if ((_a = plt.$orgLocNodes$) == null ? void 0 : _a.size) {
3869
+ plt.$orgLocNodes$.clear();
3870
+ }
3871
+ }
2065
3872
  };
2066
3873
  var safeCall = (instance, method, arg, elm) => {
2067
3874
  if (instance && instance[method]) {
@@ -2082,6 +3889,9 @@ var addHydratedFlag = (elm) => {
2082
3889
  var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
2083
3890
  var setValue = (ref, propName, newVal, cmpMeta) => {
2084
3891
  const hostRef = getHostRef(ref);
3892
+ if (!hostRef) {
3893
+ return;
3894
+ }
2085
3895
  if (!hostRef) {
2086
3896
  throw new Error(
2087
3897
  `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
@@ -2100,27 +3910,34 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
2100
3910
  const didValueChange = newVal !== oldVal && !areBothNaN;
2101
3911
  if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
2102
3912
  hostRef.$instanceValues$.set(propName, newVal);
2103
- if (instance) {
2104
- if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
2105
- const watchMethods = cmpMeta.$watchers$[propName];
2106
- if (watchMethods) {
2107
- watchMethods.map((watchMethodName) => {
2108
- try {
2109
- instance[watchMethodName](newVal, oldVal, propName);
2110
- } catch (e) {
2111
- consoleError(e, elm);
3913
+ if (cmpMeta.$watchers$) {
3914
+ const watchMethods = cmpMeta.$watchers$[propName];
3915
+ if (watchMethods) {
3916
+ watchMethods.map((watcher) => {
3917
+ try {
3918
+ const [[watchMethodName, watcherFlags]] = Object.entries(watcher);
3919
+ if (flags & 128 /* isWatchReady */ || watcherFlags & 1 /* Immediate */) {
3920
+ if (!instance) {
3921
+ hostRef.$fetchedCbList$.push(() => {
3922
+ hostRef.$lazyInstance$[watchMethodName](newVal, oldVal, propName);
3923
+ });
3924
+ } else {
3925
+ instance[watchMethodName](newVal, oldVal, propName);
3926
+ }
2112
3927
  }
2113
- });
2114
- }
2115
- }
2116
- if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
2117
- if (instance.componentShouldUpdate) {
2118
- if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
2119
- return;
3928
+ } catch (e) {
3929
+ consoleError(e, elm);
2120
3930
  }
3931
+ });
3932
+ }
3933
+ }
3934
+ if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
3935
+ if (instance.componentShouldUpdate) {
3936
+ if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
3937
+ return;
2121
3938
  }
2122
- scheduleUpdate(hostRef, false);
2123
3939
  }
3940
+ scheduleUpdate(hostRef, false);
2124
3941
  }
2125
3942
  }
2126
3943
  };
@@ -2133,10 +3950,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
2133
3950
  FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS.forEach((cbName) => {
2134
3951
  Object.defineProperty(prototype, cbName, {
2135
3952
  value(...args) {
3953
+ var _a2;
2136
3954
  const hostRef = getHostRef(this);
2137
- const instance = hostRef.$lazyInstance$ ;
3955
+ const instance = hostRef == null ? void 0 : hostRef.$lazyInstance$ ;
2138
3956
  if (!instance) {
2139
- hostRef.$onReadyPromise$.then((asyncInstance) => {
3957
+ (_a2 = hostRef == null ? void 0 : hostRef.$onReadyPromise$) == null ? void 0 : _a2.then((asyncInstance) => {
2140
3958
  const cb = asyncInstance[cbName];
2141
3959
  typeof cb === "function" && cb.call(asyncInstance, ...args);
2142
3960
  });
@@ -2148,9 +3966,17 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
2148
3966
  });
2149
3967
  });
2150
3968
  }
2151
- if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
2152
- if (Cstr.watchers && !cmpMeta.$watchers$) {
2153
- cmpMeta.$watchers$ = Cstr.watchers;
3969
+ if (cmpMeta.$members$ || BUILD.propChangeCallback) {
3970
+ {
3971
+ if (Cstr.watchers && !cmpMeta.$watchers$) {
3972
+ cmpMeta.$watchers$ = Cstr.watchers;
3973
+ }
3974
+ if (Cstr.deserializers && !cmpMeta.$deserializers$) {
3975
+ cmpMeta.$deserializers$ = Cstr.deserializers;
3976
+ }
3977
+ if (Cstr.serializers && !cmpMeta.$serializers$) {
3978
+ cmpMeta.$serializers$ = Cstr.serializers;
3979
+ }
2154
3980
  }
2155
3981
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
2156
3982
  members.map(([memberName, [memberFlags]]) => {
@@ -2178,12 +4004,13 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
2178
4004
  Object.defineProperty(prototype, memberName, {
2179
4005
  set(newValue) {
2180
4006
  const ref = getHostRef(this);
4007
+ if (!ref) {
4008
+ return;
4009
+ }
2181
4010
  if (origSetter) {
2182
4011
  const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
2183
4012
  if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
2184
4013
  newValue = ref.$instanceValues$.get(memberName);
2185
- } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
2186
- ref.$instanceValues$.set(memberName, currentValue);
2187
4014
  }
2188
4015
  origSetter.apply(this, [
2189
4016
  parsePropertyValue(
@@ -2200,7 +4027,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
2200
4027
  if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
2201
4028
  setValue(this, memberName, newValue, cmpMeta);
2202
4029
  if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
2203
- ref.$onReadyPromise$.then(() => {
4030
+ ref.$fetchedCbList$.push(() => {
2204
4031
  if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
2205
4032
  ref.$lazyInstance$[memberName] = newValue;
2206
4033
  }
@@ -2223,7 +4050,9 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
2223
4050
  if (ref.$lazyInstance$) {
2224
4051
  setterSetVal();
2225
4052
  } else {
2226
- ref.$onReadyPromise$.then(() => setterSetVal());
4053
+ ref.$fetchedCbList$.push(() => {
4054
+ setterSetVal();
4055
+ });
2227
4056
  }
2228
4057
  }
2229
4058
  }
@@ -2247,29 +4076,34 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
2247
4076
  plt.jmp(() => {
2248
4077
  var _a2;
2249
4078
  const propName = attrNameToPropName.get(attrName);
4079
+ const hostRef = getHostRef(this);
2250
4080
  if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
2251
4081
  newValue = this[propName];
2252
4082
  delete this[propName];
2253
- } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
4083
+ }
4084
+ if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
2254
4085
  this[propName] == newValue) {
2255
4086
  return;
2256
4087
  } else if (propName == null) {
2257
- const hostRef = getHostRef(this);
2258
4088
  const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
2259
- if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
4089
+ if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && newValue !== oldValue) {
2260
4090
  const instance = hostRef.$lazyInstance$ ;
2261
4091
  const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
2262
- entry == null ? void 0 : entry.forEach((callbackName) => {
2263
- if (instance[callbackName] != null) {
2264
- instance[callbackName].call(instance, newValue, oldValue, attrName);
4092
+ entry == null ? void 0 : entry.forEach((watcher) => {
4093
+ const [[watchMethodName, watcherFlags]] = Object.entries(watcher);
4094
+ if (instance[watchMethodName] != null && (flags2 & 128 /* isWatchReady */ || watcherFlags & 1 /* Immediate */)) {
4095
+ instance[watchMethodName].call(instance, newValue, oldValue, attrName);
2265
4096
  }
2266
4097
  });
2267
4098
  }
2268
4099
  return;
2269
4100
  }
4101
+ const propFlags = members.find(([m]) => m === propName);
4102
+ if (propFlags && propFlags[1][0] & 4 /* Boolean */) {
4103
+ newValue = newValue === null || newValue === "false" ? false : true;
4104
+ }
2270
4105
  const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
2271
- newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
2272
- if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
4106
+ if (newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
2273
4107
  this[propName] = newValue;
2274
4108
  }
2275
4109
  });
@@ -2277,7 +4111,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
2277
4111
  Cstr.observedAttributes = Array.from(
2278
4112
  /* @__PURE__ */ new Set([
2279
4113
  ...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
2280
- ...members.filter(([_, m]) => m[0] & 15 /* HasAttribute */).map(([propName, m]) => {
4114
+ ...members.filter(([_, m]) => m[0] & 31 /* HasAttribute */).map(([propName, m]) => {
2281
4115
  var _a2;
2282
4116
  const attrName = m[1] || propName;
2283
4117
  attrNameToPropName.set(attrName, propName);
@@ -2314,6 +4148,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2314
4148
  if (!Cstr.isProxied) {
2315
4149
  {
2316
4150
  cmpMeta.$watchers$ = Cstr.watchers;
4151
+ cmpMeta.$serializers$ = Cstr.serializers;
4152
+ cmpMeta.$deserializers$ = Cstr.deserializers;
2317
4153
  }
2318
4154
  proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
2319
4155
  Cstr.isProxied = true;
@@ -2334,7 +4170,12 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2334
4170
  hostRef.$flags$ |= 128 /* isWatchReady */;
2335
4171
  }
2336
4172
  endNewInstance();
2337
- fireConnectedCallback(hostRef.$lazyInstance$, elm);
4173
+ const needsDeferredCallback = cmpMeta.$flags$ & 4 /* hasSlotRelocation */;
4174
+ if (!needsDeferredCallback) {
4175
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
4176
+ } else {
4177
+ hostRef.$deferredConnectedCallback$ = true;
4178
+ }
2338
4179
  } else {
2339
4180
  Cstr = elm.constructor;
2340
4181
  const cmpTag = elm.localName;
@@ -2346,7 +4187,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
2346
4187
  style = Cstr.style;
2347
4188
  }
2348
4189
  const scopeId2 = getScopeId(cmpMeta);
2349
- if (!styles.has(scopeId2)) {
4190
+ if (!styles.has(scopeId2) || BUILD.hotModuleReplacement) {
2350
4191
  const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
2351
4192
  registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
2352
4193
  endRegisterStyles();
@@ -2371,6 +4212,9 @@ var fireConnectedCallback = (instance, elm) => {
2371
4212
  var connectedCallback = (elm) => {
2372
4213
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
2373
4214
  const hostRef = getHostRef(elm);
4215
+ if (!hostRef) {
4216
+ return;
4217
+ }
2374
4218
  const cmpMeta = hostRef.$cmpMeta$;
2375
4219
  const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
2376
4220
  if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
@@ -2403,7 +4247,7 @@ var connectedCallback = (elm) => {
2403
4247
  }
2404
4248
  if (cmpMeta.$members$) {
2405
4249
  Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
2406
- if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
4250
+ if (memberFlags & 31 /* Prop */ && memberName in elm && elm[memberName] !== Object.prototype[memberName]) {
2407
4251
  const value = elm[memberName];
2408
4252
  delete elm[memberName];
2409
4253
  elm[memberName] = value;
@@ -2443,7 +4287,7 @@ var disconnectedCallback = async (elm) => {
2443
4287
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
2444
4288
  const hostRef = getHostRef(elm);
2445
4289
  {
2446
- if (hostRef.$rmListeners$) {
4290
+ if (hostRef == null ? void 0 : hostRef.$rmListeners$) {
2447
4291
  hostRef.$rmListeners$.map((rmListener) => rmListener());
2448
4292
  hostRef.$rmListeners$ = void 0;
2449
4293
  }
@@ -2490,7 +4334,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2490
4334
  let hasSlotRelocation = false;
2491
4335
  lazyBundles.map((lazyBundle) => {
2492
4336
  lazyBundle[1].map((compactMeta) => {
2493
- var _a2;
4337
+ var _a2, _b, _c;
2494
4338
  const cmpMeta = {
2495
4339
  $flags$: compactMeta[0],
2496
4340
  $tagName$: compactMeta[1],
@@ -2511,13 +4355,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2511
4355
  }
2512
4356
  {
2513
4357
  cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
4358
+ cmpMeta.$serializers$ = (_b = compactMeta[5]) != null ? _b : {};
4359
+ cmpMeta.$deserializers$ = (_c = compactMeta[6]) != null ? _c : {};
2514
4360
  }
2515
- const tagName = cmpMeta.$tagName$;
4361
+ const tagName = transformTag(cmpMeta.$tagName$);
2516
4362
  const HostElement = class extends HTMLElement {
4363
+ ["s-p"];
4364
+ ["s-rc"];
4365
+ hasRegisteredEventListeners = false;
2517
4366
  // StencilLazyHost
2518
4367
  constructor(self) {
2519
4368
  super(self);
2520
- this.hasRegisteredEventListeners = false;
2521
4369
  self = this;
2522
4370
  registerHost(self, cmpMeta);
2523
4371
  if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
@@ -2536,6 +4384,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2536
4384
  }
2537
4385
  connectedCallback() {
2538
4386
  const hostRef = getHostRef(this);
4387
+ if (!hostRef) {
4388
+ return;
4389
+ }
2539
4390
  if (!this.hasRegisteredEventListeners) {
2540
4391
  this.hasRegisteredEventListeners = true;
2541
4392
  addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
@@ -2555,6 +4406,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2555
4406
  plt.raf(() => {
2556
4407
  var _a3;
2557
4408
  const hostRef = getHostRef(this);
4409
+ if (!hostRef) {
4410
+ return;
4411
+ }
2558
4412
  const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
2559
4413
  if (i2 > -1) {
2560
4414
  deferredConnectedCallbacks.splice(i2, 1);
@@ -2565,7 +4419,8 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2565
4419
  });
2566
4420
  }
2567
4421
  componentOnReady() {
2568
- return getHostRef(this).$onReadyPromise$;
4422
+ var _a3;
4423
+ return (_a3 = getHostRef(this)) == null ? void 0 : _a3.$onReadyPromise$;
2569
4424
  }
2570
4425
  };
2571
4426
  if (cmpMeta.$flags$ & 64 /* formAssociated */) {
@@ -2642,6 +4497,9 @@ var hostListenerOpts = (flags) => supportsListenerOptions ? {
2642
4497
 
2643
4498
  // src/runtime/nonce.ts
2644
4499
  var setNonce = (nonce) => plt.$nonce$ = nonce;
4500
+ function transformTag(tag) {
4501
+ return tag;
4502
+ }
2645
4503
 
2646
4504
  exports.Host = Host;
2647
4505
  exports.bootstrapLazy = bootstrapLazy;