PageSourceSearch

https://drinkpathwater.com/cdn/shop/t/147/assets/patrol-fixer.js?v=86404843160244109021788459337

js drinkpathwater.com collected 2026-09-24 09:54:17 UTC 4,944 bytes, 2 lines download raw bytes

1(function(){"use strict";const HIDDEN_FOCUS_SELECTOR="[data-patrol-hidden-focus]";function syncInertWithAriaHidden(element){element.toggleAttribute("inert",element.getAttribute("aria-hidden")==="true")}function startHiddenFocusSync(){const syncWithin=root=>{root instanceof HTMLElement&&root.matches(HIDDEN_FOCUS_SELECTOR)&&syncInertWithAriaHidden(root);for(const element of root.querySelectorAll(HIDDEN_FOCUS_SELECTOR))syncInertWithAriaHidden(element)};syncWithin(document.documentElement),new MutationObserver(mutations=>{for(const mutation of mutations){if(mutation.type==="attributes"){const target=mutation.target;target instanceof HTMLElement&&target.matches(HIDDEN_FOCUS_SELECTOR)&&syncInertWithAriaHidden(target);continue}for(const node of mutation.addedNodes)node instanceof Element&&syncWithin(node)}}).observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["aria-hidden"]})}const hiddenFocusSyncFix={id:"hidden-focus",start:startHiddenFocusSync};function watchMarkedElements(selector,managedAttribute,attach){const attachOnce=element=>{element instanceof HTMLElement&&!element.hasAttribute(managedAttribute)&&(element.setAttribute(managedAttribute,""),attach(element))},attachWithin=root=>{root.matches(selector)&&attachOnce(root);for(const element of root.querySelectorAll(selector))attachOnce(element)};attachWithin(document.documentElement),new MutationObserver(mutations=>{for(const mutation of mutations)for(const node of mutation.addedNodes)node instanceof Element&&attachWithin(node)}).observe(document.body,{childList:!0,subtree:!0})}const FOCUSABLE_SELECTOR='a[href], area[href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, [tabindex]:not([tabindex="-1"]), [contenteditable]',ESCAPE_CLOSE_WAIT_MS=150;function isPopupVisible(popup){if(popup.hasAttribute("hidden")||popup.getAttribute("aria-hidden")==="true"||popup instanceof HTMLDialogElement&&!popup.open)return!1;const style=window.getComputedStyle(popup);return style.display!=="none"&&style.visibility!=="hidden"&&parseFloat(style.opacity)!==0}function getVisibleFocusableElements(popup){const focusables=popup.querySelectorAll(FOCUSABLE_SELECTOR);return Array.from(focusables).filter(element=>element.getClientRects().length>0)}function findVisibleCloseControl(popup){const controls=popup.querySelectorAll('[data-close], button[class*="close" i], [aria-label*="close" i]');for(const control of controls)if(control.getClientRects().length>0)return control;return null}function attachPopupFocusManagement(popup){let isOpen=isPopupVisible(popup),triggerElement=null;const handleKeydown=event=>{if(!popup.isConnected){handleClose();return}if(event.key==="Tab"){const focusables=getVisibleFocusableElements(popup);if(focusables.length===0)return;const first=focusables[0],last=focusables[focusables.length-1],active=document.activeElement;popup.contains(active)?event.shiftKey&&active===first?(event.preventDefault(),last.focus()):!event.shiftKey&&active===last&&(event.preventDefault(),first.focus()):(event.preventDefault(),first.focus())}else event.key==="Escape"&&window.setTimeout(()=>{var _a;if(!(!popup.isConnected||!isPopupVisible(popup))){if(popup instanceof HTMLDialogElement){popup.close();return}(_a=findVisibleCloseControl(popup))==null||_a.click()}},ESCAPE_CLOSE_WAIT_MS)},handleOpen=()=>{const active=document.activeElement;if(triggerElement=active instanceof HTMLElement&&!popup.contains(active)?active:null,!popup.contains(active)){const focusables=getVisibleFocusableElements(popup);focusables.length>0?focusables[0].focus():(popup.hasAttribute("tabindex")||popup.setAttribute("tabindex","-1"),popup.focus())}document.addEventListener("keydown",handleKeydown)},handleClose=()=>{document.removeEventListener("keydown",handleKeydown),triggerElement?.isConnected&&triggerElement.focus(),triggerElement=null};new MutationObserver(()=>{const isVisible=isPopupVisible(popup);isVisible!==isOpen&&(isOpen=isVisible,isVisible?handleOpen():handleClose())}).observe(popup,{attributes:!0,attributeFilter:["class","style","aria-hidden","open","hidden"]})}
1const popupFocusManagementFix={id:"pop-up",start:()=>watchMarkedElements("[data-patrol-pop-up]","data-patrol-pop-up-managed",attachPopupFocusManagement)},TITLE_PROMOTION_MARKER="\u2060";function attachTitlePromotion(element){const title=element.getAttribute("title");title===null||title[0]!==TITLE_PROMOTION_MARKER||(element.setAttribute("aria-label",title.slice(1)),element.removeAttribute("title"))}const MARKER_FIXES=[hiddenFocusSyncFix,popupFocusManagementFix,{id:"title-promotion",start:()=>watchMarkedElements(`a[title^="${TITLE_PROMOTION_MARKER}"]`,"data-patrol-title-managed",attachTitlePromotion)}];function startMarkerFixRuntime(){for(const fix of MARKER_FIXES)fix.start()}startMarkerFixRuntime()})();
2//# sourceMappingURL=/cdn/shop/t/147/assets/patrol-fixer.js.map?v=86404843160244109021788459337

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.