1document.addEventListener("DOMContentLoaded",function(){if(window.innerWidth<=480&&window.location.href.includes("/products/")){const addToCartButton=document.querySelector("[data-add-to-cart]"),productDesc=document.querySelector(".desc-txt.product_desc"),klarnaPlacement=document.querySelector("klarna-placement"),qtyWrapper=document.querySelector(".itemscope-details .qty-wrapper");addToCartButton&&productDesc&&addToCartButton.insertAdjacentElement("afterend",productDesc),qtyWrapper&&klarnaPlacement&&qtyWrapper.insertAdjacentElement("afterend",klarnaPlacement)}function adjustFacetFiltersPosition(){if(document.body.classList.contains("template-collection")&&document.querySelector(".title_and_filters")&&document.querySelector("#FacetFiltersFormMobile")&&document.querySelector(".options-group")&&document.querySelector(".mobile-facets__close")){var collectionTitleHeight=document.querySelector(".title_and_filters").clientHeight;collectionTitleHeight&&(document.querySelector("#FacetFiltersFormMobile").style.top=`${collectionTitleHeight}px`,document.querySelector(".options-group").style.top=`${collectionTitleHeight}px`,document.querySelector(".mobile-facets__close").style.top=`${collectionTitleHeight+5}px`)}}window.addEventListener("load",adjustFacetFiltersPosition),window.addEventListener("resize",debounce(adjustFacetFiltersPosition,100));let accJoinTeam=document.querySelectorAll(".join-team__item--button");accJoinTeam.length>0&&accJoinTeam.forEach(item=>{item.addEventListener("click",function(){let openElement=item.nextElementSibling;openElement&&openElement.classList.contains("join-team__item--information")&&$(openElement).slideToggle()})}),window.getCookie=name=>{let nameEQ=name+"=",ca=document.cookie.split(";");for(var i=0;i<ca.length;i++){let c=ca[i];for(;c.charAt(0)===" ";)c=c.substring(1,c.length);if(c.indexOf(nameEQ)===0)return c.substring(nameEQ.length,c.length)}return null};let popupCookies=document.querySelector("#cookie_poster");if(popupCookies&&window.getCookie("popUpcookie")===null&&(setTimeout(function(){popupCookies.classList.add("active-cookie")},2e3),document.querySelector("#cookie_btn").addEventListener("click",()=>{let now=new Date,expiretime=now.getFullYear()+1;now.setFullYear(expiretime),document.cookie="popUpcookie=ok;expires="+now+";path=/",popupCookies.classList.remove("active-cookie")})),window.innerWidth<=640){const creditPromotionElement=document.querySelector('[data-key="credit-promotion-auto-size"]'),productDesc=document.querySelector(".desc-txt.product_desc");creditPromotionElement&&productDesc&&setTimeout(()=>{productDesc.insertAdjacentElement("beforebegin",creditPromotionElement)},500)}const collapsibleElements=document.querySelectorAll(".collapse-start");if(collapsibleElements.length){let hasCollapseEndSibling2=function(element){let sibling=element.nextElementSibling;for(;sibling!==null;){if(sibling.classList.contains("collapse-end"))return!0;sibling=sibling.nextElementSibling}return console.log("Collapse End Section Missing in Page!"),!1},toggleCollapse2=function(element){let sibling=element.nextElementSibling;for(;sibling&&!sibling.classList.contains("collapse-end");)sibling.style.height===""||sibling.style.height==="0px"?sibling.style.height=sibling.scrollHeight+"px":sibling.style.height="0px",sibling=sibling.nextElementSibling},toggleResizeCollapse2=function(element){let sibling=element.nextElementSibling;for(;sibling&&!sibling.classList.contains("collapse-end");)sibling.style.height!==""&&sibling.style.height!=="0px"&&(sibling.style.height="auto",sibling.style.height=sibling.scrollHeight+"px"),sibling=sibling.nextElementSibling},applyInitialHeightForTransition2=function(element){let sibling=element.nextElementSibling;for(;sibling&&!sibling.classList.contains("collapse-end");)sibling.style.height===""&&(sibling.style.height=sibling.scrollHeight+"px"),sibling=sibling.nextElementSibling},closeOtherCollapses2=function(original_element){collapsibleElements.forEach(close_element=>{if(close_element!=original_element&&hasCollapseEndSibling2(close_element)){let sibling=close_element.nextElementSibling;for(;sibling&&!sibling.classList.contains("collapse-end");)sibling.style.height="0px",sibling=sibling.nextElementSibling}})};var hasCollapseEndSibling=hasCollapseEndSibling2,toggleCollapse=toggleCollapse2,toggleResizeCollapse=toggleResizeCollapse2,applyInitialHeightForTransition=applyInitialHeightForTransition2,closeOtherCollapses=closeOtherCollapses2;
1collapsibleElements.forEach(element=>{hasCollapseEndSibling2(element)&&(applyInitialHeightForTransition2(element),element.addEventListener("click",()=>{closeOtherCollapses2(element),toggleCollapse2(element)}))}),window.addEventListener("resize",()=>{collapsibleElements.forEach(element=>{hasCollapseEndSibling2(element)&&toggleResizeCollapse2(element)})}),document.querySelectorAll(".start-collapsed").forEach(element=>{hasCollapseEndSibling2(element.parentElement)&&toggleCollapse2(element.parentElement)})}});function debounce(fn,wait){let t;return(...args)=>{clearTimeout(t),t=setTimeout(()=>fn.apply(this,args),wait)}}class MenuDrawer extends HTMLElement{constructor(){super(),this.mainDetailsToggle=this.querySelector("details"),this.addEventListener("keyup",this.onKeyUp.bind(this)),this.addEventListener("focusout",this.onFocusOut.bind(this)),this.bindEvents()}bindEvents(){this.querySelectorAll("summary").forEach(summary=>summary.addEventListener("click",this.onSummaryClick.bind(this))),this.querySelectorAll("button:not(.localization-selector):not(.country-selector__close-button):not(.country-filter__reset-button)").forEach(button=>button.addEventListener("click",this.onCloseButtonClick.bind(this)))}onKeyUp(event){if(event.code.toUpperCase()!=="ESCAPE")return;const openDetailsElement=event.target.closest("details[open]");openDetailsElement&&(openDetailsElement===this.mainDetailsToggle?this.closeMenuDrawer(event,this.mainDetailsToggle.querySelector("summary")):this.closeSubmenu(openDetailsElement))}onSummaryClick(event){const summaryElement=event.currentTarget,detailsElement=summaryElement.parentNode,parentMenuElement=detailsElement.closest(".has-submenu"),isOpen=detailsElement.hasAttribute("open"),reducedMotion=window.matchMedia("(prefers-reduced-motion: reduce)");function addTrapFocus(){trapFocus(summaryElement.nextElementSibling,detailsElement.querySelector("button")),summaryElement.nextElementSibling.removeEventListener("transitionend",addTrapFocus)}detailsElement===this.mainDetailsToggle?(isOpen&&event.preventDefault(),isOpen?this.closeMenuDrawer(event,summaryElement):this.openMenuDrawer(summaryElement),window.matchMedia("(max-width: 990px)")&&document.documentElement.style.setProperty("--viewport-height",`${window.innerHeight}px`)):setTimeout(()=>{detailsElement.classList.add("menu-opening"),summaryElement.setAttribute("aria-expanded",!0),parentMenuElement&&parentMenuElement.classList.add("submenu-open"),!reducedMotion||reducedMotion.matches?addTrapFocus():summaryElement.nextElementSibling.addEventListener("transitionend",addTrapFocus)},100)}openMenuDrawer(summaryElement){setTimeout(()=>{this.mainDetailsToggle.classList.add("menu-opening")}),summaryElement.setAttribute("aria-expanded",!0),trapFocus(this.mainDetailsToggle,summaryElement),document.body.classList.add(`overflow-hidden-${this.dataset.breakpoint}`);var sortOptionsBtn=document.querySelector("#FacetSortDrawerForm");sortOptionsBtn&&sortOptionsBtn.classList.contains("open")&&sortOptionsBtn.classList.toggle("open")}closeMenuDrawer(event,elementToFocus=!1){event!==void 0&&(this.mainDetailsToggle.classList.remove("menu-opening"),this.mainDetailsToggle.querySelectorAll("details").forEach(details=>{details.classList.remove("menu-opening")}),this.mainDetailsToggle.querySelectorAll(".submenu-open").forEach(submenu=>{submenu.classList.remove("submenu-open")}),document.body.classList.remove(`overflow-hidden-${this.dataset.breakpoint}`),removeTrapFocus(elementToFocus),this.closeAnimation(this.mainDetailsToggle),event instanceof KeyboardEvent&&elementToFocus&&elementToFocus.setAttribute("aria-expanded",!1))}onFocusOut(){setTimeout(()=>{this.mainDetailsToggle.hasAttribute("open")&&!this.mainDetailsToggle.contains(document.activeElement)&&this.closeMenuDrawer()})}onCloseButtonClick(event){const detailsElement=event.currentTarget.closest("details");this.closeSubmenu(detailsElement)}closeSubmenu(detailsElement){const parentMenuElement=detailsElement.closest(".submenu-open");parentMenuElement&&parentMenuElement.classList.remove("submenu-open"),detailsElement.classList.remove("menu-opening"),detailsElement.querySelector("summary").setAttribute("aria-expanded",!1),removeTrapFocus(detail
1sElement.querySelector("summary")),this.closeAnimation(detailsElement)}closeAnimation(detailsElement){let animationStart;const handleAnimation=time=>{animationStart===void 0&&(animationStart=time),time-animationStart<400?window.requestAnimationFrame(handleAnimation):(detailsElement.removeAttribute("open"),detailsElement.closest("details[open]")&&trapFocus(detailsElement.closest("details[open]"),detailsElement.querySelector("summary")))};window.requestAnimationFrame(handleAnimation)}}const trapFocusHandlers={};function trapFocus(container,elementToFocus=container){var elements=getFocusableElements(container),first=elements[0],last=elements[elements.length-1];removeTrapFocus(),trapFocusHandlers.focusin=event=>{event.target!==container&&event.target!==last&&event.target!==first||document.addEventListener("keydown",trapFocusHandlers.keydown)},trapFocusHandlers.focusout=function(){document.removeEventListener("keydown",trapFocusHandlers.keydown)},trapFocusHandlers.keydown=function(event){event.code.toUpperCase()==="TAB"&&(event.target===last&&!event.shiftKey&&(event.preventDefault(),first.focus()),(event.target===container||event.target===first)&&event.shiftKey&&(event.preventDefault(),last.focus()))},document.addEventListener("focusout",trapFocusHandlers.focusout),document.addEventListener("focusin",trapFocusHandlers.focusin),elementToFocus&&(elementToFocus.focus(),elementToFocus.tagName==="INPUT"&&["search","text","email","url"].includes(elementToFocus.type)&&elementToFocus.value&&elementToFocus.setSelectionRange(0,elementToFocus.value.length))}function removeTrapFocus(elementToFocus=null){document.removeEventListener("focusin",trapFocusHandlers.focusin),document.removeEventListener("focusout",trapFocusHandlers.focusout),document.removeEventListener("keydown",trapFocusHandlers.keydown),elementToFocus&&elementToFocus.focus()}function onKeyUpEscape(event){if(event.code.toUpperCase()!=="ESCAPE")return;const openDetailsElement=event.target.closest("details[open]");if(!openDetailsElement)return;const summaryElement=openDetailsElement.querySelector("summary");openDetailsElement.removeAttribute("open"),summaryElement.setAttribute("aria-expanded",!1),summaryElement.focus()}function getFocusableElements(container){return Array.from(container.querySelectorAll("summary, a[href], button:enabled, [tabindex]:not([tabindex^='-']), [draggable], area, input:not([type=hidden]):enabled, select:enabled, textarea:enabled, object, iframe"))}customElements.define("menu-drawer",MenuDrawer),(function(){if(window.__rebuyCartA11y)return;window.__rebuyCartA11y=!0;var SELECTOR=".rebuy-cart",OPEN_CLASS="is-visible",lastTrigger=null;function drawer(){return document.querySelector(SELECTOR)}function isOpen(d){return d&&d.classList.contains(OPEN_CLASS)}function focusables(container){return[].slice.call(container.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(function(el){return el.offsetParent!==null})}function onKeydown(e){var d=drawer();if(isOpen(d)){if(e.key==="Escape"||e.keyCode===27){e.preventDefault();try{window.Rebuy.SmartCart.hide()}catch{}return}if(!(e.key!=="Tab"&&e.keyCode!==9)){var f=focusables(d);if(!f.length){e.preventDefault(),d.focus();return}var first=f[0],last=f[f.length-1];e.shiftKey&&document.activeElement===first?(e.preventDefault(),last.focus()):!e.shiftKey&&document.activeElement===last&&(e.preventDefault(),first.focus())}}}document.addEventListener("click",function(e){var t=e.target.closest('[name="add"], .btn--add-to-cart, .product__cta, .cart_view, [data-rebuy-open-cart], .rebuy-cart-toggle');t&&(lastTrigger=t)},!0),document.addEventListener("keydown",onKeydown,!0),document.addEventListener("rebuy:smartcart.show",function(){var d=drawer();if(d){d.setAttribute("aria-hidden","false"),d.getAttribute("aria-label")||d.setAttribute("aria-label","Shopping cart"),d.hasAttribute("tabindex")||d.setAttribute("tabindex","-1");var close=d.querySelector(".rebuy-cart__flyout-close")||focusables(d)[0]||d;setTimeout(function(){try{close.focus()}catch{}},80)}}),document.addEventListener("rebuy:smartcart.hide",function(){if(lastTrigger&&document.contains(lastTrigger))try{lastTrigger.focus()}catch{}})})();function syncHeaderCartCount(){let count=null;try{window.Rebuy&&Rebuy.Cart&&(count=typeof Rebuy.Cart.itemCount=="function"?Rebuy.Cart.itemCount():Rebuy.Cart.cart&&Rebuy.Cart.cart.item_count)}
1catch{count=null}typeof count=="number"&&document.querySelectorAll(".cart_count_item").forEach(item=>{item.innerText!==String(count)&&(item.innerText=count)})}["rebuy:cart.change","rebuy:cart.ready"].forEach(name=>{document.addEventListener(name,syncHeaderCartCount)}); 2//# sourceMappingURL=/cdn/shop/t/283/assets/custom.js.map?v=6542205676371726321789492971
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.