"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([["vendors-node_modules_oddbird_popover-polyfill_dist_popover_js"],{13604:()=>{var e=class extends Event{oldState;newState;constructor(e,{oldState:t="",newState:o="",...n}={}){super(e,n),this.oldState=String(t||""),this.newState=String(o||"")}},t=new WeakMap;function o(o,n,r){t.set(o,setTimeout(()=>{t.has(o)&&o.dispatchEvent(new e("toggle",{cancelable:!1,oldState:n,newState:r}))},0))}var n=globalThis.ShadowRoot||function(){},r=globalThis.HTMLDialogElement||function(){},i=new WeakMap,l=new WeakMap,a=new WeakMap;function p(e){return a.get(e)||"hidden"}var u=new WeakMap;function s(e,t){return!("auto"!==e.popover&&"manual"!==e.popover||!e.isConnected||t&&"showing"!==p(e)||!t&&"hidden"!==p(e)||e instanceof r&&e.hasAttribute("open"))&&document.fullscreenElement!==e}function c(e){return e?Array.from(l.get(e.ownerDocument)||[]).indexOf(e)+1:0}function f(e){let t=l.get(e);for(let e of t||[]){if(e.isConnected)return e;t.delete(e)}return null}function d(e){return"function"==typeof e.getRootNode?e.getRootNode():e.parentNode?d(e.parentNode):e}function h(e){for(;e;){if(e instanceof HTMLElement&&"auto"===e.popover&&"showing"===a.get(e))return e;if((e=e.parentElement||d(e))instanceof n&&(e=e.host),e instanceof Document)return}}var m=new WeakMap;function g(t){if(!s(t,!1))return;let r=t.ownerDocument;if(!t.dispatchEvent(new e("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"}))||!s(t,!1))return;let p=!1;if("auto"===t.popover){let e=t.getAttribute("popover"),o=function(e){let t=new Map,o=0,n=e.ownerDocument;for(let e of l.get(n)||[])t.set(e,o),o+=1;t.set(e,o),o+=1;let r=null;return!function(e){let o=h(e);if(null===o)return;let n=t.get(o);(null===r||t.get(r)c(o)?t:o}(t);if(i&&"pointerdown"===e.type)E.set(o,i);else if("pointerup"===e.type){let e=E.get(o)===i;E.delete(o),e&&b(i||o,!1,!0)}}var T=new WeakMap;function S(e,t=!1){if(!e)return;T.has(e)||T.set(e,e.getAttribute("aria-expanded"));let o=e.popoverTargetElement;if(o instanceof HTMLElement&&"auto"===o.popover)e.setAttribute("aria-expanded",String(t));else{let t=T.get(e);t?e.setAttribute("aria-expanded",t):e.removeAttribute("aria-expanded")}}var M=globalThis.ShadowRoot||function(){};function L(e,t,o){let n=e[t];Object.defineProperty(e,t,{value(e){return n.call(this,o(e))}})}var A=/(^|[^\\]):popover-open\b/g,k="function"==typeof window.CSSLayerBlockRule,H=` ${k?"@layer popover-polyfill {":""} :where([popover]) { position: fixed; z-index: 2147483647; inset: 0; padding: 0.25em; width: fit-content; height: fit-content; border-width: initial; border-color: initial; border-image: initial; border-style: solid; background-color: canvas; color: canvastext; overflow: auto; margin: auto; } :where(dialog[popover][open]) { display: revert; } :where([anchor].\\:popover-open) { inset: auto; } :where([anchor]:popover-open) { inset: auto; } @supports not (background-color: canvas) { :where([popover]) { background-color: white; color: black; } } @supports (width: -moz-fit-content) { :where([popover]) { width: -moz-fit-content; height: -moz-fit-content; } } @supports not (inset: 0) { :where([popover]) { top: 0; left: 0; right: 0; bottom: 0; } } :where([popover]:not(.\\:popover-open)) { display: none; } ${k?"}":""} `,D=null;function x(e){if(null===D)try{(D=new CSSStyleSheet).replaceSync(H)}catch{D=!1}if(!1===D){let t=document.createElement("style");t.textContent=H,e instanceof Document?e.head.prepend(t):e.prepend(t)}else e.adoptedStyleSheets=[D,...e.adoptedStyleSheets]}"undefined"!=typeof HTMLElement&&"object"==typeof HTMLElement.prototype&&"popover"in HTMLElement.prototype||function(){var t;function o(e){return e?.includes(":popover-open")&&(e=e.replace(A,"$1.\\:popover-open")),e}window.ToggleEvent=window.ToggleEvent||e,L(Document.prototype,"querySelector",o),L(Document.prototype,"querySelectorAll",o),L(Element.prototype,"querySelector",o),L(Element.prototype,"querySelectorAll",o),L(Element.prototype,"matches",o),L(Element.prototype,"closest",o),L(DocumentFragment.prototype,"querySelectorAll",o),L(DocumentFragment.prototype,"querySelectorAll",o),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;let e=(this.getAttribute("popover")||"").toLowerCase();return""===e||"auto"==e?"auto":"manual"},set(e){this.setAttribute("popover",e)}},showPopover:{enumerable:!0,configurable:!0,value(){g(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){v(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(e){"showing"===a.get(this)&&void 0===e||!1===e?v(this,!0,!0):(void 0===e||!0===e)&&g(this)}}});let n=Element.prototype.attachShadow;n&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(e){let t=n.call(this,e);return x(t),t}}});let r=HTMLElement.prototype.attachInternals;r&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){let e=r.call(this);return e.shadowRoot&&x(e.shadowRoot),e}}});let i=new WeakMap;function l(e){Object.defineProperties(e.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(e){if(null===e)this.removeAttribute("popovertarget"),i.delete(this);else if(e instanceof Element)this.setAttribute("popovertarget",""),i.set(this,e);else throw TypeError("popoverTargetElement must be an element or null")},get(){if("button"!==this.localName&&"input"!==this.localName||"input"===this.localName&&"reset"!==this.type&&"image"!==this.type&&"button"!==this.type||this.disabled||this.form&&"submit"===this.type)return null;let e=i.get(this);if(e&&e.isConnected)return e;if(e&&!e.isConnected)return i.delete(this),null;let t=d(this),o=this.getAttribute("popovertarget");return(t instanceof Document||t instanceof M)&&o&&t.getElementById(o)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){let e=(this.getAttribute("popovertargetaction")||"").toLowerCase();return"show"===e||"hide"===e?e:"toggle"},set(e){this.setAttribute("popovertargetaction",e)}}})}l(HTMLButtonElement),l(HTMLInputElement),(t=document).addEventListener("click",e=>{let t=e.composedPath(),o=t[0];if(!(o instanceof Element)||o?.shadowRoot)return;let n=d(o);if(!(n instanceof M||n instanceof Document))return;let r=t.find(e=>e.matches?.("[popovertargetaction],[popovertarget]"));if(r){(function(e){let t=e.popoverTargetElement;if(!(t instanceof HTMLElement))return;let o=p(t);("show"!==e.popoverTargetAction||"showing"!==o)&&("hide"!==e.popoverTargetAction||"hidden"!==o)&&("showing"===o?v(t,!0,!0):s(t,!1)&&(u.set(t,e),g(t)))})(r),e.preventDefault();return}}),t.addEventListener("keydown",e=>{let t=e.key,o=e.target;!e.defaultPrevented&&o&&("Escape"===t||"Esc"===t)&&b(o.ownerDocument,!0,!0)}),t.addEventListener("pointerdown",y),t.addEventListener("pointerup",y),x(document)}()}}]); //# sourceMappingURL=vendors-node_modules_oddbird_popover-polyfill_dist_popover_js-c66d080b2be4.js.map