@swisspost/design-system-components 10.0.0-next.76 → 10.0.1

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 (187) hide show
  1. package/dist/cjs/{package-B0PdQ0Dm.js → package-BfNFDLlB.js} +1 -1
  2. package/dist/cjs/post-accordion_2.cjs.entry.js +1 -1
  3. package/dist/cjs/post-autocomplete.cjs.entry.js +1 -1
  4. package/dist/cjs/post-avatar.cjs.entry.js +1 -1
  5. package/dist/cjs/post-back-to-top.cjs.entry.js +1 -1
  6. package/dist/cjs/post-banner.cjs.entry.js +1 -1
  7. package/dist/cjs/post-breadcrumb-item.cjs.entry.js +2 -2
  8. package/dist/cjs/post-breadcrumbs.cjs.entry.js +2 -2
  9. package/dist/cjs/post-closebutton_14.cjs.entry.js +7 -7
  10. package/dist/cjs/post-collapsible_2.cjs.entry.js +7 -5
  11. package/dist/cjs/post-date-picker.cjs.entry.js +10 -4
  12. package/dist/cjs/post-footer.cjs.entry.js +1 -1
  13. package/dist/cjs/post-linkarea.cjs.entry.js +1 -1
  14. package/dist/cjs/post-listbox-option.cjs.entry.js +1 -1
  15. package/dist/cjs/post-listbox.cjs.entry.js +1 -1
  16. package/dist/cjs/post-number-input.cjs.entry.js +2 -2
  17. package/dist/cjs/post-pagination.cjs.entry.js +2 -2
  18. package/dist/cjs/post-popover-trigger.cjs.entry.js +1 -1
  19. package/dist/cjs/post-popover.cjs.entry.js +1 -1
  20. package/dist/cjs/post-rating.cjs.entry.js +1 -1
  21. package/dist/cjs/post-side-navigation-trigger.cjs.entry.js +1 -1
  22. package/dist/cjs/post-side-navigation.cjs.entry.js +1 -1
  23. package/dist/cjs/post-stepper-item.cjs.entry.js +1 -1
  24. package/dist/cjs/post-stepper.cjs.entry.js +1 -1
  25. package/dist/cjs/post-tab-item.cjs.entry.js +1 -1
  26. package/dist/cjs/post-tab-panel.cjs.entry.js +1 -1
  27. package/dist/cjs/post-tabs.cjs.entry.js +3 -3
  28. package/dist/cjs/post-tooltip-trigger.cjs.entry.js +1 -1
  29. package/dist/cjs/post-tooltip.cjs.entry.js +1 -1
  30. package/dist/collection/components/post-breadcrumb-item/post-breadcrumb-item.css +1 -1
  31. package/dist/collection/components/post-breadcrumbs/post-breadcrumbs.css +1 -1
  32. package/dist/collection/components/post-closebutton/post-closebutton.css +1 -1
  33. package/dist/collection/components/post-collapsible/post-collapsible.js +1 -1
  34. package/dist/collection/components/post-collapsible-trigger/post-collapsible-trigger.js +5 -3
  35. package/dist/collection/components/post-date-picker/post-date-picker.js +9 -3
  36. package/dist/collection/components/post-header/post-header.css +1 -1
  37. package/dist/collection/components/post-language-menu/post-language-menu.css +1 -1
  38. package/dist/collection/components/post-megadropdown/post-megadropdown.css +1 -1
  39. package/dist/collection/components/post-megadropdown-trigger/post-megadropdown-trigger.css +1 -1
  40. package/dist/collection/components/post-menu-item/post-menu-item.css +1 -1
  41. package/dist/collection/components/post-number-input/post-number-input.css +1 -1
  42. package/dist/collection/components/post-pagination/post-pagination.css +1 -1
  43. package/dist/collection/components/post-tabs/post-tabs.js +2 -2
  44. package/dist/components/package.js +1 -1
  45. package/dist/components/post-breadcrumb-item.js +1 -1
  46. package/dist/components/post-breadcrumbs.js +1 -1
  47. package/dist/components/post-closebutton2.js +1 -1
  48. package/dist/components/post-collapsible-trigger2.js +1 -1
  49. package/dist/components/post-collapsible2.js +1 -1
  50. package/dist/components/post-date-picker.js +1 -1
  51. package/dist/components/post-header.js +1 -1
  52. package/dist/components/post-language-menu.js +1 -1
  53. package/dist/components/post-megadropdown-trigger.js +1 -1
  54. package/dist/components/post-megadropdown.js +1 -1
  55. package/dist/components/post-menu-item2.js +1 -1
  56. package/dist/components/post-number-input.js +1 -1
  57. package/dist/components/post-pagination.js +1 -1
  58. package/dist/components/post-tabs.js +1 -1
  59. package/dist/components/react/p-B4CPJq4-.js +1 -0
  60. package/dist/components/react/{p-Chtl9X7o.js → p-BJJd4LvT.js} +1 -1
  61. package/dist/components/react/{p-D0kuUny7.js → p-BJXXw0kF.js} +1 -1
  62. package/dist/components/react/p-BKQu2M0N.js +1 -0
  63. package/dist/components/react/{p-DKF__bJF.js → p-Bscvx_1t.js} +1 -1
  64. package/dist/components/react/{p-wLn52OZT.js → p-CT6x8DLu.js} +1 -1
  65. package/dist/components/react/{p-gUhGka9h.js → p-D1M4lTJg.js} +1 -1
  66. package/dist/components/react/{p-uQE3DVb8.js → p-DQDv_V13.js} +1 -1
  67. package/dist/components/react/{p-06VKKzxv.js → p-DlA_Y5Qr.js} +1 -1
  68. package/dist/components/react/{p-BkWqx_6U.js → p-Du33y-6X.js} +1 -1
  69. package/dist/components/react/p-Y58zWPwj.js +1 -0
  70. package/dist/components/react/{p-DkKOmXaG.js → p-_nnVhpIK.js} +1 -1
  71. package/dist/components/react/post-accordion-item.js +1 -1
  72. package/dist/components/react/post-accordion.js +1 -1
  73. package/dist/components/react/post-autocomplete.js +1 -1
  74. package/dist/components/react/post-avatar.js +1 -1
  75. package/dist/components/react/post-back-to-top.js +1 -1
  76. package/dist/components/react/post-banner.js +1 -1
  77. package/dist/components/react/post-breadcrumb-item.js +1 -1
  78. package/dist/components/react/post-breadcrumbs.js +1 -1
  79. package/dist/components/react/post-closebutton.js +1 -1
  80. package/dist/components/react/post-collapsible-trigger.js +1 -1
  81. package/dist/components/react/post-collapsible.js +1 -1
  82. package/dist/components/react/post-date-picker.js +1 -1
  83. package/dist/components/react/post-footer.js +1 -1
  84. package/dist/components/react/post-header.js +1 -1
  85. package/dist/components/react/post-icon.js +1 -1
  86. package/dist/components/react/post-language-menu-item.js +1 -1
  87. package/dist/components/react/post-language-menu.js +1 -1
  88. package/dist/components/react/post-linkarea.js +1 -1
  89. package/dist/components/react/post-listbox-option.js +1 -1
  90. package/dist/components/react/post-listbox.js +1 -1
  91. package/dist/components/react/post-logo.js +1 -1
  92. package/dist/components/react/post-mainnavigation.js +1 -1
  93. package/dist/components/react/post-megadropdown-trigger.js +1 -1
  94. package/dist/components/react/post-megadropdown.js +1 -1
  95. package/dist/components/react/post-menu-item.js +1 -1
  96. package/dist/components/react/post-menu-trigger.js +1 -1
  97. package/dist/components/react/post-menu.js +1 -1
  98. package/dist/components/react/post-number-input.js +1 -1
  99. package/dist/components/react/post-pagination.js +1 -1
  100. package/dist/components/react/post-popover-trigger.js +1 -1
  101. package/dist/components/react/post-popover.js +1 -1
  102. package/dist/components/react/post-popovercontainer.js +1 -1
  103. package/dist/components/react/post-rating.js +1 -1
  104. package/dist/components/react/post-side-navigation-trigger.js +1 -1
  105. package/dist/components/react/post-side-navigation.js +1 -1
  106. package/dist/components/react/post-stepper-item.js +1 -1
  107. package/dist/components/react/post-stepper.js +1 -1
  108. package/dist/components/react/post-tab-item.js +1 -1
  109. package/dist/components/react/post-tab-panel.js +1 -1
  110. package/dist/components/react/post-tabs.js +1 -1
  111. package/dist/components/react/post-togglebutton.js +1 -1
  112. package/dist/components/react/post-tooltip-trigger.js +1 -1
  113. package/dist/components/react/post-tooltip.js +1 -1
  114. package/dist/docs.json +4 -4
  115. package/dist/esm/package-Y58zWPwj.js +3 -0
  116. package/dist/esm/post-accordion_2.entry.js +1 -1
  117. package/dist/esm/post-autocomplete.entry.js +1 -1
  118. package/dist/esm/post-avatar.entry.js +1 -1
  119. package/dist/esm/post-back-to-top.entry.js +1 -1
  120. package/dist/esm/post-banner.entry.js +1 -1
  121. package/dist/esm/post-breadcrumb-item.entry.js +2 -2
  122. package/dist/esm/post-breadcrumbs.entry.js +2 -2
  123. package/dist/esm/post-closebutton_14.entry.js +7 -7
  124. package/dist/esm/post-collapsible_2.entry.js +7 -5
  125. package/dist/esm/post-date-picker.entry.js +10 -4
  126. package/dist/esm/post-footer.entry.js +1 -1
  127. package/dist/esm/post-linkarea.entry.js +1 -1
  128. package/dist/esm/post-listbox-option.entry.js +1 -1
  129. package/dist/esm/post-listbox.entry.js +1 -1
  130. package/dist/esm/post-number-input.entry.js +2 -2
  131. package/dist/esm/post-pagination.entry.js +2 -2
  132. package/dist/esm/post-popover-trigger.entry.js +1 -1
  133. package/dist/esm/post-popover.entry.js +1 -1
  134. package/dist/esm/post-rating.entry.js +1 -1
  135. package/dist/esm/post-side-navigation-trigger.entry.js +1 -1
  136. package/dist/esm/post-side-navigation.entry.js +1 -1
  137. package/dist/esm/post-stepper-item.entry.js +1 -1
  138. package/dist/esm/post-stepper.entry.js +1 -1
  139. package/dist/esm/post-tab-item.entry.js +1 -1
  140. package/dist/esm/post-tab-panel.entry.js +1 -1
  141. package/dist/esm/post-tabs.entry.js +3 -3
  142. package/dist/esm/post-tooltip-trigger.entry.js +1 -1
  143. package/dist/esm/post-tooltip.entry.js +1 -1
  144. package/dist/playwright.config.js +2 -5
  145. package/dist/post-components/{p-a08abdb2.entry.js → p-04357da9.entry.js} +1 -1
  146. package/dist/post-components/{p-c11a8e06.entry.js → p-0489b4d4.entry.js} +1 -1
  147. package/dist/post-components/p-0d26c355.entry.js +1 -0
  148. package/dist/post-components/{p-4b366aa0.entry.js → p-178a7687.entry.js} +1 -1
  149. package/dist/post-components/{p-e219e22a.entry.js → p-1f8cf0ac.entry.js} +1 -1
  150. package/dist/post-components/{p-266e68a3.entry.js → p-2c57ea8a.entry.js} +1 -1
  151. package/dist/post-components/p-3cf1db19.entry.js +1 -0
  152. package/dist/post-components/{p-dcceab4e.entry.js → p-4f8cc9a6.entry.js} +1 -1
  153. package/dist/post-components/{p-93da9105.entry.js → p-56f74289.entry.js} +1 -1
  154. package/dist/post-components/{p-1878e9f8.entry.js → p-57da1762.entry.js} +1 -1
  155. package/dist/post-components/{p-52e118e0.entry.js → p-79ebeea6.entry.js} +1 -1
  156. package/dist/post-components/p-7f07eee6.entry.js +1 -0
  157. package/dist/post-components/{p-900dc8e1.entry.js → p-842df510.entry.js} +1 -1
  158. package/dist/post-components/{p-4c7750cd.entry.js → p-8632e72c.entry.js} +1 -1
  159. package/dist/post-components/{p-621a81a7.entry.js → p-8adf13de.entry.js} +1 -1
  160. package/dist/post-components/{p-2a0b9ed0.entry.js → p-8f70afc9.entry.js} +1 -1
  161. package/dist/post-components/{p-8d8ac7ae.entry.js → p-94a8cb5a.entry.js} +1 -1
  162. package/dist/post-components/{p-d9ce8f05.entry.js → p-95986a4b.entry.js} +1 -1
  163. package/dist/post-components/{p-9915ffee.entry.js → p-9ff63d4c.entry.js} +1 -1
  164. package/dist/post-components/p-Y58zWPwj.js +1 -0
  165. package/dist/post-components/{p-3c71d687.entry.js → p-a779195c.entry.js} +1 -1
  166. package/dist/post-components/{p-1eea2715.entry.js → p-b0099d75.entry.js} +1 -1
  167. package/dist/post-components/{p-89ea447b.entry.js → p-c05ae467.entry.js} +1 -1
  168. package/dist/post-components/{p-477c8c35.entry.js → p-c25b6da1.entry.js} +1 -1
  169. package/dist/post-components/{p-ad69ed8c.entry.js → p-ccaf42c3.entry.js} +1 -1
  170. package/dist/post-components/{p-85594193.entry.js → p-cef3c15c.entry.js} +1 -1
  171. package/dist/post-components/{p-0efb77f9.entry.js → p-d91b8c5d.entry.js} +1 -1
  172. package/dist/post-components/{p-f6c45fed.entry.js → p-e35e4e1c.entry.js} +1 -1
  173. package/dist/post-components/{p-a971ec25.entry.js → p-f2d92ace.entry.js} +1 -1
  174. package/dist/post-components/post-components.esm.js +1 -1
  175. package/dist/types/modules.d.ts +1 -1
  176. package/dist/vrt/helpers/header-test-helpers.js +1 -1
  177. package/hydrate/index.js +28 -20
  178. package/hydrate/index.mjs +28 -20
  179. package/package.json +4 -4
  180. package/dist/components/react/p-CrLBbthi.js +0 -1
  181. package/dist/components/react/p-UdMqVxhd.js +0 -1
  182. package/dist/components/react/p-d02KpeUM.js +0 -1
  183. package/dist/esm/package-d02KpeUM.js +0 -3
  184. package/dist/post-components/p-1223e51d.entry.js +0 -1
  185. package/dist/post-components/p-2233c37e.entry.js +0 -1
  186. package/dist/post-components/p-53f34806.entry.js +0 -1
  187. package/dist/post-components/p-d02KpeUM.js +0 -1
