!function(e){var r={};function t(s){if(r[s])return r[s].exports;var p=r[s]={i:s,l:!1,exports:{}};return e[s].call(p.exports,p,p.exports,t),p.l=!0,p.exports}t.m=e,t.c=r,t.d=function(e,r,s){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:s})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(t.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var p in e)t.d(s,p,function(r){return e[r]}.bind(null,p));return s},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=2)}([function(e,r,t){"use strict";r.a=function(e){e("#ppw_subscribe_form").submit(function(r){r.preventDefault();const t=e("#ppw_email_subscribe").val().trim();/^(([^<>()\[\]\\.,;:\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(t)?(e("#ppw_subscribe_button").val("Saving..."),function(e,r,t){var s={action:"ppw_free_subscribe_request",settings:r,security_check:e("#ppw_subscribe_form_nonce").val()};!function(e,r,t){let s=!1;window.ppw_general_data?s=ppw_general_data.ajax_url:window.ppw_entire_site_data&&(s=ppw_entire_site_data.ajax_url),s&&e.ajax({url:s,type:"POST",data:r,timeout:5e3,success:function(e){t(e,null)},error:function(e){t(null,e)}})}(e,s,t)}(e,{ppw_email:t},function(r,t){r?(e("#ppw_subscribe_form").hide(),e("#ppw_subscribe_form_success").show()):t&&(400===t.status?(e(".ppw_subscribe_error").text(t.responseJSON.message),e(".ppw_subscribe_error").show("slow")):(e(".ppw_subscribe_error").text("Oops! Something went wrong. Please reload the page and try again."),e(".ppw_subscribe_error").show("slow"))),e("#ppw_subscribe_button").val("Get Lucky")})):(e(".ppw_subscribe_error").show("slow"),e("#ppw_email_subscribe").focus(),e("#ppw_subscribe_button").val("Get Lucky"))})}},,function(e,r,t){"use strict";t.r(r);var s=t(0);!function(e){e(function(){e(".ppwp_select2").select2({width:"100%"}),e("#ppwp_free_switch_exclude_page").change(function(){e(this).prop("checked")?e(".ppwp_free_wrap_select_exclude_page").show():e(".ppwp_free_wrap_select_exclude_page").hide()}),e("#ppwp_free_switch_exclude_page").trigger("change"),e("#ppwp_apply_password_for_entire_site").change(function(){e(this).prop("checked")?(e(".ppwp_logic_show_input_password").show(),e("#ppwp_password_for_entire_site").attr("required",!0),e("#ppwp_password_for_entire_site").trigger("change")):(e(".ppwp_logic_show_input_password").hide(),e("#submit").prop("disabled",!1),e("#ppwp_password_for_entire_site").attr("required",!1))}),e("#ppwp_apply_password_for_entire_site").trigger("change"),e("#ppwp_set_new_password_for_entire_site").change(function(){e(this).prop("checked")?(e("#ppwp_new_password_entire_site").show(),e("#ppwp_password_for_entire_site").attr("required",!0)):(e("#ppwp_new_password_entire_site").hide(),e("#ppwp_password_for_entire_site").val(""),e("#submit").prop("disabled",!1),e("#ppwp_password_for_entire_site").attr("required",!1))}),e("#ppwp_set_new_password_for_entire_site").trigger("change"),e("#ppwp_password_for_entire_site").change(function(){-1!==e(this).val().indexOf(" ")?(toastr.error("Please remove spaces in password!","Password Protect WordPress"),e("#submit").prop("disabled",!0)):e("#submit").prop("disabled",!1)}),e("#ppwp_password_for_entire_site").trigger("change"),Object(s.a)(e),e("#ppw_entire_site_form").submit(function(r){r.preventDefault(),function(r,t){!function(r,t){e("#submit").prop("disabled",!0),e.ajax({url:ppw_entire_site_data.ajax_url,type:"POST",data:r,success:function(e){t(e,null)},error:function(e){t(null,e)},timeout:5e3})}({action:"ppw_free_update_entire_site_settings",settings:r,security_check:e("#ppw_entire_site_form_nonce").val()},t)}({ppwp_apply_password_for_entire_site:e("#ppwp_apply_password_for_entire_site").prop("checked"),password_for_website:e("#ppwp_password_for_entire_site").val(),ppwp_set_new_password_for_entire_site:e("#ppwp_set_new_password_for_entire_site").prop("checked")},function(r,t){r&&(toastr.success("Great! Your settings have been updated successfully.","PPWP Lite"),location.reload(!0)),t&&(400===t.status?toastr.error(t.responseJSON.message,"PPWP Lite"):toastr.error("Oops! Something went wrong. Please try again.","PPWP Lite"),console.log("Data error",t),e("#submit").prop("disabled",!1))})})})}(jQuery)}]);