1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[40810,78970],{810(t,e,i){i.r(e),i.d(e,{default:()=>r});var s=i(8970),l=i(4156),n=i.n(l);class r extends s.default{static #t=this.options=n()(s.default.options,{maxPoints:5,snippets:{filterRatingActiveLabelStart:"Minimum",filterRatingActiveLabelEndSingular:"star",filterRatingActiveLabelEnd:"stars",disabledFilterText:"Filter not active",ariaLabel:"",ariaLabelCount:"",ariaLabelCountSingular:""}});getValues(){let t={},e=this.el.querySelector(`${this.options.checkboxSelector}:checked`);return this.currentRating=!!e&&e.value,this._updateCount(),t[this.options.name]=this.currentRating?this.currentRating.toString():"",t}setValuesFromUrl(t){let e=!1;return Object.keys(t).forEach(i=>{if(i===this.options.name){this.currentRating=t[i],this._updateCount();let s=this.el.querySelectorAll(this.options.checkboxSelector);s&&s.forEach(t=>{t.value===this.currentRating&&(t.checked=!0)}),e=!0}}),e}getLabels(){let t=this.el.querySelector(`${this.options.checkboxSelector}:checked`),e=!!t&&t.value,i=[];if(e){let t=this.options.snippets.filterRatingActiveLabelEnd;1===parseInt(e)&&(t=this.options.snippets.filterRatingActiveLabelEndSingular),i.push({label:`${this.options.snippets.filterRatingActiveLabelStart} 2 ${e}/${this.options.maxPoints} 3 ${t}`,id:"rating"})}else i=[];return i}refreshDisabledState(t){let e=t[this.options.name].max;if(e&&e>0){this.enableFilter(),this._disableInactiveFilterOptions(e);return}this.disableFilter()}_disableInactiveFilterOptions(t){this.el.querySelectorAll(this.options.checkboxSelector).forEach(e=>{!0!==e.checked&&(t>=e.value?this.enableOption(e):this.disableOption(e))})}reset(){this.resetAll()}_updateCount(){this.counter.textContent=this.currentRating?`(${this.currentRating}/${this.options.maxPoints})`:"",this._updateAriaLabel()}_updateAriaLabel(){if(this.options.snippets.ariaLabel){if(!this.currentRating){this.mainFilterButton.setAttribute("aria-label",this.options.snippets.ariaLabel);return}if(1===parseInt(this.currentRating)){this.mainFilterButton.setAttribute("aria-label",`${this.options.snippets.ariaLabel} (${this.options.snippets.ariaLabelCountSingular})`);return}this.mainFilterButton.setAttribute("aria-label",`${this.options.snippets.ariaLabel} (${this.options.snippets.ariaLabelCount.replace("%stars%",this.currentRating)})`)}}}},3701(t,e,i){i.d(e,{A:()=>l});var s=i(4335);class l extends s.A{static #t=this.options={parentFilterPanelSelector:".cms-element-product-listing-wrapper",dropdownSelector:".filter-panel-item-dropdown"};_init(){super._init(),this._validateMethods();let t=document.querySelector(this.options.parentFilterPanelSelector);this.listing=window.PluginManager.getPluginInstanceFromElement(t,"Listing"),this.listing.registerFilter(this),this._preventDropdownClose()}_preventDropdownClose(){let t=this.el.querySelector(this.options.dropdownSelector);t&&t.addEventListener("click",t=>{t.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"'`)}}},8970(t,e,i){i.r(e),i.d(e,{default:()=>r});var s=i(3701),l=i(4156),n=i.n(l);class r extends s.A{static #t=this.options=n()(s.A.options,{checkboxSelector:".filter-multi-select-checkbox",countSelector:".filter-multi-select-count",listItemSelector:".filter-multi-select-list-item",snippets:{disabledFilterText:"Filter not active",ariaLabel:"",ariaLabelCount:""},mainFilterButtonSelector:".filter-panel-item-toggle"});init(){this.selection=[],this.counter=this.el.querySelector(this.options.countSelector),this.mainFilterButton=this.el.querySelector(this.options.mainFilterButtonSelector),this._registerEvents()}_registerEvents(){this.el.querySelectorAll(this.options.checkboxSelector).forEach(t=>{t.addEventListener("change",this._onChangeFilter.bind(this))})}getValues(){let t=this.el.querySelectorAll(`${this.options.checkboxSelector}:checked`),e=[];t?t.forEach(t=>{e.push(t.id)}):e=[],this.selection=e,this._updateCount();let i={};return i[this.options.name]=e,i}getLabels(){let t=this.el.querySelectorAll(`${this.options.checkboxSelector}:checked`),e=[];return t?t.forEach(t=>{e.push({label:t.dataset.label,id:t.id})}):e=[],e}setValuesFromUrl(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=!1,i=t[this.options.name],s=i?i.split("|"):[],l=this.selection.filter(t=>!s.includes(t)),n=s.filter(t=>!this.selection.includes(t));return(l.length>0||n.length>
30)&&(e=!0),n.forEach(t=>{let e=this.el.querySelector(`[id="${t}"]`);e&&(e.checked=!0,this.selection.push(e.id))}),l.forEach(t=>{this.reset(t),this.selection=this.selection.filter(e=>e!==t)}),this._updateCount(),e}_onChangeFilter(){this.listing.changeListing(!0,{p:1})}reset(t){let e=this.el.querySelector(`[id="${t}"]`);e&&(e.checked=!1)}resetAll(){this.selection.filter=[];let t=this.el.querySelectorAll(`${this.options.checkboxSelector}:checked`);t&&t.forEach(t=>{t.checked=!1})}refreshDisabledState(t){let e=t[this.options.name];if(!e.entities||e.entities.length<1){this.disableFilter();return}this.enableFilter(),this._disableInactiveFilterOptions(e.entities.map(t=>t.id))}_disableInactiveFilterOptions(t){this.el.querySelectorAll(this.options.checkboxSelector).forEach(e=>{!0!==e.checked&&(t.includes(e.id)?this.enableOption(e):this.disableOption(e))})}disableOption(t){let e=t.closest(this.options.listItemSelector);e.classList.add("disabled"),e.setAttribute("title",this.options.snippets.disabledFilterText),t.disabled=!0}enableOption(t){let e=t.closest(this.options.listItemSelector);e.removeAttribute("title"),e.classList.remove("disabled"),t.disabled=!1}enableAllOptions(){this.el.querySelectorAll(this.options.checkboxSelector).forEach(t=>{this.enableOption(t)})}disableFilter(){let t=this.el.querySelector(this.options.mainFilterButtonSelector);t.classList.add("disabled"),t.setAttribute("disabled","disabled"),t.setAttribute("title",this.options.snippets.disabledFilterText)}enableFilter(){let t=this.el.querySelector(this.options.mainFilterButtonSelector);t.classList.remove("disabled"),t.removeAttribute("disabled"),t.removeAttribute("title")}_updateCount(){this.counter.textContent=this.selection.length?`(${this.selection.length})`:"",this._updateAriaLabel()}_updateAriaLabel(){if(this.options.snippets.ariaLabel){if(0===this.selection.length){this.mainFilterButton.setAttribute("aria-label",this.options.snippets.ariaLabel);return}this.mainFilterButton.setAttribute("aria-label",`${this.options.snippets.ariaLabel} (${this.options.snippets.ariaLabelCount.replace("%count%",this.selection.length.toString())})`)}}}}}]);
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.