PageSourceSearch

https://www.quarkexpeditions.com/wp-content/themes/quarkexpedition…/popoverpolyfill.js?ver=2026.09.23.01

js quarkexpeditions.com collected 2026-10-02 04:16:27 UTC 10,950 bytes, 1 lines download raw bytes

vendor: 9,311 bytes, line 1
1(()=>{"use strict";var e=class extends Event{oldState;newState;constructor(e,{oldState:t="",newState:n="",...o}={}){super(e,o),this.oldState=String(t||""),this.newState=String(n||"")}},t=new WeakMap;function n(n,o,r){t.set(n,setTimeout(()=>{t.has(n)&&n.dispatchEvent(new e("toggle",{cancelable:!1,oldState:o,newState:r}))},0))}var o=globalThis.ShadowRoot||function(){},r=globalThis.HTMLDialogElement||function(){},i=new WeakMap,a=new WeakMap,l=new WeakMap,s=new WeakMap;function u(e){return s.get(e)||"hidden"}var c=new WeakMap;function p(e){return[...e].pop()}function f(e,t){return!("auto"!==e.popover&&"manual"!==e.popover&&"hint"!==e.popover||!e.isConnected||t&&"showing"!==u(e)||!t&&"hidden"!==u(e)||e instanceof r&&e.hasAttribute("open")||document.fullscreenElement===e)}function d(e){if(!e)return 0;const t=a.get(document)||new Set,n=l.get(document)||new Set;return n.has(e)?[...n].indexOf(e)+t.size+1:t.has(e)?[...t].indexOf(e)+1:0}function h(e){let t;const n=l.get(e)||new Set,o=a.get(e)||new Set,r=n.size>0?n:o.size>0?o:null;return r?(t=p(r),t.isConnected?t:(r.delete(t),h(e))):null}function g(e){for(const t of e||[]){if(t.isConnected)return t;e.delete(t)}return null}function v(e){return"function"==typeof e.getRootNode?e.getRootNode():e.parentNode?v(e.parentNode):e}function m(e){for(;e;){if(e instanceof HTMLElement&&"auto"===e.popover&&"showing"===s.get(e))return e;if((e=e instanceof Element&&e.assignedSlot||e.parentElement||v(e))instanceof o&&(e=e.host),e instanceof Document)return}}function w(e,t){const n=new Map;let o=0;for(const e of t||[])n.set(e,o),o+=1;n.set(e,o),o+=1;let r=null;return function(t){if(!t)return;let o=!1,i=null,a=null;for(;!o;){if(i=m(t)||null,null===i)return;if(!n.has(i))return;"hint"!==e.popover&&"auto"!==i.popover||(o=!0),o||(t=i.parentElement)}a=n.get(i),(null===r||n.get(r)<a)&&(r=i)}(e.parentElement||v(e)),r}function b(e){return!(e.hidden||e instanceof o||(e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLOptGroupElement||e instanceof HTMLOptionElement||e instanceof HTMLFieldSetElement)&&e.disabled||e instanceof HTMLInputElement&&"hidden"===e.type||e instanceof HTMLAnchorElement&&""===e.href||"number"!=typeof e.tabIndex||-1===e.tabIndex)}var E=new WeakMap;function y(t){if(!f(t,!1))return;const o=t.ownerDocument;if(!t.dispatchEvent(new e("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"})))return;if(!f(t,!1))return;let r=!1;const u=t.popover;let p=null;const d=w(t,a.get(o)||new Set),g=w(t,l.get(o)||new Set);if("auto"===u&&(T(l.get(o)||new Set,r,!0),L(d||o,r,!0),p="auto"),"hint"===u&&(g?(L(g,r,!0),p="hint"):(T(l.get(o)||new Set,r,!0),d?(L(d,r,!0),p="auto"):p="hint")),"auto"===u||"hint"===u){if(u!==t.popover||!f(t,!1))return;h(o)||(r=!0),"auto"===p?(a.has(o)||a.set(o,new Set),a.get(o).add(t)):"hint"===p&&(l.has(o)||l.set(o,new Set),l.get(o).add(t))}E.delete(t);const v=o.activeElement;var m;t.classList.add(":popover-open"),s.set(t,"showing"),i.has(o)||i.set(o,new Set),i.get(o).add(t),D(c.get(t),!0),null==(m=function(e){if(e.shadowRoot&&!0!==e.shadowRoot.delegatesFocus)return null;let t=e;t.shadowRoot&&(t=t.shadowRoot);let n=t.querySelector("[autofocus]");if(n)return n;{const e=t.querySelectorAll("slot");for(const t of e){const e=t.assignedElements({flatten:!0});for(const t of e){if(t.hasAttribute("autofocus"))return t;if(n=t.querySelector("[autofocus]"),n)return n}}}const o=e.ownerDocument.createTreeWalker(t,NodeFilter.SHOW_ELEMENT);let r=o.currentNode;for(;r;){if(b(r))return r;r=o.nextNode()}}(t))||m.focus(),r&&v&&"auto"===t.popover&&E.set(t,v),n(t,"closed","open")}function S(t,o=!1,r=!1){var u,d;if(!f(t,!0))return;const h=t.ownerDocument;if(["auto","hint"].includes(t.popover)&&(L(t,o,r),!f(t,!0)))return;const g=a.get(h)||new Set,v=g.has(t)&&p(g)===t;if(D(c.get(t),!1),c.delete(t),r&&(t.dispatchEvent(new e("beforetoggle",{oldState:"open",newState:"closed"})),v&&p(g)!==t&&L(t,o,r),!f(t,!0)))return;null==(u=i.get(h))||u.delete(t),g.delete(t),null==(d=l.get(h))||d.delete(t),t.classList.remove(":popover-open"),s.set(t,"hidden"),r&&n(t,"open","closed");const m=E.get(t);m&&(E.delete(t),o&&m.focus())}function T(e,t=!1,n=!1){let o=g(e);for(;o;)S(o,t,n),o=g(e)}function M(e,t,n,o){let r=!1,i=!1;for(;r||!i;){i=!0;let a=null,l=!1;for(const n of t)if(n===e)l=!0;else if(l){a=n;break}if(!a)return;for(;"showing"===u(a)&&t.size;)S(p(t),n,o);t.has(e)&&p(t)!==e&&(r=!0),r&&(o=!1)}}function L(e,t,n){var o,r;const i=e.ownerDocument||e;if(e instanceof Document)return function(e,t=!1,n=!1){let o=h(e);for(;o;)S(o,t,n),o=h(e)}(i,t,n);(null==(o=l.get(i))?void 0:o.has(e))?M(e,l.get(i),t,n):(T(l.get(i)||new Set,t,n),(null==(r=a.get(i))?void 0:r.has(e))&&M(e,a.get(i),t,n))}var A=new WeakMap;function H(e){if(!e.isTrusted)return;const t=e.composedPath()[0];if(!t)return;const n=t.ownerDocument;if(!h(n))return;const r=function(e){const t=m(e),n=function(e){for(;e;){const t=e.popoverTargetElement;if(t instanceof HTMLElement)return t;if((e=e.parentElement||v(e))instanceof o&&(e=e.host),e instanceof Document)return}}(e);return d(t)>d(n)?t:n}(t);if(r&&"pointerdown"===e.type)A.set(n,r);else if("pointerup"===e.type){const e=A.get(n)===r;A.delete(n),e&&L(r||n,!1,!0)}}var k=new WeakMap;function D(e,t=!1){if(!e)return;k.has(e)||k.set(e,e.getAttribute("aria-expanded"));const n=e.popoverTargetElement;if(n instanceof HTMLElement&&"auto"===n.popover)e.setAttribute("aria-expanded",String(t));else{const t=k.get(e);t?e.setAttribute("aria-expanded",t):e.removeAttribute("aria-expanded")}}var x=globalThis.ShadowRoot||function(){};function P(e,t,n){const o=e[t];Object.defineProperty(e,t,{value(e){return o.call(this,n(e))}})}var R=/(^|[^\\]):popover-open\b/g;var W=null;function N(e){const t=function(){const e="function"==typeof globalThis.CSSLayerBlockRule;return`\n${e?"@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${e?"}":""}\n`}();if(null===W)try{(W=new CSSStyleSheet).replaceSync(t)}catch{W=!1}if(!1===W){const n=document.createElement("style");n.textContent=t,e instanceof Document?e.head.prepend(n):e.prepend(n)}else e.adoptedStyleSheets=[W,...e.adoptedStyleSheets]}"undefined"!=typeof HTMLElement&&"object"==typeof HTMLElement.prototype&&"popover"in HTMLElement.prototype||function(){if("undefined"==typeof window)return;function t(e){return(null==e?void 0:e.includes(":popover-open"))&&(e=e.replace(R,"$1.\\:popover-open")),e}window.ToggleEvent=window.ToggleEvent||e,P(Document.prototype,"querySelector",t),P(Document.prototype,"querySelectorAll",t),P(Element.prototype,"querySelector",t),P(Element.prototype,"querySelectorAll",t),P(Element.prototype,"matches",t),P(Element.prototype,"closest",t),P(DocumentFragment.prototype,"querySelectorAll",t),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;const e=(this.getAttribute("popover")||"").toLowerCase();return""===e||"auto"==e?"auto":"hint"==e?"hint":"manual"},set(e){null===e?this.removeAttribute("popover"):this.setAttribute("popover",e)}},showPopover:{enumerable:!0,configurable:!0,value(e={}){y(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){S(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(e={}){return"boolean"==typeof e&&(e={force:e}),"showing"===s.get(this)&&void 0===e.force||!1===e.force?S(this,!0,!0):void 0!==e.force&&!0!==e.force||y(this),"showing"===s.get(this)}}});const n=Element.prototype.attachShadow;n&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(e){const t=n.call(this,e);return N(t),t}}});const o=HTMLElement.prototype.attachInternals;o&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){const e=o.call(this);return e.shadowRoot&&N(e.shadowRoot),e}}});const r=new WeakMap;function i(e){Object.defineProperties(e.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(e){if(null===e)this.removeAttribute("popovertarget"),r.delete(this);else{if(!(e instanceof Element))throw new TypeError("popoverTargetElement must be an element or null");this.setAttribute("popovertarget",""),r.set(this,e)}}
1,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 e=r.get(this);if(e&&e.isConnected)return e;if(e&&!e.isConnected)return r.delete(this),null;const t=v(this),n=this.getAttribute("popovertarget");return(t instanceof Document||t instanceof x)&&n&&t.getElementById(n)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){const e=(this.getAttribute("popovertargetaction")||"").toLowerCase();return"show"===e||"hide"===e?e:"toggle"},set(e){this.setAttribute("popovertargetaction",e)}}})}i(HTMLButtonElement),i(HTMLInputElement);var a;(a=document).addEventListener("click",e=>{if(e.defaultPrevented)return;const t=e.composedPath(),n=t[0];if(!(n instanceof Element)||(null==n?void 0:n.shadowRoot))return;const o=v(n);if(!(o instanceof x||o instanceof Document))return;const r=t.find(e=>{var t;return null==(t=e.matches)?void 0:t.call(e,"[popovertargetaction],[popovertarget]")});return r?(function(e){const t=e.popoverTargetElement;if(!(t instanceof HTMLElement))return;const n=u(t);"show"===e.popoverTargetAction&&"showing"===n||"hide"===e.popoverTargetAction&&"hidden"===n||("showing"===n?S(t,!0,!0):f(t,!1)&&(c.set(t,e),y(t)))}(r),void e.preventDefault()):void 0}),a.addEventListener("keydown",e=>{const t=e.key,n=e.target;e.defaultPrevented||!n||"Escape"!==t&&"Esc"!==t||L(n.ownerDocument,!0,!0)}),a.addEventListener("pointerdown",H),a.addEventListener("pointerup",H),N(document)}(),window.popoverPolyfill={}.default})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.