1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[75261],{156(e){var t=function(e){var t;return!!e&&"object"==typeof e&&"[object RegExp]"!==(t=Object.prototype.toString.call(e))&&"[object Date]"!==t&&e.$$typeof!==i},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function s(e,t){return!1!==t.clone&&t.isMergeableObject(e)?o(Array.isArray(e)?[]:{},e,t):e}function r(e,t,i){return e.concat(t).map(function(e){return s(e,i)})}function n(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function a(e,t){try{return t in e}catch(e){return!1}}function o(e,i,l){(l=l||{}).arrayMerge=l.arrayMerge||r,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=s;var h,c,g=Array.isArray(i);return g!==Array.isArray(e)?s(i,l):g?l.arrayMerge(e,i,l):(c={},(h=l).isMergeableObject(e)&&n(e).forEach(function(t){c[t]=s(e[t],h)}),n(i).forEach(function(t){(!a(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(a(e,t)&&h.isMergeableObject(i[t])?c[t]=(function(e,t){if(!t.customMerge)return o;var i=t.customMerge(e);return"function"==typeof i?i:o})(t,h)(e[t],i[t],h):c[t]=s(i[t],h))}),c)}o.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,i){return o(e,i,t)},{})},e.exports=o},261(e,t,i){i.r(t),i.d(t,{default:()=>u});var s=i(373);class r{constructor(){this._request=null,this._errorHandlingInternal=!1}get(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",s=this._createPreparedRequest("GET",e,i);return this._sendRequest(s,null,t)}post(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(t,s);let r=this._createPreparedRequest("POST",e,s);return this._sendRequest(r,t,i)}delete(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(t,s);let r=this._createPreparedRequest("DELETE",e,s);return this._sendRequest(r,t,i)}patch(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(t,s);let r=this._createPreparedRequest("PATCH",e,s);return this._sendRequest(r,t,i)}abort(){if(this._request)return this._request.abort()}setErrorHandlingInternal(e){this._errorHandlingInternal=e}_registerOnLoaded(e,t){t&&(!0===this._errorHandlingInternal?(e.addEventListener("load",()=>{t(e.responseText,e)}),e.addEventListener("abort",()=>{console.warn(`the request to ${e.responseURL} was aborted`)}),e.addEventListener("error",()=>{console.warn(`the request to ${e.responseURL} failed with status ${e.status}`)}),e.addEventListener("timeout",()=>{console.warn(`the request to ${e.responseURL} timed out`)})):e.addEventListener("loadend",()=>{t(e.responseText,e)}))}_sendRequest(e,t,i){return this._registerOnLoaded(e,i),e.send(t),e}_getContentType(e,t){return e instanceof FormData&&(t=!1),t}_createPreparedRequest(e,t,i){return this._request=new XMLHttpRequest,this._request.open(e,t),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),i&&this._request.setRequestHeader("Content-type",i),this._request}}let n=Object.freeze(new class{constructor(){this._domParser=new DOMParser}replaceFromMarkup(e,t){let i=e;"string"==typeof i&&(i=this._createMarkupFromString(i)),"string"==typeof t&&(t=[t]),this._replaceSelectors(i,t)}replaceElement(e,t){return("string"==typeof e&&(e=document.querySelectorAll(e)),"string"==typeof t&&(t=document.querySelectorAll(t)),e instanceof NodeList&&t instanceof NodeList&&t.length>e.length)?(t.forEach(t=>{e.forEach(e=>{e.innerHTML&&e.className===t.className&&(t.innerHTML=e.innerHTML)})}),!0):e instanceof NodeList&&e.length?(e.forEach((e,i)=>{e.innerHTML&&(t[i].innerHTML=e.innerHTML)}),!0):t instanceof NodeList&&t.length?(t.forEach(t=>{e.innerHTML&&(t.innerHTML=e.innerHTML)}),!0):!!t&&!!e&&!!e.innerHTML&&(t.innerHTML=e.innerHTML,!0)}_replaceSelectors(e,t){t.forEach(t=>{let i=e.querySelectorAll(t),s=document.querySelectorAll(t);this.replaceElement(i,s)})}_createMarkupFromString(e){return this._domParser.parseFromString(e,"text/html")}});class a{static replaceFromMarkup(e,t){n.replaceFromMarkup(e,t)}static replaceElement(e,t){return n.replaceElement(e,t)}}class o{static debounce(e,t){let i,s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){for(var r=arguments.length,n=Array(r),a=0;a<r;a++)n[a]=arguments[a];s&&!i&&setTimeout(e.bind(e,...n),0),clearTimeout(i),i=setTimeout(e.bind(e,...n),t)}}}class l extends s.A{static #e=this.options={dataUrl:"",filterUrl:"",params:{},filterPanelSelector:".filter-panel",cmsProductListingSelector:".cms-element-product-listing",cmsProductListingWrapperSelector:".cms-element-product-listing-wrapper",cmsProductListingResultsSelector:".js-listing-wrapper",activeFilterContainerSelector:".filter-panel-active-container",activeFilterLabelClasses:"filter-active btn",activeFilterLabelSelector:".filter-active",activeFilterLabelPreviewClass:"filter-active-preview",resetAllFilterButtonClasse
1s:"filter-reset-all btn btn-outline-danger",resetAllFilterButtonSelector:".filter-reset-all",loadingIndicatorClass:"is-loading",loadingElementLoaderClass:"has-element-loader",ariaLiveSelector:".filter-panel-aria-live",ariaLiveUpdates:!0,disableEmptyFilter:!1,snippets:{resetAllButtonText:"Reset all",resetAllFiltersAriaLabel:"Reset all filters",removeFilterAriaLabel:"Remove filter"},scrollTopListingWrapper:!0,scrollOffset:15,ignoreHashOnlyPopstate:!0};init(){this._registry=[],this.httpClient=new r,this._urlFilterParams=Object.fromEntries(new URLSearchParams(window.location.search).entries()),this._filterPanel=document.querySelector(this.options.filterPanelSelector),this._filterPanelActive=!!this._filterPanel,this._filterPanelActive&&(this._showResetAll=!1,this.activeFilterContainer=document.querySelector(this.options.activeFilterContainerSelector),this.ariaLiveContainer=document.querySelector(this.options.ariaLiveSelector)),this._cmsProductListingWrapper=document.querySelector(this.options.cmsProductListingWrapperSelector),this._cmsProductListingWrapperActive=!!this._cmsProductListingWrapper,this._allFiltersInitializedDebounce=o.debounce(this.sendDisabledFiltersRequest.bind(this),100),this._lastPathWithoutHash=this._getPathWithoutHash(),this._registerEvents()}refreshRegistry(){let e=this._registry.filter(e=>document.body.contains(e.el));this.init(),this._registry=e,window.PluginManager.initializePlugins()}changeListing(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._buildRequest(e,t),this._filterPanelActive&&this._buildLabels()}registerFilter(e){this._registry.push(e),this._setFilterState(e),this.options.disableEmptyFilter&&this._allFiltersInitializedDebounce()}_setFilterState(e){Object.keys(this._urlFilterParams).length>0&&"function"==typeof e.setValuesFromUrl&&e.setValuesFromUrl(this._urlFilterParams)&&this._filterPanelActive&&(this._showResetAll=!0,this._buildLabels())}deregisterFilter(e){this._registry=this._registry.filter(t=>t!==e)}_fetchValuesOfRegisteredFilters(){let e={};return this._registry.forEach(t=>{let i=t.getValues();
1Object.keys(i).forEach(t=>{Object.prototype.hasOwnProperty.call(e,t)?Object.values(i[t]).forEach(i=>{e[t].push(i)}):e[t]=i[t]})}),e}_mapFilters(e){let t={};return Object.keys(e).forEach(i=>{let s=e[i];Array.isArray(s)&&(s=s.join("|")),`${s}`.length&&(t[i]=s)}),t}_buildRequest(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this._fetchValuesOfRegisteredFilters(),s=this._mapFilters(i);this._filterPanelActive&&(this._showResetAll=!!Object.keys(s).length),this.options.params&&Object.keys(this.options.params).forEach(e=>{s[e]=this.options.params[e]}),Object.entries(t).forEach(e=>{let[t,i]=e;s[t]=i});let r=new URLSearchParams(s);this.sendDataRequest(r),delete s.slots,delete s["no-aggregations"],delete s["reduce-aggregations"],delete s["only-aggregations"],r=new URLSearchParams(s),e&&this._updateHistory(r),this.options.scrollTopListingWrapper&&this._scrollTopOfListing()}_scrollTopOfListing(){let e=this._cmsProductListingWrapper.getBoundingClientRect();if(e.top>=0)return;let t=e.top+window.scrollY-this.options.scrollOffset;window.scrollTo({top:t,behavior:"smooth"})}_getDisabledFiltersParamsFromParams(e){let t=Object.assign({},{"only-aggregations":1,"reduce-aggregations":1},e);return delete t.p,delete t.order,delete t["no-aggregations"],new URLSearchParams(t)}_updateHistory(e){let t=this._buildUrl(window.location.pathname,e);window.history.pushState({},"",t),this._lastPathWithoutHash=this._getPathWithoutHash()}_buildLabels(){let e="";this._registry.forEach(t=>{let i=t.getLabels();i.length&&i.forEach(t=>{e+=this.getLabelTemplate(t)})}),this.activeFilterContainer.innerHTML=e;let t=this.activeFilterContainer.querySelectorAll(this.options.activeFilterLabelSelector);e.length&&(this._registerLabelEvents(t),this.createResetAllButton())}_registerLabelEvents(e){e.forEach(e=>{e.addEventListener("click",()=>this.resetFilter(e))})}createResetAllButton(){this.activeFilterContainer.insertAdjacentHTML("beforeend",this.getResetAllButtonTemplate());let e=this.activeFilterContainer.querySelector(this.options.resetAllFilterButtonSelector);e.removeEventListener("click",this.resetAllFilter.bind(this)),e.addEventListener("click",this.resetAllFilter.bind(this)),this._showResetAll||e.remove()}resetFilter(e){this._registry.forEach(t=>{t.reset(e.dataset.id)}),this._buildRequest(),this._buildLabels()}resetAllFilter(){this._registry.forEach(e=>{e.resetAll()}),this._buildRequest(),this._buildLabels()}getLabelTemplate(e){return` 2 <button 3 class="${this.options.activeFilterLabelClasses}" 4 data-id="${e.id}" 5 title="${this.options.snippets.removeFilterAriaLabel}: ${e.label}" 6 aria-label="${this.options.snippets.removeFilterAriaLabel}: ${e.label}"> 7 ${this.getLabelPreviewTemplate(e)} 8 ${e.label} 9 <span aria-hidden="true" class="ms-1 fs-4">×</span> 10 </button> 11 `}getLabelPreviewTemplate(e){let t=this.options.activeFilterLabelPreviewClass;return e.previewHex?` 12 <span class="${t}" style="background-color: ${e.previewHex};"></span> 13 `:e.previewImageUrl?` 14 <span class="${t}" style="background-image: url('${e.previewImageUrl}');"></span> 15 `:""}getResetAllButtonTemplate(){return` 16 <button class="${this.options.resetAllFilterButtonClasses}" aria-label="${this.options.snippets.resetAllFiltersAriaLabel}"> 17 ${this.options.snippets.resetAllButtonText} 18 </button> 19 `}addLoadingIndicatorClass(){this._filterPanel.classList.add(this.options.loadingIndicatorClass)}removeLoadingIndicatorClass(){this._filterPanel.classList.remove(this.options.loadingIndicatorClass)}addLoadingElementLoaderClass(){this._cmsProductListingWrapper.classList.add(this.options.loadingElementLoaderClass)}removeLoadingElementLoaderClass(){this._cmsProductListingWrapper.classList.remove(this.options.loadingElementLoaderClass)}sendDataRequest(e){this._filterPanelActive&&this.addLoadingIndicatorClass(),this._cmsProductListingWrapperActive&&this.addLoadingElementLoaderClass(),this.options.disableEmptyFilter&&this.sendDisabledFiltersRequest(),fetch(this._buildUrl(this.options.dataUrl,e),{headers:{"X-Requested-With":"XMLHttpRequest"}}).then(e=>e.text()).then(e=>{this.renderResponse(e),this._filterPanelActive&&(this.removeLoadingIndicatorClass(),this._updateAriaLive()),this._cmsProductListingWrapperActive&&this.removeLoadingElementLoaderClass()})}sendDisabledFiltersRequest(){let e=this._fetchValuesOfRegisteredFilters(),t=this._mapFilters(e);
19this.options.params&&Object.keys(this.options.params).forEach(e=>{t[e]=this.options.params[e]}),this._allFiltersInitializedDebounce=()=>{};let i=this._getDisabledFiltersParamsFromParams(t);fetch(this._buildUrl(this.options.filterUrl,i),{headers:{"X-Requested-With":"XMLHttpRequest"}}).then(e=>e.json()).then(e=>{this._registry.forEach(t=>{"function"==typeof t.refreshDisabledState&&t.refreshDisabledState(e,i)})})}renderResponse(e){a.replaceFromMarkup(e,this.options.cmsProductListingSelector),this._registry.forEach(e=>{"function"==typeof e.afterContentChange&&e.afterContentChange()}),window.PluginManager.initializePlugins(),this.$emitter.publish("Listing/afterRenderResponse",{response:e})}_updateAriaLive(){if(!this.options.ariaLiveUpdates||!this.ariaLiveContainer)return;let e=this.el.querySelector(this.options.cmsProductListingResultsSelector);this.ariaLiveContainer.innerHTML=e.dataset.ariaLiveText}_registerEvents(){window.onpopstate=this._onWindowPopstate.bind(this)}_onWindowPopstate(){if(this.options.ignoreHashOnlyPopstate&&this._lastPathWithoutHash){let e=this._getPathWithoutHash();if(this._lastPathWithoutHash===e)return}this.refreshRegistry(),this._registry.forEach(e=>{0===Object.keys(this._urlFilterParams).length&&(this._urlFilterParams.p=1),this._setFilterState(e)}),this.options.disableEmptyFilter&&this._allFiltersInitializedDebounce(),this.changeListing(!1)}_getPathWithoutHash(){return window.location.pathname+window.location.search}_buildUrl(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.location.origin,s=new URL(e,i);return t.size>0&&t.forEach((e,t)=>{s.searchParams.append(t,e)}),s.toString()}}let h="loader",c={BEFORE:"before",INNER:"inner"};class g{constructor(e,t=c.BEFORE){this.parent=e instanceof Element?e:document.body.querySelector(e),this.position=t}create(){if(!this.exists()){if(this.position===c.INNER){this._previousHTML=this.parent.innerHTML,this.parent.innerHTML=g.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),g.getTemplate())}}remove(){if(this.position===c.INNER){this.parent.innerHTML=this._previousHTML;return}this.parent.querySelectorAll(`.${h}`).forEach(e=>e.remove())}exists(){return this.parent.querySelectorAll(`.${h}`).length>0}_getPosition(){return this.position===c.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return`<div class="${h}" role="status"> 20 <span class="visually-hidden">Loading...</span> 21 </div>`}static SELECTOR_CLASS(){return h}}class u extends l{init(){this._tmisVersion="3.0.1",this._tmisDebug=!!window._tanmarInfiniteScrolling&&!!window._tanmarInfiniteScrolling.debug,this._tmisActive=!1,this._tmisNewPageRequestCounter=0,this._tmisIsLoading=!1,this._tmisListingElement=null,this._tmisListingOption="",this._tmisSnippets={},this._tmisNewPageRequestMax=1,this._listingRowSelector=".cms-element-product-listing-wrapper .cms-listing-row",this._paginationResponseSelector=".cms-element-product-listing-wrapper .pagination-nav",this._paginationSelector=".pagination-nav",this._triggerAfterRenderResponseEvent=!1,this._onlyObserveWithinListingWrapper=!1,this._customProductSelector="",this.iObserver=!1,this.options.scrollTopListingWrapper=!1,this._tmisIsB2B=!1,super.init(),this._tmisInit()}_tmisInit(){if(this._tmisLog("TanmarInfiniteScrolling v"+this._tmisVersion),!document.querySelector("body.is-tanmar-infinite-scrolling")){this._tmisLog(' error: css class "is-tanmar-infinite-scrolling" in body not found'),this._tmisDestroy();return}if(!window._tanmarInfiniteScrolling){this._tmisLog(" error: cant find window._tanmarInfiniteScrolling"),this._tmisDestroy();return}this._tmisLog(" config ",window._tanmarInfiniteScrolling),this._tmisNewPageRequestMax=parseInt(window._tanmarInfiniteScrolling.pages,10),this._tmisSnippets=window._tanmarInfiniteScrolling.snippets,this._tmisLog(" snippets success ",this._tmisSnippets),this._triggerAfterRenderResponseEvent=window._tanmarInfiniteScrolling.triggerAfterRenderResponseEvent,this._onlyObserveWithinListingWrapper=window._tanmarInfiniteScrolling.onlyObserveWithinListingWrapper,this._customProductSelector=window._tanmarInfiniteScrolling.customProduct;let e=window._tanmarInfiniteScrolling.customPaginationSelector+"";""!=e.trim()&&(this._paginationSelector=e),window._tanmarInfiniteScrolling.visitedPages||(window._tanmarInfiniteScrolling.visitedPages=[]),this._tmisActive=!0;var t=document.querySelectorAll(this._paginationSelector);if(t.length<=0){this._tmisLog(' error - no pagination found: "'+this._paginationSelector+'" not found'),this._tmisDestroy();return}
21if(t.forEach(e=>{e.classList.add("tmis-d-none")}),this._tmisIsB2B=document.querySelectorAll(".b2b-table .b2b-listing-name").length>0,this._tmisIsB2B)return this._listingRowSelector=".cms-element-product-listing-wrapper .b2b-table > tbody",this._tmisDestroy();this._tmisRegisterIntersectionObserver(),this._tmisSetCurrentAndLastPage(t),this.lastPage>this.currentPage&&(this._tmisLog(" register oberver on init"),this._tmisObserveLastProductBox()),this._visitedPagesAdd(this.currentPage),this._tmisListingElement=document.querySelector(this.options.cmsProductListingSelector),this._tmisLog(" currentPage = "+this.currentPage+" - lastPage = "+this.lastPage+" - visitedPages:"),this._tmisLog(window._tanmarInfiniteScrolling.visitedPages),this.currentPage>1&&this._tmisBuildPrevInfoBox(),0==this._tmisNewPageRequestMax&&this._tmisBuildNextInfoBox()}_tmisSetCurrentAndLastPage(e){let t=1,i=1;if(e&&e[0]){let s=e[0].querySelector(".page-item.active a");s?t=parseInt(s.getAttribute("data-page"),10):this._tmisLog(" can't find 'page-item.active a[data-page]'");let r=e[0].querySelector(".page-item.page-last a");r?i=parseInt(r.getAttribute("data-page"),10):this._tmisLog(" can't find 'page-item.page-last a[data-page]'"),this.currentPage=t,this.lastPage=i}}_visitedPagesAdd(e){0>this._visitedPagesIndexOf(e)&&window._tanmarInfiniteScrolling.visitedPages.push(e)}_visitedPagesIndexOf(e){return window._tanmarInfiniteScrolling.visitedPages.indexOf(e)}_visitedPagesClear(){window._tanmarInfiniteScrolling.visitedPages=[]}_tmisLog(){this._tmisDebug&&console.log(...arguments)}_tmisRegisterIntersectionObserver(){var e={root:null,rootMargin:window._tanmarInfiniteScrolling.rootMargin||"0px",threshold:this._tmisSafeThreshold(window._tanmarInfiniteScrolling.threshold||.5)};this.iObserver=new IntersectionObserver(this._tmisOnIntersection.bind(this),e)}_tmisSafeThreshold(e){try{t=JSON.parse(e)}catch(i){this._tmisLog(i),t=e}if(Array.isArray(t))return t;var t,i=parseFloat(t,10);return isNaN(i)?.5:i}_getAllProductBoxes(){let e=".card.product-box";return this._tmisIsB2B&&(e=".b2b-table .b2b-listing-name"),this._customProductSelector&&""!=this._customProductSelector&&(e=this._customProductSelector),this._onlyObserveWithinListingWrapper&&(e=".cms-element-product-listing-wrapper "+e),Array.from(document.querySelectorAll(e)).filter(e=>e.checkVisibility())}_tmisObserveLastProductBox(){var e=[];try{e=this._getAllProductBoxes()}catch(e){this._tmisLog(e)}if(e.length<=0){this._tmisLog(' error "last product" not found'),this._tmisDestroy();return}var t=e[e.length-1];return this.iObserver||this._tmisRegisterIntersectionObserver(),this._tmisLog(" observe following element"),this._tmisLog(t),this.iObserver.observe(t),t}_tmisOnIntersection(e,t){e.forEach(e=>{if(e.intersectionRatio>0&&!this._tmisIsLoading){let i=document.querySelector(".pagination .page-next");i&&(this._tmisLog(" on intersection"),i.classList.contains("disabled")?(this._tmisLog(" no new page, unobserve following element"),this._tmisLog(e.target),t.unobserve(e.target)):this._tmisNewPageRequestCounter<this._tmisNewPageRequestMax&&(this._tmisRequestNewPage(i,"append"),this._tmisLog(" request new page, unobserve following element"),this._tmisLog(e.target),t.unobserve(e.target)))}})}_tmisRequestNewPage(e,t){var i;switch(this._tmisIsLoading=!0,this._tmisLog(" Request new page"),t){case"append":this._tmisListingOption="append";break;case"prepend":this._tmisListingOption="prepend";break;default:this._tmisListingOption="override"}i=isNaN(e)?parseInt(e.querySelector("a").getAttribute("data-page"),10):parseInt(e,10);let s=window.PluginManager.getPluginInstanceFromElement(document.querySelector("[data-listing-pagination]"),"ListingPagination");s.tempValue=i,s._pageChanged=!0,s.listing.changeListing(),s.tempValue=null,this._tmisNewPageRequestCounter++,this._tmisBuildLoading()}_tmisBuildLoading(){let e=document.createElement("div");e.classList.add("text-center"),e.classList.add("infinite-scrolling-loading");let t=new g(e);var i=document.querySelectorAll(this._listingRowSelector);let s=i[i.length-1];"append"===this._tmisListingOption?s.parentNode.insertBefore(e,s.nextSibling):i[0].parentNode.insertBefore(e,i[0]),t.create()}_tmisGetNewPageParam(e,t){var i=e.split("?"),s=[];void 0!==i[1]&&(s=(s=i[1].split("&").map(e=>e.split("="))).filter(e=>""!=e));var r=!1;return s=s.map(e=>("p"==e[0]&&(r=!0,e[1]=parseInt(e[1],10)+t),e)),r||s.push(["p",1]),i[0]+"?"+s.map(e=>e.join("=")).join("&")}_tmisBuildPrevInfoBox(){if(null!==document.querySelector(".infinite-scrolling-button-prev"))return;let e=document.createElement("div");e.classList.add("text-center"),e.classList.add("infinite-scrolling-button-prev");var t=this.currentPage-1;if(t>0){let s=t/(this.lastPage>0?this.lastPage:1)*100,r=this._tmisSnippets.prev.navi.split("{x}").join(t).split("{y}").join(this.lastPage),n=this._tmisGetNewPageParam(document.location.href,-1);if(e.innerHTML=`<a class="btn btn-block btn-buy" href="${n}">${this._tmisSnippets.prev.btn}</a>
22 <span class="tanmar-infinity-scrolling-button-text"> 23 <span>${r}</span> 24 <span class="tanmar-infinity-scrolling-button-bar"> 25 <span style="width: ${s}%"></span> 26 </span> 27 </span>`,""!=window._tanmarInfiniteScrolling.customPrepend){let t=document.querySelector(window._tanmarInfiniteScrolling.customPrepend);null!==t&&t.appendChild(e)}else this._tmisListingElement.insertBefore(e,this._tmisListingElement.firstChild);var i=document.querySelector(".infinite-scrolling-button-prev a");i&&i.addEventListener("click",e=>{if(e.preventDefault(),!this._tmisIsLoading){this._tmisRequestNewPage(t,"prepend");let e=document.querySelector(".infinite-scrolling-button-prev");e.parentNode.removeChild(e)}return!1})}}_tmisBuildNextInfoBox(){if(null===document.querySelector(".infinite-scrolling-button-more")){var e=parseInt(this.currentPage,10)+1;if(this._tmisLog(" nextPage = "+e+" lastPage = "+this.lastPage),0>this._visitedPagesIndexOf(e)&&e<=this.lastPage){let i=document.createElement("div");i.classList.add("text-center"),i.classList.add("infinite-scrolling-button-more");let s=this.currentPage/(this.lastPage>0?this.lastPage:1)*100,r=this._tmisSnippets.next.navi.split("{x}").join(e).split("{y}").join(this.lastPage),n=this._tmisGetNewPageParam(document.location.href,1);if(i.innerHTML=`<a class="btn btn-block btn-buy" href="${n}">${this._tmisSnippets.next.btn}</a> 28 <span class="tanmar-infinity-scrolling-button-text"> 29 <span>${r}</span> 30 <span class="tanmar-infinity-scrolling-button-bar"> 31 <span style="width: ${s}%"></span> 32 </span> 33 </span>`,""!=window._tanmarInfiniteScrolling.customAppend){let e=document.querySelector(window._tanmarInfiniteScrolling.customAppend);null!==e&&e.appendChild(i)}else this._tmisListingElement.appendChild(i);var t=document.querySelector(".infinite-scrolling-button-more a");t&&t.addEventListener("click",t=>{if(t.preventDefault(),!this._tmisIsLoading){this._tmisRequestNewPage(e,"append");let t=document.querySelector(".infinite-scrolling-button-more");t.parentNode.removeChild(t)}return!1})}}}renderResponse(e){if(!this._tmisActive)return super.renderResponse(e);this._tmisIsLoading=!1,document.querySelectorAll(".infinite-scrolling-loading").forEach(e=>{e.parentNode.removeChild(e)});var t=new DOMParser().parseFromString(e,"text/html"),i=t.querySelector(this._listingRowSelector);if(i||(this._tmisLog(" content is null, responseHtml:"),this._tmisLog(t)),this._tmisHandleResponsePagination(t),0>this._visitedPagesIndexOf(this.currentPage)){this._visitedPagesAdd(this.currentPage),this._tmisLog(" currentPage = "+this.currentPage+" - lastPage = "+this.lastPage+" - visitedPages:"),this._tmisLog(window._tanmarInfiniteScrolling.visitedPages);var s=document.querySelectorAll(this._listingRowSelector);if(s.length>0){var r=s[s.length-1];switch(this._tmisLog(' renderResponse "'+this._tmisListingOption+'"'),this._tmisListingOption){case"append":this._tmisListingAppend(r,i);break;case"prepend":this._tmisListingPrepend(r,i);break;default:this._tmisListingOverride(s,i)}this._registry.forEach(e=>{"function"==typeof e.afterContentChange&&e.afterContentChange()}),window.PluginManager.initializePlugins(),this._triggerAfterRenderResponseEvent&&this.$emitter.publish("Listing/afterRenderResponse",{response:e}),this.lastPage>this.currentPage&&(this._tmisLog(" register new oberver"),this._tmisObserveLastProductBox()),this._tmisAfterContentChange(i),this.$emitter.publish("TanmarInfiniteScrolling/afterRenderResponse",{response:e})}}else this._tmisLog(" page "+this.currentPage+" already loaded - "+this._tmisListingOption)}_tmisListingAppend(e,t){e.innerHTML+=t.innerHTML,this._tmisNewPageRequestCounter>=this._tmisNewPageRequestMax&&this._tmisBuildNextInfoBox()}_tmisListingPrepend(e,t){e.innerHTML=t.innerHTML+e.innerHTML,this.currentPage>1&&this._tmisBuildPrevInfoBox()}_tmisListingOverride(e,t){Array.from(e).forEach((e,i)=>{0==i?e.innerHTML=t.innerHTML:e&&e.parentNode&&e.parentNode.removeChild(e)});let i=document.querySelector(".infinite-scrolling-button-prev");i&&i.parentNode.removeChild(i),(i=document.querySelector(".infinite-scrolling-button-more"))&&i.parentNode.removeChild(i),this.lastPage>this.currentPage&&(this._tmisNewPageRequestCounter=0),this._tmisNewPageRequestCounter>=this._tmisNewPageRequestMax&&this._tmisBuildNextInfoBox()}_tmisHandleResponsePagination(e){var t=e.querySelector(this._paginationResponseSelector);t?(document.querySelectorAll(".pagination-nav").length<=0?document.querySelector("body").append(t):a.replaceElement(t,document.querySelectorAll(this._paginationSelector)),this.currentPage=parseInt(t.querySelector(".page-item.active a").getAttribute("data-page"),10),this.lastPage=parseInt(t.querySelector(".page-item.page-last a").getAttribute("data-page"),10)):(document.querySelectorAll(".pagination-nav").forEach(e
33=>{e.innerHTML=""}),this._tmisLog(" remove pagination-nav"),this.currentPage=1,this.lastPage=1)}_tmisAfterContentChange(e){if(e){var t=e.querySelectorAll("img"),i=e.querySelectorAll("img");t.forEach((e,t)=>{e.outerHTML=i[t].outerHTML})}}resetAllFilter(){this._tmisActive&&(this._tmisListingOption="override",this._visitedPagesClear(),this._tmisNewPageRequestCounter=0,this._tmisIsLoading=!0,this._tmisLog(" reset resetAllFilter")),super.resetAllFilter()}resetFilter(e){this._tmisActive&&(this._tmisListingOption="override",this._visitedPagesClear(),this._tmisNewPageRequestCounter=0,this._tmisIsLoading=!0,this._tmisLog(" reset resetFilter")),super.resetFilter(e)}addLoadingElementLoaderClass(){if(!this._tmisActive)return super.addLoadingElementLoaderClass();"override"==this._tmisListingOption&&super.addLoadingElementLoaderClass()}removeLoadingElementLoaderClass(){if(!this._tmisActive)return super.removeLoadingElementLoaderClass();"override"==this._tmisListingOption&&super.removeLoadingElementLoaderClass()}refreshRegistry(){if(!this._tmisActive)return super.refreshRegistry();let e=this._registry.filter(e=>document.body.contains(e.el));super.init(),this._registry=e,window.PluginManager.initializePlugins()}_onWindowPopstate(){this._tmisActive&&(this._tmisListingOption="override",this._visitedPagesClear(),this._tmisNewPageRequestCounter=0,this._tmisIsLoading=!0,this._tmisLog(" reset _onWindowPopstate")),super._onWindowPopstate()}_tmisDestroy(){this._tmisActive=!1,this._tmisLog(" _tmisDestroy"),document.querySelectorAll(".tmis-d-none").forEach(e=>{e.classList.remove("tmis-d-none")}),document.querySelectorAll("body").forEach(e=>{e.classList.remove("is-tanmar-infinite-scrolling")})}}},373(e,t,i){i.d(t,{A:()=>o});var s=i(156),r=i.n(s);class n{static ucFirst(e){return e.charAt(0).toUpperCase()+e.slice(1)}static lcFirst(e){return e.charAt(0).toLowerCase()+e.slice(1)}static toDashCase(e){return e.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(e,t){let i=n.toUpperCamelCase(e,t);return n.lcFirst(i)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>n.ucFirst(e.toLowerCase())).join(""):n.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}class a{constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=new CustomEvent(e,{detail:t,cancelable:i});return this.el.dispatchEvent(s),s}subscribe(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=this,r=e.split("."),n=i.scope?t.bind(i.scope):t;if(i.once&&!0===i.once){let t=n;n=function(i){s.unsubscribe(e),t(i)}}return this.el.addEventListener(r[0],n),this.listeners.push({splitEventName:r,opts:i,cb:n}),!0}unsubscribe(e){let t=e.split(".");return this.listeners=this.listeners.reduce((e,i)=>([...i.splitEventName].sort().toString()===t.sort().toString()?this.el.removeEventListener(i.splitEventName[0],i.cb):e.push(i),e),[]),!0}reset(){return this.listeners.forEach(e=>{this.el.removeEventListener(e.splitEventName[0],e.cb)}),this.listeners=[],!0}get el(){return this._el}set el(e){this._el=e}get listeners(){return this._listeners}set listeners(e){this._listeners=e}}class o{constructor(e,t={},i=!1){if(!(e instanceof Node)){console.warn(`There is no valid element given while trying to create a plugin instance for "${i}".`);return}this.el=e,this.$emitter=new a(this.el),this._pluginName=this._getPluginName(i),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}init(){console.warn(`The "init" method for the plugin "${this._pluginName}" is not defined. The plugin will not be initialized.`)}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(e){let t=[this.constructor.options,this.options,e];return t.push(this._getConfigFromDataAttribute()),t.push(this._getOptionsFromDataAttribute()),r().all(t.filter(e=>e instanceof Object&&!(e instanceof Array)).map(e=>e||{}))}_getConfigFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=n.toDashCase(this._pluginName),i=this.el.getAttribute(`data-${t}-config`);return i?window.PluginConfigManager.get(this._pluginName,i):e}_getOptionsFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=n.toDashCase(this._pluginName),i=this.el.getAttribute(`data-${t}-options`);if(i)try{return JSON.parse(i)}catch(e){console.error(`The data attribute "data-${t}-options" could not be parsed to json: ${e.message}`)}return e}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(e){return e||(e=this.constructor.name),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.