"use strict"; function ihcDeleteFileViaAjax(a,d,b,e,f){if(confirm("Are you sure you want to delete?")){var c=jQuery(b).attr("data-h");jQuery.ajax({type:"post",url:decodeURI(window.ihc_site_url)+"/wp-admin/admin-ajax.php",data:{action:"ihc_delete_attachment_ajax_action",attachemnt_id:a,user_id:d,field_name:e,h:c},success:function(g){jQuery(f).val("");jQuery(b+" .ajax-file-upload-filename").remove();jQuery(b+" .ihc-delete-attachment-bttn").remove();jQuery(b+" .ihc-member-photo").length&&(jQuery(b+" .ihc-member-photo").remove(), "ihc_avatar"==e&&(jQuery(b).prepend("
"),jQuery(b+" .ihc-file-upload").css("display","block")));jQuery(b+" .ihc-file-name-uploaded").length&&jQuery(b+" .ihc-file-name-uploaded").remove();jQuery(b+" .ajax-file-upload-progress").length&&jQuery(b+" .ajax-file-upload-progress").remove();jQuery(b+" .ihc-icon-file-type").length&&jQuery(b+" .ihc-icon-file-type").remove()}})}} function ihcSetFormI(a,d,b,e){if(e&&(e="object"==typeof window.ihc_translated_labels?window.ihc_translated_labels:JSON.parse(window.ihc_translated_labels),!window.confirm(e.delete_level)))return;jQuery("#ihc_coupon").val()&&jQuery(d).append("");jQuery(a).val(b);jQuery(d).submit()}function ihcDhSelector(a,d){d?jQuery(a).css("visibility","visible"):jQuery(a).css("visibility","hidden")} function ihcSetLevelAp(a){jQuery("#ihc_renew_level").val(a);jQuery("#ihc_form_ap_subscription_page").submit()}function ihcRunSocialReg(a){jQuery("form#createuser");jQuery("form#createuser input, form#createuser textarea").each(function(){ihcAppendInput(this.name,this.value,"#ihc_social_login_form")});ihcAppendInput("sm_type",a,"#ihc_social_login_form");jQuery("#ihc_social_login_form").submit()}function ihcAppendInput(a,d,b){jQuery(b).append("")} function ihcBuyNewLevel(a){jQuery("#ihc_coupon").val()?(a=a+"&ihc_coupon="+jQuery("#ihc_coupon").val(),window.location.href=a):window.location.href=a} function ihcRegisterCheckViaAjax(a){var d="#"+jQuery(".ihc-form-create-edit [name="+a+"]").parent().attr("id"),b=jQuery(".ihc-form-create-edit [name="+a+"]").val(),e="";"pass2"==a?e=jQuery(".ihc-form-create-edit [name=pass1]").val():"confirm_email"==a&&(e=jQuery(".ihc-form-create-edit [name=user_email]").val());jQuery.ajax({type:"post",url:decodeURI(window.ihc_site_url)+"/wp-admin/admin-ajax.php",data:{action:"ihc_check_reg_field_ajax",type:a,value:b,second_value:e},success:function(f){"undefined"===typeof window.indeedRegisterErrors&&(window.indeedRegisterErrors=[]);jQuery(d+" .ihc-register-notice").remove();jQuery(".ihc-form-create-edit [name="+a+"]").removeClass("ihc-input-notice");1==f?indeedRemoveElementFromArray(window.indeedRegisterErrors,a):(jQuery(d).append('
'+f+"
"),jQuery(".ihc-form-create-edit [name="+a+"]").addClass("ihc-input-notice"),indeedAddElementToArray(window.indeedRegisterErrors,a))}})} function indeedAddElementToArray(a,d){-1'+d+"")} function ihcGetCheckboxRadioValue(a,d){if("radio"==a){var b=jQuery("[name="+d+"]:checked").val();if("undefined"!=typeof b)return b}else{var e=[];jQuery("[name='"+d+"[]']:checked").each(function(){e.push(this.value)});if(0'+h[k].value+""):(jQuery("#"+l).append('
'+h[k].value+"
"),jQuery(".ihc-form-create-edit [name="+h[k].type+"]").addClass("ihc-input-notice")),n=0)}window.ihcRegisterCheckFieldsAjaxFired=0;if(1==n)window.must_submit=1,jQuery(".ihc-form-create-edit").submit(); else return window.must_submit=0,!1}})}} function ihcPaymentGatewayUpdate(a,d){jQuery("[name=ihc_payment_gateway]").val(a);jQuery("#ihc_authorize_r_fields").fadeOut(200);jQuery("#ihc_braintree_r_fields").fadeOut(200);switch(a){case "stripe":jQuery("#ihc_submit_bttn").off("click");jQuery("#ihc_submit_bttn").on("click",function(b){b.preventDefault();b=jQuery("#iumpfinalglobalp").val();if(jQuery("#stripeToken").val()&&jQuery("#stripeEmail").val()||0==b)return jQuery(".ihc-form-create-edit").submit(),!0;window.ihcStripeMultiply=parseInt(window.ihcStripeMultiply); b*=window.ihcStripeMultiply;100==window.ihcStripeMultiply&&50>b&&(b=50);window.ihcStripeHandler.open({name:jQuery("#iump_site_name").val(),description:jQuery("#iumpfinalglobal_ll").val(),amount:b,currency:jQuery("#iumpfinalglobalc").val()})});break;case "authorize":1==d&&jQuery("#ihc_authorize_r_fields").fadeIn(200);break;case "braintree":jQuery("#ihc_braintree_r_fields").fadeIn(200)}} function iumpStripePrice(){var a=jQuery("#iumpfinalglobalp").val();window.ihcStripeMultiply=parseInt(window.ihcStripeMultiply);a*=window.ihcStripeMultiply;100==window.ihcStripeMultiply&&50>a&&(a=50);return a} function ihcBuyNewLevelFromAp(a,d,b,e){var f=jQuery("[name=ihc_payment_gateway]").val();"stripe"==f?jQuery.ajax({type:"post",url:decodeURI(window.ihc_site_url)+"/wp-admin/admin-ajax.php",data:{action:"ihc_check_lid_price",level_id:b},success:function(c){1==c?ihcBuyNewLevel(e+"&ihc_payment_gateway="+f):ihc_stripe_payment(a,d,b)}}):(jQuery("#ihc_coupon").val(),"undefined"!=typeof f&&(e=e+"&ihc_payment_gateway="+f),ihcBuyNewLevel(e))} function ihcRenewFunction(a,d,b,e,f){if("stripe"==jQuery("[name=ihc_payment_gateway]").val()){if("function"==typeof ihc_stripe_renew_payment)return ihc_stripe_renew_payment(e,f,b),!1}else ihcSetFormI(a,d,b)}function ihcPaymentSelectIcon(a){jQuery(".ihc-payment-icon").removeClass("ihc-payment-select-img-selected");jQuery("#ihc_payment_icon_"+a).addClass("ihc-payment-select-img-selected")} function ihcAjaxCheckFieldConditionOnblurOnclick(a,d,b,e){a=jQuery(".ihc-form-create-edit [name="+a+"]").val();ihcAjaxCheckFieldCondition(a,d,b,e)}function ihcAjaxCheckOnClickFieldCondition(a,d,b,e,f){if("checkbox"==e){var c=[];jQuery(".ihc-form-create-edit [name='"+a+"[]']:checked").each(function(){c.push(jQuery(this).val())});a=c.join(",")}else a=jQuery(".ihc-form-create-edit [name="+a+"]:checked").val();ihcAjaxCheckFieldCondition(a,d,b,f)} function ihcAjaxCheckOnChangeMultiselectFieldCondition(a,d,b,e){a=jQuery(".ihc-form-create-edit [name='"+a+"[]']").val();null!=a&&(a=a.join(","),ihcAjaxCheckFieldCondition(a,d,b,e))} function ihcAjaxCheckFieldCondition(a,d,b,e){jQuery.ajax({type:"post",url:decodeURI(window.ihc_site_url)+"/wp-admin/admin-ajax.php",data:{action:"ihc_check_logic_condition_value",val:a,field:b},success:function(f){var c=jQuery("#ihc_exceptionsfields").val();if(c){c=c.split(",");var g=c.indexOf(b)}else c=[];"1"==f?1==e?(jQuery(d).fadeIn(200),-1!=c.indexOf(b)&&c.splice(g,1)):(jQuery(d).fadeOut(200),-1==c.indexOf(b)&&c.push(b)):1==e?(jQuery(d).fadeOut(200),-1==c.indexOf(b)&&c.push(b)):(jQuery(d).fadeIn(200), -1!=c.indexOf(b)&&c.splice(g,1));c&&(c=c.join(","),jQuery("#ihc_exceptionsfields").val(c))}})} function ihcCheckUniqueValueField(a){var d="#"+jQuery(".ihc-form-create-edit [name="+a+"]").parent().attr("id"),b=jQuery(".ihc-form-create-edit [name="+a+"]").val();b&&jQuery.ajax({type:"post",url:decodeURI(window.ihc_site_url)+"/wp-admin/admin-ajax.php",data:{action:"ihc_check_unique_value_field_register",meta_key:a,meta_value:b},success:function(e){jQuery(d+" .ihc-register-notice").remove();jQuery(".ihc-form-create-edit [name="+a+"]").removeClass("ihc-input-notice");1!=e&&(jQuery(d).append('
'+ e+"
"),jQuery(".ihc-form-create-edit [name="+a+"]").addClass("ihc-input-notice"),window.must_submit=0)}})} function ihcCheckInvitationCode(){var a="#"+jQuery(".ihc-form-create-edit #ihc_invitation_code_field").parent().attr("id"),d=jQuery("#ihc_invitation_code_field").val();d&&jQuery.ajax({type:"post",url:decodeURI(window.ihc_site_url)+"/wp-admin/admin-ajax.php",data:{action:"ihc_check_invitation_code_via_ajax",c:d},success:function(b){jQuery(a+" .ihc-register-notice").remove();jQuery(".ihc-form-create-edit #ihc_invitation_code_field").removeClass("ihc-input-notice");1!=b&&(jQuery(a).append('
'+ b+"
"),jQuery(".ihc-form-create-edit #ihc_invitation_code_field").addClass("ihc-input-notice"),window.must_submit=0)}})} function ihcUpdateCart(){var a=jQuery(".ihc-form-create-edit [name=lid]").val(),d=jQuery(".ihc-form-create-edit [name=ihc_coupon]").val(),b=jQuery(".ihc-form-create-edit #ihc_country_field").val(),e=jQuery(".ihc-form-create-edit [name=ihc_state]").val(),f=jQuery("#ihc_dynamic_price").length?jQuery("#ihc_dynamic_price").val():-1,c=jQuery("[name=ihc_payment_gateway]").val();jQuery.ajax({type:"post",url:decodeURI(window.ihc_site_url)+"/wp-admin/admin-ajax.php",data:{action:"ihc_get_cart_via_ajax",country:b, lid:a,coupon:d,state:e,a:f,payment_type:c},success:function(g){jQuery("#ihc_cart_wrapper").remove();jQuery(".ihc-form-create-edit").after(g)}})}function ihcShowPrint(a){jQuery(a).css("display","block")}function ihcHidePrint(a){jQuery(a).css("display","none")} function ihcDoPrint(a){a=jQuery(a).files[0];var d=new FileReader;d.onload=function(b){b="';window.open("about:blank","_blank").document.write(b)};d.readAsDataURL(a)} function ihcUpdateStateField(a){if(0'+c.success_msg+""):jQuery(f).append('
'+c.err_msg+"
");setTimeout(function(){jQuery("#ihc_coupon_code_check_div_msg").fadeOut(500,function(){this.remove()})},5E3)}})});if(jQuery(".ihc-js-register-popup-data").length)if("1"==jQuery(".ihc-js-register-popup-data").attr("data-is_register_page"))jQuery(".ihc-modal-trigger-register").on("click", function(){jQuery("html, body").animate({scrollTop:jQuery(".ihc-form-create-edit").offset().top},1E3)});else if("1"==jQuery(".ihc-js-register-popup-data").attr("data-is_registered"))jQuery(".ihc-modal-trigger-register").on("click",function(){return!1});else if("undefined"!==typeof IhcRegisterModal){var d=jQuery(".ihc-js-register-popup-data").attr("data-trigger_selector"),b=jQuery(".ihc-js-register-popup-data").attr("data-trigger_default");IhcRegisterModal.init({triggerModalSelector:d,preventDefault:b})}jQuery(".ihc-js-upload-image-data").length&& jQuery(".ihc-js-upload-image-data").each(function(f,c){var g=jQuery(this).attr("data-rand"),h=jQuery(this).attr("data-url"),n=jQuery(this).attr("data-name"),k=jQuery(this).attr("data-bttn_label");IhcAvatarCroppic.init({triggerId:"js_ihc_trigger_avatar"+g,saveImageTarget:h,cropImageTarget:h,imageSelectorWrapper:".ihc-js-upload-image-wrapp",hiddenInputSelector:"[name="+n+"]",imageClass:"ihc-member-photo",removeImageSelector:"#ihc_upload_image_remove_bttn_"+g,buttonId:"ihc-avatar-button",buttonLabel:k})}); jQuery(".ihc-js-datepicker-data").length&&jQuery(".ihc-js-datepicker-data").each(function(f,c){var g=(new Date).getFullYear()+10;jQuery(jQuery(this).attr("data-selector")).datepicker({dateFormat:"dd-mm-yy",changeMonth:!0,changeYear:!0,yearRange:"1900:"+g,onClose:function(h){h=jQuery(this).attr("data-callback");"function"==typeof h&&h()}})});jQuery(".ihc-js-upload-file-public-data").length&&jQuery(".ihc-js-upload-file-public-data").each(function(f,c){var g=jQuery(this).attr("data-rand"),h=jQuery(this).attr("data-url"), n=jQuery(this).attr("data-max_size"),k=jQuery(this).attr("data-allowed_types"),l=jQuery(this).attr("data-name"),q=jQuery(this).attr("data-remove_label"),r=jQuery(this).attr("data-alert_text");jQuery("#ihc_fileuploader_wrapp_"+g+" .ihc-file-upload").uploadFile({onSelect:function(m){jQuery("#ihc_fileuploader_wrapp_"+g+" .ajax-file-upload-container").css("display","block");return""!=jQuery("#ihc_upload_hidden_"+g).val()?(alert(r),!1):!0},url:h,fileName:"ihc_file",dragDrop:!1,showFileCounter:!1,showProgress:!0, showFileSize:!1,maxFileSize:n,allowedTypes:k,onSuccess:function(m,p,t,u){if(p){m=jQuery.parseJSON(p);"undefined"!=typeof m.secret&&jQuery("#ihc_fileuploader_wrapp_"+g).attr("data-h",m.secret);p='
"+q+"
";jQuery("#ihc_fileuploader_wrapp_"+g+" .ihc-file-upload").prepend(p);switch(m.type){case "image":jQuery("#ihc_fileuploader_wrapp_"+g+" .ihc-file-upload").prepend("
");break;case "other":jQuery("#ihc_fileuploader_wrapp_"+g+" .ihc-file-upload").prepend("
"+m.name+"
")}jQuery("#ihc_upload_hidden_"+g).val(m.id);setTimeout(function(){jQuery("#ihc_fileuploader_wrapp_"+g+" .ajax-file-upload-container").css("display","none")},3E3)}}})});jQuery(".ihc-js-countries-list-data").length&&jQuery(jQuery(".ihc-js-countries-list-data").attr("data-selector")).select2({placeholder:jQuery(".ihc-js-countries-list-data").attr("data-placeholder"), allowClear:!0,selectionCssClass:"ihc-select2-dropdown"});if(jQuery(".ihc-js-login-data").length){d=jQuery(".ihc-js-login-data").attr("data-user_field");b=jQuery(".ihc-js-login-data").attr("data-password_field");var e=jQuery(".ihc-js-login-data").attr("data-error_message");jQuery(d).on("blur",function(){ihcCheckLoginField("log",e)});jQuery(b).on("blur",function(){ihcCheckLoginField("pwd",e)});jQuery("#ihc_login_form").on("submit",function(f){f.preventDefault();f=jQuery("#ihc_login_form [name=log]").val(); var c=jQuery("#ihc_login_form [name=pwd]").val();if(""!=f&&""!=c)document.getElementById("ihc_login_form").submit();else return ihcCheckLoginField("log",e),ihcCheckLoginField("pwd",e),!1})}0