1"use strict";(globalThis.webpackChunkNorden_Commerce=globalThis.webpackChunkNorden_Commerce||[]).push([[9436],{7128(e,t,r){r.d(t,{initRetailerList:()=>l});let o=!1;function a(e,t){e=e||1;let r=Hatraco.storelocator.ajaxListUrl+"?page="+e;void 0!==t&&(r=r+"&"+t.toString()),Fetch(r).then(r=>{const l=document.querySelector("[data-storelocator-ajax-list]");if(l.innerHTML=r,o){const e=l.querySelector('[data-storelocator-list-sorting] input[name="sort"]:checked');e&&e.focus()}!function(e,t){const r=new URL(window.location.href);if(r.search="",t)for(const[e,o]of t.entries())""!==o&&r.searchParams.append(e,o);e>1&&r.searchParams.set("page",e);window.history.replaceState({},"",r)}(e,t??new URLSearchParams),function(e){const t=e.querySelectorAll("[data-storelocator-retailer]");t.forEach(e=>{const t=()=>{var t;t=e.dataset.pk,document.querySelectorAll("[data-storelocator-retailer]").forEach(e=>{e.classList.toggle("c-store-card--active",e.dataset.pk===String(t))});const r=document.querySelector("[data-storelocator-map]");r.getBoundingClientRect().top+window.scrollY>e.getBoundingClientRect().top+window.scrollY&&r.scrollIntoView({behavior:"smooth"}),window.emitter.emit("Storelocator:selectRetailer",{id:e.dataset.pk,lat:Number(e.dataset.lat),lng:Number(e.dataset.lng)})};e.addEventListener("click",t),e.addEventListener("keydown",e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t())})})}(l);l.querySelectorAll("[data-page]").forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),a(e.currentTarget.dataset.page,c())})});l.querySelectorAll('[name="postype"]').forEach(e=>{e.addEventListener("change",()=>{n()})});l.querySelectorAll('[name="productrange"]').forEach(e=>{e.addEventListener("change",()=>{n()})});const s=l.querySelector('[name="country"]');s&&s.addEventListener("change",()=>{a(1,c())});const i=l.querySelector('[name="city"]');i&&i.addEventListener("change",()=>{a(1,c())});const d=l.querySelector("[data-storelocator-list-filter]");d&&d.addEventListener("submit",e=>{e.preventDefault(),a(1,c())});l.querySelectorAll('[data-storelocator-list-sorting] input[name="sort"]').forEach(e=>{e.addEventListener("change",e=>{o=!0,e.target.checked&&a(1,c())})});l.querySelector("[data-storelocator-reset]").addEventListener("click",()=>{const e=l.querySelector("[data-storelocator-list-filter]"),t=document.querySelector('input[name="sort"][value="name"]');e.querySelectorAll('input[type="checkbox"]').forEach(e=>{e.checked=!1}),e.querySelectorAll('input[type="search"], input[type="text"]').forEach(e=>{e.value=""}),e.querySelectorAll("select").forEach(e=>{e.selectedIndex=0}),t&&(t.checked=!0),n()})})}function c(){const e=document.querySelector("[data-storelocator-list-filter]"),t=new FormData(e),r=new URLSearchParams(t),o=document.querySelector('input[name="sort"]:checked');return o&&"name"!==o.value?r.set("sort",o.value):r.delete("sort"),r}function n(){const e=c();a(1,e),window.emitter.emit("Storelocator:sharedFiltersChanged",{postypes:e.getAll("postype"),productranges:e.getAll("productrange")})}function l(){const e=new URLSearchParams(window.location.search),t=Number(e.get("page"))||1;e.delete("page"),a(t,e)}}}]);
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.