1var rpi=rpi||{}; 2rpi.Time={getFormatTime:function(a,b,d){a=new Date(this._ms(a));var t=d||"en";d=function(n){return 10>n?"0"+n:""+n};var m=a.getHours(),h=((new Intl.DateTimeFormat(t,{day:"numeric",month:"short"})).formatToParts(a).find(function(n){return"month"===n.type})||{}).value;t=(new Intl.DateTimeFormat(t,{day:"numeric",month:"long"})).formatToParts(a).find(function(n){return"month"===n.type}).value;var g=a.getFullYear(),l=String(g).slice(-2),p={yyyy:g,Y:g,yy:l,y:l,MMMM:t,MMM:h,M:h,MM:d(a.getMonth()+1),m:d(a.getMonth()+ 31),dd:d(a.getDate()),d:d(a.getDate()),HH:d(m),H:m,hh:d(m%12||12),h:m%12||12,mm:d(a.getMinutes()),i:d(a.getMinutes()),ss:d(a.getSeconds()),s:d(a.getSeconds()),a:12<=m?"pm":"am",A:12<=m?"PM":"AM"};return b.replace(/(MMMM|MMM|yyyy|HH|hh|MM|mm|dd|ss|yy|H|h|M|m|d|Y|y|i|s|a|A)/g,n=>null!=p[n]?p[n]:n)},getTimeAgo:function(a,b){a=(this._ms(a)-Date.now())/1E3;var d=Math.abs(a);b=new Intl.RelativeTimeFormat(b||"en",{numeric:"auto"});return 60>d?b.format(Math.round(a),"second"):3600>d?b.format(Math.round(a/ 460),"minute"):86400>d?b.format(Math.round(a/3600),"hour"):2592E3>d?b.format(Math.round(a/86400),"day"):31536E3>d?b.format(Math.round(a/2592E3),"month"):b.format(Math.round(a/31536E3),"year")},_ms:function(a){a=parseInt(a,10);return 1E10>a?1E3*a:a}};rpi=rpi||{}; 5rpi.Utils={__:function(a,b){return b&&b[a]||a},isVisible:function(a){let b=window.getComputedStyle(a);return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)&&"hidden"!==b.visibility&&"none"!==b.display},isInViewport:function(a,b=0){a=a.getBoundingClientRect();return a.top<window.innerHeight*(1+b)&&a.bottom>-window.innerHeight*b&&a.left<window.innerWidth*(1+b)&&a.right>-window.innerWidth*b},isRTL:function(){return"rtl"==(window.getComputedStyle?window.getComputedStyle(document.body,null).getPropertyValue("direction"): 6document.body.currentStyle.direction)},getParent:function(a,b="rplg"){b=Array.isArray(b)?b:[b];return a?a.closest("."+b.join(",.")):null},lang:function(){var a=navigator;return(a.language||a.systemLanguage||a.userLanguage||"en").substr(0,2).toLowerCase()},popup:function(a,b,d){var t=document.documentElement;a=window.open(a,"","scrollbars=yes, width="+b+", height="+d+", top="+((window.innerHeight?window.innerHeight:t.clientHeight?t.clientHeight:screen.height)/2-d/2+(void 0!=window.screenTop?window.screenTop: 7window.screenY))+", left="+((window.innerWidth?window.innerWidth:t.clientWidth?t.clientWidth:screen.width)/2-b/2+(void 0!=window.screenLeft?window.screenLeft:window.screenX)));window.focus&&a.focus();return a},ajax:function(a,b,d,t){const m=new XMLHttpRequest;m.open(b,a,!0);m.setRequestHeader("Content-Type","application/json");m.onreadystatechange=function(){if((m.readyState===XMLHttpRequest.DONE||m.readyState===m.DONE)&&200===m.status){const h=JSON.parse(m.responseText);"function"===typeof t?t(h): 8"function"===typeof d&&d(h)}};m.send(d&&"function"!==typeof d?JSON.stringify(d):null)},anchor:function(a,b,d,t,m){const h=[];d.open_link&&h.push("noopener");d.nofollow_link&&h.push("nofollow");return'<a href="'+a+'"'+(t?' class="'+t+'"':"")+(d.open_link?' target="_blank"':"")+(h.length?' rel="'+h.join(" ")+'"':"")+(m?' aria-label="'+m+'"':"")+">"+b+"</a>"},rm:function(a){a&&a.parentNode&&a.parentNode.removeChild(a)},capit:function(a){return a.charAt(0).toUpperCase()+a.slice(1)},url:function(a){try{return(new URL(a, 9window.location.origin)).href}catch(b){return""}},clear:function(){this.rm(document.getElementById("rpi-style"));if(rpi.Instances)for(;rpi.Instances.length;)rpi.Instances.pop().clear()}};rpi=rpi||{}; 10rpi.Column=function(a,b,d){const t=a.getAttribute("data-id"),m=new RegExp(d.col+"-[xsml]+"),h=new RegExp((t?'\\[data-id="'+t+'"\\]\\s+':"")+"\\."+d.card+"\\{--col:\\d+!important;--gap:\\d+!important\\}"),g=a.getElementsByClassName(d.cnt)[0];var l=null;return l={init:function(p,n){rpi.Utils.isVisible(g)?(p&&p(),l.resize(),window.addEventListener("resize",l.resize),n&&n(),rpi.Instances=rpi.Instances||[],rpi.Instances.push(l)):setTimeout(l.init,300)},resize:function(){let p=l.getSize();g.className=g.className.replace(m, 11d.col+"-"+p);if(b.breakpoints){let n=g.offsetWidth,c=b.breakpoints.split(",");c.sort(l.brsort);for(let e=0;e<c.length;e++){let k=c[e].split(":");if(n<parseInt(k[0])){l.setCol(k[1]);break}}}return p},getSize:function(){let p=g.offsetWidth;return 510>p?"xs":750>p?"x":1050>p?"s":1450>p?"m":1800>p?"l":"xl"},setCol:function(p){const n=this.getStyle();p=(t?'[data-id="'+t+'"] ':"")+"."+d.card+"{--col:"+p+"!important;--gap:"+(p-1)+"!important}";h.test(n.innerHTML)?n.innerHTML=n.innerHTML.replace(h,p):n.innerHTML+= 12p},getCol:function(){let p=this.getStyle().innerHTML.match(/--col:\s*(\d+)/);return p&&1<p.length?p[1]:!1},getStyle:function(){let p=document.getElementById("rpi-style");p||(p=document.createElement("style"),p.id="rpi-style",document.head.appendChild(p));return p},setBreakpoints:function(p){b.breakpoints=p},brsort:function(p,n){return parseInt(p.split(":")[0])>parseInt(n.split(":")[0])?1:-1},clear:function(){window.removeEventListener("resize",l.resize)}}};rpi=rpi||{};rpi.AVA="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"; 13rpi.Common=function(a,b,d){let t=null;const m=rpi.Utils.lang();
13return t={init(){let h=a.getElementsByClassName(d.time),g=a.getElementsByClassName(d.text);for(const l of h)t.setTime(l);for(const l of g)t.setText(l)},initOnce(h){let g=h.getElementsByClassName(d.time)[0];h=h.getElementsByClassName(d.text)[0];t.setTime(g);t.setText(h)},setText(h){if(h&&h.textContent){var g=t.trimtext(h.textContent);h.textContent=g[0];g[1]&&(h.appendChild(rpi.el({tag:"span",cl:"rpi-s",text:"... "})),h.appendChild(rpi.el({tag:"span", 14cl:d.readmore,text:rpi.Utils.__("read more",b.trans),data:{hidden:g[1]}})),h.lastChild.onclick=t.opentext)}},trimtext(h){const g=parseInt(b.text_size,10);if(!h||!g||h.length<=g)return[h||"",""];h=Array.from(h);let l=h.slice(0,g).join("").lastIndexOf(" ");l=-1===l?g:l;return[h.slice(0,l).join("").trimEnd(),h.slice(l).join("")]},opentext(){let h=this.parentNode,g=this.dataset.hidden||"";rpi.Utils.rm(this.previousElementSibling);rpi.Utils.rm(this);h.appendChild(document.createTextNode(g))},setTime(h){h&& 15(h.textContent=t.time(h.dataset.time))},time(h){return b.time_format?rpi.Time.getFormatTime(h,b.time_format,m):rpi.Time.getTimeAgo(h,m)}}}; 16rpi.el=function(a={},...b){const d=document.createElement("string"===typeof a?a:a.tag||"div");"string"!==typeof a&&(a.id&&(d.id=a.id),a.cl&&d.classList.add(...[].concat(a.cl).join(" ").split(/\s+/).filter(Boolean)),null!=a.text&&(d.textContent=a.text),a.data&&Object.assign(d.dataset,Object.fromEntries(Object.entries(a.data).filter(([,t])=>void 0!==t&&null!==t))),a.style&&(d.style.cssText=a.style),a.atts&&Object.keys(a.atts).forEach(t=>{const m=a.atts[t];null!==m&&void 0!==m&&!1!==m&&d.setAttribute(t, 17m)}),a.html&&(d.innerHTML=a.html),b=a.children?[].concat(a.children).concat(b):b);b.flat().forEach(t=>{t&&d.appendChild(t instanceof Node?t:document.createTextNode(String(t)))});return d};window.brb_vars=window.brb_vars||{ajaxurl:"/wp-admin/admin-ajax.php",gavatar:""};rpi=rpi||{}; 18rpi.View=function(a,b={},d={}){const t=b.id??a.getAttribute("data-id");a.getElementsByClassName("rpi-cnt");const m=a.getElementsByClassName("rpi-header")[0],h=a.getElementsByClassName(d&&d.names&&d.names.content||"rpi-content")[0],g=h?h.getElementsByClassName(d&&d.names&&d.names.cards||"rpi-cards")[0]:null,l=a.getElementsByClassName("rpi-url")[0],p=rpi.Media(a);var n=null;return n={media:p,boot(){d.cb&&d.cb.pre&&d.cb.pre();rpi.Utils.ajax(n.getAjaxUrl({act:"widget"}),"POST",function(c){g.setAttribute("data-offset", 19c.offset);g.setAttribute("data-count",c.count);c.bizs&&n.addBusiness(c.bizs[0],c.options);n.addReviews(c,[],function(e){n.initStyle();d.cb&&d.cb.post&&d.cb.post()})});n.initPagin()},init(){p.init();n.initStyle();n.initPagin()},initPagin(){l&&(l.onclick=function(){l.disabled=!0;n.loadNextReviews(b.pagination,function(c){n.delPaginBtn();d.cbp&&d.cbp(c);l.disabled=!1});return!1})},loadNextReviews(c,e){if(0<c){const k=[];c=parseInt(c);n.preloadReviews(k,c);n.loadAjaxReviews(k,c,e)}},preloadReviews(c, 20e){var k=parseInt(g.getAttribute("data-offset")),f=parseInt(g.getAttribute("data-count"));e=f-k>e?e:f-k;k=g.getElementsByClassName(d&&d.names&&d.names.card||"rpi-card");if(k.length){f=k.length-1;for(let u=0;u<e;u++){let y=k[Math.round(Math.random()*f)].cloneNode(!0);y.style="filter: blur(4px);";g.appendChild(y);c.push(y)}}},loadAjaxReviews(c,e,k){rpi.Utils.ajax(n.getAjaxUrl({act:"reviews",size:e}),"POST",function(f){g.setAttribute("data-offset",f.offset);g.setAttribute("data-count",f.count);n.addReviews(f, 21c,k)})},getAjaxUrl(c){return rpi.View.ajaxurl({...c,id:t,offset:c.offset??(g?parseInt(g.dataset.offset):0),...(d.filter?.bid&&{bid:d.filter.bid}),...(d.filter?.provider&&{provider:d.filter.provider})},b)},addBusiness(c,e){m.getElementsByClassName("rpi-cards")[0].appendChild(n.createRating(c,e))},createRating(c,e){return rpi.el({cl:"rpi-card",data:{provider:c.provider}},n.ratingInner(c,e))},ratingInner(c,e){var k=rpi.el({cl:"rpi-info",children:[!e.header_hide_scale&&rpi.el({cl:"rpi-scale",text:n.scale(c)}), 22!e.header_hide_name&&rpi.el({tag:"a",cl:"rpi-name",atts:{href:c.url},text:c.name}),rpi.View.stars(c.rating,c.provider,!0),!e.header_hide_count&&n.based(c)]});k=rpi.el({cl:"rpi-flex",children:[!e.header_hide_photo&&rpi.el({cl:"rpi-img-wrap"},n.bizPhoto(c)),k]});return rpi.el({cl:["rpi-card-inner rpi-flexwrap rpi-logo","rpi-logo-"+c.provider],children:[k,(!e.header_hide_seeall||!e.header_hide_write)&&n.ratingBtns(c,e)]})},scale(c){return 4.2<c.rating?rpi.Utils.__("Excellent",b.trans):3.7<c.rating?rpi.Utils.__("Great", 23b.trans):2.7<c.rating?rpi.Utils.__("Good",b.trans):1.7<c.rating?rpi.Utils.__("Fair",b.trans):rpi.Utils.__("Poor",b.trans)},based(c){return rpi.el({cl:"rpi-based",text:rpi.Utils.__("Based on %s reviews",b.trans).replace("%s",c.total||c.review_count)})},bizPhoto(c,e=""){return rpi.el({tag:"img",cl:"rpi-img",atts:{loading:"lazy",alt:e,...(c.photo?{src:c.photo}:{})}})},ratingBtns(c,e){const k=rpi.el({cl:"rpi-slider-btn"});e.header_hide_seeall||k.appendChild(rpi.el({cl:"rpi-review_us rpi-clickable",children:rpi.el({tag:"a", 24atts:{target:"_blank",rel:"noopener",href:rpi.View.allReviewsUrl(c)},text:rpi.Utils.__("See all reviews",b.trans)})}));if(!e.header_hide_write){const f=rpi.View.writeReviewUrl(c);c=rpi.el({tag:"a",cl:["rpi-logo_after","rpi-logo-"+c.provider],atts:{target:"_blank",rel:"noopener",href:f},text:rpi.Utils.__("review us on",b.trans)});c.addEventListener("click",function(u){u.preventDefault();rpi.Utils.popup(f,800,600)});k.appendChild(rpi.el({cl:"rpi-review_us rpi-clickable"},c))}return k},addReviews(c, 25e,k){a.dataset.opts&&(b={...b,...(JSON.parse(a.dataset.opts)||{})});for(let f=0;f<c.reviews.length;f++){let u;d&&d.cb&&d.cb.createCard?u=d.cb.createCard(e.shift(),c.reviews[f]):(u=n.createCard(e.shift(),c.reviews[f]),d.common.initOnce(u),n.initReviewStyle(u,b),n.initLogoStyle(u,b.style_logo));e.length||g.appendChild(u)}for(;e.length;)rpi.Utils.rm(e.shift());p.init();n.delPaginBtn();k&&k(c)},createCard(c,e){c||=rpi.el({cl:"rpi-card"});c.setAttribute("data-rat",e.rating);c.setAttribute("data-provider", 26e.provider);c.textContent="";c.appendChild(n.reviewInner(e));c.style="";return c},reviewInner(c){const e=c.reply?c.reply.text||c.reply:null;var k=rpi.el({cl:"rpi-info",children:[!b.hide_name&&n.reviewName(c),!b.disable_review_time&&n.reviewTime(c),rpi.View.stars(c.rating,c.provider)]});k=rpi.el({cl:"rpi-flex",children:[!b.hide_avatar&&n.reviewAvatar(c),k]});const f=rpi.el({cl:"rpi-body"},rpi.el({cl:"rpi-text rpi-scroll",atts:{tabindex:"0"},text:(c.text??"")+" "}));c.media&&c.media.length&&f.appendChild(rpi.el({cl:"rpi-media"}, 27n.reviewMedia(c)));e&&f.appendChild(rpi.el({cl:"rpi-reply rpi-scroll",children:[rpi.el({tag:"b",text:rpi.Utils.__("Response from the owner",b.trans)+":"}),document.createTextNode(" "+e)]}));return rpi.el({cl:"rpi-card-inner",children:[rpi.el("i"),k,f]})},reviewTime(c){return rpi.el({cl:"rpi-time",data:c.time?{time:String(c.time)}:{}})},reviewName(c){const e=rpi.Utils.capit(c.provider)+" user",k=c.author_name?c.author_name:e;return c.author_url&&!b.disable_user_link?rpi.el({tag:"a",cl:"rpi-name",atts:{target:"_blank", 28rel:"noopener",href:rpi.Utils.url(c.author_url),"aria-label":e+" profile"},text:k}):rpi.el({cl:"rpi-name",text:k})},reviewAvatar(c){var e=c.author_avatar,k=a.style.getPropertyValue("--img-size");k=k?k.replace("px",""):b.reviewer_avatar_size||56;const f=b.hide_name&&c.author_name?c.author_name:"";switch(c.provider){case "google":(c=e&&e.match(/googleusercontent\.com\/([^\/]+)\/([^\/]+)\/([^\/]+)\/([^\/]+)\/photo\.jpg/))&&4<c.length&&"AAAAAAAAAAA"===c[3][0]&&(e=e.replace("/photo.jpg","/s128-c0x00000000-cc-rp-mo/photo.jpg")); 29e&&=/=.*s\d{2,3}/.test(e)?e.replace(/(=.*)s\d{2,3}/,"$1s"+k):-1<e.indexOf("-mo")?e.replace("-mo","-mo-s"+k):e.replace("-rp","-rp-s"
29+k);break;case "yelp":e&&=e.replace(/(ms)|(o)\.jpg/,128>=k?"ms":"o")}e=rpi.el({tag:"img",cl:"rpi-img",atts:{width:k,height:k,alt:f,...(b.lazy_load_img||void 0===b.lazy_load_img?{loading:"lazy"}:{}),...(e?{src:e}:{})}});e.addEventListener("error",function(){this.src!==brb_vars.gavatar&&(this.src=brb_vars.gavatar)});return rpi.el({cl:"rpi-img-wrap"},e)},reviewMedia(c){if(!c.media|| 30!c.media.length)return[];const e=a.style.getPropertyValue("--media-lines"),k=22*(e?e:2);return c.media.map(function(f){(f=f.thumbnailUrl||"")&&(f=f.replace(/(=.*)s\d{2,3}/,"$1s"+k));return rpi.el({tag:"img",cl:"rpi-thumb rpi-clickable",atts:{loading:"lazy",alt:"",...(f?{src:f}:{})}})})},reviewReply(c,e){let k=c.getElementsByClassName("rpi-reply")[0];k||(k=rpi.el({cl:"rpi-reply rpi-scroll"}),c.getElementsByClassName("rpi-body")[0].appendChild(k));k.innerHTML="";k.appendChild(rpi.el({tag:"b",text:rpi.Utils.__("Response from the owner", 31b.trans)+":"}));k.appendChild(document.createTextNode(" "+e))},initStyle(){a.dataset.opts&&(b={...b,...(JSON.parse(a.dataset.opts)||{})});if(m){var c=m.getElementsByClassName("rpi-card");for(var e=0;e<c.length;e++)this.initLogoStyle(c[e],b.head_logo),this.initYelpBasedLogo(c[e],b.head_logo)}if(h){c=g.getElementsByClassName("rpi-card");for(e=0;e<c.length;e++)this.initReviewStyle(c[e],b);this.initCtrlStyle(b);c=h.getElementsByClassName("rpi-card");for(e=0;e<c.length;e++)this.initLogoStyle(c[e],b.style_logo)}}, 32initYelpBasedLogo(c,e){5==e&&(c=c.getElementsByClassName("rpi-logo-yelp")[0])&&!c.textContent&&(c.classList.remove("rpi-logo"),c.classList.add("rpi-logo_after"))},initReviewStyle(c,e){let k=c.getElementsByClassName("rpi-card-inner")[0],f=c.getElementsByClassName("rpi-triangle")[0],u=c.getElementsByClassName("rpi-flex")[0],y=c.getElementsByClassName("rpi-img-wrap")[0],w=c.getElementsByClassName("rpi-info")[0],r=c.getElementsByClassName("rpi-time")[0],A=c.getElementsByClassName("rpi-name")[0],x=c.querySelector('[class^="rpi-star"]'), 33z=c.getElementsByClassName("rpi-body")[0],C=c.getElementsByClassName("rpi-text")[0],D=c.getElementsByClassName("rpi-reply")[0];A&&w.appendChild(A);r&&w.appendChild(r);x&&w.appendChild(x);c.className="rpi-card";k.className="rpi-card-inner";u.className="rpi-flex";z.className="rpi-body";f&&(f.className="rpi-triangle");switch(e.style_style){case void 0:case "1":case "7":k.appendChild(u);z&&k.appendChild(z);z.className+=" rpi-normal-up__body";break;case "2":case "8":z&&k.appendChild(z);k.appendChild(u); 34z.className+=" rpi-normal-down__body";break;case "3":f||(f=rpi.el("i"),k.appendChild(f));c.appendChild(u);c.appendChild(k);z&&k.appendChild(z);f.className="rpi-triangle rpi-triangle_up";u.className+=" rpi-bubble__flex rpi-bubble__flex_up";"none"!=this.getCssVar("--card-br")&&(f.className+=" rpi-triangle__br_up",k.className+=" rpi-bubble__inner rpi-bubble__inner_up");break;case "4":f||(f=rpi.el("i"),k.appendChild(f));c.appendChild(k);c.appendChild(u);z&&k.appendChild(z);f.className="rpi-triangle rpi-triangle_down"; 35u.className+=" rpi-bubble__flex rpi-bubble__flex_down";"none"!=this.getCssVar("--card-br")&&(f.className+=" rpi-triangle__br_down",k.className+=" rpi-bubble__inner rpi-bubble__inner_down");break;case "5":k.appendChild(u);u.appendChild(w);z&&w.appendChild(z);u.className+=" rpi-shift-up__flex";break;case "6":k.appendChild(u),u.appendChild(w),z&&w.prepend(z),u.className+=" rpi-shift-down__flex"}switch(e.style_style){case "7":c.className+=" rpi-avaborder-up";break;case "8":c.className+=" rpi-avaborder-down"}z&& 36D&&z.appendChild(D);if(x)switch(e.style_stars){case "1":r?(w.insertBefore(x,r),w.insertBefore(r,x)):A?(w.insertBefore(x,A),w.insertBefore(A,x)):w.appendChild(x);break;case "2":r?w.insertBefore(x,r):w.appendChild(x);break;case "3":A?w.insertBefore(x,A):r?w.insertBefore(x,r):w.prepend(x);break;case void 0:case "4":z?z.prepend(x):k.appendChild(x);break;case "5":C?C.prepend(x):z.appendChild(x);break;case "6":z?z.appendChild(x):k.appendChild(x)}if(y)switch(e.style_ava){case "1":u.appendChild(y);u.appendChild(w); 37break;case "2":u.appendChild(w),u.appendChild(y)}},initCtrlStyle(c){let e=h.getElementsByClassName("rpi-controls")[0];if(e)switch(e.className="rpi-controls",c.style_style){case "3":e.className+=" rpi-bubble-up__ctrl";break;case "4":e.className+=" rpi-bubble-down__ctrl"}},initLogoStyle(c,e){const k=c.getElementsByClassName("rpi-card-inner")[0],f=c.getAttribute("data-provider");if(f){var u=f.split(",");1<u.length?this.initLogoMultiple(c,k,u,e):this.initLogoSingle(c,k,f,e)}},initLogoSingle(c,e,k,f){let u; 38var y=["rpi-logo","rpi-logo-"+k];const w=[...y,"rpi-logo_after","rpi-logo-left"];[e,c.getElementsByClassName("rpi-body")[0],c.getElementsByClassName("rpi-scale")[0],c.getElementsByClassName("rpi-name")[0],c.getElementsByClassName("rpi-img-wrap")[0]].forEac
38h(r=>r&&r.classList.remove(...w));c.querySelectorAll("span.rpi-logo").forEach(r=>{r.classList.remove(...w);if(!r.className){for(;r.firstChild;)r.parentNode.insertBefore(r.firstChild,r);r.remove()}});switch(f){case "1":case "6":k=c.getElementsByClassName("rpi-body")[0]; 39"6"==f&&y.push("rpi-logo-left");e.classList.contains("rpi-bubble__inner")&&k?k.classList.add(...y):e.classList.add(...y);break;case "2":case "7":(e=c.getElementsByClassName(this.nameOrScale(f))[0])&&e.classList.add(...y);break;case "3":(y=c.getElementsByClassName("rpi-img-wrap")[0])&&y.classList.add(...["rpi-logo_after","rpi-logo-"+k]);break;case "4":e=c.querySelector('[class^="rpi-star"]');if(!e)break;u||=rpi.el("span");u.classList.add(...y);u.contains(e)||(e.replaceWith(u),u.appendChild(e));break; 40case "5":if(e=c.getElementsByClassName("rpi-based")[0])k=e.textContent.trim().match(/\d+/)[0],e.textContent=e.textContent.replace(k,k+" "),e.appendChild(rpi.el({tag:"span",cl:y}))}},initLogoMultiple(c,e,k,f){let u=c.getElementsByClassName("rpi-logos")[0];if(u){if(k=u.querySelector('[class^="rpi-star"]')){const y=c.getElementsByClassName("rpi-info")[0],w=c.getElementsByClassName("rpi-based")[0];y&&(w?y.insertBefore(k,w):y.appendChild(k))}}else u=this.createLogos(k);switch(f){case "0":case "3":rpi.Utils.rm(u); 41break;case "1":e.prepend(u);break;case "2":case "7":(c=c.getElementsByClassName(this.nameOrScale(f))[0])&&c.prepend(u);break;case "4":e=c.getElementsByClassName("rpi-info")[0];f=c.getElementsByClassName("rpi-based")[0];c=c.querySelector('[class^="rpi-star"]');
41if(!c)break;u.appendChild(c);f?e.insertBefore(u,f):e.appendChild(u);break;case "5":if(c=c.getElementsByClassName("rpi-based")[0])e=c.textContent.trim().match(/\d+/)[0],c.textContent=c.textContent.replace(e,e+" "),c.appendChild(u)}},nameOrScale:c=> 42"2"===c?"rpi-name":"rpi-scale",createLogos(c){return rpi.el({tag:"span",cl:"rpi-logos"},c.map(e=>n.logo(e)))},logo(c){return rpi.el({tag:"span",cl:["rpi-logo","rpi-logo-"+c]})},getCssVar(c){return a.style.getPropertyValue(c)},delPaginBtn(){if(l){const c=parseInt(g.getAttribute("data-offset")),e=parseInt(g.getAttribute("data-count"));c>=e&&rpi.Utils.rm(l)}}}}; 43Object.assign(rpi.View,{ajaxurl(a,b={}){if("function"===typeof b.api)return b.api(a);const {id:d,offset:t,bid:m,provider:h}=a;a=new URLSearchParams({action:"rpi_reviews",id:d,offset:t,size:a.size??b.pagination});m&&a.set("bid",m);h&&a.set("provider",h);return brb_vars.ajaxurl+"?"+a},allReviewsUrl(a){if(a.wr){let b=a.wr.split(":");a.id=b[1];a.provider=b[0]}switch(a.provider){case "google":return rpi.Utils.url("https://search.google.com/local/reviews?placeid="+a.id);case "facebook":return rpi.Utils.url("https://facebook.com/"+ 44a.id+"/reviews");case "yelp":return rpi.Utils.url(a.url)}},writeReviewUrl(a){if(a.wr){let b=a.wr.split(":");a.id=b[1];a.provider=b[0]}switch(a.provider){case "google":return rpi.Utils.url("https://search.google.com/local/writereview?placeid="+a.id);case "facebook":return rpi.Utils.url("https://facebook.com/"+a.id+"/reviews");case "yelp":return rpi.Utils.url("https://www.yelp.com/writeareview/biz/"+a.id)}},stars(a,b,d=!1){switch(b){case "facebook":return d?rpi.el({tag:"span",cl:"rpi-stars",style:"--rating:"+ 45a,text:a}):rpi.el({tag:"span",cl:"rpi-star-fb",data:{rating:a},text:(2>a?"doesn't ":"")+"recommends"});case "yelp":case "tripadvisor":return b=rpi.el({tag:"span",cl:"rpi-stars-"+b,data:{stars:Math.floor(2*a)/2}},Array.from({length:5},()=>rpi.el("i"))),d&&b.append(a),b;default:return rpi.el({tag:"span",cl:"rpi-stars",style:"--rating:"+a,text:d?a:null})}},starRating(a){return rpi.el({tag:"span",cl:"rpi-star",data:{rating:String(a)}})},sidebar(a,b){function d(e){e&&e.preventDefault();p.classList.remove("rpi-open"); 46c&&(c.classList.remove("rpi-open"),document.body.style.overflow="");g&&g.focus();return!1}const {id:t}=a,m=a.root||document.body,h=["rpi-sb"];"left"===a.pos&&h.push("rpi-left");let g,l=document.getElementById(t),p;l?p=l.getElementsByClassName("rpi-sb")[0]:(l=rpi.el({id:t,cl:"rpi"}),p=rpi.el({cl:h,atts:{role:"dialog","aria-modal":"true","aria-label":a.label||"Reviews"},html:'<div class="rpi-sbh"></div><div class="rpi-sbc"></div><button type="button" class="rpi-x" aria-label="Close"></button>'}),l.appendChild(p), 47m.appendChild(l),a.overlay&&m.appendChild(rpi.el({cl:"rpi-overlay"})));const n=p.getElementsByClassName("rpi-x")[0],c=m.querySelector(".rpi-overlay");n.addEventListener("click",d);c&&c.addEventListener("click",d);b&&b(p);return{rt:l,sb:p,toggle(e){p.classList.contains("rpi-open")?d():(g=e||null,p.classList.add("rpi-open"),c&&(c.classList.add("rpi-open"),document.body.style.overflow="hidden"),n.focus())}}},ajaxsb(a,b,d){const {id:t,bid:m,prov:h}=b.query,{data:g,...l}=b.options;d=["rpi-sb",t,m,h].filter(Boolean).join("_"); 48return rpi.View.sidebar({root:a,id:d,pos:l.badge_pos,overlay:l.overlay},p=>{rpi.Utils.ajax(rpi.View.ajaxurl(b.query,l),"POST",function(n){var c=p.getElementsByClassName("rpi-sbc")[0];const e=n.bizs??(g?g.bizs.find(f=>(!m||f.id===m)&&(!h||f.provider===h)):{}),k={};m&&(k.bid=m);h&&(k.provider=h);rpi.Layout(c,{id:t,data:{bizs:[e],...n},header_hide_scale:!0,header_hide_count:!0,autoplay:!1,...l,view_mode:l.tag_sidebar,cfg:{filter:k}}).render();n=p.getElementsByClassName("rpi-sbh")[0];c=c.getElementsByClassName("rpi-header")[0]; 49n.appendChild(c)})})}});rpi=rpi||{}; 50rpi.Media=function(a,b={},{root:d="rpi",card:t="rpi-card"}={}){let m,h=null,g=null;return g={init:function(){h=a.getElementsByClassName("rpi-thumb");for(let l=0;l<h.length;l++)h[l].setAttribute("data-idx",l),function(p,n){p.onclick=function(){g.show(p,n);return!1}}(h[l],l)},thumbs:function(l){if(Array.isArray(l)){var p=[];for(const n of l)l=document.createElement("img"),l.className="rpi-thumb rpi-clickable",l.src=n.thumbnailUrl,l.alt=rpi.Utils.__("Photo from customer review",b.trans),l.loading="lazy", 51p.push(l);return p}},clicks:function(l){l=l.getElementsByClassName("rpi-thumb");for(let p=0;p<l.length;p++)(function(n,c){n.onclick=function(){let e=parseInt(n.getAttribute("data-idx"));g.show(h[e],e);return!1}})(l[p],p)},show:function(l,p){if(!(0>p||p>=h.length)){var n=l.src.replace(/=s[0-9]{1,3}/g,"=s500");l=(l=rpi.Utils.getParent(l,[t,"rpi-review"]))?l.outerHTML:"";if(m){let c=m.querySelector(".rpi-lightbox-media img"),e=m.querySelector(".rpi-lightbox-review"),k=m.querySelector(".rpi-lightbox-prev"), 52f=m.querySelector(".rpi-lightbox-next");c.src=n;e.innerHTML!==l&&(e.innerHTML=l,g.clicks(e));k.onclick=function(u){g.show(h[p-1],p-1)};
52f.onclick=function(u){g.show(h[p+1],p+1)}}else m=document.createElement("div"),m.className="rpi-lightbox",m.innerHTML='<div class="rpi-x"></div><div class="rpi-lightbox-inner"><div class="rpi-lightbox-xxx"><div class="rpi-lightbox-content"><div class="rpi-lightbox-media"><div class="rpi-lightbox-btn rpi-lightbox-prev"></div><img src="'+n+'" alt=""><div class="rpi-lightbox-btn rpi-lightbox-next"></div></div><div class="'+ 53d+' rpi-lightbox-review">'+l+"</div></div></div></div>",n=m.querySelector(".rpi-x"),l=m.querySelector(".rpi-lightbox-prev"),next=m.querySelector(".rpi-lightbox-next"),n.onclick=function(){m.style.display="none"},m.onclick=function(c){m==c.target&&(m.style.display="none")},l.onclick=function(c){g.show(h[p-1],p-1)},next.onclick=function(c){g.show(h[p+1],p+1)},g.clicks(m),document.body.appendChild(m);m.style.display="flex"}}}};rpi=rpi||{}; 54rpi.Flash=function(a,b){if(b.data)a.appendChild(rpi.Flash.render(b));else{const d=a.getElementsByClassName("rpi-flash")[0];d&&d.dataset.opts&&(b={...b,...JSON.parse(d.dataset.opts)})}a=rpi.Flash.main(a,b);a.init();return a}; 55Object.assign(rpi.Flash,{LOGO:'<span style="position:relative;display:inline-block"><svg viewBox="0 0 1792 1792" width="44" height="44"><path d="M1728 647q0 22-26 48l-363 354 86 500q1 7 1 20 0 21-10.5 35.5t-30.5 14.5q-19 0-40-12l-449-236-449 236q-22 12-40 12-21 0-31.5-14.5t-10.5-35.5q0-6 2-20l86-500-364-354q-25-27-25-48 0-37 56-46l502-73 225-455q19-41 49-41t49 41l225 455 502 73q56 9 56 46z" fill="#FFAF02"></path></svg><svg width="25" height="25" viewBox="0 0 1792 1792" style="position:absolute;bottom:0;right:0;border:1px solid #fff;border-radius:50%;background:#fff"><path d="M1299 813l-422 422q-19 19-45 19t-45-19l-294-294q-19-19-19-45t19-45l102-102q19-19 45-19t45 19l147 147 275-275q19-19 45-19t45 19l102 102q19 19 19 45t-19 45zm141 83q0-148-73-273t-198-198-273-73-273 73-198 198-73 273 73 273 198 198 273 73 273-73 198-198 73-273zm224 0q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z" fill="#8cc976"></path></svg></span>',render(a){return rpi.el({cl:["rpi-flash", 56a.flash_hide_mobile?"rpi-flash-hide":""],children:this.wrap(a)})},wrap(a){return rpi.el({cl:["rpi-flash-wrap","right"==a.flash_pos?"rpi-flash-right":""],children:this.content(a)})},content(a){return rpi.el({cl:"rpi-flash-content",children:[rpi.el({cl:"rpi-flash-card",children:[this.story(),this.form(a)]}),rpi.el({cl:"rpi-x"})]})},story(){return rpi.el({cl:["rpi-flash-story","rpi-flex"],data:{idx:1}})},form(a){return rpi.el({cl:["rpi-flash-form","rpi-content"],children:[rpi.el({cl:"rpi-cards",data:{count:a.data.count, 57offset:a.data.reviews.length}}),rpi.el({style:"text-align:center",children:rpi.el({tag:"a",cl:"rpi-url",atts:{href:"#"},text:rpi.Utils.__("More reviews",a.trans)})})]})},main(a,b){const d="rpi_flash_"+a.dataset.id;if(sessionStorage.getItem(d))return{};const t=a.getElementsByClassName("rpi-flash")[0],m=a.getElementsByClassName("rpi-flash-content")[0],h=m.getElementsByClassName("rpi-x")[0],g=m.getElementsByClassName("rpi-flash-card")[0],l=m.getElementsByClassName("rpi-flash-story")[0],p=[],n=rpi.Common(a, 58b,{time:"rpi-time",text:"rpi-text",readmore:"rpi-readmore"}),c=rpi.View(a,b,{common:n,cbp:r=>p.push(...r.reviews)});b.data&&c.addReviews(b.data,[]);let e=0,k=!1,f=1E3*(b.flash_start||3),u=1E3*(b.flash_visible||5),y=1E3*(b.flash_invisible||5),w=null;return{init(){this.destroy();n.init();c.init();this.fillReviews();p.length&&(h.onclick=this.hide,l.onclick=()=>this.showReview(),document.body.appendChild(a),setTimeout(()=>this.showStory(),f))},destroy(){clearTimeout(w);w=null},fillReviews(){let r=a.getElementsByClassName("rpi-card"); 59for(let x=0;x<r.length;x++){let z=r[x].dataset.rat;var A="";b.disable_review_time||(A=r[x].getElementsByClassName("rpi-time")[0],A=b.time_format?A.textContent:A.dataset.time);let C=r[x].getElementsByClassName("rpi-name"),D=r[x].getElementsByClassName("rpi-text"),F=r[x].querySelector("img.rpi-img");p.push({rating:z,text:D[0]?.firstChild?.nodeValue??"",time:A,author_avatar:b.hide_avatar?"":F?.getAttribute("src")??"",author_name:b.hide_name?"":C[0]?.textContent??"",author_url:b.hide_name?"":C[0]?.href?? 60"",provider:r[x].dataset.provider})}},showStory(){clearTimeout(w);if(!k)if(this.nextStory(p,e),m.className="rpi-flash-content rpi-flash-visible",e+1<p.length)e+=1;else{var r=a.getElementsByClassName("rpi-cards")[0];const A=parseInt(r.dataset.count,10)||0;r=parseInt(r.dataset.offset,10)||0;if(A>r){clearTimeout(w);c.loadNextReviews(b.pagination,x=>{p.push(...x.reviews);e=e+1<p.length?e+1:0;this.waitStory()});return}e=0}this.waitStory()},waitStory(){w=setTimeout(()=>{k||m&&m.matches(":hover")||(m.className= 61"rpi-flash-content");w=setTimeout(()=>this.showStory(),y)},u)},showReview(){k=!0;const r=g.querySelector(".rpi-flash-form .rpi-card:nth-child("+parseInt(l.dataset.idx)+")");r.className="rpi-card rpi-highlight";setTimeout(()=>{r.scrollIntoView({block:"center"})},50);g.className="rpi-flash-card rpi-flash-expanded";m.className="rpi-flash-content rpi-flash-visible";h.className="rpi-x rpi-xa";h.onclick=()=>{r.className="rpi-card";g.className="rpi-flash-card";h.className="rpi-x";k=!1;h.onclick=this.hide}}, 62hide(){let r=JSON.parse(sessionStorage.getItem(d)||"{}");r.hide=!0;sessionStorage.setItem(d,JSON.stringify(r));clearTimeout(w);a.getElementsByClassName("rpi-flash-content")[0].className="rpi-flash-content"},nextStory(r,A){const x=r[A];g.style.height="auto";t.style.setProperty("--flash-height","auto");if(l.firstChild){r=l.getElementsByClassName("rpi-flash-img");const z=l.getElementsByClassName("rpi-flash-head"),C=l.getElementsByClassName("rpi-flash-body"),D=l.getElementsByClassName("rpi-flash-footer"); 63b.flash_user_photo&&r.length&&(r[0].innerHTML=this.img(x));z.length&&(z[0].innerHTML=this.head(x));C.length&&(C[0].innerHTML=this.body(x));D.length&&(D[0].innerHTML=this.footer(x));l.dataset.idx=A+1}else l.innerHTML=this.createStory(r,A);l.dataset.provider=x.provider;setTimeout(()=>{t.style.setProperty("--flash-height",l.offsetHeight+"px");g.style.height=""},1)},createStory(r,A){r=r[A];return(b.flash_hide_logo&&!b.flash_user_photo?"":'<div class="rpi-flash-img">'+this.img(r)+"</div>")+'<div class="rpi-info"><div class="rpi-flash-head">'+ 64this.head(r)+'</div><div class="rpi-flash-body">'+this.body(r)+'</div><div class="rpi-flash-footer">'+this.footer(r)+"</div></div>"},img(r){return b.flash_user_photo?this.photoImg(r,44,44):rpi.Flash.LOGO},head(r){return b.flash_head?this.temp(r,b.flash_head):this.photo(r,16,16)+(b.hide_name?"":this.name(r))+"<sp
64an> "+b.text.m1.replace("%s",this.star(r))+"</span>"},body(r){return b.flash_body?this.temp(r,b.flash_body):rpi.View.stars(r.rating,r.provider).outerHTML+b.text.m2+this.provider(r)},footer(r){return b.flash_footer? 65this.temp(r,b.flash_footer):b.disable_review_time?"":n.time(r.time)},name(r){return'<span class="rpi-flash-name">'+r.author_name+"</span> "},star(r){return'<span class="rpi-flash-rating rpi-star" data-rating="'+r.rating+'"></span>'},provider(r){return'<span class="rpi-logo rpi-logo-'+r.provider+'"></span>'},photo(r,A,x){return b.flash_user_photo||b.hide_avatar?"":this.photoImg(r,A,x)},photoImg(r,A,x){let z=r.author_avatar;return'<span class="rpi-flash-photo rpi-img-wrap"><img src="'+z+'" class="rpi-img" alt="'+ 66r.author_name+'" width="'+A+'" height="'+x+'" onerror="if(this.src!=\''+z+"')this.src='"+rpi.AVA+"'\"></span>"},temp(r,A){return decodeURIComponent(A).replace("{{review_rating}}",this.star(r)).replace("{{review_stars}}",rpi.View.stars(r.rating,r.provider).outerHTML).replace("{{review_text}}",n.trimtext(r.text,!0)).replace("{{review_time}}",n.time(r.time)).replace("{{review_provider}}",this.provider(r)).replace("{{review_name}}",this.name(r)).replace("{{review_name_url}}",r.author_url).replace("{{review_photo}}", 67this.photo(r,16,16))}}}});rpi=rpi||{};rpi.Badge=function(a,b){if(b.data)a.appendChild(rpi.Badge.render(b));else{const d=a.getElementsByClassName("rpi-badge-cnt")[0];d&&d.dataset.opts&&(b={...b,...JSON.parse(d.dataset.opts)})}a=rpi.Badge.main(a,b);a.init();return a}; 68Object.assign(rpi.Badge,{render(a){return rpi.el({cl:["rpi-badge-cnt","rpi-badge-"+(a.badge_pos||"right"),a.badge_display_block?"rpi-badge-block":"",a.hide_float_badge?"rpi-badge-hide":""],children:a.data.bizs.map(b=>this.badge(b,a))})},badge(a,b){return rpi.el({cl:"rpi-badge",style:"display:none",data:"summary"!==a.provider?{id:a.id,provider:a.provider}:null,children:[!b.badge_line_hide&&rpi.el({cl:"rpi-badge-line"}),b.badge_close&&rpi.el({cl:"rpi-x"}),this.body(a,b)]})},body(a,b){return rpi.el({cl:["rpi-badge-body", 69"rpi-flex","disable"!==b.badge_click&&"rpi-badge-clickable"],children:[this.img(a,b),this.info(a,b)]})},img(a,b){return"summary"===a.provider||b.badge_use_photo?rpi.el({tag:"img",cl:"rpi-logo",atts:{src:a.photo||"",alt:a.name||"",width:"44",height:"44",loading:b.lazy_load_img?"lazy":"eager"}}):rpi.el({cl:"rpi-logo rpi-logo-"+a.provider})},info(a,b){return rpi.el({cl:"rpi-info",children:[!b.badge_name_hide&&rpi.el({cl:"rpi-name",text:this.title(a,b)}),!b.badge_stars_hide&&rpi.View.stars(a.rating,a.provider, 70!0),!b.badge_based_hide&&rpi.el({cl:"rpi-based",text:"Based on "+a.total+" reviews"})]})},title(a,b){return"summary"===a.provider?b.summary_name||"Social Rating":b.badge_use_name?a.name||"":rpi.Utils.capit(a.provider)+" Rating"},main:function(a,b){const d=a.dataset.id;return{init(){[...a.getElementsByClassName("rpi-badge")].forEach(t=>this.initBadge(t))},initBadge(t){const m=`rpi_badge_${[d,t.dataset.provider,t.dataset.id].join("_")}`;var h=sessionStorage.getItem(m);t.style.display=h?"none":"inline-block"; 71if(!h){if(h=t.querySelector(".rpi-x"))h.onclick=()=>{sessionStorage.setItem(m,1);t.style.display="none"};if("sidebar"===b.badge_click){const g=t.querySelector(".rpi-badge-body");g&&(g.onclick=()=>{var {dataset:l}=g.parentNode;l=rpi.View.ajaxsb(document.body,{query:{act:"reviews",id:d,bid:l.id,prov:l.provider},options:b});setTimeout(l.toggle,5);g.onclick=l.toggle})}}}}}});rpi=rpi||{};rpi.Tag=function(a,b){const d=b.data;d&&a.appendChild(rpi.Tag.render(d,b));a=rpi.Tag.main(a,b);a.init();return a}; 72Object.assign(rpi.Tag,{render(a,b){return rpi.el({cl:this.cls(b),children:[b.tag_text?rpi.el({cl:"rpi-tag-text",text:b.tag_text}):null,this.cnt(a,b)]})},cls:function(a){const b=["rpi-tag"];a.tag_popup&&b.push("rpi-pop");a.tag_pos&&b.push(a.tag_pos);a.tag_push&&b.push("push");a.tag_expand&&b.push("expand");return b},cnt:function(a,b){a=a.bizs[0];return rpi.el({cl:"rpi-tag-cnt",atts:{onclick:this.click(a,b)},children:[rpi.el({tag:"span",cl:"rpi-logos",children:a.platform.map(d=>rpi.el({tag:"span",cl:"rpi-logo rpi-logo-"+ 73d}))}),rpi.View.stars(a.rating,a.provider,b.tag_rating)]})},click:function(a,b){let d=null;switch(b.tag_click){case "link":d=b.tag_link;break;case "reviews":d=rpi.View.allReviewsUrl(a)}a=b.open_link?"blank":"self";return d?"window.open('"+d+"', '_"+a+"');return false":null},main:function(a,b){const d=a.getAttribute("data-id"),t=a.getElementsByClassName("rpi-tag")[0],m=a.getElementsByClassName("rpi-tag-cnt")[0];return{init:function(){let h=a.querySelector(".rpi-stars[data-reviewus]");h&&(this.starsInit(h), 74h.onclick=function(g){g="svg"==g.target.tagName?g.target:g.target.parentNode;g=[...g.parentNode.children].indexOf(g);rpi.Utils.popup(2<g?this.getAttribute("data-reviewus"):"https://app.richplugins.com/feedback?s="+g,800,600)});0<b.tag_popup&&setTimeout(function(){t.className+=" rpi-pop-up"},1E3*b.tag_popup);"sidebar"===b.tag_click&&m&&(m.onclick=function(){const g=rpi.View.ajaxsb(a,{query:{act:"reviews",id:d},options:b});setTimeout(g.toggle,5);m.onclick=g.toggle})},starsInit:function(h){}}}}); 75rpi=rpi||{}; 76rpi.Slider=function(a,b,d,t){a.getAttribute("data-id");
76const m=a.getElementsByClassName(d.cnt)[0],h=a.getElementsByClassName(d.content)[0],g=h?h.getElementsByClassName(d.cards)[0]:null,l=h?h.getElementsByClassName(d.dotsWrap)[0]:null,p=h?h.getElementsByClassName(d.dots)[0]:null,n=g?parseInt(g.getAttribute("data-count")):0,{autoplay:c=!0,speed:e=5,mousestop:k=!0}=b;var f=null,u=h?h.getElementsByClassName(d.card):null,y="",w="",r=null,A=null,x=null,z=null,C=!1,D=!1,F=0,G=0;return f={init:function(q,v){rpi.Utils.isVisible(m)? 77(q&&q(),f.resize(),f.actions(),u.length&&f.swipeAutoStart(),v&&v(),rpi.Instances=rpi.Instances||[],rpi.Instances.push(f)):setTimeout(f.init,300)},resize:function(q){let v=t.column.resize(),B=t.column.getCol();q&&g.scrollLeft!=q*f.reviewWidth()&&g.scrollTo(u[q].offsetLeft,0);!u.length||y==v&&w==B||(f.hasDots()&&(f.dotsInit(),f.dotSwipe(q,!0)),y=v,w=B)},actions:function(){k&&f.addMouseEvents();window.addEventListener("resize",f.resizeListener);g&&(g.addEventListener("scroll",f.scrollListener,!1),b.wheelscroll&& 78h.addEventListener("wheel",f.wheelListener,!1));var q=m.getElementsByClassName(d.btnPrev)[0];q&&(q.onclick=function(v){v.preventDefault();v.stopPropagation();f.btnClick(-1)});if(q=m.getElementsByClassName(d.btnNext)[0])q.onclick=function(v){v.preventDefault();v.stopPropagation();f.btnClick(1)}},resizeListener:function(){var q=G;clearTimeout(r);r=setTimeout(f.resize,150,q)},scrollListener:function(){clearTimeout(A);clearTimeout(x);x=setTimeout(f.scrollEnd,150)},wheelListener:function(q){var v=q.target; 79if((v=-1<v.className.indexOf(d.text)?v:-1<v.parentNode.className.indexOf(d.text)?v.parentNode:null)&&v.scrollHeight>v.clientHeight)return!0;q.preventDefault();F++;clearTimeout(z);z=setTimeout(f.wheelEnd,150,q)},addMouseEvents:function(){m.addEventListener("mouseover",f.mouseOver,!1);m.addEventListener("mouseleave",f.mouseLeave,!1)},delMouseEvents:function(){m.removeEventListener("mouseover",f.mouseOver);m.removeEventListener("mouseleave",f.mouseLeave)},mouseOver:function(){C=1;f.swipeAutoStop()}, 80mouseLeave:function(){C=0;f.swipeAutoStart()},btnClick:function(q){f.swipeManual(q*f.swipePerBtn())},wheelEnd:function(q){f.swipeManual(Math.sign(q.wheelDelta)*F*f.swipeStep());F=0},scrollEnd:function(){G=f.reviewsIdx();D?D=!1:f.loadNextReviews();(!k||C)&&k||(!b.clickstop||D)&&b.clickstop||f.swipeAutoStart();f.hasDots()&&f.dotSwipe(void 0,!0)},loadNextReviews:function(q){q=q?f.reviewsIdx()+parseInt(q):f.hasDots()?(q=p.getElementsByClassName("active")[0])?parseInt(q.getAttribute("data-index"))*f.swipePerDot(): 81f.reviewsIdx():f.reviewsIdx();q=f.getAjaxSize(q);0<q&&t.view.loadNextReviews(q)},getAjaxSize:function(q){let v=0;const B=parseInt(g.getAttribute("data-offset")),E=parseInt(b.pagination);if(n>B){let H=q-B;Math.abs(H)<3*f.swipePerDot()?v=E:H&&(v=Math.ceil(q/E)*E-B)}q=B+v-n;return 0<q?v-q:v},dotsInit:function(){if(p){var q=Math.round(n/f.swipePerDot());p.innerHTML="";for(let v=0;v<q;v++){let B=document.createElement("button");B.className=d.dot;B.setAttribute("data-index",v);B.setAttribute("title",v); 82B.setAttribute("aria-label","Go to page "+v);B.onclick=f.dotClick;p.appendChild(B)}f.dotsPadding()}},dotClick:function(q){q.preventDefault();q.stopPropagation();q=parseInt(this.getAttribute("data-index"));var v=p.getElementsByClassName("active")[0];v=parseInt(v.getAttribute("data-index"));f.swipeManual(Math.abs(q-v)*f.swipePerDot()*Math.sign(q-v))},dotsPadding:function(){let q=l.getBoundingClientRect().height;m.style.paddingBottom=q+"px"},dotSwipe:function(q,v){q=Math.round((void 0!==q?q:f.reviewsIdx())/ 83f.swipePerDot());q=0>q?0:q>=p.childNodes.length?p.childNodes.length-1:q;q=p.querySelector("."+d.dot+'[data-index="'+q+'"]');let B=p.getElementsByClassName("active")[0];f.dotActivate(B,q);f.dotScroll(q,v)},dotScroll:function(q,v){let B=Math.round(p.scrollWidth/p.childNodes.length),E=Math.floor(Math.round(p.offsetWidth/B)/2);v?p.scrollTo(q.offsetLeft-E*B,0):p.scrollTo({left:q.offsetLeft-E*B,behavior:"smooth"})},dotActivate:function(q,v){q&&(q.classList.remove("active"),q.classList.remove("s1"),q.previousSibling&& 84(q.previousSibling.classList.remove("s2"),q.previousSibling.previousSibling&&q.previousSibling.previousSibling.classList.remove("s3")),q.nextSibling&&(q.nextSibling.classList.remove("s2"),q.nextSibling.nextSibling&&q.nextSibling.nextSibling.classList.remove("s3")));v&&(v.classList.add("active"),v.classList.add("s1"),v.previousSibling&&(v.previousSibling.classList.add("s2"),v.previousSibling.previousSibling&&v.previousSibling.previousSibling.classList.add("s3")),v.nextSibling&&(v.nextSibling.classList.add("s2"), 85v.nextSibling.nextSibling&&v.nextSibling.nextSibling.classList.add("s3")))},swipeManual:function(q){D=!0;f.loadNextReviews(q);f.scroll(q);b.clickstop&&(f.swipeAutoStop(),f.delMouseEvents())},swipeAuto:function(){if(rpi.Utils.isInViewport(m))if(f.isScrollEnd())f.scroll(-(n-f.reviewsPerView()));else{let q=f.swipeStep()<f.reviewsAhead()?f.swipeStep():f.reviewsAhead();f.scroll(q)}f.swipeAutoStart()},scroll:function(q){q=f.reviewsIdx()+parseInt(q);let v=rpi.Utils.isRTL()?q+f.reviewsPerView()-1:q;v=0>v? 860:v>=u.length?u.length-1:v;-1<v&&v<u.length&&(g.scrollTo({left:u[v].offsetLeft,behavior:"smooth"}),f.hasDots()&&f.dotSwipe(q))},swipeAutoStart:function(){c&&(A=setTimeout(f.swipeAuto,1E3*parseInt(e)))},swipeAutoStop:function(){clearTimeout(A);x&&setTimeout(function(){clearTimeout(x)},100)},isScrollEnd:function(){var q=g.querySelector("."+d.card+":last-child"),v=q.getBoundingClientRect();q=q.parentNode.getBoundingClientRect();return(2>Math.abs(q.left-v.left)||q.left<=v.left)&&v.left<q.right&&(2>Math.abs(q.right- 87v.right)||q.right>=v.right)&&v.right>q.left},swipeStep:function(){return b.swipe_step||f.reviewsPerView()},swipePerBtn:function(){return b.swipe_per_btn||f.reviewsPerView()},swipePerDot:function(){return b.swipe_per_dot||f.reviewsPerView()},reviewWidth:function(){return Math.round(g.scrollWidth/u.length)},reviewHeight:function(){return u[0].offsetHeight},reviewsPerView:function(){return Math.round(g.offsetWidth/f.reviewWidth())},reviewsIdx:function(){let q=rpi.Utils.isRTL()?-g.scrollLeft:g.scrollLeft; 88return Math.round(q/f.reviewWidth())},reviewsAhead:function(){return u.length-(f.reviewsIdx()+f.reviewsPerView())},hasDots:function(){return p&&!b.hide_dots&&0<f.swipePerDot()},setBreakpoints:function(q){t.column.setBreakpoints(q);f.resize()},clear:function(){clearTimeout(r);clearTimeout(A);clearTimeout(x);clearTimeout(z);window.removeEventListener("resize",f.resizeListener);g.removeEventListener("scroll",f.scrollListener);h.removeEventListener("wheel",f.wheelListener)}}};rpi=rpi||{}; 89rpi.Temp=function(a,b){const d=b.data;d&&(a.innerHTML=rpi.Temp.render(d,b));a=rpi.Temp.main(a,b);d&&a.init(d);return a}; 90Object.assign(rpi.Temp,{HEADER:"<div class=\"rpi-header\" data-temp='{{temp_rating}}'></div>",CONTENT:'<div class="rpi-content" data-temp=\'{{temp_review}}\' data-count="{{count}}" data-offset="{{offset}}"></div>',PAGIN:'<a href="#" class="rpi-url">{{label}}</a>',RATINGS:'<div class="rpi-rating">\n {{photo}}\n <a href="{{writereview_url}}" onclick="rpi.Utils.popup(this.href,620,580);return !1;">{{name}}</a>\n {{rating}} {{stars}}\n Based on <a href="{{reviews_url}}" target="_blank" rel="noopener">{{count}} reviews</a>\n </div>',REVIEWS:'<div class="rpi-review">\n <div>{{review_photo}
90} {{review_name_url}} {{review_time}} {{review_logo}}</div>\n <div>{{review_stars}}</div>\n <div class="rpi-text">{{review_text}}</div>\n {{review_media}}\n <div>{{review_reply}}</div>\n </div>', 91render(a,b){b=a.options??{};let d="";!1!==b.rating_temp_on&&(d+=this.fill(this.HEADER,{temp_rating:this.esc(b.rating_temp||encodeURIComponent(this.RATINGS))}));!1!==b.review_temp_on&&(d+=this.fill(this.CONTENT,{temp_review:this.esc(b.review_temp||encodeURIComponent(this.REVIEWS)),count:this.esc(a.count),offset:this.esc((a.reviews??[]).length)}));return d},ratings(a,b,d){const t=d.bizPhoto(b);return rpi.Temp.fill(a,{scale:d.scale(b),name:rpi.Temp.esc(b.name),photo:t?.outerHTML??"",stars:rpi.View.stars(b.rating, 92b.provider,!1).outerHTML,rating_stars:rpi.View.stars(b.rating,b.provider,!0).outerHTML,rating:rpi.Temp.esc(b.rating),count:rpi.Temp.esc(b.total??b.review_count),reviews_url:rpi.Temp.esc(rpi.Temp.safeUrl(rpi.View.allReviewsUrl(b))),writereview_url:rpi.Temp.esc(rpi.Temp.safeUrl(rpi.View.writeReviewUrl(b)))})},reviews(a,b,d){const t=b.media?d.media.thumbs(b.media).map(m=>m.outerHTML).join(" "):"";return rpi.Temp.fill(a,{review_photo:d.reviewAvatar(b).outerHTML,review_provider:rpi.Temp.esc(b.provider), 93review_logo:d.logo(b.provider).outerHTML,review_url:rpi.Temp.esc(rpi.Temp.safeUrl(b.author_url)),review_name:rpi.Temp.esc(b.author_name),review_name_url:d.reviewName(b).outerHTML,review_time:d.reviewTime(b).outerHTML,review_rating:rpi.Temp.esc(b.rating),review_stars:rpi.View.stars(b.rating,b.provider).outerHTML,review_text:rpi.Temp.esc(b.text??""),review_media:t,review_reply:rpi.Temp.esc(b.reply??"")})},fill(a,b){return Object.entries(b).reduce((d,[t,m])=>d.replace(new RegExp(`\\{\\{${t}\\}\\}`,"g"), 94m),a)},esc(a){return String(a??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},safeUrl(a){a=String(a??"").trim();if(!a)return"";if(/^(#|\/|\?|\.)/.test(a))return a;try{const {protocol:b,href:d}=new URL(a,window.location.href);return["http:","https:","mailto:","tel:"].includes(b.toLowerCase())?d:"#"}catch{return"#"}},decode(a,b){try{return decodeURIComponent(a||encodeURIComponent(b))}catch{return b}},main(a,b){let d=null;const {decode:t, 95ratings:m,reviews:h,RATINGS:g,REVIEWS:l}=rpi.Temp,p=a.dataset.id,n=rpi.Common(a,b,{time:"rpi-time",text:"rpi-text",readmore:"rpi-readmore"}),c=rpi.View(a,b,{common:n}),e=a.querySelector(".rpi-header"),k=a.querySelector(".rpi-content"),f=(u,y,w)=>{const r=document.createElement("span");for(r.innerHTML=y;r.firstChild;)y=r.firstChild,w&&y.nodeType===Node.ELEMENT_NODE&&w(y),u.appendChild(y)};if(k&&b.pagination){let u=a.getElementsByClassName("rpi-url")[0];u=u??rpi.el({tag:"button",cl:"rpi-url",text:rpi.Utils.__("More reviews", 96b.trans)});u.onclick=()=>{var y=parseInt(k.dataset.offset,10)||0;y=c.getAjaxUrl({id:p,offset:y,api:b.api,act:"reviews",size:b.pagination});rpi.Utils.ajax(y,"POST",w=>{w.reviews&&d.initReviews(w.reviews);k.setAttribute("data-count",w.count);k.setAttribute("data-offset",w.offset);w.offset>=w.count&&rpi.Utils.rm(u)});return!1};a.appendChild(u)}n.init();return d={init(u){u&&(e&&u.bizs&&this.initRatings(u.bizs),k&&u.reviews&&this.initReviews(u.reviews))},initRatings(u){if(e){var y=t(e.dataset.temp,g); 97for(const w of u)f(e,m(y,w,c))}},initReviews(u){if(k){var y=t(k.dataset.temp,l);for(const w of u)f(k,h(y,w,c),r=>n.initOnce(r))}}}}});rpi=rpi||{}; 98rpi.Layout=function(a,b){function d(){var g=["rpi-cnt","rpi-col-m","rpi-"+b.view_mode];"grid"!==b.view_mode&&"slider"!==b.view_mode||g.push("rpi-sh");g=rpi.el({cl:g,data:{opts:"{}"},style:"visibility:var(--visible, hidden)"});h.bizs&&g.appendChild(t());h.reviews&&g.appendChild(m());a.appendChild(g);const l=rpi.Common(a,b,{time:"rpi-time",text:"rpi-text",readmore:"rpi-readmore"}),p=rpi.Column(a,b,{cnt:"rpi-cnt",col:"rpi-col",card:"rpi-card"}),n=rpi.View(a,b,{common:l,...(b.cfg??{})});h.bizs&&h.bizs.length&& 99n.addBusiness(h.bizs[0],b);n.addReviews(h,[]);"slider"===b.view_mode?rpi.Slider(a,b,{cnt:"rpi-cnt",col:"rpi-col",content:"rpi-content",cards:"rpi-cards",card:"rpi-card",text:"rpi-text",btnPrev:"rpi-slider-prev",btnNext:"rpi-slider-next",dotsWrap:"rpi-dots-wrap",dots:"rpi-dots",dot:"rpi-dot"},{view:n,column:p}).init(function(){l.init()},function(){n.init();console.log("RichPlugins slider initialized")}):(l.init(),n.init());return g}function t(){var g="slider"===b.view_mode;const l=["rpi-header",`rpi-header_${1==
100(g?b.slider_head_pos||2:b.head_pos||1)?"top":"row"}`];g&&!b.slider_hide_nextprev&&l.push("rpi-header_pad");g=rpi.el({cl:l,data:{opts:""}});g.appendChild(rpi.el({cl:"rpi-cards"}));return g}function m(){var g="slider"===b.view_mode;const l=rpi.el({cl:["rpi-content",`rpi-content_${1==(g?b.slider_head_pos:b.head_pos)?"top":"row"}`]});g&&!b.slider_hide_nextprev&&l.appendChild(rpi.el({tag:"button",cl:"rpi-ltgt rpi-lt rpi-slider-prev",atts:{"aria-label":"Previous reviews",tabindex:"0"}}));var p=l.appendChild; 101var n=["rpi-cards"];var c="slider"===b.view_mode;c&&!b.slider_hide_nextprev&&n.push("rpi-slides-bite");var e=h.reviews?.length;n=rpi.el({cl:n,data:{offset:e,count:h.count}});!c&&0<b.pagination&&h.count>e&&(c=rpi.el({style:"text-align:center"}),e=rpi.el({tag:"button",cl:"rpi-url",text:"More reviews"}),c.appendChild(e),e=document.createDocumentFragment(),e.appendChild(n),e.appendChild(c),n=e);p.call(l,n);g&&!b.slider_hide_nextprev&&l.appendChild(rpi.el({tag:"button",cl:"rpi-ltgt rpi-gt rpi-slider-next", 102atts:{"aria-label":"Next reviews",tabindex:"0"}}));g&&!b.slider_hide_pagin&&(g=rpi.el({cl:"rpi-dots-wrap"}),g.appendChild(rpi.el({cl:"rpi-dots"})),l.appendChild(g));return l}const h=b.data;return{render:function(){a.innerHTML="";b.style_vars&&(a.style.cssText=b.style_vars);switch(b.view_mode){case "tag":rpi.Tag(a,b);break;case "flash":rpi.Flash(a,b);break;case "badge":rpi.Badge(a,b);break;case "temp":rpi.Temp(a,b);break;default:d()}}}}; 103var RichPlugins=RichPlugins||{opts(a,b,d){a=a.getElementsByClassName(d)[0];return{...b,...(a?.dataset?.opts?JSON.parse(a.dataset.opts):{})}},Tag:function(a,b){return{init:()=>rpi.Tag(a,RichPlugins.opts(a,b,"rpi-tag-cnt"))}},Flash:function(a,b){return{init:()=>rpi.Flash(a,RichPlugins.opts(a,b,"rpi-flash"))}},Badge:function(a,b){return{init:()=>rpi.Badge(a,RichPlugins.opts(a,b,"rpi-badge-cnt"))}},Temp:function(a,b){return{init:()=>rpi.Temp(a,b)}},List:function(a,b){const d=rpi.Common(a,b,{time:"rpi-time", 104text:"rpi-text",readmore:"rpi-readmore"}),t=rpi.Column(a,b,{cnt:"rpi-cnt",col:"rpi-col",card:"rpi-card"}),m=rpi.View(a,b,{common:d});return{init:()=>{d.init();t.init();m.init()}}},Slider:function(a,b){const d=rpi.Common(a,b,{time:"rpi-time",text:"rpi-text",readmore:"rpi-readmore"}),t=rpi.Column(a,b,{cnt:"rpi-cnt",col:"rpi-col",card:"rpi-card"}),m=rpi.View(a,b,{common:d}),h=rpi.Slider(a,RichPlugins.opts(a,{},"rpi-cnt"),{cnt:"rpi-cnt",col:"rpi-col",content:"rpi-content",cards:"rpi-cards",card:"rpi-card", 105text:"rpi-text",btnPrev:"rpi-slider-prev",btnNext:"rpi-slider-next",dotsWrap:"rpi-dots-wrap",dots:"rpi-dots",dot:"rpi-dot"},{view:m,column:t});return{init:()=>h.init(d.init.bind(d),m.init.bind(m))}},init:function(a){a.setAttribute("data-exec","1");let b=JSON.parse(a.getAttribute("data-opts")),d=rpi.Utils.capit(b.layout);"List"==d||"Grid"==d?RichPlugins.List(a,b).init():RichPlugins[d]&&RichPlugins[d](a,b).init()}}; 106window.rpi_boot=function(){function a(){const d=document.querySelectorAll('.rpi[data-exec=""]');if(!d.length)return!1;rpi.Utils.clear();d.forEach(t=>RichPlugins.init(t));return!0}function b(){(new MutationObserver((d,t)=>{a()&&t.disconnect()})).observe(document.body,{childList:!0,subtree:!0})}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{a()||b()}):a()||b()};window.rpi_boot();
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.