1BX.Sotbit.B2C.components.BlogList=class{constructor(t){this.currentPageNumber=t.currentPageNumber,this.totalPageCount=t.totalPageCount,this.paginationQueryParameter=t.paginationQueryParameter,this.ajaxUrl=new URL(location),this.showMoreButton=document.querySelector('[data-entity="blog-show-more-button"]'),this.itemsContainer=document.querySelector('[data-entity="blog-items"]'),this.paginationContainers=document.querySelectorAll('[data-entity="blog-pagination"]'),this.slider=null,this.initSectionsSlider(),this.addEventListeners()}createSlider(){this.slider=BX.Sotbit.B2C.createSlider(".blog-list-sections .keen-slider",{slides:{perView:"auto",spacing:16},breakpoints:{"(max-width: 576px)":{slides:{perView:"auto",spacing:8}}}},"KeenSlider"),setTimeout((()=>this.slider.update()),0)}initSectionsSlider(){BX.Sotbit.B2C.isLaptop()&&this.createSlider(),window.addEventListener("resize",(()=>{BX.Sotbit.B2C.isLaptop()?this.slider||this.createSlider():this.slider&&(this.slider.destroy(),this.slider=null)}))}showNextPage(){this.currentPageNumber+1>this.totalPageCount||(this.showMoreButton.setAttribute("disabled","disabled"),this.showMoreButton.textContent=BX.message("LAZY_LOAD_LOADING"),this.ajaxUrl.searchParams.set(this.paginationQueryParameter,this.currentPageNumber+1),BX.ajax({url:this.ajaxUrl.href,emulateOnload:!1,onsuccess:t=>{if(!t)return this.showMoreButton.removeAttribute("disabled"),void(this.showMoreButton.textContent=BX.message("MESS_PAGER_SHOW_MORE"));const e=document.createElement("div");e.innerHTML=t,e.querySelectorAll('[data-entity="blog-item"]').forEach((t=>{this.itemsContainer.appendChild(t).classList.add("lazy-loaded")}));const i=e.querySelector('[data-entity="blog-pagination"]');i?this.paginationContainers.forEach((t=>t.innerHTML=i.innerHTML)):this.paginationContainers.forEach((t=>t.remove())),this.currentPageNumber++,this.showMoreButton.removeAttribute("disabled"),this.showMoreButton.textContent=BX.message("MESS_PAGER_SHOW_MORE"),this.currentPageNumber>=this.totalPageCount&&(this.showMoreButton.style.display="none")},onfailure:(...t)=>{console.error(...t),this.showMoreButton.removeAttribute("disabled"),this.showMoreButton.textContent=BX.message("MESS_PAGER_SHOW_MORE")}}))}addEventListeners(){this.showMoreButton?.addEventListener("click",this.showNextPage.bind(this))}}; 2//# sourceMappingURL=script.min.js.map
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.