1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[73106],{3106(t,e,i){i.r(e),i.d(e,{default:()=>r});var s=i(3701),a=i(4156),n=i.n(a);class r extends s.A{static #t=this.options=n()(s.A.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(t=>{t.addEventListener("click",this.onChangePage.bind(this))})}onChangePage(t){t.preventDefault(),this.tempValue=this._getPageNumber(t.currentTarget.dataset.page),this._saveFocusState(t.currentTarget),this._pageChanged=!0,this.listing.changeListing(),this._updateCanonicalUrl(this.tempValue),this.tempValue=null}_saveFocusState(t){let e=t.closest(this.options.paginationNavSelector).dataset.paginationLocation;this.listing.options.scrollTopListingWrapper&&(e="top"),window.focusHandler.saveFocusState("listing-pagination",`[data-pagination-location="${e}"] [data-focus-id="${t.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(t){let e=!1;if(this.tempValue=1,t.p){let i=this._getPageNumber(t.p);i!==this.tempValue&&(this.tempValue=i,e=!0)}return e}_updateCanonicalUrl(t){let e=document.querySelector('link[rel="canonical"]');if(e?.href){let i=new URL(e.href);t>1?i.searchParams.set("p",t):i.searchParams.delete("p"),e.href=i.href}}_getPageNumber(t){let e=parseInt(t,10);return Number.isInteger(e)?e:1}}},3701(t,e,i){i.d(e,{A:()=>a});var s=i(4335);class a 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._setReady(),this._preventDropdownClose()}_setReady(){this.el.removeAttribute("aria-busy"),this.el.querySelectorAll("[data-filter-loading]").forEach(t=>{t.removeAttribute("disabled"),t.removeAttribute("data-filter-loading")})}_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"'`)}}}}]);
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.