1"use strict";(self.webpackChunkreagroup=self.webpackChunkreagroup||[]).push([[188],{9992(t,e,i){i.r(e);var s=i(8271);class r extends HTMLElement{constructor(t){return t=super(t),this.tabIndex=0,this._container=null,t}static get is(){return"blog-pagination"}static get AJAX_URL(){return`${window.location.origin}/wp/wp-admin/admin-ajax.php`}get page(){return this.hasAttribute("page")?parseInt(this.getAttribute("page")):0}set page(t){Number(t)?this.setAttribute("page",parseInt(t)):this.removeAttribute("page")}get count(){return this.hasAttribute("count")?parseInt(this.getAttribute("count")):0}set count(t){Number(t)?this.setAttribute("count",parseInt(t)):this.removeAttribute("count")}get perPage(){return this.hasAttribute("per-page")?parseInt(this.getAttribute("per-page")):6}set perPage(t){parseInt(t)?this.setAttribute("per-page",parseInt(t)):this.removeAttribute("per-page")}get loading(){return this.hasAttribute("loading")}set loading(t){Boolean(t)?this.setAttribute("loading",""):this.removeAttribute("loading")}get disabled(){return this.hasAttribute("disabled")}set disabled(t){Boolean(t)?this.setAttribute("disabled",""):this.removeAttribute("disabled")}get category(){return this.hasAttribute("category")?this.getAttribute("category"):""}set category(t){String(t.length)?this.setAttribute("category",t):this.removeAttribute("category")}get author(){return this.hasAttribute("author")?this.getAttribute("author"):""}set author(t){String(t.length)?this.setAttribute("author",t):this.removeAttribute("author")}connectedCallback(){this.addEventListener("click",this._handleClick,!1),this.addEventListener("keydown",this._handleKeyDown,!1),this.innerHTML+=r.LOADER}_handleClick(){this.loading=!0,this.disabled=!0,this.load()}_handleKeyDown(t){const e=t.which;e!==s.J.SPACE&&e!==s.J.ENTER||(t.preventDefault(),t.stopPropagation(),this.click())}_animate(){return new Promise((t,e)=>{this.animating=!0,this.$once("transitionend",()=>{t()}),setTimeout(()=>{t()},500)})}get _offset(){return(this.page-1)*this.perPage}_getResults(){return new Promise((t,e)=>{const i=new XMLHttpRequest,s=`action=load_blog_posts&page=${this.page}&offset=${this._offset}&category=${this.category}&author=${this.author}`;i.open("POST",r.AJAX_URL,!0),i.setRequestHeader("Content-type","application/x-www-form-urlencoded"),i.onload=t,i.onerror=e,i.send(s)})}load(){this._getResults().then(t=>{this._container=document.getElementById("blog-archive");const e=document.createElement("div");e.innerHTML=t.target.response,this._container.appendChild(e),this.loading=!1,this.$emit("checkanimations");let i=(this.page-1)*this.perPage,s=[...this._container.querySelectorAll(".c-card")];s[i]&&s[i].querySelector("a").focus(),this.page++,this.disabled=!1,(this.page-1)*this.perPage>=this.count&&this.remove()})}static get LOADER(){return'\n <div class="loader">\n <svg class="loader__icon" xmlns="http://www.w3.org/2000/svg" viewBox="21.73913043478261 21.73913043478261 43.47826086956522 43.47826086956522">\n <circle fill="transparent" cx="43.47826086956522" cy="43.47826086956522" r="20" stroke-width="3.4782608695652177" stroke-dasharray="125.664" stroke-dashoffset="125.66370614359172px" class="path"></circle>\n </svg>\n </div>\n '}}customElements.define(r.is,r)}}]); 2//# sourceMappingURL=blog-pagination.16df2315.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.