Ubuntu

­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ var modal_title,modal_content,SecuPress={doingAjax:{},deletedRowColor:"#FF9966",addedRowColor:"#CCEEBB",swal2Defaults:{title:SecuPressi18nModules.confirmTitle,confirmButtonText:SecuPressi18nModules.confirmText,cancelButtonText:SecuPressi18nModules.cancelText,type:"warning",allowOutsideClick:!0,customClass:"wpmedia-swal2 secupress-swal2"},swal2ConfirmDefaults:{showCancelButton:!0,closeOnConfirm:!1},expandButton:'

'};function secupressDisableAjaxButton(e,s,t){var n,i=e.attr("data-loading-i18n"),a=e.get(0).nodeName.toLowerCase();t=void 0!==t?t:"global",SecuPress.doingAjax[t]=!0,a="button"===a||"input"===a,void 0!==i&&i&&(a&&void 0!==(n=e.val())&&n?e.val(i):(e.find(".text").length?e.find(".text"):e).text(i),void 0!==s&&s||(s=i)),a?e.addClass("working").attr({disabled:"disabled","aria-disabled":"true"}):e.addClass("disabled working").attr("aria-disabled","true"),wp.a11y&&wp.a11y.speak&&void 0!==s&&s&&wp.a11y.speak(s)}function secupressEnableAjaxButton(e,s,t){var n,i,a;void 0!==e&&e&&e.length&&(n=e.attr("data-original-i18n"),i="button"===(i=e.get(0).nodeName.toLowerCase())||"input"===i,void 0!==n&&n&&(i&&void 0!==(a=e.val())&&a?e.val(n):(e.find(".text").length?e.find(".text"):e).text(n)),i?e.removeClass("working").removeAttr("disabled aria-disabled"):e.removeClass("disabled working").removeAttr("aria-disabled")),wp.a11y&&wp.a11y.speak&&void 0!==s&&s&&wp.a11y.speak(s),t=void 0!==t?t:"global",SecuPress.doingAjax[t]=!1}function secupressPreAjaxCall(e,s,t){return s.preventDefault(),!(void 0===e||!e)&&(!("keyup"===s.type&&!secupressIsSpaceOrEnterKey(s))&&(t=void 0!==t?t:"global",void 0===SecuPress.doingAjax[t]&&(SecuPress.doingAjax[t]=!1),!SecuPress.doingAjax[t]&&e.replace("admin-post.php","admin-ajax.php")))}function secupressDisplayAjaxError(e,s,t){void 0===s&&(s=SecuPressi18nModules.unknownError),swal2(jQuery.extend({},SecuPress.swal2Defaults,{title:SecuPressi18nModules.error,html:s,type:"error"})),secupressEnableAjaxButton(e,s,t=void 0!==t?t:"global")}function secupressDisplayAjaxSuccess(e,s,t){void 0===s&&(s=null),swal2(jQuery.extend({},SecuPress.swal2Defaults,{title:SecuPressi18nModules.done,html:s,type:"success",timer:4e3})),secupressEnableAjaxButton(e,s,t=void 0!==t?t:"global")}0===SecuPressi18nModules.alreadyScanned&&(modal_title='',modal_content='

',modal_content+=SecuPressi18nModules.firstScanTitle,modal_content+="

",modal_content+='

',modal_content+=SecuPressi18nModules.firstScanText,modal_content+="

",modal_content+='

',modal_content+='',modal_content+='',modal_content+='',modal_content+="",modal_content+='',modal_content+=SecuPressi18nModules.firstScanButton,modal_content+="",modal_content+="",modal_content+="

",swal2(jQuery.extend({},SecuPress.swal2Defaults,{title:modal_title,html:modal_content,type:null,width:400,showConfirmButton:!1,showCloseButton:!0,showCancelButton:!1,customClass:"wpmedia-swal2 secupress-swal2 secupress-swal-dark-header secupress-text-center"}))),function(e){"function"==typeof document.createElement("input").checkValidity?e(".affected-role-row :checkbox").on("click.secupress",function(){this.setCustomValidity(""),0===e('[name="'+this.name+'"]:checked').length&&(this.setCustomValidity(SecuPressi18nModules.selectOneRoleMinimum),e("#secupress-module-form-settings [type='submit']").first().trigger("click.secupress"))}):e(".affected-role-row p.warning").removeClass("hide-if-js")}(jQuery,(document,window)),function(e){e(".radiobox").on("click.secupress",function(){e('[name="'+this.name+'"]:checked').not(this).removeAttr("checked").trigger("change")})}(jQuery,(document,window)),function(r){var e=r("#wpbody-content").find('[class*="depends-"]'),o={},c={};r(".secupress-setting-row_move-login_slug-login").on("secupressbeforeshow secupressinitshow",function(){r("#move-login_slug-login").attr({required:"required","aria-required":"true"})}).on("secupressafterhide secupressinithide",function(){r("#move-login_slug-login").removeAttr("required aria-required")}),e.each(function(){var e=r(this).attr("class").replace(/^\s+|\s+$/g,"").replace(/\s+/," ").split(" ");r.each(e,function(e,s){var t,n,i,a=!1;if(0!==s.indexOf("depends-"))return!0;if(s=s.substr(8),void 0!==o[s])return!0;if(o[s]=1,!(t=r("#"+s)).length)return!0;if("input"===(i=t.get(0).nodeName.toLowerCase())?"checkbox"!==(n=t.attr("type").toLowerCase())&&"radio"!==n||(a=!0):"button"===i&&(a=!0),!a)return!0;if("button"===i)t.on("click.secupress",function(){var e=r(this).attr("id");r(this).toggleClass("open"),r(".depends-"+e).toggle(250)});else if("radio"===n){if(i=t.attr("name"),void 0!==c[i])return!0;c[i]=1,r('[name="'+i+'"]').on("change init.secupress",function(e){var s=r(this),t=r(".depends-"+s.attr("id")),n=[],e="init"===e.type&&"secupress"===e.namespace?0:250;t.not(":visible").trigger("secupressbeforeshow").show(e,function(){r(this).trigger("secupressaftershow")}),r('[name="'+s.attr("name")+'"]').not(s).each(function(){n.push(".depends-"+r(this).attr("id").replace(/^\s+|\s+$/g,""))}),r(n.join(",")).not(t).filter(":visible").trigger("secupressbeforehide").hide(e,function(){r(this).trigger("secupressafterhide")})}).filter(":checked").trigger("init.secupress")}else"checkbox"===n&&(t.on("change init.secupress",function(e){var s=r(this),n=s.attr("id"),t=r(".depends-"+n),i="init"===e.type&&"secupress"===e.namespace?0:250;if(!t.length)return!0;s.is(":checked")?t.not(":visible").trigger("secupressbeforeshow").show(i,function(){r(this).trigger("secupressaftershow")}):t.filter(":visible").each(function(){var e=r(this),s=e.attr("class").replace(/^\s+|\s+$/g,"").replace(/\s+/," ").split(" "),t=[];r.each(s,function(e,s){"depends-"+n!==s&&0===s.indexOf("depends-")&&t.push("#"+s.substr(8)+":checked")}),t=t.join(","),r(t).length||e.trigger("secupressbeforehide").hide(i,function(){r(this).trigger("secupressafterhide")})})}).filter(":checked").trigger("init.secupress"),t.is(":checked")?r(".depends-"+s).filter(":visible").trigger("secupressinitshow"):r(".depends-"+s).not(":visible").trigger("secupressinithide"))})})}(jQuery,(document,window)),function(a,s){var r={},o={};function c(e,s){a(s).closest(".secupress-text-label").find(".dynamic-login-url-slug").text(e)}SecuPressi18nModules.moveLoginNonce&&a(".dynamic-login-url-slug").closest(".secupress-text-label").find('[type="text"]').on("keyup",function(e){var t,n,i;return-1===a.inArray(e.which,[16,17,18,224,27])&&(n=(t=this).value.replace(/^\s+|\s+$/g,""),i=t.id.replace("move-login_slug-",""),o[t.id],s.clearTimeout(o[t.id]),"login"!==i&&(n=""===n?i:n),"string"==typeof r[n]?(c(r[n],t),!0):void(o[t.id]=s.setTimeout(function(){var s=a(t).addClass("ui-autocomplete-loading"),e={action:"sanitize_move_login_slug",slug:n,default:i,_wpnonce:SecuPressi18nModules.moveLoginNonce};a.getJSON(ajaxurl,e).done(function(e){a.isPlainObject(e)&&e.success?(r[n]=e.data,c(e.data,s)):c("--"+SecuPressi18nModules.error+"--",s)}).fail(function(){c("--"+SecuPressi18nModules.error+"--",s)}).always(function(){s.removeClass("ui-autocomplete-loading")})},300)))})}(jQuery,(document,window)),function(n,i){function a(e){n("#secupress-available-backups").text(e.data.countText)}function r(){0===n("#form-delete-backups").find(".secupress-large-row").length?(n("#form-delete-backups").hide(),n("#secupress-no-backups").show()):(n("#secupress-no-backups").hide(),n("#form-delete-backups").show())}function o(t,e){secupressDisableAjaxButton(t,SecuPressi18nModules.deletingAllText,"backup"),n.getJSON(e).done(function(e){var s;n.isPlainObject(e)&&e.success?(swal2.close(),e=(s=t.closest("form").find("fieldset")).children("legend"),s.text("").prepend(e),r(),secupressEnableAjaxButton(t,SecuPressi18nModules.deletedAllText,"backup")):secupressDisplayAjaxError(t,SecuPressi18nModules.deleteAllImpossible,"backup")}).fail(function(){secupressDisplayAjaxError(t,null,"backup")})}function c(s,e){secupressDisableAjaxButton(s,SecuPressi18nModules.deletingOneText,"backup"),n.getJSON(e).done(function(e){n.isPlainObject(e)&&e.success?(swal2.close(),s.closest(".secupress-large-row").css("backgroundColor",SecuPress.deletedRowColor).hide("normal",function(){n(this).remove(),a(e),r(),SecuPress.doingAjax.backup=!1}),wp.a11y&&wp.a11y.speak&&wp.a11y.speak(SecuPressi18nModules.deletedOneText)):secupressDisplayAjaxError(s,SecuPressi18nModules.deleteOneImpossible,"backup")}).fail(function(){secupressDisplayAjaxError(s,null,"backup")})}n("#submit-delete-backups").on("click.secupress",function(e){var s=n(this),t=secupressPreAjaxCall(s.closest("form").attr("action"),e);t&&("function"==typeof i.swal2?swal2(n.extend({},SecuPress.swal2Defaults,SecuPress.swal2ConfirmDefaults,{text:SecuPressi18nModules.confirmDeleteBackups,confirmButtonText:SecuPressi18nModules.yesDeleteAll,type:"question",reverseButtons:!0})).then(function(e){e&&(swal2.enableLoading(),o(s,t))}):i.confirm(SecuPressi18nModules.confirmTitle+"\n"+SecuPressi18nModules.confirmDeleteBackups)&&o(s,t))}).removeAttr("disabled aria-disabled"),n("body").on("click.secupress keyup",".a-delete-backup",function(e){var s=n(this),t=secupressPreAjaxCall(s.attr("href"),e);t&&("function"==typeof i.swal2?swal2(n.extend({},SecuPress.swal2Defaults,SecuPress.swal2ConfirmDefaults,{text:SecuPressi18nModules.confirmDeleteBackup,confirmButtonText:SecuPressi18nModules.yesDeleteOne,type:"question",reverseButtons:!0})).then(function(e){e&&(swal2.enableLoading(),c(s,t))}):i.confirm(SecuPressi18nModules.confirmTitle+"\n"+SecuPressi18nModules.confirmDeleteBackup)&&c(s,t))}),n("#submit-backup-db").on("click.secupress",function(e){var s,t=n(this),e=secupressPreAjaxCall(t.closest("form").attr("action"),e);e&&(e=e,secupressDisableAjaxButton(s=t,SecuPressi18nModules.backupingText,"backup"),n.post(e,s.closest("form").serializeArray()).done(function(e){n.isPlainObject(e)?e.success?(n(e.data.elemRow).addClass("hidden").css("backgroundColor",SecuPress.addedRowColor).insertAfter("#form-delete-backups legend").show("normal",function(){n(this).css("backgroundColor","")}),a(e),r(),secupressEnableAjaxButton(s,SecuPressi18nModules.backupedText,"backup")):(e.data=e.data||SecuPressi18nModules.backupImpossible,secupressDisplayAjaxError(s,e.data,"backup")):secupressDisplayAjaxError(s,SecuPressi18nModules.backupImpossible,"backup")}).fail(function(){secupressDisplayAjaxError(s,null,"backup")}))}).removeAttr("disabled aria-disabled"),n("#submit-backup-files").on("click.secupress",function(e){var s,t=n(this),e=secupressPreAjaxCall(t.closest("form").attr("action"),e);e&&(e=e,secupressDisableAjaxButton(s=t,SecuPressi18nModules.backupingText,"backup"),n.post(e,s.closest("form").serializeArray()).done(function(e){n.isPlainObject(e)?e.success?(n(e.data.elemRow).addClass("hidden").css("backgroundColor",SecuPress.addedRowColor).insertAfter("#form-delete-backups legend").show("normal",function(){n(this).css("backgroundColor","")}),a(e),r(),n("#ignored_directories").val(e.data.ignoredFiles),secupressEnableAjaxButton(s,SecuPressi18nModules.backupedText,"backup")):(e.data=e.data||SecuPressi18nModules.backupImpossible,secupressDisplayAjaxError(s,e.data,"backup")):secupressDisplayAjaxError(s,SecuPressi18nModules.backupImpossible,"backup")}).fail(function(){secupressDisplayAjaxError(s,null,"backup")}))}).removeAttr("disabled aria-disabled")}(jQuery,(document,window)),function(n){function s(e){var s=n("[data-code-country='"+e+"']").length,t=n("[data-code-country='"+e+"']:checked").length;t===s?n("[value='continent-"+e+"']").prop({checked:!0,indeterminate:!1}).css("-webkit-appearance","none"):0===t?n("[value='continent-"+e+"']").prop({checked:!1,indeterminate:!1}).css("-webkit-appearance","none"):n("[value='continent-"+e+"']").prop({checked:!1,indeterminate:!0}).css("-webkit-appearance","checkbox")}n(".continent input").on("click.secupress",function(e){var s=n(this),t=s.css("-webkit-appearance","none").val().replace("continent-","");n(".depends-geoip-system_type_blacklist.depends-geoip-system_type_whitelist [data-code-country='"+t+"']").prop("checked",s.is(":checked"))}),n("[data-code-country]").on("click.secupress",function(e){s(n(this).data("code-country"))}),n(".continent input").each(function(e){s(n(this).val().replace("continent-",""))}),n(".expand_country").on("click.secupress",function(e){n(this).next("fieldset").toggleClass("hide-if-js")})}(jQuery,(document,window)),function(c,t,u){var e,n,l=c("#banned-ips-row");function d(e,s){u!==e&&e||(e=SecuPressi18nModules.noBannedIPs),l.find("#secupress-banned-ips-list").html('
  • '+e+"
  • "),u!==s&&!s||(l.find("#secupress-clear-ips-button").next().addBack().addClass("hidden"),(s=l.find("#form-search-ip").addClass("hidden")).find("#reset-banned-ips-list").next().addBack().addClass("hidden"),s.find("#secupress-search-banned-ip").val(""))}function i(o,e){var s={ip:c("#secupress-ban-ip").val()};s.ip?(secupressDisableAjaxButton(o,null,"ban-ip"),c.getJSON(e,s).done(function(e){var s,t,n,i,a,r;if(c.isPlainObject(e)&&e.data&&c.isPlainObject(e.data)){if(!e.success)return a=e.data.message||null,void secupressDisplayAjaxError(o,a,"ban-ip");l.find("#secupress-banned-ips-list").children("#no-ips").remove(),s=e.data.tmplValues,t=!1,n=l.find("#secupress-banned-ips-list"),i='
  • %ip% (%time%)'+SecuPressi18nModules.delete+'
  • ',a=!c("#reset-banned-ips-list").hasClass("hidden"),r="",u!==t&&!t||(t=!0,n.html("")),u!==s&&s.length?(c.each(s,function(e,s){r+=i.replace(/%ip%/g,s.ip).replace(/%time%/g,s.time).replace(/%unban_url%/g,s.unban_url)}),n.append(r)):t&&("string"==typeof t?d(t):a?d(SecuPressi18nModules.IPnotFound,!1):d()),l.find("#form-search-ip").removeClass("hidden"),l.find("#secupress-clear-ips-button").next().addBack().removeClass("hidden"),secupressDisplayAjaxSuccess(o,e.data.message,"ban-ip")}else secupressDisplayAjaxError(o,SecuPressi18nModules.error,"ban-ip")}).fail(function(){secupressDisplayAjaxError(o,null,"ban-ip")})):a(o,e)}function a(s,t){swal2(c.extend({},SecuPress.swal2Defaults,SecuPress.swal2ConfirmDefaults,{title:e.find('[for="secupress-ban-ip"]').text(),confirmButtonText:s.data("original-i18n"),html:e,type:"info"})).then(function(e){e&&(swal2.enableLoading(),i(s,t))})}l.length&&(l.find("button").removeAttr("disabled aria-disabled"),e=l.find("#form-ban-ip").remove(),n=e.attr("action"),(e=e.children().wrapAll("
    ").parent()).find("[type='submit']").remove(),l.on("click.secupress keyup","#reset-banned-ips-list",function(e){var s=c(this),e=secupressPreAjaxCall(t.location.href,e,"ban-ip");e&&(secupressDisableAjaxButton(s,null,"ban-ip"),l.load(e+" #banned-ips-row > th, #banned-ips-row > td",function(){l.find("#form-ban-ip").remove(),l.find("#secupress-search-banned-ip").focus(),secupressEnableAjaxButton(s,SecuPressi18nModules.searchReset,"ban-ip")}))}),l.on("click.secupress keyup","#secupress-ban-ip-button",function(e){var s=c(this),e=secupressPreAjaxCall(n,e,"ban-ip");e&&(a(s,e),c("#secupress-ban-ip").focus().val(""))}),l.on("click.secupress keyup",".a-unban-ip",function(e){var n=c(this),e=secupressPreAjaxCall(n.attr("href"),e,"ban-ip");e&&(secupressDisableAjaxButton(n,null,"ban-ip"),c.getJSON(e).done(function(e){var s,t;if(c.isPlainObject(e)&&e.data&&c.isPlainObject(e.data)){if(!e.success)return t=e.data.message||null,void secupressDisplayAjaxError(n,t,"ban-ip");t=(s=n.closest(".secupress-large-row")).parent(),s.remove(),t.children().length||(c("#reset-banned-ips-list").hasClass("hidden")?d():d(SecuPressi18nModules.IPremoved,!1)),secupressDisplayAjaxSuccess(n,e.data.message,"ban-ip")}else secupressDisplayAjaxError(n,SecuPressi18nModules.error,"ban-ip")}).fail(function(){secupressDisplayAjaxError(n,null,"ban-ip")}))}),l.on("click.secupress keyup","#secupress-clear-ips-button",function(e){var t=c(this),e=secupressPreAjaxCall(t.attr("href"),e,"ban-ip");e&&(secupressDisableAjaxButton(t,null,"ban-ip"),c.getJSON(e).done(function(e){var s;t.siblings("#secupress-banned-ips-list");if(c.isPlainObject(e)&&e.data&&c.isPlainObject(e.data)){if(!e.success)return s=e.data.message||null,void secupressDisplayAjaxError(t,s,"ban-ip");d(),secupressDisplayAjaxSuccess(t,e.data.message,"ban-ip")}else secupressDisplayAjaxError(t,SecuPressi18nModules.error,"ban-ip")}).fail(function(){secupressDisplayAjaxError(t,null,"ban-ip")}))}))}(jQuery,document,void window),function(c,t,u){var e,n,l=c("#whitelist-ips-row");function d(e,s){u!==e&&e||(e=SecuPressi18nModules.noWhitelistIPs),l.find("#secupress-whitelist-ips-list").html('
  • '+e+"
  • "),u!==s&&!s||(l.find("#secupress-clear-whitelist-ips-button").next().addBack().addClass("hidden"),(s=l.find("#form-search-whitelist-ip").addClass("hidden")).find("#reset-whitelist-ips-list").next().addBack().addClass("hidden"),s.find("#secupress-search-whitelist-ip").val(""))}function i(o,e){var s={ip:c("#secupress-whitelist-ip").val()};s.ip?(secupressDisableAjaxButton(o,null,"whitelist-ip"),c.getJSON(e,s).done(function(e){var s,t,n,i,a,r;if(c.isPlainObject(e)&&e.data&&c.isPlainObject(e.data)){if(!e.success)return a=e.data.message||null,void secupressDisplayAjaxError(o,a,"whitelist-ip");l.find("#secupress-whitelist-ips-list").children("#no-whitelist-ips").remove(),s=e.data.tmplValues,t=!1,n=l.find("#secupress-whitelist-ips-list"),i='
  • %ip% '+SecuPressi18nModules.delete+'
  • ',a=!c("#reset-whitelist-ips-list").hasClass("hidden"),r="",u!==t&&!t||(t=!0,n.html("")),u!==s&&s.length?(c.each(s,function(e,s){r+=i.replace(/%ip%/g,s.ip).replace(/%unwhitelist_url%/g,s.unwhitelist_url)}),n.append(r)):t&&("string"==typeof t?d(t):a?d(SecuPressi18nModules.IPnotFound,!1):d()),l.find("#form-search-whitelist-ip").removeClass("hidden"),l.find("#secupress-clear-whitelist-ips-button").next().addBack().removeClass("hidden"),secupressDisplayAjaxSuccess(o,e.data.message,"whitelist-ip")}else secupressDisplayAjaxError(o,SecuPressi18nModules.error,"whitelist-ip")}).fail(function(){secupressDisplayAjaxError(o,null,"whitelist-ip")})):a(o,e)}function a(s,t){swal2(c.extend({},SecuPress.swal2Defaults,SecuPress.swal2ConfirmDefaults,{title:e.find('[for="secupress-whitelist-ip"]').text(),confirmButtonText:s.data("original-i18n"),html:e,type:"info"})).then(function(e){e&&(swal2.enableLoading(),i(s,t))})}l.length&&(l.find("button").removeAttr("disabled aria-disabled"),e=l.find("#form-whitelist-ip").remove(),n=e.attr("action"),(e=e.children().wrapAll("
    ").parent()).find("[type='submit']").remove(),l.on("click.secupress keyup","#reset-whitelist-ips-list",function(e){var s=c(this),e=secupressPreAjaxCall(t.location.href,e,"whitelist-ip");e&&(secupressDisableAjaxButton(s,null,"whitelist-ip"),l.load(e+" #whitelist-ips-row > th, #whitelist-ips-row > td",function(){l.find("#form-whitelist-ip").remove(),l.find("#secupress-search-whitelist-ip").focus(),secupressEnableAjaxButton(s,SecuPressi18nModules.searchReset,"whitelist-ip")}))}),l.on("click.secupress keyup","#secupress-whitelist-ip-button",function(e){var s=c(this),e=secupressPreAjaxCall(n,e,"whitelist-ip");e&&(a(s,e),c("#secupress-whitelist-ip").focus().val(""))}),l.on("click.secupress keyup",".a-unwhitelist-ip",function(e){var n=c(this),e=secupressPreAjaxCall(n.attr("href"),e,"whitelist-ip");e&&(secupressDisableAjaxButton(n,null,"whitelist-ip"),c.getJSON(e).done(function(e){var s,t;if(c.isPlainObject(e)&&e.data&&c.isPlainObject(e.data)){if(!e.success)return t=e.data.message||null,void secupressDisplayAjaxError(n,t,"whitelist-ip");t=(s=n.closest(".secupress-large-row")).parent(),s.remove(),t.children().length||(c("#reset-whitelist-ips-list").hasClass("hidden")?d():d(SecuPressi18nModules.IPremoved,!1)),secupressDisplayAjaxSuccess(n,e.data.message,"whitelist-ip")}else secupressDisplayAjaxError(n,SecuPressi18nModules.error,"whitelist-ip")}).fail(function(){secupressDisplayAjaxError(n,null,"whitelist-ip")}))}),l.on("click.secupress keyup","#secupress-clear-whitelist-ips-button",function(e){var t=c(this),e=secupressPreAjaxCall(t.attr("href"),e,"whitelist-ip");e&&(secupressDisableAjaxButton(t,null,"whitelist-ip"),c.getJSON(e).done(function(e){var s;t.siblings("#secupress-whitelist-ips-list");if(c.isPlainObject(e)&&e.data&&c.isPlainObject(e.data)){if(!e.success)return s=e.data.message||null,void secupressDisplayAjaxError(t,s,"whitelist-ip");d(),secupressDisplayAjaxSuccess(t,e.data.message,"whitelist-ip")}else secupressDisplayAjaxError(t,SecuPressi18nModules.error,"whitelist-ip")}).fail(function(){secupressDisplayAjaxError(t,null,"whitelist-ip")}))}))}(jQuery,document,void window),function(o){var c,u={},e={},s=o(".secupress-textarea-container");e.msie=/msie/.test(navigator.userAgent.toLowerCase()),e.opera=/opera/.test(navigator.userAgent.toLowerCase()),c=!(e.msie||e.opera),u.resize=function(e,s){var t,n,i,a=(e=e.target||e).value.length,r=e.offsetWidth;return a===e.valLength&&r===e.boxWidth||(c&&(ai.height()&&i.next()?u.handleExpandButton(i,!0):e.scrollHeight<=i.height()&&0===i.next(".secupress-expand-trigger-container").find(".open").length&&u.handleExpandButton(i,!1)),!0},u.textareaParentHeight=function(e,s){return e.css("height",s.outerHeight()+e.outerHeight()-e.height()),!0},u.handleExpandButton=function(e,s){!e.next(".secupress-expand-trigger-container").length&&s?e.after(SecuPress.expandButton).attr("spellcheck",!1):e.next(".secupress-expand-trigger-container").length&&!1===s&&e.next(".secupress-expand-trigger-container").remove()},o.fn.AutoSized=function(e,s){return this.each(function(){"textarea"===this.nodeName.toLowerCase()&&(this.expandMin=e||0,this.expandMax=s||99999,u.resize(this,this.Initialized),this.Initialized||(this.Initialized=!0,o(this).css({"padding-top":"0","padding-bottom":"0"}).on("keyup.secupress focus.secupress",u.resize)))}),this},o.fn.focusToEnd=function(){return this.each(function(){var e=o(this).val();o(this).focus().val("").val(e)})},s.filter(":visible").find("textarea").AutoSized().on("focus.secupress",function(){o(this).parent().addClass("textarea-focused")}).on("blur.secupress",function(){o(this).parent().removeClass("textarea-focused")}),o("#wpbody-content").find(".secupress-setting-row").on("secupressaftershow",function(){o(this).find(".secupress-textarea-container").find("textarea").AutoSized().on("focus.secupress",function(){o(this).parent().addClass("textarea-focused")}).on("blur.secupress",function(){o(this).parent().removeClass("textarea-focused")})}),s.closest("label, .secupress-setting-content-col").on("click.secupress",".secupress-expand-trigger",function(){var e=o(this),s=e.closest(".secupress-expand-trigger-container").prev(".secupress-textarea-container"),t=s.find("textarea");return e.hasClass("open")?(s.css("height","200px"),e.removeClass("open"),e.find(".secupress-expand-txt").text(SecuPressi18nModules.expandTextOpen),e.find("i").removeClass("secupress-icon-angle-up").addClass("secupress-icon-angle-down"),o("html, body").animate({scrollTop:s.offset().top-80},275)):(u.textareaParentHeight(s,t),t.focusToEnd(),e.addClass("open"),e.find(".secupress-expand-txt").text(SecuPressi18nModules.expandTextClose),e.find("i").removeClass("secupress-icon-angle-down").addClass("secupress-icon-angle-up")),!1})}(jQuery),function(t){t("fieldset.secupress-boxed-group").each(function(){var s=t(this);s.data("height",s.outerHeight()).css("height",200).after(SecuPress.expandButton),s.next(".secupress-expand-trigger-container").on("click.secupress",function(){var e=t(this);return e.hasClass("open")?(s.css("height",200),e.removeClass("open"),e.find(".secupress-expand-txt").text(SecuPressi18nModules.expandTextOpen),e.find("i").removeClass("secupress-icon-angle-up").addClass("secupress-icon-angle-down"),t("html, body").animate({scrollTop:s.offset().top-80},275)):(s.css("height",s.data("height")),e.addClass("open"),e.find(".secupress-expand-txt").text(SecuPressi18nModules.expandTextClose),e.find("i").removeClass("secupress-icon-angle-down").addClass("secupress-icon-angle-up")),!1})})}(jQuery),function(t,n){void 0!==SecuPressi18nModules&&"on"===SecuPressi18nModules.malwareScanStatus&&(window.stop(),function s(){var e={action:"secupress_malwareScanStatus",_wpnonce:t("#secupress-scanner-info").data("nonce")};t.getJSON(ajaxurl,e).done(function(e){e.success?e.data.malwareScanStatus?n.location.href=SecuPressi18nModules.MalwareScanURI:(setTimeout(s,15e3),timer=15/e.data.currentItems.length*1e3,e.data.currentItems.forEach((e,s)=>{setTimeout(function(){t("#secupress-scanner-info code").text(e)},timer*(s+1))})):t("#secupress-scanner-info code").parent().parent().text(SecuPressi18nModules.malwareScanError)})}())}(jQuery,(document,window)),function(n){var i=n.propHooks.checked;n.propHooks.checked={set:function(e,s,t){t=void 0===i?e[t]=s:i(e,s,t);return n(e).trigger("change.secupress"),t}},n(".secupress-toggle-sort").css("cursor","pointer").on("click",function(e){var s=n(this).data("file");n(this).toggleClass("dashicons-arrow-right dashicons-arrow-down"),n(".secupress-toggle-me."+s).toggle("fast")});var s=0;n(".secupress-toggle-sort-all").css("cursor","pointer").on("click",function(e){s=0===s?(n(this).next("ul").find(".secupress-toggle-me").show("fast"),n(this).next("ul").find("li span.dashicons-arrow-right").toggleClass("dashicons-arrow-right dashicons-arrow-down"),1):(n(this).next("ul").find(".secupress-toggle-me").hide("fast"),n(this).next("ul").find("li span.dashicons-arrow-down").toggleClass("dashicons-arrow-right dashicons-arrow-down"),0)})}((window,document,jQuery)),function(t){t(".secupress-fieldset-item-checkboxes").each(function(){var e=t(this).find("input"),s=e.closest("label");e.filter(":checked").length&&s.addClass("is-checked"),e.on("change",function(){e.filter(":checked").length?s.addClass("is-checked"):s.removeClass("is-checked")})})}(jQuery,(document,window)),function(t){t(".secupressicon-reset").on("click",function(e){var s=this;e.preventDefault(),swal2(t.extend({},SecuPress.swal2Defaults,SecuPress.swal2ConfirmDefaults,{text:SecuPressi18nModules.resetDefault,type:"question",reverseButtons:!0})).then(function(e){return!!e&&void(window.location=t(s).attr("href"))})})}(jQuery,(document,window)),function(t){t("#secupress-regen-keys").on("click",function(e){var s=this;e.preventDefault(),swal2(t.extend({},SecuPress.swal2Defaults,SecuPress.swal2ConfirmDefaults,{text:SecuPressi18nModules.regenKeys,type:"question",reverseButtons:!0})).then(function(e){return!!e&&void(window.location=t(s).attr("href"))})})}(jQuery,(document,window)),function(s){s("#captcha_activate").length&&(params={action:"secupress_test_captcha_random_string_action--"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)},s.getJSON(ajaxurl,params).always(function(e){"0"===e.responseText&&400===e.status&&(s("#captcha_activate").prop("disabled",!1).parent().removeClass("disabled").parent().next().hide(),s("#captcha_activate").prop("checked",1==s("#captcha_activate").data("value")))}))}(jQuery,(document,window)),function(t){t('[name="secupress_wordpress-core_settings[database_db_prefix]"]').on("keypress",function(e){/[a-z0-9_]|i/.test(e.key)||e.preventDefault()}),t('[name="secupress_wordpress-core_settings[database_db_prefix]"]').on("blur",function(e){"wp_"!==t(this).val()&&"wordpress_"!==t(this).val()||t(this).val("")}),t('[name="secupress_wordpress-core_settings[database_db_prefix]"]').on("paste",function(e){e=e.originalEvent.clipboardData.getData("Text");/^([a-z0-9_]{1,})$/.test(e)||setTimeout(function(){t("[type='submit']:first").trigger("click"),t('[name="secupress_wordpress-core_settings[database_db_prefix]"]').focus().select()},10)}),t("#secupress-database-prefix-generate").on("click",function(e){var s=(s=Math.random().toString(36)+Math.random().toString(36)).replace(/[^a-zA-Z]+/g,"").substr(0,5);t('[name="secupress_wordpress-core_settings[database_db_prefix]"]').val("wp_"+s+"_").focus()})}(jQuery,(document,window));