@swisspost/design-system-components 10.7.0 → 10.8.0

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 (288) hide show
  1. package/dist/cjs/{create-validator-decorator-D7nAb9KJ.js → create-validator-decorator-DVm_SDrR.js} +1 -1
  2. package/dist/cjs/{index-DWIlRT6N.js → index-DY4QxKNv.js} +5 -5
  3. package/dist/cjs/is-focus-visible-B3CqVQsX.js +19 -0
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/{one-of-B8RUgrZk.js → one-of-qu7_EPxf.js} +1 -1
  6. package/dist/cjs/{package-BtKYhTNj.js → package-DAEQGHsE.js} +1 -1
  7. package/dist/cjs/{pattern-B6VoDk_m.js → pattern-EpwCKMyC.js} +1 -1
  8. package/dist/cjs/post-accordion_2.cjs.entry.js +6 -6
  9. package/dist/cjs/post-autocomplete.cjs.entry.js +5 -5
  10. package/dist/cjs/post-avatar.cjs.entry.js +85 -61
  11. package/dist/cjs/post-back-to-top.cjs.entry.js +6 -6
  12. package/dist/cjs/post-banner.cjs.entry.js +5 -5
  13. package/dist/cjs/post-breadcrumb-item.cjs.entry.js +8 -8
  14. package/dist/cjs/post-breadcrumbs.cjs.entry.js +7 -7
  15. package/dist/cjs/post-closebutton_14.cjs.entry.js +470 -592
  16. package/dist/cjs/post-collapsible_2.cjs.entry.js +13 -7
  17. package/dist/cjs/post-components.cjs.js +2 -2
  18. package/dist/cjs/post-date-picker.cjs.entry.js +22 -8
  19. package/dist/cjs/post-footer.cjs.entry.js +5 -5
  20. package/dist/cjs/post-linkarea.cjs.entry.js +2 -2
  21. package/dist/cjs/post-listbox-option.cjs.entry.js +2 -2
  22. package/dist/cjs/post-listbox.cjs.entry.js +2 -2
  23. package/dist/cjs/post-number-input.cjs.entry.js +3 -3
  24. package/dist/cjs/post-pagination.cjs.entry.js +6 -6
  25. package/dist/cjs/post-popover-trigger.cjs.entry.js +4 -4
  26. package/dist/cjs/post-popover.cjs.entry.js +9 -9
  27. package/dist/cjs/post-progressbar.cjs.entry.js +3 -3
  28. package/dist/cjs/post-rating.cjs.entry.js +5 -5
  29. package/dist/cjs/post-side-navigation-trigger.cjs.entry.js +5 -5
  30. package/dist/cjs/post-side-navigation.cjs.entry.js +14 -9
  31. package/dist/cjs/post-stepper-item.cjs.entry.js +2 -2
  32. package/dist/cjs/post-stepper.cjs.entry.js +6 -6
  33. package/dist/cjs/post-tab-item.cjs.entry.js +5 -5
  34. package/dist/cjs/post-tab-panel.cjs.entry.js +5 -5
  35. package/dist/cjs/post-tabs.cjs.entry.js +8 -8
  36. package/dist/cjs/post-tooltip-trigger.cjs.entry.js +6 -6
  37. package/dist/cjs/post-tooltip.cjs.entry.js +8 -6
  38. package/dist/cjs/{required-bXtlqqaA.js → required-Dgzo-rb5.js} +1 -1
  39. package/dist/cjs/{type-BqLE7Uui.js → type-DBRxpBZI.js} +1 -1
  40. package/dist/cjs/{url-CUy3C3sH.js → url-Dl1JABeP.js} +1 -1
  41. package/dist/collection/components/post-accordion-item/post-accordion-item.css +1 -1
  42. package/dist/collection/components/post-avatar/avatar-utils.js +1 -2
  43. package/dist/collection/components/post-avatar/post-avatar.js +77 -59
  44. package/dist/collection/components/post-back-to-top/post-back-to-top.css +1 -1
  45. package/dist/collection/components/post-banner/post-banner.css +1 -1
  46. package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.css +1 -1
  47. package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.css +1 -1
  48. package/dist/collection/components/post-closebutton/post-closebutton.css +1 -1
  49. package/dist/collection/components/post-collapsible/post-collapsible.js +9 -3
  50. package/dist/collection/components/post-date-picker/post-date-picker.css +1 -1
  51. package/dist/collection/components/post-date-picker/post-date-picker.js +16 -2
  52. package/dist/collection/components/post-header/post-header.css +1 -1
  53. package/dist/collection/components/post-header/post-header.js +31 -12
  54. package/dist/collection/components/post-language-menu/post-language-menu.css +1 -1
  55. package/dist/collection/components/post-language-menu/post-language-menu.js +1 -1
  56. package/dist/collection/components/post-logo/post-logo.css +1 -1
  57. package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
  58. package/dist/collection/components/post-megadropdown/post-megadropdown.js +34 -16
  59. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -1
  60. package/dist/collection/components/post-menu/post-menu.css +1 -1
  61. package/dist/collection/components/post-menu/post-menu.js +3 -14
  62. package/dist/collection/components/post-menu-item/post-menu-item.css +1 -1
  63. package/dist/collection/components/post-number-input/post-number-input.css +2 -2
  64. package/dist/collection/components/post-pagination/post-pagination.css +1 -1
  65. package/dist/collection/components/post-popover/post-popover.css +1 -1
  66. package/dist/collection/components/post-popover/post-popover.js +2 -2
  67. package/dist/collection/components/post-popovercontainer/post-popovercontainer.css +1 -1
  68. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +211 -323
  69. package/dist/collection/components/post-side-navigation/post-side-navigation.css +1 -1
  70. package/dist/collection/components/post-side-navigation/post-side-navigation.js +7 -3
  71. package/dist/collection/components/post-tabs/post-tabs.css +1 -1
  72. package/dist/collection/components/post-tabs/post-tabs.js +2 -2
  73. package/dist/collection/components/post-tooltip/post-tooltip.css +1 -1
  74. package/dist/collection/components/post-tooltip/post-tooltip.js +3 -1
  75. package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +1 -1
  76. package/dist/collection/utils/floating-ui/middleware/flip.js +77 -0
  77. package/dist/collection/utils/floating-ui/middleware/safe-space.js +52 -0
  78. package/dist/collection/utils/floating-ui/util.js +10 -0
  79. package/dist/collection/utils/index.js +1 -0
  80. package/dist/collection/utils/is-focus-visible.js +15 -0
  81. package/dist/components/is-focus-visible.js +1 -0
  82. package/dist/components/package.js +1 -1
  83. package/dist/components/post-accordion-item2.js +1 -1
  84. package/dist/components/post-avatar.js +1 -1
  85. package/dist/components/post-back-to-top.js +1 -1
  86. package/dist/components/post-banner.js +1 -1
  87. package/dist/components/post-breadcrumb-item.js +1 -1
  88. package/dist/components/post-breadcrumbs.js +1 -1
  89. package/dist/components/post-closebutton2.js +1 -1
  90. package/dist/components/post-collapsible2.js +1 -1
  91. package/dist/components/post-date-picker.js +1 -1
  92. package/dist/components/post-header.js +1 -1
  93. package/dist/components/post-language-menu.js +1 -1
  94. package/dist/components/post-logo.js +1 -1
  95. package/dist/components/post-megadropdown-trigger.js +1 -1
  96. package/dist/components/post-megadropdown.js +1 -1
  97. package/dist/components/post-menu-item2.js +1 -1
  98. package/dist/components/post-menu2.js +1 -1
  99. package/dist/components/post-number-input.js +1 -1
  100. package/dist/components/post-pagination.js +1 -1
  101. package/dist/components/post-popover.js +1 -1
  102. package/dist/components/post-popovercontainer2.js +1 -1
  103. package/dist/components/post-side-navigation.js +1 -1
  104. package/dist/components/post-tabs.js +1 -1
  105. package/dist/components/post-tooltip-trigger.js +1 -1
  106. package/dist/components/post-tooltip.js +1 -1
  107. package/dist/components/react/index.js +1 -1
  108. package/dist/components/react/p-5kW0ZF_f.js +1 -0
  109. package/dist/components/react/p-BMCit4BU.js +1 -0
  110. package/dist/components/react/p-BWwWKRO5.js +1 -0
  111. package/dist/components/react/p-BdiQsTQm.js +1 -0
  112. package/dist/components/react/p-BeRGbt65.js +1 -0
  113. package/dist/components/react/{p-DS46v3ju.js → p-C8i672qm.js} +1 -1
  114. package/dist/components/react/{p-BBv5JYsW.js → p-C_JY6ipN.js} +1 -1
  115. package/dist/components/react/p-DRJ9K8sv.js +1 -0
  116. package/dist/components/react/{p-1y1rv5Tw.js → p-DygUkCKz.js} +1 -1
  117. package/dist/components/react/p-DzYMQFK2.js +1 -0
  118. package/dist/components/react/{p-BgEY7xhT.js → p-E-8qAn1z.js} +1 -1
  119. package/dist/components/react/p-Q5LQWL2X.js +1 -0
  120. package/dist/components/react/{p-C8_zqgAP.js → p-UXyZDQt4.js} +1 -1
  121. package/dist/components/react/post-accordion-item.js +1 -1
  122. package/dist/components/react/post-accordion.js +1 -1
  123. package/dist/components/react/post-autocomplete.js +1 -1
  124. package/dist/components/react/post-avatar.js +1 -1
  125. package/dist/components/react/post-back-to-top.js +1 -1
  126. package/dist/components/react/post-banner.js +1 -1
  127. package/dist/components/react/post-breadcrumb-item.js +1 -1
  128. package/dist/components/react/post-breadcrumbs.js +1 -1
  129. package/dist/components/react/post-closebutton.js +1 -1
  130. package/dist/components/react/post-collapsible-trigger.js +1 -1
  131. package/dist/components/react/post-collapsible.js +1 -1
  132. package/dist/components/react/post-date-picker.js +1 -1
  133. package/dist/components/react/post-footer.js +1 -1
  134. package/dist/components/react/post-header.js +1 -1
  135. package/dist/components/react/post-icon.js +1 -1
  136. package/dist/components/react/post-language-menu-item.js +1 -1
  137. package/dist/components/react/post-language-menu.js +1 -1
  138. package/dist/components/react/post-linkarea.js +1 -1
  139. package/dist/components/react/post-listbox-option.js +1 -1
  140. package/dist/components/react/post-listbox.js +1 -1
  141. package/dist/components/react/post-logo.js +1 -1
  142. package/dist/components/react/post-mainnavigation.js +1 -1
  143. package/dist/components/react/post-megadropdown-trigger.js +1 -1
  144. package/dist/components/react/post-megadropdown.js +1 -1
  145. package/dist/components/react/post-menu-item.js +1 -1
  146. package/dist/components/react/post-menu-trigger.js +1 -1
  147. package/dist/components/react/post-menu.js +1 -1
  148. package/dist/components/react/post-number-input.js +1 -1
  149. package/dist/components/react/post-pagination.js +1 -1
  150. package/dist/components/react/post-popover-trigger.js +1 -1
  151. package/dist/components/react/post-popover.js +1 -1
  152. package/dist/components/react/post-popovercontainer.js +1 -1
  153. package/dist/components/react/post-rating.js +1 -1
  154. package/dist/components/react/post-side-navigation-trigger.js +1 -1
  155. package/dist/components/react/post-side-navigation.js +1 -1
  156. package/dist/components/react/post-stepper-item.js +1 -1
  157. package/dist/components/react/post-stepper.js +1 -1
  158. package/dist/components/react/post-tab-item.js +1 -1
  159. package/dist/components/react/post-tab-panel.js +1 -1
  160. package/dist/components/react/post-tabs.js +1 -1
  161. package/dist/components/react/post-togglebutton.js +1 -1
  162. package/dist/components/react/post-tooltip-trigger.js +1 -1
  163. package/dist/components/react/post-tooltip.js +1 -1
  164. package/dist/docs.json +67 -45
  165. package/dist/esm/{create-validator-decorator-DFpQtJzK.js → create-validator-decorator-Cp_NUmrr.js} +1 -1
  166. package/dist/esm/{index-Bs0zeM5Q.js → index-D0jX3Fts.js} +5 -5
  167. package/dist/esm/is-focus-visible-BWwWKRO5.js +17 -0
  168. package/dist/esm/loader.js +3 -3
  169. package/dist/esm/{one-of-DQCfaZpw.js → one-of-B9locHPx.js} +1 -1
  170. package/dist/esm/{package-BBz9PVf0.js → package-BdiQsTQm.js} +1 -1
  171. package/dist/esm/{pattern-3lnaFlkk.js → pattern-BL3OBU8C.js} +1 -1
  172. package/dist/esm/post-accordion_2.entry.js +6 -6
  173. package/dist/esm/post-autocomplete.entry.js +5 -5
  174. package/dist/esm/post-avatar.entry.js +85 -61
  175. package/dist/esm/post-back-to-top.entry.js +6 -6
  176. package/dist/esm/post-banner.entry.js +5 -5
  177. package/dist/esm/post-breadcrumb-item.entry.js +8 -8
  178. package/dist/esm/post-breadcrumbs.entry.js +7 -7
  179. package/dist/esm/post-closebutton_14.entry.js +470 -592
  180. package/dist/esm/post-collapsible_2.entry.js +13 -7
  181. package/dist/esm/post-components.js +3 -3
  182. package/dist/esm/post-date-picker.entry.js +22 -8
  183. package/dist/esm/post-footer.entry.js +5 -5
  184. package/dist/esm/post-linkarea.entry.js +2 -2
  185. package/dist/esm/post-listbox-option.entry.js +2 -2
  186. package/dist/esm/post-listbox.entry.js +2 -2
  187. package/dist/esm/post-number-input.entry.js +3 -3
  188. package/dist/esm/post-pagination.entry.js +6 -6
  189. package/dist/esm/post-popover-trigger.entry.js +4 -4
  190. package/dist/esm/post-popover.entry.js +9 -9
  191. package/dist/esm/post-progressbar.entry.js +3 -3
  192. package/dist/esm/post-rating.entry.js +5 -5
  193. package/dist/esm/post-side-navigation-trigger.entry.js +5 -5
  194. package/dist/esm/post-side-navigation.entry.js +14 -9
  195. package/dist/esm/post-stepper-item.entry.js +2 -2
  196. package/dist/esm/post-stepper.entry.js +6 -6
  197. package/dist/esm/post-tab-item.entry.js +5 -5
  198. package/dist/esm/post-tab-panel.entry.js +5 -5
  199. package/dist/esm/post-tabs.entry.js +8 -8
  200. package/dist/esm/post-tooltip-trigger.entry.js +6 -6
  201. package/dist/esm/post-tooltip.entry.js +8 -6
  202. package/dist/esm/{required-NuzPg5jZ.js → required-CDaQB1gC.js} +1 -1
  203. package/dist/esm/{type-ChnksJ25.js → type-CQ7XuPCZ.js} +1 -1
  204. package/dist/esm/{url-BCk3ZU-x.js → url-B-86gtTK.js} +1 -1
  205. package/dist/post-components/p-0688d296.entry.js +1 -0
  206. package/dist/post-components/p-0b0b2f02.entry.js +1 -0
  207. package/dist/post-components/{p-31550a50.entry.js → p-0d25c033.entry.js} +1 -1
  208. package/dist/post-components/{p-aa33141b.entry.js → p-229d324e.entry.js} +1 -1
  209. package/dist/post-components/{p-f275b872.entry.js → p-2a5312a7.entry.js} +1 -1
  210. package/dist/post-components/{p-43240818.entry.js → p-330fd6cd.entry.js} +1 -1
  211. package/dist/post-components/{p-6a2f47af.entry.js → p-3712133b.entry.js} +1 -1
  212. package/dist/post-components/{p-bd128657.entry.js → p-379780a3.entry.js} +1 -1
  213. package/dist/post-components/{p-aff180f5.entry.js → p-3fdb8ebc.entry.js} +1 -1
  214. package/dist/post-components/{p-64480e3a.entry.js → p-456b0786.entry.js} +1 -1
  215. package/dist/post-components/{p-96d07f2b.entry.js → p-4d30c65d.entry.js} +1 -1
  216. package/dist/post-components/{p-c2de3702.entry.js → p-534ca27e.entry.js} +1 -1
  217. package/dist/post-components/p-5369b9c2.entry.js +1 -0
  218. package/dist/post-components/p-6833be12.entry.js +1 -0
  219. package/dist/post-components/p-6ad44691.entry.js +1 -0
  220. package/dist/post-components/{p-e6a4146b.entry.js → p-82c62e90.entry.js} +1 -1
  221. package/dist/post-components/{p-451ec8ee.entry.js → p-91a2ef3c.entry.js} +1 -1
  222. package/dist/post-components/p-95f5d5ea.entry.js +1 -0
  223. package/dist/post-components/p-9dd286bf.entry.js +1 -0
  224. package/dist/post-components/p-9fedcfba.entry.js +1 -0
  225. package/dist/post-components/{p-DeUk3rcv.js → p-BCPv4bcY.js} +1 -1
  226. package/dist/post-components/p-BWwWKRO5.js +1 -0
  227. package/dist/post-components/p-BdiQsTQm.js +1 -0
  228. package/dist/post-components/{p-D1s6tESz.js → p-CP3LjuFR.js} +1 -1
  229. package/dist/post-components/p-D0jX3Fts.js +2 -0
  230. package/dist/post-components/{p-Bl-_v3aT.js → p-D6mVqZLg.js} +1 -1
  231. package/dist/post-components/{p-BwhzbRIR.js → p-DSaWK_q-.js} +1 -1
  232. package/dist/post-components/p-VPHnF9fB.js +1 -0
  233. package/dist/post-components/{p-63e570c4.entry.js → p-ab0500b7.entry.js} +1 -1
  234. package/dist/post-components/p-c123ecde.entry.js +1 -0
  235. package/dist/post-components/{p-61a45246.entry.js → p-d2de31b7.entry.js} +1 -1
  236. package/dist/post-components/p-dffeb751.entry.js +1 -0
  237. package/dist/post-components/{p-f784e149.entry.js → p-e11ccdbe.entry.js} +1 -1
  238. package/dist/post-components/{p-31a97aae.entry.js → p-e560767b.entry.js} +1 -1
  239. package/dist/post-components/p-ee7fade4.entry.js +1 -0
  240. package/dist/post-components/{p-f566768e.entry.js → p-f2629077.entry.js} +1 -1
  241. package/dist/post-components/{p-58b66607.entry.js → p-f2b24bbd.entry.js} +1 -1
  242. package/dist/post-components/p-gv9b-Z15.js +1 -0
  243. package/dist/post-components/post-components.css +2 -2
  244. package/dist/post-components/post-components.esm.js +1 -1
  245. package/dist/types/components/post-avatar/avatar-utils.d.ts +0 -2
  246. package/dist/types/components/post-avatar/post-avatar.d.ts +11 -9
  247. package/dist/types/components/post-date-picker/post-date-picker.d.ts +2 -0
  248. package/dist/types/components/post-header/post-header.d.ts +2 -0
  249. package/dist/types/components/post-language-menu/post-language-menu.d.ts +3 -0
  250. package/dist/types/components/post-megadropdown/post-megadropdown.d.ts +1 -1
  251. package/dist/types/components/post-menu/post-menu.d.ts +0 -1
  252. package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +74 -69
  253. package/dist/types/components.d.ts +39 -26
  254. package/dist/types/utils/floating-ui/middleware/flip.d.ts +14 -0
  255. package/dist/types/utils/floating-ui/middleware/safe-space.d.ts +10 -0
  256. package/dist/types/utils/floating-ui/util.d.ts +4 -0
  257. package/dist/types/utils/index.d.ts +1 -0
  258. package/dist/types/utils/is-focus-visible.d.ts +5 -0
  259. package/dist/vrt/helpers/header-test-config.js +2 -1
  260. package/hydrate/index.js +537 -602
  261. package/hydrate/index.mjs +537 -602
  262. package/package.json +11 -10
  263. package/dist/components/react/p-BBz9PVf0.js +0 -1
  264. package/dist/components/react/p-C3J7fIWx.js +0 -1
  265. package/dist/components/react/p-C5ibTdH5.js +0 -1
  266. package/dist/components/react/p-CUKzje9q.js +0 -1
  267. package/dist/components/react/p-DTBtJCjk.js +0 -1
  268. package/dist/components/react/p-XUkUhxaz.js +0 -1
  269. package/dist/components/react/p-ialuSSl2.js +0 -1
  270. package/dist/post-components/p-10e430c3.entry.js +0 -1
  271. package/dist/post-components/p-32e1e951.entry.js +0 -1
  272. package/dist/post-components/p-4f08b99b.entry.js +0 -1
  273. package/dist/post-components/p-54432b47.entry.js +0 -1
  274. package/dist/post-components/p-5d7de657.entry.js +0 -1
  275. package/dist/post-components/p-63dd9a76.entry.js +0 -1
  276. package/dist/post-components/p-9a1e8b1d.entry.js +0 -1
  277. package/dist/post-components/p-BBz9PVf0.js +0 -1
  278. package/dist/post-components/p-Bs0zeM5Q.js +0 -2
  279. package/dist/post-components/p-DH-eJVHZ.js +0 -1
  280. package/dist/post-components/p-Dk-DtPZn.js +0 -1
  281. package/dist/post-components/p-d5327dd1.entry.js +0 -1
  282. package/dist/post-components/p-e1817744.entry.js +0 -1
  283. package/dist/post-components/p-f6da5e69.entry.js +0 -1
  284. package/dist/post-components/p-f917527c.entry.js +0 -1
  285. package/dist/types/home/runner/work/design-system/design-system/packages/components/.stencil/vrt/helpers/header-variants.config.d.ts +0 -23
  286. package/dist/vrt/helpers/header-variants.config.js +0 -157
  287. /package/dist/collection/utils/{floating-ui.js → floating-ui/platform/safe-area.js} +0 -0
  288. /package/dist/types/utils/{floating-ui.d.ts → floating-ui/platform/safe-area.d.ts} +0 -0
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as e,h as o,Host as s,transformTag as i}from"@stencil/core/internal/client";import{d as r,a}from"./post-popovercontainer2.js";import"./breakpoints.js";import{a as n}from"./get-focusable-children.js";import{v as c}from"./package.js";import{d as p}from"./post-closebutton2.js";import{d as l}from"./post-icon2.js";import{O as d}from"./one-of.js";import{R as f}from"./required.js";import{T as h}from"./type.js";var m=function(t,e,o,s){var i,r=arguments.length,a=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,o,s);else for(var n=t.length-1;n>=0;n--)(i=t[n])&&(a=(r<3?i(a):r>3?i(e,o,a):i(e,o))||a);return r>3&&a&&Object.defineProperty(e,o,a),a};const b=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.placement="top",this.arrow=!0,this.breakpointChange=()=>{requestAnimationFrame((()=>this.updateEdgeGap()))}}async show(t){await this.popoverRef.show(t),this.focusFirstEl(),this.updateEdgeGap()}async hide(){this.popoverRef.hide()}async toggle(t,e){await this.popoverRef.toggle(t,e)&&(this.updateEdgeGap(),this.focusFirstEl())}connectedCallback(){globalThis.addEventListener("postBreakpoint:device",this.breakpointChange)}disconnectedCallback(){globalThis.removeEventListener("postBreakpoint:device",this.breakpointChange)}updateEdgeGap(){const t=this.host.shadowRoot?.querySelector("post-closebutton");if(!t)return;const e=t.getBoundingClientRect().width;e&&!Number.isNaN(e)&&(this.edgeGap=e/2)}focusFirstEl(){const t=n(this.host)[0];t&&t.focus()}render(){return o(s,{key:"0e57981004d99d528a4652598739afbf1208376c","data-version":c},o("post-popovercontainer",{key:"380838970ed2c62f9e21e95da6957e9ff36db31a",arrow:this.arrow,placement:this.placement,edgeGap:this.edgeGap,autoHide:!0,ref:t=>{t&&(this.popoverRef=t)}},o("div",{key:"77465a8e943f61492869a3e05cf03f90b9fd553c",class:"popover-container"},o("div",{key:"0ab4e621ecc58a9775c4a9b8dfba3d26eb577878",class:"popover-content"},o("slot",{key:"1b2d37d50ef23edad118abc5949686e59e15b931"})),o("post-closebutton",{key:"8c2138b22f49681d37d2f38f6fb6331c730849f3"},this.textClose))))}get host(){return this}static get style(){return"*{box-sizing:border-box}:host{display:contents}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.popover-container{color:var(--post-current-fg);background-color:var(--post-current-bg);display:flex;align-items:self-start;padding:8px;min-width:160px;max-width:var(--post-popover-max-width, 280px)}.popover-content{padding:8px;flex-grow:1}post-closebutton{color-scheme:light}"}},[257,"post-popover",{placement:[1],textClose:[513,"text-close"],arrow:[4],edgeGap:[32],show:[64],hide:[64],toggle:[64]}]);m([d(a)],b.prototype,"placement",void 0),m([f(),h("string")],b.prototype,"textClose",void 0);const u=b,v=function(){"undefined"!=typeof customElements&&["post-popover","post-closebutton","post-icon","post-popovercontainer"].forEach((t=>{switch(t){case"post-popover":customElements.get(i(t))||customElements.define(i(t),b);break;case"post-closebutton":customElements.get(i(t))||p();break;case"post-icon":customElements.get(i(t))||l();break;case"post-popovercontainer":customElements.get(i(t))||r()}}))};export{u as PostPopover,v as defineCustomElement}
1
+ import{proxyCustomElement as r,HTMLElement as e,h as o,Host as t,transformTag as c}from"@stencil/core/internal/client";import{d as a,a as s}from"./post-popovercontainer2.js";import"./breakpoints.js";import{a as i}from"./get-focusable-children.js";import{v as l}from"./package.js";import{d as n}from"./post-closebutton2.js";import{d as p}from"./post-icon2.js";import{O as h}from"./one-of.js";import{R as v}from"./required.js";import{T as g}from"./type.js";var b=function(r,e,o,t){var c,a=arguments.length,s=a<3?e:null===t?t=Object.getOwnPropertyDescriptor(e,o):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(r,e,o,t);else for(var i=r.length-1;i>=0;i--)(c=r[i])&&(s=(a<3?c(s):a>3?c(e,o,s):c(e,o))||s);return a>3&&s&&Object.defineProperty(e,o,s),s};const d=r(class extends e{constructor(r){super(),!1!==r&&this.__registerHost(),this.__attachShadow(),this.placement="top",this.arrow=!0,this.breakpointChange=()=>{requestAnimationFrame((()=>this.updateEdgeGap()))}}async show(r){await this.popoverRef.show(r),this.focusFirstEl(),this.updateEdgeGap()}async hide(){this.popoverRef.hide()}async toggle(r,e){await this.popoverRef.toggle(r,e)&&(this.updateEdgeGap(),this.focusFirstEl())}connectedCallback(){globalThis.addEventListener("postBreakpoint:device",this.breakpointChange)}disconnectedCallback(){globalThis.removeEventListener("postBreakpoint:device",this.breakpointChange)}updateEdgeGap(){const r=this.host.shadowRoot?.querySelector("post-closebutton");if(!r)return;const e=r.getBoundingClientRect().width;e&&!Number.isNaN(e)&&(this.edgeGap=e/2)}focusFirstEl(){const r=i(this.host)[0];r&&r.focus()}render(){return o(t,{key:"0e57981004d99d528a4652598739afbf1208376c","data-version":l},o("post-popovercontainer",{key:"cfa3e03284033c19317fab6a565cbcef0d4aa458",arrow:this.arrow,placement:this.placement,edgeGap:this.edgeGap,autoHide:!0,autoResize:!0,ref:r=>{r&&(this.popoverRef=r)}},o("div",{key:"758a7d16666581674c48043aaaf4b266c3d754b8",class:"popover-container"},o("div",{key:"60ab881499fa6cc016dc285f962f2dbee884adee",class:"popover-content"},o("slot",{key:"78b457120894b4117a7f4008f313e9a346f539ab"})),o("post-closebutton",{key:"5cc2cc1e36e8840f2e2729dcf8c15a211c95ec12"},this.textClose))))}get host(){return this}static get style(){return"@supports not (color: light-dark(black, white)){post-closebutton{--post-scheme-color-body-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-002);--post-scheme-color-body-bg:var(--post-scheme-color-body-bg-light, var(--post-core-color-sandgrey-080));--post-scheme-color-body-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-body-fg:var(--post-scheme-color-body-fg-light, var(--post-core-color-brand-white));--post-scheme-color-signal-success-dark-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-green);--post-scheme-color-signal-success-dark:var(--post-scheme-color-signal-success-dark-light, var(--post-core-color-notification-green));--post-scheme-color-signal-success-light-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-green-light);--post-scheme-color-signal-success-light:var(--post-scheme-color-signal-success-light-light, var(--post-core-color-notification-green-light));--post-scheme-color-signal-error-dark-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-red);--post-scheme-color-signal-error-dark:var(--post-scheme-color-signal-error-dark-light, var(--post-core-color-notification-red));--post-scheme-color-signal-error-light-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-red-light);--post-scheme-color-signal-error-light:var(--post-scheme-color-signal-error-light-light, var(--post-core-color-notification-red-light));--post-scheme-color-signal-warning-dark-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-orange);--post-scheme-color-signal-warning-dark:var(--post-scheme-color-signal-warning-dark-light, var(--post-core-color-notification-orange));--post-scheme-color-signal-warning-light-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-orange-light);--post-scheme-color-signal-warning-light:var(--post-scheme-color-signal-warning-light-light, var(--post-core-color-notification-orange-light));--post-scheme-color-signal-information-dark-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-blue);--post-scheme-color-signal-information-dark:var(--post-scheme-color-signal-information-dark-light, var(--post-core-color-notification-blue));--post-scheme-color-signal-information-light-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-blue-light);--post-scheme-color-signal-information-light:var(--post-scheme-color-signal-information-light-light, var(--post-core-color-notification-blue-light));--post-scheme-color-signal-success-solo-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-green);--post-scheme-color-signal-success-solo:var(--post-scheme-color-signal-success-solo-light, var(--post-core-color-notification-green-night));--post-scheme-color-signal-error-solo-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-red);--post-scheme-color-signal-error-solo:var(--post-scheme-color-signal-error-solo-light, var(--post-core-color-notification-red-night));--post-scheme-color-signal-info-solo-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-blue);--post-scheme-color-signal-info-solo:var(--post-scheme-color-signal-info-solo-light, var(--post-core-color-notification-blue-night));--post-scheme-color-signal-warning-solo-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-orange);--post-scheme-color-signal-warning-solo:var(--post-scheme-color-signal-warning-solo-light, var(--post-core-color-notification-orange-night));--post-scheme-color-interactive-button-primary-enabled-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-primary-enabled-fg:var(--post-scheme-color-interactive-button-primary-enabled-fg-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-button-primary-enabled-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-button-primary-enabled-bg:var(--post-scheme-color-interactive-button-primary-enabled-bg-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-primary-enabled-stroke-light:var(--post-fallback-prefers-light) var(--post-scheme-color-interactive-button-primary-enabled-bg);--post-scheme-color-interactive-button-primary-enabled-stroke:var(--post-scheme-color-interactive-button-primary-enabled-stroke-light, var(--post-scheme-color-interactive-button-primary-enabled-bg));--post-scheme-color-interactive-button-primary-enabled-fg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-button-primary-enabled-fg-inverted:var(--post-scheme-color-interactive-button-primary-enabled-fg-inverted-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-primary-enabled-bg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-primary-enabled-bg-inverted:var(--post-scheme-color-interactive-button-primary-enabled-bg-inverted-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-button-primary-enabled-stroke-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-primary-enabled-stroke-inverted:var(--post-scheme-color-interactive-button-primary-enabled-stroke-inverted-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-button-primary-hover-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-primary-hover-fg:var(--post-scheme-color-interactive-button-primary-hover-fg-light, var(--post-core-color-sandgrey-070));--post-scheme-color-interactive-button-primary-hover-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-070);--post-scheme-color-interactive-button-primary-hover-bg:var(--post-scheme-color-interactive-button-primary-hover-bg-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-primary-hover-stroke-light:var(--post-fallback-prefers-light) var(--post-scheme-color-interactive-button-primary-hover-bg);--post-scheme-color-interactive-button-primary-hover-stroke:var(--post-scheme-color-interactive-button-primary-hover-stroke-light, var(--post-scheme-color-interactive-button-primary-hover-bg));--post-scheme-color-interactive-button-primary-hover-fg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-070);--post-scheme-color-interactive-button-primary-hover-fg-inverted:var(--post-scheme-color-interactive-button-primary-hover-fg-inverted-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-primary-hover-bg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-primary-hover-bg-inverted:var(--post-scheme-color-interactive-button-primary-hover-bg-inverted-light, var(--post-core-color-sandgrey-070));--post-scheme-color-interactive-button-primary-hover-stroke-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-primary-hover-stroke-inverted:var(--post-scheme-color-interactive-button-primary-hover-stroke-inverted-light, var(--post-core-color-sandgrey-070));--post-scheme-color-interactive-button-primary-disabled-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-button-primary-disabled-fg:var(--post-scheme-color-interactive-button-primary-disabled-fg-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-primary-disabled-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-primary-disabled-bg:var(--post-scheme-color-interactive-button-primary-disabled-bg-light, var(--post-core-color-sandgrey-060));--post-scheme-color-interactive-button-primary-disabled-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-button-primary-disabled-stroke:var(--post-scheme-color-interactive-button-primary-disabled-stroke-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-primary-disabled-fg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-primary-disabled-fg-inverted:var(--post-scheme-color-interactive-button-primary-disabled-fg-inverted-light, var(--post-core-color-sandgrey-060));--post-scheme-color-interactive-button-primary-disabled-bg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-button-primary-disabled-bg-inverted:var(--post-scheme-color-interactive-button-primary-disabled-bg-inverted-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-primary-disabled-stroke-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-primary-disabled-stroke-inverted:var(--post-scheme-color-interactive-button-primary-disabled-stroke-inverted-light, var(--post-core-color-sandgrey-060));--post-scheme-color-interactive-button-secondary-enabled-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-button-secondary-enabled-fg:var(--post-scheme-color-interactive-button-secondary-enabled-fg-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-secondary-enabled-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-secondary-enabled-bg:var(--post-scheme-color-interactive-button-secondary-enabled-bg-light, var(--post-core-color-colorless));--post-scheme-color-interactive-button-secondary-enabled-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-button-secondary-enabled-stroke:var(--post-scheme-color-interactive-button-secondary-enabled-stroke-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-secondary-enabled-fg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-secondary-enabled-fg-inverted:var(--post-scheme-color-interactive-button-secondary-enabled-fg-inverted-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-button-secondary-enabled-bg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-colorless);--post-scheme-color-interactive-button-secondary-enabled-bg-inverted:var(--post-scheme-color-interactive-button-secondary-enabled-bg-inverted-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-secondary-enabled-stroke-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-secondary-enabled-stroke-inverted:var(--post-scheme-color-interactive-button-secondary-enabled-stroke-inverted-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-button-secondary-hover-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-070);--post-scheme-color-interactive-button-secondary-hover-fg:var(--post-scheme-color-interactive-button-secondary-hover-fg-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-secondary-hover-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-secondary-hover-bg:var(--post-scheme-color-interactive-button-secondary-hover-bg-light, var(--post-core-color-sandgrey-alpha-lightsand-10));--post-scheme-color-interactive-button-secondary-hover-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-070);--post-scheme-color-interactive-button-secondary-hover-stroke:var(--post-scheme-color-interactive-button-secondary-hover-stroke-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-secondary-hover-fg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-secondary-hover-fg-inverted:var(--post-scheme-color-interactive-button-secondary-hover-fg-inverted-light, var(--post-core-color-sandgrey-070));--post-scheme-color-interactive-button-secondary-hover-bg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-alpha-lightsand-10);--post-scheme-color-interactive-button-secondary-hover-bg-inverted:var(--post-scheme-color-interactive-button-secondary-hover-bg-inverted-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-secondary-hover-stroke-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-secondary-hover-stroke-inverted:var(--post-scheme-color-interactive-button-secondary-hover-stroke-inverted-light, var(--post-core-color-sandgrey-070));--post-scheme-color-interactive-button-secondary-disabled-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-button-secondary-disabled-fg:var(--post-scheme-color-interactive-button-secondary-disabled-fg-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-secondary-disabled-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-secondary-disabled-bg:var(--post-scheme-color-interactive-button-secondary-disabled-bg-light, var(--post-core-color-sandgrey-alpha-lightsand-30));--post-scheme-color-interactive-button-secondary-disabled-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-button-secondary-disabled-stroke:var(--post-scheme-color-interactive-button-secondary-disabled-stroke-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-secondary-disabled-fg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-secondary-disabled-fg-inverted:var(--post-scheme-color-interactive-button-secondary-disabled-fg-inverted-light, var(--post-core-color-sandgrey-060));--post-scheme-color-interactive-button-secondary-disabled-bg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-alpha-lightsand-30);--post-scheme-color-interactive-button-secondary-disabled-bg-inverted:var(--post-scheme-color-interactive-button-secondary-disabled-bg-inverted-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-secondary-disabled-stroke-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-secondary-disabled-stroke-inverted:var(--post-scheme-color-interactive-button-secondary-disabled-stroke-inverted-light, var(--post-core-color-sandgrey-060));--post-scheme-color-interactive-button-tertiary-enabled-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-button-tertiary-enabled-fg:var(--post-scheme-color-interactive-button-tertiary-enabled-fg-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-tertiary-enabled-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-colorless);--post-scheme-color-interactive-button-tertiary-enabled-bg:var(--post-scheme-color-interactive-button-tertiary-enabled-bg-light, var(--post-core-color-colorless));--post-scheme-color-interactive-button-tertiary-enabled-stroke-light:var(--post-fallback-prefers-light) var(--post-scheme-color-interactive-button-tertiary-enabled-bg);--post-scheme-color-interactive-button-tertiary-enabled-stroke:var(--post-scheme-color-interactive-button-tertiary-enabled-stroke-light, var(--post-scheme-color-interactive-button-tertiary-enabled-bg));--post-scheme-color-interactive-button-tertiary-enabled-fg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-tertiary-enabled-fg-inverted:var(--post-scheme-color-interactive-button-tertiary-enabled-fg-inverted-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-button-tertiary-enabled-bg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-colorless);--post-scheme-color-interactive-button-tertiary-enabled-bg-inverted:var(--post-scheme-color-interactive-button-tertiary-enabled-bg-inverted-light, var(--post-core-color-colorless));--post-scheme-color-interactive-button-tertiary-enabled-stroke-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-colorless);--post-scheme-color-interactive-button-tertiary-enabled-stroke-inverted:var(--post-scheme-color-interactive-button-tertiary-enabled-stroke-inverted-light, var(--post-core-color-colorless));--post-scheme-color-interactive-button-tertiary-hover-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-070);--post-scheme-color-interactive-button-tertiary-hover-fg:var(--post-scheme-color-interactive-button-tertiary-hover-fg-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-tertiary-hover-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-colorless);--post-scheme-color-interactive-button-tertiary-hover-bg:var(--post-scheme-color-interactive-button-tertiary-hover-bg-light, var(--post-core-color-sandgrey-alpha-lightsand-10));--post-scheme-color-interactive-button-tertiary-hover-stroke-light:var(--post-fallback-prefers-light) var(--post-scheme-color-interactive-button-tertiary-hover-bg);--post-scheme-color-interactive-button-tertiary-hover-stroke:var(--post-scheme-color-interactive-button-tertiary-hover-stroke-light, var(--post-core-color-colorless));--post-scheme-color-interactive-button-tertiary-hover-fg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-tertiary-hover-fg-inverted:var(--post-scheme-color-interactive-button-tertiary-hover-fg-inverted-light, var(--post-core-color-sandgrey-070));--post-scheme-color-interactive-button-tertiary-hover-bg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-alpha-lightsand-10);--post-scheme-color-interactive-button-tertiary-hover-bg-inverted:var(--post-scheme-color-interactive-button-tertiary-hover-bg-inverted-light, var(--post-core-color-colorless));--post-scheme-color-interactive-button-tertiary-hover-stroke-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-colorless);--post-scheme-color-interactive-button-tertiary-hover-stroke-inverted:var(--post-scheme-color-interactive-button-tertiary-hover-stroke-inverted-light, var(--post-core-color-colorless));--post-scheme-color-interactive-button-tertiary-disabled-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-button-tertiary-disabled-fg:var(--post-scheme-color-interactive-button-tertiary-disabled-fg-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-tertiary-disabled-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-colorless);--post-scheme-color-interactive-button-tertiary-disabled-bg:var(--post-scheme-color-interactive-button-tertiary-disabled-bg-light, var(--post-core-color-sandgrey-alpha-lightsand-30));--post-scheme-color-interactive-button-tertiary-disabled-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-button-tertiary-disabled-stroke:var(--post-scheme-color-interactive-button-tertiary-disabled-stroke-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-button-tertiary-disabled-fg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-tertiary-disabled-fg-inverted:var(--post-scheme-color-interactive-button-tertiary-disabled-fg-inverted-light, var(--post-core-color-sandgrey-060));--post-scheme-color-interactive-button-tertiary-disabled-bg-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-alpha-lightsand-30);--post-scheme-color-interactive-button-tertiary-disabled-bg-inverted:var(--post-scheme-color-interactive-button-tertiary-disabled-bg-inverted-light, var(--post-core-color-colorless));--post-scheme-color-interactive-button-tertiary-disabled-stroke-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-button-tertiary-disabled-stroke-inverted:var(--post-scheme-color-interactive-button-tertiary-disabled-stroke-inverted-light, var(--post-core-color-sandgrey-060));--post-scheme-color-interactive-focus-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-focus-stroke:var(--post-scheme-color-interactive-focus-stroke-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-focus-stroke-inverted-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-focus-stroke-inverted:var(--post-scheme-color-interactive-focus-stroke-inverted-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-primary-enabled-bg1-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-enabled-bg1:var(--post-scheme-color-interactive-primary-enabled-bg1-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-primary-enabled-fg1-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-primary-enabled-fg1:var(--post-scheme-color-interactive-primary-enabled-fg1-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-enabled-fg2-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-primary-enabled-fg2:var(--post-scheme-color-interactive-primary-enabled-fg2-light, var(--post-core-color-sandgrey-060));--post-scheme-color-interactive-primary-enabled-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-primary-enabled-stroke:var(--post-scheme-color-interactive-primary-enabled-stroke-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-enabled-fg3-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-enabled-fg3:var(--post-scheme-color-interactive-primary-enabled-fg3-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-primary-enabled-bg2-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-primary-enabled-bg2:var(--post-scheme-color-interactive-primary-enabled-bg2-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-enabled-stroke3-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-enabled-stroke3:var(--post-scheme-color-interactive-primary-enabled-stroke3-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-primary-enabled-bg3-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-enabled-bg3:var(--post-scheme-color-interactive-primary-enabled-bg3-light, var(--post-core-color-colorless));--post-scheme-color-interactive-primary-enabled-stroke4-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-030);--post-scheme-color-interactive-primary-enabled-stroke4:var(--post-scheme-color-interactive-primary-enabled-stroke4-light, var(--post-core-color-sandgrey-030));--post-scheme-color-interactive-primary-enabled-bg4-light:var(--post-fallback-prefers-light) var(--post-core-color-colorless);--post-scheme-color-interactive-primary-enabled-bg4:var(--post-scheme-color-interactive-primary-enabled-bg4-light, var(--post-core-color-colorless));--post-scheme-color-interactive-primary-enabled-stroke5-light:var(--post-fallback-prefers-light) var(--post-core-color-colorless);--post-scheme-color-interactive-primary-enabled-stroke5:var(--post-scheme-color-interactive-primary-enabled-stroke5-light, var(--post-core-color-colorless));--post-scheme-color-interactive-primary-enabled-bg5-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-enabled-bg5:var(--post-scheme-color-interactive-primary-enabled-bg5-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-enabled-fg5-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-primary-enabled-fg5:var(--post-scheme-color-interactive-primary-enabled-fg5-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-primary-enabled-fg6-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-enabled-fg6:var(--post-scheme-color-interactive-primary-enabled-fg6-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-enabled-bg6-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-primary-enabled-bg6:var(--post-scheme-color-interactive-primary-enabled-bg6-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-primary-hover-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-hover-bg:var(--post-scheme-color-interactive-primary-hover-bg-light, var(--post-core-color-sandgrey-070));--post-scheme-color-interactive-primary-hover-fg1-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-070);--post-scheme-color-interactive-primary-hover-fg1:var(--post-scheme-color-interactive-primary-hover-fg1-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-hover-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-070);--post-scheme-color-interactive-primary-hover-stroke:var(--post-scheme-color-interactive-primary-hover-stroke-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-hover-fg3-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-hover-fg3:var(--post-scheme-color-interactive-primary-hover-fg3-light, var(--post-core-color-sandgrey-070));--post-scheme-color-interactive-primary-hover-bg2-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-070);--post-scheme-color-interactive-primary-hover-bg2:var(--post-scheme-color-interactive-primary-hover-bg2-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-hover-stroke3-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-hover-stroke3:var(--post-scheme-color-interactive-primary-hover-stroke3-light, var(--post-core-color-sandgrey-070));--post-scheme-color-interactive-primary-hover-bg3-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-hover-bg3:var(--post-scheme-color-interactive-primary-hover-bg3-light, var(--post-core-color-sandgrey-alpha-lightsand-20));--post-scheme-color-interactive-primary-hover-bg4-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-006);--post-scheme-color-interactive-primary-hover-bg4:var(--post-scheme-color-interactive-primary-hover-bg4-light, var(--post-core-color-sandgrey-006));--post-scheme-color-interactive-primary-hover-bg5-light:var(--post-fallback-prefers-light) var(--post-core-color-colorless);--post-scheme-color-interactive-primary-hover-bg5:var(--post-scheme-color-interactive-primary-hover-bg5-light, var(--post-core-color-colorless));--post-scheme-color-interactive-primary-hover-bg7-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-006);--post-scheme-color-interactive-primary-hover-bg7:var(--post-scheme-color-interactive-primary-hover-bg7-light, var(--post-core-color-sandgrey-alpha-lightsand-10));--post-scheme-color-interactive-primary-hover-bg8-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-hover-bg8:var(--post-scheme-color-interactive-primary-hover-bg8-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-hover-fg4-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-070);--post-scheme-color-interactive-primary-hover-fg4:var(--post-scheme-color-interactive-primary-hover-fg4-light, var(--post-core-color-sandgrey-070));--post-scheme-color-interactive-primary-disabled-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-disabled-bg:var(--post-scheme-color-interactive-primary-disabled-bg-light, var(--post-core-color-sandgrey-060));--post-scheme-color-interactive-primary-disabled-fg1-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-primary-disabled-fg1:var(--post-scheme-color-interactive-primary-disabled-fg1-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-disabled-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-primary-disabled-stroke:var(--post-scheme-color-interactive-primary-disabled-stroke-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-disabled-fg3-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-disabled-fg3:var(--post-scheme-color-interactive-primary-disabled-fg3-light, var(--post-core-color-sandgrey-060));--post-scheme-color-interactive-primary-disabled-stroke2-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-primary-disabled-stroke2:var(--post-scheme-color-interactive-primary-disabled-stroke2-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-disabled-bg4-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-primary-disabled-bg4:var(--post-scheme-color-interactive-primary-disabled-bg4-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-disabled-stroke3-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-disabled-stroke3:var(--post-scheme-color-interactive-primary-disabled-stroke3-light, var(--post-core-color-sandgrey-060));--post-scheme-color-interactive-primary-disabled-bg5-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-012);--post-scheme-color-interactive-primary-disabled-bg5:var(--post-scheme-color-interactive-primary-disabled-bg5-light, var(--post-core-color-sandgrey-alpha-lightsand-10));--post-scheme-color-interactive-primary-disabled-fg4-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-primary-disabled-fg4:var(--post-scheme-color-interactive-primary-disabled-fg4-light, var(--post-core-color-sandgrey-alpha-lightsand-60));--post-scheme-color-interactive-primary-disabled-stroke4-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-primary-disabled-stroke4:var(--post-scheme-color-interactive-primary-disabled-stroke4-light, var(--post-core-color-sandgrey-alpha-lightsand-60));--post-scheme-color-interactive-primary-disabled-bg6-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-disabled-bg6:var(--post-scheme-color-interactive-primary-disabled-bg6-light, var(--post-core-color-colorless));--post-scheme-color-interactive-primary-selected-bg1-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-selected-bg1:var(--post-scheme-color-interactive-primary-selected-bg1-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-primary-selected-fg1-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-primary-selected-fg1:var(--post-scheme-color-interactive-primary-selected-fg1-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-selected-stroke1-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-primary-selected-stroke1:var(--post-scheme-color-interactive-primary-selected-stroke1-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-selected-fg3-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-selected-fg3:var(--post-scheme-color-interactive-primary-selected-fg3-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-primary-selected-bg2-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-green);--post-scheme-color-interactive-primary-selected-bg2:var(--post-scheme-color-interactive-primary-selected-bg2-light, var(--post-core-color-notification-green-light));--post-scheme-color-interactive-primary-selected-stroke4-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-green);--post-scheme-color-interactive-primary-selected-stroke4:var(--post-scheme-color-interactive-primary-selected-stroke4-light, var(--post-core-color-notification-green-light));--post-scheme-color-interactive-primary-selected-stroke3-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-primary-selected-stroke3:var(--post-scheme-color-interactive-primary-selected-stroke3-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-primary-selected-bg4-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-primary-selected-bg4:var(--post-scheme-color-interactive-primary-selected-bg4-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-primary-selected-bg3-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-postyellow);--post-scheme-color-interactive-primary-selected-bg3:var(--post-scheme-color-interactive-primary-selected-bg3-light, var(--post-core-color-brand-postyellow));--post-scheme-color-interactive-notification-info-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-notification-info-fg:var(--post-scheme-color-interactive-notification-info-fg-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-notification-info-bg-light:var(--post-fallback-prefers-light) var(--post-scheme-color-signal-information-light);--post-scheme-color-interactive-notification-info-bg:var(--post-scheme-color-interactive-notification-info-bg-light, var(--post-scheme-color-signal-information-light));--post-scheme-color-interactive-notification-info-icon-light:var(--post-fallback-prefers-light) var(--post-scheme-color-signal-information-dark);--post-scheme-color-interactive-notification-info-icon:var(--post-scheme-color-interactive-notification-info-icon-light, var(--post-scheme-color-signal-information-dark));--post-scheme-color-interactive-notification-info-stroke-light:var(--post-fallback-prefers-light) var(--post-scheme-color-signal-information-dark);--post-scheme-color-interactive-notification-info-stroke:var(--post-scheme-color-interactive-notification-info-stroke-light, var(--post-scheme-color-signal-information-dark));--post-scheme-color-interactive-notification-success-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-notification-success-fg:var(--post-scheme-color-interactive-notification-success-fg-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-notification-success-bg-light:var(--post-fallback-prefers-light) var(--post-scheme-color-signal-success-light);--post-scheme-color-interactive-notification-success-bg:var(--post-scheme-color-interactive-notification-success-bg-light, var(--post-scheme-color-signal-success-light));--post-scheme-color-interactive-notification-success-icon-light:var(--post-fallback-prefers-light) var(--post-scheme-color-signal-success-dark);--post-scheme-color-interactive-notification-success-icon:var(--post-scheme-color-interactive-notification-success-icon-light, var(--post-scheme-color-signal-success-dark));--post-scheme-color-interactive-notification-success-stroke-light:var(--post-fallback-prefers-light) var(--post-scheme-color-signal-success-dark);--post-scheme-color-interactive-notification-success-stroke:var(--post-scheme-color-interactive-notification-success-stroke-light, var(--post-scheme-color-signal-success-dark));--post-scheme-color-interactive-notification-warning-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-notification-warning-fg:var(--post-scheme-color-interactive-notification-warning-fg-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-notification-warning-bg-light:var(--post-fallback-prefers-light) var(--post-scheme-color-signal-warning-light);--post-scheme-color-interactive-notification-warning-bg:var(--post-scheme-color-interactive-notification-warning-bg-light, var(--post-scheme-color-signal-warning-light));--post-scheme-color-interactive-notification-warning-icon-light:var(--post-fallback-prefers-light) var(--post-scheme-color-signal-warning-dark);--post-scheme-color-interactive-notification-warning-icon:var(--post-scheme-color-interactive-notification-warning-icon-light, var(--post-scheme-color-signal-warning-dark));--post-scheme-color-interactive-notification-warning-stroke-light:var(--post-fallback-prefers-light) var(--post-scheme-color-signal-warning-dark);--post-scheme-color-interactive-notification-warning-stroke:var(--post-scheme-color-interactive-notification-warning-stroke-light, var(--post-scheme-color-signal-warning-dark));--post-scheme-color-interactive-notification-error-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-notification-error-fg:var(--post-scheme-color-interactive-notification-error-fg-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-notification-error-bg-light:var(--post-fallback-prefers-light) var(--post-scheme-color-signal-error-light);--post-scheme-color-interactive-notification-error-bg:var(--post-scheme-color-interactive-notification-error-bg-light, var(--post-scheme-color-signal-error-light));--post-scheme-color-interactive-notification-error-icon-light:var(--post-fallback-prefers-light) var(--post-scheme-color-signal-error-dark);--post-scheme-color-interactive-notification-error-icon:var(--post-scheme-color-interactive-notification-error-icon-light, var(--post-scheme-color-signal-error-dark));--post-scheme-color-interactive-notification-error-stroke-light:var(--post-fallback-prefers-light) var(--post-scheme-color-signal-error-dark);--post-scheme-color-interactive-notification-error-stroke:var(--post-scheme-color-interactive-notification-error-stroke-light, var(--post-scheme-color-signal-error-dark));--post-scheme-color-interactive-input-enabled-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-input-enabled-bg:var(--post-scheme-color-interactive-input-enabled-bg-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-input-enabled-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-input-enabled-fg:var(--post-scheme-color-interactive-input-enabled-fg-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-input-enabled-border-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-input-enabled-border:var(--post-scheme-color-interactive-input-enabled-border-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-input-hover-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-interactive-input-hover-bg:var(--post-scheme-color-interactive-input-hover-bg-light, var(--post-core-color-brand-white));--post-scheme-color-interactive-input-hover-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-070);--post-scheme-color-interactive-input-hover-fg:var(--post-scheme-color-interactive-input-hover-fg-light, var(--post-core-color-sandgrey-070));--post-scheme-color-interactive-input-hover-border-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-070);--post-scheme-color-interactive-input-hover-border:var(--post-scheme-color-interactive-input-hover-border-light, var(--post-core-color-sandgrey-070));--post-scheme-color-interactive-input-disabled-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-colorless);--post-scheme-color-interactive-input-disabled-bg:var(--post-scheme-color-interactive-input-disabled-bg-light, var(--post-core-color-colorless));--post-scheme-color-interactive-input-disabled-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-input-disabled-fg:var(--post-scheme-color-interactive-input-disabled-fg-light, var(--post-core-color-sandgrey-alpha-lightsand-60));--post-scheme-color-interactive-input-disabled-border-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-input-disabled-border:var(--post-scheme-color-interactive-input-disabled-border-light, var(--post-core-color-sandgrey-alpha-lightsand-60));--post-scheme-color-interactive-card-hover-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-020);--post-scheme-color-interactive-card-hover-bg:var(--post-scheme-color-interactive-card-hover-bg-light, var(--post-core-color-sandgrey-020));--post-scheme-color-interactive-card-hover-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-card-hover-fg:var(--post-scheme-color-interactive-card-hover-fg-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-tabs-selected-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-interactive-tabs-selected-fg:var(--post-scheme-color-interactive-tabs-selected-fg-light, var(--post-core-color-sandgrey-100));--post-scheme-color-interactive-tabs-disabled-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-tabs-disabled-fg:var(--post-scheme-color-interactive-tabs-disabled-fg-light, var(--post-core-color-sandgrey-060));--post-scheme-color-interactive-tabs-disabled-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-interactive-tabs-disabled-stroke:var(--post-scheme-color-interactive-tabs-disabled-stroke-light, var(--post-core-color-sandgrey-060));--post-scheme-color-interactive-tabs-selected-hovered-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-070);--post-scheme-color-interactive-tabs-selected-hovered-fg:var(--post-scheme-color-interactive-tabs-selected-hovered-fg-light, var(--post-core-color-sandgrey-070));--post-scheme-color-interactive-tabs-selected-hovered-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-070);--post-scheme-color-interactive-tabs-selected-hovered-stroke:var(--post-scheme-color-interactive-tabs-selected-hovered-stroke-light, var(--post-core-color-sandgrey-002));--post-scheme-color-surface-default-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-002);--post-scheme-color-surface-default-bg:var(--post-scheme-color-surface-default-bg-light, var(--post-core-color-sandgrey-080));--post-scheme-color-surface-default-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-surface-default-fg:var(--post-scheme-color-surface-default-fg-light, var(--post-core-color-brand-white));--post-scheme-color-surface-default-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-surface-default-stroke:var(--post-scheme-color-surface-default-stroke-light, var(--post-core-color-brand-white));--post-scheme-color-surface-accent1-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-surface-accent1-bg:var(--post-scheme-color-surface-accent1-bg-light, var(--post-core-color-sandgrey-100));--post-scheme-color-surface-accent1-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-surface-accent1-fg:var(--post-scheme-color-surface-accent1-fg-light, var(--post-core-color-brand-white));--post-scheme-color-surface-alternate-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-006);--post-scheme-color-surface-alternate-bg:var(--post-scheme-color-surface-alternate-bg-light, var(--post-core-color-sandgrey-100));--post-scheme-color-surface-alternate-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-surface-alternate-fg:var(--post-scheme-color-surface-alternate-fg-light, var(--post-core-color-brand-white));--post-scheme-color-surface-alternate-secondary-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-surface-alternate-secondary-bg:var(--post-scheme-color-surface-alternate-secondary-bg-light, var(--post-core-color-brand-white));--post-scheme-color-surface-brand-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-postyellow);--post-scheme-color-surface-brand-bg:var(--post-scheme-color-surface-brand-bg-light, var(--post-core-color-brand-postyellow));--post-scheme-color-surface-brand-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-surface-brand-fg:var(--post-scheme-color-surface-brand-fg-light, var(--post-core-color-sandgrey-100));--post-scheme-color-surface-brand-fg-accent-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-scheme-color-surface-brand-fg-accent:var(--post-scheme-color-surface-brand-fg-accent-light, var(--post-core-color-sandgrey-100));--post-scheme-color-surface-brand-secondary-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-surface-brand-secondary-bg:var(--post-scheme-color-surface-brand-secondary-bg-light, var(--post-core-color-brand-white));--post-scheme-color-surface-accent-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-080);--post-scheme-color-surface-accent-bg:var(--post-scheme-color-surface-accent-bg-light, var(--post-core-color-sandgrey-002));--post-scheme-color-surface-accent-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-surface-accent-fg:var(--post-scheme-color-surface-accent-fg-light, var(--post-core-color-sandgrey-100));--post-scheme-color-surface-accent-fg-accent-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-postyellow);--post-scheme-color-surface-accent-fg-accent:var(--post-scheme-color-surface-accent-fg-accent-light, var(--post-core-color-sandgrey-100));--post-scheme-color-badge-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-notification-red);--post-scheme-color-badge-bg:var(--post-scheme-color-badge-bg-light, var(--post-core-color-notification-red));--post-scheme-color-badge-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-badge-fg:var(--post-scheme-color-badge-fg-light, var(--post-core-color-brand-white));--post-scheme-color-badge-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-scheme-color-badge-stroke:var(--post-scheme-color-badge-stroke-light, var(--post-core-color-brand-white));--post-scheme-color-popover-hover-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-020);--post-scheme-color-popover-hover:var(--post-scheme-color-popover-hover-light, var(--post-core-color-sandgrey-020));--post-scheme-color-divider-border-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-060);--post-scheme-color-divider-border:var(--post-scheme-color-divider-border-light, var(--post-core-color-sandgrey-050));--post-scheme-color-backdrop-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-alpha-darksand-80);--post-scheme-color-backdrop-bg:var(--post-scheme-color-backdrop-bg-light, var(--post-core-color-sandgrey-alpha-darksand-80));--post-scheme-color-datepicker-header-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-012);--post-scheme-color-datepicker-header-bg:var(--post-scheme-color-datepicker-header-bg-light, var(--post-core-color-sandgrey-070));--post-cargo-scheme-color-surface-default-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-002);--post-cargo-scheme-color-surface-default-bg:var(--post-cargo-scheme-color-surface-default-bg-light, var(--post-core-color-sandgrey-080));--post-cargo-scheme-color-surface-default-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-cargo-scheme-color-surface-default-fg:var(--post-cargo-scheme-color-surface-default-fg-light, var(--post-core-color-brand-white));--post-cargo-scheme-color-surface-default-stroke-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-cargo-scheme-color-surface-default-stroke:var(--post-cargo-scheme-color-surface-default-stroke-light, var(--post-core-color-brand-white));--post-cargo-scheme-color-surface-accent1-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-cargo-scheme-color-surface-accent1-bg:var(--post-cargo-scheme-color-surface-accent1-bg-light, var(--post-core-color-sandgrey-100));--post-cargo-scheme-color-surface-accent1-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-cargo-scheme-color-surface-accent1-fg:var(--post-cargo-scheme-color-surface-accent1-fg-light, var(--post-core-color-brand-white));--post-cargo-scheme-color-surface-alternate-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-006);--post-cargo-scheme-color-surface-alternate-bg:var(--post-cargo-scheme-color-surface-alternate-bg-light, var(--post-core-color-sandgrey-100));--post-cargo-scheme-color-surface-alternate-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-cargo-scheme-color-surface-alternate-fg:var(--post-cargo-scheme-color-surface-alternate-fg-light, var(--post-core-color-brand-white));--post-cargo-scheme-color-surface-brand-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-cargo-green);--post-cargo-scheme-color-surface-brand-bg:var(--post-cargo-scheme-color-surface-brand-bg-light, var(--post-core-color-cargo-green));--post-cargo-scheme-color-surface-brand-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-cargo-scheme-color-surface-brand-fg:var(--post-cargo-scheme-color-surface-brand-fg-light, var(--post-core-color-brand-white));--post-cargo-scheme-color-surface-brand-fg-accent-light:var(--post-fallback-prefers-light) var(--post-core-color-cargo-blue);--post-cargo-scheme-color-surface-brand-fg-accent:var(--post-cargo-scheme-color-surface-brand-fg-accent-light, var(--post-core-color-cargo-blue));--post-cargo-scheme-color-surface-brand-secondary-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-cargo-scheme-color-surface-brand-secondary-bg:var(--post-cargo-scheme-color-surface-brand-secondary-bg-light, var(--post-core-color-brand-white));--post-cargo-scheme-color-surface-accent-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-cargo-blue);--post-cargo-scheme-color-surface-accent-bg:var(--post-cargo-scheme-color-surface-accent-bg-light, var(--post-core-color-cargo-blue));--post-cargo-scheme-color-surface-accent-fg-light:var(--post-fallback-prefers-light) var(--post-core-color-sandgrey-100);--post-cargo-scheme-color-surface-accent-fg:var(--post-cargo-scheme-color-surface-accent-fg-light, var(--post-core-color-sandgrey-100));--post-cargo-scheme-color-surface-accent-fg-accent-light:var(--post-fallback-prefers-light) var(--post-core-color-cargo-green);--post-cargo-scheme-color-surface-accent-fg-accent:var(--post-cargo-scheme-color-surface-accent-fg-accent-light, var(--post-core-color-cargo-green));--post-cargo-scheme-color-surface-accent-secondary-bg-light:var(--post-fallback-prefers-light) var(--post-core-color-brand-white);--post-cargo-scheme-color-surface-accent-secondary-bg:var(--post-cargo-scheme-color-surface-accent-secondary-bg-light, var(--post-core-color-brand-white))}}*{box-sizing:border-box}:host{display:contents}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}.popover-container{color:var(--post-current-fg);background-color:var(--post-current-bg);display:flex;align-items:self-start;padding:8px;max-width:var(--post-popover-max-width, 280px);max-height:100%;overflow-y:auto;overscroll-behavior:contain}.popover-content{padding:8px;flex-grow:1}@supports (color: light-dark(black, white)){post-closebutton{color-scheme:light}}@supports not (color: light-dark(black, white)){post-closebutton{}}post-popovercontainer::part(post-popovercontainer-content){min-width:160px}"}},[257,"post-popover",{placement:[1],textClose:[513,"text-close"],arrow:[4],edgeGap:[32],show:[64],hide:[64],toggle:[64]}]);b([h(s)],d.prototype,"placement",void 0),b([v(),g("string")],d.prototype,"textClose",void 0);const m=d,f=function(){"undefined"!=typeof customElements&&["post-popover","post-closebutton","post-icon","post-popovercontainer"].forEach((r=>{switch(r){case"post-popover":customElements.get(c(r))||customElements.define(c(r),d);break;case"post-closebutton":customElements.get(c(r))||n();break;case"post-icon":customElements.get(c(r))||p();break;case"post-popovercontainer":customElements.get(c(r))||a()}}))};export{m as PostPopover,f as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as e,createEvent as n,Build as o,h as r,Host as i,transformTag as s}from"@stencil/core/internal/client";import"./breakpoints.js";import{v as a}from"./package.js";import{O as c}from"./one-of.js";import{T as l}from"./type.js";const p=["top","right","bottom","left","top-start","top-end","right-start","right-end","bottom-start","bottom-end","left-start","left-end"],f=["top","right","bottom","left"],u=Math.min,h=Math.max,d=Math.round,m=Math.floor,v=t=>({x:t,y:t}),g={left:"right",right:"left",bottom:"top",top:"bottom"};function w(t,e,n){return h(t,u(e,n))}function y(t,e){return"function"==typeof t?t(e):t}function x(t){return t.split("-")[0]}function b(t){return t.split("-")[1]}function S(t){return"x"===t?"y":"x"}function k(t){return"y"===t?"height":"width"}function E(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function T(t){return S(E(t))}function M(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const A=["left","right"],O=["right","left"],H=["top","bottom"],L=["bottom","top"];function $(t){const e=x(t);return g[e]+t.slice(e.length)}function C(t){return"number"!=typeof t?function(t){var e,n,o,r;return{top:null!=(e=t.top)?e:0,right:null!=(n=t.right)?n:0,bottom:null!=(o=t.bottom)?o:0,left:null!=(r=t.left)?r:0}}(t):{top:t,right:t,bottom:t,left:t}}function D(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function R(t,e,n){let{reference:o,floating:r}=t;const i=E(e),s=T(e),a=k(s),c=x(e),l="y"===i,p=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,u=o[a]/2-r[a]/2;let h;switch(c){case"top":h={x:p,y:o.y-r.height};break;case"bottom":h={x:p,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:f};break;case"left":h={x:o.x-r.width,y:f};break;default:h={x:o.x,y:o.y}}const d=b(e);return d&&(h[s]+=u*("end"===d?1:-1)*(n&&l?-1:1)),h}async function j(t,e){var n;void 0===e&&(e={});const{x:o,y:r,platform:i,rects:s,elements:a,strategy:c}=t,{boundary:l="clippingAncestors",rootBoundary:p="viewport",elementContext:f="floating",altBoundary:u=!1,padding:h=0}=y(e,t),d=C(h),m=a[u?"floating"===f?"reference":"floating":f],v=D(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:l,rootBoundary:p,strategy:c})),g="floating"===f?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),x=await(null==i.isElement?void 0:i.isElement(w))&&await(null==i.getScale?void 0:i.getScale(w))||{x:1,y:1},b=D(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:w,strategy:c}):g);return{top:(v.top-b.top+d.top)/x.y,bottom:(b.bottom-v.bottom+d.bottom)/x.y,left:(v.left-b.left+d.left)/x.x,right:(b.right-v.right+d.right)/x.x}}function z(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function F(t){return f.some((e=>t[e]>=0))}function P(t){const e=u(...t.map((t=>t.left))),n=u(...t.map((t=>t.top)));return{x:e,y:n,width:h(...t.map((t=>t.right)))-e,height:h(...t.map((t=>t.bottom)))-n}}const W=new Set(["left","top"]);function B(){return"undefined"!=typeof window}function q(t){return G(t)?(t.nodeName||"").toLowerCase():"#document"}function I(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function N(t){var e;return null==(e=(G(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function G(t){return!!B()&&(t instanceof Node||t instanceof I(t).Node)}function V(t){return!!B()&&(t instanceof Element||t instanceof I(t).Element)}function X(t){return!!B()&&(t instanceof HTMLElement||t instanceof I(t).HTMLElement)}function Y(t){return!(!B()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof I(t).ShadowRoot)}function _(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=rt(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&"inline"!==r&&"contents"!==r}function J(t){return/^(table|td|th)$/.test(q(t))}function K(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const Q=/transform|translate|scale|rotate|perspective|filter/,U=/paint|layout|strict|content/,Z=t=>!!t&&"none"!==t;let tt;function et(t){const e=V(t)?rt(t):t;return Z(e.transform)||Z(e.translate)||Z(e.scale)||Z(e.rotate)||Z(e.perspective)||!nt()&&(Z(e.backdropFilter)||Z(e.filter))||Q.test(e.willChange||"")||U.test(e.contain||"")}function nt(){return null==tt&&(tt="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),tt}function ot(t){return/^(html|body|#document)$/.test(q(t))}function rt(t){return I(t).getComputedStyle(t)}function it(t){return V(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function st(t){if("html"===q(t))return t;const e=t.assignedSlot||t.parentNode||Y(t)&&t.host||N(t);return Y(e)?e.host:e}function at(t){const e=st(t);return ot(e)?(t.ownerDocument||t).body:X(e)&&_(e)?e:at(e)}function ct(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const r=at(t),i=r===(null==(o=t.ownerDocument)?void 0:o.body),s=I(r);if(i){const t=lt(s);return e.concat(s,s.visualViewport||[],_(r)?r:[],t&&n?ct(t):[])}return e.concat(r,ct(r,[],n))}function lt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function pt(t){const e=rt(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=X(t),i=r?t.offsetWidth:n,s=r?t.offsetHeight:o,a=d(n)!==i||d(o)!==s;return a&&(n=i,o=s),{width:n,height:o,$:a}}function ft(t){return V(t)?t:t.contextElement}function ut(t){const e=ft(t);if(!X(e))return v(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=pt(e);let s=(i?d(n.width):n.width)/o,a=(i?d(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const ht=v(0);function dt(t){const e=I(t);return nt()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:ht}function mt(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const r=t.getBoundingClientRect(),i=ft(t);let s=v(1);e&&(o?V(o)&&(s=ut(o)):s=ut(t));const a=function(t,e,n){return void 0===e&&(e=!1),!!n&&e&&n===I(t)}(i,n,o)?dt(i):v(0);let c=(r.left+a.x)/s.x,l=(r.top+a.y)/s.y,p=r.width/s.x,f=r.height/s.y;if(i&&o){const t=I(i),e=V(o)?I(o):o;let n=t,r=lt(n);for(;r&&e!==n;){const t=ut(r),e=r.getBoundingClientRect(),o=rt(r),i=e.left+(r.clientLeft+parseFloat(o.paddingLeft))*t.x,s=e.top+(r.clientTop+parseFloat(o.paddingTop))*t.y;c*=t.x,l*=t.y,p*=t.x,f*=t.y,c+=i,l+=s,n=I(r),r=lt(n)}}return D({width:p,height:f,x:c,y:l})}function vt(t,e){const n=it(t).scrollLeft;return e?e.left+n:mt(N(t)).left+n}function gt(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-vt(t,n),y:n.top+e.scrollTop}}function wt(t,e,n){let o;if("viewport"===e||"layoutViewport"===e)o=function(t,e,n){void 0===n&&(n="viewport");const o="layoutViewport"===n,r=I(t),i=N(t),s=r.visualViewport;let a=i.clientWidth,c=i.clientHeight,l=0,p=0;if(s){const t=!nt()||"fixed"===e;o?t||(l=-s.offsetLeft,p=-s.offsetTop):(a=s.width,c=s.height,t&&(l=s.offsetLeft,p=s.offsetTop))}if(vt(i)<=0){const t=i.ownerDocument,e=t.body,n=getComputedStyle(e),o="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,r=Math.abs(i.clientWidth-e.clientWidth-o),s="stable both-edges"===getComputedStyle(i).scrollbarGutter?r/2:r;s<=25&&(a-=s)}return{width:a,height:c,x:l,y:p}}(t,n,e);else if("document"===e)o=function(t){const e=it(t),n=t.ownerDocument.body,o=h(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),r=h(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-e.scrollLeft+vt(t);const s=-e.scrollTop;return"rtl"===rt(n).direction&&(i+=h(t.clientWidth,n.clientWidth)-o),{width:o,height:r,x:i,y:s}}(N(t));else if(V(e))o=function(t,e){const n=mt(t,!0,"fixed"===e),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=ut(t);return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:r*i.x,y:o*i.y}}(e,n);else{const n=dt(t);o={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return D(o)}function yt(t,e,n){const o=X(e),r=N(e),i="fixed"===n,s=mt(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const c=v(0);if((o||!i)&&(("body"!==q(e)||_(r))&&(a=it(e)),o)){const t=mt(e,!0,i,e);c.x=t.x+e.clientLeft,c.y=t.y+e.clientTop}!o&&r&&(c.x=vt(r));const l=!r||o||i?v(0):gt(r,a);return{x:s.left+a.scrollLeft-c.x-l.x,y:s.top+a.scrollTop-c.y-l.y,width:s.width,height:s.height}}function xt(t){return"static"===rt(t).position}function bt(t,e){if(!X(t)||"fixed"===rt(t).position)return null;if(e)return e(t);let n=t.offsetParent;return N(t)===n&&(n=n.ownerDocument.body),n}function St(t,e){const n=I(t);if(K(t))return n;if(!X(t)){let e=st(t);for(;e&&!ot(e);){if(V(e)&&!xt(e))return e;e=st(e)}return n}let o=bt(t,e);for(;o&&J(o)&&xt(o);)o=bt(o,e);return o&&ot(o)&&xt(o)&&!et(o)?n:o||function(t){let e=st(t);for(;X(e)&&!ot(e);){if(et(e))return e;if(K(e))return null;e=st(e)}return null}(t)||n}const kt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i="fixed"===r,s=N(o),a=!!e&&K(e.floating);if(o===s||a&&i)return n;let c={scrollLeft:0,scrollTop:0},l=v(1);const p=v(0),f=X(o);if((f||!i)&&(("body"!==q(o)||_(s))&&(c=it(o)),f)){const t=mt(o);l=ut(o),p.x=t.x+o.clientLeft,p.y=t.y+o.clientTop}const u=!s||f||i?v(0):gt(s,c);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+p.x+u.x,y:n.y*l.y-c.scrollTop*l.y+p.y+u.y}},getDocumentElement:N,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const i=[..."clippingAncestors"===n?K(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=ct(t,[],!1).filter((t=>V(t)&&"body"!==q(t))),r=null;const i="fixed"===rt(t).position;let s=i?st(t):t;for(;V(s)&&!ot(s);){const t=rt(s),e=et(s),n=r?r.position:i?"fixed":"";e||"fixed"!==n&&("absolute"!==n||"static"!==t.position)?r=t:o=o.filter((t=>t!==s)),s=st(s)}return e.set(t,o),o}(e,this._c):[].concat(n),o],s=wt(e,i[0],r);let a=s.top,c=s.right,l=s.bottom,p=s.left;for(let t=1;t<i.length;t++){const n=wt(e,i[t],r);a=h(n.top,a),c=u(n.right,c),l=u(n.bottom,l),p=h(n.left,p)}return{width:c-p,height:l-a,x:p,y:a}},getOffsetParent:St,getElementRects:async function(t){const e=this.getOffsetParent||St,n=this.getDimensions,o=await n(t.floating);return{reference:yt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return t.getClientRects?Array.from(t.getClientRects()):[]},getDimensions:function(t){const{width:e,height:n}=pt(t);return{width:e,height:n}},getScale:ut,isElement:V,isRTL:function(t){return"rtl"===rt(t).direction}};function Et(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}const Tt=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:i,placement:s,middlewareData:a}=e,c=await async function(t,e){const{placement:n,platform:o,elements:r}=t,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),s=x(n),a=b(n),c="y"===E(n),l=W.has(s)?-1:1,p=i&&c?-1:1,f=y(e,t);let{mainAxis:u,crossAxis:h,alignmentAxis:d}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&"number"==typeof d&&(h="end"===a?-1*d:d),c?{x:h*p,y:u*l}:{x:u*l,y:h*p}}(e,t);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(o=a.arrow)&&o.alignmentOffset?{}:{x:r+c.x,y:i+c.y,data:{...c,placement:s}}}}},Mt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:a,platform:c,elements:l}=e,{mainAxis:p=!0,crossAxis:f=!0,fallbackPlacements:u,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:m=!0,...v}=y(t,e);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const g=x(r),w=E(a),S=x(a)===a,C=await(null==c.isRTL?void 0:c.isRTL(l.floating)),D=u||(S||!m?[$(a)]:function(t){const e=$(t);return[M(t),e,M(e)]}(a)),R="none"!==d;!u&&R&&D.push(...function(t,e,n,o){const r=b(t);let i=function(t,e,n){switch(t){case"top":case"bottom":return n?e?O:A:e?A:O;case"left":case"right":return e?H:L;default:return[]}}(x(t),"start"===n,o);return r&&(i=i.map((t=>t+"-"+r)),e&&(i=i.concat(i.map(M)))),i}(a,m,d,C));const j=[a,...D],z=await c.detectOverflow(e,v),F=[];let P=(null==(o=i.flip)?void 0:o.overflows)||[];if(p&&F.push(z[g]),f){const t=function(t,e,n){void 0===n&&(n=!1);const o=b(t),r=T(t),i=k(r);let s="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=$(s)),[s,$(s)]}(r,s,C);F.push(z[t[0]],z[t[1]])}if(P=[...P,{placement:r,overflows:F}],!F.every((t=>t<=0))){var W,B;const t=((null==(W=i.flip)?void 0:W.index)||0)+1,e=j[t];if(e&&("alignment"!==f||w===E(e)||P.every((t=>E(t.placement)!==w||t.overflows[0]>0))))return{data:{index:t,overflows:P},reset:{placement:e}};let n=null==(B=P.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:B.placement;if(!n)switch(h){case"bestFit":{var q;const t=null==(q=P.filter((t=>{if(R){const e=E(t.placement);return e===w||"y"===e}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:q[0];t&&(n=t);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}},At=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:o,platform:r,elements:i}=e,{apply:s=()=>{},...a}=y(t,e),c=await r.detectOverflow(e,a),l=x(n),p=b(n),f="y"===E(n),{width:d,height:m}=o.floating;let v,g;"top"===l||"bottom"===l?(v=l,g=p===(await(null==r.isRTL?void 0:r.isRTL(i.floating))?"start":"end")?"left":"right"):(g=l,v="end"===p?"top":"bottom");const w=m-c.top-c.bottom,S=d-c.left-c.right,k=u(m-c[v],w),T=u(d-c[g],S),M=e.middlewareData.shift;let A=k,O=T;null!=M&&M.enabled.x&&(O=S),null!=M&&M.enabled.y&&(A=w),!M&&!p&&(f?O=d-2*h(c.left,c.right):A=m-2*h(c.top,c.bottom)),await s({...e,availableWidth:O,availableHeight:A});const H=await r.getDimensions(i.floating);return d!==H.width||m!==H.height?{reset:{rects:!0}}:{}}}},Ot=function(t){return void 0===t&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:o,rects:r,platform:i,strategy:s}=e,{padding:a=2,x:c,y:l}=y(t,e),p=Array.from(await(null==i.getClientRects?void 0:i.getClientRects(o.reference))||[]);if(!p.length)return{};const f=function(t){const e=t.slice().sort(((t,e)=>t.y-e.y)),n=[];let o=null;for(let t=0;t<e.length;t++){const r=e[t];!o||r.y-o.y>o.height/2?n.push([r]):n[n.length-1].push(r),o=r}return n.map((t=>D(P(t))))}(p),d=D(P(p)),m=C(a),v=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===f.length&&(f[0].left>f[1].right||f[1].left>f[0].right)&&null!=c&&null!=l)return f.find((t=>c>t.left-m.left&&c<t.right+m.right&&l>t.top-m.top&&l<t.bottom+m.bottom))||d;if(f.length>=2){if("y"===E(n)){const t=f[0],e=f[f.length-1],o="top"===x(n),r=t.top,i=o?t.left:e.left;return D({x:i,y:r,width:(o?t.right:e.right)-i,height:e.bottom-r})}const t="left"===x(n),e=h(...f.map((t=>t.right))),o=u(...f.map((t=>t.left))),r=f.filter((n=>t?n.left===o:n.right===e)),i=r[0].top;return D({x:o,y:i,width:e-o,height:r[r.length-1].bottom-i})}return d}},floating:o.floating,strategy:s});return r.reference.x!==v.reference.x||r.reference.y!==v.reference.y||r.reference.width!==v.reference.width||r.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}},Ht=function(t){return void 0===t&&(t={}),{options:t,fn(e){var n,o;const{x:r,y:i,placement:s,rects:a,middlewareData:c}=e,{offset:l=0,mainAxis:p=!0,crossAxis:f=!0}=y(t,e),u={x:r,y:i},h=E(s),d=S(h);let m=u[d],v=u[h];const g=y(l,e),w="number"==typeof g?{mainAxis:g,crossAxis:0}:{mainAxis:null!=(n=g.mainAxis)?n:0,crossAxis:null!=(o=g.crossAxis)?o:0};if(p){const t="y"===d?"height":"width",e=a.reference[d]-a.floating[t]+w.mainAxis,n=a.reference[d]+a.reference[t]-w.mainAxis;m<e?m=e:m>n&&(m=n)}if(f){var b,k;const t="y"===d?"width":"height",e=W.has(x(s)),n=a.reference[h]-a.floating[t]+(e&&(null==(b=c.offset)?void 0:b[h])||0)+(e?0:w.crossAxis),o=a.reference[h]+a.reference[t]+(e?0:(null==(k=c.offset)?void 0:k[h])||0)-(e?w.crossAxis:0);v<n?v=n:v>o&&(v=o)}return{[d]:m,[h]:v}}}};var Lt=class extends Event{oldState;newState;constructor(t,{oldState:e="",newState:n="",...o}={}){super(t,o),this.oldState=String(e||""),this.newState=String(n||"")}},$t=new WeakMap;function Ct(t,e,n){$t.set(t,setTimeout((()=>{$t.has(t)&&t.dispatchEvent(new Lt("toggle",{cancelable:!1,oldState:e,newState:n}))}),0))}var Dt=globalThis.ShadowRoot||function(){},Rt=globalThis.HTMLDialogElement||function(){},jt=new WeakMap,zt=new WeakMap,Ft=new WeakMap,Pt=new WeakMap;function Wt(t){return Pt.get(t)||"hidden"}var Bt=new WeakMap;function qt(t){return[...t].pop()}function It(t,e){return!("auto"!==t.popover&&"manual"!==t.popover&&"hint"!==t.popover||!t.isConnected||e&&"showing"!==Wt(t)||!e&&"hidden"!==Wt(t)||t instanceof Rt&&t.hasAttribute("open")||document.fullscreenElement===t)}function Nt(t){if(!t)return 0;const e=zt.get(document)||new Set,n=Ft.get(document)||new Set;return n.has(t)?[...n].indexOf(t)+e.size+1:e.has(t)?[...e].indexOf(t)+1:0}function Gt(t){let e;const n=Ft.get(t)||new Set,o=zt.get(t)||new Set,r=n.size>0?n:o.size>0?o:null;return r?(e=qt(r),e.isConnected?e:(r.delete(e),Gt(t))):null}function Vt(t){for(const e of t||[]){if(e.isConnected)return e;t.delete(e)}return null}function Xt(t){return"function"==typeof t.getRootNode?t.getRootNode():t.parentNode?Xt(t.parentNode):t}function Yt(t){for(;t;){if(t instanceof HTMLElement&&"auto"===t.popover&&"showing"===Pt.get(t))return t;if((t=t instanceof Element&&t.assignedSlot||t.parentElement||Xt(t))instanceof Dt&&(t=t.host),t instanceof Document)return}}function _t(t,e){const n=new Map;let o=0;for(const t of e||[])n.set(t,o),o+=1;n.set(t,o),o+=1;let r=null;return function(e){if(!e)return;let o=!1,i=null,s=null;for(;!o;){if(i=Yt(e)||null,null===i)return;if(!n.has(i))return;"hint"!==t.popover&&"auto"!==i.popover||(o=!0),o||(e=i.parentElement)}s=n.get(i),(null===r||n.get(r)<s)&&(r=i)}(t.parentElement||Xt(t)),r}function Jt(t){return!(t.hidden||t instanceof Dt||(t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement||t instanceof HTMLOptGroupElement||t instanceof HTMLOptionElement||t instanceof HTMLFieldSetElement)&&t.disabled||t instanceof HTMLInputElement&&"hidden"===t.type||t instanceof HTMLAnchorElement&&""===t.href||"number"!=typeof t.tabIndex||-1===t.tabIndex)}var Kt=new WeakMap;function Qt(t){if(!It(t,!1))return;const e=t.ownerDocument;if(!t.dispatchEvent(new Lt("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"})))return;if(!It(t,!1))return;let n=!1;const o=t.popover;let r=null;const i=_t(t,zt.get(e)||new Set),s=_t(t,Ft.get(e)||new Set);if("auto"===o&&(Zt(Ft.get(e)||new Set,n,!0),ee(i||e,n,!0),r="auto"),"hint"===o&&(s?(ee(s,n,!0),r="hint"):(Zt(Ft.get(e)||new Set,n,!0),i?(ee(i,n,!0),r="auto"):r="hint")),"auto"===o||"hint"===o){if(o!==t.popover||!It(t,!1))return;Gt(e)||(n=!0),"auto"===r?(zt.has(e)||zt.set(e,new Set),zt.get(e).add(t)):"hint"===r&&(Ft.has(e)||Ft.set(e,new Set),Ft.get(e).add(t))}Kt.delete(t);const a=e.activeElement;var c;t.classList.add(":popover-open"),Pt.set(t,"showing"),jt.has(e)||jt.set(e,new Set),jt.get(e).add(t),ie(Bt.get(t),!0),c=t,function(t){if(t.shadowRoot&&!0!==t.shadowRoot.delegatesFocus)return null;let e=t;e.shadowRoot&&(e=e.shadowRoot);let n=e.querySelector("[autofocus]");if(n)return n;{const t=e.querySelectorAll("slot");for(const e of t){const t=e.assignedElements({flatten:!0});for(const e of t){if(e.hasAttribute("autofocus"))return e;if(n=e.querySelector("[autofocus]"),n)return n}}}const o=t.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);let r=o.currentNode;for(;r;){if(Jt(r))return r;r=o.nextNode()}}(c)?.focus(),n&&a&&"auto"===t.popover&&Kt.set(t,a),Ct(t,"closed","open")}function Ut(t,e=!1,n=!1){if(!It(t,!0))return;const o=t.ownerDocument;if(["auto","hint"].includes(t.popover)&&(ee(t,e,n),!It(t,!0)))return;const r=zt.get(o)||new Set,i=r.has(t)&&qt(r)===t;if(ie(Bt.get(t),!1),Bt.delete(t),n&&(t.dispatchEvent(new Lt("beforetoggle",{oldState:"open",newState:"closed"})),i&&qt(r)!==t&&ee(t,e,n),!It(t,!0)))return;jt.get(o)?.delete(t),r.delete(t),Ft.get(o)?.delete(t),t.classList.remove(":popover-open"),Pt.set(t,"hidden"),n&&Ct(t,"open","closed");const s=Kt.get(t);s&&(Kt.delete(t),e&&s.focus())}function Zt(t,e=!1,n=!1){let o=Vt(t);for(;o;)Ut(o,e,n),o=Vt(t)}function te(t,e,n,o){let r=!1,i=!1;for(;r||!i;){i=!0;let s=null,a=!1;for(const n of e)if(n===t)a=!0;else if(a){s=n;break}if(!s)return;for(;"showing"===Wt(s)&&e.size;)Ut(qt(e),n,o);e.has(t)&&qt(e)!==t&&(r=!0),r&&(o=!1)}}function ee(t,e,n){const o=t.ownerDocument||t;if(t instanceof Document)return function(t,e=!1,n=!1){let o=Gt(t);for(;o;)Ut(o,e,n),o=Gt(t)}(o,e,n);Ft.get(o)?.has(t)?te(t,Ft.get(o),e,n):(Zt(Ft.get(o)||new Set,e,n),zt.get(o)?.has(t)&&te(t,zt.get(o),e,n))}var ne=new WeakMap;function oe(t){if(!t.isTrusted)return;const e=t.composedPath()[0];if(!e)return;const n=e.ownerDocument;if(!Gt(n))return;const o=function(t){const e=Yt(t),n=function(t){for(;t;){const e=t.popoverTargetElement;if(e instanceof HTMLElement)return e;if((t=t.parentElement||Xt(t))instanceof Dt&&(t=t.host),t instanceof Document)return}}(t);return Nt(e)>Nt(n)?e:n}(e);if(o&&"pointerdown"===t.type)ne.set(n,o);else if("pointerup"===t.type){const t=ne.get(n)===o;ne.delete(n),t&&ee(o||n,!1,!0)}}var re=new WeakMap;function ie(t,e=!1){if(!t)return;re.has(t)||re.set(t,t.getAttribute("aria-expanded"));const n=t.popoverTargetElement;if(n instanceof HTMLElement&&"auto"===n.popover)t.setAttribute("aria-expanded",String(e));else{const e=re.get(t);e?t.setAttribute("aria-expanded",e):t.removeAttribute("aria-expanded")}}var se=globalThis.ShadowRoot||function(){};function ae(t,e,n){const o=t[e];Object.defineProperty(t,e,{value(t){return o.call(this,n(t))}})}var ce=/(^|[^\\]):popover-open\b/g;var le=null;function pe(t){const e=function(){const t="function"==typeof globalThis.CSSLayerBlockRule;return`\n${t?"@layer popover-polyfill {":""}\n :where([popover]) {\n position: fixed;\n z-index: 2147483647;\n inset: 0;\n padding: 0.25em;\n width: fit-content;\n height: fit-content;\n border-width: initial;\n border-color: initial;\n border-image: initial;\n border-style: solid;\n background-color: canvas;\n color: canvastext;\n overflow: auto;\n margin: auto;\n }\n\n :where([popover]:not(.\\:popover-open)) {\n display: none;\n }\n\n :where(dialog[popover].\\:popover-open) {\n display: block;\n }\n\n :where(dialog[popover][open]) {\n display: revert;\n }\n\n :where([anchor].\\:popover-open) {\n inset: auto;\n }\n\n :where([anchor]:popover-open) {\n inset: auto;\n }\n\n @supports not (background-color: canvas) {\n :where([popover]) {\n background-color: white;\n color: black;\n }\n }\n\n @supports (width: -moz-fit-content) {\n :where([popover]) {\n width: -moz-fit-content;\n height: -moz-fit-content;\n }\n }\n\n @supports not (inset: 0) {\n :where([popover]) {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n }\n${t?"}":""}\n`}();if(null===le)try{(le=new CSSStyleSheet).replaceSync(e)}catch{le=!1}if(!1===le){const n=document.createElement("style");n.textContent=e,t instanceof Document?t.head.prepend(n):t.prepend(n)}else t.adoptedStyleSheets=[le,...t.adoptedStyleSheets]}const fe=Symbol("Clipping Rect Cache"),ue={...kt,getClippingRect:async function(...t){const e=t[0].element,n=this[fe].get(e);if(n)return n;const o=await kt.getClippingRect.apply(this,t);return function(t,e){const n=e.ownerDocument.querySelector("post-header");if(null===n)return;let o=e;for(;!ot(o);)if(o=st(o),X(o)&&(K(o)||o===n))return;const r=n.getBoundingClientRect(),i=Math.max(t.y,r.bottom);t.height-=i-t.y,t.y=i}(o,e),this[fe].set(e,o),o}};var he=function(t,e,n,o){var r,i=arguments.length,s=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,o);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(i<3?r(s):i>3?r(e,n,s):r(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s};const de={"pop-in":function(t){if(t)return t.animate([{transform:"scale(0.9)",opacity:0},{transform:"scale(1)",opacity:1}],{duration:250,easing:"ease-out",fill:"forwards"})}},me=t(class t extends e{static{this.STATIC_SIDES={top:"bottom",right:"left",bottom:"top",left:"right"}}static{this.PROPERTIES_TO_CLEAR=["--post-safe-space-popover-x","--post-safe-space-popover-y","--post-safe-space-popover-x-start","--post-safe-space-popover-x-end","--post-safe-space-popover-y-start","--post-safe-space-popover-y-end","--post-safe-space-trigger-x","--post-safe-space-trigger-y","--post-safe-space-trigger-x-start","--post-safe-space-trigger-x-end","--post-safe-space-trigger-y-start","--post-safe-space-trigger-y-end"]}constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postBeforeShow=n(this,"postBeforeShow",7),this.postShow=n(this,"postShow",7),this.postHide=n(this,"postHide",7),this.postBeforeToggle=n(this,"postBeforeToggle",7),this.postToggle=n(this,"postToggle",7),this.toggleTimeoutId=null,this.hasOpenedOnce=!0,this.placement="top",this.edgeGap=8,this.arrow=!1,this.animation="pop-in",this.currentAnimation=null,this.boundMouseTrackingHandler=this.mouseTrackingHandler.bind(this)}mouseTrackingHandler(t){this.host.style.setProperty("--post-safe-space-cursor-x",`${t.clientX}px`),this.host.style.setProperty("--post-safe-space-cursor-y",`${t.clientY}px`)}connectedCallback(){!o.isBrowser||"undefined"!=typeof HTMLElement&&"object"==typeof HTMLElement.prototype&&"popover"in HTMLElement.prototype||function(){if("undefined"==typeof window)return;function t(t){return t?.includes(":popover-open")&&(t=t.replace(ce,"$1.\\:popover-open")),t}window.ToggleEvent=window.ToggleEvent||Lt,ae(Document.prototype,"querySelector",t),ae(Document.prototype,"querySelectorAll",t),ae(Element.prototype,"querySelector",t),ae(Element.prototype,"querySelectorAll",t),ae(Element.prototype,"matches",t),ae(Element.prototype,"closest",t),ae(DocumentFragment.prototype,"querySelectorAll",t),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;const t=(this.getAttribute("popover")||"").toLowerCase();return""===t||"auto"==t?"auto":"hint"==t?"hint":"manual"},set(t){null===t?this.removeAttribute("popover"):this.setAttribute("popover",t)}},showPopover:{enumerable:!0,configurable:!0,value(t={}){Qt(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){Ut(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(t={}){return"boolean"==typeof t&&(t={force:t}),"showing"===Pt.get(this)&&void 0===t.force||!1===t.force?Ut(this,!0,!0):void 0!==t.force&&!0!==t.force||Qt(this),"showing"===Pt.get(this)}}});const e=Element.prototype.attachShadow;e&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(t){const n=e.call(this,t);return pe(n),n}}});const n=HTMLElement.prototype.attachInternals;n&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){const t=n.call(this);return t.shadowRoot&&pe(t.shadowRoot),t}}});const o=new WeakMap;function r(t){Object.defineProperties(t.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(t){if(null===t)this.removeAttribute("popovertarget"),o.delete(this);else{if(!(t instanceof Element))throw new TypeError("popoverTargetElement must be an element or null");this.setAttribute("popovertarget",""),o.set(this,t)}},get(){if("button"!==this.localName&&"input"!==this.localName)return null;if("input"===this.localName&&"reset"!==this.type&&"image"!==this.type&&"button"!==this.type)return null;if(this.disabled)return null;if(this.form&&"submit"===this.type)return null;const t=o.get(this);if(t&&t.isConnected)return t;if(t&&!t.isConnected)return o.delete(this),null;const e=Xt(this),n=this.getAttribute("popovertarget");return(e instanceof Document||e instanceof se)&&n&&e.getElementById(n)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){const t=(this.getAttribute("popovertargetaction")||"").toLowerCase();return"show"===t||"hide"===t?t:"toggle"},set(t){this.setAttribute("popovertargetaction",t)}}})}var i;r(HTMLButtonElement),r(HTMLInputElement),(i=document).addEventListener("click",(t=>{const e=t.composedPath(),n=e[0];if(!(n instanceof Element)||n?.shadowRoot)return;const o=Xt(n);if(!(o instanceof se||o instanceof Document))return;const r=e.find((t=>t.matches?.("[popovertargetaction],[popovertarget]")));return r?(function(t){const e=t.popoverTargetElement;if(!(e instanceof HTMLElement))return;const n=Wt(e);"show"===t.popoverTargetAction&&"showing"===n||"hide"===t.popoverTargetAction&&"hidden"===n||("showing"===n?Ut(e,!0,!0):It(e,!1)&&(Bt.set(e,t),Qt(e)))}(r),void t.preventDefault()):void 0})),i.addEventListener("keydown",(t=>{const e=t.key,n=t.target;t.defaultPrevented||!n||"Escape"!==e&&"Esc"!==e||ee(n.ownerDocument,!0,!0)})),i.addEventListener("pointerdown",oe),i.addEventListener("pointerup",oe),pe(document)}()}componentDidLoad(){this.host.addEventListener("beforetoggle",this.handleToggle.bind(this))}disconnectedCallback(){"function"==typeof this.clearAutoUpdate&&this.clearAutoUpdate(),this.host.removeEventListener("beforetoggle",this.handleToggle.bind(this))}async show(t){!this.toggleTimeoutId&&t&&(this.eventTarget=t,this.updatePosition(),this.host.showPopover())}async hide(){this.toggleTimeoutId||(this.eventTarget=null,this.host.hidePopover(),this.postHide.emit())}async toggle(t,e){const n=this.host.matches(":where(:popover-open, .popover-open)");return!0!==e&&(void 0!==e||n)||t?(this.eventTarget=t,this.toggleTimeoutId||(this.updatePosition(),this.host.togglePopover(e),this.toggleTimeoutId=null),this.host.matches(":where(:popover-open, .popover-open)")):n}open(){const t=this.host.shadowRoot?.querySelector(".popover-content");if(this.startAutoupdates(),t){const e=de[this.animation];"function"==typeof e?this.runOpenAnimation(e,t):(this.postBeforeToggle.emit({willOpen:!0}),this.postBeforeShow.emit({first:this.hasOpenedOnce}),this.postToggle.emit({isOpen:!0}),this.postShow.emit({first:this.hasOpenedOnce}),this.hasOpenedOnce&&(this.hasOpenedOnce=!1))}this.safeSpace&&globalThis.addEventListener("mousemove",this.boundMouseTrackingHandler)}close(){"function"==typeof this.clearAutoUpdate&&this.clearAutoUpdate(),this.safeSpace&&globalThis.removeEventListener("mousemove",this.boundMouseTrackingHandler),this.currentAnimation&&(this.currentAnimation.cancel(),this.currentAnimation=null),this.postBeforeToggle.emit({willOpen:!1}),this.postToggle.emit({isOpen:!1}),this.postHide.emit()}async runOpenAnimation(t,e){let n;try{if(n=t(e),!n)return this.postBeforeToggle.emit({willOpen:!0}),this.postBeforeShow.emit({first:this.hasOpenedOnce}),this.postToggle.emit({isOpen:!0}),void this.postShow.emit({first:this.hasOpenedOnce});this.currentAnimation=n,"running"===n.playState&&(this.postBeforeToggle.emit({willOpen:!0}),this.postBeforeShow.emit({first:this.hasOpenedOnce})),await n.finished,this.postToggle.emit({isOpen:!0}),this.postShow.emit({first:this.hasOpenedOnce}),this.hasOpenedOnce=!0}catch(t){console.warn("Animation failed or was interrupted:",t),this.postBeforeToggle.emit({willOpen:!1}),this.postBeforeShow.emit({first:this.hasOpenedOnce}),this.postToggle.emit({isOpen:!1})}finally{this.currentAnimation===n&&(this.currentAnimation=null)}}handleToggle(t){this.toggleTimeoutId=globalThis.setTimeout((()=>this.toggleTimeoutId=null),10),"open"===t.newState?this.open():this.close()}startAutoupdates(){this.eventTarget&&this.host&&(this.clearAutoUpdate=function(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:c=!1}=o,l=ft(t),p=r||i?[...l?ct(l):[],...e?ct(e):[]]:[];p.forEach((t=>{r&&t.addEventListener("scroll",n),i&&t.addEventListener("resize",n)}));const f=l&&a?function(t,e,n){let o,r=null;const i=N(t);function s(){var t;clearTimeout(o),null==(t=r)||t.disconnect(),r=null}function a(n,c){void 0===n&&(n=!1),void 0===c&&(c=1),s();const l=t.getBoundingClientRect(),{left:p,top:f,width:d,height:v}=l;if(n||e(),!d||!v)return;const g={rootMargin:-m(f)+"px "+-m(i.clientWidth-(p+d))+"px "+-m(i.clientHeight-(f+v))+"px "+-m(p)+"px",threshold:h(0,u(1,c))||1};let w=!0;function y(e){const n=e[0].intersectionRatio;if(!Et(l,t.getBoundingClientRect()))return a();if(n!==c){if(!w)return a();n?a(!1,n):o=setTimeout((()=>{a(!1,1e-7)}),1e3)}w=!1}try{r=new IntersectionObserver(y,{...g,root:i.ownerDocument})}catch(t){r=new IntersectionObserver(y,g)}r.observe(t)}const c=I(t),l=()=>a(n);return c.addEventListener("resize",l),a(!0),()=>{c.removeEventListener("resize",l),s()}}(l,n,i):null;let d,v=-1,g=null;s&&(g=new ResizeObserver((t=>{let[o]=t;o&&o.target===l&&g&&e&&(g.unobserve(e),cancelAnimationFrame(v),v=requestAnimationFrame((()=>{var t;null==(t=g)||t.observe(e)}))),n()})),l&&!c&&g.observe(l),e&&g.observe(e));let w=c?mt(t):null;return c&&function e(){const o=mt(t);w&&!Et(w,o)&&n(),w=o,d=requestAnimationFrame(e)}(),n(),()=>{var t;p.forEach((t=>{r&&t.removeEventListener("scroll",n),i&&t.removeEventListener("resize",n)})),null==f||f(),null==(t=g)||t.disconnect(),g=null,c&&cancelAnimationFrame(d)}}(this.eventTarget,this.host,this.updatePosition.bind(this)))}async updatePosition(){const{x:e,y:n,middlewareData:o,placement:r}=await this.calculatePosition();o.hide?.referenceHidden&&this.host.hidePopover();const i=r.split("-")[0];if(this.dynamicPlacement=i,this.host.style.left=`${e}px`,this.host.style.top=`${n}px`,this.arrow&&o.arrow){const{x:e,y:n}=o.arrow,r=t.STATIC_SIDES[i],s=-.5*this.arrowRef.offsetWidth;r&&Object.assign(this.arrowRef.style,{left:e?`${e}px`:"",top:n?`${n}px`:"",[r]:`${s}px`})}this.safeSpace&&this.eventTarget&&await this.updateSafeSpaceBoundaries(i)}async calculatePosition(){const t=this.edgeGap,e=(this.placement||"top").includes("-"),n=[Mt({elementContext:"reference",crossAxis:!1}),Mt({elementContext:"floating",crossAxis:!1})],o=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r,platform:i}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:c={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...l}=y(t,e),p={x:n,y:o},f=await i.detectOverflow(e,l),u=E(r),h=S(u);let d=p[h],m=p[u];const v=(t,e)=>w(e+f["y"===t?"top":"left"],e,e-f["y"===t?"bottom":"right"]);s&&(d=v(h,d)),a&&(m=v(u,m));const g=c.fn({...e,[h]:d,[u]:m});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[h]:s,[u]:a}}}}}}({padding:t,limiter:Ht({offset:32})}),r=[Tt(this.offset??(this.arrow?t+4:t)),Ot(),...e?[...n,o]:[o,...n],At({apply({availableWidth:e,elements:n}){Object.assign(n.floating.style,{maxWidth:e-2*t+"px"})}})];return this.arrow&&r.push((t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:r,rects:i,platform:s,elements:a,middlewareData:c}=e,{element:l,padding:p=0}=y(t,e)||{};if(null==l)return{};const f=C(p),h={x:n,y:o},d=T(r),m=k(d),v=await s.getDimensions(l),g="y"===d,x=g?"top":"left",S=g?"bottom":"right",E=g?"clientHeight":"clientWidth",M=i.reference[m]+i.reference[d]-h[d]-i.floating[m],A=h[d]-i.reference[d],O=await(null==s.getOffsetParent?void 0:s.getOffsetParent(l));let H=O?O[E]:0;H&&await(null==s.isElement?void 0:s.isElement(O))||(H=a.floating[E]||i.floating[m]);const L=M/2-A/2,$=H/2-v[m]/2-1,D=u(f[x],$),R=u(f[S],$),j=H-v[m]-R,z=H/2-v[m]/2+L,F=w(D,z,j),P=!c.arrow&&null!=b(r)&&z!==F&&i.reference[m]/2-(z<D?D:R)-v[m]/2<0,W=P?z<D?z-D:z-j:0;return{[d]:h[d]+W,data:{[d]:F,centerOffset:z-F-W,...P&&{alignmentOffset:W}},reset:P}}}))({element:this.arrowRef,padding:t})),this.autoHide&&r.push(function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:o}=e,{strategy:r="referenceHidden",...i}=y(t,e);switch(r){case"referenceHidden":{const t=z(await o.detectOverflow(e,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:F(t)}}}case"escaped":{const t=z(await o.detectOverflow(e,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:t,escaped:F(t)}}}default:return{}}}}}({strategy:"referenceHidden"})),i=this.eventTarget,s=this.host,a={placement:this.placement||"top",strategy:"fixed",middleware:r},a??={},((t,e,n)=>{const o=new Map,r=null!=n?n:{},i={...kt,...r.platform,_c:o};return(async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:j},c=await(null==s.isRTL?void 0:s.isRTL(e));let l=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:p,y:f}=R(l,o,c),u=o,h=0;const d={};for(let n=0;n<i.length;n++){const m=i[n];if(!m)continue;const{name:v,fn:g}=m,{x:w,y,data:x,reset:b}=await g({x:p,y:f,initialPlacement:o,placement:u,strategy:r,middlewareData:d,rects:l,platform:a,elements:{reference:t,floating:e}});p=null!=w?w:p,f=null!=y?y:f,d[v]={...d[v],...x},b&&h<50&&(h++,"object"==typeof b&&(b.placement&&(u=b.placement),b.rects&&(l=!0===b.rects?await s.getElementRects({reference:t,floating:e,strategy:r}):b.rects),({x:p,y:f}=R(l,u,c))),n=-1)}return{x:p,y:f,placement:u,strategy:r,middlewareData:d}})(t,e,{...r,platform:i})})(i,s,{...a,platform:{...ue,...a.platform,[fe]:new Map}});var i,s,a}async updateSafeSpaceBoundaries(e){const n=this.eventTarget.getBoundingClientRect(),o="top"===e||"bottom"===e,r=((t,e,n)=>"top"===t||"bottom"===t?{popover:{y:"top"===t?e.bottom:e.top,xStart:e.left,xEnd:e.right},trigger:{y:"top"===t?n.top:n.bottom,xStart:n.left,xEnd:n.right}}:{popover:{x:"left"===t?e.right:e.left,yStart:e.top,yEnd:e.bottom},trigger:{x:"left"===t?n.left:n.right,yStart:n.top,yEnd:n.bottom}})(e,this.host.getBoundingClientRect(),n);t.PROPERTIES_TO_CLEAR.forEach((t=>{this.host.style.removeProperty(t)})),o?(this.host.style.setProperty("--post-safe-space-popover-y",`${r.popover.y}px`),this.host.style.setProperty("--post-safe-space-popover-x-start",`${r.popover.xStart}px`),this.host.style.setProperty("--post-safe-space-popover-x-end",`${r.popover.xEnd}px`),this.host.style.setProperty("--post-safe-space-trigger-y",`${r.trigger.y}px`),this.host.style.setProperty("--post-safe-space-trigger-x-start",`${r.trigger.xStart}px`),this.host.style.setProperty("--post-safe-space-trigger-x-end",`${r.trigger.xEnd}px`)):(this.host.style.setProperty("--post-safe-space-popover-x",`${r.popover.x}px`),this.host.style.setProperty("--post-safe-space-popover-y-start",`${r.popover.yStart}px`),this.host.style.setProperty("--post-safe-space-popover-y-end",`${r.popover.yEnd}px`),this.host.style.setProperty("--post-safe-space-trigger-x",`${r.trigger.x}px`),this.host.style.setProperty("--post-safe-space-trigger-y-start",`${r.trigger.yStart}px`),this.host.style.setProperty("--post-safe-space-trigger-y-end",`${r.trigger.yEnd}px`))}render(){return r(i,{key:"f3ea4bfc9a59faa2fbf1e413a1ec648f598a6779","data-version":a,popover:"auto"},r("div",{key:"a328c73c7e08eca1e423fcbe736798188cca2a87",part:"post-popovercontainer-content",class:"popover-content"},this.arrow&&r("span",{key:"8fad0095fb8d8c903ba84a639b4efc3e321c6aef","dynamic-placement":this.dynamicPlacement,class:"arrow",ref:t=>{this.arrowRef=t}}),r("span",{key:"deadbcc5892ed545a64b4a0e5e0936e0dd1feb70",part:"post-popovercontainer-border-mask"}),r("slot",{key:"48c4db7ab222f3ef18157ce19d8ba15d75441f98"})))}get host(){return this}static get style(){return'@layer polyfill{@supports not selector(:popover-open){:host([popover]:not(.\\:popover-open)){display:none}}}:host{background-color:rgba(0,0,0,0);border:rgba(0,0,0,0);position:fixed;margin:0;padding:0;overflow:visible}:host>div{box-shadow:var(--post-device-elevation-300);width:max-content;max-width:100%;color:var(--post-current-fg);background-color:var(--post-current-bg);border-radius:4px;position:relative}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host>div{border:2px solid rgba(0,0,0,0)}}:host [part=post-popovercontainer-border-mask]{display:none;position:absolute;inset:0;border-radius:4px;pointer-events:none}:host .arrow{--post-popovercontainer-arrow-border: var(--post-popovercontainer-arrow-border-width, 0px) solid var(--post-popovercontainer-arrow-border-color, transparent);position:absolute;width:.5825rem;height:.5825rem;background-color:inherit;rotate:45deg;pointer-events:none;z-index:-1}:host .arrow[dynamic-placement=top]{border-bottom-right-radius:2px;border-bottom:var(--post-popovercontainer-arrow-border);border-right:var(--post-popovercontainer-arrow-border)}:host .arrow[dynamic-placement=right]{border-bottom-left-radius:2px;border-bottom:var(--post-popovercontainer-arrow-border);border-left:var(--post-popovercontainer-arrow-border)}:host .arrow[dynamic-placement=bottom]{border-top-left-radius:2px;border-top:var(--post-popovercontainer-arrow-border);border-left:var(--post-popovercontainer-arrow-border)}:host .arrow[dynamic-placement=left]{border-top-right-radius:2px;border-top:var(--post-popovercontainer-arrow-border);border-right:var(--post-popovercontainer-arrow-border)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .arrow[dynamic-placement=top]{border-block-end:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0);bottom:-0.3796735336rem !important}:host .arrow[dynamic-placement=left]{border-block-start:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0);right:-0.3796735336rem !important}:host .arrow[dynamic-placement=right]{border-block-end:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0);left:-0.3796735336rem !important}:host .arrow[dynamic-placement=bottom]{border-block-start:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0);top:-0.3796735336rem !important}}:host([tooltip]){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}:host([safe-space])::after{content:"";position:fixed;inset:0;z-index:-1;pointer-events:auto}:host([safe-space=triangle])::after{clip-path:polygon(var(--post-safe-space-cursor-x, 0) var(--post-safe-space-cursor-y, 0), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)))}:host([safe-space=trapezoid])::after{clip-path:polygon(var(--post-safe-space-trigger-x-start, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-start, 0)), var(--post-safe-space-trigger-x-end, var(--post-safe-space-trigger-x, 0)) var(--post-safe-space-trigger-y, var(--post-safe-space-trigger-y-end, 0)), var(--post-safe-space-popover-x-end, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-end, 0)), var(--post-safe-space-popover-x-start, var(--post-safe-space-popover-x, 0)) var(--post-safe-space-popover-y, var(--post-safe-space-popover-y-start, 0)))}:host(:not(:has(.arrow)))>div{box-shadow:var(--post-device-elevation-300)}:host(:has(.arrow))>div{filter:drop-shadow(1px 2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(2px 4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(4px 8px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[dynamic-placement=top]))>div{filter:drop-shadow(0px -2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(0px -4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(0px -8px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[dynamic-placement=left]))>div{filter:drop-shadow(-2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(-4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(-8px 0px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[dynamic-placement=right]))>div{filter:drop-shadow(2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(8px 0px 12px hsla(225, 7%, 11%, 0.15))}'}},[257,"post-popovercontainer",{placement:[1],edgeGap:[2,"edge-gap"],offset:[2],arrow:[4],safeSpace:[513,"safe-space"],autoHide:[4,"auto-hide"],dynamicPlacement:[32],show:[64],hide:[64],toggle:[64]}]);function ve(){"undefined"!=typeof customElements&&["post-popovercontainer"].forEach((t=>{"post-popovercontainer"===t&&(customElements.get(s(t))||customElements.define(s(t),me))}))}he([c(p)],me.prototype,"placement",void 0),he([l("number")],me.prototype,"edgeGap",void 0),he([c(["triangle","trapezoid"])],me.prototype,"safeSpace",void 0);export{me as P,p as a,ve as d}
1
+ import{proxyCustomElement as t,HTMLElement as e,createEvent as n,Build as o,h as r,Host as i,transformTag as a}from"@stencil/core/internal/client";import{v as s}from"./package.js";import"./breakpoints.js";import{O as l}from"./one-of.js";import{T as c}from"./type.js";const u=["top","right","bottom","left","top-start","top-end","right-start","right-end","bottom-start","bottom-end","left-start","left-end"],p=["top","right","bottom","left"],f=Math.min,h=Math.max,d=Math.round,m=Math.floor,w=t=>({x:t,y:t}),g={left:"right",right:"left",bottom:"top",top:"bottom"};function v(t,e,n){return h(t,f(e,n))}function b(t,e){return"function"==typeof t?t(e):t}function y(t){return t.split("-")[0]}function x(t){return t.split("-")[1]}function S(t){return"x"===t?"y":"x"}function M(t){return"y"===t?"height":"width"}function T(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function E(t){return S(T(t))}function k(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const H=["left","right"],A=["right","left"],O=["top","bottom"],L=["bottom","top"];function C(t){const e=y(t);return g[e]+t.slice(e.length)}function z(t){return"number"!=typeof t?function(t){var e,n,o,r;return{top:null!=(e=t.top)?e:0,right:null!=(n=t.right)?n:0,bottom:null!=(o=t.bottom)?o:0,left:null!=(r=t.left)?r:0}}(t):{top:t,right:t,bottom:t,left:t}}function R(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function D(t,e,n){let{reference:o,floating:r}=t;const i=T(e),a=E(e),s=M(a),l=y(e),c="y"===i,u=o.x+o.width/2-r.width/2,p=o.y+o.height/2-r.height/2,f=o[s]/2-r[s]/2;let h;switch(l){case"top":h={x:u,y:o.y-r.height};break;case"bottom":h={x:u,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:p};break;case"left":h={x:o.x-r.width,y:p};break;default:h={x:o.x,y:o.y}}const d=x(e);return d&&(h[a]+=f*("end"===d?1:-1)*(n&&c?-1:1)),h}async function $(t,e){var n;void 0===e&&(e={});const{x:o,y:r,platform:i,rects:a,elements:s,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:p="floating",altBoundary:f=!1,padding:h=0}=b(e,t),d=z(h),m=s[f?"floating"===p?"reference":"floating":p],w=R(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),g="floating"===p?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),y=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},x=R(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:v,strategy:l}):g);return{top:(w.top-x.top+d.top)/y.y,bottom:(x.bottom-w.bottom+d.bottom)/y.y,left:(w.left-x.left+d.left)/y.x,right:(x.right-w.right+d.right)/y.x}}function j(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function F(t){return p.some((e=>t[e]>=0))}function W(t){const e=f(...t.map((t=>t.left))),n=f(...t.map((t=>t.top)));return{x:e,y:n,width:h(...t.map((t=>t.right)))-e,height:h(...t.map((t=>t.bottom)))-n}}const P=new Set(["left","top"]);function B(){return"undefined"!=typeof window}function q(t){return G(t)?(t.nodeName||"").toLowerCase():"#document"}function I(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function N(t){var e;return null==(e=(G(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function G(t){return!!B()&&(t instanceof Node||t instanceof I(t).Node)}function V(t){return!!B()&&(t instanceof Element||t instanceof I(t).Element)}function U(t){return!!B()&&(t instanceof HTMLElement||t instanceof I(t).HTMLElement)}function X(t){return!(!B()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof I(t).ShadowRoot)}function Y(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=rt(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&"inline"!==r&&"contents"!==r}function _(t){return/^(table|td|th)$/.test(q(t))}function J(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const K=/transform|translate|scale|rotate|perspective|filter/,Q=/paint|layout|strict|content/,Z=t=>!!t&&"none"!==t;let tt;function et(t){const e=V(t)?rt(t):t;return Z(e.transform)||Z(e.translate)||Z(e.scale)||Z(e.rotate)||Z(e.perspective)||!nt()&&(Z(e.backdropFilter)||Z(e.filter))||K.test(e.willChange||"")||Q.test(e.contain||"")}function nt(){return null==tt&&(tt="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),tt}function ot(t){return/^(html|body|#document)$/.test(q(t))}function rt(t){return I(t).getComputedStyle(t)}function it(t){return V(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function at(t){if("html"===q(t))return t;const e=t.assignedSlot||t.parentNode||X(t)&&t.host||N(t);return X(e)?e.host:e}function st(t){const e=at(t);return ot(e)?(t.ownerDocument||t).body:U(e)&&Y(e)?e:st(e)}function lt(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const r=st(t),i=r===(null==(o=t.ownerDocument)?void 0:o.body),a=I(r);if(i){const t=ct(a);return e.concat(a,a.visualViewport||[],Y(r)?r:[],t&&n?lt(t):[])}return e.concat(r,lt(r,[],n))}function ct(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ut(t){const e=rt(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=U(t),i=r?t.offsetWidth:n,a=r?t.offsetHeight:o,s=d(n)!==i||d(o)!==a;return s&&(n=i,o=a),{width:n,height:o,$:s}}function pt(t){return V(t)?t:t.contextElement}function ft(t){const e=pt(t);if(!U(e))return w(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=ut(e);let a=(i?d(n.width):n.width)/o,s=(i?d(n.height):n.height)/r;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const ht=w(0);function dt(t){const e=I(t);return nt()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:ht}function mt(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const r=t.getBoundingClientRect(),i=pt(t);let a=w(1);e&&(o?V(o)&&(a=ft(o)):a=ft(t));const s=function(t,e,n){return void 0===e&&(e=!1),!!n&&e&&n===I(t)}(i,n,o)?dt(i):w(0);let l=(r.left+s.x)/a.x,c=(r.top+s.y)/a.y,u=r.width/a.x,p=r.height/a.y;if(i&&o){const t=I(i),e=V(o)?I(o):o;let n=t,r=ct(n);for(;r&&e!==n;){const t=ft(r),e=r.getBoundingClientRect(),o=rt(r),i=e.left+(r.clientLeft+parseFloat(o.paddingLeft))*t.x,a=e.top+(r.clientTop+parseFloat(o.paddingTop))*t.y;l*=t.x,c*=t.y,u*=t.x,p*=t.y,l+=i,c+=a,n=I(r),r=ct(n)}}return R({width:u,height:p,x:l,y:c})}function wt(t,e){const n=it(t).scrollLeft;return e?e.left+n:mt(N(t)).left+n}function gt(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-wt(t,n),y:n.top+e.scrollTop}}function vt(t,e,n){let o;if("viewport"===e||"layoutViewport"===e)o=function(t,e,n){void 0===n&&(n="viewport");const o="layoutViewport"===n,r=I(t),i=N(t),a=r.visualViewport;let s=i.clientWidth,l=i.clientHeight,c=0,u=0;if(a){const t=!nt()||"fixed"===e;o?t||(c=-a.offsetLeft,u=-a.offsetTop):(s=a.width,l=a.height,t&&(c=a.offsetLeft,u=a.offsetTop))}if(wt(i)<=0){const t=i.ownerDocument,e=t.body,n=getComputedStyle(e),o="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,r=Math.abs(i.clientWidth-e.clientWidth-o),a="stable both-edges"===getComputedStyle(i).scrollbarGutter?r/2:r;a<=25&&(s-=a)}return{width:s,height:l,x:c,y:u}}(t,n,e);else if("document"===e)o=function(t){const e=it(t),n=t.ownerDocument.body,o=h(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),r=h(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-e.scrollLeft+wt(t);const a=-e.scrollTop;return"rtl"===rt(n).direction&&(i+=h(t.clientWidth,n.clientWidth)-o),{width:o,height:r,x:i,y:a}}(N(t));else if(V(e))o=function(t,e){const n=mt(t,!0,"fixed"===e),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=ft(t);return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:r*i.x,y:o*i.y}}(e,n);else{const n=dt(t);o={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return R(o)}function bt(t,e,n){const o=U(e),r=N(e),i="fixed"===n,a=mt(t,!0,i,e);let s={scrollLeft:0,scrollTop:0};const l=w(0);if((o||!i)&&(("body"!==q(e)||Y(r))&&(s=it(e)),o)){const t=mt(e,!0,i,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}!o&&r&&(l.x=wt(r));const c=!r||o||i?w(0):gt(r,s);return{x:a.left+s.scrollLeft-l.x-c.x,y:a.top+s.scrollTop-l.y-c.y,width:a.width,height:a.height}}function yt(t){return"static"===rt(t).position}function xt(t,e){if(!U(t)||"fixed"===rt(t).position)return null;if(e)return e(t);let n=t.offsetParent;return N(t)===n&&(n=n.ownerDocument.body),n}function St(t,e){const n=I(t);if(J(t))return n;if(!U(t)){let e=at(t);for(;e&&!ot(e);){if(V(e)&&!yt(e))return e;e=at(e)}return n}let o=xt(t,e);for(;o&&_(o)&&yt(o);)o=xt(o,e);return o&&ot(o)&&yt(o)&&!et(o)?n:o||function(t){let e=at(t);for(;U(e)&&!ot(e);){if(et(e))return e;if(J(e))return null;e=at(e)}return null}(t)||n}const Mt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i="fixed"===r,a=N(o),s=!!e&&J(e.floating);if(o===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=w(1);const u=w(0),p=U(o);if((p||!i)&&(("body"!==q(o)||Y(a))&&(l=it(o)),p)){const t=mt(o);c=ft(o),u.x=t.x+o.clientLeft,u.y=t.y+o.clientTop}const f=!a||p||i?w(0):gt(a,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:N,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const i=[..."clippingAncestors"===n?J(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=lt(t,[],!1).filter((t=>V(t)&&"body"!==q(t))),r=null;const i="fixed"===rt(t).position;let a=i?at(t):t;for(;V(a)&&!ot(a);){const t=rt(a),e=et(a),n=r?r.position:i?"fixed":"";e||"fixed"!==n&&("absolute"!==n||"static"!==t.position)?r=t:o=o.filter((t=>t!==a)),a=at(a)}return e.set(t,o),o}(e,this._c):[].concat(n),o],a=vt(e,i[0],r);let s=a.top,l=a.right,c=a.bottom,u=a.left;for(let t=1;t<i.length;t++){const n=vt(e,i[t],r);s=h(n.top,s),l=f(n.right,l),c=f(n.bottom,c),u=h(n.left,u)}return{width:l-u,height:c-s,x:u,y:s}},getOffsetParent:St,getElementRects:async function(t){const e=this.getOffsetParent||St,n=this.getDimensions,o=await n(t.floating);return{reference:bt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return t.getClientRects?Array.from(t.getClientRects()):[]},getDimensions:function(t){const{width:e,height:n}=ut(t);return{width:e,height:n}},getScale:ft,isElement:V,isRTL:function(t){return"rtl"===rt(t).direction}};function Tt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}const Et=$,kt=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:i,placement:a,middlewareData:s}=e,l=await async function(t,e){const{placement:n,platform:o,elements:r}=t,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),a=y(n),s=x(n),l="y"===T(n),c=P.has(a)?-1:1,u=i&&l?-1:1,p=b(e,t);let{mainAxis:f,crossAxis:h,alignmentAxis:d}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return s&&"number"==typeof d&&(h="end"===s?-1*d:d),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}(e,t);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(o=s.arrow)&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:a}}}}},Ht=function(t){return void 0===t&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:o,rects:r,platform:i,strategy:a}=e,{padding:s=2,x:l,y:c}=b(t,e),u=Array.from(await(null==i.getClientRects?void 0:i.getClientRects(o.reference))||[]);if(!u.length)return{};const p=function(t){const e=t.slice().sort(((t,e)=>t.y-e.y)),n=[];let o=null;for(let t=0;t<e.length;t++){const r=e[t];!o||r.y-o.y>o.height/2?n.push([r]):n[n.length-1].push(r),o=r}return n.map((t=>R(W(t))))}(u),d=R(W(u)),m=z(s),w=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===p.length&&(p[0].left>p[1].right||p[1].left>p[0].right)&&null!=l&&null!=c)return p.find((t=>l>t.left-m.left&&l<t.right+m.right&&c>t.top-m.top&&c<t.bottom+m.bottom))||d;if(p.length>=2){if("y"===T(n)){const t=p[0],e=p[p.length-1],o="top"===y(n),r=t.top,i=o?t.left:e.left;return R({x:i,y:r,width:(o?t.right:e.right)-i,height:e.bottom-r})}const t="left"===y(n),e=h(...p.map((t=>t.right))),o=f(...p.map((t=>t.left))),r=p.filter((n=>t?n.left===o:n.right===e)),i=r[0].top;return R({x:o,y:i,width:e-o,height:r[r.length-1].bottom-i})}return d}},floating:o.floating,strategy:a});return r.reference.x!==w.reference.x||r.reference.y!==w.reference.y||r.reference.width!==w.reference.width||r.reference.height!==w.reference.height?{reset:{rects:w}}:{}}}},At=function(t){return void 0===t&&(t={}),{options:t,fn(e){var n,o;const{x:r,y:i,placement:a,rects:s,middlewareData:l}=e,{offset:c=0,mainAxis:u=!0,crossAxis:p=!0}=b(t,e),f={x:r,y:i},h=T(a),d=S(h);let m=f[d],w=f[h];const g=b(c,e),v="number"==typeof g?{mainAxis:g,crossAxis:0}:{mainAxis:null!=(n=g.mainAxis)?n:0,crossAxis:null!=(o=g.crossAxis)?o:0};if(u){const t="y"===d?"height":"width",e=s.reference[d]-s.floating[t]+v.mainAxis,n=s.reference[d]+s.reference[t]-v.mainAxis;m<e?m=e:m>n&&(m=n)}if(p){var x,M;const t="y"===d?"width":"height",e=P.has(y(a)),n=s.reference[h]-s.floating[t]+(e&&(null==(x=l.offset)?void 0:x[h])||0)+(e?0:v.crossAxis),o=s.reference[h]+s.reference[t]+(e?0:(null==(M=l.offset)?void 0:M[h])||0)-(e?v.crossAxis:0);w<n?w=n:w>o&&(w=o)}return{[d]:m,[h]:w}}}};function Ot(t,e){return p[(p.indexOf(t)+e)%4]}const Lt=t=>Ot(t,2),Ct="post-flip";function zt(t={}){return{name:Ct,options:t,async fn(e){const{middlewareData:n,placement:o}=e;if(n.arrow?.alignmentOffset)return{};const{minSize:r={},...i}=b(t,e),a=Math.abs(n.offset?.[T(o)]??0),s=y(o),l=await Et(e,{...i,elementContext:"reference"}),c=await Et(e,{...i,elementContext:"floating"});if(Math.max(l[s],c[s])<=0)return{};const u=n[Ct],p={overflow:l,minSize:r,gap:a};let f=u?.deficits??[];const h=u?.placements??await async function(t,e){const{placement:n,platform:o,elements:r}=t,{overflow:i}=e,a=y(n),s=[n,C(n)];if(Math.min(Rt(a,e),Rt(Lt(a),e))<=0)return s;const l=function(t,e,n,o){const r=x(t);let i=function(t,e,n){switch(t){case"top":case"bottom":return n?e?A:H:e?H:A;case"left":case"right":return e?O:L;default:return[]}}(y(t),"start"===n,o);return r&&(i=i.map((t=>t+"-"+r)),i=i.concat(i.map(k))),i}(n,0,"start",await(o.isRTL?.(r.floating))??!1);return l.sort(((t,e)=>i[y(t)]-i[y(e)])),[...s,...l]}(e,p);f.length<h.length&&(f=[...f,Rt(s,p)]);const d={placements:h,deficits:f};if(f.length<h.length)return{data:d,reset:{placement:h[f.length]}};const m=d.placements[d.deficits.indexOf(Math.min(...d.deficits))];return m===o?{data:d}:{data:d,reset:{placement:m}}}}}function Rt(t,{minSize:e,overflow:n,gap:o}){return o+(e[M(T(t))]??0)+n[t]}const Dt=Symbol("Clipping Rect Cache"),$t={...Mt,getClippingRect:async function(...t){const e=t[0].element,n=this[Dt].get(e);if(n)return n;const o=await Mt.getClippingRect.apply(this,t);return function(t,e){const n=e.ownerDocument.querySelector("post-header");if(null===n)return;let o=e;for(;!ot(o);)if(o=at(o),U(o)&&(J(o)||o===n))return;const r=n.getBoundingClientRect(),i=Math.max(t.y,r.bottom);t.height-=i-t.y,t.y=i}(o,e),this[Dt].set(e,o),o}};const jt="post-safe-space";async function Ft({elements:t,platform:e,strategy:n},o){return R(await(e.convertOffsetParentRelativeRectToViewportRelativeRect?.({offsetParent:await(e.getOffsetParent?.(t.floating)),rect:o,elements:t,strategy:n}))??o)}function Wt(t,e){const n=t[e],o=t[(t=>Ot(t,3))(e)],r=t[(t=>Ot(t,1))(e)];return"x"===T(e)?[n,o,n,r]:[o,n,r,n]}var Pt=class extends Event{oldState;newState;constructor(t,{oldState:e="",newState:n="",...o}={}){super(t,o),this.oldState=String(e||""),this.newState=String(n||"")}},Bt=new WeakMap;function qt(t,e,n){Bt.set(t,setTimeout((()=>{Bt.has(t)&&t.dispatchEvent(new Pt("toggle",{cancelable:!1,oldState:e,newState:n}))}),0))}var It=globalThis.ShadowRoot||function(){},Nt=globalThis.HTMLDialogElement||function(){},Gt=new WeakMap,Vt=new WeakMap,Ut=new WeakMap,Xt=new WeakMap;function Yt(t){return Xt.get(t)||"hidden"}var _t=new WeakMap;function Jt(t){return[...t].pop()}function Kt(t,e){return!("auto"!==t.popover&&"manual"!==t.popover&&"hint"!==t.popover||!t.isConnected||e&&"showing"!==Yt(t)||!e&&"hidden"!==Yt(t)||t instanceof Nt&&t.hasAttribute("open")||document.fullscreenElement===t)}function Qt(t){if(!t)return 0;const e=Vt.get(document)||new Set,n=Ut.get(document)||new Set;return n.has(t)?[...n].indexOf(t)+e.size+1:e.has(t)?[...e].indexOf(t)+1:0}function Zt(t){let e;const n=Ut.get(t)||new Set,o=Vt.get(t)||new Set,r=n.size>0?n:o.size>0?o:null;return r?(e=Jt(r),e.isConnected?e:(r.delete(e),Zt(t))):null}function te(t){for(const e of t||[]){if(e.isConnected)return e;t.delete(e)}return null}function ee(t){return"function"==typeof t.getRootNode?t.getRootNode():t.parentNode?ee(t.parentNode):t}function ne(t){for(;t;){if(t instanceof HTMLElement&&"auto"===t.popover&&"showing"===Xt.get(t))return t;if((t=t instanceof Element&&t.assignedSlot||t.parentElement||ee(t))instanceof It&&(t=t.host),t instanceof Document)return}}function oe(t,e){const n=new Map;let o=0;for(const t of e||[])n.set(t,o),o+=1;n.set(t,o),o+=1;let r=null;return function(e){if(!e)return;let o=!1,i=null,a=null;for(;!o;){if(i=ne(e)||null,null===i)return;if(!n.has(i))return;"hint"!==t.popover&&"auto"!==i.popover||(o=!0),o||(e=i.parentElement)}a=n.get(i),(null===r||n.get(r)<a)&&(r=i)}(t.parentElement||ee(t)),r}function re(t){return!(t.hidden||t instanceof It||(t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement||t instanceof HTMLOptGroupElement||t instanceof HTMLOptionElement||t instanceof HTMLFieldSetElement)&&t.disabled||t instanceof HTMLInputElement&&"hidden"===t.type||t instanceof HTMLAnchorElement&&""===t.href||"number"!=typeof t.tabIndex||-1===t.tabIndex)}var ie=new WeakMap;function ae(t){if(!Kt(t,!1))return;const e=t.ownerDocument;if(!t.dispatchEvent(new Pt("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"})))return;if(!Kt(t,!1))return;let n=!1;const o=t.popover;let r=null;const i=oe(t,Vt.get(e)||new Set),a=oe(t,Ut.get(e)||new Set);if("auto"===o&&(le(Ut.get(e)||new Set,n,!0),ue(i||e,n,!0),r="auto"),"hint"===o&&(a?(ue(a,n,!0),r="hint"):(le(Ut.get(e)||new Set,n,!0),i?(ue(i,n,!0),r="auto"):r="hint")),"auto"===o||"hint"===o){if(o!==t.popover||!Kt(t,!1))return;Zt(e)||(n=!0),"auto"===r?(Vt.has(e)||Vt.set(e,new Set),Vt.get(e).add(t)):"hint"===r&&(Ut.has(e)||Ut.set(e,new Set),Ut.get(e).add(t))}ie.delete(t);const s=e.activeElement;var l;t.classList.add(":popover-open"),Xt.set(t,"showing"),Gt.has(e)||Gt.set(e,new Set),Gt.get(e).add(t),de(_t.get(t),!0),l=t,function(t){if(t.shadowRoot&&!0!==t.shadowRoot.delegatesFocus)return null;let e=t;e.shadowRoot&&(e=e.shadowRoot);let n=e.querySelector("[autofocus]");if(n)return n;{const t=e.querySelectorAll("slot");for(const e of t){const t=e.assignedElements({flatten:!0});for(const e of t){if(e.hasAttribute("autofocus"))return e;if(n=e.querySelector("[autofocus]"),n)return n}}}const o=t.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);let r=o.currentNode;for(;r;){if(re(r))return r;r=o.nextNode()}}(l)?.focus(),n&&s&&"auto"===t.popover&&ie.set(t,s),qt(t,"closed","open")}function se(t,e=!1,n=!1){if(!Kt(t,!0))return;const o=t.ownerDocument;if(["auto","hint"].includes(t.popover)&&(ue(t,e,n),!Kt(t,!0)))return;const r=Vt.get(o)||new Set,i=r.has(t)&&Jt(r)===t;if(de(_t.get(t),!1),_t.delete(t),n&&(t.dispatchEvent(new Pt("beforetoggle",{oldState:"open",newState:"closed"})),i&&Jt(r)!==t&&ue(t,e,n),!Kt(t,!0)))return;Gt.get(o)?.delete(t),r.delete(t),Ut.get(o)?.delete(t),t.classList.remove(":popover-open"),Xt.set(t,"hidden"),n&&qt(t,"open","closed");const a=ie.get(t);a&&(ie.delete(t),e&&a.focus())}function le(t,e=!1,n=!1){let o=te(t);for(;o;)se(o,e,n),o=te(t)}function ce(t,e,n,o){let r=!1,i=!1;for(;r||!i;){i=!0;let a=null,s=!1;for(const n of e)if(n===t)s=!0;else if(s){a=n;break}if(!a)return;for(;"showing"===Yt(a)&&e.size;)se(Jt(e),n,o);e.has(t)&&Jt(e)!==t&&(r=!0),r&&(o=!1)}}function ue(t,e,n){const o=t.ownerDocument||t;if(t instanceof Document)return function(t,e=!1,n=!1){let o=Zt(t);for(;o;)se(o,e,n),o=Zt(t)}(o,e,n);Ut.get(o)?.has(t)?ce(t,Ut.get(o),e,n):(le(Ut.get(o)||new Set,e,n),Vt.get(o)?.has(t)&&ce(t,Vt.get(o),e,n))}var pe=new WeakMap;function fe(t){if(!t.isTrusted)return;const e=t.composedPath()[0];if(!e)return;const n=e.ownerDocument;if(!Zt(n))return;const o=function(t){const e=ne(t),n=function(t){for(;t;){const e=t.popoverTargetElement;if(e instanceof HTMLElement)return e;if((t=t.parentElement||ee(t))instanceof It&&(t=t.host),t instanceof Document)return}}(t);return Qt(e)>Qt(n)?e:n}(e);if(o&&"pointerdown"===t.type)pe.set(n,o);else if("pointerup"===t.type){const t=pe.get(n)===o;pe.delete(n),t&&ue(o||n,!1,!0)}}var he=new WeakMap;function de(t,e=!1){if(!t)return;he.has(t)||he.set(t,t.getAttribute("aria-expanded"));const n=t.popoverTargetElement;if(n instanceof HTMLElement&&"auto"===n.popover)t.setAttribute("aria-expanded",String(e));else{const e=he.get(t);e?t.setAttribute("aria-expanded",e):t.removeAttribute("aria-expanded")}}var me=globalThis.ShadowRoot||function(){};function we(t,e,n){const o=t[e];Object.defineProperty(t,e,{value(t){return o.call(this,n(t))}})}var ge=/(^|[^\\]):popover-open\b/g;var ve=null;function be(t){const e=function(){const t="function"==typeof globalThis.CSSLayerBlockRule;return`\n${t?"@layer popover-polyfill {":""}\n :where([popover]) {\n position: fixed;\n z-index: 2147483647;\n inset: 0;\n padding: 0.25em;\n width: fit-content;\n height: fit-content;\n border-width: initial;\n border-color: initial;\n border-image: initial;\n border-style: solid;\n background-color: canvas;\n color: canvastext;\n overflow: auto;\n margin: auto;\n }\n\n :where([popover]:not(.\\:popover-open)) {\n display: none;\n }\n\n :where(dialog[popover].\\:popover-open) {\n display: block;\n }\n\n :where(dialog[popover][open]) {\n display: revert;\n }\n\n :where([anchor].\\:popover-open) {\n inset: auto;\n }\n\n :where([anchor]:popover-open) {\n inset: auto;\n }\n\n @supports not (background-color: canvas) {\n :where([popover]) {\n background-color: white;\n color: black;\n }\n }\n\n @supports (width: -moz-fit-content) {\n :where([popover]) {\n width: -moz-fit-content;\n height: -moz-fit-content;\n }\n }\n\n @supports not (inset: 0) {\n :where([popover]) {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n }\n${t?"}":""}\n`}();if(null===ve)try{(ve=new CSSStyleSheet).replaceSync(e)}catch{ve=!1}if(!1===ve){const n=document.createElement("style");n.textContent=e,t instanceof Document?t.head.prepend(n):t.prepend(n)}else t.adoptedStyleSheets=[ve,...t.adoptedStyleSheets]}var ye=function(t,e,n,o){var r,i=arguments.length,a=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,o);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(i<3?r(a):i>3?r(e,n,a):r(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a};const xe="--post-popovercontainer-available-width",Se="--post-popovercontainer-available-height",Me="--post-popovercontainer-safe-space",Te=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postBeforeShow=n(this,"postBeforeShow",7),this.postShow=n(this,"postShow",7),this.postHide=n(this,"postHide",7),this.postBeforeToggle=n(this,"postBeforeToggle",7),this.postToggle=n(this,"postToggle",7),this.anchorRef=null,this.arrowRef=null,this.hasBeenOpened=!1,this.toggleTimeoutId=null,this.runningAnimation=null,this.stopAutoUpdate=null,this.placement="top",this.edgeGap=8,this.arrow=!1}connectedCallback(){!o.isBrowser||"undefined"!=typeof HTMLElement&&"object"==typeof HTMLElement.prototype&&"popover"in HTMLElement.prototype||function(){if("undefined"==typeof window)return;function t(t){return t?.includes(":popover-open")&&(t=t.replace(ge,"$1.\\:popover-open")),t}window.ToggleEvent=window.ToggleEvent||Pt,we(Document.prototype,"querySelector",t),we(Document.prototype,"querySelectorAll",t),we(Element.prototype,"querySelector",t),we(Element.prototype,"querySelectorAll",t),we(Element.prototype,"matches",t),we(Element.prototype,"closest",t),we(DocumentFragment.prototype,"querySelectorAll",t),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;const t=(this.getAttribute("popover")||"").toLowerCase();return""===t||"auto"==t?"auto":"hint"==t?"hint":"manual"},set(t){null===t?this.removeAttribute("popover"):this.setAttribute("popover",t)}},showPopover:{enumerable:!0,configurable:!0,value(t={}){ae(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){se(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(t={}){return"boolean"==typeof t&&(t={force:t}),"showing"===Xt.get(this)&&void 0===t.force||!1===t.force?se(this,!0,!0):void 0!==t.force&&!0!==t.force||ae(this),"showing"===Xt.get(this)}}});const e=Element.prototype.attachShadow;e&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(t){const n=e.call(this,t);return be(n),n}}});const n=HTMLElement.prototype.attachInternals;n&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){const t=n.call(this);return t.shadowRoot&&be(t.shadowRoot),t}}});const o=new WeakMap;function r(t){Object.defineProperties(t.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(t){if(null===t)this.removeAttribute("popovertarget"),o.delete(this);else{if(!(t instanceof Element))throw new TypeError("popoverTargetElement must be an element or null");this.setAttribute("popovertarget",""),o.set(this,t)}},get(){if("button"!==this.localName&&"input"!==this.localName)return null;if("input"===this.localName&&"reset"!==this.type&&"image"!==this.type&&"button"!==this.type)return null;if(this.disabled)return null;if(this.form&&"submit"===this.type)return null;const t=o.get(this);if(t&&t.isConnected)return t;if(t&&!t.isConnected)return o.delete(this),null;const e=ee(this),n=this.getAttribute("popovertarget");return(e instanceof Document||e instanceof me)&&n&&e.getElementById(n)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){const t=(this.getAttribute("popovertargetaction")||"").toLowerCase();return"show"===t||"hide"===t?t:"toggle"},set(t){this.setAttribute("popovertargetaction",t)}}})}var i;r(HTMLButtonElement),r(HTMLInputElement),(i=document).addEventListener("click",(t=>{const e=t.composedPath(),n=e[0];if(!(n instanceof Element)||n?.shadowRoot)return;const o=ee(n);if(!(o instanceof me||o instanceof Document))return;const r=e.find((t=>t.matches?.("[popovertargetaction],[popovertarget]")));return r?(function(t){const e=t.popoverTargetElement;if(!(e instanceof HTMLElement))return;const n=Yt(e);"show"===t.popoverTargetAction&&"showing"===n||"hide"===t.popoverTargetAction&&"hidden"===n||("showing"===n?se(e,!0,!0):Kt(e,!1)&&(_t.set(e,t),ae(e)))}(r),void t.preventDefault()):void 0})),i.addEventListener("keydown",(t=>{const e=t.key,n=t.target;t.defaultPrevented||!n||"Escape"!==e&&"Esc"!==e||ue(n.ownerDocument,!0,!0)})),i.addEventListener("pointerdown",fe),i.addEventListener("pointerup",fe),be(document)}()}componentDidLoad(){this.host.addEventListener("beforetoggle",this.handleToggle.bind(this))}disconnectedCallback(){this.cleanup(),this.host.removeEventListener("beforetoggle",this.handleToggle.bind(this))}cleanup(){this.stopAutoUpdate?.(),this.runningAnimation&&(this.runningAnimation.cancel(),this.runningAnimation=null)}isOpen(){return this.host?.matches(":where(:popover-open, .popover-open)")}getContent(){return this.host?.shadowRoot.querySelector('[part="post-popovercontainer-content"]')}getContentMinSize(){const t=this.getContent();if(!t)return{};const{minWidth:e,minHeight:n}=getComputedStyle(t);return{width:Number.parseFloat(e)||0,height:Number.parseFloat(n)||0}}async show(t){this.toggleTimeoutId||!t||this.isOpen()||(this.anchorRef=t,this.host.showPopover())}async hide(){!this.toggleTimeoutId&&this.isOpen()&&(this.anchorRef=null,this.host.hidePopover(),this.postHide.emit())}async toggle(t,e){const n=this.isOpen();if(!this.host||this.toggleTimeoutId)return n;const o=!0===e||void 0===e&&!n;return n===o||o&&!t?n:(this.anchorRef=o?t:null,this.host.togglePopover(e),this.toggleTimeoutId=null,this.isOpen())}async handleToggle(t){this.toggleTimeoutId=globalThis.setTimeout((()=>this.toggleTimeoutId=null),10),"open"===t.newState?await this.handleOpen():await this.handleClose()}async handleOpen(){this.postBeforeToggle.emit({willOpen:!0}),this.postBeforeShow.emit({first:!this.hasBeenOpened}),await this.updatePosition(!0),this.startAutoUpdate();try{await this.runOpenAnimation()}catch{return}this.postToggle.emit({isOpen:!0}),this.postShow.emit({first:!this.hasBeenOpened}),this.hasBeenOpened=!0}async runOpenAnimation(){const t=this.getContent();t&&(this.runningAnimation=function(t){if(t)return t.animate([{transform:"scale(0.9)",opacity:0},{transform:"scale(1)",opacity:1}],{duration:250,easing:"ease-out",fill:"forwards"})}(t),await this.runningAnimation.finished)}async handleClose(){this.postBeforeToggle.emit({willOpen:!1}),this.cleanup(),this.host.style.removeProperty(xe),this.host.style.removeProperty(Se),this.host.style.removeProperty(Me),this.postToggle.emit({isOpen:!1}),this.postHide.emit()}startAutoUpdate(){this.host&&this.anchorRef&&(this.stopAutoUpdate=function(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=o,c=pt(t),u=r||i?[...c?lt(c):[],...e?lt(e):[]]:[];u.forEach((t=>{r&&t.addEventListener("scroll",n),i&&t.addEventListener("resize",n)}));const p=c&&s?function(t,e,n){let o,r=null;const i=N(t);function a(){var t;clearTimeout(o),null==(t=r)||t.disconnect(),r=null}function s(n,l){void 0===n&&(n=!1),void 0===l&&(l=1),a();const c=t.getBoundingClientRect(),{left:u,top:p,width:d,height:w}=c;if(n||e(),!d||!w)return;const g={rootMargin:-m(p)+"px "+-m(i.clientWidth-(u+d))+"px "+-m(i.clientHeight-(p+w))+"px "+-m(u)+"px",threshold:h(0,f(1,l))||1};let v=!0;function b(e){const n=e[0].intersectionRatio;if(!Tt(c,t.getBoundingClientRect()))return s();if(n!==l){if(!v)return s();n?s(!1,n):o=setTimeout((()=>{s(!1,1e-7)}),1e3)}v=!1}try{r=new IntersectionObserver(b,{...g,root:i.ownerDocument})}catch(t){r=new IntersectionObserver(b,g)}r.observe(t)}const l=I(t),c=()=>s(n);return l.addEventListener("resize",c),s(!0),()=>{l.removeEventListener("resize",c),a()}}(c,n,i):null;let d,w=-1,g=null;a&&(g=new ResizeObserver((t=>{let[o]=t;o&&o.target===c&&g&&e&&(g.unobserve(e),cancelAnimationFrame(w),w=requestAnimationFrame((()=>{var t;null==(t=g)||t.observe(e)}))),n()})),c&&!l&&g.observe(c),e&&g.observe(e));let v=l?mt(t):null;return l&&function e(){const o=mt(t);v&&!Tt(v,o)&&n(),v=o,d=requestAnimationFrame(e)}(),n(),()=>{var t;u.forEach((t=>{r&&t.removeEventListener("scroll",n),i&&t.removeEventListener("resize",n)})),null==p||p(),null==(t=g)||t.disconnect(),g=null,l&&cancelAnimationFrame(d)}}(this.anchorRef,this.host,(()=>this.updatePosition(this.autoResize))))}async updatePosition(t=!1){const{x:e,y:n,middlewareData:o,placement:r}=await this.computePosition(t);o.hide?.referenceHidden?this.host.hidePopover():(this.side=y(r),this.host.style.left=`${e}px`,this.host.style.top=`${n}px`,o.arrow&&(this.arrowRef.style.left=o.arrow.x?`${o.arrow.x}px`:"",this.arrowRef.style.top=o.arrow.y?`${o.arrow.y}px`:"",this.arrowRef.style[Lt(this.side)]=`-${this.arrowRef.offsetWidth/2}px`),o[jt]&&this.host.style.setProperty(Me,o[jt].polygon))}async computePosition(t){const e=this.edgeGap??0,n=[kt(this.offset??(this.arrow?e+4:e)),Ht()],o=zt({padding:e,minSize:this.getContentMinSize()}),r=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r,platform:i}=e,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...c}=b(t,e),u={x:n,y:o},p=await i.detectOverflow(e,c),f=T(r),h=S(f);let d=u[h],m=u[f];const w=(t,e)=>v(e+p["y"===t?"top":"left"],e,e-p["y"===t?"bottom":"right"]);a&&(d=w(h,d)),s&&(m=w(f,m));const g=l.fn({...e,[h]:d,[f]:m});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[h]:a,[f]:s}}}}}}({limiter:At({offset:32}),padding:e});return this.placement?.includes("-")?n.push(o,r):n.push(r,o),t&&n.push(function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:o,platform:r,elements:i}=e,{apply:a=()=>{},...s}=b(t,e),l=await r.detectOverflow(e,s),c=y(n),u=x(n),p="y"===T(n),{width:d,height:m}=o.floating;let w,g;"top"===c||"bottom"===c?(w=c,g=u===(await(null==r.isRTL?void 0:r.isRTL(i.floating))?"start":"end")?"left":"right"):(g=c,w="end"===u?"top":"bottom");const v=m-l.top-l.bottom,S=d-l.left-l.right,M=f(m-l[w],v),E=f(d-l[g],S),k=e.middlewareData.shift;let H=M,A=E;null!=k&&k.enabled.x&&(A=S),null!=k&&k.enabled.y&&(H=v),!k&&!u&&(p?A=d-2*h(l.left,l.right):H=m-2*h(l.top,l.bottom)),await a({...e,availableWidth:A,availableHeight:H});const O=await r.getDimensions(i.floating);return d!==O.width||m!==O.height?{reset:{rects:!0}}:{}}}}({padding:e,apply({availableWidth:t,availableHeight:e,elements:n}){n.floating.style.setProperty(xe,`${Math.max(0,t)}px`),n.floating.style.setProperty(Se,`${Math.max(0,e)}px`)}})),this.arrow&&n.push((t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:r,rects:i,platform:a,elements:s,middlewareData:l}=e,{element:c,padding:u=0}=b(t,e)||{};if(null==c)return{};const p=z(u),h={x:n,y:o},d=E(r),m=M(d),w=await a.getDimensions(c),g="y"===d,y=g?"top":"left",S=g?"bottom":"right",T=g?"clientHeight":"clientWidth",k=i.reference[m]+i.reference[d]-h[d]-i.floating[m],H=h[d]-i.reference[d],A=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let O=A?A[T]:0;O&&await(null==a.isElement?void 0:a.isElement(A))||(O=s.floating[T]||i.floating[m]);const L=k/2-H/2,C=O/2-w[m]/2-1,R=f(p[y],C),D=f(p[S],C),$=O-w[m]-D,j=O/2-w[m]/2+L,F=v(R,j,$),W=!l.arrow&&null!=x(r)&&j!==F&&i.reference[m]/2-(j<R?R:D)-w[m]/2<0,P=W?j<R?j-R:j-$:0;return{[d]:h[d]+P,data:{[d]:F,centerOffset:j-F-P,...W&&{alignmentOffset:P}},reset:W}}}))({element:this.arrowRef,padding:e})),this.safeSpace&&n.push({name:jt,async fn(t){const{placement:e,rects:n,x:o,y:r}=t,i=y(e),a=await Ft(t,n.reference),s=[...Wt(await Ft(t,{...n.floating,x:o,y:r}),Lt(i)),...Wt(a,i)],l=[];for(let t=0;t<s.length;t+=2)l.push(`${s[t]}px ${s[t+1]}px`);return{data:{polygon:`polygon(${l.join(", ")})`}}}}),this.autoHide&&n.push(function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:o}=e,{strategy:r="referenceHidden",...i}=b(t,e);switch(r){case"referenceHidden":{const t=j(await o.detectOverflow(e,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:F(t)}}}case"escaped":{const t=j(await o.detectOverflow(e,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:t,escaped:F(t)}}}default:return{}}}}}({strategy:"referenceHidden"})),i=this.anchorRef,a=this.host,s={placement:this.placement??"top",strategy:"fixed",middleware:n},s??={},((t,e,n)=>{const o=new Map,r=null!=n?n:{},i={...Mt,...r.platform,_c:o};return(async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=n,s=a.detectOverflow?a:{...a,detectOverflow:$},l=await(null==a.isRTL?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:r}),{x:u,y:p}=D(c,o,l),f=o,h=0;const d={};for(let n=0;n<i.length;n++){const m=i[n];if(!m)continue;const{name:w,fn:g}=m,{x:v,y:b,data:y,reset:x}=await g({x:u,y:p,initialPlacement:o,placement:f,strategy:r,middlewareData:d,rects:c,platform:s,elements:{reference:t,floating:e}});u=null!=v?v:u,p=null!=b?b:p,d[w]={...d[w],...y},x&&h<50&&(h++,"object"==typeof x&&(x.placement&&(f=x.placement),x.rects&&(c=!0===x.rects?await a.getElementRects({reference:t,floating:e,strategy:r}):x.rects),({x:u,y:p}=D(c,f,l))),n=-1)}return{x:u,y:p,placement:f,strategy:r,middlewareData:d}})(t,e,{...r,platform:i})})(i,a,{...s,platform:{...$t,...s.platform,[Dt]:new Map}});var i,a,s}render(){return r(i,{key:"d48b21174f74b790f8a72b4294e9f741c3b64d14","data-version":s,popover:"auto"},r("div",{key:"455e84294ecb36e25cc62582eb6c41058f24f6bc",part:"post-popovercontainer-content"},this.arrow&&r("span",{key:"9d11f2596443876123eeaf5a02430d049c1c8b25","data-side":this.side,class:"arrow",ref:t=>this.arrowRef=t}),r("span",{key:"a562460cdfa5539e7d9c23f1d044a2c045df5b9f",part:"post-popovercontainer-border-mask"}),r("slot",{key:"5aa546bbdf6c70e2a0afabf818d421581060f8a7"})))}get host(){return this}static get style(){return'@layer polyfill{@supports not selector(:popover-open){:host([popover]:not(.\\:popover-open)){display:none}}}:host{background-color:rgba(0,0,0,0);border:rgba(0,0,0,0);position:fixed;margin:0;padding:0;overflow:visible}:host [part=post-popovercontainer-content]{box-sizing:border-box;box-shadow:var(--post-device-elevation-300);width:max-content;max-width:var(--post-popovercontainer-available-width);max-height:var(--post-popovercontainer-available-height);color:var(--post-current-fg);background-color:var(--post-current-bg);border-radius:4px;position:relative;display:flex}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host [part=post-popovercontainer-content]{border:2px solid rgba(0,0,0,0)}}:host [part=post-popovercontainer-border-mask]{display:none;position:absolute;inset:0;border-radius:4px;pointer-events:none}:host .arrow{--post-popovercontainer-arrow-border: var(--post-popovercontainer-arrow-border-width, 0px) solid var(--post-popovercontainer-arrow-border-color, transparent);position:absolute;width:.5825rem;height:.5825rem;background-color:inherit;rotate:45deg;pointer-events:none;z-index:-1}:host .arrow[data-side=top]{border-bottom-right-radius:2px;border-bottom:var(--post-popovercontainer-arrow-border);border-right:var(--post-popovercontainer-arrow-border)}:host .arrow[data-side=right]{border-bottom-left-radius:2px;border-bottom:var(--post-popovercontainer-arrow-border);border-left:var(--post-popovercontainer-arrow-border)}:host .arrow[data-side=bottom]{border-top-left-radius:2px;border-top:var(--post-popovercontainer-arrow-border);border-left:var(--post-popovercontainer-arrow-border)}:host .arrow[data-side=left]{border-top-right-radius:2px;border-top:var(--post-popovercontainer-arrow-border);border-right:var(--post-popovercontainer-arrow-border)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .arrow[data-side=top]{border-block-end:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0);bottom:-0.3796735336rem !important}:host .arrow[data-side=left]{border-block-start:2px solid rgba(0,0,0,0);border-inline-end:2px solid rgba(0,0,0,0);right:-0.3796735336rem !important}:host .arrow[data-side=right]{border-block-end:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0);left:-0.3796735336rem !important}:host .arrow[data-side=bottom]{border-block-start:2px solid rgba(0,0,0,0);border-inline-start:2px solid rgba(0,0,0,0);top:-0.3796735336rem !important}}:host([tooltip]){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}:host([safe-space])::after{content:"";position:fixed;inset:0;z-index:-1;pointer-events:auto;clip-path:var(--post-popovercontainer-safe-space, polygon(0 0, 0 0, 0 0))}:host(:not(:has(.arrow)))>div{box-shadow:var(--post-device-elevation-300)}:host(:has(.arrow))>div{filter:drop-shadow(1px 2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(2px 4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(4px 8px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[data-side=top]))>div{filter:drop-shadow(0px -2px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(0px -4px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(0px -8px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[data-side=left]))>div{filter:drop-shadow(-2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(-4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(-8px 0px 12px hsla(225, 7%, 11%, 0.15))}:host(:has(.arrow[data-side=right]))>div{filter:drop-shadow(2px 0px 3px hsla(216, 9%, 11%, 0.15)) drop-shadow(4px 0px 6px hsla(225, 17%, 9%, 0.15)) drop-shadow(8px 0px 12px hsla(225, 7%, 11%, 0.15))}'}},[257,"post-popovercontainer",{placement:[1],edgeGap:[2,"edge-gap"],offset:[2],arrow:[4],safeSpace:[516,"safe-space"],autoHide:[4,"auto-hide"],autoResize:[4,"auto-resize"],side:[32],show:[64],hide:[64],toggle:[64]}]);function Ee(){"undefined"!=typeof customElements&&["post-popovercontainer"].forEach((t=>{"post-popovercontainer"===t&&(customElements.get(a(t))||customElements.define(a(t),Te))}))}ye([l(u)],Te.prototype,"placement",void 0),ye([c("number")],Te.prototype,"edgeGap",void 0);export{Te as P,u as a,Ee as d}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as s,createEvent as e,h as o,Host as i,transformTag as r}from"@stencil/core/internal/client";import{v as n}from"./package.js";import{b as a}from"./breakpoints.js";import{g as l}from"./get-focusable-children.js";import{d as c}from"./post-closebutton2.js";import{d as h}from"./post-icon2.js";import{R as d}from"./required.js";import{T as p}from"./type.js";import{O as m}from"./one-of.js";var u=function(t,s,e,o){var i,r=arguments.length,n=r<3?s:null===o?o=Object.getOwnPropertyDescriptor(s,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,s,e,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(n=(r<3?i(n):r>3?i(s,e,n):i(s,e))||n);return r>3&&n&&Object.defineProperty(s,e,n),n};const g=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postToggle=e(this,"postToggle",7),this.device=a.get("device"),this.size="large",this.breakpointChange=t=>{this.device=t.detail,"desktop"===this.device&&(this.dialog?.open&&this.dialog.close(),this.postToggle.emit(!1))},this.handleKeyDown=t=>{if("Escape"!==t.key)return;const s=this.collapsible;s&&!s.collapsed&&(t.preventDefault(),t.stopPropagation(),s.toggle(!1),this.collapsibleTrigger?.querySelector("button")?.focus())},this.handleDialogClick=t=>{t.composedPath().some((t=>t instanceof HTMLAnchorElement))&&this.dialog.close()}}connectedCallback(){globalThis.addEventListener("postBreakpoint:device",this.breakpointChange),this.host.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){globalThis.removeEventListener("postBreakpoint:device",this.breakpointChange),this.host.removeEventListener("keydown",this.handleKeyDown)}get dialog(){return this.host.shadowRoot?.querySelector("dialog")}get collapsibleTrigger(){return document.activeElement?.closest("post-collapsible-trigger")??null}get collapsible(){return this.collapsibleTrigger?.querySelector(":scope > post-collapsible")??null}async toggle(){if("desktop"!==this.device)return this.dialog?.open?this.hide():this.show()}async show(){"desktop"!==this.device&&(this.dialog.showModal(),this.postToggle.emit(!0),this.focusNav())}async hide(){"desktop"!==this.device&&this.dialog.close()}focusNav(){const t=this.host.shadowRoot?.querySelector("slot"),s=t?.assignedElements({flatten:!0})[0];if(!s)return;const[e]=l(s);e?.focus()}renderNav(){return o("slot",null)}renderDialog(){return o("dialog",{onClick:this.handleDialogClick,onClose:()=>{this.postToggle.emit(!1)}},o("slot",null),o("post-closebutton",{onClick:()=>this.hide()},this.textClose))}render(){return o(i,{key:"f7d9b4e515e5085d78e452298bdfbfb2325e7422","data-version":n},"desktop"===this.device?this.renderNav():this.renderDialog())}get host(){return this}static get style(){return":host{display:flex}:host,:host dialog{background-color:var(--post-scheme-color-palette-bg-2);border-inline-end:var(--post-device-border-width-alternative1) solid var(--post-scheme-color-interactive-primary-enabled-stroke4)}:host dialog{overflow:visible;width:var(--post-core-dimension-296);bottom:auto;right:auto;border:none;padding:0;max-height:100dvh;transform:translateX(-100%);transition-property:transform,overlay,display;transition-behavior:allow-discrete;transition-duration:350ms;box-shadow:var(--post-device-elevation-300)}:host dialog[open]{transform:translateX(0)}@starting-style{:host dialog[open]{transform:translateX(-100%)}}@media (prefers-reduced-motion: reduce){:host dialog{transition:none}}:host post-closebutton{transform:translate(50%, 0)}"}},[257,"post-side-navigation",{textClose:[513,"text-close"],size:[1],device:[32],toggle:[64],show:[64],hide:[64]}]);u([d(),p("string")],g.prototype,"textClose",void 0),u([m(["large","small"])],g.prototype,"size",void 0);const f=g,b=function(){"undefined"!=typeof customElements&&["post-side-navigation","post-closebutton","post-icon"].forEach((t=>{switch(t){case"post-side-navigation":customElements.get(r(t))||customElements.define(r(t),g);break;case"post-closebutton":customElements.get(r(t))||c();break;case"post-icon":customElements.get(r(t))||h()}}))};export{f as PostSideNavigation,b as defineCustomElement}
1
+ import{proxyCustomElement as t,HTMLElement as s,createEvent as o,h as e,Host as i,transformTag as r}from"@stencil/core/internal/client";import{v as n}from"./package.js";import{b as a}from"./breakpoints.js";import{g as l}from"./get-focusable-children.js";import{i as c}from"./is-focus-visible.js";import{d as h}from"./post-closebutton2.js";import{d}from"./post-icon2.js";import{R as p}from"./required.js";import{T as u}from"./type.js";import{O as m}from"./one-of.js";var f=function(t,s,o,e){var i,r=arguments.length,n=r<3?s:null===e?e=Object.getOwnPropertyDescriptor(s,o):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,s,o,e);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(n=(r<3?i(n):r>3?i(s,o,n):i(s,o))||n);return r>3&&n&&Object.defineProperty(s,o,n),n};const g=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postToggle=o(this,"postToggle",7),this.device=a.get("device"),this.size="large",this.breakpointChange=t=>{this.device=t.detail,"desktop"===this.device&&(this.dialog?.open&&this.dialog.close(),this.postToggle.emit(!1))},this.handleKeyDown=t=>{if("Escape"!==t.key)return;const s=this.collapsible;s&&!s.collapsed&&(t.preventDefault(),t.stopPropagation(),s.toggle(!1),this.collapsibleTrigger?.querySelector("button")?.focus())},this.handleDialogClick=t=>{t.composedPath().some((t=>t instanceof HTMLAnchorElement))&&this.dialog.close()}}connectedCallback(){globalThis.addEventListener("postBreakpoint:device",this.breakpointChange),this.host.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){globalThis.removeEventListener("postBreakpoint:device",this.breakpointChange),this.host.removeEventListener("keydown",this.handleKeyDown)}get dialog(){return this.host.shadowRoot?.querySelector("dialog")}get collapsibleTrigger(){return document.activeElement?.closest("post-collapsible-trigger")??null}get collapsible(){return this.collapsibleTrigger?.querySelector(":scope > post-collapsible")??null}async toggle(){if("desktop"!==this.device)return this.dialog?.open?this.hide():this.show()}async show(){if("desktop"===this.device)return;const t=c(document.activeElement);this.dialog.showModal(),this.postToggle.emit(!0),t&&this.focusNav()}async hide(){"desktop"!==this.device&&this.dialog.close()}focusNav(){const t=this.host.shadowRoot?.querySelector("slot"),s=t?.assignedElements({flatten:!0})[0];if(!s)return;const[o]=l(s);o?.focus()}renderNav(){return e("slot",null)}renderDialog(){return e("dialog",{onClick:this.handleDialogClick,onClose:()=>{this.postToggle.emit(!1)}},e("slot",null),e("post-closebutton",{onClick:()=>this.hide()},this.textClose))}render(){return e(i,{key:"742833fbbbc716630d5fc5cc6289e44e3d05ee17","data-version":n},"desktop"===this.device?this.renderNav():this.renderDialog())}get host(){return this}static get style(){return":host{display:flex}:host,:host dialog{background-color:var(--post-scheme-color-palette-bg-2);border-inline-end:var(--post-device-border-width-alternative1) solid var(--post-scheme-color-interactive-primary-enabled-stroke4)}:host dialog{overflow:visible;width:var(--post-core-dimension-296);bottom:auto;right:auto;border:none;padding:0;max-height:100dvh;transform:translateX(-100%);transition-property:transform,overlay,display;transition-behavior:allow-discrete;transition-duration:350ms;box-shadow:var(--post-device-elevation-300)}:host dialog:focus,:host dialog:focus-visible{outline:none}:host dialog[open]{transform:translateX(0)}@starting-style{:host dialog[open]{transform:translateX(-100%)}}@media (prefers-reduced-motion: reduce){:host dialog{transition:none}}:host post-closebutton{transform:translate(50%, 0)}"}},[257,"post-side-navigation",{textClose:[513,"text-close"],size:[1],device:[32],toggle:[64],show:[64],hide:[64]}]);f([p(),u("string")],g.prototype,"textClose",void 0),f([m(["large","small"])],g.prototype,"size",void 0);const b=g,v=function(){"undefined"!=typeof customElements&&["post-side-navigation","post-closebutton","post-icon"].forEach((t=>{switch(t){case"post-side-navigation":customElements.get(r(t))||customElements.define(r(t),g);break;case"post-closebutton":customElements.get(r(t))||h();break;case"post-icon":customElements.get(r(t))||d()}}))};export{b as PostSideNavigation,v as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as s,createEvent as e,h as i,Host as o,transformTag as a,Build as r}from"@stencil/core/internal/client";import{f as n}from"./fade.js";import"./breakpoints.js";import{c}from"./component-on-ready.js";import{v as h}from"./package.js";import{d as l}from"./post-icon2.js";import{O as b}from"./one-of.js";import{T as p}from"./type.js";var d=function(t,s,e,i){var o,a=arguments.length,r=a<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,s,e,i);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(r=(a<3?o(r):a>3?o(s,e,r):o(s,e))||r);return a>3&&r&&Object.defineProperty(s,e,r),r};const v=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postChange=e(this,"postChange",7),this.showing=null,this.hiding=null,this.isLoaded=!1,this.isPagesVariant=!1,this.showLeftScrollButton=!1,this.showRightScrollButton=!1,this.textPrevTabItems="Previous tab items",this.textNextTabItems="Next tab items",this.size="large",this.updateScrollButtons=()=>{if(!this.tabsContainer)return;const t=getComputedStyle(this.tabsContainer),s=Number.parseFloat(t.paddingInlineStart)||0,e=Number.parseFloat(t.paddingInlineEnd)||0,i=this.tabsContainer.clientWidth-s-e,o=this.tabsContainer.scrollWidth-s-e;this.showLeftScrollButton=this.tabsContainer.scrollLeft>0,this.showRightScrollButton=this.tabsContainer.scrollLeft+i<o}}get tabs(){return Array.from(this.host.querySelectorAll("post-tab-item")).filter((t=>t.closest("post-tabs")===this.host))}get panels(){return Array.from(this.host.querySelectorAll("post-tab-panel")).filter((t=>t.closest("post-tabs")===this.host))}validateLabel(){this.isPagesVariant&&!this.label&&console.error(`[${this.host.localName}] Property "label" is required in Pages variant. Received: ${JSON.stringify(this.label)}.`,this.host)}componentWillRender(){this.detectVariant()}componentDidLoad(){if(this.leftScrollButton.ariaControlsElements=[this.tabsContainer],this.rightScrollButton.ariaControlsElements=[this.tabsContainer],this.moveMisplacedTabs(),this.moveMisplacedPanels(),this.enableTabs(),this.handleScrollButtons(),this.setupContentObserver(),this.setupResizeObserver(),this.validateLabel(),this.isPagesVariant){const t=this.findActivePagesTab();t&&(this.activateTab(t),this.scrollTabIntoView(t))}else{const t=this.activeTab||this.tabs[0]?.name;if(t){this.show(t);const s=this.tabs.find((s=>s.name===t));s&&this.scrollTabIntoView(s)}}this.isLoaded=!0}disconnectedCallback(){this.showing&&(this.showing.cancel(),this.showing=null),this.hiding&&(this.hiding.cancel(),this.hiding=null),this.contentObserver&&this.contentObserver?.disconnect(),this.resizeObserver?.disconnect(),this.tabsContainer?.removeEventListener("scroll",this.updateScrollButtons)}setupContentObserver(){this.contentObserver=new MutationObserver(this.handleContentChange.bind(this)),this.contentObserver?.observe(this.host,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-pages-variant","aria-current"]})}setupResizeObserver(){this.resizeObserver=new ResizeObserver(this.updateScrollButtons),this.resizeObserver.observe(this.tabsContainer)}handleContentChange(t){const s=this.shouldRedetectVariant(t);this.hasAriaCurrentChanged(t)&&this.isPagesVariant&&this.updateActivePagesTab(),s&&this.handleVariantChange(),this.updateScrollButtons()}shouldRedetectVariant(t){return t.some((t=>"childList"===t.type?t.addedNodes.length>0||t.removedNodes.length>0:"attributes"===t.type&&"data-pages-variant"===t.attributeName))}hasAriaCurrentChanged(t){return t.some((t=>"attributes"===t.type&&"aria-current"===t.attributeName))}updateActivePagesTab(){const t=this.findActivePagesTab();t&&t!==this.currentActiveTab&&(this.activateTab(t),this.scrollTabIntoView(t,"smooth"))}handleVariantChange(){const t=this.isPagesVariant;this.detectVariant(),t!==this.isPagesVariant&&(this.enableTabs(),this.initializeActiveTab())}initializeActiveTab(){if(this.isPagesVariant){const t=this.findActivePagesTab();t&&(this.activateTab(t),this.scrollTabIntoView(t))}else{const t=this.activeTab||this.tabs[0]?.name;t&&this.show(t)}}detectVariant(){const t=this.tabs.some((t=>null!==t.querySelector("a")||"true"===t.dataset.pagesVariant));if(t&&this.panels.length>0)throw Error("PostTabs: Mixed mode detected. Cannot use both Page Tabs (anchor elements) and Content Tabs (post-tab-panel elements) variants at the same time.");this.isPagesVariant=t,this.host.classList.remove("page-tabs","content-tabs"),this.host.classList.add(this.isPagesVariant?"page-tabs":"content-tabs")}findActivePagesTab(){return this.tabs.find((t=>null!==t.querySelector('a[aria-current="page"]')))||null}async show(t){try{if(t===this.currentActiveTab?.name)return;const s=this.currentActiveTab,e=this.host.querySelector(`post-tab-item[name="${t}"]`);if(!e)return;if(this.activateTab(e),this.scrollTabIntoView(e,"smooth"),this.showing&&(this.showing.finish(),this.showing=null),!s||this.showing||this.hiding||this.hidePanel(s.name),await this.awaitAnimation(this.hiding))return;if(this.showSelectedPanel(),await this.awaitAnimation(this.showing))return;this.isLoaded&&this.currentActiveTab&&this.postChange.emit(this.currentActiveTab.name)}catch(t){if(this.isAbortError(t))return;throw t}}async awaitAnimation(t){if(!t)return!1;try{return await t.finished,!1}catch(t){if(this.isAbortError(t))return!0;throw t}}isAbortError(t){return(t instanceof DOMException||t instanceof Error)&&"AbortError"===t.name}moveMisplacedTabs(){this.tabs&&this.tabs.forEach((t=>{t.getAttribute("slot")&&t.removeAttribute("slot")}))}moveMisplacedPanels(){this.panels&&this.panels.forEach((t=>{"panels"!==t.getAttribute("slot")&&t.setAttribute("slot","panels")}))}enableTabs(){this.tabs&&(this.tabs.forEach((async t=>{if(await c(t),this.isPagesVariant)return;if(t.getAttribute("aria-controls"))return;const s=this.getPanel(t.name);s&&(t.setAttribute("aria-controls",s.id),s.setAttribute("aria-labelledby",t.id)),t.addEventListener("click",(()=>{this.show(t.name)})),t.addEventListener("keydown",(s=>{if("Enter"!==s.key&&" "!==s.key||(s.preventDefault(),this.show(t.name)),"Home"!==s.key&&"End"!==s.key)return;s.preventDefault();const e=this.tabs.filter((t=>!t.hasAttribute("disabled")));if(0===e.length)return;const i="Home"===s.key?e[0]:e.at(-1);i&&(i?.focus(),this.show(i.name))})),t.addEventListener("keydown",(s=>{"ArrowRight"!==s.key&&"ArrowLeft"!==s.key||this.navigateTabs(t,s.key)}))})),this.currentActiveTab&&!this.currentActiveTab.isConnected&&this.show(this.tabs[0]?.name))}activateTab(t){this.currentActiveTab&&(this.isPagesVariant||(this.currentActiveTab.setAttribute("aria-selected","false"),this.currentActiveTab.setAttribute("tabindex","-1"))),this.isPagesVariant||(t.setAttribute("aria-selected","true"),t.setAttribute("tabindex","0")),this.currentActiveTab=t}hidePanel(t){const s=this.getPanel(t);s&&(this.hiding=n(s,"out"),this.hiding.onfinish=()=>{s.style.display="none",this.hiding=null})}showSelectedPanel(){if(!this.currentActiveTab)return;const t=this.getPanel(this.currentActiveTab.name);t&&(t.style.display="block",this.isLoaded&&(this.showing=n(t,"in"),this.showing.onfinish=()=>{this.showing=null}))}getPanel(t){return this.host.querySelector(`post-tab-panel[for=${t}]`)}navigateTabs(t,s){const e=Array.from(this.tabs).indexOf(t);let i;i="ArrowRight"===s?this.tabs[e+1]||this.tabs[0]:this.tabs[e-1]||this.tabs.at(-1),i&&(i.focus(),this.show(i.name))}scrollTabs(t){const s="prev"===t?-1:1,e=getComputedStyle(this.tabsContainer),i=Number.parseFloat(e.paddingInlineStart)||0,o=Number.parseFloat(e.paddingInlineEnd)||0;this.tabsContainer.scrollBy({left:s*(this.tabsContainer.clientWidth-i-o),behavior:"smooth"})}scrollTabIntoView(t,s="instant"){const e=this.tabsContainer,i=getComputedStyle(e),o=Number.parseFloat(i.paddingInlineStart)||0,a=Number.parseFloat(i.paddingInlineEnd)||0,r=t.offsetLeft,n=r+t.offsetWidth,c=e.scrollLeft+o,h=c+e.clientWidth-o-a;r<c?e.scrollTo({left:r-o,behavior:s}):n>h&&e.scrollTo({left:n-e.clientWidth+a,behavior:s})}handleScrollButtons(){this.updateScrollButtons(),this.tabsContainer.addEventListener("scroll",this.updateScrollButtons)}render(){const t=this.activeTab??this.tabs[0]?.name,s=this.isPagesVariant?"nav":"div";return i(o,{key:"fb65fd2589517dd6d86e86435ec6b3a3b64b093d","data-version":h,style:r.isServer&&!this.isPagesVariant&&t?{["--post-tab-panel-"+t]:"block",["--post-tab-item-"+t]:"1"}:void 0},i("div",{key:"dbcdd791af381ccc23953acb38a8e71527a804ee",class:"tabs-wrapper",part:"post-tabs"},i("button",{key:"20ce30515d80b282aa93f20a1f3281a1ef0f6359",ref:t=>this.leftScrollButton=t,class:"scroll-btn scroll-btn-left",type:"button","aria-label":this.textPrevTabItems,tabindex:this.showLeftScrollButton?0:-1,hidden:!this.showLeftScrollButton,onClick:()=>this.scrollTabs("prev")},i("post-icon",{key:"9a5402a28656d7a4459b9b848425bd15a45a0fce",name:"chevronleft"})),i(s,{key:"e821db02fd66aef6cf7a9fb5d925b0906571f3b6",ref:t=>this.tabsContainer=t,class:"tabs",role:this.isPagesVariant?void 0:"tablist","aria-label":this.isPagesVariant?this.label:void 0},i("slot",{key:"e3650e43ac269173cb58f1624f02778bf094573c",onSlotchange:()=>{this.moveMisplacedTabs(),this.enableTabs()}})),i("button",{key:"4345a9bc121ce187022cddf019d5c86d875a70e9",ref:t=>this.rightScrollButton=t,class:"scroll-btn scroll-btn-right",type:"button","aria-label":this.textNextTabItems,tabindex:this.showRightScrollButton?0:-1,hidden:!this.showRightScrollButton,onClick:()=>this.scrollTabs("next")},i("post-icon",{key:"2df749c1a4e506d9940ce61e077d0f0f330b7342",name:"chevronright"}))),!this.isPagesVariant&&i("div",{key:"184db29a5826af78d142ed1489be33c45831970b",class:"tab-content",part:"post-tabs-content"},i("slot",{key:"4a984c7de97f2f89e7fd0f829f5bc62e2323f056",name:"panels",onSlotchange:()=>this.moveMisplacedPanels()})))}get host(){return this}static get watchers(){return{label:[{validateLabel:0}]}}static get style(){return':host{display:block}:host .tabs-wrapper{position:relative;display:flex;align-items:center}:host .tabs-wrapper button.scroll-btn{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button;display:flex;align-items:center;justify-content:center;transition:background-color 100ms,border-color 100ms,color 100ms;cursor:pointer}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn{background-color:ButtonFace !important}:host .tabs-wrapper button.scroll-btn:hover{background-color:Highlight !important}}:host .tabs-wrapper button.scroll-btn post-icon{color:currentColor}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn post-icon{color:Highlight}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn:hover post-icon{color:canvas}}:host .tabs-wrapper button.scroll-btn[hidden]{display:none}:host .tabs-wrapper button.scroll-btn{outline-offset:var(--post-device-spacing-padding-44) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}:host .tabs-wrapper button.scroll-btn:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn:is(:focus-visible,:has(:focus-visible),.pretend-focus){transition:none}:host .tabs-wrapper button.scroll-btn:is(:focus-visible,:has(:focus-visible),.pretend-focus):hover{color:HighlightText;border-color:HighlightText}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){:host .tabs-wrapper button.scroll-btn:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn:is(:focus-visible,:focus-within,.pretend-focus){transition:none}:host .tabs-wrapper button.scroll-btn:is(:focus-visible,:focus-within,.pretend-focus):hover{color:HighlightText;border-color:HighlightText}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}:host .tabs-wrapper .tabs{overflow-x:hidden;background-color:rgba(0,0,0,0) !important;display:flex;flex-wrap:nowrap;align-items:end;overscroll-behavior-x:contain;white-space:nowrap;margin-block:0;padding-inline-start:0;list-style:none}:host(.page-tabs){overflow:visible !important}:host(.page-tabs) .tabs-wrapper{margin-inline:calc(-1*(var(--post-container-offset)))}@media screen and (min-width: 1024px){:host(.page-tabs) .tabs-wrapper{margin-inline:calc(-1 * (var(--post-container-offset)) + 20px)}:host(.page-tabs) .tabs-wrapper::after{box-shadow:20px 0 0 var(--post-palette-color-nested-tabs-page-stroke),-20px 0 0 var(--post-palette-color-nested-tabs-page-stroke)}}@media screen and (min-width: 1024px)and (forced-colors: active),screen and (min-width: 1024px)and (-ms-high-contrast: active),screen and (min-width: 1024px)and (-ms-high-contrast: white-on-black){:host(.page-tabs) .tabs-wrapper::after{box-shadow:20px 0 0 LinkText,-20px 0 0 LinkText}}:host(.page-tabs) .tabs-wrapper button.scroll-btn{color:var(--post-scheme-color-interactive-primary-enabled-fg5);background-color:var(--post-scheme-color-interactive-primary-enabled-bg5);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-primary-enabled-stroke);position:absolute;z-index:2;box-shadow:var(--post-device-elevation-200);border-radius:var(--post-device-border-radius-2)}:host(.page-tabs) .tabs-wrapper button.scroll-btn:hover{border-color:var(--post-scheme-color-interactive-primary-hover-stroke) !important;color:var(--post-scheme-color-interactive-primary-hover-fg4);background-color:var(--post-scheme-color-interactive-primary-hover-bg8)}:host(.page-tabs) .tabs-wrapper button.scroll-btn.scroll-btn-left{inset-inline-start:0;border-inline-start:none;border-radius:0 var(--post-device-border-radius-2) var(--post-device-border-radius-2) 0}:host(.page-tabs) .tabs-wrapper button.scroll-btn.scroll-btn-right{inset-inline-end:0;border-inline-end:none;border-radius:var(--post-device-border-radius-2) 0 0 var(--post-device-border-radius-2)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(.page-tabs) .tabs-wrapper button.scroll-btn.scroll-btn{background-color:Highlight;color:HighlightText}}:host(.page-tabs) .tabs-wrapper::after{content:"";position:absolute;inset-block-end:0;inset-inline-start:0;width:100%;height:var(--post-device-border-width-default);background-color:var(--post-palette-color-nested-tabs-page-stroke)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(.page-tabs) .tabs-wrapper::after{background-color:LinkText}}:host(.page-tabs) .tabs-wrapper .tabs{padding-inline:calc(var(--post-container-offset));gap:var(--post-device-spacing-gap-inline-5);scrollbar-width:none}:host(.page-tabs) .tabs-wrapper .tabs::-webkit-scrollbar{display:none}:host(.page-tabs:not([size=small])) button.scroll-btn{top:var(--post-device-spacing-padding-36)}:host(.page-tabs[size=small]) button.scroll-btn{top:var(--post-device-spacing-padding-36)}:host(.content-tabs) .tabs-wrapper button.scroll-btn{flex-shrink:0;color:var(--post-scheme-color-interactive-button-tertiary-enabled-fg)}:host(.content-tabs) .tabs-wrapper button.scroll-btn:hover{border-color:var(--post-scheme-color-interactive-primary-hover-stroke) !important;color:var(--post-scheme-color-interactive-button-tertiary-hover-fg)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(.content-tabs) .tabs-wrapper button.scroll-btn:hover{color:HighlightText}}:host(post-tabs:not([size=small])) button.scroll-btn{height:var(--post-device-sizing-interactive-button-height-10);width:var(--post-device-sizing-interactive-button-width-1);border-radius:var(--post-device-border-radius-2)}:host(post-tabs:not([size=small])) button.scroll-btn post-icon{height:var(--post-device-sizing-interactive-icon-size5);width:var(--post-device-sizing-interactive-icon-size5)}:host(.page-tabs:not([size=small])) button.scroll-btn-left{padding-inline:var(--post-device-spacing-padding-39) var(--post-device-spacing-padding-40)}:host(.page-tabs:not([size=small])) button.scroll-btn-right{padding-inline:var(--post-device-spacing-padding-40) var(--post-device-spacing-padding-39)}:host([size=small]) button.scroll-btn{height:var(--post-device-sizing-interactive-button-size-1);width:var(--post-device-sizing-interactive-button-size-1);border-radius:var(--post-device-border-radius-2)}:host([size=small]) button.scroll-btn post-icon{height:var(--post-device-sizing-interactive-icon-size4);width:var(--post-device-sizing-interactive-icon-size4)}:host(.page-tabs[size=small]) button.scroll-btn-left{padding-inline:var(--post-device-spacing-padding-42) var(--post-device-spacing-padding-43)}:host(.page-tabs[size=small]) button.scroll-btn-right{padding-inline:var(--post-device-spacing-padding-43) var(--post-device-spacing-padding-42)}'}},[257,"post-tabs",{textPrevTabItems:[513,"text-prev-tab-items"],textNextTabItems:[513,"text-next-tab-items"],activeTab:[513,"active-tab"],size:[513],label:[513],isPagesVariant:[32],showLeftScrollButton:[32],showRightScrollButton:[32],show:[64]},void 0,{label:[{validateLabel:0}]}]);d([b(["small","large"])],v.prototype,"size",void 0),d([p("string")],v.prototype,"label",void 0);const u=v,g=function(){"undefined"!=typeof customElements&&["post-tabs","post-icon"].forEach((t=>{switch(t){case"post-tabs":customElements.get(a(t))||customElements.define(a(t),v);break;case"post-icon":customElements.get(a(t))||l()}}))};export{u as PostTabs,g as defineCustomElement}
1
+ import{proxyCustomElement as t,HTMLElement as s,createEvent as e,h as i,Host as o,transformTag as r,Build as a}from"@stencil/core/internal/client";import{f as n}from"./fade.js";import"./breakpoints.js";import{c}from"./component-on-ready.js";import{v as h}from"./package.js";import{d as l}from"./post-icon2.js";import{O as b}from"./one-of.js";import{T as p}from"./type.js";var d=function(t,s,e,i){var o,r=arguments.length,a=r<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,s,e,i);else for(var n=t.length-1;n>=0;n--)(o=t[n])&&(a=(r<3?o(a):r>3?o(s,e,a):o(s,e))||a);return r>3&&a&&Object.defineProperty(s,e,a),a};const v=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postChange=e(this,"postChange",7),this.showing=null,this.hiding=null,this.isLoaded=!1,this.isPagesVariant=!1,this.showLeftScrollButton=!1,this.showRightScrollButton=!1,this.textPrevTabItems="Previous tab items",this.textNextTabItems="Next tab items",this.size="large",this.updateScrollButtons=()=>{if(!this.tabsContainer)return;const t=getComputedStyle(this.tabsContainer),s=Number.parseFloat(t.paddingInlineStart)||0,e=Number.parseFloat(t.paddingInlineEnd)||0,i=this.tabsContainer.clientWidth-s-e,o=this.tabsContainer.scrollWidth-s-e;this.showLeftScrollButton=this.tabsContainer.scrollLeft>0,this.showRightScrollButton=this.tabsContainer.scrollLeft+i<o}}get tabs(){return Array.from(this.host.querySelectorAll("post-tab-item")).filter((t=>t.closest("post-tabs")===this.host))}get panels(){return Array.from(this.host.querySelectorAll("post-tab-panel")).filter((t=>t.closest("post-tabs")===this.host))}validateLabel(){this.isPagesVariant&&!this.label&&console.error(`[${this.host.localName}] Property "label" is required in Pages variant. Received: ${JSON.stringify(this.label)}.`,this.host)}componentWillRender(){this.detectVariant()}componentDidLoad(){if(this.leftScrollButton.ariaControlsElements=[this.tabsContainer],this.rightScrollButton.ariaControlsElements=[this.tabsContainer],this.moveMisplacedTabs(),this.moveMisplacedPanels(),this.enableTabs(),this.handleScrollButtons(),this.setupContentObserver(),this.setupResizeObserver(),this.validateLabel(),this.isPagesVariant){const t=this.findActivePagesTab();t&&(this.activateTab(t),this.scrollTabIntoView(t))}else{const t=this.activeTab||this.tabs[0]?.name;if(t){this.show(t);const s=this.tabs.find((s=>s.name===t));s&&this.scrollTabIntoView(s)}}this.isLoaded=!0}disconnectedCallback(){this.showing&&(this.showing.cancel(),this.showing=null),this.hiding&&(this.hiding.cancel(),this.hiding=null),this.contentObserver&&this.contentObserver?.disconnect(),this.resizeObserver?.disconnect(),this.tabsContainer?.removeEventListener("scroll",this.updateScrollButtons)}setupContentObserver(){this.contentObserver=new MutationObserver(this.handleContentChange.bind(this)),this.contentObserver?.observe(this.host,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-pages-variant","aria-current"]})}setupResizeObserver(){this.resizeObserver=new ResizeObserver(this.updateScrollButtons),this.resizeObserver.observe(this.tabsContainer)}handleContentChange(t){const s=this.shouldRedetectVariant(t);this.hasAriaCurrentChanged(t)&&this.isPagesVariant&&this.updateActivePagesTab(),s&&this.handleVariantChange(),this.updateScrollButtons()}shouldRedetectVariant(t){return t.some((t=>"childList"===t.type?t.addedNodes.length>0||t.removedNodes.length>0:"attributes"===t.type&&"data-pages-variant"===t.attributeName))}hasAriaCurrentChanged(t){return t.some((t=>"attributes"===t.type&&"aria-current"===t.attributeName))}updateActivePagesTab(){const t=this.findActivePagesTab();t&&t!==this.currentActiveTab&&(this.activateTab(t),this.scrollTabIntoView(t,"smooth"))}handleVariantChange(){const t=this.isPagesVariant;this.detectVariant(),t!==this.isPagesVariant&&(this.enableTabs(),this.initializeActiveTab())}initializeActiveTab(){if(this.isPagesVariant){const t=this.findActivePagesTab();t&&(this.activateTab(t),this.scrollTabIntoView(t))}else{const t=this.activeTab||this.tabs[0]?.name;t&&this.show(t)}}detectVariant(){const t=this.tabs.some((t=>null!==t.querySelector("a")||"true"===t.dataset.pagesVariant));if(t&&this.panels.length>0)throw Error("PostTabs: Mixed mode detected. Cannot use both Page Tabs (anchor elements) and Content Tabs (post-tab-panel elements) variants at the same time.");this.isPagesVariant=t,this.host.classList.remove("page-tabs","content-tabs"),this.host.classList.add(this.isPagesVariant?"page-tabs":"content-tabs")}findActivePagesTab(){return this.tabs.find((t=>null!==t.querySelector('a[aria-current="page"]')))||null}async show(t){try{if(t===this.currentActiveTab?.name)return;const s=this.currentActiveTab,e=this.host.querySelector(`post-tab-item[name="${t}"]`);if(!e)return;if(this.activateTab(e),this.scrollTabIntoView(e,"smooth"),this.showing&&(this.showing.finish(),this.showing=null),!s||this.showing||this.hiding||this.hidePanel(s.name),await this.awaitAnimation(this.hiding))return;if(this.showSelectedPanel(),await this.awaitAnimation(this.showing))return;this.isLoaded&&this.currentActiveTab&&this.postChange.emit(this.currentActiveTab.name)}catch(t){if(this.isAbortError(t))return;throw t}}async awaitAnimation(t){if(!t)return!1;try{return await t.finished,!1}catch(t){if(this.isAbortError(t))return!0;throw t}}isAbortError(t){return(t instanceof DOMException||t instanceof Error)&&"AbortError"===t.name}moveMisplacedTabs(){this.tabs&&this.tabs.forEach((t=>{t.getAttribute("slot")&&t.removeAttribute("slot")}))}moveMisplacedPanels(){this.panels&&this.panels.forEach((t=>{"panels"!==t.getAttribute("slot")&&t.setAttribute("slot","panels")}))}enableTabs(){this.tabs&&(this.tabs.forEach((async t=>{if(await c(t),this.isPagesVariant)return;if(t.getAttribute("aria-controls"))return;const s=this.getPanel(t.name);s&&(t.setAttribute("aria-controls",s.id),s.setAttribute("aria-labelledby",t.id)),t.addEventListener("click",(()=>{this.show(t.name)})),t.addEventListener("keydown",(s=>{if("Enter"!==s.key&&" "!==s.key||(s.preventDefault(),this.show(t.name)),"Home"!==s.key&&"End"!==s.key)return;s.preventDefault();const e=this.tabs.filter((t=>!t.hasAttribute("disabled")));if(0===e.length)return;const i="Home"===s.key?e[0]:e.at(-1);i&&(i?.focus(),this.show(i.name))})),t.addEventListener("keydown",(s=>{"ArrowRight"!==s.key&&"ArrowLeft"!==s.key||this.navigateTabs(t,s.key)}))})),this.currentActiveTab&&!this.currentActiveTab.isConnected&&this.show(this.tabs[0]?.name))}activateTab(t){this.currentActiveTab&&(this.isPagesVariant||(this.currentActiveTab.setAttribute("aria-selected","false"),this.currentActiveTab.setAttribute("tabindex","-1"))),this.isPagesVariant||(t.setAttribute("aria-selected","true"),t.setAttribute("tabindex","0")),this.currentActiveTab=t}hidePanel(t){const s=this.getPanel(t);s&&(this.hiding=n(s,"out"),this.hiding.onfinish=()=>{s.style.display="none",this.hiding=null})}showSelectedPanel(){if(!this.currentActiveTab)return;const t=this.getPanel(this.currentActiveTab.name);t&&(t.style.display="block",this.isLoaded&&(this.showing=n(t,"in"),this.showing.onfinish=()=>{this.showing=null}))}getPanel(t){return this.host.querySelector(`post-tab-panel[for=${t}]`)}navigateTabs(t,s){const e=Array.from(this.tabs).indexOf(t);let i;i="ArrowRight"===s?this.tabs[e+1]||this.tabs[0]:this.tabs[e-1]||this.tabs.at(-1),i&&(i.focus(),this.show(i.name))}scrollTabs(t){const s="prev"===t?-1:1,e=getComputedStyle(this.tabsContainer),i=Number.parseFloat(e.paddingInlineStart)||0,o=Number.parseFloat(e.paddingInlineEnd)||0;this.tabsContainer.scrollBy({left:s*(this.tabsContainer.clientWidth-i-o),behavior:"smooth"})}scrollTabIntoView(t,s="instant"){const e=this.tabsContainer,i=getComputedStyle(e),o=Number.parseFloat(i.paddingInlineStart)||0,r=Number.parseFloat(i.paddingInlineEnd)||0,a=t.offsetLeft,n=a+t.offsetWidth,c=e.scrollLeft+o,h=c+e.clientWidth-o-r;a<c?e.scrollTo({left:a-o,behavior:s}):n>h&&e.scrollTo({left:n-e.clientWidth+r,behavior:s})}handleScrollButtons(){this.updateScrollButtons(),this.tabsContainer.addEventListener("scroll",this.updateScrollButtons)}render(){const t=this.activeTab??this.tabs[0]?.name,s=this.isPagesVariant?"nav":"div";return i(o,{key:"fb65fd2589517dd6d86e86435ec6b3a3b64b093d","data-version":h,style:a.isServer&&!this.isPagesVariant&&t?{["--post-tab-panel-"+t]:"block",["--post-tab-item-"+t]:"1"}:void 0},i("div",{key:"dbcdd791af381ccc23953acb38a8e71527a804ee",class:"tabs-wrapper",part:"post-tabs"},i("button",{key:"e14933611fd38f647219a6885b879f93e7bdd4d7",ref:t=>this.leftScrollButton=t,class:"scroll-btn scroll-btn-left",type:"button","aria-label":this.textPrevTabItems,tabindex:-1,hidden:!this.showLeftScrollButton,onClick:()=>this.scrollTabs("prev")},i("post-icon",{key:"c1bf9a6f438f2b6519a90b20c26c292143239323",name:"chevronleft"})),i(s,{key:"b7f3357cdab40e7e0d9c290c922803eccb00ec81",ref:t=>this.tabsContainer=t,class:"tabs",role:this.isPagesVariant?void 0:"tablist","aria-label":this.isPagesVariant?this.label:void 0},i("slot",{key:"4e4487253b64f4ec1f0454e711de7b1d3240dc32",onSlotchange:()=>{this.moveMisplacedTabs(),this.enableTabs()}})),i("button",{key:"415ca5611f57f8af18135ae3cdd18ca33964aba5",ref:t=>this.rightScrollButton=t,class:"scroll-btn scroll-btn-right",type:"button","aria-label":this.textNextTabItems,tabindex:-1,hidden:!this.showRightScrollButton,onClick:()=>this.scrollTabs("next")},i("post-icon",{key:"42e4d6ff41b39a94b9480d3ec477a2f93e876d4f",name:"chevronright"}))),!this.isPagesVariant&&i("div",{key:"5c529d848c9bb7221d06324c03e98c55a3ef61b6",class:"tab-content",part:"post-tabs-content"},i("slot",{key:"76c701c2ecb17d762bdf96c2970f5b69a6871301",name:"panels",onSlotchange:()=>this.moveMisplacedPanels()})))}get host(){return this}static get watchers(){return{label:[{validateLabel:0}]}}static get style(){return':host{display:block}:host .tabs-wrapper{position:relative;display:flex;align-items:center}:host .tabs-wrapper button.scroll-btn{padding:0;overflow:visible;border:0;background:none;color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);font:inherit;-webkit-user-select:none;user-select:none;appearance:button;display:flex;align-items:center;justify-content:center;transition:background-color 100ms,border-color 100ms,color 100ms;cursor:pointer}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn{background-color:ButtonFace !important}:host .tabs-wrapper button.scroll-btn:hover{background-color:Highlight !important}}:host .tabs-wrapper button.scroll-btn post-icon{color:currentColor}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn post-icon{color:Highlight}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn:hover post-icon{color:canvas}}:host .tabs-wrapper button.scroll-btn[hidden]{display:none}:host .tabs-wrapper button.scroll-btn{outline-offset:var(--post-device-spacing-padding-44) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}:host .tabs-wrapper button.scroll-btn:focus-visible{outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn:focus-visible{transition:none}:host .tabs-wrapper button.scroll-btn:focus-visible:hover{color:HighlightText;border-color:HighlightText}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn:focus-visible{outline-color:Highlight !important}}:host .tabs-wrapper button.scroll-btn.pretend-focus{outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn.pretend-focus{transition:none}:host .tabs-wrapper button.scroll-btn.pretend-focus:hover{color:HighlightText;border-color:HighlightText}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn.pretend-focus{outline-color:Highlight !important}}:host .tabs-wrapper button.scroll-btn:has(:focus-visible){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn:has(:focus-visible){transition:none}:host .tabs-wrapper button.scroll-btn:has(:focus-visible):hover{color:HighlightText;border-color:HighlightText}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn:has(:focus-visible){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){:host .tabs-wrapper button.scroll-btn:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn:is(:focus-visible,:focus-within,.pretend-focus){transition:none}:host .tabs-wrapper button.scroll-btn:is(:focus-visible,:focus-within,.pretend-focus):hover{color:HighlightText;border-color:HighlightText}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .tabs-wrapper button.scroll-btn:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}:host .tabs-wrapper .tabs{overflow-x:hidden;background-color:rgba(0,0,0,0) !important;display:flex;flex-wrap:nowrap;align-items:end;overscroll-behavior-x:contain;white-space:nowrap;margin-block:0;padding-inline-start:0;list-style:none}:host(.page-tabs){overflow:visible !important}:host(.page-tabs) .tabs-wrapper{margin-inline:calc(-1*(var(--post-container-offset)))}@media screen and (min-width: 1024px){:host(.page-tabs) .tabs-wrapper{margin-inline:calc(-1 * (var(--post-container-offset)) + 20px)}:host(.page-tabs) .tabs-wrapper::after{box-shadow:20px 0 0 var(--post-palette-color-nested-tabs-page-stroke),-20px 0 0 var(--post-palette-color-nested-tabs-page-stroke)}}@media screen and (min-width: 1024px)and (forced-colors: active),screen and (min-width: 1024px)and (-ms-high-contrast: active),screen and (min-width: 1024px)and (-ms-high-contrast: white-on-black){:host(.page-tabs) .tabs-wrapper::after{box-shadow:20px 0 0 LinkText,-20px 0 0 LinkText}}:host(.page-tabs) .tabs-wrapper button.scroll-btn{color:var(--post-scheme-color-interactive-primary-enabled-fg5);background-color:var(--post-scheme-color-interactive-primary-enabled-bg5);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-primary-enabled-stroke);position:absolute;z-index:2;box-shadow:var(--post-device-elevation-200);border-radius:var(--post-device-border-radius-2)}:host(.page-tabs) .tabs-wrapper button.scroll-btn:hover{border-color:var(--post-scheme-color-interactive-primary-hover-stroke) !important;color:var(--post-scheme-color-interactive-primary-hover-fg4);background-color:var(--post-scheme-color-interactive-primary-hover-bg8)}:host(.page-tabs) .tabs-wrapper button.scroll-btn.scroll-btn-left{inset-inline-start:0;border-inline-start:none;border-radius:0 var(--post-device-border-radius-2) var(--post-device-border-radius-2) 0}:host(.page-tabs) .tabs-wrapper button.scroll-btn.scroll-btn-right{inset-inline-end:0;border-inline-end:none;border-radius:var(--post-device-border-radius-2) 0 0 var(--post-device-border-radius-2)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(.page-tabs) .tabs-wrapper button.scroll-btn.scroll-btn{background-color:Highlight;color:HighlightText}}:host(.page-tabs) .tabs-wrapper::after{content:"";position:absolute;inset-block-end:0;inset-inline-start:0;width:100%;height:var(--post-device-border-width-default);background-color:var(--post-palette-color-nested-tabs-page-stroke)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(.page-tabs) .tabs-wrapper::after{background-color:LinkText}}:host(.page-tabs) .tabs-wrapper .tabs{padding-inline:calc(var(--post-container-offset));gap:var(--post-device-spacing-gap-inline-5);scrollbar-width:none}:host(.page-tabs) .tabs-wrapper .tabs::-webkit-scrollbar{display:none}:host(.page-tabs:not([size=small])) button.scroll-btn{top:var(--post-device-spacing-padding-36)}:host(.page-tabs[size=small]) button.scroll-btn{top:var(--post-device-spacing-padding-36)}:host(.content-tabs) .tabs-wrapper button.scroll-btn{flex-shrink:0;color:var(--post-scheme-color-interactive-button-tertiary-enabled-fg)}:host(.content-tabs) .tabs-wrapper button.scroll-btn:hover{border-color:var(--post-scheme-color-interactive-primary-hover-stroke) !important;color:var(--post-scheme-color-interactive-button-tertiary-hover-fg)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(.content-tabs) .tabs-wrapper button.scroll-btn:hover{color:HighlightText}}:host(post-tabs:not([size=small])) button.scroll-btn{height:var(--post-device-sizing-interactive-button-height-10);width:var(--post-device-sizing-interactive-button-width-1);border-radius:var(--post-device-border-radius-2)}:host(post-tabs:not([size=small])) button.scroll-btn post-icon{height:var(--post-device-sizing-interactive-icon-size5);width:var(--post-device-sizing-interactive-icon-size5)}:host(.page-tabs:not([size=small])) button.scroll-btn-left{padding-inline:var(--post-device-spacing-padding-39) var(--post-device-spacing-padding-40)}:host(.page-tabs:not([size=small])) button.scroll-btn-right{padding-inline:var(--post-device-spacing-padding-40) var(--post-device-spacing-padding-39)}:host([size=small]) button.scroll-btn{height:var(--post-device-sizing-interactive-button-size-1);width:var(--post-device-sizing-interactive-button-size-1);border-radius:var(--post-device-border-radius-2)}:host([size=small]) button.scroll-btn post-icon{height:var(--post-device-sizing-interactive-icon-size4);width:var(--post-device-sizing-interactive-icon-size4)}:host(.page-tabs[size=small]) button.scroll-btn-left{padding-inline:var(--post-device-spacing-padding-42) var(--post-device-spacing-padding-43)}:host(.page-tabs[size=small]) button.scroll-btn-right{padding-inline:var(--post-device-spacing-padding-43) var(--post-device-spacing-padding-42)}'}},[257,"post-tabs",{textPrevTabItems:[513,"text-prev-tab-items"],textNextTabItems:[513,"text-next-tab-items"],activeTab:[513,"active-tab"],size:[513],label:[513],isPagesVariant:[32],showLeftScrollButton:[32],showRightScrollButton:[32],show:[64]},void 0,{label:[{validateLabel:0}]}]);d([b(["small","large"])],v.prototype,"size",void 0),d([p("string")],v.prototype,"label",void 0);const u=v,g=function(){"undefined"!=typeof customElements&&["post-tabs","post-icon"].forEach((t=>{switch(t){case"post-tabs":customElements.get(r(t))||customElements.define(r(t),v);break;case"post-icon":customElements.get(r(t))||l()}}))};export{u as PostTabs,g as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as e,Build as i,h as s,Host as o,transformTag as n}from"@stencil/core/internal/client";import"./breakpoints.js";import{v as r}from"./package.js";import{R as h}from"./required.js";import{T as a}from"./type.js";const l=["pointerenter","pointerleave","focusin","focusout"];let c;const p=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.delay=0,this.trigger=null,this.delayTimeout=null,this.boundTriggerHandler=this.handleTriggerEvent.bind(this),this.boundTooltipHandler=this.handleTooltipEvent.bind(this)}get tooltip(){if(i.isServer)return null;const t=document.getElementById(this.for);return"post-tooltip"===t?.localName?t:null}componentWillLoad(){i.isBrowser&&import("./focusable.js").then((function(t){return t.f})).then((t=>{c??=t.default}))}componentDidLoad(){this.setupTrigger(),this.attachListeners(),this.attachTooltipListeners()}disconnectedCallback(){this.removeListeners(),this.removeTooltipListeners(),this.cleanupTrigger(),this.delayTimeout&&(clearTimeout(this.delayTimeout),this.delayTimeout=null)}handleSlotChange(){this.cleanupTrigger(),this.setupTrigger()}cleanupTrigger(){if(this.trigger){const t=this.trigger.getAttribute("aria-describedby")||"";if(t.includes(this.for)){const e=t.split(" ").filter((t=>t!==this.for)).join(" ");e?this.trigger.setAttribute("aria-describedby",e):this.trigger.removeAttribute("aria-describedby")}this.trigger=null}}setupTrigger(){if(this.trigger=this.host.querySelector("*"),this.trigger){c?.(this.trigger)||this.trigger.setAttribute("tabindex","0");const t=this.trigger.getAttribute("aria-describedby")||"";t.includes(this.for)||this.trigger.setAttribute("aria-describedby",`${t} ${this.for}`.trim())}else console.warn("No content found in the post-tooltip-trigger slot. Please insert a focusable element or content that can receive focus.")}attachListeners(){l.forEach((t=>{this.host.addEventListener(t,this.boundTriggerHandler)}))}removeListeners(){l.forEach((t=>{this.host.removeEventListener(t,this.boundTriggerHandler)}))}attachTooltipListeners(){this.tooltip&&(this.tooltip.addEventListener("pointerenter",this.boundTooltipHandler),this.tooltip.addEventListener("pointerleave",this.boundTooltipHandler))}removeTooltipListeners(){this.tooltip&&(this.tooltip.removeEventListener("pointerenter",this.boundTooltipHandler),this.tooltip.removeEventListener("pointerleave",this.boundTooltipHandler))}handleTriggerEvent(t){switch(t.type){case"pointerenter":case"focusin":case"long-press":this.handleEnter();break;case"pointerleave":case"focusout":this.handleLeave(t)}}handleTooltipEvent(t){switch(t.type){case"pointerenter":this.handleEnter();break;case"pointerleave":this.handleLeave(t)}}handleEnter(){this.delayTimeout&&(clearTimeout(this.delayTimeout),this.delayTimeout=null),this.interestHandler()}handleLeave(t){const e=t.relatedTarget;this.tooltip&&e&&this.tooltip.contains(e)||e===this.trigger||this.interestLostHandler()}interestHandler(){this.trigger&&(this.delay>0?this.delayTimeout=globalThis.setTimeout((()=>{this.tooltip?.show(this.trigger),this.delayTimeout=null}),this.delay):this.tooltip?.show(this.trigger))}interestLostHandler(){this.delayTimeout&&(clearTimeout(this.delayTimeout),this.delayTimeout=null),this.tooltip?.hide()}render(){return s(o,{key:"55adc12f457aa8a5dd4357ed27876b0e526f7ae3","data-version":r},s("slot",{key:"84da1734ae1c1ac9376caa693108e3ed54bf176f",onSlotchange:()=>this.handleSlotChange()}))}get host(){return this}static get style(){return"post-tooltip-trigger{vertical-align:top}:host{cursor:pointer}"}},[257,"post-tooltip-trigger",{for:[513],delay:[2]}]);!function(t,e,i,s){var o,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(o=t[h])&&(r=(n<3?o(r):n>3?o(e,i,r):o(e,i))||r);n>3&&r&&Object.defineProperty(e,i,r)}([h(),a("string")],p.prototype,"for",void 0);const u=p,d=function(){"undefined"!=typeof customElements&&["post-tooltip-trigger"].forEach((t=>{"post-tooltip-trigger"===t&&(customElements.get(n(t))||customElements.define(n(t),p))}))};export{u as PostTooltipTrigger,d as defineCustomElement}
1
+ import{proxyCustomElement as t,HTMLElement as e,Build as i,h as s,Host as o,transformTag as n}from"@stencil/core/internal/client";import"./breakpoints.js";import{v as r}from"./package.js";import{R as h}from"./required.js";import{T as l}from"./type.js";const a=["pointerenter","pointerleave","focusin","focusout"];let c;const p=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.delay=0,this.trigger=null,this.delayTimeout=null,this.boundTriggerHandler=this.handleTriggerEvent.bind(this),this.boundTooltipHandler=this.handleTooltipEvent.bind(this)}get tooltip(){if(i.isServer)return null;const t=document.getElementById(this.for);return"post-tooltip"===t?.localName?t:null}componentWillLoad(){i.isBrowser&&import("./focusable.js").then((function(t){return t.f})).then((t=>{c??=t.default}))}componentDidLoad(){this.setupTrigger(),this.attachListeners(),this.attachTooltipListeners()}disconnectedCallback(){this.removeListeners(),this.removeTooltipListeners(),this.cleanupTrigger(),this.delayTimeout&&(clearTimeout(this.delayTimeout),this.delayTimeout=null)}handleSlotChange(){this.cleanupTrigger(),this.setupTrigger()}cleanupTrigger(){if(this.trigger){const t=this.trigger.getAttribute("aria-describedby")||"";if(t.includes(this.for)){const e=t.split(" ").filter((t=>t!==this.for)).join(" ");e?this.trigger.setAttribute("aria-describedby",e):this.trigger.removeAttribute("aria-describedby")}this.trigger=null}}setupTrigger(){if(this.trigger=this.host.querySelector("*"),this.trigger){c?.(this.trigger)||this.trigger.setAttribute("tabindex","0");const t=this.trigger.getAttribute("aria-describedby")||"";t.includes(this.for)||this.trigger.setAttribute("aria-describedby",`${t} ${this.for}`.trim())}else console.warn("No content found in the post-tooltip-trigger slot. Please insert a focusable element or content that can receive focus.")}attachListeners(){a.forEach((t=>{this.host.addEventListener(t,this.boundTriggerHandler)}))}removeListeners(){a.forEach((t=>{this.host.removeEventListener(t,this.boundTriggerHandler)}))}attachTooltipListeners(){this.tooltip&&(this.tooltip.addEventListener("pointerenter",this.boundTooltipHandler),this.tooltip.addEventListener("pointerleave",this.boundTooltipHandler))}removeTooltipListeners(){this.tooltip&&(this.tooltip.removeEventListener("pointerenter",this.boundTooltipHandler),this.tooltip.removeEventListener("pointerleave",this.boundTooltipHandler))}handleTriggerEvent(t){switch(t.type){case"pointerenter":case"focusin":case"long-press":this.handleEnter();break;case"pointerleave":case"focusout":this.handleLeave(t)}}handleTooltipEvent(t){switch(t.type){case"pointerenter":this.handleEnter();break;case"pointerleave":this.handleLeave(t)}}handleEnter(){this.delayTimeout&&(clearTimeout(this.delayTimeout),this.delayTimeout=null),this.interestHandler()}handleLeave(t){const e=t.relatedTarget;this.tooltip&&e&&this.tooltip.contains(e)||e===this.trigger||this.interestLostHandler()}interestHandler(){this.trigger&&(this.delay>0?this.delayTimeout=globalThis.setTimeout((()=>{this.tooltip?.show(this.trigger),this.delayTimeout=null}),this.delay):this.tooltip?.show(this.trigger))}interestLostHandler(){this.delayTimeout&&(clearTimeout(this.delayTimeout),this.delayTimeout=null),this.tooltip?.hide()}render(){return s(o,{key:"37f835a46c96f1f97019b611da8b6be2d6e1a8d7","data-version":r},s("slot",{key:"c2fc3d9080948fdcfbd8b2866730e76b770b87ba",onSlotchange:()=>this.handleSlotChange()}))}get host(){return this}static get style(){return"post-tooltip-trigger{vertical-align:top}:host{cursor:pointer}"}},[257,"post-tooltip-trigger",{for:[513],delay:[2]}]);!function(t,e,i,s){var o,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var h=t.length-1;h>=0;h--)(o=t[h])&&(r=(n<3?o(r):n>3?o(e,i,r):o(e,i))||r);n>3&&r&&Object.defineProperty(e,i,r)}([h(),l("string")],p.prototype,"for",void 0);const u=p,d=function(){"undefined"!=typeof customElements&&["post-tooltip-trigger"].forEach((t=>{"post-tooltip-trigger"===t&&(customElements.get(n(t))||customElements.define(n(t),p))}))};export{u as PostTooltipTrigger,d as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as o,HTMLElement as e,h as t,Host as r,transformTag as s}from"@stencil/core/internal/client";import{d as a,a as i}from"./post-popovercontainer2.js";import"./breakpoints.js";import{v as n}from"./package.js";import{O as p}from"./one-of.js";const c=o(class extends e{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.placement="top",this.arrow=!1,this.open=!1}componentDidLoad(){this.host.id||console.error("No id set: <post-tooltip> must have an id, linking it to it's target element with a <post-tooltip-trigger> element.")}async show(o){this.open||await this.popoverRef.show(o)}async hide(){this.popoverRef.hide()}async toggle(o,e){this.popoverRef.toggle(o,e)}handleBeforeToggle(o){this.open=o.detail.willOpen}render(){return t(r,{key:"62d5983e0ef32f851166d0c1d2c457cac0809fdf","data-version":n},t("post-popovercontainer",{key:"10150540956510724ab4832ecceb421a7013d983",safeSpace:"trapezoid",class:this.arrow?"has-arrow":"",role:"tooltip",arrow:this.arrow,placement:this.placement,autoHide:!0,onPostBeforeToggle:o=>this.handleBeforeToggle(o),ref:o=>this.popoverRef=o},t("slot",{key:"cdfaf0e916afa55ec3f1a7f64003101985560e27"})))}get host(){return this}static get style(){return':host{display:none}:host([open]){display:contents}post-popovercontainer[arrow]::after{position:absolute;content:"";inset:-13px;z-index:-1}post-popovercontainer{--post-current-bg:var(--post-scheme-color-surface-accent-bg);--post-current-fg:var(--post-scheme-color-surface-accent-fg);--post-popovercontainer-arrow-border-width:var(--post-device-border-width-alternative1);--post-popovercontainer-arrow-border-color:var(--post-scheme-color-surface-accent-fg)}post-popovercontainer::part(post-popovercontainer-border-mask){display:block;box-shadow:inset 0 0 0 var(--post-device-spacing-padding-14) var(--post-scheme-color-surface-accent-bg)}post-popovercontainer::part(post-popovercontainer-content){border:var(--post-device-border-width-alternative1) solid var(--post-scheme-color-surface-accent-fg);border-radius:var(--post-device-border-radius-1);padding:var(--post-device-spacing-padding-14) var(--post-device-spacing-padding-15);font-size:var(--post-device-font-size-9);max-width:var(--post-tooltip-max-width, 280px);word-wrap:break-word;white-space:normal}'}},[257,"post-tooltip",{placement:[1],arrow:[4],open:[1540],show:[64],hide:[64],toggle:[64]}]);!function(o,e,t,r){var s,a=arguments.length,i=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,t):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(o,e,t,r);else for(var n=o.length-1;n>=0;n--)(s=o[n])&&(i=(a<3?s(i):a>3?s(e,t,i):s(e,t))||i);a>3&&i&&Object.defineProperty(e,t,i)}([p(i)],c.prototype,"placement",void 0);const d=c,l=function(){"undefined"!=typeof customElements&&["post-tooltip","post-popovercontainer"].forEach((o=>{switch(o){case"post-tooltip":customElements.get(s(o))||customElements.define(s(o),c);break;case"post-popovercontainer":customElements.get(s(o))||a()}}))};export{d as PostTooltip,l as defineCustomElement}
1
+ import{proxyCustomElement as o,HTMLElement as e,h as t,Host as s,transformTag as r}from"@stencil/core/internal/client";import{d as a,a as i}from"./post-popovercontainer2.js";import"./breakpoints.js";import{v as c}from"./package.js";import{O as n}from"./one-of.js";const p=o(class extends e{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.placement="top",this.arrow=!1,this.open=!1}componentDidLoad(){this.host.id||console.error("No id set: <post-tooltip> must have an id, linking it to it's target element with a <post-tooltip-trigger> element.")}async show(o){this.open||await this.popoverRef.show(o)}async hide(){this.popoverRef.hide()}async toggle(o,e){this.popoverRef.toggle(o,e)}handleBeforeToggle(o){this.host.toggleAttribute("open",o.detail.willOpen),this.open=o.detail.willOpen}render(){return t(s,{key:"c592afd24bbaf57999ca40b9558746a5a4490362","data-version":c},t("post-popovercontainer",{key:"c66e0c89228fed51a0affa4788a3e6c32f3196ae",safeSpace:!0,class:this.arrow?"has-arrow":"",role:"tooltip",arrow:this.arrow,placement:this.placement,autoHide:!0,onPostBeforeToggle:o=>this.handleBeforeToggle(o),ref:o=>this.popoverRef=o},t("div",{key:"fc57d4457c4910aab1bfae2558cf78ae9a253552",class:"tooltip-content"},t("slot",{key:"316a52bf1a1763b2510270e9ab5bc26ca8e5e53f"}))))}get host(){return this}static get style(){return":host{display:none}:host([open]){display:contents}post-popovercontainer{--post-current-bg:var(--post-scheme-color-surface-accent-bg);--post-current-fg:var(--post-scheme-color-surface-accent-fg);--post-popovercontainer-arrow-border-width:var(--post-device-border-width-alternative1);--post-popovercontainer-arrow-border-color:var(--post-scheme-color-surface-accent-fg)}post-popovercontainer::part(post-popovercontainer-border-mask){display:block;box-shadow:inset 0 0 0 var(--post-device-spacing-padding-14) var(--post-scheme-color-surface-accent-bg)}post-popovercontainer::part(post-popovercontainer-content){border:var(--post-device-border-width-alternative1) solid var(--post-scheme-color-surface-accent-fg);border-radius:var(--post-device-border-radius-1)}.tooltip-content{box-sizing:border-box;padding:var(--post-device-spacing-padding-14) var(--post-device-spacing-padding-15);font-size:var(--post-device-font-size-9);max-width:var(--post-tooltip-max-width, 280px);word-wrap:break-word;white-space:normal;overflow:hidden}"}},[257,"post-tooltip",{placement:[1],arrow:[4],open:[1540],show:[64],hide:[64],toggle:[64]}]);!function(o,e,t,s){var r,a=arguments.length,i=a<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,t):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(o,e,t,s);else for(var c=o.length-1;c>=0;c--)(r=o[c])&&(i=(a<3?r(i):a>3?r(e,t,i):r(e,t))||i);a>3&&i&&Object.defineProperty(e,t,i)}([n(i)],p.prototype,"placement",void 0);const d=p,l=function(){"undefined"!=typeof customElements&&["post-tooltip","post-popovercontainer"].forEach((o=>{switch(o){case"post-tooltip":customElements.get(r(o))||customElements.define(r(o),p);break;case"post-popovercontainer":customElements.get(r(o))||a()}}))};export{d as PostTooltip,l as defineCustomElement}