/**handles:events-manager-woocommerce,wc-cart-fragments,jquery-numerator,pa-countdown**/ jQuery(document).on("em_booking_complete",function(e,r){jQuery(".em-wc-booking-message").remove();var o=jQuery(".em-booking-message").removeClass("em-booking-message").addClass("em-wc-booking-message").attr("role","alert");r.result&&void 0===r.redirect?(o.addClass("woocommerce-message"),jQuery(document.body).trigger("wc_fragment_refresh"),jQuery(".em-booking-message-success").removeClass("em-booking-message-success")):r.result||(o.addClass("woocommerce-error"),jQuery(".em-booking-message-error").removeClass("em-booking-message-error"))}),jQuery(document).on("click","a.em-addtocart-button",function(e){e.preventDefault();var r=jQuery(this);return r.text()!=EM.bb_booked&&jQuery(this).text()!=EM.bb_booking&&(r.text(EM.wc_button_adding),jQuery.ajax({url:EM.ajaxurl,dataType:"jsonp",data:{event_id:r.data("event-id"),_wpnonce:r.data("nonce"),action:"add_booking_to_cart"},success:function(e){e.result?(r.text(EM.wc_button_added),jQuery(document.body).trigger("wc_fragment_refresh")):(r.text(EM.bb_error),""!=e.message&&alert(e.message)),jQuery(document).triggerHandler("em_add_to_cart_button_response",[e,r])},error:function(){r.text(EM.bb_error)}})),!1}); 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(d0?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()})}); !function(t){"use strict";if("function"==typeof define&&define.amd)define(["jquery"],t);else if("object"==typeof exports)t(require("jquery"));else{if("undefined"==typeof jQuery)throw"jquery-numerator requires jQuery to be loaded first";t(jQuery)}}(function(t){function e(e,s){this.element=e,this.settings=t.extend({},i,s),this._defaults=i,this._name=n,this.init()}var n="numerator",i={easing:"swing",duration:500,delimiter:void 0,rounding:0,toValue:void 0,fromValue:void 0,queue:!1,onStart:function(){},onStep:function(){},onProgress:function(){},onComplete:function(){}};e.prototype={init:function(){this.parseElement(),this.setValue()},parseElement:function(){var e=t.trim(t(this.element).text());this.settings.fromValue=this.settings.fromValue||this.format(e)},setValue:function(){var e=this;t({value:e.settings.fromValue}).animate({value:e.settings.toValue},{duration:parseInt(e.settings.duration,10),easing:e.settings.easing,start:e.settings.onStart,step:function(n,i){t(e.element).text(e.format(n)),e.settings.onStep(n,i)},progress:e.settings.onProgress,complete:e.settings.onComplete})},format:function(t){var e=this;return t=parseInt(this.settings.rounding)<1?parseInt(t,10):parseFloat(t).toFixed(parseInt(this.settings.rounding)),e.settings.delimiter?this.delimit(t):t},delimit:function(t){var e=this;if(t=t.toString(),e.settings.rounding&&parseInt(e.settings.rounding,10)>0){var n=t.substring(t.length-(e.settings.rounding+1),t.length),i=t.substring(0,t.length-(e.settings.rounding+1));return e.addDelimiter(i)+n}return e.addDelimiter(t)},addDelimiter:function(t){return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.settings.delimiter)}},t.fn[n]=function(i){return this.each(function(){t.data(this,"plugin_"+n)&&t.data(this,"plugin_"+n,null),t.data(this,"plugin_"+n,new e(this,i))})}}); !function($){var a=!1;function camelCase(t){return t.replace(/-([a-z])/g,function(t,n){return n.toUpperCase()})}window.JQClass=function(){},JQClass.classes={},JQClass.extend=function t(n){var s=this.prototype;a=!0;var e=new this;for(var i in a=!1,n)e[i]="function"==typeof n[i]&&"function"==typeof s[i]?function(e,i){return function(){var t=this._super;this._super=function(t){return s[e].apply(this,t)};var n=i.apply(this,arguments);return this._super=t,n}}(i,n[i]):n[i];function o(){!a&&this._init&&this._init.apply(this,arguments)}return((o.prototype=e).constructor=o).extend=t,o},JQClass.classes.JQPlugin=JQClass.extend({name:"plugin",defaultOptions:{},regionalOptions:{},_getters:[],_getMarker:function(){return"is-"+this.name},_init:function(){$.extend(this.defaultOptions,this.regionalOptions&&this.regionalOptions[""]||{});var e=camelCase(this.name);$[e]=this,$.fn[e]=function(t){var n=Array.prototype.slice.call(arguments,1);return $[e]._isNotChained(t,n)?$[e][t].apply($[e],[this[0]].concat(n)):this.each(function(){if("string"==typeof t){if("_"===t[0]||!$[e][t])throw"Unknown method: "+t;$[e][t].apply($[e],[this].concat(n))}else $[e]._attach(this,t)})}},setDefaults:function(t){$.extend(this.defaultOptions,t||{})},_isNotChained:function(t,n){return"option"===t&&(0===n.length||1===n.length&&"string"==typeof n[0])||-1<$.inArray(t,this._getters)},_attach:function(t,n){if(!(t=$(t)).hasClass(this._getMarker())){t.addClass(this._getMarker()),n=$.extend({},this.defaultOptions,this._getMetadata(t),n||{});var e=$.extend({name:this.name,elem:t,options:n},this._instSettings(t,n));t.data(this.name,e),this._postAttach(t,e),this.option(t,n)}},_instSettings:function(t,n){return{}},_postAttach:function(t,n){},_getMetadata:function(d){try{var f=d.data(this.name.toLowerCase())||"";for(var g in f=f.replace(/'/g,'"'),f=f.replace(/([a-zA-Z0-9]+):/g,function(t,n,e){var i=f.substring(0,e).match(/"/g);return i&&i.length%2!=0?n+":":'"'+n+'":'}),f=$.parseJSON("{"+f+"}"),f){var h=f[g];"string"==typeof h&&h.match(/^new Date\((.*)\)$/)&&(f[g]=eval(h))}return f}catch(t){return{}}},_getInst:function(t){return $(t).data(this.name)||{}},option:function(t,n,e){var i=(t=$(t)).data(this.name);if(!n||"string"==typeof n&&null==e)return(s=(i||{}).options)&&n?s[n]:s;if(t.hasClass(this._getMarker())){var s=n||{};"string"==typeof n&&((s={})[n]=e),this._optionsChanged(t,i,s),$.extend(i.options,s)}},_optionsChanged:function(t,n,e){},destroy:function(t){(t=$(t)).hasClass(this._getMarker())&&(this._preDestroy(t,this._getInst(t)),t.removeData(this.name).removeClass(this._getMarker()))},_preDestroy:function(t,n){}}),$.JQPlugin={createPlugin:function(t,n){"object"==typeof t&&(n=t,t="JQPlugin"),t=camelCase(t);var e=camelCase(n.name);JQClass.classes[e]=JQClass.classes[t].extend(n),new JQClass.classes[e]}}}(jQuery),function(m){"use strict";var t="countdown";m.JQPlugin.createPlugin({name:t,defaultOptions:{until:null,since:null,timezone:null,serverSync:null,format:"dHMS",layout:"",compact:!1,significant:0,description:"",expiryUrl:"",expiryText:"",alwaysExpire:!1,onExpiry:null,onTick:null,tickInterval:1,style:null,circleStrokeWidth:4,unitsInside:!1,unitsPos:"block",$countDown:null},regionalOptions:{"":{labels:premiumCountDownStrings.plural,labels1:premiumCountDownStrings.single,compactLabels:["y","m","w","d"],whichLabels:null,digits:["0","1","2","3","4","5","6","7","8","9"],timeSeparator:":",isRTL:!1}},_rtlClass:t+"-rtl",_sectionClass:t+"-section",_amountClass:t+"-amount",_periodClass:t+"-period",_rowClass:t+"-row",_holdingClass:t+"-holding",_showClass:t+"-show",_descrClass:t+"-descr",_timerElems:[],increment:0,_init:function(){var i=this;this._super(),this._serverSyncs=[];var s="function"==typeof Date.now?Date.now:function(){return(new Date).getTime()},o=window.performance&&"function"==typeof window.performance.now;var a=s();requestAnimationFrame(function t(n){var e=n<1e12?o?window.performance.now()+window.performance.timing.navigationStart:s():n||s();1e3<=e-a&&(i._updateElems(),a=e),requestAnimationFrame(t)})},UTCDate:function(t,n,e,i,s,o,a,r){"object"==typeof n&&n instanceof Date&&(r=n.getMilliseconds(),a=n.getSeconds(),o=n.getMinutes(),s=n.getHours(),i=n.getDate(),e=n.getMonth(),n=n.getFullYear());var l=new Date;return l.setUTCFullYear(n),l.setUTCDate(1),l.setUTCMonth(e||0),l.setUTCDate(i||1),l.setUTCHours(s||0),l.setUTCMinutes((o||0)-(Math.abs(t)<30?60*t:t)),l.setUTCSeconds(a||0),l.setUTCMilliseconds(r||0),l},periodsToSeconds:function(t){return 31557600*t[0]+2629800*t[1]+604800*t[2]+86400*t[3]+3600*t[4]+60*t[5]+t[6]},_instSettings:function(t,n){return{_periods:[0,0,0,0,0,0,0]}},_addElem:function(t){this._hasElem(t)||this._timerElems.push(t)},_hasElem:function(t){return-1")),this._resetExtraLabels(n.options,e);var i=n.options.timezone!==e.timezone;m.extend(n.options,e),this._adjustSettings(t,n,!this._eqNull(e.until)||!this._eqNull(e.since)||i);var s=new Date;(n._since&&n._sinces)&&this._addElem(t[0]),this._updateCountdown(t,n)},_updateCountdown:function(t,n){t=t.jquery?t:m(t),n=n||this._getInst(t);if(n){if(this._generateHTML(n,t),t.toggleClass(this._rtlClass,n.options.isRTL),"pause"!==n._hold&&m.isFunction(n.options.onTick)){var e=n._periods;1===n.options.tickInterval||(this.periodsToSeconds(e),n.options.tickInterval)}if("pause"!==n._hold&&(n._since?n._now.getTime()=n._until.getTime())&&!n._expiring){if(n._expiring=!0,this._hasElem(t[0])||n.options.alwaysExpire){if(this._removeElem(t[0]),m.isFunction(n.options.onExpiry)&&n.options.onExpiry.apply(t[0],[]),n.options.expiryText){var i=n.options.layout;n.options.layout=n.options.expiryText,this._updateCountdown(t[0],n),n.options.layout=i}n.options.expiryUrl&&(window.location=n.options.expiryUrl)}n._expiring=!1}}},_resetExtraLabels:function(t,n){var e=null;for(e in n)e.match(/[Ll]abels[02-9]|compactLabels1/)&&(t[e]=n[e]);for(e in t)e.match(/[Ll]abels[02-9]|compactLabels1/)&&void 0===n[e]&&(t[e]=null)},_eqNull:function(t){return null==t},_adjustSettings:function(t,n,e){for(var i=null,s=0;s'+this.showFull(t,o,0)+this.showFull(t,o,1)+this.showFull(t,o,2)+this.showFull(t,o,3)+this.showFull(t,o,4)+this.showFull(t,o,5)+this.showFull(t,o,6)+"",n.html(l),"block"===t.options.unitsPos){var c=t.options.$countDown.find(".countdown-amount").outerWidth()||100;t.options.$countDown.find(".countdown-period span").css("width",c)}u=!1}else this.updateCountDownValues(t,o,n);setTimeout(function(){t.options.$countDown.removeClass("premium-addons__v-hidden")},1e3)},showFull:function(t,n,e){var i=this;if("circle"===t.options.style)var s=this._mapNumbers(t._periods);return!t.options.significant&&n[e]||t.options.significant&&showSignificant[e]?'
'+i._minDigits(t,t._periods[e],2)+""+(t.options.unitsInside?i.getLabel(t,e):"")+("circle"===t.options.style?'
':"")+"
"+(""!==t.options.timeSeparator?'
'+t.options.timeSeparator+"
":"")+"
"+(t.options.unitsInside?"":i.getLabel(t,e))+"
":""},updateCountDownValues:function(s,o,a){var r=this;s._periods.map(function(t,n){if(!s.options.significant&&o[n]||s.options.significant&&showSignificant[n]){var e=r._minDigits(s,s._periods[n],2),i=a.find(".countdown-section-"+n).find(".countdown-amount > span").text();e!==i&&("rotate"===s.options.style?a.find(".countdown-section-"+n).find(".countdown-amount > span").prop({deg:0}).animate({deg:90},{duration:450,step:function(t){a.find(".countdown-section-"+n).find(".countdown-amount > span").css({transform:"rotateY("+t+"deg)"})},complete:function(){a.find(".countdown-section-"+n).find(".countdown-amount > span").text(e),a.find(".countdown-section-"+n).find(".countdown-amount > span").prop({deg2:0}).animate({deg2:90},{duration:450,step:function(t){a.find(".countdown-section-"+n).find(".countdown-amount > span").css({transform:"rotateY("+(t-90)+"deg)"})}})}}):a.find(".countdown-section-"+n).find(".countdown-amount > span").text(e))}})},getLabel:function(t,n){var e=t.options.labels,i=t.options.whichLabels||this._normalLabels,s=t.options["labels"+i(t._periods[n])];return'
'+(s?s[n]:e[n])+"
"},_polarToCartesian:function(t,n,e,i){var s=(i-90)*Math.PI/180;return{x:t+e*Math.cos(s),y:n+e*Math.sin(s)}},_buildCirclePath:function(t,n,e){var i=t.options.$countDown.find(".countdown-amount").outerWidth()||100,s=i/2,o=i/2,a=s-t.options.circleStrokeWidth/2,r=this._polarToCartesian(s,o,a,e),l=this._polarToCartesian(s,o,a,n),u=e-n<=180?"0":"1";return["M",r.x,r.y,"A",a,a,0,u,0,l.x,l.y].join(" ")},_mapNumbers:function(i){var s=[],o=[365,12,30,30,24,60,60];return i.map(function(t,n){i[n]>o[n]&&(o[n]=3*o[n]);var e=360*(t-o[n])/(0-o[n]);s.push(e)}),s},_buildLayout:function(e,t,n,i,s,o){for(var a=e.options[i?"compactLabels":"labels"],r=e.options.whichLabels||this._normalLabels,l=function(t){return(e.options[(i?"compactLabels":"labels")+r(e._periods[t])]||a)[t]},u=function(t,n){return e.options.digits[Math.floor(t/n)%10]},c={desc:e.options.description,sep:e.options.timeSeparator,yl:l(0),yn:this._minDigits(e,e._periods[0],1),ynn:this._minDigits(e,e._periods[0],2),ynnn:this._minDigits(e,e._periods[0],3),y1:u(e._periods[0],1),y10:u(e._periods[0],10),y100:u(e._periods[0],100),y1000:u(e._periods[0],1e3),ol:l(1),on:this._minDigits(e,e._periods[1],1),onn:this._minDigits(e,e._periods[1],2),onnn:this._minDigits(e,e._periods[1],3),o1:u(e._periods[1],1),o10:u(e._periods[1],10),o100:u(e._periods[1],100),o1000:u(e._periods[1],1e3),wl:l(2),wn:this._minDigits(e,e._periods[2],1),wnn:this._minDigits(e,e._periods[2],2),wnnn:this._minDigits(e,e._periods[2],3),w1:u(e._periods[2],1),w10:u(e._periods[2],10),w100:u(e._periods[2],100),w1000:u(e._periods[2],1e3),dl:l(3),dn:this._minDigits(e,e._periods[3],1),dnn:this._minDigits(e,e._periods[3],2),dnnn:this._minDigits(e,e._periods[3],3),d1:u(e._periods[3],1),d10:u(e._periods[3],10),d100:u(e._periods[3],100),d1000:u(e._periods[3],1e3),hl:l(4),hn:this._minDigits(e,e._periods[4],1),hnn:this._minDigits(e,e._periods[4],2),hnnn:this._minDigits(e,e._periods[4],3),h1:u(e._periods[4],1),h10:u(e._periods[4],10),h100:u(e._periods[4],100),h1000:u(e._periods[4],1e3),ml:l(5),mn:this._minDigits(e,e._periods[5],1),mnn:this._minDigits(e,e._periods[5],2),mnnn:this._minDigits(e,e._periods[5],3),m1:u(e._periods[5],1),m10:u(e._periods[5],10),m100:u(e._periods[5],100),m1000:u(e._periods[5],1e3),sl:l(6),sn:this._minDigits(e,e._periods[6],1),snn:this._minDigits(e,e._periods[6],2),snnn:this._minDigits(e,e._periods[6],3),s1:u(e._periods[6],1),s10:u(e._periods[6],10),s100:u(e._periods[6],100),s1000:u(e._periods[6],1e3)},p=n,d=0;d<=6;d++){var h="yowdhms".charAt(d),_=new RegExp("\\{"+h+"<\\}([\\s\\S]*)\\{"+h+">\\}","g");p=p.replace(_,!s&&t[d]||s&&o[d]?"$1":"")}return m.each(c,function(t,n){var e=new RegExp("\\{"+t+"\\}","g");p=p.replace(e,n)}),p},_minDigits:function(t,n,e){return(n=""+n).length>=e?this._translateDigits(t,n):(n="0000000000"+n,this._translateDigits(t,n.substr(n.length-e)))},_translateDigits:function(n,t){return(""+t).replace(/[0-9]/g,function(t){return n.options.digits[t]})},_determineShow:function(t){var n=t.options.format,e=[];return e[0]=n.match("y")?"?":n.match("Y")?"!":null,e[1]=n.match("o")?"?":n.match("O")?"!":null,e[2]=n.match("w")?"?":n.match("W")?"!":null,e[3]=n.match("d")?"?":n.match("D")?"!":null,e[4]=n.match("h")?"?":n.match("H")?"!":null,e[5]=n.match("m")?"?":n.match("M")?"!":null,e[6]=n.match("s")?"?":n.match("S")?"!":null,e},_calculatePeriods:function(t,e,n,i){t._now=i,t._now.setMilliseconds(0);var s=new Date(t._now.getTime());t._since?i.getTime()t._until.getTime()&&(t._now=i=s));var o=[0,0,0,0,0,0,0];if(e[0]||e[1]){var a=this._getDaysInMonth(i.getFullYear(),i.getMonth()),r=this._getDaysInMonth(s.getFullYear(),s.getMonth()),l=s.getDate()===i.getDate()||s.getDate()>=Math.min(a,r)&&i.getDate()>=Math.min(a,r),u=function(t){return 60*(60*t.getHours()+t.getMinutes())+t.getSeconds()},c=Math.max(0,12*(s.getFullYear()-i.getFullYear())+s.getMonth()-i.getMonth()+(s.getDate()d&&i.setDate(d),i.setFullYear(i.getFullYear()+o[0]),i.setMonth(i.getMonth()+o[1]),p&&i.setDate(d)}function h(t,n){o[t]=e[t]?Math.floor(_/n):0,_-=o[t]*n}var _=Math.floor((s.getTime()-i.getTime())/1e3),m=null;if(h(2,604800),h(3,86400),h(4,3600),h(5,60),h(6,1),0<_&&!t._since){var g=[1,12,4.3482,7,24,60,60],f=6,w=1;for(m=6;0<=m;m--)e[m]&&(o[f]>=w&&(o[f]=0,_=1),0<_&&(o[m]++,_=0,f=m,w=1)),w*=g[m]}if(n)for(m=0;m<=6;m++)n&&o[m]?n--:n||(o[m]=0);return o}})}(jQuery);