!function(){"use strict";function e(e){e.fn._fadeIn=e.fn.fadeIn;var t=e.noop||function(){},o=/MSIE/.test(navigator.userAgent),n=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),i=(document.documentMode,"function"==typeof document.createElement("div").style.setExpression&&document.createElement("div").style.setExpression);e.blockUI=function(e){d(window,e)},e.unblockUI=function(e){a(window,e)},e.growlUI=function(t,o,n,i){var s=e('<div class="growlUI"></div>');t&&s.append("<h1>"+t+"</h1>"),o&&s.append("<h2>"+o+"</h2>"),n===undefined&&(n=3e3);var l=function(t){t=t||{},e.blockUI({message:s,fadeIn:"undefined"!=typeof t.fadeIn?t.fadeIn:700,fadeOut:"undefined"!=typeof t.fadeOut?t.fadeOut:1e3,timeout:"undefined"!=typeof t.timeout?t.timeout:n,centerY:!1,showOverlay:!1,onUnblock:i,css:e.blockUI.defaults.growlCSS})};l();s.css("opacity");s.on("mouseover",function(){l({fadeIn:0,timeout:3e4});var t=e(".blockMsg");t.stop(),t.fadeTo(300,1)}).on("mouseout",function(){e(".blockMsg").fadeOut(1e3)})},e.fn.block=function(t){if(this[0]===window)return e.blockUI(t),this;var o=e.extend({},e.blockUI.defaults,t||{});return this.each(function(){var t=e(this);o.ignoreIfBlocked&&t.data("blockUI.isBlocked")||t.unblock({fadeOut:0})}),this.each(function(){"static"==e.css(this,"position")&&(this.style.position="relative",e(this).data("blockUI.static",!0)),this.style.zoom=1,d(this,t)})},e.fn.unblock=function(t){return this[0]===window?(e.unblockUI(t),this):this.each(function(){a(this,t)})},e.blockUI.version=2.7,e.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var s=null,l=[];function d(d,c){var u,b,h=d==window,k=c&&c.message!==undefined?c.message:undefined;if(!(c=e.extend({},e.blockUI.defaults,c||{})).ignoreIfBlocked||!e(d).data("blockUI.isBlocked")){if(c.overlayCSS=e.extend({},e.blockUI.defaults.overlayCSS,c.overlayCSS||{}),u=e.extend({},e.blockUI.defaults.css,c.css||{}),c.onOverlayClick&&(c.overlayCSS.cursor="pointer"),b=e.extend({},e.blockUI.defaults.themedCSS,c.themedCSS||{}),k=k===undefined?c.message:k,h&&s&&a(window,{fadeOut:0}),k&&"string"!=typeof k&&(k.parentNode||k.jquery)){var y=k.jquery?k[0]:k,m={};e(d).data("blockUI.history",m),m.el=y,m.parent=y.parentNode,m.display=y.style.display,m.position=y.style.position,m.parent&&m.parent.removeChild(y)}e(d).data("blockUI.onUnblock",c.onUnblock);var g,v,I,w,U=c.baseZ;g=o||c.forceIframe?e('<iframe class="blockUI" style="z-index:'+U+++';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+c.iframeSrc+'"></iframe>'):e('<div class="blockUI" style="display:none"></div>'),v=c.theme?e('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+U+++';display:none"></div>'):e('<div class="blockUI blockOverlay" style="z-index:'+U+++';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'),c.theme&&h?(w='<div class="blockUI '+c.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(U+10)+';display:none;position:fixed">',c.title&&(w+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(c.title||"&nbsp;")+"</div>"),w+='<div class="ui-widget-content ui-dialog-content"></div>',w+="</div>"):c.theme?(w='<div class="blockUI '+c.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(U+10)+';display:none;position:absolute">',c.title&&(w+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(c.title||"&nbsp;")+"</div>"),w+='<div class="ui-widget-content ui-dialog-content"></div>',w+="</div>"):w=h?'<div class="blockUI '+c.blockMsgClass+' blockPage" style="z-index:'+(U+10)+';display:none;position:fixed"></div>':'<div class="blockUI '+c.blockMsgClass+' blockElement" style="z-index:'+(U+10)+';display:none;position:absolute"></div>',I=e(w),k&&(c.theme?(I.css(b),I.addClass("ui-widget-content")):I.css(u)),c.theme||v.css(c.overlayCSS),v.css("position",h?"fixed":"absolute"),(o||c.forceIframe)&&g.css("opacity",0);var x=[g,v,I],C=e(h?"body":d);e.each(x,function(){this.appendTo(C)}),c.theme&&c.draggable&&e.fn.draggable&&I.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var S=i&&(!e.support.boxModel||e("object,embed",h?null:d).length>0);if(n||S){if(h&&c.allowBodyStretch&&e.support.boxModel&&e("html,body").css("height","100%"),(n||!e.support.boxModel)&&!h)var E=p(d,"borderTopWidth"),O=p(d,"borderLeftWidth"),T=E?"(0 - "+E+")":0,M=O?"(0 - "+O+")":0;e.each(x,function(e,t){var o=t[0].style;if(o.position="absolute",e<2)h?o.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+c.quirksmodeOffsetHack+') + "px"'):o.setExpression("height",'this.parentNode.offsetHeight + "px"'),h?o.setExpression("width",'jQuery.support.boxModel&&document.documentElement.clientWidth||document.body.clientWidth + "px"'):o.setExpression("width",'this.parentNode.offsetWidth + "px"'),M&&o.setExpression("left",M),T&&o.setExpression("top",T);else if(c.centerY)h&&o.setExpression("top",'(document.documentElement.clientHeight||document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah=document.documentElement.scrollTop ? document.documentElement.scrollTop:document.body.scrollTop) + "px"'),o.marginTop=0;else if(!c.centerY&&h){var n="((document.documentElement.scrollTop ? document.documentElement.scrollTop:document.body.scrollTop) + "+(c.css&&c.css.top?parseInt(c.css.top,10):0)+') + "px"';o.setExpression("top",n)}})}if(k&&(c.theme?I.find(".ui-widget-content").append(k):I.append(k),(k.jquery||k.nodeType)&&e(k).show()),(o||c.forceIframe)&&c.showOverlay&&g.show(),c.fadeIn){var B=c.onBlock?c.onBlock:t,j=c.showOverlay&&!k?B:t,H=k?B:t;c.showOverlay&&v._fadeIn(c.fadeIn,j),k&&I._fadeIn(c.fadeIn,H)}else c.showOverlay&&v.show(),k&&I.show(),c.onBlock&&c.onBlock.bind(I)();if(r(1,d,c),h?(s=I[0],l=e(c.focusableElements,s),c.focusInput&&setTimeout(f,20)):function(e,t,o){var n=e.parentNode,i=e.style,s=(n.offsetWidth-e.offsetWidth)/2-p(n,"borderLeftWidth"),l=(n.offsetHeight-e.offsetHeight)/2-p(n,"borderTopWidth");t&&(i.left=s>0?s+"px":"0");o&&(i.top=l>0?l+"px":"0")}(I[0],c.centerX,c.centerY),c.timeout){var z=setTimeout(function(){h?e.unblockUI(c):e(d).unblock(c)},c.timeout);e(d).data("blockUI.timeout",z)}}}function a(t,o){var n,i,d=t==window,a=e(t),u=a.data("blockUI.history"),f=a.data("blockUI.timeout");f&&(clearTimeout(f),a.removeData("blockUI.timeout")),o=e.extend({},e.blockUI.defaults,o||{}),r(0,t,o),null===o.onUnblock&&(o.onUnblock=a.data("blockUI.onUnblock"),a.removeData("blockUI.onUnblock")),i=d?e(document.body).children().filter(".blockUI").add("body > .blockUI"):a.find(">.blockUI"),o.cursorReset&&(i.length>1&&(i[1].style.cursor=o.cursorReset),i.length>2&&(i[2].style.cursor=o.cursorReset)),d&&(s=l=null),o.fadeOut?(n=i.length,i.stop().fadeOut(o.fadeOut,function(){0==--n&&c(i,u,o,t)})):c(i,u,o,t)}function c(t,o,n,i){var s=e(i);if(!s.data("blockUI.isBlocked")){t.each(function(e,t){this.parentNode&&this.parentNode.removeChild(this)}),o&&o.el&&(o.el.style.display=o.display,o.el.style.position=o.position,o.el.style.cursor="default",o.parent&&o.parent.appendChild(o.el),s.removeData("blockUI.history")),s.data("blockUI.static")&&s.css("position","static"),"function"==typeof n.onUnblock&&n.onUnblock(i,n);var l=e(document.body),d=l.width(),a=l[0].style.width;l.width(d-1).width(d),l[0].style.width=a}}function r(t,o,n){var i=o==window,l=e(o);if((t||(!i||s)&&(i||l.data("blockUI.isBlocked")))&&(l.data("blockUI.isBlocked",t),i&&n.bindEvents&&(!t||n.showOverlay))){var d="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";t?e(document).on(d,n,u):e(document).off(d,u)}}function u(t){if("keydown"===t.type&&t.keyCode&&9==t.keyCode&&s&&t.data.constrainTabKey){var o=l,n=!t.shiftKey&&t.target===o[o.length-1],i=t.shiftKey&&t.target===o[0];if(n||i)return setTimeout(function(){f(i)},10),!1}var d=t.data,a=e(t.target);return a.hasClass("blockOverlay")&&d.onOverlayClick&&d.onOverlayClick(t),a.parents("div."+d.blockMsgClass).length>0||0===a.parents().children().filter("div.blockUI").length}function f(e){if(l){var t=l[!0===e?l.length-1:0];t&&t.trigger("focus")}}function p(t,o){return parseInt(e.css(t,o),10)||0}}"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}();
!function(o){var t={url:!1,callback:!1,target:!1,duration:120,on:"mouseover",touch:!0,onZoomIn:!1,onZoomOut:!1,magnify:1};o.zoom=function(t,e,n,i){var u,a,c,r,l,m,f,s=o(t),h=s.css("position"),d=o(e);return t.style.position=/(absolute|fixed)/.test(h)?h:"relative",t.style.overflow="hidden",n.style.width=n.style.height="",o(n).addClass("zoomImg").css({position:"absolute",top:0,left:0,opacity:0,width:n.width*i,height:n.height*i,border:"none",maxWidth:"none",maxHeight:"none"}).appendTo(t),{init:function(){a=s.outerWidth(),u=s.outerHeight(),e===t?(r=a,c=u):(r=d.outerWidth(),c=d.outerHeight()),l=(n.width-a)/r,m=(n.height-u)/c,f=d.offset()},move:function(o){var t=o.pageX-f.left,e=o.pageY-f.top;e=Math.max(Math.min(e,c),0),t=Math.max(Math.min(t,r),0),n.style.left=t*-l+"px",n.style.top=e*-m+"px"}}},o.fn.zoom=function(e){return this.each(function(){var n=o.extend({},t,e||{}),i=n.target&&o(n.target)[0]||this,u=this,a=o(u),c=document.createElement("img"),r=o(c),l="mousemove.zoom",m=!1,f=!1;if(!n.url){var s=u.querySelector("img");if(s&&(n.url=s.getAttribute("data-src")||s.currentSrc||s.src,n.alt=s.getAttribute("data-alt")||s.alt),!n.url)return}a.one("zoom.destroy",function(o,t){a.off(".zoom"),i.style.position=o,i.style.overflow=t,c.onload=null,r.remove()}.bind(this,i.style.position,i.style.overflow)),c.onload=function(){var t=o.zoom(i,u,c,n.magnify);function e(e){t.init(),t.move(e),r.stop().fadeTo(o.support.opacity?n.duration:0,1,"function"==typeof n.onZoomIn&&n.onZoomIn.call(c))}function s(){r.stop().fadeTo(n.duration,0,"function"==typeof n.onZoomOut&&n.onZoomOut.call(c))}"grab"===n.on?a.on("mousedown.zoom",function(n){1===n.which&&(o(document).one("mouseup.zoom",function(){s(),o(document).off(l,t.move)}),e(n),o(document).on(l,t.move),n.preventDefault())}):"click"===n.on?a.on("click.zoom",function(n){return m?void 0:(m=!0,e(n),o(document).on(l,t.move),o(document).one("click.zoom",function(){s(),m=!1,o(document).off(l,t.move)}),!1)}):"toggle"===n.on?a.on("click.zoom",function(o){m?s():e(o),m=!m}):"mouseover"===n.on&&(t.init(),a.on("mouseenter.zoom",e).on("mouseleave.zoom",s).on(l,t.move)),n.touch&&a.on("touchstart.zoom",function(o){o.preventDefault(),f?(f=!1,s()):(f=!0,e(o.originalEvent.touches[0]||o.originalEvent.changedTouches[0]))}).on("touchmove.zoom",function(o){o.preventDefault(),t.move(o.originalEvent.touches[0]||o.originalEvent.changedTouches[0])}).on("touchend.zoom",function(o){o.preventDefault(),f&&(f=!1,s())}),"function"==typeof n.callback&&n.callback.call(c)},c.setAttribute("role","presentation"),c.alt=n.alt||"",c.src=n.url})},o.fn.zoom.defaults=t}(window.jQuery);
!function(e){var t=!0,a={swing:"cubic-bezier(.02, .01, .47, 1)",linear:"linear",easeInQuad:"cubic-bezier(0.11, 0, 0.5, 0)",easeOutQuad:"cubic-bezier(0.5, 1, 0.89, 1)",easeInOutQuad:"cubic-bezier(0.45, 0, 0.55, 1)",easeInCubic:"cubic-bezier(0.32, 0, 0.67, 0)",easeOutCubic:"cubic-bezier(0.33, 1, 0.68, 1)",easeInOutCubic:"cubic-bezier(0.65, 0, 0.35, 1)",easeInQuart:"cubic-bezier(0.5, 0, 0.75, 0)",easeOutQuart:"cubic-bezier(0.25, 1, 0.5, 1)",easeInOutQuart:"cubic-bezier(0.76, 0, 0.24, 1)",easeInQuint:"cubic-bezier(0.64, 0, 0.78, 0)",easeOutQuint:"cubic-bezier(0.22, 1, 0.36, 1)",easeInOutQuint:"cubic-bezier(0.83, 0, 0.17, 1)",easeInSine:"cubic-bezier(0.12, 0, 0.39, 0)",easeOutSine:"cubic-bezier(0.61, 1, 0.88, 1)",easeInOutSine:"cubic-bezier(0.37, 0, 0.63, 1)",easeInExpo:"cubic-bezier(0.7, 0, 0.84, 0)",easeOutExpo:"cubic-bezier(0.16, 1, 0.3, 1)",easeInOutExpo:"cubic-bezier(0.87, 0, 0.13, 1)",easeInCirc:"cubic-bezier(0.55, 0, 1, 0.45)",easeOutCirc:"cubic-bezier(0, 0.55, 0.45, 1)",easeInOutCirc:"cubic-bezier(0.85, 0, 0.15, 1)",easeInBack:"cubic-bezier(0.36, 0, 0.66, -0.56)",easeOutBack:"cubic-bezier(0.34, 1.56, 0.64, 1)",easeInOutBack:"cubic-bezier(0.68, -0.6, 0.32, 1.6)"};a.jswing=a.swing,e.flexslider=function(i,n){var s=e(i);"undefined"==typeof n.rtl&&"rtl"==e("html").attr("dir")&&(n.rtl=!0),s.vars=e.extend({},e.flexslider.defaults,n);var r,o=s.vars.namespace,l=("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)&&s.vars.touch,c="click touchend keyup flexslider-click",u="",d=a[s.vars.easing]||"ease",v="vertical"===s.vars.direction,p=s.vars.reverse,m=s.vars.itemWidth>0,f="fade"===s.vars.animation,h=""!==s.vars.asNavFor,g={};e.data(i,"flexslider",s),g={init:function(){s.animating=!1,s.currentSlide=parseInt(s.vars.startAt?s.vars.startAt:0,10),isNaN(s.currentSlide)&&(s.currentSlide=0),s.animatingTo=s.currentSlide,s.atEnd=0===s.currentSlide||s.currentSlide===s.last,s.containerSelector=s.vars.selector.substr(0,s.vars.selector.search(" ")),s.slides=e(s.vars.selector,s),s.container=e(s.containerSelector,s),s.count=s.slides.length,s.syncExists=e(s.vars.sync).length>0,"slide"===s.vars.animation&&(s.vars.animation="swing"),s.prop=v?"top":s.vars.rtl?"marginRight":"marginLeft",s.args={},s.manualPause=!1,s.stopped=!1,s.started=!1,s.startTimeout=null,s.transforms=s.transitions=!s.vars.video&&!f&&s.vars.useCSS,s.transforms&&(s.prop="transform"),s.isFirefox=navigator.userAgent.toLowerCase().indexOf("firefox")>-1,s.ensureAnimationEnd="",""!==s.vars.controlsContainer&&(s.controlsContainer=e(s.vars.controlsContainer).length>0&&e(s.vars.controlsContainer)),""!==s.vars.manualControls&&(s.manualControls=e(s.vars.manualControls).length>0&&e(s.vars.manualControls)),""!==s.vars.customDirectionNav&&(s.customDirectionNav=2===e(s.vars.customDirectionNav).length&&e(s.vars.customDirectionNav)),s.vars.randomize&&(s.slides.sort(function(){return Math.round(Math.random())-.5}),s.container.empty().append(s.slides)),s.doMath(),s.setup("init"),s.vars.controlNav&&g.controlNav.setup(),s.vars.directionNav&&g.directionNav.setup(),s.vars.keyboard&&(1===e(s.containerSelector).length||s.vars.multipleKeyboard)&&e(document).on("keyup",function(e){var t=e.keyCode;if(!s.animating&&(39===t||37===t)){var a=s.vars.rtl?37===t?s.getTarget("next"):39===t&&s.getTarget("prev"):39===t?s.getTarget("next"):37===t&&s.getTarget("prev");s.flexAnimate(a,s.vars.pauseOnAction)}}),s.vars.mousewheel&&s.on("mousewheel",function(e,t,a,i){e.preventDefault();var n=t<0?s.getTarget("next"):s.getTarget("prev");s.flexAnimate(n,s.vars.pauseOnAction)}),s.vars.pausePlay&&g.pausePlay.setup(),s.vars.slideshow&&s.vars.pauseInvisible&&g.pauseInvisible(),s.vars.slideshow&&(s.vars.pauseOnHover&&s.on("mouseenter",function(){s.manualPlay||s.manualPause||s.pause()}).on("mouseleave",function(){s.manualPause||s.manualPlay||s.stopped||s.play()}),s.vars.pauseInvisible&&"visible"!==document.visibilityState||(s.vars.initDelay>0?s.startTimeout=setTimeout(s.play,s.vars.initDelay):s.play())),h&&g.asNav.setup(),l&&s.vars.touch&&g.touch(),(!f||f&&s.vars.smoothHeight)&&e(window).on("resize orientationchange focus",g.resize),s.find("img").attr("draggable","false"),setTimeout(function(){s.vars.start(s)},200)},asNav:{setup:function(){s.asNav=!0,s.animatingTo=Math.floor(s.currentSlide/s.move),s.currentItem=s.currentSlide,s.slides.removeClass(o+"active-slide").eq(s.currentItem).addClass(o+"active-slide"),s.slides.on(c,function(t){t.preventDefault();var a=e(this),i=a.index();(s.vars.rtl?-1*(a.offset().right-e(s).scrollLeft()):a.offset().left-e(s).scrollLeft())<=0&&a.hasClass(o+"active-slide")?s.flexAnimate(s.getTarget("prev"),!0):e(s.vars.asNavFor).data("flexslider").animating||a.hasClass(o+"active-slide")||(s.direction=s.currentItem<i?"next":"prev",s.flexAnimate(i,s.vars.pauseOnAction,!1,!0,!0))})}},controlNav:{setup:function(){s.manualControls?g.controlNav.setupManual():g.controlNav.setupPaging()},setupPaging:function(){var t,a,i="thumbnails"===s.vars.controlNav?"control-thumbs":"control-paging",n=1;if(s.controlNavScaffold=e('<ol class="'+o+"control-nav "+o+i+'"></ol>'),s.pagingCount>1)for(var r=0;r<s.pagingCount;r++){if(a=s.slides.eq(r),undefined===a.attr("data-thumb-alt")&&a.attr("data-thumb-alt",""),t=e("<a></a>").attr("href","#").text(n),"thumbnails"===s.vars.controlNav&&(t=e("<img/>",{onload:"this.width=this.naturalWidth; this.height=this.naturalHeight",src:a.attr("data-thumb"),srcset:a.attr("data-thumb-srcset"),sizes:a.attr("data-thumb-sizes"),alt:a.attr("alt")})),""!==a.attr("data-thumb-alt")&&t.attr("alt",a.attr("data-thumb-alt")),"thumbnails"===s.vars.controlNav&&!0===s.vars.thumbCaptions){var l=a.attr("data-thumbcaption");if(""!==l&&undefined!==l){var d=e("<span></span>").addClass(o+"caption").text(l);t.append(d)}}var v=e("<li>");t.appendTo(v),v.append("</li>"),s.controlNavScaffold.append(v),n++}s.controlsContainer?e(s.controlsContainer).append(s.controlNavScaffold):s.append(s.controlNavScaffold),g.controlNav.set(),g.controlNav.active(),s.controlNavScaffold.on(c,"a, img",function(t){if(t.preventDefault(),""===u||u===t.type||"flexslider-click"===t.type){var a=e(this),i=s.controlNav.index(a);a.hasClass(o+"active")||(s.direction=i>s.currentSlide?"next":"prev",s.flexAnimate(i,s.vars.pauseOnAction))}""===u&&"flexslider-click"!==t.type&&(u=t.type),g.setToClearWatchedEvent()})},setupManual:function(){s.controlNav=s.manualControls,g.controlNav.active(),s.controlNav.on(c,function(t){if(t.preventDefault(),""===u||u===t.type||"flexslider-click"===t.type){var a=e(this),i=s.controlNav.index(a);a.hasClass(o+"active")||(i>s.currentSlide?s.direction="next":s.direction="prev",s.flexAnimate(i,s.vars.pauseOnAction))}""===u&&"flexslider-click"!==t.type&&(u=t.type),g.setToClearWatchedEvent()})},set:function(){var t="thumbnails"===s.vars.controlNav?"img":"a";s.controlNav=e("."+o+"control-nav li "+t,s.controlsContainer?s.controlsContainer:s)},active:function(){s.controlNav.removeClass(o+"active").eq(s.animatingTo).addClass(o+"active")},update:function(t,a){s.pagingCount>1&&"add"===t?s.controlNavScaffold.append(e('<li><a href="#">'+s.count+"</a></li>")):1===s.pagingCount?s.controlNavScaffold.find("li").remove():s.controlNav.eq(a).closest("li").remove(),g.controlNav.set(),s.pagingCount>1&&s.pagingCount!==s.controlNav.length?s.update(a,t):g.controlNav.active()}},directionNav:{setup:function(){var t=e('<ul class="'+o+'direction-nav"><li class="'+o+'nav-prev"><a class="'+o+'prev" href="#">'+s.vars.prevText+'</a></li><li class="'+o+'nav-next"><a class="'+o+'next" href="#">'+s.vars.nextText+"</a></li></ul>");s.customDirectionNav?s.directionNav=s.customDirectionNav:s.controlsContainer?(e(s.controlsContainer).append(t),s.directionNav=e("."+o+"direction-nav li a",s.controlsContainer)):(s.append(t),s.directionNav=e("."+o+"direction-nav li a",s)),g.directionNav.update(),s.directionNav.on(c,function(t){var a;t.preventDefault(),""!==u&&u!==t.type&&"flexslider-click"!==t.type||(a=e(this).hasClass(o+"next")?s.getTarget("next"):s.getTarget("prev"),s.flexAnimate(a,s.vars.pauseOnAction)),""===u&&"flexslider-click"!==t.type&&(u=t.type),g.setToClearWatchedEvent()})},update:function(){var e=o+"disabled";1===s.pagingCount?s.directionNav.addClass(e).attr("tabindex","-1"):s.vars.animationLoop?s.directionNav.removeClass(e).prop("tabindex","-1"):0===s.animatingTo?s.directionNav.removeClass(e).filter("."+o+"prev").addClass(e).attr("tabindex","-1"):s.animatingTo===s.last?s.directionNav.removeClass(e).filter("."+o+"next").addClass(e).attr("tabindex","-1"):s.directionNav.removeClass(e).prop("tabindex","-1")}},pausePlay:{setup:function(){var t=e('<div class="'+o+'pauseplay"><a href="#"></a></div>');s.controlsContainer?(s.controlsContainer.append(t),s.pausePlay=e("."+o+"pauseplay a",s.controlsContainer)):(s.append(t),s.pausePlay=e("."+o+"pauseplay a",s)),g.pausePlay.update(s.vars.slideshow?o+"pause":o+"play"),s.pausePlay.on(c,function(t){t.preventDefault(),""!==u&&u!==t.type&&"flexslider-click"!==t.type||(e(this).hasClass(o+"pause")?(s.manualPause=!0,s.manualPlay=!1,s.pause()):(s.manualPause=!1,s.manualPlay=!0,s.play())),""===u&&"flexslider-click"!==t.type&&(u=t.type),g.setToClearWatchedEvent()})},update:function(e){"play"===e?s.pausePlay.removeClass(o+"pause").addClass(o+"play").html(s.vars.playText):s.pausePlay.removeClass(o+"play").addClass(o+"pause").html(s.vars.pauseText)}},touch:function(){var e,t,a,n,r,o,l,c,u,d=!1,h=0,g=0;l=function(r){s.animating?r.preventDefault():1===r.touches.length&&(s.pause(),n=v?s.h:s.w,o=Number(new Date),h=r.touches[0].pageX,g=r.touches[0].pageY,a=m&&p&&s.animatingTo===s.last?0:m&&p?s.limit-(s.itemW+s.vars.itemMargin)*s.move*s.animatingTo:m&&s.currentSlide===s.last?s.limit:m?(s.itemW+s.vars.itemMargin)*s.move*s.currentSlide:p?(s.last-s.currentSlide+s.cloneOffset)*n:(s.currentSlide+s.cloneOffset)*n,e=v?g:h,t=v?h:g,i.addEventListener("touchmove",c,!1),i.addEventListener("touchend",u,!1))},c=function(i){h=i.touches[0].pageX,g=i.touches[0].pageY,r=v?e-g:(s.vars.rtl?-1:1)*(e-h);(!(d=v?Math.abs(r)<Math.abs(h-t):Math.abs(r)<Math.abs(g-t))||Number(new Date)-o>500)&&(i.preventDefault(),f||(s.vars.animationLoop||(r/=0===s.currentSlide&&r<0||s.currentSlide===s.last&&r>0?Math.abs(r)/n+2:1),s.setProps(a+r,"setTouch")))},u=function(l){if(i.removeEventListener("touchmove",c,!1),s.animatingTo===s.currentSlide&&!d&&null!==r){var v=p?-r:r,m=v>0?s.getTarget("next"):s.getTarget("prev");s.canAdvance(m)&&(Number(new Date)-o<550&&Math.abs(v)>50||Math.abs(v)>n/2)?s.flexAnimate(m,s.vars.pauseOnAction):f||s.flexAnimate(s.currentSlide,s.vars.pauseOnAction,!0)}i.removeEventListener("touchend",u,!1),e=null,t=null,r=null,a=null},i.addEventListener("touchstart",l,!1)},resize:function(){!s.animating&&s.is(":visible")&&(m||s.doMath(),f?g.smoothHeight():m?(s.slides.width(s.computedW),s.update(s.pagingCount),s.setProps()):v?(s.viewport.height(s.h),s.setProps(s.h,"setTotal")):(s.setProps(s.computedW,"setTotal"),s.newSlides.width(s.computedW),s.vars.smoothHeight&&g.smoothHeight()))},smoothHeight:function(e){v&&!f||(f?s:s.viewport).css({height:s.slides.eq(s.animatingTo).innerHeight(),transition:e?"height "+e+"ms":"none"})},sync:function(t){var a=e(s.vars.sync).data("flexslider"),i=s.animatingTo;switch(t){case"animate":a.flexAnimate(i,s.vars.pauseOnAction,!1,!0);break;case"play":a.playing||a.asNav||a.play();break;case"pause":a.pause()}},uniqueID:function(t){return t.filter("[id]").add(t.find("[id]")).each(function(){var t=e(this);t.attr("id",t.attr("id")+"_clone")}),t},pauseInvisible:function(){document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState?s.startTimeout?clearTimeout(s.startTimeout):s.pause():s.started?s.play():s.vars.initDelay>0?setTimeout(s.play,s.vars.initDelay):s.play()})},setToClearWatchedEvent:function(){clearTimeout(r),r=setTimeout(function(){u=""},3e3)}},s.flexAnimate=function(t,a,i,n,r){if(s.vars.animationLoop||t===s.currentSlide||(s.direction=t>s.currentSlide?"next":"prev"),h&&1===s.pagingCount&&(s.direction=s.currentItem<t?"next":"prev"),!s.animating&&(s.canAdvance(t,r)||i)&&s.is(":visible")){if(h&&n){var c=e(s.vars.asNavFor).data("flexslider");if(s.atEnd=0===t||t===s.count-1,c.flexAnimate(t,!0,!1,!0,r),s.direction=s.currentItem<t?"next":"prev",c.direction=s.direction,Math.ceil((t+1)/s.visible)-1===s.currentSlide||0===t)return s.currentItem=t,s.slides.removeClass(o+"active-slide").eq(t).addClass(o+"active-slide"),!1;s.currentItem=t,s.slides.removeClass(o+"active-slide").eq(t).addClass(o+"active-slide"),t=Math.floor(t/s.visible)}if(s.animating=!0,s.animatingTo=t,a&&s.pause(),s.vars.before(s),s.syncExists&&!r&&g.sync("animate"),s.vars.controlNav&&g.controlNav.active(),m||s.slides.removeClass(o+"active-slide").eq(t).addClass(o+"active-slide"),s.atEnd=0===t||t===s.last,s.vars.directionNav&&g.directionNav.update(),t===s.last&&(s.vars.end(s),s.vars.animationLoop||s.pause()),f)l||(s.slides.eq(s.currentSlide).off("transitionend"),s.slides.eq(t).off("transitionend").on("transitionend",s.wrapup)),s.slides.eq(s.currentSlide).css({opacity:0,zIndex:1}),s.slides.eq(t).css({opacity:1,zIndex:2}),l&&s.wrapup(y);else{var u,d,b,y=v?s.slides.filter(":first").height():s.computedW;m?(u=s.vars.itemMargin,d=(b=(s.itemW+u)*s.move*s.animatingTo)>s.limit&&1!==s.visible?s.limit:b):d=0===s.currentSlide&&t===s.count-1&&s.vars.animationLoop&&"next"!==s.direction?p?(s.count+s.cloneOffset)*y:0:s.currentSlide===s.last&&0===t&&s.vars.animationLoop&&"prev"!==s.direction?p?0:(s.count+1)*y:p?(s.count-1-t+s.cloneOffset)*y:(t+s.cloneOffset)*y,s.setProps(d,"",s.vars.animationSpeed),s.vars.animationLoop&&s.atEnd||(s.animating=!1,s.currentSlide=s.animatingTo),s.container.off("transitionend"),s.container.on("transitionend",function(){clearTimeout(s.ensureAnimationEnd),s.wrapup(y)}),clearTimeout(s.ensureAnimationEnd),s.ensureAnimationEnd=setTimeout(function(){s.wrapup(y)},s.vars.animationSpeed+100)}s.vars.smoothHeight&&g.smoothHeight(s.vars.animationSpeed)}},s.wrapup=function(e){f||m||(0===s.currentSlide&&s.animatingTo===s.last&&s.vars.animationLoop?s.setProps(e,"jumpEnd"):s.currentSlide===s.last&&0===s.animatingTo&&s.vars.animationLoop&&s.setProps(e,"jumpStart")),s.animating=!1,s.currentSlide=s.animatingTo,s.vars.after(s)},s.animateSlides=function(){!s.animating&&t&&s.flexAnimate(s.getTarget("next"))},s.pause=function(){clearInterval(s.animatedSlides),s.animatedSlides=null,s.playing=!1,s.vars.pausePlay&&g.pausePlay.update("play"),s.syncExists&&g.sync("pause")},s.play=function(){s.playing&&clearInterval(s.animatedSlides),s.animatedSlides=s.animatedSlides||setInterval(s.animateSlides,s.vars.slideshowSpeed),s.started=s.playing=!0,s.vars.pausePlay&&g.pausePlay.update("pause"),s.syncExists&&g.sync("play")},s.stop=function(){s.pause(),s.stopped=!0},s.canAdvance=function(e,t){var a=h?s.pagingCount-1:s.last;return!!t||(!(!h||s.currentItem!==s.count-1||0!==e||"prev"!==s.direction)||(!h||0!==s.currentItem||e!==s.pagingCount-1||"next"===s.direction)&&(!(e===s.currentSlide&&!h)&&(!!s.vars.animationLoop||(!s.atEnd||0!==s.currentSlide||e!==a||"next"===s.direction)&&(!s.atEnd||s.currentSlide!==a||0!==e||"next"!==s.direction))))},s.getTarget=function(e){return s.direction=e,"next"===e?s.currentSlide===s.last?0:s.currentSlide+1:0===s.currentSlide?s.last:s.currentSlide-1},s.setProps=function(e,t,a){var i,n=(i=e||(s.itemW+s.vars.itemMargin)*s.move*s.animatingTo,function(){if(m)return"setTouch"===t?e:p&&s.animatingTo===s.last?0:p?s.limit-(s.itemW+s.vars.itemMargin)*s.move*s.animatingTo:s.animatingTo===s.last?s.limit:i;switch(t){case"setTotal":return p?(s.count-1-s.currentSlide+s.cloneOffset)*e:(s.currentSlide+s.cloneOffset)*e;case"setTouch":return e;case"jumpEnd":return p?e:s.count*e;case"jumpStart":return p?s.count*e:e;default:return e}}()*(s.vars.rtl?1:-1)+"px");a=a!==undefined?a/1e3+"s":"0s",s.container.css("transition-duration",a),s.transforms?n=v?"translate3d(0,"+n+",0)":"translate3d("+parseInt(n)+"px,0,0)":s.container.css("transition-timing-function",d),s.args[s.prop]=n,s.container.css(s.args)},s.setup=function(t){var a,i;f?(s.vars.rtl?s.slides.css({width:"100%",float:"right",marginLeft:"-100%",position:"relative"}):s.slides.css({width:"100%",float:"left",marginRight:"-100%",position:"relative"}),"init"===t&&(l?s.slides.css({opacity:0,display:"block",transition:"opacity "+s.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(s.currentSlide).css({opacity:1,zIndex:2}):(0==s.vars.fadeFirstSlide?(s.slides.css({opacity:0,display:"block",zIndex:1}).eq(s.currentSlide).css({opacity:1,zIndex:2}),s.slides.outerWidth()):(s.slides.css({opacity:0,display:"block",zIndex:1}).outerWidth(),s.slides.eq(s.currentSlide).css({opacity:1,zIndex:2})),s.slides.css({transition:"opacity "+s.vars.animationSpeed/1e3+"s "+d}))),s.vars.smoothHeight&&g.smoothHeight()):("init"===t&&(s.viewport=e('<div class="'+o+'viewport"></div>').css({overflow:"hidden",position:"relative"}).appendTo(s).append(s.container),s.cloneCount=0,s.cloneOffset=0,p&&(i=e.makeArray(s.slides).reverse(),s.slides=e(i),s.container.empty().append(s.slides))),s.vars.animationLoop&&!m&&(s.cloneCount=2,s.cloneOffset=1,"init"!==t&&s.container.find(".clone").remove(),s.container.append(g.uniqueID(s.slides.first().clone().addClass("clone")).attr("aria-hidden","true")).prepend(g.uniqueID(s.slides.last().clone().addClass("clone")).attr("aria-hidden","true"))),s.newSlides=e(s.vars.selector,s),a=p?s.count-1-s.currentSlide+s.cloneOffset:s.currentSlide+s.cloneOffset,v&&!m?(s.container.height(200*(s.count+s.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){s.newSlides.css({display:"block"}),s.doMath(),s.viewport.height(s.h),s.setProps(a*s.h,"init")},"init"===t?100:0)):(s.container.width(200*(s.count+s.cloneCount)+"%"),s.setProps(a*s.computedW,"init"),setTimeout(function(){s.doMath(),s.vars.rtl?s.newSlides.css({width:s.computedW,marginRight:s.computedM,float:"right",display:"block"}):s.newSlides.css({width:s.computedW,marginRight:s.computedM,float:"left",display:"block"}),s.vars.smoothHeight&&g.smoothHeight()},"init"===t?100:0)));m||s.slides.removeClass(o+"active-slide").eq(s.currentSlide).addClass(o+"active-slide"),s.vars.init(s)},s.doMath=function(){var e=s.slides.first(),t=s.vars.itemMargin,a=s.vars.minItems,i=s.vars.maxItems;s.w=s.viewport===undefined?s.width():s.viewport.width(),s.isFirefox&&(s.w=s.width()),s.h=e.height(),s.boxPadding=e.outerWidth()-e.width(),m?(s.itemT=s.vars.itemWidth+t,s.itemM=t,s.minW=a?a*s.itemT:s.w,s.maxW=i?i*s.itemT-t:s.w,s.itemW=s.minW>s.w?(s.w-t*(a-1))/a:s.maxW<s.w?(s.w-t*(i-1))/i:s.vars.itemWidth>s.w?s.w:s.vars.itemWidth,s.visible=Math.floor(s.w/s.itemW),s.move=s.vars.move>0&&s.vars.move<s.visible?s.vars.move:s.visible,s.pagingCount=Math.ceil((s.count-s.visible)/s.move+1),s.last=s.pagingCount-1,s.limit=1===s.pagingCount?0:s.vars.itemWidth>s.w?s.itemW*(s.count-1)+t*(s.count-1):(s.itemW+t)*s.count-s.w-t):(s.itemW=s.w,s.itemM=t,s.pagingCount=s.count,s.last=s.count-1),s.computedW=s.itemW-s.boxPadding,s.computedM=s.itemM},s.update=function(e,t){s.doMath(),m||(e<s.currentSlide?s.currentSlide+=1:e<=s.currentSlide&&0!==e&&(s.currentSlide-=1),s.animatingTo=s.currentSlide),s.vars.controlNav&&!s.manualControls&&("add"===t&&!m||s.pagingCount>s.controlNav.length?g.controlNav.update("add"):("remove"===t&&!m||s.pagingCount<s.controlNav.length)&&(m&&s.currentSlide>s.last&&(s.currentSlide-=1,s.animatingTo-=1),g.controlNav.update("remove",s.last))),s.vars.directionNav&&g.directionNav.update()},s.addSlide=function(t,a){var i=e(t);s.count+=1,s.last=s.count-1,v&&p?a!==undefined?s.slides.eq(s.count-a).after(i):s.container.prepend(i):a!==undefined?s.slides.eq(a).before(i):s.container.append(i),s.update(a,"add"),s.slides=e(s.vars.selector+":not(.clone)",s),s.setup(),s.vars.added(s)},s.removeSlide=function(t){var a=isNaN(t)?s.slides.index(e(t)):t;s.count-=1,s.last=s.count-1,isNaN(t)?e(t,s.slides).remove():v&&p?s.slides.eq(s.last).remove():s.slides.eq(t).remove(),s.doMath(),s.update(a,"remove"),s.slides=e(s.vars.selector+":not(.clone)",s),s.setup(),s.vars.removed(s)},g.init()},e(window).on("blur",function(e){t=!1}).on("focus",function(e){t=!0}),e.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,fadeFirstSlide:!0,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",customDirectionNav:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,isFirefox:!1,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){},rtl:!1},e.fn.flexslider=function(t){if(t===undefined&&(t={}),"object"==typeof t)return this.each(function(){var a=e(this),i=t.selector?t.selector:".slides > li",n=a.find(i);if(1===n.length&&!1===t.allowOneSlide||0===n.length){n.length&&n[0].animate([{opacity:0},{opacity:1}],400),t.start&&t.start(a)}else a.data("flexslider")===undefined&&new e.flexslider(this,t)});var a=e(this).data("flexslider");switch(t){case"play":a.play();break;case"pause":a.pause();break;case"stop":a.stop();break;case"next":a.flexAnimate(a.getTarget("next"),!0);break;case"prev":case"previous":a.flexAnimate(a.getTarget("prev"),!0);break;default:"number"==typeof t&&a.flexAnimate(t,!0)}}}(jQuery);
!function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.PhotoSwipe=t()}(this,function(){"use strict";return function(e,t,n,i){var o={features:null,bind:function(e,t,n,i){var o=(i?"remove":"add")+"EventListener";t=t.split(" ");for(var a=0;a<t.length;a++)t[a]&&e[o](t[a],n,!1)},isArray:function(e){return e instanceof Array},createEl:function(e,t){var n=document.createElement(t||"div");return e&&(n.className=e),n},getScrollY:function(){var e=window.pageYOffset;return e!==undefined?e:document.documentElement.scrollTop},unbind:function(e,t,n){o.bind(e,t,n,!0)},removeClass:function(e,t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")},addClass:function(e,t){o.hasClass(e,t)||(e.className+=(e.className?" ":"")+t)},hasClass:function(e,t){return e.className&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(e.className)},getChildByClass:function(e,t){for(var n=e.firstChild;n;){if(o.hasClass(n,t))return n;n=n.nextSibling}},arraySearch:function(e,t,n){for(var i=e.length;i--;)if(e[i][n]===t)return i;return-1},extend:function(e,t,n){for(var i in t)if(t.hasOwnProperty(i)){if(n&&e.hasOwnProperty(i))continue;e[i]=t[i]}},easing:{sine:{out:function(e){return Math.sin(e*(Math.PI/2))},inOut:function(e){return-(Math.cos(Math.PI*e)-1)/2}},cubic:{out:function(e){return--e*e*e+1}}},detectFeatures:function(){if(o.features)return o.features;var e=o.createEl().style,t="",n={};if(n.oldIE=document.all&&!document.addEventListener,n.touch="ontouchstart"in window,window.requestAnimationFrame&&(n.raf=window.requestAnimationFrame,n.caf=window.cancelAnimationFrame),n.pointerEvent=!!window.PointerEvent||navigator.msPointerEnabled,!n.pointerEvent){var i=navigator.userAgent;if(/iP(hone|od)/.test(navigator.platform)){var a=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);a&&a.length>0&&(a=parseInt(a[1],10))>=1&&a<8&&(n.isOldIOSPhone=!0)}var r=i.match(/Android\s([0-9\.]*)/),l=r?r[1]:0;(l=parseFloat(l))>=1&&(l<4.4&&(n.isOldAndroid=!0),n.androidVersion=l),n.isMobileOpera=/opera mini|opera mobi/i.test(i)}for(var s,u,c=["transform","perspective","animationName"],d=["","webkit","Moz","ms","O"],m=0;m<4;m++){t=d[m];for(var p=0;p<3;p++)s=c[p],u=t+(t?s.charAt(0).toUpperCase()+s.slice(1):s),!n[s]&&u in e&&(n[s]=u);t&&!n.raf&&(t=t.toLowerCase(),n.raf=window[t+"RequestAnimationFrame"],n.raf&&(n.caf=window[t+"CancelAnimationFrame"]||window[t+"CancelRequestAnimationFrame"]))}if(!n.raf){var f=0;n.raf=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-f)),i=window.setTimeout(function(){e(t+n)},n);return f=t+n,i},n.caf=function(e){clearTimeout(e)}}return n.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,o.features=n,n}};o.detectFeatures(),o.features.oldIE&&(o.bind=function(e,t,n,i){t=t.split(" ");for(var o,a=(i?"detach":"attach")+"Event",r=function(){n.handleEvent.call(n)},l=0;l<t.length;l++)if(o=t[l])if("object"==typeof n&&n.handleEvent){if(i){if(!n["oldIE"+o])return!1}else n["oldIE"+o]=r;e[a]("on"+o,n["oldIE"+o])}else e[a]("on"+o,n)});var a=this,r={allowPanToNext:!0,spacing:.12,bgOpacity:1,mouseUsed:!1,loop:!0,pinchToClose:!0,closeOnScroll:!0,closeOnVerticalDrag:!0,verticalDragRange:.75,hideAnimationDuration:333,showAnimationDuration:333,showHideOpacity:!1,focus:!0,escKey:!0,arrowKeys:!0,mainScrollEndFriction:.35,panEndFriction:.35,isClickableElement:function(e){return"A"===e.tagName},getDoubleTapZoom:function(e,t){return e?1:t.initialZoomLevel<.7?1:1.33},maxSpreadZoom:1.33,modal:!0,scaleMode:"fit"};o.extend(r,i);var l,s,u,c,d,m,p,f,h,y,x,v,g,w,b,I,C,D,T,M,S,A,E,O,k,R,P,Z,F,L,z,_,N,U,H,Y,W,B,G,X,V,K,q,$,j,J,Q,ee,te,ne,ie,oe,ae,re,le,se,ue={x:0,y:0},ce={x:0,y:0},de={x:0,y:0},me={},pe=0,fe={},he={x:0,y:0},ye=0,xe=!0,ve=[],ge={},we=!1,be=function(e,t){o.extend(a,t.publicMethods),ve.push(e)},Ie=function(e){var t=Ht();return e>t-1?e-t:e<0?t+e:e},Ce={},De=function(e,t){return Ce[e]||(Ce[e]=[]),Ce[e].push(t)},Te=function(e){var t=Ce[e];if(t){var n=Array.prototype.slice.call(arguments);n.shift();for(var i=0;i<t.length;i++)t[i].apply(a,n)}},Me=function(){return(new Date).getTime()},Se=function(e){re=e,a.bg.style.opacity=e*r.bgOpacity},Ae=function(e,t,n,i,o){(!we||o&&o!==a.currItem)&&(i/=o?o.fitRatio:a.currItem.fitRatio),e[A]=v+t+"px, "+n+"px"+g+" scale("+i+")"},Ee=function(e){te&&(e&&(y>a.currItem.fitRatio?we||($t(a.currItem,!1,!0),we=!0):we&&($t(a.currItem),we=!1)),Ae(te,de.x,de.y,y))},Oe=function(e){e.container&&Ae(e.container.style,e.initialPosition.x,e.initialPosition.y,e.initialZoomLevel,e)},ke=function(e,t){t[A]=v+e+"px, 0px"+g},Re=function(e,t){if(!r.loop&&t){var n=c+(he.x*pe-e)/he.x,i=Math.round(e-ct.x);(n<0&&i>0||n>=Ht()-1&&i<0)&&(e=ct.x+i*r.mainScrollEndFriction)}ct.x=e,ke(e,d)},Pe=function(e,t){var n=dt[e]-fe[e];return ce[e]+ue[e]+n-n*(t/x)},Ze=function(e,t){e.x=t.x,e.y=t.y,t.id&&(e.id=t.id)},Fe=function(e){e.x=Math.round(e.x),e.y=Math.round(e.y)},Le=null,ze=function(){Le&&(o.unbind(document,"mousemove",ze),o.addClass(e,"pswp--has_mouse"),r.mouseUsed=!0,Te("mouseUsed")),Le=setTimeout(function(){Le=null},100)},_e=function(e,t){var n=Xt(a.currItem,me,e);return t&&(ee=n),n},Ne=function(e){return e||(e=a.currItem),e.initialZoomLevel},Ue=function(e){return e||(e=a.currItem),e.w>0?r.maxSpreadZoom:1},He=function(e,t,n,i){return i===a.currItem.initialZoomLevel?(n[e]=a.currItem.initialPosition[e],!0):(n[e]=Pe(e,i),n[e]>t.min[e]?(n[e]=t.min[e],!0):n[e]<t.max[e]&&(n[e]=t.max[e],!0))},Ye=function(e){var t="";r.escKey&&27===e.keyCode?t="close":r.arrowKeys&&(37===e.keyCode?t="prev":39===e.keyCode&&(t="next")),t&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||(e.preventDefault?e.preventDefault():e.returnValue=!1,a[t]()))},We=function(e){e&&(K||V||ne||W)&&(e.preventDefault(),e.stopPropagation())},Be=function(){a.setScrollOffset(0,o.getScrollY())},Ge={},Xe=0,Ve=function(e){Ge[e]&&(Ge[e].raf&&R(Ge[e].raf),Xe--,delete Ge[e])},Ke=function(e){Ge[e]&&Ve(e),Ge[e]||(Xe++,Ge[e]={})},qe=function(){for(var e in Ge)Ge.hasOwnProperty(e)&&Ve(e)},$e=function(e,t,n,i,o,a,r){var l,s=Me();Ke(e);var u=function(){if(Ge[e]){if((l=Me()-s)>=i)return Ve(e),a(n),void(r&&r());a((n-t)*o(l/i)+t),Ge[e].raf=k(u)}};u()},je={shout:Te,listen:De,viewportSize:me,options:r,isMainScrollAnimating:function(){return ne},getZoomLevel:function(){return y},getCurrentIndex:function(){return c},isDragging:function(){return G},isZooming:function(){return J},setScrollOffset:function(e,t){fe.x=e,L=fe.y=t,Te("updateScrollOffset",fe)},applyZoomPan:function(e,t,n,i){de.x=t,de.y=n,y=e,Ee(i)},init:function(){if(!l&&!s){var n;a.framework=o,a.template=e,a.bg=o.getChildByClass(e,"pswp__bg"),P=e.className,l=!0,z=o.detectFeatures(),k=z.raf,R=z.caf,A=z.transform,F=z.oldIE,a.scrollWrap=o.getChildByClass(e,"pswp__scroll-wrap"),a.container=o.getChildByClass(a.scrollWrap,"pswp__container"),d=a.container.style,a.itemHolders=I=[{el:a.container.children[0],wrap:0,index:-1},{el:a.container.children[1],wrap:0,index:-1},{el:a.container.children[2],wrap:0,index:-1}],I[0].el.style.display=I[2].el.style.display="none",function(){if(A){var t=z.perspective&&!O;return v="translate"+(t?"3d(":"("),void(g=z.perspective?", 0px)":")")}A="left",o.addClass(e,"pswp--ie"),ke=function(e,t){t.left=e+"px"},Oe=function(e){var t=e.fitRatio>1?1:e.fitRatio,n=e.container.style,i=t*e.w,o=t*e.h;n.width=i+"px",n.height=o+"px",n.left=e.initialPosition.x+"px",n.top=e.initialPosition.y+"px"},Ee=function(){if(te){var e=te,t=a.currItem,n=t.fitRatio>1?1:t.fitRatio,i=n*t.w,o=n*t.h;e.width=i+"px",e.height=o+"px",e.left=de.x+"px",e.top=de.y+"px"}}}(),h={resize:a.updateSize,orientationchange:function(){clearTimeout(_),_=setTimeout(function(){me.x!==a.scrollWrap.clientWidth&&a.updateSize()},500)},scroll:Be,keydown:Ye,click:We};var i=z.isOldIOSPhone||z.isOldAndroid||z.isMobileOpera;for(z.animationName&&z.transform&&!i||(r.showAnimationDuration=r.hideAnimationDuration=0),n=0;n<ve.length;n++)a["init"+ve[n]]();t&&(a.ui=new t(a,o)).init(),Te("firstUpdate"),c=c||r.index||0,(isNaN(c)||c<0||c>=Ht())&&(c=0),a.currItem=Ut(c),(z.isOldIOSPhone||z.isOldAndroid)&&(xe=!1),e.setAttribute("aria-hidden","false"),r.modal&&(xe?e.style.position="fixed":(e.style.position="absolute",e.style.top=o.getScrollY()+"px")),L===undefined&&(Te("initialLayout"),L=Z=o.getScrollY());var u="pswp--open ";for(r.mainClass&&(u+=r.mainClass+" "),r.showHideOpacity&&(u+="pswp--animate_opacity "),u+=O?"pswp--touch":"pswp--notouch",u+=z.animationName?" pswp--css_animation":"",u+=z.svg?" pswp--svg":"",o.addClass(e,u),a.updateSize(),m=-1,ye=null,n=0;n<3;n++)ke((n+m)*he.x,I[n].el.style);F||o.bind(a.scrollWrap,f,a),De("initialZoomInEnd",function(){a.setContent(I[0],c-1),a.setContent(I[2],c+1),I[0].el.style.display=I[2].el.style.display="block",r.focus&&e.focus(),o.bind(document,"keydown",a),z.transform&&o.bind(a.scrollWrap,"click",a),r.mouseUsed||o.bind(document,"mousemove",ze),o.bind(window,"resize scroll orientationchange",a),Te("bindEvents")}),a.setContent(I[1],c),a.updateCurrItem(),Te("afterInit"),xe||(w=setInterval(function(){Xe||G||J||y!==a.currItem.initialZoomLevel||a.updateSize()},1e3)),o.addClass(e,"pswp--visible")}},close:function(){l&&(l=!1,s=!0,Te("close"),o.unbind(window,"resize scroll orientationchange",a),o.unbind(window,"scroll",h.scroll),o.unbind(document,"keydown",a),o.unbind(document,"mousemove",ze),z.transform&&o.unbind(a.scrollWrap,"click",a),G&&o.unbind(window,p,a),clearTimeout(_),Te("unbindEvents"),Yt(a.currItem,null,!0,a.destroy))},destroy:function(){Te("destroy"),Lt&&clearTimeout(Lt),e.setAttribute("aria-hidden","true"),e.className=P,w&&clearInterval(w),o.unbind(a.scrollWrap,f,a),o.unbind(window,"scroll",a),ft(),qe(),Ce=null},panTo:function(e,t,n){n||(e>ee.min.x?e=ee.min.x:e<ee.max.x&&(e=ee.max.x),t>ee.min.y?t=ee.min.y:t<ee.max.y&&(t=ee.max.y)),de.x=e,de.y=t,Ee()},handleEvent:function(e){e=e||window.event,h[e.type]&&h[e.type](e)},goTo:function(e){var t=(e=Ie(e))-c;ye=t,c=e,a.currItem=Ut(c),pe-=t,Re(he.x*pe),qe(),ne=!1,a.updateCurrItem()},next:function(){a.goTo(c+1)},prev:function(){a.goTo(c-1)},updateCurrZoomItem:function(e){if(e&&Te("beforeChange",0),I[1].el.children.length){var t=I[1].el.children[0];te=o.hasClass(t,"pswp__zoom-wrap")?t.style:null}else te=null;ee=a.currItem.bounds,x=y=a.currItem.initialZoomLevel,de.x=ee.center.x,de.y=ee.center.y,e&&Te("afterChange")},invalidateCurrItems:function(){b=!0;for(var e=0;e<3;e++)I[e].item&&(I[e].item.needsUpdate=!0)},updateCurrItem:function(e){if(0!==ye){var t,n=Math.abs(ye);if(!(e&&n<2)){a.currItem=Ut(c),we=!1,Te("beforeChange",ye),n>=3&&(m+=ye+(ye>0?-3:3),n=3);for(var i=0;i<n;i++)ye>0?(t=I.shift(),I[2]=t,ke((++m+2)*he.x,t.el.style),a.setContent(t,c-n+i+1+1)):(t=I.pop(),I.unshift(t),ke(--m*he.x,t.el.style),a.setContent(t,c+n-i-1-1));if(te&&1===Math.abs(ye)){var o=Ut(C);o.initialZoomLevel!==y&&(Xt(o,me),$t(o),Oe(o))}ye=0,a.updateCurrZoomItem(),C=c,Te("afterChange")}}},updateSize:function(t){if(!xe&&r.modal){var n=o.getScrollY();if(L!==n&&(e.style.top=n+"px",L=n),!t&&ge.x===window.innerWidth&&ge.y===window.innerHeight)return;ge.x=window.innerWidth,ge.y=window.innerHeight,e.style.height=ge.y+"px"}if(me.x=a.scrollWrap.clientWidth,me.y=a.scrollWrap.clientHeight,Be(),he.x=me.x+Math.round(me.x*r.spacing),he.y=me.y,Re(he.x*pe),Te("beforeResize"),m!==undefined){for(var i,l,s,u=0;u<3;u++)i=I[u],ke((u+m)*he.x,i.el.style),s=c+u-1,r.loop&&Ht()>2&&(s=Ie(s)),(l=Ut(s))&&(b||l.needsUpdate||!l.bounds)?(a.cleanSlide(l),a.setContent(i,s),1===u&&(a.currItem=l,a.updateCurrZoomItem(!0)),l.needsUpdate=!1):-1===i.index&&s>=0&&a.setContent(i,s),l&&l.container&&(Xt(l,me),$t(l),Oe(l));b=!1}x=y=a.currItem.initialZoomLevel,(ee=a.currItem.bounds)&&(de.x=ee.center.x,de.y=ee.center.y,Ee(!0)),Te("resize")},zoomTo:function(e,t,n,i,a){t&&(x=y,dt.x=Math.abs(t.x)-de.x,dt.y=Math.abs(t.y)-de.y,Ze(ce,de));var r=_e(e,!1),l={};He("x",r,l,e),He("y",r,l,e);var s=y,u=de.x,c=de.y;Fe(l);var d=function(t){1===t?(y=e,de.x=l.x,de.y=l.y):(y=(e-s)*t+s,de.x=(l.x-u)*t+u,de.y=(l.y-c)*t+c),a&&a(t),Ee(1===t)};n?$e("customZoomTo",0,1,n,i||o.easing.sine.inOut,d):d(1)}},Je={},Qe={},et={},tt={},nt={},it=[],ot={},at=[],rt={},lt=0,st={x:0,y:0},ut=0,ct={x:0,y:0},dt={x:0,y:0},mt={x:0,y:0},pt=function(e,t){return rt.x=Math.abs(e.x-t.x),rt.y=Math.abs(e.y-t.y),Math.sqrt(rt.x*rt.x+rt.y*rt.y)},ft=function(){q&&(R(q),q=null)},ht=function(){G&&(q=k(ht),Et())},yt=function(e,t){return!(!e||e===document)&&!(e.getAttribute("class")&&e.getAttribute("class").indexOf("pswp__scroll-wrap")>-1)&&(t(e)?e:yt(e.parentNode,t))},xt={},vt=function(e,t){return xt.prevent=!yt(e.target,r.isClickableElement),Te("preventDragEvent",e,t,xt),xt.prevent},gt=function(e,t){return t.x=e.pageX,t.y=e.pageY,t.id=e.identifier,t},wt=function(e,t,n){n.x=.5*(e.x+t.x),n.y=.5*(e.y+t.y)},bt=function(){var e=de.y-a.currItem.initialPosition.y;return 1-Math.abs(e/(me.y/2))},It={},Ct={},Dt=[],Tt=function(e){for(;Dt.length>0;)Dt.pop();return E?(se=0,it.forEach(function(e){0===se?Dt[0]=e:1===se&&(Dt[1]=e),se++})):e.type.indexOf("touch")>-1?e.touches&&e.touches.length>0&&(Dt[0]=gt(e.touches[0],It),e.touches.length>1&&(Dt[1]=gt(e.touches[1],Ct))):(It.x=e.pageX,It.y=e.pageY,It.id="",Dt[0]=It),Dt},Mt=function(e,t){var n,i,o,l,s=de[e]+t[e],u=t[e]>0,c=ct.x+t.x,d=ct.x-ot.x;if(n=s>ee.min[e]||s<ee.max[e]?r.panEndFriction:1,s=de[e]+t[e]*n,(r.allowPanToNext||y===a.currItem.initialZoomLevel)&&(te?"h"!==ie||"x"!==e||V||(u?(s>ee.min[e]&&(n=r.panEndFriction,ee.min[e],i=ee.min[e]-ce[e]),(i<=0||d<0)&&Ht()>1?(l=c,d<0&&c>ot.x&&(l=ot.x)):ee.min.x!==ee.max.x&&(o=s)):(s<ee.max[e]&&(n=r.panEndFriction,ee.max[e],i=ce[e]-ee.max[e]),(i<=0||d>0)&&Ht()>1?(l=c,d>0&&c<ot.x&&(l=ot.x)):ee.min.x!==ee.max.x&&(o=s))):l=c,"x"===e))return l!==undefined&&(Re(l,!0),$=l!==ot.x),ee.min.x!==ee.max.x&&(o!==undefined?de.x=o:$||(de.x+=t.x*n)),l!==undefined;ne||$||y>a.currItem.fitRatio&&(de[e]+=t[e]*n)},St=function(e){if(!("mousedown"===e.type&&e.button>0))if(Nt)e.preventDefault();else if(!B||"mousedown"!==e.type){if(vt(e,!0)&&e.preventDefault(),Te("pointerDown"),E){var t=o.arraySearch(it,e.pointerId,"id");t<0&&(t=it.length),it[t]={x:e.pageX,y:e.pageY,id:e.pointerId}}var n=Tt(e),i=n.length;j=null,qe(),G&&1!==i||(G=oe=!0,o.bind(window,p,a),Y=le=ae=W=$=K=X=V=!1,ie=null,Te("firstTouchStart",n),Ze(ce,de),ue.x=ue.y=0,Ze(tt,n[0]),Ze(nt,tt),ot.x=he.x*pe,at=[{x:tt.x,y:tt.y}],U=N=Me(),_e(y,!0),ft(),ht()),!J&&i>1&&!ne&&!$&&(x=y,V=!1,J=X=!0,ue.y=ue.x=0,Ze(ce,de),Ze(Je,n[0]),Ze(Qe,n[1]),wt(Je,Qe,mt),dt.x=Math.abs(mt.x)-de.x,dt.y=Math.abs(mt.y)-de.y,Q=pt(Je,Qe))}},At=function(e){if(e.preventDefault(),E){var t=o.arraySearch(it,e.pointerId,"id");if(t>-1){var n=it[t];n.x=e.pageX,n.y=e.pageY}}if(G){var i=Tt(e);if(ie||K||J)j=i;else if(ct.x!==he.x*pe)ie="h";else{var a=Math.abs(i[0].x-tt.x)-Math.abs(i[0].y-tt.y);Math.abs(a)>=10&&(ie=a>0?"h":"v",j=i)}}},Et=function(){if(j){var e=j.length;if(0!==e)if(Ze(Je,j[0]),et.x=Je.x-tt.x,et.y=Je.y-tt.y,J&&e>1){if(tt.x=Je.x,tt.y=Je.y,!et.x&&!et.y&&function(e,t){return e.x===t.x&&e.y===t.y}(j[1],Qe))return;Ze(Qe,j[1]),V||(V=!0,Te("zoomGestureStarted"));var t=pt(Je,Qe),n=Zt(t);n>a.currItem.initialZoomLevel+a.currItem.initialZoomLevel/15&&(le=!0);var i=1,o=Ne(),l=Ue();if(n<o)if(r.pinchToClose&&!le&&x<=a.currItem.initialZoomLevel){var s=1-(o-n)/(o/1.2);Se(s),Te("onPinchClose",s),ae=!0}else(i=(o-n)/o)>1&&(i=1),n=o-i*(o/3);else n>l&&((i=(n-l)/(6*o))>1&&(i=1),n=l+i*o);i<0&&(i=0),wt(Je,Qe,st),ue.x+=st.x-mt.x,ue.y+=st.y-mt.y,Ze(mt,st),de.x=Pe("x",n),de.y=Pe("y",n),Y=n>y,y=n,Ee()}else{if(!ie)return;if(oe&&(oe=!1,Math.abs(et.x)>=10&&(et.x-=j[0].x-nt.x),Math.abs(et.y)>=10&&(et.y-=j[0].y-nt.y)),tt.x=Je.x,tt.y=Je.y,0===et.x&&0===et.y)return;if("v"===ie&&r.closeOnVerticalDrag&&"fit"===r.scaleMode&&y===a.currItem.initialZoomLevel){ue.y+=et.y,de.y+=et.y;var u=bt();return W=!0,Te("onVerticalDrag",u),Se(u),void Ee()}!function(e,t,n){if(e-U>50){var i=at.length>2?at.shift():{};i.x=t,i.y=n,at.push(i),U=e}}(Me(),Je.x,Je.y),K=!0,ee=a.currItem.bounds,Mt("x",et)||(Mt("y",et),Fe(de),Ee())}}},Ot=function(e){if(z.isOldAndroid){if(B&&"mouseup"===e.type)return;e.type.indexOf("touch")>-1&&(clearTimeout(B),B=setTimeout(function(){B=0},600))}var t;if(Te("pointerUp"),vt(e,!1)&&e.preventDefault(),E){var n=o.arraySearch(it,e.pointerId,"id");n>-1&&(t=it.splice(n,1)[0],navigator.msPointerEnabled?(t.type={4:"mouse",2:"touch",3:"pen"}[e.pointerType],t.type||(t.type=e.pointerType||"mouse")):t.type=e.pointerType||"mouse")}var i,l=Tt(e),s=l.length;if("mouseup"===e.type&&(s=0),2===s)return j=null,!0;1===s&&Ze(nt,l[0]),0!==s||ie||ne||(t||("mouseup"===e.type?t={x:e.pageX,y:e.pageY,type:"mouse"}:e.changedTouches&&e.changedTouches[0]&&(t={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY,type:"touch"})),Te("touchRelease",e,t));var u=-1;if(0===s&&(G=!1,o.unbind(window,p,a),ft(),J?u=0:-1!==ut&&(u=Me()-ut)),ut=1===s?Me():-1,i=-1!==u&&u<150?"zoom":"swipe",J&&s<2&&(J=!1,1===s&&(i="zoomPointerUp"),Te("zoomGestureEnded")),j=null,K||V||ne||W)if(qe(),H||(H=kt()),H.calculateSwipeSpeed("x"),W)if(bt()<r.verticalDragRange)a.close();else{var c=de.y,d=re;$e("verticalDrag",0,1,300,o.easing.cubic.out,function(e){de.y=(a.currItem.initialPosition.y-c)*e+c,Se((1-d)*e+d),Ee()}),Te("onVerticalDrag",1)}else{if(($||ne)&&0===s){if(Pt(i,H))return;i="zoomPointerUp"}ne||("swipe"===i?!$&&y>a.currItem.fitRatio&&Rt(H):Ft())}},kt=function(){var e,t,n={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(i){at.length>1?(e=Me()-U+50,t=at[at.length-2][i]):(e=Me()-N,t=nt[i]),n.lastFlickOffset[i]=tt[i]-t,n.lastFlickDist[i]=Math.abs(n.lastFlickOffset[i]),n.lastFlickDist[i]>20?n.lastFlickSpeed[i]=n.lastFlickOffset[i]/e:n.lastFlickSpeed[i]=0,Math.abs(n.lastFlickSpeed[i])<.1&&(n.lastFlickSpeed[i]=0),n.slowDownRatio[i]=.95,n.slowDownRatioReverse[i]=1-n.slowDownRatio[i],n.speedDecelerationRatio[i]=1},calculateOverBoundsAnimOffset:function(e,t){n.backAnimStarted[e]||(de[e]>ee.min[e]?n.backAnimDestination[e]=ee.min[e]:de[e]<ee.max[e]&&(n.backAnimDestination[e]=ee.max[e]),n.backAnimDestination[e]!==undefined&&(n.slowDownRatio[e]=.7,n.slowDownRatioReverse[e]=1-n.slowDownRatio[e],n.speedDecelerationRatioAbs[e]<.05&&(n.lastFlickSpeed[e]=0,n.backAnimStarted[e]=!0,$e("bounceZoomPan"+e,de[e],n.backAnimDestination[e],t||300,o.easing.sine.out,function(t){de[e]=t,Ee()}))))},calculateAnimOffset:function(e){n.backAnimStarted[e]||(n.speedDecelerationRatio[e]=n.speedDecelerationRatio[e]*(n.slowDownRatio[e]+n.slowDownRatioReverse[e]-n.slowDownRatioReverse[e]*n.timeDiff/10),n.speedDecelerationRatioAbs[e]=Math.abs(n.lastFlickSpeed[e]*n.speedDecelerationRatio[e]),n.distanceOffset[e]=n.lastFlickSpeed[e]*n.speedDecelerationRatio[e]*n.timeDiff,de[e]+=n.distanceOffset[e])},panAnimLoop:function(){if(Ge.zoomPan&&(Ge.zoomPan.raf=k(n.panAnimLoop),n.now=Me(),n.timeDiff=n.now-n.lastNow,n.lastNow=n.now,n.calculateAnimOffset("x"),n.calculateAnimOffset("y"),Ee(),n.calculateOverBoundsAnimOffset("x"),n.calculateOverBoundsAnimOffset("y"),n.speedDecelerationRatioAbs.x<.05&&n.speedDecelerationRatioAbs.y<.05))return de.x=Math.round(de.x),de.y=Math.round(de.y),Ee(),void Ve("zoomPan")}};return n},Rt=function(e){if(e.calculateSwipeSpeed("y"),ee=a.currItem.bounds,e.backAnimDestination={},e.backAnimStarted={},Math.abs(e.lastFlickSpeed.x)<=.05&&Math.abs(e.lastFlickSpeed.y)<=.05)return e.speedDecelerationRatioAbs.x=e.speedDecelerationRatioAbs.y=0,e.calculateOverBoundsAnimOffset("x"),e.calculateOverBoundsAnimOffset("y"),!0;Ke("zoomPan"),e.lastNow=Me(),e.panAnimLoop()},Pt=function(e,t){var n,i,l;if(ne||(lt=c),"swipe"===e){var s=tt.x-nt.x,u=t.lastFlickDist.x<10;s>30&&(u||t.lastFlickOffset.x>20)?i=-1:s<-30&&(u||t.lastFlickOffset.x<-20)&&(i=1)}i&&((c+=i)<0?(c=r.loop?Ht()-1:0,l=!0):c>=Ht()&&(c=r.loop?0:Ht()-1,l=!0),l&&!r.loop||(ye+=i,pe-=i,n=!0));var d,m=he.x*pe,p=Math.abs(m-ct.x);return n||m>ct.x==t.lastFlickSpeed.x>0?(d=Math.abs(t.lastFlickSpeed.x)>0?p/Math.abs(t.lastFlickSpeed.x):333,d=Math.min(d,400),d=Math.max(d,250)):d=333,lt===c&&(n=!1),ne=!0,Te("mainScrollAnimStart"),$e("mainScroll",ct.x,m,d,o.easing.cubic.out,Re,function(){qe(),ne=!1,lt=-1,(n||lt!==c)&&a.updateCurrItem(),Te("mainScrollAnimComplete")}),n&&a.updateCurrItem(!0),n},Zt=function(e){return 1/Q*e*x},Ft=function(){var e=y,t=Ne(),n=Ue();y<t?e=t:y>n&&(e=n);var i,r=re;return ae&&!Y&&!le&&y<t?(a.close(),!0):(ae&&(i=function(e){Se((1-r)*e+r)}),a.zoomTo(e,0,200,o.easing.cubic.out,i),!0)};be("Gestures",{publicMethods:{initGestures:function(){var e=function(e,t,n,i,o){D=e+t,T=e+n,M=e+i,S=o?e+o:""};(E=z.pointerEvent)&&z.touch&&(z.touch=!1),E?navigator.msPointerEnabled?e("MSPointer","Down","Move","Up","Cancel"):e("pointer","down","move","up","cancel"):z.touch?(e("touch","start","move","end","cancel"),O=!0):e("mouse","down","move","up"),p=T+" "+M+" "+S,f=D,E&&!O&&(O=navigator.maxTouchPoints>1||navigator.msMaxTouchPoints>1),a.likelyTouchDevice=O,h[D]=St,h[T]=At,h[M]=Ot,S&&(h[S]=h[M]),z.touch&&(f+=" mousedown",p+=" mousemove mouseup",h.mousedown=h[D],h.mousemove=h[T],h.mouseup=h[M]),O||(r.allowPanToNext=!1)}}});var Lt,zt,_t,Nt,Ut,Ht,Yt=function(t,n,i,l){var s;Lt&&clearTimeout(Lt),Nt=!0,_t=!0,t.initialLayout?(s=t.initialLayout,t.initialLayout=null):s=r.getThumbBoundsFn&&r.getThumbBoundsFn(c);var d,m,p=i?r.hideAnimationDuration:r.showAnimationDuration,f=function(){Ve("initialZoom"),i?(a.template.removeAttribute("style"),a.bg.removeAttribute("style")):(Se(1),n&&(n.style.display="block"),o.addClass(e,"pswp--animated-in"),Te("initialZoom"+(i?"OutEnd":"InEnd"))),l&&l(),Nt=!1};if(!p||!s||s.x===undefined)return Te("initialZoom"+(i?"Out":"In")),y=t.initialZoomLevel,Ze(de,t.initialPosition),Ee(),e.style.opacity=i?0:1,Se(1),void(p?setTimeout(function(){f()},p):f());d=u,m=!a.currItem.src||a.currItem.loadError||r.showHideOpacity,t.miniImg&&(t.miniImg.style.webkitBackfaceVisibility="hidden"),i||(y=s.w/t.w,de.x=s.x,de.y=s.y-Z,a[m?"template":"bg"].style.opacity=.001,Ee()),Ke("initialZoom"),i&&!d&&o.removeClass(e,"pswp--animated-in"),m&&(i?o[(d?"remove":"add")+"Class"](e,"pswp--animate_opacity"):setTimeout(function(){o.addClass(e,"pswp--animate_opacity")},30)),Lt=setTimeout(function(){if(Te("initialZoom"+(i?"Out":"In")),i){var n=s.w/t.w,a={x:de.x,y:de.y},r=y,l=re,u=function(t){1===t?(y=n,de.x=s.x,de.y=s.y-L):(y=(n-r)*t+r,de.x=(s.x-a.x)*t+a.x,de.y=(s.y-L-a.y)*t+a.y),Ee(),m?e.style.opacity=1-t:Se(l-t*l)};d?$e("initialZoom",0,1,p,o.easing.cubic.out,u,f):(u(1),Lt=setTimeout(f,p+20))}else y=t.initialZoomLevel,Ze(de,t.initialPosition),Ee(),Se(1),m?e.style.opacity=1:Se(1),Lt=setTimeout(f,p+20)},i?25:90)},Wt={},Bt=[],Gt={index:0,errorMsg:'<div class="pswp__error-msg"><a href="%url%" target="_blank">The image</a> could not be loaded.</div>',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return zt.length}},Xt=function(e,t,n){if(e.src&&!e.loadError){var i=!n;if(i&&(e.vGap||(e.vGap={top:0,bottom:0}),Te("parseVerticalMargin",e)),Wt.x=t.x,Wt.y=t.y-e.vGap.top-e.vGap.bottom,i){var o=Wt.x/e.w,a=Wt.y/e.h;e.fitRatio=o<a?o:a;var l=r.scaleMode;"orig"===l?n=1:"fit"===l&&(n=e.fitRatio),n>1&&(n=1),e.initialZoomLevel=n,e.bounds||(e.bounds={center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}})}if(!n)return;return function(e,t,n){var i=e.bounds;i.center.x=Math.round((Wt.x-t)/2),i.center.y=Math.round((Wt.y-n)/2)+e.vGap.top,i.max.x=t>Wt.x?Math.round(Wt.x-t):i.center.x,i.max.y=n>Wt.y?Math.round(Wt.y-n)+e.vGap.top:i.center.y,i.min.x=t>Wt.x?0:i.center.x,i.min.y=n>Wt.y?e.vGap.top:i.center.y}(e,e.w*n,e.h*n),i&&n===e.initialZoomLevel&&(e.initialPosition=e.bounds.center),e.bounds}return e.w=e.h=0,e.initialZoomLevel=e.fitRatio=1,e.bounds={center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}},e.initialPosition=e.bounds.center,e.bounds},Vt=function(e,t,n,i,o,r){t.loadError||i&&(t.imageAppended=!0,$t(t,i,t===a.currItem&&we),n.appendChild(i),r&&setTimeout(function(){t&&t.loaded&&t.placeholder&&(t.placeholder.style.display="none",t.placeholder=null)},500))},Kt=function(e){e.loading=!0,e.loaded=!1;var t=e.img=o.createEl("pswp__img","img"),n=function(){e.loading=!1,e.loaded=!0,e.loadComplete?e.loadComplete(e):e.img=null,t.onload=t.onerror=null,t=null};return t.onload=n,t.onerror=function(){e.loadError=!0,n()},t.src=e.src,t.alt=e.alt||"",t},qt=function(e,t){if(e.src&&e.loadError&&e.container)return t&&(e.container.innerHTML=""),e.container.innerHTML=r.errorMsg.replace("%url%",e.src),!0},$t=function(e,t,n){if(e.src){t||(t=e.container.lastChild);var i=n?e.w:Math.round(e.w*e.fitRatio),o=n?e.h:Math.round(e.h*e.fitRatio);e.placeholder&&!e.loaded&&(e.placeholder.style.width=i+"px",e.placeholder.style.height=o+"px"),t.style.width=i+"px",t.style.height=o+"px"}},jt=function(){if(Bt.length){for(var e,t=0;t<Bt.length;t++)(e=Bt[t]).holder.index===e.index&&Vt(e.index,e.item,e.baseDiv,e.img,0,e.clearPlaceholder);Bt=[]}};be("Controller",{publicMethods:{lazyLoadItem:function(e){e=Ie(e);var t=Ut(e);t&&(!t.loaded&&!t.loading||b)&&(Te("gettingData",e,t),t.src&&Kt(t))},initController:function(){o.extend(r,Gt,!0),a.items=zt=n,Ut=a.getItemAt,Ht=r.getNumItemsFn,r.loop,Ht()<3&&(r.loop=!1),De("beforeChange",function(e){var t,n=r.preload,i=null===e||e>=0,o=Math.min(n[0],Ht()),l=Math.min(n[1],Ht());for(t=1;t<=(i?l:o);t++)a.lazyLoadItem(c+t);for(t=1;t<=(i?o:l);t++)a.lazyLoadItem(c-t)}),De("initialLayout",function(){a.currItem.initialLayout=r.getThumbBoundsFn&&r.getThumbBoundsFn(c)}),De("mainScrollAnimComplete",jt),De("initialZoomInEnd",jt),De("destroy",function(){for(var e,t=0;t<zt.length;t++)(e=zt[t]).container&&(e.container=null),e.placeholder&&(e.placeholder=null),e.img&&(e.img=null),e.preloader&&(e.preloader=null),e.loadError&&(e.loaded=e.loadError=!1);Bt=null})},getItemAt:function(e){return e>=0&&zt[e]!==undefined&&zt[e]},allowProgressiveImg:function(){return r.forceProgressiveLoading||!O||r.mouseUsed||screen.width>1200},setContent:function(e,t){r.loop&&(t=Ie(t));var n=a.getItemAt(e.index);n&&(n.container=null);var i,s=a.getItemAt(t);if(s){Te("gettingData",t,s),e.index=t,e.item=s;var u=s.container=o.createEl("pswp__zoom-wrap");if(!s.src&&s.html&&(s.html.tagName?u.appendChild(s.html):u.innerHTML=s.html),qt(s),Xt(s,me),!s.src||s.loadError||s.loaded)s.src&&!s.loadError&&((i=o.createEl("pswp__img","img")).style.opacity=1,i.src=s.src,$t(s,i),Vt(0,s,u,i));else{if(s.loadComplete=function(n){if(l){if(e&&e.index===t){if(qt(n,!0))return n.loadComplete=n.img=null,Xt(n,me),Oe(n),void(e.index===c&&a.updateCurrZoomItem());n.imageAppended?!Nt&&n.placeholder&&(n.placeholder.style.display="none",n.placeholder=null):z.transform&&(ne||Nt)?Bt.push({item:n,baseDiv:u,img:n.img,index:t,holder:e,clearPlaceholder:!0}):Vt(0,n,u,n.img,0,!0)}n.loadComplete=null,n.img=null,Te("imageLoadComplete",t,n)}},o.features.transform){var d="pswp__img pswp__img--placeholder";d+=s.msrc?"":" pswp__img--placeholder--blank";var m=o.createEl(d,s.msrc?"img":"");s.msrc&&(m.src=s.msrc),$t(s,m),u.appendChild(m),s.placeholder=m}s.loading||Kt(s),a.allowProgressiveImg()&&(!_t&&z.transform?Bt.push({item:s,baseDiv:u,img:s.img,index:t,holder:e}):Vt(0,s,u,s.img,0,!0))}_t||t!==c?Oe(s):(te=u.style,Yt(s,i||s.img)),e.el.innerHTML="",e.el.appendChild(u)}else e.el.innerHTML=""},cleanSlide:function(e){e.img&&(e.img.onload=e.img.onerror=null),e.loaded=e.loading=e.img=e.imageAppended=!1}}});var Jt,Qt,en={},tn=function(e,t,n){var i=document.createEvent("CustomEvent"),o={origEvent:e,target:e.target,releasePoint:t,pointerType:n||"touch"};i.initCustomEvent("pswpTap",!0,!0,o),e.target.dispatchEvent(i)};be("Tap",{publicMethods:{initTap:function(){De("firstTouchStart",a.onTapStart),De("touchRelease",a.onTapRelease),De("destroy",function(){en={},Jt=null})},onTapStart:function(e){e.length>1&&(clearTimeout(Jt),Jt=null)},onTapRelease:function(e,t){var n,i;if(t&&!K&&!X&&!Xe&&a.container.contains(e.target)){var r=t;if(Jt&&(clearTimeout(Jt),Jt=null,n=r,i=en,Math.abs(n.x-i.x)<25&&Math.abs(n.y-i.y)<25))return void Te("doubleTap",r);if("mouse"===t.type)return void tn(e,t,"mouse");if("BUTTON"===e.target.tagName.toUpperCase()||o.hasClass(e.target,"pswp__single-tap"))return void tn(e,t);Ze(en,r),Jt=setTimeout(function(){tn(e,t),Jt=null},300)}}}}),be("DesktopZoom",{publicMethods:{initDesktopZoom:function(){F||(O?De("mouseUsed",function(){a.setupDesktopZoom()}):a.setupDesktopZoom(!0))},setupDesktopZoom:function(t){Qt={};var n="wheel mousewheel DOMMouseScroll";De("bindEvents",function(){o.bind(e,n,a.handleMouseWheel)}),De("unbindEvents",function(){Qt&&o.unbind(e,n,a.handleMouseWheel)}),a.mouseZoomedIn=!1;var i,r=function(){a.mouseZoomedIn&&(o.removeClass(e,"pswp--zoomed-in"),a.mouseZoomedIn=!1),y<1?o.addClass(e,"pswp--zoom-allowed"):o.removeClass(e,"pswp--zoom-allowed"),l()},l=function(){i&&(o.removeClass(e,"pswp--dragging"),i=!1)};De("resize",r),De("afterChange",r),De("pointerDown",function(){a.mouseZoomedIn&&(i=!0,o.addClass(e,"pswp--dragging"))}),De("pointerUp",l),t||r()},handleMouseWheel:function(e){if(y<=a.currItem.fitRatio)return r.modal&&(!r.closeOnScroll||Xe||G?e.preventDefault():A&&Math.abs(e.deltaY)>2&&(u=!0,a.close())),!0;if(e.stopPropagation(),Qt.x=0,"deltaX"in e)1===e.deltaMode?(Qt.x=18*e.deltaX,Qt.y=18*e.deltaY):(Qt.x=e.deltaX,Qt.y=e.deltaY);else if("wheelDelta"in e)e.wheelDeltaX&&(Qt.x=-.16*e.wheelDeltaX),e.wheelDeltaY?Qt.y=-.16*e.wheelDeltaY:Qt.y=-.16*e.wheelDelta;else{if(!("detail"in e))return;Qt.y=e.detail}_e(y,!0);var t=de.x-Qt.x,n=de.y-Qt.y;(r.modal||t<=ee.min.x&&t>=ee.max.x&&n<=ee.min.y&&n>=ee.max.y)&&e.preventDefault(),a.panTo(t,n)},toggleDesktopZoom:function(t){t=t||{x:me.x/2+fe.x,y:me.y/2+fe.y};var n=r.getDoubleTapZoom(!0,a.currItem),i=y===n;a.mouseZoomedIn=!i,a.zoomTo(i?a.currItem.initialZoomLevel:n,t,333),o[(i?"remove":"add")+"Class"](e,"pswp--zoomed-in")}}});var nn,on,an,rn,ln,sn,un,cn,dn,mn,pn,fn,hn={history:!0,galleryUID:1},yn=function(){return pn.hash.substring(1)},xn=function(){nn&&clearTimeout(nn),an&&clearTimeout(an)},vn=function(){var e=yn(),t={};if(e.length<5)return t;var n,i=e.split("&");for(n=0;n<i.length;n++)if(i[n]){var o=i[n].split("=");o.length<2||(t[o[0]]=o[1])}if(r.galleryPIDs){var a=t.pid;for(t.pid=0,n=0;n<zt.length;n++)if(zt[n].pid===a){t.pid=n;break}}else t.pid=parseInt(t.pid,10)-1;return t.pid<0&&(t.pid=0),t},gn=function(){if(an&&clearTimeout(an),Xe||G)an=setTimeout(gn,500);else{rn?clearTimeout(on):rn=!0;var e=c+1,t=Ut(c);t.hasOwnProperty("pid")&&(e=t.pid);var n=un+"&gid="+r.galleryUID+"&pid="+e;cn||-1===pn.hash.indexOf(n)&&(mn=!0);var i=pn.href.split("#")[0]+"#"+n;fn?"#"+n!==window.location.hash&&history[cn?"replaceState":"pushState"]("",document.title,i):cn?pn.replace(i):pn.hash=n,cn=!0,on=setTimeout(function(){rn=!1},60)}};be("History",{publicMethods:{initHistory:function(){if(o.extend(r,hn,!0),r.history){pn=window.location,mn=!1,dn=!1,cn=!1,un=yn(),fn="pushState"in history,un.indexOf("gid=")>-1&&(un=(un=un.split("&gid=")[0]).split("?gid=")[0]),De("afterChange",a.updateURL),De("unbindEvents",function(){o.unbind(window,"hashchange",a.onHashChange)});var e=function(){sn=!0,dn||(mn?history.back():un?pn.hash=un:fn?history.pushState("",document.title,pn.pathname+pn.search):pn.hash=""),xn()};De("unbindEvents",function(){u&&e()}),De("destroy",function(){sn||e()}),De("firstUpdate",function(){c=vn().pid});var t=un.indexOf("pid=");t>-1&&"&"===(un=un.substring(0,t)).slice(-1)&&(un=un.slice(0,-1)),setTimeout(function(){l&&o.bind(window,"hashchange",a.onHashChange)},40)}},onHashChange:function(){if(yn()===un)return dn=!0,void a.close();rn||(ln=!0,a.goTo(vn().pid),ln=!1)},updateURL:function(){xn(),ln||(cn?nn=setTimeout(gn,800):gn())}}}),o.extend(a,je)}});
!function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.PhotoSwipeUI_Default=t()}(this,function(){"use strict";return function(e,t){var n,o,l,r,i,s,a,u,c,p,d,m,f,h,w,g,v,b,_=this,C=!1,T=!0,I=!0,E={barsSize:{top:44,bottom:"auto"},closeElClasses:["item","caption","zoom-wrap","ui","top-bar"],timeToIdle:4e3,timeToIdleOutside:1e3,loadingIndicatorDelay:1e3,addCaptionHTMLFn:function(e,t){return e.title?(t.children[0].innerHTML=e.title,!0):(t.children[0].innerHTML="",!1)},closeEl:!0,captionEl:!0,fullscreenEl:!0,zoomEl:!0,shareEl:!0,counterEl:!0,arrowEl:!0,preloaderEl:!0,tapToClose:!1,tapToToggleControls:!0,clickToCloseNonZoomable:!0,shareButtons:[{id:"facebook",label:"Share on Facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:"Tweet",url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:"Pin it",url:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"},{id:"download",label:"Download image",url:"{{raw_image_url}}",download:!0}],getImageURLForShare:function(){return e.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return e.currItem.title||""},indexIndicatorSep:" / ",fitControlsWidth:1200},F=function(e){if(g)return!0;e=e||window.event,w.timeToIdle&&w.mouseUsed&&!c&&z();for(var n,o,l=(e.target||e.srcElement).getAttribute("class")||"",r=0;r<P.length;r++)(n=P[r]).onTap&&l.indexOf("pswp__"+n.name)>-1&&(n.onTap(),o=!0);if(o){e.stopPropagation&&e.stopPropagation(),g=!0;var i=t.features.isOldAndroid?600:30;setTimeout(function(){g=!1},i)}},x=function(e,n,o){t[(o?"add":"remove")+"Class"](e,"pswp__"+n)},S=function(){var e=1===w.getNumItemsFn();e!==h&&(x(o,"ui--one-slide",e),h=e)},k=function(){x(a,"share-modal--hidden",I)},K=function(){return(I=!I)?(t.removeClass(a,"pswp__share-modal--fade-in"),setTimeout(function(){I&&k()},300)):(k(),setTimeout(function(){I||t.addClass(a,"pswp__share-modal--fade-in")},30)),I||O(),!1},L=function(t){var n=(t=t||window.event).target||t.srcElement;return e.shout("shareLinkClick",t,n),!(!n.href||!n.hasAttribute("download")&&(window.open(n.href,"pswp_share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),I||K(),1))},O=function(){for(var e,t,n,o,l="",r=0;r<w.shareButtons.length;r++)e=w.shareButtons[r],t=w.getImageURLForShare(e),n=w.getPageURLForShare(e),o=w.getTextForShare(e),l+='<a href="'+e.url.replace("{{url}}",encodeURIComponent(n)).replace("{{image_url}}",encodeURIComponent(t)).replace("{{raw_image_url}}",t).replace("{{text}}",encodeURIComponent(o))+'" target="_blank" class="pswp__share--'+e.id+'"'+(e.download?"download":"")+">"+e.label+"</a>",w.parseShareButtonOut&&(l=w.parseShareButtonOut(e,l));a.children[0].innerHTML=l,a.children[0].onclick=L},R=function(e){for(var n=0;n<w.closeElClasses.length;n++)if(t.hasClass(e,"pswp__"+w.closeElClasses[n]))return!0},y=0,z=function(){clearTimeout(b),y=0,c&&_.setIdle(!1)},M=function(e){var t=(e=e||window.event).relatedTarget||e.toElement;t&&"HTML"!==t.nodeName||(clearTimeout(b),b=setTimeout(function(){_.setIdle(!0)},w.timeToIdleOutside))},D=function(e){m!==e&&(x(d,"preloader--active",!e),m=e)},A=function(n){var i=n.vGap;if(!e.likelyTouchDevice||w.mouseUsed||screen.width>w.fitControlsWidth){var s=w.barsSize;if(w.captionEl&&"auto"===s.bottom)if(r||((r=t.createEl("pswp__caption pswp__caption--fake")).appendChild(t.createEl("pswp__caption__center")),o.insertBefore(r,l),t.addClass(o,"pswp__ui--fit")),w.addCaptionHTMLFn(n,r,!0)){var a=r.clientHeight;i.bottom=parseInt(a,10)||44}else i.bottom=s.top;else i.bottom="auto"===s.bottom?0:s.bottom;i.top=s.top}else i.top=i.bottom=0},P=[{name:"caption",option:"captionEl",onInit:function(e){l=e}},{name:"share-modal",option:"shareEl",onInit:function(e){a=e},onTap:function(){K()}},{name:"button--share",option:"shareEl",onInit:function(e){s=e},onTap:function(){K()}},{name:"button--zoom",option:"zoomEl",onTap:e.toggleDesktopZoom},{name:"counter",option:"counterEl",onInit:function(e){i=e}},{name:"button--close",option:"closeEl",onTap:e.close},{name:"button--arrow--left",option:"arrowEl",onTap:e.prev},{name:"button--arrow--right",option:"arrowEl",onTap:e.next},{name:"button--fs",option:"fullscreenEl",onTap:function(){n.isFullscreen()?n.exit():n.enter()}},{name:"preloader",option:"preloaderEl",onInit:function(e){d=e}}];_.init=function(){var i;t.extend(e.options,E,!0),w=e.options,o=t.getChildByClass(e.scrollWrap,"pswp__ui"),(p=e.listen)("onVerticalDrag",function(e){T&&e<.95?_.hideControls():!T&&e>=.95&&_.showControls()}),p("onPinchClose",function(e){T&&e<.9?(_.hideControls(),i=!0):i&&!T&&e>.9&&_.showControls()}),p("zoomGestureEnded",function(){(i=!1)&&!T&&_.showControls()}),p("beforeChange",_.update),p("doubleTap",function(t){var n=e.currItem.initialZoomLevel;e.getZoomLevel()!==n?e.zoomTo(n,t,333):e.zoomTo(w.getDoubleTapZoom(!1,e.currItem),t,333)}),p("preventDragEvent",function(e,t,n){var o=e.target||e.srcElement;o&&o.getAttribute("class")&&e.type.indexOf("mouse")>-1&&(o.getAttribute("class").indexOf("__caption")>0||/(SMALL|STRONG|EM)/i.test(o.tagName))&&(n.prevent=!1)}),p("bindEvents",function(){t.bind(o,"pswpTap click",F),t.bind(e.scrollWrap,"pswpTap",_.onGlobalTap),e.likelyTouchDevice||t.bind(e.scrollWrap,"mouseover",_.onMouseOver)}),p("unbindEvents",function(){I||K(),v&&clearInterval(v),t.unbind(document,"mouseout",M),t.unbind(document,"mousemove",z),t.unbind(o,"pswpTap click",F),t.unbind(e.scrollWrap,"pswpTap",_.onGlobalTap),t.unbind(e.scrollWrap,"mouseover",_.onMouseOver),n&&(t.unbind(document,n.eventK,_.updateFullscreen),n.isFullscreen()&&(w.hideAnimationDuration=0,n.exit()),n=null)}),p("destroy",function(){w.captionEl&&(r&&o.removeChild(r),t.removeClass(l,"pswp__caption--empty")),a&&(a.children[0].onclick=null),t.removeClass(o,"pswp__ui--over-close"),t.addClass(o,"pswp__ui--hidden"),_.setIdle(!1)}),w.showAnimationDuration||t.removeClass(o,"pswp__ui--hidden"),p("initialZoomIn",function(){w.showAnimationDuration&&t.removeClass(o,"pswp__ui--hidden")}),p("initialZoomOut",function(){t.addClass(o,"pswp__ui--hidden")}),p("parseVerticalMargin",A),function(){var e,n,l,r=function(o){if(o)for(var r=o.length,i=0;i<r;i++){e=o[i],n=e.className;for(var s=0;s<P.length;s++)l=P[s],n.indexOf("pswp__"+l.name)>-1&&(w[l.option]?(t.removeClass(e,"pswp__element--disabled"),l.onInit&&l.onInit(e)):t.addClass(e,"pswp__element--disabled"))}};r(o.children);var i=t.getChildByClass(o,"pswp__top-bar");i&&r(i.children)}(),w.shareEl&&s&&a&&(I=!0),S(),w.timeToIdle&&p("mouseUsed",function(){t.bind(document,"mousemove",z),t.bind(document,"mouseout",M),v=setInterval(function(){2==++y&&_.setIdle(!0)},w.timeToIdle/2)}),w.fullscreenEl&&!t.features.isOldAndroid&&(n||(n=_.getFullscreenAPI()),n?(t.bind(document,n.eventK,_.updateFullscreen),_.updateFullscreen(),t.addClass(e.template,"pswp--supports-fs")):t.removeClass(e.template,"pswp--supports-fs")),w.preloaderEl&&(D(!0),p("beforeChange",function(){clearTimeout(f),f=setTimeout(function(){e.currItem&&e.currItem.loading?(!e.allowProgressiveImg()||e.currItem.img&&!e.currItem.img.naturalWidth)&&D(!1):D(!0)},w.loadingIndicatorDelay)}),p("imageLoadComplete",function(t,n){e.currItem===n&&D(!0)}))},_.setIdle=function(e){c=e,x(o,"ui--idle",e)},_.update=function(){T&&e.currItem?(_.updateIndexIndicator(),w.captionEl&&(w.addCaptionHTMLFn(e.currItem,l),x(l,"caption--empty",!e.currItem.title)),C=!0):C=!1,I||K(),S()},_.updateFullscreen=function(o){o&&setTimeout(function(){e.setScrollOffset(0,t.getScrollY())},50),t[(n.isFullscreen()?"add":"remove")+"Class"](e.template,"pswp--fs")},_.updateIndexIndicator=function(){w.counterEl&&(i.innerHTML=e.getCurrentIndex()+1+w.indexIndicatorSep+w.getNumItemsFn())},_.onGlobalTap=function(n){var o=(n=n||window.event).target||n.srcElement;if(!g)if(n.detail&&"mouse"===n.detail.pointerType){if(R(o))return void e.close();t.hasClass(o,"pswp__img")&&(1===e.getZoomLevel()&&e.getZoomLevel()<=e.currItem.fitRatio?w.clickToCloseNonZoomable&&e.close():e.toggleDesktopZoom(n.detail.releasePoint))}else if(w.tapToToggleControls&&(T?_.hideControls():_.showControls()),w.tapToClose&&(t.hasClass(o,"pswp__img")||R(o)))return void e.close()},_.onMouseOver=function(e){var t=(e=e||window.event).target||e.srcElement;x(o,"ui--over-close",R(t))},_.hideControls=function(){t.addClass(o,"pswp__ui--hidden"),T=!1},_.showControls=function(){T=!0,C||_.update(),t.removeClass(o,"pswp__ui--hidden")},_.supportsFullscreen=function(){var e=document;return!!(e.exitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen||e.msExitFullscreen)},_.getFullscreenAPI=function(){var t,n=document.documentElement,o="fullscreenchange";return n.requestFullscreen?t={enterK:"requestFullscreen",exitK:"exitFullscreen",elementK:"fullscreenElement",eventK:o}:n.mozRequestFullScreen?t={enterK:"mozRequestFullScreen",exitK:"mozCancelFullScreen",elementK:"mozFullScreenElement",eventK:"moz"+o}:n.webkitRequestFullscreen?t={enterK:"webkitRequestFullscreen",exitK:"webkitExitFullscreen",elementK:"webkitFullscreenElement",eventK:"webkit"+o}:n.msRequestFullscreen&&(t={enterK:"msRequestFullscreen",exitK:"msExitFullscreen",elementK:"msFullscreenElement",eventK:"MSFullscreenChange"}),t&&(t.enter=function(){if(u=w.closeOnScroll,w.closeOnScroll=!1,"webkitRequestFullscreen"!==this.enterK)return e.template[this.enterK]();e.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT)},t.exit=function(){return w.closeOnScroll=u,document[this.exitK]()},t.isFullscreen=function(){return document[this.elementK]}),t}}});
jQuery(function(t){if("undefined"==typeof wc_single_product_params)return!1;t("body").on("init",".wc-tabs-wrapper, .woocommerce-tabs",function(){t(this).find(".wc-tab, .woocommerce-tabs .panel:not(.panel .panel)").hide();var e=window.location.hash,i=window.location.href,o=t(this).find(".wc-tabs, ul.tabs").first();e.toLowerCase().indexOf("comment-")>=0||"#reviews"===e||"#tab-reviews"===e?o.find("li.reviews_tab a").trigger("click"):i.indexOf("comment-page-")>0||i.indexOf("cpage=")>0?o.find("li.reviews_tab a").trigger("click"):"#tab-additional_information"===e?o.find("li.additional_information_tab a").trigger("click"):o.find("li:first a").trigger("click")}).on("click",".wc-tabs li a, ul.tabs li a",function(e){e.preventDefault();var i=t(this),o=i.closest(".wc-tabs-wrapper, .woocommerce-tabs"),a=o.find(".wc-tabs, ul.tabs");a.find("li").removeClass("active"),a.find('a[role="tab"]').attr("aria-selected","false").attr("tabindex","-1"),o.find(".wc-tab, .panel:not(.panel .panel)").hide(),i.closest("li").addClass("active"),i.attr("aria-selected","true").attr("tabindex","0"),o.find("#"+i.attr("href").split("#")[1]).show()}).on("keydown",".wc-tabs li a, ul.tabs li a",function(e){var i="rtl"===document.documentElement.dir,o=e.key,a=i?"ArrowLeft":"ArrowRight",r=i?"ArrowRight":"ArrowLeft",n="ArrowDown",s="ArrowUp",l="Home",c="End";if([a,r,n,s,c,l].includes(o)){var d=t(this),p=d.closest(".wc-tabs-wrapper, .woocommerce-tabs").find(".wc-tabs, ul.tabs").find('a[role="tab"]'),h=p.length-1,g=p.index(d),u=o===r||o===s?g-1:g+1,m="horizontal";if(p.length>=2){var _=p[0].getBoundingClientRect(),f=p[1].getBoundingClientRect();m=Math.abs(f.top-_.top)>Math.abs(f.left-_.left)?"vertical":"horizontal"}("vertical"!==m||o!==r&&o!==a)&&("horizontal"!==m||o!==s&&o!==n)&&(e.preventDefault(),o===r&&0===g&&"horizontal"===m||o===s&&0===g&&"vertical"===m||o===c?u=h:(a===o&&g===h&&"horizontal"===m||n===o&&g===h&&"vertical"===m||o===l)&&(u=0),p.eq(u).focus())}}).on("click","a.woocommerce-review-link",function(){return t(".reviews_tab a").trigger("click"),!0}).on("init","#rating",function(){t(this).hide().before('<p class="stars">\t\t\t\t\t\t<span role="group" aria-labelledby="comment-form-rating-label">\t\t\t\t\t\t\t<a role="radio" tabindex="0" aria-checked="false" class="star-1" href="#">'+wc_single_product_params.i18n_rating_options[0]+'</a>\t\t\t\t\t\t\t<a role="radio" tabindex="-1" aria-checked="false" class="star-2" href="#">'+wc_single_product_params.i18n_rating_options[1]+'</a>\t\t\t\t\t\t\t<a role="radio" tabindex="-1" aria-checked="false" class="star-3" href="#">'+wc_single_product_params.i18n_rating_options[2]+'</a>\t\t\t\t\t\t\t<a role="radio" tabindex="-1" aria-checked="false" class="star-4" href="#">'+wc_single_product_params.i18n_rating_options[3]+'</a>\t\t\t\t\t\t\t<a role="radio" tabindex="-1" aria-checked="false" class="star-5" href="#">'+wc_single_product_params.i18n_rating_options[4]+"</a>\t\t\t\t\t\t</span>\t\t\t\t\t</p>")}).on("click","#respond p.stars a",function(){var e=t(this),i=e.closest("p.stars").find("a").index(e)+1,o=t(this).closest("#respond").find("#rating"),a=t(this).closest(".stars");return o.val(i),e.siblings("a").removeClass("active").attr("aria-checked","false").attr("tabindex","-1"),e.addClass("active").attr("aria-checked","true").attr("tabindex","0"),a.addClass("selected"),!1}).on("click","#respond #submit",function(){var e=t(this).closest("#respond").find("#rating"),i=e.val();if(e.length>0&&!i&&"yes"===wc_single_product_params.review_rating_required)return window.alert(wc_single_product_params.i18n_required_rating_text),!1}).on("keyup",".wc-tabs li a, ul.tabs li a, #respond p.stars a",function(e){var i=e.key,o=["ArrowRight","ArrowDown"];o.concat(["ArrowLeft","ArrowUp"]).includes(i)&&(e.preventDefault(),e.stopPropagation(),o.includes(i)?t(this).next().focus().click():t(this).prev().focus().click())}),t(".wc-tabs-wrapper, .woocommerce-tabs, #rating").trigger("init");var e=function(e,i){this.$target=e,this.$images=t(".woocommerce-product-gallery__image",e),0!==this.$images.length?(e.data("product_gallery",this),this.flexslider_enabled="function"==typeof t.fn.flexslider&&wc_single_product_params.flexslider_enabled,this.zoom_enabled="function"==typeof t.fn.zoom&&wc_single_product_params.zoom_enabled,this.photoswipe_enabled="undefined"!=typeof PhotoSwipe&&wc_single_product_params.photoswipe_enabled,i&&(this.flexslider_enabled=!1!==i.flexslider_enabled&&this.flexslider_enabled,this.zoom_enabled=!1!==i.zoom_enabled&&this.zoom_enabled,this.photoswipe_enabled=!1!==i.photoswipe_enabled&&this.photoswipe_enabled),1===this.$images.length&&(this.flexslider_enabled=!1),this.initFlexslider=this.initFlexslider.bind(this),this.initZoom=this.initZoom.bind(this),this.initZoomForTarget=this.initZoomForTarget.bind(this),this.initPhotoswipe=this.initPhotoswipe.bind(this),this.onResetSlidePosition=this.onResetSlidePosition.bind(this),this.getGalleryItems=this.getGalleryItems.bind(this),this.openPhotoswipe=this.openPhotoswipe.bind(this),this.trapFocusPhotoswipe=this.trapFocusPhotoswipe.bind(this),this.handlePswpTrapFocus=this.handlePswpTrapFocus.bind(this),this.flexslider_enabled?(this.initFlexslider(i.flexslider),e.on("woocommerce_gallery_reset_slide_position",this.onResetSlidePosition)):this.$target.css("opacity",1),this.zoom_enabled&&(this.initZoom(),e.on("woocommerce_gallery_init_zoom",this.initZoom)),this.photoswipe_enabled&&this.initPhotoswipe()):this.$target.css("opacity",1)};e.prototype.initFlexslider=function(e){var i=this.$target,o=this,a=t.extend({selector:".woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image",start:function(){i.css("opacity",1)},after:function(t){o.initZoomForTarget(o.$images.eq(t.currentSlide))}},e);i.flexslider(a),t(".woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:eq(0) .wp-post-image").one("load",function(){var e=t(this);e&&setTimeout(function(){var t=e.closest(".woocommerce-product-gallery__image").height(),i=e.closest(".flex-viewport");t&&i&&i.height(t)},100)}).each(function(){this.complete&&t(this).trigger("load")})},e.prototype.initZoom=function(){"complete"===document.readyState?this.initZoomForTarget(this.$images.first()):t(window).on("load",()=>{this.initZoomForTarget(this.$images.first())})},e.prototype.initZoomForTarget=function(e){if(!this.zoom_enabled)return!1;var i=this.$target.width(),o=!1;if(t(e).each(function(e,a){if(t(a).find("img").data("large_image_width")>i)return o=!0,!1}),o){var a=t.extend({touch:!1,callback:function(){var t=this;setTimeout(function(){t.removeAttribute("role"),t.setAttribute("alt",""),t.setAttribute("aria-hidden","true")},100)}},wc_single_product_params.zoom_options);"ontouchstart"in document.documentElement&&(a.on="click"),e.trigger("zoom.destroy"),e.zoom(a),setTimeout(function(){e.find(":hover").length&&e.trigger("mouseover")},100)}},e.prototype.initPhotoswipe=function(){this.zoom_enabled&&this.$images.length>0?(this.$target.prepend('<a href="#" role="button" class="woocommerce-product-gallery__trigger" aria-haspopup="dialog" aria-controls="photoswipe-fullscreen-dialog" aria-label="'+wc_single_product_params.i18n_product_gallery_trigger_text+'"><span aria-hidden="true">🔍</span></a>'),this.$target.on("click",".woocommerce-product-gallery__trigger",this.openPhotoswipe),this.$target.on("click",".woocommerce-product-gallery__image a",function(t){t.preventDefault()}),this.flexslider_enabled||this.$target.on("click",".woocommerce-product-gallery__image a",this.openPhotoswipe)):this.$target.on("click",".woocommerce-product-gallery__image a",this.openPhotoswipe)},e.prototype.onResetSlidePosition=function(){this.$target.flexslider(0)},e.prototype.getGalleryItems=function(){var e=this.$images,i=[];return e.length>0&&e.each(function(e,o){var a=t(o).find("img");if(a.length){var r=a.attr("data-large_image"),n=a.attr("data-large_image_width"),s=a.attr("data-large_image_height"),l={alt:a.attr("alt"),src:r,w:n,h:s,title:a.attr("data-caption")?a.attr("data-caption"):a.attr("title")};i.push(l)}}),i},e.prototype.openPhotoswipe=function(e){e.preventDefault();var i,o=t(".pswp")[0],a=this.getGalleryItems(),r=t(e.target),n=e.currentTarget,s=this;i=0<r.closest(".woocommerce-product-gallery__trigger").length?this.$target.find(".flex-active-slide"):r.closest(".woocommerce-product-gallery__image");var l=t.extend({index:t(i).index(),addCaptionHTMLFn:function(t,e){return t.title?(e.children[0].textContent=t.title,!0):(e.children[0].textContent="",!1)},timeToIdle:0},wc_single_product_params.photoswipe_options),c=new PhotoSwipe(o,PhotoSwipeUI_Default,a,l);c.listen("afterInit",function(){s.trapFocusPhotoswipe(!0)}),c.listen("close",function(){s.trapFocusPhotoswipe(!1),n.focus()}),c.init()},e.prototype.trapFocusPhotoswipe=function(t){var e=document.querySelector(".pswp");e&&(t?e.addEventListener("keydown",this.handlePswpTrapFocus):e.removeEventListener("keydown",this.handlePswpTrapFocus))},e.prototype.handlePswpTrapFocus=function(t){var e=t.currentTarget.querySelectorAll("button:not([disabled])"),i=Array.from(e).filter(function(t){return"none"!==t.style.display&&"none"!==window.getComputedStyle(t).display});if(!(1>=i.length)){var o=i[0],a=i[i.length-1];"Tab"===t.key&&(t.shiftKey?document.activeElement===o&&(t.preventDefault(),a.focus()):document.activeElement===a&&(t.preventDefault(),o.focus()))}},t.fn.wc_product_gallery=function(t){return new e(this,t||wc_single_product_params),this},t(".woocommerce-product-gallery").each(function(){t(this).trigger("wc-product-gallery-before-init",[this,wc_single_product_params]),t(this).wc_product_gallery(wc_single_product_params),t(this).trigger("wc-product-gallery-after-init",[this,wc_single_product_params])})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self,function(){var n=e.Cookies,o=e.Cookies=t();o.noConflict=function(){return e.Cookies=n,o}}())}(this,function(){"use strict";function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)e[o]=n[o]}return e}return function t(n,o){function r(t,r,i){if("undefined"!=typeof document){"number"==typeof(i=e({},o,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var u in i)i[u]&&(c+="; "+u,!0!==i[u]&&(c+="="+i[u].split(";")[0]));return document.cookie=t+"="+n.write(r,t)+c}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],o={},r=0;r<t.length;r++){var i=t[r].split("="),c=i.slice(1).join("=");try{var u=decodeURIComponent(i[0]);if(o[u]=n.read(c,u),e===u)break}catch(f){}}return e?o[e]:o}},remove:function(t,n){r(t,"",e({},n,{expires:-1}))},withAttributes:function(n){return t(this.converter,e({},this.attributes,n))},withConverter:function(n){return t(e({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(o)},converter:{value:Object.freeze(n)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})});
function focus_populate_live_region(){var e=["woocommerce-message","woocommerce-error","wc-block-components-notice-banner"].map(function(e){return"."+e+'[role="alert"]'}).join(", "),o=document.querySelectorAll(e);if(0!==o.length){var t=o[0];t.setAttribute("tabindex","-1");var n=setTimeout(function(){t.focus(),clearTimeout(n)},500)}}function refresh_sorted_by_live_region(){var e=document.querySelector(".woocommerce-result-count");if(e){var o=e.innerHTML;e.setAttribute("aria-hidden","true");var t=setTimeout(function(){e.setAttribute("aria-hidden","false"),e.innerHTML="",e.innerHTML=o,clearTimeout(t)},2e3)}}function on_document_ready(){focus_populate_live_region(),refresh_sorted_by_live_region()}jQuery(function(e){e(".woocommerce-ordering").on("change","select.orderby",function(){e(this).closest("form").trigger("submit")}),e("input.qty:not(.product-quantity input.qty)").each(function(){var o=parseFloat(e(this).attr("min"));o>=0&&parseFloat(e(this).val())<o&&e(this).val(o)}),document.body.addEventListener("keydown",function(e){e.target.matches('a[role="button"]')&&(" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),e.target.click()))});var o="store_notice"+(e(".woocommerce-store-notice").data("noticeId")||"");if("hidden"===Cookies.get(o))e(".woocommerce-store-notice").hide();else{e(".woocommerce-store-notice").show(),e(".woocommerce-store-notice__dismiss-link").on("click",function t(n){Cookies.set(o,"hidden",{path:"/"}),e(".woocommerce-store-notice").hide(),n.preventDefault(),e(".woocommerce-store-notice__dismiss-link").off("click",t)})}e(".woocommerce-input-wrapper span.description").length&&e(document.body).on("click",function(){e(".woocommerce-input-wrapper span.description:visible").prop("aria-hidden",!0).slideUp(250)}),e(".woocommerce-input-wrapper").on("click",function(e){e.stopPropagation()}),e(".woocommerce-input-wrapper :input").on("keydown",function(o){var t=e(this).parent().find("span.description");if(27===o.which&&t.length&&t.is(":visible"))return t.prop("aria-hidden",!0).slideUp(250),o.preventDefault(),!1}).on("click focus",function(){var o=e(this).parent(),t=o.find("span.description");o.addClass("currentTarget"),e(".woocommerce-input-wrapper:not(.currentTarget) span.description:visible").prop("aria-hidden",!0).slideUp(250),t.length&&t.is(":hidden")&&t.prop("aria-hidden",!1).slideDown(250),o.removeClass("currentTarget")}),e.scroll_to_notices=function(o){o.length&&e("html, body").animate({scrollTop:o.offset().top-100},1e3)},e('.woocommerce form .woocommerce-Input[type="password"]').wrap('<span class="password-input"></span>'),e(".woocommerce form input").filter(":password").parent("span").addClass("password-input"),e(".password-input").each(function(){const o=e(this).find("input").attr("id");e(this).append('<button type="button" class="show-password-input" aria-label="'+woocommerce_params.i18n_password_show+'" aria-describedBy="'+o+'"></button>')}),e(".show-password-input").on("click",function(o){o.preventDefault(),e(this).hasClass("display-password")?(e(this).removeClass("display-password"),e(this).attr("aria-label",woocommerce_params.i18n_password_show)):(e(this).addClass("display-password"),e(this).attr("aria-label",woocommerce_params.i18n_password_hide)),e(this).hasClass("display-password")?e(this).siblings(['input[type="password"]']).prop("type","text"):e(this).siblings('input[type="text"]').prop("type","password"),e(this).siblings("input").focus()}),e("a.coming-soon-footer-banner-dismiss").on("click",function(o){var t=e(o.target);e.ajax({type:"post",url:t.data("rest-url"),data:{woocommerce_meta:{coming_soon_banner_dismissed:"yes"}},beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",t.data("rest-nonce"))},complete:function(){e("#coming-soon-footer-banner").hide()}})}),e(document.body).on("item_removed_from_classic_cart updated_wc_div",focus_populate_live_region)}),document.addEventListener("DOMContentLoaded",on_document_ready);
(function($){
'use strict';
$(document).ready(function (){
$('body').on('adding_to_cart', function(event, $button){
if($button&&$button.hasClass('vc_gitem-link') ){
$button
.addClass('vc-gitem-add-to-cart-loading-btn')
.parents('.vc_grid-item-mini')
.addClass('vc-woocommerce-add-to-cart-loading')
.append($('<div class="vc_wc-load-add-to-loader-wrapper"><div class="vc_wc-load-add-to-loader"></div></div>') );
}}).on('added_to_cart', function(event, fragments, cart_hash, $button){
if('undefined'===typeof($button) ){
$button=$('.vc-gitem-add-to-cart-loading-btn');
}
if($button&&$button.hasClass('vc_gitem-link') ){
$button
.removeClass('vc-gitem-add-to-cart-loading-btn')
.parents('.vc_grid-item-mini')
.removeClass('vc-woocommerce-add-to-cart-loading')
.find('.vc_wc-load-add-to-loader-wrapper').remove();
}});
});
})(window.jQuery);
!function(a){a(function(){var i={init:function(p){p.find(".quantity").each(function(){var n,t,i=a(this).find("input.qty");i.length&&(n=parseInt(i.prop("min"),10),t=""!==i.prop("max")?parseInt(i.prop("max"),10):1/0,1===n&&n===t?(i.prop("type","hidden"),a(this).addClass("hidden")):a(this).hasClass("hidden")&&(i.prop("type","number"),a(this).removeClass("hidden")))}),p.hasClass("variations_form")&&p.on("show_variation",function(n,t){var i=p.find("input.qty"),a=p.find(".quantity"),e=void 0===t.step||t.step.length?1:parseInt(t.step,10),o=parseInt(t.min_qty,10),t=""!==t.max_qty?parseInt(t.max_qty,10):1/0;1<e&&(e<o?o=(remain=o/e)?e*Math.ceil(remain):o:0<o&&(o=Math.max(o,e)),e<t?t=(remain=t/e)?e*Math.floor(remain):t:t<e&&(t=e)),i.prop("step",e).val(o),i.prop("min",o),i.prop("max",t),1===o&&o===t?(i.prop("type","hidden"),a.addClass("hidden")):a.hasClass("hidden")&&(i.prop("type","number"),a.removeClass("hidden"))})},watch:function(){a("body").on("wc-mmq-init-validation",function(n,t){i.init(t)})}},n=a("body").find(".cart:not(.cart_group)");n.length&&(n.each(function(){i.init(a(this))}),i.watch())})}(jQuery,(document,window));
jQuery(document).ready((function(e){"use strict";let i,a,t;e(document).on("click",".reviews-images-item",(function(){let s=e(this);if(s.closest(".kt-reviews-image-container").hasClass("kt-reviews-image-container-image-popup-below_thumb")){let s,r;t=e(this).parent().parent(),s=parseInt(t.find(".wcpr-rotate-value").val());let n=t.find(".big-review-images");if(e(this).hasClass("active-image"))n.hide(),e(this).removeClass("active-image");else{i=e(this).data("index"),a=e(this).parent().find(".reviews-images-item").length,e(this).parent().find(".reviews-images-item").removeClass("active-image"),e(this).addClass("active-image");let s="";s=e(this).find(".reviews-iframe").length?'<iframe class="reviews-images reviews-iframe" src="'+e(this).data("image_src")+'" frameborder="0" style="float:left;display: block;border-radius: 3px;" allowfullscreen></iframe>':e(this).find(".review-videos").length?'<video class="reviews-images reviews-videos" width="100%" src="'+e(this).data("image_src")+'" controls></video>':'<img class="big-review-images-content-img" style="float:left;display: block;border-radius: 3px;" src="'+e(this).data("image_src")+'">',t.find(".big-review-images-content").html(s),n.css({display:"table"}),t.find(".wcpr-review-image-caption").html(e(this).data("image_caption"))}s&&(r=t.find(".big-review-images-content-container"),r.css({transform:"rotate("+s+"deg)"}))}else{let i=s.find(".review-images").closest(".kt-wc-reviews-images-wrap-wrap"),a=[];i.find(".reviews-images-item").map((function(){let t=e(this).find(".review-images"),s=e(this).data("image_src")?e(this).data("image_src"):t.attr("src"),r=e(this).data("image_caption")?e(this).data("image_caption"):parseInt(e(this).data("index"))+1+"/"+i.find(".reviews-images-item").length;a.push({href:s,title:r})})),e.swipebox(a,{hideBarsDelay:1e5,initialIndexOnArray:s.data("index")})}})),e(document).on("click",".big-review-images-content-img",(function(){let i=e(this).closest(".kt-reviews-image-container").find(".kt-wc-reviews-images-wrap-wrap"),a=[];i.find(".reviews-images-item").map((function(){let t=e(this).find(".review-images"),s=e(this).data("image_src")?e(this).data("image_src"):t.attr("src"),r=e(this).data("image_caption")?e(this).data("image_caption"):parseInt(e(this).data("index"))+1+"/"+i.find(".reviews-images-item").length;a.push({href:s,title:r})})),e.swipebox(a,{hideBarsDelay:1e5,initialIndexOnArray:i.find(".active-image").data("index")})})),e(document).on("click",".wcpr-next-normal",(function(){let s,r;t=e(this).parent().parent(),s=parseInt(t.find(".wcpr-rotate-value").val()),i=t.find(".active-image").data("index"),a=t.find(".reviews-images-item").length,t.find(".reviews-images-item").removeClass("active-image"),i<a-1?i++:i=0,t.find(".reviews-images-item").eq(i).addClass("active-image"),t.find(".big-review-images-content").html("");let n=t.find(".big-review-images"),m="";m=t.find(".active-image .reviews-iframe").length?'<iframe class="reviews-images reviews-iframe" src="'+t.find(".reviews-images-item").eq(i).data("image_src")+'" frameborder="0" style="float:left;display: block;border-radius: 3px;" allowfullscreen></iframe>':t.find(".active-image .review-videos").length?'<video class="reviews-images reviews-videos" width="100%" src="'+t.find(".reviews-images-item").eq(i).data("image_src")+'" controls></video>':'<img class="big-review-images-content-img" style="float:left;display: block;border-radius: 3px;" src="'+t.find(".reviews-images-item").eq(i).data("image_src")+'">',n.find(".big-review-images-content").append(m),n.css({display:"table"}),t.find(".wcpr-review-image-caption").html(t.find(".reviews-images-item").eq(i).data("image_caption")),s&&(r=t.find(".big-review-images-content-container"),r.css({transform:"rotate("+s+"deg)"}))})),e(document).on("click",".wcpr-prev-normal",(function(){let s,r;t=e(this).parent().parent(),s=parseInt(t.find(".wcpr-rotate-value").val()),i=t.find(".active-image").data("index"),a=t.find(".reviews-images-item").length,t.find(".reviews-images-item").removeClass("active-image"),i>0?i--:i=a-1,t.find(".reviews-images-item").eq(i).addClass("active-image"),t.find(".big-review-images-content").html("");let n=t.find(".big-review-images"),m="";m=t.find(".active-image .reviews-iframe").length?'<iframe class="reviews-images reviews-iframe" src="'+t.find(".reviews-images-item").eq(i).data("image_src")+'" frameborder="0" style="float:left;display: block;border-radius: 3px;" allowfullscreen></iframe>':t.find(".active-image .review-videos").length?'<video class="reviews-images reviews-videos" width="100%" src="'+t.find(".reviews-images-item").eq(i).data("image_src")+'" controls></video>':'<img class="big-review-images-content-img" style="float:left;display: block;border-radius: 3px;" src="'+t.find(".reviews-images-item").eq(i).data("image_src")+'">',n.find(".big-review-images-content").append(m),n.css({display:"table"}),t.find(".wcpr-review-image-caption").html(t.find(".reviews-images-item").eq(i).data("image_caption")),s&&(r=t.find(".big-review-images-content-container"),r.css({transform:"rotate("+s+"deg)"}))})),e(document).on("click",".wcpr-close-normal",(function(){t=e(this).parent().parent(),e(this).parent().hide(),t.find(".kt-wc-reviews-images-wrap-wrap").find(".active-image").removeClass("active-image")})),e(document).on("click",".wcpr-rotate-left",(function(){let i,a;t=e(this).parent().parent(),i=parseInt(t.find(".wcpr-rotate-value").val()),a=t.find(".big-review-images-content-container"),i+=-90,t.find(".wcpr-rotate-value").val(i),a.css({transform:"rotate("+i+"deg)"})})),e(document).on("click",".wcpr-rotate-right",(function(){let i,a;t=e(this).parent().parent(),i=parseInt(t.find(".wcpr-rotate-value").val()),a=t.find(".big-review-images-content-container"),i+=90,t.find(".wcpr-rotate-value").val(i),a.css({transform:"rotate("+i+"deg)"})}));let s=woocommerce_photo_reviews_params.hasOwnProperty("comments_container_id")?woocommerce_photo_reviews_params.comments_container_id:"comments",r=e(".wcpr-filter-container");e("#"+s).prepend(r).prepend(e(".wcpr-overall-rating-and-rating-count")).prepend(e(".woocommerce-Reviews-title").eq(0))}));
jQuery(window).on("elementor/frontend/init",()=>{"use strict";elementorFrontend.hooks.addAction("frontend/element_ready/woocommerce-photo-reviews.default",function($scope){if(!window.elementor){return}wcpr_helpful_button();viwcpr_flexslider()})});jQuery(document).ready(function($){"use strict";let image_caption_enable=woocommerce_photo_reviews_params.image_caption_enable==1;let i18n_image_caption=woocommerce_photo_reviews_params.i18n_image_caption;function getSelectedImageHtml(src,name,error="",index){let selectImageHtml;let temp=`<img title="${name}" src="${src}" class="wcpr-selected-image-preview">`;if(src.indexOf("data:video/")>-1){temp=`<video class="wcpr-selected-image-preview" height="100%" width="100%" src="${src}" controls >${name}</video>`}if(error){selectImageHtml=`<div class="wcpr-selected-image">${temp}<div class="wcpr-selected-image-info"><div class="wcpr-selected-image-name wcpr-comment-form-error" >${error}</div></div></div>`}else if(image_caption_enable){selectImageHtml=`<div class="wcpr-selected-image">${temp}<div class="wcpr-selected-image-info"><div class="wcpr-selected-image-name" title="${name}">${name}</div><input class="wcpr-selected-image-caption" type="text" name="wcpr_image_caption[${index}]" placeholder="${i18n_image_caption}"></div></div>`}else{selectImageHtml=`<div class="wcpr-selected-image">${temp}<div class="wcpr-selected-image-info"><div class="wcpr-selected-image-name" title="${name}">${name}</div></div></div>`}return selectImageHtml}function readURL(input){let max_file_size=1024*parseFloat(woocommerce_photo_reviews_params.max_file_size);for(let i=0;i<input.files.length;i++){var reader=new FileReader;const dt=new DataTransfer;const file=input.files[i];dt.items.add(file);reader.onload=function(e){let error="";if(input.files[i].size>max_file_size){error=woocommerce_photo_reviews_params.warning_max_file_size.replace("%file_name%",input.files[i].name)}else if(woocommerce_photo_reviews_params.upload_allow.indexOf(input.files[i].type)===-1){error=woocommerce_photo_reviews_params.warning_upload_allow.replace("%file_name%",input.files[i].name)}if(woocommerce_photo_reviews_params.image_caption_enable==1){const fileInput=$("<input>").attr("type","file").attr("class","wcpr-hidden").attr("name",`wcpr_image_upload[${i}]`)[0];fileInput.files=dt.files;$(input).parent().find(".wcpr-selected-image-container").append(getSelectedImageHtml(e.target.result,input.files[i].name,error,i)).append(fileInput)}else{$(input).parent().find(".wcpr-selected-image-container").append(getSelectedImageHtml(e.target.result,input.files[i].name,error,i))}};reader.readAsDataURL(input.files[i])}}wcpr_helpful_button();viwcpr_flexslider();let max_files=woocommerce_photo_reviews_params.max_files;$("#commentform").on("change",".wcpr_image_upload",function(e){$(this).parent().find(".wcpr-selected-image-container").html("");if(this.files.length>max_files){jQuery(".wcpr-comment-form-error-wraps").removeClass("wcpr-hidden").html(woocommerce_photo_reviews_params.warning_max_files);$(this).val("");return false}else if(this.files.length>0){jQuery(".wcpr-comment-form-error-wraps").addClass("wcpr-hidden");readURL(this)}});jQuery(document).on("click",".wcpr_image_upload_button",function(e){e.preventDefault();e.stopPropagation();jQuery(this).parent().find(".wcpr_image_upload").trigger("click")});$("#commentform").find('input[type="submit"]').on("click",function(e){let $button=$(this);if($button.hasClass("viwcpr_form_checked")||!$("#wcpr_image_upload_nonce").length){return true}let $container=$button.closest("form");let $content=$container.find('textarea[id="comment"]')||$container.find('textarea[name="comment"]');let $name=$container.find('input[name="author"]');let $email=$container.find('input[name="email"]');jQuery(".wcpr-comment-form-error-wraps").addClass("wcpr-hidden");jQuery(".wcpr-comment-form-notify-wraps").addClass("wcpr-hidden");let $rating=$container.find("#rating"),rating=$rating.val();if($rating.length>0&&!rating&&woocommerce_photo_reviews_params.review_rating_required==="yes"){jQuery(".wcpr-comment-form-error-wraps").removeClass("wcpr-hidden").html(woocommerce_photo_reviews_params.i18n_required_rating_text);e.preventDefault();return false}if($content.length>0){let comment=$content.val();if(!comment&&woocommerce_photo_reviews_params.allow_empty_comment!=1){jQuery(".wcpr-comment-form-error-wraps").removeClass("wcpr-hidden").html(woocommerce_photo_reviews_params.i18n_required_comment_text);e.preventDefault();$content.focus();return false}let minimum_comment_length=parseInt(woocommerce_photo_reviews_params.minimum_comment_length);if(minimum_comment_length&&minimum_comment_length>comment.length){jQuery(".wcpr-comment-form-error-wraps").removeClass("wcpr-hidden").html(woocommerce_photo_reviews_params.i18n_minimum_comment_text);e.preventDefault();$content.focus();return false}}if($name.length>0&&$name.attr("required")&&!$name.val()){jQuery(".wcpr-comment-form-error-wraps").removeClass("wcpr-hidden").html(woocommerce_photo_reviews_params.i18n_required_name_text);e.preventDefault();$name.focus();return false}if($email.length>0&&$email.attr("required")&&!$email.val()){jQuery(".wcpr-comment-form-error-wraps").removeClass("wcpr-hidden").html(woocommerce_photo_reviews_params.i18n_required_email_text);e.preventDefault();$email.focus();return false}if($container.find('input[name="wcpr_gdpr_checkbox"]').prop("checked")===false){jQuery(".wcpr-comment-form-error-wraps").removeClass("wcpr-hidden").html(woocommerce_photo_reviews_params.warning_gdpr);e.preventDefault();return false}if("on"===woocommerce_photo_reviews_params.enable_photo){if(!$container.attr("enctype")||$container.attr("enctype")!=="multipart/form-data"){$container.attr("enctype","multipart/form-data")}let $fileUpload=$container.find(".wcpr_image_upload");if($fileUpload.length>0){let file_upload=$fileUpload.get(0).files;let imagesCount=parseInt(file_upload.length);if("on"===woocommerce_photo_reviews_params.required_image&&imagesCount===0){jQuery(".wcpr-comment-form-error-wraps").removeClass("wcpr-hidden").html(woocommerce_photo_reviews_params.warning_required_image);e.preventDefault();return false}if(imagesCount>max_files){jQuery(".wcpr-comment-form-error-wraps").removeClass("wcpr-hidden").html(woocommerce_photo_reviews_params.warning_max_files);e.preventDefault();return false}let error=[],max_file_size=1024*parseFloat(woocommerce_photo_reviews_params.max_file_size);jQuery.each(file_upload,function(k,v){if(v.size>max_file_size){error.push("<p>"+woocommerce_photo_reviews_params.warning_max_file_size.replace("%file_name%",v.name)+"</p>");return true}if(woocommerce_photo_reviews_params.upload_allow.indexOf(v.type)===-1){error.push("<p>"+woocommerce_photo_reviews_params.warning_upload_allow.replace("%file_name%",v.name)+"</p>")}});if(error.length){jQuery(".wcpr-comment-form-error-wraps").removeClass("wcpr-hidden").html(error.join(""));e.preventDefault();return false}}else if("on"===woocommerce_photo_reviews_params.required_image){jQuery(".wcpr-comment-form-error-wraps").removeClass("wcpr-hidden").html(woocommerce_photo_reviews_params.warning_required_image);e.preventDefault();return false}}jQuery(".wcpr-comment-form-notify-wraps").removeClass("wcpr-hidden");if(woocommerce_photo_reviews_params.restrict_number_of_reviews){$button.attr("type","button");let restrict_number_of_reviews=async function(){let error="",data=new FormData($container[0]);if($content.val()&&!$container.find('textarea[name="comment"]').val()){data.set("comment",$content.val())}await new Promise(function(resolve){$.ajax({type:"post",url:woocommerce_photo_reviews_params.wc_ajax_url.toString().replace("%%endpoint%%","viwcpr_restrict_number_of_reviews"),processData:false,cache:false,contentType:false,data:data,success:function(response){if(response.error){error=response.error}else{if(response.remove_upload_file){$container.find(".wcpr_image_upload").val("")}if(response.img_id){$container.append(`<input type="hidden" name="wcpr_image_upload_id" value="${response.img_id}">`)}}resolve(error)},error:function(err){error=err.responseText==="-1"?err.statusText:err.responseText;resolve(error)}})});return error};restrict_number_of_reviews().then(function(error){$button.attr("type","submit");if(error){jQuery(".wcpr-comment-form-notify-wraps").addClass("wcpr-hidden");jQuery(".wcpr-comment-form-error-wraps").removeClass("wcpr-hidden").html(error);e.preventDefault();return false}else{$button.addClass("viwcpr_form_checked").trigger("click")}})}});let comments=woocommerce_photo_reviews_params.hasOwnProperty("comments_container_id")?woocommerce_photo_reviews_params.comments_container_id:"comments";let $comments=$("#"+comments);if($comments.length>0){append_filters_and_overall_rating();handle_ajax_pagination_and_loadmore()}else{$(document).on("skeleton-loaded",function(){$comments=$("#"+comments);append_filters_and_overall_rating();handle_ajax_pagination_and_loadmore()})}$(document).on("click",".reviews_tab",function(){$comments=$("#"+comments);append_filters_and_overall_rating()});function handle_ajax_pagination_and_loadmore(){if(woocommerce_photo_reviews_params.pagination_ajax&&$comments.length){let $pagination_container=$comments.find(".woocommerce-pagination");if(woocommerce_photo_reviews_params.loadmore_button){$pagination_container.html(jQuery(".wcpr-load-more-reviews-button-modal").html());wcpr_pagination_loadmore($comments,$comments.find(".woocommerce-pagination"))}else{wcpr_pagination_basic($comments,$comments.find(".woocommerce-pagination"))}}else if(jQuery(".et_divi_theme").length){jQuery("a.wcpr-filter-button").on("click",function(){location.href=jQuery(this).attr("href")})}}function append_filters_and_overall_rating(){$comments.prepend($(".wcpr-filter-container")).prepend($(".wcpr-overall-rating-and-rating-count")).prepend($(".woocommerce-Reviews-title").eq(0))}function wcpr_pagination_basic($comments,$pagination_container){$comments=jQuery($comments);$pagination_container=jQuery($pagination_container);let ajax_pagination_running=false;jQuery(document).on("click",".woocommerce-pagination a",function(e){if(ajax_pagination_running){return false}e.preventDefault();e.stopPropagation();let $container=woocommerce_photo_reviews_params.display==="1"?$comments.find(".wcpr-grid"):$comments.find(woocommerce_photo_reviews_params.container);let scrollTop=parseInt($container.offset().top)-200;window.scrollTo({top:scrollTop,behavior:"smooth"});ajax_pagination_running=true;let url=jQuery(this).attr("href");if(!$container.find(".wcpr-grid-overlay").length){$container.append('<div class="wcpr-grid-overlay wcpr-hidden"></div>')}let $overlay=$container.find(".wcpr-grid-overlay");$overlay.removeClass("wcpr-hidden");jQuery.ajax({url:url,type:"get",success:function(response){if(response){let $reg;let temp_html=jQuery(response);if(woocommerce_photo_reviews_params.display==="1"){$container.html(temp_html.find(".wcpr-grid").html())}else{$container.html(temp_html.find(woocommerce_photo_reviews_params.container).html())}if(temp_html.find(".woocommerce-pagination").length){$pagination_container.html(temp_html.find(".woocommerce-pagination").html())}jQuery(document.body).trigger("wcpr_ajax_pagination_end")}$overlay.addClass("wcpr-hidden");ajax_pagination_running=false},error:function(err){ajax_pagination_running=false;$overlay.addClass("wcpr-hidden")}})});let $filters=$comments.find(".wcpr-filter-container");if(!$filters.length){return false}if(jQuery(".et_divi_theme").length){jQuery("a.wcpr-filter-button").on("click",function(e){e.preventDefault();e.stopPropagation();let $button=jQuery(this);if(ajax_pagination_running||parseInt($button.find(".wcpr-filter-button-count").html())===0&&!$button.hasClass("wcpr-active")){return false}ajax_pagination_running=true;e.preventDefault();let url=jQuery(this).attr("href");let $container=woocommerce_photo_reviews_params.display==="1"?$comments.find(".wcpr-grid"):$comments.find(woocommerce_photo_reviews_params.container);if($container.length===0){if(woocommerce_photo_reviews_params.display==="1"){$comments.append('<div class="'+woocommerce_photo_reviews_params.grid_class+'"><div class="wcpr-grid-overlay"></div></div>');$container=$comments.find(".wcpr-grid")}else{let first_char=woocommerce_photo_reviews_params.container.substr(0,1);if(first_char==="."){$comments.append('<ol class="'+woocommerce_photo_reviews_params.container.substr(1)+'"></ol>')}else{$comments.append('<ol id="'+woocommerce_photo_reviews_params.container.substr(1)+'"></ol>')}$container=$comments.find(woocommerce_photo_reviews_params.container)}$comments.find(".woocommerce-noreviews").hide()}if(!$container.find(".wcpr-grid-overlay").length){$container.append('<div class="wcpr-grid-overlay wcpr-hidden"></div>')}let $overlay=$container.find(".wcpr-grid-overlay");$overlay.removeClass("wcpr-hidden");$filters.addClass("wcpr-filter-loading");jQuery.ajax({url:url,type:"get",data:{wcpr_is_ajax:1},success:function(response){if(response){response=response.replace(/(\r\n\t|\n|\r\t)/gm,"");let $reg,match;let temp_html=jQuery(response);if(woocommerce_photo_reviews_params.display==="1"){$container.html(temp_html.find(".wcpr-grid").html())}else{$container.html(temp_html.find(woocommerce_photo_reviews_params.container).html())}if(temp_html.find(".woocommerce-pagination").length){if($pagination_container&&$pagination_container.length){$pagination_container.html(temp_html.find(".woocommerce-pagination").html())}else{$comments.append('<nav class="woocommerce-pagination">'+temp_html.find(".woocommerce-pagination").html()+"</nav>");$pagination_container=$comments.find(".woocommerce-pagination")}}else{if($pagination_container&&$pagination_container.length>0){$pagination_container.remove();$pagination_container=null}}if(typeof woocommerce_photo_reviews_params.wrap_filters!=="undefined"){const className=woocommerce_photo_reviews_params.wrap_filters.trim();const classRegexSafe=className.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&").replace(/\s+/g,"\\s+");$reg=new RegExp(`<div class="${classRegexSafe}"\\s*style="display:\\s*none;">([^]+?)<\\/div>`,"gm")}else{$reg=/<div class="wcpr-filter-container" style="display: none;">([^]+?)<\/div>/gm}match=$reg.exec(response);if(match!=null){$filters.html(match[1])}jQuery(document.body).trigger("wcpr_ajax_pagination_end")}},error:function(err){console.log(err)},complete:function(){ajax_pagination_running=false;$overlay.addClass("wcpr-hidden");$filters.removeClass("wcpr-filter-loading")}})})}else{jQuery(document).on("click","a.wcpr-filter-button",function(e){e.preventDefault();e.stopPropagation();let $button=jQuery(this);if(ajax_pagination_running||parseInt($button.find(".wcpr-filter-button-count").html())===0&&!$button.hasClass("wcpr-active")){return false}ajax_pagination_running=true;e.preventDefault();let url=jQuery(this).attr("href");let $container=woocommerce_photo_reviews_params.display==="1"?$comments.find(".wcpr-grid"):$comments.find(woocommerce_photo_reviews_params.container);if($container.length===0){if(woocommerce_photo_reviews_params.display==="1"){$comments.append('<div class="'+woocommerce_photo_reviews_params.grid_class+'"><div class="wcpr-grid-overlay"></div></div>');$container=$comments.find(".wcpr-grid")}else{let first_char=woocommerce_photo_reviews_params.container.substr(0,1);if(first_char==="."){$comments.append('<ol class="'+woocommerce_photo_reviews_params.container.substr(1)+'"></ol>')}else{$comments.append('<ol id="'+woocommerce_photo_reviews_params.container.substr(1)+'"></ol>')}$container=$comments.find(woocommerce_photo_reviews_params.container)}$comments.find(".woocommerce-noreviews").hide()}if(!$container.find(".wcpr-grid-overlay").length){$container.append('<div class="wcpr-grid-overlay wcpr-hidden"></div>')}let $overlay=$container.find(".wcpr-grid-overlay");$overlay.removeClass("wcpr-hidden");$filters.addClass("wcpr-filter-loading");jQuery.ajax({url:url,type:"get",data:{wcpr_is_ajax:1},success:function(response){if(response){response=response.replace(/(\r\n\t|\n|\r\t)/gm,"");let $reg,match;let temp_html=jQuery(response);if(woocommerce_photo_reviews_params.display==="1"){$container.html(temp_html.find(".wcpr-grid").html())}else{$container.html(temp_html.find(woocommerce_photo_reviews_params.container).html())}if(temp_html.find(".woocommerce-pagination").length){if($pagination_container&&$pagination_container.length){$pagination_container.html(temp_html.find(".woocommerce-pagination").html())}else{$comments.append('<nav class="woocommerce-pagination">'+temp_html.find(".woocommerce-pagination").html()+"</nav>");$pagination_container=$comments.find(".woocommerce-pagination")}}else{if($pagination_container&&$pagination_container.length>0){$pagination_container.remove();$pagination_container=null}}if(typeof woocommerce_photo_reviews_params.wrap_filters!=="undefined"){const className=woocommerce_photo_reviews_params.wrap_filters.trim();const classRegexSafe=className.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&").replace(/\s+/g,"\\s+");$reg=new RegExp(`<div class="${classRegexSafe}"\\s*style="display:\\s*none;">([^]+?)<\\/div>`,"gm")}else{$reg=/<div class="wcpr-filter-container" style="display: none;">([^]+?)<\/div>/gm}match=$reg.exec(response);if(match!=null){$filters.html(match[1])}jQuery(document.body).trigger("wcpr_ajax_pagination_end")}},error:function(err){console.log(err)},complete:function(){ajax_pagination_running=false;$overlay.addClass("wcpr-hidden");$filters.removeClass("wcpr-filter-loading")}})})}}function wcpr_pagination_loadmore($comments,$pagination_container){$comments=jQuery($comments);$pagination_container=jQuery($pagination_container);let $filters=$comments.find(".wcpr-filter-container"),cpage=jQuery(".wcpr-load-more-reviews-cpage").val(),max_page=jQuery(".wcpr-load-more-reviews-cpage").data("max_page"),parent_post_id=jQuery(".wcpr-load-more-reviews-product-id").val(),rating=jQuery(".wcpr-load-more-reviews-rating").val(),verified=jQuery(".wcpr-load-more-reviews-verified").val(),image=jQuery(".wcpr-load-more-reviews-image").val(),$no_review=$comments.find(".woocommerce-noreviews"),$container=woocommerce_photo_reviews_params.display==="1"?$comments.find(".wcpr-grid"):$comments.find(woocommerce_photo_reviews_params.container);function handle_missing_container(){if($container.length===0){let first_char=woocommerce_photo_reviews_params.display==="1"?".":woocommerce_photo_reviews_params.container.substr(0,1);if(first_char==="."){$container=woocommerce_photo_reviews_params.display==="1"?jQuery('<div class="'+woocommerce_photo_reviews_params.grid_class+'"></div>'):jQuery('<ol class="'+woocommerce_photo_reviews_params.container.substr(1)+'"></ol>')}else{$container=jQuery('<ol id="'+woocommerce_photo_reviews_params.container.substr(1)+'"></ol>')}$comments.append($container)}}function handle_missing_pagination(){if($pagination_container.length===0){$comments.append('<nav class="woocommerce-pagination"></nav>');$pagination_container=$comments.find(".woocommerce-pagination")}}if(cpage&&parent_post_id){jQuery(document).on("click",".wcpr-load-more-reviews-button:not(.shortcode-wcpr-load-more-reviews-button):not(.wcpr-loading)",function(){let $button=jQuery(this);if($button.parent().hasClass("wcpr-hidden")){return false}if(cpage>-1){jQuery.ajax({url:woocommerce_photo_reviews_params.ajaxurl,data:{action:"wcpr_ajax_load_more_reviews",nonce:woocommerce_photo_reviews_params.nonce,post_id:parent_post_id,cpage:cpage,rating:rating,verified:verified,image:image,is_shortcode:"",frontend_style:woocommerce_photo_reviews_params.display},type:"POST",beforeSend:function(xhr){$button.addClass("wcpr-loading")},success:function(response){if(response.html){if(woocommerce_photo_reviews_params.display=="2"){$container.append(response.html)}else{let $html=jQuery(response.html);let review_html=$html.find('div[id^="comment-"]');$container.append(review_html)}if(woocommerce_photo_reviews_params.default_comments_page==="oldest"){if(cpage<max_page){cpage++}else{$button.parent().addClass("wcpr-hidden")}}else{if(cpage>1){cpage--}else{$button.parent().addClass("wcpr-hidden")}}}else{$button.parent().addClass("wcpr-hidden")}jQuery(document.body).trigger("wcpr_ajax_load_more_reviews_end")},complete:function(){$button.removeClass("wcpr-loading")}})}return false});let ajax_pagination_running=false;if($filters.length){let $filters_rating=$filters.find(".wcpr-filter-button-ul");jQuery(document).on("click","a.wcpr-filter-button",function(e){let $button=jQuery(this);let load_more_button=$button.closest("#comments").find(".wcpr-load-more-reviews-button:not(.shortcode-wcpr-load-more-reviews-button):not(.wcpr-loading)");if(ajax_pagination_running||parseInt($button.find(".wcpr-filter-button-count").html())===0&&!$button.hasClass("wcpr-active")){return false}if(woocommerce_photo_reviews_params.default_comments_page==="oldest"){cpage=1}else{cpage=""}let filter_type=$button.data("filter_type");switch(filter_type){case"all":if($button.hasClass("wcpr-active")){return false}else{rating=""}break;case"image":if($button.hasClass("wcpr-active")){image=""}else{image=1}break;case"verified":if($button.hasClass("wcpr-active")){verified=""}else{verified=1}break;default:if($button.hasClass("wcpr-active")){return false}else{rating=parseInt(filter_type)}}ajax_pagination_running=true;e.preventDefault();$filters.addClass("wcpr-filter-loading");jQuery.ajax({url:woocommerce_photo_reviews_params.ajaxurl,type:"POST",data:{action:"wcpr_ajax_load_more_reviews",post_id:parent_post_id,cpage:cpage,rating:rating,verified:verified,image:image,filter_type:filter_type,is_shortcode:"",frontend_style:woocommerce_photo_reviews_params.display},success:function(response){if(response.html){$no_review.hide();handle_missing_container()}if(woocommerce_photo_reviews_params.display=="2"){$container.html(response.html)}else{let $html=jQuery(response.html);let review_html=$html.find('div[id^="comment-"]');$container.html(review_html)}handle_missing_pagination();max_page=parseInt(response.max_page);if(!load_more_button.length){handle_ajax_pagination_and_loadmore()}$pagination_container.find(".wcpr-load-more-reviews-button").parent().removeClass("wcpr-hidden");if(woocommerce_photo_reviews_params.default_comments_page==="oldest"){if(cpage<max_page){cpage++}else{load_more_button.parent().addClass("wcpr-hidden")}}else{if(cpage>1){cpage--}else{load_more_button.parent().addClass("wcpr-hidden")}}let update_count=response.update_count;if(update_count){for(let i in update_count){if(update_count.hasOwnProperty(i)){$filters.find('.wcpr-filter-button[data-filter_type="'+i+'"]').find(".wcpr-filter-button-count").html(update_count[i])}}}$filters.find(".wcpr-filter-rating-placeholder .wcpr-filter-button-count").html(update_count.all);switch(filter_type){case"all":$filters_rating.find(".wcpr-filter-button").removeClass("wcpr-active");$button.addClass("wcpr-active");$filters.find(".wcpr-filter-rating-placeholder").html($button.html());break;case"image":case"verified":if($button.hasClass("wcpr-active")){$button.removeClass("wcpr-active")}else{$button.addClass("wcpr-active")}break;default:$filters_rating.find(".wcpr-filter-button").removeClass("wcpr-active");$button.addClass("wcpr-active");$filters.find(".wcpr-filter-rating-placeholder").html($button.html())}jQuery(document.body).trigger("wcpr_ajax_load_more_reviews_end")},error:function(err){console.log(err)},complete:function(){ajax_pagination_running=false;$filters.removeClass("wcpr-filter-loading")}})})}}}function viwcpr_flexslider(){"use strict";if(!jQuery(".woocommerce-photo-reviews-shortcode, .wcpr-review-title").length){setTimeout(function(){viwcpr_flexslider()},100);return false}jQuery(".woocommerce-photo-reviews-shortcode:not(.woocommerce-photo-reviews-slide)").each(function(){jQuery(this).addClass("woocommerce-photo-reviews-slide");if(!jQuery(this).data("wcpr_slide")){jQuery(this).addClass("woocommerce-photo-reviews-slide-none");return true}let rtl=false,now=Date.now(),params=jQuery(this).data("reviews_shortcode"),selector=".shortcode-wcpr-grid .shortcode-wcpr-grid-item";if(jQuery(this).find(".shortcode-wcpr-reviews").length){selector=".commentlist li"}if(!jQuery(this).find(".viwcpr-slide-wrap").length){jQuery(this).append('<div class="viwcpr-slide-wrap viwcpr-slide-wrap-'+now+'" data-id_css="viwcpr-slide-wrap-'+now+'"></div>');let tmp=jQuery(selector).parent().clone();jQuery(selector).parent().remove();jQuery(this).find(".viwcpr-slide-wrap").css({width:"100%",position:"relative"}).append(tmp)}if(jQuery(this).closest(".rtl").length){rtl=true}let wrap=jQuery(this).find(".viwcpr-slide-wrap");let wrap_width=wrap.innerWidth()?jQuery(this).parent().width():0,gap=parseInt(params.cols_gap||20),colums=parseInt(params.cols||4),colums_mobile=parseInt(params.cols_mobile||1);if(wrap_width<600&&wrap_width>=480){colums=colums>3?3:colums}if(wrap_width<480){colums=colums_mobile}jQuery(this).addClass("woocommerce-photo-reviews-slide-init");let itemWidth=wrap_width?(wrap_width-gap*colums)/colums:200;wrap.addClass("viwcpr-slide-wrap-init").removeData("flexslider").viwcaio_flexslider({namespace:"villatheme-slider-",selector:selector,animation:"slide",animationLoop:1,itemWidth:itemWidth,itemMargin:gap,controlNav:false,maxItems:colums,reverse:false,rtl:rtl,move:colums,touch:true,slideshow:false,start:function(slider){if(slider.count===slider.move){get_reviews(slider,1,params,selector).then(function(){slider.setProps(0)})}let id_css=slider.data("id_css"),css=`.${id_css} .viwse-suggestion-product-wrap{width: ${itemWidth}px !important;}`,h=0;for(let i=0;i<slider.move;i++){if(h<slider.find(selector).eq(i).innerHeight()){h=slider.find(selector).eq(i).innerHeight()}if(slider.find(selector).eq(i).find(".shortcode-reviews-images-wrap-right img").length){slider.find(selector).eq(i).find(".shortcode-reviews-images-wrap-right img").on("load",function(){if(!jQuery("#"+id_css).length){jQuery("head").append(`<style id="${id_css}"></style>`)}if(jQuery(this).closest(selector+":visible").length&&jQuery(this).closest(selector).innerHeight()&&slider.data("current_height")){let h_tmp=slider.find(selector).eq(i).innerHeight()+30;if(jQuery(this).closest(selector).innerHeight()>parseFloat(slider.data("current_height"))){let css_tmp=`.${id_css} .viwse-suggestion-product-wrap{width: ${itemWidth}px !important;}`;css_tmp+=`.${id_css} .villatheme-slider-viewport{height: ${h_tmp}px !important;}`;jQuery("#"+id_css).html(css_tmp);slider.data("current_height",h_tmp)}}})}}if(h){h+=30;css+=`.${id_css} .villatheme-slider-viewport{height: ${h}px !important;}`}if(!jQuery("#"+id_css).length){jQuery("head").append(`<style id="${id_css}"></style>`)}jQuery("#"+id_css).html(css);slider.data("current_height",h)},before:function(slider){slider.removeClass("viwcpr-slide-wrap-init")},after:function(slider){if(slider.hasClass("viwcpr-slide-wrap-init")){return true}slider.addClass("viwcpr-slide-wrap-init");let id_css=slider.data("id_css"),css=`.${id_css} .viwse-suggestion-product-wrap{width: ${itemWidth}px !important;}`,first=slider.currentSlide*slider.move,last=(slider.currentSlide+1)*slider.move,h=0;slider.find(selector).css({"margin-bottom":"0","margin-top":"0",width:`${itemWidth}px !important;`});if(first===last){h=slider.find(selector).eq(first).innerHeight();if(slider.find(selector).eq(first).find(".shortcode-reviews-images-wrap-right img").length){slider.find(selector).eq(first).find(".shortcode-reviews-images-wrap-right img").on("load",function(){if(!jQuery("#"+id_css).length){jQuery("head").append(`<style id="${id_css}"></style>`)}if(jQuery(this).closest(selector+":visible").length&&jQuery(this).closest(selector).innerHeight()&&slider.data("current_height")){let h_tmp=slider.find(selector).eq(i).innerHeight()+30;if(jQuery(this).closest(selector).innerHeight()>parseFloat(slider.data("current_height"))){let css_tmp=`.${id_css} .viwse-suggestion-product-wrap{width: ${itemWidth}px !important;}`;css_tmp+=`.${id_css} .villatheme-slider-viewport{height: ${h_tmp}px !important;}`;jQuery("#"+id_css).html(css_tmp);slider.data("current_height",h_tmp)}}})}}else{for(let i=first;i<last;i++){if(h<slider.find(selector).eq(i).innerHeight()){h=slider.find(selector).eq(i).innerHeight()}if(slider.find(selector).eq(i).find(".shortcode-reviews-images-wrap-right img").length){slider.find(selector).eq(i).find(".shortcode-reviews-images-wrap-right img").on("load",function(){if(!jQuery("#"+id_css).length){jQuery("head").append(`<style id="${id_css}"></style>`)}if(jQuery(this).closest(selector+":visible").length&&jQuery(this).closest(selector).innerHeight()&&slider.data("current_height")){let h_tmp=slider.find(selector).eq(i).innerHeight()+30;if(jQuery(this).closest(selector).innerHeight()>parseFloat(slider.data("current_height"))){let css_tmp=`.${id_css} .viwse-suggestion-product-wrap{width: ${itemWidth}px !important;}`;css_tmp+=`.${id_css} .villatheme-slider-viewport{height: ${h_tmp}px !important;}`;jQuery("#"+id_css).html(css_tmp);slider.data("current_height",h_tmp)}}})}}}if(h){h+=30;css+=`.${id_css} .villatheme-slider-viewport{height: ${h}px !important;}`;slider.data("current_height",h)}if(!jQuery("#"+id_css).length){jQuery("head").append(`<style id="${id_css}"></style>`)}jQuery("#"+id_css).html(css)},end:function(slider){let total_pages=parseInt(slider.find(".wcpr-reviews-total-pages").html()||slider.closest(".woocommerce-photo-reviews-shortcode").find(".wcpr-reviews-total-pages").html()),current_page=Math.ceil(slider.find(selector).length/parseInt(params.comments_per_page||1));if(total_pages>current_page){let current=slider.limit;get_reviews(slider,current_page,params,selector).then(function(){slider.setProps(current)})}}})});let get_reviews=async function(slider,current_page,params,selector){await new Promise(function(resolve){jQuery.ajax({url:woocommerce_photo_reviews_params.ajaxurl,type:"get",data:{action:"woocommerce_photo_reviews_shortcode_ajax_get_reviews",nonce:woocommerce_photo_reviews_params.nonce,reviews_shortcode:JSON.stringify(params),wcpr_page:current_page+1,wcpr_image:slider.data("wcpr_image"),wcpr_verified:slider.data("wcpr_verified"),wcpr_rating:slider.data("wcpr_rating")},beforeSend:function(){slider.closest(".woocommerce-photo-reviews-shortcode").addClass("woocommerce-photo-reviews-shortcode-loading")},success:function(response){let temp=jQuery("<div></div>");temp.append(response.html);temp.find(selector).each(function(k,v){slider.addSlide(jQuery(v))});slider.closest(".woocommerce-photo-reviews-shortcode").removeClass("woocommerce-photo-reviews-shortcode-loading");resolve(slider)},error:function(err){resolve(slider);slider.closest(".woocommerce-photo-reviews-shortcode").removeClass("woocommerce-photo-reviews-shortcode-loading")}})})};jQuery(".wcpr-grid .wcpr-grid-item").last().css("display","inline-block");jQuery(".shortcode-wcpr-grid .shortcode-wcpr-grid-item").last().css("display","inline-block");if(jQuery("#wcpr_thank_you_message").length){setTimeout(function(){jQuery(".reviews_tab a").trigger("click");setTimeout(function(){window.scrollTo({top:jQuery("#review_form").offset().top-450})})},100)}}function wcpr_helpful_button(){"use strict";let popup_button=[".wcpr-single-product-summary .single_add_to_cart_button:not(.vicatna-single-atc-button):not(.vi-wcaio-product-bt-atc-loading)",".shortcode-wcpr-single-product-summary .single_add_to_cart_button:not(.vicatna-single-atc-button):not(.vi-wcaio-product-bt-atc-loading)"];jQuery(document).on("click",popup_button.join(","),function(e){if(!woocommerce_photo_reviews_params.ajax_atc){return true}e.preventDefault();e.stopPropagation();e.stopImmediatePropagation();let button=jQuery(this),form=jQuery(this).closest("form.cart");button.addClass("vi-wcaio-product-bt-atc-loading");if(!form.length||button.hasClass("disabled")){button.removeClass("vi-wcaio-product-bt-atc-loading");return false}if(form.hasClass(".variations_form")){let variation_id_check=parseInt(form.find("input[name=variation_id]").val());if(!variation_id_check||variation_id_check<=0){button.removeClass("vi-wcaio-product-bt-atc-loading");return false}}let product_id=form.find("input[name=product_id]").val();if(!product_id){product_id=form.find("[name=add-to-cart]").val()}if(!product_id||form.find('[name="woopb-add-to-cart"]').length){button.attr("type","submit").trigger("click");return false}let data={};form.find("select, textarea, input").each(function(){if(jQuery(this).prop("disabled")){return true}if(["checkbox","radio"].indexOf(jQuery(this).attr("type"))>-1&&!jQuery(this).prop("checked")){return true}let name=jQuery(this).attr("name");if(name){data[name]=jQuery(this).val()}});if(!data["add-to-cart"]){data["add-to-cart"]=form.find("[name=add-to-cart]").val()}jQuery(document.body).trigger("adding_to_cart",[button,data]);if(!woocommerce_photo_reviews_params["ajax_atc_event"]){woocommerce_photo_reviews_params["ajax_atc_event"]=[]}woocommerce_photo_reviews_params["ajax_atc_event"].push({type:"post",url:woocommerce_photo_reviews_params.wc_ajax_url.toString().replace("%%endpoint%%","viwcpr_add_to_cart"),data:data,beforeSend:function(){button.removeClass("added").addClass("loading")},success:function(response){if(response.error){location.href=window.location.href;return false}if(woocommerce_photo_reviews_params.cart_redirect_after_add==="yes"&&woocommerce_photo_reviews_params.cart_url){window.location=woocommerce_photo_reviews_params.cart_url;return false}jQuery(document.body).trigger("added_to_cart",[response.fragments,response.cart_hash,button]);if(!woocommerce_photo_reviews_params.woocommerce_enable_ajax_add_to_cart){jQuery(document.body).trigger("wc_fragment_refresh")}jQuery(document.body).trigger("viwcpr_added_to_cart",[response.fragments,response.cart_hash,button]);woocommerce_photo_reviews_params["ajax_atc_event"].shift();if(woocommerce_photo_reviews_params["ajax_atc_event"].length>0){jQuery.ajax(woocommerce_photo_reviews_params["ajax_atc_event"][0])}},complete:function(response){button.removeClass("loading vi-wcaio-product-bt-atc-loading").addClass("added")}});if(woocommerce_photo_reviews_params["ajax_atc_event"].length===1){jQuery.ajax(woocommerce_photo_reviews_params["ajax_atc_event"][0])}});jQuery(document).on("click",".wcpr-comment-helpful-button",function(e){e.stopPropagation();let button=jQuery(this);let vote=button.hasClass("wcpr-comment-helpful-button-up-vote")?"up":"down";let container=button.closest(".wcpr-comment-helpful-button-container");let comment_id=container.data("comment_id");if(vote==="up"&&container.hasClass("wcpr-comment-helpful-button-voted-up")){return}if(vote==="down"&&container.hasClass("wcpr-comment-helpful-button-voted-down")){return}if(container.hasClass("wcpr-comment-helpful-button-voting")){return}container.addClass("wcpr-comment-helpful-button-voting");jQuery.ajax({url:woocommerce_photo_reviews_params.ajaxurl,data:{action:"wcpr_helpful_button_handle",vote:vote,comment_id:comment_id,nonce:woocommerce_photo_reviews_params.nonce},type:"POST",success:function(response){if(response.status==="success"){container.find(".wcpr-comment-helpful-button-up-vote-count").html(parseInt(response.up));container.find(".wcpr-comment-helpful-button-down-vote-count").html(parseInt(response.down));if(vote==="up"){container.removeClass("wcpr-comment-helpful-button-voted-down").addClass("wcpr-comment-helpful-button-voted-up")}else{container.removeClass("wcpr-comment-helpful-button-voted-up").addClass("wcpr-comment-helpful-button-voted-down")}if(container.parent().hasClass("reviews-content-right-meta")||container.parent().hasClass("shortcode-reviews-content-right-meta")){let comment_container=jQuery('.wcpr-comment-helpful-button-container[data-comment_id="'+comment_id+'"]');comment_container.find(".wcpr-comment-helpful-button-up-vote-count").html(parseInt(response.up));comment_container.find(".wcpr-comment-helpful-button-down-vote-count").html(parseInt(response.down));if(vote==="up"){comment_container.removeClass("wcpr-comment-helpful-button-voted-down").addClass("wcpr-comment-helpful-button-voted-up")}else{comment_container.removeClass("wcpr-comment-helpful-button-voted-up").addClass("wcpr-comment-helpful-button-voted-down")}}}},error:function(){},complete:function(){container.removeClass("wcpr-comment-helpful-button-voting")}})})}function viSwipeDetect(el,callback){var touchsurface=el,swipedir,startX,startY,distX,distY,threshold=150,restraint=100,allowedTime=300,elapsedTime,startTime,handleswipe=callback||function(swipedir){};touchsurface.addEventListener("touchstart",function(e){var touchobj=e.changedTouches[0];swipedir="none";startX=touchobj.pageX;startY=touchobj.pageY;startTime=(new Date).getTime()},false);touchsurface.addEventListener("touchmove",function(e){e.preventDefault()},false);touchsurface.addEventListener("touchend",function(e){var touchobj=e.changedTouches[0];distX=touchobj.pageX-startX;distY=touchobj.pageY-startY;elapsedTime=(new Date).getTime()-startTime;if(elapsedTime<=allowedTime){if(Math.abs(distX)>=threshold&&Math.abs(distY)<=restraint){swipedir=distX<0?"left":"right"}else if(Math.abs(distY)>=threshold&&Math.abs(distX)<=restraint){swipedir=distY<0?"up":"down"}}handleswipe(swipedir)},false)}});
let slides,current_shortcode_id;function shortcode_wcpr_resize_masonry_items(e=!1){jQuery(".shortcode-wcpr-grid-item.wcpr-grid-item-init").removeClass("wcpr-grid-item-init");let o,r=20;jQuery(".wcpr-grid-loadmore .shortcode-wcpr-grid-item:not(.wcpr-grid-item-init)").each((function(){if(!jQuery(this).is(":visible"))return!0;o=jQuery(this).closest(".woocommerce-photo-reviews-shortcode").data("reviews_shortcode"),r=o?parseInt(o.cols_gap||r):r,shortcode_wcpr_resize_masonry_item(jQuery(this),1,r)}))}function shortcode_wcpr_resize_masonry_item(e,o,r){let t,i=0;if((e=jQuery(e)).find(".shortcode-reviews-images-wrap-right .shortcode-reviews-images").length&&(t=e.find(".shortcode-reviews-images-wrap-right .shortcode-reviews-images"),i=t.outerHeight(),0===i)){let o=e.find(".shortcode-wcpr-content").outerWidth(),r=t.attr("width")||0,s=t.attr("height")||0;i=0!==s?Math.round(o/r*s):o}let s=e.find(".shortcode-wcpr-content").outerHeight(),a=e.find(".shortcode-review-content-container").outerHeight();s<a+i&&(s=a+i);let c=Math.ceil((s+r)/(o+r));e.addClass("wcpr-grid-item-init").css("grid-row-end","span "+c)}function wcpr_enable_scroll(){"use strict";let e=parseInt(jQuery("html").css("top"));jQuery("html").removeClass("shortcode-wcpr-noscroll"),window.scrollTo({top:-e,behavior:"instant"})}function wcpr_disable_scroll(){"use strict";if(jQuery(document).height()>jQuery(window).height()){let e=jQuery("html").scrollTop()?jQuery("html").scrollTop():jQuery("body").scrollTop();jQuery("html").addClass("shortcode-wcpr-noscroll").css("top",-e)}}jQuery(window).on("elementor/frontend/init",(()=>{"use strict";elementorFrontend.hooks.addAction("frontend/element_ready/woocommerce-photo-reviews.default",(function(e){if(!window.elementor)return;let o=e.find(".woocommerce-photo-reviews-shortcode"),r=-1,t=0,i=!1;function s(e){t=0,r=e,e>=slides.length&&(r=0),e<0&&(r=slides.length-1),jQuery("#shortcode-reviews-content-left-modal").html(""),jQuery("#shortcode-reviews-content-left-main").html("");let o=jQuery(slides[r]);if(0==o.find(".shortcode-reviews-images-container").length)jQuery(".shortcode-wcpr-modal-light-box").addClass("shortcode-wcpr-no-images");else{jQuery("#shortcode-reviews-content-left-modal").html(o.find(".shortcode-reviews-images-wrap-left").html());let e=o.find(".shortcode-reviews-images-wr-right").html();e&&(jQuery(".shortcode-wcpr-modal-light-box").removeClass("shortcode-wcpr-no-images"),jQuery("#shortcode-reviews-content-left-main").html(e)),jQuery("#shortcode-reviews-content-left-modal").find(".shortcode-reviews-images").parent().on("click",(function(){t=jQuery(this).data("image_index");let e="",o=jQuery(this).attr("href"),r=jQuery("#shortcode-reviews-content-left-main").find(".shortcode-reviews-images");return jQuery(this).hasClass("reviews-iframe")||jQuery(this).find(".reviews-iframe").length?e=jQuery(`<iframe class="shortcode-reviews-images reviews-iframe" data-original_src="${o}" src="${o}" frameborder="0" allowfullscreen></iframe>`):jQuery(this).hasClass("reviews-videos")||jQuery(this).find(".reviews-videos").length?e=jQuery(`<video class="shortcode-reviews-images reviews-videos" data-original_src="${o}" src="${o}" controls></video>`):(e=jQuery(`<img class="shortcode-reviews-images" data-original_src="${o}" src="${o}">`),e.attr("title",r.attr("title"))),e.attr({width:r.attr("width"),height:r.attr("width")}),r.replaceWith(e),jQuery("#shortcode-reviews-content-left-main").find(".shortcode-wcpr-review-image-caption").html(jQuery(this).data("image_caption")),!1}))}jQuery("#shortcode-reviews-content-right .shortcode-reviews-content-right-meta").html(o.find(".shortcode-review-content-container").html()),jQuery("#shortcode-reviews-content-right .shortcode-wcpr-single-product-summary").html(o.find(".shortcode-wcpr-single-product-summary-content-wrapper").html()),jQuery(".shortcode-wcpr-modal-light-box").fadeIn(200),jQuery("img.jetpack-lazy-image:not(.jetpack-lazy-image--handled)").length&&document.querySelector("body").dispatchEvent(new Event("jetpack-lazy-images-load"))}(/iPad/i.test(navigator.userAgent)||/Safari/i.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor)&&!/Mobi|Android/i.test(navigator.userAgent))&&(i=!0),o.find(".shortcode-wcpr-grid-item .shortcode-reviews-images").unbind().on("click",(function(e){let r=jQuery(this),t=o.data("reviews_shortcode");if(t.hasOwnProperty("masonry_popup")&&"image"===t.masonry_popup){e.stopPropagation();let o=r.closest(".shortcode-reviews-images-container"),t=[];o.find(".shortcode-reviews-images-wrap-left").find("a").map((function(){let e=jQuery(this).find(".shortcode-reviews-images"),r=jQuery(this).data("image_src")?jQuery(this).data("image_src"):e.attr("src"),i=jQuery(this).data("image_caption")?jQuery(this).data("image_caption"):parseInt(jQuery(this).data("image_index"))+1+"/"+o.find(".shortcode-reviews-images-wrap-left").find("a").length;t.push({href:r,title:i})})),0===t.length&&t.push({href:r.data("original_src")?r.data("original_src"):r.attr("src"),title:r.parent().find(".shortcode-wcpr-review-image-caption").html()}),jQuery.swipebox(t,{hideBarsDelay:1e5,initialIndexOnArray:0})}})),i||o.find(".shortcode-wcpr-enable-box-shadow").addClass("shortcode-wcpr-fix-box-shadow"),jQuery(".shortcode-wcpr-modal-light-box").keydown((function(e){jQuery.swipebox.isOpen||"none"!=jQuery(".shortcode-wcpr-modal-light-box").css("display")&&(27==e.keyCode&&(jQuery(".shortcode-wcpr-modal-light-box").fadeOut(200),jQuery(".shortcode-wcpr-modal-light-box").removeClass(current_shortcode_id+"-modal"),r=-1),-1!=r&&(37==e.keyCode&&s(r-=1),39==e.keyCode&&s(r+=1)))})),o.find(".shortcode-wcpr-grid-item").unbind().on("click",(function(){let e=o.data("reviews_shortcode");if(e.hasOwnProperty("masonry_popup")&&"review"===e.masonry_popup){e.hasOwnProperty("full_screen_mobile")&&"on"===e.full_screen_mobile?jQuery(".shortcode-wcpr-modal-light-box").addClass("shortcode-wcpr-full-screen-mobile"):jQuery(".shortcode-wcpr-modal-light-box").removeClass("shortcode-wcpr-full-screen-mobile"),slides=o.find(".shortcode-wcpr-grid-item");let r=slides.index(jQuery(this));r>=0&&(jQuery(".shortcode-wcpr-modal-light-box").removeClass(current_shortcode_id+"-modal"),current_shortcode_id=o.attr("id"),jQuery(".shortcode-wcpr-modal-light-box").addClass(current_shortcode_id+"-modal"),s(r),wcpr_disable_scroll())}})),o.find(".shortcode-wcpr-read-more").unbind().on("click",(function(e){e.stopPropagation();let o=jQuery(this).closest(".shortcode-wcpr-review-content"),r=o.find(".shortcode-wcpr-review-content-full").html();r&&o.html(r),o.closest(".shortcode-wcpr-grid-item").removeClass("wcpr-grid-item-init"),shortcode_wcpr_resize_masonry_items(!0)})),shortcode_wcpr_resize_masonry_items(!0)}))})),jQuery(document).ready((function(e){"use strict";let o=!1;function r(){o||e(".shortcode-wcpr-enable-box-shadow").addClass("shortcode-wcpr-fix-box-shadow"),shortcode_wcpr_resize_masonry_items()}(/iPad/i.test(navigator.userAgent)||/Safari/i.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor)&&!/Mobi|Android/i.test(navigator.userAgent))&&(o=!0),r();let t=-1,i=0;function s(){wcpr_enable_scroll(),e(".shortcode-wcpr-modal-light-box").fadeOut(200),t=-1}function a(o){i=0,t=o,o>=slides.length&&(t=0),o<0&&(t=slides.length-1);let r=e("#shortcode-reviews-content-left-modal"),s=e("#shortcode-reviews-content-left-main");r.html(""),s.html("");let a=e(slides[t]);if(0===a.find(".shortcode-reviews-images-container").length)e(".shortcode-wcpr-modal-light-box").addClass("shortcode-wcpr-no-images");else{r.html(a.find(".shortcode-reviews-images-wrap-left").html());let o=a.find(".shortcode-reviews-images-wrap-right").html();if(o){e(".shortcode-wcpr-modal-light-box").removeClass("shortcode-wcpr-no-images"),s.html(o);let r=s.find("img").data("original_src");!r||r.indexOf("data:")>-1?s.find("img").attr("src",s.find("img").attr("src")):s.find("img").attr("src",r)}r.find(".shortcode-reviews-images").map((function(){let o=e(this).data("src");o&&e(this).attr("src",o)})),r.find(".shortcode-reviews-images").parent().on("click",(function(){i=e(this).data("image_index");let o="",r=jQuery(this).attr("href");return jQuery(this).hasClass("reviews-iframe")||jQuery(this).find(".reviews-iframe").length?o=jQuery(`<iframe class="shortcode-reviews-images reviews-iframe" data-original_src="${r}" src="${r}" frameborder="0" allowfullscreen></iframe>`):jQuery(this).hasClass("reviews-videos")||jQuery(this).find(".reviews-videos").length?o=jQuery(`<video class="shortcode-reviews-images reviews-videos" data-original_src="${r}" src="${r}" controls></video>`):(r=e(this).data("image_src")||r,o=jQuery(`<img class="shortcode-reviews-images" data-original_src="${r}" src="${r}">`),o.attr("title",s.find(".shortcode-reviews-images").attr("title"))),o.attr({width:s.find(".shortcode-reviews-images").attr("width"),height:s.find(".shortcode-reviews-images").attr("width")}),s.find(".shortcode-reviews-images").replaceWith(o),s.find(".shortcode-wcpr-review-image-caption").html(e(this).data("image_caption")),!1}))}e("#shortcode-reviews-content-right .shortcode-reviews-content-right-meta").html(a.find(".shortcode-review-content-container").html()),e("#shortcode-reviews-content-right .shortcode-wcpr-single-product-summary").html(a.find(".shortcode-wcpr-single-product-summary-content-wrapper").html()),e(".shortcode-wcpr-modal-light-box").fadeIn(200),function(o){e(".shortcode-wcpr-single-product-summary").find(".shortcode-wcpr-variations_form").each((function(){e(this).addClass("variations_form vi_wpvs_variation_form"),e(this).find("select").each((function(r,t){e(this).val(jQuery(o).find("select").eq(r).val()).trigger("change")})),e(this).wc_variation_form(),e(document.body).trigger("vi_wpvs_variation_form"),e(document.body).trigger("wc_price_based_country_ajax_geolocation")}))}(a),jQuery("img.jetpack-lazy-image:not(.jetpack-lazy-image--handled)").length&&document.querySelector("body").dispatchEvent(new Event("jetpack-lazy-images-load")),jQuery("img.jetpack-lazy-image").next("img").remove()}e(".shortcode-wcpr-close").on("click",(function(){s()})),e(".shortcode-wcpr-single-product-summary-meta-shop .variations_form").each((function(){e(this).addClass("shortcode-wcpr-variations_form").removeClass("variations_form")})),e(".shortcode-wcpr-modal-light-box .shortcode-wcpr-overlay").on("click",(function(){s()})),e("#shortcode-reviews-content-left-main").on("click",".shortcode-reviews-images",(function(){let o=e(this),r=[];e("#shortcode-reviews-content-left-modal").find("a").map((function(){let o=e(this).find(".shortcode-reviews-images"),t=e(this).data("image_src")?e(this).data("image_src"):o.attr("src"),i=e(this).data("image_caption")?e(this).data("image_caption"):parseInt(e(this).data("image_index"))+1+"/"+e("#shortcode-reviews-content-left-modal").find("a").length;r.push({href:t,title:i})})),0===r.length&&r.push({href:o.data("original_src")?o.data("original_src"):o.attr("src"),title:o.parent().find(".shortcode-wcpr-review-image-caption").html()}),e.swipebox(r,{hideBarsDelay:1e5,initialIndexOnArray:i})})),e(document).on("keydown",(function(o){let r=e(".shortcode-wcpr-modal-light-box");0!==e(".woocommerce-photo-reviews-shortcode").length&&(e.swipebox.isOpen||"none"!==r.css("display")&&(27===o.keyCode&&s(),-1!==t&&(37===o.keyCode&&a(t-=1),39===o.keyCode&&a(t+=1))))})),e(document).on("click",".shortcode-wcpr-grid-item",(function(){let o=e(this).closest(".woocommerce-photo-reviews-shortcode"),r=o.data("reviews_shortcode");if(r.hasOwnProperty("masonry_popup")&&"review"===r.masonry_popup){r.hasOwnProperty("full_screen_mobile")&&"on"===r.full_screen_mobile?e(".shortcode-wcpr-modal-light-box").addClass("shortcode-wcpr-full-screen-mobile"):e(".shortcode-wcpr-modal-light-box").removeClass("shortcode-wcpr-full-screen-mobile"),slides=o.find(".shortcode-wcpr-grid-item");let t=slides.index(e(this));t>=0&&(e(".shortcode-wcpr-modal-light-box").removeClass(current_shortcode_id+"-modal"),current_shortcode_id=o.attr("id"),e(".shortcode-wcpr-modal-light-box").addClass(current_shortcode_id+"-modal"),a(t),wcpr_disable_scroll())}})),e(document).on("click",".shortcode-wcpr-read-more",(function(o){o.stopPropagation();let r=e(this).closest(".shortcode-wcpr-review-content"),t=r.find(".shortcode-wcpr-review-content-full").html();t&&r.html(t),r.closest(".shortcode-wcpr-grid-item").removeClass("wcpr-grid-item-init"),shortcode_wcpr_resize_masonry_items(!0)})),e(document).on("click",".shortcode-wcpr-grid-item .shortcode-reviews-images",(function(o){let r=e(this),t=r.closest(".woocommerce-photo-reviews-shortcode").data("reviews_shortcode");if(t.hasOwnProperty("masonry_popup")&&"image"===t.masonry_popup){o.stopPropagation();let t=r.closest(".shortcode-reviews-images-container"),i=[];t.find(".shortcode-reviews-images-wrap-left").find("a").map((function(){let o=e(this).find(".shortcode-reviews-images"),r=e(this).data("image_src")?e(this).data("image_src"):o.attr("src"),s=e(this).data("image_caption")?e(this).data("image_caption"):parseInt(e(this).data("image_index"))+1+"/"+t.find(".shortcode-reviews-images-wrap-left").find("a").length;i.push({href:r,title:s})})),0===i.length&&i.push({href:r.data("original_src")?r.data("original_src"):r.attr("src"),title:r.parent().find(".shortcode-wcpr-review-image-caption").html()}),e.swipebox(i,{hideBarsDelay:1e5,initialIndexOnArray:0})}})),jQuery("img.jetpack-lazy-image").next("img").remove(),e("body").on("click",".shortcode-wcpr-next",(function(){a(t+=1)})),e("body").on("click",".shortcode-wcpr-prev",(function(){a(t-=1)}));let c=!1,n="",d="",h="";e(document).on("click",".shortcode-wcpr-load-more-reviews-button:not(.wcpr-loading)",(function(o){let t=e(this),i=t.closest(".woocommerce-photo-reviews-shortcode");n=i.data("wcpr_image"),d=i.data("wcpr_verified"),h=i.data("wcpr_rating");let s=i.data("reviews_shortcode");if(c)return!1;c=!0,o.preventDefault(),i.addClass("woocommerce-photo-reviews-shortcode-loading"),t.addClass("wcpr-loading"),e.ajax({url:woocommerce_photo_reviews_shortcode_params.ajaxurl,type:"get",data:{action:"woocommerce_photo_reviews_shortcode_ajax_get_reviews",nonce:woocommerce_photo_reviews_shortcode_params.nonce,reviews_shortcode:JSON.stringify(s),wcpr_page:t.data("cpage"),wcpr_image:n,wcpr_verified:d,wcpr_rating:h},success:function(e){let o=jQuery('<div class="woocommerce_photo_reviews_shortcode_ajax_get_reviews"></div>');o.css("display","none").html(e.html),s.hasOwnProperty("style")&&"masonry"===s.style?i.find(".shortcode-wcpr-grid").append(o.find(".shortcode-wcpr-grid").html()):i.find(".commentlist").append(o.find(".commentlist").html()),i.find(".wcpr-load-more-reviews-button-container").replaceWith(o.find(".wcpr-load-more-reviews-button-container")),i.data("wcpr_image",n),i.data("wcpr_verified",d),i.data("wcpr_rating",h)},complete:function(){s.hasOwnProperty("style")&&"masonry"===s.style&&s.hasOwnProperty("masonry_popup")&&s.masonry_popup,r(),jQuery(document.body).trigger("woocommerce_photo_reviews_shortcode_ajax_get_reviews"),c=!1,t.removeClass("wcpr-loading"),i.removeClass("woocommerce-photo-reviews-shortcode-loading")}})})),e(document).on("click","a.wcpr-page-numbers.wcpr-page-numbers-nav",(function(e){let o=jQuery(this).closest(".woocommerce-photo-reviews-shortcode").data("reviews_shortcode");if(!o.hasOwnProperty("pagination_ajax")||"on"!==o.pagination_ajax)return!0;e.preventDefault(),e.stopPropagation();let r=jQuery(this).closest(".shortcode-wcpr-pagination"),t=r.find(".wcpr-page-numbers").index(r.find(".wcpr-page-numbers.wcpr-current"));if(jQuery(this).hasClass("wcpr-page-numbers-next")?t++:t--,0===t||t===r.find(".wcpr-page-numbers:not(.wcpr-page-numbers-nav)").length)return!1;r.find(".wcpr-page-numbers").eq(t).trigger("click")})),e(document).on("click","a.wcpr-page-numbers:not(.wcpr-page-numbers-nav)",(function(o){let t=e(this),i=t.closest(".woocommerce-photo-reviews-shortcode");n=i.data("wcpr_image"),d=i.data("wcpr_verified"),h=i.data("wcpr_rating");let s=i.data("reviews_shortcode");if(!s.hasOwnProperty("pagination_ajax")||"on"!==s.pagination_ajax)return!0;if(c)return!1;let a=parseInt(i.offset().top);window.scrollTo({top:a,behavior:"smooth"}),c=!0,o.preventDefault(),i.addClass("woocommerce-photo-reviews-shortcode-loading"),e.ajax({url:woocommerce_photo_reviews_shortcode_params.ajaxurl,type:"get",data:{action:"woocommerce_photo_reviews_shortcode_ajax_get_reviews",nonce:woocommerce_photo_reviews_shortcode_params.nonce,reviews_shortcode:JSON.stringify(s),wcpr_page:parseInt(t.html()),wcpr_image:n,wcpr_verified:d,wcpr_rating:h},success:function(e){i.html(e.html),i.data("wcpr_image",n),i.data("wcpr_verified",d),i.data("wcpr_rating",h)},error:function(e){},complete:function(){s.hasOwnProperty("style")&&"masonry"===s.style&&s.hasOwnProperty("masonry_popup")&&s.masonry_popup,r(),jQuery(document.body).trigger("woocommerce_photo_reviews_shortcode_ajax_get_reviews"),c=!1,i.removeClass("woocommerce-photo-reviews-shortcode-loading")}})})),e(document).on("click","a.shortcode-wcpr-filter-button",(function(o){let t=e(this),i=t.closest(".woocommerce-photo-reviews-shortcode"),s=i.data("reviews_shortcode");if(!s.hasOwnProperty("pagination_ajax")||"on"!==s.pagination_ajax)return;if(c||0===parseInt(t.find(".shortcode-wcpr-filter-button-count").html())&&!t.hasClass("shortcode-wcpr-active"))return!1;n=i.data("wcpr_image"),d=i.data("wcpr_verified"),h=i.data("wcpr_rating");let a=t.data("filter_type");switch(a){case"all":if(t.hasClass("shortcode-wcpr-active"))return!1;h="";break;case"image":n=t.hasClass("shortcode-wcpr-active")?"":1;break;case"verified":d=t.hasClass("shortcode-wcpr-active")?"":1;break;default:if(t.hasClass("shortcode-wcpr-active"))return!1;h=a}let l=parseInt(i.offset().top);window.scrollTo({top:l,behavior:"smooth"}),c=!0,o.preventDefault(),i.addClass("woocommerce-photo-reviews-shortcode-loading"),e.ajax({url:woocommerce_photo_reviews_shortcode_params.ajaxurl,type:"get",data:{action:"woocommerce_photo_reviews_shortcode_ajax_get_reviews",nonce:woocommerce_photo_reviews_shortcode_params.nonce,reviews_shortcode:JSON.stringify(s),wcpr_image:n,wcpr_verified:d,wcpr_rating:h},success:function(e){i.html(e.html),i.data("wcpr_image",n),i.data("wcpr_verified",d),i.data("wcpr_rating",h)},error:function(e){},complete:function(){s.hasOwnProperty("style")&&"masonry"===s.style&&s.hasOwnProperty("masonry_popup")&&s.masonry_popup,r(),i.hasClass("woocommerce-photo-reviews-slide-init")&&(i.removeClass("woocommerce-photo-reviews-slide woocommerce-photo-reviews-slide-init woocommerce-photo-reviews-slide-none"),viwcpr_flexslider()),jQuery(document.body).trigger("woocommerce_photo_reviews_shortcode_ajax_get_reviews"),c=!1,i.removeClass("woocommerce-photo-reviews-shortcode-loading")}})})),e(document).on("scroll",(function(e){setTimeout((function(){shortcode_wcpr_resize_masonry_items()}),100)})),e(document).on("click","a",(function(e){setTimeout((function(){shortcode_wcpr_resize_masonry_items()}),100)}))})),jQuery(window).on("resize",(function(){"use strict";shortcode_wcpr_resize_masonry_items(!0)}));
!function(e,t,i,s){i.swipebox=function(r,o){i(r).addClass("swipebox");var a,n,p={useCSS:!0,useSVG:!0,initialIndexOnArray:0,removeBarsOnMobile:!0,hideCloseButtonOnMobile:!1,hideBarsDelay:3e3,videoMaxWidth:1140,vimeoColor:"cccccc",beforeOpen:null,afterOpen:null,afterClose:null,afterMedia:null,nextSlide:null,prevSlide:null,loopAtEnd:!1,autoplayVideos:!1,queryStringData:{},toggleClassOnLoad:""},l=this,c=[],d=".swipebox",w=navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i),b=null!==w||t.createTouch!==s||"ontouchstart"in e||"onmsgesturechange"in e||navigator.msMaxTouchPoints,u=!!t.createElementNS&&!!t.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,h=e.innerWidth?e.innerWidth:i(e).width(),g=e.innerHeight?e.innerHeight:i(e).height(),f=0;l.settings={},i.swipebox.close=function(){a.closeSlide()},i.swipebox.extend=function(){return a},l.init=function(){l.settings=i.extend({},p,o),Array.isArray(r)?(c=r,a.target=i(e),a.init(l.settings.initialIndexOnArray)):i(t).on("click",d,(function(e){if("slide current"===e.target.parentNode.className)return!1;var t,s,o;Array.isArray(r)||(a.destroy(),n=i(d),a.actions()),c=[],o||(s="data-rel",o=i(this).attr(s)),o||(s="rel",o=i(this).attr(s)),(n=o&&""!==o&&"nofollow"!==o?i(d).filter("["+s+'="'+o+'"]'):i(d)).each((function(){var e=null,t=null;i(this).attr("title")&&(e=i(this).attr("title")),i(this).attr("href")&&(t=i(this).attr("href")),c.push({href:t,title:e})})),t=n.index(i(this)),e.preventDefault(),e.stopPropagation(),a.target=i(e.target),a.init(t)}))},a={init:function(e){l.settings.beforeOpen&&l.settings.beforeOpen(),this.target.trigger("wcpr-swipebox-start"),i.swipebox.isOpen=!0,this.build(),this.openSlide(e),this.openMedia(e),this.preloadMedia(e+1),this.preloadMedia(e-1),l.settings.afterOpen&&l.settings.afterOpen(e)},build:function(){var e,t=this;i("body").append('<div id="wcpr-swipebox-overlay">\t\t\t\t\t<div id="wcpr-swipebox-container">\t\t\t\t\t\t<div id="wcpr-swipebox-slider"></div>\t\t\t\t\t\t<div id="wcpr-swipebox-top-bar">\t\t\t\t\t\t\t<div id="wcpr-swipebox-title"></div>\t\t\t\t\t\t</div>\t\t\t\t\t\t<div id="wcpr-swipebox-bottom-bar">\t\t\t\t\t\t\t<div id="wcpr-swipebox-arrows">\t\t\t\t\t\t\t\t<a id="wcpr-swipebox-prev"></a>\t\t\t\t\t\t\t\t<a id="wcpr-swipebox-next"></a>\t\t\t\t\t\t\t</div>\t\t\t\t\t\t</div>\t\t\t\t\t\t<a id="wcpr-swipebox-close"></a>\t\t\t\t\t</div>\t\t\t</div>'),u&&!0===l.settings.useSVG&&(e=(e=i("#wcpr-swipebox-close").css("background-image")).replace("png","svg"),i("#wcpr-swipebox-prev, #wcpr-swipebox-next, #wcpr-swipebox-close").css({"background-image":e})),w&&l.settings.removeBarsOnMobile&&i("#wcpr-swipebox-bottom-bar, #wcpr-swipebox-top-bar").remove(),i.each(c,(function(){i("#wcpr-swipebox-slider").append('<div class="slide"></div>')})),t.setDim(),t.actions(),b&&t.gesture(),t.keyboard(),t.animBars(),t.resize()},setDim:function(){var t,s,r;"onorientationchange"in e?e.addEventListener("orientationchange",(function(){0===e.orientation?(t=h,s=g):90!==e.orientation&&-90!==e.orientation||(t=g,s=h)}),!1):(t=e.innerWidth?e.innerWidth:i(e).width(),s=e.innerHeight?e.innerHeight:i(e).height()),r={width:t,height:s},i("#wcpr-swipebox-overlay").css(r)},resize:function(){var t=this;i(e).resize((function(){t.setDim()})).resize()},supportTransition:function(){var e,i="transition WebkitTransition MozTransition OTransition msTransition KhtmlTransition".split(" ");for(e=0;e<i.length;e++)if(t.createElement("div").style[i[e]]!==s)return i[e];return!1},doCssTrans:function(){if(l.settings.useCSS&&this.supportTransition())return!0},gesture:function(){var e,t,s,r,o,a,n=this,p=!1,l=!1,d={},w={},b=i("#wcpr-swipebox-top-bar, #wcpr-swipebox-bottom-bar"),u=i("#wcpr-swipebox-slider");b.addClass("visible-bars"),n.setTimeout(),i("body").bind("touchstart",(function(n){return i(this).addClass("wcpr-touching"),e=i("#wcpr-swipebox-slider .slide").index(i("#wcpr-swipebox-slider .slide.current")),w=n.originalEvent.targetTouches[0],d.pageX=n.originalEvent.targetTouches[0].pageX,d.pageY=n.originalEvent.targetTouches[0].pageY,i("#wcpr-swipebox-slider").css({"-webkit-transform":"translate3d("+f+"%, 0, 0)",transform:"translate3d("+f+"%, 0, 0)"}),i(".wcpr-touching").bind("touchmove",(function(n){if(n.preventDefault(),n.stopPropagation(),w=n.originalEvent.targetTouches[0],!l&&(o=s,s=w.pageY-d.pageY,Math.abs(s)>=50||p)){var b=.75-Math.abs(s)/u.height();u.css({top:s+"px"}),u.css({opacity:b}),p=!0}r=t,t=w.pageX-d.pageX,a=100*t/h,!l&&!p&&Math.abs(t)>=10&&(i("#wcpr-swipebox-slider").css({"-webkit-transition":"",transition:""}),l=!0),l&&(0<t?0===e?i("#wcpr-swipebox-overlay").addClass("leftSpringTouch"):(i("#wcpr-swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),i("#wcpr-swipebox-slider").css({"-webkit-transform":"translate3d("+(f+a)+"%, 0, 0)",transform:"translate3d("+(f+a)+"%, 0, 0)"})):0>t&&(c.length===e+1?i("#wcpr-swipebox-overlay").addClass("rightSpringTouch"):(i("#wcpr-swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),i("#wcpr-swipebox-slider").css({"-webkit-transform":"translate3d("+(f+a)+"%, 0, 0)",transform:"translate3d("+(f+a)+"%, 0, 0)"}))))})),!1})).bind("touchend",(function(e){if(e.preventDefault(),e.stopPropagation(),i("#wcpr-swipebox-slider").css({"-webkit-transition":"-webkit-transform 0.4s ease",transition:"transform 0.4s ease"}),s=w.pageY-d.pageY,t=w.pageX-d.pageX,a=100*t/h,p)if(p=!1,Math.abs(s)>=100&&Math.abs(s)>Math.abs(o)){var c=s>0?u.height():-u.height();u.animate({top:c+"px",opacity:0},300,(function(){n.closeSlide()}))}else u.animate({top:0,opacity:1},300);else l?(l=!1,t>=10&&t>=r?n.getPrev():t<=-10&&t<=r&&n.getNext()):b.hasClass("visible-bars")?(n.clearTimeout(),n.hideBars()):(n.showBars(),n.setTimeout());i("#wcpr-swipebox-slider").css({"-webkit-transform":"translate3d("+f+"%, 0, 0)",transform:"translate3d("+f+"%, 0, 0)"}),i("#wcpr-swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),i(".wcpr-touching").off("touchmove").removeClass("wcpr-touching")}))},setTimeout:function(){if(l.settings.hideBarsDelay>0){var t=this;t.clearTimeout(),t.timeout=e.setTimeout((function(){t.hideBars()}),l.settings.hideBarsDelay)}},clearTimeout:function(){e.clearTimeout(this.timeout),this.timeout=null},showBars:function(){var e=i("#wcpr-swipebox-top-bar, #wcpr-swipebox-bottom-bar");this.doCssTrans()?e.addClass("visible-bars"):(i("#wcpr-swipebox-top-bar").animate({top:0},500),i("#wcpr-swipebox-bottom-bar").animate({bottom:0},500),setTimeout((function(){e.addClass("visible-bars")}),1e3))},hideBars:function(){var e=i("#wcpr-swipebox-top-bar, #wcpr-swipebox-bottom-bar");this.doCssTrans()?e.removeClass("visible-bars"):(i("#wcpr-swipebox-top-bar").animate({top:"-50px"},500),i("#wcpr-swipebox-bottom-bar").animate({bottom:"-50px"},500),setTimeout((function(){e.removeClass("visible-bars")}),1e3))},animBars:function(){var e=this,t=i("#wcpr-swipebox-top-bar, #wcpr-swipebox-bottom-bar");t.addClass("visible-bars"),e.setTimeout(),i("#wcpr-swipebox-slider").click((function(){t.hasClass("visible-bars")||(e.showBars(),e.setTimeout())})),i("#wcpr-swipebox-bottom-bar").hover((function(){e.showBars(),t.addClass("visible-bars"),e.clearTimeout()}),(function(){l.settings.hideBarsDelay>0&&(t.removeClass("visible-bars"),e.setTimeout())}))},keyboard:function(){var t=this;i(e).bind("keyup",(function(e){e.preventDefault(),e.stopPropagation(),37===e.keyCode?t.getPrev():39===e.keyCode?t.getNext():27===e.keyCode&&t.closeSlide()}))},actions:function(){var e=this,t="touchend click";c.length<2?(i("#wcpr-swipebox-bottom-bar").hide(),s===c[1]&&i("#wcpr-swipebox-top-bar").hide()):(i("#wcpr-swipebox-prev").bind(t,(function(t){t.preventDefault(),t.stopPropagation(),e.getPrev(),e.setTimeout()})),i("#wcpr-swipebox-next").bind(t,(function(t){t.preventDefault(),t.stopPropagation(),e.getNext(),e.setTimeout()}))),i("#wcpr-swipebox-close").bind(t,(function(t){t.preventDefault(),t.stopPropagation(),e.closeSlide()}))},setSlide:function(e,t){t=t||!1;var s=i("#wcpr-swipebox-slider");f=100*-e,this.doCssTrans()?s.css({"-webkit-transform":"translate3d("+100*-e+"%, 0, 0)",transform:"translate3d("+100*-e+"%, 0, 0)"}):s.animate({left:100*-e+"%"}),i("#wcpr-swipebox-slider .slide").removeClass("current"),i("#wcpr-swipebox-slider .slide").eq(e).addClass("current"),this.setTitle(e),t&&s.fadeIn(),i("#wcpr-swipebox-prev, #wcpr-swipebox-next").removeClass("disabled"),0===e?i("#wcpr-swipebox-prev").addClass("disabled"):e===c.length-1&&!0!==l.settings.loopAtEnd&&i("#wcpr-swipebox-next").addClass("disabled")},openSlide:function(t){i("html").addClass("wcpr-swipebox-html"),b?(i("html").addClass("wcpr-swipebox-touch"),l.settings.hideCloseButtonOnMobile&&i("html").addClass("wcpr-swipebox-no-close-button")):i("html").addClass("wcpr-swipebox-no-touch"),i(e).trigger("resize"),this.setSlide(t,!0)},preloadMedia:function(e){var t=this,i=null;c[e]!==s&&(i=c[e].href),t.isVideo(i)?t.openMedia(e):setTimeout((function(){t.openMedia(e)}),1e3)},openMedia:function(e){var t,r,o=this;if(c[e]!==s&&(t=c[e].href),e<0||e>=c.length)return!1;r=i("#wcpr-swipebox-slider .slide").eq(e),o.isVideo(t)?(r.html(o.getVideo(t)),l.settings.afterMedia&&l.settings.afterMedia(e)):(r.addClass("slide-loading"),o.loadMedia(t,(function(){r.removeClass("slide-loading"),r.html(this),l.settings.afterMedia&&l.settings.afterMedia(e)})))},setTitle:function(e){var t=null;i("#wcpr-swipebox-title").empty(),c[e]!==s&&(t=c[e].title),t?(i("#wcpr-swipebox-top-bar").show(),i("#wcpr-swipebox-title").append(t)):i("#wcpr-swipebox-top-bar").hide()},isVideo:function(e){if(e){if(e.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/)||e.match(/vimeo\.com\/([0-9]*)/)||e.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/))return!0;if(e.toLowerCase().indexOf("swipeboxvideo=1")>=0)return!0;if(e=e.toLowerCase().split("."),["mp4","webm"].indexOf(e[e.length-1])>-1)return!0}},parseUri:function(e,s){var r=t.createElement("a"),o={};return r.href=decodeURIComponent(e),r.search&&(o=JSON.parse('{"'+r.search.toLowerCase().replace("?","").replace(/&/g,'","').replace(/=/g,'":"')+'"}')),i.isPlainObject(s)&&(o=i.extend(o,s,l.settings.queryStringData)),i.map(o,(function(e,t){if(e&&e>"")return encodeURIComponent(t)+"="+encodeURIComponent(e)})).join("&")},getVideo:function(e){var t="",i=e.match(/((?:www\.)?youtube\.com|(?:www\.)?youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/),s=e.match(/(?:www\.)?youtu\.be\/([a-zA-Z0-9\-_]+)/),r=e.match(/(?:www\.)?vimeo\.com\/([0-9]*)/),o="";return i||s?(s&&(i=s),console.log(i),o=a.parseUri(e,{autoplay:l.settings.autoplayVideos?"1":"0",v:""}),t='<iframe width="560" height="315" src="https://'+i[1]+"/embed/"+i[2]+"?"+o+'" frameborder="0" allowfullscreen></iframe>'):r?(o=a.parseUri(e,{autoplay:l.settings.autoplayVideos?"1":"0",byline:"0",portrait:"0",color:l.settings.vimeoColor}),t='<iframe width="560" height="315"  src="//player.vimeo.com/video/'+r[1]+"?"+o+'" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'):t='<video src="'+e+'" width="100%" controls></video>','<div class="wcpr-swipebox-video-container" style="max-width:'+l.settings.videoMaxWidth+'px"><div class="wcpr-swipebox-video">'+t+"</div></div>"},loadMedia:function(e,t){if(0===e.trim().indexOf("#"))t.call(i("<div>",{class:"wcpr-swipebox-inline-container"}).append(i(e).clone().toggleClass(l.settings.toggleClassOnLoad)));else if(!this.isVideo(e)){var s=i("<img>").on("load",(function(){t.call(s)}));s.attr("src",e)}},getNext:function(){var e,t=this,s=i("#wcpr-swipebox-slider .slide").index(i("#wcpr-swipebox-slider .slide.current"));s+1<c.length?(e=i("#wcpr-swipebox-slider .slide").eq(s).contents().find("iframe").attr("src"),i("#wcpr-swipebox-slider .slide").eq(s).contents().find("iframe").attr("src",e),s++,t.setSlide(s),t.preloadMedia(s+1),l.settings.nextSlide&&l.settings.nextSlide(s)):!0===l.settings.loopAtEnd?(e=i("#wcpr-swipebox-slider .slide").eq(s).contents().find("iframe").attr("src"),i("#wcpr-swipebox-slider .slide").eq(s).contents().find("iframe").attr("src",e),s=0,t.preloadMedia(s),t.setSlide(s),t.preloadMedia(s+1),l.settings.nextSlide&&l.settings.nextSlide(s)):(i("#wcpr-swipebox-overlay").addClass("rightSpring"),setTimeout((function(){i("#wcpr-swipebox-overlay").removeClass("rightSpring")}),500))},getPrev:function(){var e,t=i("#wcpr-swipebox-slider .slide").index(i("#wcpr-swipebox-slider .slide.current"));t>0?(e=i("#wcpr-swipebox-slider .slide").eq(t).contents().find("iframe").attr("src"),i("#wcpr-swipebox-slider .slide").eq(t).contents().find("iframe").attr("src",e),t--,this.setSlide(t),this.preloadMedia(t-1),l.settings.prevSlide&&l.settings.prevSlide(t)):(i("#wcpr-swipebox-overlay").addClass("leftSpring"),setTimeout((function(){i("#wcpr-swipebox-overlay").removeClass("leftSpring")}),500))},nextSlide:function(e){},prevSlide:function(e){},closeSlide:function(){i("html").removeClass("wcpr-swipebox-html"),i("html").removeClass("wcpr-swipebox-touch"),i(e).trigger("resize"),this.destroy()},destroy:function(){i(e).unbind("keyup"),i("body").unbind("touchstart"),i("body").unbind("touchmove"),i("body").unbind("touchend"),i("#wcpr-swipebox-slider").unbind(),i("#wcpr-swipebox-overlay").remove(),Array.isArray(r)||r.removeData("_swipebox"),this.target&&this.target.trigger("wcpr-swipebox-destroy"),i.swipebox.isOpen=!1,l.settings.afterClose&&l.settings.afterClose()}},l.init()},i.fn.swipebox=function(e){if(!i.data(this,"_swipebox")){var t=new i.swipebox(this,e);this.data("_swipebox",t)}return this.data("_swipebox")}}(window,document,jQuery);
jQuery(document).ready(function($){"use strict";let isSafari=false;if(/iPad/i.test(navigator.userAgent)||/Safari/i.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor)&&!/Mobi|Android/i.test(navigator.userAgent)){isSafari=true}else{$(".wcpr-enable-box-shadow").addClass("wcpr-fix-box-shadow")}let current=-1;let slides;let swipeBoxIndex=0;function triggerReviewClick(){$(document).on("click",".wcpr-grid-item,.wcpr-grid-style-item,.wcpr-grid-layout-2-style-item,.wcpr-list-style-item,.wcpr-list-layout-2-style-item",function(){let i;switch(woocommerce_photo_reviews_params.display){case"3":slides=$(".wcpr-grid-style-item");break;case"4":slides=$(".wcpr-grid-layout-2-style-item");break;case"5":slides=$(".wcpr-list-style-item");break;case"6":slides=$(".wcpr-list-layout-2-style-item");break;default:slides=$(".wcpr-grid-item");break}i=slides.index($(this));if(i>=0){showReview(i);wcpr_disable_scroll()}});$(".reviews-images-wrap > a").on("click",function(){let this_image=$(this),this_warp=this_image.closest(".reviews-images-wrap-left");let data=[];swipeBoxIndex=this_image.data("image_index");this_image.closest(".reviews-images-wrap-left").find("a").map(function(){let current_image=this_image;let href=$(this).data("image_src")?$(this).data("image_src"):current_image.attr("src");let title=$(this).data("image_caption")?$(this).data("image_caption"):parseInt(this_image.data("image_index"))+1+"/"+this_warp.find(".reviews-images-wrap").length;data.push({href:href,title:title})});if(data.length==0){data.push({href:this_image.data("original_src")?this_image.data("original_src"):this_image.attr("src"),title:this_image.parent().find(".wcpr-review-image-caption").html()})}$.swipebox(data,{hideBarsDelay:1e5,initialIndexOnArray:swipeBoxIndex});return false})}function wcpr_enable_scroll(){let scrollTop=parseInt($("html").css("top"));$("html").removeClass("wcpr-noscroll");window.scrollTo({top:-scrollTop,behavior:"instant"})}function wcpr_disable_scroll(){if($(document).height()>$(window).height()){let scrollTop=$("html").scrollTop()?$("html").scrollTop():$("body").scrollTop();$("html").addClass("wcpr-noscroll").css("top",-scrollTop)}}function showReview(n){swipeBoxIndex=0;current=n;if(n>=slides.length){current=0}if(n<0){current=slides.length-1}let $left_modal=$("#reviews-content-left-modal");let $left_main=$("#reviews-content-left-main"),$wrap_current;$wrap_current=slides.eq(current);$left_modal.html("");$left_main.html("");if($wrap_current.find(".reviews-images-container").length===0){$(".wcpr-modal-light-box").addClass("wcpr-no-images")}else{$left_modal.html($wrap_current.find(".reviews-images-wrap-left").html());let img_data=$wrap_current.find(".reviews-images-wrap-right").html();if(typeof img_data==="undefined"){img_data=$wrap_current.find(".reviews-images-wrap:first-child > a").html()}if(img_data){$(".wcpr-modal-light-box").removeClass("wcpr-no-images");$left_main.html(img_data);$left_main.find("img").attr("src",$left_main.find("img").data("original_src")||$left_main.find("img").attr("src"))}$left_modal.find(".reviews-images").map(function(){let lazy_load_src=$(this).data("src");if(lazy_load_src){$(this).attr("src",lazy_load_src)}});$left_modal.find(".reviews-images").closest("a").on("click",function(){swipeBoxIndex=$(this).data("image_index");let current_image_src=$(this).attr("href");let temp="";if(jQuery(this).hasClass("reviews-iframe")||jQuery(this).find(".reviews-iframe").length){temp=jQuery(`<iframe class="reviews-images reviews-iframe" data-original_src="${current_image_src}" src="${current_image_src}" frameborder="0" allowfullscreen></iframe>`)}else if(jQuery(this).hasClass("reviews-videos")||jQuery(this).find(".reviews-videos").length){temp=jQuery(`<video class="reviews-images reviews-videos" data-original_src="${current_image_src}" src="${current_image_src}" controls></video>`)}else{current_image_src=$(this).data("image_src")||current_image_src;temp=jQuery(`<img class="reviews-images" data-original_src="${current_image_src}" src="${current_image_src}">`);temp.attr("title",$left_main.find(".reviews-images").attr("title"))}temp.attr({width:$left_main.find(".reviews-images").attr("width"),height:$left_main.find(".reviews-images").attr("width")});$left_main.find(".reviews-images").replaceWith(temp);$left_main.find("source").attr("srcset",current_image_src);$left_main.find(".wcpr-review-image-caption").html($(this).data("image_caption"));return false})}$("#reviews-content-right .reviews-content-right-meta").html($wrap_current.find(".review-content-container").html());$(".wcpr-modal-light-box").fadeIn(200)}switch(woocommerce_photo_reviews_params.masonry_popup){case"review":slides=$(".wcpr-grid-item");$(".wcpr-close").on("click",function(){wcpr_enable_scroll();$(".wcpr-modal-light-box").fadeOut(200);current=-1});$(".wcpr-modal-light-box .wcpr-overlay").on("click",function(){wcpr_enable_scroll();$(".wcpr-modal-light-box").fadeOut(200);current=-1});$("#reviews-content-left-main").on("click",".reviews-images",function(){let this_image=$(this);let data=[];$("#reviews-content-left-modal").find("a").map(function(){let current_image=$(this).find(".reviews-images");let href=$(this).data("image_src")?$(this).data("image_src"):current_image.attr("src");let title=$(this).data("image_caption")?$(this).data("image_caption"):parseInt($(this).data("image_index"))+1+"/"+$("#reviews-content-left-modal").find("a").length;data.push({href:href,title:title})});if(data.length==0){data.push({href:this_image.data("original_src")?this_image.data("original_src"):this_image.attr("src"),title:this_image.parent().find(".wcpr-review-image-caption").html()})}$.swipebox(data,{hideBarsDelay:1e5,initialIndexOnArray:swipeBoxIndex})});$(document).keydown(function(e){if($.swipebox.isOpen){return}if($(".wcpr-modal-light-box").css("display")=="none"){return}if(e.keyCode==27){wcpr_enable_scroll();$(".wcpr-modal-light-box").fadeOut(200);current=-1}if(current!=-1){if(e.keyCode==37){showReview(current-=1)}if(e.keyCode==39){showReview(current+=1)}}});triggerReviewClick();$(".wcpr-next").on("click",function(){showReview(current+=1)});$(".wcpr-prev").on("click",function(){showReview(current-=1)});break;case"image":$(document).on("click",".wcpr-grid-item .reviews-images",function(e){let this_image=$(this);e.stopPropagation();let $container=this_image.closest(".reviews-images-container");let data=[];$container.find(".reviews-images-wrap-left").find("a").map(function(){let current_image=$(this).find(".reviews-images");let href=$(this).data("image_src")?$(this).data("image_src"):current_image.attr("src");let title=$(this).data("image_caption")?$(this).data("image_caption"):parseInt($(this).data("image_index"))+1+"/"+$container.find(".reviews-images-wrap-left").find("a").length;data.push({href:href,title:title})});if(data.length==0){data.push({href:this_image.data("original_src")?this_image.data("original_src"):this_image.attr("src"),title:this_image.parent().find(".wcpr-review-image-caption").html()})}console.log(data);$.swipebox(data,{hideBarsDelay:1e5,initialIndexOnArray:0})});break;case"off":default:}jQuery(document.body).on("wcpr_ajax_load_more_reviews_end wcpr_ajax_pagination_end",function(){setTimeout(function(){wcpr_resize_masonry_items()},200)});$(document).on("scroll",function(e){setTimeout(function(){wcpr_resize_masonry_items()},200)});$(document).on("click","a",function(e){setTimeout(function(){wcpr_resize_masonry_items()},200)});$(document).on("skeleton-loaded",function(){wcpr_resize_masonry_items(true)});$(document).on("tabactivate",function(e,ui){wcpr_resize_masonry_items(true)});jQuery(document.body).on("click",".wcpr-read-more",function(e){e.stopPropagation();let $button=$(this);let $comment_content=$button.closest(".wcpr-review-content");let $comment_content_full=$comment_content.find(".wcpr-review-content-full");let comment_content_full=$comment_content_full.html();if(comment_content_full){$comment_content.html(comment_content_full)}$comment_content.closest(".wcpr-grid-item").removeClass("wcpr-grid-item-init");wcpr_resize_masonry_items(true)});return false});jQuery(window).on("load",function(){"use strict";setTimeout(function(){wcpr_resize_masonry_items()},100)}).on("resize",function(){"use strict";wcpr_resize_masonry_items(true)});function wcpr_resize_masonry_items(force_resize=false){if(force_resize){jQuery(".wcpr-grid-item.wcpr-grid-item-init").removeClass("wcpr-grid-item-init")}else if(jQuery(".wcpr-grid-item .reviews-videos").length){setTimeout(function(){wcpr_resize_masonry_items(true)},150)}jQuery(".wcpr-grid-loadmore .wcpr-grid-item:not(.wcpr-grid-item-init)").each(function(){if(!jQuery(this).is(":visible")){return true}wcpr_resize_masonry_item(jQuery(this))})}function wcpr_resize_masonry_item(item){item=jQuery(item);let item_img,img_height=0,item_width,colums=parseInt(jQuery(".wcpr-grid.wcpr-masonry-style").data("wcpr_columns")||3);if(item.find(".reviews-images-wrap-right .reviews-images").length){item_img=item.find(".reviews-images-wrap-right .reviews-images");img_height=item_img.outerHeight();if(img_height===0){item_width=item.find(".wcpr-content").outerWidth();let img_width=parseFloat(item_img.attr("width")||0),img_height_t=parseFloat(item_img.attr("height")||0);if(item_width===0){item_width=((jQuery(".wcpr-grid.wcpr-masonry-style").outerWidth()?jQuery(".wcpr-grid.wcpr-masonry-style").outerWidth():jQuery("#reviews").outerWidth()?jQuery("#reviews").outerWidth():jQuery(".woocommerce-Tabs-panel").outerWidth()?jQuery(".woocommerce-Tabs-panel").outerWidth():200)-(colums-1)*20)/colums}img_height=img_height_t!==0?Math.round(item_width/img_width*img_height_t):item_width}}let row_height=1,row_gap=20;let item_height=item.find(".wcpr-content").outerHeight(),item_content_height=item.find(".review-content-container").outerHeight();if(item_content_height===0){if(!item_width){item_width=item.find(".wcpr-content").outerWidth();if(item_width===0){item_width=((jQuery(".wcpr-grid.wcpr-masonry-style").outerWidth()?jQuery(".wcpr-grid.wcpr-masonry-style").outerWidth():jQuery("#reviews").outerWidth()?jQuery("#reviews").outerWidth():jQuery(".woocommerce-Tabs-panel").outerWidth()?jQuery(".woocommerce-Tabs-panel").outerWidth():200)-(colums-1)*20)/colums}}jQuery("body").append('<div class="review-content-container-temp" style="width: '+item_width+'px; visibility: hidden; ">'+item.find(".review-content-container").html()+"</div>");let temp=jQuery(".review-content-container-temp");temp.find(".wcpr-review-content-full").remove();item_content_height=temp.outerHeight();temp.remove()}if(item_height<item_content_height+img_height){item_height=item_content_height+img_height}let row_item=Math.ceil((item_height+row_gap)/(row_height+row_gap));item.addClass("wcpr-grid-item-init").css("grid-row-end","span "+row_item)};
jQuery(function(e){if("undefined"==typeof wc_cart_fragments_params)return!1;var t=!0,r=wc_cart_fragments_params.cart_hash_key;try{t="sessionStorage"in window&&null!==window.sessionStorage,window.sessionStorage.setItem("wc","test"),window.sessionStorage.removeItem("wc"),window.localStorage.setItem("wc","test"),window.localStorage.removeItem("wc")}catch(f){t=!1}function n(){t&&sessionStorage.setItem("wc_cart_created",(new Date).getTime())}function o(e){t&&(localStorage.setItem(r,e),sessionStorage.setItem(r,e))}var a={url:wc_cart_fragments_params.wc_ajax_url.toString().replace("%%endpoint%%","get_refreshed_fragments"),type:"POST",data:{time:(new Date).getTime()},timeout:wc_cart_fragments_params.request_timeout,success:function(r){r&&r.fragments&&(e.each(r.fragments,function(t,r){e(t).replaceWith(r)}),t&&(sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(r.fragments)),o(r.cart_hash),r.cart_hash&&n()),e(document.body).trigger("wc_fragments_refreshed"))},error:function(){e(document.body).trigger("wc_fragments_ajax_error")}};function s(){e.ajax(a)}if(t){var i=null;e(document.body).on("wc_fragment_refresh updated_wc_div",function(){s()}),e(document.body).on("added_to_cart removed_from_cart",function(e,t,a){var s=sessionStorage.getItem(r);null!==s&&s!==undefined&&""!==s||n(),sessionStorage.setItem(wc_cart_fragments_params.fragment_name,JSON.stringify(t)),o(a)}),e(document.body).on("wc_fragments_refreshed",function(){clearTimeout(i),i=setTimeout(s,864e5)}),e(window).on("storage onstorage",function(e){r===e.originalEvent.key&&localStorage.getItem(r)!==sessionStorage.getItem(r)&&s()}),e(window).on("pageshow",function(t){t.originalEvent.persisted&&(e(".widget_shopping_cart_content").empty(),e(document.body).trigger("wc_fragment_refresh"))});try{var c=JSON.parse(sessionStorage.getItem(wc_cart_fragments_params.fragment_name)),_=sessionStorage.getItem(r),g=Cookies.get("woocommerce_cart_hash"),m=sessionStorage.getItem("wc_cart_created");if(null!==_&&_!==undefined&&""!==_||(_=""),null!==g&&g!==undefined&&""!==g||(g=""),_&&(null===m||m===undefined||""===m))throw"No cart_created";if(m){var d=1*m+864e5,w=(new Date).getTime();if(d<w)throw"Fragment expired";i=setTimeout(s,d-w)}if(!c||!c["div.widget_shopping_cart_content"]||_!==g)throw"No fragment";e.each(c,function(t,r){e(t).replaceWith(r)}),e(document.body).trigger("wc_fragments_loaded")}catch(f){s()}}else s();Cookies.get("woocommerce_items_in_cart")>0?e(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show():e(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").hide(),e(document.body).on("adding_to_cart",function(){e(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show()}),"undefined"!=typeof wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.widgetsPreview&&wp.customize.widgetsPreview.WidgetPartial&&wp.customize.selectiveRefresh.bind("partial-content-rendered",function(){s()})});
(()=>{var e,t,r,a,o={179:(e,t,r)=>{"use strict";r.r(t),r.d(t,{getLocationByTimeZone:()=>a});const a=()=>{const e=Intl.DateTimeFormat().resolvedOptions().timeZone;if(""===e||!e)return null;let t={countryCode:{"Africa/Abidjan":["CI","BF","GH","GM","GN","ML","MR","SH","SL","SN","TG"],"Africa/Accra":["GH"],"Africa/Addis_Ababa":["ET"],"Africa/Algiers":["DZ"],"Africa/Asmara":["ER"],"Africa/Asmera":["ER"],"Africa/Bamako":["ML"],"Africa/Bangui":["CF"],"Africa/Banjul":["GM"],"Africa/Bissau":["GW"],"Africa/Blantyre":["MW"],"Africa/Brazzaville":["CG"],"Africa/Bujumbura":["BI"],"Africa/Cairo":["EG"],"Africa/Casablanca":["MA"],"Africa/Ceuta":["ES"],"Africa/Conakry":["GN"],"Africa/Dakar":["SN"],"Africa/Dar_es_Salaam":["TZ"],"Africa/Djibouti":["DJ"],"Africa/Douala":["CM"],"Africa/El_Aaiun":["EH"],"Africa/Freetown":["SL"],"Africa/Gaborone":["BW"],"Africa/Harare":["ZW"],"Africa/Johannesburg":["ZA","LS","SZ"],"Africa/Juba":["SS"],"Africa/Kampala":["UG"],"Africa/Khartoum":["SD"],"Africa/Kigali":["RW"],"Africa/Kinshasa":["CD"],"Africa/Lagos":["NG","AO","BJ","CD","CF","CG","CM","GA","GQ","NE"],"Africa/Libreville":["GA"],"Africa/Lome":["TG"],"Africa/Luanda":["AO"],"Africa/Lubumbashi":["CD"],"Africa/Lusaka":["ZM"],"Africa/Malabo":["GQ"],"Africa/Maputo":["MZ","BI","BW","CD","MW","RW","ZM","ZW"],"Africa/Maseru":["LS"],"Africa/Mbabane":["SZ"],"Africa/Mogadishu":["SO"],"Africa/Monrovia":["LR"],"Africa/Nairobi":["KE","DJ","ER","ET","KM","MG","SO","TZ","UG","YT"],"Africa/Ndjamena":["TD"],"Africa/Niamey":["NE"],"Africa/Nouakchott":["MR"],"Africa/Ouagadougou":["BF"],"Africa/Porto-Novo":["BJ"],"Africa/Sao_Tome":["ST"],"Africa/Timbuktu":["ML"],"Africa/Tripoli":["LY"],"Africa/Tunis":["TN"],"Africa/Windhoek":["NA"],"America/Adak":["US"],"America/Anchorage":["US"],"America/Anguilla":["AI"],"America/Antigua":["AG"],"America/Araguaina":["BR"],"America/Argentina/Buenos_Aires":["AR"],"America/Argentina/Catamarca":["AR"],"America/Argentina/Cordoba":["AR"],"America/Argentina/Jujuy":["AR"],"America/Argentina/La_Rioja":["AR"],"America/Argentina/Mendoza":["AR"],"America/Argentina/Rio_Gallegos":["AR"],"America/Argentina/Salta":["AR"],"America/Argentina/San_Juan":["AR"],"America/Argentina/San_Luis":["AR"],"America/Argentina/Tucuman":["AR"],"America/Argentina/Ushuaia":["AR"],"America/Aruba":["AW"],"America/Asuncion":["PY"],"America/Atikokan":["CA"],"America/Bahia":["BR"],"America/Bahia_Banderas":["MX"],"America/Barbados":["BB"],"America/Belem":["BR"],"America/Belize":["BZ"],"America/Blanc-Sablon":["CA"],"America/Boa_Vista":["BR"],"America/Bogota":["CO"],"America/Boise":["US"],"America/Cambridge_Bay":["CA"],"America/Campo_Grande":["BR"],"America/Cancun":["MX"],"America/Caracas":["VE"],"America/Cayenne":["GF"],"America/Cayman":["KY"],"America/Chicago":["US"],"America/Chihuahua":["MX"],"America/Coral_Harbour":["CA"],"America/Costa_Rica":["CR"],"America/Creston":["CA"],"America/Cuiaba":["BR"],"America/Curacao":["CW"],"America/Danmarkshavn":["GL"],"America/Dawson":["CA"],"America/Dawson_Creek":["CA"],"America/Denver":["US"],"America/Detroit":["US"],"America/Dominica":["DM"],"America/Edmonton":["CA"],"America/Eirunepe":["BR"],"America/El_Salvador":["SV"],"America/Fort_Nelson":["CA"],"America/Fortaleza":["BR"],"America/Glace_Bay":["CA"],"America/Goose_Bay":["CA"],"America/Grand_Turk":["TC"],"America/Grenada":["GD"],"America/Guadeloupe":["GP"],"America/Guatemala":["GT"],"America/Guayaquil":["EC"],"America/Guyana":["GY"],"America/Halifax":["CA"],"America/Havana":["CU"],"America/Hermosillo":["MX"],"America/Indiana/Indianapolis":["US"],"America/Indiana/Knox":["US"],"America/Indiana/Marengo":["US"],"America/Indiana/Petersburg":["US"],"America/Indiana/Tell_City":["US"],"America/Indiana/Vevay":["US"],"America/Indiana/Vincennes":["US"],"America/Indiana/Winamac":["US"],"America/Inuvik":["CA"],"America/Iqaluit":["CA"],"America/Jamaica":["JM"],"America/Juneau":["US"],"America/Kentucky/Louisville":["US"],"America/Kentucky/Monticello":["US"],"America/Kralendijk":["BQ"],"America/La_Paz":["BO"],"America/Lima":["PE"],"America/Los_Angeles":["US"],"America/Lower_Princes":["SX"],"America/Maceio":["BR"],"America/Managua":["NI"],"America/Manaus":["BR"],"America/Marigot":["MF"],"America/Martinique":["MQ"],"America/Matamoros":["MX"],"America/Mazatlan":["MX"],"America/Menominee":["US"],"America/Merida":["MX"],"America/Metlakatla":["US"],"America/Mexico_City":["MX"],"America/Miquelon":["PM"],"America/Moncton":["CA"],"America/Monterrey":["MX"],"America/Montevideo":["UY"],"America/Montreal":["CA"],"America/Montserrat":["MS"],"America/Nassau":["BS"],"America/New_York":["US"],"America/Nipigon":["CA"],"America/Nome":["US"],"America/Noronha":["BR"],"America/North_Dakota/Beulah":["US"],"America/North_Dakota/Center":["US"],"America/North_Dakota/New_Salem":["US"],"America/Nuuk":["GL"],"America/Ojinaga":["MX"],"America/Panama":["PA","CA","KY"],"America/Pangnirtung":["CA"],"America/Paramaribo":["SR"],"America/Phoenix":["US","CA"],"America/Port-au-Prince":["HT"],"America/Port_of_Spain":["TT"],"America/Porto_Velho":["BR"],"America/Puerto_Rico":["PR","AG","CA","AI","AW","BL","BQ","CW","DM","GD","GP","KN","LC","MF","MS","SX","TT","VC","VG","VI"],"America/Punta_Arenas":["CL"],"America/Rainy_River":["CA"],"America/Rankin_Inlet":["CA"],"America/Recife":["BR"],"America/Regina":["CA"],"America/Resolute":["CA"],"America/Rio_Branco":["BR"],"America/Santarem":["BR"],"America/Santiago":["CL"],"America/Santo_Domingo":["DO"],"America/Sao_Paulo":["BR"],"America/Scoresbysund":["GL"],"America/Sitka":["US"],"America/St_Barthelemy":["BL"],"America/St_Johns":["CA"],"America/St_Kitts":["KN"],"America/St_Lucia":["LC"],"America/St_Thomas":["VI"],"America/St_Vincent":["VC"],"America/Swift_Current":["CA"],"America/Tegucigalpa":["HN"],"America/Thule":["GL"],"America/Thunder_Bay":["CA"],"America/Tijuana":["MX"],"America/Toronto":["CA","BS"],"America/Tortola":["VG"],"America/Vancouver":["CA"],"America/Virgin":["VI"],"America/Whitehorse":["CA"],"America/Winnipeg":["CA"],"America/Yakutat":["US"],"America/Yellowknife":["CA"],"Antarctica/Casey":["AQ"],"Antarctica/Davis":["AQ"],"Antarctica/DumontDUrville":["AQ"],"Antarctica/Macquarie":["AU"],"Antarctica/Mawson":["AQ"],"Antarctica/McMurdo":["AQ"],"Antarctica/Palmer":["AQ"],"Antarctica/Rothera":["AQ"],"Antarctica/South_Pole":["AQ"],"Antarctica/Syowa":["AQ"],"Antarctica/Troll":["AQ"],"Antarctica/Vostok":["AQ"],"Arctic/Longyearbyen":["SJ"],"Asia/Aden":["YE"],"Asia/Almaty":["KZ"],"Asia/Amman":["JO"],"Asia/Anadyr":["RU"],"Asia/Aqtau":["KZ"],"Asia/Aqtobe":["KZ"],"Asia/Ashgabat":["TM"],"Asia/Atyrau":["KZ"],"Asia/Baghdad":["IQ"],"Asia/Bahrain":["BH"],"Asia/Baku":["AZ"],"Asia/Bangkok":["TH","KH","LA","VN"],"Asia/Barnaul":["RU"],"Asia/Beirut":["LB"],"Asia/Bishkek":["KG"],"Asia/Brunei":["BN"],"Asia/Chita":["RU"],"Asia/Choibalsan":["MN"],"Asia/Colombo":["LK"],"Asia/Damascus":["SY"],"Asia/Dhaka":["BD"],"Asia/Dili":["TL"],"Asia/Dubai":["AE","OM"],"Asia/Dushanbe":["TJ"],"Asia/Famagusta":["CY"],"Asia/Gaza":["PS"],"Asia/Hebron":["PS"],"Asia/Ho_Chi_Minh":["VN"],"Asia/Hong_Kong":["HK"],"Asia/Hovd":["MN"],"Asia/Irkutsk":["RU"],"Asia/Jakarta":["ID"],"Asia/Jayapura":["ID"],"Asia/Jerusalem":["IL"],"Asia/Kabul":["AF"],"Asia/Kamchatka":["RU"],"Asia/Karachi":["PK"],"Asia/Kathmandu":["NP"],"Asia/Khandyga":["RU"],"Asia/Kolkata":["IN"],"Asia/Krasnoyarsk":["RU"],"Asia/Kuala_Lumpur":["MY"],"Asia/Kuching":["MY"],"Asia/Kuwait":["KW"],"Asia/Macau":["MO"],"Asia/Magadan":["RU"],"Asia/Makassar":["ID"],"Asia/Manila":["PH"],"Asia/Muscat":["OM"],"Asia/Nicosia":["CY"],"Asia/Novokuznetsk":["RU"],"Asia/Novosibirsk":["RU"],"Asia/Omsk":["RU"],"Asia/Oral":["KZ"],"Asia/Phnom_Penh":["KH"],"Asia/Pontianak":["ID"],"Asia/Pyongyang":["KP"],"Asia/Qatar":["QA","BH"],"Asia/Qostanay":["KZ"],"Asia/Qyzylorda":["KZ"],"Asia/Riyadh":["SA","AQ","KW","YE"],"Asia/Sakhalin":["RU"],"Asia/Samarkand":["UZ"],"Asia/Seoul":["KR"],"Asia/Shanghai":["CN"],"Asia/Singapore":["SG","MY"],"Asia/Srednekolymsk":["RU"],"Asia/Taipei":["TW"],"Asia/Tashkent":["UZ"],"Asia/Tbilisi":["GE"],"Asia/Tehran":["IR"],"Asia/Thimphu":["BT"],"Asia/Tokyo":["JP"],"Asia/Tomsk":["RU"],"Asia/Ulaanbaatar":["MN"],"Asia/Urumqi":["CN"],"Asia/Ust-Nera":["RU"],"Asia/Vientiane":["LA"],"Asia/Vladivostok":["RU"],"Asia/Yakutsk":["RU"],"Asia/Yangon":["MM"],"Asia/Yekaterinburg":["RU"],"Asia/Yerevan":["AM"],"Atlantic/Azores":["PT"],"Atlantic/Bermuda":["BM"],"Atlantic/Canary":["ES"],"Atlantic/Cape_Verde":["CV"],"Atlantic/Faroe":["FO"],"Atlantic/Jan_Mayen":["SJ"],"Atlantic/Madeira":["PT"],"Atlantic/Reykjavik":["IS"],"Atlantic/South_Georgia":["GS"],"Atlantic/St_Helena":["SH"],"Atlantic/Stanley":["FK"],"Australia/Adelaide":["AU"],"Australia/Brisbane":["AU"],"Australia/Broken_Hill":["AU"],"Australia/Darwin":["AU"],"Australia/Eucla":["AU"],"Australia/Hobart":["AU"],"Australia/Lindeman":["AU"],"Australia/Lord_Howe":["AU"],"Australia/Melbourne":["AU"],"Australia/Perth":["AU"],"Australia/Sydney":["AU"],"Canada/Eastern":["CA"],"Europe/Amsterdam":["NL"],"Europe/Andorra":["AD"],"Europe/Astrakhan":["RU"],"Europe/Athens":["GR"],"Europe/Belfast":["GB"],"Europe/Belgrade":["RS","BA","HR","ME","MK","SI"],"Europe/Berlin":["DE"],"Europe/Bratislava":["SK"],"Europe/Brussels":["BE"],"Europe/Bucharest":["RO"],"Europe/Budapest":["HU"],"Europe/Busingen":["DE"],"Europe/Chisinau":["MD"],"Europe/Copenhagen":["DK"],"Europe/Dublin":["IE"],"Europe/Gibraltar":["GI"],"Europe/Guernsey":["GG"],"Europe/Helsinki":["FI","AX"],"Europe/Isle_of_Man":["IM"],"Europe/Istanbul":["TR"],"Europe/Jersey":["JE"],"Europe/Kaliningrad":["RU"],"Europe/Kiev":["UA"],"Europe/Kirov":["RU"],"Europe/Lisbon":["PT"],"Europe/Ljubljana":["SI"],"Europe/London":["GB","GG","IM","JE"],"Europe/Luxembourg":["LU"],"Europe/Madrid":["ES"],"Europe/Malta":["MT"],"Europe/Mariehamn":["AX"],"Europe/Minsk":["BY"],"Europe/Monaco":["MC"],"Europe/Moscow":["RU"],"Europe/Oslo":["NO","SJ","BV"],"Europe/Paris":["FR"],"Europe/Podgorica":["ME"],"Europe/Prague":["CZ","SK"],"Europe/Riga":["LV"],"Europe/Rome":["IT","SM","VA"],"Europe/Samara":["RU"],"Europe/San_Marino":["SM"],"Europe/Sarajevo":["BA"],"Europe/Saratov":["RU"],"Europe/Simferopol":["RU","UA"],"Europe/Skopje":["MK"],"Europe/Sofia":["BG"],"Europe/Stockholm":["SE"],"Europe/Tallinn":["EE"],"Europe/Tirane":["AL"],"Europe/Ulyanovsk":["RU"],"Europe/Uzhgorod":["UA"],"Europe/Vaduz":["LI"],"Europe/Vatican":["VA"],"Europe/Vienna":["AT"],"Europe/Vilnius":["LT"],"Europe/Volgograd":["RU"],"Europe/Warsaw":["PL"],"Europe/Zagreb":["HR"],"Europe/Zaporozhye":["UA"],"Europe/Zurich":["CH","DE","LI"],GB:["GB"],"GB-Eire":["GB"],"Indian/Antananarivo":["MG"],"Indian/Chagos":["IO"],"Indian/Christmas":["CX"],"Indian/Cocos":["CC"],"Indian/Comoro":["KM"],"Indian/Kerguelen":["TF","HM"],"Indian/Mahe":["SC"],"Indian/Maldives":["MV"],"Indian/Mauritius":["MU"],"Indian/Mayotte":["YT"],"Indian/Reunion":["RE","TF"],NZ:["NZ"],"Pacific/Apia":["WS"],"Pacific/Auckland":["NZ","AQ"],"Pacific/Bougainville":["PG"],"Pacific/Chatham":["NZ"],"Pacific/Chuuk":["FM"],"Pacific/Easter":["CL"],"Pacific/Efate":["VU"],"Pacific/Fakaofo":["TK"],"Pacific/Fiji":["FJ"],"Pacific/Funafuti":["TV"],"Pacific/Galapagos":["EC"],"Pacific/Gambier":["PF"],"Pacific/Guadalcanal":["SB"],"Pacific/Guam":["GU","MP"],"Pacific/Honolulu":["US","UM"],"Pacific/Johnston":["UM"],"Pacific/Kanton":["KI"],"Pacific/Kiritimati":["KI"],"Pacific/Kosrae":["FM"],"Pacific/Kwajalein":["MH"],"Pacific/Majuro":["MH"],"Pacific/Marquesas":["PF"],"Pacific/Midway":["UM"],"Pacific/Nauru":["NR"],"Pacific/Niue":["NU"],"Pacific/Norfolk":["NF"],"Pacific/Noumea":["NC"],"Pacific/Pago_Pago":["AS","UM"],"Pacific/Palau":["PW"],"Pacific/Pitcairn":["PN"],"Pacific/Pohnpei":["FM"],"Pacific/Port_Moresby":["PG","AQ"],"Pacific/Rarotonga":["CK"],"Pacific/Saipan":["MP"],"Pacific/Samoa":["WS"],"Pacific/Tahiti":["PF"],"Pacific/Tarawa":["KI"],"Pacific/Tongatapu":["TO"],"Pacific/Wake":["UM"],"Pacific/Wallis":["WF"],Singapore:["SG"],"US/Arizona":["US"],"US/Hawaii":["US"],"US/Samoa":["WS"]}[e][0].toUpperCase()};return"America/Los_Angeles"===e&&(t.regionCode="US-CA"),"Europe/Zurich"===e&&(t.regionCode="CH-ZH"),t}},181:(e,t,r)=>{"use strict";r.r(t),r.d(t,{error:()=>o,log:()=>a});const a=(e,...t)=>{i()&&("object"==typeof e?console.log("Pixel Manager: ",e,...t):t.length?console.log("Pixel Manager: "+e,...t):console.log("Pixel Manager: "+e))},o=(e,...t)=>{"object"==typeof e?console.error("Pixel Manager: ",e,...t):t.length?console.error("Pixel Manager: "+e,...t):console.error("Pixel Manager: "+e)},i=()=>!n()&&(!!s()||(!!c()||!!wpmDataLayer?.general?.logger?.is_active)),n=()=>(wpm.urlHasParameter("pmwloggeroff")&&wpm.storeData("loggerEnabled",!1),wpm.urlHasParameter("pmwloggeroff")),s=()=>wpm.retrieveData("loggerEnabled"),c=()=>(wpm.urlHasParameter("pmwloggeron")&&wpm.storeData("loggerEnabled",!0),wpm.urlHasParameter("pmwloggeron"))},189:(e,t,r)=>{r(783),window.wpm.loadConsentModule=async()=>{const e=await r.e(625).then(r.bind(r,153));window.wpm.consent=e;const t=await r.e(968).then(r.bind(r,857));return window.pmw=window.pmw||{},window.pmw.consent=window.pmw.consent||{},window.pmw.consent.api=t,e},window.pmw=window.pmw||{console:r(181)},r(616)},196:()=>{const e=e=>e=(e=e.replace(/<[^>]*>?/gm,"").replace(/\n/gm,"").replace(/\t/gm,"")).trim();jQuery("form.woocommerce-checkout").on("change","#shipping_method",r=>{r.target?.value&&r.target?.id&&t({slug:r.target.value,text:e(jQuery("label[for='"+r.target.id+"']").text())})}),jQuery(()=>{if(jQuery("#shipping_method").length){let r=jQuery("#shipping_method").find(":checked");if(r.length){if(!r.val())return;if(!r.attr("id"))return;t({slug:r.val(),text:e(jQuery("label[for='"+r.attr("id")+"']").text())})}}});const t=e=>{jQuery(document).trigger("pmw:add-shipping-info",{shippingTier:e})};let r=!1;jQuery("form.woocommerce-checkout").on("change",'input[name="payment_method"]',t=>{t.target.value&&t.target.id&&(a({slug:t.target.value,text:e(jQuery("label[for='"+t.target.id+"']").text())}),r=!0)}),jQuery(()=>{if(r)return;let t=jQuery('input[name="payment_method"]:checked');if(t.length){if(!t.val())return;if(!t.attr("id"))return;a({slug:t.val(),text:e(jQuery("label[for='"+t.attr("id")+"']").text())})}});const a=e=>{jQuery(document).trigger("pmw:add-payment-info",{paymentType:e})};jQuery(document).on("click",".remove_from_cart_button, .remove",e=>{try{let t=new URL(jQuery(e.currentTarget).attr("href")),r=wpm.getProductIdByCartItemKeyUrl(t);wpm.removeProductFromCart(r)}catch(e){console.error(e)}});const o=wpm.prepareSelectors([".checkout-button",".cart-checkout-button",".button.checkout",".xoo-wsc-ft-btn-checkout",".elementor-button--checkout",".xt_woofc-checkout",".fkcart-checkout--text"],"beginCheckout");jQuery(document).on("click init_checkout",o,()=>{jQuery(document).trigger("pmw:begin-checkout")}),jQuery(document).on("updated_cart_totals",()=>{jQuery(document).trigger("pmw:view-cart")}),jQuery(document).on("wpmLoad",e=>{jQuery(document).on("payment_method_selected",()=>{!1===wpm.paymentMethodSelected&&wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val()),wpm.paymentMethodSelected=!0})}),jQuery(document).on("wpmLoad",()=>{try{wpm.initCart()}catch(e){console.error(e)}}),jQuery(document).on("wpmLoad",()=>{wpmDataLayer.products=wpmDataLayer.products||{};let e=wpm.getAddToCartLinkProductIds();wpm.getProductsFromBackend(e)}),jQuery(document).on("wpmLoad",()=>{if(!document.referrer)return;if(wpm.retrieveData("referrer"))return;let e=new URL(document.referrer).hostname;e!==window.location.host&&wpm.storeData("referrer",e)}),jQuery(document).on("wpmLoad",()=>{let e=wpm.getUrlParameter("gclid");e&&wpm.storeData("gclid",e);let t=wpm.getUrlParameter("wbraid");t&&wpm.storeData("wbraid",t);let r=wpm.getUrlParameter("gbraid");r&&wpm.storeData("gbraid",r);let a=wpm.getUrlParameter("fbclid");a&&(a="fb.1."+Math.floor(Date.now()/1e3)+"."+a,wpm.storeData("fbclid",a));let o=wpm.getUrlParameter("ttclid");o&&wpm.storeData("ttclid",o);let i=wpm.getUrlParameter("ScCid");i&&wpm.storeData("scid",i);let n=wpm.getUrlParameter("epik");n&&wpm.storeData("epik",n)}),jQuery(document).on("wpmLoad",()=>{try{if("undefined"!=typeof wpmDataLayer&&!wpmDataLayer?.pmw_loaded){if(jQuery(document).trigger("pmw:load-always"),wpmDataLayer?.shop)if("product"===wpmDataLayer.shop.page_type&&"variable"!==wpmDataLayer.shop.product_type&&wpm.getMainProductIdFromProductPage()){let e=wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage());jQuery(document).trigger("pmw:view-item",e)}else"product_category"===wpmDataLayer.shop.page_type?jQuery(document).trigger("pmw:view-category"):"search"===wpmDataLayer.shop.page_type?jQuery(document).trigger("pmw:search"):"cart"===wpmDataLayer.shop.page_type?jQuery(document).trigger("pmw:view-cart"):"order_received_page"===wpmDataLayer.shop.page_type?wpmDataLayer?.order&&!wpm.isOrderIdStored(wpmDataLayer.order.id)&&(jQuery(document).trigger("pmw:purchase"),wpm.writeOrderIdToStorage(wpmDataLayer.order.id,wpmDataLayer.order.key),"function"==typeof wpm.acrRemoveCookie&&wpm.acrRemoveCookie()):jQuery(document).trigger("pmw:everywhere-else");else jQuery(document).trigger("pmw:everywhere-else");wpmDataLayer?.user?.id&&!wpm.hasLoginEventFired()&&(jQuery(document).trigger("pmw:login"),wpm.setLoginEventFired()),wpmDataLayer.pmw_loaded=!0}}catch(e){console.error(e)}}),wpmDataLayer?.general?.lazy_load_pmw&&wpm.registerShowVariationEventListener(),jQuery(document).on("wpmLoad",()=>{if(wpmDataLayer?.general?.lazy_load_pmw)try{const e=jQuery(".variations_form");if(!e.length)return;const t={};if(!e.find("select").toArray().every(e=>{const r=jQuery(e).val();return!!r&&(t[jQuery(e).attr("name")]=r,!0)}))return;const r=e.data("product_variations");if(!r)return;const a=r.find(e=>Object.entries(t).every(([t,r])=>e.attributes[t]===r));a&&wpm.triggerViewItemEventPrep(a.variation_id)}catch(e){pmw.console.error(e)}}),jQuery(document).on("wpmLoad",async()=>{!1===wpm.retrieveData("restEndpointAvailable")&&pmw.console.error("REST endpoint is not available. Using admin-ajax.php instead.")}),jQuery(document).on("pmw:page-view",e=>{pmw.console.log("pmw:page-view event fired",{event:e});let t={event:"page_view",pixels:{}};if(wpmDataLayer?.pixels?.facebook?.loaded&&(t.pixels.facebook={event_name:"PageView",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href},wpm.retrieveData("referrer")&&(t.pixels.facebook.referrer_url=wpm.makeFullUrl(wpm.retrieveData("referrer")))),wpmDataLayer?.pixels?.reddit?.loaded){const e=wpm.getRedditS2SBaseData();t.pixels.reddit={...e,event_id:wpm.getRandomEventId(),event_type:{tracking_type:"PageVisit"},event_metadata:{conversion_id:wpm.getRandomEventId()}}}if(wpmDataLayer?.pixels?.snapchat?.loaded&&(t.pixels.snapchat=wpm.getSnapchatS2SBaseData(),t.pixels.snapchat.event_name="PAGE_VIEW"),jQuery(document).trigger("pmw:s2s:page-view",t),wpmDataLayer?.general?.server_2_server?.pageview_event_s2s?.is_active){const e=wpm.extractS2SData(t);Object.keys(e).length>1&&wpm.sendEventPayloadToServer(e)}}),jQuery(document).on("pmw:add-to-cart",async(e,t)=>{pmw.console.log("pmw:add-to-cart event fired",{event:e,product:t}),await wpm.processEvent("add_to_cart",{product:t})}),jQuery(document).on("pmw:remove-from-cart",async(e,t)=>{pmw.console.log("pmw:remove-from-cart event fired",{event:e,product:t}),await wpm.processEvent("remove_from_cart",{product:t})}),jQuery(document).on("pmw:select-item",async(e,t)=>{pmw.console.log("pmw:select-item event fired",{event:e,product:t}),await wpm.processEvent("select_item",{product:t})}),jQuery(document).on("pmw:begin-checkout",e=>{pmw.console.log("pmw:begin-checkout event fired",{event:e}),wpm.processEvent("begin_checkout",{})}),jQuery(document).on("pmw:add-payment-info",e=>{pmw.console.log("pmw:add-payment-info event fired",{event:e}),wpm.processEvent("add_payment_info",{})}),jQuery(document).on("pmw:add-to-wishlist",(e,t)=>{pmw.console.log("pmw:add-to-wishlist event fired",{event:e,product:t});let r={event:"add_to_wishlist",product:t,pixels:{}};wpmDataLayer?.pixels?.facebook?.loaded&&(r.pixels.facebook={event_name:"AddToWishlist",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:wpm.fbGetProductDataForCapiEvent(t)},wpm.retrieveData("referrer")&&(r.pixels.facebook.referrer_url=wpm.makeFullUrl(wpm.retrieveData("referrer")))),wpmDataLayer?.pixels?.tiktok?.loaded&&(r.pixels.tiktok={event:"AddToWishlist",event_id:wpm.getRandomEventId(),user:wpm.tiktokGetEventUserData(),page:wpm.tiktokGetEventPageData(),properties:{value:t.price*t.quantity,currency:t.currency,content_type:"product",contents:[{content_id:wpm.getProductIdForSpecificPixel(t,"tiktok"),content_name:t.name,quantity:t.quantity,price:t.price}]}}),wpmDataLayer?.pixels?.snapchat?.loaded&&(r.pixels.snapchat=wpm.getSnapchatS2SBaseData(),r.pixels.snapchat.event_name="ADD_TO_WISHLIST",r.pixels.snapchat.custom_data=wpm.getSnapchatCustomDataForProduct(t)),jQuery(document).trigger("pmw:s2s:add-to-wishlist",r),wpm.sendEventPayloadToServer(r)}),jQuery(document).on("pmw:view-item",(e,t=null)=>{pmw.console.log("pmw:view-item event fired",{event:e,product:t}),wpm.processEvent("view_item",{product:t})}),jQuery(document).on("pmw:view-category",(e,t=null)=>{pmw.console.log("pmw:view-category event fired",{event:e,product:t});let r={event:"view_category",pixels:{}};wpmDataLayer?.pixels?.pinterest?.loaded&&(r.pixels.pinterest=wpm.getPinterestS2SBaseData(),r.pixels.pinterest.event_name="viewcategory"),jQuery(document).trigger("pmw:s2s:view-category",r),wpm.sendEventPayloadToServer(r)}),jQuery(document).on("pmw:search",e=>{pmw.console.log("pmw:search event fired",{event:e}),wpm.processEvent("search",{})}),jQuery(document).on("pmw:place-order",e=>{pmw.console.log("pmw:place-order event fired",{event:e});let t={event:"place_order",pixels:{}};wpmDataLayer?.pixels?.tiktok?.loaded&&(t.pixels.tiktok={event:"PlaceAnOrder",event_id:wpm.getRandomEventId(),user:wpm.tiktokGetEventUserData(),page:wpm.tiktokGetEventPageData(),properties:wpm.tiktokGetPropertiesFromCart()}),jQuery(document).trigger("pmw:s2s:place-order",t),wpm.sendEventPayloadToServer(t)}),jQuery(document).on("pmw:purchase",async e=>{pmw.console.log("pmw:purchase event fired",{event:e}),await wpm.processEvent("purchase",{order:wpmDataLayer.order})}),jQuery(document).on("pmw:login",()=>{pmw.console.log("pmw:login event fired");let e={event:"login",pixels:{}};wpmDataLayer?.pixels?.snapchat?.loaded&&(e.pixels.snapchat=wpm.getSnapchatS2SBaseData(),e.pixels.snapchat.event_name="LOGIN"),jQuery(document).trigger("pmw:s2s:login",e),wpm.sendEventPayloadToServer(e)}),jQuery(document).on("pmw:ready",async()=>{wpm.isWooCommerceActive()&&(wpm.startIntersectionObserverToWatch(),wpm.startProductsMutationObserverToWatch())}),jQuery(document).on("pmw:load-pixels",()=>{wpm.waitForPixelsAndTriggerPageView()})},256:()=>{!function(e){e.pixelRegistry={getActivePixels(){const t=[];if(!e.pixelCapabilities)return t;for(const[r,a]of Object.entries(e.pixelCapabilities))if("function"==typeof a.isActive)try{a.isActive()&&t.push(r)}catch(e){pmw.console.error(`Error checking if ${r} is active:`,e)}return t},getActiveBrowserOnlyPixels(){const t=[],r=this.getActivePixels();for(const a of r)!0!==e.pixelCapabilities?.[a]?.supportsS2S&&t.push(a);return t},getActiveS2SPixels(){const t=[],r=this.getActivePixels();for(const a of r)!0===e.pixelCapabilities?.[a]?.supportsS2S&&t.push(a);return t},getAdapter:t=>e.adapters&&e.adapters[t]||null}}(window.wpm=window.wpm||{},jQuery)},263:(e,t,r)=>{!function(e){e.jQueryExists=async()=>new Promise(e=>{!function t(){if("undefined"!=typeof jQuery)return e();setTimeout(t,100)}()}),e.waitForLibrary=(e,t=5e3,r=100)=>{const a=Date.now();for(;void 0===window[e]&&!(Date.now()-a>t);)setTimeout(()=>{},r)},e.wpmDataLayerFullyLoaded=async()=>{let e=new Promise(e=>{!function t(){if("undefined"!=typeof wpmDataLayer&&void 0!==wpmDataLayer.version)return e();setTimeout(t,100)}()}),t=setTimeout(()=>{console.error("Pixel Manager error: The wpmDataLayer is not defined. Please make sure that the wpmDataLayer script snippet is inserted and not modified by any third-party plugin, such as a consent management platform or a JavaScript optimizer.")},6e3);return e.then(()=>{clearTimeout(t)}),e},e.wpHooksExists=async()=>new Promise(e=>{!function t(){if("undefined"!=typeof wp&&void 0!==wp.hooks)return e();setTimeout(t,50)}()}),e.loadWcHooksFunctions=async()=>{await e.wpHooksExists(),await r.e(194).then(r.t.bind(r,489,23))}}(window.wpm=window.wpm||{},jQuery)},510:()=>{!function(e){window.pmw=window.pmw||{},pmw.hooks={filters:{},addFilter:function(e,t,r,a=10){e&&"string"==typeof e?t&&"string"==typeof t?"function"==typeof r?(this.filters[e]||(this.filters[e]=[]),this.filters[e].push({namespace:t,callback:r,priority:a}),this.filters[e].sort((e,t)=>e.priority-t.priority),pmw.console.log(`Filter added: ${e} (${t}) with priority ${a}`)):pmw.console.error("Invalid callback provided to addFilter"):pmw.console.error("Invalid namespace provided to addFilter"):pmw.console.error("Invalid hook name provided to addFilter")},applyFilters:function(e,t,...r){if(!this.filters[e]||0===this.filters[e].length)return t;let a=t;for(const t of this.filters[e])try{const o=t.callback(a,...r);undefined!==o?a=o:pmw.console.warn(`Filter ${t.namespace} on ${e} returned undefined, keeping previous value`)}catch(r){pmw.console.error(`Filter error in ${t.namespace} on ${e}:`,r)}return a},removeFilter:function(e,t){if(!this.filters[e])return;const r=this.filters[e].length;this.filters[e]=this.filters[e].filter(e=>e.namespace!==t),this.filters[e].length<r&&pmw.console.log(`Filter removed: ${e} (${t})`)},removeAllFilters:function(e){this.filters[e]&&(delete this.filters[e],pmw.console.log(`All filters removed for: ${e}`))},hasFilter:function(e,t=null){return!(!this.filters[e]||0===this.filters[e].length)&&(!t||this.filters[e].some(e=>e.namespace===t))},getFilters:function(e){return this.filters[e]||[]}},e.hooks=pmw.hooks}(window.wpm=window.wpm||{},jQuery)},547:()=>{!function(e){e.getLibraryVersion=()=>"1.53.0",e.checkLibraryVersion=()=>{e.getLibraryVersion()!==wpmDataLayer?.version?.number&&console.error(`Pixel Manager: The library version ${e.getLibraryVersion()} and wpmDataLayer.version.number ${wpmDataLayer.version.number} do not match. Delete the server-side cache and try again.`)}}(window.wpm=window.wpm||{},jQuery)},616:(e,t,r)=>{!function(e,t,a){const{isRange:o,isIP:i,isV4:n,isV6:s,version:c}=r(723),p={cloudflare:{any:"https://www.cloudflare.com/cdn-cgi/trace"},icanhazip:{4:"https://ipv4.icanhazip.com",6:"https://ipv6.icanhazip.com",any:"https://icanhazip.com"},ipinfo:{any:"https://ipinfo.io/ip"},myexternalip:{any:"https://myexternalip.com/raw"},ipify:{4:"https://api4.ipify.org",6:"https://api6.ipify.org",any:"https://api64.ipify.org"}};e.getGeoInfo={cloudflare:async()=>{const e=await fetch("https://www.cloudflare.com/cdn-cgi/trace");if(!e.ok)throw new Error(`The response from Cloudflare was not OK. Status: ${e.status}`);let t=await e.text();if(!t)throw new Error("No data was returned from Cloudflare");if(t=t.trim().split("\n").reduce((e,t)=>(e[(t=t.split("="))[0]]=t[1],e),{}),!t.ip||!t.loc)throw new Error("The JSON data is missing the ip or loc key from Cloudflare");if(d(t.loc))throw new Error("We have to validate the region, and this service is not returning the region.");return{ip:t.ip,countryCode:t.loc,service:"cloudflare"}},geojs:async()=>{const e=await fetch("https://get.geojs.io/v1/ip/geo.json");if(!e.ok)throw new Error(`The response from geojs was not OK. Status: ${e.status}`);let t=await e.json();if(!t)throw new Error("No JSON data was returned from geojs");if(!t.ip||!t.country_code||!t.region)throw new Error("The JSON data is missing the ip, country_code, or region key from geojs");return{ip:t.ip,countryCode:t.country_code,region:t.region,service:"geojs"}},ipinfo:async()=>{const e=await fetch("https://ipinfo.io/json");if(!e.ok)throw new Error(`The response from ipinfo was not OK from ipinfo. Status: ${e.status}`);let t=await e.json();if(!t)throw new Error("No JSON data was returned from ipinfo");if(!t.ip||!t.country||!t.region)throw new Error("The JSON data is missing the ip, country, or region key from ipinfo");return{ip:t.ip,countryCode:t.country,region:t.region,service:"ipinfo"}},ipapi:async()=>{const e=await fetch("https://ipapi.co/json");if(!e.ok)throw new Error(`The response from ipapi was not OK. Status: ${e.status}`);let t=await e.json();if(!t)throw new Error("No JSON data was returned from ipapi");if(!t.ip||!t.country||!t.region)throw new Error("The JSON data is missing the ip, country, or region key from ipapi");return{ip:t.ip,countryCode:t.country,region:t.region,service:"ipapi"}}};const d=e=>{if("US "!==e)return!1;return["US-CA","US-VA"].some(e=>wpmDataLayer?.general?.consent_management.restricted_regions.includes(e))};e.isVisitorAllowed=async()=>{if(null!==e.retrieveData("visitorAllowed")&&e.retrieveData("visitorAllowed")!==a)return!!JSON.parse(e.retrieveData("visitorAllowed"));if(e.isBotUserAgent())return e.storeData("visitorAllowed",!1),!1;if(Array.isArray(wpmDataLayer?.general?.server_2_server?.ip_exclude_list)&&wpmDataLayer.general.server_2_server.ip_exclude_list.length>0){const t=await e.getIp();if(m(t))return e.storeData("visitorAllowed",!1),!1}return e.storeData("visitorAllowed",!0),!0},e.getIp=async(t="any",r=3)=>{const o=["any","4","6"];if(!o.includes(t))return console.error("The version argument must be one of the following: "+o.join(", ")),null;if("any"===t&&e.retrieveData("ip"))return e.retrieveData("ip");const i=e.retrieveData(`ipv${t}`);if(i!==a)return i;pmw.console.log("Testing the IP address of the browser because one ore more server-to-server APIs are enabled and require the browser IP. It may trigger connection request errors in the console while testing the IP address. This is normal and expected behavior.");try{const a=await e.getIpFromAnyService(t,r);return"any"===t&&e.storeData("ip",a),(4===c(a)||"4"===t&&null===a)&&e.storeData("ipv4",a),(6===c(a)||"6"===t&&null===a)&&e.storeData("ipv6",a),a}catch(e){return null}},e.getBrowserGeoFromExternalService=async()=>{const t=performance.now();let r=[];Object.keys(e.getGeoInfo).forEach(t=>{r.push(e.getGeoInfo[t]())});try{const e=await Promise.any(r);return e.countryCode=e.countryCode.toUpperCase(),e.region&&"California"===e.region&&(e.regionCode="US-CA"),e.region&&"Virginia"===e.region&&(e.regionCode="US-VA"),pmw.console.log("Retrieved the browser geo info from an external service: ",e," which took ",(performance.now()-t).toFixed(2)+" ms"),e}catch(e){return pmw.console.error("error: ",e),null}};e.getBrowserGeo=async()=>{let t={};if(e.retrieveData("geoCountryCode")&&(t.countryCode=e.retrieveData("geoCountryCode")),e.retrieveData("geoRegionCode")&&(t.regionCode=e.retrieveData("geoRegionCode")),e.retrieveData("geoRegion")&&(t.region=e.retrieveData("geoRegion")),t.countryCode)return pmw.console.log("Retrieved the browser geo location from the cache: ",t),t;let a=await e.getBrowserGeoFromExternalService();if(!a){const e=(()=>{const e=r(179).getLocationByTimeZone();return e.countryCode?e:null})();a={},e&&pmw.console.log("Retrieved the browser geo location from the timezone: ",e),e.countryCode&&(a.countryCode=e.countryCode),e.regionCode&&(a.regionCode=e.regionCode)}return a?.ip&&e.storeData("ip",a.ip),a?.countryCode&&e.storeData("geoCountryCode",a.countryCode),a?.regionCode&&e.storeData("geoRegionCode",a.regionCode),a?.region&&e.storeData("geoRegion",a.region),a?.countryCode?a:null},e.getIpFromAnyService=async(t="any",r=3)=>{const a=performance.now(),o=Object.keys(p).filter(e=>p[e][t]).slice(0,r).reduce((e,t)=>(e[t]=p[t],e),{});let i=[];if(Object.keys(o).forEach(r=>{o[r][t]&&i.push(e.getIpFromService(r,t))}),!(i.length>0))return pmw.console.log("No promises to resolve"),null;try{const e=await Promise.any(i),t=(performance.now()-a).toFixed(2);return pmw.console.log(`Retrieved the IP address ${e.ip} from ${e.service} which took ${t} ms`),e.ip}catch(e){return pmw.console.log(`Could not retrieve an IP with version ${t} from any of the services.`),null}},e.getIpFromService=async(e,t="any")=>{try{let r={ip:null,service:e,ipVersion:t};if(!p[e][t])return Promise.reject(new Error(`The IP version ${t} is not available for the service ${e}`));pmw.console.log(`Fetching IP from ${e} using IP version ${t}`);const a=await fetch(p[e][t]);if(!a.ok)return Promise.reject(new Error(`The response from ${e} was not OK. Status: ${a.status}`));let o=await a.text();return"cloudflare"===e?(o=o.trim().split("\n").reduce((e,t)=>(e[(t=t.split("="))[0]]=t[1],e),{}),r.ip=o.ip):r.ip=o.trim(),i(r.ip)?r:Promise.reject(new Error(`The returned value from ${e} is not an IP address`))}catch(e){return Promise.reject(e)}};e.isVisitorNotAllowed=async()=>!1===await e.isVisitorAllowed(),e.isBotUserAgent=()=>{const e=navigator.userAgent||"";if(!e)return!0;const t=u();for(const r of t)if(e.toLowerCase().includes(r.toLowerCase()))return!0;return!1};const u=()=>{let e=[];Array.isArray(wpmDataLayer?.general?.server_2_server?.user_agent_exclude_patterns)&&(e=wpmDataLayer.general.server_2_server.user_agent_exclude_patterns);return["Googlebot","Google-InspectionTool","Google-Extended","Storebot-Google","bingbot","BingPreview","msnbot","Slurp","DuckDuckBot","Baiduspider","YandexBot","Sogou","facebookexternalhit","FacebookBot","LinkedInBot","Twitterbot","PinterestBot","TikTokBot","SnapchatAds","DiscordBot","InstagramBot","WhatsApp","AhrefsBot","SemrushBot","MJ12bot","DotBot","rogerbot","UptimeRobot","Pingdom","StatusCake","GTmetrix","ClaudeBot","GPTBot","ChatGPT","anthropic-ai","CCBot","PerplexityBot","crawler","spider","scraper","bot/","/bot","bot-"].concat(e)},l=e=>e.includes("/"),m=e=>{const t=wpmDataLayer?.general?.server_2_server?.ip_exclude_list||[];for(const r of t)if(l(r)){if(isInSubnet.isInSubnet(e,r))return!0}else if(e===r)return!0;return!1}}(window.wpm=window.wpm||{},jQuery)},722:()=>{const e=wpm.prepareSelectors([".add_to_cart_button:not(.product_type_variable)",".ajax_add_to_cart",".single_add_to_cart_button"],"addToCart");jQuery(e).on("click adding_to_cart",(e,t)=>{try{let t=e?.target?.dataset?.quantity?e.target.dataset.quantity:null,r=e?.target?.dataset?.product_id?e.target.dataset.product_id:e?.target?.value?e.target.value:null;if("product"===wpmDataLayer.shop.page_type){if(void 0!==jQuery(e.currentTarget).attr("href")&&jQuery(e.currentTarget).attr("href").includes("add-to-cart"))return r||(r=jQuery(e.currentTarget).data("product_id")),void wpm.addProductToCart(r,1);if("simple"===wpmDataLayer.shop.product_type)return null===t&&(t=Number(jQuery(".input-text.qty").val())?Number(jQuery(".input-text.qty").val()):1),r||(r=jQuery(e.currentTarget).val()),r||(r=jQuery(".product").attr("id").replace("product-","")),void wpm.addProductToCart(r,t);if(["variable","variable-subscription"].indexOf(wpmDataLayer.shop.product_type)>=0)return null===t&&(t=Number(jQuery(".input-text.qty").val())?Number(jQuery(".input-text.qty").val()):1),r||(r=jQuery("[name='variation_id']").val()),void wpm.addProductToCart(r,t);if("grouped"===wpmDataLayer.shop.product_type)return void jQuery(".woocommerce-grouped-product-list-item").each((e,a)=>{t=Number(jQuery(a).find(".input-text.qty").val())?Number(jQuery(a).find(".input-text.qty").val()):1;let o=jQuery(a).attr("class");r=wpm.getPostIdFromString(o),wpm.addProductToCart(r,t)});if("bundle"===wpmDataLayer.shop.product_type)return null===t&&(t=Number(jQuery(".input-text.qty").val())?Number(jQuery(".input-text.qty").val()):1),r||(r=jQuery("input[name=add-to-cart]").val()),void wpm.addProductToCart(r,t);null===t&&(t=Number(jQuery(".input-text.qty").val())?Number(jQuery(".input-text.qty").val()):1),wpm.addProductToCart(r,t)}else null===t&&(t=1),r||(r=jQuery(e.currentTarget).data("product_id")?jQuery(e.currentTarget).data("product_id"):null),r||(r=jQuery(e.currentTarget).val()?jQuery(e.currentTarget).val():null),r&&t&&wpm.addProductToCart(r,t)}catch(e){console.error(e)}}),jQuery("a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)").one("click",e=>{try{if(jQuery(e.target).closest("a").attr("href")){let t=new URL(jQuery(e.currentTarget).attr("href"),window.location.origin);if(t.searchParams.has("add-to-cart")){let e=t.searchParams.get("add-to-cart"),r=t.searchParams.has("quantity")?parseInt(t.searchParams.get("quantity"),10):1;wpm.addProductToCart(e,r)}}}catch(e){console.error(e)}}),jQuery(".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product").on("click",e=>{try{let t=jQuery(e.currentTarget).nextAll(".wpmProductId:first").data("id");if(t){if(t=wpm.getIdBasedOndVariationsOutputSetting(t),!t)throw Error("Wasn't able to retrieve a productId");if(wpmDataLayer.products&&wpmDataLayer.products[t]){let e=wpm.getProductDetailsFormattedForEvent(t);jQuery(document).trigger("pmw:select-item",e)}}}catch(e){console.error(e)}}),jQuery("#billing_email").on("input",e=>{wpm.isEmail(jQuery(e.currentTarget).val())&&(wpm.fireCheckoutProgress(2),wpm.emailSelected=!0)}),jQuery("form.checkout").on("checkout_place_order_success",()=>{!1===wpm.emailSelected&&wpm.fireCheckoutProgress(2),!1===wpm.paymentMethodSelected&&(wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val())),wpm.fireCheckoutProgress(4),jQuery(document).trigger("pmw:place-order",{})}),jQuery(document).on("click","[name='update_cart']",()=>{try{jQuery(".cart_item").each((e,t)=>{const r=wpm.getProductIdByCartItemElement(t);if(!r)return void console.error("Pixel Manager: Wasn't able to retrieve a productId");const a=wpm.getProductQuantityByCartItemElement(t);a?0===a?wpm.removeProductFromCart(r):a<wpmDataLayer.cart[r].quantity?wpm.removeProductFromCart(r,wpmDataLayer.cart[r].quantity-a):a>wpmDataLayer.cart[r].quantity&&wpm.addProductToCart(r,a-wpmDataLayer.cart[r].quantity):console.error("Pixel Manager: Wasn't able to retrieve a quantity")})}catch(e){console.error(e),wpm.getCartItemsFromBackend()}}),jQuery(".add_to_wishlist,.wl-add-to").on("click",e=>{try{let t;if(jQuery(e.currentTarget).data("productid")?t=jQuery(e.currentTarget).data("productid"):jQuery(e.currentTarget).data("product-id")&&(t=jQuery(e.currentTarget).data("product-id")),!t)throw Error("Wasn't able to retrieve a productId");let r=wpm.getProductDetailsFormattedForEvent(t);jQuery(document).trigger("pmw:add-to-wishlist",r)}catch(e){console.error(e)}}),wpmDataLayer?.general?.lazy_load_pmw||wpm.registerShowVariationEventListener()},723:(e,t,r)=>{"use strict";r.r(t),r.d(t,{displayIP:()=>w,inRange:()=>l,isIP:()=>s,isRange:()=>u,isV4:()=>p,isV6:()=>d,searchIP:()=>m,storeIP:()=>m,version:()=>c});var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{};function o(e,t){return e(t={exports:{}},t.exports),t.exports}var i=o(function(e){(function(){var t,r,a,o,i,n,s,c;r={},null!==e&&e.exports?e.exports=r:this.ipaddr=r,s=function(e,t,r,a){var o,i;if(e.length!==t.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");for(o=0;a>0;){if((i=r-a)<0&&(i=0),e[o]>>i!==t[o]>>i)return!1;a-=r,o+=1}return!0},r.subnetMatch=function(e,t,r){var a,o,i,n,s;for(i in null==r&&(r="unicast"),t)for(!(n=t[i])[0]||n[0]instanceof Array||(n=[n]),a=0,o=n.length;a<o;a++)if(s=n[a],e.kind()===s[0].kind()&&e.match.apply(e,s))return i;return r},r.IPv4=function(){function e(e){var t,r,a;if(4!==e.length)throw new Error("ipaddr: ipv4 octet count should be 4");for(t=0,r=e.length;t<r;t++)if(!(0<=(a=e[t])&&a<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=e}return e.prototype.kind=function(){return"ipv4"},e.prototype.toString=function(){return this.octets.join(".")},e.prototype.toNormalizedString=function(){return this.toString()},e.prototype.toByteArray=function(){return this.octets.slice(0)},e.prototype.match=function(e,t){var r;if(void 0===t&&(e=(r=e)[0],t=r[1]),"ipv4"!==e.kind())throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return s(this.octets,e.octets,8,t)},e.prototype.SpecialRanges={unspecified:[[new e([0,0,0,0]),8]],broadcast:[[new e([255,255,255,255]),32]],multicast:[[new e([224,0,0,0]),4]],linkLocal:[[new e([169,254,0,0]),16]],loopback:[[new e([127,0,0,0]),8]],carrierGradeNat:[[new e([100,64,0,0]),10]],private:[[new e([10,0,0,0]),8],[new e([172,16,0,0]),12],[new e([192,168,0,0]),16]],reserved:[[new e([192,0,0,0]),24],[new e([192,0,2,0]),24],[new e([192,88,99,0]),24],[new e([198,51,100,0]),24],[new e([203,0,113,0]),24],[new e([240,0,0,0]),4]]},e.prototype.range=function(){return r.subnetMatch(this,this.SpecialRanges)},e.prototype.toIPv4MappedAddress=function(){return r.IPv6.parse("::ffff:"+this.toString())},e.prototype.prefixLengthFromSubnetMask=function(){var e,t,r,a,o,i,n;for(n={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},e=0,o=!1,t=r=3;r>=0;t=r+=-1){if(!((a=this.octets[t])in n))return null;if(i=n[a],o&&0!==i)return null;8!==i&&(o=!0),e+=i}return 32-e},e}(),a="(0?\\d+|0x[a-f0-9]+)",o={fourOctet:new RegExp("^"+a+"\\."+a+"\\."+a+"\\."+a+"$","i"),longValue:new RegExp("^"+a+"$","i")},r.IPv4.parser=function(e){var t,r,a,i,n;if(r=function(e){return"0"===e[0]&&"x"!==e[1]?parseInt(e,8):parseInt(e)},t=e.match(o.fourOctet))return function(){var e,o,i,n;for(n=[],e=0,o=(i=t.slice(1,6)).length;e<o;e++)a=i[e],n.push(r(a));return n}();if(t=e.match(o.longValue)){if((n=r(t[1]))>4294967295||n<0)throw new Error("ipaddr: address outside defined range");return function(){var e,t;for(t=[],i=e=0;e<=24;i=e+=8)t.push(n>>i&255);return t}().reverse()}return null},r.IPv6=function(){function e(e,t){var r,a,o,i,n,s;if(16===e.length)for(this.parts=[],r=a=0;a<=14;r=a+=2)this.parts.push(e[r]<<8|e[r+1]);else{if(8!==e.length)throw new Error("ipaddr: ipv6 part count should be 8 or 16");this.parts=e}for(o=0,i=(s=this.parts).length;o<i;o++)if(!(0<=(n=s[o])&&n<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");t&&(this.zoneId=t)}return e.prototype.kind=function(){return"ipv6"},e.prototype.toString=function(){return this.toNormalizedString().replace(/((^|:)(0(:|$))+)/,"::")},e.prototype.toRFC5952String=function(){var e,t,r,a,o;for(a=/((^|:)(0(:|$)){2,})/g,o=this.toNormalizedString(),e=0,t=-1;r=a.exec(o);)r[0].length>t&&(e=r.index,t=r[0].length);return t<0?o:o.substring(0,e)+"::"+o.substring(e+t)},e.prototype.toByteArray=function(){var e,t,r,a,o;for(e=[],t=0,r=(o=this.parts).length;t<r;t++)a=o[t],e.push(a>>8),e.push(255&a);return e},e.prototype.toNormalizedString=function(){var e,t,r;return e=function(){var e,r,a,o;for(o=[],e=0,r=(a=this.parts).length;e<r;e++)t=a[e],o.push(t.toString(16));return o}.call(this).join(":"),r="",this.zoneId&&(r="%"+this.zoneId),e+r},e.prototype.toFixedLengthString=function(){var e,t,r;return e=function(){var e,r,a,o;for(o=[],e=0,r=(a=this.parts).length;e<r;e++)t=a[e],o.push(t.toString(16).padStart(4,"0"));return o}.call(this).join(":"),r="",this.zoneId&&(r="%"+this.zoneId),e+r},e.prototype.match=function(e,t){var r;if(void 0===t&&(e=(r=e)[0],t=r[1]),"ipv6"!==e.kind())throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return s(this.parts,e.parts,16,t)},e.prototype.SpecialRanges={unspecified:[new e([0,0,0,0,0,0,0,0]),128],linkLocal:[new e([65152,0,0,0,0,0,0,0]),10],multicast:[new e([65280,0,0,0,0,0,0,0]),8],loopback:[new e([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new e([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new e([0,0,0,0,0,65535,0,0]),96],rfc6145:[new e([0,0,0,0,65535,0,0,0]),96],rfc6052:[new e([100,65435,0,0,0,0,0,0]),96],"6to4":[new e([8194,0,0,0,0,0,0,0]),16],teredo:[new e([8193,0,0,0,0,0,0,0]),32],reserved:[[new e([8193,3512,0,0,0,0,0,0]),32]]},e.prototype.range=function(){return r.subnetMatch(this,this.SpecialRanges)},e.prototype.isIPv4MappedAddress=function(){return"ipv4Mapped"===this.range()},e.prototype.toIPv4Address=function(){var e,t,a;if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");return e=(a=this.parts.slice(-2))[0],t=a[1],new r.IPv4([e>>8,255&e,t>>8,255&t])},e.prototype.prefixLengthFromSubnetMask=function(){var e,t,r,a,o,i,n;for(n={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},e=0,o=!1,t=r=7;r>=0;t=r+=-1){if(!((a=this.parts[t])in n))return null;if(i=n[a],o&&0!==i)return null;16!==i&&(o=!0),e+=i}return 128-e},e}(),i="(?:[0-9a-f]+::?)+",c="%[0-9a-z]{1,}",n={zoneIndex:new RegExp(c,"i"),native:new RegExp("^(::)?("+i+")?([0-9a-f]+)?(::)?("+c+")?$","i"),transitional:new RegExp("^((?:"+i+")|(?:::)(?:"+i+")?)"+a+"\\."+a+"\\."+a+"\\."+a+"("+c+")?$","i")},t=function(e,t){var r,a,o,i,s,c;if(e.indexOf("::")!==e.lastIndexOf("::"))return null;for((c=(e.match(n.zoneIndex)||[])[0])&&(c=c.substring(1),e=e.replace(/%.+$/,"")),r=0,a=-1;(a=e.indexOf(":",a+1))>=0;)r++;if("::"===e.substr(0,2)&&r--,"::"===e.substr(-2,2)&&r--,r>t)return null;for(s=t-r,i=":";s--;)i+="0:";return":"===(e=e.replace("::",i))[0]&&(e=e.slice(1)),":"===e[e.length-1]&&(e=e.slice(0,-1)),{parts:t=function(){var t,r,a,i;for(i=[],t=0,r=(a=e.split(":")).length;t<r;t++)o=a[t],i.push(parseInt(o,16));return i}(),zoneId:c}},r.IPv6.parser=function(e){var r,a,o,i,s,c,p;if(n.native.test(e))return t(e,8);if((i=e.match(n.transitional))&&(p=i[6]||"",(r=t(i[1].slice(0,-1)+p,6)).parts)){for(a=0,o=(c=[parseInt(i[2]),parseInt(i[3]),parseInt(i[4]),parseInt(i[5])]).length;a<o;a++)if(!(0<=(s=c[a])&&s<=255))return null;return r.parts.push(c[0]<<8|c[1]),r.parts.push(c[2]<<8|c[3]),{parts:r.parts,zoneId:r.zoneId}}return null},r.IPv4.isIPv4=r.IPv6.isIPv6=function(e){return null!==this.parser(e)},r.IPv4.isValid=function(e){try{return new this(this.parser(e)),!0}catch(e){return!1}},r.IPv4.isValidFourPartDecimal=function(e){return!(!r.IPv4.isValid(e)||!e.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},r.IPv6.isValid=function(e){var t;if("string"==typeof e&&-1===e.indexOf(":"))return!1;try{return new this((t=this.parser(e)).parts,t.zoneId),!0}catch(e){return!1}},r.IPv4.parse=function(e){var t;if(null===(t=this.parser(e)))throw new Error("ipaddr: string is not formatted like ip address");return new this(t)},r.IPv6.parse=function(e){var t;if(null===(t=this.parser(e)).parts)throw new Error("ipaddr: string is not formatted like ip address");return new this(t.parts,t.zoneId)},r.IPv4.parseCIDR=function(e){var t,r,a;if((r=e.match(/^(.+)\/(\d+)$/))&&(t=parseInt(r[2]))>=0&&t<=32)return a=[this.parse(r[1]),t],Object.defineProperty(a,"toString",{value:function(){return this.join("/")}}),a;throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},r.IPv4.subnetMaskFromPrefixLength=function(e){var t,r,a;if((e=parseInt(e))<0||e>32)throw new Error("ipaddr: invalid IPv4 prefix length");for(a=[0,0,0,0],r=0,t=Math.floor(e/8);r<t;)a[r]=255,r++;return t<4&&(a[t]=Math.pow(2,e%8)-1<<8-e%8),new this(a)},r.IPv4.broadcastAddressFromCIDR=function(e){var t,r,a,o,i;try{for(a=(t=this.parseCIDR(e))[0].toByteArray(),i=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),o=[],r=0;r<4;)o.push(parseInt(a[r],10)|255^parseInt(i[r],10)),r++;return new this(o)}catch(e){throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},r.IPv4.networkAddressFromCIDR=function(e){var t,r,a,o,i;try{for(a=(t=this.parseCIDR(e))[0].toByteArray(),i=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),o=[],r=0;r<4;)o.push(parseInt(a[r],10)&parseInt(i[r],10)),r++;return new this(o)}catch(e){throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},r.IPv6.parseCIDR=function(e){var t,r,a;if((r=e.match(/^(.+)\/(\d+)$/))&&(t=parseInt(r[2]))>=0&&t<=128)return a=[this.parse(r[1]),t],Object.defineProperty(a,"toString",{value:function(){return this.join("/")}}),a;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},r.isValid=function(e){return r.IPv6.isValid(e)||r.IPv4.isValid(e)},r.parse=function(e){if(r.IPv6.isValid(e))return r.IPv6.parse(e);if(r.IPv4.isValid(e))return r.IPv4.parse(e);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},r.parseCIDR=function(e){try{return r.IPv6.parseCIDR(e)}catch(t){try{return r.IPv4.parseCIDR(e)}catch(e){throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},r.fromByteArray=function(e){var t;if(4===(t=e.length))return new r.IPv4(e);if(16===t)return new r.IPv6(e);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},r.process=function(e){var t;return"ipv6"===(t=this.parse(e)).kind()&&t.isIPv4MappedAddress()?t.toIPv4Address():t}}).call(a)}),n=o(function(e,t){const r=function(e){if(!o(e))throw new Error("Invalid address: "+e);const t=(e=e.toLowerCase()).split(/\:\:/g);if(t.length>2)throw new Error("Invalid address: "+e);let r=[];if(1==t.length){if(r=e.split(/\:/g),8!==r.length)throw new Error("Invalid address: "+e)}else if(2==t.length){const e=t[0],a=t[1],o=e.split(/\:/g),i=a.split(/\:/g);for(let e in o)r[e]=o[e];for(let e=i.length;e>0;--e)r[7-(i.length-e)]=i[e-1]}for(let e=0;e<8;++e)void 0===r[e]&&(r[e]="0000"),r[e]=i(r[e],"0",4);return r.join(":")},a=function(e){if(!o(e))throw new Error("Invalid address: "+e);const t=(e=(e=(e=(e=(e=(e=r(e)).replace(/0000/g,"g")).replace(/\:000/g,":")).replace(/\:00/g,":")).replace(/\:0/g,":")).replace(/g/g,"0")).split(/\:/g);let a=!1,i=-1,n=0,s=-1,c=0;for(let e=0;e<8;++e){const r=t[e];let o="0"===r;o&&!a&&(s=e),!o&&a&&(c=e-s),c>1&&c>n&&(i=s,n=c),a="0"===r}return a&&(c=8-s),c>1&&c>n&&(i=s,n=c),i>=0&&n>1&&t.splice(i,n,"g"),e=(e=(e=(e=(e=t.join(":")).replace(/\:g\:/g,"::")).replace(/\:g/g,"::")).replace(/g\:/g,"::")).replace(/g/g,"::")},o=function(e){return/^[a-f0-9\\:]+$/gi.test(e)},i=function(e,t,r){const a=t.repeat(r);return e.length<a.length&&(e=a.substring(0,a.length-e.length)+e),e},n=function(e){return parseInt(e,16).toString(2)},s=function(e){return parseInt(e,2).toString(16)},c=function(e){const t=r(e).split(":");let a="";for(const e of t)a+=i(n(e),"0",16);return a},p=function(e){const t=[];for(let r=0;r<8;++r){const a=e.substr(16*r,16),o=i(s(a),"0",4);t.push(o)}return t.join(":")},d=function(e,t,r,n,s){if(!o(e))throw new Error("Invalid address: "+e);if(n*=1,r=(r*=1)||128,(t*=1)<1||r<1||t>128||r>128||t>r)throw new Error("Invalid masks.");const d=[],u=c(e).substr(0,t),l="0".repeat(128-r),m=Math.pow(2,r-t);for(let e=0;e<m&&!(n&&e>=n);++e){const o=i(e.toString(2),"0",r-t),n=p(u+o+l);s?d.push(a(n)):d.push(n)}return d},u=function(e,t,r,i){if(!o(e))throw new Error("Invalid address: "+e);if(r=(r*=1)||128,(t*=1)<1||r<1||t>128||r>128||t>r)throw new Error("Invalid masks.");const n=c(e).substr(0,t),s="0".repeat(128-r),d=n+"0".repeat(r-t)+s,u=n+"1".repeat(r-t)+s;return i?{start:a(p(d)),end:a(p(u)),size:Math.pow(2,r-t)}:{start:p(d),end:p(u),size:Math.pow(2,r-t)}},l=function(e,t,r,i,n){if(!o(e))throw new Error("Invalid address: "+e);if(r=(r*=1)||128,i=(i*=1)||1,(t*=1)<1||r<1||t>128||r>128||t>r)throw new Error("Invalid masks.");const s=[],d=c(e).substr(0,t),u="0".repeat(128-r),l=Math.pow(2,r-t);for(let e=0;e<l&&e<i;++e){let e="";for(let a=0;a<r-t;++a)e+=Math.floor(2*Math.random());const o=p(d+e+u);n?s.push(a(o)):s.push(o)}return s},m=function(e,t){if(!o(e))throw new Error("Invalid address: "+e);if((t*=1)<1||t>128||Math.floor(t/4)!=t/4)throw new Error("Invalid masks.");return r(e).replace(/:/g,"").split("").reverse().slice(0,(128-t)/4).join(".")};t.normalize=r,t.abbreviate=a,t.divideSubnet=d,t.range=u,t.randomSubnet=l,t.ptr=m});n.normalize,n.abbreviate,n.divideSubnet,n.range,n.randomSubnet,n.ptr;function s(e){return i.isValid(e)}function c(e){try{var t=i.parse(e).kind();return"ipv4"===t?4:"ipv6"===t?6:0}catch(e){return 0}}function p(e){return 4===c(e)}function d(e){return 6===c(e)}function u(e){try{i.parseCIDR(e);return!0}catch(e){return!1}}function l(e,t){if("string"!=typeof t){if(t&&"object"==typeof t){for(var r in t)if(!0===l(e,t[r]))return!0;return!1}return!1}if(-1===t.indexOf("/"))return e=d(e)?n.normalize(e):e,s(t=d(t)?n.normalize(t):t)&&e===t;try{var a=t.split("/"),o=i.parse(e),c=i.parse(a[0]);return o.match(c,a[1])}catch(e){return!1}}function m(e){try{var t=i.parse(e),r=t.kind();return"ipv4"===r?e:"ipv6"===r?t.isIPv4MappedAddress()?t.toIPv4Address().toString():n.abbreviate(e):null}catch(e){return null}}function w(e){try{var t=i.parse(e),r=t.kind();return"ipv4"===r?e:"ipv6"===r?t.isIPv4MappedAddress()?t.toIPv4Address().toString():n.normalize(e):""}catch(e){return""}}},783:()=>{!function(e){const t="restEndpointAvailable",r="pmw/v1/test/",a=0,o=10;e.emailSelected=!1,e.paymentMethodSelected=!1,e.isBelowRestErrorThreshold=()=>e.retrieveData(a)<=o,e.isRestEndpointAvailable=async()=>e.retrieveData(t)?e.retrieveData(t):await e.testEndpoint(),e.testEndpoint=async(a=e.root+r,o=t)=>{try{const t=await fetch(a,{method:"POST",mode:"cors",cache:"no-cache",keepalive:!0,redirect:"error"});if(!t.ok)return e.storeData(o,!1),pmw.console.error("Error testing the endpoint. Status: "+t.status+" | response: ",t),!1;const r=await t.json();return r.success?(e.storeData(o,!0),!0):(e.storeData(o,!1),pmw.console.error("Error testing the endpoint. Response JSON: "+JSON.stringify(r)),!1)}catch(t){return e.storeData(o,!1),pmw.console.error("Error testing the endpoint. Error: "+t),!1}},e.isWpmRestEndpointAvailable=(r=t)=>!!e.retrieveData(r),e.writeOrderIdToStorage=(t,r,a="thankyou_page")=>{let o=e.retrieveData("orderIds",!0)||[];o.push(t),e.storeData("orderIds",o,!0),"function"==typeof e.storeOrderIdOnServer&&e.storeOrderIdOnServer({orderId:t,orderKey:r,source:a})},e.isOrderIdStored=t=>{if(!wpmDataLayer.shop.order_duplication_prevention)return pmw.console.log("order duplication prevention is off"),!1;return(e.retrieveData("orderIds",!0)||[]).includes(t)},e.isEmail=e=>new RegExp('^(([^<>()\\[\\]\\\\.,;:\\s@"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@"]+)*)|(".+"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$').test(e),e.removeProductFromCart=async(t,r=null)=>{try{if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=e.getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");let a;a=null==r?wpmDataLayer.cart[t].quantity:r,wpmDataLayer.cart[t]||await e.getProductsFromBackend([t]);let o=e.getProductDetailsFormattedForEvent(t,a);jQuery(document).trigger("pmw:remove-from-cart",o),null==r||wpmDataLayer.cart[t].quantity===r?delete wpmDataLayer.cart[t]:wpmDataLayer.cart[t].quantity=wpmDataLayer.cart[t].quantity-a,e.storeCartData(wpmDataLayer.cart)}catch(e){pmw.console.error("error: ",e)}},e.getIdBasedOndVariationsOutputSetting=e=>{try{return wpmDataLayer?.shop?.variations_output?e:wpmDataLayer.products[e].is_variation?wpmDataLayer.products[e].parent_id:e}catch(e){console.error(e)}},e.prepareSelectors=(e,t)=>(wpmDataLayer?.shop?.selectors?.[t]&&(e=e.concat(wpmDataLayer.shop.selectors[t]),(e=[...new Set(e)]).indexOf("document")>=0&&e.splice(e.indexOf("document"),1),e.indexOf("body")>=0&&(e=["body"])),e.join(", ")),e.addProductToCart=async(t,r)=>{r=Number(r);try{if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=e.getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");wpmDataLayer?.products[t]||await e.getProductsFromBackend([t]);let a=e.getProductDetailsFormattedForEvent(t,r);jQuery(document).trigger("pmw:add-to-cart",a),wpmDataLayer?.cart[t]?wpmDataLayer.cart[t].quantity=wpmDataLayer.cart[t].quantity+r:("cart"in wpmDataLayer||(wpmDataLayer.cart={}),wpmDataLayer.cart[t]=e.getProductDetailsFormattedForEvent(t,r)),e.storeCartData(wpmDataLayer.cart)}catch(t){console.error(t),e.getCartItemsFromBackend()}},e.initCart=()=>{e.doesWooCommerceCartExist()||0===Object.keys(e.retrieveCartData()).length?e.retrieveCartData()?e.saveCartObjectToDataLayer(e.retrieveCartData()):(e.storeCartData({}),e.getCartItemsFromBackend()):e.storeCartData({})},e.getCartItemsFromBackend=()=>{try{fetch(e.ajax_url,{method:"POST",cache:"no-cache",body:new URLSearchParams({action:"pmw_get_cart_items"}),keepalive:!0,redirect:"error"}).then(e=>{if(e.ok)return e.json();throw Error("Error getting cart items from backend")}).then(t=>{if(!t.success)throw Error("Error getting cart items from backend");t.data.cart||(t.data.cart={}),e.saveCartObjectToDataLayer(t.data.cart),e.storeCartData(t.data.cart)})}catch(e){console.error(e)}},e.getProductsFromBackend=async t=>{if(wpmDataLayer?.products&&(t=t.filter(e=>!(e in wpmDataLayer.products))),t&&0!==t.length&&wpmDataLayer.general.page_id&&Array.isArray(t)&&0!==t.length){try{let r={action:"pmw_get_product_ids",page_id:wpmDataLayer.general.page_id,page_type:wpmDataLayer.shop.page_type,product_ids:t};const a=await e.isRestEndpointAvailable(),o=a?e.root+"pmw/v1/products/":e.ajax_url,i={method:"POST",cache:"no-cache",body:a?JSON.stringify(r):new URLSearchParams(r)};a&&(i.headers={"Content-Type":"application/json"});let n=await fetch(o,i);if(!n.ok)throw new Error("Error getting products from backend. Status: "+n.status+" Status text: "+n.statusText);let s=await n.json();if(!s.success)throw new Error("Error getting products from backend: "+s.data);wpmDataLayer.products=Object.assign({},wpmDataLayer.products,s.data)}catch(e){console.error(e)}return!0}},e.saveCartObjectToDataLayer=e=>{wpmDataLayer.cart=e,wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e)},e.triggerViewItemEventPrep=async t=>{wpmDataLayer?.products[t]||await e.getProductsFromBackend([t]),wpmDataLayer?.products[t]?e.triggerViewItemEvent(t):(e.triggerViewItemEventNoProduct(),pmw.console.log(`Product with ID ${t} not found in the data layer and couldn't be retrieved from the backend. Triggering view-item event without product data.`))},e.triggerViewItemEvent=t=>{let r=e.getProductDetailsFormattedForEvent(t);r&&jQuery(document).trigger("pmw:view-item",r)},e.triggerViewItemEventNoProduct=()=>{jQuery(document).trigger("pmw:view-item")},e.fireCheckoutOption=(e,t=null,r=null)=>{let a={step:e,checkout_option:t,value:r};jQuery(document).trigger("pmw:checkout-option",a)},e.fireCheckoutProgress=e=>{let t={step:e};jQuery(document).trigger("pmw:checkout-progress",t)},e.getPostIdFromString=e=>{try{return e.match(/(post-)(\d+)/)[2]}catch(e){console.error(e)}},e.triggerViewItemList=t=>{if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=e.getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");jQuery(document).trigger("pmw:view-item-list",e.getProductDataForViewItemEvent(t))},e.getProductDataForViewItemEvent=t=>{if(!t)throw Error("Wasn't able to retrieve a productId");try{if(wpmDataLayer.products[t])return e.getProductDetailsFormattedForEvent(t)}catch(e){console.error(e)}},e.getMainProductIdFromProductPage=()=>{try{return["simple","variable","grouped","composite","bundle"].indexOf(wpmDataLayer.shop.product_type)>=0&&jQuery(".wpmProductId:first").data("id")}catch(e){console.error(e)}},e.viewItemListTriggerTestMode=e=>{jQuery(e).css({position:"relative"}),jQuery(e).append('<div id="viewItemListTriggerOverlay"></div>'),jQuery(e).find("#viewItemListTriggerOverlay").css({"z-index":"10",display:"block",position:"absolute",height:"100%",top:"0",left:"0",right:"0",opacity:wpmDataLayer.shop.view_item_list_trigger.opacity,"background-color":wpmDataLayer.shop.view_item_list_trigger.background_color})},e.getSearchTermFromUrl=()=>{try{return new URLSearchParams(window.location.search).get("s")}catch(e){console.error(e)}};let i,n={};e.observerCallback=(t,r)=>{t.forEach(t=>{try{let a,o=jQuery(t.target).data("ioid");if(a=jQuery(t.target).next(".wpmProductId").length?jQuery(t.target).next(".wpmProductId").data("id"):jQuery(t.target).find(".wpmProductId").data("id"),!a)throw Error("wpmProductId element not found");t.isIntersecting?n[o]=setTimeout(()=>{e.triggerViewItemList(a),wpmDataLayer.shop.view_item_list_trigger.test_mode&&e.viewItemListTriggerTestMode(t.target),!1===wpmDataLayer.shop.view_item_list_trigger.repeat&&r.unobserve(t.target)},wpmDataLayer.shop.view_item_list_trigger.timeout):(clearTimeout(n[o]),wpmDataLayer.shop.view_item_list_trigger.test_mode&&jQuery(t.target).find("#viewItemListTriggerOverlay").remove())}catch(e){console.error(e)}})};let s=0;let c={nested:[],flat:[]};const p=e=>["product","type-product","product-item-inner",...c.nested].some(t=>jQuery(e).closest("."+t).length),d=e=>["wc-block-grid__product","product","product-small","woocommerce-LoopProduct-link",...c.flat].some(t=>jQuery(e).prev().hasClass(t)),u=()=>(c=(()=>{let e={nested:[],flat:[]};try{const t=(e,t)=>jQuery(e).parents().length===jQuery(t).parents().length,r=(e,t)=>jQuery(e).parent().is(jQuery(t).parent())?{node:jQuery(e).parent(),type:"flat"}:{node:jQuery(e).parents().has(jQuery(t).parents()).first(),type:"nested"},a=e=>jQuery(e).find(".wpmProductId").length,o=(e,t)=>e.filter(e=>t.includes(e))[0]||null,i=document.querySelectorAll(".wpmProductId");if(1===i.length)return e;for(let n=0;n<i.length-1;n++){if(!t(i[n],i[n+1])){n++;continue}let s=r(i[n],i[n+1]);if("nested"===s.type){let t=s.node.children().first().attr("class"),r=t?t.split(" "):[],a=s.node.children().first().next().attr("class");const i=o(r,a?a.split(" "):[]);e.nested.push(i)}else if("flat"===s.type){if(!s.node.children().first().attr("class"))continue;let t=s.node.children().first().attr("class").split(" ")[0];e.flat.push(t)}n=n+a(s.node)-1}return e.nested=[...new Set(e.nested)],e.flat=[...new Set(e.flat)],e}catch(t){return console.error(t),e}})(),jQuery(".wpmProductId").map(function(e,t){return p(t)?jQuery(t).parent():d(t)?jQuery(this).prev():jQuery(t).closest(".product").length?jQuery(t).closest(".product"):void 0}));e.startIntersectionObserverToWatch=()=>{try{e.urlHasParameter("vildemomode")&&(wpmDataLayer.shop.view_item_list_trigger.test_mode=!0),i=new IntersectionObserver(e.observerCallback,{root:null,threshold:wpmDataLayer.shop.view_item_list_trigger.threshold}),u().each((e,t)=>{jQuery(t[0]).data("ioid",s++),i.observe(t[0])})}catch(e){console.error(e)}},e.startProductsMutationObserverToWatch=()=>{try{let e=jQuery(".wpmProductId:eq(0)").parents().has(jQuery(".wpmProductId:eq(1)").parents()).first();e.length&&l.observe(e[0],{attributes:!0,childList:!0,characterData:!0})}catch(e){console.error(e)}};const l=new MutationObserver(e=>{e.forEach(e=>{let t=e.addedNodes;if(null!==t){jQuery(t).each((e,t)=>{(p(t)||d(t))&&m(t)&&(jQuery(t).data("ioid",s++),i.observe(t))})}})});let m=e=>!(!jQuery(e).find(".wpmProductId").length&&!jQuery(e).siblings(".wpmProductId").length);e.setCookie=(e,t="",r=null)=>{if(r){let a=new Date;a.setTime(a.getTime()+24*r*60*60*1e3);let o="expires="+a.toUTCString();document.cookie=e+"="+t+";"+o+";path=/"}else document.cookie=e+"="+t+";path=/"},e.getCookie=e=>{let t=e+"=",r=decodeURIComponent(document.cookie).split(";");for(let e=0;e<r.length;e++){let a=r[e];for(;" "==a.charAt(0);)a=a.substring(1);if(0==a.indexOf(t))return a.substring(t.length,a.length)}return""},e.getCookieThatContainsRegex=e=>{let t=document.cookie.split(";");for(let r=0;r<t.length;r++){let a=t[r].trim();if(e.test(a))return a}return!1},e.deleteCookie=t=>{e.setCookie(t,"",-1)},e.storeData=(t,r,a=!1,o=!1)=>{const i=o?t:"";let n=a?e.getPersistentData:e.getSessionData,s=a?e.setPersistentData:e.setSessionData,c=n(i);o?c=r:c[t]=r,s(c,i)},e.retrieveData=(t,r=!1,a=!1)=>{const o=a?t:"";let i=r?e.getPersistentData(o):e.getSessionData(o);return a?i:i[t]},e.deleteDataKey=(t,r=!1,a=!1)=>{const o=a?t:"";let i=r?e.getPersistentData:e.getSessionData,n=r?e.setPersistentData:e.setSessionData,s=i(o);if(a)try{r&&window.localStorage&&window.localStorage.removeItem(e.getPersistentDataKey(o)),!r&&window.sessionStorage&&window.sessionStorage.removeItem(e.getSessionDataKey(o))}catch(e){console.error(e)}else delete s[t],n(s,o)},e.storeCartData=t=>{e.storeData("cart",t,!1,!0)},e.retrieveCartData=()=>e.retrieveData("cart",!1,!0),e.getSessionDataKey=(e="")=>{const t="_pmw_session_data";return e?t+"_"+e:t},e.getPersistentDataKey=e=>{const t="_pmw_persistent_data";return e?t+"_"+e:t},e.getSessionData=(t="")=>{if(window.sessionStorage){let r=window.sessionStorage.getItem(e.getSessionDataKey(t));return null!==r?JSON.parse(r):{}}{let r=e.getCookie(e.getSessionDataKey(t));return""!==r?JSON.parse(r):{}}},e.setSessionData=(t,r="")=>{window.sessionStorage?window.sessionStorage.setItem(e.getSessionDataKey(r),JSON.stringify(t)):e.setCookie(e.getSessionDataKey(r),JSON.stringify(t))},e.getPersistentData=t=>{if(window.localStorage){let r=window.localStorage.getItem(e.getPersistentDataKey(t));return null!==r?JSON.parse(r):{}}{let r=e.getCookie(e.getPersistentDataKey(t));return""!==r?JSON.parse(r):{}}},e.setPersistentData=(t,r="")=>{window.localStorage?window.localStorage.setItem(e.getPersistentDataKey(r),JSON.stringify(t)):e.setCookie(e.getPersistentDataKey(r),JSON.stringify(t),400)},e.storeOrderIdOnServer=async t=>{try{let r;await e.isRestEndpointAvailable()?r=await fetch(e.root+"pmw/v1/pixels-fired/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({order_id:t.orderId,order_key:t.orderKey,source:t.source}),keepalive:!0,cache:"no-cache",redirect:"error"}):(pmw.console.log("REST API not available, falling back to AJAX"),r=await fetch(e.ajax_url,{method:"POST",body:new URLSearchParams({action:"pmw_purchase_pixels_fired",order_id:t.orderId,order_key:t.orderKey,source:t.source}),keepalive:!0,redirect:"error"}));const a=await r.json();a.success?pmw.console.log("",a.data):pmw.console.error("",a.data)}catch(e){console.error(e)}},e.getProductIdByCartItemElement=t=>{const r=jQuery(t).find(".product-remove").find("a").attr("href");if(r)return e.getProductIdByCartItemKeyUrl(new URL(r));const a=jQuery(t).find("[data-product_id]").first().attr("data-product_id");return a||null},e.getProductQuantityByCartItemElement=e=>jQuery(e).find(".qty").val()||null,e.getProductIdByCartItemKeyUrl=e=>{let t,r=new URLSearchParams(e.search).get("remove_item");return t=0===wpmDataLayer.cart_item_keys[r].variation_id?wpmDataLayer.cart_item_keys[r].product_id:wpmDataLayer.cart_item_keys[r].variation_id,t},e.getAddToCartLinkProductIds=()=>jQuery("a").map(function(){let e=jQuery(this).attr("href");if(e&&e.includes("?add-to-cart=")){let t=e.match(/(add-to-cart=)(\d+)/);if(t)return t[2]}}).get(),e.getProductDetailsFormattedForEvent=(e,t=1)=>{if(!wpmDataLayer.products[e])return null;let r={id:e.toString(),dyn_r_ids:wpmDataLayer.products[e].dyn_r_ids,name:wpmDataLayer.products[e].name,list_name:wpmDataLayer.shop.list_name,brand:wpmDataLayer.products[e].brand,category:wpmDataLayer.products[e].category,variant:wpmDataLayer.products[e].variant,list_position:wpmDataLayer.products[e].position,quantity:t,price:wpmDataLayer.products[e].price,currency:wpmDataLayer.shop.currency,is_variable:wpmDataLayer.products[e].is_variable,is_variation:wpmDataLayer.products[e].is_variation,parent_id:wpmDataLayer.products[e].parent_id};return r.is_variation&&(r.parent_id_dyn_r_ids=wpmDataLayer.products[e].parent_id_dyn_r_ids),r},e.getClidFromBrowser=(t="gclid")=>{let r;if(r={gclid:"_gcl_aw",dclid:"_gcl_dc"},e.getCookie(r[t])){return e.getCookie(r[t]).match(/(GCL.[\d]*.)(.*)/)[2]}return""},e.getUserAgent=()=>navigator.userAgent,e.getViewPort=()=>({width:Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}),e.consoleLogVersion=()=>{console.log(wpmDataLayer.version)};const w=new Set;e.loadScriptAndCacheIt=(e,t)=>{if(w.has(e))return pmw.console.log("Script already loaded: "+e),Promise.resolve();const r=e=>new Promise((t,r)=>{if(document.querySelector(`script[src="${e}"]`))return w.add(e),pmw.console.log("Script tag already exists: "+e),void t();const a=document.createElement("script");a.src=e,a.async=!0,a.crossOrigin="anonymous",a.onload=()=>{w.add(e),pmw.console.log("Successfully loaded script: "+e),t()},a.onerror=()=>{a.remove(),r(new Error("Script failed to load: "+e))},document.head.appendChild(a)});return r(e).catch(()=>{if(t)return pmw.console.log("Primary script failed, loading fallback: "+t),r(t);throw new Error("Primary script failed to load, and no fallback URL provided.")}).catch(e=>{if(e.message.includes("fallback"))throw e;throw new Error("Both primary and fallback scripts failed to load.")})},e.getOrderItemPrice=e=>(e.total+e.total_tax)/e.quantity,e.hasLoginEventFired=()=>{let t=e.getSessionData();return t?.loginEventFired},e.setLoginEventFired=()=>{let t=e.getSessionData();t.loginEventFired=!0,e.setSessionData(t)},e.pageLoaded=async()=>new Promise(e=>{!function t(){if("complete"===document.readyState)return e();setTimeout(t,50)}()}),e.pageReady=()=>new Promise(e=>{!function t(){if("interactive"===document.readyState||"complete"===document.readyState)return e();setTimeout(t,50)}()}),e.isMiniCartActive=()=>(window.sessionStorage&&Object.keys(window.sessionStorage).forEach(e=>{if(e.includes("wc_fragments"))return!0}),!1),e.doesWooCommerceCartExist=()=>document.cookie.includes("woocommerce_items_in_cart"),e.urlHasParameter=e=>new URLSearchParams(window.location.search).has(e),e.getUrlParameter=e=>new URLSearchParams(window.location.search).get(e),e.hashAsync=(e,t)=>crypto.subtle.digest(e,new TextEncoder("utf-8").encode(t)).then(e=>Array.prototype.map.call(new Uint8Array(e),e=>("00"+e.toString(16)).slice(-2)).join("")),e.getCartValue=()=>{let e=0;if(wpmDataLayer?.cart)for(const t in wpmDataLayer.cart){let r=wpmDataLayer.cart[t];e+=r.quantity*r.price}return e},e.doesUrlContainPatterns=e=>{for(const t of e)if(new RegExp(t).test(window.location.href))return!0;return!1},e.excludeDomainFromTracking=()=>{let e=["appspot.com","translate.google.com"];return wpmDataLayer?.general?.exclude_domains&&(e=[...e,...wpmDataLayer.general.exclude_domains]),!!e.some(e=>window.location.href.includes(e))&&(console.debug("Pixel Manager: Aborted due to excluded domain"),!0)},e.getRandomEventId=(e=16)=>{let t="";for(;t.length<e;)t+=(Math.random()+1).toString(36).substring(2);return t.substring(0,e)},e.pmwConsoleMessage=()=>{let e="Pixel Manager for WooCommerce: ";e+=wpmDataLayer.version.pro?"pro":"free",e+=" | distro: "+wpmDataLayer.version.distro,"fms"===wpmDataLayer.version.distro&&wpmDataLayer.version.pro&&(e+=" | active license: "+(wpmDataLayer.version.eligible_for_updates?"yes":"no")),e+=" | version: "+wpmDataLayer.version.number,!0===wpmDataLayer.version.show?console.log(e):pmw.console.log(e)},e.canLoadPremiumFeatures=()=>"fms"===wpmDataLayer.version.distro&&wpmDataLayer.version.pro&&wpmDataLayer.version.eligible_for_updates||"wcm"===wpmDataLayer.version.distro;let g=!1;e.triggerPmwDomReadyEvent=()=>{g||("complete"!==document.readyState?(jQuery(()=>{f()}),document.addEventListener("DOMContentLoaded",()=>{f()},!0)):f())};const f=()=>{g||(document.dispatchEvent(new Event("pmw:dom:ready")),g=!0)};e.getEmailFromTarget=t=>{if(t.href){let r=t.href.replace("mailto:","");if(r.indexOf("?")>-1&&(r=r.split("?")[0]),r=r.replace(/\s/g,""),r&&e.isEmail(r))return r}return""},e.sendEventPayloadToServer=t=>{"function"==typeof e.sendEventPayloadToServerPremium&&e.sendEventPayloadToServerPremium(t)},e.waitForPixelsAndTriggerPageView=async()=>new Promise(e=>{if(!wpmDataLayer?.pixels)return pmw.console.error("wpmDataLayer or wpmDataLayer.pixels is not defined, triggering page view event immediately."),document.dispatchEvent(new Event("pmw:page-view")),void e();let t=wpmDataLayer?.general?.server_2_server?.pageview_event_s2s?.pixels||[];if(t=t.filter(e=>wpmDataLayer.pixels[e]),0===t.length)return pmw.console.log("No specific pixels to wait for, triggering page view event."),document.dispatchEvent(new Event("pmw:page-view")),void e();const r=()=>{t.every(e=>!wpmDataLayer.pixels[e]||wpmDataLayer.pixels[e].loaded)?(document.dispatchEvent(new Event("pmw:page-view")),e()):setTimeout(r,100)};r()}),e.isWooCommerceActive=()=>!!wpmDataLayer.shop,e.getProductIdForSpecificPixel=(e,t)=>String(e.dyn_r_ids[wpmDataLayer.pixels[t].dynamic_remarketing.id_type]),e.isInWooCommerceSesssion=()=>{if(wpmDataLayer?.shop?.session_active)return!0;let t=new RegExp("woocommerce_cart_hash");return!!e.getCookieThatContainsRegex(t)},e.isNotInWooCommerceSesssion=()=>!e.isInWooCommerceSesssion(),e.makeFullUrl=e=>(e=e.trim(),/^(http:\/\/|https:\/\/)/.test(e)?e:"https://"+(e=e.replace(/^\/+/,""))),e.registerShowVariationEventListener=()=>{let t=null;jQuery(".single_variation_wrap").on("show_variation",(r,a)=>{try{let r=e.getIdBasedOndVariationsOutputSetting(a.variation_id);if(!r)throw Error("Wasn't able to retrieve a productId");t!==a.variation_id&&(e.triggerViewItemEventPrep(r),t=a.variation_id)}catch(e){console.error(e)}})},e.initializeCommandQueue=()=>{const e=window._pmwq=window._pmwq||[];e.forEach(function(e){if("function"==typeof e)try{e()}catch(e){pmw.console.error("Error executing queued command:",e)}}),e.push=function(e){if("function"==typeof e)try{e()}catch(e){pmw.console.error("Error executing command from queue:",e)}}}}(window.wpm=window.wpm||{},jQuery)},975:()=>{!function(e){e.getConsentContext=function(){const t=e.consent?.categories?.get()||{statistics:!0,marketing:!0,preferences:!0,necessary:!0};return{categories:{statistics:t.statistics,marketing:t.marketing,preferences:t.preferences,necessary:t.necessary},visitor_has_chosen:e.consent?.settings?.get()?.visitorHasChosen??!1,explicit_mode:e.consent?.explicitConsentModeActive?.()??!1}},e.getEventContext=function(){return{timestamp:Math.floor(Date.now()/1e3),url:window.location.href,referrer:e.retrieveData("referrer")?e.makeFullUrl(e.retrieveData("referrer")):document.referrer,user_agent:navigator.userAgent,page_type:wpmDataLayer?.shop?.page_type,user_id:wpmDataLayer?.user?.id?.raw||null,consent:e.getConsentContext()}},e.processEvent=async function(t,r){pmw.console.log(`Processing event: ${t}`,r);try{let a={event:t,event_data:r,pixels:{},context:e.getEventContext()};a=pmw.hooks.applyFilters("pmw_event_payload_pre",a,t);const o=e.pixelRegistry.getActivePixels();for(const r of o){const o=e.pixelRegistry.getAdapter(r);if(o&&"function"==typeof o.adapt)try{let e=await o.adapt(a.event_data,t,a.context);if(!e)continue;e=pmw.hooks.applyFilters(`pmw_pixel_data_${r}`,e,t,a.event_data,a.context),a.pixels[r]=e}catch(e){pmw.console.error(`Error adapting data for ${r}:`,e)}else pmw.console.log(`No adapter found for pixel: ${r}`)}return a=pmw.hooks.applyFilters(`pmw_event_payload_${t}`,a,a.event_data),a=pmw.hooks.applyFilters("pmw_event_payload_post",a,t),await e.dispatchToPixels(a),a}catch(e){throw pmw.console.error(`Error processing event ${t}:`,e),e}},e.dispatchToPixels=async function(t){const r=t.event;if(e.dispatchToBrowserPixels(t),e.dispatchToS2SPixels(t),e.dispatchPublicEvent(t),"purchase"!==r){if(wpmDataLayer?.general?.server_2_server?.active){const a=e.extractS2SData(t);if(Object.keys(a).length>0){const t=e.pixelRegistry.getActiveS2SPixels();pmw.console.log(`S2S enabled pixels for ${r}:`,t),await e.sendEventPayloadToServer(a)}}}else pmw.console.log("Purchase event - skipping browser-to-server transmission (handled server-side only)")},e.dispatchToBrowserPixels=function(t){const r=e.pixelRegistry.getActiveBrowserOnlyPixels();if(0===r.length)return;pmw.console.log(`Dispatching to browser-only pixels for ${t.event}:`,r);const a=t.event.replace(/_/g,"-");jQuery(document).trigger(`pmw:browser:${a}`,t)},e.dispatchToS2SPixels=function(t){if(0===e.pixelRegistry.getActiveS2SPixels().length)return;const r=t.event.replace(/_/g,"-");jQuery(document).trigger(`pmw:s2s:${r}`,t)},e.dispatchPublicEvent=function(e){const t=e.event.replace(/_/g,"-");jQuery(document).trigger(`pmw:event:${t}`,e),pmw.console.log(`Public event dispatched: pmw:event:${t}`,e)},e.extractS2SData=function(t){const r={event:t.event},a=e.pixelRegistry.getActiveS2SPixels();for(const e of a)t.pixels[e]&&(r[e]=t.pixels[e]);return t.event_data?.product&&(r.product=t.event_data.product),r},e.adapters||(e.adapters={}),e.registerAdapter=function(t,r,a={}){r&&"function"==typeof r.adapt?(e.adapters[t]=r,e.pixelCapabilities||(e.pixelCapabilities={}),e.pixelCapabilities[t]={supportsS2S:a.supportsS2S||!1,supportsEventDeduplication:a.supportsEventDeduplication||!1,isActive:a.isActive||null}):pmw.console.error(`Invalid adapter for ${t}: must have an adapt() method`)}}(window.wpm=window.wpm||{},jQuery)}},i={};function n(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return o[e](r,r.exports,n),r.exports}n.m=o,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,n.t=function(r,a){if(1&a&&(r=this(r)),8&a)return r;if("object"==typeof r&&r){if(4&a&&r.__esModule)return r;if(16&a&&"function"==typeof r.then)return r}var o=Object.create(null);n.r(o);var i={};e=e||[null,t({}),t([]),t(t)];for(var s=2&a&&r;("object"==typeof s||"function"==typeof s)&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(e=>i[e]=()=>r[e]);return i.default=()=>r,n.d(o,i),o},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((t,r)=>(n.f[r](e,t),t),[])),n.u=e=>({194:"wc-hooks",264:"deprecated-functions",526:"pixel-facebook",625:"consent-management",671:"pixel-google",818:"pixel-hotjar",968:"consent-api",972:"doofinder-listener"}[e]+"."+{194:"748deb38",264:"9b411c79",526:"8931095e",625:"414e6bb6",671:"cc1e3d76",818:"05256bbc",968:"12d29397",972:"8afb6ac4"}[e]+".chunk.min.js"),n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},a="Pixel Manager for WooCommerce:",n.l=(e,t,o,i)=>{if(r[e])r[e].push(t);else{var s,c;if(void 0!==o)for(var p=document.getElementsByTagName("script"),d=0;d<p.length;d++){var u=p[d];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==a+o){s=u;break}}s||(c=!0,(s=document.createElement("script")).charset="utf-8",n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",a+o),s.src=e),r[e]=[t];var l=(t,a)=>{s.onerror=s.onload=null,clearTimeout(m);var o=r[e];if(delete r[e],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach(e=>e(a)),t)return t(a)},m=setTimeout(l.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=l.bind(null,s.onerror),s.onload=l.bind(null,s.onload),c&&document.head.appendChild(s)}},n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var a=r.length-1;a>-1&&(!e||!/^http(s?):/.test(e));)e=r[a--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{var e={792:0};n.f.j=(t,r)=>{var a=n.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else{var o=new Promise((r,o)=>a=e[t]=[r,o]);r.push(a[2]=o);var i=n.p+n.u(t),s=new Error;n.l(i,r=>{if(n.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var o=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",s.name="ChunkLoadError",s.type=o,s.request=i,a[1](s)}},"chunk-"+t,t)}};var t=(t,r)=>{var a,o,[i,s,c]=r,p=0;if(i.some(t=>0!==e[t])){for(a in s)n.o(s,a)&&(n.m[a]=s[a]);if(c)c(n)}for(t&&t(r);p<i.length;p++)o=i[p],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0},r=self.webpackChunkPixel_Manager_for_WooCommerce=self.webpackChunkPixel_Manager_for_WooCommerce||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();(async()=>{if(n(263),n(547),await wpm.jQueryExists(),await wpm.wpmDataLayerFullyLoaded(),wpmDataLayer?.general?.chunk_base_path&&(n.p=wpmDataLayer.general.chunk_base_path),n(189),n(510),n(256),n(975),wpm.initializeCommandQueue(),wpm.pmwConsoleMessage(),await wpm.loadConsentModule(),await wpm.consent.load(),jQuery(()=>{n(722)}),n(196),n.e(972).then(n.t.bind(n,282,23)),wpm.loadWcHooksFunctions(),wpm.excludeDomainFromTracking())return;const e=[];if(wpmDataLayer?.pixels?.google&&e.push(n.e(671).then(n.t.bind(n,62,23))),wpmDataLayer?.pixels?.facebook&&e.push(n.e(526).then(n.t.bind(n,767,23))),wpmDataLayer?.pixels?.hotjar&&e.push(n.e(818).then(n.t.bind(n,155,23))),await Promise.all(e),!1!==wpmDataLayer?.general?.modules?.load_deprecated_functions){const{loadDeprecatedFunctions:e}=await n.e(264).then(n.bind(n,549));e()}document.dispatchEvent(new Event("pmw:load-pixels")),document.dispatchEvent(new Event("wpmLoad")),await wpm.pageLoaded(),document.dispatchEvent(new Event("pmw:ready")),wpm.triggerPmwDomReadyEvent(),wpm.checkLibraryVersion()})()})();
!function(){jQuery(window).load(function(){jQuery(".storefront-product-section:not(.storefront-product-categories)").first().before('<ul class="tabs"></ul>'),jQuery('.storefront-product-section:not(".storefront-product-categories"):not(".storefront-reviews"):not(".storefront-blog"):not(".storefront-homepage-contact-section") .section-title').each(function(a){var b=jQuery(this);b.attr("section"),jQuery("ul.tabs").append('<li class="'+b.html().toLowerCase()+'"><a href="#section'+a+'">'+b.html()+"</a></li>")}),jQuery('.storefront-product-section:not(".storefront-product-categories"):not(".storefront-reviews"):not(".storefront-blog"):not(".storefront-homepage-contact-section") .section-title').hide(),jQuery("ul.tabs li:first-child a").addClass("active"),jQuery('.storefront-product-section:not(".storefront-product-categories"):not(".storefront-reviews"):not(".storefront-blog"):not(".storefront-homepage-contact-section")').each(function(a){jQuery(this).attr("id","section"),jQuery(this).attr("id","section"+a)}),jQuery('.storefront-product-section:not(".storefront-product-categories"):not(".storefront-reviews"):not(".storefront-blog"):not(".storefront-homepage-contact-section")').hide(),jQuery('.storefront-product-section:not(".storefront-product-categories"):not(".storefront-reviews"):not(".storefront-blog"):not(".storefront-homepage-contact-section"):first').show(),jQuery(".tabs li").click(function(a){a.preventDefault(),jQuery(".tabs li a").removeClass("active"),jQuery(this).find("a").addClass("active"),jQuery('.storefront-product-section:not(".storefront-product-categories"):not(".storefront-reviews"):not(".storefront-blog"):not(".storefront-homepage-contact-section")').hide();var b=jQuery(this).index();jQuery('.storefront-product-section:not(".storefront-product-categories"):eq('+b+")").fadeIn()})})}();
var WPMLCore=WPMLCore||{};
WPMLCore.XdomainData=function(){
this.links=document.querySelectorAll('.' + wpml_xdomain_data.css_selector + ' a');
var self=this;
for(var i=0; i < this.links.length; i++){
this.links[i].addEventListener('click', function(e){
var link=self.getClosestLink(e.target);
var currentUrl=window.location.href;
var targetUrl=link.getAttribute('href');
if('#'!==targetUrl&&currentUrl!==targetUrl){
e.preventDefault();
self.onLinkClick(link);
}});
}};
WPMLCore.XdomainData.prototype={
getClosestLink: function(maybeLink){
var tagName=maybeLink.nodeName.toLowerCase();
if(tagName==='a'){
return maybeLink;
}
return this.getClosestLink(maybeLink.parentNode);
},
onLinkClick: function(link){
var self=this;
var originalUrl=link.getAttribute('href');
originalUrl=originalUrl.replace(/&xdomain_data(=[^&]*)?(?=&|$)|xdomain_data(=[^&]*)?(&|$)/, '');
originalUrl=originalUrl.replace(/\?$/, '');
var data={
action:        'switching_language',
from_language: wpml_xdomain_data.current_language,
_nonce:        wpml_xdomain_data._nonce,
};
var params=[];
for(var prop in data){
if(typeof data[prop]!=='undefined'){
params.push(encodeURIComponent(prop) + '=' + encodeURIComponent(data[prop]));
}}
params=params.join('&', params);
var req=new XMLHttpRequest();
req.open("POST", wpml_xdomain_data.ajax_url);
req.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
req.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
req.setRequestHeader('Accept', 'application/json, text/javascript, */*; q=0.01');
req.onload=function(){
const response=JSON.parse(req.response);
self.onSuccess(response, originalUrl);
};
req.onerror=function(){
location.href=originalUrl;
};
req.send(params);
},
onSuccess: function(response, originalUrl){
var argsGlue;
var url;
var hash;
var urlSplit;
var xdomain;
var form;
if(response.data.xdomain_data){
if(response.success){
if('post'===response.data.method){
form=document.createElement('form');
form.setAttribute('method', 'post');
form.setAttribute('action', originalUrl);
xdomain=document.createElement('input');
xdomain.setAttribute('type', 'hidden');
xdomain.setAttribute('name', 'xdomain_data');
xdomain.setAttribute('value', response.data.xdomain_data);
form.appendChild(xdomain);
document.body.appendChild(form);
form.submit();
}else{
urlSplit=originalUrl.split('#');
hash='';
if(1 < urlSplit.length){
hash='#' + urlSplit[1];
}
url=urlSplit[0];
if(url.indexOf('?')===-1){argsGlue='?';}else{argsGlue='&';}
/** @namespace response.data.xdomain_data */
url=originalUrl + argsGlue + 'xdomain_data=' + response.data.xdomain_data + hash;
location.href=url;
}}else{
url=originalUrl;
location.href=url;
}}else{
location.href=originalUrl;
}},
};
document.addEventListener('DOMContentLoaded', function(){
var xd=new WPMLCore.XdomainData();
});