PageSourceSearch

https://gimmecoffee.com/cdn/shop/t/3/assets/component-store-selector.js?v=127151995086457915791710782061

js gimmecoffee.com collected 2026-09-24 09:49:46 UTC 7,948 bytes, 2 lines download raw bytes

1if(typeof StoreSelector!="function"){class StoreSelector2 extends HTMLElement{constructor(){super(),this.mainSelector=this.hasAttribute("data-main-selector"),this.storeSelectorButton=this.mainSelector?document.querySelector("[data-js-select-store]"):null,this.canChangeStore=!0;const interactiveMap=document.getElementById(this.dataset.mapSelector);this.mainSelector&&this.hasAttribute("data-single-store")&&localStorage.setItem("selected-store",this.querySelector(".store-selector-item").getAttribute("data-handle"));const selectedStore=localStorage.getItem("selected-store");let selectedStoreFound=!1;if(this.storesList=[],this.querySelectorAll(".store-selector-item").forEach(elm=>{const item=elm;if(this.storesList[item.dataset.handle]=item.dataset.title,selectedStore&&selectedStore==item.getAttribute("data-handle")&&(this._setSelectedStore(item,item),this.changeSelectedStoreHandleContent(selectedStore),selectedStoreFound=!0,interactiveMap&&interactiveMap.addEventListener("ready",()=>{setTimeout(()=>{new google.maps.event.trigger(interactiveMap.markers[item.dataset.handle],"click")},1e3)})),!this.hasAttribute("data-single-store")){const toggleEl=document.createElement("div");if(toggleEl.classList=`js-accordion-tab-toggle ${this.mainSelector?"js-accordion-tab-toggle--main":""}`,toggleEl.tabIndex=0,toggleEl.innerHTML=KROWN.settings.symbols.toggle_pack_alternate,item.querySelector(".js-accordion-tab").appendChild(toggleEl),this.mainSelector){const changeStoreEv=e=>{this._clearSelectedStore(item),this._setSelectedStore(item,e.target),interactiveMap&&item.classList.contains("store-selector-item--store--active")&&new google.maps.event.trigger(interactiveMap.markers[item.dataset.handle],"click")};item.querySelector(".store-selector-item__input-container").addEventListener("click",changeStoreEv),item.querySelector(".store-selector-item__input-container").addEventListener("keyup",e=>{e.keyCode==window.KEYCODES.RETURN&&changeStoreEv(e)})}const openAccordionEv=()=>{this._openStoreTab(item),this.canChangeStore=!1,interactiveMap&&item.classList.contains("store-selector-item--active")&&new google.maps.event.trigger(interactiveMap.markers[item.dataset.handle],"click"),item.querySelector("css-slider")&&item.querySelector("css-slider").resetSlider()};item.querySelector(`${this.mainSelector?".js-accordion-tab-toggle":".js-accordion-tab"}`).addEventListener("click",openAccordionEv),item.querySelector(`${this.mainSelector?".js-accordion-tab-toggle":".js-accordion-tab"}`).addEventListener("keyup",e=>{e.keyCode==window.KEYCODES.RETURN&&openAccordionEv()})}}),this.storeSelectorButton&&selectedStoreFound==!1&&this.storeSelectorButton.classList.add("show-select-label"),interactiveMap&&interactiveMap.addEventListener("marker",e=>{if(this.canChangeStore){const item=this.querySelector(`.store-selector-item[data-handle="${e.detail.store}"]`);item.classList.contains("store-selector-item--store--active")||(this._clearSelectedStore(item),this._setSelectedStore(item,item))}else this.canChangeStore=!0}),document.querySelector("[data-js-select-store]")){const storeChanged=new CustomEvent("storechanged");document.querySelector("[data-js-select-store]").addEventListener("click",e=>{if(e.preventDefault(),this.querySelector(".store-selector-item--store--active")){const selectedStoreNew=this.querySelector(".store-selector-item--store--active").getAttribute("data-handle");localStorage.setItem("selected-store",selectedStoreNew),this.changeSelectedStoreHandleContent(selectedStoreNew)}else localStorage.removeItem("selected-store"),this.changeSelectedStoreHandleContent();this.dispatchEvent(storeChanged)})}}_openStoreTab(item){const open=!item.classList.contains("store-selector-item--active");this.querySelectorAll(".store-selector-item--active").forEach(elm=>{this._slideUp(elm.querySelector("[role=tabpanel]"),200),elm.classList.remove("store-selector-item--active")}),open&&(item.classList.add("store-selector-item--active"),this._slideDown(item.querySelector("[role=tabpanel]"),200))}_clearSelectedStore(item){!item.classList.contains("store-selector-item--store--active")&&this.querySelector(".store-selector-item--store--active")&&(this.querySelector(".store-selector-item--store--active input").checked=!1,this.querySelector(".store-selector-item--store--active").classList.remove("store-selector-item--store--active"))}_setSelectedStore(item,button){item.classList.toggle("store-selector-item--store--active"),this.mainSelector&&(item.querySelector("input").checked=!item.querySelector("input").checked,button.setAttribute("aria-selected",button.getAttribute("aria-selected")=="true"?"false":"true"),this.storeSelectorButton&&(item.classList.contains("store-selector-item--store--active")?this.storeSelectorButton.style.display="block":this.storeSelectorButton.style.display="none"))}changeSelectedStoreHandleContent(store=null){this.mainSelector&&document.querySelectorAll('[data-type="store-selector"]').forEach(storeSelectorHandle=>
1{if(store){let storeClosingHours="";if(document.querySelector(".store-selector-item--store--active .store-selector-item__closing-times")){const today=new Date().getDay(),closingTimes=document.querySelector(".store-selector-item--store--active .store-selector-item__closing-times").querySelectorAll("p");closingTimes[today]&&(storeClosingHours=`  |  ${closingTimes[today].textContent}`)}storeSelectorHandle.querySelector("[data-store-title]").innerHTML=`${KROWN.settings.locales.store_selector_title_selected}${storeClosingHours}`,storeSelectorHandle.querySelector("[data-store-label]").textContent=this.storesList[store],this.storeSelectorButton&&(this.storeSelectorButton.classList.add("show-change-label"),this.storeSelectorButton.classList.remove("show-select-label"))}else storeSelectorHandle.querySelector("[data-store-title]").textContent=KROWN.settings.locales.store_selector_title_default,storeSelectorHandle.querySelector("[data-store-label]").textContent=KROWN.settings.locales.store_selector_label})}_slideUp(target,duration){target.style.transitionProperty="height, margin, padding",target.style.transitionDuration=duration+"ms",target.style.boxSizing="border-box",target.style.height=target.offsetHeight+"px",target.offsetHeight,target.style.overflow="hidden",target.style.height=0,target.style.paddingTop=0,target.style.paddingBottom=0,target.style.marginTop=0,target.style.marginBottom=0,setTimeout(()=>{target.style.display="none",target.style.removeProperty("height"),target.style.removeProperty("padding-top"),target.style.removeProperty("padding-bottom"),target.style.removeProperty("margin-top"),target.style.removeProperty("margin-bottom"),target.style.removeProperty("overflow"),target.style.removeProperty("transition-duration"),target.style.removeProperty("transition-property")},duration)}_slideDown(target,duration){target.style.removeProperty("display");var display=window.getComputedStyle(target).display;display==="none"&&(display="block"),target.style.display=display;var height=target.offsetHeight;target.style.overflow="hidden",target.style.height=0,target.style.paddingTop=0,target.style.paddingBottom=0,target.style.marginTop=0,target.style.marginBottom=0,target.offsetHeight,target.style.boxSizing="border-box",target.style.transitionProperty="height, margin, padding",target.style.transitionDuration=duration+"ms",target.style.height=height+"px",target.style.removeProperty("padding-top"),target.style.removeProperty("padding-bottom"),target.style.removeProperty("margin-top"),target.style.removeProperty("margin-bottom"),setTimeout(()=>{target.style.removeProperty("height"),target.style.removeProperty("overflow"),target.style.removeProperty("transition-duration"),target.style.removeProperty("transition-property")},duration)}}typeof customElements.get("store-selector")>"u"&&customElements.define("store-selector",StoreSelector2)}
2//# sourceMappingURL=/cdn/shop/t/3/assets/component-store-selector.js.map?v=127151995086457915791710782061

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.