1!function(){const e="review_page",t=()=>{const t=new URLSearchParams(window.location.search),a=parseInt(t.get(e),10);return Number.isNaN(a)||a<1?1:a},a=t=>{const a=new URL(window.location.href);return t<=1?a.searchParams.delete(e):a.searchParams.set(e,t),a.toString()},n=(e,t,n)=>{const s=(e=>{const t=e.querySelector(".wcn-gmb-reviews-pagination__list");if(t)return t;const a=document.createElement("ul");return a.className="wcn-gmb-reviews-pagination__list",e.appendChild(a),a})(e);if(s.innerHTML="",n<=1)return void e.classList.add("is-hidden");e.classList.remove("is-hidden");const r="false"!==e.dataset.showPrevNext,o="false"!==e.dataset.showNumbers,i=e.dataset.prevLabel||"Previous",l=e.dataset.nextLabel||"Next",c=(e,t,n={})=>{const r=document.createElement("li");r.className="wcn-gmb-reviews-pagination__item",n.isCurrent&&r.classList.add("is-current"),n.isDisabled&&r.classList.add("is-disabled");const o=document.createElement("a");o.className="wcn-gmb-reviews-pagination__link",o.href=a(e),o.dataset.page=e,o.textContent=t,n.isCurrent&&o.setAttribute("aria-current","page"),n.isDisabled&&(o.setAttribute("aria-disabled","true"),o.tabIndex=-1),r.appendChild(o),s.appendChild(r)};if(r&&c(t-1,i,{isDisabled:1===t}),o){const e=((e,t)=>{if(t<=7)return Array.from({length:t},(e,t)=>t+1);const a=[1],n=Math.max(2,e-2),s=Math.min(t-1,e+2);n>2&&a.push("ellipsis");for(let e=n;e<=s;e+=1)a.push(e);return s<t-1&&a.push("ellipsis"),a.push(t),a})(t,n);e.forEach(e=>{"ellipsis"!==e?c(e,String(e),{isCurrent:e===t}):(()=>{const e=document.createElement("li");e.className="wcn-gmb-reviews-pagination__ellipsis",e.textContent="...",s.appendChild(e)})()})}r&&c(t+1,l,{isDisabled:t===n})},s=(e,t)=>{let a=t;return a||(a=e.querySelector(".reviews-loop__loader")),a||(a=(()=>{const e=document.createElement("div");e.className="reviews-loop__loader",e.setAttribute("role","status"),e.setAttribute("aria-live","polite");const t=document.createElement("span");t.className="reviews-loop__spinner",t.setAttribute("aria-hidden","true");const a=document.createElement("span");return a.className="screen-reader-text",a.textContent="Loading reviews...",e.appendChild(t),e.appendChild(a),e})()),e.contains(a)||e.prepend(a),a},r=e=>{const r=e.querySelector(".wcn-gmb-reviews-pagination"),o=e.querySelector(".reviews-loop__items");if(!r||!o)return null;const i=e.dataset.wcnGmbLocationId||"",l=e.dataset.wcnGmbLocationIds||"";let c=[];if(l)try{const e=JSON.parse(l);Array.isArray(e)&&(c=e.map(e=>"string"==typeof e?e.trim():String(e)).filter(Boolean))}catch(e){console.error(e)}0===c.length&&i&&(c=[i]);const d=e.dataset.wcnGmbTemplate||"",p=e.dataset.wcnGmbTemplateHash||"",u=parseInt(e.dataset.wcnGmbPerPage,10)||0,m=parseInt(e.dataset.wcnGmbTotal,10)||0;if(0===c.length||!d||!p)return null;const w={loopEl:e,paginationEl:r,itemsContainer:o,locationIds:c,template:d,templateHash:p,perPage:u,total:m,currentPage:null,requestId:0,loaderEl:null};w.loaderEl=s(w.itemsContainer,w.loaderEl);const g=async(e,r={})=>{const o=Math.max(1,e);w.requestId+=1;const i=w.requestId;!1!==r.showLoading&&(w.loopEl.classList.add("is-loading"),w.itemsContainer.setAttribute("aria-busy","true")),r.scrollToTop&&((e,t=0)=>{if(!e||"function"!=typeof e.scrollIntoView)return;const a=window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,n=e.getBoundingClientRect(),s=window.pageYOffset||document.documentElement.scrollTop||0,r=Math.max(0,n.top+s-t);window.scrollTo({top:r,behavior:a?"auto":"smooth"})})(w.loopEl,r.scrollOffset||0);try{const e=await(async(e,t)=>{const a=`${window.wcnGmbBlocks&&window.wcnGmbBlocks.restUrl?window.wcnGmbBlocks.restUrl.replace(/\/$/,""):"/wp-json/wcn/v1"}/wcn-gmb-reviews-page`,n={locationIds:e.locationIds,perPage:e.perPage,page:t,template:e.template,hash:e.templateHash},s=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!s.ok)throw new Error(`Request failed with status ${s.status}`);return s.json()})(w,o);if(i!==w.requestId)return;if(!e||e.code||!1===e.success)return;w.itemsContainer.innerHTML=e.html||"",w.loaderEl=s(w.itemsContainer,w.loaderEl),w.total=Number.isFinite(e.total)?e.total:0,w.currentPage=Number.isFinite(e.page)?e.page:o,w.perPage=Number.isFinite(e.perPage)?e.perPage:w.perPage,n(w.paginationEl,w.currentPage,Number.isFinite(e.totalPages)?e.totalPages:1),!1!==r.updateUrl&&w.currentPage!==t()&&window.history.pushState({},"",a(w.currentPage))}catch(e){console.error(e)}finally{i===w.requestId&&(w.loopEl.classList.remove("is-loading"),w.itemsContainer.removeAttribute("aria-busy"))}};r.addEventListener("click",e=>{const t=e.target.closest("a[data-page]");if(!t)return;const a=parseInt(t.dataset.page,10);Number.isNaN(a)||a<1||a===w.currentPage?e.preventDefault():(e.preventDefault(),g(a,{updateUrl:!0,scrollToTop:!0,scrollOffset:100}))});const h=t();return n(w.paginationEl,h,Math.max(1,Math.ceil(w.total/Math.max(1,w.perPage)))),g(h,{updateUrl:!1,showLoading:!1}),{loadPage:g}};document.addEventListener("DOMContentLoaded",()=>{const e=Array.from(document.querySelectorAll(".reviews-loop")).map(r).filter(
1Boolean);0!==e.length&&window.addEventListener("popstate",()=>{const a=t();e.forEach(e=>{e.loadPage(a,{updateUrl:!1})})})})}();
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.