window.csrfToken = '1dYYmdNezU'; function hasJquery(){return"undefined"!=typeof jQuery}function setupValidation(n){$(n).parent().parent().addClass("was-validated")}function validateTextarea(n){var i=$(n).attr("data-regex"),t=$(n).attr("data-message"),r=new RegExp("^"+$(n).attr("pattern")+"$");$.each($(n).val().split("\n"),function(){var u=!this.match(r);return u?$(n).next().text(i):$(n).next().text(t),typeof n.setCustomValidity=="function"?n.setCustomValidity(u?t:""):($(n).toggleClass("error",!!u),$(n).toggleClass("ok",!u),u?$(n).attr("title",t):$(n).removeAttr("title")),!u})}function isInViewport(n){if(n.offset()){var t=n.offset().top,r=t+n.outerHeight(),i=$(window).scrollTop(),u=i+$(window).height();return r>i&&tError loading content. Please try again.<\/p>")}})})}function onModeChange(n){n.matches?(destroyDesktop(),initMobile()):(destroyMobile(),initDesktop())}function imageRotate(n){$stockSlider=$(n).parent().parent().parent();var t=$stockSlider.find(".custom-scroller .scroll-item[data-order=0]"),i=$stockSlider.find(".custom-scroller .scroll-item[data-order=1]"),r=$stockSlider.find(".custom-scroller .scroll-item[data-order=2]");$stockSlider.find(".custom-scroller > div > div").each(function(n){var t=n-1;t==-1&&(t=4);$(this).attr("data-order",t);t==1?$(this).addClass("active"):$(this).removeClass("active")});$stockSlider.find(".custom-scroller > div").append(function(){return $(this).children().sort(function(n,t){return $(n).attr("data-order")-$(t).attr("data-order")})});scrollImages($stockSlider)}function scrollImages(n){var i,e,t,o,r,s,u,h,f,c;$(window).width()<768?(i=$(n).find(".custom-scroller .scroll-item[data-order=0]"),i.css({"z-index":"0",display:"none"}).animate({left:0,top:0},600,"swing"),t=$(n).find(".custom-scroller .scroll-item[data-order=1]"),t.css({"z-index":"1",display:"block"}).animate({left:0,top:0},600,"swing"),r=$(n).find(".custom-scroller .scroll-item[data-order=2]"),r.css({"z-index":"0",display:"none"}).animate({left:0,top:0},600,"swing"),u=$(n).find(".custom-scroller .scroll-item[data-order=3]"),u.css({"z-index":"0",display:"none"}).animate({left:0,top:0},600,"swing"),f=$(n).find(".custom-scroller .scroll-item[data-order=4]"),f.css({left:$(window).width(),"z-index":0,display:"none"}),$(n).find(".scroll-item").removeClass("active"),t.addClass("active")):(i=$(n).find(".custom-scroller .scroll-item[data-order=0]"),i.css("z-index","0").animate({left:-86,top:200,width:100,height:100},600,"swing"),e=$(i).find("img"),e.css("z-index","0"),t=$(n).find(".custom-scroller .scroll-item[data-order=1]"),t.css("z-index","5").animate({left:50,top:0,width:300,height:300},600,"swing"),o=$(t).find("img"),o.css("z-index","5"),r=$(n).find(".custom-scroller .scroll-item[data-order=2]"),r.css("z-index","4").animate({left:390,top:200,width:100,height:100},600,"swing"),s=$(r).find("img"),s.css("z-index","4"),u=$(n).find(".custom-scroller .scroll-item[data-order=3]"),u.css("z-index","3").animate({left:530},600,"swing"),h=$(u).find("img"),h.css("z-index","3"),f=$(n).find(".custom-scroller .scroll-item[data-order=4]"),f.css("z-index","2").css({left:660}),c=$(f).find("img"),c.css("z-index","2"),$(n).find(".scroll-item").removeClass("active"),t.addClass("active"))}function initMobile(){$(".stock-slider").each(function(n,t){mobileItems=$(t).find(".scroll-item");mobileCurrentIndex=mobileItems.filter(".active").index();mobileItems.find("a:first").height($(this).width());mobileItems.hide().eq(mobileCurrentIndex).show().addClass("active")})}function destroyMobile(){$(".stock-slider .scroll-item").stop(!0,!0).removeAttr("style").removeClass("active").show()}function showSlide(n){n=(n+mobileItems.length)%mobileItems.length;mobileItems.eq(mobileCurrentIndex).removeClass("active").fadeOut(250);mobileItems.eq(n).addClass("active").fadeIn(250);mobileCurrentIndex=n}function initDesktop(){$(".stock-slider").each(function(n,t){$(t).find(".scroll-item").stop(!0,!0).removeAttr("style").removeClass("active").show();scrollImages($(t))})}function destroyDesktop(){$(".stock-slider .scroll-item").stop(!0,!0).removeAttr("style").removeClass("active").show()}function setItemsPerSlide(){const n=window.innerWidth;itemsPerSlide=n<760?1:n<1100?2:3;const t=document.querySelectorAll(".review-carousel-item");t.forEach(t=>{t.style.flex=n<760?`0 0 calc(100% / ${itemsPerSlide})`:n<1100?`0 0 calc((100% - 15px) / ${itemsPerSlide})`:`0 0 calc((100% - 25px) / ${itemsPerSlide})`})}async function getPlaceDetails(){const n=$(".review-container").attr("data-api-key"),t=$(".review-container").attr("data-id"),i=`/WidgetLoader.ashx?reviews=1&placeId=${t}&apiKey=${n}`,r=await fetch(i),u=await r.json();return u.result}function filterFiveStarReviews(n){return n.filter(n=>n.rating===5)}function createReviewElement(n){const t=document.createElement("div");return t.className="review-carousel-item",t.innerHTML=`
★★★★★

${n.text}

${n.author_name}
${n.author_name}
${n.relative_time_description}
`,t}function updateArrows(n){const t=document.querySelector(".review-arrow.left"),i=document.querySelector(".review-arrow.right");currentIndex===0?t.classList.add("disabled"):t.classList.remove("disabled");currentIndex>=n-itemsPerSlide?i.classList.add("disabled"):i.classList.remove("disabled")}function scrollCarousel(){const n=document.querySelector(".review-carousel-inner"),t=document.querySelectorAll(".review-carousel-item").length,i=n.clientWidth/itemsPerSlide,r=-currentIndex*i;n.style.transform=`translateX(${r}px)`;updateArrows(t)}function manualScrollCarousel(n){const t=document.querySelectorAll(".review-carousel-item"),i=t.length;currentIndex=n==="left"?Math.max(currentIndex-itemsPerSlide,0):Math.min(currentIndex+itemsPerSlide,i-itemsPerSlide);scrollCarousel()}async function displayReviews(){const n=await getPlaceDetails(),t=n.reviews,i=filterFiveStarReviews(t),r=n.user_ratings_total,u=n.rating,f=document.querySelector(".review-carousel-inner");document.getElementById("review-count").textContent=r;i.forEach(n=>{const t=createReviewElement(n);f.appendChild(t)});document.querySelector(".review-arrow.left").addEventListener("click",()=>manualScrollCarousel("left"));document.querySelector(".review-arrow.right").addEventListener("click",()=>manualScrollCarousel("right"));updateAverageRatingStars(u);setItemsPerSlide();scrollCarousel()}function updateAverageRatingStars(n){const t=document.getElementById("average-rating-stars");t.innerHTML="";const i=Math.floor(n),r=n%1>=.5?1:0,u=5-i-r;for(let n=0;n