@swisspost/design-system-components 10.0.0-next.75 → 10.0.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 (333) hide show
  1. package/dist/cjs/{create-validator-decorator-Bimhl6Ib.js → create-validator-decorator-4dRrOF30.js} +1 -1
  2. package/dist/cjs/{index-CyeY2muT.js → index-BqngpwGa.js} +11 -15
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/{one-of-BVQP1dR3.js → one-of-D1veqtsm.js} +1 -1
  5. package/dist/cjs/{package-JSyXVavg.js → package-Bwdl-T-w.js} +1 -1
  6. package/dist/cjs/{pattern-BDKu8-v6.js → pattern-B7VKOu5m.js} +1 -1
  7. package/dist/cjs/post-accordion_2.cjs.entry.js +10 -12
  8. package/dist/cjs/post-autocomplete.cjs.entry.js +6 -6
  9. package/dist/cjs/post-avatar.cjs.entry.js +7 -7
  10. package/dist/cjs/post-back-to-top.cjs.entry.js +6 -6
  11. package/dist/cjs/post-banner.cjs.entry.js +5 -5
  12. package/dist/cjs/post-breadcrumb-item.cjs.entry.js +7 -7
  13. package/dist/cjs/post-breadcrumbs.cjs.entry.js +7 -7
  14. package/dist/cjs/post-closebutton_14.cjs.entry.js +41 -35
  15. package/dist/cjs/post-collapsible_2.cjs.entry.js +6 -6
  16. package/dist/cjs/post-components.cjs.js +2 -2
  17. package/dist/cjs/post-date-picker.cjs.entry.js +427 -257
  18. package/dist/cjs/post-footer.cjs.entry.js +6 -6
  19. package/dist/cjs/post-linkarea.cjs.entry.js +3 -3
  20. package/dist/cjs/post-listbox-option.cjs.entry.js +4 -4
  21. package/dist/cjs/post-listbox.cjs.entry.js +3 -3
  22. package/dist/cjs/post-number-input.cjs.entry.js +5 -4
  23. package/dist/cjs/post-pagination.cjs.entry.js +5 -5
  24. package/dist/cjs/post-popover-trigger.cjs.entry.js +5 -5
  25. package/dist/cjs/post-popover.cjs.entry.js +11 -12
  26. package/dist/cjs/post-progressbar.cjs.entry.js +4 -4
  27. package/dist/cjs/post-rating.cjs.entry.js +6 -6
  28. package/dist/cjs/post-side-navigation-trigger.cjs.entry.js +7 -7
  29. package/dist/cjs/post-side-navigation.cjs.entry.js +18 -7
  30. package/dist/cjs/post-stepper-item.cjs.entry.js +3 -3
  31. package/dist/cjs/post-stepper.cjs.entry.js +7 -7
  32. package/dist/cjs/post-tab-item.cjs.entry.js +15 -14
  33. package/dist/cjs/post-tab-panel.cjs.entry.js +6 -6
  34. package/dist/cjs/post-tabs.cjs.entry.js +196 -74
  35. package/dist/cjs/post-tooltip-trigger.cjs.entry.js +7 -9
  36. package/dist/cjs/post-tooltip.cjs.entry.js +9 -10
  37. package/dist/cjs/{required-BsZuSJAl.js → required-Bkz8MOYa.js} +1 -1
  38. package/dist/cjs/{type-DXpEWY0w.js → type-D8eD1JMd.js} +1 -1
  39. package/dist/cjs/{url-D-EbWRlF.js → url-C7MnIIZ_.js} +1 -1
  40. package/dist/collection/collection-manifest.json +1 -2
  41. package/dist/collection/components/post-accordion/post-accordion.js +1 -1
  42. package/dist/collection/components/post-accordion-item/post-accordion-item.js +4 -36
  43. package/dist/collection/components/post-autocomplete/post-autocomplete.js +1 -1
  44. package/dist/collection/components/post-avatar/post-avatar.js +1 -1
  45. package/dist/collection/components/post-back-to-top/post-back-to-top.js +1 -1
  46. package/dist/collection/components/post-banner/post-banner.js +1 -1
  47. package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.js +1 -1
  48. package/dist/collection/components/post-closebutton/post-closebutton.js +1 -1
  49. package/dist/collection/components/post-collapsible/post-collapsible.js +1 -1
  50. package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +1 -1
  51. package/dist/collection/components/post-date-picker/accessibility-utils.js +59 -0
  52. package/dist/collection/components/post-date-picker/date-utils.js +102 -0
  53. package/dist/collection/components/post-date-picker/native-mask-element.js +36 -0
  54. package/dist/collection/components/post-date-picker/post-date-picker.css +1 -1
  55. package/dist/collection/components/post-date-picker/post-date-picker.js +224 -301
  56. package/dist/collection/components/post-footer/post-footer.js +1 -1
  57. package/dist/collection/components/post-header/post-header.js +6 -5
  58. package/dist/collection/components/post-icon/post-icon.js +1 -1
  59. package/dist/collection/components/post-language-menu/post-language-menu.js +7 -5
  60. package/dist/collection/components/post-linkarea/post-linkarea.js +1 -1
  61. package/dist/collection/components/post-listbox/post-listbox.js +1 -1
  62. package/dist/collection/components/post-listbox-option/post-listbox-option.js +2 -2
  63. package/dist/collection/components/post-logo/post-logo.js +1 -1
  64. package/dist/collection/components/post-mainnavigation/post-mainnavigation.js +1 -1
  65. package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
  66. package/dist/collection/components/post-megadropdown/post-megadropdown.js +1 -1
  67. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.js +1 -1
  68. package/dist/collection/components/post-menu/post-menu.js +9 -12
  69. package/dist/collection/components/post-menu-trigger/post-menu-trigger.js +1 -1
  70. package/dist/collection/components/post-number-input/post-number-input.js +3 -2
  71. package/dist/collection/components/post-popover/post-popover.js +12 -22
  72. package/dist/collection/components/post-popover-trigger/post-popover-trigger.js +1 -1
  73. package/dist/collection/components/post-popovercontainer/post-popovercontainer.js +13 -9
  74. package/dist/collection/components/post-progressbar/post-progressbar.js +1 -1
  75. package/dist/collection/components/post-rating/post-rating.js +1 -1
  76. package/dist/collection/components/post-side-navigation/post-side-navigation.css +1 -1
  77. package/dist/collection/components/post-side-navigation/post-side-navigation.js +38 -2
  78. package/dist/collection/components/post-side-navigation/side-navigation-styles.js +1 -0
  79. package/dist/collection/components/post-side-navigation-trigger/post-side-navigation-trigger.css +1 -1
  80. package/dist/collection/components/post-side-navigation-trigger/post-side-navigation-trigger.js +1 -1
  81. package/dist/collection/components/post-stepper/post-stepper.js +1 -1
  82. package/dist/collection/components/post-stepper-item/post-stepper-item.js +1 -1
  83. package/dist/collection/components/post-tab-item/post-tab-item.js +36 -19
  84. package/dist/collection/components/post-tab-panel/post-tab-panel.js +3 -2
  85. package/dist/collection/components/post-tabs/post-tabs.css +1 -1
  86. package/dist/collection/components/post-tabs/post-tabs.js +255 -84
  87. package/dist/collection/components/post-togglebutton/post-togglebutton.js +1 -1
  88. package/dist/collection/components/post-tooltip/post-tooltip.js +12 -22
  89. package/dist/collection/components/post-tooltip-trigger/post-tooltip-trigger.js +2 -4
  90. package/dist/collection/types/element-api.js +3 -0
  91. package/dist/component-names.json +0 -1
  92. package/dist/components/index.d.ts +0 -2
  93. package/dist/components/index.js +1 -1
  94. package/dist/components/package.js +1 -1
  95. package/dist/components/post-accordion-item2.js +1 -1
  96. package/dist/components/post-accordion2.js +1 -1
  97. package/dist/components/post-autocomplete.js +1 -1
  98. package/dist/components/post-avatar.js +1 -1
  99. package/dist/components/post-back-to-top.js +1 -1
  100. package/dist/components/post-banner.js +1 -1
  101. package/dist/components/post-breadcrumbs.js +1 -1
  102. package/dist/components/post-closebutton2.js +1 -1
  103. package/dist/components/post-collapsible-trigger2.js +1 -1
  104. package/dist/components/post-collapsible2.js +1 -1
  105. package/dist/components/post-date-picker.js +1 -1
  106. package/dist/components/post-footer.js +1 -1
  107. package/dist/components/post-header.js +1 -1
  108. package/dist/components/post-icon2.js +1 -1
  109. package/dist/components/post-language-menu.js +1 -1
  110. package/dist/components/post-linkarea.js +1 -1
  111. package/dist/components/post-listbox-option.js +1 -1
  112. package/dist/components/post-listbox.js +1 -1
  113. package/dist/components/post-logo.js +1 -1
  114. package/dist/components/post-mainnavigation.js +1 -1
  115. package/dist/components/post-megadropdown-trigger.js +1 -1
  116. package/dist/components/post-megadropdown.js +1 -1
  117. package/dist/components/post-menu-trigger2.js +1 -1
  118. package/dist/components/post-menu2.js +1 -1
  119. package/dist/components/post-number-input.js +1 -1
  120. package/dist/components/post-popover-trigger.js +1 -1
  121. package/dist/components/post-popover.js +1 -1
  122. package/dist/components/post-popovercontainer2.js +1 -1
  123. package/dist/components/post-progressbar.js +1 -1
  124. package/dist/components/post-rating.js +1 -1
  125. package/dist/components/post-side-navigation-trigger.js +1 -1
  126. package/dist/components/post-side-navigation.js +1 -1
  127. package/dist/components/post-stepper-item.js +1 -1
  128. package/dist/components/post-stepper.js +1 -1
  129. package/dist/components/post-tab-item.js +1 -1
  130. package/dist/components/post-tab-panel.js +1 -1
  131. package/dist/components/post-tabs.js +1 -1
  132. package/dist/components/post-togglebutton2.js +1 -1
  133. package/dist/components/post-tooltip-trigger.js +1 -1
  134. package/dist/components/post-tooltip.js +1 -1
  135. package/dist/components/react/index.js +1 -1
  136. package/dist/components/react/{p-DNddZV_h.js → p-Auha71WU.js} +1 -1
  137. package/dist/components/react/{p-ztiqEfbC.js → p-Bpwt-eYO.js} +1 -1
  138. package/dist/components/react/p-C6wtG9yO.js +1 -0
  139. package/dist/components/react/{p-DU4XzTGt.js → p-C7jOKUzv.js} +1 -1
  140. package/dist/components/react/{p-CbU3QFNG.js → p-Cjo8Ke7t.js} +1 -1
  141. package/dist/components/react/{p-BUAS73l8.js → p-ClF2qF9A.js} +1 -1
  142. package/dist/components/react/{p-BUSQG9af.js → p-CyNGpewj.js} +1 -1
  143. package/dist/components/react/{p-DTg2SXJj.js → p-DvVypwYO.js} +1 -1
  144. package/dist/components/react/p-SEWFpJgA.js +1 -0
  145. package/dist/components/react/p-bAeGAkWL.js +1 -0
  146. package/dist/components/react/{p-B3ZJPCU0.js → p-i1ZFHprG.js} +1 -1
  147. package/dist/components/react/p-znfTjqEZ.js +1 -0
  148. package/dist/components/react/post-accordion-item.js +1 -1
  149. package/dist/components/react/post-accordion.js +1 -1
  150. package/dist/components/react/post-autocomplete.js +1 -1
  151. package/dist/components/react/post-avatar.js +1 -1
  152. package/dist/components/react/post-back-to-top.js +1 -1
  153. package/dist/components/react/post-banner.js +1 -1
  154. package/dist/components/react/post-breadcrumb-item.js +1 -1
  155. package/dist/components/react/post-breadcrumbs.js +1 -1
  156. package/dist/components/react/post-closebutton.js +1 -1
  157. package/dist/components/react/post-collapsible-trigger.js +1 -1
  158. package/dist/components/react/post-collapsible.js +1 -1
  159. package/dist/components/react/post-date-picker.js +1 -1
  160. package/dist/components/react/post-footer.js +1 -1
  161. package/dist/components/react/post-header.js +1 -1
  162. package/dist/components/react/post-icon.js +1 -1
  163. package/dist/components/react/post-language-menu-item.js +1 -1
  164. package/dist/components/react/post-language-menu.js +1 -1
  165. package/dist/components/react/post-linkarea.js +1 -1
  166. package/dist/components/react/post-listbox-option.js +1 -1
  167. package/dist/components/react/post-listbox.js +1 -1
  168. package/dist/components/react/post-logo.js +1 -1
  169. package/dist/components/react/post-mainnavigation.js +1 -1
  170. package/dist/components/react/post-megadropdown-trigger.js +1 -1
  171. package/dist/components/react/post-megadropdown.js +1 -1
  172. package/dist/components/react/post-menu-item.js +1 -1
  173. package/dist/components/react/post-menu-trigger.js +1 -1
  174. package/dist/components/react/post-menu.js +1 -1
  175. package/dist/components/react/post-number-input.js +1 -1
  176. package/dist/components/react/post-pagination.js +1 -1
  177. package/dist/components/react/post-popover-trigger.js +1 -1
  178. package/dist/components/react/post-popover.js +1 -1
  179. package/dist/components/react/post-popovercontainer.js +1 -1
  180. package/dist/components/react/post-progressbar.js +1 -1
  181. package/dist/components/react/post-rating.js +1 -1
  182. package/dist/components/react/post-side-navigation-trigger.js +1 -1
  183. package/dist/components/react/post-side-navigation.js +1 -1
  184. package/dist/components/react/post-stepper-item.js +1 -1
  185. package/dist/components/react/post-stepper.js +1 -1
  186. package/dist/components/react/post-tab-item.js +1 -1
  187. package/dist/components/react/post-tab-panel.js +1 -1
  188. package/dist/components/react/post-tabs.js +1 -1
  189. package/dist/components/react/post-togglebutton.js +1 -1
  190. package/dist/components/react/post-tooltip-trigger.js +1 -1
  191. package/dist/components/react/post-tooltip.js +1 -1
  192. package/dist/docs.json +287 -473
  193. package/dist/esm/{create-validator-decorator-BNkS_yAb.js → create-validator-decorator-CYYTw0AS.js} +1 -1
  194. package/dist/esm/{index-BGeKgZqi.js → index-DE1aWdqx.js} +11 -15
  195. package/dist/esm/loader.js +3 -3
  196. package/dist/esm/{one-of-4BD_5pKR.js → one-of-Ug1_Xoes.js} +1 -1
  197. package/dist/esm/package-SEWFpJgA.js +3 -0
  198. package/dist/esm/{pattern-D7tnGo1u.js → pattern-WLk4tOqI.js} +1 -1
  199. package/dist/esm/post-accordion_2.entry.js +10 -12
  200. package/dist/esm/post-autocomplete.entry.js +6 -6
  201. package/dist/esm/post-avatar.entry.js +7 -7
  202. package/dist/esm/post-back-to-top.entry.js +6 -6
  203. package/dist/esm/post-banner.entry.js +5 -5
  204. package/dist/esm/post-breadcrumb-item.entry.js +7 -7
  205. package/dist/esm/post-breadcrumbs.entry.js +7 -7
  206. package/dist/esm/post-closebutton_14.entry.js +41 -35
  207. package/dist/esm/post-collapsible_2.entry.js +6 -6
  208. package/dist/esm/post-components.js +3 -3
  209. package/dist/esm/post-date-picker.entry.js +427 -257
  210. package/dist/esm/post-footer.entry.js +6 -6
  211. package/dist/esm/post-linkarea.entry.js +3 -3
  212. package/dist/esm/post-listbox-option.entry.js +4 -4
  213. package/dist/esm/post-listbox.entry.js +3 -3
  214. package/dist/esm/post-number-input.entry.js +5 -4
  215. package/dist/esm/post-pagination.entry.js +5 -5
  216. package/dist/esm/post-popover-trigger.entry.js +5 -5
  217. package/dist/esm/post-popover.entry.js +11 -12
  218. package/dist/esm/post-progressbar.entry.js +4 -4
  219. package/dist/esm/post-rating.entry.js +6 -6
  220. package/dist/esm/post-side-navigation-trigger.entry.js +7 -7
  221. package/dist/esm/post-side-navigation.entry.js +18 -7
  222. package/dist/esm/post-stepper-item.entry.js +3 -3
  223. package/dist/esm/post-stepper.entry.js +7 -7
  224. package/dist/esm/post-tab-item.entry.js +15 -14
  225. package/dist/esm/post-tab-panel.entry.js +6 -6
  226. package/dist/esm/post-tabs.entry.js +196 -74
  227. package/dist/esm/post-tooltip-trigger.entry.js +7 -9
  228. package/dist/esm/post-tooltip.entry.js +9 -10
  229. package/dist/esm/{required-DhBxDSbP.js → required-DeOhRbtk.js} +1 -1
  230. package/dist/esm/{type-icZlikjf.js → type-S-4aPMGU.js} +1 -1
  231. package/dist/esm/{url-B_2x2YCy.js → url-C8KSrmWc.js} +1 -1
  232. package/dist/post-components/{p-aff9dd5e.entry.js → p-01b5539a.entry.js} +1 -1
  233. package/dist/post-components/{p-0a08ae23.entry.js → p-04e29502.entry.js} +1 -1
  234. package/dist/post-components/p-0b7f4169.entry.js +1 -0
  235. package/dist/post-components/p-13e1fdbd.entry.js +1 -0
  236. package/dist/post-components/{p-84c8d952.entry.js → p-1edcfc9e.entry.js} +1 -1
  237. package/dist/post-components/{p-15fa7e60.entry.js → p-21c83ccd.entry.js} +1 -1
  238. package/dist/post-components/{p-9ec32e7b.entry.js → p-261e2ffa.entry.js} +1 -1
  239. package/dist/post-components/{p-fac58cbd.entry.js → p-360d6bf1.entry.js} +1 -1
  240. package/dist/post-components/{p-D2ex14Ye.js → p-4-_BhJWV.js} +1 -1
  241. package/dist/post-components/{p-eca119d2.entry.js → p-44461143.entry.js} +1 -1
  242. package/dist/post-components/p-52e7344c.entry.js +1 -0
  243. package/dist/post-components/p-6d4be9dd.entry.js +1 -0
  244. package/dist/post-components/p-6dbe7870.entry.js +1 -0
  245. package/dist/post-components/{p-97c1f070.entry.js → p-751a949d.entry.js} +1 -1
  246. package/dist/post-components/{p-e54a6be0.entry.js → p-8e2427d4.entry.js} +1 -1
  247. package/dist/post-components/{p-3e83aa1f.entry.js → p-8fbbc68f.entry.js} +1 -1
  248. package/dist/post-components/{p-41b5dbfc.entry.js → p-91948813.entry.js} +1 -1
  249. package/dist/post-components/p-94064d19.entry.js +1 -0
  250. package/dist/post-components/{p-6cbb2e7f.entry.js → p-95ad4d06.entry.js} +1 -1
  251. package/dist/post-components/p-978e4664.entry.js +1 -0
  252. package/dist/post-components/p-B6uZASBE.js +1 -0
  253. package/dist/post-components/{p-CIbyqT6u.js → p-BDW1XHCO.js} +1 -1
  254. package/dist/post-components/p-CiOyV6Mo.js +1 -0
  255. package/dist/post-components/p-DE1aWdqx.js +2 -0
  256. package/dist/post-components/{p-8SvFxSp6.js → p-DMiERazc.js} +1 -1
  257. package/dist/post-components/{p-DH5JdN6V.js → p-NPUljV0P.js} +1 -1
  258. package/dist/post-components/p-SEWFpJgA.js +1 -0
  259. package/dist/post-components/{p-923439d1.entry.js → p-b7d6c951.entry.js} +1 -1
  260. package/dist/post-components/p-c152efb7.entry.js +1 -0
  261. package/dist/post-components/p-c9461efa.entry.js +1 -0
  262. package/dist/post-components/p-ddc585e6.entry.js +1 -0
  263. package/dist/post-components/{p-7ee4b829.entry.js → p-e5172886.entry.js} +1 -1
  264. package/dist/post-components/{p-9e240299.entry.js → p-e9484492.entry.js} +1 -1
  265. package/dist/post-components/p-ee1309c9.entry.js +1 -0
  266. package/dist/post-components/p-f1602e56.entry.js +1 -0
  267. package/dist/post-components/{p-5d20cbcb.entry.js → p-f1bf80d4.entry.js} +1 -1
  268. package/dist/post-components/p-fedcbf2d.entry.js +1 -0
  269. package/dist/post-components/post-components.css +2 -2
  270. package/dist/post-components/post-components.esm.js +1 -1
  271. package/dist/types/components/post-accordion-item/post-accordion-item.d.ts +0 -8
  272. package/dist/types/components/post-date-picker/accessibility-utils.d.ts +19 -0
  273. package/dist/types/components/post-date-picker/date-utils.d.ts +48 -0
  274. package/dist/types/components/post-date-picker/native-mask-element.d.ts +12 -0
  275. package/dist/types/components/post-date-picker/post-date-picker.d.ts +23 -62
  276. package/dist/types/components/post-header/post-header.d.ts +2 -1
  277. package/dist/types/components/post-language-menu/post-language-menu.d.ts +2 -1
  278. package/dist/types/components/post-menu/post-menu.d.ts +4 -4
  279. package/dist/types/components/post-popover/post-popover.d.ts +4 -5
  280. package/dist/types/components/post-popovercontainer/post-popovercontainer.d.ts +2 -2
  281. package/dist/types/components/post-side-navigation/post-side-navigation.d.ts +6 -0
  282. package/dist/types/components/post-side-navigation/side-navigation-styles.d.ts +2 -0
  283. package/dist/types/components/post-tab-item/post-tab-item.d.ts +8 -4
  284. package/dist/types/components/post-tab-panel/post-tab-panel.d.ts +1 -1
  285. package/dist/types/components/post-tabs/post-tabs.d.ts +37 -17
  286. package/dist/types/components/post-tooltip/post-tooltip.d.ts +4 -5
  287. package/dist/types/components.d.ts +90 -164
  288. package/dist/types/types/element-api.d.ts +3 -0
  289. package/hydrate/index.js +812 -596
  290. package/hydrate/index.mjs +812 -596
  291. package/package.json +11 -12
  292. package/dist/cjs/long-press-event-Dx21Ojod.js +0 -276
  293. package/dist/cjs/post-login-widget.cjs.entry.js +0 -92
  294. package/dist/collection/components/post-accordion-item/heading-levels.js +0 -1
  295. package/dist/collection/components/post-login-widget/post-login-widget.css +0 -1
  296. package/dist/collection/components/post-login-widget/post-login-widget.js +0 -218
  297. package/dist/collection/components/post-tab-item/post-tab-item.css +0 -1
  298. package/dist/components/long-press-event.js +0 -8
  299. package/dist/components/post-avatar2.js +0 -1
  300. package/dist/components/post-login-widget.d.ts +0 -11
  301. package/dist/components/post-login-widget.js +0 -1
  302. package/dist/components/react/p-BNgqqRsB.js +0 -8
  303. package/dist/components/react/p-C7aYEQh5.js +0 -1
  304. package/dist/components/react/p-CdhbouMD.js +0 -1
  305. package/dist/components/react/p-Ci08Eesw.js +0 -1
  306. package/dist/components/react/p-DWlDkwjY.js +0 -1
  307. package/dist/components/react/p-wqJxIo5L.js +0 -1
  308. package/dist/components/react/post-login-widget.d.ts +0 -11
  309. package/dist/components/react/post-login-widget.js +0 -1
  310. package/dist/esm/long-press-event-BNgqqRsB.js +0 -274
  311. package/dist/esm/package-CdhbouMD.js +0 -3
  312. package/dist/esm/post-login-widget.entry.js +0 -90
  313. package/dist/post-components/p-001f58d8.entry.js +0 -1
  314. package/dist/post-components/p-12c8b073.entry.js +0 -1
  315. package/dist/post-components/p-1839276a.entry.js +0 -1
  316. package/dist/post-components/p-28eeb5d8.entry.js +0 -1
  317. package/dist/post-components/p-6a1c4897.entry.js +0 -1
  318. package/dist/post-components/p-6d14f78a.entry.js +0 -1
  319. package/dist/post-components/p-6e8b6249.entry.js +0 -1
  320. package/dist/post-components/p-71918d59.entry.js +0 -1
  321. package/dist/post-components/p-8139b0cc.entry.js +0 -1
  322. package/dist/post-components/p-87ebb213.entry.js +0 -1
  323. package/dist/post-components/p-89da6378.entry.js +0 -1
  324. package/dist/post-components/p-8caaa149.entry.js +0 -1
  325. package/dist/post-components/p-BGeKgZqi.js +0 -2
  326. package/dist/post-components/p-BNgqqRsB.js +0 -8
  327. package/dist/post-components/p-CdhbouMD.js +0 -1
  328. package/dist/post-components/p-DiBqDD4N.js +0 -1
  329. package/dist/post-components/p-I6rSjhbA.js +0 -1
  330. package/dist/post-components/p-c905a97c.entry.js +0 -1
  331. package/dist/post-components/p-f9529d40.entry.js +0 -1
  332. package/dist/types/components/post-accordion-item/heading-levels.d.ts +0 -2
  333. package/dist/types/components/post-login-widget/post-login-widget.d.ts +0 -45
