PageSourceSearch

https://www.bluebrixx.com/theme/e340cb262eb70dd6c8797f1426220131/j…ixx.eseom-extended-listing.plugin.a596c4.js

js bluebrixx.com collected 2026-10-02 04:50:22 UTC 14,132 bytes, 19 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[16740],{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 r(e,t){return!1!==t.clone&&t.isMergeableObject(e)?n(Array.isArray(e)?[]:{},e,t):e}function s(e,t,i){return e.concat(t).map(function(e){return r(e,i)})}function a(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function l(e,t){try{return t in e}catch(e){return!1}}function n(e,i,o){(o=o||{}).arrayMerge=o.arrayMerge||s,o.isMergeableObject=o.isMergeableObject||t,o.cloneUnlessOtherwiseSpecified=r;var c,h,u=Array.isArray(i);return u!==Array.isArray(e)?r(i,o):u?o.arrayMerge(e,i,o):(h={},(c=o).isMergeableObject(e)&&a(e).forEach(function(t){h[t]=r(e[t],c)}),a(i).forEach(function(t){(!l(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(l(e,t)&&c.isMergeableObject(i[t])?h[t]=(function(e,t){if(!t.customMerge)return n;var i=t.customMerge(e);return"function"==typeof i?i:n})(t,c)(e[t],i[t],c):h[t]=r(i[t],c))}),h)}n.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,i){return n(e,i,t)},{})},e.exports=n},740:(e,t,i)=>{i.r(t),i.d(t,{default:()=>c});var r=i(335),s=i(68);let a=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),r=document.querySelectorAll(t);this.replaceElement(i,r)})}_createMarkupFromString(e){return this._domParser.parseFromString(e,"text/html")}});class l{static replaceFromMarkup(e,t){a.replaceFromMarkup(e,t)}static replaceElement(e,t){return a.replaceElement(e,t)}}var n=i(59);class o extends r.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",resetAllFilterButtonClasses:"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};init(){this._registry=[],this.httpClient=new s.A,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=n.A.debounce(this.sendDisabledFiltersRequest.bind(this),100),this._registerEvents()}refreshRegistry(){let e=this._registry.filter(e=>document.body.contains(e.el));this.init(),this._registry=e,window.PluginManager.initializePlugins()}
1changeListing(){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();Object.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 r=e[i];Array.isArray(r)&&(r=r.join("|")),`${r}`.length&&(t[i]=r)}),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(),r=this._mapFilters(i);this._filterPanelActive&&(this._showResetAll=!!Object.keys(r).length),this.options.params&&Object.keys(this.options.params).forEach(e=>{r[e]=this.options.params[e]}),Object.entries(t).forEach(e=>{let[t,i]=e;r[t]=i});let s=new URLSearchParams(r);this.sendDataRequest(s),delete r.slots,delete r["no-aggregations"],delete r["reduce-aggregations"],delete r["only-aggregations"],s=new URLSearchParams(r),e&&this._updateHistory(s),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)}_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">&times;</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}
16" 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);this.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){l.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(){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)}_buildUrl(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.location.origin,r=new URL(e,i);return t.size>0&&t.forEach((e,t)=>{r.searchParams.append(t,e)}),r.toString()}}class c extends o{renderResponse(e){document.querySelector(".number-of-active-filters")&&(document.querySelector(".filter-panel .filter-panel-active-container .filter-active")?document.querySelector(".number-of-active-filters").innerHTML=document.querySelectorAll(".filter-panel .filter-panel-active-container .filter-active").length:document.querySelector(".number-of-active-filters").innerHTML="0"),super.renderResponse(e)}}},59:(e,t,i)=>{i.d(t,{A:()=>r});class r{static debounce(e,t){let i,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){for(var s=arguments.length,a=Array(s),l=0;l<s;l++)a[l]=arguments[l];r&&!i&&setTimeout(e.bind(e,...a),0),clearTimeout(i),i=setTimeout(e.bind(e,...a),t)}}}},335:(e,t,i)=>{i.d(t,{A:()=>n});var r=i(156),s=i.n(r);class a{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=a.toUpperCamelCase(e,t);return a.lcFirst(i)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>a.ucFirst(e.toLowerCase())).join(""):a.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}var l=i(308);class n{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 l.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(){}
19_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()),s().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=a.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=a.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.