1import{u as O,c as k,t as b,d as N,n as s,e as v,h as F,b as ue}from"./revive-nNTwU9Kq.js";import{s as le}from"./scroll-container-VjQ3xZDS.js";import{c as K,r as P,a as de}from"./cart-vsJaiwMw.js";import{p as fe}from"./provide-resize-observer-kkF_rTB6.js";import{e as V,d as ae}from"./bodyScrollLock.esm-a4TrNjfc.js";import{c as ne}from"./focus-trap.esm-oZSPJe_1.js";import{D as ie}from"./main-d99j7Srd.js";import{s as U}from"./shouldAnimate-saLBw5zN.js";import{d as Y}from"./delay-offset-A4kMqxUk.js";import{m as me}from"./formatMoney-VaWwjlPW.js";import{f as he}from"./free-shipping-bar-V80vFc-n.js";import{D as pe}from"./disclosure-1T-VqFAN.js";const ve={animationItem:".animation--drawer-menu-item"},J={animationRevealed:"animation--drawer-menu-revealed"},ge=e=>{Y(e,[ve.animationItem]);function l(){U(e)&&O(e,J.animationRevealed)}function r(){U(e)&&k(e,J.animationRevealed)}return{open:l,close:r}},W={columns:".meganav__list-parent > li",image:".meganav__promo-image .image__img",overlay:".meganav__secondary-promo-overlay",promoItems:".meganav__secondary-promo-text > *",hasPromo:"meganav--has-promo",promoLeft:"meganav--promo-position-left"},ye=e=>{const l=[],r=b(W.columns,e);N(e,W.hasPromo)?(Y(e,[W.image,W.overlay,W.promoItems]),N(e,W.promoLeft)?p(r,4):p(r)):p(r),Y(e,l);function p(d,g=0){let c;d.forEach((f,m)=>{const y=f.getBoundingClientRect?f.getBoundingClientRect().left:f.offsetLeft;m===0&&(c=y),c!=y&&(c=y,g++),f.style.setProperty("--delay-offset-multiplier",g)})}},X={animationItems:".animation--purchase-confirmation-item",animationFooterItems:".animation--purchase-confirmation-footer-item"},Z={animationRevealed:"animation--purchase-confirmation-revealed"},be=e=>{function l(){Y(e,[X.animationItems]),Y(e,[X.animationFooterItems]),setTimeout(()=>{O(e,Z.animationRevealed)},0)}function r(){k(e,Z.animationRevealed)}return{animate:l,reset:r}},ke=e=>l=>{l.preventDefault(),e()};function we(e){const l={};function r(d){e.innerHTML=d}function p(d){const g=d.replace(" ","-").toLowerCase();if(l[`${g}`]){r(l[`${g}`]);return}fetch(`${window.theme.routes.predictive_search_url}?q=${encodeURIComponent(d)}§ion_id=predictive-search`).then(c=>{if(!c.ok)throw new Error(c.status);return c.text()}).then(c=>{let f=new DOMParser().parseFromString(c,"text/html").querySelector("#shopify-section-predictive-search").innerHTML;l[g]=f,r(f)}).catch(c=>{throw c})}return{getSearchResults:p}}const T={active:"active",visible:"quick-search--visible"};function ee(e,l){const r=s("[data-overlay]",e),p=s("[data-quick-search-form]",e),d=s("[data-input]",e),g=s("[data-clear]",e),c=s("[data-results]",e),f=s("[data-quick-search-footer]",e),m=we(c),y=s("[data-close-icon]",e),E=b("[data-search]",l);let L=0;const B=[v([r,y],"click",w),v(g,"click",n),v(d,"input",x),v(e,"keydown",({keyCode:i})=>{i===27&&w()}),K("drawer-menu:open",()=>{N(e,T.active)&&w()})],D=ne(e,{allowOutsideClick:!0});function x(i){i.target.value===""&&n(),c.style.opacity=0,f&&(f.style.opacity=0),F(g,T.visible,i.target.value!==""),F(d.parentNode,T.active,i.target.value!==""),F(p,T.active,i.target.value!==""),F(e,T.active,i.target.value!==""),m.getSearchResults(i.target.value),setTimeout(()=>{c.style.opacity=1},500),setTimeout(()=>{f&&(f.style.opacity=1)},1e3)}function n(i){i&&i.preventDefault(),d.value="",k(g,T.visible),k(d.parentNode,T.active),k(p,T.active),k(e,T.active),c.innerHTML="",d.focus()}function h(){e.style.setProperty("--scroll-y",Math.ceil(window.scrollY)+"px"),e.getAttribute("aria-hidden")==="false"?w():_()}function _(){P("search:open"),E.forEach(i=>{i.setAttribute("aria-expanded",!0)}),O(e,T.active),e.setAttribute("aria-hidden",!1),document.body.setAttribute("quick-search-open","true"),D.activate(),setTimeout(()=>{d.focus({preventScroll:!0}),document.body.setAttribute("data-fluorescent-overlay-open","true"),ae(e,{allowTouchMove:i=>{for(;i&&i!==document.body;){if(i.getAttribute("data-scroll-lock-ignore")!==null)return!0;i=i.parentNode}},reserveScrollBarGap:!0}),L=window.pageYOffset,document.body.style.top=`-${L}px`,document.body.classList.add("scroll-lock"),O(e,T.visible)},50)}
1function w(){E.forEach(i=>{i.setAttribute("aria-expanded",!1)}),k(e,T.visible),document.body.setAttribute("quick-search-open","false"),D.deactivate(),setTimeout(()=>{k(e,T.active),e.setAttribute("aria-hidden",!0),document.body.setAttribute("data-fluorescent-overlay-open","false"),V(e),document.body.classList.remove("scroll-lock"),document.body.style.top="",window.scrollTo(0,L)},500)}function R(){w(),B.forEach(i=>i())}return{toggleSearch:h,destroy:R}}function te(e,l){if(!e)return;const r=b("[data-dropdown-trigger]",e),p=b("[data-meganav-trigger]",e),d=b(".meganav, node"),g=b(".header__links-list > li > [data-link]:not([data-meganav-trigger]):not([data-dropdown-trigger])",e),c=s('[data-section-type="header"]',document.body),f=s(".header__links-primary",c),m=s(".header__links-resources",c),y=s(".navigation__submenu .navigation__submenu-item",e);if(!r)return;y&&e.style.setProperty("--submenu-item-height",`${y.clientHeight}px`);const E=new ie(document.body);E.on("click",null,t=>R(t)),E.on("mouseover",".header-overlay__inner",t=>{Shopify.designMode&&l.meganavOpenedFromDesignMode||i(e)}),d.forEach(t=>{U(t)&&ye(t)});const L=[v(r,"focus",t=>{t.preventDefault(),h(t.currentTarget.parentNode)}),v(r,"mouseover",t=>{t.preventDefault(),h(t.currentTarget.parentNode,!0)}),v(p,"focus",t=>{t.preventDefault(),D(t.target,t.target.dataset.meganavHandle)}),v(p,"mouseover",t=>{t.preventDefault(),D(t.target,t.target.dataset.meganavHandle)}),v(g,"mouseover",()=>{i()}),v(f,"mouseout",t=>{var o;((o=t.relatedTarget)==null?void 0:o.closest(".header__links-primary"))!=f&&i()}),v(m,"mouseout",t=>{var o;((o=t.relatedTarget)==null?void 0:o.closest(".header__links-resources"))!=m&&i()}),v(l.container,"mouseleave",()=>{k(c,"animation--dropdowns-have-animated-once"),k(c,"animation--dropdowns-have-animated-more-than-once")}),v(e,"keydown",({keyCode:t})=>{t===27&&i()}),v(b(".header__links-list > li > a",e),"focus",()=>{B()&&i()}),v(b("[data-link]",e),"focus",t=>{if(t.preventDefault(),!B())return;const u=t.currentTarget;u.hasAttribute("data-dropdown-trigger")&&h(u.parentNode),b("[data-link]",u.parentNode.parentNode).forEach(S=>F(b("[data-submenu]",S.parentNode),"active",S===u))}),v(b("[data-link]",e),"focusout",t=>{B()&&t.relatedTarget&&!(t.relatedTarget.hasAttribute("data-link")||t.relatedTarget.closest(".meganav"))&&i()}),v(e,"scroll",()=>{document.documentElement.style.setProperty("--navigation-menu-offet",`${e.scrollLeft}px`)})];function B(){return N(document.body,"user-is-tabbing")}function D(t,u){const o=s(`.meganav[data-menu-handle="${u}"]`,c);!o||N(o,"active")||(i(void 0,{avoidShadeHide:!0}),t.setAttribute("aria-expanded",!0),o.dataset.alignToTrigger&&x(o,t),o.setAttribute("aria-hidden",!1),O(c,"dropdown-active"),O(o,"active"),P("headerOverlay:show"))}function x(t,u){const o=s(".header__inner",l.container);u!=null&&u.getBoundingClientRect?u.getBoundingClientRect().left:u.offsetLeft,t.getBoundingClientRect?t.getBoundingClientRect().width:t.offsetWidth,o.getBoundingClientRect?o.getBoundingClientRect().width:o.offsetWidth,t.dataset.meganavType,O(t,"customAlignment")}function n(t,u){var j;const o=window.innerWidth,S=(j=u?.getBoundingClientRect())==null?void 0:j.right,C=o-S-24,H=t.offsetWidth;C<H?t.dataset.position="left":t.dataset.position="right"}function h(t,u){const o=s("[data-submenu]",t),S=s("[data-link]",t),C=t.closest("[data-submenu]");let H;u?H="open":u!==void 0&&(H="close"),H||(H=N(o,"active")?"close":"open"),H==="open"&&(C?.dataset.depth==="1"?i(C,{avoidShadeHide:!0}):i(void 0,{avoidShadeHide:!0}),_(t,S,o)),H=="close"&&w(t,S,o)}function _(t,u,o){u.setAttribute("aria-expanded",!0),o.setAttribute("aria-hidden",!1);const S=parseInt(o.dataset.depth,10),C=b('[data-depth="2"]',t);S===1&&x(o,u),S===1&&C.length&&C.forEach(H=>n(H,o)),O(o,"active"),O(c,"dropdown-active"),P("headerOverlay:show")}function w(t,u,o){if(N(t.parentNode,"header__links-list")){i();return}u.setAttribute("aria-expanded",!1),o.setAttribute("aria-hidden",!0),k(o,"active")}function R(t){!t.target.closest("[data-submenu-parent]")&&!t.target.closest(".meganav")&&!t.target.closest("[data-search]")&&!t.target.closest("[data-quick-search]")&&i()}function i(t=e,u={}){const o=b("[data-submenu]",t),S=b("[data-parent], [data-link]",t);k(o,"active"),o.forEach(C=>
1C.setAttribute("aria-hidden",!0)),S.forEach(C=>C.setAttribute("aria-expanded",!1)),k(c,"dropdown-active"),u.avoidShadeHide||P("headerOverlay:hide")}function $(){E.off(),L.forEach(t=>t())}return{destroy:$}}const q={menuButton:".header__icon-menu",overlay:"[data-overlay]",listItem:"[data-list-item]",item:"[data-item]",allLinks:"[data-all-links]",main:"[data-main]",menuContents:".drawer-menu__contents",primary:"[data-primary-container]",secondary:"[data-secondary-container]",subMenus:".drawer-menu__list--sub",footer:"[data-footer]",close:"[data-close-drawer]",logo:".drawer-menu__logo",form:".drawer-menu__form",localeInput:"[data-locale-input]",currencyInput:"[data-currency-input]"},I={active:"active",visible:"visible",countrySelector:"drawer-menu__list--country-selector"},_e=e=>e+8+"px",Ce=e=>{const l=ge(e);let r=0,p=0,d=0;const g=ne(e,{allowOutsideClick:!0}),c=e.querySelector(q.overlay);c.addEventListener("click",$);const f=e.querySelector(q.menuContents),m=document.querySelector(q.menuButton),y=e.querySelector(q.allLinks),E=e.querySelector(q.main),L=e.querySelector(q.primary),B=e.querySelector(q.secondary),D=e.querySelector(q.form),x=e.querySelector(q.localeInput),n=e.querySelector(q.currencyInput),h=K("search:open",()=>{N(e,I.active)&&$()}),_=e.querySelectorAll(q.item);_.forEach(a=>a.addEventListener("click",w));function w(a){const{item:A}=a.currentTarget.dataset;if(A!=="link")switch(a.preventDefault(),A){case"parent":t(a);break;case"back":S(a);break;case"viewCurrency":case"viewLanguage":C(a);break;case"secondaryHeading":H(a);break;case"locale":oe(a);break;case"currency":re(a);break}}function R(){let a=L.offsetHeight;return B&&(a+=B.offsetHeight),a}function i(){P("drawer-menu:open"),e.classList.add(I.active),document.body.setAttribute("mobile-menu-open","true"),m.setAttribute("aria-expanded",!0),m.setAttribute("aria-label",m.getAttribute("data-aria-label-opened")),setTimeout(()=>{g.activate(),e.classList.add(I.visible),document.body.setAttribute("data-fluorescent-overlay-open","true"),ae(e,{hideBodyOverflow:!0,allowTouchMove:a=>{for(;a&&a!==document.body&&a.id!=="main-content";){if(a.getAttribute("data-scroll-lock-ignore")!==null)return!0;a=a.parentNode}}}),d=window.pageYOffset,document.body.style.top=`-${d}px`,document.body.classList.add("scroll-lock"),r===0&&p===0&&(R(),l.open())},50)}function $(a){m.setAttribute("aria-expanded",!1),m.setAttribute("aria-label",m.getAttribute("data-aria-label-closed")),a&&a.preventDefault(),g.deactivate(),e.classList.remove(I.visible),document.body.setAttribute("mobile-menu-open","false"),e.querySelectorAll(q.subMenus).forEach(M=>{M.classList.remove(I.visible),M.setAttribute("aria-hidden",!0)}),setTimeout(()=>{e.classList.remove(I.active),document.body.setAttribute("data-fluorescent-overlay-open","false"),V(e),document.body.classList.remove("scroll-lock"),document.body.style.top="",window.scrollTo(0,d),u(0),l.close()},350)}function t(a){a.preventDefault();const A=a.currentTarget;A.ariaExpanded="true";const M=A.nextElementSibling;M.classList.add(I.visible),M.setAttribute("aria-hidden",!1),E.style.height=_e(M.offsetHeight),f.scrollTo(0,0),u(p+=1)}function u(a){p=a,L.setAttribute("data-depth",a),y.setAttribute("data-in-initial-position",a===0)}function o(a){r=a,y.setAttribute("data-depth",a),y.setAttribute("data-in-initial-position",a===0)}function S(a){a.preventDefault();const A=a.currentTarget.closest(q.listItem).closest("ul");A.offsetHeight,A==L&&R();const M=a.currentTarget.closest("ul");M.classList.remove(I.visible);const ce=M.previousElementSibling;ce.ariaExpanded="false",u(p-=1)}function C(a){a.preventDefault(),o(1),a.currentTarget.nextElementSibling.classList.add(I.visible)}function H(a){a?.preventDefault(),o(0),a.currentTarget.closest("ul").classList.remove(I.visible)}function j(a,A){const{value:M}=a.currentTarget.dataset;A.value=M,$(),D.submit()}function Q(a){e.classList.contains(I.visible)&&(a.key=="Escape"||a.keyCode===27)&&$()}const oe=a=>j(a,x),re=a=>j(a,n);window.addEventListener("keydown",Q);function se(){c.removeEventListener("click",$),_.forEach(a=>a.removeEventListener("click",w)),V(e),document.body.classList.remove("scroll-lock"),document.body.style.top="",window.scrollTo(0,d),window.removeEventListener("keydown",Q),h()}return{close:$,destroy:se,open:i}},G={header:".header__outer-wrapper",containerInner:".purchase-confirmation-popup__inner",freeShippingBar:".free-shipping-bar",viewCartButton:".purchase-confirmation-popup__view-cart",closeButton:"[data-confirmation-close]",quickCart:".quick-cart"},z={active:"active",hidden:"hidden"};function Le(e){if(!e)return;const l=!!s(G.quickCart,document),r=s(G.containerInner,e);let p=null;U(e)&&(p=be(e));const d=new ie(e);d.on("click",G.viewCartButton,m=>{l&&(m.preventDefault(),P("quick-cart:open"),f())}),d.on("click",G.closeButton,m=>{m.preventDefault(),f()}),K("confirmation-popup:open",(m,{product:y})=>g(y));function g(m){const y=`${theme.routes.cart.base}/?section_id=purchase-confirmation-popup-item`;me("GET",y).then(E=>{let L=document.createElement("div");L.innerHTML=E,r.innerHTML="",r.appendChild(L);const B=s(G.freeShippingBar,r);B&&he(B);const D=s(`[data-product-key="${m.key}"]`,e);k(D,z.hidden),c()})}function c(){O(e,z.active),U(e)&&p.animate();const m=setTimeout(()=>{f()},5e3);r.addEventListener("mouseover",()=>{clearTimeout(m),r.addEventListener("mouseleave",f,{once:!0})},{once:!0})}function f(){k(e,z.active),U(e)&&setTimeout(()=>{p.reset()},500)}}function Se(e){document.documentElement.style.setProperty("--height-header",Math.ceil(e)+"px")}function Ee(e){document.documentElement.style.setProperty("--header-desktop-sticky-position",e+"px")}function Be(e){document.documentElement.style.setProperty("--header-desktop-sticky-height",e+"px")}const Ae={disclosure:"[data-disclosure]"};ue("header",{crossBorder:{},onLoad(){const{enableStickyHeader:e,transparentHeader:l}=this.container.dataset;this.cartCounts=b("[data-js-cart-count]",this.container);const r=b("[data-js-cart-icon]",this.container),p=b("[data-js-menu-button]",this.container),d=b("[data-search]",this.container),g=s("[data-header-space]",document),c=s(".header__row-desktop.lower",this.container);let f={};this.meganavOpenedFromDesignMode=!1;const m=Ce(s("[data-drawer-menu]"));this.purchaseConfirmationPopup=Le(s("[data-purchase-confirmation-popup]",document));const y=te(s("[data-navigation]",this.container),this),E=te(s("[data-resources-navigation]",this.container),this);document.body.classList.toggle("header-transparent",!!l),document.documentElement.classList.toggle("sticky-header-enabled",!!e),document.addEventListener("visibilitychange",function(){document.visibilityState==="hidden"&&navigator.sendBeacon&&f.env&&navigator.sendBeacon(f.env.FLU_PING_ENDPOINT,Shopify.shop)}),this.listeners=[K("cart:updated",({cart:n})=>{this.updateCartCount(n.item_count)}
1),v(document,"apps:product-added-to-cart",()=>{de.get().then(n=>{this.updateCartCount(n.item_count)})}),v(r,"click",n=>{const h=s("#slidecarthq button",document);h&&h.focus(),s(".quick-cart",document)&&(n.preventDefault(),P("quick-cart:open"))})],document.onkeydown=function(n){n=n||window.event;let h=!1;if("key"in n?h=n.key==="Escape"||n.key==="Esc":h=n.keyCode===27,h){const _=s("#slidecarthq .open button",document);_&&_.click(),r&&r.length&&r[0].focus()}};const L={attributes:!0,childList:!0},B=n=>{n.forEach(h=>{if(h.type==="childList"||h.type==="attributes"){const _=s(".slidecarthq.open",document);if(_){const w=s("button",_);w&&w.focus(),v(w,"click",R=>{r&&r.length&&r[0].focus()})}}})};if(new MutationObserver(B).observe(document.body,L),document.addEventListener("rebuy:cart.change",n=>{this.updateCartCount(n.detail.cart.cart.item_count)}),v(p,"click",function(n){n.preventDefault(),n.currentTarget.getAttribute("aria-expanded")=="true"?m.close():m.open()}),this.components=[m],d.length>0){let n=ee(s("[data-quick-search-desktop]"),this.container);K("drawer-menu:open",()=>{n=ee(s("[data-quick-search-mobile]"),this.container)}),this.listeners.push(v(d,"click",ke(n.toggleSearch))),this.components.push(n)}y&&this.components.push(y),E&&this.components.push(E),e&&(this.io=new IntersectionObserver(([{isIntersecting:n}])=>{F(this.container,"is-sticky",!n),F(document.documentElement,"sticky-header-active",!n)}),this.io.observe(g)),fe().then(({ResizeObserver:n})=>{this.ro=new n(([{target:h}])=>{const _=h.offsetHeight,w=c.offsetHeight,R=_-w;Se(h.getBoundingClientRect()?h.getBoundingClientRect().height:h.offsetHeight),Ee(R*-1),Be(h.offsetHeight-R)}),this.ro.observe(this.container)});const x=b(Ae.disclosure,this.container);x&&x.forEach(n=>{const{disclosure:h}=n.dataset;this.crossBorder[h]=pe(n)}),this.navScroller=le(s(".header__links-primary-scroll-container",this.container))},updateCartCount(e){this.cartCounts.forEach(l=>{l.innerHTML=e})},onBlockSelect({target:e}){O(this.container,"dropdown-active"),O(e,"active"),this.meganavOpenedFromDesignMode=!0,this.showHeaderOverlay()},onBlockDeselect({target:e}){k(this.container,"dropdown-active"),k(e,"active"),this.meganavOpenedFromDesignMode=!1,this.hideHeaderOverlay()},onUnload(){this.listeners.forEach(e=>e()),this.components.forEach(e=>e.destroy()),this.io&&this.io.disconnect(),this.ro.disconnect(),Object.keys(this.crossBorder).forEach(e=>this.crossBorder[e].unload())},showHeaderOverlay(){P("headerOverlay:show")},hideHeaderOverlay(){P("headerOverlay:hide")}}); 2//# sourceMappingURL=/cdn/shop/t/149/assets/header-jLX1ewhA.js.map
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.