1(()=>{"use strict";var __webpack_modules__={5669:((__unused_webpack_module,__webpack_exports__2,__webpack_require__2)=>{__webpack_require__2.d(__webpack_exports__2,{A:()=>GlobalDrawer});class GlobalDrawer extends HTMLElement{constructor(){super(),this.closeElements=this.querySelectorAll("[data-drawer-close]"),this.openDrawer=this.openDrawer.bind(this),this.closeDrawer=this.closeDrawer.bind(this),this.closeAllDrawers=this.closeAllDrawers.bind(this),this.handleResize=this.handleResize.bind(this)}connectedCallback(){window.wetheme.webcomponentRegistry.register({key:"component-drawer"}),window.eventBus.on("close:all:drawers",this.closeAllDrawers),this.closeElements.forEach(element=>{element.addEventListener("click",this.closeDrawer)}),window.Shopify.designMode&&window.addEventListener("resize",this.handleResize)}openDrawer(){window.eventBus.emit("close:all:drawers",this),this.setAttribute("aria-hidden","false"),document.body.classList.add("js-drawer-open"),this.addEventListener("transitionend",this.handleTransitionEnd),window.eventBus.emit("drawer:opened",this)}closeDrawer(){this.setAttribute("aria-hidden","true"),document.body.classList.remove("js-drawer-open"),this.removeEventListener("transitionend",this.handleTransitionEnd),window.eventBus.emit("drawer:closed",this)}closeAllDrawers(e){e!==this&&this.closeDrawer()}handleTransitionEnd(e){e.target===this&&this.trapFocus()}trapFocus(){const focusableElements=this.querySelectorAll('button, [href], input:not([type="hidden"]), select, textarea, [tabindex]:not([tabindex="-1"])'),firstFocusableElement=focusableElements[0],lastFocusableElement=focusableElements[focusableElements.length-1];firstFocusableElement.focus(),this.addEventListener("keydown",e=>{e.key==="Tab"&&(e.shiftKey?document.activeElement===firstFocusableElement&&(lastFocusableElement.focus(),e.preventDefault()):document.activeElement===lastFocusableElement&&(firstFocusableElement.focus(),e.preventDefault()))})}handleResize(){this.classList.add("disable-transitions"),setTimeout(()=>{this.classList.remove("disable-transitions")},500)}disconnectedCallback(){window.Shopify.designMode&&window.removeEventListener("resize",this.handleResize)}}})},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(cachedModule!==void 0)return cachedModule.exports;var module=__webpack_module_cache__[moduleId]={exports:{}};return __webpack_modules__[moduleId](module,module.exports,__webpack_require__),module.exports}__webpack_require__.d=(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop);var __webpack_exports__={},_global_drawer__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(5669);class OffersDrawer extends _global_drawer__WEBPACK_IMPORTED_MODULE_0__.A{constructor(){super(),this.sectionId=this.getAttribute("data-section-id"),this.heading=this.querySelector("[data-offers-drawer-heading]"),this.TOOLTIP_COOKIE_NAME="offers-drawer-tooltip",this.showIcon=this.getAttribute("data-show-icon")==="true",this.init=this.init.bind(this),this.injectIconInHeading=this.injectIconInHeading.bind(this),this.initTooltip=this.initTooltip.bind(this),this.showDailyTooltip=this.showDailyTooltip.bind(this),this.showTooltip=this.showTooltip.bind(this),this.handleSectionSelect=this.handleSectionSelect.bind(this),this.handleSectionDeselect=this.handleSectionDeselect.bind(this)}connectedCallback(){super.connectedCallback(),window.wetheme.webcomponentRegistry.register({key:"component-offers-drawer"}),window.eventBus.on("open:offers:drawer",this.init),window.eventBus.on("close:offers:drawer",this.closeDrawer),this.showIcon&&(this.injectIconInHeading(),window.eventBus.on("injectIcon:offers:drawer",this.injectIconInHeading)),this.initTooltip(),window.Shopify.designMode&&(document.addEventListener("shopify:section:select",this.handleSectionSelect),document.addEventListener("shopify:section:deselect",this.handleSectionDeselect))}init(){this.classList.remove("shown-on-scroll"),this.openDrawer(),this.offsetHeight,this.classList.add("shown-on-scroll")}injectIconInHeading(){if(!this.heading)return;const icon=document.querySelector("[data-offers-drawer-icon]");if(!icon)return;const existingIconClone=this.heading.querySelector("[data-offers-drawer-icon-clone]");existingIconClone&&existingIconClone.remove();const iconClone=icon.cloneNode(!0);iconClone.removeAttribute("data-offers-drawer-icon"),iconClone.setAttribute("data-offers-drawer-icon-clone",!0),this.heading.prepend(iconClone)}initTooltip(){document.querySelector("[data-offers-drawer-tooltip]")&&this.showDailyTooltip()}showTooltip(){const tooltips=document.querySelectorAll("[data-offers-drawer-tooltip]");tooltips.length!==0&&(setTimeout(()=>{tooltips.forEach(tooltip=>{tooltip.classList.remove("hide")})},1e3),setTimeout(()=>{tooltips.forEach(tooltip=>{tooltip.classList.add("fade-out-tooltip")})},7e3),setTimeout(()=>{tooltips.forEach(tooltip=>{tooltip.classList.add("hide")})},7500))}showDailyTooltip(){if(!this.isLocalStorageSupported())return;const lastShownDate=localStorage.getItem("tooltipDate"),today=new Date().toISOString().slice(0,10);lastShownDate!==today&&(this.showTooltip(),localStorage.setItem("tooltipDate",today))}isLocalStorageSupported(){try{return typeof Storage<"u"&&window.localStorage}catch{return!1}}handleSectionSelect(e){const sectionId=e.detail.sectionId;this.sectionId==sectionId&&(e.detail.load&&(this.classList.add("disable-transitions"),setTimeout(()=>{this.classList.remove("disable-transitions")},500)),this.init())}handleSectionDeselect(e){const sectionId=e.detail.sectionId;this.sectionId==sectionId&&this.closeDrawer()}disconnectedCallback(){window.eventBus.off("open:offers:drawer",this.init),window.Shopify.designMode&&(document.removeEventListener("shopify:section:select",this.handleSectionSelect),document.removeEventListener("shopify:section:deselect",this.handleSectionDeselect))}}customElements.define("offers-drawer",OffersDrawer)})(); 2//# sourceMappingURL=/cdn/shop/t/22/assets/component-offers-drawer.js.map?v=76889310730683087111774447485
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.