1(()=>{"use strict";var e={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!==r},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(e,t){return!1!==t.clone&&t.isMergeableObject(e)?a(Array.isArray(e)?[]:{},e,t):e}function s(e,t,r){return e.concat(t).map(function(e){return i(e,r)})}function n(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,r,l){(l=l||{}).arrayMerge=l.arrayMerge||s,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=i;var c,u,h=Array.isArray(r);return h!==Array.isArray(e)?i(r,l):h?l.arrayMerge(e,r,l):(u={},(c=l).isMergeableObject(e)&&n(e).forEach(function(t){u[t]=i(e[t],c)}),n(r).forEach(function(t){(!o(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(o(e,t)&&c.isMergeableObject(r[t])?u[t]=(function(e,t){if(!t.customMerge)return a;var r=t.customMerge(e);return"function"==typeof r?r:a})(t,c)(e[t],r[t],c):u[t]=i(r[t],c))}),u)}a.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,r){return a(e,r,t)},{})},e.exports=a}},t={};function r(i){var s=t[i];if(void 0!==s)return s.exports;var n=t[i]={exports:{}};return e[i](n,n.exports,r),n.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var i=r(156),s=r.n(i);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 r=n.toUpperCamelCase(e,t);return n.lcFirst(r)}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 o{constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new CustomEvent(e,{detail:t,cancelable:r});return this.el.dispatchEvent(i),i}subscribe(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this,s=e.split("."),n=r.scope?t.bind(r.scope):t;if(r.once&&!0===r.once){let t=n;n=function(r){i.unsubscribe(e),t(r)}}return this.el.addEventListener(s[0],n),this.listeners.push({splitEventName:s,opts:r,cb:n}),!0}unsubscribe(e){arguments.length>1&&"function"==typeof arguments[1]&&console.warn(`[NativeEventEmitter] Unsubscribing by passing the subscriber function as a second argument is not supported. By default, all listeners for the event will be removed. Use a suffix (separated by a dot) on the event name when subscribing/unsubscribing to identify/target your specific listener only, e.g. "${e}.MyCustomPlugin"`);let t=e.split(".");return this.listeners=this.listeners.reduce((e,r)=>([...r.splitEventName].sort().toString()===t.sort().toString()?this.el.removeEventListener(r.splitEventName[0],r.cb):e.push(r),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 a{constructor(e,t={},r=!1){if(!(e instanceof Node)){console.warn(`There is no valid element given while trying to create a plugin instance for "${r}".`);return}this.el=e,this.$emitter=new o(this.el),this._pluginName=this._getPluginName(r),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(){}destroy(){}
1_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=n.toDashCase(this._pluginName),r=this.el.getAttribute(`data-${t}-config`);return r?window.PluginConfigManager.get(this._pluginName,r):e}_getOptionsFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=n.toDashCase(this._pluginName),r=this.el.getAttribute(`data-${t}-options`);if(r)try{return JSON.parse(r)}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}}class l{constructor(){this._request=null,this._errorHandlingInternal=!1}get(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",i=this._createPreparedRequest("GET",e,r);return this._sendRequest(i,null,t)}post(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";i=this._getContentType(t,i);let s=this._createPreparedRequest("POST",e,i);return this._sendRequest(s,t,r)}delete(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";i=this._getContentType(t,i);let s=this._createPreparedRequest("DELETE",e,i);return this._sendRequest(s,t,r)}patch(e,t,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";i=this._getContentType(t,i);let s=this._createPreparedRequest("PATCH",e,i);return this._sendRequest(s,t,r)}
1abort(){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,r){return this._registerOnLoaded(e,r),e.send(t),e}_getContentType(e,t){return e instanceof FormData&&(t=!1),t}_createPreparedRequest(e,t,r){return this._request=new XMLHttpRequest,this._request.open(e,t),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),r&&this._request.setRequestHeader("Content-type",r),this._request}}class c{static isNode(e){return"object"==typeof e&&null!==e&&(e===document||e===window||e instanceof Node)}static hasAttribute(e,t){if(!c.isNode(e))throw Error("The element must be a valid HTML Node!");return"function"==typeof e.hasAttribute&&e.hasAttribute(t)}static getAttribute(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!1===c.hasAttribute(e,t))throw Error(`The required property "${t}" does not exist!`);if("function"!=typeof e.getAttribute){if(r)throw Error("This node doesn't support the getAttribute function!");return}return e.getAttribute(t)}static getDataAttribute(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=t.replace(/^data(|-)/,""),s=n.toLowerCamelCase(i,"-");if(!c.isNode(e)){if(r)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===e.dataset){if(r)throw Error("This node doesn't support the dataset attribute!");return}let o=e.dataset[s];if(void 0===o){if(r)throw Error(`The required data attribute "${t}" does not exist on ${e}!`);return o}return n.parsePrimitive(o)}static querySelector(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!c.isNode(e))throw Error("The parent node is not a valid HTML Node!");let i=e.querySelector(t)||!1;if(r&&!1===i)throw Error(`The required element "${t}" does not exist in parent node!`);return i}static querySelectorAll(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!c.isNode(e))throw Error("The parent node is not a valid HTML Node!");let i=e.querySelectorAll(t);if(0===i.length&&(i=!1),r&&!1===i)throw Error(`At least one item of "${t}" must exist in parent node!`);return i}static getFocusableElements(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=` 2 input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]), 3 select:not([tabindex^="-"]):not([disabled]), 4 textarea:not([tabindex^="-"]):not([disabled]), 5 button:not([tabindex^="-"]):not([disabled]), 6 a[href]:not([tabindex^="-"]):not([disabled]), 7 [tabindex]:not([tabindex^="-"]):not([disabled]) 8 `;return e.querySelectorAll(t)}static getFirstFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(e)[0]}static getLastFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=this.getFocusableElements(e);return t[t.length-1]}}let u=Object.freeze(new class{constructor(){this._domParser=new DOMParser}replaceFromMarkup(e,t){let r=e;"string"==typeof r&&(r=this._createMarkupFromString(r)),"string"==typeof t&&(t=[t]),this._replaceSelectors(r,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,r)=>{e.innerHTML&&(t[r].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 r=e.querySelectorAll(t),i=document.querySelectorAll(t);this.replaceElement(r,i)})}_createMarkupFromString(e){return this._domParser.parseFromString(e,"text/html")}});class h{static replaceFromMarkup(e,t){u.replaceFromMarkup(e,t)}static replaceElement(e,t){return u.replaceElement(e,t)}}let p="loader",d={BEFORE:"before",INNER:"inner"};class g{constructor(e,t=d.BEFORE){this.parent=e instanceof Element?e:document.body.querySelector(e),this.position=t}create(){if(!this.exists()){if(this.position===d.INNER){this._previousHTML=this.parent.innerHTML,this.parent.innerHTML=g.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),g.getTemplate())}}remove(){if(this.position===d.INNER){this.parent.innerHTML=this._previousHTML;return}this.parent.querySelectorAll(`.${p}
8`).forEach(e=>e.remove())}exists(){return this.parent.querySelectorAll(`.${p}`).length>0}_getPosition(){return this.position===d.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return`<div class="${p}" role="status"> 9 <span class="visually-hidden">Loading...</span> 10 </div>`}static SELECTOR_CLASS(){return p}}let m="element-loader-backdrop";class f extends g{static create(e){e.classList.add("has-element-loader"),f.exists(e)||(f.appendLoader(e),setTimeout(()=>{let t=e.querySelector(`.${m}`);t&&t.classList.add("element-loader-backdrop-open")},1))}static remove(e){e.classList.remove("has-element-loader");let t=e.querySelector(`.${m}`);t&&t.remove()}static exists(e){return e.querySelectorAll(`.${m}`).length>0}static getTemplate(){return` 11 <div class="${m}"> 12 <div class="loader" role="status"> 13 <span class="visually-hidden">Loading...</span> 14 </div> 15 </div> 16 `}static appendLoader(e){e.insertAdjacentHTML("beforeend",f.getTemplate())}}class b extends a{static #e=this.options={dataUrl:"",filterUrl:"",params:{},cmsProductListingSelector:".cms-element-review-listing",cmsProductListingWrapperSelector:".cms-element-review-listing-wrapper",scrollTopListingWrapper:!0,scrollOffset:15};init(){this._registry=[],this.httpClient=new l,this._urlFilterParams=Object.fromEntries(new URLSearchParams(window.location.search).entries()),this._cmsProductListingWrapper=c.querySelector(document,this.options.cmsProductListingWrapperSelector,!1),this._cmsProductListingWrapperActive=!!this._cmsProductListingWrapper,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)}registerFilter(e){this._registry.push(e)}_fetchValuesOfRegisteredFilters(){let e={};return this._registry.forEach(t=>{let r=t.getValues();Object.keys(r).forEach(t=>{Object.prototype.hasOwnProperty.call(e,t)?Object.values(r[t]).forEach(r=>{e[t].push(r)}):e[t]=r[t]})}),e}_mapFilters(e){let t={};return Object.keys(e).forEach(r=>{let i=e[r];Array.isArray(i)&&(i=i.join("|")),`${i}`.length&&(t[r]=i)}),t}_buildRequest(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this._fetchValuesOfRegisteredFilters(),i=this._mapFilters(r);this.options.params&&Object.keys(this.options.params).forEach(e=>{i[e]=this.options.params[e]}),Object.entries(t).forEach(e=>{let[t,r]=e;i[t]=r});let s=new URLSearchParams(i).toString();this.sendDataRequest(s),delete i.slots,delete i["no-aggregations"],delete i["reduce-aggregations"],delete i["only-aggregations"],s=new URLSearchParams(i).toString(),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"})}_updateHistory(e){window.history.pushState({},"",`${window.location.pathname}?${e}`)}sendDataRequest(e){this._cmsProductListingWrapperActive&&f.create(this._cmsProductListingWrapper),this.httpClient.get(`${this.options.dataUrl}?${e}`,e=>{this.renderResponse(e),this._cmsProductListingWrapperActive&&f.remove(this._cmsProductListingWrapper)})}renderResponse(e){h.replaceFromMarkup(e,this.options.cmsProductListingSelector,!1),this._registry.forEach(e=>{"function"==typeof e.afterContentChange&&e.afterContentChange()}),window.PluginManager.initializePlugins(),this.$emitter.publish("ReviewListing/afterRenderResponse",{response:e})}_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.changeListing(!1)}}class _ extends a{static #e=this.options={parentFilterPanelSelector:".cms-element-review-listing-wrapper",dropdownSelector:".filter-panel-item-dropdown"};
16_init(){super._init(),this._validateMethods();let e=c.querySelector(document,this.options.parentFilterPanelSelector);this.listing=window.PluginManager.getPluginInstanceFromElement(e,"ReviewListing"),this.listing.registerFilter(this),this._preventDropdownClose()}_preventDropdownClose(){let e=c.querySelector(this.el,this.options.dropdownSelector,!1);e&&e.addEventListener("click",e=>{e.stopPropagation()})}_validateMethods(){if("function"!=typeof this.getValues)throw Error(`[${this._pluginName}] Needs the method "getValues"'`);if("function"!=typeof this.getLabels)throw Error(`[${this._pluginName}] Needs the method "getLabels"'`);if("function"!=typeof this.reset)throw Error(`[${this._pluginName}] Needs the method "reset"'`);if("function"!=typeof this.resetAll)throw Error(`[${this._pluginName}] Needs the method "resetAll"'`)}}class y extends _{static #e=this.options=s()(_.options,{page:1,paginationItemSelector:".pagination .page-link",paginationNavSelector:".pagination-nav"});init(){this._initButtons(),this.tempValue=null,this._pageChanged=!1}_initButtons(){this.buttons=this.el.querySelectorAll(this.options.paginationItemSelector),this.buttons&&this._registerButtonEvents()}_registerButtonEvents(){this.buttons.forEach(e=>{e.addEventListener("click",this.onChangePage.bind(this))})}onChangePage(e){e.preventDefault(),this.tempValue=e.currentTarget.dataset.page,this._saveFocusState(e.currentTarget),this._pageChanged=!0,this.listing.changeListing(),this.tempValue=null}_saveFocusState(e){let t=e.closest(this.options.paginationNavSelector).dataset.paginationLocation;this.listing.options.scrollTopListingWrapper&&(t="top"),window.focusHandler.saveFocusState("listing-pagination",`[data-pagination-location="${t}"] [data-focus-id="${e.dataset.focusId}"]`)}_resumeFocusState(){window.focusHandler.resumeFocusState("listing-pagination",{preventScroll:!0})}reset(){}resetAll(){}getValues(){return null!==this.tempValue?{p:this.tempValue}:{p:1}}afterContentChange(){this._initButtons(),this.buttons&&this._pageChanged&&this._resumeFocusState(),this._pageChanged=!1}getLabels(){return[]}setValuesFromUrl(e){let t=!1;return this.tempValue=1,e.p&&parseInt(e.p)!==parseInt(this.tempValue)&&(this.tempValue=parseInt(e.p),t=!0),t}}let v=window.PluginManager;v.register("ReviewListing",b,"[data-review-listing]"),v.register("ListingPaginationPlugin",y,"[data-review-listing-pagination]")})();
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.