PageSourceSearch

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

js drinkpathwater.com collected 2026-09-24 09:54:18 UTC 59,962 bytes, 198 lines download raw bytes

1/*!
2 * patrol-shopify-theme-a11y v2.3.1
3 * https://github.com/Patrol-AI/patrol-shopify-theme-a11y#readme
4 * Built 2026-09-03T17:24:29.189Z
5 */(function(){"use strict";function At(e){if(typeof window>"u"||!window.fetch||window.fetch.__fetchInterceptorOriginal)return;const n=window.fetch.bind(window),s=(async(...c)=>{const f=await n(...c),g=c[0],w=typeof g=="string"?g:g instanceof URL?g.toString():g.url,y=f.clone();try{e.execute(w,y)}catch(E){console.warn("[fetch-interceptor]: Unexpected error:",E)}return f});s.__fetchInterceptorOriginal=n,window.fetch=s}class wt{#e=[];constructor(){this.#e=[]}registerInterceptor(t){this.#e.push(t)}execute(t,n){Promise.all(this.#e.map(s=>s.interceptFetchRequest(t,n)))}}const Xe=new wt;function St(){At(Xe)}const Tt=e=>{e.style.display="block",e.style.position="absolute",e.style.margin="-1px",e.style.border="0",e.style.padding="0",e.style.width="1px",e.style.height="1px",e.style.overflow="hidden",e.style.clipPath="inset(50%)",e.style.whiteSpace="nowrap"};var Qe=(e=>(e.STATUS="STATUS",e.ALERT="ALERT",e))(Qe||{});class Ct extends HTMLElement{#e=null;#t;constructor(t){super(),this.#t=t||"STATUS"}#n(t){const n=document.createElement("div"),s=this.getAttribute("announcer-id");return s&&(n.id=s),n.setAttribute("aria-atomic","true"),n.setAttribute("role",t==="ALERT"?"alert":"status"),Tt(n),n}#r(t){const n=this.#n(t);return this.#e=n,this.insertAdjacentElement("afterend",n),n}getAnnouncerEl(){return this.#e}announceUpdate(t){this.#e&&(this.#e.textContent=t)}connectedCallback(){(!this.#e||!this.#e.isConnected)&&(this.#e=this.#r(this.#t))}disconnectedCallback(){this.#e&&(this.#e.remove(),this.#e=null)}}const _t=300,kt=4e3;class Ye extends Ct{#e=new Map;#t=null;#n=null;announce(t,n){this.#e.set(t,n),this.#r()}#r(){this.#t&&clearTimeout(this.#t),this.#n&&clearTimeout(this.#n),this.#t=setTimeout(()=>{this.#o()},_t)}#o(){if(this.#e.size===0)return;const t=Array.from(this.#e.values());this.#e.clear(),super.announceUpdate(t.join(". ")),this.#n=setTimeout(()=>{super.announceUpdate("")},kt)}disconnectedCallback(){super.disconnectedCallback(),this.#t&&clearTimeout(this.#t),this.#n&&clearTimeout(this.#n),this.#e.clear()}}const Je=(e,t)=>{window.customElements.get(e)?console.warn(`[${e}]: Custom element already defined`):(window.customElements.define(e,t),console.log(`[${e}]: Successfully defined custom element`))},me='input[name="quantity"]';class Lt extends Ye{constructor(){super(),this.handleQtyChange=this.handleQtyChange.bind(this),this.handlePlusBtn=this.handlePlusBtn.bind(this),this.handleMinusBtn=this.handleMinusBtn.bind(this)}handleQtyChange(t){const n=t.currentTarget.parentElement.parentElement.querySelector(me).value;this.announce("CHANGE",`Quantity updated to ${n}`)}handlePlusBtn(t){const n=t.currentTarget.parentElement.parentElement.querySelector(me).value;this.announce("CHANGE",`Quantity updated to ${+n}`)}handleMinusBtn(t){const n=t.currentTarget.parentElement.parentElement.querySelector(me).value;this.announce("CHANGE",`Quantity updated to ${+n}`)}connectedCallback(){super.connectedCallback(),document.querySelectorAll(me).forEach(n=>{n.addEventListener("change",this.handleQtyChange);const s=n.parentElement.querySelectorAll("button");s[0].addEventListener("click",this.handleMinusBtn),s[1].addEventListener("click",this.handlePlusBtn)})}disconnectedCallback(){super.disconnectedCallback(),document.querySelectorAll(me).forEach(n=>{n.removeEventListener("change",this.handleQtyChange);const s=n.parentElement.parentElement.querySelectorAll("button");s[0].removeEventListener("click",this.handleMinusBtn),s[1].removeEventListener("click",this.handlePlusBtn)})}}(async()=>{try{Je("qty-announcements",Lt),document.body.insertAdjacentHTML("beforeend","<qty-announcements></qty-announcements>"),console.log("[qty-announcements]: Successfully attached to current cart")}catch(e){console.warn("[qty-announcements]: Unable to attach to current cart",e)}})();var be=(e=>(e.ADD_TO_CART="/cart/add.js",e.CART_CHANGED="/cart/change.js",e.CART_CHANGED_NO_EXT="/cart/change",e.CART_LOADED="/cart.js",e))(be||{}),Y=(e=>(e.ON_ADD_TO_CART="on:cart:add",e.ON_CART_LOADED="on:cart:loaded",e.ON_CART_ERROR="on:cart:error",e))(Y||{});const Rt=[be.CART_LOADED,be.CART_CHANGED,be.CART_CHANGED_NO_EXT],Ot=["/cart.json"];class $t{async interceptFetchRequest(t,n){try{if(Ot.some(f=>t.includes(f)))return;
5const s=Rt.some(f=>t.includes(f)),c=t.includes(be.ADD_TO_CART);if(!s&&!c)return;if(Nt(n)){await this.#e(t,n);return}if(s){const f=await n.json();document.dispatchEvent(new CustomEvent(Y.ON_CART_LOADED,{detail:{cart:f}}))}if(c){const f=await n.json();document.dispatchEvent(new CustomEvent(Y.ON_ADD_TO_CART,{detail:{cart:f}}))}}catch(s){console.warn("[cart-interceptor]: Failed to parse JSON response:",s)}}async#e(t,n){const s=await It(n),c={status:n.status,url:t,description:s.description,message:s.message};console.warn(`[cart-interceptor]: Cart request failed with ${c.status}:`,t,s),document.dispatchEvent(new CustomEvent(Y.ON_CART_ERROR,{detail:c}))}}const It=async e=>{try{const t=await e.json();return!t||typeof t!="object"?{}:{...t,description:typeof t.description=="string"?t.description:xt(t.errors),message:typeof t.message=="string"?t.message:void 0}}catch{return{}}},xt=e=>!e||typeof e!="object"?void 0:Object.values(e).flat().find(n=>typeof n=="string"&&n.length>0),Nt=e=>typeof e.status=="number"&&e.status>=400,Dt=()=>{Xe.registerInterceptor(new $t)};function Mt(e,t){return new Promise(n=>{const s=document.querySelector(e);if(s)return n(s);const c=new MutationObserver(f=>{if(!f.some(y=>y.type==="childList"&&y.addedNodes.length>0))return;const w=document.querySelector(e);w&&(c.disconnect(),n(w))});c.observe(document.body,{childList:!0,subtree:!0})})}const xe={UNPROCESSABLE:"Could not update your cart. The item may be sold out or unavailable in the requested quantity.",SERVER:"Something went wrong updating your cart. Please try again.",GENERIC:"Could not update your cart. Please try again."},Ft=({status:e,description:t})=>t?`Cart error: ${t}`:e===422?xe.UNPROCESSABLE:e>=500?xe.SERVER:xe.GENERIC;class qt extends Ye{constructor(){super(Qe.ALERT),this.handleCartAdd=this.handleCartAdd.bind(this),this.handleCartUpdate=this.handleCartUpdate.bind(this),this.handleCartError=this.handleCartError.bind(this)}handleCartAdd(t){const n=t.detail.cart;if(n?.items&&Array.isArray(n.items)){const c=n.items;if(c.length===1){const f=c[0],g=f.product_title||f.title||"Product";this.announce("cart",`${g} added to cart`)}else this.announce("cart",`${c.length} items added to cart`);return}const s=t.detail.cart;if(s?.product_title||s?.title){const c=s.product_title||s.title||"Product";this.announce("cart",`${c} added to cart`);return}this.announce("cart","Item added to cart")}handleCartUpdate(t){const n=t.detail.cart;if(n&&n.item_count!==void 0){const s=n.item_count;s===0?this.announce("cart","Cart is now empty"):this.announce("cart",`Cart updated. ${s} item${s!==1?"s":""} in cart`)}}handleCartError(t){const n=t.detail;n&&this.announce("cart-error",Ft(n))}connectedCallback(){super.connectedCallback(),document.addEventListener(Y.ON_ADD_TO_CART,this.handleCartAdd),document.addEventListener(Y.ON_CART_LOADED,this.handleCartUpdate),document.addEventListener(Y.ON_CART_ERROR,this.handleCartError)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener(Y.ON_ADD_TO_CART,this.handleCartAdd),document.removeEventListener(Y.ON_CART_LOADED,this.handleCartUpdate),document.removeEventListener(Y.ON_CART_ERROR,this.handleCartError)}}const Pt=async e=>{try{Je("cart-announcements",qt);let t=e?await Mt(e):null;t||(t=document.body),t.insertAdjacentHTML("beforeend","<cart-announcements></cart-announcements>"),console.log("[cart-announcements]: Successfully attached to current cart")}catch(t){console.warn("[cart-announcements]: Unable to attach to current cart",t)}};Dt(),Pt();const Ze=(e,t)=>{if(document.getElementById(e))return;const n=document.createElement("style");n.id=e,n.textContent=t,document.head.appendChild(n)},ye=["a[href]","area[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","details > summary:first-of-type","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(", "),et=`${ye}, [tabindex]`,Bt=e=>{if(e.getClientRects().length===0)return!1;const t=getComputedStyle(e);return t.visibility!=="hidden"&&t.contentVisibility!=="hidden"},Ut=e=>{const t=e.closest("fieldset[disabled]");if(!t)return!1;const n=Array.from(t.children).find(s=>s.tagName==="LEGEND");return!n||!n.contains(e)},Ht=e=>{if(!(e instanceof HTMLInputElement)||e.type!=="radio"||e.checked||!e.name)return!1;const n=(e.form??e.ownerDocument).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}
5"]`);return Array.from(n).some(s=>s.checked)},Gt=e=>Array.from(e.children).find(t=>t.tagName==="SUMMARY")??null,tt=e=>{if(e.closest('[inert], [hidden], [aria-hidden="true"]')||Ut(e))return!1;const t=e.closest("details:not([open])");return t&&e!==Gt(t)?!1:Bt(e)},jt=e=>{const t=e.getAttribute("tabindex");if(t===null)return null;const n=Number.parseInt(t,10);return Number.isNaN(n)?null:n},Kt=e=>{const t=jt(e);if(t!==null){if(t<0)return!1}else if(!e.matches(ye))return!1;return tt(e)&&!Ht(e)},Ee=e=>Array.from(e.querySelectorAll(et)).find(Kt)??null,zt=`/* Styles for the pieces carousel-directive.ts writes onto a Swiper gallery.
6   The bundle ships as a single IIFE, so this file is imported as a raw string and injected
7   at runtime instead of being emitted as a stylesheet the theme would have to load.
8
9   Two things need CSS and nothing else does. A thumbnail that becomes a \`role="tab"\` is
10   usually a \`div\`, so the theme has never had a reason to give it a focus ring - and the
11   keyboard support this directive adds is invisible without one. The rotation control is
12   markup the directive injects, so nothing in the theme styles it at all. */
13
14/* Only applied when the carousel is not positioned already, so the injected control can be
15   placed against it without breaking a sticky/relative ancestor the theme relies on. */
16.patrol-carousel--relative {
17  position: relative;
18}
19
20/* Swiper puts \`overflow: hidden\` on the carousel root, which would clip an outline drawn on
21   the outermost thumbnail. The offset below stays inside the thumbnail for that reason. */
22.patrol-carousel__tablist [role='tab']:focus-visible {
23  outline: 2px solid currentColor;
24  outline-offset: -3px;
25}
26
27/* Safari and older Firefox do not resolve :focus-visible on an element made focusable by
28   tabindex alone, so the plain :focus is kept as the fallback that always lands. */
29.patrol-carousel__tablist [role='tab']:focus {
30  outline: 2px solid currentColor;
31  outline-offset: -3px;
32}
33
34.patrol-carousel__tablist [role='tab']:focus:not(:focus-visible) {
35  outline: none;
36}
37
38.patrol-carousel__rotation {
39  position: absolute;
40  top: 8px;
41  left: 8px;
42  /* Above Swiper's own navigation, which sits at z-index 10. */
43  z-index: 11;
44
45  display: flex;
46  align-items: center;
47  justify-content: center;
48
49  /* 24px is the smallest target WCAG 2.5.8 accepts. */
50  width: 32px;
51  height: 32px;
52  margin: 0;
53  border: 1px solid rgba(0, 0, 0, 0.15);
54  border-radius: 50%;
55  padding: 0;
56
57  background: rgba(255, 255, 255, 0.9);
58  color: #1a1a1a;
59  cursor: pointer;
60}
61
62.patrol-carousel__rotation:focus-visible {
63  outline: 2px solid currentColor;
64  outline-offset: 2px;
65}
66
67/* The icon is drawn in CSS rather than shipped as an SVG so the injected markup stays a
68   single element the theme can restyle without knowing what is inside it. */
69.patrol-carousel__rotation-icon {
70  display: block;
71}
72
73/* Rotating, so the button stops it: two bars. */
74.patrol-carousel__rotation[data-patrol-rotation-state='playing'] .patrol-carousel__rotation-icon {
75  box-sizing: border-box;
76  width: 12px;
77  height: 13px;
78  border-left: 4px solid currentColor;
79  border-right: 4px solid currentColor;
80}
81
82/* Stopped, so the button starts it: a triangle. */
83.patrol-carousel__rotation[data-patrol-rotation-state='paused'] .patrol-carousel__rotation-icon {
84  width: 0;
85  height: 0;
86  margin-left: 2px;
87  border-top: 7px solid transparent;
88  border-bottom: 7px solid transparent;
89  border-left: 12px solid currentColor;
90}
91`,Vt="swiper",nt=["slideChange","activeIndexChange","realIndexChange","transitionEnd","update","observerUpdate","resize","autoplayStart","autoplayStop","autoplayPause","autoplayResume"],Ne=e=>{const t=e.swiper;return!t||t.destroyed||!t.el||!t.wrapperEl||!t.slides||typeof t.on!="function"||typeof t.slideTo!="function"?null:t},De=e=>Array.from(e.slides??[]),rt=(e,t)=>{const n=e.getAttribute("data-swiper-slide-index");if(n!==null){const s=Number.parseInt(n,10);if(!Number.isNaN(s))return s}return t},Wt=e=>{const t=e.params?.autoplay;return t?typeof t=="boolean"?t:t.enabled!==!1:!1},ot=e=>{const{params:t}=e;if(typeof t.a11y=="object"&&t.a11y){if(t.a11y.enabled===!1)return;t.a11y.enabled=!1}else if(t.a11y===!0)t.a11y={enabled:!1};else return;try{e.a11y?.destroy?.()}catch{}e.el.querySelectorAll(".swiper-notification").forEach(n=>n.remove()),De(e).forEach(n=>
91{n.removeAttribute("role"),n.removeAttribute("aria-label"),n.removeAttribute("aria-roledescription")})},Xt=(e,t)=>{const n=e.thumbs?.swiper;if(n&&Ne(n.el))return n;const s=t.thumbsSelector;if(!s)return null;let c=null;try{c=document.querySelector(s)}catch{return t.warn(`data-patrol-carousel-thumbs="${s}" is not a valid selector`),null}return c?Ne(c)||(t.warn(`data-patrol-carousel-thumbs="${s}" is not an initialised Swiper`),null):(t.warn(`data-patrol-carousel-thumbs="${s}" matched nothing`),null)},Qt=e=>Wt(e)?{control:null,labelled:!1,managesSuspension:!1,isRotating:()=>!!(e.autoplay?.running&&!e.autoplay.paused),start:()=>{const{autoplay:t}=e;t?.running&&t.paused?t.resume?.():t?.running||t?.start?.()},stop:()=>{e.autoplay?.running&&e.autoplay.stop?.()},suspend:()=>{const{autoplay:t}=e;!t?.running||t.paused||(typeof t.pause=="function"?t.pause():t.stop?.())},resume:()=>{const{autoplay:t}=e;t?.running&&t.paused?t.resume?.():t?.running||t?.start?.()}}:null,Yt={name:Vt,read:(e,t)=>{const n=Ne(e);if(!n)return null;const s=Xt(n,t),c=De(n),f=c.map(rt),g=f.reduce((S,R)=>Math.max(S,R+1),0),y=(s?De(s):[]).filter((S,R)=>rt(S,R)===R).slice(0,g);s&&y.length!==g&&t.warn(`carousel has ${g} slides but ${y.length} thumbnails - the extra ones are not wired`);const E=s?.params.direction??n.params.direction;return{instance:n,root:e,track:n.wrapperEl,frame:n.el,slides:c,positions:f,total:g,current:()=>n.realIndex,tablist:s?s.wrapperEl:null,thumbs:y,thumbsRoot:s?s.el:null,vertical:E==="vertical",managesHidden:!1,parkSelector:et,managesLiveRegion:!1,managesSlideLabels:!1,rotation:Qt(n),goTo:S=>{n.params.loop&&typeof n.slideToLoop=="function"?n.slideToLoop(S):n.slideTo(S)},guardFocusScroll:!n.params.cssMode,frames:s?[n.el,s.el]:[n.el],releaseA11y:()=>{ot(n),s&&ot(s)},watch:(S,R)=>(nt.forEach(x=>n.on(x,S)),n.on("destroy",R),()=>{nt.forEach(x=>n.off(x,S)),n.off("destroy",R)})}}},Jt="splide",Zt="is-initialized",Se=".splide__track",st=".splide__list",at="splide__slide",en="splide__slide--clone",Me="is-active",tn=".splide__toggle",nn="splide--nav",rn="splide--ttb",on=e=>{const t=e.splide;return!t||t.root!==e||typeof t.go!="function"||typeof t.on!="function"||!t.Components?null:t},Te=e=>e.querySelector(`:scope > ${Se}`)??e.querySelector(Se),Ce=e=>e.querySelector(`:scope > ${st}`)??e.querySelector(st),ue=e=>Array.from(e.children).filter(t=>t.classList.contains(at)),ie=e=>e.classList.contains(en),sn=e=>{const t=Te(e),n=t?Ce(t):null;return n?ue(n).filter(s=>!ie(s)):[]},it=(e,t)=>{const n=e.findIndex(c=>!ie(c));let s=0;return e.map((c,f)=>ie(c)?f<n?(t-n+f+t)%t:(f-n)%t:s++)},an=(e,t)=>{const n=e.findIndex(c=>c.classList.contains(Me)&&!ie(c));if(n!==-1)return t[n];const s=e.findIndex(c=>c.classList.contains(Me));return s===-1?0:t[s]},ln=(e,t,n)=>{const s=[e.parentElement,e.parentElement?.parentElement];for(const c of s){if(!c)continue;const f=Array.from(c.querySelectorAll(`.${nn}`)).filter(w=>w!==e&&!w.contains(e)&&!e.contains(w));if(!f.length)continue;const g=f.filter(w=>sn(w).length===t);return g.length===1?g[0]:(n.warn(`found ${f.length} thumbnail strips near this carousel and none of them names it - add data-patrol-carousel-thumbs="<selector>" to say which one is its own`),null)}return null},cn=(e,t,n,s)=>{const c=new Set(t.map(S=>S.id).filter(Boolean));if(c.size){const S=Array.from(document.querySelectorAll(`.${at}[aria-controls]`)).filter(x=>{const q=x.getAttribute("aria-controls")?.trim();return!!q&&q.split(/\s+/).some(U=>c.has(U))}),R=S.find(x=>!t.includes(x))?.parentElement;if(R)return{list:R,thumbs:S.filter(x=>x.parentElement===R)}}const f=ln(e,n,s);if(f){const S=Te(f),R=S?Ce(S):null;if(R)return{list:R,thumbs:ue(R).filter(x=>!ie(x))}}const g=s.thumbsSelector;if(!g)return null;let w=null;try{w=document.querySelector(g)}catch{return s.warn(`data-patrol-carousel-thumbs="${g}" is not a valid selector`),null}if(!w)return s.warn(`data-patrol-carousel-thumbs="${g}" matched nothing`),null;const E=Te(w),A=E?Ce(E):null;return A?{list:A,thumbs:ue(A).filter(S=>!ie(S))}:(s.warn(`data-patrol-carousel-thumbs="${g}" is not an initialised Splide`),null)},un=(e,t,n)=>t?!!t.options.autoplay:n?!0:e.getAttribute("aria-live")==="off",dn=(e,t,n,s)=>{const c=e.querySelector(tn);if(!un(t,n,c))return null;const f={managesSuspension:!0,suspend:()=>{},resume:()=>{}};if(c){const w=()=>c.classList.contains(Me);return{...f,control:c,labelled:!0,isRotating:w,start:()=>{w()||c.click()},stop:()=>{w()&&c.click()}}}const g=n?.Components.Autoplay;return g?{...f,control:null,labelled:!1,isRotating:()=>
91!g.isPaused?.(),start:()=>g.play?.(),stop:()=>g.pause?.()}:(s.warn('splide carousel rotates by itself and cannot be stopped from here - ship a <button class="splide__toggle"> inside it, or put the instance on its root with `root.splide = splide`'),null)},fn={name:Jt,read:(e,t)=>{if(!e.classList.contains(Zt))return null;const n=Te(e),s=n?Ce(n):null;if(!n||!s)return null;const c=ue(s);if(!c.length)return null;const f=c.filter(A=>!ie(A)).length;if(!f)return null;const g=it(c,f),w=cn(e,c,f,t),y=on(e);return w&&w.thumbs.length!==f&&t.warn(`carousel has ${f} slides but ${w.thumbs.length} thumbnails - the extra ones are not wired`),{instance:y,root:e,track:n,frame:n,slides:c,positions:g,total:f,current:()=>y?y.index:an(ue(s),it(ue(s),f)),tablist:w?w.list:null,thumbs:w?w.thumbs.slice(0,f):[],thumbsRoot:w?.list.closest(".splide")??w?.list??null,vertical:(w?.list.closest(".splide")??e).classList.contains(rn),managesHidden:!0,parkSelector:null,managesLiveRegion:!0,managesSlideLabels:!0,rotation:dn(e,n,y,t),goTo:A=>y?.go(A),guardFocusScroll:!0,frames:w?.list.closest(Se)?[n,w.list.closest(Se)]:[n],releaseA11y:()=>{w?.thumbs.forEach(S=>{S.removeAttribute("aria-current"),S.removeAttribute("aria-label"),S.removeAttribute("aria-hidden")});const A=w?.list.closest(".splide");A&&A!==e&&(A.getAttribute("role")==="region"&&A.removeAttribute("role"),A.removeAttribute("aria-roledescription"))},watch:(A,S)=>{const R=new MutationObserver(A);return R.observe(n,{attributes:!0,attributeFilter:["class"],subtree:!0}),y?(y.on("destroyed",S),()=>{R.disconnect(),y.off("destroyed",S)}):()=>R.disconnect()}}}},pn="slick",hn="slick-initialized",mn=".slick-slide",bn="slick-cloned",yn=".slick-track",En=".slick-dots",gn=["textarea:not([disabled])","iframe","object","embed","audio[controls]","video[controls]","details > summary:first-of-type","area[href]",'[contenteditable]:not([contenteditable="false"])',"[tabindex]:not(a):not(input):not(button):not(select)"].join(", "),le=e=>e&&e.length?e[0]:null,Fe=e=>{if(!e.classList.contains(hn))return null;const t=e.slick;
91return!t||t.unslicked||typeof t.slickGoTo!="function"||!t.$list||!t.$slideTrack?null:t},_e=e=>Array.from(e.querySelectorAll(mn)),qe=e=>e.classList.contains(bn),vn=(e,t,n)=>{const s=e.getAttribute("data-slick-index");if(s===null)return t%n;const c=Number.parseInt(s,10);return Number.isNaN(c)?t%n:(c%n+n)%n},An=(e,t,n)=>{const{asNavFor:s}=e.options;if(s){const E=typeof s=="string"?document.querySelector(s):le(s),A=E?Fe(E):null,S=A?le(A.$slideTrack):null;if(A&&S)return{root:E,list:S,thumbs:_e(S).filter(R=>!qe(R)),vertical:!!A.options.vertical};n.warn(`asNavFor points at ${typeof s=="string"?s:"an element"} which is not an initialised Slick`)}const c=le(e.$dots)??t.querySelector(En);if(c)return{root:c,list:c,thumbs:Array.from(c.children).filter(E=>E instanceof HTMLElement),vertical:!1};const f=n.thumbsSelector;if(!f)return null;let g=null;try{g=document.querySelector(f)}catch{return n.warn(`data-patrol-carousel-thumbs="${f}" is not a valid selector`),null}if(!g)return n.warn(`data-patrol-carousel-thumbs="${f}" matched nothing`),null;const w=Fe(g),y=w?le(w.$slideTrack):g.querySelector(yn);return y?{root:g,list:y,thumbs:_e(y).filter(E=>!qe(E)),vertical:!!w?.options.vertical}:(n.warn(`data-patrol-carousel-thumbs="${f}" is not an initialised Slick`),null)},wn=(e,t)=>{const n=le(e.$slideTrack);n?.getAttribute("role")==="listbox"&&n.removeAttribute("role"),t.forEach(s=>{s.querySelector('img[alt]:not([alt=""])')&&(s.removeAttribute("aria-label"),s.querySelectorAll("button, a").forEach(g=>g.removeAttribute("aria-label"))),(s.getAttribute("role")==="presentation"||s.tagName==="LI")&&s.removeAttribute("aria-selected");const f=s.getAttribute("aria-controls");f&&!document.getElementById(f)&&s.removeAttribute("aria-controls")})},Sn=e=>{if(!e.options.autoplay)return null;const t=e.options.pauseOnHover!==!1&&e.options.pauseOnFocus!==!1,n=()=>e.slickPause?.(),s=()=>e.slickPlay?.();return{control:null,labelled:!1,managesSuspension:t,isRotating:()=>!e.paused,start:s,stop:n,suspend:n,resume:s}},Tn=[Yt,fn,{name:pn,read:(e,t)=>{const n=Fe(e);if(!n)return null;const s=le(n.$slideTrack),c=le(n.$list);if(!s||!c)return null;const f=n.slideCount||_e(s).filter(A=>!qe(A)).length;if(!f)return null;const g=_e(s),w=g.map((A,S)=>vn(A,S,f)),y=An(n,e,t);return y&&y.thumbs.length!==f&&t.warn(`carousel has ${f} slides but ${y.thumbs.length} thumbnails - the extra ones are not wired`),{instance:n,root:e,track:c,frame:c,slides:g,positions:w,total:f,current:()=>n.currentSlide,tablist:y?y.list:null,thumbs:y?y.thumbs.slice(0,f):[],thumbsRoot:y?y.root:null,vertical:y?y.vertical:!!n.options.vertical,managesHidden:!0,parkSelector:gn,managesLiveRegion:!1,managesSlideLabels:!1,rotation:Sn(n),goTo:A=>n.slickGoTo(A),guardFocusScroll:!0,frames:[c],releaseA11y:()=>wn(n,y?.thumbs??[]),watch:A=>{const S=new MutationObserver(A);return S.observe(c,{attributes:!0,attributeFilter:["class"],subtree:!0}),y&&S.observe(y.list,{attributes:!0,attributeFilter:["class","aria-selected"],subtree:!0}),()=>S.disconnect()}}}}],ge="data-patrol-carousel",Pe="data-patrol-carousel-thumbs",Be="data-patrol-carousel-rotation",lt="data-patrol-carousel-label",Cn=`[${ge}]`,_n="patrol-carousel-styles",kn="patrol:carousel-change",Ln="patrol:carousel-rotation",Rn="patrol-carousel-slide-",On="patrol-carousel-tab-",$n="patrol-carousel-label-",In="patrol-carousel__tablist",xn="patrol-carousel__rotation",Nn="patrol-carousel--relative",Dn='h1, h2, h3, h4, h5, h6, [role="heading"]',ve="data-patrol-carousel-tabindex",Mn=[ge,Pe],Fn=["class",ge,Pe],D=(e,t,n)=>{e.getAttribute(t)!==n&&e.setAttribute(t,n)},ct=(e,t)=>{e.hasAttribute(t)&&e.removeAttribute(t)},Ue=(e,t,n)=>{if(e.id)return e.id;const s=`${t}${n}`;let c=s;for(let f=2;document.getElementById(c);f+=1)c=`${s}-${f}`;return e.id=c,c},qn=e=>e.getAttribute("aria-label")?.trim()||e.getAttribute("aria-labelledby")?.trim()||e.textContent?.trim()||e.getAttribute("title")?.trim()?!0:Array.from(e.querySelectorAll("img")).some(t=>t.getAttribute("alt")?.trim()),Pn=e=>`<${e.tagName.toLowerCase()}${e.className?` class="${e.className}"`:""}>`,Bn={tablist:"Slides",tab:e=>`Slide ${e}`,slide:(e,t)=>`${e} of ${t}`,play:"Start automatic slide show",pause:"Stop automatic slide show"},He=(e,t)=>e.length===t.length&&e.every((n,s)=>n===t[s]),Un=(e={})=>{const{root:t=document,observe:n=!0,hideOffscreenSlides:s=!0,rotationControl:c=!0,preventFocusScroll:f=!0}=e,g={...Bn,...e.labels}
91,w=[...Tn,...e.engines??[]],y=new Map,E=new WeakSet,A=new WeakSet,S=new Set,R=r=>{S.has(r)||(S.add(r),console.warn(`[patrol-carousel]: ${r}`))},x=r=>{const{root:l}=r;D(l,"aria-roledescription","carousel");let d=!!(l.getAttribute("aria-label")?.trim()||l.getAttribute("aria-labelledby")?.trim());if(!d){const v=l.getAttribute(lt)?.trim(),k=l.previousElementSibling?.matches(Dn)?l.previousElementSibling:null;v?(D(l,"aria-label",v),d=!0):k&&(D(l,"aria-labelledby",Ue(k,$n,y.size)),d=!0)}d&&l.tagName!=="SECTION"&&D(l,"role","region"),!d&&(D(l,"role","group"),R(`carousel has no accessible name - add aria-label or ${lt} to ${Pn(l)}`))},q=r=>{r.model.managesLiveRegion||D(r.model.track,"aria-live",r.model.rotation?.isRotating()?"off":"polite")},U=r=>{if(r.model.managesHidden)return r.model.slides.filter(v=>v.getAttribute("aria-hidden")!=="true");const l=r.model.frame.getBoundingClientRect();if(l.width>0&&l.height>0){const v=r.model.slides.filter(k=>{const C=k.getBoundingClientRect();if(C.width<=0||C.height<=0)return!1;const o=Math.min(C.right,l.right)-Math.max(C.left,l.left),i=Math.min(C.bottom,l.bottom)-Math.max(C.top,l.top);return o>C.width/2&&i>C.height/2});if(v.length)return v}const d=r.model.current();return r.model.slides.filter((v,k)=>r.model.positions[k]===d)},re=(r,l)=>{if(!l||Ee(r)){A.has(r)&&(r.removeAttribute("tabindex"),A.delete(r));return}r.hasAttribute("tabindex")&&!A.has(r)||(D(r,"tabindex","0"),A.add(r))},W=(r,l,d)=>{r.querySelectorAll(d).forEach(v=>{if(l){if(!v.hasAttribute(ve))return;const k=v.getAttribute(ve);k?D(v,"tabindex",k):v.removeAttribute("tabindex"),v.removeAttribute(ve);return}v.hasAttribute(ve)||(v.setAttribute(ve,v.getAttribute("tabindex")??""),D(v,"tabindex","-1"))})},X=r=>{const{model:l}=r,d=s&&(!l.managesHidden||!!l.parkSelector),v=d?U(r):[];l.slides.forEach((k,C)=>{const o=l.positions[C]+1;if(Ue(k,Rn,o),D(k,"role","tabpanel"),l.managesSlideLabels||(D(k,"aria-roledescription","slide"),D(k,"aria-label",g.slide(o,l.total))),!d)return;const i=v.includes(k);l.managesHidden||(i?ct(k,"aria-hidden"):D(k,"aria-hidden","true")),l.parkSelector&&W(k,i,l.parkSelector),re(k,i)})},oe=r=>{const l=r.querySelectorAll(ye);return l.length===1?l[0]:r},Q=(r,l)=>{for(let d=r.parentElement;d&&d!==l;d=d.parentElement)d.hasAttribute("role")||D(d,"role","presentation")},se=r=>{const{tablist:l}=r.model;l&&(D(l,"role","tablist"),l.classList.add(In),!l.getAttribute("aria-label")?.trim()&&!l.getAttribute("aria-labelledby")?.trim()&&D(l,"aria-label",g.tablist),r.model.vertical?D(l,"aria-orientation","vertical"):ct(l,"aria-orientation"),r.tabs.forEach((d,v)=>{Ue(d,On,v+1),D(d,"role","tab");const k=r.panels[v]??[];k.length&&D(d,"aria-controls",k.map(C=>C.id).join(" ")),qn(d)||D(d,"aria-label",g.tab(v+1,r.model.total)),d.tagName==="BUTTON"?d.hasAttribute("type")||D(d,"type","button"):d.tagName==="A"&&d.removeAttribute("href"),Q(d,l)}))},H=(r,l)=>{const d=r.selected;r.selected=l,r.tabs.forEach((v,k)=>{const C=k===l;D(v,"aria-selected",String(C)),v.tabIndex=C?0:-1,E.add(v)}),!(d===l||d===-1)&&r.root.dispatchEvent(new CustomEvent(kn,{bubbles:!0,detail:{index:l,previous:d,total:r.model.total,tab:r.tabs[l]??null,slide:r.panels[l]?.[0]??null,slides:r.panels[l]??[]}}))},P=(r,l,d)=>{const v=r.tabs[l];if(!v)return;d&&v.focus({preventScroll:!0});const k=r.model.current();v.click(),r.model.current()===k&&r.model.goTo(l),H(r,l)},b=r=>l=>{const d=l.target?.closest('[role="tab"]'),v=d?r.tabs.indexOf(d):-1;v!==-1&&(l.preventDefault(),H(r,v))},_=(r,l)=>{r.tabs.length&&P(r,(l+r.tabs.length)%r.tabs.length,!0)},L=r=>l=>{const d=l.target?.closest('[role="tab"]'),v=d?r.tabs.indexOf(d):-1;if(v===-1)return;const k=r.model.vertical?"ArrowDown":r.rtl?"ArrowLeft":"ArrowRight",C=r.model.vertical?"ArrowUp":r.rtl?"ArrowRight":"ArrowLeft";let o=!0;switch(l.key){case k:_(r,v+1);break;case C:_(r,v-1);break;case"Home":_(r,0);break;case"End":_(r,r.tabs.length-1);break;case"Enter":case" ":r.tabs[v].tagName==="BUTTON"?o=!1:P(r,v,!0);break;default:o=!1}o&&(l.preventDefault(),l.stopPropagation())},N=r=>{const l=r.target;l.scrollLeft&&(l.scrollLeft=0),l.scrollTop&&(l.scrollTop=0)},F=r=>r.model.rotation?.labelled===!0,Z=r=>{q(r);const{rotation:l}=r;!l||F(r)||(D(l,"aria-label",r.rotate?g.pause:g.play),D(l,"data-patrol-rotation-state",r.rotate?"playing":"paused"))},Ae=r=>{const l=r.model.rotation?.control??null;if(l){r.rotationInjected&&r.rotation?.isConnected&&r.rotation.remove(),r.rotation=l,r.rotationInjected=!1;return}if(!r.model.rotation){r.rotationInjected&&r.rotation?.isConnected&&r.rotation.remove(),r.rotation=null,r.rotationInjected=!1;return}if(r.rotation?.isConnected)return;const d=r.root.querySelector(`[${Be}]`);
91if(d){r.rotation=d,r.rotationInjected=!1;return}if(!c){R(`carousel rotates by itself and has no rotation control - add ${Be} to one`);return}Ze(_n,zt);const{position:v}=window.getComputedStyle(r.root);(!v||v==="static")&&r.root.classList.add(Nn);const k=document.createElement("button");k.type="button",k.className=xn,k.setAttribute(Be,""),k.innerHTML='<span class="patrol-carousel__rotation-icon" aria-hidden="true"></span>',r.root.insertBefore(k,r.root.firstChild),r.rotation=k,r.rotationInjected=!0},pe=r=>r.rotate&&(r.model.rotation?.managesSuspension||!r.pointerInside&&!r.focusInside),ce=r=>{const{rotation:l}=r.model;l&&!F(r)&&(r.rotate?pe(r)?l.start():l.suspend():l.stop()),Z(r)},G=r=>{r.model.rotation&&(r.rotate=!r.rotate,ce(r),r.root.dispatchEvent(new CustomEvent(Ln,{bubbles:!0,detail:{rotating:r.rotate}})))},j=(r,l,d,v)=>{l.addEventListener(d,v),r.teardown.push(()=>l.removeEventListener(d,v))},ee=r=>{r.teardown.push(r.model.watch($,()=>K(r.root))),r.model.tablist&&(j(r,r.model.tablist,"keydown",L(r)),j(r,r.model.tablist,"click",b(r))),f&&r.model.guardFocusScroll&&r.model.frames.forEach(o=>j(r,o,"scroll",N));const{rotation:l}=r.model;if(!l||F(r)||(r.rotation&&j(r,r.rotation,"click",()=>G(r)),l.managesSuspension))return;const d=o=>()=>{r[o]=!0,ce(r)},v=o=>()=>{r[o]=!1,ce(r)},{thumbsRoot:k}=r.model,C=k&&!r.root.contains(k)?[r.root,k]:[r.root];C.forEach(o=>{j(r,o,"mouseenter",d("pointerInside")),j(r,o,"mouseleave",v("pointerInside")),j(r,o,"focusin",d("focusInside")),j(r,o,"focusout",i=>{const u=i.relatedTarget;u&&C.some(T=>T.contains(u))||v("focusInside")()})})},K=r=>{const l=y.get(r);l&&(l.teardown.splice(0).forEach(d=>d()),l.tabs.forEach(d=>{E.has(d)&&(d.removeAttribute("aria-selected"),d.removeAttribute("tabindex"),E.delete(d))}),l.rotationInjected&&l.rotation?.remove(),y.delete(r))},ae=r=>{const{model:l}=r,d=[l.current(),l.total,l.slides.length,r.tabs.length,l.vertical?1:0,l.rotation?.isRotating()?1:0,r.rotate?1:0,r.rtl?1:0];for(const v of r.tabs)d.push(v.getAttribute("aria-selected")??"-",v.tabIndex);if(l.managesHidden)for(const v of l.slides)d.push(v.getAttribute("aria-hidden")??"-");return d.join("|")},a=r=>[r.model.instance,r.model.tablist,r.model.thumbsRoot,r.model.track,r.rotation,r.model.rotation?.managesSuspension??null,...r.model.frames],h=(r,l,d,v)=>{const k=y.get(r);k&&(k.engine!==l||k.model.instance!==d.instance)&&K(r);const C=y.get(r)??{root:r,engine:l,model:d,tabs:[],panels:[],rtl:window.getComputedStyle(r).direction==="rtl"||!!r.closest('[dir="rtl"]'),rotation:null,rotationInjected:!1,rotate:!1,pointerInside:!1,focusInside:!1,selected:-1,bindKey:[],fingerprint:"",slides:[],teardown:[]},o=!y.has(r);y.set(r,C),C.model=d,C.tabs=d.thumbs.map(oe),v&&(C.rtl=window.getComputedStyle(r).direction==="rtl"||!!r.closest('[dir="rtl"]')),(o||d.rotation?.labelled)&&(C.rotate=!!d.rotation?.isRotating());const i=ae(C);if(!v&&!o&&i===C.fingerprint&&He(d.slides,C.slides)){const M=a(C);if(He(C.bindKey,M))return}const u=[];d.slides.forEach((M,V)=>{const B=d.positions[V];u[B]=(u[B]??[]).concat(M)}),C.panels=u,d.releaseA11y(),x(C),X(C),se(C),Ae(C);const T=a(C);He(C.bindKey,T)||(C.teardown.splice(0).forEach(M=>M()),ee(C),C.bindKey=T),H(C,Math.min(Math.max(d.current(),0),Math.max(C.tabs.length-1,0))),Z(C),C.slides=d.slides,C.fingerprint=ae(C)},m=(r=!1)=>{const l=new Set;t.querySelectorAll(Cn).forEach(d=>{n&&I.observe(d,{attributes:!0,attributeFilter:Fn});const v=d.getAttribute(ge)?.trim().toLowerCase()??"",k=v?w.filter(o=>o.name===v):w;if(!k.length){R(`${ge}="${v}" is not a carousel engine this knows - only ${w.map(o=>`"${o.name}"`).join(" and ")}`);return}const C={warn:R,thumbsSelector:d.getAttribute(Pe)?.trim()||null};for(const o of k){const i=o.read(d,C);if(i){l.add(d),h(d,o,i,r);return}}}),Array.from(y.keys()).forEach(d=>{l.has(d)||K(d)}),O.takeRecords(),I.takeRecords()};let p=0;const $=()=>{p||(p=requestAnimationFrame(()=>{p=0,m()}))},O=new MutationObserver($),I=new MutationObserver($);let z=0;const te=()=>{z||(z=requestAnimationFrame(()=>{z=0,m(!0)}))},he=()=>{if(m(),!n)return;window.addEventListener("resize",te);const r=t instanceof Document?t.documentElement:t;r&&O.observe(r,{childList:!0,subtree:!0,attributes:!0,attributeFilter:Mn})};return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",he,{once:!0}):he(),{sync:()=>m(!0),select:(r,l=!1)=>{for(const d of y.values())if(!(r<0||r>=d.tabs.length))return P(d,r,l),!0;return!1},destroy:()=>{document.removeEventListener("DOMContentLoaded",he),window.removeEventListener("resize",te),O.disconnect(),I.disconnect(),p&&cancelAnimationFrame(p),z&&cancelAnimationFrame(z),Array.from(y.keys()).forEac
91h(K)}}};(e=>{try{const t=Un(e);return console.log("[patrol-carousel]: Carousels and thumbnails were wired."),t}catch(t){return console.warn("[patrol-carousel]: Unable to wire carousels and thumbnails",t),null}})();const Hn=(e,t)=>{if(!e)return null;const n={preventScroll:t?.preventScroll??!1},s=Ee(e);return s?(s.focus(n),document.activeElement===s?s:null):e instanceof HTMLElement&&tt(e)?(e.focus(n),document.activeElement===e?e:null):null},ke="data-patrol-control-trigger",Ge="data-patrol-control-target",Gn=`[${ke}]`,jn=`[${Ge}]`,Kn="patrol-control-",zn=["dialog","menu","listbox","tree","grid"],Vn=["class","style","hidden","open","inert","aria-hidden",ke,Ge],de=(e,t,n)=>{e.getAttribute(t)!==n&&e.setAttribute(t,n)},je=(e,t)=>e.getAttribute(t)?.trim()??"",Wn=(e,t)=>{if(e.id)return e.id;const n=`${Kn}${t.replace(/\s+/g,"-")}`;let s=n;for(let c=2;document.getElementById(s);c+=1)s=`${n}-${c}`;return e.id=s,s},ut=e=>{if(e.hidden||e.hasAttribute("inert")||e.getAttribute("aria-hidden")==="true")return!1;if(e.tagName==="DIALOG"||e.tagName==="DETAILS")return e.hasAttribute("open");const{display:t,visibility:n}=window.getComputedStyle(e);return t!=="none"&&n!=="hidden"},Xn=(e={})=>{const{root:t=document,observe:n=!0,haspopup:s=!0,manageFocus:c=!0}=e,f=new Map,g=new Map,w=new Map,y=new Map,E=new Set,A=b=>{E.has(b)||(E.add(b),console.warn(`[patrol-controls]: ${b}`))},S=b=>
91b.opener??b.triggers[0]??null,R=b=>{b.contains(document.activeElement)||(!Ee(b)&&!b.hasAttribute("tabindex")&&de(b,"tabindex","-1"),Hn(b,{}))},x=(b,_)=>{const L=document.activeElement;if(!(!L||L===document.body||b.contains(L)))return;const F=S(_);F?.isConnected&&F.focus()},q=b=>{if(b.tagName==="BUTTON"||(A(`trigger "${je(b,ke)}" is a <${b.tagName.toLowerCase()}>, not a <button>`),b.hasAttribute("role")||de(b,"role","button"),!b.hasAttribute("tabindex")&&!b.matches(ye)&&de(b,"tabindex","0"),y.has(b)))return;const _=L=>{(L.key===" "||L.key==="Enter"&&!b.matches("a[href]"))&&(L.preventDefault(),b.click())};b.addEventListener("keydown",_),y.set(b,_)},U=(b,_)=>{if(b.hasAttribute("aria-haspopup"))return;const L=_.getAttribute("role");L&&zn.includes(L)&&de(b,"aria-haspopup",L)},re=b=>{if(w.has(b))return;const _=()=>{const L=g.get(b);if(!L)return;const N=f.get(L);N&&(N.pending=b),requestAnimationFrame(()=>X(L))};b.addEventListener("click",_),w.set(b,_)},W=(b,_,L)=>{de(b,"aria-controls",Wn(_,L)),q(b),s&&U(b,_),c&&re(b),g.set(b,_)},X=b=>{const _=f.get(b);if(!_)return;const L=ut(b);_.triggers.forEach(N=>de(N,"aria-expanded",String(L))),L!==_.open&&(_.open=L,c&&(L?(_.opener=_.pending??_.triggers[0]??null,R(b)):x(b,_),_.pending=null))},oe=()=>{const b=new Map;return t.querySelectorAll(jn).forEach(_=>{const L=je(_,Ge);if(L){if(b.has(L)){A(`more than one target for "${L}" - wiring the first one`);return}b.set(L,_)}}),b},Q=()=>{const b=oe(),_=new Map;t.querySelectorAll(Gn).forEach(L=>{const N=je(L,ke);if(!N)return;const F=b.get(N);if(!F){A(`no target found for trigger "${N}"`);return}W(L,F,N);const Z=_.get(F);Z?Z.push(L):_.set(F,[L])}),_.forEach((L,N)=>{const F=f.get(N);F?F.triggers=L:f.set(N,{open:ut(N),opener:null,pending:null,triggers:L}),X(N)}),f.forEach((L,N)=>{_.has(N)||f.delete(N)})},se=b=>{b.key==="Escape"&&f.forEach((_,L)=>{!_.open||!L.contains(b.target)||S(_)?.focus()})},H=new MutationObserver(Q),P=()=>{if(Q(),c&&document.addEventListener("keydown",se),!n)return;const b=t instanceof Document?t.documentElement:t;b&&H.observe(b,{childList:!0,subtree:!0,attributes:!0,attributeFilter:Vn})};return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",P,{once:!0}):P(),{sync:Q,destroy:()=>{document.removeEventListener("DOMContentLoaded",P),document.removeEventListener("keydown",se),H.disconnect(),w.forEach((b,_)=>_.removeEventListener("click",b)),y.forEach((b,_)=>_.removeEventListener("keydown",b)),w.clear(),y.clear(),g.clear(),f.clear()}}};(e=>{try{const t=Xn(e);return console.log("[patrol-controls]: Triggers and targets were wired."),t}catch(t){return console.warn("[patrol-controls]: Unable to wire triggers and targets",t),null}})();const dt=2,Qn=e=>{const t=e.width>=dt,n=e.height>=dt;return t&&!n||n&&!t},Yn=e=>(e.tagName==="DIALOG"||e.tagName==="DETAILS")&&!e.hasAttribute("open"),Jn=(e,t)=>e.tagName==="DETAILS"&&Array.from(e.children).some(n=>n.tagName==="SUMMARY"&&n.contains(t)),ne=e=>{if(window.getComputedStyle(e).visibility==="hidden"||Qn(e.getBoundingClientRect()))return!1;for(let t=e;t;t=t.parentElement)if(t.hidden||t.hasAttribute("inert")||t.getAttribute("aria-hidden")==="true"||window.getComputedStyle(t).display==="none"||Yn(t)&&!Jn(t,e))return!1;return!0},Le="data-patrol-nav-trigger",Re="data-patrol-nav-target",Oe=`[${Le}]`,ft=`[${Re}]`,pt=`${Oe}, a[href]`,Zn="patrol-nav-",ht='nav, [role="navigation"]',mt=["pointerover","pointerout","focusin","focusout","transitionend","animationend"],er=["class","style","hidden","open","inert","aria-hidden",Le,Re],fe=(e,t,n)=>{e.getAttribute(t)!==n&&e.setAttribute(t,n)},$e=(e,t)=>e.getAttribute(t)?.trim()??"",tr=(e,t)=>{if(e.id)return e.id;const n=`${Zn}${t.replace(/\s+/g,"-")}`;let s=n;for(let c=2;document.getElementById(s);c+=1)s=`${n}-${c}`;return e.id=s,s},bt=e=>ne(e),nr=(e={})=>{const{root:t=document,observe:n=!0,arrowKeys:s=!0,single:c=!0,closeOnFocusOut:f=!0,closeOnOutsideClick:g=!0,currentPage:w=!0,toggle:y="auto"}=e,E=new Map,A=new Map,S=new Set,R=new Map,x=new Map,q=new Map,U=new Map,re=new Set;let W=0;const X=o=>{re.has(o)||(re.add(o),console.warn(`[patrol-nav]: ${o}`))},oe=o=>{const i=t instanceof Document?t.body:t.parentElement,u=o.closest(ht);if(u)return u;for(let T=o.parentElement;T&&T!==i;T=T.parentElement)if(T.querySelectorAll(Oe).length>1)return T;return o.parentElement??document.body},Q=o=>{for(const i of S)if(i.contains(o))return i;for(const i of E.values())if(i.target.contains(o))return i.nav;return null},se=(o,i)=>{if(i.length===1)return i[0];for(let u=o.parentElement;u;u=u.parentElement){const T=i.find(M=>
91u.contains(M));if(T)return T}return i[0]},H=(o,i)=>{const u=o.parentElement?.closest(ft);return u&&i.contains(u)?u:i},P=(o,i)=>Array.from(o.querySelectorAll(pt)).filter(u=>H(u,i)===o&&bt(u)),b=o=>o.opener??o.triggers.find(bt)??o.triggers[0]??null,_=o=>{let i=null;return E.forEach(u=>{!u.open||!u.target.contains(o)||(!i||i.target.contains(u.target))&&(i=u)}),i},L=o=>{if(o.tagName==="BUTTON"){o.hasAttribute("type")||fe(o,"type","button");return}if(o.tagName==="SUMMARY"||(X(`trigger "${$e(o,Le)}" is a <${o.tagName.toLowerCase()}>, not a <button>`),!o.hasAttribute("role")&&!o.matches("a[href]")&&fe(o,"role","button"),!o.hasAttribute("tabindex")&&!o.matches(ye)&&fe(o,"tabindex","0"),x.has(o)))return;const i=u=>{(u.key===" "||u.key==="Enter"&&!o.matches("a[href]"))&&(u.preventDefault(),o.click())};o.addEventListener("keydown",i),x.set(o,i)},N=o=>{if(R.has(o))return;const i=()=>{const u=A.get(o),T=u?E.get(u):null;if(!T)return;T.pending=o;const M=T.open;requestAnimationFrame(()=>{K(T),!(T.open!==M||y==="theme")&&(pe(T,!M),K(T))})};o.addEventListener("click",i),R.set(o,i)},F=(o,i,u)=>{fe(o,"aria-controls",tr(i,u)),L(o),N(o),A.set(o,i)},Z=o=>{o.matches(ht)&&(o.hasAttribute("aria-label")||o.hasAttribute("aria-labelledby")||X("a <nav> holding a disclosure menu has no accessible name - add aria-label to it"))},Ae=o=>{if(o.querySelector("[aria-current]"))return;const i=`${window.location.pathname}${window.location.search}`;o.querySelectorAll("a[href]").forEach(u=>{const T=new URL(u.href,window.location.href);T.origin===window.location.origin&&`${T.pathname}${T.search}`===i&&fe(u,"aria-current","page")})},pe=(o,i)=>{i?o.target.removeAttribute("hidden"):o.target.hidden=!0},ce=o=>{if(!o.matches("a[href]")){o.click();return}const i=u=>u.preventDefault();o.addEventListener("click",i,{capture:!0}),o.click(),o.removeEventListener("click",i,{capture:!0})},G=(o,i)=>{if(ne(o.target)===i)return;const u=y==="self"?null:b(o);if(!u){if(y==="theme")return;pe(o,i),K(o);return}ce(u)},j=(o,i)=>o.target.contains(i.target)||i.target.contains(o.target)||o.triggers.some(u=>i.target.contains(u))||i.triggers.some(u=>o.target.contains(u)),ee=o=>{Array.from(E.values()).filter(i=>i!==o&&i.open&&i.nav===o.nav&&!j(i,o)).forEach(i=>G(i,!1))},K=o=>{const i=ne(o.target);o.triggers.forEach(u=>fe(u,"aria-expanded",String(i))),i!==o.open&&(o.open=i,i&&(o.opener=o.pending??b(o),c&&ee(o)),o.pending=null)},ae=o=>requestAnimationFrame(()=>{ne(o.target)&&G(o,!1)}),a=o=>E.forEach(i=>{i.nav===o&&i.open&&ae(i)}),h=(o,i,u)=>{const T=P(H(o,i),i),M=T.indexOf(o);M!==-1&&T[Math.min(T.length-1,Math.max(0,M+u))]?.focus()},m=(o,i,u)=>{P(H(o,i),i).at(u)?.focus()},p=o=>{const i=o.target;if(!i)return;const u=i.closest(pt);if(!u)return;const T=Q(u);if(!T)return;const V=u.matches(Oe)?E.get(A.get(u)):void 0;let B=!0;switch(o.key){case"Escape":{const we=_(u)??(V?.open?V:null);if(!we){B=!1;break}b(we)?.focus(),G(we,!1);break}case"ArrowDown":case"ArrowRight":if(!s){B=!1;break}if(V?.open){const[we]=P(V.target,T);
91(we??Ee(V.target))?.focus();break}h(u,T,1);break;case"ArrowUp":case"ArrowLeft":s?h(u,T,-1):B=!1;break;case"Home":s?m(u,T,0):B=!1;break;case"End":s?m(u,T,-1):B=!1;break;default:B=!1}B&&(o.preventDefault(),o.stopPropagation())},$=o=>{if(q.has(o))return;const i=()=>setTimeout(()=>{const u=document.activeElement;!u||u===document.body||o.contains(u)||Q(u)===o||a(o)},0);o.addEventListener("focusout",i),q.set(o,i)},O=o=>{if(U.has(o))return;const i=()=>I();mt.forEach(u=>o.addEventListener(u,i)),U.set(o,i)},I=()=>{W||(W=requestAnimationFrame(()=>{W=0,E.forEach(K)}))},z=()=>{const o=new Map;return t.querySelectorAll(ft).forEach(i=>{const u=$e(i,Re);if(!u)return;const T=o.get(u)??[];T.push(i),o.set(u,T)}),o},te=()=>{const o=z(),i=new Map;S.clear(),t.querySelectorAll(Oe).forEach(u=>{const T=$e(u,Le);if(!T)return;const M=o.get(T);if(!M?.length){X(`no dropdown found for trigger "${T}"`);return}const V=se(u,M);F(u,V,T);const B=i.get(V);B?B.push(u):i.set(V,[u])}),i.forEach((u,T)=>{const M=oe(u[0]),B=E.get(T)??{key:$e(T,Re),target:T,nav:M,open:ne(T),opener:null,pending:null,triggers:u};B.nav=M,B.triggers=u,E.set(T,B),S.add(M)}),S.forEach(u=>{Z(u),w&&Ae(u),f&&$(u),O(u)}
91),E.forEach((u,T)=>{i.has(T)?K(u):E.delete(T)}),v(),r.takeRecords()},he=o=>{const i=o.target;i&&S.forEach(u=>{u.contains(i)||Array.from(E.values()).some(M=>M.nav===u&&M.target.contains(i))||a(u)})},r=new MutationObserver(te),l=typeof IntersectionObserver>"u"?null:new IntersectionObserver(()=>I(),{threshold:[0,.01]}),d=new Set,v=()=>{l&&(E.forEach((o,i)=>{d.has(i)||(l.observe(i),d.add(i))}),d.forEach(o=>{E.has(o)||(l.unobserve(o),d.delete(o))}))},k=()=>{if(te(),document.addEventListener("keydown",p),g&&document.addEventListener("click",he),!n)return;const o=t instanceof Document?t.documentElement:t;o&&r.observe(o,{childList:!0,subtree:!0,attributes:!0,attributeFilter:er})};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",k,{once:!0}):k();const C=o=>Array.from(E.values()).find(i=>i.key===o)??null;return{sync:te,open:o=>{const i=C(o);return i?(G(i,!0),!0):!1},close:o=>{if(o===void 0){E.forEach(u=>G(u,!1));return}const i=C(o);i&&G(i,!1)},destroy:()=>{document.removeEventListener("DOMContentLoaded",k),document.removeEventListener("keydown",p),document.removeEventListener("click",he),r.disconnect(),l?.disconnect(),d.clear(),R.forEach((o,i)=>i.removeEventListener("click",o)),x.forEach((o,i)=>i.removeEventListener("keydown",o)),q.forEach((o,i)=>i.removeEventListener("focusout",o)),U.forEach((o,i)=>mt.forEach(u=>i.removeEventListener(u,o))),W&&cancelAnimationFrame(W),R.clear(),x.clear(),q.clear(),U.clear(),A.clear(),E.clear(),S.clear()}}};(e=>{try{const t=nr(e);return console.log("[patrol-nav]: Navigation triggers and dropdowns were wired."),t}catch(t){return console.warn("[patrol-nav]: Unable to wire navigation triggers and dropdowns",t),null}})();const Ke="data-patrol-escape-close",rr=`[${Ke}]`,or=e=>e.getAttribute(Ke)?.trim().replace(/^#/,"")??"",yt=e=>{let t=0;for(let n=e.parentElement;n;n=n.parentElement)t+=1;return t},sr=(e={})=>{const{root:t=document,manageFocus:n=!0}=e,s=new Set,c=E=>{s.has(E)||(s.add(E),console.warn(`[patrol-escape]: ${E}`))},f=E=>{const A=or(E);return A?document.getElementById(A)||(c(`no element with id "${A}" to close the panel that names it`),null):(c(`a panel carries ${Ke} with no id in it`),null)},g=()=>Array.from(t.querySelectorAll(rr)).filter(ne).map(E=>({panel:E,trigger:f(E)})).filter(E=>E.trigger!==null),w=({panel:E,trigger:A})=>{n&&E.contains(document.activeElement)&&A.focus(),requestAnimationFrame(()=>{ne(E)&&A.click()})},y=E=>{if(E.key!=="Escape")return;const A=E.target,S=!A||A===document.body||A===document.documentElement,R=g().filter(({panel:q,trigger:U})=>S||q.contains(A)||U.contains(A));if(!R.length)return;const[x]=R.sort((q,U)=>yt(U.panel)-yt(q.panel));w(x)};return document.addEventListener("keydown",y,!0),{close:E=>{const A=f(E);return!A||!ne(E)?!1:(w({panel:E,trigger:A}),!0)},destroy:()=>{document.removeEventListener("keydown",y,!0),s.clear()}}};(e=>{try{const t=sr(e);return console.log("[patrol-escape]: Escape is wired to close the panels that ask for it."),t}catch(t){return console.warn("[patrol-escape]: Unable to wire Escape",t),null}})();const ze="data-patrol-tab-trigger",Ve="data-patrol-tab-panel",Ie=`[${ze}]`,Et=`[${Ve}]`,ar="patrol:tab-change",ir="patrol:tab-delete",lr="patrol:tab-menu",cr="patrol-tab-",ur="patrol-tabpanel-",dr="patrol-tablist-label-",fr=["class","style","hidden","inert","aria-hidden","open","aria-orientation",ze,Ve],pr='h1, h2, h3, h4, h5, h6, [role="heading"]',J=(e,t,n)=>{e.getAttribute(t)!==n&&e.setAttribute(t,n)},gt=(e,t)=>
91e.getAttribute(t)?.trim()??"",We=(e,t,n)=>{if(e.id)return e.id;const s=`${t}${n.replace(/\s+/g,"-")}`;let c=s;for(let f=2;document.getElementById(c);f+=1)c=`${s}-${f}`;return e.id=c,c},vt=e=>{if(window.getComputedStyle(e).visibility==="hidden")return!1;for(let t=e;t;t=t.parentElement)if(t.hidden||t.hasAttribute("inert")||t.getAttribute("aria-hidden")==="true"||window.getComputedStyle(t).display==="none")return!1;return!0},hr=(e,t)=>{const n=t instanceof Document?t.body:t.parentElement;for(let s=e.parentElement;s&&s!==n;s=s.parentElement)if(s.querySelectorAll(Ie).length>1)return s;return e.parentElement},mr=(e,t)=>{for(let n=e.parentElement;n&&n!==t;n=n.parentElement)n.hasAttribute("role")||J(n,"role","presentation")},br=(e={})=>{const{root:t=document,observe:n=!0,activation:s="automatic",panelShortcuts:c=!0,deletable:f=!1}=e,g=new Map,w=new Map,y=new Map,E=new WeakSet,A=new WeakSet,S=new WeakSet,R=new Set,x=a=>{R.has(a)||(R.add(a),console.warn(`[patrol-tabs]: ${a}`))},q=(a,h,m)=>{We(a,cr,m),J(a,"role","tab"),J(a,"aria-controls",h.map(p=>We(p,ur,m)).join(" ")),h.forEach(p=>J(p,"role","tabpanel")),a.tagName!=="BUTTON"?a.tagName==="A"&&a.removeAttribute("href"):a.hasAttribute("type")||J(a,"type","button")},U=(a,h)=>{if(a.hasAttribute("aria-label")||a.hasAttribute("aria-labelledby"))return;const m=a.previousElementSibling?.matches(pr)?a.previousElementSibling:null;if(!m){x(`tablist for "${h}" has no accessible name - add aria-label to its container`);return}J(a,"aria-labelledby",We(m,dr,h))},re=(a,h)=>{const m=a.panels[h]??[];X(a).forEach(p=>{if(!m.includes(p)||Ee(p)){E.has(p)&&p.removeAttribute("tabindex");return}p.hasAttribute("tabindex")&&!E.has(p)||(J(p,"tabindex","0"),E.add(p))})},W=(a,h)=>{const m=a.panels[h]??[];X(a).forEach(p=>{if(p.hasAttribute("aria-label")||p.hasAttribute("aria-labelledby")&&!A.has(p))return;const $=m.includes(p)?a.tabs[h]:a.tabs.find((O,I)=>a.panels[I].includes(p));$&&(J(p,"aria-labelledby",$.id),A.add(p))})},X=a=>Array.from(new Set(a.panels.flat())),oe=a=>{let h=-1;for(let m=0;m<a.tabs.length;m+=1)if(a.panels[m].some(vt)){if(h!==-1&&a.keys[h]!==a.keys[m])return-1;h===-1&&(h=m)}return h},Q=a=>{const h=a.selectedTab?a.tabs.indexOf(a.selectedTab):-1;return h!==-1?h:a.selectedKey===null?-1:a.keys.indexOf(a.selectedKey)},se=a=>{const h=a.tabs.findIndex(p=>p.getAttribute("aria-selected")==="true");if(h!==-1)return h;const m=oe(a);return m===-1?0:m},H=(a,h)=>{const m=a.selectedTab,p=a.selectedKey;a.selectedTab=a.tabs[h]??null,a.selectedKey=a.keys[h]??null,a.tabs.forEac
91h(($,O)=>{const I=O===h;J($,"aria-selected",String(I)),$.tabIndex=I?0:-1,S.add($)}),W(a,h),re(a,h),m!==a.selectedTab&&a.tablist.dispatchEvent(new CustomEvent(ar,{bubbles:!0,detail:{key:a.selectedKey,previous:p,tab:a.tabs[h],panel:a.panels[h]?.[0]??null,panels:a.panels[h]??[]}}))},P=(a,h,m)=>{const p=a.tabs[h];p&&(m&&p.focus(),p.click())},b=a=>{const h=oe(a);if(h===-1)return;const m=Q(a);m!==-1&&a.keys[m]===a.keys[h]||H(a,h)},_=(a,h)=>{const m=(h+a.tabs.length)%a.tabs.length;s==="automatic"?P(a,m,!0):a.tabs[m]?.focus()},L=(a,h)=>{const m=a.tabs[h];if(!m.dispatchEvent(new CustomEvent(ir,{bubbles:!0,cancelable:!0})))return;const p=m===a.selectedTab;a.panels[h].forEach(O=>{a.tabs.some((I,z)=>I!==m&&a.panels[z].includes(O))||O.remove()}),m.remove(),G();const $=g.get(a.tablist);!$||!$.tabs.length||!p||P($,Math.min(h,$.tabs.length-1),!0)},N=a=>h=>{const m=h.target?.closest(Ie),p=m?a.tabs.indexOf(m):-1;if(p===-1)return;const $=a.vertical?"ArrowDown":a.rtl?"ArrowLeft":"ArrowRight",O=a.vertical?"ArrowUp":a.rtl?"ArrowRight":"ArrowLeft";let I=!0;switch(h.key){case $:_(a,p+1);break;case O:_(a,p-1);break;case"Home":_(a,0);break;case"End":_(a,a.tabs.length-1);break;
91case"Enter":case" ":a.tabs[p].tagName==="BUTTON"?I=!1:P(a,p,!0);break;case"Delete":f?L(a,p):I=!1;break;case"F10":h.shiftKey&&a.tabs[p].hasAttribute("aria-haspopup")?a.tabs[p].dispatchEvent(new CustomEvent(lr,{bubbles:!0,cancelable:!0})):I=!1;break;default:I=!1}I&&(h.preventDefault(),h.stopPropagation())},F=a=>h=>{const m=h.target.closest(Ie),p=m?a.tabs.indexOf(m):-1;p!==-1&&(h.preventDefault(),H(a,p))},Z=a=>{if(!a.ctrlKey||a.key!=="PageUp"&&a.key!=="PageDown")return;const h=a.target?.closest(Et);if(h)for(const m of g.values()){const p=m.panels.findIndex($=>$.includes(h));if(p!==-1){a.preventDefault(),P(m,(p+(a.key==="PageDown"?1:-1)+m.tabs.length)%m.tabs.length,!0);return}}},Ae=a=>{const{tablist:h}=a;if(!w.has(h)){const m=N(a);h.addEventListener("keydown",m),w.set(h,m)}if(!y.has(h)){const m=F(a);h.addEventListener("click",m),y.set(h,m)}},pe=()=>{const a=new Map;return t.querySelectorAll(Et).forEach(h=>{const m=gt(h,Ve);if(!m)return;const p=a.get(m)??[];p.push(h),a.set(m,p)}),a},ce=a=>{S.has(a)&&(a.removeAttribute("aria-selected"),a.removeAttribute("tabindex"),S.delete(a))},G=()=>{const a=pe(),h=new Map;t.querySelectorAll(Ie).forEach(m=>{const p=gt(m,ze);if(!p)return;if(!vt(m)){ce(m);return}const $=a.get(p);if(!$){x(`no panel found for tab "${p}"`);return}const O=hr(m,t);if(!O)return;const I=h.get(O)??{tabs:[],panels:[],keys:[]};I.tabs.push(m),I.panels.push($),I.keys.push(p),h.set(O,I)}),h.forEach((m,p)=>{const $=g.get(p),O=$??{tablist:p,tabs:[],panels:[],keys:[],selectedTab:null,selectedKey:null,vertical:!1,rtl:!1};
91O.tabs=m.tabs,O.panels=m.panels,O.keys=m.keys,J(p,"role","tablist"),m.tabs.forEach((z,te)=>{q(z,m.panels[te],m.keys[te]),mr(z,p)}),U(p,m.keys[0]),O.rtl=window.getComputedStyle(p).direction==="rtl"||!!p.closest('[dir="rtl"]'),O.vertical=p.getAttribute("aria-orientation")==="vertical",g.set(p,O),Ae(O);const I=$?Q(O):-1;H(O,I===-1?se(O):I),b(O)}),g.forEach((m,p)=>{if(h.has(p))return;const $=w.get(p),O=y.get(p);$&&p.removeEventListener("keydown",$),O&&p.removeEventListener("click",O),w.delete(p),y.delete(p),g.delete(p)}),j.takeRecords()},j=new MutationObserver(G);let ee=0;const K=()=>{ee||(ee=requestAnimationFrame(()=>{ee=0,G()}))},ae=()=>{if(G(),c&&document.addEventListener("keydown",Z),!n)return;window.addEventListener("resize",K);const a=t instanceof Document?t.documentElement:t;a&&j.observe(a,{childList:!0,subtree:!0,attributes:!0,attributeFilter:fr})};return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ae,{once:!0}):ae(),{sync:G,select:(a,h=!1)=>{for(const m of g.values()){const p=m.keys.indexOf(a);if(p!==-1)return P(m,p,h),!0}return!1},destroy:()=>{document.removeEventListener("DOMContentLoaded",ae),document.removeEventListener("keydown",Z),window.removeEventListener("resize",K),j.disconnect(),ee&&cancelAnimationFrame(ee),w.forEach((a,h)=>h.removeEventListener("keydown",a)),y.forEach((a,h)=>h.removeEventListener("click",a)),w.clear(),y.clear(),g.clear()}}};(e=>{try{const t=br(e);return console.log("[patrol-tabs]: Tabs and panels were wired."),t}catch(t){return console.warn("[patrol-tabs]: Unable to wire tabs and panels",t),null}})();const yr=e=>{let t=e,n=null;for(;t&&t!==document.body;){const s=t.parentElement;if(s&&getComputedStyle(s).position!=="absolute"){n=s;break}t=s}return n},Er=`<button class="patrol-video__button" aria-pressed="true"
92    aria-label="Play video" type="button">
93    <svg class="patrol-video__icon patrol-video__icon-play" aria-hidden="false"
94        xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140 140">
95        <title>Play icon</title>
96        <path fill-rule="evenodd" clip-rule="evenodd" fill="white"
97            d="M70 140L70 140c-38.7 0-70-31.3-70-70l0 0C0 31.3 31.3 0 70 0l0 0c38.7 0 70 31.3 70 70l0 0C140 108.7 108.7 140 70 140z" />
98        <polygon fill-rule="evenodd" clip-rule="evenodd"
99            points="57 50.9 57 89.4 88.5 70.2 " />
100    </svg>
101    <svg class="patrol-video__icon patrol-video__icon-pause" aria-hidden="true"
102        xmlns="http://www.w3.org/2000/svg" viewBox="0 0 140 140">
103        <title>Pause icon</title>
104        <path fill-rule="evenodd" clip-rule="evenodd" fill="white"
105            d="M70 140L70 140c-38.7 0-70-31.3-70-70v0C0 31.3 31.3 0 70 0h0c38.7 0 70 31.3 70 70v0C140 108.7 108.7 140 70 140z" />
106        <rect fill-rule="evenodd" clip-rule="evenodd" x="56" y="50.8"
107            class="st1" width="8.8" height="38.5" />
108        <rect fill-rule="evenodd" clip-rule="evenodd" x="75.2" y="50.8"
109            class="st1" width="8.8" height="38.5" />
110    </svg>
111</button>`,gr=`/* Styles for the controls injected by video-controls.ts (markup in video-controls.html).
112   The bundle ships as a single IIFE, so this file is imported as a raw string and injected
113   at runtime instead of being emitted as a separate stylesheet the theme would have to load.
114
115   Every rule is scoped under .patrol-video so it outweighs the theme's own element/class
116   selectors (e.g. \`.product-media button\`) without resorting to !important. */
117
118/* Only applied when the container is not positioned already, so we never break a
119   sticky/fixed/relative ancestor the theme relies on. */
120.patrol-video--relative {
121  position: relative;
122}
123
124.patrol-video .patrol-video__button {
125  position: absolute;
126  right: 12px;
127  bottom: 12px;
128  z-index: 2;
129
130  display: flex;
131  align-items: center;
132  justify-content: center;
133  box-sizing: border-box;
134
135  /* 44px meets WCAG 2.5.5 Target Size (Enhanced, AAA); AA only requires 24px via
136     2.5.8 Target Size (Minimum). Worth the extra size for a touch control laid over video. */
137  width: 44px;
138  height: 44px;
139  min-width: 44px;
140  min-height: 44px;
141  padding: 0;
142  margin: 0;
143
144  appearance: none;
145  border: 0;
146  border-radius: 50%;
147  background: #fff;
148  box-shadow: 0 1px 4px rgb(0 0 0 / 35%);
149  color: #000;
150  cursor: pointer;
151
152  /* Hidden with opacity only - \`visibility\`/\`display\` would drop it from the tab order. */
153  opacity: 0;
154  transition: opacity 150ms ease-in-out;
155}
156
157/* Revealed on hover, on keyboard focus, and while the video is paused, so the control
158   is never unreachable for keyboard users nor invisible when playback needs resuming. */
159.patrol-video:hover .patrol-video__button,
160.patrol-video:focus-within .patrol-video__button,
161.patrol-video .patrol-video__button:focus-visible,
162.patrol-video[data-state='pause'] .patrol-video__button {
163  opacity: 1;
164}
165
166.patrol-video .patrol-video__button:focus-visible {
167  outline: 2px solid #000;
168  outline-offset: 2px;
169}
170
171/* Sized in px rather than % - percentages resolve against the button's content box,
172   which makes the glyph shrink as soon as the button gains padding. */
173.patrol-video .patrol-video__icon {
174  display: block;
175  width: 34px; /* ~55% of the 44px target */
176  height: 34px;
177  pointer-events: none;
178}
179
180/* The JS toggles aria-hidden on the icons - mirror that visually. */
181.patrol-video .patrol-video__icon[aria-hidden='true'] {
182  display: none;
183}
184
185/* Touch devices have no hover state, so keep the control visible. */
186@media (hover: none) {
187  .patrol-video .patrol-video__button {
188    opacity: 1;
189  }
190}
191
192@media (prefers-reduced-motion: reduce) {
193  .patrol-video .patrol-video__button {
194    transition: none;
195  }
196}
197`,vr="patrol-video-styles",Ar=e=>{try{Ze(vr,gr),wr(e).forEach(Sr),console.log("[video-controls]: Controls were attached to found videos.")}catch(t){console.warn("[video-controls]: Unable to add controls to found videos",t)}},wr=e=>Array.from(document.querySelectorAll("video:not([controls])")),Sr=e=>{const t=yr(e);t.classList.add("patrol-video");const{position:n}=window.getComputedStyle(t);(!n||n==="static")&&t.classList.add("patrol-video--relative");let s=t.querySelector(".patrol-video__button");s||(t.insertAdjacentHTML("beforeend",Er),s=t.querySelector(".patrol-video__button"));const c=t.querySelector(".patrol-video__icon-play"),f=t.querySelector(".patrol-video__icon-pause");s.addEventListener("click",function(g){g.preventDefault(),window.getComputedStyle(e).display!=="none"&&(e.paused===!0?e.play():e.pause())}),e.addEventListener("play",function(){e.setAttribute("data-state","play"),e.setAttribute("data-state-reload","false"),t.setAttribute("data-state","play"),c.setAttribute("aria-hidden","true"),f.setAttribute("aria-hidden","false"),s.setAttribute("aria-label","Pause video"),s.setAttribute("aria-pressed","fal
197se"),s.setAttribute("data-button-state","play"),s.setAttribute("data-button-state-reload","false"),document.dispatchEvent(new CustomEvent("patrol:video-play"))}),e.addEventListener("pause",function(){e.setAttribute("data-state","pause"),t.setAttribute("data-state","pause"),c.setAttribute("aria-hidden","false"),f.setAttribute("aria-hidden","true"),s.setAttribute("aria-label","Play video"),s.setAttribute("aria-pressed","true"),s.setAttribute("data-button-state","pause"),document.dispatchEvent(new CustomEvent("patrol:video-pause"))}),e.addEventListener("ended",function(){e.setAttribute("data-state","pause"),e.setAttribute("data-state-reload","true"),s.setAttribute("aria-pressed","true"),s.setAttribute("data-button-state","pause"),s.setAttribute("data-button-state-reload","true")})};Ar(),St()})();
198//# sourceMappingURL=/cdn/shop/t/147/assets/patrol-components.js.map?v=59955237636904876481788459332

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.