f?1E3:1),rpi.Utils.lang())},trimtext:function(f,n){var k=parseInt(d.text_size);if(f&&k&&f.length>k){f=Array.from(f);let p=f.slice(0,k).join("").indexOf(" ")+1;if(1>p||k-p>k/2)p=f.length>k?k:f.length;let h=k="";0... '+rpi.Utils.__("read more",d.trans)+"":"")}return f},opentext:function(){let f=this.parentNode,n=this.previousSibling,k=this.previousSibling.previousSibling,p=decodeURIComponent(n.value);rpi.Utils.rm(n);rpi.Utils.rm(k);rpi.Utils.rm(this);f.innerHTML+=p}}};rpi=rpi||{};
rpi.Media=function(a,d,{root:g="rpi",card:m="rpi-card"}={}){var f=null,n=null;return n={init:function(){f=a.getElementsByClassName("rpi-thumb");for(let k=0;kp||p>=
f.length)){var h=document.querySelector(".rpi-lightbox"),q=k.src.replace(/=s[0-9]{1,3}/g,"=s500");k=rpi.Utils.getParent(k,m).outerHTML;if(h){let e=h.querySelector(".rpi-lightbox-media img"),t=h.querySelector(".rpi-lightbox-review"),u=h.querySelector(".rpi-lightbox-prev");next=h.querySelector(".rpi-lightbox-next");e.src=q;t.innerHTML!==k&&(t.innerHTML=k,n.clicks(t));u.onclick=function(x){n.show(f[p-1],p-1)};next.onclick=function(x){n.show(f[p+1],p+1)}}else h=document.createElement("div"),h.className=
"rpi-lightbox",h.innerHTML='",q=h.querySelector(".rpi-x"),k=h.querySelector(".rpi-lightbox-prev"),next=h.querySelector(".rpi-lightbox-next"),q.onclick=
function(){h.style.display="none"},h.onclick=function(e){h==e.target&&(h.style.display="none")},k.onclick=function(e){n.show(f[p-1],p-1)},next.onclick=function(e){n.show(f[p+1],p+1)},n.clicks(h),document.body.appendChild(h);h.style.display="flex"}}}};rpi=rpi||{};
rpi.Slider=function(a,d,g,m){a.getAttribute("data-id");const f=a.getElementsByClassName(g.cnt)[0],n=a.getElementsByClassName(g.content)[0],k=n?n.getElementsByClassName(g.cards)[0]:null,p=n?n.getElementsByClassName(g.dotsWrap)[0]:null,h=n?n.getElementsByClassName(g.dots)[0]:null,q=k?parseInt(k.getAttribute("data-count")):0;var e=null,t=n?n.getElementsByClassName(g.card):null,u="",x="",A=null,y=null,w=null,B=null,C=!1,z=!1,D=0,E=0;return e={init:function(b,l){rpi.Utils.isVisible(f)?(b&&b(),e.resize(),
e.actions(),t.length&&e.swipeAutoStart(),l&&l(),rpi.Instances=rpi.Instances||[],rpi.Instances.push(e)):setTimeout(e.init,300)},resize:function(b){let l=m.column.resize(),r=m.column.getCol();b&&k.scrollLeft!=b*e.reviewWidth()&&k.scrollTo(t[b].offsetLeft,0);!t.length||u==l&&x==r||(e.hasDots()&&(e.dotsInit(),e.dotSwipe(b,!0)),u=l,x=r);a.style.setProperty("--root-bg",e.bg(a))},bg:function(b){return b&&"transparent"!==(c=getComputedStyle(b).backgroundColor.replace(/\s/g,""))&&"rgba(0,0,0,0)"!==c?c:e.bg(b.parentElement)},
actions:function(){d.mousestop&&e.addMouseEvents();window.addEventListener("resize",e.resizeListener);k&&(k.addEventListener("scroll",e.scrollListener,!1),d.wheelscroll&&n.addEventListener("wheel",e.wheelListener,!1));var b=f.getElementsByClassName(g.btnPrev)[0];b&&(b.onclick=function(l){l.preventDefault();l.stopPropagation();e.btnClick(-1)});if(b=f.getElementsByClassName(g.btnNext)[0])b.onclick=function(l){l.preventDefault();l.stopPropagation();e.btnClick(1)}},resizeListener:function(){var b=E;clearTimeout(A);
A=setTimeout(e.resize,150,b)},scrollListener:function(){clearTimeout(y);clearTimeout(w);w=setTimeout(e.scrollEnd,150)},wheelListener:function(b){var l=b.target;if((l=-1l.clientHeight)return!0;b.preventDefault();D++;clearTimeout(B);B=setTimeout(e.wheelEnd,150,b)},addMouseEvents:function(){f.addEventListener("mouseover",e.mouseOver,!1);f.addEventListener("mouseleave",e.mouseLeave,!1)},delMouseEvents:function(){f.removeEventListener("mouseover",
e.mouseOver);f.removeEventListener("mouseleave",e.mouseLeave)},mouseOver:function(){C=1;e.swipeAutoStop()},mouseLeave:function(){C=0;e.swipeAutoStart()},btnClick:function(b){e.swipeManual(b*e.swipePerBtn())},wheelEnd:function(b){e.swipeManual(Math.sign(b.wheelDelta)*D*e.swipeStep());D=0},scrollEnd:function(){E=e.reviewsIdx();z?z=!1:e.loadNextReviews();(!d.mousestop||C)&&d.mousestop||(!d.clickstop||z)&&d.clickstop||e.swipeAutoStart();e.hasDots()&&e.dotSwipe(void 0,!0)},loadNextReviews:function(b){b=
b?e.reviewsIdx()+parseInt(b):e.hasDots()?(b=h.getElementsByClassName("active")[0])?parseInt(b.getAttribute("data-index"))*e.swipePerDot():e.reviewsIdx():e.reviewsIdx();b=e.getAjaxSize(b);0r){let F=b-r;Math.abs(F)<3*e.swipePerDot()?l=v:F&&(l=Math.ceil(b/v)*v-r)}b=r+l-q;return 0b?0:b>=h.childNodes.length?h.childNodes.length-1:b;b=h.querySelector("."+g.dot+'[data-index="'+b+'"]');let r=h.getElementsByClassName("active")[0];e.dotActivate(r,b);e.dotScroll(b,l)},dotScroll:function(b,l){let r=Math.round(h.scrollWidth/h.childNodes.length),v=Math.floor(Math.round(h.offsetWidth/r)/2);l?h.scrollTo(b.offsetLeft-v*r,0):h.scrollTo({left:b.offsetLeft-
v*r,behavior:"smooth"})},dotActivate:function(b,l){b&&(b.classList.remove("active"),b.classList.remove("s1"),b.previousSibling&&(b.previousSibling.classList.remove("s2"),b.previousSibling.previousSibling&&b.previousSibling.previousSibling.classList.remove("s3")),b.nextSibling&&(b.nextSibling.classList.remove("s2"),b.nextSibling.nextSibling&&b.nextSibling.nextSibling.classList.remove("s3")));l&&(l.classList.add("active"),l.classList.add("s1"),l.previousSibling&&(l.previousSibling.classList.add("s2"),
l.previousSibling.previousSibling&&l.previousSibling.previousSibling.classList.add("s3")),l.nextSibling&&(l.nextSibling.classList.add("s2"),l.nextSibling.nextSibling&&l.nextSibling.nextSibling.classList.add("s3")))},swipeManual:function(b){z=!0;e.loadNextReviews(b);e.scroll(b);d.clickstop&&(e.swipeAutoStop(),e.delMouseEvents())},swipeAuto:function(){if(rpi.Utils.isInViewport(f))if(e.isScrollEnd())e.scroll(-(q-e.reviewsPerView()));else{let b=e.swipeStep()l?0:l>=t.length?t.length-1:l;-1Math.abs(b.left-l.left)||b.left<=l.left)&&l.leftMath.abs(b.right-l.right)||b.right>=l.right)&&l.right>b.left},swipeStep:function(){return d.swipe_step||e.reviewsPerView()},swipePerBtn:function(){return d.swipe_per_btn||e.reviewsPerView()},swipePerDot:function(){return d.swipe_per_dot||e.reviewsPerView()},reviewWidth:function(){return Math.round(k.scrollWidth/t.length)},reviewHeight:function(){return t[0].offsetHeight},
reviewsPerView:function(){return Math.round(k.offsetWidth/e.reviewWidth())},reviewsIdx:function(){let b=rpi.Utils.isRTL()?-k.scrollLeft:k.scrollLeft;return Math.round(b/e.reviewWidth())},reviewsAhead:function(){return t.length-(e.reviewsIdx()+e.reviewsPerView())},hasDots:function(){return h&&!d.hide_dots&&0reviews.length&&g.removeChild(this);return!1}function rplg_leave_review_window(){rpi.Utils.popup(this.getAttribute("href"),620,500);return!1}
function grw_init(a,d){a=rpi.Utils.getParent(a,"wp-gr");if("true"!=a.getAttribute("data-exec")){a.setAttribute("data-exec","true");var g=JSON.parse(a.getAttribute("data-options"));rpi.Common(a,g,{time:"wp-google-time",text:"wp-google-text",readmore:"wp-more-toggle"}).init();rpi.Media(a,{},{root:"wp-gr",card:"grw-review"}).init();!a.getElementsByClassName("grw-review")[0]||"slider"!=d&&"grid"!=d||(d=a.getElementsByClassName("grw-row")[0],d=JSON.parse(d.getAttribute("data-options")),g=rpi.Column(a,
d,{cnt:"grw-row",col:"grw-row",card:"grw-review"}),rpi.Slider(a,d,{cnt:"grw-row",col:"grw-row",content:"grw-content",cards:"grw-reviews",card:"grw-review",text:"wp-google-text",btnPrev:"grw-prev",btnNext:"grw-next",dotsWrap:"rpi-dots-wrap",dots:"rpi-dots",dot:"rpi-dot"},{column:g}).init())}}
function grw_root_bg(a){if(!a)return null;const d=getComputedStyle(a).backgroundColor.replace(/\s+/g,"").toLowerCase();return d&&"transparent"!==d&&"rgba(0,0,0,0)"!==d?getComputedStyle(a).backgroundColor:grw_root_bg(a.parentElement)}function grw_boot(){const a=document.querySelectorAll('.wp-gr[data-exec="false"]');for(let g=0;g