PageSourceSearch

https://precinctflex.co.nz/build/assets/location-offerings-BNWbWgbZ.js

js precinctflex.co.nz collected 2026-10-09 21:51:26 UTC 2,545 bytes, 1 lines download raw bytes

1import{A as r}from"./abstract-component-RXyoQyv2.js";import{r as s}from"./app-CkxpffqI.js";import{S as l}from"./mousewheel-C-9ONuRz.js";import{b as t}from"./constants-Dn2irOFK.js";import{S as a}from"./swiper--6Hy6CYr.js";import"./navigation-C4DRhtmO.js";import"./create-element-if-not-defined-Ci8bqeC6.js";class o extends r{init(){this.swiper=null,this.tabsEls=this.el.querySelectorAll("[data-offerings-tabs] [data-offering-tab]"),this.tabsEls.length&&(this.swiperWrapperEls=this.el.querySelectorAll("[data-swiper-wrapper]"),this.currentTab=this.tabsEls[0].dataset.offeringTab,this.prevEl=this.el.querySelector("[data-controls] [data-swiper-control-prev]"),this.nextEl=this.el.querySelector("[data-controls] [data-swiper-control-next]"),this.prevMobileEl=this.el.querySelector("[data-mobile-controls] [data-swiper-control-prev]"),this.nextMobileEl=this.el.querySelector("[data-mobile-controls] [data-swiper-control-next]"),this.filterSelectEl=this.el.querySelector("[data-filter-select] .wl-select"),this.bindEvents(),this.initSwiper())}updateSelectedTab(){this.tabsEls.forEach(e=>{e.classList.toggle("is-active",e.dataset.offeringTab===this.currentTab)})}updateFilterSelect(){this.filterSelectEl.querySelector("select").value=this.currentTab,this.filterSelectEl.querySelector("div").textContent=this.filterSelectEl.querySelector(`[data-value="${this.currentTab}"]`).textContent,this.filterSelectEl.querySelectorAll("div ul li").forEach(e=>{e.classList.toggle("is-active",e.dataset.value===this.currentTab)})}bindEvents(){this.tabsEls.forEach(e=>{e.addEventListener("click",i=>{i.preventDefault(),!e.classList.contains("is-active")&&(this.currentTab=e.dataset.offeringTab,this.updateFilterSelect(),this.updateSelectedTab(),this.reInitSwiper())})}),this.filterSelectEl.addEventListener("change",e=>{this.currentTab=e.target.value,this.updateSelectedTab(),this.reInitSwiper()})}reInitSwiper(){this.swiperWrapperEls.forEach(e=>{e.dataset.swiperWrapper===this.currentTab?e.classList.add("is-active"):e.classList.remove("is-active")}),this.initSwiper()}initSwiper(){this.swiper&&this.swiper.destroy();const e=this.el.querySelector(`[data-swiper="${this.currentTab}"]`);e&&(this.swiper=new l(e,{...a,slidesPerView:1,breakpoints:{[t.tablet]:{slidesPerView:1.25},[t.desktop]:{slidesPerView:2}},navigation:{nextEl:this.nextEl,prevEl:this.prevEl}}),this.prevMobileEl?.addEventListener("click",()=>this.swiper.slidePrev()),this.nextMobileEl?.addEventListener("click",()=>this.swiper.slideNext()))}}s("location-offerings",o);export{o as LocationOfferings};

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.