@@ -1 +1 @@
1
- import{p as t,H as i,h as e,a as n,t as a}from"./index.js";import"./p-Bji_4dfL.js";import{v as o}from"./p-d02KpeUM.js";import{O as s}from"./p-BaB8wJvk.js";import{T as r}from"./p-B_WnO-QF.js";import{R as m}from"./p-4wtxqxXu.js";var c=function(t,i,e,n){var a,o=arguments.length,s=o<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,e):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,i,e,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(s=(o<3?a(s):o>3?a(i,e,s):a(i,e))||s);return o>3&&s&&Object.defineProperty(i,e,s),s};const l=`https://unpkg.com/@swisspost/design-system-icons@${o}/public/post-icons/`,f=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.flipH=!1,this.flipV=!1}getUrl(){const t=`${this.name??this.host.getAttribute("name")}.svg`;if(this.url?.startsWith("data:image/"))return this.url;if(this.url)return this.url;const i=t=>/^https?:\/\//.test(t),e=t=>t&&!t.endsWith("/")?`${t}/`:t,n=t=>t.replaceAll(/([^:])\/\//g,"$1/"),a=globalThis.location.origin,o=document.querySelector("base[href]")?.getAttribute("href")||"";let s="";{const t=document.querySelector('meta[name="design-system-settings"]');s=t?.getAttribute("data-post-icon-base")||""}const r=t=>{const n=e(o),s=e(t);return i(n)?`${n}${s}`:`${a}${n}${s}`};let m;return this.base?(m=i(this.base)?`${e(this.base)}${t}`:`${r(this.base)}${t}`,n(m)):s?(m=i(s)?`${e(s)}${t}`:`${r(s)}${t}`,n(m)):n(`${l}${t}`)}getStyles(){const t=this.getUrl();return Object.fromEntries(Object.entries({"-webkit-mask-image":`url(${t})`,"mask-image":`url('${t}')`,transform:(this.scale&&!Number.isNaN(Number(this.scale))?"scale("+this.scale+")":"")+(this.rotate&&!Number.isNaN(Number(this.rotate))?" rotate("+this.rotate+"deg)":"")}).filter((([t,i])=>null!==i)))}render(){return e(n,{key:"ce81db69bf77d09a0a331bac48cdaede7ff3cb8e","data-version":o},e("span",{key:"211f999da845687289fd991421f4315a090a67ba",style:this.getStyles()}))}get host(){return this}static get style(){return":host{display:inline-block;width:1em;height:1em;vertical-align:-0.15em}span{display:block;width:100%;height:100%;fill:currentColor;forced-color-adjust:preserve-parent-color;background-color:currentColor;-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100%;mask-size:100%}:host([flip-h]:not([flip-h=false])){scale:-1 1}:host([flip-v]:not([flip-v=false])){scale:1 -1}:host([flip-h][flip-v]:not([flip-h=false],[flip-v=false])){scale:-1}:host([animation]){transform-origin:center}:host([animation=cylon]){animation:icon-animation-cylon .75s ease-in-out infinite alternate}:host([animation=cylon-vertical]){animation:icon-animation-cylon-vertical .75s ease-in-out infinite alternate}:host([animation=spin]){animation:icon-animation-spin 2s linear infinite normal}:host([animation=spin-reverse]){animation:icon-animation-spin 2s linear infinite reverse}:host([animation=fade]){animation:icon-animation-fade .75s ease-in-out infinite alternate}:host([animation=throb]){animation:icon-animation-throb .75s ease-in-out infinite alternate}@keyframes icon-animation-cylon{from{transform:translateX(-25%)}to{transform:translateX(25%)}}@keyframes icon-animation-cylon-vertical{from{transform:translateY(25%)}to{transform:translateY(-25%)}}@keyframes icon-animation-fade{from{opacity:.1}to{opacity:1}}@keyframes icon-animation-spin{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}@keyframes icon-animation-throb{from{opacity:.5;transform:scale(0.5)}to{opacity:1;transform:scale(1)}}"}},[1,"post-icon",{animation:[513],base:[1],url:[1],flipH:[516,"flip-h"],flipV:[516,"flip-v"],name:[513],rotate:[2],scale:[2]}]);function p(){"undefined"!=typeof customElements&&["post-icon"].forEach((t=>{"post-icon"===t&&(customElements.get(a(t))||customElements.define(a(t),f))}))}c([s(["cylon","cylon-vertical","spin","spin-reverse","fade","throb"])],f.prototype,"animation",void 0),c([r("string")],f.prototype,"base",void 0),c([m(),r("string")],f.prototype,"name",void 0),c([r("number")],f.prototype,"rotate",void 0),c([r("number")],f.prototype,"scale",void 0),p();export{f as P,p as d}
1
+ import{p as t,H as i,h as e,a as n,t as a}from"./index.js";import"./p-Bji_4dfL.js";import{v as o}from"./p-Y58zWPwj.js";import{O as s}from"./p-BaB8wJvk.js";import{T as r}from"./p-B_WnO-QF.js";import{R as m}from"./p-4wtxqxXu.js";var c=function(t,i,e,n){var a,o=arguments.length,s=o<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,e):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,i,e,n);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(s=(o<3?a(s):o>3?a(i,e,s):a(i,e))||s);return o>3&&s&&Object.defineProperty(i,e,s),s};const l=`https://unpkg.com/@swisspost/design-system-icons@${o}/public/post-icons/`,f=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.flipH=!1,this.flipV=!1}getUrl(){const t=`${this.name??this.host.getAttribute("name")}.svg`;if(this.url?.startsWith("data:image/"))return this.url;if(this.url)return this.url;const i=t=>/^https?:\/\//.test(t),e=t=>t&&!t.endsWith("/")?`${t}/`:t,n=t=>t.replaceAll(/([^:])\/\//g,"$1/"),a=globalThis.location.origin,o=document.querySelector("base[href]")?.getAttribute("href")||"";let s="";{const t=document.querySelector('meta[name="design-system-settings"]');s=t?.getAttribute("data-post-icon-base")||""}const r=t=>{const n=e(o),s=e(t);return i(n)?`${n}${s}`:`${a}${n}${s}`};let m;return this.base?(m=i(this.base)?`${e(this.base)}${t}`:`${r(this.base)}${t}`,n(m)):s?(m=i(s)?`${e(s)}${t}`:`${r(s)}${t}`,n(m)):n(`${l}${t}`)}getStyles(){const t=this.getUrl();return Object.fromEntries(Object.entries({"-webkit-mask-image":`url(${t})`,"mask-image":`url('${t}')`,transform:(this.scale&&!Number.isNaN(Number(this.scale))?"scale("+this.scale+")":"")+(this.rotate&&!Number.isNaN(Number(this.rotate))?" rotate("+this.rotate+"deg)":"")}).filter((([t,i])=>null!==i)))}render(){return e(n,{key:"ce81db69bf77d09a0a331bac48cdaede7ff3cb8e","data-version":o},e("span",{key:"211f999da845687289fd991421f4315a090a67ba",style:this.getStyles()}))}get host(){return this}static get style(){return":host{display:inline-block;width:1em;height:1em;vertical-align:-0.15em}span{display:block;width:100%;height:100%;fill:currentColor;forced-color-adjust:preserve-parent-color;background-color:currentColor;-webkit-mask-position:center center;mask-position:center center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:100%;mask-size:100%}:host([flip-h]:not([flip-h=false])){scale:-1 1}:host([flip-v]:not([flip-v=false])){scale:1 -1}:host([flip-h][flip-v]:not([flip-h=false],[flip-v=false])){scale:-1}:host([animation]){transform-origin:center}:host([animation=cylon]){animation:icon-animation-cylon .75s ease-in-out infinite alternate}:host([animation=cylon-vertical]){animation:icon-animation-cylon-vertical .75s ease-in-out infinite alternate}:host([animation=spin]){animation:icon-animation-spin 2s linear infinite normal}:host([animation=spin-reverse]){animation:icon-animation-spin 2s linear infinite reverse}:host([animation=fade]){animation:icon-animation-fade .75s ease-in-out infinite alternate}:host([animation=throb]){animation:icon-animation-throb .75s ease-in-out infinite alternate}@keyframes icon-animation-cylon{from{transform:translateX(-25%)}to{transform:translateX(25%)}}@keyframes icon-animation-cylon-vertical{from{transform:translateY(25%)}to{transform:translateY(-25%)}}@keyframes icon-animation-fade{from{opacity:.1}to{opacity:1}}@keyframes icon-animation-spin{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}@keyframes icon-animation-throb{from{opacity:.5;transform:scale(0.5)}to{opacity:1;transform:scale(1)}}"}},[1,"post-icon",{animation:[513],base:[1],url:[1],flipH:[516,"flip-h"],flipV:[516,"flip-v"],name:[513],rotate:[2],scale:[2]}]);function p(){"undefined"!=typeof customElements&&["post-icon"].forEach((t=>{"post-icon"===t&&(customElements.get(a(t))||customElements.define(a(t),f))}))}c([s(["cylon","cylon-vertical","spin","spin-reverse","fade","throb"])],f.prototype,"animation",void 0),c([r("string")],f.prototype,"base",void 0),c([m(),r("string")],f.prototype,"name",void 0),c([r("number")],f.prototype,"rotate",void 0),c([r("number")],f.prototype,"scale",void 0),p();export{f as P,p as d}
@@ -0,0 +1 @@
1
+ import{p as t,H as e,h as o,a as i,t as r}from"./index.js";import"./p-Bji_4dfL.js";import{v as n}from"./p-Y58zWPwj.js";import{d as c}from"./p-BJXXw0kF.js";import{O as s}from"./p-BaB8wJvk.js";import{R as a}from"./p-4wtxqxXu.js";var d=function(t,e,o,i){var r,n=arguments.length,c=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(c=(n<3?r(c):n>3?r(e,o,c):r(e,o))||c);return n>3&&c&&Object.defineProperty(e,o,c),c};const b=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.internals=this.attachInternals(),this.buttonType="button",this.placement="auto",this.size="default"}componentDidLoad(){globalThis.MutationObserver&&(this.mutationObserver=new MutationObserver(this.checkContent.bind(this)),this.mutationObserver.observe(this.host,{childList:!0})),this.checkContent()}disconnectedCallback(){this.mutationObserver&&this.mutationObserver.disconnect()}checkContent(){const t=this.visuallyHidden.querySelector("slot"),e=t?.assignedNodes({flatten:!0}).some((t=>t.textContent?.trim()));e||console.error(`The \`${this.host.localName}\` component requires content for accessibility.`)}handleClick(){"reset"===this.buttonType&&this.internals.form?.reset(),this.host.closest("dialog")?.close()}render(){return o(i,{key:"22ac2b07e9a8a8f8d157423fea1bcedb2c4f9b11","data-version":n},o("button",{key:"91eb413a2546f131e4c97c28340374addbf2c7a7",type:this.buttonType,class:"btn btn-icon btn-secondary btn-sm",onClick:()=>this.handleClick()},o("post-icon",{key:"02202b3df2e5830aeb267921c924c1e75508d546","aria-hidden":"true",name:"closex"}),o("span",{key:"c691c845dd58b4f975c33791d29518428ade6ee8",ref:t=>this.visuallyHidden=t,class:"visually-hidden"},o("slot",{key:"3fd42b82ef1d1ea76343e0c69f421a2916c26006"}))))}static get formAssociated(){return!0}get host(){return this}static get style(){return".btn{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)}.btn:not(:disabled):hover{text-decoration:none}.btn:disabled{border-style:var(--post-core-border-style-dash);cursor:unset}.btn{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}.btn:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){.btn:is(:focus-visible,:focus-within,.pretend-focus){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){.btn: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){.btn:is(button){background-color:ButtonFace !important;border:1px solid ButtonBorder !important}.btn:not(:disabled,.disabled):is(button):hover{background-color:Highlight !important}.btn:not(:disabled,.disabled):is(button):hover>post-icon{color:HighlightText !important}}.btn>post-icon{width:var(--post-device-sizing-interactive-button-icon-4);height:var(--post-device-sizing-interactive-button-icon-4)}.btn-primary{box-shadow:var(--post-device-elevation-100);border-color:var(--post-scheme-color-interactive-button-primary-enabled-stroke);color:var(--post-scheme-color-interactive-button-primary-enabled-fg);background-color:var(--post-scheme-color-interactive-button-primary-enabled-bg)}.btn-primary:disabled{border-color:var(--post-scheme-color-interactive-button-primary-disabled-stroke);color:var(--post-scheme-color-interactive-button-primary-disabled-fg);background-color:var(--post-scheme-color-interactive-button-primary-disabled-bg)}.btn-primary:not(:disabled):hover,.btn-primary.pretend-hover{border-color:var(--post-scheme-color-interactive-button-primary-hover-stroke);color:var(--post-scheme-color-interactive-button-primary-hover-fg);background-color:var(--post-scheme-color-interactive-button-primary-hover-bg)}.btn-default{box-shadow:var(--post-device-elevation-100);border-color:var(--post-scheme-color-interactive-button-secondary-enabled-stroke);color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);background-color:var(--post-scheme-color-interactive-button-secondary-enabled-bg)}.btn-default:disabled{border-color:var(--post-scheme-color-interactive-button-secondary-disabled-stroke);color:var(--post-scheme-color-interactive-button-secondary-disabled-fg);background-color:var(--post-scheme-color-interactive-button-secondary-disabled-bg)}.btn-default:not(:disabled):hover,.btn-default.pretend-hover{border-color:var(--post-scheme-color-interactive-button-secondary-hover-stroke);color:var(--post-scheme-color-interactive-button-secondary-hover-fg);background-color:var(--post-scheme-color-interactive-button-secondary-hover-bg)}.btn-secondary{box-shadow:var(--post-device-elevation-100);border-color:var(--post-scheme-color-interactive-button-secondary-enabled-stroke);color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);background-color:var(--post-scheme-color-interactive-button-secondary-enabled-bg)}.btn-secondary:disabled{border-color:var(--post-scheme-color-interactive-button-secondary-disabled-stroke);color:var(--post-scheme-color-interactive-button-secondary-disabled-fg);background-color:var(--post-scheme-color-interactive-button-secondary-disabled-bg)}.btn-secondary:not(:disabled):hover,.btn-secondary.pretend-hover{border-color:var(--post-scheme-color-interactive-button-secondary-hover-stroke);color:var(--post-scheme-color-interactive-button-secondary-hover-fg);background-color:var(--post-scheme-color-interactive-button-secondary-hover-bg)}.btn-tertiary{border-color:var(--post-scheme-color-interactive-button-tertiary-enabled-stroke);color:var(--post-scheme-color-interactive-button-tertiary-enabled-fg);background-color:var(--post-scheme-color-interactive-button-tertiary-enabled-bg)}.btn-tertiary:disabled{border-color:var(--post-scheme-color-interactive-button-tertiary-disabled-stroke);color:var(--post-scheme-color-interactive-button-tertiary-disabled-fg);background-color:var(--post-scheme-color-interactive-button-tertiary-disabled-bg)}.btn-tertiary:not(:disabled):hover,.btn-tertiary.pretend-hover{border-color:var(--post-scheme-color-interactive-button-tertiary-hover-stroke);color:var(--post-scheme-color-interactive-button-tertiary-hover-fg);background-color:var(--post-scheme-color-interactive-button-tertiary-hover-bg)}.btn-link{border-color:var(--post-scheme-color-interactive-button-tertiary-enabled-stroke);color:var(--post-scheme-color-interactive-button-tertiary-enabled-fg)}.btn-link:disabled{border-color:var(--post-scheme-color-interactive-button-tertiary-disabled-stroke);color:var(--post-scheme-color-interactive-button-tertiary-disabled-fg)}.btn-link:not(:disabled):hover,.btn-link.pretend-hover{border-color:var(--post-scheme-color-interactive-button-tertiary-hover-stroke);color:var(--post-scheme-color-interactive-button-tertiary-hover-fg)}.btn-sm{min-height:var(--post-device-sizing-interactive-button-height-4);gap:var(--post-device-spacing-gap-inline-11);padding:0 var(--post-device-spacing-padding-inline-7)}.btn-sm>post-icon{width:var(--post-device-sizing-interactive-button-icon-5);height:var(--post-device-sizing-interactive-button-icon-5)}.btn-lg{min-height:var(--post-device-sizing-interactive-button-height-2);gap:var(--post-device-spacing-gap-inline-1);padding:0 var(--post-device-spacing-padding-inline-5)}.btn-lg>post-icon{width:var(--post-device-sizing-interactive-button-icon-3);height:var(--post-device-sizing-interactive-button-icon-3)}.btn-link{-webkit-text-decoration:var(--post-core-text-decoration-underline);text-decoration:var(--post-core-text-decoration-underline);border:0 none;border-radius:0;min-height:0;font-size:inherit;font-weight:inherit;padding:0}.btn-link:is(:focus-visible,:has(:focus-visible),.pretend-focus){border-radius:var(--post-device-border-radius-focus)}@supports not selector(:has(:focus-visible)){.btn-link:is(:focus-visible,:focus-within,.pretend-focus){border-radius:var(--post-device-border-radius-focus)}}.btn-link:hover{color:var(--post-scheme-color-interactive-primary-hover-fg1)}.btn-icon{padding:0;width:var(--post-device-sizing-interactive-button-height-1);height:var(--post-device-sizing-interactive-button-height-1);min-height:0;vertical-align:text-bottom}.btn-icon.btn-link{width:var(--post-device-sizing-interactive-button-icon-4);height:var(--post-device-sizing-interactive-button-icon-4)}.btn-icon>post-icon{display:block;width:var(--post-device-sizing-interactive-button-icon-4);height:var(--post-device-sizing-interactive-button-icon-4)}.btn-icon.btn-sm{padding:0;width:var(--post-device-sizing-interactive-button-height-4);height:var(--post-device-sizing-interactive-button-height-4);min-height:0;vertical-align:text-bottom}.btn-icon.btn-sm.btn-link{width:var(--post-device-sizing-interactive-button-icon-5);height:var(--post-device-sizing-interactive-button-icon-5)}.btn-icon.btn-sm>post-icon{display:block;width:var(--post-device-sizing-interactive-button-icon-5);height:var(--post-device-sizing-interactive-button-icon-5)}.btn-icon.btn-lg{padding:0;width:var(--post-device-sizing-interactive-button-height-2);height:var(--post-device-sizing-interactive-button-height-2);min-height:0;vertical-align:text-bottom}.btn-icon.btn-lg.btn-link{width:var(--post-device-sizing-interactive-button-icon-3);height:var(--post-device-sizing-interactive-button-icon-3)}.btn-icon.btn-lg>post-icon{display:block;width:var(--post-device-sizing-interactive-button-icon-3);height:var(--post-device-sizing-interactive-button-icon-3)}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}:host .btn{background-color:var(--post-scheme-color-interactive-primary-enabled-bg1)}:host .btn:not(:disabled):hover,:host .btn.pretend-hover{background-color:var(--post-scheme-color-interactive-primary-hover-bg)}:host(:not([placement])),:host([placement=auto]){position:absolute;inset-block-start:0;inset-inline-end:0;transform:translate(50%, -50%)}:host([size=small]) .btn{height:var(--post-device-sizing-interactive-button-height-7);width:var(--post-device-sizing-interactive-button-height-7)}"}},[321,"post-closebutton",{buttonType:[1,"button-type"],placement:[513],size:[513]}]);function l(){"undefined"!=typeof customElements&&["post-closebutton","post-icon"].forEach((t=>{switch(t){case"post-closebutton":customElements.get(r(t))||customElements.define(r(t),b);break;case"post-icon":customElements.get(r(t))||c()}}))}d([s(["button","reset"])],b.prototype,"buttonType",void 0),d([a(),s(["manual","auto"])],b.prototype,"placement",void 0),d([a(),s(["default","small"])],b.prototype,"size",void 0),l();export{b as P,l as d}
@@ -1 +1 @@
1
- import{p as t,H as e,h as s,a as o,t as i}from"./index.js";import{v as r}from"./p-d02KpeUM.js";const a=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.toggled=!1,this.handleClick=()=>{this.toggled=!this.toggled},this.handleKeydown=t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.host.click())}}componentWillLoad(){this.host.addEventListener("click",(()=>this.handleClick()),{capture:!0}),this.host.addEventListener("keydown",(t=>this.handleKeydown(t)),{capture:!0})}render(){return s(o,{key:"6f61a07946f3e67bace0a883b73c424893c4043d","data-version":r,role:"button",tabindex:"0","aria-pressed":this.toggled.toString()},s("slot",{key:"fd9b93e45da499dbb790ad675f3db36e248c1960"}))}get host(){return this}static get style(){return":host{cursor:pointer;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(:focus-visible){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(:focus-visible){outline-color:Highlight !important}}:host([aria-pressed=true]) ::slotted([data-showwhen=untoggled]){display:none}:host([aria-pressed=false]) ::slotted([data-showwhen=toggled]){display:none}"}},[257,"post-togglebutton",{toggled:[1028]}]);function n(){"undefined"!=typeof customElements&&["post-togglebutton"].forEach((t=>{"post-togglebutton"===t&&(customElements.get(i(t))||customElements.define(i(t),a))}))}n();export{a as P,n as d}
1
+ import{p as t,H as e,h as s,a as o,t as i}from"./index.js";import{v as r}from"./p-Y58zWPwj.js";const a=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.toggled=!1,this.handleClick=()=>{this.toggled=!this.toggled},this.handleKeydown=t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.host.click())}}componentWillLoad(){this.host.addEventListener("click",(()=>this.handleClick()),{capture:!0}),this.host.addEventListener("keydown",(t=>this.handleKeydown(t)),{capture:!0})}render(){return s(o,{key:"6f61a07946f3e67bace0a883b73c424893c4043d","data-version":r,role:"button",tabindex:"0","aria-pressed":this.toggled.toString()},s("slot",{key:"fd9b93e45da499dbb790ad675f3db36e248c1960"}))}get host(){return this}static get style(){return":host{cursor:pointer;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(:focus-visible){outline-style:var(--post-core-border-style-solid) !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host(:focus-visible){outline-color:Highlight !important}}:host([aria-pressed=true]) ::slotted([data-showwhen=untoggled]){display:none}:host([aria-pressed=false]) ::slotted([data-showwhen=toggled]){display:none}"}},[257,"post-togglebutton",{toggled:[1028]}]);function n(){"undefined"!=typeof customElements&&["post-togglebutton"].forEach((t=>{"post-togglebutton"===t&&(customElements.get(i(t))||customElements.define(i(t),a))}))}n();export{a as P,n as d}
@@ -1 +1 @@
1
- import{p as t,H as e,c as s,h as o,a as i,t as l}from"./index.js";import"./p-Bji_4dfL.js";import{v as r}from"./p-d02KpeUM.js";import{T as a}from"./p-B_WnO-QF.js";const c={height:"0",overflow:"hidden"},n={duration:!globalThis.matchMedia||globalThis.matchMedia("(prefers-reduced-motion: reduce)").matches?0:350,easing:"ease",fill:"forwards"};const h=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postToggle=s(this,"postToggle"),this.collapsed=!1}get isExpanded(){return!this.collapsed}componentDidLoad(){this.updateTriggers()}async toggle(t=!this.isExpanded){if(t===this.isExpanded)return this.isExpanded;this.collapsed=!t;const e=this.isExpanded;{const t=e?(s=this.host).animate([c,{height:`${s.scrollHeight}px`,offset:1,overflow:"hidden"},{height:"auto",overflow:"visible"}],n):function(t){const e=globalThis.getComputedStyle(t).height;return t.animate([{height:e},c],n)}(this.host);this.postToggle.emit(e),await t.finished,t.commitStyles(),this.updateTriggers()}var s;return e}updateTriggers(){const t=this.host.id?Array.from(document.querySelectorAll(`post-collapsible-trigger[for="${this.host.id}"]`)):[],e=this.host.closest("post-collapsible-trigger");e&&!t.includes(e)&&t.push(e),t.forEach((t=>t.update()))}render(){return o(i,{key:"709d3f49d65324984e0aef09068cbc7c52299dcc","data-version":r,tabindex:this.collapsed?-1:void 0,style:this.collapsed?c:void 0},o("slot",{key:"c278bdbac8e10e9169a69ffe3037325016cc3fcb"}))}get host(){return this}static get style(){return":host{display:block;position:relative;overflow:var(--post-collapsible-initial-overflow, hidden);height:var(--post-collapsible-initial-height, auto)}"}},[257,"post-collapsible",{collapsed:[1028],toggle:[64]}]);function p(){"undefined"!=typeof customElements&&["post-collapsible"].forEach((t=>{"post-collapsible"===t&&(customElements.get(l(t))||customElements.define(l(t),h))}))}(function(t,e,s,o){var i,l=arguments.length,r=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,s):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,s,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(r=(l<3?i(r):l>3?i(e,s,r):i(e,s))||r);l>3&&r&&Object.defineProperty(e,s,r)})([a("boolean")],h.prototype,"collapsed",void 0),p();export{h as P,p as d}
1
+ import{p as t,H as e,c as s,h as o,a as i,t as l}from"./index.js";import"./p-Bji_4dfL.js";import{v as r}from"./p-Y58zWPwj.js";import{T as a}from"./p-B_WnO-QF.js";const n={height:"0",overflow:"hidden"},c={duration:!globalThis.matchMedia||globalThis.matchMedia("(prefers-reduced-motion: reduce)").matches?0:350,easing:"ease",fill:"forwards"};const h=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postToggle=s(this,"postToggle"),this.collapsed=!1}get isExpanded(){return!this.collapsed}componentDidLoad(){this.updateTriggers()}async toggle(t=!this.isExpanded){if(t===this.isExpanded)return this.isExpanded;this.collapsed=!t;const e=this.isExpanded;{const t=e?(s=this.host).animate([n,{height:`${s.scrollHeight}px`,offset:1,overflow:"hidden"},{height:"auto",overflow:"visible"}],c):function(t){const e=globalThis.getComputedStyle(t).height;return t.animate([{height:e},n],c)}(this.host);this.postToggle.emit(e),await t.finished,t.commitStyles(),this.updateTriggers()}var s;return e}updateTriggers(){const t=this.host.id?Array.from(document.querySelectorAll(`post-collapsible-trigger[for="${this.host.id}"]`)):[],e=this.host.closest("post-collapsible-trigger");e&&!t.includes(e)&&t.push(e),t.forEach((t=>t.update()))}render(){return o(i,{key:"d4fef8eff9b716e9dff0e570f5993221ca631ed5","data-version":r,tabindex:this.collapsed?-1:void 0,style:this.collapsed?n:void 0},o("slot",{key:"ee957da050187c1cfd752e0dcb6b5f86505f5089"}))}get host(){return this}static get style(){return":host{display:block;position:relative;overflow:var(--post-collapsible-initial-overflow, hidden);height:var(--post-collapsible-initial-height, auto)}"}},[257,"post-collapsible",{collapsed:[1028],toggle:[64]}]);function f(){"undefined"!=typeof customElements&&["post-collapsible"].forEach((t=>{"post-collapsible"===t&&(customElements.get(l(t))||customElements.define(l(t),h))}))}(function(t,e,s,o){var i,l=arguments.length,r=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,s):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,s,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(r=(l<3?i(r):l>3?i(e,s,r):i(e,s))||r);l>3&&r&&Object.defineProperty(e,s,r)})([a("boolean")],h.prototype,"collapsed",void 0),f();export{h as P,f as d}
@@ -1 +1 @@
1
- import{p as e,H as t,c as s,h as o,a as i,t as n}from"./index.js";import{d as a,a as r}from"./p-BkWqx_6U.js";import"./p-Bji_4dfL.js";import{E as h}from"./p-rEfV4v4a.js";import{g as c}from"./p-DsaGKkkf.js";import{g as l}from"./p-08F-DB-d.js";import{v as p}from"./p-d02KpeUM.js";import{O as d}from"./p-BaB8wJvk.js";import{R as m}from"./p-4wtxqxXu.js";import{T as f}from"./p-B_WnO-QF.js";var u=function(e,t,s,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,s):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,o);else for(var r=e.length-1;r>=0;r--)(i=e[r])&&(a=(n<3?i(a):n>3?i(t,s,a):i(t,s))||a);return n>3&&a&&Object.defineProperty(t,s,a),a};const b=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.toggleMenu=s(this,"toggleMenu"),this.lastFocusedElement=null,this.KEYCODES={SPACE:" ",ENTER:"Enter",UP:"ArrowUp",DOWN:"ArrowDown",TAB:"Tab",HOME:"Home",END:"End",ESCAPE:"Escape"},this.placement="bottom",this.isVisible=!1,this.handleKeyDown=e=>{e.stopPropagation(),e.key!==this.KEYCODES.ESCAPE?Object.values(this.KEYCODES).includes(e.key)&&this.controlKeyDownHandler(e):this.toggle(this.host)},this.handleClick=e=>{["BUTTON","A","INPUT","SELECT","TEXTAREA"].includes(e.target.tagName)&&this.toggle(this.host)}}connectedCallback(){this.root=l(this.host),this.host.addEventListener("keydown",this.handleKeyDown),this.host.addEventListener("click",this.handleClick)}disconnectedCallback(){this.host.removeEventListener("keydown",this.handleKeyDown),this.host.removeEventListener("click",this.handleClick)}async toggle(e){this.popoverRef?await this.popoverRef.toggle(e):console.error("toggle: popoverRef is null or undefined")}async show(e){this.popoverRef?await this.popoverRef.show(e):console.error("show: popoverRef is null or undefined")}async hide(){this.popoverRef?await this.popoverRef.hide():console.error("hide: popoverRef is null or undefined")}handlePostShown(e){if(e.detail.first){this.host.setAttribute("role","menu");const e=this.getSlottedItems();for(const t of e)t.setAttribute("role","menuitem");this.label&&this.host.setAttribute("aria-label",this.label)}}handlePostBeforeToggle(e){this.isVisible=e.detail.willOpen,this.toggleMenu.emit(this.isVisible),this.isVisible?(this.lastFocusedElement=this.root?.activeElement,requestAnimationFrame((()=>{const e=this.getSlottedItems();e.length>0&&e[0].focus()}))):this.lastFocusedElement&&this.lastFocusedElement.focus()}controlKeyDownHandler(e){const t=this.getSlottedItems();if(0===t.length)return;let s=t.findIndex((e=>e===l(e).activeElement));switch(e.key){case this.KEYCODES.UP:e.preventDefault(),s=(s-1+t.length)%t.length;break;case this.KEYCODES.DOWN:e.preventDefault(),s=(s+1)%t.length;break;case this.KEYCODES.HOME:e.preventDefault(),s=0;break;case this.KEYCODES.END:e.preventDefault(),s=t.length-1;break;case this.KEYCODES.SPACE:return void this.toggle(this.host);case this.KEYCODES.TAB:this.toggle(this.host)}t[s]&&t[s].focus()}getSlottedItems(){const e=this.host.shadowRoot.querySelectorAll("slot"),t=[];return e.forEach((e=>t.push(...e.assignedElements()))),t.flatMap((e=>e instanceof HTMLSlotElement?e.assignedElements():e)).flatMap((e=>[...c(e),...e.shadowRoot?c(e.shadowRoot):[]]))}render(){return o(i,{key:"31142d851d591bc46a43f36b553b6c7abee90674","data-version":p},o("post-popovercontainer",{key:"6b4b2a04b25904115fe1c337e73e382a4e162259",onPostShow:this.handlePostShown.bind(this),onPostBeforeToggle:this.handlePostBeforeToggle.bind(this),placement:this.placement,ref:e=>this.popoverRef=e},o("div",{key:"1284650d5796455201d55e1ecad3507518c7c32c",part:"post-menu"},o("slot",{key:"b2dbd125a631c06a591e67c52fd61524bcf037ea",name:"header"}),o("slot",{key:"3b15ec3ad5a25e2e22b6e26e17d9d2d76e9f64fb"}))))}get host(){return this}static get style(){return":host{display:block}:where([part=post-menu]){display:flex;flex-direction:column;padding-block:.5rem}::slotted([slot=header]){margin-top:-0.5rem;padding:1rem;display:flex;align-items:center;gap:.5rem;border-block-end:1px solid #050400;font-weight:700}@media screen and (max-width: 1023.98px){::slotted([slot=header]){padding:.75rem 1rem}}@media screen and (max-width: 779.98px){::slotted([slot=header]){padding:.5rem 1rem}}post-popovercontainer::part(post-popovercontainer-content){background-color:#fff}"}},[257,"post-menu",{placement:[1],label:[513],isVisible:[32],toggle:[64],show:[64],hide:[64]}]);function g(){"undefined"!=typeof customElements&&["post-menu","post-popovercontainer"].forEach((e=>{switch(e){case"post-menu":customElements.get(n(e))||customElements.define(n(e),b);break;case"post-popovercontainer":customElements.get(n(e))||a()}}))}u([d(r)],b.prototype,"placement",void 0),u([m(),f("string")],b.prototype,"label",void 0),u([h("post-popovercontainer")],b.prototype,"handlePostShown",null),u([h("post-popovercontainer")],b.prototype,"handlePostBeforeToggle",null),g();export{b as P,g as d}
1
+ import{p as e,H as t,c as s,h as o,a as i,t as n}from"./index.js";import{d as a,a as r}from"./p-Du33y-6X.js";import"./p-Bji_4dfL.js";import{E as h}from"./p-rEfV4v4a.js";import{g as c}from"./p-DsaGKkkf.js";import{g as l}from"./p-08F-DB-d.js";import{v as p}from"./p-Y58zWPwj.js";import{O as d}from"./p-BaB8wJvk.js";import{R as m}from"./p-4wtxqxXu.js";import{T as f}from"./p-B_WnO-QF.js";var u=function(e,t,s,o){var i,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,s):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,s,o);else for(var r=e.length-1;r>=0;r--)(i=e[r])&&(a=(n<3?i(a):n>3?i(t,s,a):i(t,s))||a);return n>3&&a&&Object.defineProperty(t,s,a),a};const b=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.toggleMenu=s(this,"toggleMenu"),this.lastFocusedElement=null,this.KEYCODES={SPACE:" ",ENTER:"Enter",UP:"ArrowUp",DOWN:"ArrowDown",TAB:"Tab",HOME:"Home",END:"End",ESCAPE:"Escape"},this.placement="bottom",this.isVisible=!1,this.handleKeyDown=e=>{e.stopPropagation(),e.key!==this.KEYCODES.ESCAPE?Object.values(this.KEYCODES).includes(e.key)&&this.controlKeyDownHandler(e):this.toggle(this.host)},this.handleClick=e=>{["BUTTON","A","INPUT","SELECT","TEXTAREA"].includes(e.target.tagName)&&this.toggle(this.host)}}connectedCallback(){this.root=l(this.host),this.host.addEventListener("keydown",this.handleKeyDown),this.host.addEventListener("click",this.handleClick)}disconnectedCallback(){this.host.removeEventListener("keydown",this.handleKeyDown),this.host.removeEventListener("click",this.handleClick)}async toggle(e){this.popoverRef?await this.popoverRef.toggle(e):console.error("toggle: popoverRef is null or undefined")}async show(e){this.popoverRef?await this.popoverRef.show(e):console.error("show: popoverRef is null or undefined")}async hide(){this.popoverRef?await this.popoverRef.hide():console.error("hide: popoverRef is null or undefined")}handlePostShown(e){if(e.detail.first){this.host.setAttribute("role","menu");const e=this.getSlottedItems();for(const t of e)t.setAttribute("role","menuitem");this.label&&this.host.setAttribute("aria-label",this.label)}}handlePostBeforeToggle(e){this.isVisible=e.detail.willOpen,this.toggleMenu.emit(this.isVisible),this.isVisible?(this.lastFocusedElement=this.root?.activeElement,requestAnimationFrame((()=>{const e=this.getSlottedItems();e.length>0&&e[0].focus()}))):this.lastFocusedElement&&this.lastFocusedElement.focus()}controlKeyDownHandler(e){const t=this.getSlottedItems();if(0===t.length)return;let s=t.findIndex((e=>e===l(e).activeElement));switch(e.key){case this.KEYCODES.UP:e.preventDefault(),s=(s-1+t.length)%t.length;break;case this.KEYCODES.DOWN:e.preventDefault(),s=(s+1)%t.length;break;case this.KEYCODES.HOME:e.preventDefault(),s=0;break;case this.KEYCODES.END:e.preventDefault(),s=t.length-1;break;case this.KEYCODES.SPACE:return void this.toggle(this.host);case this.KEYCODES.TAB:this.toggle(this.host)}t[s]&&t[s].focus()}getSlottedItems(){const e=this.host.shadowRoot.querySelectorAll("slot"),t=[];return e.forEach((e=>t.push(...e.assignedElements()))),t.flatMap((e=>e instanceof HTMLSlotElement?e.assignedElements():e)).flatMap((e=>[...c(e),...e.shadowRoot?c(e.shadowRoot):[]]))}render(){return o(i,{key:"31142d851d591bc46a43f36b553b6c7abee90674","data-version":p},o("post-popovercontainer",{key:"6b4b2a04b25904115fe1c337e73e382a4e162259",onPostShow:this.handlePostShown.bind(this),onPostBeforeToggle:this.handlePostBeforeToggle.bind(this),placement:this.placement,ref:e=>this.popoverRef=e},o("div",{key:"1284650d5796455201d55e1ecad3507518c7c32c",part:"post-menu"},o("slot",{key:"b2dbd125a631c06a591e67c52fd61524bcf037ea",name:"header"}),o("slot",{key:"3b15ec3ad5a25e2e22b6e26e17d9d2d76e9f64fb"}))))}get host(){return this}static get style(){return":host{display:block}:where([part=post-menu]){display:flex;flex-direction:column;padding-block:.5rem}::slotted([slot=header]){margin-top:-0.5rem;padding:1rem;display:flex;align-items:center;gap:.5rem;border-block-end:1px solid #050400;font-weight:700}@media screen and (max-width: 1023.98px){::slotted([slot=header]){padding:.75rem 1rem}}@media screen and (max-width: 779.98px){::slotted([slot=header]){padding:.5rem 1rem}}post-popovercontainer::part(post-popovercontainer-content){background-color:#fff}"}},[257,"post-menu",{placement:[1],label:[513],isVisible:[32],toggle:[64],show:[64],hide:[64]}]);function g(){"undefined"!=typeof customElements&&["post-menu","post-popovercontainer"].forEach((e=>{switch(e){case"post-menu":customElements.get(n(e))||customElements.define(n(e),b);break;case"post-popovercontainer":customElements.get(n(e))||a()}}))}u([d(r)],b.prototype,"placement",void 0),u([m(),f("string")],b.prototype,"label",void 0),u([h("post-popovercontainer")],b.prototype,"handlePostShown",null),u([h("post-popovercontainer")],b.prototype,"handlePostBeforeToggle",null),g();export{b as P,g as d}
@@ -1 +1 @@
1
- import{p as t,H as s,h as e,a as o,t as i}from"./index.js";import"./p-Bji_4dfL.js";import{g as n}from"./p-08F-DB-d.js";import{v as r}from"./p-d02KpeUM.js";import{R as a}from"./p-4wtxqxXu.js";import{T as h}from"./p-B_WnO-QF.js";const c=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.updateAriaExpanded=this.updateAriaExpanded.bind(this)}connectedCallback(){this.root=n(this.host)}componentDidLoad(){this.setAriaAttributes(),this.root&&this.root.addEventListener("toggleMenu",this.updateAriaExpanded)}disconnectedCallback(){this.root.removeEventListener("toggleMenu",this.updateAriaExpanded)}updateAriaExpanded(t){const s=t.target;"post-menu"===s.localName&&s.id===this.for&&this.slottedButton.setAttribute("aria-expanded",t.detail.toString())}setAriaAttributes(){const t=this.host.querySelectorAll("button");1===t.length?(this.slottedButton=t.item(0),this.slottedButton.setAttribute("type","button"),this.slottedButton.setAttribute("aria-haspopup","menu"),this.slottedButton.setAttribute("aria-expanded","false"),this.slottedButton.addEventListener("click",this.handleToggle.bind(this)),this.slottedButton.addEventListener("keydown",this.handleKeyDown.bind(this))):console.warn(`The post-menu-trigger should contain exactly one button (${t.length} found).`)}handleKeyDown(t){"ArrowUp"!==t.key&&"ArrowDown"!==t.key||(t.preventDefault(),this.handleToggle())}handleToggle(){const t=this.getMenu();t&&t.toggle(this.host)}getMenu(){const t=this.root.getElementById(this.for);return t&&"post-menu"===t.localName?t:(console.warn(`No post-menu found with ID: ${this.for}`),null)}render(){return e(o,{key:"8f43fe80dd56550141481f157a06caf559494291","data-version":r},e("slot",{key:"1b5d220cff9894918aedc54b0585df75095dcb0e"}))}get host(){return this}static get style(){return":host{display:inline-block}"}},[257,"post-menu-trigger",{for:[513]}]);function d(){"undefined"!=typeof customElements&&["post-menu-trigger"].forEach((t=>{"post-menu-trigger"===t&&(customElements.get(i(t))||customElements.define(i(t),c))}))}(function(t,s,e,o){var i,n=arguments.length,r=n<3?s:null===o?o=Object.getOwnPropertyDescriptor(s,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,s,e,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(r=(n<3?i(r):n>3?i(s,e,r):i(s,e))||r);n>3&&r&&Object.defineProperty(s,e,r)})([a(),h("string")],c.prototype,"for",void 0),d();export{c as P,d}
1
+ import{p as t,H as s,h as e,a as o,t as i}from"./index.js";import"./p-Bji_4dfL.js";import{g as n}from"./p-08F-DB-d.js";import{v as r}from"./p-Y58zWPwj.js";import{R as a}from"./p-4wtxqxXu.js";import{T as h}from"./p-B_WnO-QF.js";const c=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.updateAriaExpanded=this.updateAriaExpanded.bind(this)}connectedCallback(){this.root=n(this.host)}componentDidLoad(){this.setAriaAttributes(),this.root&&this.root.addEventListener("toggleMenu",this.updateAriaExpanded)}disconnectedCallback(){this.root.removeEventListener("toggleMenu",this.updateAriaExpanded)}updateAriaExpanded(t){const s=t.target;"post-menu"===s.localName&&s.id===this.for&&this.slottedButton.setAttribute("aria-expanded",t.detail.toString())}setAriaAttributes(){const t=this.host.querySelectorAll("button");1===t.length?(this.slottedButton=t.item(0),this.slottedButton.setAttribute("type","button"),this.slottedButton.setAttribute("aria-haspopup","menu"),this.slottedButton.setAttribute("aria-expanded","false"),this.slottedButton.addEventListener("click",this.handleToggle.bind(this)),this.slottedButton.addEventListener("keydown",this.handleKeyDown.bind(this))):console.warn(`The post-menu-trigger should contain exactly one button (${t.length} found).`)}handleKeyDown(t){"ArrowUp"!==t.key&&"ArrowDown"!==t.key||(t.preventDefault(),this.handleToggle())}handleToggle(){const t=this.getMenu();t&&t.toggle(this.host)}getMenu(){const t=this.root.getElementById(this.for);return t&&"post-menu"===t.localName?t:(console.warn(`No post-menu found with ID: ${this.for}`),null)}render(){return e(o,{key:"8f43fe80dd56550141481f157a06caf559494291","data-version":r},e("slot",{key:"1b5d220cff9894918aedc54b0585df75095dcb0e"}))}get host(){return this}static get style(){return":host{display:inline-block}"}},[257,"post-menu-trigger",{for:[513]}]);function u(){"undefined"!=typeof customElements&&["post-menu-trigger"].forEach((t=>{"post-menu-trigger"===t&&(customElements.get(i(t))||customElements.define(i(t),c))}))}(function(t,s,e,o){var i,n=arguments.length,r=n<3?s:null===o?o=Object.getOwnPropertyDescriptor(s,e):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,s,e,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(r=(n<3?i(r):n>3?i(s,e,r):i(s,e))||r);n>3&&r&&Object.defineProperty(s,e,r)})([a(),h("string")],c.prototype,"for",void 0),u();export{c as P,u as d}
@@ -1 +1 @@
1
- import{p as t,H as s,h as e,a as i,t as o}from"./index.js";import"./p-Bji_4dfL.js";import{E as l}from"./p-rEfV4v4a.js";import{g as r}from"./p-08F-DB-d.js";import{v as a}from"./p-d02KpeUM.js";import{T as n}from"./p-B_WnO-QF.js";var c=function(t,s,e,i){var o,l=arguments.length,r=l<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,s,e,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(l<3?o(r):l>3?o(s,e,r):o(s,e))||r);return l>3&&r&&Object.defineProperty(s,e,r),r};const h=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.observer=new MutationObserver((()=>this.setTrigger())),this.handlePostToggle=this.handlePostToggle.bind(this)}connectedCallback(){this.root=r(this.host),this.root.addEventListener("postToggle",this.handlePostToggle),this.observer.observe(this.host,{childList:!0,subtree:!0})}componentDidLoad(){this.setTrigger(),this.trigger||console.warn("The post-collapsible-trigger must contain a button."),this.collapsible||console.warn(`No post-collapsible found ${this.for?`with id "${this.for}"`:"nested inside <post-collapsible-trigger>"}. Either nest a post-collapsible inside the trigger or set the "for" attribute to the id of the collapsible.`)}disconnectedCallback(){this.observer.disconnect(),this.root?.removeEventListener("postToggle",this.handlePostToggle)}async update(){this.updateAriaAttributes()}handlePostToggle(t){this.trigger&&this.trigger.setAttribute("aria-expanded",`${t.detail}`)}updateAriaAttributes(){const t=this.collapsible;if(!this.trigger||!t)return;t.id||(t.id=`collapsible-${crypto.randomUUID()}`);const s=t.id,e=this.trigger.getAttribute("aria-controls"),i=e?e.split(/\s+/):[];i.includes(s)||(i.push(s),this.trigger.setAttribute("aria-controls",i.join(" "))),this.trigger.setAttribute("aria-expanded",`${!t.collapsed}`)}async toggleCollapsible(){await(this.collapsible?.toggle())}get collapsible(){const t=this.host.querySelector("post-collapsible")??(this.for?this.root?.getElementById(this.for)??null:null);return t&&"post-collapsible"===t.localName?t:null}setTrigger(){const t=Array.from(this.host.querySelectorAll("button")).find((t=>{const s=t.closest("post-collapsible");return!(s&&this.host.contains(s))}));!t||this.trigger&&t.isEqualNode(this.trigger)||(this.trigger=t,this.trigger.addEventListener("click",(()=>this.toggleCollapsible())),this.updateAriaAttributes())}render(){return e(i,{key:"a62109f3d0490576da241fba140f0e32d37411e8","data-version":a},e("slot",{key:"4f56c5761fce00e350febdcf80c36ea5b94fd037"}))}get host(){return this}},[257,"post-collapsible-trigger",{for:[513],update:[64]}]);function p(){"undefined"!=typeof customElements&&["post-collapsible-trigger"].forEach((t=>{"post-collapsible-trigger"===t&&(customElements.get(o(t))||customElements.define(o(t),h))}))}c([n("string")],h.prototype,"for",void 0),c([l("post-collapsible")],h.prototype,"handlePostToggle",null),p();export{h as P,p as d}
1
+ import{p as t,H as s,h as e,a as i,t as o}from"./index.js";import"./p-Bji_4dfL.js";import{E as l}from"./p-rEfV4v4a.js";import{g as r}from"./p-08F-DB-d.js";import{v as a}from"./p-Y58zWPwj.js";import{T as n}from"./p-B_WnO-QF.js";var c=function(t,s,e,i){var o,l=arguments.length,r=l<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,s,e,i);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(r=(l<3?o(r):l>3?o(s,e,r):o(s,e))||r);return l>3&&r&&Object.defineProperty(s,e,r),r};const h=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.observer=new MutationObserver((()=>this.setTrigger())),this.handlePostToggle=this.handlePostToggle.bind(this)}connectedCallback(){this.root=r(this.host),this.root.addEventListener("postToggle",this.handlePostToggle),this.observer.observe(this.host,{childList:!0,subtree:!0})}componentDidLoad(){this.setTrigger(),this.trigger||console.warn("The post-collapsible-trigger must contain a button."),this.collapsible||console.warn(`No post-collapsible found ${this.for?`with id "${this.for}"`:"nested inside <post-collapsible-trigger>"}. Either nest a post-collapsible inside the trigger or set the "for" attribute to the id of the collapsible.`)}disconnectedCallback(){this.observer.disconnect(),this.root?.removeEventListener("postToggle",this.handlePostToggle)}async update(){this.updateAriaAttributes()}handlePostToggle(t){this.trigger&&this.trigger.setAttribute("aria-expanded",`${t.detail}`)}updateAriaAttributes(){const t=this.collapsible;if(!this.trigger||!t)return;t.id||(t.id=`collapsible-${crypto.randomUUID()}`);const s=t.id,e=this.trigger.getAttribute("aria-controls"),i=e?e.split(/\s+/):[];i.includes(s)||(i.push(s),this.trigger.setAttribute("aria-controls",i.join(" "))),this.trigger.setAttribute("aria-expanded",`${!t.collapsed}`)}async toggleCollapsible(){await(this.collapsible?.toggle())}get collapsible(){const t=this.host.querySelector("post-collapsible")??(this.for?this.root?.getElementById(this.for)??null:null);return t&&"post-collapsible"===t.localName?t:null}setTrigger(){const t=Array.from(this.host.querySelectorAll("button")).find((t=>{const s=t.closest("post-collapsible");return!(s&&this.host.contains(s))}));!t||this.trigger&&t.isEqualNode(this.trigger)||(this.trigger=t,this.trigger.addEventListener("click",(()=>this.toggleCollapsible())),this.updateAriaAttributes())}render(){return e(i,{key:"64dde42136274194be6c3c4f94fb87ded8a3a079","data-version":a},e("slot",{key:"f43727ec2f7692793178ad6c162bb56f0f2d842b"}))}get host(){return this}},[257,"post-collapsible-trigger",{for:[513],update:[64]}]);function p(){"undefined"!=typeof customElements&&["post-collapsible-trigger"].forEach((t=>{"post-collapsible-trigger"===t&&(customElements.get(o(t))||customElements.define(o(t),h))}))}c([n("string")],h.prototype,"for",void 0),c([l("post-collapsible")],h.prototype,"handlePostToggle",null),p();export{h as P,p as d}
@@ -1 +1 @@
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-d02KpeUM.js";import{O as a}from"./p-BaB8wJvk.js";import{T as c}from"./p-B_WnO-QF.js";const p=["top","right","bottom","left","top-start","top-end","right-start","right-end","bottom-start","bottom-end","left-start","left-end"],l=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,l(e,n))}function g(t,e){return"function"==typeof t?t(e):t}function w(t){return t.split("-")[0]}function b(t){return t.split("-")[1]}function y(t){return"x"===t?"y":"x"}function x(t){return"y"===t?"height":"width"}function S(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function k(t){return y(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=x(s),c=w(e),p="y"===i,l=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:l,y:o.y-r.height};break;case"bottom":h={x:l,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(b(e)){case"start":h[s]-=u*(n&&p?-1:1);break;case"end":h[s]+=u*(n&&p?-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:p="clippingAncestors",rootBoundary:l="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:p,rootBoundary:l,strategy:c})),w="floating"===f?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),y=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},x=$(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:b,strategy:c}):w);return{top:(v.top-x.top+d.top)/y.y,bottom:(x.bottom-v.bottom+d.bottom)/y.y,left:(v.left-x.left+d.left)/y.x,right:(x.right-v.right+d.right)/y.x}}function R(t){const e=l(...t.map((t=>t.left))),n=l(...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 P(t){return C(t)?(t.nodeName||"").toLowerCase():"#document"}function W(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function B(t){var e;return null==(e=(C(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function C(t){return!!z()&&(t instanceof Node||t instanceof W(t).Node)}function q(t){return!!z()&&(t instanceof Element||t instanceof W(t).Element)}function I(t){return!!z()&&(t instanceof HTMLElement||t instanceof W(t).HTMLElement)}function N(t){return!(!z()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof W(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(P(t))}function J(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const K=/transform|translate|scale|rotate|perspective|filter/,Q=/paint|layout|strict|content/,U=t=>!!t&&"none"!==t;let V;function X(t){const e=q(t)?tt(t):t;return U(e.transform)||U(e.translate)||U(e.scale)||U(e.rotate)||U(e.perspective)||!Y()&&(U(e.backdropFilter)||U(e.filter))||K.test(e.willChange||"")||Q.test(e.contain||"")}function Y(){return null==V&&(V="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),V}function Z(t){return/^(html|body|#document)$/.test(P(t))}function tt(t){return W(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"===P(t))return t;const e=t.assignedSlot||t.parentNode||N(t)&&t.host||B(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=W(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 pt=d(0);function lt(t){const e=W(t);return Y()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:pt}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!==W(t))&&e}(i,n,o)?lt(i):d(0);let c=(r.left+a.x)/s.x,p=(r.top+a.y)/s.y,l=r.width/s.x,f=r.height/s.y;if(i){const t=W(i),e=o&&q(o)?W(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,p*=t.y,l*=t.x,f*=t.y,c+=i,p+=s,n=W(r),r=it(n)}}return $({width:l,height:f,x:c,y:p})}function ut(t,e){const n=et(t).scrollLeft;return e?e.left+n:ft(B(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=W(t),o=B(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=Y();(!t||t&&"fixed"===e)&&(a=r.offsetLeft,c=r.offsetTop)}const p=ut(o);if(p<=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 p<=25&&(i+=p);return{width:i,height:s,x:a,y:c}}(t,n);else if("document"===e)o=function(t){const e=B(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}}(B(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=lt(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=B(e),i="fixed"===n,s=ft(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const c=d(0);function p(){c.x=ut(r)}if(o||!o&&!i)if(("body"!==P(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&&p();i&&!o&&r&&p();const l=!r||o||i?d(0):ht(r,a);return{x:s.left+a.scrollLeft-c.x-l.x,y:s.top+a.scrollTop-c.y-l.y,width:s.width,height:s.height}}function 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 B(t)===n&&(n=n.ownerDocument.body),n}function bt(t,e){const n=W(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)&&!X(o)?n:o||function(t){let e=nt(t);for(;I(e)&&!Z(e);){if(X(e))return e;if(J(e))return null;e=nt(e)}return null}(t)||n}const yt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i="fixed"===r,s=B(o),a=!!e&&J(e.floating);if(o===s||a&&i)return n;let c={scrollLeft:0,scrollTop:0},p=d(1);const l=d(0),f=I(o);if((f||!f&&!i)&&(("body"!==P(o)||G(s))&&(c=et(o)),f)){const t=ft(o);p=ct(o),l.x=t.x+o.clientLeft,l.y=t.y+o.clientTop}const u=!s||f||i?d(0):ht(s,c);return{width:n.width*p.x,height:n.height*p.y,x:n.x*p.x-c.scrollLeft*p.x+l.x+u.x,y:n.y*p.y-c.scrollTop*p.y+l.y+u.y}},getDocumentElement:B,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"!==P(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=X(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,p=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=l(n.right,c),p=l(n.bottom,p),u=f(n.left,u)}return{width:c-u,height:p-a,x:u,y:a}},getOffsetParent:bt,getElementRects:async function(t){const e=this.getOffsetParent||bt,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 xt(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=b(n),c="y"===S(n),p=F.has(s)?-1:1,l=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*l,y:u*p}:{x:u*p,y:h*l}}(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:p}=e,{mainAxis:l=!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 y=w(r),H=S(a),$=w(a)===a,D=await(null==c.isRTL?void 0:c.isRTL(p.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=b(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),P=[];let W=(null==(o=i.flip)?void 0:o.overflows)||[];if(l&&P.push(z[y]),f){const t=function(t,e,n){void 0===n&&(n=!1);const o=b(t),r=k(t),i=x(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);P.push(z[t[0]],z[t[1]])}if(W=[...W,{placement:r,overflows:P}],!P.every((t=>t<=0))){var B,C;const t=((null==(B=i.flip)?void 0:B.index)||0)+1,e=F[t];if(e&&("alignment"!==f||H===S(e)||W.every((t=>S(t.placement)!==H||t.overflows[0]>0))))return{data:{index:t,overflows:W},reset:{placement:e}};let n=null==(C=W.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:C.placement;if(!n)switch(h){case"bestFit":{var q;const t=null==(q=W.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=()=>{},...p}=g(t,e),u=await s.detectOverflow(e,p),h=w(r),d=b(r),m="y"===S(r),{width:v,height:y}=i.floating;let x,k;"top"===h||"bottom"===h?(x=h,k=d===(await(null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(k=h,x="end"===d?"top":"bottom");const E=y-u.top-u.bottom,T=v-u.left-u.right;let M=l(y-u[x],E),A=l(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=y-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||y!==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:p}=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!=p)return h.find((t=>c>t.left-m.left&&c<t.right+m.right&&p>t.top-m.top&&p<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=l(...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 Pt(t){return[...t].pop()}function Wt(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 Bt(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 Ct(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=Pt(r),e.isConnected?e:(r.delete(e),Ct(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 Kt(t){if(!Wt(t,!1))return;const e=t.ownerDocument;if(!t.dispatchEvent(new Mt("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"})))return;if(!Wt(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&&(Ut(jt.get(e)||new Set,n,!0),Xt(i||e,n,!0),r="auto"),"hint"===o&&(s?(Xt(s,n,!0),r="hint"):(Ut(jt.get(e)||new Set,n,!0),i?(Xt(i,n,!0),r="auto"):r="hint")),"auto"===o||"hint"===o){if(o!==t.popover||!Wt(t,!1))return;Ct(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 Qt(t,e=!1,n=!1){if(!Wt(t,!0))return;const o=t.ownerDocument;if(["auto","hint"].includes(t.popover)&&(Xt(t,e,n),!Wt(t,!0)))return;const r=Dt.get(o)||new Set,i=r.has(t)&&Pt(r)===t;if(ee(zt.get(t),!1),zt.delete(t),n&&(t.dispatchEvent(new Mt("beforetoggle",{oldState:"open",newState:"closed"})),i&&Pt(r)!==t&&Xt(t,e,n),!Wt(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 Ut(t,e=!1,n=!1){let o=qt(t);for(;o;)Qt(o,e,n),o=qt(t)}function Vt(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;)Qt(Pt(e),n,o);e.has(t)&&Pt(e)!==t&&(r=!0),r&&(o=!1)}}function Xt(t,e,n){const o=t.ownerDocument||t;if(t instanceof Document)return function(t,e=!1,n=!1){let o=Ct(t);for(;o;)Qt(o,e,n),o=Ct(t)}(o,e,n);jt.get(o)?.has(t)?Vt(t,jt.get(o),e,n):(Ut(jt.get(o)||new Set,e,n),Dt.get(o)?.has(t)&&Vt(t,Dt.get(o),e,n))}var Yt=new WeakMap;function Zt(t){if(!t.isTrusted)return;const e=t.composedPath()[0];if(!e)return;const n=e.ownerDocument;if(!Ct(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 Bt(e)>Bt(n)?e:n}(e);if(o&&"pointerdown"===t.type)Yt.set(n,o);else if("pointerup"===t.type){const t=Yt.get(n)===o;Yt.delete(n),t&&Xt(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"})}},pe=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={}){Kt(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){Qt(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?Qt(this,!0,!0):void 0!==t.force&&!0!==t.force||Kt(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?Qt(e,!0,!0):Wt(e,!1)&&(zt.set(e,t),Kt(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||Xt(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&&t&&(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){const n=this.host.matches(":where(:popover-open, .popover-open)");return!0!==e&&(void 0!==e||n)||t?(this.eventTarget=t,this.toggleTimeoutId||(this.calculatePosition(),this.host.togglePopover(e),this.toggleTimeoutId=null),this.host.matches(":where(:popover-open, .popover-open)")):n}open(){const t=this.host.shadowRoot?.querySelector(".popover-content");if(this.startAutoupdates(),t){const e=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,p=at(t),u=r||i?[...p?rt(p):[],...e?rt(e):[]]:[];u.forEach((t=>{r&&t.addEventListener("scroll",n,{passive:!0}),i&&t.addEventListener("resize",n)}));const d=p&&a?function(t,e){let n,o=null;const r=B(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 p=t.getBoundingClientRect(),{left:u,top:d,width:m,height:v}=p;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,l(1,c))||1};let w=!0;function b(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||xt(p,t.getBoundingClientRect())||s(),w=!1}try{o=new IntersectionObserver(b,{...g,root:r.ownerDocument})}catch(t){o=new IntersectionObserver(b,g)}o.observe(t)}(!0),i}(p,n):null;let m,v=-1,g=null;s&&(g=new ResizeObserver((t=>{let[o]=t;o&&o.target===p&&g&&e&&(g.unobserve(e),cancelAnimationFrame(v),v=requestAnimationFrame((()=>{var t;null==(t=g)||t.observe(e)}))),n()})),p&&!c&&g.observe(p),e&&g.observe(e));let w=c?ft(t):null;return c&&function e(){const o=ft(t);w&&!xt(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}}},...p}=g(t,e),l={x:n,y:o},f=await i.detectOverflow(e,p),u=S(w(r)),h=y(u);let d=l[h],m=l[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 b=c.fn({...e,[h]:d,[u]:m});return{...b,data:{x:b.x-n,y:b.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:p=!0}=g(i,t),l={x:e,y:n},f=S(o),u=y(f);let h=l[u],d=l[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(p){var b,x;const t="y"===u?"width":"height",e=F.has(w(o)),n=r.reference[f]-r.floating[t]+(e&&(null==(b=s.offset)?void 0:b[f])||0)+(e?0:v.crossAxis),i=r.reference[f]+r.reference[t]+(e?0:(null==(x=s.offset)?void 0:x[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:p,padding:f=0}=g(t,e)||{};if(null==p)return{};const u=H(f),h={x:n,y:o},d=k(r),m=x(d),w=await s.getDimensions(p),y="y"===d,S=y?"top":"left",E=y?"bottom":"right",T=y?"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(p));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=l(u[S],D),R=l(u[E],D),F=j,z=L-w[m]-R,P=L/2-w[m]/2+$,W=v(F,P,z),B=!c.arrow&&null!=b(r)&&P!==W&&i.reference[m]/2-(P<F?j:R)-w[m]/2<0,C=B?P<F?P-F:P-z:0;return{[d]:h[d]+C,data:{[d]:W,centerOffset:P-W-C,...B&&{alignmentOffset:C}},reset:B}}}))({element:this.arrowRef,padding:t})),((t,e,n)=>{const o=new Map,r={platform:yt,...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 p=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:l,y:f}=D(p,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:b,data:y,reset:x}=await g({x:l,y:f,initialPlacement:o,placement:u,strategy:r,middlewareData:d,rects:p,platform:a,elements:{reference:t,floating:e}});l=null!=w?w:l,f=null!=b?b:f,d[v]={...d[v],...y},x&&h<50&&(h++,"object"==typeof x&&(x.placement&&(u=x.placement),x.rects&&(p=!0===x.rects?await s.getElementRects({reference:t,floating:e,strategy:r}):x.rects),({x:l,y:f}=D(p,u,c))),n=-1)}return{x:l,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:"be9f32a35f247f5b2cb54599b96e715ce1a5a1f1","data-version":s,popover:"auto"},o("div",{key:"ad2616c15dfec83e1e53ad14cb145aee2d625c9a",part:"post-popovercontainer-content",class:"popover-content"},this.arrow&&o("span",{key:"293ba9d1ba2a7b57297cd4aa716ba1369b2f8988","dynamic-placement":this.dynamicPlacement,class:"arrow",ref:t=>{this.arrowRef=t}}),o("span",{key:"7b9d47b53a4d4a672490eccdc88a7eb0552b5574",part:"post-popovercontainer-border-mask"}),o("slot",{key:"4b4249d6ebe1c247634bbb76b08ec01e73dc7d4b"})))}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 le(){"undefined"!=typeof customElements&&["post-popovercontainer"].forEach((t=>{"post-popovercontainer"===t&&(customElements.get(i(t))||customElements.define(i(t),pe))}))}pe.STATIC_SIDES={top:"bottom",right:"left",bottom:"top",left:"right"},pe.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(p)],pe.prototype,"placement",void 0),ae([c("number")],pe.prototype,"edgeGap",void 0),ae([a(["triangle","trapezoid"])],pe.prototype,"safeSpace",void 0),le();export{pe as P,p as a,le as d}
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-Y58zWPwj.js";import{O as a}from"./p-BaB8wJvk.js";import{T as c}from"./p-B_WnO-QF.js";const p=["top","right","bottom","left","top-start","top-end","right-start","right-end","bottom-start","bottom-end","left-start","left-end"],l=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,l(e,n))}function g(t,e){return"function"==typeof t?t(e):t}function w(t){return t.split("-")[0]}function b(t){return t.split("-")[1]}function y(t){return"x"===t?"y":"x"}function x(t){return"y"===t?"height":"width"}function S(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function k(t){return y(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 j(t,e,n){let{reference:o,floating:r}=t;const i=S(e),s=k(e),a=x(s),c=w(e),p="y"===i,l=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:l,y:o.y-r.height};break;case"bottom":h={x:l,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(b(e)){case"start":h[s]-=u*(n&&p?-1:1);break;case"end":h[s]+=u*(n&&p?-1:1)}return h}async function D(t,e){var n;void 0===e&&(e={});const{x:o,y:r,platform:i,rects:s,elements:a,strategy:c}=t,{boundary:p="clippingAncestors",rootBoundary:l="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:p,rootBoundary:l,strategy:c})),w="floating"===f?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),y=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},x=$(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:b,strategy:c}):w);return{top:(v.top-x.top+d.top)/y.y,bottom:(x.bottom-v.bottom+d.bottom)/y.y,left:(v.left-x.left+d.left)/y.x,right:(x.right-v.right+d.right)/y.x}}function R(t){const e=l(...t.map((t=>t.left))),n=l(...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 P(t){return C(t)?(t.nodeName||"").toLowerCase():"#document"}function W(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function B(t){var e;return null==(e=(C(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function C(t){return!!z()&&(t instanceof Node||t instanceof W(t).Node)}function q(t){return!!z()&&(t instanceof Element||t instanceof W(t).Element)}function I(t){return!!z()&&(t instanceof HTMLElement||t instanceof W(t).HTMLElement)}function N(t){return!(!z()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof W(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(P(t))}function Y(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const J=/transform|translate|scale|rotate|perspective|filter/,Q=/paint|layout|strict|content/,V=t=>!!t&&"none"!==t;let X;function K(t){const e=q(t)?tt(t):t;return V(e.transform)||V(e.translate)||V(e.scale)||V(e.rotate)||V(e.perspective)||!U()&&(V(e.backdropFilter)||V(e.filter))||J.test(e.willChange||"")||Q.test(e.contain||"")}function U(){return null==X&&(X="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),X}function Z(t){return/^(html|body|#document)$/.test(P(t))}function tt(t){return W(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"===P(t))return t;const e=t.assignedSlot||t.parentNode||N(t)&&t.host||B(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=W(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 pt=d(0);function lt(t){const e=W(t);return U()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:pt}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!==W(t))&&e}(i,n,o)?lt(i):d(0);let c=(r.left+a.x)/s.x,p=(r.top+a.y)/s.y,l=r.width/s.x,f=r.height/s.y;if(i){const t=W(i),e=o&&q(o)?W(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,p*=t.y,l*=t.x,f*=t.y,c+=i,p+=s,n=W(r),r=it(n)}}return $({width:l,height:f,x:c,y:p})}function ut(t,e){const n=et(t).scrollLeft;return e?e.left+n:ft(B(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=W(t),o=B(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 p=ut(o);if(p<=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 p<=25&&(i+=p);return{width:i,height:s,x:a,y:c}}(t,n);else if("document"===e)o=function(t){const e=B(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}}(B(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=lt(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=B(e),i="fixed"===n,s=ft(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const c=d(0);function p(){c.x=ut(r)}if(o||!o&&!i)if(("body"!==P(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&&p();i&&!o&&r&&p();const l=!r||o||i?d(0):ht(r,a);return{x:s.left+a.scrollLeft-c.x-l.x,y:s.top+a.scrollTop-c.y-l.y,width:s.width,height:s.height}}function 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 B(t)===n&&(n=n.ownerDocument.body),n}function bt(t,e){const n=W(t);if(Y(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(Y(e))return null;e=nt(e)}return null}(t)||n}const yt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i="fixed"===r,s=B(o),a=!!e&&Y(e.floating);if(o===s||a&&i)return n;let c={scrollLeft:0,scrollTop:0},p=d(1);const l=d(0),f=I(o);if((f||!f&&!i)&&(("body"!==P(o)||G(s))&&(c=et(o)),f)){const t=ft(o);p=ct(o),l.x=t.x+o.clientLeft,l.y=t.y+o.clientTop}const u=!s||f||i?d(0):ht(s,c);return{width:n.width*p.x,height:n.height*p.y,x:n.x*p.x-c.scrollLeft*p.x+l.x+u.x,y:n.y*p.y-c.scrollTop*p.y+l.y+u.y}},getDocumentElement:B,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const i=[..."clippingAncestors"===n?Y(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=rt(t,[],!1).filter((t=>q(t)&&"body"!==P(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,p=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=l(n.right,c),p=l(n.bottom,p),u=f(n.left,u)}return{width:c-u,height:p-a,x:u,y:a}},getOffsetParent:bt,getElementRects:async function(t){const e=this.getOffsetParent||bt,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 xt(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=b(n),c="y"===S(n),p=F.has(s)?-1:1,l=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*l,y:u*p}:{x:u*p,y:h*l}}(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:p}=e,{mainAxis:l=!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 y=w(r),H=S(a),$=w(a)===a,j=await(null==c.isRTL?void 0:c.isRTL(p.floating)),D=u||($||!m?[L(a)]:function(t){const e=L(t);return[E(t),e,E(e)]}(a)),R="none"!==d;!u&&R&&D.push(...function(t,e,n,o){const r=b(t);let i=function(t,e,n){switch(t){case"top":case"bottom":return n?e?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,j));const F=[a,...D],z=await c.detectOverflow(e,v),P=[];let W=(null==(o=i.flip)?void 0:o.overflows)||[];if(l&&P.push(z[y]),f){const t=function(t,e,n){void 0===n&&(n=!1);const o=b(t),r=k(t),i=x(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,j);P.push(z[t[0]],z[t[1]])}if(W=[...W,{placement:r,overflows:P}],!P.every((t=>t<=0))){var B,C;const t=((null==(B=i.flip)?void 0:B.index)||0)+1,e=F[t];if(e&&("alignment"!==f||H===S(e)||W.every((t=>S(t.placement)!==H||t.overflows[0]>0))))return{data:{index:t,overflows:W},reset:{placement:e}};let n=null==(C=W.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:C.placement;if(!n)switch(h){case"bestFit":{var q;const t=null==(q=W.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=()=>{},...p}=g(t,e),u=await s.detectOverflow(e,p),h=w(r),d=b(r),m="y"===S(r),{width:v,height:y}=i.floating;let x,k;"top"===h||"bottom"===h?(x=h,k=d===(await(null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(k=h,x="end"===d?"top":"bottom");const E=y-u.top-u.bottom,T=v-u.left-u.right;let M=l(y-u[x],E),A=l(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=y-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||y!==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:p}=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!=p)return h.find((t=>c>t.left-m.left&&c<t.right+m.right&&p>t.top-m.top&&p<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=l(...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,jt=new WeakMap,Dt=new WeakMap,Rt=new WeakMap;function Ft(t){return Rt.get(t)||"hidden"}var zt=new WeakMap;function Pt(t){return[...t].pop()}function Wt(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 Bt(t){if(!t)return 0;const e=jt.get(document)||new Set,n=Dt.get(document)||new Set;return n.has(t)?[...n].indexOf(t)+e.size+1:e.has(t)?[...e].indexOf(t)+1:0}function Ct(t){let e;const n=Dt.get(t)||new Set,o=jt.get(t)||new Set,r=n.size>0?n:o.size>0?o:null;return r?(e=Pt(r),e.isConnected?e:(r.delete(e),Ct(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 Yt=new WeakMap;function Jt(t){if(!Wt(t,!1))return;const e=t.ownerDocument;if(!t.dispatchEvent(new Mt("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"})))return;if(!Wt(t,!1))return;let n=!1;const o=t.popover;let r=null;const i=Gt(t,jt.get(e)||new Set),s=Gt(t,Dt.get(e)||new Set);if("auto"===o&&(Vt(Dt.get(e)||new Set,n,!0),Kt(i||e,n,!0),r="auto"),"hint"===o&&(s?(Kt(s,n,!0),r="hint"):(Vt(Dt.get(e)||new Set,n,!0),i?(Kt(i,n,!0),r="auto"):r="hint")),"auto"===o||"hint"===o){if(o!==t.popover||!Wt(t,!1))return;Ct(e)||(n=!0),"auto"===r?(jt.has(e)||jt.set(e,new Set),jt.get(e).add(t)):"hint"===r&&(Dt.has(e)||Dt.set(e,new Set),Dt.get(e).add(t))}Yt.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&&Yt.set(t,a),Ot(t,"closed","open")}function Qt(t,e=!1,n=!1){if(!Wt(t,!0))return;const o=t.ownerDocument;if(["auto","hint"].includes(t.popover)&&(Kt(t,e,n),!Wt(t,!0)))return;const r=jt.get(o)||new Set,i=r.has(t)&&Pt(r)===t;if(ee(zt.get(t),!1),zt.delete(t),n&&(t.dispatchEvent(new Mt("beforetoggle",{oldState:"open",newState:"closed"})),i&&Pt(r)!==t&&Kt(t,e,n),!Wt(t,!0)))return;$t.get(o)?.delete(t),r.delete(t),Dt.get(o)?.delete(t),t.classList.remove(":popover-open"),Rt.set(t,"hidden"),n&&Ot(t,"open","closed");const s=Yt.get(t);s&&(Yt.delete(t),e&&s.focus())}function Vt(t,e=!1,n=!1){let o=qt(t);for(;o;)Qt(o,e,n),o=qt(t)}function Xt(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;)Qt(Pt(e),n,o);e.has(t)&&Pt(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=Ct(t);for(;o;)Qt(o,e,n),o=Ct(t)}(o,e,n);Dt.get(o)?.has(t)?Xt(t,Dt.get(o),e,n):(Vt(Dt.get(o)||new Set,e,n),jt.get(o)?.has(t)&&Xt(t,jt.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(!Ct(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 Bt(e)>Bt(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"})}},pe=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={}){Jt(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){Qt(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?Qt(this,!0,!0):void 0!==t.force&&!0!==t.force||Jt(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?Qt(e,!0,!0):Wt(e,!1)&&(zt.set(e,t),Jt(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&&t&&(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){const n=this.host.matches(":where(:popover-open, .popover-open)");return!0!==e&&(void 0!==e||n)||t?(this.eventTarget=t,this.toggleTimeoutId||(this.calculatePosition(),this.host.togglePopover(e),this.toggleTimeoutId=null),this.host.matches(":where(:popover-open, .popover-open)")):n}open(){const t=this.host.shadowRoot?.querySelector(".popover-content");if(this.startAutoupdates(),t){const e=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,p=at(t),u=r||i?[...p?rt(p):[],...e?rt(e):[]]:[];u.forEach((t=>{r&&t.addEventListener("scroll",n,{passive:!0}),i&&t.addEventListener("resize",n)}));const d=p&&a?function(t,e){let n,o=null;const r=B(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 p=t.getBoundingClientRect(),{left:u,top:d,width:m,height:v}=p;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,l(1,c))||1};let w=!0;function b(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||xt(p,t.getBoundingClientRect())||s(),w=!1}try{o=new IntersectionObserver(b,{...g,root:r.ownerDocument})}catch(t){o=new IntersectionObserver(b,g)}o.observe(t)}(!0),i}(p,n):null;let m,v=-1,g=null;s&&(g=new ResizeObserver((t=>{let[o]=t;o&&o.target===p&&g&&e&&(g.unobserve(e),cancelAnimationFrame(v),v=requestAnimationFrame((()=>{var t;null==(t=g)||t.observe(e)}))),n()})),p&&!c&&g.observe(p),e&&g.observe(e));let w=c?ft(t):null;return c&&function e(){const o=ft(t);w&&!xt(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}}},...p}=g(t,e),l={x:n,y:o},f=await i.detectOverflow(e,p),u=S(w(r)),h=y(u);let d=l[h],m=l[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 b=c.fn({...e,[h]:d,[u]:m});return{...b,data:{x:b.x-n,y:b.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:p=!0}=g(i,t),l={x:e,y:n},f=S(o),u=y(f);let h=l[u],d=l[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(p){var b,x;const t="y"===u?"width":"height",e=F.has(w(o)),n=r.reference[f]-r.floating[t]+(e&&(null==(b=s.offset)?void 0:b[f])||0)+(e?0:v.crossAxis),i=r.reference[f]+r.reference[t]+(e?0:(null==(x=s.offset)?void 0:x[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:p,padding:f=0}=g(t,e)||{};if(null==p)return{};const u=H(f),h={x:n,y:o},d=k(r),m=x(d),w=await s.getDimensions(p),y="y"===d,S=y?"top":"left",E=y?"bottom":"right",T=y?"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(p));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,j=L/2-w[m]/2-1,D=l(u[S],j),R=l(u[E],j),F=D,z=L-w[m]-R,P=L/2-w[m]/2+$,W=v(F,P,z),B=!c.arrow&&null!=b(r)&&P!==W&&i.reference[m]/2-(P<F?D:R)-w[m]/2<0,C=B?P<F?P-F:P-z:0;return{[d]:h[d]+C,data:{[d]:W,centerOffset:P-W-C,...B&&{alignmentOffset:C}},reset:B}}}))({element:this.arrowRef,padding:t})),((t,e,n)=>{const o=new Map,r={platform:yt,...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:D},c=await(null==s.isRTL?void 0:s.isRTL(e));let p=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:l,y:f}=j(p,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:b,data:y,reset:x}=await g({x:l,y:f,initialPlacement:o,placement:u,strategy:r,middlewareData:d,rects:p,platform:a,elements:{reference:t,floating:e}});l=null!=w?w:l,f=null!=b?b:f,d[v]={...d[v],...y},x&&h<50&&(h++,"object"==typeof x&&(x.placement&&(u=x.placement),x.rects&&(p=!0===x.rects?await s.getElementRects({reference:t,floating:e,strategy:r}):x.rects),({x:l,y:f}=j(p,u,c))),n=-1)}return{x:l,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:"be9f32a35f247f5b2cb54599b96e715ce1a5a1f1","data-version":s,popover:"auto"},o("div",{key:"ad2616c15dfec83e1e53ad14cb145aee2d625c9a",part:"post-popovercontainer-content",class:"popover-content"},this.arrow&&o("span",{key:"293ba9d1ba2a7b57297cd4aa716ba1369b2f8988","dynamic-placement":this.dynamicPlacement,class:"arrow",ref:t=>{this.arrowRef=t}}),o("span",{key:"7b9d47b53a4d4a672490eccdc88a7eb0552b5574",part:"post-popovercontainer-border-mask"}),o("slot",{key:"4b4249d6ebe1c247634bbb76b08ec01e73dc7d4b"})))}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 le(){"undefined"!=typeof customElements&&["post-popovercontainer"].forEach((t=>{"post-popovercontainer"===t&&(customElements.get(i(t))||customElements.define(i(t),pe))}))}pe.STATIC_SIDES={top:"bottom",right:"left",bottom:"top",left:"right"},pe.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(p)],pe.prototype,"placement",void 0),ae([c("number")],pe.prototype,"edgeGap",void 0),ae([a(["triangle","trapezoid"])],pe.prototype,"safeSpace",void 0),le();export{pe as P,p as a,le as d}
@@ -0,0 +1 @@
1
+ const o="10.0.1";export{o as v}
@@ -1 +1 @@
1
- import{p as o,H as t,h as e,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-d02KpeUM.js";import{d as n}from"./p-wLn52OZT.js";import{d}from"./p-06VKKzxv.js";import{d as l}from"./p-D0kuUny7.js";const p=o(class extends t{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.collapsed=!1}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=`c${s(6)}`,t=this.host.closest("post-accordion")?.getAttribute("heading-level");return e(i,{key:"b9699596d57887d99214c6f163355535c68eae1a","data-version":r},e("post-collapsible-trigger",{key:"ebd7c9d6bf2bc35d548867edc8766e31125d8509",for:o},e(`h${t??2}`,{key:"93806261d7dba93569b09d37dff0c01b4f29268b",class:"accordion-header"},e("button",{key:"785a4bcff2c6705aade9b045e1176d43a2ef202b",type:"button",class:"accordion-button"+(this.collapsed?" collapsed":""),part:"post-accordion-button"},e("span",{key:"87f8ba7f7ebe2ba851b6dc134656296820c467d0",class:{"logo-container":!0,"has-image":!!this.slottedLogo}},e("slot",{key:"146256cb174f5895b25fd8f44464ca32fba6b6ee",name:"logo",onSlotchange:this.onSlotLogoChange.bind(this)})),e("slot",{key:"d742ef89a88280f85c7da697536d4ad2ff825f0b",name:"header"}),e("post-icon",{key:"f83e438c9d504ebaa0066df81b6f74ec14dcb08a",name:"chevronup"})))),e("post-collapsible",{key:"179f36eab7ebdb9faa909a70eb43e1d78503e6e1",id:o,collapsed:this.collapsed,ref:o=>this.collapsible=o},e("div",{key:"e93c3570cf76c971b49bf28d3d5540ac289b2469",class:"accordion-body",part:"post-accordion-body"},e("slot",{key:"db26c35edb371cb855141b6f7552d96ea10e06a4"}))))}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],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,t,e,i){var c,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(o,t,e,i);else for(var r=o.length-1;r>=0;r--)(c=o[r])&&(s=(a<3?c(s):a>3?c(t,e,s):c(t,e))||s);a>3&&s&&Object.defineProperty(t,e,s)})([a("post-accordion-item")],p.prototype,"onCollapseToggle",null),b();export{p as P,b as d}
1
+ import{p as o,H as t,h as e,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-Y58zWPwj.js";import{d as n}from"./p-CT6x8DLu.js";import{d}from"./p-DlA_Y5Qr.js";import{d as l}from"./p-BJXXw0kF.js";const p=o(class extends t{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.collapsed=!1}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=`c${s(6)}`,t=this.host.closest("post-accordion")?.getAttribute("heading-level");return e(i,{key:"b9699596d57887d99214c6f163355535c68eae1a","data-version":r},e("post-collapsible-trigger",{key:"ebd7c9d6bf2bc35d548867edc8766e31125d8509",for:o},e(`h${t??2}`,{key:"93806261d7dba93569b09d37dff0c01b4f29268b",class:"accordion-header"},e("button",{key:"785a4bcff2c6705aade9b045e1176d43a2ef202b",type:"button",class:"accordion-button"+(this.collapsed?" collapsed":""),part:"post-accordion-button"},e("span",{key:"87f8ba7f7ebe2ba851b6dc134656296820c467d0",class:{"logo-container":!0,"has-image":!!this.slottedLogo}},e("slot",{key:"146256cb174f5895b25fd8f44464ca32fba6b6ee",name:"logo",onSlotchange:this.onSlotLogoChange.bind(this)})),e("slot",{key:"d742ef89a88280f85c7da697536d4ad2ff825f0b",name:"header"}),e("post-icon",{key:"f83e438c9d504ebaa0066df81b6f74ec14dcb08a",name:"chevronup"})))),e("post-collapsible",{key:"179f36eab7ebdb9faa909a70eb43e1d78503e6e1",id:o,collapsed:this.collapsed,ref:o=>this.collapsible=o},e("div",{key:"e93c3570cf76c971b49bf28d3d5540ac289b2469",class:"accordion-body",part:"post-accordion-body"},e("slot",{key:"db26c35edb371cb855141b6f7552d96ea10e06a4"}))))}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],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,t,e,i){var c,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(o,t,e,i);else for(var r=o.length-1;r>=0;r--)(c=o[r])&&(s=(a<3?c(s):a>3?c(t,e,s):c(t,e))||s);a>3&&s&&Object.defineProperty(t,e,s)})([a("post-accordion-item")],p.prototype,"onCollapseToggle",null),b();export{p as P,b as d}
@@ -1 +1 @@
1
- import{P as o,d as s}from"./p-DkKOmXaG.js";const a=o,m=s;export{a as PostAccordionItem,m as defineCustomElement}
1
+ import{P as o,d as p}from"./p-_nnVhpIK.js";const s=o,n=p;export{s as PostAccordionItem,n as defineCustomElement}
@@ -1 +1 @@
1
- import{P as o,d as s}from"./p-Chtl9X7o.js";const t=o,p=s;export{t as PostAccordion,p as defineCustomElement}
1
+ import{P as o,d as s}from"./p-BJJd4LvT.js";const p=o,r=s;export{p as PostAccordion,r as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as s,c as i,h as e,a as o,t as n}from"./index.js";import"./p-Bji_4dfL.js";import{d as h}from"./p-C9hMpmsD.js";import{v as a}from"./p-d02KpeUM.js";import{d as c}from"./p-D0kuUny7.js";import{R as r}from"./p-4wtxqxXu.js";import{T as l}from"./p-B_WnO-QF.js";const p=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postFilteringEvent=i(this,"postFilteringEvent"),this.debouncedHandleInput=h((t=>{this.handleInput(t)}),250),this.filterThreshold=0,this.clearable=!1,this.inputValue="",this.handleOnBlur=()=>{this.inputElement.value=this.inputValue,this.listBoxElement.filter(""),this.hideListBox()},this.handleInput=async t=>{if(!this.listBoxElement)return;const s=t.target.value.trim(),i=s.length>=this.filterThreshold?s:"",{defaultPrevented:e}=this.postFilteringEvent.emit(i&&i.length>=this.filterThreshold?i:"");e||(await this.listBoxElement.filter(i),i?(this.showListBox(),this.announceCount()):(this.inputValue="",this.clearAnnouncement()))},this.handleKeyDown=t=>{const{key:s,altKey:i}=t;switch(s){case"ArrowDown":t.preventDefault(),this.showListBox(),i||this.listBoxElement.navigate("down");break;case"ArrowUp":t.preventDefault(),this.listBoxElement.navigate("up");break;case"Enter":if(this.listBoxElement.hidden)return;t.preventDefault(),this.listBoxElement.selectActive(),this.hideListBox();break;case"Escape":this.hideListBox();break;case"Tab":this.listBoxElement.selectActive(),this.hideListBox();break;case"Home":t.preventDefault(),this.listBoxElement.navigate("first");break;case"End":t.preventDefault(),this.listBoxElement.navigate("last")}},this.handleOptionSelected=t=>{const s=t.detail;this.inputElement.value=s,this.inputValue=s,this.hideListBox()},this.handleOptionActive=t=>{const s=t.detail;s?this.inputElement.setAttribute("aria-activedescendant",s):this.inputElement.removeAttribute("aria-activedescendant")},this.hideListBox=()=>{this.clearAnnouncement(),this.listBoxElement.hide(),this.inputElement.ariaExpanded="false",this.host.removeAttribute("open"),this.inputElement.removeAttribute("aria-activedescendant")},this.showListBox=async()=>{await this.listBoxElement.show(),this.inputElement.ariaExpanded="true",this.host.setAttribute("open",""),this.announceCount()},this.clearInput=()=>{this.inputElement&&(this.inputElement.value="",this.inputValue="",this.listBoxElement.clearSelection(),this.hideListBox())}}get inputElement(){return this.host.querySelector("input")}get listBoxElement(){return this.listbox?document.getElementById(this.listbox):this.host.querySelector("post-listbox")}componentWillLoad(){if(!this.inputElement)return;if(this.inputElement.role="combobox",this.inputElement.ariaAutoComplete="list",!this.listBoxElement)return;this.listBoxElement.id||(this.listBoxElement.id=crypto.randomUUID()),this.inputElement.setAttribute("aria-controls",this.listBoxElement.id),this.inputElement.setAttribute("aria-expanded","false");const t=this.inputElement.labels?.[0];t&&(t.id||(t.id=crypto.randomUUID()),this.listBoxElement.setAttribute("aria-labelledby",t.id)),this.inputElement.autocomplete="off",this.attachInputListeners(),this.attachListboxListeners()}disconnectedCallback(){this.detachInputListeners(),this.detachListboxListeners()}attachInputListeners(){this.inputElement&&(this.inputElement.addEventListener("input",this.debouncedHandleInput),this.inputElement.addEventListener("keydown",this.handleKeyDown),this.inputElement.addEventListener("blur",this.handleOnBlur),this.inputElement.addEventListener("click",this.showListBox))}detachInputListeners(){this.inputElement&&(this.inputElement.removeEventListener("input",this.debouncedHandleInput),this.inputElement.removeEventListener("keydown",this.handleKeyDown),this.inputElement.removeEventListener("blur",this.handleOnBlur),this.inputElement.removeEventListener("click",this.showListBox))}attachListboxListeners(){this.listBoxElement&&(this.listBoxElement.addEventListener("postOptionSelected",this.handleOptionSelected),this.listBoxElement.addEventListener("postOptionActive",this.handleOptionActive))}detachListboxListeners(){this.listBoxElement&&(this.listBoxElement.removeEventListener("postOptionSelected",this.handleOptionSelected),this.listBoxElement.removeEventListener("postOptionActive",this.handleOptionActive))}clearAnnouncement(){this.outputElement&&(this.outputElement.textContent="")}announceCount(){if(!this.outputElement||!this.listBoxElement)return;const t=this.listBoxElement.querySelectorAll("post-listbox-option:not([hidden])").length;this.outputElement.textContent=this.textAvailableSuggestions.replace("{count}",t+"")}render(){return e(o,{key:"a88d1a65adcbe0603dc2c7ccf5900ae49dbe8edc","data-version":a},e("slot",{key:"ff4724e2e298a38020c4eb93b2b9a38d811274b8"}),this.clearable&&this.inputValue&&e("button",{key:"6a5f67d5376bdb0d261fd687ad29dd32d4f3be36",type:"button",class:"autocomplete-clear",onClick:this.clearInput},e("post-icon",{key:"5b123fa4dbd581ebbba96f820b30d9d266b69b7d","aria-hidden":"true",name:"closex"})),e("post-icon",{key:"9d3fcaf73cfff3e17d440e7add858482e48a12a7","aria-hidden":"true",class:"autocomplete-icon",name:"chevronDown"}),e("output",{key:"9c894f8ea34ffcc8b8c741216679ffbbd7b866bf",class:"visually-hidden",ref:t=>this.outputElement=t}))}get host(){return this}static get style(){return":host{position:relative;display:block}.autocomplete-icon,.autocomplete-clear{position:absolute;inset-block-start:16px}@media screen and (min-width: 780px){.autocomplete-icon,.autocomplete-clear{inset-block-start:20px}}.autocomplete-icon{inset-inline-end:16px;width:24px;height:24px;pointer-events:none;transition:transform .2s ease-in-out}:host([open]) .autocomplete-icon{transform:rotate(180deg)}.autocomplete-clear{display:flex;align-items:center;justify-content:center;inset-inline-end:42px;background:none;border:none;cursor:pointer}.autocomplete-clear>post-icon{width:20px;height:20px}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}"}},[257,"post-autocomplete",{filterThreshold:[514,"filter-threshold"],clearable:[516],listbox:[513],textAvailableSuggestions:[513,"text-available-suggestions"],inputValue:[32]}]);function d(){"undefined"!=typeof customElements&&["post-autocomplete","post-icon"].forEach((t=>{switch(t){case"post-autocomplete":customElements.get(n(t))||customElements.define(n(t),p);break;case"post-icon":customElements.get(n(t))||c()}}))}(function(t,s,i,e){var o,n=arguments.length,h=n<3?s:null===e?e=Object.getOwnPropertyDescriptor(s,i):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,s,i,e);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(h=(n<3?o(h):n>3?o(s,i,h):o(s,i))||h);n>3&&h&&Object.defineProperty(s,i,h)})([r(),l("string")],p.prototype,"textAvailableSuggestions",void 0),d();const u=p,b=d;export{u as PostAutocomplete,b as defineCustomElement}
1
+ import{p as t,H as s,c as i,h as e,a as o,t as n}from"./index.js";import"./p-Bji_4dfL.js";import{d as h}from"./p-C9hMpmsD.js";import{v as a}from"./p-Y58zWPwj.js";import{d as c}from"./p-BJXXw0kF.js";import{R as r}from"./p-4wtxqxXu.js";import{T as l}from"./p-B_WnO-QF.js";const p=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.postFilteringEvent=i(this,"postFilteringEvent"),this.debouncedHandleInput=h((t=>{this.handleInput(t)}),250),this.filterThreshold=0,this.clearable=!1,this.inputValue="",this.handleOnBlur=()=>{this.inputElement.value=this.inputValue,this.listBoxElement.filter(""),this.hideListBox()},this.handleInput=async t=>{if(!this.listBoxElement)return;const s=t.target.value.trim(),i=s.length>=this.filterThreshold?s:"",{defaultPrevented:e}=this.postFilteringEvent.emit(i&&i.length>=this.filterThreshold?i:"");e||(await this.listBoxElement.filter(i),i?(this.showListBox(),this.announceCount()):(this.inputValue="",this.clearAnnouncement()))},this.handleKeyDown=t=>{const{key:s,altKey:i}=t;switch(s){case"ArrowDown":t.preventDefault(),this.showListBox(),i||this.listBoxElement.navigate("down");break;case"ArrowUp":t.preventDefault(),this.listBoxElement.navigate("up");break;case"Enter":if(this.listBoxElement.hidden)return;t.preventDefault(),this.listBoxElement.selectActive(),this.hideListBox();break;case"Escape":this.hideListBox();break;case"Tab":this.listBoxElement.selectActive(),this.hideListBox();break;case"Home":t.preventDefault(),this.listBoxElement.navigate("first");break;case"End":t.preventDefault(),this.listBoxElement.navigate("last")}},this.handleOptionSelected=t=>{const s=t.detail;this.inputElement.value=s,this.inputValue=s,this.hideListBox()},this.handleOptionActive=t=>{const s=t.detail;s?this.inputElement.setAttribute("aria-activedescendant",s):this.inputElement.removeAttribute("aria-activedescendant")},this.hideListBox=()=>{this.clearAnnouncement(),this.listBoxElement.hide(),this.inputElement.ariaExpanded="false",this.host.removeAttribute("open"),this.inputElement.removeAttribute("aria-activedescendant")},this.showListBox=async()=>{await this.listBoxElement.show(),this.inputElement.ariaExpanded="true",this.host.setAttribute("open",""),this.announceCount()},this.clearInput=()=>{this.inputElement&&(this.inputElement.value="",this.inputValue="",this.listBoxElement.clearSelection(),this.hideListBox())}}get inputElement(){return this.host.querySelector("input")}get listBoxElement(){return this.listbox?document.getElementById(this.listbox):this.host.querySelector("post-listbox")}componentWillLoad(){if(!this.inputElement)return;if(this.inputElement.role="combobox",this.inputElement.ariaAutoComplete="list",!this.listBoxElement)return;this.listBoxElement.id||(this.listBoxElement.id=crypto.randomUUID()),this.inputElement.setAttribute("aria-controls",this.listBoxElement.id),this.inputElement.setAttribute("aria-expanded","false");const t=this.inputElement.labels?.[0];t&&(t.id||(t.id=crypto.randomUUID()),this.listBoxElement.setAttribute("aria-labelledby",t.id)),this.inputElement.autocomplete="off",this.attachInputListeners(),this.attachListboxListeners()}disconnectedCallback(){this.detachInputListeners(),this.detachListboxListeners()}attachInputListeners(){this.inputElement&&(this.inputElement.addEventListener("input",this.debouncedHandleInput),this.inputElement.addEventListener("keydown",this.handleKeyDown),this.inputElement.addEventListener("blur",this.handleOnBlur),this.inputElement.addEventListener("click",this.showListBox))}detachInputListeners(){this.inputElement&&(this.inputElement.removeEventListener("input",this.debouncedHandleInput),this.inputElement.removeEventListener("keydown",this.handleKeyDown),this.inputElement.removeEventListener("blur",this.handleOnBlur),this.inputElement.removeEventListener("click",this.showListBox))}attachListboxListeners(){this.listBoxElement&&(this.listBoxElement.addEventListener("postOptionSelected",this.handleOptionSelected),this.listBoxElement.addEventListener("postOptionActive",this.handleOptionActive))}detachListboxListeners(){this.listBoxElement&&(this.listBoxElement.removeEventListener("postOptionSelected",this.handleOptionSelected),this.listBoxElement.removeEventListener("postOptionActive",this.handleOptionActive))}clearAnnouncement(){this.outputElement&&(this.outputElement.textContent="")}announceCount(){if(!this.outputElement||!this.listBoxElement)return;const t=this.listBoxElement.querySelectorAll("post-listbox-option:not([hidden])").length;this.outputElement.textContent=this.textAvailableSuggestions.replace("{count}",t+"")}render(){return e(o,{key:"a88d1a65adcbe0603dc2c7ccf5900ae49dbe8edc","data-version":a},e("slot",{key:"ff4724e2e298a38020c4eb93b2b9a38d811274b8"}),this.clearable&&this.inputValue&&e("button",{key:"6a5f67d5376bdb0d261fd687ad29dd32d4f3be36",type:"button",class:"autocomplete-clear",onClick:this.clearInput},e("post-icon",{key:"5b123fa4dbd581ebbba96f820b30d9d266b69b7d","aria-hidden":"true",name:"closex"})),e("post-icon",{key:"9d3fcaf73cfff3e17d440e7add858482e48a12a7","aria-hidden":"true",class:"autocomplete-icon",name:"chevronDown"}),e("output",{key:"9c894f8ea34ffcc8b8c741216679ffbbd7b866bf",class:"visually-hidden",ref:t=>this.outputElement=t}))}get host(){return this}static get style(){return":host{position:relative;display:block}.autocomplete-icon,.autocomplete-clear{position:absolute;inset-block-start:16px}@media screen and (min-width: 780px){.autocomplete-icon,.autocomplete-clear{inset-block-start:20px}}.autocomplete-icon{inset-inline-end:16px;width:24px;height:24px;pointer-events:none;transition:transform .2s ease-in-out}:host([open]) .autocomplete-icon{transform:rotate(180deg)}.autocomplete-clear{display:flex;align-items:center;justify-content:center;inset-inline-end:42px;background:none;border:none;cursor:pointer}.autocomplete-clear>post-icon{width:20px;height:20px}.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}"}},[257,"post-autocomplete",{filterThreshold:[514,"filter-threshold"],clearable:[516],listbox:[513],textAvailableSuggestions:[513,"text-available-suggestions"],inputValue:[32]}]);function d(){"undefined"!=typeof customElements&&["post-autocomplete","post-icon"].forEach((t=>{switch(t){case"post-autocomplete":customElements.get(n(t))||customElements.define(n(t),p);break;case"post-icon":customElements.get(n(t))||c()}}))}(function(t,s,i,e){var o,n=arguments.length,h=n<3?s:null===e?e=Object.getOwnPropertyDescriptor(s,i):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,s,i,e);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(h=(n<3?o(h):n>3?o(s,i,h):o(s,i))||h);n>3&&h&&Object.defineProperty(s,i,h)})([r(),l("string")],p.prototype,"textAvailableSuggestions",void 0),d();const u=p,b=d;export{u as PostAutocomplete,b as defineCustomElement}
@@ -1 +1 @@
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-d02KpeUM.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 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:"ba9c39d64f6a1b77131ba8c603c9be3aad113c53","data-version":r},i("span",{key:"27a9ac87e8978fabf1717f3eb978e39d06670507",class:"slotted"===this.avatarType?"":"d-none"},i("slot",{key:"3fa13670176f2fc3a79a8b11659962f433c37c2e",onSlotchange:this.slotChanged.bind(this)})),"image"===this.avatarType&&i("img",{key:"232099852c2ad8f2c4660eb1077c6d618092cdca",src:this.imageUrl,alt:this.imageAlt}),"initials"===this.avatarType&&i("span",{key:"e6b3bf751a95997a2abef2a16dcd8e2c78d308fa",class:"initials"},e,i("span",{key:"8d869a374678094e2ec5abc146b0b981c9079c15"},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),m();const f=p,v=m;export{f as PostAvatar,v as defineCustomElement}
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-Y58zWPwj.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 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:"ba9c39d64f6a1b77131ba8c603c9be3aad113c53","data-version":r},i("span",{key:"27a9ac87e8978fabf1717f3eb978e39d06670507",class:"slotted"===this.avatarType?"":"d-none"},i("slot",{key:"3fa13670176f2fc3a79a8b11659962f433c37c2e",onSlotchange:this.slotChanged.bind(this)})),"image"===this.avatarType&&i("img",{key:"232099852c2ad8f2c4660eb1077c6d618092cdca",src:this.imageUrl,alt:this.imageAlt}),"initials"===this.avatarType&&i("span",{key:"e6b3bf751a95997a2abef2a16dcd8e2c78d308fa",class:"initials"},e,i("span",{key:"8d869a374678094e2ec5abc146b0b981c9079c15"},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),m();const f=p,v=m;export{f as PostAvatar,v as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as o,h as e,a as i,t as s}from"./index.js";import{f as r}from"./p-BVCjnh6Q.js";import"./p-Bji_4dfL.js";import{v as c}from"./p-d02KpeUM.js";import{d as a}from"./p-D0kuUny7.js";import{R as n}from"./p-4wtxqxXu.js";import{T as l}from"./p-B_WnO-QF.js";const p=t(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.belowFold=!1,this.handleScroll=()=>{this.belowFold=this.isBelowFold()}}isBelowFold(){return window.scrollY>window.innerHeight}watchBelowFold(t){r(this.host,t?"in":"out",{translate:this.translateY,fill:"forwards"})}scrollToTop(){window.scrollTo({top:0,behavior:"smooth"})}getSecondPixelValue(t){for(const o of t){const t=o.match(/\b\d+px\b/g);if(t&&t.length>1)return t[1]}}animateButton(){const t=globalThis.getComputedStyle(this.host).getPropertyValue("top"),o=this.host.shadowRoot.querySelector("button"),e=getComputedStyle(o).getPropertyValue("--post-back-to-top-elevation").split(","),i=this.getSecondPixelValue(e);t&&"auto"!==t&&i&&(this.translateY=-1-Number.parseFloat(t.replace("px",""))-Number.parseFloat(i.replace("px","")),this.belowFold&&r(this.host,"in",{translate:this.translateY,fill:"forwards"}),this.belowFold||(this.host.style.transform=`translateY(${this.translateY})`))}componentWillLoad(){this.belowFold=this.isBelowFold()}componentDidLoad(){window.addEventListener("scroll",this.handleScroll,!1),this.animateButton()}disconnectedCallback(){window.removeEventListener("scroll",this.handleScroll)}render(){return e(i,{key:"3d976e4e1a8ac4b72041369d5667c55d915d7118","data-version":c},e("button",{key:"7ceb4953248ca934a905ec63444934e9e6c09e43",class:"back-to-top","aria-hidden":this.belowFold?"false":"true",tabindex:this.belowFold?"0":"-1",onClick:this.scrollToTop},e("post-icon",{key:"89a2bc9a8278fb45d3fb915ec096ee94b3841edd","aria-hidden":"true",name:"arrowup"}),e("span",{key:"fc2517fba7599f37c3054b638afd6b9b2ba7e32a",class:"visually-hidden"},this.textBackToTop)))}get host(){return this}static get watchers(){return{belowFold:[{watchBelowFold:0}]}}static get style(){return":host{opacity:0;--post-floating-button-position-top:var(--post-device-position-4);--post-back-to-top-position-top:calc( var(--post-header-height) + var(--post-floating-button-position-top) );--post-back-to-top-elevation:var(--post-device-elevation-300);position:fixed;z-index:1019;inset-block-start:var(--post-back-to-top-position-top);inset-inline-end:var(--post-device-position-1)}:host .back-to-top{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;box-shadow:var(--post-back-to-top-elevation);cursor:pointer;border-radius:var(--post-device-border-radius-round);width:var(--post-device-sizing-interactive-button-height-2);height:var(--post-device-sizing-interactive-button-height-2);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-button-secondary-enabled-stroke);color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);background-color:var(--post-scheme-color-interactive-button-secondary-enabled-bg);display:flex;align-items:center;justify-content:center}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top{background-color:ButtonFace !important}:host .back-to-top:hover{background-color:Highlight !important}}:host .back-to-top{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 .back-to-top: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 .back-to-top:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){:host .back-to-top: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 .back-to-top:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}:host .back-to-top:hover{border-color:var(--post-scheme-color-interactive-button-secondary-hover-stroke);color:var(--post-scheme-color-interactive-button-secondary-hover-fg);background-color:var(--post-scheme-color-interactive-button-secondary-hover-bg)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top:hover{color:HighlightText !important}}:host .back-to-top post-icon{height:var(--post-device-sizing-interactive-button-icon-3);width:var(--post-device-sizing-interactive-button-icon-3)}:host .visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}"}},[1,"post-back-to-top",{textBackToTop:[513,"text-back-to-top"],belowFold:[32]},void 0,{belowFold:[{watchBelowFold:0}]}]);function d(){"undefined"!=typeof customElements&&["post-back-to-top","post-icon"].forEach((t=>{switch(t){case"post-back-to-top":customElements.get(s(t))||customElements.define(s(t),p);break;case"post-icon":customElements.get(s(t))||a()}}))}(function(t,o,e,i){var s,r=arguments.length,c=r<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,o,e,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(c=(r<3?s(c):r>3?s(o,e,c):s(o,e))||c);r>3&&c&&Object.defineProperty(o,e,c)})([n(),l("string")],p.prototype,"textBackToTop",void 0),d();const h=p,b=d;export{h as PostBackToTop,b as defineCustomElement}
1
+ import{p as t,H as o,h as e,a as i,t as s}from"./index.js";import{f as r}from"./p-BVCjnh6Q.js";import"./p-Bji_4dfL.js";import{v as c}from"./p-Y58zWPwj.js";import{d as a}from"./p-BJXXw0kF.js";import{R as n}from"./p-4wtxqxXu.js";import{T as l}from"./p-B_WnO-QF.js";const p=t(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.belowFold=!1,this.handleScroll=()=>{this.belowFold=this.isBelowFold()}}isBelowFold(){return window.scrollY>window.innerHeight}watchBelowFold(t){r(this.host,t?"in":"out",{translate:this.translateY,fill:"forwards"})}scrollToTop(){window.scrollTo({top:0,behavior:"smooth"})}getSecondPixelValue(t){for(const o of t){const t=o.match(/\b\d+px\b/g);if(t&&t.length>1)return t[1]}}animateButton(){const t=globalThis.getComputedStyle(this.host).getPropertyValue("top"),o=this.host.shadowRoot.querySelector("button"),e=getComputedStyle(o).getPropertyValue("--post-back-to-top-elevation").split(","),i=this.getSecondPixelValue(e);t&&"auto"!==t&&i&&(this.translateY=-1-Number.parseFloat(t.replace("px",""))-Number.parseFloat(i.replace("px","")),this.belowFold&&r(this.host,"in",{translate:this.translateY,fill:"forwards"}),this.belowFold||(this.host.style.transform=`translateY(${this.translateY})`))}componentWillLoad(){this.belowFold=this.isBelowFold()}componentDidLoad(){window.addEventListener("scroll",this.handleScroll,!1),this.animateButton()}disconnectedCallback(){window.removeEventListener("scroll",this.handleScroll)}render(){return e(i,{key:"3d976e4e1a8ac4b72041369d5667c55d915d7118","data-version":c},e("button",{key:"7ceb4953248ca934a905ec63444934e9e6c09e43",class:"back-to-top","aria-hidden":this.belowFold?"false":"true",tabindex:this.belowFold?"0":"-1",onClick:this.scrollToTop},e("post-icon",{key:"89a2bc9a8278fb45d3fb915ec096ee94b3841edd","aria-hidden":"true",name:"arrowup"}),e("span",{key:"fc2517fba7599f37c3054b638afd6b9b2ba7e32a",class:"visually-hidden"},this.textBackToTop)))}get host(){return this}static get watchers(){return{belowFold:[{watchBelowFold:0}]}}static get style(){return":host{opacity:0;--post-floating-button-position-top:var(--post-device-position-4);--post-back-to-top-position-top:calc( var(--post-header-height) + var(--post-floating-button-position-top) );--post-back-to-top-elevation:var(--post-device-elevation-300);position:fixed;z-index:1019;inset-block-start:var(--post-back-to-top-position-top);inset-inline-end:var(--post-device-position-1)}:host .back-to-top{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;box-shadow:var(--post-back-to-top-elevation);cursor:pointer;border-radius:var(--post-device-border-radius-round);width:var(--post-device-sizing-interactive-button-height-2);height:var(--post-device-sizing-interactive-button-height-2);border:var(--post-device-border-width-default) solid var(--post-scheme-color-interactive-button-secondary-enabled-stroke);color:var(--post-scheme-color-interactive-button-secondary-enabled-fg);background-color:var(--post-scheme-color-interactive-button-secondary-enabled-bg);display:flex;align-items:center;justify-content:center}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top{background-color:ButtonFace !important}:host .back-to-top:hover{background-color:Highlight !important}}:host .back-to-top{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 .back-to-top: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 .back-to-top:is(:focus-visible,:has(:focus-visible),.pretend-focus){outline-color:Highlight !important}}@supports not selector(:has(:focus-visible)){:host .back-to-top: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 .back-to-top:is(:focus-visible,:focus-within,.pretend-focus){outline-color:Highlight !important}}}:host .back-to-top:hover{border-color:var(--post-scheme-color-interactive-button-secondary-hover-stroke);color:var(--post-scheme-color-interactive-button-secondary-hover-fg);background-color:var(--post-scheme-color-interactive-button-secondary-hover-bg)}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host .back-to-top:hover{color:HighlightText !important}}:host .back-to-top post-icon{height:var(--post-device-sizing-interactive-button-icon-3);width:var(--post-device-sizing-interactive-button-icon-3)}:host .visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);border:0}"}},[1,"post-back-to-top",{textBackToTop:[513,"text-back-to-top"],belowFold:[32]},void 0,{belowFold:[{watchBelowFold:0}]}]);function d(){"undefined"!=typeof customElements&&["post-back-to-top","post-icon"].forEach((t=>{switch(t){case"post-back-to-top":customElements.get(s(t))||customElements.define(s(t),p);break;case"post-icon":customElements.get(s(t))||a()}}))}(function(t,o,e,i){var s,r=arguments.length,c=r<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,o,e,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(c=(r<3?s(c):r>3?s(o,e,c):s(o,e))||c);r>3&&c&&Object.defineProperty(o,e,c)})([n(),l("string")],p.prototype,"textBackToTop",void 0),d();const h=p,b=d;export{h as PostBackToTop,b as defineCustomElement}
@@ -1 +1 @@
1
- import{p as o,H as t,c as e,h as i,a as s,t as c}from"./index.js";import{f as r}from"./p-D5knoiyy.js";import"./p-Bji_4dfL.js";import{E as a}from"./p-rEfV4v4a.js";import{v as n}from"./p-d02KpeUM.js";import{O as d}from"./p-BaB8wJvk.js";var l=function(o,t,e,i){var s,c=arguments.length,r=c<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(o,t,e,i);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(c<3?s(r):c>3?s(t,e,r):s(t,e))||r);return c>3&&r&&Object.defineProperty(t,e,r),r};const p=o(class extends t{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.postDismissed=e(this,"postDismissed"),this.mutationObserver=new MutationObserver(this.checkContent.bind(this)),this.hasActions=!1,this.type="info"}connectedCallback(){this.mutationObserver.observe(this.host,{childList:!0})}componentDidLoad(){this.checkContent()}disconnectedCallback(){this.mutationObserver.disconnect()}async dismiss(){const o=r(this.host,"out");await o.finished,this.postDismissed.emit(),this.host.remove()}onCloseButtonClick(){this.dismiss()}checkContent(){this.hasActions=this.host.querySelectorAll('[slot="actions"]').length>0}render(){return i(s,{key:"afa4834733c7e9d985d2102a3e421f09f94b44ba","data-version":n,role:"alert","data-color-scheme":"light"},i("slot",{key:"39dfccec7bf829ff354bac467a9b399e003ce473",name:"close-button"}),i("div",{key:"e6dfc60165185da4384c4143153ee34db1299088",class:"post-banner-content"},i("slot",{key:"9fc1e8e81cf396eb1ae1e5dfff7f04ccc6443986",name:"heading"}),i("slot",{key:"e7d21db6f7feb1507c612319c3d56595b797a3c4"}),this.hasActions&&i("div",{key:"d4229d09accb5cfb2a096c44ca523a132da4755d",class:"actions"},i("slot",{key:"b01633122bd45df2f95b7ee5e4694a83aceb68bd",name:"actions"}))))}get host(){return this}static get style(){return':host{position:relative;display:grid;grid-template-columns:1fr;grid-auto-rows:auto;grid-auto-flow:row;min-height:calc(var(--post-device-sizing-notification-icon-2) + (2 * var(--post-device-spacing-padding-10)));padding:var(--post-device-spacing-padding-10);padding-inline-start:calc( var(--post-device-spacing-padding-10) + var(--post-device-sizing-notification-icon-2) + var(--post-device-spacing-gap-inline-6) );color:var(--post-current-fg);border-style:var(--post-core-border-style-solid);border-width:var(--post-device-border-width-default);border-radius:var(--post-device-border-radius-2);box-shadow:var(--post-device-elevation-100);background-color:var(--post-scheme-color-interactive-notification-info-bg);border-color:var(--post-scheme-color-interactive-notification-info-stroke)}:host::before{content:"";display:block;position:absolute;height:var(--post-device-sizing-notification-icon-2);width:var(--post-device-sizing-notification-icon-2);inset-block-start:var(--post-device-spacing-padding-10);inset-inline-start:var(--post-device-spacing-padding-10);background-image:var(--post-signal-icon-info)}:host([type=info]){background-color:var(--post-scheme-color-interactive-notification-info-bg);border-color:var(--post-scheme-color-interactive-notification-info-stroke)}:host([type=info])::before{background-image:var(--post-signal-icon-info)}:host([type=success]){background-color:var(--post-scheme-color-interactive-notification-success-bg);border-color:var(--post-scheme-color-interactive-notification-success-stroke)}:host([type=success])::before{background-image:var(--post-signal-icon-success)}:host([type=warning]){background-color:var(--post-scheme-color-interactive-notification-warning-bg);border-color:var(--post-scheme-color-interactive-notification-warning-stroke)}:host([type=warning])::before{background-image:var(--post-signal-icon-warning)}:host([type=error]){background-color:var(--post-scheme-color-interactive-notification-error-bg);border-color:var(--post-scheme-color-interactive-notification-error-stroke)}:host([type=error])::before{background-image:var(--post-signal-icon-error)}.post-banner-content{display:grid;grid-template-columns:1fr;row-gap:var(--post-device-spacing-gap-block-1);overflow-x:auto}.actions{display:flex;flex-direction:row-reverse;justify-content:flex-start;align-items:center;margin-block-start:var(--post-device-spacing-padding-block-10);gap:var(--post-device-spacing-gap-1)}@media screen and (min-width: 0)and (max-width: 599.98px){.actions{flex-direction:column;align-items:stretch}}::slotted(*){margin-block:0 !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host{border-color:CanvasText}:host::before{color:CanvasText}}'}},[257,"post-banner",{type:[513],hasActions:[32],dismiss:[64]},[[0,"click","onCloseButtonClick"]]]);function f(){"undefined"!=typeof customElements&&["post-banner"].forEach((o=>{"post-banner"===o&&(customElements.get(c(o))||customElements.define(c(o),p))}))}l([d(["success","warning","error","info"])],p.prototype,"type",void 0),l([a("post-closebutton",{allowDescendants:!0})],p.prototype,"onCloseButtonClick",null),f();const v=p,g=f;export{v as PostBanner,g as defineCustomElement}
1
+ import{p as o,H as t,c as e,h as i,a as s,t as c}from"./index.js";import{f as r}from"./p-D5knoiyy.js";import"./p-Bji_4dfL.js";import{E as a}from"./p-rEfV4v4a.js";import{v as n}from"./p-Y58zWPwj.js";import{O as d}from"./p-BaB8wJvk.js";var l=function(o,t,e,i){var s,c=arguments.length,r=c<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(o,t,e,i);else for(var a=o.length-1;a>=0;a--)(s=o[a])&&(r=(c<3?s(r):c>3?s(t,e,r):s(t,e))||r);return c>3&&r&&Object.defineProperty(t,e,r),r};const p=o(class extends t{constructor(o){super(),!1!==o&&this.__registerHost(),this.__attachShadow(),this.postDismissed=e(this,"postDismissed"),this.mutationObserver=new MutationObserver(this.checkContent.bind(this)),this.hasActions=!1,this.type="info"}connectedCallback(){this.mutationObserver.observe(this.host,{childList:!0})}componentDidLoad(){this.checkContent()}disconnectedCallback(){this.mutationObserver.disconnect()}async dismiss(){const o=r(this.host,"out");await o.finished,this.postDismissed.emit(),this.host.remove()}onCloseButtonClick(){this.dismiss()}checkContent(){this.hasActions=this.host.querySelectorAll('[slot="actions"]').length>0}render(){return i(s,{key:"afa4834733c7e9d985d2102a3e421f09f94b44ba","data-version":n,role:"alert","data-color-scheme":"light"},i("slot",{key:"39dfccec7bf829ff354bac467a9b399e003ce473",name:"close-button"}),i("div",{key:"e6dfc60165185da4384c4143153ee34db1299088",class:"post-banner-content"},i("slot",{key:"9fc1e8e81cf396eb1ae1e5dfff7f04ccc6443986",name:"heading"}),i("slot",{key:"e7d21db6f7feb1507c612319c3d56595b797a3c4"}),this.hasActions&&i("div",{key:"d4229d09accb5cfb2a096c44ca523a132da4755d",class:"actions"},i("slot",{key:"b01633122bd45df2f95b7ee5e4694a83aceb68bd",name:"actions"}))))}get host(){return this}static get style(){return':host{position:relative;display:grid;grid-template-columns:1fr;grid-auto-rows:auto;grid-auto-flow:row;min-height:calc(var(--post-device-sizing-notification-icon-2) + (2 * var(--post-device-spacing-padding-10)));padding:var(--post-device-spacing-padding-10);padding-inline-start:calc( var(--post-device-spacing-padding-10) + var(--post-device-sizing-notification-icon-2) + var(--post-device-spacing-gap-inline-6) );color:var(--post-current-fg);border-style:var(--post-core-border-style-solid);border-width:var(--post-device-border-width-default);border-radius:var(--post-device-border-radius-2);box-shadow:var(--post-device-elevation-100);background-color:var(--post-scheme-color-interactive-notification-info-bg);border-color:var(--post-scheme-color-interactive-notification-info-stroke)}:host::before{content:"";display:block;position:absolute;height:var(--post-device-sizing-notification-icon-2);width:var(--post-device-sizing-notification-icon-2);inset-block-start:var(--post-device-spacing-padding-10);inset-inline-start:var(--post-device-spacing-padding-10);background-image:var(--post-signal-icon-info)}:host([type=info]){background-color:var(--post-scheme-color-interactive-notification-info-bg);border-color:var(--post-scheme-color-interactive-notification-info-stroke)}:host([type=info])::before{background-image:var(--post-signal-icon-info)}:host([type=success]){background-color:var(--post-scheme-color-interactive-notification-success-bg);border-color:var(--post-scheme-color-interactive-notification-success-stroke)}:host([type=success])::before{background-image:var(--post-signal-icon-success)}:host([type=warning]){background-color:var(--post-scheme-color-interactive-notification-warning-bg);border-color:var(--post-scheme-color-interactive-notification-warning-stroke)}:host([type=warning])::before{background-image:var(--post-signal-icon-warning)}:host([type=error]){background-color:var(--post-scheme-color-interactive-notification-error-bg);border-color:var(--post-scheme-color-interactive-notification-error-stroke)}:host([type=error])::before{background-image:var(--post-signal-icon-error)}.post-banner-content{display:grid;grid-template-columns:1fr;row-gap:var(--post-device-spacing-gap-block-1);overflow-x:auto}.actions{display:flex;flex-direction:row-reverse;justify-content:flex-start;align-items:center;margin-block-start:var(--post-device-spacing-padding-block-10);gap:var(--post-device-spacing-gap-1)}@media screen and (min-width: 0)and (max-width: 599.98px){.actions{flex-direction:column;align-items:stretch}}::slotted(*){margin-block:0 !important}@media (forced-colors: active),(-ms-high-contrast: active),(-ms-high-contrast: white-on-black){:host{border-color:CanvasText}:host::before{color:CanvasText}}'}},[257,"post-banner",{type:[513],hasActions:[32],dismiss:[64]},[[0,"click","onCloseButtonClick"]]]);function f(){"undefined"!=typeof customElements&&["post-banner"].forEach((o=>{"post-banner"===o&&(customElements.get(c(o))||customElements.define(c(o),p))}))}l([d(["success","warning","error","info"])],p.prototype,"type",void 0),l([a("post-closebutton",{allowDescendants:!0})],p.prototype,"onCloseButtonClick",null),f();const v=p,g=f;export{v as PostBanner,g as defineCustomElement}