@@ -1 +0,0 @@
1
- .tab-title,.nav-item a{display:inline-block;position:relative;box-sizing:border-box;padding:1rem;transition:background-color 100ms;border-right:1px solid rgba(0,0,0,0);border-left:1px solid rgba(0,0,0,0);opacity:.7;color:#000;text-decoration:none;background-color:rgba(0,0,0,0);cursor:pointer}.tab-title:hover,.nav-item a:hover{opacity:1;background-color:rgba(0,0,0,.6);color:#fff}.tab-title:focus-visible,.nav-item a:focus-visible{outline:rgba(0,0,0,0);opacity:1;background-color:rgba(0,0,0,.6);color:#fff;box-shadow:none}.tab-title:focus-visible::after,.nav-item a:focus-visible::after{content:"";display:block;position:absolute;top:2px;right:1px;bottom:0;left:1px;box-shadow:0 0 0 1px #fff,0 0 0 2px #333}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .tab-title:hover,:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .tab-title:focus-visible,:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .nav-item a:hover,:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .nav-item a:focus-visible{background-color:rgba(255,255,255,.2)}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title,.nav-item a{opacity:1;border-left-color:Canvas;border-right-color:Canvas;color:LinkText}.tab-title:hover,.tab-title:focus,.tab-title:focus-within,.tab-title:focus-visible,.nav-item a:hover,.nav-item a:focus,.nav-item a:focus-within,.nav-item a:focus-visible{outline:var(--post-core-dimension-2) solid Highlight;outline-offset:calc(var(--post-core-dimension-4)*-1)}}.nav-item{display:inline-block;position:relative;box-sizing:border-box;cursor:default}.nav-item:focus,.nav-item:focus-visible{outline:none;box-shadow:none}.nav-item:focus::after,.nav-item:focus-visible::after{display:none}.nav-item a{color:inherit;text-decoration:none;display:block;width:100%;height:100%;box-sizing:border-box;position:relative;outline:none;cursor:pointer;border-radius:0}.nav-item a:focus{outline:none}.nav-item a:active{opacity:1;background-color:rgba(0,0,0,.6);color:#fff}.nav-item a:focus-visible{outline:none !important}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .nav-item a:hover{background-color:rgba(255,255,255,.2)}:where(.bg-dark,.bg-black,.bg-primary,.bg-secondary,.bg-success,.bg-error) .nav-item a:focus-visible{background-color:rgba(255,255,255,.2)}.tab-title.active,.nav-item.active a{z-index:1;border-right-color:#ccc;border-left-color:#ccc;opacity:1;background-color:#fff;color:#000;font-weight:700}.tab-title.active::before,.nav-item.active a::before{content:"";display:block;position:absolute;top:0;right:-1px;left:-1px;height:var(--post-core-dimension-4);background-color:#fc0}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title.active,.nav-item.active a{border-left-color:ButtonText;border-right-color:ButtonText;color:Highlight}.tab-title.active::before,.nav-item.active a::before{background-color:Highlight}}:host{display:block}.tab-title{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}@media(forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.tab-title{background-color:ButtonFace !important}.tab-title:hover{background-color:Highlight !important}}
@@ -1,8 +0,0 @@
1
- /*!
2
- * long-press-event - v@version@
3
- * Pure JavaScript long-press-event
4
- * https://github.com/john-doherty/long-press-event
5
- * @author John Doherty <www.johndoherty.info>
6
- * @license MIT
7
- */
8
- !function(e,n){var t=null,o="PointerEvent"in e||e.navigator&&"msPointerEnabled"in e.navigator,i="ontouchstart"in e||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0,u=o?"pointerdown":i?"touchstart":"mousedown",r=o?"pointerup":i?"touchend":"mouseup",a=o?"pointermove":i?"touchmove":"mousemove",c=o?"pointerleave":i?"touchleave":"mouseleave",l=0,f=0;function s(e){var t;m(),e=void 0!==(t=e).changedTouches?t.changedTouches[0]:t,this.dispatchEvent(new CustomEvent("long-press",{bubbles:!0,cancelable:!0,detail:{clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,pageX:e.pageX,pageY:e.pageY},clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY}))||n.addEventListener("click",(function e(t){n.removeEventListener("click",e,!0),function(e){e.stopImmediatePropagation(),e.preventDefault(),e.stopPropagation()}(t)}),!0)}function v(o){m();var i=o.target,u=parseInt(function(e){for(;e&&e!==n.documentElement;){var t=e.getAttribute("data-long-press-delay");if(t)return t;e=e.parentNode}return"1500"}(i),10);t=function(n,t){if(!(e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame&&e.mozCancelRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame))return e.setTimeout(n,t);var o=(new Date).getTime(),i={},u=function(){(new Date).getTime()-o>=t?n.call():i.value=requestAnimFrame(u)};return i.value=requestAnimFrame(u),i}(s.bind(i,o),u)}function m(){var n;(n=t)&&(e.cancelAnimationFrame?e.cancelAnimationFrame(n.value):e.webkitCancelAnimationFrame?e.webkitCancelAnimationFrame(n.value):e.webkitCancelRequestAnimationFrame?e.webkitCancelRequestAnimationFrame(n.value):e.mozCancelRequestAnimationFrame?e.mozCancelRequestAnimationFrame(n.value):e.oCancelRequestAnimationFrame?e.oCancelRequestAnimationFrame(n.value):e.msCancelRequestAnimationFrame?e.msCancelRequestAnimationFrame(n.value):clearTimeout(n)),t=null}"function"!=typeof e.CustomEvent&&(e.CustomEvent=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var o=n.createEvent("CustomEvent");return o.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),o},e.CustomEvent.prototype=e.Event.prototype),e.requestAnimFrame=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(n){e.setTimeout(n,1e3/60)},n.addEventListener(r,m,!0),n.addEventListener(c,m,!0),n.addEventListener(a,(function(e){var n=Math.abs(l-e.clientX),t=Math.abs(f-e.clientY);(n>=10||t>=10)&&m()}),!0),n.addEventListener("wheel",m,!0),n.addEventListener("scroll",m,!0),n.addEventListener("contextmenu",(function(e){i?e.preventDefault():m()}),!0),n.addEventListener(u,(function(e){l=e.clientX,f=e.clientY,v(e)}),!0)}(window,document);
@@ -1 +0,0 @@
1
- import{proxyCustomElement as t,HTMLElement as e,h as i,Host as a,transformTag as s}from"@stencil/core/internal/client";import"./breakpoints.js";import{v as r}from"./package.js";import{P as o}from"./pattern.js";import{R as n}from"./required.js";import{T as c}from"./type.js";var l=function(t,e,i,a){var s,r=arguments.length,o=r<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,a);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(o=(r<3?s(o):r>3?s(e,i,o):s(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o};const d=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;var h;!function(t){t.Slotted="slotted",t.Image="image",t.Initials="initials",t[t.Null=null]="Null"}(h||(h={}));const p=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.avatarType=null,this.imageUrl="",this.imageAlt="",this.initials="",this.storageKey=""}updateEmail(){this.getAvatarImage()}async getAvatarImage(){let t=!1;this.slottedImage=this.host.querySelector("img");const e=this.slottedImage?.getAttribute("src");e?await this.getImageByProp(e,this.fetchSlottedImage.bind(this))?this.slottedImage.style.display="block":(this.slottedImage.style.display="none",this.avatarType=h.Initials):(this.email?.match(d)&&(t=await this.getImageByProp(this.email,this.fetchImageByEmail.bind(this))),t||(this.avatarType=h.Initials))}async getImageByProp(t,e){if(!t)return!1;let i;try{i=await e(t)}catch(t){return console.info("Loading avatar image failed.",t),!1}return!!i?.ok&&(this.imageUrl=i.url,this.imageAlt=`${this.firstname} ${this.lastname} avatar`,this.avatarType=h.Image,!0)}async fetchImageByEmail(){const t=await async function(t){return await crypto.subtle.digest("SHA-256",(new TextEncoder).encode(t)).then((t=>Array.from(new Uint8Array(t)).map((t=>t.toString(16).padStart(2,"0"))).join("")))}(this.email),e="https://www.gravatar.com/avatar/{email}?s=80&d=404&r=g".replace("{email}",t);return await fetch(e)}async fetchSlottedImage(t){return await fetch(t,{method:"HEAD"})}slotChanged(){const t=this.host.shadowRoot.querySelector("slot");(t?.assignedNodes({flatten:!0})||[]).forEach((t=>{t.nodeType===Node.ELEMENT_NODE&&"IMG"===t.tagName&&this.observeImageSrcChanges(t)})),this.getAvatarImage()}observeImageSrcChanges(t){this.slottedImageObserver&&this.slottedImageObserver.disconnect(),this.slottedImageObserver=new MutationObserver((t=>{t.forEach((t=>{"attributes"===t.type&&"src"===t.attributeName&&this.getAvatarImage()}))})),this.slottedImageObserver.observe(t,{attributes:!0,attributeFilter:["src"]})}connectedCallback(){this.avatarType=h.Initials,this.getAvatarImage()}render(){const t=[this.firstname,this.lastname].filter(Boolean).map((t=>t.trim())),e=t.map((t=>t.charAt(0))).join("").trim(),s=t.join(" ");return i(a,{key:"85af49f5beca48bec805f9c126e635b8b1042de3","data-version":r},i("span",{key:"950d20eeb38eae131bd2e459741ab03f7208ec37",class:"slotted"===this.avatarType?"":"d-none"},i("slot",{key:"5404e8d04de78e9c95d7b7e0b1dbb42fb6afc3e6",onSlotchange:this.slotChanged.bind(this)})),"image"===this.avatarType&&i("img",{key:"0d9c7b0f74e99072544eaa94b408d8e70f5cef57",src:this.imageUrl,alt:this.imageAlt}),"initials"===this.avatarType&&i("span",{key:"e7260e54f5510707b19016badad66920df6b38f0",class:"initials"},e,i("span",{key:"647fe23a98a1338936ce701024bae944d6cce7ae"},this.description??s)))}get host(){return this}static get watchers(){return{email:[{updateEmail:0}]}}static get style(){return':host{--post-avatar-bg:var(--post-scheme-color-interactive-primary-enabled-bg2);--post-avatar-fg:var(--post-scheme-color-interactive-primary-enabled-fg3);display:inline-flex;position:relative;width:var(--post-device-sizing-interactive-icon-size3);height:var(--post-device-sizing-interactive-icon-size3);background-color:var(--post-scheme-color-interactive-primary-enabled-stroke3);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-primary-enabled-stroke3);border-radius:var(--post-device-border-radius-round);font-size:var(--post-device-font-size-8);vertical-align:top;line-height:1}:host::after{display:block;content:"";position:absolute;inset:0;z-index:1;border-radius:inherit}*,*::before,*::after{box-sizing:border-box}slot,img,::slotted(img){display:block;width:100%;height:100%}img,::slotted(img){border-radius:var(--post-device-border-radius-round)}::slotted(:not(img)){display:none !important}.initials{display:flex;justify-content:center;align-items:center;position:relative;width:100%;height:100%;background-color:var(--post-avatar-bg);border-radius:var(--post-device-border-radius-round);color:var(--post-avatar-fg);text-transform:uppercase;font-weight:400;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms}.initials span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}'}},[257,"post-avatar",{firstname:[513],lastname:[1],email:[1],description:[1],slottedImage:[32],avatarType:[32],imageUrl:[32],imageAlt:[32],initials:[32],storageKey:[32]},void 0,{email:[{updateEmail:0}]}]);function m(){"undefined"!=typeof customElements&&["post-avatar"].forEach((t=>{"post-avatar"===t&&(customElements.get(s(t))||customElements.define(s(t),p))}))}l([n(),c("string")],p.prototype,"firstname",void 0),l([c("string")],p.prototype,"lastname",void 0),l([o(d)],p.prototype,"email",void 0),l([c("string")],p.prototype,"description",void 0);export{p as P,m as d}
@@ -1,11 +0,0 @@
1
- import type { Components, JSX } from "../types/components";
2
-
3
- interface PostLoginWidget extends Components.PostLoginWidget, HTMLElement {}
4
- export const PostLoginWidget: {
5
- prototype: PostLoginWidget;
6
- new (): PostLoginWidget;
7
- };
8
- /**
9
- * Used to define this component and all nested components recursively.
10
- */
11
- export const defineCustomElement: () => void;
@@ -1 +0,0 @@
1
- import{proxyCustomElement as t,HTMLElement as e,createEvent as o,Build as s,h as i,Host as r,transformTag as n}from"@stencil/core/internal/client";import"./breakpoints.js";import{v as a}from"./package.js";import{d as c}from"./post-avatar2.js";import{d as u}from"./post-menu2.js";import{d}from"./post-menu-trigger2.js";import{d as h}from"./post-popovercontainer2.js";import{R as p}from"./required.js";import{T as l}from"./type.js";var g=function(t,e,o,s){var i,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,s);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(n=(r<3?i(n):r>3?i(e,o,n):i(e,o))||n);return r>3&&n&&Object.defineProperty(e,o,n),n};const m=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postChange=o(this,"postChange",7),this.authenticated=null,this.user=null}async componentWillLoad(){s.isBrowser&&await this.fetchAuthState()}async isAuthenticated(){return this.authenticated}async refresh(){await this.fetchAuthState()}async fetchAuthState(){try{const t=await fetch("https://n.account.post.ch/v1/session/subscribe",{credentials:"include"});if(!t.ok)return void this.setAuthState(!1);const e=await t.json(),o=void 0!==e?.data?.email;this.user=e?.data,this.setAuthState(o)}catch{this.setAuthState(!1)}}setAuthState(t){this.authenticated!==t&&(this.authenticated=t,this.postChange.emit({authenticated:t}))}render(){return i(r,{key:"74d00f53d1de12c739242183cb4551fe5127eb29","data-version":a},!0===this.authenticated?i("div",null,i("post-menu-trigger",{for:"user-menu-default"},i("button",{class:"btn btn-link",type:"button"},i("post-avatar",{firstname:this.user.name,lastname:this.user.surname,description:this.textCurrentUser.replace("{user}",`${this.user.name} ${this.user.surname}`)}),i("span",{class:"visually-hidden"},this.textUserMenuTrigger))),i("post-menu",{label:this.textUserMenu,id:"user-menu-default"},i("div",{slot:"header"},i("post-avatar",{firstname:this.user.name,lastname:this.user.surname,email:this.user.email,"aria-hidden":"true"}),this.user.name," ",this.user.surname),i("slot",{name:"user-links"}))):i("div",null,i("slot",{name:"login-link"})))}get host(){return this}static get style(){return":host post-menu-trigger button{display:inline-flex;position:relative;align-items:center;justify-content:center;max-width:100%;overflow:hidden;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;border-width:var(--post-device-border-width-default);border-style:solid;border-color:rgba(0,0,0,0);border-radius:var(--post-device-border-radius-round);background-color:rgba(0,0,0,0);box-shadow:none;font-family:inherit;font-size:var(--post-device-font-size-6);font-weight:var(--post-device-font-weight-bold);text-decoration:none;white-space:nowrap;cursor:pointer;min-height:var(--post-device-sizing-interactive-button-height-1);gap:var(--post-device-spacing-gap-inline-10);padding:0 var(--post-device-spacing-padding-inline-6)}:host post-menu-trigger button:not(:disabled):hover{text-decoration:none}:host post-menu-trigger button:disabled{border-style:var(--post-core-border-style-dash);cursor:unset}:host post-menu-trigger button{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}:host post-menu-trigger button: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 post-menu-trigger button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){:host post-menu-trigger button: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 post-menu-trigger button:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host post-menu-trigger button:is(a){color:LinkText;border:unset}:host post-menu-trigger button:is(button){background-color:ButtonFace !important;border:1px solid ButtonBorder !important}:host post-menu-trigger button:not(:disabled,.disabled):is(button):hover{background-color:Highlight !important}:host post-menu-trigger button:not(:disabled,.disabled):is(button):hover>post-icon{color:HighlightText !important}}:host post-menu-trigger button>post-icon{width:var(--post-device-sizing-interactive-button-icon-4);height:var(--post-device-sizing-interactive-button-icon-4)}:host post-menu-trigger button{border-radius:var(--post-device-border-radius-round) !important;border:0 none;min-height:0;padding:0}:host post-menu-trigger .visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}"}},[257,"post-login-widget",{textCurrentUser:[513,"text-current-user"],textUserMenu:[513,"text-user-menu"],textUserMenuTrigger:[513,"text-user-menu-trigger"],authenticated:[32],user:[32],isAuthenticated:[64],refresh:[64]}]);g([p(),l("string")],m.prototype,"textCurrentUser",void 0),g([p(),l("string")],m.prototype,"textUserMenu",void 0),g([p(),l("string")],m.prototype,"textUserMenuTrigger",void 0);const b=m,v=function(){"undefined"!=typeof customElements&&["post-login-widget","post-avatar","post-menu","post-menu-trigger","post-popovercontainer"].forEach((t=>{switch(t){case"post-login-widget":customElements.get(n(t))||customElements.define(n(t),m);break;case"post-avatar":customElements.get(n(t))||c();break;case"post-menu":customElements.get(n(t))||u();break;case"post-menu-trigger":customElements.get(n(t))||d();break;case"post-popovercontainer":customElements.get(n(t))||h()}}))};export{b as PostLoginWidget,v as defineCustomElement}
@@ -1,8 +0,0 @@
1
- /*!
2
- * long-press-event - v@version@
3
- * Pure JavaScript long-press-event
4
- * https://github.com/john-doherty/long-press-event
5
- * @author John Doherty <www.johndoherty.info>
6
- * @license MIT
7
- */
8
- !function(e,n){var t=null,o="PointerEvent"in e||e.navigator&&"msPointerEnabled"in e.navigator,i="ontouchstart"in e||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0,u=o?"pointerdown":i?"touchstart":"mousedown",r=o?"pointerup":i?"touchend":"mouseup",a=o?"pointermove":i?"touchmove":"mousemove",c=o?"pointerleave":i?"touchleave":"mouseleave",l=0,f=0;function s(e){var t;m(),e=void 0!==(t=e).changedTouches?t.changedTouches[0]:t,this.dispatchEvent(new CustomEvent("long-press",{bubbles:!0,cancelable:!0,detail:{clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,pageX:e.pageX,pageY:e.pageY},clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY}))||n.addEventListener("click",(function e(t){n.removeEventListener("click",e,!0),function(e){e.stopImmediatePropagation(),e.preventDefault(),e.stopPropagation()}(t)}),!0)}function v(o){m();var i=o.target,u=parseInt(function(e){for(;e&&e!==n.documentElement;){var t=e.getAttribute("data-long-press-delay");if(t)return t;e=e.parentNode}return"1500"}(i),10);t=function(n,t){if(!(e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame&&e.mozCancelRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame))return e.setTimeout(n,t);var o=(new Date).getTime(),i={},u=function(){(new Date).getTime()-o>=t?n.call():i.value=requestAnimFrame(u)};return i.value=requestAnimFrame(u),i}(s.bind(i,o),u)}function m(){var n;(n=t)&&(e.cancelAnimationFrame?e.cancelAnimationFrame(n.value):e.webkitCancelAnimationFrame?e.webkitCancelAnimationFrame(n.value):e.webkitCancelRequestAnimationFrame?e.webkitCancelRequestAnimationFrame(n.value):e.mozCancelRequestAnimationFrame?e.mozCancelRequestAnimationFrame(n.value):e.oCancelRequestAnimationFrame?e.oCancelRequestAnimationFrame(n.value):e.msCancelRequestAnimationFrame?e.msCancelRequestAnimationFrame(n.value):clearTimeout(n)),t=null}"function"!=typeof e.CustomEvent&&(e.CustomEvent=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var o=n.createEvent("CustomEvent");return o.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),o},e.CustomEvent.prototype=e.Event.prototype),e.requestAnimFrame=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(n){e.setTimeout(n,1e3/60)},n.addEventListener(r,m,!0),n.addEventListener(c,m,!0),n.addEventListener(a,(function(e){var n=Math.abs(l-e.clientX),t=Math.abs(f-e.clientY);(n>=10||t>=10)&&m()}),!0),n.addEventListener("wheel",m,!0),n.addEventListener("scroll",m,!0),n.addEventListener("contextmenu",(function(e){i?e.preventDefault():m()}),!0),n.addEventListener(u,(function(e){l=e.clientX,f=e.clientY,v(e)}),!0)}(window,document);
@@ -1 +0,0 @@
1
- import{p as t,H as e,h as i,a,t as s}from"./index.js";import"./p-Bji_4dfL.js";import{v as r}from"./p-CdhbouMD.js";import{P as o}from"./p-BXqGI600.js";import{R as n}from"./p-4wtxqxXu.js";import{T as c}from"./p-B_WnO-QF.js";var d=function(t,e,i,a){var s,r=arguments.length,o=r<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,a);else for(var n=t.length-1;n>=0;n--)(s=t[n])&&(o=(r<3?s(o):r>3?s(e,i,o):s(e,i))||o);return r>3&&o&&Object.defineProperty(e,i,o),o};const l=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;var h;!function(t){t.Slotted="slotted",t.Image="image",t.Initials="initials",t[t.Null=null]="Null"}(h||(h={}));const p=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.avatarType=null,this.imageUrl="",this.imageAlt="",this.initials="",this.storageKey=""}updateEmail(){this.getAvatarImage()}async getAvatarImage(){let t=!1;this.slottedImage=this.host.querySelector("img");const e=this.slottedImage?.getAttribute("src");e?await this.getImageByProp(e,this.fetchSlottedImage.bind(this))?this.slottedImage.style.display="block":(this.slottedImage.style.display="none",this.avatarType=h.Initials):(this.email?.match(l)&&(t=await this.getImageByProp(this.email,this.fetchImageByEmail.bind(this))),t||(this.avatarType=h.Initials))}async getImageByProp(t,e){if(!t)return!1;let i;try{i=await e(t)}catch(t){return console.info("Loading avatar image failed.",t),!1}return!!i?.ok&&(this.imageUrl=i.url,this.imageAlt=`${this.firstname} ${this.lastname} avatar`,this.avatarType=h.Image,!0)}async fetchImageByEmail(){const t=await async function(t){return await crypto.subtle.digest("SHA-256",(new TextEncoder).encode(t)).then((t=>Array.from(new Uint8Array(t)).map((t=>t.toString(16).padStart(2,"0"))).join("")))}(this.email),e="https://www.gravatar.com/avatar/{email}?s=80&d=404&r=g".replace("{email}",t);return await fetch(e)}async fetchSlottedImage(t){return await fetch(t,{method:"HEAD"})}slotChanged(){const t=this.host.shadowRoot.querySelector("slot");(t?.assignedNodes({flatten:!0})||[]).forEach((t=>{t.nodeType===Node.ELEMENT_NODE&&"IMG"===t.tagName&&this.observeImageSrcChanges(t)})),this.getAvatarImage()}observeImageSrcChanges(t){this.slottedImageObserver&&this.slottedImageObserver.disconnect(),this.slottedImageObserver=new MutationObserver((t=>{t.forEach((t=>{"attributes"===t.type&&"src"===t.attributeName&&this.getAvatarImage()}))})),this.slottedImageObserver.observe(t,{attributes:!0,attributeFilter:["src"]})}connectedCallback(){this.avatarType=h.Initials,this.getAvatarImage()}render(){const t=[this.firstname,this.lastname].filter(Boolean).map((t=>t.trim())),e=t.map((t=>t.charAt(0))).join("").trim(),s=t.join(" ");return i(a,{key:"85af49f5beca48bec805f9c126e635b8b1042de3","data-version":r},i("span",{key:"950d20eeb38eae131bd2e459741ab03f7208ec37",class:"slotted"===this.avatarType?"":"d-none"},i("slot",{key:"5404e8d04de78e9c95d7b7e0b1dbb42fb6afc3e6",onSlotchange:this.slotChanged.bind(this)})),"image"===this.avatarType&&i("img",{key:"0d9c7b0f74e99072544eaa94b408d8e70f5cef57",src:this.imageUrl,alt:this.imageAlt}),"initials"===this.avatarType&&i("span",{key:"e7260e54f5510707b19016badad66920df6b38f0",class:"initials"},e,i("span",{key:"647fe23a98a1338936ce701024bae944d6cce7ae"},this.description??s)))}get host(){return this}static get watchers(){return{email:[{updateEmail:0}]}}static get style(){return':host{--post-avatar-bg:var(--post-scheme-color-interactive-primary-enabled-bg2);--post-avatar-fg:var(--post-scheme-color-interactive-primary-enabled-fg3);display:inline-flex;position:relative;width:var(--post-device-sizing-interactive-icon-size3);height:var(--post-device-sizing-interactive-icon-size3);background-color:var(--post-scheme-color-interactive-primary-enabled-stroke3);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-primary-enabled-stroke3);border-radius:var(--post-device-border-radius-round);font-size:var(--post-device-font-size-8);vertical-align:top;line-height:1}:host::after{display:block;content:"";position:absolute;inset:0;z-index:1;border-radius:inherit}*,*::before,*::after{box-sizing:border-box}slot,img,::slotted(img){display:block;width:100%;height:100%}img,::slotted(img){border-radius:var(--post-device-border-radius-round)}::slotted(:not(img)){display:none !important}.initials{display:flex;justify-content:center;align-items:center;position:relative;width:100%;height:100%;background-color:var(--post-avatar-bg);border-radius:var(--post-device-border-radius-round);color:var(--post-avatar-fg);text-transform:uppercase;font-weight:400;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms}.initials span{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}'}},[257,"post-avatar",{firstname:[513],lastname:[1],email:[1],description:[1],slottedImage:[32],avatarType:[32],imageUrl:[32],imageAlt:[32],initials:[32],storageKey:[32]},void 0,{email:[{updateEmail:0}]}]);function m(){"undefined"!=typeof customElements&&["post-avatar"].forEach((t=>{"post-avatar"===t&&(customElements.get(s(t))||customElements.define(s(t),p))}))}d([n(),c("string")],p.prototype,"firstname",void 0),d([c("string")],p.prototype,"lastname",void 0),d([o(l)],p.prototype,"email",void 0),d([c("string")],p.prototype,"description",void 0),m();export{p as P,m as d}
@@ -1 +0,0 @@
1
- const t="10.0.0-next.75";export{t as v}
@@ -1 +0,0 @@
1
- import{p as t,H as e,c as n,h as o,a as r,t as i}from"./index.js";import"./p-Bji_4dfL.js";import{v as s}from"./p-CdhbouMD.js";import{O as a}from"./p-BaB8wJvk.js";import{T as c}from"./p-B_WnO-QF.js";const l=["top","right","bottom","left","top-start","top-end","right-start","right-end","bottom-start","bottom-end","left-start","left-end"],p=Math.min,f=Math.max,u=Math.round,h=Math.floor,d=t=>({x:t,y:t}),m={left:"right",right:"left",bottom:"top",top:"bottom"};function v(t,e,n){return f(t,p(e,n))}function g(t,e){return"function"==typeof t?t(e):t}function w(t){return t.split("-")[0]}function y(t){return t.split("-")[1]}function x(t){return"x"===t?"y":"x"}function b(t){return"y"===t?"height":"width"}function S(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function k(t){return x(S(t))}function E(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const T=["left","right"],M=["right","left"],A=["top","bottom"],O=["bottom","top"];function L(t){const e=w(t);return m[e]+t.slice(e.length)}function H(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function $(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=S(e),s=k(e),a=b(s),c=w(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}}switch(y(e)){case"start":h[s]-=u*(n&&l?-1:1);break;case"end":h[s]+=u*(n&&l?-1:1)}return 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}=g(e,t),d=H(h),m=a[u?"floating"===f?"reference":"floating":f],v=$(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})),w="floating"===f?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),x=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},b=$(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:y,strategy:c}):w);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 R(t){const e=p(...t.map((t=>t.left))),n=p(...t.map((t=>t.top)));return{x:e,y:n,width:f(...t.map((t=>t.right)))-e,height:f(...t.map((t=>t.bottom)))-n}}const F=new Set(["left","top"]);function z(){return"undefined"!=typeof window}function C(t){return B(t)?(t.nodeName||"").toLowerCase():"#document"}function P(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function W(t){var e;return null==(e=(B(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function B(t){return!!z()&&(t instanceof Node||t instanceof P(t).Node)}function q(t){return!!z()&&(t instanceof Element||t instanceof P(t).Element)}function I(t){return!!z()&&(t instanceof HTMLElement||t instanceof P(t).HTMLElement)}function N(t){return!(!z()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof P(t).ShadowRoot)}function G(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=tt(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&"inline"!==r&&"contents"!==r}function _(t){return/^(table|td|th)$/.test(C(t))}function J(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/,V=/paint|layout|strict|content/,X=t=>!!t&&"none"!==t;let Y;function K(t){const e=q(t)?tt(t):t;return X(e.transform)||X(e.translate)||X(e.scale)||X(e.rotate)||X(e.perspective)||!U()&&(X(e.backdropFilter)||X(e.filter))||Q.test(e.willChange||"")||V.test(e.contain||"")}function U(){return null==Y&&(Y="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Y}function Z(t){return/^(html|body|#document)$/.test(C(t))}function tt(t){return P(t).getComputedStyle(t)}function et(t){return q(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function nt(t){if("html"===C(t))return t;const e=t.assignedSlot||t.parentNode||N(t)&&t.host||W(t);return N(e)?e.host:e}function ot(t){const e=nt(t);return Z(e)?t.ownerDocument?t.ownerDocument.body:t.body:I(e)&&G(e)?e:ot(e)}function rt(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=!0);const r=ot(t),i=r===(null==(o=t.ownerDocument)?void 0:o.body),s=P(r);if(i){const t=it(s);return e.concat(s,s.visualViewport||[],G(r)?r:[],t&&n?rt(t):[])}return e.concat(r,rt(r,[],n))}function it(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function st(t){const e=tt(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=I(t),i=r?t.offsetWidth:n,s=r?t.offsetHeight:o,a=u(n)!==i||u(o)!==s;return a&&(n=i,o=s),{width:n,height:o,$:a}}function at(t){return q(t)?t:t.contextElement}function ct(t){const e=at(t);if(!I(e))return d(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=st(e);let s=(i?u(n.width):n.width)/o,a=(i?u(n.height):n.height)/r;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const lt=d(0);function pt(t){const e=P(t);return U()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:lt}function ft(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const r=t.getBoundingClientRect(),i=at(t);let s=d(1);e&&(o?q(o)&&(s=ct(o)):s=ct(t));const a=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==P(t))&&e}(i,n,o)?pt(i):d(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){const t=P(i),e=o&&q(o)?P(o):o;let n=t,r=it(n);for(;r&&o&&e!==n;){const t=ct(r),e=r.getBoundingClientRect(),o=tt(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=P(r),r=it(n)}}return $({width:p,height:f,x:c,y:l})}function ut(t,e){const n=et(t).scrollLeft;return e?e.left+n:ft(W(t)).left+n}function ht(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-ut(t,n),y:n.top+e.scrollTop}}function dt(t,e,n){let o;if("viewport"===e)o=function(t,e){const n=P(t),o=W(t),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,a=0,c=0;if(r){i=r.width,s=r.height;const t=U();(!t||t&&"fixed"===e)&&(a=r.offsetLeft,c=r.offsetTop)}const l=ut(o);if(l<=0){const t=o.ownerDocument,e=t.body,n=getComputedStyle(e),r="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(o.clientWidth-e.clientWidth-r);s<=25&&(i-=s)}else l<=25&&(i+=l);return{width:i,height:s,x:a,y:c}}(t,n);else if("document"===e)o=function(t){const e=W(t),n=et(t),o=t.ownerDocument.body,r=f(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=f(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+ut(t);const a=-n.scrollTop;return"rtl"===tt(o).direction&&(s+=f(e.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:a}}(W(t));else if(q(e))o=function(t,e){const n=ft(t,!0,"fixed"===e),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=I(t)?ct(t):d(1);return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:r*i.x,y:o*i.y}}(e,n);else{const n=pt(t);o={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return $(o)}function mt(t,e){const n=nt(t);return!(n===e||!q(n)||Z(n))&&("fixed"===tt(n).position||mt(n,e))}function vt(t,e,n){const o=I(e),r=W(e),i="fixed"===n,s=ft(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const c=d(0);function l(){c.x=ut(r)}if(o||!o&&!i)if(("body"!==C(e)||G(r))&&(a=et(e)),o){const t=ft(e,!0,i,e);c.x=t.x+e.clientLeft,c.y=t.y+e.clientTop}else r&&l();i&&!o&&r&&l();const p=!r||o||i?d(0):ht(r,a);return{x:s.left+a.scrollLeft-c.x-p.x,y:s.top+a.scrollTop-c.y-p.y,width:s.width,height:s.height}}function gt(t){return"static"===tt(t).position}function wt(t,e){if(!I(t)||"fixed"===tt(t).position)return null;if(e)return e(t);let n=t.offsetParent;return W(t)===n&&(n=n.ownerDocument.body),n}function yt(t,e){const n=P(t);if(J(t))return n;if(!I(t)){let e=nt(t);for(;e&&!Z(e);){if(q(e)&&!gt(e))return e;e=nt(e)}return n}let o=wt(t,e);for(;o&&_(o)&&gt(o);)o=wt(o,e);return o&&Z(o)&&gt(o)&&!K(o)?n:o||function(t){let e=nt(t);for(;I(e)&&!Z(e);){if(K(e))return e;if(J(e))return null;e=nt(e)}return null}(t)||n}const xt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i="fixed"===r,s=W(o),a=!!e&&J(e.floating);if(o===s||a&&i)return n;let c={scrollLeft:0,scrollTop:0},l=d(1);const p=d(0),f=I(o);if((f||!f&&!i)&&(("body"!==C(o)||G(s))&&(c=et(o)),f)){const t=ft(o);l=ct(o),p.x=t.x+o.clientLeft,p.y=t.y+o.clientTop}const u=!s||f||i?d(0):ht(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:W,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=rt(t,[],!1).filter((t=>q(t)&&"body"!==C(t))),r=null;const i="fixed"===tt(t).position;let s=i?nt(t):t;for(;q(s)&&!Z(s);){const e=tt(s),n=K(s);n||"fixed"!==e.position||(r=null),(i?!n&&!r:!n&&"static"===e.position&&r&&("absolute"===r.position||"fixed"===r.position)||G(s)&&!n&&mt(t,s))?o=o.filter((t=>t!==s)):r=e,s=nt(s)}return e.set(t,o),o}(e,this._c):[].concat(n),o],s=dt(e,i[0],r);let a=s.top,c=s.right,l=s.bottom,u=s.left;for(let t=1;t<i.length;t++){const n=dt(e,i[t],r);a=f(n.top,a),c=p(n.right,c),l=p(n.bottom,l),u=f(n.left,u)}return{width:c-u,height:l-a,x:u,y:a}},getOffsetParent:yt,getElementRects:async function(t){const e=this.getOffsetParent||yt,n=this.getDimensions,o=await n(t.floating);return{reference:vt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=st(t);return{width:e,height:n}},getScale:ct,isElement:q,isRTL:function(t){return"rtl"===tt(t).direction}};function bt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}const St=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=w(n),a=y(n),c="y"===S(n),l=F.has(s)?-1:1,p=i&&c?-1:1,f=g(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}}}}},kt=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}=g(t,e);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const x=w(r),H=S(a),$=w(a)===a,D=await(null==c.isRTL?void 0:c.isRTL(l.floating)),j=u||($||!m?[L(a)]:function(t){const e=L(t);return[E(t),e,E(e)]}(a)),R="none"!==d;!u&&R&&j.push(...function(t,e,n,o){const r=y(t);let i=function(t,e,n){switch(t){case"top":case"bottom":return n?e?M:T:e?T:M;case"left":case"right":return e?A:O;default:return[]}}(w(t),"start"===n,o);return r&&(i=i.map((t=>t+"-"+r)),e&&(i=i.concat(i.map(E)))),i}(a,m,d,D));const F=[a,...j],z=await c.detectOverflow(e,v),C=[];let P=(null==(o=i.flip)?void 0:o.overflows)||[];if(p&&C.push(z[x]),f){const t=function(t,e,n){void 0===n&&(n=!1);const o=y(t),r=k(t),i=b(r);let s="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=L(s)),[s,L(s)]}(r,s,D);C.push(z[t[0]],z[t[1]])}if(P=[...P,{placement:r,overflows:C}],!C.every((t=>t<=0))){var W,B;const t=((null==(W=i.flip)?void 0:W.index)||0)+1,e=F[t];if(e&&("alignment"!==f||H===S(e)||P.every((t=>S(t.placement)!==H||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=S(t.placement);return e===H||"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{}}}},Et=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:r,rects:i,platform:s,elements:a}=e,{apply:c=()=>{},...l}=g(t,e),u=await s.detectOverflow(e,l),h=w(r),d=y(r),m="y"===S(r),{width:v,height:x}=i.floating;let b,k;"top"===h||"bottom"===h?(b=h,k=d===(await(null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(k=h,b="end"===d?"top":"bottom");const E=x-u.top-u.bottom,T=v-u.left-u.right;let M=p(x-u[b],E),A=p(v-u[k],T);if(null!=(n=e.middlewareData.shift)&&n.enabled.x&&(A=T),null!=(o=e.middlewareData.shift)&&o.enabled.y&&(M=E),!e.middlewareData.shift&&!d){const t=f(u.left,0),e=f(u.right,0),n=f(u.top,0),o=f(u.bottom,0);m?A=v-2*(0!==t||0!==e?t+e:f(u.left,u.right)):M=x-2*(0!==n||0!==o?n+o:f(u.top,u.bottom))}await c({...e,availableWidth:A,availableHeight:M});const O=await s.getDimensions(a.floating);return v!==O.width||x!==O.height?{reset:{rects:!0}}:{}}}},Tt=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}=g(t,e),u=Array.from(await(null==i.getClientRects?void 0:i.getClientRects(o.reference))||[]),h=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(t))))}(u),d=$(R(u)),m=H(a),v=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===h.length&&h[0].left>h[1].right&&null!=c&&null!=l)return h.find((t=>c>t.left-m.left&&c<t.right+m.right&&l>t.top-m.top&&l<t.bottom+m.bottom))||d;if(h.length>=2){if("y"===S(n)){const t=h[0],e=h[h.length-1],o="top"===w(n),r=t.top,i=e.bottom,s=o?t.left:e.left,a=o?t.right:e.right;return{top:r,bottom:i,left:s,right:a,width:a-s,height:i-r,x:s,y:r}}const t="left"===w(n),e=f(...h.map((t=>t.right))),o=p(...h.map((t=>t.left))),r=h.filter((n=>t?n.left===o:n.right===e)),i=r[0].top,s=r[r.length-1].bottom;return{top:i,bottom:s,left:o,right:e,width:e-o,height:s-i,x:o,y: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}}:{}}}};var Mt=class extends Event{oldState;newState;constructor(t,{oldState:e="",newState:n="",...o}={}){super(t,o),this.oldState=String(e||""),this.newState=String(n||"")}},At=new WeakMap;function Ot(t,e,n){At.set(t,setTimeout((()=>{At.has(t)&&t.dispatchEvent(new Mt("toggle",{cancelable:!1,oldState:e,newState:n}))}),0))}var Lt=globalThis.ShadowRoot||function(){},Ht=globalThis.HTMLDialogElement||function(){},$t=new WeakMap,Dt=new WeakMap,jt=new WeakMap,Rt=new WeakMap;function Ft(t){return Rt.get(t)||"hidden"}var zt=new WeakMap;function Ct(t){return[...t].pop()}function Pt(t,e){return!("auto"!==t.popover&&"manual"!==t.popover&&"hint"!==t.popover||!t.isConnected||e&&"showing"!==Ft(t)||!e&&"hidden"!==Ft(t)||t instanceof Ht&&t.hasAttribute("open")||document.fullscreenElement===t)}function Wt(t){if(!t)return 0;const e=Dt.get(document)||new Set,n=jt.get(document)||new Set;return n.has(t)?[...n].indexOf(t)+e.size+1:e.has(t)?[...e].indexOf(t)+1:0}function Bt(t){let e;const n=jt.get(t)||new Set,o=Dt.get(t)||new Set,r=n.size>0?n:o.size>0?o:null;return r?(e=Ct(r),e.isConnected?e:(r.delete(e),Bt(t))):null}function qt(t){for(const e of t||[]){if(e.isConnected)return e;t.delete(e)}return null}function It(t){return"function"==typeof t.getRootNode?t.getRootNode():t.parentNode?It(t.parentNode):t}function Nt(t){for(;t;){if(t instanceof HTMLElement&&"auto"===t.popover&&"showing"===Rt.get(t))return t;if((t=t instanceof Element&&t.assignedSlot||t.parentElement||It(t))instanceof Lt&&(t=t.host),t instanceof Document)return}}function Gt(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=Nt(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||It(t)),r}function _t(t){return!(t.hidden||t instanceof Lt||(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 Jt=new WeakMap;function Qt(t){if(!Pt(t,!1))return;const e=t.ownerDocument;if(!t.dispatchEvent(new Mt("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"})))return;if(!Pt(t,!1))return;let n=!1;const o=t.popover;let r=null;const i=Gt(t,Dt.get(e)||new Set),s=Gt(t,jt.get(e)||new Set);if("auto"===o&&(Xt(jt.get(e)||new Set,n,!0),Kt(i||e,n,!0),r="auto"),"hint"===o&&(s?(Kt(s,n,!0),r="hint"):(Xt(jt.get(e)||new Set,n,!0),i?(Kt(i,n,!0),r="auto"):r="hint")),"auto"===o||"hint"===o){if(o!==t.popover||!Pt(t,!1))return;Bt(e)||(n=!0),"auto"===r?(Dt.has(e)||Dt.set(e,new Set),Dt.get(e).add(t)):"hint"===r&&(jt.has(e)||jt.set(e,new Set),jt.get(e).add(t))}Jt.delete(t);const a=e.activeElement;var c;t.classList.add(":popover-open"),Rt.set(t,"showing"),$t.has(e)||$t.set(e,new Set),$t.get(e).add(t),ee(zt.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(_t(r))return r;r=o.nextNode()}}(c)?.focus(),n&&a&&"auto"===t.popover&&Jt.set(t,a),Ot(t,"closed","open")}function Vt(t,e=!1,n=!1){if(!Pt(t,!0))return;const o=t.ownerDocument;if(["auto","hint"].includes(t.popover)&&(Kt(t,e,n),!Pt(t,!0)))return;const r=Dt.get(o)||new Set,i=r.has(t)&&Ct(r)===t;if(ee(zt.get(t),!1),zt.delete(t),n&&(t.dispatchEvent(new Mt("beforetoggle",{oldState:"open",newState:"closed"})),i&&Ct(r)!==t&&Kt(t,e,n),!Pt(t,!0)))return;$t.get(o)?.delete(t),r.delete(t),jt.get(o)?.delete(t),t.classList.remove(":popover-open"),Rt.set(t,"hidden"),n&&Ot(t,"open","closed");const s=Jt.get(t);s&&(Jt.delete(t),e&&s.focus())}function Xt(t,e=!1,n=!1){let o=qt(t);for(;o;)Vt(o,e,n),o=qt(t)}function Yt(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"===Ft(s)&&e.size;)Vt(Ct(e),n,o);e.has(t)&&Ct(e)!==t&&(r=!0),r&&(o=!1)}}function Kt(t,e,n){const o=t.ownerDocument||t;if(t instanceof Document)return function(t,e=!1,n=!1){let o=Bt(t);for(;o;)Vt(o,e,n),o=Bt(t)}(o,e,n);jt.get(o)?.has(t)?Yt(t,jt.get(o),e,n):(Xt(jt.get(o)||new Set,e,n),Dt.get(o)?.has(t)&&Yt(t,Dt.get(o),e,n))}var Ut=new WeakMap;function Zt(t){if(!t.isTrusted)return;const e=t.composedPath()[0];if(!e)return;const n=e.ownerDocument;if(!Bt(n))return;const o=function(t){const e=Nt(t),n=function(t){for(;t;){const e=t.popoverTargetElement;if(e instanceof HTMLElement)return e;if((t=t.parentElement||It(t))instanceof Lt&&(t=t.host),t instanceof Document)return}}(t);return Wt(e)>Wt(n)?e:n}(e);if(o&&"pointerdown"===t.type)Ut.set(n,o);else if("pointerup"===t.type){const t=Ut.get(n)===o;Ut.delete(n),t&&Kt(o||n,!1,!0)}}var te=new WeakMap;function ee(t,e=!1){if(!t)return;te.has(t)||te.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=te.get(t);e?t.setAttribute("aria-expanded",e):t.removeAttribute("aria-expanded")}}var ne=globalThis.ShadowRoot||function(){};function oe(t,e,n){const o=t[e];Object.defineProperty(t,e,{value(t){return o.call(this,n(t))}})}var re=/(^|[^\\]):popover-open\b/g;var ie=null;function se(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===ie)try{(ie=new CSSStyleSheet).replaceSync(e)}catch{ie=!1}if(!1===ie){const n=document.createElement("style");n.textContent=e,t instanceof Document?t.head.prepend(n):t.prepend(n)}else t.adoptedStyleSheets=[ie,...t.adoptedStyleSheets]}var ae=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 ce={"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"})}},le=t(class t extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postBeforeShow=n(this,"postBeforeShow"),this.postShow=n(this,"postShow"),this.postHide=n(this,"postHide"),this.postBeforeToggle=n(this,"postBeforeToggle"),this.postToggle=n(this,"postToggle"),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(){"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(re,"$1.\\:popover-open")),t}window.ToggleEvent=window.ToggleEvent||Mt,oe(Document.prototype,"querySelector",t),oe(Document.prototype,"querySelectorAll",t),oe(Element.prototype,"querySelector",t),oe(Element.prototype,"querySelectorAll",t),oe(Element.prototype,"matches",t),oe(Element.prototype,"closest",t),oe(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(){Vt(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(t={}){return"boolean"==typeof t&&(t={force:t}),"showing"===Rt.get(this)&&void 0===t.force||!1===t.force?Vt(this,!0,!0):void 0!==t.force&&!0!==t.force||Qt(this),"showing"===Rt.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 se(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&&se(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=It(this),n=this.getAttribute("popovertarget");return(e instanceof Document||e instanceof ne)&&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=It(n);if(!(o instanceof ne||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=Ft(e);"show"===t.popoverTargetAction&&"showing"===n||"hide"===t.popoverTargetAction&&"hidden"===n||("showing"===n?Vt(e,!0,!0):Pt(e,!1)&&(zt.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||Kt(n.ownerDocument,!0,!0)})),i.addEventListener("pointerdown",Zt),i.addEventListener("pointerup",Zt),se(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||(this.eventTarget=t,this.calculatePosition(),this.host.showPopover())}async hide(){this.toggleTimeoutId||(this.eventTarget=null,this.host.hidePopover(),this.postHide.emit())}async toggle(t,e){return this.eventTarget=t,this.toggleTimeoutId||(this.calculatePosition(),this.host.togglePopover(e),this.toggleTimeoutId=null),this.host.matches(":where(:popover-open, .popover-open)")}open(){const t=this.host.shadowRoot?.querySelector(".popover-content");if(this.startAutoupdates(),t){const e=ce[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=at(t),u=r||i?[...l?rt(l):[],...e?rt(e):[]]:[];u.forEach((t=>{r&&t.addEventListener("scroll",n,{passive:!0}),i&&t.addEventListener("resize",n)}));const d=l&&a?function(t,e){let n,o=null;const r=W(t);function i(){var t;clearTimeout(n),null==(t=o)||t.disconnect(),o=null}return function s(a,c){void 0===a&&(a=!1),void 0===c&&(c=1),i();const l=t.getBoundingClientRect(),{left:u,top:d,width:m,height:v}=l;if(a||e(),!m||!v)return;const g={rootMargin:-h(d)+"px "+-h(r.clientWidth-(u+m))+"px "+-h(r.clientHeight-(d+v))+"px "+-h(u)+"px",threshold:f(0,p(1,c))||1};let w=!0;function y(e){const o=e[0].intersectionRatio;if(o!==c){if(!w)return s();o?s(!1,o):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}1!==o||bt(l,t.getBoundingClientRect())||s(),w=!1}try{o=new IntersectionObserver(y,{...g,root:r.ownerDocument})}catch(t){o=new IntersectionObserver(y,g)}o.observe(t)}(!0),i}(l,n):null;let m,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?ft(t):null;return c&&function e(){const o=ft(t);w&&!bt(w,o)&&n(),w=o,m=requestAnimationFrame(e)}(),n(),()=>{var t;u.forEach((t=>{r&&t.removeEventListener("scroll",n),i&&t.removeEventListener("resize",n)})),null==d||d(),null==(t=g)||t.disconnect(),g=null,c&&cancelAnimationFrame(m)}}(this.eventTarget,this.host,this.calculatePosition.bind(this)))}getHeaderHeight(){const t=document.querySelector("post-header");return t?Number.parseFloat(getComputedStyle(t).height):0}async calculatePosition(){const{x:e,y:n,middlewareData:o,placement:r}=await this.computeMainPosition(),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 computeMainPosition(){const t=this.edgeGap,e=(this.placement||"top").includes("-"),n=kt({padding:this.getHeaderHeight(),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}=g(t,e),p={x:n,y:o},f=await i.detectOverflow(e,l),u=S(w(r)),h=x(u);let d=p[h],m=p[u];s&&(d=v(d+f["y"===h?"top":"left"],d,d-f["y"===h?"bottom":"right"])),a&&(m=v(m+f["y"===u?"top":"left"],m,m-f["y"===u?"bottom":"right"]));const y=c.fn({...e,[h]:d,[u]:m});return{...y,data:{x:y.x-n,y:y.y-o,enabled:{[h]:s,[u]:a}}}}}}({padding:t,limiter:(i={offset:32},void 0===i&&(i={}),{options:i,fn(t){const{x:e,y:n,placement:o,rects:r,middlewareData:s}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=g(i,t),p={x:e,y:n},f=S(o),u=x(f);let h=p[u],d=p[f];const m=g(a,t),v="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const t="y"===u?"height":"width",e=r.reference[u]-r.floating[t]+v.mainAxis,n=r.reference[u]+r.reference[t]-v.mainAxis;h<e?h=e:h>n&&(h=n)}if(l){var y,b;const t="y"===u?"width":"height",e=F.has(w(o)),n=r.reference[f]-r.floating[t]+(e&&(null==(y=s.offset)?void 0:y[f])||0)+(e?0:v.crossAxis),i=r.reference[f]+r.reference[t]+(e?0:(null==(b=s.offset)?void 0:b[f])||0)-(e?v.crossAxis:0);d<n?d=n:d>i&&(d=i)}return{[u]:h,[f]:d}}})}),r=[St(this.offset??(this.arrow?t+4:t)),Tt(),...e?[n,o]:[o,n],Et({apply({availableWidth:e,elements:n}){Object.assign(n.floating.style,{maxWidth:e-2*t+"px"})}})];var i;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:f=0}=g(t,e)||{};if(null==l)return{};const u=H(f),h={x:n,y:o},d=k(r),m=b(d),w=await s.getDimensions(l),x="y"===d,S=x?"top":"left",E=x?"bottom":"right",T=x?"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 L=O?O[T]:0;L&&await(null==s.isElement?void 0:s.isElement(O))||(L=a.floating[T]||i.floating[m]);const $=M/2-A/2,D=L/2-w[m]/2-1,j=p(u[S],D),R=p(u[E],D),F=j,z=L-w[m]-R,C=L/2-w[m]/2+$,P=v(F,C,z),W=!c.arrow&&null!=y(r)&&C!==P&&i.reference[m]/2-(C<F?j:R)-w[m]/2<0,B=W?C<F?C-F:C-z:0;return{[d]:h[d]+B,data:{[d]:P,centerOffset:C-P-B,...W&&{alignmentOffset:B}},reset:W}}}))({element:this.arrowRef,padding:t})),((t,e,n)=>{const o=new Map,r={platform:xt,...n},i={...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}=D(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}=D(l,u,c))),n=-1)}return{x:p,y:f,placement:u,strategy:r,middlewareData:d}})(t,e,{...r,platform:i})})(this.eventTarget,this.host,{placement:this.placement||"top",strategy:"fixed",middleware:r})}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 o(r,{key:"4fc0f306903c914a632d6ee72d9aaa69f9b60140","data-version":s,popover:"auto"},o("div",{key:"d411b6f9dcb622cc1dfc829c19f69c73e9ad57d6",part:"post-popovercontainer-content",class:"popover-content"},this.arrow&&o("span",{key:"bf3e926a44c33b1aa7306be289f695e4b0007370","dynamic-placement":this.dynamicPlacement,class:"arrow",ref:t=>{this.arrowRef=t}}),o("span",{key:"1c8256005b2fda27460c961ec6eea3f76075af20",part:"post-popovercontainer-border-mask"}),o("slot",{key:"0463879c1a444bcef8d6e6e48fe036ab764cef73"})))}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"],dynamicPlacement:[32],show:[64],hide:[64],toggle:[64]}]);function pe(){"undefined"!=typeof customElements&&["post-popovercontainer"].forEach((t=>{"post-popovercontainer"===t&&(customElements.get(i(t))||customElements.define(i(t),le))}))}le.STATIC_SIDES={top:"bottom",right:"left",bottom:"top",left:"right"},le.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"],ae([a(l)],le.prototype,"placement",void 0),ae([c("number")],le.prototype,"edgeGap",void 0),ae([a(["triangle","trapezoid"])],le.prototype,"safeSpace",void 0),pe();export{le as P,l as a,pe as d}
@@ -1 +0,0 @@
1
- import{p as o,H as e,h as t,a as i,t as c}from"./index.js";import"./p-Bji_4dfL.js";import{E as a}from"./p-rEfV4v4a.js";import{n as s}from"./p-8LXe8Zt_.js";import{v as r}from"./p-CdhbouMD.js";import{d as n}from"./p-DTg2SXJj.js";import{d}from"./p-DU4XzTGt.js";import{d as l}from"./p-BUSQG9af.js";const p=o(class extends e{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.collapsed=!1}componentWillLoad(){this.id=this.host.id||`p${s(6)}`}onCollapseToggle(o){this.collapsed=!o.detail}async toggle(o){return this.collapsible.toggle(o)}onSlotLogoChange(){this.slottedLogo=this.host.querySelector('img[slot="logo"]')}componentWillRender(){this.slottedLogo=this.host.querySelector('img[slot="logo"]')}render(){const o=this.host.closest("post-accordion")?.getAttribute("heading-level");return t(i,{key:"67b3be2ea798d007c3c05fafaa95d447bd3245b4",id:this.id,"data-version":r},t("post-collapsible-trigger",{key:"2c545ead0717cefef325576125b548db4c7d6e11",for:`${this.id}--collapse`},t(`h${o??this.headingLevel??2}`,{key:"82840144efc0588a73f5aaa734e1492acccd498e",class:"accordion-header",id:`${this.id}--header`},t("button",{key:"bfd05c00e2df07800a20a9e0b69e6b918d80085d",type:"button",class:"accordion-button"+(this.collapsed?" collapsed":""),part:"post-accordion-button"},t("span",{key:"af2e574d4e521316f9d5e4da040d777e0384c783",class:{"logo-container":!0,"has-image":!!this.slottedLogo}},t("slot",{key:"178cf7d6e26f52d8fe2fc15ef026db4bd51ff70c",name:"logo",onSlotchange:this.onSlotLogoChange.bind(this)})),t("slot",{key:"c160f107a8bc7be52a538f6f19ffaa25fa4a729d",name:"header"}),t("post-icon",{key:"19d621e055e1973d1a0e3e7cb750a88101f962d3",name:"chevronup"})))),t("post-collapsible",{key:"f0ff63e67476cc05467db907e010cd1c026aa044",id:`${this.id}--collapse`,collapsed:this.collapsed,ref:o=>this.collapsible=o},t("div",{key:"73418485496fa27ecc98e068317e39cea6dd8f2b",class:"accordion-body",part:"post-accordion-body"},t("slot",{key:"7a0e5d6c3b8da2e3170b5e47104d3ff4509b2040"}))))}get host(){return this}static get style(){return':host{display:block;border-block-end:var(--post-device-border-width-default) var(--post-core-border-style-solid) var(--post-scheme-color-interactive-primary-enabled-stroke)}:host:has(.accordion-button:hover){border-block-end-color:var(--post-scheme-color-interactive-primary-hover-stroke)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host:has(.accordion-button:hover){border-block-end-color:Highlight}}:host([collapsed]) .accordion-button post-icon{transform:rotate(-180deg)}.accordion-header{color:var(--post-scheme-color-interactive-primary-enabled-fg1);font-size:var(--post-device-font-size-5);margin:0;line-height:var(--post-device-line-height-heading);font-weight:var(--post-device-font-weight-extra-black)}.accordion-button{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;position:relative;width:100%;align-items:center;text-align:start;gap:var(--post-device-spacing-gap-7);padding-block:var(--post-device-spacing-padding-19);padding-inline:var(--post-device-spacing-padding-5);border-block-end:var(--post-device-border-width-default) var(--post-core-border-style-solid) rgba(0,0,0,0);cursor:pointer;outline:none !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button{background-color:ButtonFace !important}.accordion-button:hover{background-color:Highlight !important}}.accordion-button::before{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}.accordion-button:is(:focus-visible,:has(:focus-visible),.pretend-focus)::before{outline-style:var(--post-core-border-style-solid) !important;display:block;content:"";position:absolute;inset:calc(var(--post-device-border-width-default)*-1) 0 calc(var(--post-device-border-width-default)*-1);border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:is(:focus-visible,:has(:focus-visible),.pretend-focus)::before{outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.accordion-button:is(:focus-visible,:focus-within,.pretend-focus)::before{outline-style:var(--post-core-border-style-solid) !important;display:block;content:"";position:absolute;inset:calc(var(--post-device-border-width-default)*-1) 0 calc(var(--post-device-border-width-default)*-1);border-radius:var(--post-device-border-radius-focus)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:is(:focus-visible,:focus-within,.pretend-focus)::before{outline-color:Highlight !important}}}.accordion-button slot::slotted(span[slot=header]){flex-grow:1}.accordion-button post-icon{flex:none;width:var(--post-core-dimension-24);aspect-ratio:1;transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1);transform:var(--post-accordion-icon-initial-transform, none)}.accordion-button.collapsed{padding-block-start:var(--post-device-spacing-padding-19);padding-block-end:var(--post-device-spacing-padding-19)}.accordion-button.collapsed post-icon{transform:rotate(-180deg)}.accordion-button:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}.accordion-button>::slotted(.text-truncate){display:block}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.accordion-button:hover,.accordion-button:focus-visible{color:Highlight}}post-collapsible{margin-block-end:calc(var(--post-device-border-width-default)*-1)}.accordion-body{padding-block-start:var(--post-device-spacing-padding-15);padding-block-end:var(--post-device-spacing-padding-block-25);padding-inline:var(--post-device-spacing-padding-5)}.logo-container{display:none;width:var(--post-device-sizing-logo-1);aspect-ratio:1}.logo-container.has-image{display:block}.logo-container slot::slotted(img){display:block;width:100%;height:100%;object-fit:cover}.accordion-button>::slotted(:first-child),.accordion-body>::slotted(:first-child){margin-block-start:0 !important}.accordion-button>::slotted(:last-child),.accordion-body>::slotted(:last-child){margin-block-end:0 !important}'}},[257,"post-accordion-item",{collapsed:[1540],headingLevel:[2,"heading-level"],id:[32],slottedLogo:[32],toggle:[64]},[[2,"postToggle","onCollapseToggle"]]]);function b(){"undefined"!=typeof customElements&&["post-accordion-item","post-collapsible","post-collapsible-trigger","post-icon"].forEach((o=>{switch(o){case"post-accordion-item":customElements.get(c(o))||customElements.define(c(o),p);break;case"post-collapsible":customElements.get(c(o))||n();break;case"post-collapsible-trigger":customElements.get(c(o))||d();break;case"post-icon":customElements.get(c(o))||l()}}))}(function(o,e,t,i){var c,a=arguments.length,s=a<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,t):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(o,e,t,i);else for(var r=o.length-1;r>=0;r--)(c=o[r])&&(s=(a<3?c(s):a>3?c(e,t,s):c(e,t))||s);a>3&&s&&Object.defineProperty(e,t,s)})([a("post-accordion-item")],p.prototype,"onCollapseToggle",null),b();export{p as P,b as d}
@@ -1 +0,0 @@
1
- import{p as e,t,H as s,h as o,a}from"./index.js";import"./p-Bji_4dfL.js";import{E as i}from"./p-rEfV4v4a.js";import{v as r}from"./p-CdhbouMD.js";import{R as l}from"./p-4wtxqxXu.js";import{O as n}from"./p-BaB8wJvk.js";var c=function(e,t,s,o){var a,i=arguments.length,r=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,s):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,o);else for(var l=e.length-1;l>=0;l--)(a=e[l])&&(r=(i<3?a(r):i>3?a(t,s,r):a(t,s))||r);return i>3&&r&&Object.defineProperty(t,s,r),r};const d=e(class extends s{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.expandedItems=new Set,this.multiple=!1}syncHeadingLevel(){this.accordionItems.forEach((e=>{e.setAttribute("heading-level",String(this.headingLevel))}))}componentWillLoad(){this.registerAccordionItems()}componentDidLoad(){this.syncHeadingLevel()}collapseToggleHandler(e){const t=e.target,s=this.expandedItems.has(t);s?this.expandedItems.delete(t):this.expandedItems.add(t),this.multiple||s||Array.from(this.expandedItems.values()).filter((e=>e!==t)).forEach((e=>{e.toggle(!1)}))}async toggle(e){const t=this.accordionItems.find((t=>t.id===e));if(!t)throw new Error(`No post-accordion-item found with id #${e}.`);await t.toggle()}async expandAll(){this.multiple?await Promise.all(this.accordionItems.map((e=>e.toggle(!0)))):0===this.expandedItems.size&&await this.accordionItems[0].toggle(!0)}async collapseAll(){await Promise.all(this.accordionItems.map((e=>e.toggle(!1))))}registerAccordionItems(){this.accordionItems=Array.from(this.host.querySelectorAll("post-accordion-item")),this.accordionItems.filter((e=>!e.collapsed||this.expandedItems.has(e))).forEach(((e,t)=>{this.multiple||0===t?this.expandedItems.add(e):e.setAttribute("collapsed","")}))}render(){return o(a,{key:"27862337a90223900241d38a1b1d27cb5923acba","data-version":r},o("div",{key:"e858da8742240aa57f72ac04a4253d5e88910295",class:"accordion"},o("slot",{key:"004ab6089b44a2528ea56cffed3bef0791dae068",onSlotchange:()=>this.registerAccordionItems()})))}get host(){return this}static get watchers(){return{headingLevel:[{syncHeadingLevel:0}]}}static get style(){return":host{display:block;border-block-start:var(--post-device-border-width-default) var(--post-core-border-style-solid) var(--post-scheme-color-interactive-primary-enabled-stroke)}"}},[257,"post-accordion",{headingLevel:[514,"heading-level"],multiple:[516],toggle:[64],expandAll:[64],collapseAll:[64]},[[0,"postToggle","collapseToggleHandler"]],{headingLevel:[{syncHeadingLevel:0}]}]);function h(){"undefined"!=typeof customElements&&["post-accordion"].forEach((e=>{"post-accordion"===e&&(customElements.get(t(e))||customElements.define(t(e),d))}))}c([l(),n([1,2,3,4,5,6])],d.prototype,"headingLevel",void 0),c([i("post-accordion-item")],d.prototype,"collapseToggleHandler",null),h();export{d as P,h as d}
@@ -1,11 +0,0 @@
1
- import type { Components, JSX } from "../../types/components";
2
-
3
- interface PostLoginWidget extends Components.PostLoginWidget, HTMLElement {}
4
- export const PostLoginWidget: {
5
- prototype: PostLoginWidget;
6
- new (): PostLoginWidget;
7
- };
8
- /**
9
- * Used to define this component and all nested components recursively.
10
- */
11
- export const defineCustomElement: () => void;
@@ -1 +0,0 @@
1
- import{p as t,H as e,c as o,h as s,a as i,t as r}from"./index.js";import"./p-Bji_4dfL.js";import{v as n}from"./p-CdhbouMD.js";import{d as a}from"./p-C7aYEQh5.js";import{d as c}from"./p-B3ZJPCU0.js";import{d as u}from"./p-BUAS73l8.js";import{d}from"./p-Ci08Eesw.js";import{R as h}from"./p-4wtxqxXu.js";import{T as p}from"./p-B_WnO-QF.js";var l=function(t,e,o,s){var i,r=arguments.length,n=r<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,o,s);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(n=(r<3?i(n):r>3?i(e,o,n):i(e,o))||n);return r>3&&n&&Object.defineProperty(e,o,n),n};const g=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postChange=o(this,"postChange"),this.authenticated=null,this.user=null}async componentWillLoad(){await this.fetchAuthState()}async isAuthenticated(){return this.authenticated}async refresh(){await this.fetchAuthState()}async fetchAuthState(){try{const t=await fetch("https://n.account.post.ch/v1/session/subscribe",{credentials:"include"});if(!t.ok)return void this.setAuthState(!1);const e=await t.json(),o=void 0!==e?.data?.email;this.user=e?.data,this.setAuthState(o)}catch{this.setAuthState(!1)}}setAuthState(t){this.authenticated!==t&&(this.authenticated=t,this.postChange.emit({authenticated:t}))}render(){return s(i,{key:"74d00f53d1de12c739242183cb4551fe5127eb29","data-version":n},!0===this.authenticated?s("div",null,s("post-menu-trigger",{for:"user-menu-default"},s("button",{class:"btn btn-link",type:"button"},s("post-avatar",{firstname:this.user.name,lastname:this.user.surname,description:this.textCurrentUser.replace("{user}",`${this.user.name} ${this.user.surname}`)}),s("span",{class:"visually-hidden"},this.textUserMenuTrigger))),s("post-menu",{label:this.textUserMenu,id:"user-menu-default"},s("div",{slot:"header"},s("post-avatar",{firstname:this.user.name,lastname:this.user.surname,email:this.user.email,"aria-hidden":"true"}),this.user.name," ",this.user.surname),s("slot",{name:"user-links"}))):s("div",null,s("slot",{name:"login-link"})))}get host(){return this}static get style(){return":host post-menu-trigger button{display:inline-flex;position:relative;align-items:center;justify-content:center;max-width:100%;overflow:hidden;transition:opacity 250ms,border-color 250ms,background-color 250ms,color 250ms;border-width:var(--post-device-border-width-default);border-style:solid;border-color:rgba(0,0,0,0);border-radius:var(--post-device-border-radius-round);background-color:rgba(0,0,0,0);box-shadow:none;font-family:inherit;font-size:var(--post-device-font-size-6);font-weight:var(--post-device-font-weight-bold);text-decoration:none;white-space:nowrap;cursor:pointer;min-height:var(--post-device-sizing-interactive-button-height-1);gap:var(--post-device-spacing-gap-inline-10);padding:0 var(--post-device-spacing-padding-inline-6)}:host post-menu-trigger button:not(:disabled):hover{text-decoration:none}:host post-menu-trigger button:disabled{border-style:var(--post-core-border-style-dash);cursor:unset}:host post-menu-trigger button{outline-offset:var(--post-device-spacing-padding-2) !important;outline:var(--post-scheme-color-interactive-focus-stroke) none var(--post-device-border-width-focus) !important}:host post-menu-trigger button: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 post-menu-trigger button:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){:host post-menu-trigger button: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 post-menu-trigger button:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host post-menu-trigger button:is(a){color:LinkText;border:unset}:host post-menu-trigger button:is(button){background-color:ButtonFace !important;border:1px solid ButtonBorder !important}:host post-menu-trigger button:not(:disabled,.disabled):is(button):hover{background-color:Highlight !important}:host post-menu-trigger button:not(:disabled,.disabled):is(button):hover>post-icon{color:HighlightText !important}}:host post-menu-trigger button>post-icon{width:var(--post-device-sizing-interactive-button-icon-4);height:var(--post-device-sizing-interactive-button-icon-4)}:host post-menu-trigger button{border-radius:var(--post-device-border-radius-round) !important;border:0 none;min-height:0;padding:0}:host post-menu-trigger .visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}"}},[257,"post-login-widget",{textCurrentUser:[513,"text-current-user"],textUserMenu:[513,"text-user-menu"],textUserMenuTrigger:[513,"text-user-menu-trigger"],authenticated:[32],user:[32],isAuthenticated:[64],refresh:[64]}]);function m(){"undefined"!=typeof customElements&&["post-login-widget","post-avatar","post-menu","post-menu-trigger","post-popovercontainer"].forEach((t=>{switch(t){case"post-login-widget":customElements.get(r(t))||customElements.define(r(t),g);break;case"post-avatar":customElements.get(r(t))||a();break;case"post-menu":customElements.get(r(t))||c();break;case"post-menu-trigger":customElements.get(r(t))||u();break;case"post-popovercontainer":customElements.get(r(t))||d()}}))}l([h(),p("string")],g.prototype,"textCurrentUser",void 0),l([h(),p("string")],g.prototype,"textUserMenu",void 0),l([h(),p("string")],g.prototype,"textUserMenuTrigger",void 0),m();const b=g,v=m;export{b as PostLoginWidget,v as defineCustomElement}
@@ -1,274 +0,0 @@
1
- /*!
2
- * long-press-event - v@version@
3
- * Pure JavaScript long-press-event
4
- * https://github.com/john-doherty/long-press-event
5
- * @author John Doherty <www.johndoherty.info>
6
- * @license MIT
7
- */
8
- (function (window, document) {
9
-
10
- // local timer object based on rAF
11
- var timer = null;
12
-
13
- // check if we're using a touch screen
14
- var hasPointerEvents = (('PointerEvent' in window) || (window.navigator && 'msPointerEnabled' in window.navigator));
15
- var isTouch = (('ontouchstart' in window) || (navigator.MaxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0));
16
-
17
- // switch to pointer events or touch events if using a touch screen
18
- var mouseDown = hasPointerEvents ? 'pointerdown' : isTouch ? 'touchstart' : 'mousedown';
19
- var mouseUp = hasPointerEvents ? 'pointerup' : isTouch ? 'touchend' : 'mouseup';
20
- var mouseMove = hasPointerEvents ? 'pointermove' : isTouch ? 'touchmove' : 'mousemove';
21
- var mouseLeave = hasPointerEvents ? 'pointerleave' : isTouch ? 'touchleave' : 'mouseleave';
22
-
23
- // track number of pixels the mouse moves during long press
24
- var startX = 0; // mouse x position when timer started
25
- var startY = 0; // mouse y position when timer started
26
- var maxDiffX = 10; // max number of X pixels the mouse can move during long press before it is canceled
27
- var maxDiffY = 10; // max number of Y pixels the mouse can move during long press before it is canceled
28
-
29
- // patch CustomEvent to allow constructor creation (IE/Chrome)
30
- if (typeof window.CustomEvent !== 'function') {
31
-
32
- window.CustomEvent = function (event, params) {
33
-
34
- params = params || { bubbles: false, cancelable: false, detail: undefined };
35
-
36
- var evt = document.createEvent('CustomEvent');
37
- evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
38
- return evt;
39
- };
40
-
41
- window.CustomEvent.prototype = window.Event.prototype;
42
- }
43
-
44
- // requestAnimationFrame() shim by Paul Irish
45
- window.requestAnimFrame = (function () {
46
- return window.requestAnimationFrame ||
47
- window.webkitRequestAnimationFrame ||
48
- window.mozRequestAnimationFrame ||
49
- window.oRequestAnimationFrame ||
50
- window.msRequestAnimationFrame || function (callback) {
51
- window.setTimeout(callback, 1000 / 60);
52
- };
53
- })();
54
-
55
- /**
56
- * Behaves the same as setTimeout except uses requestAnimationFrame() where possible for better performance
57
- * @param {function} fn The callback function
58
- * @param {int} delay The delay in milliseconds
59
- * @returns {object} handle to the timeout object
60
- */
61
- function requestTimeout(fn, delay) {
62
-
63
- if (!window.requestAnimationFrame && !window.webkitRequestAnimationFrame &&
64
- !(window.mozRequestAnimationFrame && window.mozCancelRequestAnimationFrame) && // Firefox 5 ships without cancel support
65
- !window.oRequestAnimationFrame && !window.msRequestAnimationFrame) return window.setTimeout(fn, delay);
66
-
67
- var start = new Date().getTime();
68
- var handle = {};
69
-
70
- var loop = function () {
71
- var current = new Date().getTime();
72
- var delta = current - start;
73
-
74
- if (delta >= delay) {
75
- fn.call();
76
- }
77
- else {
78
- handle.value = requestAnimFrame(loop);
79
- }
80
- };
81
-
82
- handle.value = requestAnimFrame(loop);
83
-
84
- return handle;
85
- }
86
-
87
- /**
88
- * Behaves the same as clearTimeout except uses cancelRequestAnimationFrame() where possible for better performance
89
- * @param {object} handle The callback function
90
- * @returns {void}
91
- */
92
- function clearRequestTimeout(handle) {
93
- if (handle) {
94
- window.cancelAnimationFrame ? window.cancelAnimationFrame(handle.value) :
95
- window.webkitCancelAnimationFrame ? window.webkitCancelAnimationFrame(handle.value) :
96
- window.webkitCancelRequestAnimationFrame ? window.webkitCancelRequestAnimationFrame(handle.value) : /* Support for legacy API */
97
- window.mozCancelRequestAnimationFrame ? window.mozCancelRequestAnimationFrame(handle.value) :
98
- window.oCancelRequestAnimationFrame ? window.oCancelRequestAnimationFrame(handle.value) :
99
- window.msCancelRequestAnimationFrame ? window.msCancelRequestAnimationFrame(handle.value) :
100
- clearTimeout(handle);
101
- }
102
- }
103
-
104
- /**
105
- * Fires the 'long-press' event on element
106
- * @param {MouseEvent|PointerEvent|TouchEvent} originalEvent The original event being fired
107
- * @returns {void}
108
- */
109
- function fireLongPressEvent(originalEvent) {
110
-
111
- clearLongPressTimer();
112
-
113
- originalEvent = unifyEvent(originalEvent);
114
-
115
- // fire the long-press event
116
- var allowClickEvent = this.dispatchEvent(new CustomEvent('long-press', {
117
- bubbles: true,
118
- cancelable: true,
119
-
120
- // custom event data (legacy)
121
- detail: {
122
- clientX: originalEvent.clientX,
123
- clientY: originalEvent.clientY,
124
- offsetX: originalEvent.offsetX,
125
- offsetY: originalEvent.offsetY,
126
- pageX: originalEvent.pageX,
127
- pageY: originalEvent.pageY
128
- },
129
-
130
- // add coordinate data that would typically acompany a touch/click event
131
- clientX: originalEvent.clientX,
132
- clientY: originalEvent.clientY,
133
- offsetX: originalEvent.offsetX,
134
- offsetY: originalEvent.offsetY,
135
- pageX: originalEvent.pageX,
136
- pageY: originalEvent.pageY,
137
- screenX: originalEvent.screenX,
138
- screenY: originalEvent.screenY
139
- }));
140
-
141
- if (!allowClickEvent) {
142
- // suppress the next click event if e.preventDefault() was called in long-press handler
143
- document.addEventListener('click', function suppressEvent(e) {
144
- document.removeEventListener('click', suppressEvent, true);
145
- cancelEvent(e);
146
- }, true);
147
- }
148
- }
149
-
150
- /**
151
- * consolidates mouse, touch, and Pointer events
152
- * @param {MouseEvent|PointerEvent|TouchEvent} e The original event being fired
153
- * @returns {MouseEvent|PointerEvent|Touch}
154
- */
155
- function unifyEvent(e) {
156
- if (e.changedTouches !== undefined) {
157
- return e.changedTouches[0];
158
- }
159
- return e;
160
- }
161
-
162
- /**
163
- * method responsible for starting the long press timer
164
- * @param {event} e - event object
165
- * @returns {void}
166
- */
167
- function startLongPressTimer(e) {
168
-
169
- clearLongPressTimer();
170
-
171
- var el = e.target;
172
-
173
- // get delay from html attribute if it exists, otherwise default to 1500
174
- var longPressDelayInMs = parseInt(getNearestAttribute(el, 'data-long-press-delay', '1500'), 10); // default 1500
175
-
176
- // start the timer
177
- timer = requestTimeout(fireLongPressEvent.bind(el, e), longPressDelayInMs);
178
- }
179
-
180
- /**
181
- * method responsible for clearing a pending long press timer
182
- * @param {event} e - event object
183
- * @returns {void}
184
- */
185
- function clearLongPressTimer(e) {
186
- clearRequestTimeout(timer);
187
- timer = null;
188
- }
189
-
190
- /**
191
- * Cancels the current event
192
- * @param {object} e - browser event object
193
- * @returns {void}
194
- */
195
- function cancelEvent(e) {
196
- e.stopImmediatePropagation();
197
- e.preventDefault();
198
- e.stopPropagation();
199
- }
200
-
201
- /**
202
- * Starts the timer on mouse down and logs current position
203
- * @param {object} e - browser event object
204
- * @returns {void}
205
- */
206
- function mouseDownHandler(e) {
207
- startX = e.clientX;
208
- startY = e.clientY;
209
- startLongPressTimer(e);
210
- }
211
-
212
- /**
213
- * If the mouse moves n pixels during long-press, cancel the timer
214
- * @param {object} e - browser event object
215
- * @returns {void}
216
- */
217
- function mouseMoveHandler(e) {
218
-
219
- // calculate total number of pixels the pointer has moved
220
- var diffX = Math.abs(startX - e.clientX);
221
- var diffY = Math.abs(startY - e.clientY);
222
-
223
- // if pointer has moved more than allowed, cancel the long-press timer and therefore the event
224
- if (diffX >= maxDiffX || diffY >= maxDiffY) {
225
- clearLongPressTimer();
226
- }
227
- }
228
-
229
- /**
230
- * Gets attribute off HTML element or nearest parent
231
- * @param {object} el - HTML element to retrieve attribute from
232
- * @param {string} attributeName - name of the attribute
233
- * @param {any} defaultValue - default value to return if no match found
234
- * @returns {any} attribute value or defaultValue
235
- */
236
- function getNearestAttribute(el, attributeName, defaultValue) {
237
-
238
- // walk up the dom tree looking for data-action and data-trigger
239
- while (el && el !== document.documentElement) {
240
-
241
- var attributeValue = el.getAttribute(attributeName);
242
-
243
- if (attributeValue) {
244
- return attributeValue;
245
- }
246
-
247
- el = el.parentNode;
248
- }
249
-
250
- return defaultValue;
251
- }
252
-
253
- // hook events that clear a pending long press event
254
- document.addEventListener(mouseUp, clearLongPressTimer, true);
255
- document.addEventListener(mouseLeave, clearLongPressTimer, true);
256
- document.addEventListener(mouseMove, mouseMoveHandler, true);
257
- document.addEventListener('wheel', clearLongPressTimer, true);
258
- document.addEventListener('scroll', clearLongPressTimer, true);
259
- document.addEventListener('contextmenu', function(e) {
260
-
261
- // on touch devices, prevent the native context menu and keep the long-press timer running
262
- if (isTouch) {
263
- e.preventDefault();
264
- return;
265
- }
266
-
267
- // on non-touch devices, clear timer
268
- clearLongPressTimer();
269
- }, true);
270
-
271
- // hook events that can trigger a long press event
272
- document.addEventListener(mouseDown, mouseDownHandler, true); // <- start
273
-
274
- }(window, document));
@@ -1,3 +0,0 @@
1
- const version = "10.0.0-next.75";
2
-
3
- export { version as v };