!function(){function t(){if(this.complete){const e=this.getAttribute("data-lazy-src");if(e&&this.src!==e)return void this.addEventListener("onload",t);const n=this.width,d=this.height;n&&n>0&&d&&d>0&&(this.setAttribute("width",n),this.setAttribute("height",d),i(this))}else this.addEventListener("onload",t)}var e=function(){const e=document.querySelectorAll("img[data-recalc-dims]");for(let i=0;i0?(poll_answer_id=o(this).val()+","+poll_answer_id,poll_multiple_ans_count++):poll_answer_id=parseInt(o(this).val()))}),poll_multiple_ans>0?poll_multiple_ans_count>0&&poll_multiple_ans_count<=poll_multiple_ans?(poll_answer_id=poll_answer_id.substring(0,poll_answer_id.length-1),poll_process(l,poll_answer_id)):0==poll_multiple_ans_count?alert(pollsL10n.text_valid):alert(pollsL10n.text_multiple+" "+poll_multiple_ans):poll_answer_id>0?poll_process(l,poll_answer_id):alert(pollsL10n.text_valid)})}function poll_process(l,o){jQuery(document).ready(function(s){poll_nonce=s("#poll_"+l+"_nonce").val(),pollsL10n.show_fading?(s("#polls-"+l).fadeTo("def",0),pollsL10n.show_loading&&s("#polls-"+l+"-loading").show(),s.ajax({type:"POST",xhrFields:{withCredentials:!0},url:pollsL10n.ajax_url,data:"action=polls&view=process&poll_id="+l+"&poll_"+l+"="+o+"&poll_"+l+"_nonce="+poll_nonce,cache:!1,success:poll_process_success(l)})):(pollsL10n.show_loading&&s("#polls-"+l+"-loading").show(),s.ajax({type:"POST",xhrFields:{withCredentials:!0},url:pollsL10n.ajax_url,data:"action=polls&view=process&poll_id="+l+"&poll_"+l+"="+o+"&poll_"+l+"_nonce="+poll_nonce,cache:!1,success:poll_process_success(l)}))})}function poll_result(l){jQuery(document).ready(function(o){poll_nonce=o("#poll_"+l+"_nonce").val(),pollsL10n.show_fading?(o("#polls-"+l).fadeTo("def",0),pollsL10n.show_loading&&o("#polls-"+l+"-loading").show(),o.ajax({type:"POST",xhrFields:{withCredentials:!0},url:pollsL10n.ajax_url,data:"action=polls&view=result&poll_id="+l+"&poll_"+l+"_nonce="+poll_nonce,cache:!1,success:poll_process_success(l)})):(pollsL10n.show_loading&&o("#polls-"+l+"-loading").show(),o.ajax({type:"POST",xhrFields:{withCredentials:!0},url:pollsL10n.ajax_url,data:"action=polls&view=result&poll_id="+l+"&poll_"+l+"_nonce="+poll_nonce,cache:!1,success:poll_process_success(l)}))})}function poll_booth(l){jQuery(document).ready(function(o){poll_nonce=o("#poll_"+l+"_nonce").val(),pollsL10n.show_fading?(o("#polls-"+l).fadeTo("def",0),pollsL10n.show_loading&&o("#polls-"+l+"-loading").show(),o.ajax({type:"POST",xhrFields:{withCredentials:!0},url:pollsL10n.ajax_url,data:"action=polls&view=booth&poll_id="+l+"&poll_"+l+"_nonce="+poll_nonce,cache:!1,success:poll_process_success(l)})):(pollsL10n.show_loading&&o("#polls-"+l+"-loading").show(),o.ajax({type:"POST",xhrFields:{withCredentials:!0},url:pollsL10n.ajax_url,data:"action=polls&view=booth&poll_id="+l+"&poll_"+l+"_nonce="+poll_nonce,cache:!1,success:poll_process_success(l)}))})}function poll_process_success(l){return function(o){jQuery(document).ready(function(s){s("#polls-"+l).replaceWith(o),pollsL10n.show_loading&&s("#polls-"+l+"-loading").hide(),pollsL10n.show_fading&&s("#polls-"+l).fadeTo("def",1)})}}pollsL10n.show_loading=parseInt(pollsL10n.show_loading),pollsL10n.show_fading=parseInt(pollsL10n.show_fading);; !function($){"use strict";(new function(){var e=this;this.init=function(){window.ppFormRecaptchaLoadCallback=this.recaptcha_processing,$(".pp-del-profile-avatar").on("click",this.delete_avatar),$(".pp-del-cover-image").on("click",this.delete_profile_image_cover),$(document).on("click",".has-password-visibility-icon .pp-form-material-icons",this.toggle_password_visibility),$(document.body).on("click","a.showlogin",(function(){$(".pp_wc_login").slideToggle()})),$(window).on("load resize ppress_updated_checkout",(function(){e.defaultUserProfileResponsive()})),$(document).on("click",".ppress-confirm-delete",(function(e){e.preventDefault(),confirm(pp_ajax_form.confirm_delete)&&(window.location.href=$(this).attr("href"))})),"true"!==pp_ajax_form.disable_ajax_form&&($(document).on("submit",'form[data-pp-form-submit="login"]',this.ajax_login),$(document).on("submit",'form[data-pp-form-submit="signup"]',this.ajax_registration),$(document).on("submit",'form[data-pp-form-submit="passwordreset"]',this.ajax_password_reset),$(document).on("submit",'form[data-pp-form-submit="editprofile"]',this.ajax_edit_profile),this.myaccount_password_strength_meter())},this.recaptcha_processing=function(){$(".pp-g-recaptcha").each((function(s,t){var r=$(t).attr("data-sitekey"),o=$(this).parents(".pp-form-container").find("form");if("v3"===$(t).attr("data-type"))o.find("input.pp-submit-form").on("click",(function(s){s.preventDefault(),e._add_processing_label(o),grecaptcha.ready((function(){grecaptcha.execute(r,{action:"form"}).then((function(e){o.find('[name="g-recaptcha-response"]').remove(),o.append($("",{type:"hidden",value:e,name:"g-recaptcha-response"})),o.submit()}))}))}));else{var a=grecaptcha.render(t,{sitekey:r,theme:$(t).attr("data-theme"),size:$(t).attr("data-size")});o.on("pp_form_submitted",(function(){grecaptcha.reset(a)})),$(document).on("ppress_process_checkout_success_callback ppress_process_checkout_error_callback",(function(){grecaptcha.reset(a)}))}}))},this.toggle_password_visibility=function(e){e.preventDefault();var s=$(this).parents(".pp-form-field-input-textarea-wrap").find(".pp-form-field");"password"===s.attr("type")?(s.attr("type","text"),$(this).text("visibility_off")):(s.attr("type","password"),$(this).text("visibility"))},this.ajax_edit_profile=function(s){if(void 0!==window.FormData&&window.FormData){s.preventDefault();var t=$('form[data-pp-form-submit="editprofile"]'),r=e.get_melange_id(t),o=new FormData(this);o.append("action","pp_ajax_editprofile"),o.append("nonce",pp_ajax_form.nonce),o.append("melange_id",r),$(".profilepress-edit-profile-status").remove(),$(".profilepress-edit-profile-success").remove(),""!==window.edit_profile_msg_class&&$("."+window.edit_profile_msg_class).remove(),e._add_processing_label(t),$.post({url:pp_ajax_form.ajaxurl,data:o,cache:!1,contentType:!1,enctype:"multipart/form-data",processData:!1,dataType:"json",success:function(s){t.trigger("pp_form_submitted"),t.trigger("pp_form_edit_profile_success",[t]),"avatar_url"in s&&""!==s.avatar_url&&($("img[data-del='avatar'], img.pp-user-avatar").attr("src",s.avatar_url),$("input[name=eup_avatar]",t).val("")),"cover_image_url"in s&&""!==s.cover_image_url&&($("img[data-del='cover-image'], img.pp-user-cover-image").attr("src",s.cover_image_url),$("input[name=eup_cover_image]",t).val(""),$(".profilepress-myaccount-has-cover-image",t).show(),$(".profilepress-myaccount-cover-image-empty",t).hide()),"message"in s&&(window.edit_profile_msg_class=$(s.message).attr("class"),t.before(s.message)),"redirect"in s&&(t.trigger("pp_edit_profile_success_before_redirect"),window.location.assign(s.redirect)),e._remove_processing_label(t)}},"json")}},this.ajax_password_reset=function(s){s.preventDefault();var t=$(this),r=e.get_melange_id(t),o="true"===t.find('input[name="is-pp-tab-widget"]').val(),a={action:"pp_ajax_passwordreset",data:$(this).serialize()+"&melange_id="+r};e._remove_status_notice(),t.parents(".pp-tab-widget-form").prev(".pp-tab-status").remove(),e._add_processing_label(t),$.post(pp_ajax_form.ajaxurl,a,(function(s){if(t.trigger("pp_form_submitted"),"object"!=typeof s)return e._remove_processing_label(t);if("message"in s){if(t.trigger("pp_password_reset_status"),o){var r=s.message.replace("profilepress-reset-status","pp-tab-status");t.parents(".pp-tab-widget-form").before(r)}else t.parents(".lucidContainer").length>0?t.parents(".lucidContainer").before(s.message):t.before(s.message);"status"in s&&!0===s.status&&t.hide(),$('input[name="user_login"]',t).val("")}e._remove_processing_label(t)}),"json")},this.ajax_registration=function(s){if(void 0!==window.FormData&&window.FormData){s.preventDefault();var t=$(this),r=e.get_melange_id(t),o=new FormData(this),a="true"===t.find('input[name="is-pp-tab-widget"]').val();o.append("action","pp_ajax_signup"),o.append("melange_id",r),e._remove_status_notice(),t.parents(".pp-tab-widget-form").prev(".pp-tab-status").remove(),e._add_processing_label(t),$.post({url:pp_ajax_form.ajaxurl,data:o,cache:!1,contentType:!1,enctype:"multipart/form-data",processData:!1,dataType:"json",success:function(s){if(t.trigger("pp_form_submitted"),"object"!=typeof s)return e._remove_processing_label(t);if("message"in s)if(t.trigger("pp_registration_error",[s]),t.trigger("pp_registration_ajax_response",[s]),a){var r=s.message.replace("profilepress-reg-status","pp-tab-status");t.parents(".pp-tab-widget-form").before(r)}else t.parents(".lucidContainer").length>0?t.parents(".lucidContainer").before(s.message):t.before(s.message);else"redirect"in s&&(t.trigger("pp_registration_success",[s]),window.location.assign(s.redirect));e._remove_processing_label(t)}})}},this.ajax_login=function(s){s.preventDefault();var t=$(this),r={action:"pp_ajax_login",data:$(this).serialize()},o="true"===t.find('input[name="is-pp-tab-widget"]').val();e._remove_status_notice(),e._add_processing_label(t),$.post(pp_ajax_form.ajaxurl,r,(function(s){if(t.trigger("pp_form_submitted"),null===s||"object"!=typeof s)return e._remove_processing_label(t);if("success"in s&&!0===s.success&&"redirect"in s)t.trigger("pp_login_form_success"),window.location.assign(s.redirect);else if(t.trigger("pp_login_form_error"),"code"in s&&"pp2fa_auth_code_invalid"==s.code&&t.find(".pp-2fa").show(),o){var r=s.message.replace("profilepress-login-status","pp-tab-status");t.parents(".pp-tab-widget-form").before(r)}else t.parents(".lucidContainer").length>0?t.parents(".lucidContainer").before(s.message):t.before(s.message);e._remove_processing_label(t)}),"json")},this.delete_avatar=function(e){e.preventDefault();var s=$(this).text(),t=$(this);e.preventDefault(),confirm(pp_ajax_form.confirm_delete)&&(t.is("button")&&t.text(pp_ajax_form.deleting_text),$.post(pp_ajax_form.ajaxurl,{action:"pp_del_avatar",nonce:pp_ajax_form.nonce}).done((function(e){"error"in e&&"nonce_failed"===e.error?(t.text(s),alert(pp_ajax_form.deleting_error)):"success"in e&&($("img[data-del='avatar']").attr("src",e.default),t.remove())})))},this.delete_profile_image_cover=function(e){e.preventDefault();var s=$(this).text(),t=$(this);e.preventDefault(),confirm(pp_ajax_form.confirm_delete)&&(t.is("button")&&t.text(pp_ajax_form.deleting_text),$.post(pp_ajax_form.ajaxurl,{action:"pp_del_cover_image",nonce:pp_ajax_form.nonce}).done((function(e){"error"in e&&"nonce_failed"===e.error&&(t.text(s),alert(pp_ajax_form.deleting_error)),"success"in e&&(""!==e.default?($("img[data-del='cover-image']").attr("src",e.default),t.parent().find(".profilepress-myaccount-has-cover-image").show(),t.parent().find(".profilepress-myaccount-cover-image-empty").hide()):(t.parent().find(".profilepress-myaccount-has-cover-image").hide(),t.parent().find(".profilepress-myaccount-cover-image-empty").show()),t.remove())})))},this.get_melange_id=function(e){var s=$("input.pp_melange_id",e).val();return void 0===s?"":s},this._add_processing_label=function(e){var s=e.find("input[data-pp-submit-label]");s.attr({value:s.data("pp-processing-label"),disabled:"disabled"}).css("opacity",".4")},this._remove_processing_label=function(e){var s=e.find("input[data-pp-submit-label]");s.attr("value",s.data("pp-submit-label")),s.attr({value:s.data("pp-submit-label"),disabled:null}).css("opacity","")},this._remove_status_notice=function(){$(".profilepress-login-status,.pp-tab-status,.profilepress-edit-profile-success,.profilepress-edit-profile-status,.pp-reset-success,.profilepress-reset-status,.profilepress-reg-status").remove()},this.defaultUserProfileResponsive=function(){$(".ppress-default-profile, .pp-member-directory, .ppress-checkout__form").each((function(){var e=$(this),s=e.width();s<=340?(e.removeClass("ppressui340"),e.removeClass("ppressui500"),e.removeClass("ppressui800"),e.removeClass("ppressui768"),e.removeClass("ppressui960"),e.addClass("ppressui340")):s<=500?(e.removeClass("ppressui340"),e.removeClass("ppressui500"),e.removeClass("ppressui768"),e.removeClass("ppressui800"),e.removeClass("ppressui960"),e.addClass("ppressui500")):s<=768?(e.removeClass("ppressui340"),e.removeClass("ppressui500"),e.removeClass("ppressui768"),e.removeClass("ppressui800"),e.removeClass("ppressui960"),e.addClass("ppressui768")):s<=800?(e.removeClass("ppressui340"),e.removeClass("ppressui500"),e.removeClass("ppressui768"),e.removeClass("ppressui800"),e.removeClass("ppressui960"),e.addClass("ppressui800")):s<=960?(e.removeClass("ppressui340"),e.removeClass("ppressui500"),e.removeClass("ppressui768"),e.removeClass("ppressui800"),e.removeClass("ppressui960"),e.addClass("ppressui960")):s>960&&(e.removeClass("ppressui340"),e.removeClass("ppressui500"),e.removeClass("ppressui768"),e.removeClass("ppressui800"),e.removeClass("ppressui960")),e.css("opacity",1)})),$(".ppress-default-profile-cover, .ppress-default-profile-cover-e").each((function(){var e=$(this),s=Math.round(e.width()/e.data("ratio"))+"px";e.height(s),e.find(".ppress-dpf-cover-add").height(s)}))},this.myaccount_password_strength_meter=function(){$(document).on("ready",(function(){var e=$("input[name=password_new]"),s=$("input[name=password_confirm_new]"),t=$("input[name=submit-form]"),r=$("#pp-pass-strength-result");$("body").on("keyup","input[name=password_new], input[name=password_confirm_new]",(function(o){!function(e,s,t,r,o){var a=e.val(),p=s.val();r.attr("disabled","disabled"),t.removeClass("short bad good strong"),o=o.concat(wp.passwordStrength.userInputDisallowedList());var i=wp.passwordStrength.meter(a,o,p);switch(i){case 2:t.addClass("bad").html(pwsL10n.bad);break;case 3:t.addClass("good").html(pwsL10n.good);break;case 4:t.addClass("strong").html(pwsL10n.strong);break;case 5:t.addClass("short").html(pwsL10n.mismatch);break;default:t.addClass("short").html(pwsL10n.short)}"false"===myacPwsL10n.disable_enforcement&&4===i&&""!==p.trim()&&r.removeAttr("disabled")}(e,s,r,t,[])}))}))}}).init(),(new function(){let e=this;window.ppressCheckoutForm=this,this.init=function(){"0"!==pp_ajax_form.is_checkout&&0!==$("#ppress_checkout_main_form").length&&($(document).on("click",".ppress-checkout-show-login-form",this.toggle_login_form),$(document).on("click",'.ppress-login-submit-btn input[type="submit"]',this.process_login),$(document).on("click",".ppress-coupon-code-link",this.toggle_discount_code_reveal),$(document).on("click",".ppress-apply-discount-btn",this.apply_discount_code),$(document).on("click","#ppress-remove-applied-coupon",this.remove_applied_discount_code),$(document).on("submit","#ppress_mb_checkout_form",this.process_checkout),$(document).on("click",".ppress-terms-and-conditions-link",(function(e){var s=$(".ppress-checkout-form__terms_condition__content");s.length>0&&(e.preventDefault(),s.slideToggle())})),$(document).on("ppress_update_checkout",this.update_checkout),"1"===pp_ajax_form.is_checkout_tax_enabled?$(document).on("change","#ppress_mb_checkout_form .ppress_billing_country, #ppress_mb_checkout_form .ppress_billing_state, #ppress_mb_checkout_form .ppress_vat_number",e.debounce((function(){$(document.body).trigger("ppress_update_checkout")}),200)):$(document).on("change","#ppress_mb_checkout_form .ppress_billing_country",e.contextual_state_field),$(document.body).on("change","#ppress_checkout_payment_methods [name=ppress_payment_method]",(function(){$(document.body).trigger("ppress_update_checkout")})),$(document.body).on("change","#ppress_mb_checkout_form [name=group_selector]",(function(){e.update_checkout()})),$(document.body).trigger("ppress_update_checkout"),$(document).ajaxError((function(){e.remove_spinner()})))},this.debounce=function(e,s){let t;return s=s||600,function(){clearTimeout(t),t=setTimeout((function(){e()}),s)}},this.contextual_state_field=function(){let e=$(".ppress_billing_state"),s={action:"ppress_contextual_state_field",country:$(this).val(),name:e.prop("name"),id:e.prop("id"),class:e.prop("class"),csrf:$("#ppress_checkout_nonce").val()};$.post(pp_ajax_form.ajaxurl,s,(function(s){e.replaceWith(s.data)}))},this.scroll_to_notices=function(e){(e=e||$(".ppress-checkout-alert")).length&&$("html, body").animate({scrollTop:e.offset().top-100},1e3)},this.update_checkout=function(s){s=s||!1;let t=$("#ppress_mb_checkout_form [name=group_selector]").length>0;e.removeAllAlerts(),e.add_spinner();let r={action:"ppress_update_order_review",plan_id:$("#ppress-checkout-plan-id").val(),ppress_payment_method:$("#ppress_checkout_payment_methods [name=ppress_payment_method]:checked").val(),csrf:$("#ppress_checkout_nonce").val(),address:$(".ppress-checkout-form__payment_method.ppress-active .ppress_billing_address").val(),city:$(".ppress-checkout-form__payment_method.ppress-active .ppress_billing_city").val(),country:$(".ppress-checkout-form__payment_method.ppress-active .ppress_billing_country").val(),state:$(".ppress-checkout-form__payment_method.ppress-active .ppress_billing_state").val(),postcode:$(".ppress-checkout-form__payment_method.ppress-active .ppress_billing_postcode").val(),phone:$(".ppress-checkout-form__payment_method.ppress-active .ppress_billing_phone").val(),vat_number:$("#ppress_checkout_main_form .ppress_vat_number").val(),post_data:$("#ppress_mb_checkout_form").serialize()};!0===t&&(r.isChangePlanUpdate="true"),$.post(pp_ajax_form.ajaxurl,r,(function(o){let a={};if($(".ppress-checkout-form__payment_method :input").each((function(){let e=$(this).attr("id");e&&(-1!==$.inArray($(this).attr("type"),["checkbox","radio"])?a[e]=$(this).prop("checked"):a[e]=$(this).val())})),"data"in o&&void 0!==o.data.fragments&&($.each(o.data.fragments,(function(s,t){e.fragments&&e.fragments[s]===t||$(s).replaceWith(t)})),e.fragments=r.fragments),$.isEmptyObject(a)||$(".ppress-checkout-form__payment_method :input").each((function(){let e=$(this).attr("id");e&&(-1!==$.inArray($(this).attr("type"),["checkbox","radio"])?$(this).prop("checked",a[e]):($.inArray($(this).attr("type"),["select"]),$(this).val(a[e])))})),"success"in o&&!1===o.success){let e=$("#ppress_checkout_main_form");o.data&&e.prepend(o.data),e.find(".input-text, select, input:checkbox").trigger("blur")}$(document.body).trigger("ppress_updated_checkout",[o]);let p,i=$(".ppress-checkout_order_summary__bottom_details");(p=$(".ppress-checkout-alert")).length>0&&(i=p),e.scroll_to_notices(i),e.remove_spinner(),!0===t&&!0!==s&&e.update_checkout(!0)}))},this.toggle_login_form=function(e){e.preventDefault(),$("#ppress_checkout_account_info .ppress-main-checkout-form__login_form_wrap").slideToggle()},this.toggle_discount_code_reveal=function(e){e.preventDefault(),$("#ppress-checkout-coupon-code-wrap").slideToggle()},this.apply_discount_code=function(s){s.preventDefault(),e.removeAllAlerts(),e.add_spinner();let t={action:"ppress_checkout_apply_discount",plan_id:$("#ppress-checkout-plan-id").val(),coupon_code:$("#apply-discount").val(),ppress_checkout_nonce:$("#ppress_checkout_nonce").val()};$.post(pp_ajax_form.ajaxurl,t,(function(s){"success"in s&&!0===s.success?$(document.body).trigger("ppress_update_checkout"):($(".ppress-checkout_order_summary-wrap").before(s.data),e.remove_spinner())}))},this.remove_applied_discount_code=function(s){s.preventDefault(),e.removeAllAlerts(),e.add_spinner();let t={action:"ppress_checkout_remove_discount",plan_id:$("#ppress-checkout-plan-id").val(),ppress_checkout_nonce:$("#ppress_checkout_nonce").val()};$.post(pp_ajax_form.ajaxurl,t,(function(s){"success"in s&&!0===s.success?$(document.body).trigger("ppress_update_checkout"):($(".ppress-checkout_order_summary-wrap").before(s.data),e.remove_spinner())}))},this.process_login=function(s){s.preventDefault(),e.removeAllAlerts(),e.add_spinner();let t={action:"ppress_process_checkout_login",ppmb_user_login:$("#ppress_mb_checkout_form #ppmb_user_login").val(),ppmb_user_pass:$("#ppress_mb_checkout_form #ppmb_user_pass").val(),ppress_checkout_nonce:$("#ppress_checkout_nonce").val()};$.post(pp_ajax_form.ajaxurl,t,(function(s){"success"in s&&(!0===s.success?window.location.reload():"data"in s&&$("#ppress_mb_checkout_form .ppress-login-submit-btn").prepend(s.data)),e.remove_spinner()}))},this.process_checkout=function(s){if("function"!=typeof this.checkValidity||!1!==this.checkValidity()){s.preventDefault(),e.removeAllAlerts(),e.add_spinner();var t=$(this),r=e.get_payment_method();if(!1!==t.triggerHandler("ppress_checkout_place_order_"+r)){let s=new FormData(this);s.append("action","ppress_process_checkout"),s.append("ppress_checkout_nonce",$("#ppress_checkout_nonce").val()),$.post({url:pp_ajax_form.ajaxurl,data:s,cache:!1,contentType:!1,enctype:"multipart/form-data",processData:!1,dataType:"json",success:function(s){if($(document.body).trigger("ppress_process_checkout_success_callback",[s]),"success"in s)return!0===s.success?void(!1!==t.triggerHandler("ppress_process_checkout_"+r,[s,r])&&("redirect_url"in s&&void 0!==s.redirect_url&&s.redirect_url.length>0?window.location.assign(s.redirect_url):($(document.body).trigger("ppress_checkout_success",[s,r]),window.location.assign(s.order_success_url)))):"error_message"in s?e.createAlertMessage(s.error_message):"data"in s&&"string"==typeof s.data?e.createAlertMessage(s.data):void 0;e.remove_spinner()},error:function(s,t,r){$(document.body).trigger("ppress_process_checkout_error_callback",[s,t,r]),e.createAlertMessage(r)}},"json")}}},this.get_payment_method=function(){return $("#ppress_mb_checkout_form").find('input[name="ppress_payment_method"]:checked').val()},this.createAlertMessage=function(e,s){s=s||"error";var t=void 0!==e.indexOf&&-1!==e.indexOf("ppress-checkout-alert"),r="";t||(r='

'),r+=e,t||(r+="

"),$("#ppress_checkout_main_form").prepend(r),ppressCheckoutForm.scroll_to_notices(),ppressCheckoutForm.remove_spinner(),$(document.body).trigger("ppress_checkout_error",[e])},this.removeAllAlerts=function(){$(".ppress-checkout-alert").remove()},this.add_spinner=function(){e.remove_spinner(),$(".ppress-checkout__form").prepend('
')},this.remove_spinner=function(){$(".ppress-checkout__form .ppress-checkout__form__preloader").remove()},this.is_var_defined=function(e){return null!=e},this.get_obj_val=function(e,s){return this.is_var_defined(e)&&""!==e?e:s}}).init()}(jQuery);; jQuery(document).ready(function($){'use strict';var sticky_navbar=function(){var navbar=$('.sticky-nav'),admin_bar=$('#wpadminbar'),nav_offset=0,adminbar_ht=0,sticky=0;if($(window).width()<426){navbar=$('.hst-1 .sticky-nav, .hst-2 .nav-1, .hst-3 .nav-2, .hst-4 .nav-2');} if(admin_bar.length>0&&$(window).width()>425){adminbar_ht=admin_bar.outerHeight();} if(navbar.length>0){nav_offset=navbar.offset();sticky=nav_offset.top-adminbar_ht;if(qlm_frontend&&qlm_frontend.sticky_nav){$(window).on('scroll',function(){if($(this).scrollTop()>sticky){navbar.addClass('sticky-enabled').css({"top":adminbar_ht});$('body').addClass('fixed-nav');}else{navbar.removeClass('sticky-enabled').css({"top":0});$('body').removeClass('fixed-nav');}});}}};sticky_navbar();$(window).resize(sticky_navbar);$('.search-trigger').on('click',function(e){e.preventDefault();var drawer=$(this).closest('.search-icon').find('.search-drawer'),searchfield=$(this).closest('.search-icon').find('.search-field');$(drawer).toggleClass('active');setTimeout(function(){searchfield.focus();},50);if($(this).is('.inline')){$(this).toggleClass('search-btn-active');}});$(window).on('scroll',function(){var win=$(this),sharing_pos=$('body.single').find('.qlm-sharing-container').offset(),share_btn=$('.qlm-sharing-inline > li.no-popup > a.qlm-more');if($(this).scrollTop()>100){$('.scroll-to-top').addClass('btn-active');}else{$('.scroll-to-top').removeClass('btn-active');} if(sharing_pos){if(win.scrollTop()>sharing_pos.top){share_btn.addClass('is-fixed');if($(this).scrollTop()>(sharing_pos.top+100)){share_btn.addClass('slide-in');}else{share_btn.removeClass('slide-in');}}else{share_btn.removeClass('is-fixed');}}});$('.scroll-to-top a').click(function(){$('html, body').animate({scrollTop:0},500);return false;});$(window).on('load',function(){if($.isFunction($.fn.masonry)){$('.masonry-enabled').masonry({itemSelector:'article.hentry',isOriginLeft:!($('body').is('.rtl'))});}});function qalam_share_window(){$('.qalam-sharing li:not(.no-popup) a').on('click',function(e){e.preventDefault();var href=$(this).attr('href');window.open(href,'_blank','width=600,height=400,menubar=0,resizable=1,scrollbars=0,status=1',true);});} qalam_share_window();function qalam_animate_post_nav(){var didScroll,lastScrollTop=0;$(window).scroll(function(event){didScroll=true;});setInterval(function(){if(didScroll){hasScrolled();didScroll=false;}},300);function hasScrolled(){var st=$(window).scrollTop();if(st<=400){$('.post-navigation').removeClass('show-nav');} if(st>lastScrollTop){$('.post-navigation').removeClass('show-nav').addClass('hide-nav');}else{if(st+$(window).height()<$(document).height()){$('.post-navigation').removeClass('hide-nav').addClass('show-nav');}} lastScrollTop=st;}} qalam_animate_post_nav();$('#comments-trigger').on('click',function(e){e.preventDefault();$('#comments').slideDown();$(this).fadeOut();});function responsive_menu_items(){var sub_menus=$('.resp-menu').find('.menu-item-has-children, .page_item_has_children'),expand_menus,expand_text=qlm_frontend!=='undefined'?qlm_frontend.expand:'Toggle child menu';if(sub_menus.length){$(sub_menus).each(function(){$(this).append('').find('.sub-menu').hide();});} expand_menus=$('.resp-menu').find('.expand-menu');if(expand_menus.length){$(expand_menus).on('click',function(e){var icon=$(this).find('.fa');icon.toggleClass('rotate-180');$(this).prev().slideToggle(300);e.preventDefault();});}} responsive_menu_items();$('.resp-menu').find('.current-menu-item').parents('ul.sub-menu').show();$('.menu-trigger, .overlay-mask, .close-menu').click(function(e){$('body').toggleClass('show-nav');e.preventDefault();});function qlm_share_window(){$('.qlm-sharing-list li:not(.no-popup) a, .qlm-sharing-inline li:not(.no-popup) a').on('click',function(e){e.preventDefault();var href=$(this).attr('href');window.open(href,'_blank','width=600,height=400,menubar=0,resizable=1,scrollbars=0,status=1',true);});} qlm_share_window();$('.qlm-sharing-inline > li > a.qlm-more').on('click',function(e){e.preventDefault();$(this).closest('.qlm-sharing-container').find('.sharing-overlay').toggleClass('is-open');$('body').toggleClass('overlay-active');});$('.qlm-sharing-list > li.sharing-modal-handle > a.close-sharing').on('click',function(e){e.preventDefault();$(this).closest('.sharing-overlay').removeClass('is-open');$('body').removeClass('overlay-active');});$('.sharing-overlay').on('click',function(e){e.preventDefault();$(this).removeClass('is-open');$('body').removeClass('overlay-active');});$(document).keyup(function(e){if(e.keyCode===27){$('.sharing-overlay').removeClass('is-open');}});$('.sharing-overlay').on('click','.qlm-sharing-list',function(e){e.stopPropagation();});$('.qlm-print a').click(function(e){e.preventDefault();$('.sharing-overlay').removeClass('is-open');window.print();});$(document).on('click','.search-trigger, .search-drawer .search-field',function(e){e.stopPropagation();});$('.search-icon > a.search-trigger.ovrlay').on('click',function(){$(this).next('.search-overlay').toggleClass('enabled');$('body').toggleClass('search-overlay-active');});$('.search-overlay').on('click',function(){$(this).removeClass('enabled');$('body').removeClass('search-overlay-active');});$('.search-inner > .search-form, .aws-container').on('click',function(e){e.stopPropagation();});$(document).on('keyup','.search-overlay',function(e){if(e.keyCode===27){$(this).removeClass('enabled');$('body').removeClass('search-overlay-active');}});});; (()=>{var t,e,r,s,a,i;t=document,e="script",r="twitter-wjs",a=t.getElementsByTagName(e)[0],i=/^http:/.test(t.location)?"http":"https",t.getElementById(r)||((s=t.createElement(e)).id=r,s.src=i+"://platform.twitter.com/widgets.js",a.parentNode.insertBefore(s,a))})();; !function(e){var n=!1;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var o=window.Cookies,t=window.Cookies=e();t.noConflict=function(){return window.Cookies=o,t}}}(function(){function e(){for(var e=0,n={};e1){if(i=e({path:"/"},t.defaults,i),"number"==typeof i.expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(r),/^[\{\[]/.test(c)&&(r=c)}catch(e){}r=o.write?o.write(r,n):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=encodeURIComponent(String(n)),n=n.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),n=n.replace(/[\(\)]/g,escape);var f="";for(var s in i)i[s]&&(f+="; "+s,i[s]!==!0&&(f+="="+i[s]));return document.cookie=n+"="+r+f}n||(c={});for(var p=document.cookie?document.cookie.split("; "):[],d=0;d