Version Description
- New: Feature to save presets configurations of the Defender's settings, and make them available to download and apply to your other sites.
- New: Add tutorials section in the Defender dashboard.
- Improvement: Allow to bulk delete suspicious files
- Improvement: Improve the logic of how "Include sub-domains" option should be shown on the Strict Transport Security header
- Fix: Prevent wp-signup.php to access when Mask Login is enabled.
- Fix: 2FA login does not redirect correctly after login via the my-account page of Woocommerce
- Remove: Change default database prefix, as this can be bypass.
- Other minor enhancements and fixes
Download this release
Release Info
Developer | rickjc89 |
Plugin | Defender Security – Malware Scanner, Login Security & Firewall |
Version | 2.3.1 |
Comparing to | |
See all releases |
Code changes from version 2.3 to 2.3.1
- app/behavior/utils.php +105 -90
- app/behavior/wpmudev.php +76 -0
- app/component/data-factory.php +9 -1
- app/controller/dashboard.php +77 -3
- app/module/advanced-tools/component/mask-api.php +1 -0
- app/module/advanced-tools/component/mask-login-listener.php +38 -40
- app/module/advanced-tools/component/security-headers/sh-strict-transport.php +20 -6
- app/module/advanced-tools/controller/rest.php +1 -1
- app/module/advanced-tools/model/mask-settings.php +34 -6
- app/module/advanced-tools/model/security-headers-settings.php +64 -11
- app/module/hardener.php +8 -7
- app/module/hardener/controller/main.php +51 -43
- app/module/hardener/model/settings.php +211 -81
- app/module/ip-lockout/controller/rest.php +59 -47
- app/module/ip-lockout/model/log-model.php +47 -28
- app/module/ip-lockout/model/settings.php +185 -118
- app/module/scan/controller/main.php +97 -91
- app/module/scan/controller/rest.php +68 -42
- app/module/scan/model/settings.php +132 -58
- app/module/setting.php +1 -1
- app/module/setting/component/backup-settings.php +369 -19
- app/module/setting/controller/main.php +20 -5
- app/module/setting/controller/rest.php +297 -4
- app/module/setting/model/settings.php +37 -15
- app/module/two-factor/model/auth-settings.php +59 -28
- assets/app/advanced-tools.js +1 -1
- assets/app/audit.js +1 -1
- assets/app/dashboard.js +1 -1
- assets/app/ip-lockout.js +0 -1
app/behavior/utils.php
CHANGED
@@ -45,14 +45,12 @@ class Utils extends Behavior {
|
|
45 |
$post_vars['timeout'] = 30;
|
46 |
$post_vars['httpversion'] = '1.1';
|
47 |
|
48 |
-
$
|
49 |
-
|
50 |
$post_vars['headers'] = array_merge( $headers, array(
|
51 |
'Authorization' => 'Basic ' . $api_key
|
52 |
) );
|
53 |
|
54 |
-
$post_vars = array_merge( $post_vars, $requestArgs );
|
55 |
-
|
56 |
$response = wp_remote_request( $endPoint,
|
57 |
apply_filters( 'wd_wpmudev_call_request_args',
|
58 |
$post_vars ) );
|
@@ -67,9 +65,10 @@ class Utils extends Behavior {
|
|
67 |
|
68 |
if (
|
69 |
'OK' !== wp_remote_retrieve_response_message( $response )
|
70 |
-
|
71 |
) {
|
72 |
-
return new \WP_Error( wp_remote_retrieve_response_code( $response ),
|
|
|
73 |
} else {
|
74 |
$data = wp_remote_retrieve_body( $response );
|
75 |
|
@@ -77,7 +76,8 @@ class Utils extends Behavior {
|
|
77 |
}
|
78 |
} else {
|
79 |
return new \WP_Error( 'dashboard_required',
|
80 |
-
sprintf( esc_html__( "WPMU DEV Dashboard will be required for this action. Please visit <a href=\"%s\">here</a> and install the WPMU DEV Dashboard",
|
|
|
81 |
, 'https://premium.wpmudev.org/project/wpmu-dev-dashboard/' ) );
|
82 |
}
|
83 |
}
|
@@ -172,6 +172,8 @@ class Utils extends Behavior {
|
|
172 |
}
|
173 |
|
174 |
/**
|
|
|
|
|
175 |
* @param null $user_id
|
176 |
*
|
177 |
* @return string
|
@@ -198,30 +200,6 @@ class Utils extends Behavior {
|
|
198 |
return $fullname;
|
199 |
}
|
200 |
|
201 |
-
/**
|
202 |
-
* @return array
|
203 |
-
*/
|
204 |
-
public function allowedHtml() {
|
205 |
-
return array(
|
206 |
-
'p' => array(),
|
207 |
-
'i' => array(
|
208 |
-
'class' => 'wd-text-warning wdv-icon wdv-icon-fw wdv-icon-exclamation-sign'
|
209 |
-
),
|
210 |
-
'strong' => array(),
|
211 |
-
'span' => array(
|
212 |
-
'class' => array(
|
213 |
-
'wd-suspicious-strong',
|
214 |
-
'wd-suspicious-light',
|
215 |
-
'wd-suspicious-medium'
|
216 |
-
)
|
217 |
-
),
|
218 |
-
'img' => array(
|
219 |
-
'class' => 'text-warning',
|
220 |
-
'src' => wp_defender()->getPluginUrl() . 'assets/img/robot.png'
|
221 |
-
)
|
222 |
-
);
|
223 |
-
}
|
224 |
-
|
225 |
/**
|
226 |
* @param $get_avatar
|
227 |
*
|
@@ -530,7 +508,8 @@ class Utils extends Behavior {
|
|
530 |
for ( $i = 0; $i < 24; $i ++ ) {
|
531 |
foreach ( apply_filters( 'wd_scan_get_times_interval', array( '00', '30' ) ) as $min ) {
|
532 |
$time = $i . ':' . $min;
|
533 |
-
$data[ $time ] = apply_filters( 'wd_scan_get_times_hour_min',
|
|
|
534 |
}
|
535 |
}
|
536 |
|
@@ -553,7 +532,7 @@ class Utils extends Behavior {
|
|
553 |
*/
|
554 |
public function determineServer( $useStaticPath = false ) {
|
555 |
$url = ( $useStaticPath ) ? wp_defender()->getPluginUrl() . 'changelog.txt' : home_url();
|
556 |
-
$server_type =
|
557 |
if ( ! is_array( $server_type ) ) {
|
558 |
$server_type = array();
|
559 |
}
|
@@ -566,7 +545,8 @@ class Utils extends Behavior {
|
|
566 |
global $is_apache, $is_nginx, $is_IIS, $is_iis7;
|
567 |
|
568 |
$server = null;
|
569 |
-
$ssl_verify = apply_filters( 'defender_ssl_verify',
|
|
|
570 |
|
571 |
if ( $is_nginx ) {
|
572 |
$server = 'nginx';
|
@@ -577,7 +557,7 @@ class Utils extends Behavior {
|
|
577 |
} else {
|
578 |
//so the server software is apache, let see what the header return
|
579 |
$request = wp_remote_head( $url, array(
|
580 |
-
'user-agent' =>
|
581 |
'sslverify' => $ssl_verify
|
582 |
) );
|
583 |
$server = wp_remote_retrieve_header( $request, 'server' );
|
@@ -593,10 +573,11 @@ class Utils extends Behavior {
|
|
593 |
$server = 'iis';
|
594 |
}
|
595 |
|
596 |
-
if ( is_null( $server ) ) {
|
597 |
//if fall in here, means there is st unknowed.
|
|
|
598 |
$request = wp_remote_head( $url, array(
|
599 |
-
'user-agent' =>
|
600 |
'sslverify' => $ssl_verify
|
601 |
) );
|
602 |
$server = wp_remote_retrieve_header( $request, 'server' );
|
@@ -605,8 +586,7 @@ class Utils extends Behavior {
|
|
605 |
}
|
606 |
|
607 |
$server_type[ $url ] = $server;
|
608 |
-
|
609 |
-
set_site_transient( 'wd_util_server', $server_type, 3600 );
|
610 |
|
611 |
return $server;
|
612 |
}
|
@@ -654,7 +634,19 @@ class Utils extends Behavior {
|
|
654 |
return $version;
|
655 |
}
|
656 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
657 |
/**
|
|
|
658 |
* @return string
|
659 |
*/
|
660 |
public function getDefUploadDir() {
|
@@ -672,6 +664,16 @@ class Utils extends Behavior {
|
|
672 |
return $defDir;
|
673 |
}
|
674 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
675 |
/**
|
676 |
* @return array|void
|
677 |
*/
|
@@ -679,35 +681,6 @@ class Utils extends Behavior {
|
|
679 |
return false;
|
680 |
}
|
681 |
|
682 |
-
/**
|
683 |
-
* We will need to convert mo translate into json for frontend can read
|
684 |
-
*
|
685 |
-
* @param $handle
|
686 |
-
*/
|
687 |
-
public function createTranslationJson( $handle ) {
|
688 |
-
$locale = determine_locale();
|
689 |
-
$mo_file = "wpdef-{$locale}.mo";
|
690 |
-
$mo_path = wp_defender()->getPluginPath() . 'languages/' . $mo_file;
|
691 |
-
$json_path = wp_defender()->getPluginPath() . 'languages/' . "wpdef-{$locale}-{$handle}.json";
|
692 |
-
if ( file_exists( $json_path ) ) {
|
693 |
-
$data = json_decode( $json_path, true );
|
694 |
-
if ( isset( $data['version'] ) ) {
|
695 |
-
return;
|
696 |
-
}
|
697 |
-
}
|
698 |
-
if ( ! file_exists( $mo_path ) ) {
|
699 |
-
//no translation found
|
700 |
-
return;
|
701 |
-
}
|
702 |
-
//import from mo
|
703 |
-
$translations = new \Gettext\Translations();
|
704 |
-
\Gettext\Extractors\Mo::fromFile( $mo_path, $translations );
|
705 |
-
$translations->setDomain( 'messages' );
|
706 |
-
$translations->setLanguage( get_locale() );
|
707 |
-
//export to json
|
708 |
-
Jed::toFile( $translations, $json_path );
|
709 |
-
}
|
710 |
-
|
711 |
/**
|
712 |
* @param null $result
|
713 |
*
|
@@ -757,7 +730,6 @@ class Utils extends Behavior {
|
|
757 |
return $text;
|
758 |
}
|
759 |
|
760 |
-
|
761 |
/**
|
762 |
* List server types
|
763 |
*
|
@@ -815,6 +787,37 @@ class Utils extends Behavior {
|
|
815 |
return $url;
|
816 |
}
|
817 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
818 |
/**
|
819 |
* @return string
|
820 |
*/
|
@@ -1097,7 +1100,12 @@ class Utils extends Behavior {
|
|
1097 |
|
1098 |
return $country_array;
|
1099 |
}
|
1100 |
-
|
|
|
|
|
|
|
|
|
|
|
1101 |
public function removeDir( $dir ) {
|
1102 |
if ( ! is_dir( $dir ) ) {
|
1103 |
return;
|
@@ -1112,17 +1120,19 @@ class Utils extends Behavior {
|
|
1112 |
$res = @unlink( $file->getRealPath() );
|
1113 |
}
|
1114 |
if ( $res == false ) {
|
1115 |
-
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
|
|
1116 |
}
|
1117 |
}
|
1118 |
$res = @rmdir( $dir );
|
1119 |
if ( $res == false ) {
|
1120 |
-
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
|
|
1121 |
}
|
1122 |
-
|
1123 |
return true;
|
1124 |
}
|
1125 |
-
|
1126 |
public function parseDomain( $domain ) {
|
1127 |
//FILTER_VALIDATE_DOMAIN filter will be added in PHP 7
|
1128 |
$filter_domain = version_compare( PHP_VERSION, '7.0', '>=' ) ? FILTER_VALIDATE_DOMAIN : FILTER_VALIDATE_URL;
|
@@ -1133,6 +1143,8 @@ class Utils extends Behavior {
|
|
1133 |
if ( $suffix == false ) {
|
1134 |
return false;
|
1135 |
}
|
|
|
|
|
1136 |
$host = parse_url( $domain, PHP_URL_HOST );
|
1137 |
$host_without_tld = str_replace( $suffix, '', $host );
|
1138 |
//remove righter . if any
|
@@ -1146,14 +1158,14 @@ class Utils extends Behavior {
|
|
1146 |
}
|
1147 |
//parse to get the root & subdomain
|
1148 |
$domain = array_pop( $parts );
|
1149 |
-
|
1150 |
return [
|
1151 |
'host' => $host,
|
1152 |
'tld' => $suffix,
|
1153 |
'subdomain' => str_replace( $domain, '', $host_without_tld ),
|
1154 |
];
|
1155 |
}
|
1156 |
-
|
1157 |
private function getDomainSuffix( $domain ) {
|
1158 |
$tlds = include dirname( __DIR__ ) . '/component/public-suffix.php';
|
1159 |
//whitelist development
|
@@ -1182,42 +1194,45 @@ class Utils extends Behavior {
|
|
1182 |
if ( empty( $list ) ) {
|
1183 |
return false;
|
1184 |
}
|
1185 |
-
|
1186 |
//the lenghter will be use
|
1187 |
return $list[0];
|
1188 |
}
|
1189 |
-
|
1190 |
-
public function log( $log ) {
|
1191 |
if ( ! defined( 'DEFENDER_DEBUG' ) ) {
|
1192 |
return;
|
1193 |
}
|
1194 |
$log_path = self::getDefUploadDir();
|
1195 |
-
$log_name = hash( 'sha256', network_home_url() . SECURE_AUTH_SALT );
|
1196 |
$log_path = $log_path . '/' . $log_name;
|
1197 |
-
|
1198 |
$log = sprintf( '%s - %s' . PHP_EOL, date( 'Y-m-d H:i:s', current_time( 'timestamp' ) ), $log );
|
1199 |
file_put_contents( $log_path, $log, FILE_APPEND );
|
1200 |
}
|
1201 |
-
|
1202 |
-
public function read_log() {
|
1203 |
if ( ! defined( 'DEFENDER_DEBUG' ) ) {
|
1204 |
return;
|
1205 |
}
|
1206 |
$log_path = self::getDefUploadDir();
|
1207 |
-
$log_name = hash( 'sha256', network_home_url() . SECURE_AUTH_SALT );
|
1208 |
$log_path = $log_path . '/' . $log_name;
|
1209 |
-
|
1210 |
-
|
|
|
|
|
|
|
1211 |
return implode( array_reverse( $text ), PHP_EOL );
|
1212 |
}
|
1213 |
-
|
1214 |
-
public function clear_log() {
|
1215 |
if ( ! defined( 'DEFENDER_DEBUG' ) ) {
|
1216 |
return;
|
1217 |
}
|
1218 |
$log_path = self::getDefUploadDir();
|
1219 |
-
$log_name = hash( 'sha256', network_home_url() . SECURE_AUTH_SALT );
|
1220 |
$log_path = $log_path . '/' . $log_name;
|
1221 |
@unlink( $log_path );
|
1222 |
}
|
1223 |
-
}
|
45 |
$post_vars['timeout'] = 30;
|
46 |
$post_vars['httpversion'] = '1.1';
|
47 |
|
48 |
+
$post_vars = array_merge( $post_vars, $requestArgs );
|
49 |
+
$headers = isset( $post_vars['headers'] ) ? $post_vars['headers'] : array();
|
50 |
$post_vars['headers'] = array_merge( $headers, array(
|
51 |
'Authorization' => 'Basic ' . $api_key
|
52 |
) );
|
53 |
|
|
|
|
|
54 |
$response = wp_remote_request( $endPoint,
|
55 |
apply_filters( 'wd_wpmudev_call_request_args',
|
56 |
$post_vars ) );
|
65 |
|
66 |
if (
|
67 |
'OK' !== wp_remote_retrieve_response_message( $response )
|
68 |
+
or 200 !== wp_remote_retrieve_response_code( $response )
|
69 |
) {
|
70 |
+
return new \WP_Error( wp_remote_retrieve_response_code( $response ),
|
71 |
+
wp_remote_retrieve_response_message( $response ) );
|
72 |
} else {
|
73 |
$data = wp_remote_retrieve_body( $response );
|
74 |
|
76 |
}
|
77 |
} else {
|
78 |
return new \WP_Error( 'dashboard_required',
|
79 |
+
sprintf( esc_html__( "WPMU DEV Dashboard will be required for this action. Please visit <a href=\"%s\">here</a> and install the WPMU DEV Dashboard",
|
80 |
+
"defender-security" )
|
81 |
, 'https://premium.wpmudev.org/project/wpmu-dev-dashboard/' ) );
|
82 |
}
|
83 |
}
|
172 |
}
|
173 |
|
174 |
/**
|
175 |
+
* Get user display name if logged in, or Guest instead
|
176 |
+
*
|
177 |
* @param null $user_id
|
178 |
*
|
179 |
* @return string
|
200 |
return $fullname;
|
201 |
}
|
202 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
203 |
/**
|
204 |
* @param $get_avatar
|
205 |
*
|
508 |
for ( $i = 0; $i < 24; $i ++ ) {
|
509 |
foreach ( apply_filters( 'wd_scan_get_times_interval', array( '00', '30' ) ) as $min ) {
|
510 |
$time = $i . ':' . $min;
|
511 |
+
$data[ $time ] = apply_filters( 'wd_scan_get_times_hour_min',
|
512 |
+
strftime( '%I:%M %p', strtotime( $time ) ) );
|
513 |
}
|
514 |
}
|
515 |
|
532 |
*/
|
533 |
public function determineServer( $useStaticPath = false ) {
|
534 |
$url = ( $useStaticPath ) ? wp_defender()->getPluginUrl() . 'changelog.txt' : home_url();
|
535 |
+
$server_type = get_site_option( 'wd_util_server' );
|
536 |
if ( ! is_array( $server_type ) ) {
|
537 |
$server_type = array();
|
538 |
}
|
545 |
global $is_apache, $is_nginx, $is_IIS, $is_iis7;
|
546 |
|
547 |
$server = null;
|
548 |
+
$ssl_verify = apply_filters( 'defender_ssl_verify',
|
549 |
+
true ); //most hosts dont really have valid ssl or ssl still pending
|
550 |
|
551 |
if ( $is_nginx ) {
|
552 |
$server = 'nginx';
|
557 |
} else {
|
558 |
//so the server software is apache, let see what the header return
|
559 |
$request = wp_remote_head( $url, array(
|
560 |
+
'user-agent' => 'WP Defender self ping - determine server type',
|
561 |
'sslverify' => $ssl_verify
|
562 |
) );
|
563 |
$server = wp_remote_retrieve_header( $request, 'server' );
|
573 |
$server = 'iis';
|
574 |
}
|
575 |
|
576 |
+
if ( is_null( $server ) && ( php_sapi_name() !== 'cli' ) ) {
|
577 |
//if fall in here, means there is st unknowed.
|
578 |
+
//we need to check there is not cli evn
|
579 |
$request = wp_remote_head( $url, array(
|
580 |
+
'user-agent' => 'WP Defender self ping - determine server type',
|
581 |
'sslverify' => $ssl_verify
|
582 |
) );
|
583 |
$server = wp_remote_retrieve_header( $request, 'server' );
|
586 |
}
|
587 |
|
588 |
$server_type[ $url ] = $server;
|
589 |
+
update_site_option( 'wd_util_server', $server_type );
|
|
|
590 |
|
591 |
return $server;
|
592 |
}
|
634 |
return $version;
|
635 |
}
|
636 |
|
637 |
+
public function format_frequency_for_hub( $frequency, $day, $time ) {
|
638 |
+
$time = strftime( '%I:%M %p', strtotime( $time ) );
|
639 |
+
if ( 1 == $frequency ) {
|
640 |
+
return 'Daily at ' . $time;
|
641 |
+
} elseif ( 7 == $frequency ) {
|
642 |
+
return 'Weekly on ' . $day . ' at ' . $time;
|
643 |
+
} elseif ( 30 == $frequency ) {
|
644 |
+
return 'Monthly on ';
|
645 |
+
}
|
646 |
+
}
|
647 |
+
|
648 |
/**
|
649 |
+
* Return /wp-content/uploads/wp-defender dir, and create if not any
|
650 |
* @return string
|
651 |
*/
|
652 |
public function getDefUploadDir() {
|
664 |
return $defDir;
|
665 |
}
|
666 |
|
667 |
+
public function recipientsToString( $recipients ) {
|
668 |
+
$strings = [];
|
669 |
+
foreach ( $recipients as $recipient ) {
|
670 |
+
$strings[] = $recipient['email'];
|
671 |
+
}
|
672 |
+
|
673 |
+
return implode( ', ', $strings );
|
674 |
+
}
|
675 |
+
|
676 |
+
|
677 |
/**
|
678 |
* @return array|void
|
679 |
*/
|
681 |
return false;
|
682 |
}
|
683 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
684 |
/**
|
685 |
* @param null $result
|
686 |
*
|
730 |
return $text;
|
731 |
}
|
732 |
|
|
|
733 |
/**
|
734 |
* List server types
|
735 |
*
|
787 |
return $url;
|
788 |
}
|
789 |
|
790 |
+
/**
|
791 |
+
* We will need to convert mo translate into json for frontend can read
|
792 |
+
*
|
793 |
+
* @param $handle
|
794 |
+
*/
|
795 |
+
public function createTranslationJson( $handle ) {
|
796 |
+
$locale = determine_locale();
|
797 |
+
$mo_file = "wpdef-{$locale}.mo";
|
798 |
+
$mo_path = wp_defender()->getPluginPath() . 'languages/' . $mo_file;
|
799 |
+
$json_path = wp_defender()->getPluginPath() . 'languages/' . "wpdef-{$locale}-{$handle}.json";
|
800 |
+
if ( file_exists( $json_path ) ) {
|
801 |
+
$data = json_decode( file_get_contents( $json_path ), true );
|
802 |
+
if ( isset( $data['version'] ) ) {
|
803 |
+
return;
|
804 |
+
}
|
805 |
+
@unlink( $json_path );
|
806 |
+
}
|
807 |
+
|
808 |
+
if ( ! file_exists( $mo_path ) ) {
|
809 |
+
//no translation found
|
810 |
+
return;
|
811 |
+
}
|
812 |
+
//import from mo
|
813 |
+
$translations = new \Gettext\Translations();
|
814 |
+
\Gettext\Extractors\Mo::fromFile( $mo_path, $translations );
|
815 |
+
$translations->setDomain( 'messages' );
|
816 |
+
$translations->setLanguage( get_locale() );
|
817 |
+
//export to json
|
818 |
+
Jed::toFile( $translations, $json_path );
|
819 |
+
}
|
820 |
+
|
821 |
/**
|
822 |
* @return string
|
823 |
*/
|
1100 |
|
1101 |
return $country_array;
|
1102 |
}
|
1103 |
+
|
1104 |
+
/**
|
1105 |
+
* @param $dir
|
1106 |
+
*
|
1107 |
+
* @return bool|void|\WP_Error
|
1108 |
+
*/
|
1109 |
public function removeDir( $dir ) {
|
1110 |
if ( ! is_dir( $dir ) ) {
|
1111 |
return;
|
1120 |
$res = @unlink( $file->getRealPath() );
|
1121 |
}
|
1122 |
if ( $res == false ) {
|
1123 |
+
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
1124 |
+
__( "Defender doesn't have enough permission to remove this file", "defender-security" ) );
|
1125 |
}
|
1126 |
}
|
1127 |
$res = @rmdir( $dir );
|
1128 |
if ( $res == false ) {
|
1129 |
+
return new \WP_Error( Error_Code::NOT_WRITEABLE,
|
1130 |
+
__( "Defender doesn't have enough permission to remove this file", "defender-security" ) );
|
1131 |
}
|
1132 |
+
|
1133 |
return true;
|
1134 |
}
|
1135 |
+
|
1136 |
public function parseDomain( $domain ) {
|
1137 |
//FILTER_VALIDATE_DOMAIN filter will be added in PHP 7
|
1138 |
$filter_domain = version_compare( PHP_VERSION, '7.0', '>=' ) ? FILTER_VALIDATE_DOMAIN : FILTER_VALIDATE_URL;
|
1143 |
if ( $suffix == false ) {
|
1144 |
return false;
|
1145 |
}
|
1146 |
+
//exclude 'www.'
|
1147 |
+
$domain = str_replace( 'www.', '', $domain );
|
1148 |
$host = parse_url( $domain, PHP_URL_HOST );
|
1149 |
$host_without_tld = str_replace( $suffix, '', $host );
|
1150 |
//remove righter . if any
|
1158 |
}
|
1159 |
//parse to get the root & subdomain
|
1160 |
$domain = array_pop( $parts );
|
1161 |
+
|
1162 |
return [
|
1163 |
'host' => $host,
|
1164 |
'tld' => $suffix,
|
1165 |
'subdomain' => str_replace( $domain, '', $host_without_tld ),
|
1166 |
];
|
1167 |
}
|
1168 |
+
|
1169 |
private function getDomainSuffix( $domain ) {
|
1170 |
$tlds = include dirname( __DIR__ ) . '/component/public-suffix.php';
|
1171 |
//whitelist development
|
1194 |
if ( empty( $list ) ) {
|
1195 |
return false;
|
1196 |
}
|
1197 |
+
|
1198 |
//the lenghter will be use
|
1199 |
return $list[0];
|
1200 |
}
|
1201 |
+
|
1202 |
+
public function log( $log, $group = null ) {
|
1203 |
if ( ! defined( 'DEFENDER_DEBUG' ) ) {
|
1204 |
return;
|
1205 |
}
|
1206 |
$log_path = self::getDefUploadDir();
|
1207 |
+
$log_name = hash( 'sha256', network_home_url() . $group . SECURE_AUTH_SALT );
|
1208 |
$log_path = $log_path . '/' . $log_name;
|
1209 |
+
|
1210 |
$log = sprintf( '%s - %s' . PHP_EOL, date( 'Y-m-d H:i:s', current_time( 'timestamp' ) ), $log );
|
1211 |
file_put_contents( $log_path, $log, FILE_APPEND );
|
1212 |
}
|
1213 |
+
|
1214 |
+
public function read_log( $group = null ) {
|
1215 |
if ( ! defined( 'DEFENDER_DEBUG' ) ) {
|
1216 |
return;
|
1217 |
}
|
1218 |
$log_path = self::getDefUploadDir();
|
1219 |
+
$log_name = hash( 'sha256', network_home_url() . $group . SECURE_AUTH_SALT );
|
1220 |
$log_path = $log_path . '/' . $log_name;
|
1221 |
+
if ( ! file_exists( $log_path ) ) {
|
1222 |
+
return;
|
1223 |
+
}
|
1224 |
+
$text = file( $log_path );
|
1225 |
+
|
1226 |
return implode( array_reverse( $text ), PHP_EOL );
|
1227 |
}
|
1228 |
+
|
1229 |
+
public function clear_log( $group = null ) {
|
1230 |
if ( ! defined( 'DEFENDER_DEBUG' ) ) {
|
1231 |
return;
|
1232 |
}
|
1233 |
$log_path = self::getDefUploadDir();
|
1234 |
+
$log_name = hash( 'sha256', network_home_url() . $group . SECURE_AUTH_SALT );
|
1235 |
$log_path = $log_path . '/' . $log_name;
|
1236 |
@unlink( $log_path );
|
1237 |
}
|
1238 |
+
}
|
app/behavior/wpmudev.php
CHANGED
@@ -6,6 +6,13 @@
|
|
6 |
namespace WP_Defender\Behavior;
|
7 |
|
8 |
use Hammer\Base\Behavior;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
/**
|
11 |
* This class contains everything relate to WPMUDEV
|
@@ -88,4 +95,73 @@ class WPMUDEV extends Behavior {
|
|
88 |
public function maybeHighContrast() {
|
89 |
return \WP_Defender\Module\Setting\Model\Settings::instance()->high_contrast_mode;
|
90 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
}
|
6 |
namespace WP_Defender\Behavior;
|
7 |
|
8 |
use Hammer\Base\Behavior;
|
9 |
+
use WP_Defender\Module\Advanced_Tools\Model\Security_Headers_Settings;
|
10 |
+
use WP_Defender\Module\Hardener\Model\Settings;
|
11 |
+
use WP_Defender\Module\IP_Lockout\Model\Log_Model;
|
12 |
+
use WP_Defender\Module\Scan\Component\Scan_Api;
|
13 |
+
use WP_Defender\Module\Scan\Component\Scanning;
|
14 |
+
use WP_Defender\Module\Scan\Model\Result_Item;
|
15 |
+
use WP_Defender\Module\Scan\Model\Scan;
|
16 |
|
17 |
/**
|
18 |
* This class contains everything relate to WPMUDEV
|
95 |
public function maybeHighContrast() {
|
96 |
return \WP_Defender\Module\Setting\Model\Settings::instance()->high_contrast_mode;
|
97 |
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* @return array
|
101 |
+
*/
|
102 |
+
public function stats_summary() {
|
103 |
+
$count = 0;
|
104 |
+
$scan = Scan_Api::getLastScan();
|
105 |
+
if ( is_object( $scan ) ) {
|
106 |
+
$count += $scan->countAll( Result_Item::STATUS_ISSUE );
|
107 |
+
}
|
108 |
+
$count += count( Settings::instance()->getIssues() );
|
109 |
+
|
110 |
+
$scan_setting = \WP_Defender\Module\Scan\Model\Settings::instance();
|
111 |
+
|
112 |
+
$next_scan = $scan_setting->report === true ?
|
113 |
+
Utils::instance()->getNextRun( $scan_setting->frequency, $scan_setting->day, $scan_setting->time,
|
114 |
+
$scan_setting->last_report_sent ) : 'N/A';
|
115 |
+
|
116 |
+
return [
|
117 |
+
'count' => $count,
|
118 |
+
'next_scan' => $next_scan
|
119 |
+
];
|
120 |
+
}
|
121 |
+
|
122 |
+
public function stats_report() {
|
123 |
+
$scan = \WP_Defender\Module\Scan\Model\Settings::instance();
|
124 |
+
$audit = \WP_Defender\Module\Audit\Model\Settings::instance();
|
125 |
+
$firewall = \WP_Defender\Module\IP_Lockout\Model\Settings::instance();
|
126 |
+
|
127 |
+
return [
|
128 |
+
'scan' => $scan->report === true ? sprintf( '%s, %s', $scan->day, $scan->time ) : false,
|
129 |
+
'audit' => $audit->notification === true ? sprintf( '%s, %s', $audit->day, $audit->time ) : false,
|
130 |
+
'firewall' => $firewall->report === true ? sprintf( '%s, %s', $firewall->report_day,
|
131 |
+
$firewall->report_time ) : false
|
132 |
+
];
|
133 |
+
}
|
134 |
+
|
135 |
+
public function stats_security_tweaks() {
|
136 |
+
$settings = Settings::instance();
|
137 |
+
|
138 |
+
return [
|
139 |
+
'issues' => count( $settings->issues ),
|
140 |
+
'fixed' => count( $settings->fixed ),
|
141 |
+
'notification' => $settings->notification
|
142 |
+
];
|
143 |
+
}
|
144 |
+
|
145 |
+
public function stats_malware_scan() {
|
146 |
+
$scan = Scan_Api::getLastScan();
|
147 |
+
$count = 0;
|
148 |
+
if ( is_object( $scan ) ) {
|
149 |
+
$count = $scan->countAll( Result_Item::STATUS_ISSUE );
|
150 |
+
}
|
151 |
+
|
152 |
+
return [
|
153 |
+
'count' => $count,
|
154 |
+
'notification' => \WP_Defender\Module\Scan\Model\Settings::instance()->notification
|
155 |
+
];
|
156 |
+
}
|
157 |
+
|
158 |
+
public function stats_security_headers() {
|
159 |
+
$settings = Security_Headers_Settings::instance();
|
160 |
+
$headers = [];
|
161 |
+
foreach ( array_slice( $settings->getHeaders(), 0, 3 ) as $header ) {
|
162 |
+
$headers[ $header->getTitle() ] = $header->check();
|
163 |
+
}
|
164 |
+
|
165 |
+
return $headers;
|
166 |
+
}
|
167 |
}
|
app/component/data-factory.php
CHANGED
@@ -29,10 +29,18 @@ class Data_Factory {
|
|
29 |
'report' => self::buildReportData(),
|
30 |
'advanced_tools' => self::buildAToolsData(),
|
31 |
'two_fa' => self::buildTwoFaData(),
|
32 |
-
'waf' => self::buildWafData()
|
|
|
33 |
];
|
34 |
}
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
public static function buildWafData() {
|
37 |
return Container::instance()->get( 'waf' )->_scriptsData();
|
38 |
}
|
29 |
'report' => self::buildReportData(),
|
30 |
'advanced_tools' => self::buildAToolsData(),
|
31 |
'two_fa' => self::buildTwoFaData(),
|
32 |
+
'waf' => self::buildWafData(),
|
33 |
+
'settings' => self::buildSettingsData()
|
34 |
];
|
35 |
}
|
36 |
|
37 |
+
public static function buildSettingsData() {
|
38 |
+
$module = Container::instance()->get( 'setting' );
|
39 |
+
$controller = $module->getController( 'main' );
|
40 |
+
|
41 |
+
return $controller->scriptsData();
|
42 |
+
}
|
43 |
+
|
44 |
public static function buildWafData() {
|
45 |
return Container::instance()->get( 'waf' )->_scriptsData();
|
46 |
}
|
app/controller/dashboard.php
CHANGED
@@ -7,19 +7,20 @@ namespace WP_Defender\Controller;
|
|
7 |
|
8 |
use Hammer\Base\Container;
|
9 |
use Hammer\Helper\HTTP_Helper;
|
10 |
-
use Hammer\Helper\WP_Helper;
|
11 |
use WP_Defender\Behavior\Utils;
|
12 |
use WP_Defender\Behavior\WPMUDEV;
|
13 |
use WP_Defender\Component\Data_Factory;
|
14 |
use WP_Defender\Controller;
|
|
|
15 |
use WP_Defender\Module\Audit\Component\Audit_API;
|
16 |
-
use WP_Defender\Module\IP_Lockout;
|
17 |
use WP_Defender\Module\IP_Lockout\Component\Login_Protection_Api;
|
|
|
18 |
use WP_Defender\Module\Scan\Component\Scan_Api;
|
19 |
use WP_Defender\Module\Scan\Component\Scanning;
|
20 |
use WP_Defender\Module\Scan\Model\Result_Item;
|
21 |
use WP_Defender\Module\Scan\Model\Settings;
|
22 |
use WP_Defender\Module\Setting\Component\Backup_Settings;
|
|
|
23 |
|
24 |
class Dashboard extends Controller {
|
25 |
protected $slug = 'wp-defender';
|
@@ -256,9 +257,82 @@ class Dashboard extends Controller {
|
|
256 |
$actions['defender_export_settings'] = array( &$this, 'exportSettings' );
|
257 |
$actions['defender_import_settings'] = array( &$this, 'importSettings' );
|
258 |
|
|
|
|
|
259 |
return $actions;
|
260 |
}
|
261 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
262 |
public function importSettings( $params ) {
|
263 |
//dirty but quick
|
264 |
$configs = json_decode( json_encode( $params->configs ), true );
|
@@ -556,7 +630,7 @@ class Dashboard extends Controller {
|
|
556 |
ob_start();
|
557 |
?>
|
558 |
<svg width="17px" height="18px" viewBox="10 397 17 18" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
559 |
-
|
560 |
<!-- Generator: Sketch 3.8.3 (29802) - http://www.bohemiancoding.com/sketch -->
|
561 |
<desc>Created with Sketch.</desc>
|
562 |
<defs></defs>
|
7 |
|
8 |
use Hammer\Base\Container;
|
9 |
use Hammer\Helper\HTTP_Helper;
|
|
|
10 |
use WP_Defender\Behavior\Utils;
|
11 |
use WP_Defender\Behavior\WPMUDEV;
|
12 |
use WP_Defender\Component\Data_Factory;
|
13 |
use WP_Defender\Controller;
|
14 |
+
use WP_Defender\Module\Advanced_Tools\Model\Mask_Settings;
|
15 |
use WP_Defender\Module\Audit\Component\Audit_API;
|
|
|
16 |
use WP_Defender\Module\IP_Lockout\Component\Login_Protection_Api;
|
17 |
+
use WP_Defender\Module\IP_Lockout\Model\Log_Model;
|
18 |
use WP_Defender\Module\Scan\Component\Scan_Api;
|
19 |
use WP_Defender\Module\Scan\Component\Scanning;
|
20 |
use WP_Defender\Module\Scan\Model\Result_Item;
|
21 |
use WP_Defender\Module\Scan\Model\Settings;
|
22 |
use WP_Defender\Module\Setting\Component\Backup_Settings;
|
23 |
+
use WP_Defender\Module\Two_Factor\Model\Auth_Settings;
|
24 |
|
25 |
class Dashboard extends Controller {
|
26 |
protected $slug = 'wp-defender';
|
257 |
$actions['defender_export_settings'] = array( &$this, 'exportSettings' );
|
258 |
$actions['defender_import_settings'] = array( &$this, 'importSettings' );
|
259 |
|
260 |
+
$actions['defender_get_stats_v2'] = [ &$this, 'defender_get_stats_v2' ];
|
261 |
+
|
262 |
return $actions;
|
263 |
}
|
264 |
|
265 |
+
public function defender_get_stats_v2( $params, $action ) {
|
266 |
+
if ( ! class_exists( WPMUDEV::class ) ) {
|
267 |
+
return wp_send_json_error();
|
268 |
+
}
|
269 |
+
$wpmudev = WPMUDEV::instance();
|
270 |
+
$summary = $wpmudev->stats_summary();
|
271 |
+
$report = $wpmudev->stats_report();
|
272 |
+
$tweaks = $wpmudev->stats_security_tweaks();
|
273 |
+
global $wp_version;
|
274 |
+
$scan = $wpmudev->stats_malware_scan();
|
275 |
+
$firewall = Log_Model::getSummary();
|
276 |
+
$audit = Audit_API::summary();
|
277 |
+
$security_headers = $wpmudev->stats_security_headers();
|
278 |
+
|
279 |
+
$ret = [
|
280 |
+
'summary' => [
|
281 |
+
'count' => $summary['count'],
|
282 |
+
'next_scan' => $summary['next_scan']
|
283 |
+
],
|
284 |
+
'report' => [
|
285 |
+
'malware_scan' => $report['scan'],
|
286 |
+
'firewall' => $report['firewall'],
|
287 |
+
'audit_logging' => $report['audit']
|
288 |
+
],
|
289 |
+
'security_tweaks' => [
|
290 |
+
'issues' => $tweaks['issues'],
|
291 |
+
'fixed' => $tweaks['fixed'],
|
292 |
+
'notification' => $tweaks['notification'],
|
293 |
+
'wp_version' => $wp_version,
|
294 |
+
'php_version' => phpversion()
|
295 |
+
],
|
296 |
+
'malware_scan' => [
|
297 |
+
'count' => $scan['count'],
|
298 |
+
'notification' => $scan['notification']
|
299 |
+
],
|
300 |
+
'firewall' => [
|
301 |
+
'last_lockout' => $firewall['lastLockout'],
|
302 |
+
'24_hours' => [
|
303 |
+
'login_lockout' => $firewall['loginLockoutToday'],
|
304 |
+
'404_lockout' => $firewall['lockout404Today']
|
305 |
+
],
|
306 |
+
'7_days' => [
|
307 |
+
'login_lockout' => $firewall['loginLockoutThisWeek'],
|
308 |
+
'404_lockout' => $firewall['lockout404ThisWeek']
|
309 |
+
],
|
310 |
+
'30_days' => [
|
311 |
+
'login_lockout' => $firewall['lockoutLoginThisMonth'],
|
312 |
+
'404_lockout' => $firewall['lockout404ThisMonth']
|
313 |
+
]
|
314 |
+
],
|
315 |
+
'audit' => [
|
316 |
+
'last_event' => $audit['lastEvent'],
|
317 |
+
'24_hours' => $audit['day_count'],
|
318 |
+
'7_days' => $audit['last_7_days'],
|
319 |
+
'30_days' => $audit['last_30_days']
|
320 |
+
],
|
321 |
+
'advanced_tools' => [
|
322 |
+
'security_headers' => $security_headers,
|
323 |
+
'mask_login' => Mask_Settings::instance()->isEnabled()
|
324 |
+
],
|
325 |
+
'two_fa' => [
|
326 |
+
'status' => Auth_Settings::instance()->enabled,
|
327 |
+
'lost_phone' => Auth_Settings::instance()->lost_phone
|
328 |
+
]
|
329 |
+
];
|
330 |
+
|
331 |
+
wp_send_json_success( [
|
332 |
+
'stats' => $ret
|
333 |
+
] );
|
334 |
+
}
|
335 |
+
|
336 |
public function importSettings( $params ) {
|
337 |
//dirty but quick
|
338 |
$configs = json_decode( json_encode( $params->configs ), true );
|
630 |
ob_start();
|
631 |
?>
|
632 |
<svg width="17px" height="18px" viewBox="10 397 17 18" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
633 |
+
>
|
634 |
<!-- Generator: Sketch 3.8.3 (29802) - http://www.bohemiancoding.com/sketch -->
|
635 |
<desc>Created with Sketch.</desc>
|
636 |
<defs></defs>
|
app/module/advanced-tools/component/mask-api.php
CHANGED
@@ -10,6 +10,7 @@ use Hammer\WP\Component;
|
|
10 |
use WP_Defender\Behavior\Utils;
|
11 |
use WP_Defender\Component\Error_Code;
|
12 |
use WP_Defender\Module\Advanced_Tools\Model\Mask_Settings;
|
|
|
13 |
|
14 |
class Mask_Api extends Component {
|
15 |
/**
|
10 |
use WP_Defender\Behavior\Utils;
|
11 |
use WP_Defender\Component\Error_Code;
|
12 |
use WP_Defender\Module\Advanced_Tools\Model\Mask_Settings;
|
13 |
+
use WP_Defender\Module\Two_Factor\Component\Auth_API;
|
14 |
|
15 |
class Mask_Api extends Component {
|
16 |
/**
|
app/module/advanced-tools/component/mask-login-listener.php
CHANGED
@@ -85,24 +85,50 @@ class Mask_Login_Listener extends Component {
|
|
85 |
}
|
86 |
|
87 |
public function handleLoginRequest() {
|
88 |
-
|
89 |
-
//to the 404 redirect, or 403 wp die
|
90 |
-
$requestPath = Mask_Api::getRequestPath();
|
91 |
-
$settings = Mask_Settings::instance();
|
92 |
-
$ticket = HTTP_Helper::retrieveGet( 'ticket', false );
|
93 |
if ( $ticket !== false && Mask_Api::redeemTicket( $ticket ) ) {
|
94 |
//we have an express ticket
|
95 |
return true;
|
96 |
}
|
97 |
-
if
|
|
|
|
|
|
|
|
|
98 |
//we need to redirect this one to wp-login and open it
|
99 |
$this->_showLoginPage();
|
100 |
-
}
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
}
|
107 |
}
|
108 |
|
@@ -224,34 +250,6 @@ class Mask_Login_Listener extends Component {
|
|
224 |
return $currentUrl;
|
225 |
}
|
226 |
|
227 |
-
/**
|
228 |
-
* Catch any request to wp-admin/*, block or redirect it base on settings.
|
229 |
-
* This wont apply for logged in user
|
230 |
-
*/
|
231 |
-
private function _handleRequestToAdmin() {
|
232 |
-
global $pagenow;
|
233 |
-
if ( defined( 'DOING_AJAX' ) ) {
|
234 |
-
//we need to allow ajax access for other tasks
|
235 |
-
return;
|
236 |
-
}
|
237 |
-
if ( is_user_logged_in() ) {
|
238 |
-
return;
|
239 |
-
}
|
240 |
-
|
241 |
-
if ( ( $key = HTTP_Helper::retrieveGet( 'otp', false ) ) !== false
|
242 |
-
&& Mask_Api::verifyOTP( $key ) ) {
|
243 |
-
return;
|
244 |
-
}
|
245 |
-
|
246 |
-
$this->_maybeLock();
|
247 |
-
}
|
248 |
-
|
249 |
-
private function _handleRequestToLoginPage() {
|
250 |
-
if ( ! is_user_logged_in() ) {
|
251 |
-
$this->_maybeLock();
|
252 |
-
}
|
253 |
-
}
|
254 |
-
|
255 |
private function _showLoginPage() {
|
256 |
global $error, $interim_login, $action, $user_login, $user, $redirect_to;
|
257 |
require_once ABSPATH . 'wp-login.php';
|
85 |
}
|
86 |
|
87 |
public function handleLoginRequest() {
|
88 |
+
$ticket = HTTP_Helper::retrieveGet( 'ticket', false );
|
|
|
|
|
|
|
|
|
89 |
if ( $ticket !== false && Mask_Api::redeemTicket( $ticket ) ) {
|
90 |
//we have an express ticket
|
91 |
return true;
|
92 |
}
|
93 |
+
//need to check if the current request is for signup, login, if those is not the slug, then we redirect
|
94 |
+
//to the 404 redirect, or 403 wp die
|
95 |
+
$requestPath = Mask_Api::getRequestPath();
|
96 |
+
$settings = Mask_Settings::instance();
|
97 |
+
if ( '/' . ltrim( $settings->mask_url, '/' ) === $requestPath ) {
|
98 |
//we need to redirect this one to wp-login and open it
|
99 |
$this->_showLoginPage();
|
100 |
+
}
|
101 |
+
if ( is_user_logged_in() ) {
|
102 |
+
//do nothing
|
103 |
+
return;
|
104 |
+
}
|
105 |
+
|
106 |
+
if ( defined( 'DOING_AJAX' ) ) {
|
107 |
+
//we listen on normal requests, not ajax
|
108 |
+
return;
|
109 |
+
}
|
110 |
+
/**
|
111 |
+
* /wp-admin/admin.php
|
112 |
+
* /login
|
113 |
+
* /wp-login.php
|
114 |
+
*/
|
115 |
+
$loginSlugs = [
|
116 |
+
'wp-admin',
|
117 |
+
'wp-login.php',
|
118 |
+
'login',
|
119 |
+
'dashboard',
|
120 |
+
'admin',
|
121 |
+
'wp-signup.php'
|
122 |
+
];
|
123 |
+
//else lock it
|
124 |
+
$requestPath = ltrim( $requestPath, '/' );
|
125 |
+
//decoded url path, e.g. for case 'wp-%61dmin'
|
126 |
+
$pathDecoded = rawurldecode( $requestPath );
|
127 |
+
foreach ( $loginSlugs as $slug ) {
|
128 |
+
if ( stristr( $requestPath, $slug ) || stristr( $pathDecoded, $slug ) ) {
|
129 |
+
//catch
|
130 |
+
return $this->_maybeLock();
|
131 |
+
}
|
132 |
}
|
133 |
}
|
134 |
|
250 |
return $currentUrl;
|
251 |
}
|
252 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
private function _showLoginPage() {
|
254 |
global $error, $interim_login, $action, $user_login, $user, $redirect_to;
|
255 |
require_once ABSPATH . 'wp-login.php';
|
app/module/advanced-tools/component/security-headers/sh-strict-transport.php
CHANGED
@@ -44,6 +44,10 @@ class Sh_Strict_Transport extends Security_Header {
|
|
44 |
if ( ! $model->sh_strict_transport ) {
|
45 |
return false;
|
46 |
}
|
|
|
|
|
|
|
|
|
47 |
$headers = $this->headRequest( network_site_url(), self::$rule_slug );
|
48 |
if ( is_wp_error( $headers ) ) {
|
49 |
Utils::instance()->log( sprintf( 'Self ping error: %s', $headers->get_error_message() ) );
|
@@ -55,13 +59,16 @@ class Sh_Strict_Transport extends Security_Header {
|
|
55 |
$hsts_cache_duration = '';
|
56 |
$hsts_preload = 0;
|
57 |
$include_subdomain = 0;
|
|
|
|
|
|
|
58 |
|
59 |
-
$content = explode( ';', $
|
60 |
foreach ( $content as $line ) {
|
61 |
if ( stristr( $line, 'max-age' ) ) {
|
62 |
$value = explode( '=', $line );
|
63 |
$arr = $this->timeInSeconds();
|
64 |
-
$seconds = isset( $value[1] ) ? (int)$value[1] : 0;
|
65 |
$closest = null;
|
66 |
$key = null;
|
67 |
foreach ( $arr as $k => $item ) {
|
@@ -107,6 +114,12 @@ class Sh_Strict_Transport extends Security_Header {
|
|
107 |
$allow_subdomain = false;
|
108 |
if ( is_array( $domain_data ) && ! isset( $domain_data['subdomain'] ) ) {
|
109 |
$allow_subdomain = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
}
|
111 |
|
112 |
return array(
|
@@ -135,17 +148,18 @@ class Sh_Strict_Transport extends Security_Header {
|
|
135 |
if ( true === $model->sh_strict_transport ) {
|
136 |
$headers = 'Strict-Transport-Security:';
|
137 |
if ( isset( $model->hsts_cache_duration ) && ! empty( $model->hsts_cache_duration ) ) {
|
138 |
-
$arr
|
139 |
-
|
|
|
140 |
if ( ! is_null( $seconds ) ) {
|
141 |
$headers .= ' max-age=' . $seconds;
|
142 |
}
|
143 |
}
|
144 |
|
145 |
-
if ( '1' === (string)$model->include_subdomain ) {
|
146 |
$headers .= ' ; includeSubDomains';
|
147 |
}
|
148 |
-
if ( '1' === (string)$model->hsts_preload ) {
|
149 |
$headers .= ' ; preload';
|
150 |
}
|
151 |
|
44 |
if ( ! $model->sh_strict_transport ) {
|
45 |
return false;
|
46 |
}
|
47 |
+
//'max-age' directive is required
|
48 |
+
if ( ! empty( $model->hsts_cache_duration ) ) {
|
49 |
+
return true;
|
50 |
+
}
|
51 |
$headers = $this->headRequest( network_site_url(), self::$rule_slug );
|
52 |
if ( is_wp_error( $headers ) ) {
|
53 |
Utils::instance()->log( sprintf( 'Self ping error: %s', $headers->get_error_message() ) );
|
59 |
$hsts_cache_duration = '';
|
60 |
$hsts_preload = 0;
|
61 |
$include_subdomain = 0;
|
62 |
+
$header_sts = is_array( $headers['strict-transport-security'] )
|
63 |
+
? $headers['strict-transport-security'][0]
|
64 |
+
: $headers['strict-transport-security'];
|
65 |
|
66 |
+
$content = explode( ';', $header_sts );
|
67 |
foreach ( $content as $line ) {
|
68 |
if ( stristr( $line, 'max-age' ) ) {
|
69 |
$value = explode( '=', $line );
|
70 |
$arr = $this->timeInSeconds();
|
71 |
+
$seconds = isset( $value[1] ) ? (int) $value[1] : 0;
|
72 |
$closest = null;
|
73 |
$key = null;
|
74 |
foreach ( $arr as $k => $item ) {
|
114 |
$allow_subdomain = false;
|
115 |
if ( is_array( $domain_data ) && ! isset( $domain_data['subdomain'] ) ) {
|
116 |
$allow_subdomain = true;
|
117 |
+
} elseif ( ! $domain_data && ! is_multisite() ) {
|
118 |
+
//case if a single site installs in a folder, e.g. http://example.com/something/folder/
|
119 |
+
$allow_subdomain = true;
|
120 |
+
} elseif ( ! $domain_data && is_multisite() && is_subdomain_install() && is_main_site() ) {
|
121 |
+
//case if it's a main MU site with subdomain install
|
122 |
+
$allow_subdomain = true;
|
123 |
}
|
124 |
|
125 |
return array(
|
148 |
if ( true === $model->sh_strict_transport ) {
|
149 |
$headers = 'Strict-Transport-Security:';
|
150 |
if ( isset( $model->hsts_cache_duration ) && ! empty( $model->hsts_cache_duration ) ) {
|
151 |
+
$arr = $this->timeInSeconds();
|
152 |
+
//set default for a week, so RIPs wont waring weak header
|
153 |
+
$seconds = isset( $arr[ $model->hsts_cache_duration ] ) ? $arr[ $model->hsts_cache_duration ] : 604800;
|
154 |
if ( ! is_null( $seconds ) ) {
|
155 |
$headers .= ' max-age=' . $seconds;
|
156 |
}
|
157 |
}
|
158 |
|
159 |
+
if ( '1' === (string) $model->include_subdomain ) {
|
160 |
$headers .= ' ; includeSubDomains';
|
161 |
}
|
162 |
+
if ( '1' === (string) $model->hsts_preload ) {
|
163 |
$headers .= ' ; preload';
|
164 |
}
|
165 |
|
app/module/advanced-tools/controller/rest.php
CHANGED
@@ -35,7 +35,7 @@ class Rest extends Controller {
|
|
35 |
}
|
36 |
|
37 |
//get the backup email from current user
|
38 |
-
$backup_email =
|
39 |
$subject = wp_kses_post( HTTP_Helper::retrievePost( 'email_subject' ) );
|
40 |
$sender = HTTP_Helper::retrievePost( 'email_sender' );
|
41 |
$body = wp_kses_post( HTTP_Helper::retrievePost( 'email_body' ) );
|
35 |
}
|
36 |
|
37 |
//get the backup email from current user
|
38 |
+
$backup_email = \WP_Defender\Module\Two_Factor\Component\Auth_API::getBackupEmail( get_current_user_id() );
|
39 |
$subject = wp_kses_post( HTTP_Helper::retrievePost( 'email_subject' ) );
|
40 |
$sender = HTTP_Helper::retrievePost( 'email_sender' );
|
41 |
$body = wp_kses_post( HTTP_Helper::retrievePost( 'email_body' ) );
|
app/module/advanced-tools/model/mask-settings.php
CHANGED
@@ -26,7 +26,8 @@ class Mask_Settings extends \Hammer\WP\Settings {
|
|
26 |
*/
|
27 |
public static function instance() {
|
28 |
if ( is_null( self::$_instance ) ) {
|
29 |
-
$class = new Mask_Settings( 'wd_masking_login_settings',
|
|
|
30 |
self::$_instance = $class;
|
31 |
}
|
32 |
|
@@ -73,13 +74,15 @@ class Mask_Settings extends \Hammer\WP\Settings {
|
|
73 |
];
|
74 |
|
75 |
if ( in_array( $this->mask_url, $forbidden, true ) ) {
|
76 |
-
$this->errors[] = __( 'A page already exists at this URL, please pick a unique page for your new login area.',
|
|
|
77 |
|
78 |
return false;
|
79 |
}
|
80 |
$exits = get_page_by_path( $this->mask_url, OBJECT, [ 'post', 'page' ] );
|
81 |
if ( is_object( $exits ) ) {
|
82 |
-
$this->errors[] = __( 'A page already exists at this URL, please pick a unique page for your new login area.',
|
|
|
83 |
|
84 |
return false;
|
85 |
}
|
@@ -98,13 +101,13 @@ class Mask_Settings extends \Hammer\WP\Settings {
|
|
98 |
/**
|
99 |
* Define labels for settings key, we will use it for HUB
|
100 |
*
|
101 |
-
* @param
|
102 |
*
|
103 |
* @return array|mixed
|
104 |
*/
|
105 |
public function labels( $key = null ) {
|
106 |
$labels = [
|
107 |
-
'enabled' => __( '
|
108 |
'mask_url' => __( "Masking URL", "defender-security" ),
|
109 |
'redirect_traffic' => __( 'Redirect traffic', "defender-security" ),
|
110 |
'redirect_traffic_url' => __( "Redirection URL", "defender-security" ),
|
@@ -119,7 +122,32 @@ class Mask_Settings extends \Hammer\WP\Settings {
|
|
119 |
|
120 |
public function beforeValidate() {
|
121 |
if ( $this->mask_url === $this->redirect_traffic_url && strlen( $this->redirect_traffic_url ) > 0 ) {
|
122 |
-
$this->addError( 'redirect_traffic_url',
|
|
|
123 |
}
|
124 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
}
|
26 |
*/
|
27 |
public static function instance() {
|
28 |
if ( is_null( self::$_instance ) ) {
|
29 |
+
$class = new Mask_Settings( 'wd_masking_login_settings',
|
30 |
+
WP_Helper::is_network_activate( wp_defender()->plugin_slug ) );
|
31 |
self::$_instance = $class;
|
32 |
}
|
33 |
|
74 |
];
|
75 |
|
76 |
if ( in_array( $this->mask_url, $forbidden, true ) ) {
|
77 |
+
$this->errors[] = __( 'A page already exists at this URL, please pick a unique page for your new login area.',
|
78 |
+
'wpdef' );
|
79 |
|
80 |
return false;
|
81 |
}
|
82 |
$exits = get_page_by_path( $this->mask_url, OBJECT, [ 'post', 'page' ] );
|
83 |
if ( is_object( $exits ) ) {
|
84 |
+
$this->errors[] = __( 'A page already exists at this URL, please pick a unique page for your new login area.',
|
85 |
+
'wpdef' );
|
86 |
|
87 |
return false;
|
88 |
}
|
101 |
/**
|
102 |
* Define labels for settings key, we will use it for HUB
|
103 |
*
|
104 |
+
* @param null $key
|
105 |
*
|
106 |
* @return array|mixed
|
107 |
*/
|
108 |
public function labels( $key = null ) {
|
109 |
$labels = [
|
110 |
+
'enabled' => __( 'Enable', "defender-security" ),
|
111 |
'mask_url' => __( "Masking URL", "defender-security" ),
|
112 |
'redirect_traffic' => __( 'Redirect traffic', "defender-security" ),
|
113 |
'redirect_traffic_url' => __( "Redirection URL", "defender-security" ),
|
122 |
|
123 |
public function beforeValidate() {
|
124 |
if ( $this->mask_url === $this->redirect_traffic_url && strlen( $this->redirect_traffic_url ) > 0 ) {
|
125 |
+
$this->addError( 'redirect_traffic_url',
|
126 |
+
__( "Redirect URL must different from Login URL", "defender-security" ) );
|
127 |
}
|
128 |
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* @return array
|
132 |
+
*/
|
133 |
+
public function export_strings( $configs ) {
|
134 |
+
$class = new Mask_Settings( 'wd_masking_login_settings',
|
135 |
+
WP_Helper::is_network_activate( wp_defender()->plugin_slug ) );
|
136 |
+
$class->import( $configs );
|
137 |
+
|
138 |
+
return [
|
139 |
+
$class->isEnabled() ? __( 'Active', "defender-security" ) : __( 'Inactive', "defender-security" )
|
140 |
+
];
|
141 |
+
}
|
142 |
+
|
143 |
+
public function format_hub_data() {
|
144 |
+
return [
|
145 |
+
'enabled' => $this->enabled ? __( 'Active', "defender-security" ) : __( 'Inactivate',
|
146 |
+
"defender-security" ),
|
147 |
+
'mask_url' => $this->mask_url,
|
148 |
+
'redirect_traffic' => $this->redirect_traffic ? __( 'Yes', "defender-security" ) : __( 'No',
|
149 |
+
"defender-security" ),
|
150 |
+
'redirect_traffic_url' => $this->redirect_traffic_url
|
151 |
+
];
|
152 |
+
}
|
153 |
}
|
app/module/advanced-tools/model/security-headers-settings.php
CHANGED
@@ -95,7 +95,8 @@ class Security_Headers_Settings extends \Hammer\WP\Settings {
|
|
95 |
*/
|
96 |
public static function instance() {
|
97 |
if ( is_null( self::$_instance ) ) {
|
98 |
-
$class = new Security_Headers_Settings( 'wd_security_headers_settings',
|
|
|
99 |
self::$_instance = $class;
|
100 |
}
|
101 |
|
@@ -105,23 +106,23 @@ class Security_Headers_Settings extends \Hammer\WP\Settings {
|
|
105 |
/**
|
106 |
* Define labels for settings key, we will use it for HUB
|
107 |
*
|
108 |
-
* @param
|
109 |
*
|
110 |
* @return string
|
111 |
*/
|
112 |
public function labels( $key = null ) {
|
113 |
$labels = array(
|
114 |
-
'sh_xframe' => __( '
|
115 |
'sh_xframe_urls' => __( 'Allow-from', "defender-security" ),
|
116 |
-
'sh_xss_protection' => __( '
|
117 |
-
'sh_content_type_options' => __( '
|
118 |
-
'sh_strict_transport' => __( '
|
119 |
'hsts_preload' => __( 'HSTS Preload', "defender-security" ),
|
120 |
'include_subdomain' => __( 'Include Subdomains', "defender-security" ),
|
121 |
'hsts_cache_duration' => __( 'Browser caching', "defender-security" ),
|
122 |
-
'sh_referrer_policy' => __( '
|
123 |
'sh_referrer_policy_mode' => __( 'Referrer Information', "defender-security" ),
|
124 |
-
'sh_feature_policy' => __( '
|
125 |
'sh_feature_policy_urls' => __( 'Specific Origins', "defender-security" ),
|
126 |
);
|
127 |
|
@@ -149,7 +150,7 @@ class Security_Headers_Settings extends \Hammer\WP\Settings {
|
|
149 |
/**
|
150 |
* Filter the security headers and return data as array
|
151 |
*
|
152 |
-
* @param
|
153 |
*
|
154 |
* @return array
|
155 |
*/
|
@@ -211,7 +212,8 @@ class Security_Headers_Settings extends \Hammer\WP\Settings {
|
|
211 |
&& ( empty( $this->sh_xss_protection_mode )
|
212 |
|| ! in_array( $this->sh_xss_protection_mode, array( 'sanitize', 'block', 'none' ), true ) )
|
213 |
) {
|
214 |
-
$this->addError( 'sh_xss_protection_mode',
|
|
|
215 |
|
216 |
return false;
|
217 |
}
|
@@ -234,7 +236,8 @@ class Security_Headers_Settings extends \Hammer\WP\Settings {
|
|
234 |
)
|
235 |
)
|
236 |
) {
|
237 |
-
$this->addError( 'sh_referrer_policy_mode',
|
|
|
238 |
|
239 |
return false;
|
240 |
}
|
@@ -254,4 +257,54 @@ class Security_Headers_Settings extends \Hammer\WP\Settings {
|
|
254 |
}
|
255 |
wp_defender()->global['security_headers_enabled'] = $enabled;
|
256 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
257 |
}
|
95 |
*/
|
96 |
public static function instance() {
|
97 |
if ( is_null( self::$_instance ) ) {
|
98 |
+
$class = new Security_Headers_Settings( 'wd_security_headers_settings',
|
99 |
+
WP_Helper::is_network_activate( "defender-security" ) );
|
100 |
self::$_instance = $class;
|
101 |
}
|
102 |
|
106 |
/**
|
107 |
* Define labels for settings key, we will use it for HUB
|
108 |
*
|
109 |
+
* @param null $key
|
110 |
*
|
111 |
* @return string
|
112 |
*/
|
113 |
public function labels( $key = null ) {
|
114 |
$labels = array(
|
115 |
+
'sh_xframe' => __( 'X-Frame-Options', "defender-security" ),
|
116 |
'sh_xframe_urls' => __( 'Allow-from', "defender-security" ),
|
117 |
+
'sh_xss_protection' => __( 'X-XSS-Protection', "defender-security" ),
|
118 |
+
'sh_content_type_options' => __( 'X-Content-Type-Options', "defender-security" ),
|
119 |
+
'sh_strict_transport' => __( 'Strict Transport', "defender-security" ),
|
120 |
'hsts_preload' => __( 'HSTS Preload', "defender-security" ),
|
121 |
'include_subdomain' => __( 'Include Subdomains', "defender-security" ),
|
122 |
'hsts_cache_duration' => __( 'Browser caching', "defender-security" ),
|
123 |
+
'sh_referrer_policy' => __( 'Referrer Policy', "defender-security" ),
|
124 |
'sh_referrer_policy_mode' => __( 'Referrer Information', "defender-security" ),
|
125 |
+
'sh_feature_policy' => __( 'Feature-Policy', "defender-security" ),
|
126 |
'sh_feature_policy_urls' => __( 'Specific Origins', "defender-security" ),
|
127 |
);
|
128 |
|
150 |
/**
|
151 |
* Filter the security headers and return data as array
|
152 |
*
|
153 |
+
* @param bool $sort
|
154 |
*
|
155 |
* @return array
|
156 |
*/
|
212 |
&& ( empty( $this->sh_xss_protection_mode )
|
213 |
|| ! in_array( $this->sh_xss_protection_mode, array( 'sanitize', 'block', 'none' ), true ) )
|
214 |
) {
|
215 |
+
$this->addError( 'sh_xss_protection_mode',
|
216 |
+
__( 'X-XSS-Protection mode is invalid', "defender-security" ) );
|
217 |
|
218 |
return false;
|
219 |
}
|
236 |
)
|
237 |
)
|
238 |
) {
|
239 |
+
$this->addError( 'sh_referrer_policy_mode',
|
240 |
+
__( 'Referrer Policy mode is invalid', "defender-security" ) );
|
241 |
|
242 |
return false;
|
243 |
}
|
257 |
}
|
258 |
wp_defender()->global['security_headers_enabled'] = $enabled;
|
259 |
}
|
260 |
+
|
261 |
+
/**
|
262 |
+
* @return bool
|
263 |
+
*/
|
264 |
+
public function is_any_activated() {
|
265 |
+
if ( $this->sh_xframe === true || $this->sh_xss_protection === true || $this->sh_content_type_options === true ||
|
266 |
+
$this->sh_feature_policy === true || $this->sh_strict_transport === true || $this->sh_referrer_policy === true ) {
|
267 |
+
return true;
|
268 |
+
}
|
269 |
+
|
270 |
+
return false;
|
271 |
+
}
|
272 |
+
|
273 |
+
/**
|
274 |
+
* @return array
|
275 |
+
*/
|
276 |
+
public function export_strings( $configs ) {
|
277 |
+
$class = new Security_Headers_Settings( 'wd_security_headers_settings',
|
278 |
+
WP_Helper::is_network_activate( "defender-security" ) );
|
279 |
+
$class->import( $configs );
|
280 |
+
|
281 |
+
return [
|
282 |
+
$class->is_any_activated() ? __( 'Active', "defender-security" ) : __( 'Inactive', "defender-security" )
|
283 |
+
];
|
284 |
+
}
|
285 |
+
|
286 |
+
public function format_hub_data() {
|
287 |
+
return [
|
288 |
+
'sh_xframe' => $this->sh_xframe ? sprintf( __( 'Mode: %s%s',
|
289 |
+
"defender-security" ), $this->sh_xframe_mode,
|
290 |
+
$this->sh_xframe_mode == 'allow-from' ? ',urls: ' . $this->sh_xframe_urls : '' ) : __( 'Inactivate',
|
291 |
+
"defender-security" ),
|
292 |
+
'sh_xss_protection' => $this->sh_xss_protection ? sprintf( __( 'Mode: %s',
|
293 |
+
"defender-security" ), $this->sh_xss_protection_mode ) : __( 'Inactivate',
|
294 |
+
"defender-security" ),
|
295 |
+
'sh_content_type_options' => $this->sh_content_type_options ? sprintf( __( 'Mode: %s',
|
296 |
+
"defender-security" ), 'nosniff' ) : __( 'Inactivate',
|
297 |
+
"defender-security" ),
|
298 |
+
'sh_strict_transport' => $this->sh_strict_transport ? sprintf( __( 'Enabled%s',
|
299 |
+
"defender-security" ), $this->hsts_preload ? ',HSTS preloaded, ' : '' ) : __( 'Inactivate',
|
300 |
+
"defender-security" ),
|
301 |
+
'sh_referrer_policy' => $this->sh_referrer_policy ? sprintf( __( 'Mode: %s',
|
302 |
+
"defender-security" ), $this->sh_referrer_policy_mode ) : __( 'Inactivate',
|
303 |
+
"defender-security" ),
|
304 |
+
'sh_feature_policy' => $this->sh_feature_policy ? sprintf( __( 'Mode: %s%s',
|
305 |
+
"defender-security" ), $this->sh_feature_policy_mode,
|
306 |
+
$this->sh_feature_policy_mode == 'origins' ? ',urls: ' . $this->sh_feature_policy_urls : '' ) : __( 'Inactivate',
|
307 |
+
"defender-security" ),
|
308 |
+
];
|
309 |
+
}
|
310 |
}
|
app/module/hardener.php
CHANGED
@@ -14,7 +14,7 @@ use WP_Defender\Module\Hardener\Model\Settings;
|
|
14 |
|
15 |
class Hardener extends Module {
|
16 |
const Settings = 'hardener_settings';
|
17 |
-
|
18 |
public function __construct() {
|
19 |
//init dependency
|
20 |
$this->initRulesStats();
|
@@ -22,7 +22,7 @@ class Hardener extends Module {
|
|
22 |
new Main();
|
23 |
new Rest();
|
24 |
}
|
25 |
-
|
26 |
/**
|
27 |
* Init rules status
|
28 |
*/
|
@@ -35,13 +35,14 @@ class Hardener extends Module {
|
|
35 |
//only init when page load
|
36 |
$interval = '+0 seconds';
|
37 |
//only refresh if on admin, if not we just do the listening
|
38 |
-
|
39 |
if ( ( ( is_admin() || is_network_admin() )
|
40 |
-
) && ( HTTP_Helper::retrieveGet( 'page' ) == 'wdf-hardener'
|
|
|
|
|
41 |
) {
|
42 |
//this mean we dont have any data, or data is overdue need to refresh
|
43 |
//refetch those list
|
44 |
-
|
45 |
$settings->refreshStatus();
|
46 |
} elseif ( defined( 'DOING_CRON' ) ) {
|
47 |
//if this is in cronjob, we refresh it too
|
@@ -49,11 +50,11 @@ class Hardener extends Module {
|
|
49 |
}
|
50 |
$settings->save();
|
51 |
}
|
52 |
-
|
53 |
//we will need to add every hooks needed
|
54 |
foreach ( $settings->getDefinedRules( true ) as $rule ) {
|
55 |
$rule->addHooks();
|
56 |
}
|
57 |
}
|
58 |
-
|
59 |
}
|
14 |
|
15 |
class Hardener extends Module {
|
16 |
const Settings = 'hardener_settings';
|
17 |
+
|
18 |
public function __construct() {
|
19 |
//init dependency
|
20 |
$this->initRulesStats();
|
22 |
new Main();
|
23 |
new Rest();
|
24 |
}
|
25 |
+
|
26 |
/**
|
27 |
* Init rules status
|
28 |
*/
|
35 |
//only init when page load
|
36 |
$interval = '+0 seconds';
|
37 |
//only refresh if on admin, if not we just do the listening
|
38 |
+
|
39 |
if ( ( ( is_admin() || is_network_admin() )
|
40 |
+
) && ( HTTP_Helper::retrieveGet( 'page' ) == 'wdf-hardener'
|
41 |
+
|| HTTP_Helper::retrieveGet( 'page' ) == 'wp-defender'
|
42 |
+
|| HTTP_Helper::retrieveGet( 'page' ) == 'wdf-setting' )
|
43 |
) {
|
44 |
//this mean we dont have any data, or data is overdue need to refresh
|
45 |
//refetch those list
|
|
|
46 |
$settings->refreshStatus();
|
47 |
} elseif ( defined( 'DOING_CRON' ) ) {
|
48 |
//if this is in cronjob, we refresh it too
|
50 |
}
|
51 |
$settings->save();
|
52 |
}
|
53 |
+
|
54 |
//we will need to add every hooks needed
|
55 |
foreach ( $settings->getDefinedRules( true ) as $rule ) {
|
56 |
$rule->addHooks();
|
57 |
}
|
58 |
}
|
59 |
+
|
60 |
}
|
app/module/hardener/controller/main.php
CHANGED
@@ -12,7 +12,7 @@ use WP_Defender\Module\Hardener;
|
|
12 |
|
13 |
class Main extends Controller {
|
14 |
protected $slug = 'wdf-hardener';
|
15 |
-
|
16 |
/**
|
17 |
* @return array
|
18 |
*/
|
@@ -22,10 +22,10 @@ class Main extends Controller {
|
|
22 |
'endpoints' => '\WP_Defender\Behavior\Endpoint',
|
23 |
'wpmudev' => '\WP_Defender\Behavior\WPMUDEV'
|
24 |
];
|
25 |
-
|
26 |
return $behaviors;
|
27 |
}
|
28 |
-
|
29 |
/**
|
30 |
* Main constructor.
|
31 |
*/
|
@@ -35,24 +35,24 @@ class Main extends Controller {
|
|
35 |
} else {
|
36 |
$this->addAction( 'admin_menu', 'adminMenu' );
|
37 |
}
|
38 |
-
|
39 |
if ( $this->isInPage() ) {
|
40 |
$this->addAction( 'defender_enqueue_assets', 'scripts', 11 );
|
41 |
}
|
42 |
-
|
43 |
if ( ! wp_next_scheduled( 'tweaksSendNotification' ) ) {
|
44 |
wp_schedule_event( time(), 'twicedaily', 'tweaksSendNotification' );
|
45 |
}
|
46 |
-
|
47 |
$this->addAction( 'tweaksSendNotification', 'tweaksSendNotification' );
|
48 |
$this->addAction( 'wp_loaded', 'maybeUnsubscribe' );
|
49 |
}
|
50 |
-
|
51 |
public function maybeUnsubscribe() {
|
52 |
if ( ! is_user_logged_in() ) {
|
53 |
return;
|
54 |
}
|
55 |
-
|
56 |
$action = HTTP_Helper::retrieveGet( 'action' );
|
57 |
if ( $action == 'unsubscribe_notification' ) {
|
58 |
$user = get_user_by( 'id', get_current_user_id() );
|
@@ -76,14 +76,15 @@ class Main extends Controller {
|
|
76 |
exit;
|
77 |
}
|
78 |
}
|
79 |
-
|
80 |
public function tweaksSendNotification() {
|
81 |
$settings = Hardener\Model\Settings::instance();
|
82 |
$canSend = false;
|
83 |
if ( $settings->last_sent ) {
|
84 |
if (
|
85 |
$settings->notification_repeat == true
|
86 |
-
&& strtotime( apply_filters( 'wd_tweaks_notification_interval', '+24 hours' ),
|
|
|
87 |
$canSend = true;
|
88 |
}
|
89 |
} else {
|
@@ -93,43 +94,46 @@ class Main extends Controller {
|
|
93 |
$settings->last_seen = time();
|
94 |
$settings->save();
|
95 |
}
|
96 |
-
|
97 |
-
if ( strtotime( apply_filters( 'wd_tweaks_notification_interval', '+7 days' ),
|
|
|
98 |
return;
|
99 |
}
|
100 |
-
|
101 |
$canSend = true;
|
102 |
}
|
103 |
-
|
104 |
if ( ! $canSend ) {
|
105 |
return;
|
106 |
}
|
107 |
-
|
108 |
$settings->refreshStatus();
|
109 |
$tweaks = $settings->getIssues();
|
110 |
-
|
111 |
if ( ! count( $tweaks ) ) {
|
112 |
return;
|
113 |
}
|
114 |
-
|
115 |
$no_reply_email = "noreply@" . parse_url( get_site_url(), PHP_URL_HOST );
|
116 |
$no_reply_email = apply_filters( 'wd_scan_noreply_email', $no_reply_email );
|
117 |
$headers = array(
|
118 |
'From: Defender <' . $no_reply_email . '>',
|
119 |
'Content-Type: text/html; charset=UTF-8'
|
120 |
);
|
121 |
-
|
122 |
-
$subject = _n( 'Security Tweak Report for %s. %s tweak needs attention.',
|
|
|
123 |
$subject = sprintf( $subject, network_site_url(), count( $tweaks ) );
|
124 |
-
|
125 |
foreach ( $settings->receipts as $receipt ) {
|
126 |
$email = $receipt['email'];
|
127 |
-
$ret = wp_mail( $email, $subject, $this->prepareEmailContent( $receipt['first_name'], $email ),
|
|
|
128 |
}
|
129 |
$settings->last_sent = time();
|
130 |
$settings->save();
|
131 |
}
|
132 |
-
|
133 |
private function prepareEmailContent( $firstName, $email = null ) {
|
134 |
$issues = "";
|
135 |
foreach ( Hardener\Model\Settings::instance()->getIssues() as $issue ) {
|
@@ -154,25 +158,27 @@ class Main extends Controller {
|
|
154 |
$contents = $this->renderPartial( 'email/notification', array(
|
155 |
'userName' => $firstName,
|
156 |
'siteUrl' => network_site_url(),
|
157 |
-
'viewUrl' => apply_filters( 'report_email_logs_link', network_admin_url( 'admin.php?page=wdf-hardener' ),
|
|
|
158 |
'issues' => $issues,
|
159 |
'count' => count( Hardener\Model\Settings::instance()->getIssues() )
|
160 |
), false );
|
161 |
-
|
162 |
return $contents;
|
163 |
}
|
164 |
-
|
165 |
/**
|
166 |
* Add submit admin page
|
167 |
*/
|
168 |
public function adminMenu() {
|
169 |
$cap = is_multisite() ? 'manage_network_options' : 'manage_options';
|
170 |
-
add_submenu_page( 'wp-defender', esc_html__( "Security Tweaks", "defender-security" ),
|
171 |
-
|
172 |
-
|
173 |
-
|
|
|
174 |
}
|
175 |
-
|
176 |
/**
|
177 |
* Main screen
|
178 |
*/
|
@@ -181,21 +187,22 @@ class Main extends Controller {
|
|
181 |
$settings = Hardener\Model\Settings::instance();
|
182 |
$settings->last_seen = time();
|
183 |
$settings->save();
|
184 |
-
|
185 |
return $this->render( 'main' );
|
186 |
}
|
187 |
-
|
188 |
/**
|
189 |
* Enqueue scripts & styles
|
190 |
*/
|
191 |
public function scripts() {
|
192 |
if ( $this->isInPage() ) {
|
193 |
wp_enqueue_style( 'defender' );
|
194 |
-
wp_register_script( 'defender-hardener', wp_defender()->getPluginUrl() . 'assets/app/security-tweaks.js',
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
|
|
199 |
wp_localize_script( 'defender-hardener', 'security_tweaks', $this->_scriptsData() );
|
200 |
Utils::instance()->createTranslationJson( 'defender-hardener' );
|
201 |
wp_set_script_translations( 'defender-hardener', 'wpdef', wp_defender()->getPluginPath() . 'languages' );
|
@@ -203,7 +210,7 @@ class Main extends Controller {
|
|
203 |
wp_enqueue_script( 'wpmudev-sui' );
|
204 |
}
|
205 |
}
|
206 |
-
|
207 |
/**
|
208 |
* @return array
|
209 |
*/
|
@@ -213,7 +220,7 @@ class Main extends Controller {
|
|
213 |
}
|
214 |
global $wp_version;
|
215 |
$settings = Hardener\Model\Settings::instance();
|
216 |
-
|
217 |
return [
|
218 |
'summary' => [
|
219 |
'issues_count' => $this->getCount( 'issues' ),
|
@@ -241,7 +248,7 @@ class Main extends Controller {
|
|
241 |
]
|
242 |
];
|
243 |
}
|
244 |
-
|
245 |
/**
|
246 |
*
|
247 |
* @param $type
|
@@ -250,15 +257,16 @@ class Main extends Controller {
|
|
250 |
*/
|
251 |
public function getCount( $type ) {
|
252 |
$settings = Hardener\Model\Settings::instance();
|
|
|
253 |
switch ( $type ) {
|
254 |
case 'issues':
|
255 |
-
return count( $settings->issues );
|
256 |
break;
|
257 |
case 'fixed':
|
258 |
-
return count( $settings->fixed );
|
259 |
break;
|
260 |
case 'ignore':
|
261 |
-
return count( $settings->ignore );
|
262 |
break;
|
263 |
default:
|
264 |
//param not from the button on frontend, log it
|
12 |
|
13 |
class Main extends Controller {
|
14 |
protected $slug = 'wdf-hardener';
|
15 |
+
|
16 |
/**
|
17 |
* @return array
|
18 |
*/
|
22 |
'endpoints' => '\WP_Defender\Behavior\Endpoint',
|
23 |
'wpmudev' => '\WP_Defender\Behavior\WPMUDEV'
|
24 |
];
|
25 |
+
|
26 |
return $behaviors;
|
27 |
}
|
28 |
+
|
29 |
/**
|
30 |
* Main constructor.
|
31 |
*/
|
35 |
} else {
|
36 |
$this->addAction( 'admin_menu', 'adminMenu' );
|
37 |
}
|
38 |
+
|
39 |
if ( $this->isInPage() ) {
|
40 |
$this->addAction( 'defender_enqueue_assets', 'scripts', 11 );
|
41 |
}
|
42 |
+
|
43 |
if ( ! wp_next_scheduled( 'tweaksSendNotification' ) ) {
|
44 |
wp_schedule_event( time(), 'twicedaily', 'tweaksSendNotification' );
|
45 |
}
|
46 |
+
|
47 |
$this->addAction( 'tweaksSendNotification', 'tweaksSendNotification' );
|
48 |
$this->addAction( 'wp_loaded', 'maybeUnsubscribe' );
|
49 |
}
|
50 |
+
|
51 |
public function maybeUnsubscribe() {
|
52 |
if ( ! is_user_logged_in() ) {
|
53 |
return;
|
54 |
}
|
55 |
+
|
56 |
$action = HTTP_Helper::retrieveGet( 'action' );
|
57 |
if ( $action == 'unsubscribe_notification' ) {
|
58 |
$user = get_user_by( 'id', get_current_user_id() );
|
76 |
exit;
|
77 |
}
|
78 |
}
|
79 |
+
|
80 |
public function tweaksSendNotification() {
|
81 |
$settings = Hardener\Model\Settings::instance();
|
82 |
$canSend = false;
|
83 |
if ( $settings->last_sent ) {
|
84 |
if (
|
85 |
$settings->notification_repeat == true
|
86 |
+
&& strtotime( apply_filters( 'wd_tweaks_notification_interval', '+24 hours' ),
|
87 |
+
apply_filters( 'wd_tweaks_last_notification_sent', $settings->last_sent ) ) < time() ) {
|
88 |
$canSend = true;
|
89 |
}
|
90 |
} else {
|
94 |
$settings->last_seen = time();
|
95 |
$settings->save();
|
96 |
}
|
97 |
+
|
98 |
+
if ( strtotime( apply_filters( 'wd_tweaks_notification_interval', '+7 days' ),
|
99 |
+
apply_filters( 'wd_tweaks_last_action_time', $settings->last_seen ) ) > time() ) {
|
100 |
return;
|
101 |
}
|
102 |
+
|
103 |
$canSend = true;
|
104 |
}
|
105 |
+
|
106 |
if ( ! $canSend ) {
|
107 |
return;
|
108 |
}
|
109 |
+
|
110 |
$settings->refreshStatus();
|
111 |
$tweaks = $settings->getIssues();
|
112 |
+
|
113 |
if ( ! count( $tweaks ) ) {
|
114 |
return;
|
115 |
}
|
116 |
+
|
117 |
$no_reply_email = "noreply@" . parse_url( get_site_url(), PHP_URL_HOST );
|
118 |
$no_reply_email = apply_filters( 'wd_scan_noreply_email', $no_reply_email );
|
119 |
$headers = array(
|
120 |
'From: Defender <' . $no_reply_email . '>',
|
121 |
'Content-Type: text/html; charset=UTF-8'
|
122 |
);
|
123 |
+
|
124 |
+
$subject = _n( 'Security Tweak Report for %s. %s tweak needs attention.',
|
125 |
+
'Security Tweak Report for %s. %s tweaks needs attention.', count( $tweaks ), "defender-security" );
|
126 |
$subject = sprintf( $subject, network_site_url(), count( $tweaks ) );
|
127 |
+
|
128 |
foreach ( $settings->receipts as $receipt ) {
|
129 |
$email = $receipt['email'];
|
130 |
+
$ret = wp_mail( $email, $subject, $this->prepareEmailContent( $receipt['first_name'], $email ),
|
131 |
+
$headers );
|
132 |
}
|
133 |
$settings->last_sent = time();
|
134 |
$settings->save();
|
135 |
}
|
136 |
+
|
137 |
private function prepareEmailContent( $firstName, $email = null ) {
|
138 |
$issues = "";
|
139 |
foreach ( Hardener\Model\Settings::instance()->getIssues() as $issue ) {
|
158 |
$contents = $this->renderPartial( 'email/notification', array(
|
159 |
'userName' => $firstName,
|
160 |
'siteUrl' => network_site_url(),
|
161 |
+
'viewUrl' => apply_filters( 'report_email_logs_link', network_admin_url( 'admin.php?page=wdf-hardener' ),
|
162 |
+
$email ),
|
163 |
'issues' => $issues,
|
164 |
'count' => count( Hardener\Model\Settings::instance()->getIssues() )
|
165 |
), false );
|
166 |
+
|
167 |
return $contents;
|
168 |
}
|
169 |
+
|
170 |
/**
|
171 |
* Add submit admin page
|
172 |
*/
|
173 |
public function adminMenu() {
|
174 |
$cap = is_multisite() ? 'manage_network_options' : 'manage_options';
|
175 |
+
add_submenu_page( 'wp-defender', esc_html__( "Security Tweaks", "defender-security" ),
|
176 |
+
esc_html__( "Security Tweaks", "defender-security" ), $cap, $this->slug, array(
|
177 |
+
&$this,
|
178 |
+
'actionIndex'
|
179 |
+
) );
|
180 |
}
|
181 |
+
|
182 |
/**
|
183 |
* Main screen
|
184 |
*/
|
187 |
$settings = Hardener\Model\Settings::instance();
|
188 |
$settings->last_seen = time();
|
189 |
$settings->save();
|
190 |
+
|
191 |
return $this->render( 'main' );
|
192 |
}
|
193 |
+
|
194 |
/**
|
195 |
* Enqueue scripts & styles
|
196 |
*/
|
197 |
public function scripts() {
|
198 |
if ( $this->isInPage() ) {
|
199 |
wp_enqueue_style( 'defender' );
|
200 |
+
wp_register_script( 'defender-hardener', wp_defender()->getPluginUrl() . 'assets/app/security-tweaks.js',
|
201 |
+
array(
|
202 |
+
'def-vue',
|
203 |
+
'defender',
|
204 |
+
'wp-i18n'
|
205 |
+
), false, true );
|
206 |
wp_localize_script( 'defender-hardener', 'security_tweaks', $this->_scriptsData() );
|
207 |
Utils::instance()->createTranslationJson( 'defender-hardener' );
|
208 |
wp_set_script_translations( 'defender-hardener', 'wpdef', wp_defender()->getPluginPath() . 'languages' );
|
210 |
wp_enqueue_script( 'wpmudev-sui' );
|
211 |
}
|
212 |
}
|
213 |
+
|
214 |
/**
|
215 |
* @return array
|
216 |
*/
|
220 |
}
|
221 |
global $wp_version;
|
222 |
$settings = Hardener\Model\Settings::instance();
|
223 |
+
|
224 |
return [
|
225 |
'summary' => [
|
226 |
'issues_count' => $this->getCount( 'issues' ),
|
248 |
]
|
249 |
];
|
250 |
}
|
251 |
+
|
252 |
/**
|
253 |
*
|
254 |
* @param $type
|
257 |
*/
|
258 |
public function getCount( $type ) {
|
259 |
$settings = Hardener\Model\Settings::instance();
|
260 |
+
|
261 |
switch ( $type ) {
|
262 |
case 'issues':
|
263 |
+
return count( (array) array_filter( $settings->issues ) );
|
264 |
break;
|
265 |
case 'fixed':
|
266 |
+
return count( (array) array_filter( $settings->fixed ) );
|
267 |
break;
|
268 |
case 'ignore':
|
269 |
+
return count( (array) array_filter( $settings->ignore ) );
|
270 |
break;
|
271 |
default:
|
272 |
//param not from the button on frontend, log it
|
app/module/hardener/model/settings.php
CHANGED
@@ -8,7 +8,6 @@ namespace WP_Defender\Module\Hardener\Model;
|
|
8 |
use Hammer\Helper\WP_Helper;
|
9 |
use WP_Defender\Behavior\Utils;
|
10 |
use WP_Defender\Module\Hardener\Component\Change_Admin;
|
11 |
-
use WP_Defender\Module\Hardener\Component\DB_Prefix;
|
12 |
use WP_Defender\Module\Hardener\Component\Disable_File_Editor;
|
13 |
use WP_Defender\Module\Hardener\Component\Disable_Trackback;
|
14 |
use WP_Defender\Module\Hardener\Component\Disable_Xml_Rpc;
|
@@ -19,7 +18,6 @@ use WP_Defender\Module\Hardener\Component\Prevent_Enum_Users;
|
|
19 |
use WP_Defender\Module\Hardener\Component\Prevent_Php;
|
20 |
use WP_Defender\Module\Hardener\Component\Protect_Information;
|
21 |
use WP_Defender\Module\Hardener\Component\Security_Key;
|
22 |
-
use WP_Defender\Module\Hardener\Component\WP_Rest_Api;
|
23 |
use WP_Defender\Module\Hardener\Component\WP_Version;
|
24 |
use WP_Defender\Module\Hardener\Rule;
|
25 |
|
@@ -35,26 +33,26 @@ class Settings extends \Hammer\WP\Settings {
|
|
35 |
* @var array
|
36 |
*/
|
37 |
public $issues = array();
|
38 |
-
|
39 |
/**
|
40 |
* Contains fixed rules
|
41 |
* @var array
|
42 |
*/
|
43 |
-
|
44 |
public $fixed = array();
|
45 |
-
|
46 |
/**
|
47 |
* Contains ignored issue
|
48 |
* @var array
|
49 |
*/
|
50 |
public $ignore = array();
|
51 |
-
|
52 |
/**
|
53 |
* Store the last status check, we will check & fetch the status intervally, this can reduce load time.
|
54 |
* @var null
|
55 |
*/
|
56 |
public $last_status_check = null;
|
57 |
-
|
58 |
/**
|
59 |
* Toggle notification
|
60 |
* @var bool
|
@@ -64,53 +62,53 @@ class Settings extends \Hammer\WP\Settings {
|
|
64 |
* @var bool
|
65 |
*/
|
66 |
public $notification_repeat = false;
|
67 |
-
|
68 |
/**
|
69 |
* Holding recipients info
|
70 |
* @var array
|
71 |
*/
|
72 |
public $receipts = array();
|
73 |
-
|
74 |
/**
|
75 |
* Contains all the data generated by rules
|
76 |
* @var array
|
77 |
*/
|
78 |
public $data = array();
|
79 |
-
|
80 |
/**
|
81 |
* Holding excluded file path info
|
82 |
* @var array
|
83 |
*/
|
84 |
public $exclude_file_paths = array();
|
85 |
-
|
86 |
/**
|
87 |
* Holds new htconfig structure for defender
|
88 |
*
|
89 |
* @var array
|
90 |
*/
|
91 |
public $new_htconfig = array();
|
92 |
-
|
93 |
/**
|
94 |
* Current active server
|
95 |
*
|
96 |
* @var String
|
97 |
*/
|
98 |
public $active_server = 'apache';
|
99 |
-
|
100 |
/**
|
101 |
* Last time visit into the hardener page
|
102 |
*
|
103 |
* @var integer
|
104 |
*/
|
105 |
public $last_seen;
|
106 |
-
|
107 |
/**
|
108 |
* Last notification sent out
|
109 |
*
|
110 |
* @var integer
|
111 |
*/
|
112 |
public $last_sent;
|
113 |
-
|
114 |
/**
|
115 |
* @var string
|
116 |
*/
|
@@ -119,21 +117,23 @@ class Settings extends \Hammer\WP\Settings {
|
|
119 |
* @var string
|
120 |
*/
|
121 |
public $stable_php_version = '';
|
122 |
-
|
123 |
/**
|
124 |
* We have to flag if the db prefix changed by us or not
|
125 |
*
|
126 |
* @var bool
|
127 |
*/
|
128 |
public $is_prefix_changed = false;
|
129 |
-
|
|
|
|
|
130 |
/**
|
131 |
* shorthand to add to a list
|
132 |
*
|
133 |
* @param $slug
|
134 |
* @param $devPush
|
135 |
*/
|
136 |
-
|
137 |
public function __construct( $id, $is_multi ) {
|
138 |
if ( is_admin() || is_network_admin() && current_user_can( 'manage_options' ) ) {
|
139 |
$user = wp_get_current_user();
|
@@ -152,15 +152,15 @@ class Settings extends \Hammer\WP\Settings {
|
|
152 |
}
|
153 |
$this->receipts = array_values( $this->receipts );
|
154 |
}
|
155 |
-
|
156 |
/**
|
157 |
* @param $slug
|
158 |
-
* @param
|
159 |
*/
|
160 |
public function addToIssues( $slug, $devPush = true ) {
|
161 |
$this->addToList( 'issues', $slug, $devPush );
|
162 |
}
|
163 |
-
|
164 |
/**
|
165 |
* shorthand to add to a list
|
166 |
*
|
@@ -170,7 +170,7 @@ class Settings extends \Hammer\WP\Settings {
|
|
170 |
public function addToIgnore( $slug, $devPush = true ) {
|
171 |
$this->addToList( 'ignore', $slug, $devPush );
|
172 |
}
|
173 |
-
|
174 |
/**
|
175 |
* shorthand to add to a list
|
176 |
*
|
@@ -180,7 +180,7 @@ class Settings extends \Hammer\WP\Settings {
|
|
180 |
public function addToResolved( $slug, $devPush = true ) {
|
181 |
$this->addToList( 'fixed', $slug, $devPush );
|
182 |
}
|
183 |
-
|
184 |
/**
|
185 |
* @param $list
|
186 |
* @param $slug
|
@@ -195,7 +195,7 @@ class Settings extends \Hammer\WP\Settings {
|
|
195 |
if ( ! in_array( $list, $lists ) ) {
|
196 |
return;
|
197 |
}
|
198 |
-
|
199 |
//remove from lists
|
200 |
foreach ( $lists as $l ) {
|
201 |
if ( $l == $list ) {
|
@@ -206,7 +206,7 @@ class Settings extends \Hammer\WP\Settings {
|
|
206 |
unset( $this->{$l}[ $key ] );
|
207 |
}
|
208 |
}
|
209 |
-
|
210 |
array_push( $this->$list, $slug );
|
211 |
$this->$list = array_unique( $this->$list );
|
212 |
$this->last_status_check = time();
|
@@ -215,7 +215,7 @@ class Settings extends \Hammer\WP\Settings {
|
|
215 |
Utils::instance()->submitStatsToDev();
|
216 |
}
|
217 |
}
|
218 |
-
|
219 |
/**
|
220 |
* @return Settings
|
221 |
*/
|
@@ -224,12 +224,13 @@ class Settings extends \Hammer\WP\Settings {
|
|
224 |
self::$_instance = null;
|
225 |
}
|
226 |
if ( is_null( self::$_instance ) ) {
|
227 |
-
self::$_instance = new Settings( 'wd_hardener_settings',
|
|
|
228 |
}
|
229 |
-
|
230 |
return self::$_instance;
|
231 |
}
|
232 |
-
|
233 |
/**
|
234 |
* refresh rules status and store the index
|
235 |
*/
|
@@ -237,8 +238,15 @@ class Settings extends \Hammer\WP\Settings {
|
|
237 |
$definedRules = $this->getDefinedRules( true );
|
238 |
$this->fixed = array();
|
239 |
$this->issues = array();
|
|
|
|
|
|
|
|
|
240 |
foreach ( $definedRules as $rule ) {
|
241 |
-
if (
|
|
|
|
|
|
|
242 |
//this rule ignored, no process
|
243 |
continue;
|
244 |
}
|
@@ -248,10 +256,11 @@ class Settings extends \Hammer\WP\Settings {
|
|
248 |
$this->issues[] = $rule::$slug;
|
249 |
}
|
250 |
}
|
|
|
251 |
$this->last_status_check = time();
|
252 |
$this->save();
|
253 |
}
|
254 |
-
|
255 |
/**
|
256 |
* Get Issues tweaks as object
|
257 |
* @return Rule[]
|
@@ -264,10 +273,10 @@ class Settings extends \Hammer\WP\Settings {
|
|
264 |
$issues[] = $rules[ $issue ];
|
265 |
}
|
266 |
}
|
267 |
-
|
268 |
return $issues;
|
269 |
}
|
270 |
-
|
271 |
/**
|
272 |
* Filter the tweaks and return data as array
|
273 |
*
|
@@ -278,7 +287,7 @@ class Settings extends \Hammer\WP\Settings {
|
|
278 |
*/
|
279 |
public function getTweaksAsArray( $type, $sort = false ) {
|
280 |
$rules = $this->getDefinedRules( true );
|
281 |
-
|
282 |
$arr = $this->$type;
|
283 |
$data = array();
|
284 |
foreach ( $arr as $tweak ) {
|
@@ -294,14 +303,14 @@ class Settings extends \Hammer\WP\Settings {
|
|
294 |
);
|
295 |
}
|
296 |
}
|
297 |
-
|
298 |
if ( $sort ) {
|
299 |
ksort( $data );
|
300 |
}
|
301 |
-
|
302 |
return $data;
|
303 |
}
|
304 |
-
|
305 |
/**
|
306 |
* @return array
|
307 |
*/
|
@@ -313,25 +322,27 @@ class Settings extends \Hammer\WP\Settings {
|
|
313 |
$issues[] = $rules[ $issue ];
|
314 |
}
|
315 |
}
|
316 |
-
|
317 |
return $issues;
|
318 |
}
|
319 |
-
|
320 |
/**
|
321 |
* @return Rule[]
|
322 |
*/
|
323 |
public function getFixed() {
|
324 |
$rules = $this->getDefinedRules( true );
|
325 |
$issues = array();
|
326 |
-
|
327 |
-
|
328 |
-
|
|
|
|
|
329 |
}
|
330 |
}
|
331 |
-
|
332 |
return $issues;
|
333 |
}
|
334 |
-
|
335 |
/**
|
336 |
* @param $slug
|
337 |
*
|
@@ -343,32 +354,32 @@ class Settings extends \Hammer\WP\Settings {
|
|
343 |
return $rules[ $slug ];
|
344 |
}
|
345 |
}
|
346 |
-
|
347 |
/**
|
348 |
*
|
349 |
-
* @param
|
350 |
*
|
351 |
* @return array
|
352 |
*/
|
353 |
public function getDefinedRules( $init = false ) {
|
354 |
return array(
|
355 |
-
Disable_Trackback::$slug
|
356 |
-
WP_Version::$slug
|
357 |
-
PHP_Version::$slug
|
358 |
-
Change_Admin::$slug
|
359 |
-
DB_Prefix::$slug
|
360 |
-
Disable_File_Editor::$slug
|
361 |
-
Hide_Error::$slug
|
362 |
-
Prevent_Enum_Users::$slug
|
363 |
-
Security_Key::$slug
|
364 |
-
Protect_Information::$slug
|
365 |
-
Prevent_Php::$slug
|
366 |
-
Login_Duration::$slug
|
367 |
-
Disable_Xml_Rpc::$slug
|
368 |
//WP_Rest_Api::$slug => $init == true ? new WP_Rest_Api() : WP_Rest_Api::getClassName(),
|
369 |
);
|
370 |
}
|
371 |
-
|
372 |
/**
|
373 |
* @param $key
|
374 |
*
|
@@ -378,15 +389,18 @@ class Settings extends \Hammer\WP\Settings {
|
|
378 |
if ( is_array( $this->data ) && isset( $this->data[ $key ] ) ) {
|
379 |
return $this->data[ $key ];
|
380 |
}
|
381 |
-
|
382 |
return null;
|
383 |
}
|
384 |
-
|
385 |
/**
|
386 |
* @param $key
|
387 |
* @param $value
|
388 |
*/
|
389 |
public function setDValues( $key, $value ) {
|
|
|
|
|
|
|
390 |
if ( $value == null ) {
|
391 |
unset( $this->data[ $key ] );
|
392 |
} else {
|
@@ -394,25 +408,25 @@ class Settings extends \Hammer\WP\Settings {
|
|
394 |
}
|
395 |
$this->save();
|
396 |
}
|
397 |
-
|
398 |
/**
|
399 |
* Save the exclude file paths
|
400 |
*
|
401 |
-
* @param
|
402 |
*/
|
403 |
public function saveExcludedFilePaths( $paths = array() ) {
|
404 |
$this->exclude_file_paths = $paths;
|
405 |
}
|
406 |
-
|
407 |
/**
|
408 |
* Save the htconfig
|
409 |
*
|
410 |
-
* @param
|
411 |
*/
|
412 |
public function saveNewHtConfig( $config = array() ) {
|
413 |
$this->new_htconfig = $config;
|
414 |
}
|
415 |
-
|
416 |
/**
|
417 |
* Get the exclude file paths
|
418 |
*
|
@@ -421,7 +435,7 @@ class Settings extends \Hammer\WP\Settings {
|
|
421 |
public function getExcludedFilePaths() {
|
422 |
return $this->exclude_file_paths;
|
423 |
}
|
424 |
-
|
425 |
/**
|
426 |
* Get the new htconfig
|
427 |
*
|
@@ -430,16 +444,16 @@ class Settings extends \Hammer\WP\Settings {
|
|
430 |
public function getNewHtConfig() {
|
431 |
return $this->new_htconfig;
|
432 |
}
|
433 |
-
|
434 |
/**
|
435 |
* Set the active server
|
436 |
*
|
437 |
-
* @param
|
438 |
*/
|
439 |
public function setActiveServer( $server ) {
|
440 |
$this->active_server = $server;
|
441 |
}
|
442 |
-
|
443 |
/**
|
444 |
* @return array
|
445 |
*/
|
@@ -460,32 +474,148 @@ class Settings extends \Hammer\WP\Settings {
|
|
460 |
}
|
461 |
}
|
462 |
}
|
463 |
-
)
|
464 |
-
)
|
465 |
);
|
466 |
}
|
467 |
-
|
468 |
/**
|
469 |
* Define labels for settings key, we will use it for HUB
|
470 |
*
|
471 |
-
* @param
|
472 |
*
|
473 |
* @return array|mixed
|
474 |
*/
|
475 |
public function labels( $key = null ) {
|
476 |
$labels = [
|
477 |
-
'notification' => __( '
|
478 |
-
'
|
479 |
-
'
|
480 |
];
|
481 |
-
|
482 |
if ( $key != null ) {
|
483 |
return isset( $labels[ $key ] ) ? $labels[ $key ] : null;
|
484 |
}
|
485 |
-
|
486 |
return $labels;
|
487 |
}
|
488 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
489 |
public function resolve( $rules ) {
|
490 |
if ( $rules == true ) {
|
491 |
$rules = $this->getDefinedRules( true );
|
8 |
use Hammer\Helper\WP_Helper;
|
9 |
use WP_Defender\Behavior\Utils;
|
10 |
use WP_Defender\Module\Hardener\Component\Change_Admin;
|
|
|
11 |
use WP_Defender\Module\Hardener\Component\Disable_File_Editor;
|
12 |
use WP_Defender\Module\Hardener\Component\Disable_Trackback;
|
13 |
use WP_Defender\Module\Hardener\Component\Disable_Xml_Rpc;
|
18 |
use WP_Defender\Module\Hardener\Component\Prevent_Php;
|
19 |
use WP_Defender\Module\Hardener\Component\Protect_Information;
|
20 |
use WP_Defender\Module\Hardener\Component\Security_Key;
|
|
|
21 |
use WP_Defender\Module\Hardener\Component\WP_Version;
|
22 |
use WP_Defender\Module\Hardener\Rule;
|
23 |
|
33 |
* @var array
|
34 |
*/
|
35 |
public $issues = array();
|
36 |
+
|
37 |
/**
|
38 |
* Contains fixed rules
|
39 |
* @var array
|
40 |
*/
|
41 |
+
|
42 |
public $fixed = array();
|
43 |
+
|
44 |
/**
|
45 |
* Contains ignored issue
|
46 |
* @var array
|
47 |
*/
|
48 |
public $ignore = array();
|
49 |
+
|
50 |
/**
|
51 |
* Store the last status check, we will check & fetch the status intervally, this can reduce load time.
|
52 |
* @var null
|
53 |
*/
|
54 |
public $last_status_check = null;
|
55 |
+
|
56 |
/**
|
57 |
* Toggle notification
|
58 |
* @var bool
|
62 |
* @var bool
|
63 |
*/
|
64 |
public $notification_repeat = false;
|
65 |
+
|
66 |
/**
|
67 |
* Holding recipients info
|
68 |
* @var array
|
69 |
*/
|
70 |
public $receipts = array();
|
71 |
+
|
72 |
/**
|
73 |
* Contains all the data generated by rules
|
74 |
* @var array
|
75 |
*/
|
76 |
public $data = array();
|
77 |
+
|
78 |
/**
|
79 |
* Holding excluded file path info
|
80 |
* @var array
|
81 |
*/
|
82 |
public $exclude_file_paths = array();
|
83 |
+
|
84 |
/**
|
85 |
* Holds new htconfig structure for defender
|
86 |
*
|
87 |
* @var array
|
88 |
*/
|
89 |
public $new_htconfig = array();
|
90 |
+
|
91 |
/**
|
92 |
* Current active server
|
93 |
*
|
94 |
* @var String
|
95 |
*/
|
96 |
public $active_server = 'apache';
|
97 |
+
|
98 |
/**
|
99 |
* Last time visit into the hardener page
|
100 |
*
|
101 |
* @var integer
|
102 |
*/
|
103 |
public $last_seen;
|
104 |
+
|
105 |
/**
|
106 |
* Last notification sent out
|
107 |
*
|
108 |
* @var integer
|
109 |
*/
|
110 |
public $last_sent;
|
111 |
+
|
112 |
/**
|
113 |
* @var string
|
114 |
*/
|
117 |
* @var string
|
118 |
*/
|
119 |
public $stable_php_version = '';
|
120 |
+
|
121 |
/**
|
122 |
* We have to flag if the db prefix changed by us or not
|
123 |
*
|
124 |
* @var bool
|
125 |
*/
|
126 |
public $is_prefix_changed = false;
|
127 |
+
|
128 |
+
public $automate = false;
|
129 |
+
|
130 |
/**
|
131 |
* shorthand to add to a list
|
132 |
*
|
133 |
* @param $slug
|
134 |
* @param $devPush
|
135 |
*/
|
136 |
+
|
137 |
public function __construct( $id, $is_multi ) {
|
138 |
if ( is_admin() || is_network_admin() && current_user_can( 'manage_options' ) ) {
|
139 |
$user = wp_get_current_user();
|
152 |
}
|
153 |
$this->receipts = array_values( $this->receipts );
|
154 |
}
|
155 |
+
|
156 |
/**
|
157 |
* @param $slug
|
158 |
+
* @param bool $devPush
|
159 |
*/
|
160 |
public function addToIssues( $slug, $devPush = true ) {
|
161 |
$this->addToList( 'issues', $slug, $devPush );
|
162 |
}
|
163 |
+
|
164 |
/**
|
165 |
* shorthand to add to a list
|
166 |
*
|
170 |
public function addToIgnore( $slug, $devPush = true ) {
|
171 |
$this->addToList( 'ignore', $slug, $devPush );
|
172 |
}
|
173 |
+
|
174 |
/**
|
175 |
* shorthand to add to a list
|
176 |
*
|
180 |
public function addToResolved( $slug, $devPush = true ) {
|
181 |
$this->addToList( 'fixed', $slug, $devPush );
|
182 |
}
|
183 |
+
|
184 |
/**
|
185 |
* @param $list
|
186 |
* @param $slug
|
195 |
if ( ! in_array( $list, $lists ) ) {
|
196 |
return;
|
197 |
}
|
198 |
+
|
199 |
//remove from lists
|
200 |
foreach ( $lists as $l ) {
|
201 |
if ( $l == $list ) {
|
206 |
unset( $this->{$l}[ $key ] );
|
207 |
}
|
208 |
}
|
209 |
+
|
210 |
array_push( $this->$list, $slug );
|
211 |
$this->$list = array_unique( $this->$list );
|
212 |
$this->last_status_check = time();
|
215 |
Utils::instance()->submitStatsToDev();
|
216 |
}
|
217 |
}
|
218 |
+
|
219 |
/**
|
220 |
* @return Settings
|
221 |
*/
|
224 |
self::$_instance = null;
|
225 |
}
|
226 |
if ( is_null( self::$_instance ) ) {
|
227 |
+
self::$_instance = new Settings( 'wd_hardener_settings',
|
228 |
+
WP_Helper::is_network_activate( wp_defender()->plugin_slug ) );
|
229 |
}
|
230 |
+
|
231 |
return self::$_instance;
|
232 |
}
|
233 |
+
|
234 |
/**
|
235 |
* refresh rules status and store the index
|
236 |
*/
|
238 |
$definedRules = $this->getDefinedRules( true );
|
239 |
$this->fixed = array();
|
240 |
$this->issues = array();
|
241 |
+
if ( ! is_array( $this->ignore ) ) {
|
242 |
+
$this->ignore = array();
|
243 |
+
}
|
244 |
+
|
245 |
foreach ( $definedRules as $rule ) {
|
246 |
+
if (
|
247 |
+
empty( $rule::$slug )
|
248 |
+
|| in_array( $rule::$slug, $this->ignore, true )
|
249 |
+
) {
|
250 |
//this rule ignored, no process
|
251 |
continue;
|
252 |
}
|
256 |
$this->issues[] = $rule::$slug;
|
257 |
}
|
258 |
}
|
259 |
+
|
260 |
$this->last_status_check = time();
|
261 |
$this->save();
|
262 |
}
|
263 |
+
|
264 |
/**
|
265 |
* Get Issues tweaks as object
|
266 |
* @return Rule[]
|
273 |
$issues[] = $rules[ $issue ];
|
274 |
}
|
275 |
}
|
276 |
+
|
277 |
return $issues;
|
278 |
}
|
279 |
+
|
280 |
/**
|
281 |
* Filter the tweaks and return data as array
|
282 |
*
|
287 |
*/
|
288 |
public function getTweaksAsArray( $type, $sort = false ) {
|
289 |
$rules = $this->getDefinedRules( true );
|
290 |
+
|
291 |
$arr = $this->$type;
|
292 |
$data = array();
|
293 |
foreach ( $arr as $tweak ) {
|
303 |
);
|
304 |
}
|
305 |
}
|
306 |
+
|
307 |
if ( $sort ) {
|
308 |
ksort( $data );
|
309 |
}
|
310 |
+
|
311 |
return $data;
|
312 |
}
|
313 |
+
|
314 |
/**
|
315 |
* @return array
|
316 |
*/
|
322 |
$issues[] = $rules[ $issue ];
|
323 |
}
|
324 |
}
|
325 |
+
|
326 |
return $issues;
|
327 |
}
|
328 |
+
|
329 |
/**
|
330 |
* @return Rule[]
|
331 |
*/
|
332 |
public function getFixed() {
|
333 |
$rules = $this->getDefinedRules( true );
|
334 |
$issues = array();
|
335 |
+
if ( is_array( $this->fixed ) && ! empty( $this->fixed ) ) {
|
336 |
+
foreach ( $this->fixed as $issue ) {
|
337 |
+
if ( isset( $rules[ $issue ] ) ) {
|
338 |
+
$issues[] = $rules[ $issue ];
|
339 |
+
}
|
340 |
}
|
341 |
}
|
342 |
+
|
343 |
return $issues;
|
344 |
}
|
345 |
+
|
346 |
/**
|
347 |
* @param $slug
|
348 |
*
|
354 |
return $rules[ $slug ];
|
355 |
}
|
356 |
}
|
357 |
+
|
358 |
/**
|
359 |
*
|
360 |
+
* @param bool $init
|
361 |
*
|
362 |
* @return array
|
363 |
*/
|
364 |
public function getDefinedRules( $init = false ) {
|
365 |
return array(
|
366 |
+
Disable_Trackback::$slug => $init == true ? new Disable_Trackback() : Disable_Trackback::getClassName(),
|
367 |
+
WP_Version::$slug => $init == true ? new WP_Version() : WP_Version::getClassName(),
|
368 |
+
PHP_Version::$slug => $init == true ? new PHP_Version() : PHP_Version::getClassName(),
|
369 |
+
Change_Admin::$slug => $init == true ? new Change_Admin() : Change_Admin::getClassName(),
|
370 |
+
//DB_Prefix::$slug => $init == true ? new DB_Prefix() : DB_Prefix::getClassName(),
|
371 |
+
Disable_File_Editor::$slug => $init == true ? new Disable_File_Editor() : Disable_File_Editor::getClassName(),
|
372 |
+
Hide_Error::$slug => $init == true ? new Hide_Error() : Hide_Error::getClassName(),
|
373 |
+
Prevent_Enum_Users::$slug => $init == true ? new Prevent_Enum_Users() : Prevent_Enum_Users::getClassName(),
|
374 |
+
Security_Key::$slug => $init == true ? new Security_Key() : Security_Key::getClassName(),
|
375 |
+
Protect_Information::$slug => $init == true ? new Protect_Information() : Protect_Information::getClassName(),
|
376 |
+
Prevent_Php::$slug => $init == true ? new Prevent_Php() : Prevent_Php::getClassName(),
|
377 |
+
Login_Duration::$slug => $init == true ? new Login_Duration() : Login_Duration::getClassName(),
|
378 |
+
Disable_Xml_Rpc::$slug => $init == true ? new Disable_Xml_Rpc() : Disable_Xml_Rpc::getClassName(),
|
379 |
//WP_Rest_Api::$slug => $init == true ? new WP_Rest_Api() : WP_Rest_Api::getClassName(),
|
380 |
);
|
381 |
}
|
382 |
+
|
383 |
/**
|
384 |
* @param $key
|
385 |
*
|
389 |
if ( is_array( $this->data ) && isset( $this->data[ $key ] ) ) {
|
390 |
return $this->data[ $key ];
|
391 |
}
|
392 |
+
|
393 |
return null;
|
394 |
}
|
395 |
+
|
396 |
/**
|
397 |
* @param $key
|
398 |
* @param $value
|
399 |
*/
|
400 |
public function setDValues( $key, $value ) {
|
401 |
+
if ( ! is_array( $this->data ) ) {
|
402 |
+
$this->data = [];
|
403 |
+
}
|
404 |
if ( $value == null ) {
|
405 |
unset( $this->data[ $key ] );
|
406 |
} else {
|
408 |
}
|
409 |
$this->save();
|
410 |
}
|
411 |
+
|
412 |
/**
|
413 |
* Save the exclude file paths
|
414 |
*
|
415 |
+
* @param Array - $paths
|
416 |
*/
|
417 |
public function saveExcludedFilePaths( $paths = array() ) {
|
418 |
$this->exclude_file_paths = $paths;
|
419 |
}
|
420 |
+
|
421 |
/**
|
422 |
* Save the htconfig
|
423 |
*
|
424 |
+
* @param Array - $config
|
425 |
*/
|
426 |
public function saveNewHtConfig( $config = array() ) {
|
427 |
$this->new_htconfig = $config;
|
428 |
}
|
429 |
+
|
430 |
/**
|
431 |
* Get the exclude file paths
|
432 |
*
|
435 |
public function getExcludedFilePaths() {
|
436 |
return $this->exclude_file_paths;
|
437 |
}
|
438 |
+
|
439 |
/**
|
440 |
* Get the new htconfig
|
441 |
*
|
444 |
public function getNewHtConfig() {
|
445 |
return $this->new_htconfig;
|
446 |
}
|
447 |
+
|
448 |
/**
|
449 |
* Set the active server
|
450 |
*
|
451 |
+
* @param String $server
|
452 |
*/
|
453 |
public function setActiveServer( $server ) {
|
454 |
$this->active_server = $server;
|
455 |
}
|
456 |
+
|
457 |
/**
|
458 |
* @return array
|
459 |
*/
|
474 |
}
|
475 |
}
|
476 |
}
|
477 |
+
),
|
478 |
+
),
|
479 |
);
|
480 |
}
|
481 |
+
|
482 |
/**
|
483 |
* Define labels for settings key, we will use it for HUB
|
484 |
*
|
485 |
+
* @param null $key
|
486 |
*
|
487 |
* @return array|mixed
|
488 |
*/
|
489 |
public function labels( $key = null ) {
|
490 |
$labels = [
|
491 |
+
'notification' => __( 'Email reminders', "defender-security" ),
|
492 |
+
'notification_repeat' => __( "Remind every 24 hours", "defender-security" ),
|
493 |
+
'receipts' => __( 'Email reminder recipients', "defender-security" ),
|
494 |
];
|
495 |
+
|
496 |
if ( $key != null ) {
|
497 |
return isset( $labels[ $key ] ) ? $labels[ $key ] : null;
|
498 |
}
|
499 |
+
|
500 |
return $labels;
|
501 |
}
|
502 |
+
|
503 |
+
/**
|
504 |
+
* Get export strings, use in config import.export
|
505 |
+
*
|
506 |
+
* @param $configs
|
507 |
+
*
|
508 |
+
* @return array
|
509 |
+
*/
|
510 |
+
public function export_strings( $configs ) {
|
511 |
+
$this->refreshStatus();
|
512 |
+
$strings = [];
|
513 |
+
$model = new Settings( 'wd_hardener_settings',
|
514 |
+
WP_Helper::is_network_activate( wp_defender()->plugin_slug ) );
|
515 |
+
$model->import( $configs );
|
516 |
+
if ( $model->automate ) {
|
517 |
+
//if automate, mean enable as much as possible
|
518 |
+
$count = count( $this->getDefinedRules() );
|
519 |
+
$manual_done = [
|
520 |
+
Change_Admin::$slug,
|
521 |
+
PHP_Version::$slug,
|
522 |
+
Prevent_Php::$slug,
|
523 |
+
Protect_Information::$slug,
|
524 |
+
WP_Version::$slug
|
525 |
+
];
|
526 |
+
if ( is_array( $this->fixed ) && ! empty( $this->fixed ) ) {
|
527 |
+
foreach ( $manual_done as $slug ) {
|
528 |
+
if ( ! in_array( $slug, $this->fixed ) ) {
|
529 |
+
$count -= 1;
|
530 |
+
}
|
531 |
+
}
|
532 |
+
}
|
533 |
+
$strings[] = sprintf( __( '%d/%d recommendations activated', "defender-security" ),
|
534 |
+
$count, count( $model->getDefinedRules() ) );
|
535 |
+
} elseif ( empty( $model->getIssues() ) ) {
|
536 |
+
$strings[] = __( 'All available recommendations activated', "defender-security" );
|
537 |
+
} else {
|
538 |
+
$strings[] = sprintf( __( '%d/%d recommendations activated', "defender-security" ),
|
539 |
+
count( $model->getFixed() ), count( $model->getDefinedRules() ) );
|
540 |
+
}
|
541 |
+
|
542 |
+
if ( $model->notification ) {
|
543 |
+
$strings[] = __( 'Email notifications active', "defender-security" );
|
544 |
+
}
|
545 |
+
|
546 |
+
return $strings;
|
547 |
+
}
|
548 |
+
|
549 |
+
/**
|
550 |
+
* This is for the case like Change_Admin
|
551 |
+
* @return array
|
552 |
+
*/
|
553 |
+
public function export_extra() {
|
554 |
+
return [];
|
555 |
+
}
|
556 |
+
|
557 |
+
public function automate() {
|
558 |
+
$need_reauth = false;
|
559 |
+
//force a refresh
|
560 |
+
$this->refreshStatus();
|
561 |
+
if ( $this->automate === true ) {
|
562 |
+
//if automate is true, auto resolve all
|
563 |
+
$manual_done = [
|
564 |
+
Change_Admin::$slug,
|
565 |
+
PHP_Version::$slug,
|
566 |
+
Prevent_Php::$slug,
|
567 |
+
Protect_Information::$slug,
|
568 |
+
WP_Version::$slug
|
569 |
+
];
|
570 |
+
foreach ( $this->getIssues() as $issue ) {
|
571 |
+
if ( in_array( $issue::$slug, $manual_done ) ) {
|
572 |
+
continue;
|
573 |
+
}
|
574 |
+
if ( $issue::$slug === Security_Key::$slug ) {
|
575 |
+
$need_reauth = true;
|
576 |
+
}
|
577 |
+
$ret = $issue->getService()->process();
|
578 |
+
}
|
579 |
+
$this->automate = false;
|
580 |
+
$this->save();
|
581 |
+
} else {
|
582 |
+
//there are some tweak that need manual apply, as files based, or change admin
|
583 |
+
foreach ( $this->getIssues() as $item ) {
|
584 |
+
if ( in_array( $item::$slug,
|
585 |
+
[
|
586 |
+
Change_Admin::$slug,
|
587 |
+
PHP_Version::$slug,
|
588 |
+
Prevent_Php::$slug,
|
589 |
+
Protect_Information::$slug,
|
590 |
+
WP_Version::$slug
|
591 |
+
] ) ) {
|
592 |
+
continue;
|
593 |
+
}
|
594 |
+
|
595 |
+
if ( in_array( $item::$slug, [
|
596 |
+
Security_Key::$slug
|
597 |
+
] ) ) {
|
598 |
+
$need_reauth = true;
|
599 |
+
}
|
600 |
+
|
601 |
+
$ret = $item->getService()->process();
|
602 |
+
}
|
603 |
+
}
|
604 |
+
|
605 |
+
return $need_reauth;
|
606 |
+
}
|
607 |
+
|
608 |
+
public function format_hub_data() {
|
609 |
+
return [
|
610 |
+
'notification' => $this->notification ? __( 'Active', "defender-security" ) : __( 'Inactivate',
|
611 |
+
"defender-security" ),
|
612 |
+
'notification_repeat' => $this->notification_repeat ? __( 'Yes', "defender-security" ) : __( 'No',
|
613 |
+
"defender-security" ),
|
614 |
+
'receipts' => empty( $this->receipts ) ? __( 'No recipients',
|
615 |
+
"defender-security" ) : Utils::instance()->recipientsToString( $this->receipts )
|
616 |
+
];
|
617 |
+
}
|
618 |
+
|
619 |
public function resolve( $rules ) {
|
620 |
if ( $rules == true ) {
|
621 |
$rules = $this->getDefinedRules( true );
|
app/module/ip-lockout/controller/rest.php
CHANGED
@@ -32,10 +32,10 @@ class Rest extends Controller {
|
|
32 |
$namespace . '/ipAction' => 'ipAction',
|
33 |
$namespace . '/exportAsCsv' => 'exportAsCsv'
|
34 |
];
|
35 |
-
|
36 |
$this->registerEndpoints( $routes, IP_Lockout::getClassName() );
|
37 |
}
|
38 |
-
|
39 |
/**
|
40 |
* Endpoint for toggle IP status, use in IP Banning->ban IPs
|
41 |
*/
|
@@ -43,17 +43,17 @@ class Rest extends Controller {
|
|
43 |
if ( ! $this->checkPermission() ) {
|
44 |
return;
|
45 |
}
|
46 |
-
|
47 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'ipAction' ) ) {
|
48 |
return;
|
49 |
}
|
50 |
-
|
51 |
$ip = HTTP_Helper::retrievePost( 'ip' );
|
52 |
$action = HTTP_Helper::retrievePost( 'behavior' );
|
53 |
$model = IP_Lockout\Model\IP_Model::findOne( [
|
54 |
'ip' => $ip
|
55 |
] );
|
56 |
-
|
57 |
if ( is_object( $model ) ) {
|
58 |
if ( $action === 'unban' ) {
|
59 |
$model->status = IP_Lockout\Model\IP_Model::STATUS_NORMAL;
|
@@ -65,7 +65,7 @@ class Rest extends Controller {
|
|
65 |
wp_send_json_success( [ 'data' => '' ] );
|
66 |
}
|
67 |
}
|
68 |
-
|
69 |
/**
|
70 |
* Endpoint to query locked IPs, use in IP Banning->ban IPs
|
71 |
*/
|
@@ -73,18 +73,18 @@ class Rest extends Controller {
|
|
73 |
if ( ! $this->checkPermission() ) {
|
74 |
return;
|
75 |
}
|
76 |
-
|
77 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'queryLockedIps' ) ) {
|
78 |
return;
|
79 |
}
|
80 |
-
|
81 |
$results = IP_Lockout\Model\IP_Model::queryLockedIp();
|
82 |
-
|
83 |
wp_send_json_success( [
|
84 |
'ips_locked' => $results,
|
85 |
] );
|
86 |
}
|
87 |
-
|
88 |
/**
|
89 |
* Endpoint for toggle IP blacklist or whitelist, use on logs item content
|
90 |
*/
|
@@ -92,45 +92,49 @@ class Rest extends Controller {
|
|
92 |
if ( ! $this->checkPermission() ) {
|
93 |
return;
|
94 |
}
|
95 |
-
|
96 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'toggleIpAction' ) ) {
|
97 |
return;
|
98 |
}
|
99 |
-
|
100 |
$ip = HTTP_Helper::retrievePost( 'ip', false );
|
101 |
$type = HTTP_Helper::retrievePost( 'type' );
|
102 |
$type = sanitize_key( $type );
|
103 |
-
|
104 |
if ( $ip && filter_var( $ip, FILTER_VALIDATE_IP ) ) {
|
105 |
if ( $type == 'unwhitelist' || $type == 'unblacklist' ) {
|
106 |
$type = substr( $type, 2 );
|
107 |
Settings::instance()->removeIpFromList( $ip, $type );
|
108 |
wp_send_json_success( array(
|
109 |
-
'message' => sprintf( __( "IP %s has been removed from your %s. You can control your %s in <a href=\"%s\">IP Lockouts.</a>",
|
|
|
|
|
110 |
) );
|
111 |
} else {
|
112 |
Settings::instance()->addIpToList( $ip, $type );
|
113 |
wp_send_json_success( array(
|
114 |
-
'message' => sprintf( __( "IP %s has been added to your %s You can control your %s in <a href=\"%s\">IP Lockouts.</a>",
|
|
|
|
|
115 |
) );
|
116 |
}
|
117 |
-
|
118 |
} else {
|
119 |
wp_send_json_error( array(
|
120 |
'message' => __( "No record found", "defender-security" )
|
121 |
) );
|
122 |
}
|
123 |
}
|
124 |
-
|
125 |
public function emptyLogs() {
|
126 |
if ( ! $this->checkPermission() ) {
|
127 |
return;
|
128 |
}
|
129 |
-
|
130 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'emptyLogs' ) ) {
|
131 |
return;
|
132 |
}
|
133 |
-
|
134 |
$perPage = 500;
|
135 |
$count = Log_Model::deleteAll( array(), '0,' . $perPage );
|
136 |
if ( $count == 0 ) {
|
@@ -138,10 +142,10 @@ class Rest extends Controller {
|
|
138 |
'message' => __( "Your logs have been successfully deleted.", "defender-security" )
|
139 |
) );
|
140 |
}
|
141 |
-
|
142 |
wp_send_json_error( array() );
|
143 |
}
|
144 |
-
|
145 |
/**
|
146 |
*
|
147 |
*/
|
@@ -149,11 +153,11 @@ class Rest extends Controller {
|
|
149 |
if ( ! $this->checkPermission() ) {
|
150 |
return;
|
151 |
}
|
152 |
-
|
153 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'bulkAction' ) ) {
|
154 |
return;
|
155 |
}
|
156 |
-
|
157 |
$ids = HTTP_Helper::retrievePost( 'ids', [] );
|
158 |
$type = HTTP_Helper::retrievePost( 'type' );
|
159 |
$messages = '';
|
@@ -167,7 +171,9 @@ class Rest extends Controller {
|
|
167 |
$ips[] = $model->ip;
|
168 |
$settings->addIpToList( $model->ip, 'whitelist' );
|
169 |
}
|
170 |
-
$messages = sprintf( __( "IP %s has been added to your whitelist. You can control your whitelist in <a href=\"%s\">IP Lockouts.</a>",
|
|
|
|
|
171 |
break;
|
172 |
case 'ban':
|
173 |
foreach ( $ids as $id ) {
|
@@ -175,7 +181,9 @@ class Rest extends Controller {
|
|
175 |
$ips[] = $model->ip;
|
176 |
$settings->addIpToList( $model->ip, 'blacklist' );
|
177 |
}
|
178 |
-
$messages = sprintf( __( "IP %s has been added to your blacklist You can control your blacklist in <a href=\"%s\">IP Lockouts.</a>",
|
|
|
|
|
179 |
break;
|
180 |
case 'delete':
|
181 |
foreach ( $ids as $id ) {
|
@@ -190,14 +198,14 @@ class Rest extends Controller {
|
|
190 |
//error_log( sprintf( 'Unexpected value %s from IP %s', $type, Utils::instance()->getUserIp() ) );
|
191 |
break;
|
192 |
}
|
193 |
-
|
194 |
wp_send_json_success( array(
|
195 |
'reload' => 1,
|
196 |
'message' => $messages
|
197 |
) );
|
198 |
}
|
199 |
}
|
200 |
-
|
201 |
/**
|
202 |
* Query the data
|
203 |
*/
|
@@ -205,7 +213,7 @@ class Rest extends Controller {
|
|
205 |
if ( ! $this->checkPermission() ) {
|
206 |
return;
|
207 |
}
|
208 |
-
|
209 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'queryLogs' ) ) {
|
210 |
return;
|
211 |
}
|
@@ -216,13 +224,13 @@ class Rest extends Controller {
|
|
216 |
'type' => Array_Helper::getValue( $data, 'type', false ),
|
217 |
'ip' => Array_Helper::getValue( $data, 'ip', false )
|
218 |
];
|
219 |
-
|
220 |
$paged = Array_Helper::getValue( $data, 'paged', 1 );
|
221 |
$orderBy = Array_Helper::getValue( $data, 'orderBy', 'id' );
|
222 |
$order = Array_Helper::getValue( $data, 'order', 'DESC' );
|
223 |
-
|
224 |
$pageSize = 20;
|
225 |
-
|
226 |
list( $logs, $countAllLogs ) = Log_Model::queryLogs( $filters, $paged, $orderBy, $order, $pageSize );
|
227 |
$ids = [];
|
228 |
foreach ( $logs as $log ) {
|
@@ -239,7 +247,7 @@ class Rest extends Controller {
|
|
239 |
'totalPages' => $totalPages
|
240 |
) );
|
241 |
}
|
242 |
-
|
243 |
/**
|
244 |
* Importing IPs from our exporter
|
245 |
*/
|
@@ -247,7 +255,7 @@ class Rest extends Controller {
|
|
247 |
if ( ! $this->checkPermission() ) {
|
248 |
return;
|
249 |
}
|
250 |
-
|
251 |
$id = HTTP_Helper::retrievePost( 'id' );
|
252 |
if ( ! is_object( get_post( $id ) ) ) {
|
253 |
wp_send_json_error( array(
|
@@ -255,30 +263,33 @@ class Rest extends Controller {
|
|
255 |
) );
|
256 |
}
|
257 |
$file = get_attached_file( $id );
|
258 |
-
|
259 |
if ( ! is_file( $file ) ) {
|
260 |
wp_send_json_error( array(
|
261 |
'message' => __( "Your file is invalid!", "defender-security" )
|
262 |
) );
|
263 |
}
|
264 |
-
|
265 |
if ( ! ( $data = Login_Protection_Api::verifyImportFile( $file ) ) ) {
|
266 |
wp_send_json_error( array(
|
267 |
'message' => __( "Your file content is invalid!", "defender-security" )
|
268 |
) );
|
269 |
}
|
270 |
-
|
271 |
$settings = Settings::instance();
|
272 |
//all good, start to import
|
|
|
273 |
foreach ( $data as $line ) {
|
274 |
$settings->addIpToList( $line[0], $line[1] );
|
275 |
}
|
276 |
wp_send_json_success( array(
|
277 |
-
'message'
|
278 |
-
'reload'
|
|
|
|
|
279 |
) );
|
280 |
}
|
281 |
-
|
282 |
/**
|
283 |
* Downloading GeoDB from maxmind
|
284 |
*/
|
@@ -286,11 +297,11 @@ class Rest extends Controller {
|
|
286 |
if ( ! $this->checkPermission() ) {
|
287 |
return;
|
288 |
}
|
289 |
-
|
290 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'downloadGeoDB' ) ) {
|
291 |
return;
|
292 |
}
|
293 |
-
|
294 |
$license_key = HTTP_Helper::retrievePost( 'api_key' );
|
295 |
$license_key = sanitize_text_field( $license_key );
|
296 |
$url = "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=$license_key&suffix=tar.gz";
|
@@ -315,7 +326,7 @@ class Rest extends Controller {
|
|
315 |
] );
|
316 |
}
|
317 |
}
|
318 |
-
|
319 |
/**
|
320 |
* Update IP lockout settings, parameters sent via an ajax _POST request
|
321 |
*/
|
@@ -323,7 +334,7 @@ class Rest extends Controller {
|
|
323 |
if ( ! $this->checkPermission() ) {
|
324 |
return;
|
325 |
}
|
326 |
-
|
327 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'updateSettings' ) ) {
|
328 |
return;
|
329 |
}
|
@@ -331,16 +342,17 @@ class Rest extends Controller {
|
|
331 |
$lastSettings = clone $settings;
|
332 |
$data = stripslashes( $_POST['data'] );
|
333 |
$data = json_decode( $data, true );
|
334 |
-
|
335 |
$settings->import( $data );
|
336 |
-
|
337 |
if ( $settings->validate() ) {
|
338 |
$settings->save();
|
339 |
$faultIps = WP_Helper::getArrayCache()->get( 'faultIps', array() );
|
340 |
$isBLSelf = WP_Helper::getArrayCache()->get( 'isBlacklistSelf', false );
|
341 |
if ( $faultIps || $isBLSelf ) {
|
342 |
$res = array(
|
343 |
-
'message' => sprintf( __( "Your settings have been updated, however some IPs were removed because invalid format, or you blacklist yourself",
|
|
|
344 |
'reload' => 1
|
345 |
);
|
346 |
} else {
|
@@ -430,7 +442,7 @@ class Rest extends Controller {
|
|
430 |
if ( class_exists( 'WP_Defender\Module\IP_Lockout\Behavior\Pro\Reporting' ) ) {
|
431 |
$behaviors['report'] = 'WP_Defender\Module\IP_Lockout\Behavior\Pro\Reporting';
|
432 |
}
|
433 |
-
|
434 |
return $behaviors;
|
435 |
}
|
436 |
}
|
32 |
$namespace . '/ipAction' => 'ipAction',
|
33 |
$namespace . '/exportAsCsv' => 'exportAsCsv'
|
34 |
];
|
35 |
+
|
36 |
$this->registerEndpoints( $routes, IP_Lockout::getClassName() );
|
37 |
}
|
38 |
+
|
39 |
/**
|
40 |
* Endpoint for toggle IP status, use in IP Banning->ban IPs
|
41 |
*/
|
43 |
if ( ! $this->checkPermission() ) {
|
44 |
return;
|
45 |
}
|
46 |
+
|
47 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'ipAction' ) ) {
|
48 |
return;
|
49 |
}
|
50 |
+
|
51 |
$ip = HTTP_Helper::retrievePost( 'ip' );
|
52 |
$action = HTTP_Helper::retrievePost( 'behavior' );
|
53 |
$model = IP_Lockout\Model\IP_Model::findOne( [
|
54 |
'ip' => $ip
|
55 |
] );
|
56 |
+
|
57 |
if ( is_object( $model ) ) {
|
58 |
if ( $action === 'unban' ) {
|
59 |
$model->status = IP_Lockout\Model\IP_Model::STATUS_NORMAL;
|
65 |
wp_send_json_success( [ 'data' => '' ] );
|
66 |
}
|
67 |
}
|
68 |
+
|
69 |
/**
|
70 |
* Endpoint to query locked IPs, use in IP Banning->ban IPs
|
71 |
*/
|
73 |
if ( ! $this->checkPermission() ) {
|
74 |
return;
|
75 |
}
|
76 |
+
|
77 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'queryLockedIps' ) ) {
|
78 |
return;
|
79 |
}
|
80 |
+
|
81 |
$results = IP_Lockout\Model\IP_Model::queryLockedIp();
|
82 |
+
|
83 |
wp_send_json_success( [
|
84 |
'ips_locked' => $results,
|
85 |
] );
|
86 |
}
|
87 |
+
|
88 |
/**
|
89 |
* Endpoint for toggle IP blacklist or whitelist, use on logs item content
|
90 |
*/
|
92 |
if ( ! $this->checkPermission() ) {
|
93 |
return;
|
94 |
}
|
95 |
+
|
96 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'toggleIpAction' ) ) {
|
97 |
return;
|
98 |
}
|
99 |
+
|
100 |
$ip = HTTP_Helper::retrievePost( 'ip', false );
|
101 |
$type = HTTP_Helper::retrievePost( 'type' );
|
102 |
$type = sanitize_key( $type );
|
103 |
+
|
104 |
if ( $ip && filter_var( $ip, FILTER_VALIDATE_IP ) ) {
|
105 |
if ( $type == 'unwhitelist' || $type == 'unblacklist' ) {
|
106 |
$type = substr( $type, 2 );
|
107 |
Settings::instance()->removeIpFromList( $ip, $type );
|
108 |
wp_send_json_success( array(
|
109 |
+
'message' => sprintf( __( "IP %s has been removed from your %s. You can control your %s in <a href=\"%s\">IP Lockouts.</a>",
|
110 |
+
"defender-security" ), $ip, $type, $type,
|
111 |
+
network_admin_url( 'admin.php?page=wdf-ip-lockout&view=blacklist' ) ),
|
112 |
) );
|
113 |
} else {
|
114 |
Settings::instance()->addIpToList( $ip, $type );
|
115 |
wp_send_json_success( array(
|
116 |
+
'message' => sprintf( __( "IP %s has been added to your %s You can control your %s in <a href=\"%s\">IP Lockouts.</a>",
|
117 |
+
"defender-security" ), $ip, $type, $type,
|
118 |
+
network_admin_url( 'admin.php?page=wdf-ip-lockout&view=blacklist' ) ),
|
119 |
) );
|
120 |
}
|
121 |
+
|
122 |
} else {
|
123 |
wp_send_json_error( array(
|
124 |
'message' => __( "No record found", "defender-security" )
|
125 |
) );
|
126 |
}
|
127 |
}
|
128 |
+
|
129 |
public function emptyLogs() {
|
130 |
if ( ! $this->checkPermission() ) {
|
131 |
return;
|
132 |
}
|
133 |
+
|
134 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'emptyLogs' ) ) {
|
135 |
return;
|
136 |
}
|
137 |
+
|
138 |
$perPage = 500;
|
139 |
$count = Log_Model::deleteAll( array(), '0,' . $perPage );
|
140 |
if ( $count == 0 ) {
|
142 |
'message' => __( "Your logs have been successfully deleted.", "defender-security" )
|
143 |
) );
|
144 |
}
|
145 |
+
|
146 |
wp_send_json_error( array() );
|
147 |
}
|
148 |
+
|
149 |
/**
|
150 |
*
|
151 |
*/
|
153 |
if ( ! $this->checkPermission() ) {
|
154 |
return;
|
155 |
}
|
156 |
+
|
157 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'bulkAction' ) ) {
|
158 |
return;
|
159 |
}
|
160 |
+
|
161 |
$ids = HTTP_Helper::retrievePost( 'ids', [] );
|
162 |
$type = HTTP_Helper::retrievePost( 'type' );
|
163 |
$messages = '';
|
171 |
$ips[] = $model->ip;
|
172 |
$settings->addIpToList( $model->ip, 'whitelist' );
|
173 |
}
|
174 |
+
$messages = sprintf( __( "IP %s has been added to your whitelist. You can control your whitelist in <a href=\"%s\">IP Lockouts.</a>",
|
175 |
+
"defender-security" ), implode( ',', $ips ),
|
176 |
+
network_admin_url( 'admin.php?page=wdf-ip-lockout&view=blacklist' ) );
|
177 |
break;
|
178 |
case 'ban':
|
179 |
foreach ( $ids as $id ) {
|
181 |
$ips[] = $model->ip;
|
182 |
$settings->addIpToList( $model->ip, 'blacklist' );
|
183 |
}
|
184 |
+
$messages = sprintf( __( "IP %s has been added to your blacklist You can control your blacklist in <a href=\"%s\">IP Lockouts.</a>",
|
185 |
+
"defender-security" ), implode( ',', $ips ),
|
186 |
+
network_admin_url( 'admin.php?page=wdf-ip-lockout&view=blacklist' ) );
|
187 |
break;
|
188 |
case 'delete':
|
189 |
foreach ( $ids as $id ) {
|
198 |
//error_log( sprintf( 'Unexpected value %s from IP %s', $type, Utils::instance()->getUserIp() ) );
|
199 |
break;
|
200 |
}
|
201 |
+
|
202 |
wp_send_json_success( array(
|
203 |
'reload' => 1,
|
204 |
'message' => $messages
|
205 |
) );
|
206 |
}
|
207 |
}
|
208 |
+
|
209 |
/**
|
210 |
* Query the data
|
211 |
*/
|
213 |
if ( ! $this->checkPermission() ) {
|
214 |
return;
|
215 |
}
|
216 |
+
|
217 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'queryLogs' ) ) {
|
218 |
return;
|
219 |
}
|
224 |
'type' => Array_Helper::getValue( $data, 'type', false ),
|
225 |
'ip' => Array_Helper::getValue( $data, 'ip', false )
|
226 |
];
|
227 |
+
|
228 |
$paged = Array_Helper::getValue( $data, 'paged', 1 );
|
229 |
$orderBy = Array_Helper::getValue( $data, 'orderBy', 'id' );
|
230 |
$order = Array_Helper::getValue( $data, 'order', 'DESC' );
|
231 |
+
|
232 |
$pageSize = 20;
|
233 |
+
|
234 |
list( $logs, $countAllLogs ) = Log_Model::queryLogs( $filters, $paged, $orderBy, $order, $pageSize );
|
235 |
$ids = [];
|
236 |
foreach ( $logs as $log ) {
|
247 |
'totalPages' => $totalPages
|
248 |
) );
|
249 |
}
|
250 |
+
|
251 |
/**
|
252 |
* Importing IPs from our exporter
|
253 |
*/
|
255 |
if ( ! $this->checkPermission() ) {
|
256 |
return;
|
257 |
}
|
258 |
+
|
259 |
$id = HTTP_Helper::retrievePost( 'id' );
|
260 |
if ( ! is_object( get_post( $id ) ) ) {
|
261 |
wp_send_json_error( array(
|
263 |
) );
|
264 |
}
|
265 |
$file = get_attached_file( $id );
|
266 |
+
|
267 |
if ( ! is_file( $file ) ) {
|
268 |
wp_send_json_error( array(
|
269 |
'message' => __( "Your file is invalid!", "defender-security" )
|
270 |
) );
|
271 |
}
|
272 |
+
|
273 |
if ( ! ( $data = Login_Protection_Api::verifyImportFile( $file ) ) ) {
|
274 |
wp_send_json_error( array(
|
275 |
'message' => __( "Your file content is invalid!", "defender-security" )
|
276 |
) );
|
277 |
}
|
278 |
+
|
279 |
$settings = Settings::instance();
|
280 |
//all good, start to import
|
281 |
+
|
282 |
foreach ( $data as $line ) {
|
283 |
$settings->addIpToList( $line[0], $line[1] );
|
284 |
}
|
285 |
wp_send_json_success( array(
|
286 |
+
'message' => __( "Your whitelist/blacklist has been successfully imported.", "defender-security" ),
|
287 |
+
'reload' => 1,
|
288 |
+
'blacklist' => $settings->getIpBlacklist(),
|
289 |
+
'whitelist' => $settings->getIpWhitelist()
|
290 |
) );
|
291 |
}
|
292 |
+
|
293 |
/**
|
294 |
* Downloading GeoDB from maxmind
|
295 |
*/
|
297 |
if ( ! $this->checkPermission() ) {
|
298 |
return;
|
299 |
}
|
300 |
+
|
301 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'downloadGeoDB' ) ) {
|
302 |
return;
|
303 |
}
|
304 |
+
|
305 |
$license_key = HTTP_Helper::retrievePost( 'api_key' );
|
306 |
$license_key = sanitize_text_field( $license_key );
|
307 |
$url = "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=$license_key&suffix=tar.gz";
|
326 |
] );
|
327 |
}
|
328 |
}
|
329 |
+
|
330 |
/**
|
331 |
* Update IP lockout settings, parameters sent via an ajax _POST request
|
332 |
*/
|
334 |
if ( ! $this->checkPermission() ) {
|
335 |
return;
|
336 |
}
|
337 |
+
|
338 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'updateSettings' ) ) {
|
339 |
return;
|
340 |
}
|
342 |
$lastSettings = clone $settings;
|
343 |
$data = stripslashes( $_POST['data'] );
|
344 |
$data = json_decode( $data, true );
|
345 |
+
|
346 |
$settings->import( $data );
|
347 |
+
|
348 |
if ( $settings->validate() ) {
|
349 |
$settings->save();
|
350 |
$faultIps = WP_Helper::getArrayCache()->get( 'faultIps', array() );
|
351 |
$isBLSelf = WP_Helper::getArrayCache()->get( 'isBlacklistSelf', false );
|
352 |
if ( $faultIps || $isBLSelf ) {
|
353 |
$res = array(
|
354 |
+
'message' => sprintf( __( "Your settings have been updated, however some IPs were removed because invalid format, or you blacklist yourself",
|
355 |
+
"defender-security" ), implode( ',', $faultIps ) ),
|
356 |
'reload' => 1
|
357 |
);
|
358 |
} else {
|
442 |
if ( class_exists( 'WP_Defender\Module\IP_Lockout\Behavior\Pro\Reporting' ) ) {
|
443 |
$behaviors['report'] = 'WP_Defender\Module\IP_Lockout\Behavior\Pro\Reporting';
|
444 |
}
|
445 |
+
|
446 |
return $behaviors;
|
447 |
}
|
448 |
}
|
app/module/ip-lockout/model/log-model.php
CHANGED
@@ -50,7 +50,8 @@ class Log_Model extends DB_Model {
|
|
50 |
if ( ! $format ) {
|
51 |
return esc_html( $this->log );
|
52 |
} else {
|
53 |
-
$text = sprintf( __( "Request for file <span class='log-text-table'>%s</span> which doesn't exist",
|
|
|
54 |
|
55 |
return $text;
|
56 |
}
|
@@ -127,26 +128,30 @@ class Log_Model extends DB_Model {
|
|
127 |
|
128 |
if ( count( $lockouts ) == 0 ) {
|
129 |
$data = array(
|
130 |
-
'lastLockout'
|
131 |
-
'lockoutToday'
|
132 |
-
'lockoutThisMonth'
|
133 |
-
'loginLockoutToday'
|
134 |
-
'loginLockoutThisWeek'
|
135 |
-
'lockout404Today'
|
136 |
-
'lockout404ThisWeek'
|
|
|
|
|
137 |
);
|
138 |
|
139 |
return $data;
|
140 |
}
|
141 |
|
142 |
//init params
|
143 |
-
$lastLockout
|
144 |
-
$lockoutToday
|
145 |
-
$lockoutThisMonth
|
146 |
-
$loginLockoutToday
|
147 |
-
$loginLockoutThisWeek
|
148 |
-
$lockout404ThisWeek
|
149 |
-
$lockout404Today
|
|
|
|
|
150 |
//time
|
151 |
$todayMidnight = strtotime( '-24 hours', current_time( 'timestamp' ) );
|
152 |
$firstThisWeek = strtotime( '-7 days', current_time( 'timestamp' ) );
|
@@ -170,16 +175,24 @@ class Log_Model extends DB_Model {
|
|
170 |
} elseif ( $log->type == Log_Model::LOCKOUT_404 && $log->date > $firstThisWeek ) {
|
171 |
$lockout404ThisWeek ++;
|
172 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
}
|
174 |
|
175 |
$data = array(
|
176 |
-
'lastLockout'
|
177 |
-
'lockoutToday'
|
178 |
-
'lockoutThisMonth'
|
179 |
-
'loginLockoutToday'
|
180 |
-
'loginLockoutThisWeek'
|
181 |
-
'lockout404ThisWeek'
|
182 |
-
'lockout404Today'
|
|
|
|
|
183 |
);
|
184 |
|
185 |
return $data;
|
@@ -194,15 +207,21 @@ class Log_Model extends DB_Model {
|
|
194 |
* -type: optional
|
195 |
* -ip: optional
|
196 |
*
|
197 |
-
* @param
|
198 |
-
* @param
|
199 |
-
* @param
|
200 |
-
* @param
|
201 |
-
* @param
|
202 |
*
|
203 |
* @return Log_Model[]
|
204 |
*/
|
205 |
-
public static function queryLogs(
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
$params = [
|
207 |
'date' => [
|
208 |
'compare' => 'between',
|
50 |
if ( ! $format ) {
|
51 |
return esc_html( $this->log );
|
52 |
} else {
|
53 |
+
$text = sprintf( __( "Request for file <span class='log-text-table'>%s</span> which doesn't exist",
|
54 |
+
"defender-security" ), esc_attr( $this->log ) );
|
55 |
|
56 |
return $text;
|
57 |
}
|
128 |
|
129 |
if ( count( $lockouts ) == 0 ) {
|
130 |
$data = array(
|
131 |
+
'lastLockout' => __( "Never", "defender-security" ),
|
132 |
+
'lockoutToday' => 0,
|
133 |
+
'lockoutThisMonth' => 0,
|
134 |
+
'loginLockoutToday' => 0,
|
135 |
+
'loginLockoutThisWeek' => 0,
|
136 |
+
'lockout404Today' => 0,
|
137 |
+
'lockout404ThisWeek' => 0,
|
138 |
+
'lockoutLoginThisMonth' => 0,
|
139 |
+
'lockout404ThisMonth' => 0
|
140 |
);
|
141 |
|
142 |
return $data;
|
143 |
}
|
144 |
|
145 |
//init params
|
146 |
+
$lastLockout = '';
|
147 |
+
$lockoutToday = 0;
|
148 |
+
$lockoutThisMonth = count( $lockouts );
|
149 |
+
$loginLockoutToday = 0;
|
150 |
+
$loginLockoutThisWeek = 0;
|
151 |
+
$lockout404ThisWeek = 0;
|
152 |
+
$lockout404Today = 0;
|
153 |
+
$loginLockoutThisMonth = 0;
|
154 |
+
$lockout404ThisMonth = 0;
|
155 |
//time
|
156 |
$todayMidnight = strtotime( '-24 hours', current_time( 'timestamp' ) );
|
157 |
$firstThisWeek = strtotime( '-7 days', current_time( 'timestamp' ) );
|
175 |
} elseif ( $log->type == Log_Model::LOCKOUT_404 && $log->date > $firstThisWeek ) {
|
176 |
$lockout404ThisWeek ++;
|
177 |
}
|
178 |
+
|
179 |
+
if ( $log->type === Log_Model::AUTH_LOCK ) {
|
180 |
+
$loginLockoutThisMonth += 1;
|
181 |
+
} elseif ( $log->type === Log_Model::LOCKOUT_404 ) {
|
182 |
+
$lockout404ThisMonth += 1;
|
183 |
+
}
|
184 |
}
|
185 |
|
186 |
$data = array(
|
187 |
+
'lastLockout' => $lastLockout,
|
188 |
+
'lockoutToday' => $lockoutToday,
|
189 |
+
'lockoutThisMonth' => $lockoutThisMonth,
|
190 |
+
'loginLockoutToday' => $loginLockoutToday,
|
191 |
+
'loginLockoutThisWeek' => $loginLockoutThisWeek,
|
192 |
+
'lockout404ThisWeek' => $lockout404ThisWeek,
|
193 |
+
'lockout404Today' => $lockout404Today,
|
194 |
+
'lockoutLoginThisMonth' => $loginLockoutThisMonth,
|
195 |
+
'lockout404ThisMonth' => $lockout404ThisMonth
|
196 |
);
|
197 |
|
198 |
return $data;
|
207 |
* -type: optional
|
208 |
* -ip: optional
|
209 |
*
|
210 |
+
* @param array $filters
|
211 |
+
* @param int $paged
|
212 |
+
* @param string $orderBy
|
213 |
+
* @param string $order
|
214 |
+
* @param int $pageSize
|
215 |
*
|
216 |
* @return Log_Model[]
|
217 |
*/
|
218 |
+
public static function queryLogs(
|
219 |
+
$filters = array(),
|
220 |
+
$paged = 1,
|
221 |
+
$orderBy = 'id',
|
222 |
+
$order = 'DESC',
|
223 |
+
$pageSize = 20
|
224 |
+
) {
|
225 |
$params = [
|
226 |
'date' => [
|
227 |
'compare' => 'between',
|
app/module/ip-lockout/model/settings.php
CHANGED
@@ -13,7 +13,7 @@ use WP_Defender\Module\IP_Lockout\Component\IP_API;
|
|
13 |
|
14 |
class Settings extends \Hammer\WP\Settings {
|
15 |
private static $_instance;
|
16 |
-
|
17 |
public $login_protection = false;
|
18 |
public $login_protection_login_attempt = 5;
|
19 |
public $login_protection_lockout_timeframe = 300;
|
@@ -23,7 +23,7 @@ class Settings extends \Hammer\WP\Settings {
|
|
23 |
public $login_protection_ban_admin_brute = false;
|
24 |
public $login_protection_lockout_ban = false;
|
25 |
public $username_blacklist = '';
|
26 |
-
|
27 |
public $detect_404 = false;
|
28 |
public $detect_404_threshold = 20;
|
29 |
public $detect_404_timeframe = 300;
|
@@ -36,36 +36,36 @@ class Settings extends \Hammer\WP\Settings {
|
|
36 |
public $detect_404_lockout_message = "You have been locked out due to too many attempts to access a file that doesn't exist.";
|
37 |
public $detect_404_lockout_ban = false;
|
38 |
public $detect_404_logged = true;
|
39 |
-
|
40 |
public $ip_blacklist = array();
|
41 |
public $ip_whitelist = array();
|
42 |
public $ip_lockout_message = 'The administrator has blocked your IP from accessing this website.';
|
43 |
-
|
44 |
public $country_blacklist = [];
|
45 |
public $country_whitelist = [];
|
46 |
-
|
47 |
public $login_lockout_notification = true;
|
48 |
public $ip_lockout_notification = true;
|
49 |
-
|
50 |
public $report = true;
|
51 |
public $report_frequency = '7';
|
52 |
public $report_day = 'sunday';
|
53 |
public $report_time = '0:00';
|
54 |
-
|
55 |
public $geoIP_db = null;
|
56 |
-
|
57 |
public $storage_days = 30;
|
58 |
-
|
59 |
public $receipts = array();
|
60 |
public $report_receipts = array();
|
61 |
public $lastReportSent;
|
62 |
-
|
63 |
public $cooldown_enabled = false;
|
64 |
public $cooldown_number_lockout = '3';
|
65 |
public $cooldown_period = '24';
|
66 |
-
|
67 |
public $cache = array();
|
68 |
-
|
69 |
public function __construct( $id, $isMulti ) {
|
70 |
if ( ( is_admin() || is_network_admin() ) && current_user_can( 'manage_options' ) ) {
|
71 |
$user = wp_get_current_user();
|
@@ -79,7 +79,7 @@ class Settings extends \Hammer\WP\Settings {
|
|
79 |
'email' => $user->user_email
|
80 |
);
|
81 |
}
|
82 |
-
|
83 |
$this->ip_whitelist = $this->getUserIp() . PHP_EOL;
|
84 |
//default is weekly
|
85 |
$this->report_day = strtolower( date( 'l' ) );
|
@@ -95,7 +95,7 @@ class Settings extends \Hammer\WP\Settings {
|
|
95 |
$this->detect_404_lockout_ban = ! ! $this->detect_404_lockout_ban;
|
96 |
$this->report = ! ! $this->report;
|
97 |
$this->detect_404_logged = ! ! $this->detect_404_logged;
|
98 |
-
|
99 |
$times = Utils::instance()->getTimes();
|
100 |
if ( ! isset( $times[ $this->report_time ] ) ) {
|
101 |
$this->report_time = '4:00';
|
@@ -117,7 +117,7 @@ class Settings extends \Hammer\WP\Settings {
|
|
117 |
$this->country_blacklist = ( array_values( array_filter( $this->country_blacklist ) ) );
|
118 |
}
|
119 |
}
|
120 |
-
|
121 |
/**
|
122 |
* @return array
|
123 |
*/
|
@@ -126,7 +126,7 @@ class Settings extends \Hammer\WP\Settings {
|
|
126 |
'utils' => '\WP_Defender\Behavior\Utils'
|
127 |
);
|
128 |
}
|
129 |
-
|
130 |
/**
|
131 |
* @return array
|
132 |
*/
|
@@ -146,7 +146,7 @@ class Settings extends \Hammer\WP\Settings {
|
|
146 |
],
|
147 |
);
|
148 |
}
|
149 |
-
|
150 |
/**
|
151 |
* @return array
|
152 |
*/
|
@@ -165,17 +165,17 @@ class Settings extends \Hammer\WP\Settings {
|
|
165 |
'ip_lockout_message',
|
166 |
];
|
167 |
}
|
168 |
-
|
169 |
/**
|
170 |
* @return array
|
171 |
*/
|
172 |
public function get404Whitelist() {
|
173 |
$arr = array_filter( explode( PHP_EOL, $this->detect_404_whitelist ) );;
|
174 |
$arr = array_map( 'trim', $arr );
|
175 |
-
|
176 |
return $arr;
|
177 |
}
|
178 |
-
|
179 |
/**
|
180 |
* @return array
|
181 |
*/
|
@@ -183,30 +183,30 @@ class Settings extends \Hammer\WP\Settings {
|
|
183 |
$arr = array_filter( explode( PHP_EOL, $this->detect_404_ignored_filetypes ) );
|
184 |
$arr = array_map( 'trim', $arr );
|
185 |
$arr = array_map( 'strtolower', $arr );
|
186 |
-
|
187 |
return $arr;
|
188 |
}
|
189 |
-
|
190 |
/**
|
191 |
* @return mixed
|
192 |
*/
|
193 |
public function getDetect404Whitelist() {
|
194 |
$arr = array_filter( explode( PHP_EOL, $this->detect_404_whitelist ) );
|
195 |
$arr = array_map( 'trim', $arr );
|
196 |
-
|
197 |
return $arr;
|
198 |
}
|
199 |
-
|
200 |
/**
|
201 |
* @return mixed
|
202 |
*/
|
203 |
public function getDetect404Blacklist() {
|
204 |
$arr = array_filter( explode( PHP_EOL, $this->detect_404_blacklist ) );
|
205 |
$arr = array_map( 'trim', $arr );
|
206 |
-
|
207 |
return $arr;
|
208 |
}
|
209 |
-
|
210 |
/**
|
211 |
* @return array
|
212 |
*/
|
@@ -217,10 +217,10 @@ class Settings extends \Hammer\WP\Settings {
|
|
217 |
$arr = array_filter( explode( PHP_EOL, $this->ip_blacklist ) );
|
218 |
}
|
219 |
$arr = array_map( 'trim', $arr );
|
220 |
-
|
221 |
return $arr;
|
222 |
}
|
223 |
-
|
224 |
/**
|
225 |
* @return array
|
226 |
*/
|
@@ -228,10 +228,10 @@ class Settings extends \Hammer\WP\Settings {
|
|
228 |
$exts = explode( PHP_EOL, $this->detect_404_ignored_filetypes );
|
229 |
$exts = array_map( 'trim', $exts );
|
230 |
$exts = array_map( 'strtolower', $exts );
|
231 |
-
|
232 |
return $exts;
|
233 |
}
|
234 |
-
|
235 |
/**
|
236 |
* @return mixed
|
237 |
*/
|
@@ -239,10 +239,10 @@ class Settings extends \Hammer\WP\Settings {
|
|
239 |
$exts = explode( PHP_EOL, $this->detect_404_filetypes_blacklist );
|
240 |
$exts = array_map( 'trim', $exts );
|
241 |
$exts = array_map( 'strtolower', $exts );
|
242 |
-
|
243 |
return $exts;
|
244 |
}
|
245 |
-
|
246 |
/**
|
247 |
* @return array
|
248 |
*/
|
@@ -254,10 +254,10 @@ class Settings extends \Hammer\WP\Settings {
|
|
254 |
$arr = array_filter( explode( PHP_EOL, $this->ip_whitelist ) );
|
255 |
}
|
256 |
$arr = array_map( 'trim', $arr );
|
257 |
-
|
258 |
return $arr;
|
259 |
}
|
260 |
-
|
261 |
/**
|
262 |
* @return array
|
263 |
*/
|
@@ -268,10 +268,10 @@ class Settings extends \Hammer\WP\Settings {
|
|
268 |
//fallback to older version than 2.2
|
269 |
$arr = array_filter( explode( ',', $this->country_blacklist ) );
|
270 |
$arr = array_map( 'trim', $arr );
|
271 |
-
|
272 |
return $arr;
|
273 |
}
|
274 |
-
|
275 |
/**
|
276 |
* @return array
|
277 |
*/
|
@@ -282,10 +282,10 @@ class Settings extends \Hammer\WP\Settings {
|
|
282 |
//fallback to older version than 2.2
|
283 |
$arr = array_filter( explode( ',', $this->country_whitelist ) );
|
284 |
$arr = array_map( 'trim', $arr );
|
285 |
-
|
286 |
return $arr;
|
287 |
}
|
288 |
-
|
289 |
/**
|
290 |
* @param $ip
|
291 |
*
|
@@ -307,10 +307,10 @@ class Settings extends \Hammer\WP\Settings {
|
|
307 |
return true;
|
308 |
}
|
309 |
}
|
310 |
-
|
311 |
return false;
|
312 |
}
|
313 |
-
|
314 |
/**
|
315 |
* @param $ip
|
316 |
*
|
@@ -330,10 +330,10 @@ class Settings extends \Hammer\WP\Settings {
|
|
330 |
return true;
|
331 |
}
|
332 |
}
|
333 |
-
|
334 |
return false;
|
335 |
}
|
336 |
-
|
337 |
/**
|
338 |
* @param $ip
|
339 |
* @param $list
|
@@ -344,20 +344,20 @@ class Settings extends \Hammer\WP\Settings {
|
|
344 |
if ( $list == 'blacklist' ) {
|
345 |
$ips = $this->getIpBlacklist();
|
346 |
$type = 'ip_blacklist';
|
347 |
-
}
|
348 |
$ips = $this->getIpWhitelist();
|
349 |
$type = 'ip_whitelist';
|
350 |
}
|
351 |
if ( empty( $type ) ) {
|
352 |
return;
|
353 |
}
|
354 |
-
|
355 |
$ips[] = $ip;
|
356 |
$ips = array_unique( $ips );
|
357 |
$this->$type = implode( PHP_EOL, $ips );
|
358 |
$this->save();
|
359 |
}
|
360 |
-
|
361 |
/**
|
362 |
* @param $ip
|
363 |
* @param $list
|
@@ -368,14 +368,14 @@ class Settings extends \Hammer\WP\Settings {
|
|
368 |
if ( $list == 'blacklist' ) {
|
369 |
$ips = $this->getIpBlacklist();
|
370 |
$type = 'ip_blacklist';
|
371 |
-
}
|
372 |
$ips = $this->getIpWhitelist();
|
373 |
$type = 'ip_whitelist';
|
374 |
}
|
375 |
if ( empty( $type ) ) {
|
376 |
return;
|
377 |
}
|
378 |
-
|
379 |
$key = array_search( $ip, $ips );
|
380 |
if ( $key !== false ) {
|
381 |
unset( $ips[ $key ] );
|
@@ -384,7 +384,7 @@ class Settings extends \Hammer\WP\Settings {
|
|
384 |
$this->save();
|
385 |
}
|
386 |
}
|
387 |
-
|
388 |
/**
|
389 |
* @param $ip
|
390 |
* @param $range
|
@@ -398,10 +398,10 @@ class Settings extends \Hammer\WP\Settings {
|
|
398 |
$subnet = ip2long( $subnet );
|
399 |
$mask = - 1 << ( 32 - $bits );
|
400 |
$subnet &= $mask; # nb: in case the supplied subnet wasn't correctly aligned
|
401 |
-
|
402 |
return ( $ip & $mask ) == $subnet;
|
403 |
}
|
404 |
-
|
405 |
public function before_update() {
|
406 |
//validate ips
|
407 |
$remove_ips = array();
|
@@ -420,7 +420,7 @@ class Settings extends \Hammer\WP\Settings {
|
|
420 |
}
|
421 |
$this->ip_blacklist = implode( PHP_EOL, $blacklist );
|
422 |
}
|
423 |
-
|
424 |
if ( isset( $_POST['ip_whitelist'] ) ) {
|
425 |
$whitelist = Http_Helper::retrievePost( 'ip_whitelist' );
|
426 |
$whitelist = explode( PHP_EOL, $whitelist );
|
@@ -434,13 +434,13 @@ class Settings extends \Hammer\WP\Settings {
|
|
434 |
$this->ip_whitelist = implode( PHP_EOL, $whitelist );
|
435 |
}
|
436 |
$remove_ips = array_filter( $remove_ips );
|
437 |
-
|
438 |
if ( ! empty( $remove_ips ) && count( $remove_ips ) ) {
|
439 |
WP_Helper::getArrayCache()->set( 'faultIps', $remove_ips );
|
440 |
WP_Helper::getArrayCache()->set( 'isBlacklistSelf', $isSelf );
|
441 |
}
|
442 |
}
|
443 |
-
|
444 |
/**
|
445 |
* $ip an be single ip, or a range like xxx.xxx.xxx.xxx - xxx.xxx.xxx.xxx or CIDR
|
446 |
*
|
@@ -475,23 +475,23 @@ class Settings extends \Hammer\WP\Settings {
|
|
475 |
}
|
476 |
}
|
477 |
}
|
478 |
-
|
479 |
return false;
|
480 |
}
|
481 |
-
|
482 |
public function beforeValidate() {
|
483 |
$emails = [];
|
484 |
foreach ( $this->receipts as $receipt ) {
|
485 |
if ( in_array( $receipt['email'], $emails ) ) {
|
486 |
$this->addError( 'recipients', __( "Recipients' emails can't be duplicate", "defender-security" ) );
|
487 |
-
|
488 |
return false;
|
489 |
} else {
|
490 |
$emails[] = $receipt['email'];
|
491 |
}
|
492 |
}
|
493 |
}
|
494 |
-
|
495 |
/**
|
496 |
* @param $ip
|
497 |
*
|
@@ -500,7 +500,7 @@ class Settings extends \Hammer\WP\Settings {
|
|
500 |
private function isIPV4( $ip ) {
|
501 |
return filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 );
|
502 |
}
|
503 |
-
|
504 |
/**
|
505 |
* @param $ip
|
506 |
*
|
@@ -509,33 +509,33 @@ class Settings extends \Hammer\WP\Settings {
|
|
509 |
private function isIPV6( $ip ) {
|
510 |
return filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 );
|
511 |
}
|
512 |
-
|
513 |
/**
|
514 |
* @return array
|
515 |
*/
|
516 |
public function events() {
|
517 |
$that = $this;
|
518 |
-
|
519 |
return array(
|
520 |
self::EVENT_BEFORE_SAVE => array(
|
521 |
array(
|
522 |
function () use ( $that ) {
|
523 |
$that->before_update();
|
524 |
-
|
525 |
foreach ( $this->receipts as $k => &$receipt ) {
|
526 |
$receipt = array_map( 'sanitize_text_field', $receipt );
|
527 |
if ( ! filter_var( $receipt['email'], FILTER_VALIDATE_EMAIL ) ) {
|
528 |
unset( $this->receipts[ $k ] );
|
529 |
}
|
530 |
}
|
531 |
-
|
532 |
foreach ( $this->report_receipts as $k => &$receipt ) {
|
533 |
$receipt = array_map( 'sanitize_text_field', $receipt );
|
534 |
if ( ! filter_var( $receipt['email'], FILTER_VALIDATE_EMAIL ) ) {
|
535 |
unset( $this->report_receipts[ $k ] );
|
536 |
}
|
537 |
}
|
538 |
-
|
539 |
//need to turn off notification or report off if no recipients
|
540 |
$this->receipts = array_filter( $this->receipts );
|
541 |
if ( count( $this->receipts ) == 0 ) {
|
@@ -551,7 +551,7 @@ class Settings extends \Hammer\WP\Settings {
|
|
551 |
)
|
552 |
);
|
553 |
}
|
554 |
-
|
555 |
/**
|
556 |
* @return array|string
|
557 |
*/
|
@@ -561,10 +561,10 @@ class Settings extends \Hammer\WP\Settings {
|
|
561 |
$usernames = array_map( 'trim', $usernames );
|
562 |
$usernames = array_map( 'strtolower', $usernames );
|
563 |
$usernames = array_filter( $usernames );
|
564 |
-
|
565 |
return $usernames;
|
566 |
}
|
567 |
-
|
568 |
/**
|
569 |
* @return bool
|
570 |
*/
|
@@ -572,10 +572,10 @@ class Settings extends \Hammer\WP\Settings {
|
|
572 |
if ( is_null( $this->geoIP_db ) || ! is_file( $this->geoIP_db ) ) {
|
573 |
return false;
|
574 |
}
|
575 |
-
|
576 |
return true;
|
577 |
}
|
578 |
-
|
579 |
/**
|
580 |
* @return bool
|
581 |
*/
|
@@ -592,7 +592,7 @@ class Settings extends \Hammer\WP\Settings {
|
|
592 |
if ( $this->isCountryWhitelist() ) {
|
593 |
return false;
|
594 |
}
|
595 |
-
|
596 |
$blacklisted = $this->getCountryBlacklist();
|
597 |
if ( empty( $blacklisted ) ) {
|
598 |
return false;
|
@@ -603,10 +603,10 @@ class Settings extends \Hammer\WP\Settings {
|
|
603 |
if ( in_array( strtoupper( $country['iso'] ), $blacklisted ) ) {
|
604 |
return true;
|
605 |
}
|
606 |
-
|
607 |
return false;
|
608 |
}
|
609 |
-
|
610 |
/**
|
611 |
* @return bool
|
612 |
*/
|
@@ -616,79 +616,146 @@ class Settings extends \Hammer\WP\Settings {
|
|
616 |
if ( empty( $whitelist ) ) {
|
617 |
return false;
|
618 |
}
|
619 |
-
|
620 |
if ( in_array( strtoupper( $country['iso'] ), $whitelist ) ) {
|
621 |
return true;
|
622 |
}
|
623 |
-
|
624 |
return false;
|
625 |
}
|
626 |
-
|
627 |
/**
|
628 |
* @return Settings
|
629 |
*/
|
630 |
public static function instance() {
|
631 |
if ( is_null( self::$_instance ) ) {
|
632 |
-
$class = new Settings( 'wd_lockdown_settings',
|
|
|
633 |
self::$_instance = $class;
|
634 |
}
|
635 |
-
|
636 |
return self::$_instance;
|
637 |
}
|
638 |
-
|
639 |
-
|
640 |
/**
|
641 |
* Define labels for settings key, we will use it for HUB
|
642 |
*
|
643 |
-
* @param
|
644 |
*
|
645 |
* @return array|mixed
|
646 |
*/
|
647 |
public function labels( $key = null ) {
|
648 |
$labels = [
|
649 |
-
'login_protection'
|
650 |
-
'login_protection_login_attempt'
|
651 |
-
'
|
652 |
-
'
|
653 |
-
'
|
654 |
-
'
|
655 |
-
'
|
656 |
-
'
|
657 |
-
'
|
658 |
-
'
|
659 |
-
|
660 |
-
'
|
661 |
-
|
662 |
-
'
|
663 |
-
|
664 |
-
'
|
665 |
-
|
666 |
-
'
|
667 |
-
|
668 |
-
'
|
669 |
-
'
|
670 |
-
'
|
671 |
-
'
|
672 |
-
'
|
673 |
-
'
|
674 |
-
'
|
675 |
-
'
|
676 |
-
'
|
677 |
-
'
|
678 |
-
'
|
679 |
-
'
|
680 |
-
'
|
681 |
-
'
|
682 |
-
'report_receipts' => __( "Recipients for report", "defender-security" ),
|
683 |
-
'report_frequency' => __( "Frequency", "defender-security" ),
|
684 |
-
'report_day' => __( "Day of the week", "defender-security" ),
|
685 |
-
'report_time' => __( "Time of day", "defender-security" )
|
686 |
];
|
687 |
-
|
688 |
if ( $key != null ) {
|
689 |
return isset( $labels[ $key ] ) ? $labels[ $key ] : null;
|
690 |
}
|
691 |
-
|
692 |
return $labels;
|
693 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
694 |
}
|
13 |
|
14 |
class Settings extends \Hammer\WP\Settings {
|
15 |
private static $_instance;
|
16 |
+
|
17 |
public $login_protection = false;
|
18 |
public $login_protection_login_attempt = 5;
|
19 |
public $login_protection_lockout_timeframe = 300;
|
23 |
public $login_protection_ban_admin_brute = false;
|
24 |
public $login_protection_lockout_ban = false;
|
25 |
public $username_blacklist = '';
|
26 |
+
|
27 |
public $detect_404 = false;
|
28 |
public $detect_404_threshold = 20;
|
29 |
public $detect_404_timeframe = 300;
|
36 |
public $detect_404_lockout_message = "You have been locked out due to too many attempts to access a file that doesn't exist.";
|
37 |
public $detect_404_lockout_ban = false;
|
38 |
public $detect_404_logged = true;
|
39 |
+
|
40 |
public $ip_blacklist = array();
|
41 |
public $ip_whitelist = array();
|
42 |
public $ip_lockout_message = 'The administrator has blocked your IP from accessing this website.';
|
43 |
+
|
44 |
public $country_blacklist = [];
|
45 |
public $country_whitelist = [];
|
46 |
+
|
47 |
public $login_lockout_notification = true;
|
48 |
public $ip_lockout_notification = true;
|
49 |
+
|
50 |
public $report = true;
|
51 |
public $report_frequency = '7';
|
52 |
public $report_day = 'sunday';
|
53 |
public $report_time = '0:00';
|
54 |
+
|
55 |
public $geoIP_db = null;
|
56 |
+
|
57 |
public $storage_days = 30;
|
58 |
+
|
59 |
public $receipts = array();
|
60 |
public $report_receipts = array();
|
61 |
public $lastReportSent;
|
62 |
+
|
63 |
public $cooldown_enabled = false;
|
64 |
public $cooldown_number_lockout = '3';
|
65 |
public $cooldown_period = '24';
|
66 |
+
|
67 |
public $cache = array();
|
68 |
+
|
69 |
public function __construct( $id, $isMulti ) {
|
70 |
if ( ( is_admin() || is_network_admin() ) && current_user_can( 'manage_options' ) ) {
|
71 |
$user = wp_get_current_user();
|
79 |
'email' => $user->user_email
|
80 |
);
|
81 |
}
|
82 |
+
|
83 |
$this->ip_whitelist = $this->getUserIp() . PHP_EOL;
|
84 |
//default is weekly
|
85 |
$this->report_day = strtolower( date( 'l' ) );
|
95 |
$this->detect_404_lockout_ban = ! ! $this->detect_404_lockout_ban;
|
96 |
$this->report = ! ! $this->report;
|
97 |
$this->detect_404_logged = ! ! $this->detect_404_logged;
|
98 |
+
|
99 |
$times = Utils::instance()->getTimes();
|
100 |
if ( ! isset( $times[ $this->report_time ] ) ) {
|
101 |
$this->report_time = '4:00';
|
117 |
$this->country_blacklist = ( array_values( array_filter( $this->country_blacklist ) ) );
|
118 |
}
|
119 |
}
|
120 |
+
|
121 |
/**
|
122 |
* @return array
|
123 |
*/
|
126 |
'utils' => '\WP_Defender\Behavior\Utils'
|
127 |
);
|
128 |
}
|
129 |
+
|
130 |
/**
|
131 |
* @return array
|
132 |
*/
|
146 |
],
|
147 |
);
|
148 |
}
|
149 |
+
|
150 |
/**
|
151 |
* @return array
|
152 |
*/
|
165 |
'ip_lockout_message',
|
166 |
];
|
167 |
}
|
168 |
+
|
169 |
/**
|
170 |
* @return array
|
171 |
*/
|
172 |
public function get404Whitelist() {
|
173 |
$arr = array_filter( explode( PHP_EOL, $this->detect_404_whitelist ) );;
|
174 |
$arr = array_map( 'trim', $arr );
|
175 |
+
|
176 |
return $arr;
|
177 |
}
|
178 |
+
|
179 |
/**
|
180 |
* @return array
|
181 |
*/
|
183 |
$arr = array_filter( explode( PHP_EOL, $this->detect_404_ignored_filetypes ) );
|
184 |
$arr = array_map( 'trim', $arr );
|
185 |
$arr = array_map( 'strtolower', $arr );
|
186 |
+
|
187 |
return $arr;
|
188 |
}
|
189 |
+
|
190 |
/**
|
191 |
* @return mixed
|
192 |
*/
|
193 |
public function getDetect404Whitelist() {
|
194 |
$arr = array_filter( explode( PHP_EOL, $this->detect_404_whitelist ) );
|
195 |
$arr = array_map( 'trim', $arr );
|
196 |
+
|
197 |
return $arr;
|
198 |
}
|
199 |
+
|
200 |
/**
|
201 |
* @return mixed
|
202 |
*/
|
203 |
public function getDetect404Blacklist() {
|
204 |
$arr = array_filter( explode( PHP_EOL, $this->detect_404_blacklist ) );
|
205 |
$arr = array_map( 'trim', $arr );
|
206 |
+
|
207 |
return $arr;
|
208 |
}
|
209 |
+
|
210 |
/**
|
211 |
* @return array
|
212 |
*/
|
217 |
$arr = array_filter( explode( PHP_EOL, $this->ip_blacklist ) );
|
218 |
}
|
219 |
$arr = array_map( 'trim', $arr );
|
220 |
+
|
221 |
return $arr;
|
222 |
}
|
223 |
+
|
224 |
/**
|
225 |
* @return array
|
226 |
*/
|
228 |
$exts = explode( PHP_EOL, $this->detect_404_ignored_filetypes );
|
229 |
$exts = array_map( 'trim', $exts );
|
230 |
$exts = array_map( 'strtolower', $exts );
|
231 |
+
|
232 |
return $exts;
|
233 |
}
|
234 |
+
|
235 |
/**
|
236 |
* @return mixed
|
237 |
*/
|
239 |
$exts = explode( PHP_EOL, $this->detect_404_filetypes_blacklist );
|
240 |
$exts = array_map( 'trim', $exts );
|
241 |
$exts = array_map( 'strtolower', $exts );
|
242 |
+
|
243 |
return $exts;
|
244 |
}
|
245 |
+
|
246 |
/**
|
247 |
* @return array
|
248 |
*/
|
254 |
$arr = array_filter( explode( PHP_EOL, $this->ip_whitelist ) );
|
255 |
}
|
256 |
$arr = array_map( 'trim', $arr );
|
257 |
+
|
258 |
return $arr;
|
259 |
}
|
260 |
+
|
261 |
/**
|
262 |
* @return array
|
263 |
*/
|
268 |
//fallback to older version than 2.2
|
269 |
$arr = array_filter( explode( ',', $this->country_blacklist ) );
|
270 |
$arr = array_map( 'trim', $arr );
|
271 |
+
|
272 |
return $arr;
|
273 |
}
|
274 |
+
|
275 |
/**
|
276 |
* @return array
|
277 |
*/
|
282 |
//fallback to older version than 2.2
|
283 |
$arr = array_filter( explode( ',', $this->country_whitelist ) );
|
284 |
$arr = array_map( 'trim', $arr );
|
285 |
+
|
286 |
return $arr;
|
287 |
}
|
288 |
+
|
289 |
/**
|
290 |
* @param $ip
|
291 |
*
|
307 |
return true;
|
308 |
}
|
309 |
}
|
310 |
+
|
311 |
return false;
|
312 |
}
|
313 |
+
|
314 |
/**
|
315 |
* @param $ip
|
316 |
*
|
330 |
return true;
|
331 |
}
|
332 |
}
|
333 |
+
|
334 |
return false;
|
335 |
}
|
336 |
+
|
337 |
/**
|
338 |
* @param $ip
|
339 |
* @param $list
|
344 |
if ( $list == 'blacklist' ) {
|
345 |
$ips = $this->getIpBlacklist();
|
346 |
$type = 'ip_blacklist';
|
347 |
+
} elseif ( $list == 'whitelist' ) {
|
348 |
$ips = $this->getIpWhitelist();
|
349 |
$type = 'ip_whitelist';
|
350 |
}
|
351 |
if ( empty( $type ) ) {
|
352 |
return;
|
353 |
}
|
354 |
+
|
355 |
$ips[] = $ip;
|
356 |
$ips = array_unique( $ips );
|
357 |
$this->$type = implode( PHP_EOL, $ips );
|
358 |
$this->save();
|
359 |
}
|
360 |
+
|
361 |
/**
|
362 |
* @param $ip
|
363 |
* @param $list
|
368 |
if ( $list == 'blacklist' ) {
|
369 |
$ips = $this->getIpBlacklist();
|
370 |
$type = 'ip_blacklist';
|
371 |
+
} elseif ( $list == 'whitelist' ) {
|
372 |
$ips = $this->getIpWhitelist();
|
373 |
$type = 'ip_whitelist';
|
374 |
}
|
375 |
if ( empty( $type ) ) {
|
376 |
return;
|
377 |
}
|
378 |
+
|
379 |
$key = array_search( $ip, $ips );
|
380 |
if ( $key !== false ) {
|
381 |
unset( $ips[ $key ] );
|
384 |
$this->save();
|
385 |
}
|
386 |
}
|
387 |
+
|
388 |
/**
|
389 |
* @param $ip
|
390 |
* @param $range
|
398 |
$subnet = ip2long( $subnet );
|
399 |
$mask = - 1 << ( 32 - $bits );
|
400 |
$subnet &= $mask; # nb: in case the supplied subnet wasn't correctly aligned
|
401 |
+
|
402 |
return ( $ip & $mask ) == $subnet;
|
403 |
}
|
404 |
+
|
405 |
public function before_update() {
|
406 |
//validate ips
|
407 |
$remove_ips = array();
|
420 |
}
|
421 |
$this->ip_blacklist = implode( PHP_EOL, $blacklist );
|
422 |
}
|
423 |
+
|
424 |
if ( isset( $_POST['ip_whitelist'] ) ) {
|
425 |
$whitelist = Http_Helper::retrievePost( 'ip_whitelist' );
|
426 |
$whitelist = explode( PHP_EOL, $whitelist );
|
434 |
$this->ip_whitelist = implode( PHP_EOL, $whitelist );
|
435 |
}
|
436 |
$remove_ips = array_filter( $remove_ips );
|
437 |
+
|
438 |
if ( ! empty( $remove_ips ) && count( $remove_ips ) ) {
|
439 |
WP_Helper::getArrayCache()->set( 'faultIps', $remove_ips );
|
440 |
WP_Helper::getArrayCache()->set( 'isBlacklistSelf', $isSelf );
|
441 |
}
|
442 |
}
|
443 |
+
|
444 |
/**
|
445 |
* $ip an be single ip, or a range like xxx.xxx.xxx.xxx - xxx.xxx.xxx.xxx or CIDR
|
446 |
*
|
475 |
}
|
476 |
}
|
477 |
}
|
478 |
+
|
479 |
return false;
|
480 |
}
|
481 |
+
|
482 |
public function beforeValidate() {
|
483 |
$emails = [];
|
484 |
foreach ( $this->receipts as $receipt ) {
|
485 |
if ( in_array( $receipt['email'], $emails ) ) {
|
486 |
$this->addError( 'recipients', __( "Recipients' emails can't be duplicate", "defender-security" ) );
|
487 |
+
|
488 |
return false;
|
489 |
} else {
|
490 |
$emails[] = $receipt['email'];
|
491 |
}
|
492 |
}
|
493 |
}
|
494 |
+
|
495 |
/**
|
496 |
* @param $ip
|
497 |
*
|
500 |
private function isIPV4( $ip ) {
|
501 |
return filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 );
|
502 |
}
|
503 |
+
|
504 |
/**
|
505 |
* @param $ip
|
506 |
*
|
509 |
private function isIPV6( $ip ) {
|
510 |
return filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6 );
|
511 |
}
|
512 |
+
|
513 |
/**
|
514 |
* @return array
|
515 |
*/
|
516 |
public function events() {
|
517 |
$that = $this;
|
518 |
+
|
519 |
return array(
|
520 |
self::EVENT_BEFORE_SAVE => array(
|
521 |
array(
|
522 |
function () use ( $that ) {
|
523 |
$that->before_update();
|
524 |
+
|
525 |
foreach ( $this->receipts as $k => &$receipt ) {
|
526 |
$receipt = array_map( 'sanitize_text_field', $receipt );
|
527 |
if ( ! filter_var( $receipt['email'], FILTER_VALIDATE_EMAIL ) ) {
|
528 |
unset( $this->receipts[ $k ] );
|
529 |
}
|
530 |
}
|
531 |
+
|
532 |
foreach ( $this->report_receipts as $k => &$receipt ) {
|
533 |
$receipt = array_map( 'sanitize_text_field', $receipt );
|
534 |
if ( ! filter_var( $receipt['email'], FILTER_VALIDATE_EMAIL ) ) {
|
535 |
unset( $this->report_receipts[ $k ] );
|
536 |
}
|
537 |
}
|
538 |
+
|
539 |
//need to turn off notification or report off if no recipients
|
540 |
$this->receipts = array_filter( $this->receipts );
|
541 |
if ( count( $this->receipts ) == 0 ) {
|
551 |
)
|
552 |
);
|
553 |
}
|
554 |
+
|
555 |
/**
|
556 |
* @return array|string
|
557 |
*/
|
561 |
$usernames = array_map( 'trim', $usernames );
|
562 |
$usernames = array_map( 'strtolower', $usernames );
|
563 |
$usernames = array_filter( $usernames );
|
564 |
+
|
565 |
return $usernames;
|
566 |
}
|
567 |
+
|
568 |
/**
|
569 |
* @return bool
|
570 |
*/
|
572 |
if ( is_null( $this->geoIP_db ) || ! is_file( $this->geoIP_db ) ) {
|
573 |
return false;
|
574 |
}
|
575 |
+
|
576 |
return true;
|
577 |
}
|
578 |
+
|
579 |
/**
|
580 |
* @return bool
|
581 |
*/
|
592 |
if ( $this->isCountryWhitelist() ) {
|
593 |
return false;
|
594 |
}
|
595 |
+
|
596 |
$blacklisted = $this->getCountryBlacklist();
|
597 |
if ( empty( $blacklisted ) ) {
|
598 |
return false;
|
603 |
if ( in_array( strtoupper( $country['iso'] ), $blacklisted ) ) {
|
604 |
return true;
|
605 |
}
|
606 |
+
|
607 |
return false;
|
608 |
}
|
609 |
+
|
610 |
/**
|
611 |
* @return bool
|
612 |
*/
|
616 |
if ( empty( $whitelist ) ) {
|
617 |
return false;
|
618 |
}
|
619 |
+
|
620 |
if ( in_array( strtoupper( $country['iso'] ), $whitelist ) ) {
|
621 |
return true;
|
622 |
}
|
623 |
+
|
624 |
return false;
|
625 |
}
|
626 |
+
|
627 |
/**
|
628 |
* @return Settings
|
629 |
*/
|
630 |
public static function instance() {
|
631 |
if ( is_null( self::$_instance ) ) {
|
632 |
+
$class = new Settings( 'wd_lockdown_settings',
|
633 |
+
WP_Helper::is_network_activate( wp_defender()->plugin_slug ) );
|
634 |
self::$_instance = $class;
|
635 |
}
|
636 |
+
|
637 |
return self::$_instance;
|
638 |
}
|
639 |
+
|
640 |
+
|
641 |
/**
|
642 |
* Define labels for settings key, we will use it for HUB
|
643 |
*
|
644 |
+
* @param null $key
|
645 |
*
|
646 |
* @return array|mixed
|
647 |
*/
|
648 |
public function labels( $key = null ) {
|
649 |
$labels = [
|
650 |
+
'login_protection' => __( "Login Protection", "defender-security" ),
|
651 |
+
'login_protection_login_attempt' => __( "Login Protection - Threshold", "defender-security" ),
|
652 |
+
'login_protection_lockout_duration' => __( "Login Protection - Duration", "defender-security" ),
|
653 |
+
'login_protection_lockout_message' => __( "Login Protection - Lockout Message", "defender-security" ),
|
654 |
+
'username_blacklist' => __( "Login Protection - Banned Usernames", "defender-security" ),
|
655 |
+
'detect_404' => __( "404 Detection", "defender-security" ),
|
656 |
+
'detect_404_threshold' => __( "404 Detection - Threshold", "defender-security" ),
|
657 |
+
'detect_404_lockout_duration' => __( "404 Detection - Duration", "defender-security" ),
|
658 |
+
'detect_404_lockout_message' => __( "404 Detection - Lockout Message", "defender-security" ),
|
659 |
+
'detect_404_blacklist' => __( "404 Detection - Files & Folders Blacklist",
|
660 |
+
"defender-security" ),
|
661 |
+
'detect_404_whitelist' => __( "404 Detection - Files & Folders Whitelist",
|
662 |
+
"defender-security" ),
|
663 |
+
'detect_404_filetypes_blacklist' => __( "404 Detection - Filetypes & Extensions Whitelist",
|
664 |
+
"defender-security" ),
|
665 |
+
'detect_404_ignored_filetypes' => __( "404 Detection - Filetypes & Extensions Blacklist",
|
666 |
+
"defender-security" ),
|
667 |
+
'detect_404_logged' => __( "404 Detection - Monitor logged in users",
|
668 |
+
"defender-security" ),
|
669 |
+
'ip_blacklist' => __( "IP Banning - IP Address Blacklist", "defender-security" ),
|
670 |
+
'ip_whitelist' => __( "IP Banning - IP Address Whitelist", "defender-security" ),
|
671 |
+
'country_blacklist' => __( "IP Banning - Country Whitelist", "defender-security" ),
|
672 |
+
'country_whitelist' => __( "IP Banning - Country Blacklist", "defender-security" ),
|
673 |
+
'ip_lockout_message' => __( "IP Banning - Lockout Message", "defender-security" ),
|
674 |
+
'login_lockout_notification' => __( "Emails - Login Protection Lockout", "defender-security" ),
|
675 |
+
'ip_lockout_notification' => __( "Emails - 404 Detection Lockout", "defender-security" ),
|
676 |
+
'receipts' => __( "Emails - Lockout Recipients", "defender-security" ),
|
677 |
+
'cooldown_enabled' => __( "Emails - Repeat Lockouts", "defender-security" ),
|
678 |
+
'cooldown_number_lockout' => __( "Emails - Repeat Lockouts Threshold", "defender-security" ),
|
679 |
+
'report' => __( "Reports - Scheduled Lockout Report", "defender-security" ),
|
680 |
+
'report_frequency' => __( "Reports - Frequency", "defender-security" ),
|
681 |
+
'report_receipts' => __( "Reports - Recipients", "defender-security" ),
|
682 |
+
'storage_days' => __( "Days to keep logs", "defender-security" ),
|
|
|
|
|
|
|
|
|
683 |
];
|
684 |
+
|
685 |
if ( $key != null ) {
|
686 |
return isset( $labels[ $key ] ) ? $labels[ $key ] : null;
|
687 |
}
|
688 |
+
|
689 |
return $labels;
|
690 |
}
|
691 |
+
|
692 |
+
/**
|
693 |
+
* @return array
|
694 |
+
*/
|
695 |
+
public function export_strings( $configs ) {
|
696 |
+
|
697 |
+
return [
|
698 |
+
__( 'Active', "defender-security" )
|
699 |
+
];
|
700 |
+
}
|
701 |
+
|
702 |
+
public function format_hub_data() {
|
703 |
+
return [
|
704 |
+
'login_protection' => $this->login_protection ? __( 'Activate',
|
705 |
+
"defender-security" ) : __( 'Inactivate',
|
706 |
+
"defender-security" ),
|
707 |
+
'login_protection_login_attempt' => sprintf( __( '%d logins in %d seconds',
|
708 |
+
"defender-security" ),
|
709 |
+
$this->login_protection_login_attempt, $this->login_protection_lockout_timeframe ),
|
710 |
+
'login_protection_lockout_duration' => $this->login_protection_lockout_ban ? __( 'Permanent',
|
711 |
+
"defender-security" ) : $this->login_protection_lockout_timeframe . ' ' . $this->login_protection_lockout_duration_unit,
|
712 |
+
'login_protection_lockout_message' => $this->login_protection_lockout_message,
|
713 |
+
'username_blacklist' => empty( $this->username_blacklist ) ? __( 'None',
|
714 |
+
"defender-security" ) : $this->username_blacklist,
|
715 |
+
'detect_404' => $this->detect_404 ? __( 'Activate',
|
716 |
+
"defender-security" ) : __( 'Inactivate',
|
717 |
+
"defender-security" ),
|
718 |
+
'detect_404_threshold' => sprintf( __( '%d hits in %d seconds',
|
719 |
+
"defender-security" ),
|
720 |
+
$this->detect_404_threshold, $this->detect_404_timeframe ),
|
721 |
+
'detect_404_lockout_duration' => $this->detect_404_lockout_ban ? __( 'Permanent',
|
722 |
+
"defender-security" ) : $this->detect_404_lockout_duration . ' ' . $this->detect_404_lockout_duration_unit,
|
723 |
+
'detect_404_lockout_message' => $this->detect_404_lockout_message,
|
724 |
+
'detect_404_blacklist' => empty( $this->detect_404_blacklist ) ? __( 'None',
|
725 |
+
"defender-security" ) : $this->detect_404_blacklist,
|
726 |
+
'detect_404_whitelist' => empty( $this->detect_404_whitelist ) ? __( 'None',
|
727 |
+
"defender-security" ) : $this->detect_404_whitelist,
|
728 |
+
'detect_404_filetypes_blacklist' => empty( $this->detect_404_filetypes_blacklist ) ? __( 'None',
|
729 |
+
"defender-security" ) : $this->detect_404_filetypes_blacklist,
|
730 |
+
'detect_404_ignored_filetypes' => empty( $this->detect_404_ignored_filetypes ) ? __( 'None',
|
731 |
+
"defender-security" ) : $this->detect_404_ignored_filetypes,
|
732 |
+
'detect_404_logged' => $this->detect_404_logged ? __( 'Yes',
|
733 |
+
"defender-security" ) : __( 'No', "defender-security" ),
|
734 |
+
'ip_blacklist' => empty( $this->ip_blacklist ) ? __( 'None',
|
735 |
+
"defender-security" ) : $this->ip_blacklist,
|
736 |
+
'country_blacklist' => empty( $this->country_blacklist ) ? __( 'None',
|
737 |
+
"defender-security" ) : $this->country_blacklist,
|
738 |
+
'ip_lockout_message' => empty( $this->ip_lockout_message ) ? __( 'None',
|
739 |
+
"defender-security" ) : $this->ip_lockout_message,
|
740 |
+
'login_lockout_notification' => $this->login_lockout_notification ? __( 'Activate',
|
741 |
+
"defender-security" ) : __( 'Inactivate',
|
742 |
+
"defender-security" ),
|
743 |
+
'ip_lockout_notification' => $this->ip_lockout_notification ? __( 'Activate',
|
744 |
+
"defender-security" ) : __( 'Inactivate',
|
745 |
+
"defender-security" ),
|
746 |
+
'receipts' => empty( $this->receipts ) ? __( 'None',
|
747 |
+
"defender-security" ) : Utils::instance()->recipientsToString( $this->receipts ),
|
748 |
+
'cooldown_enabled' => $this->cooldown_enabled ? __( 'Yes',
|
749 |
+
"defender-security" ) : __( 'No', "defender-security" ),
|
750 |
+
'cooldown_number_lockout' => $this->cooldown_number_lockout ? __( 'None',
|
751 |
+
"defender-security" ) : $this->cooldown_number_lockout,
|
752 |
+
'report' => $this->report ? __( 'Activate',
|
753 |
+
"defender-security" ) : __( 'Inactivate', "defender-security" ),
|
754 |
+
'report_frequency' => Utils::instance()->format_frequency_for_hub( $this->report_frequency,
|
755 |
+
$this->report_day, $this->report_time ),
|
756 |
+
'report_receipts' => Utils::instance()->recipientsToString( $this->report_receipts ),
|
757 |
+
'storage_days' => sprintf( __( '%d days', "defender-security" ),
|
758 |
+
$this->storage_days )
|
759 |
+
];
|
760 |
+
}
|
761 |
}
|
app/module/scan/controller/main.php
CHANGED
@@ -13,7 +13,7 @@ use WP_Defender\Module\Scan\Model\Result_Item;
|
|
13 |
*/
|
14 |
class Main extends \WP_Defender\Controller {
|
15 |
protected $slug = 'wdf-scan';
|
16 |
-
|
17 |
/**
|
18 |
* @return array
|
19 |
*/
|
@@ -23,14 +23,14 @@ class Main extends \WP_Defender\Controller {
|
|
23 |
'endpoints' => '\WP_Defender\Behavior\Endpoint',
|
24 |
'wpmudev' => '\WP_Defender\Behavior\WPMUDEV'
|
25 |
];
|
26 |
-
|
27 |
if ( wp_defender()->isFree == false ) {
|
28 |
$behaviors['pro'] = '\WP_Defender\Module\Scan\Behavior\Pro\Reporting';
|
29 |
}
|
30 |
-
|
31 |
return $behaviors;
|
32 |
}
|
33 |
-
|
34 |
/**
|
35 |
* Main constructor.
|
36 |
*/
|
@@ -40,19 +40,19 @@ class Main extends \WP_Defender\Controller {
|
|
40 |
} else {
|
41 |
$this->addAction( 'admin_menu', 'adminMenu' );
|
42 |
}
|
43 |
-
|
44 |
if ( $this->isInPage() || $this->isDashboard() ) {
|
45 |
$this->addAction( 'defender_enqueue_assets', 'scripts', 11 );
|
46 |
}
|
47 |
-
|
48 |
//process scan in background
|
49 |
$this->addAction( 'processScanCron', 'processScanCron' );
|
50 |
//scan as schedule
|
51 |
$this->addAction( 'scanReportCron', 'scanReportCron' );
|
52 |
-
|
53 |
$this->addAction( 'sendScanEmail', 'sendEmailReport' );
|
54 |
}
|
55 |
-
|
56 |
/**
|
57 |
* @return bool|void
|
58 |
*/
|
@@ -60,7 +60,7 @@ class Main extends \WP_Defender\Controller {
|
|
60 |
if ( wp_defender()->isFree ) {
|
61 |
return;
|
62 |
}
|
63 |
-
|
64 |
$settings = Settings::instance();
|
65 |
$lastReportSent = $settings->last_report_sent;
|
66 |
if ( $lastReportSent == null ) {
|
@@ -75,11 +75,11 @@ class Main extends \WP_Defender\Controller {
|
|
75 |
$lastReportSent = strtotime( '-31 days', current_time( 'timestamp' ) );
|
76 |
}
|
77 |
}
|
78 |
-
|
79 |
if ( ! $this->isReportTime( $settings->frequency, $settings->day, $lastReportSent ) ) {
|
80 |
return false;
|
81 |
}
|
82 |
-
|
83 |
//need to check if we already have a scan in progress
|
84 |
$activeScan = Scan_Api::getActiveScan();
|
85 |
if ( ! is_object( $activeScan ) ) {
|
@@ -91,7 +91,7 @@ class Main extends \WP_Defender\Controller {
|
|
91 |
wp_schedule_single_event( strtotime( '+1 minutes' ), 'processScanCron' );
|
92 |
}
|
93 |
}
|
94 |
-
|
95 |
/**
|
96 |
* Process a scan via cronjob, only use to process in background, not create a new scan
|
97 |
*/
|
@@ -102,16 +102,16 @@ class Main extends \WP_Defender\Controller {
|
|
102 |
}
|
103 |
//sometime the scan get stuck, queue it first
|
104 |
wp_schedule_single_event( strtotime( '+1 minutes' ), 'processScanCron' );
|
105 |
-
|
106 |
$activeScan = Scan_Api::getActiveScan();
|
107 |
if ( ! is_object( $activeScan ) ) {
|
108 |
//no scan created, return
|
109 |
return;
|
110 |
}
|
111 |
-
|
112 |
$scanning = new Scan\Component\Scanning();
|
113 |
$ret = $scanning->run();
|
114 |
-
|
115 |
if ( $ret == true ) {
|
116 |
//completed
|
117 |
$this->sendEmailReport();
|
@@ -120,25 +120,26 @@ class Main extends \WP_Defender\Controller {
|
|
120 |
wp_clear_scheduled_hook( 'processScanCron' );
|
121 |
}
|
122 |
}
|
123 |
-
|
124 |
/**
|
125 |
* Add submit admin page
|
126 |
*/
|
127 |
public function adminMenu() {
|
128 |
$cap = is_multisite() ? 'manage_network_options' : 'manage_options';
|
129 |
-
add_submenu_page( 'wp-defender', esc_html__( "Malware Scanning", "defender-security" ),
|
130 |
-
|
131 |
-
|
132 |
-
|
|
|
133 |
}
|
134 |
-
|
135 |
/**
|
136 |
* Enqueue scripts & styles
|
137 |
*/
|
138 |
public function scripts() {
|
139 |
if ( $this->isInPage() ) {
|
140 |
wp_enqueue_style( 'defender' );
|
141 |
-
|
142 |
wp_register_script( 'defender-scan', wp_defender()->getPluginUrl() . 'assets/app/scan.js', [
|
143 |
'def-vue',
|
144 |
'defender',
|
@@ -152,7 +153,7 @@ class Main extends \WP_Defender\Controller {
|
|
152 |
wp_enqueue_script( 'wpmudev-sui' );
|
153 |
}
|
154 |
}
|
155 |
-
|
156 |
public function _scriptsData() {
|
157 |
if ( ! $this->checkPermission() ) {
|
158 |
return [];
|
@@ -173,73 +174,75 @@ class Main extends \WP_Defender\Controller {
|
|
173 |
],
|
174 |
'endpoints' => $this->getAllAvailableEndpoints( Scan::getClassName() ),
|
175 |
] );
|
176 |
-
|
177 |
return $data;
|
178 |
}
|
179 |
-
|
180 |
/**
|
181 |
* Internal route for this module
|
182 |
*/
|
183 |
public function actionIndex() {
|
184 |
$this->render( 'main' );
|
185 |
}
|
186 |
-
|
187 |
public function sendEmailReport( $force = false ) {
|
188 |
$settings = Settings::instance();
|
189 |
-
|
190 |
$model = Scan_Api::getLastScan();
|
191 |
if ( ! is_object( $model ) ) {
|
192 |
return;
|
193 |
}
|
194 |
-
|
195 |
$count = $model->countAll( Result_Item::STATUS_ISSUE );
|
196 |
-
|
197 |
//Check one instead of validating both conditions
|
198 |
if ( $model->logs == 'report' ) {
|
199 |
if ( $settings->report == false ) {
|
200 |
return;
|
201 |
}
|
202 |
-
|
203 |
if ( $settings->always_send == false && $count == 0 ) {
|
204 |
return;
|
205 |
}
|
206 |
-
|
207 |
-
$recipients
|
|
|
208 |
} else {
|
209 |
if ( $settings->notification == false ) {
|
210 |
return;
|
211 |
}
|
212 |
-
|
213 |
if ( $settings->always_send_notification == false && $count == 0 ) {
|
214 |
return;
|
215 |
}
|
216 |
-
|
217 |
$recipients = $settings->recipients_notification;
|
218 |
}
|
219 |
-
|
220 |
if ( empty( $recipients ) ) {
|
221 |
return;
|
222 |
}
|
223 |
-
|
224 |
foreach ( $recipients as $item ) {
|
225 |
//prepare the parameters
|
226 |
-
$email
|
227 |
-
$params
|
228 |
'USER_NAME' => $item['first_name'],
|
229 |
'ISSUES_COUNT' => $count,
|
230 |
-
'SCAN_PAGE_LINK' => apply_filters( 'report_email_logs_link',
|
|
|
231 |
'ISSUES_LIST' => $this->issuesListHtml( $model ),
|
232 |
'SITE_URL' => network_site_url(),
|
233 |
);
|
234 |
-
$params
|
235 |
if ( $count == 0 ) {
|
236 |
-
$subject
|
237 |
$email_content = $settings->email_all_ok;
|
238 |
} else {
|
239 |
-
$subject
|
240 |
$email_content = $settings->email_has_issue;
|
241 |
}
|
242 |
-
$subject
|
243 |
$email_content = apply_filters( 'wd_notification_email_content_before', $email_content, $model );
|
244 |
foreach ( $params as $key => $val ) {
|
245 |
$email_content = str_replace( '{' . $key . '}', $val, $email_content );
|
@@ -248,7 +251,7 @@ class Main extends \WP_Defender\Controller {
|
|
248 |
//change nl to br
|
249 |
$email_content = wpautop( stripslashes( $email_content ) );
|
250 |
$email_content = apply_filters( 'wd_notification_email_content_after', $email_content, $model );
|
251 |
-
|
252 |
$email_template = $this->renderPartial( 'email-template', array(
|
253 |
'subject' => $subject,
|
254 |
'message' => $email_content
|
@@ -262,7 +265,7 @@ class Main extends \WP_Defender\Controller {
|
|
262 |
wp_mail( $email, $subject, $email_template, $headers );
|
263 |
}
|
264 |
}
|
265 |
-
|
266 |
/**
|
267 |
* Build issues html table
|
268 |
*
|
@@ -275,57 +278,60 @@ class Main extends \WP_Defender\Controller {
|
|
275 |
private function issuesListHtml( Scan\Model\Scan $model ) {
|
276 |
ob_start();
|
277 |
?>
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
|
|
|
|
289 |
<?php foreach ( $model->getItems() as $k => $item ): ?>
|
290 |
<?php if ( $k == 0 ): ?>
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
<?php else: ?>
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
<?php endif; ?>
|
311 |
<?php endforeach; ?>
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
|
|
329 |
<?php
|
330 |
return ob_get_clean();
|
331 |
}
|
13 |
*/
|
14 |
class Main extends \WP_Defender\Controller {
|
15 |
protected $slug = 'wdf-scan';
|
16 |
+
|
17 |
/**
|
18 |
* @return array
|
19 |
*/
|
23 |
'endpoints' => '\WP_Defender\Behavior\Endpoint',
|
24 |
'wpmudev' => '\WP_Defender\Behavior\WPMUDEV'
|
25 |
];
|
26 |
+
|
27 |
if ( wp_defender()->isFree == false ) {
|
28 |
$behaviors['pro'] = '\WP_Defender\Module\Scan\Behavior\Pro\Reporting';
|
29 |
}
|
30 |
+
|
31 |
return $behaviors;
|
32 |
}
|
33 |
+
|
34 |
/**
|
35 |
* Main constructor.
|
36 |
*/
|
40 |
} else {
|
41 |
$this->addAction( 'admin_menu', 'adminMenu' );
|
42 |
}
|
43 |
+
|
44 |
if ( $this->isInPage() || $this->isDashboard() ) {
|
45 |
$this->addAction( 'defender_enqueue_assets', 'scripts', 11 );
|
46 |
}
|
47 |
+
|
48 |
//process scan in background
|
49 |
$this->addAction( 'processScanCron', 'processScanCron' );
|
50 |
//scan as schedule
|
51 |
$this->addAction( 'scanReportCron', 'scanReportCron' );
|
52 |
+
|
53 |
$this->addAction( 'sendScanEmail', 'sendEmailReport' );
|
54 |
}
|
55 |
+
|
56 |
/**
|
57 |
* @return bool|void
|
58 |
*/
|
60 |
if ( wp_defender()->isFree ) {
|
61 |
return;
|
62 |
}
|
63 |
+
|
64 |
$settings = Settings::instance();
|
65 |
$lastReportSent = $settings->last_report_sent;
|
66 |
if ( $lastReportSent == null ) {
|
75 |
$lastReportSent = strtotime( '-31 days', current_time( 'timestamp' ) );
|
76 |
}
|
77 |
}
|
78 |
+
|
79 |
if ( ! $this->isReportTime( $settings->frequency, $settings->day, $lastReportSent ) ) {
|
80 |
return false;
|
81 |
}
|
82 |
+
|
83 |
//need to check if we already have a scan in progress
|
84 |
$activeScan = Scan_Api::getActiveScan();
|
85 |
if ( ! is_object( $activeScan ) ) {
|
91 |
wp_schedule_single_event( strtotime( '+1 minutes' ), 'processScanCron' );
|
92 |
}
|
93 |
}
|
94 |
+
|
95 |
/**
|
96 |
* Process a scan via cronjob, only use to process in background, not create a new scan
|
97 |
*/
|
102 |
}
|
103 |
//sometime the scan get stuck, queue it first
|
104 |
wp_schedule_single_event( strtotime( '+1 minutes' ), 'processScanCron' );
|
105 |
+
|
106 |
$activeScan = Scan_Api::getActiveScan();
|
107 |
if ( ! is_object( $activeScan ) ) {
|
108 |
//no scan created, return
|
109 |
return;
|
110 |
}
|
111 |
+
|
112 |
$scanning = new Scan\Component\Scanning();
|
113 |
$ret = $scanning->run();
|
114 |
+
|
115 |
if ( $ret == true ) {
|
116 |
//completed
|
117 |
$this->sendEmailReport();
|
120 |
wp_clear_scheduled_hook( 'processScanCron' );
|
121 |
}
|
122 |
}
|
123 |
+
|
124 |
/**
|
125 |
* Add submit admin page
|
126 |
*/
|
127 |
public function adminMenu() {
|
128 |
$cap = is_multisite() ? 'manage_network_options' : 'manage_options';
|
129 |
+
add_submenu_page( 'wp-defender', esc_html__( "Malware Scanning", "defender-security" ),
|
130 |
+
esc_html__( "Malware Scanning", "defender-security" ), $cap, $this->slug, array(
|
131 |
+
&$this,
|
132 |
+
'actionIndex'
|
133 |
+
) );
|
134 |
}
|
135 |
+
|
136 |
/**
|
137 |
* Enqueue scripts & styles
|
138 |
*/
|
139 |
public function scripts() {
|
140 |
if ( $this->isInPage() ) {
|
141 |
wp_enqueue_style( 'defender' );
|
142 |
+
|
143 |
wp_register_script( 'defender-scan', wp_defender()->getPluginUrl() . 'assets/app/scan.js', [
|
144 |
'def-vue',
|
145 |
'defender',
|
153 |
wp_enqueue_script( 'wpmudev-sui' );
|
154 |
}
|
155 |
}
|
156 |
+
|
157 |
public function _scriptsData() {
|
158 |
if ( ! $this->checkPermission() ) {
|
159 |
return [];
|
174 |
],
|
175 |
'endpoints' => $this->getAllAvailableEndpoints( Scan::getClassName() ),
|
176 |
] );
|
177 |
+
|
178 |
return $data;
|
179 |
}
|
180 |
+
|
181 |
/**
|
182 |
* Internal route for this module
|
183 |
*/
|
184 |
public function actionIndex() {
|
185 |
$this->render( 'main' );
|
186 |
}
|
187 |
+
|
188 |
public function sendEmailReport( $force = false ) {
|
189 |
$settings = Settings::instance();
|
190 |
+
|
191 |
$model = Scan_Api::getLastScan();
|
192 |
if ( ! is_object( $model ) ) {
|
193 |
return;
|
194 |
}
|
195 |
+
|
196 |
$count = $model->countAll( Result_Item::STATUS_ISSUE );
|
197 |
+
|
198 |
//Check one instead of validating both conditions
|
199 |
if ( $model->logs == 'report' ) {
|
200 |
if ( $settings->report == false ) {
|
201 |
return;
|
202 |
}
|
203 |
+
|
204 |
if ( $settings->always_send == false && $count == 0 ) {
|
205 |
return;
|
206 |
}
|
207 |
+
|
208 |
+
$recipients = $settings->recipients;
|
209 |
+
$settings->last_report_sent = current_time( 'timestamp' );
|
210 |
} else {
|
211 |
if ( $settings->notification == false ) {
|
212 |
return;
|
213 |
}
|
214 |
+
|
215 |
if ( $settings->always_send_notification == false && $count == 0 ) {
|
216 |
return;
|
217 |
}
|
218 |
+
|
219 |
$recipients = $settings->recipients_notification;
|
220 |
}
|
221 |
+
|
222 |
if ( empty( $recipients ) ) {
|
223 |
return;
|
224 |
}
|
225 |
+
|
226 |
foreach ( $recipients as $item ) {
|
227 |
//prepare the parameters
|
228 |
+
$email = $item['email'];
|
229 |
+
$params = array(
|
230 |
'USER_NAME' => $item['first_name'],
|
231 |
'ISSUES_COUNT' => $count,
|
232 |
+
'SCAN_PAGE_LINK' => apply_filters( 'report_email_logs_link',
|
233 |
+
network_admin_url( 'admin.php?page=wdf-scan' ), $email ),
|
234 |
'ISSUES_LIST' => $this->issuesListHtml( $model ),
|
235 |
'SITE_URL' => network_site_url(),
|
236 |
);
|
237 |
+
$params = apply_filters( 'wd_notification_email_params', $params );
|
238 |
if ( $count == 0 ) {
|
239 |
+
$subject = apply_filters( 'wd_notification_email_subject', $settings->email_subject );
|
240 |
$email_content = $settings->email_all_ok;
|
241 |
} else {
|
242 |
+
$subject = apply_filters( 'wd_notification_email_subject_issue', $settings->email_subject_issue );
|
243 |
$email_content = $settings->email_has_issue;
|
244 |
}
|
245 |
+
$subject = stripslashes( $subject );
|
246 |
$email_content = apply_filters( 'wd_notification_email_content_before', $email_content, $model );
|
247 |
foreach ( $params as $key => $val ) {
|
248 |
$email_content = str_replace( '{' . $key . '}', $val, $email_content );
|
251 |
//change nl to br
|
252 |
$email_content = wpautop( stripslashes( $email_content ) );
|
253 |
$email_content = apply_filters( 'wd_notification_email_content_after', $email_content, $model );
|
254 |
+
|
255 |
$email_template = $this->renderPartial( 'email-template', array(
|
256 |
'subject' => $subject,
|
257 |
'message' => $email_content
|
265 |
wp_mail( $email, $subject, $email_template, $headers );
|
266 |
}
|
267 |
}
|
268 |
+
|
269 |
/**
|
270 |
* Build issues html table
|
271 |
*
|
278 |
private function issuesListHtml( Scan\Model\Scan $model ) {
|
279 |
ob_start();
|
280 |
?>
|
281 |
+
<table class="results-list"
|
282 |
+
style="border-collapse: collapse; border-spacing: 0; padding: 0; text-align: left; vertical-align: top;">
|
283 |
+
<thead class="results-list-header" style="border-bottom: 2px solid #ff5c28;">
|
284 |
+
<tr style="padding: 0; text-align: left; vertical-align: top;">
|
285 |
+
<th class="result-list-label-title"
|
286 |
+
style="Margin: 0; color: #ff5c28; font-family: Helvetica, Arial, sans-serif; font-size: 22px; font-weight: 700; line-height: 48px; margin: 0; padding: 0; text-align: left; width: 35%;"><?php esc_html_e( "File",
|
287 |
+
"defender-security" ) ?></th>
|
288 |
+
<th class="result-list-data-title"
|
289 |
+
style="Margin: 0; color: #ff5c28; font-family: Helvetica, Arial, sans-serif; font-size: 22px; font-weight: 700; line-height: 48px; margin: 0; padding: 0; text-align: left;"><?php esc_html_e( "Issue",
|
290 |
+
"defender-security" ) ?></th>
|
291 |
+
</tr>
|
292 |
+
</thead>
|
293 |
+
<tbody class="results-list-content">
|
294 |
<?php foreach ( $model->getItems() as $k => $item ): ?>
|
295 |
<?php if ( $k == 0 ): ?>
|
296 |
+
<tr style="padding: 0; text-align: left; vertical-align: top;">
|
297 |
+
<td class="result-list-label"
|
298 |
+
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: 700; hyphens: auto; line-height: 28px; margin: 0; padding: 20px 5px; text-align: left; vertical-align: top; word-wrap: break-word;"><?php echo $item->getTitle() ?>
|
299 |
+
<span
|
300 |
+
style="display: inline-block; font-weight: 400; width: 100%;"><?php echo $item->getSubTitle() ?></span>
|
301 |
+
</td>
|
302 |
+
<td class="result-list-data"
|
303 |
+
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: 700; hyphens: auto; line-height: 28px; margin: 0; padding: 20px 5px; text-align: left; vertical-align: top; word-wrap: break-word;"><?php echo $item->getIssueDetail() ?></td>
|
304 |
+
</tr>
|
305 |
<?php else: ?>
|
306 |
+
<tr style="padding: 0; text-align: left; vertical-align: top;">
|
307 |
+
<td class="result-list-label <?php echo $k > 0 ? " bordered" : null ?>"
|
308 |
+
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; border-top: 2px solid #ff5c28; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: 700; hyphens: auto; line-height: 28px; margin: 0; padding: 20px 5px; text-align: left; vertical-align: top; word-wrap: break-word;"><?php echo $item->getTitle() ?>
|
309 |
+
<span
|
310 |
+
style="display: inline-block; font-weight: 400; width: 100%;"><?php echo $item->getSubTitle() ?></span>
|
311 |
+
</td>
|
312 |
+
<td class="result-list-data <?php echo $k > 0 ? " bordered" : null ?>"
|
313 |
+
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; border-top: 2px solid #ff5c28; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: 700; hyphens: auto; line-height: 28px; margin: 0; padding: 20px 5px; text-align: left; vertical-align: top; word-wrap: break-word;"><?php echo $item->getIssueDetail() ?></td>
|
314 |
+
</tr>
|
315 |
<?php endif; ?>
|
316 |
<?php endforeach; ?>
|
317 |
+
</tbody>
|
318 |
+
<tfoot class="results-list-footer">
|
319 |
+
<tr style="padding: 0; text-align: left; vertical-align: top;">
|
320 |
+
<td colspan="2"
|
321 |
+
style="-moz-hyphens: auto; -webkit-hyphens: auto; Margin: 0; border-collapse: collapse !important; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; hyphens: auto; line-height: 26px; margin: 0; padding: 10px 0 0; text-align: left; vertical-align: top; word-wrap: break-word;">
|
322 |
+
<p style="Margin: 0; Margin-bottom: 0; color: #555555; font-family: Helvetica, Arial, sans-serif; font-size: 15px; font-weight: normal; line-height: 26px; margin: 0; margin-bottom: 0; padding: 0 0 24px; text-align: left;">
|
323 |
+
<a class="plugin-brand" href="<?php echo network_admin_url( 'admin.php?page=wdf-scan' ) ?>"
|
324 |
+
style="Margin: 0; color: #ff5c28; display: inline-block; font: inherit; font-family: Helvetica, Arial, sans-serif; font-weight: normal; line-height: 1.3; margin: 0; padding: 0; text-align: left; text-decoration: none;"><?php esc_html_e( "Let's get your site patched up.",
|
325 |
+
"defender-security" ) ?>
|
326 |
+
<img class="icon-arrow-right"
|
327 |
+
src="<?php echo wp_defender()->getPluginUrl() ?>assets/email-images/icon-arrow-right-defender.png"
|
328 |
+
alt="Arrow"
|
329 |
+
style="-ms-interpolation-mode: bicubic; border: none; clear: both; display: inline-block; margin: -2px 0 0 5px; max-width: 100%; outline: none; text-decoration: none; vertical-align: middle; width: auto;"></a>
|
330 |
+
</p>
|
331 |
+
</td>
|
332 |
+
</tr>
|
333 |
+
</tfoot>
|
334 |
+
</table>
|
335 |
<?php
|
336 |
return ob_get_clean();
|
337 |
}
|
app/module/scan/controller/rest.php
CHANGED
@@ -32,7 +32,7 @@ class Rest extends Controller {
|
|
32 |
];
|
33 |
$this->registerEndpoints( $routes, Scan::getClassName() );
|
34 |
}
|
35 |
-
|
36 |
public function bulkAction() {
|
37 |
if ( ! $this->checkPermission() ) {
|
38 |
return;
|
@@ -40,7 +40,7 @@ class Rest extends Controller {
|
|
40 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'bulkAction' ) ) {
|
41 |
return;
|
42 |
}
|
43 |
-
|
44 |
$items = HTTP_Helper::retrievePost( 'items' );
|
45 |
if ( ! is_array( $items ) ) {
|
46 |
$items = array();
|
@@ -77,24 +77,44 @@ class Rest extends Controller {
|
|
77 |
"defender-security" )
|
78 |
) ) );
|
79 |
break;
|
80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
default:
|
82 |
//param not from the button on frontend, log it
|
83 |
error_log( sprintf( 'Unexpected value %s from IP %s', $bulk, Utils::instance()->getUserIp() ) );
|
84 |
break;
|
85 |
}
|
86 |
}
|
87 |
-
|
88 |
public function solveIssue() {
|
89 |
if ( ! $this->checkPermission() ) {
|
90 |
return;
|
91 |
}
|
92 |
-
|
93 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'solveIssue' ) ) {
|
94 |
return;
|
95 |
}
|
96 |
$id = HTTP_Helper::retrievePost( 'id', false );
|
97 |
-
|
98 |
$model = Result_Item::findByID( $id );
|
99 |
if ( is_object( $model ) ) {
|
100 |
$ret = $model->resolve();
|
@@ -124,7 +144,7 @@ class Rest extends Controller {
|
|
124 |
) );
|
125 |
}
|
126 |
}
|
127 |
-
|
128 |
/**
|
129 |
* Delete an issue
|
130 |
*/
|
@@ -132,11 +152,11 @@ class Rest extends Controller {
|
|
132 |
if ( ! $this->checkPermission() ) {
|
133 |
return;
|
134 |
}
|
135 |
-
|
136 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'deleteIssue' ) ) {
|
137 |
return;
|
138 |
}
|
139 |
-
|
140 |
$id = HTTP_Helper::retrievePost( 'id', false );
|
141 |
$model = Result_Item::findByID( $id );
|
142 |
if ( is_object( $model ) ) {
|
@@ -146,7 +166,7 @@ class Rest extends Controller {
|
|
146 |
wp_send_json_error( array(
|
147 |
'message' => $ret->get_error_message()
|
148 |
) );
|
149 |
-
|
150 |
} else {
|
151 |
wp_send_json_success( array_merge( Scan\Component\Data_Factory::buildData(),
|
152 |
[ 'message' => __( "This item has been permanently removed", "defender-security" ), ] ) );
|
@@ -157,7 +177,7 @@ class Rest extends Controller {
|
|
157 |
) );
|
158 |
}
|
159 |
}
|
160 |
-
|
161 |
/**
|
162 |
* Get source code of an issue
|
163 |
*/
|
@@ -165,7 +185,7 @@ class Rest extends Controller {
|
|
165 |
if ( ! $this->checkPermission() ) {
|
166 |
return;
|
167 |
}
|
168 |
-
|
169 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'getFileSrcCode' ) ) {
|
170 |
return;
|
171 |
}
|
@@ -174,13 +194,13 @@ class Rest extends Controller {
|
|
174 |
if ( ! is_object( $model ) ) {
|
175 |
wp_send_json_error();
|
176 |
}
|
177 |
-
|
178 |
wp_send_json_success( array(
|
179 |
'code' => $model->getSrcCode()
|
180 |
) );
|
181 |
-
|
182 |
}
|
183 |
-
|
184 |
/**
|
185 |
* Ignore an issue
|
186 |
*/
|
@@ -188,11 +208,11 @@ class Rest extends Controller {
|
|
188 |
if ( ! $this->checkPermission() ) {
|
189 |
return;
|
190 |
}
|
191 |
-
|
192 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'ignoreIssue' ) ) {
|
193 |
return;
|
194 |
}
|
195 |
-
|
196 |
$id = HTTP_Helper::retrievePost( 'id', false );
|
197 |
$model = Result_Item::findByID( $id );
|
198 |
if ( is_object( $model ) ) {
|
@@ -206,7 +226,7 @@ class Rest extends Controller {
|
|
206 |
) );
|
207 |
}
|
208 |
}
|
209 |
-
|
210 |
/**
|
211 |
* Unignore an issue
|
212 |
*/
|
@@ -214,25 +234,27 @@ class Rest extends Controller {
|
|
214 |
if ( ! $this->checkPermission() ) {
|
215 |
return;
|
216 |
}
|
217 |
-
|
218 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'unignoreIssue' ) ) {
|
219 |
return;
|
220 |
}
|
221 |
-
|
222 |
$id = HTTP_Helper::retrievePost( 'id', false );
|
223 |
$model = Result_Item::findByID( $id );
|
224 |
if ( is_object( $model ) ) {
|
225 |
$model->unignore();
|
226 |
$this->submitStatsToDev();
|
227 |
wp_send_json_success( array_merge( Scan\Component\Data_Factory::buildData(),
|
228 |
-
[
|
|
|
|
|
229 |
} else {
|
230 |
wp_send_json_error( array(
|
231 |
'message' => __( "The item doesn't exist!", "defender-security" )
|
232 |
) );
|
233 |
}
|
234 |
}
|
235 |
-
|
236 |
/**
|
237 |
* Create a new scan
|
238 |
*/
|
@@ -240,7 +262,7 @@ class Rest extends Controller {
|
|
240 |
if ( ! $this->checkPermission() ) {
|
241 |
return;
|
242 |
}
|
243 |
-
|
244 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'newScan' ) ) {
|
245 |
return;
|
246 |
}
|
@@ -252,12 +274,12 @@ class Rest extends Controller {
|
|
252 |
'percent' => 0
|
253 |
] );
|
254 |
}
|
255 |
-
|
256 |
wp_send_json_error( array(
|
257 |
'message' => $ret->get_error_message(),
|
258 |
) );
|
259 |
}
|
260 |
-
|
261 |
/**
|
262 |
* Request to cancel current scan
|
263 |
*/
|
@@ -265,21 +287,21 @@ class Rest extends Controller {
|
|
265 |
if ( ! $this->checkPermission() ) {
|
266 |
return;
|
267 |
}
|
268 |
-
|
269 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'cancelScan' ) ) {
|
270 |
return;
|
271 |
}
|
272 |
-
|
273 |
$activeScan = Scan\Component\Scan_Api::getActiveScan();
|
274 |
if ( is_object( $activeScan ) ) {
|
275 |
$activeScan->delete();
|
276 |
-
(new Scan\Component\Scanning())->flushCache();
|
277 |
}
|
278 |
$data = Scan\Component\Data_Factory::buildData();
|
279 |
-
|
280 |
wp_send_json_success( $data );
|
281 |
}
|
282 |
-
|
283 |
/**
|
284 |
* Processing the scan
|
285 |
*/
|
@@ -287,25 +309,25 @@ class Rest extends Controller {
|
|
287 |
if ( ! $this->checkPermission() ) {
|
288 |
return;
|
289 |
}
|
290 |
-
|
291 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'processScan' ) ) {
|
292 |
return;
|
293 |
}
|
294 |
-
|
295 |
/**
|
296 |
* When we processing the scan by ajax, clear all the which does the same job
|
297 |
*/
|
298 |
wp_clear_scheduled_hook( 'processScanCron' );
|
299 |
-
|
300 |
//$ret = Scan\Component\Scan_Api::processActiveScan();
|
301 |
$scanning = new Scan\Component\Scanning();
|
302 |
$ret = $scanning->run();
|
303 |
if ( $ret == true ) {
|
304 |
do_action( 'sendScanEmail' );
|
305 |
-
|
306 |
$this->submitStatsToDev();
|
307 |
$data = Scan\Component\Data_Factory::buildData();
|
308 |
-
|
309 |
wp_send_json_success( $data );
|
310 |
} else {
|
311 |
$model = Scan\Component\Scan_Api::getActiveScan();
|
@@ -320,7 +342,7 @@ class Rest extends Controller {
|
|
320 |
wp_send_json_error( $data );
|
321 |
}
|
322 |
}
|
323 |
-
|
324 |
/**
|
325 |
* Update settings
|
326 |
*/
|
@@ -328,11 +350,11 @@ class Rest extends Controller {
|
|
328 |
if ( ! $this->checkPermission() ) {
|
329 |
return;
|
330 |
}
|
331 |
-
|
332 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'updateSettings' ) ) {
|
333 |
return;
|
334 |
}
|
335 |
-
|
336 |
$data = stripslashes( $_POST['data'] );
|
337 |
$data = json_decode( $data, true );
|
338 |
$settings = Scan\Model\Settings::instance();
|
@@ -343,12 +365,16 @@ class Rest extends Controller {
|
|
343 |
$data[ $key ] = sanitize_text_field( $val );
|
344 |
}
|
345 |
}
|
346 |
-
|
347 |
$settings->import( $data );
|
348 |
$settings->email_all_ok = stripslashes( $settings->email_all_ok );
|
349 |
$settings->email_has_issue = stripslashes( $settings->email_has_issue );
|
350 |
$settings->save();
|
351 |
if ( $this->hasMethod( 'scheduleReportTime' ) ) {
|
|
|
|
|
|
|
|
|
352 |
$this->scheduleReportTime( $settings );
|
353 |
$this->submitStatsToDev();
|
354 |
}
|
@@ -356,7 +382,7 @@ class Rest extends Controller {
|
|
356 |
'message' => __( "Your settings have been updated.", "defender-security" )
|
357 |
) );
|
358 |
}
|
359 |
-
|
360 |
/**
|
361 |
* Declaring behaviors
|
362 |
* @return array
|
@@ -370,11 +396,11 @@ class Rest extends Controller {
|
|
370 |
'endpoints' => '\WP_Defender\Behavior\Endpoint',
|
371 |
'wpmudev' => '\WP_Defender\Behavior\WPMUDEV'
|
372 |
];
|
373 |
-
|
374 |
if ( wp_defender()->isFree == false ) {
|
375 |
$behaviors['pro'] = Scan\Behavior\Pro\Reporting::class;
|
376 |
}
|
377 |
-
|
378 |
return $behaviors;
|
379 |
}
|
380 |
}
|
32 |
];
|
33 |
$this->registerEndpoints( $routes, Scan::getClassName() );
|
34 |
}
|
35 |
+
|
36 |
public function bulkAction() {
|
37 |
if ( ! $this->checkPermission() ) {
|
38 |
return;
|
40 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'bulkAction' ) ) {
|
41 |
return;
|
42 |
}
|
43 |
+
|
44 |
$items = HTTP_Helper::retrievePost( 'items' );
|
45 |
if ( ! is_array( $items ) ) {
|
46 |
$items = array();
|
77 |
"defender-security" )
|
78 |
) ) );
|
79 |
break;
|
80 |
+
case 'delete':
|
81 |
+
foreach ( $items as $id ) {
|
82 |
+
$item = Result_Item::findByID( $id );
|
83 |
+
if ( is_object( $item ) ) {
|
84 |
+
$ret = $item->purge();
|
85 |
+
if ( is_wp_error( $ret ) ) {
|
86 |
+
break;
|
87 |
+
wp_send_json_error( array(
|
88 |
+
'message' => $ret->get_error_message()
|
89 |
+
) );
|
90 |
+
}
|
91 |
+
}
|
92 |
+
}
|
93 |
+
$this->submitStatsToDev();
|
94 |
+
wp_send_json_success( array_merge( Scan\Component\Data_Factory::buildData(), array(
|
95 |
+
'message' => _n( "The suspicious file has been successfully deleted.",
|
96 |
+
"The suspicious files have been successfully deleted.",
|
97 |
+
count( $items ),
|
98 |
+
"defender-security" )
|
99 |
+
) ) );
|
100 |
+
break;
|
101 |
default:
|
102 |
//param not from the button on frontend, log it
|
103 |
error_log( sprintf( 'Unexpected value %s from IP %s', $bulk, Utils::instance()->getUserIp() ) );
|
104 |
break;
|
105 |
}
|
106 |
}
|
107 |
+
|
108 |
public function solveIssue() {
|
109 |
if ( ! $this->checkPermission() ) {
|
110 |
return;
|
111 |
}
|
112 |
+
|
113 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'solveIssue' ) ) {
|
114 |
return;
|
115 |
}
|
116 |
$id = HTTP_Helper::retrievePost( 'id', false );
|
117 |
+
|
118 |
$model = Result_Item::findByID( $id );
|
119 |
if ( is_object( $model ) ) {
|
120 |
$ret = $model->resolve();
|
144 |
) );
|
145 |
}
|
146 |
}
|
147 |
+
|
148 |
/**
|
149 |
* Delete an issue
|
150 |
*/
|
152 |
if ( ! $this->checkPermission() ) {
|
153 |
return;
|
154 |
}
|
155 |
+
|
156 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'deleteIssue' ) ) {
|
157 |
return;
|
158 |
}
|
159 |
+
|
160 |
$id = HTTP_Helper::retrievePost( 'id', false );
|
161 |
$model = Result_Item::findByID( $id );
|
162 |
if ( is_object( $model ) ) {
|
166 |
wp_send_json_error( array(
|
167 |
'message' => $ret->get_error_message()
|
168 |
) );
|
169 |
+
|
170 |
} else {
|
171 |
wp_send_json_success( array_merge( Scan\Component\Data_Factory::buildData(),
|
172 |
[ 'message' => __( "This item has been permanently removed", "defender-security" ), ] ) );
|
177 |
) );
|
178 |
}
|
179 |
}
|
180 |
+
|
181 |
/**
|
182 |
* Get source code of an issue
|
183 |
*/
|
185 |
if ( ! $this->checkPermission() ) {
|
186 |
return;
|
187 |
}
|
188 |
+
|
189 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'getFileSrcCode' ) ) {
|
190 |
return;
|
191 |
}
|
194 |
if ( ! is_object( $model ) ) {
|
195 |
wp_send_json_error();
|
196 |
}
|
197 |
+
|
198 |
wp_send_json_success( array(
|
199 |
'code' => $model->getSrcCode()
|
200 |
) );
|
201 |
+
|
202 |
}
|
203 |
+
|
204 |
/**
|
205 |
* Ignore an issue
|
206 |
*/
|
208 |
if ( ! $this->checkPermission() ) {
|
209 |
return;
|
210 |
}
|
211 |
+
|
212 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'ignoreIssue' ) ) {
|
213 |
return;
|
214 |
}
|
215 |
+
|
216 |
$id = HTTP_Helper::retrievePost( 'id', false );
|
217 |
$model = Result_Item::findByID( $id );
|
218 |
if ( is_object( $model ) ) {
|
226 |
) );
|
227 |
}
|
228 |
}
|
229 |
+
|
230 |
/**
|
231 |
* Unignore an issue
|
232 |
*/
|
234 |
if ( ! $this->checkPermission() ) {
|
235 |
return;
|
236 |
}
|
237 |
+
|
238 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'unignoreIssue' ) ) {
|
239 |
return;
|
240 |
}
|
241 |
+
|
242 |
$id = HTTP_Helper::retrievePost( 'id', false );
|
243 |
$model = Result_Item::findByID( $id );
|
244 |
if ( is_object( $model ) ) {
|
245 |
$model->unignore();
|
246 |
$this->submitStatsToDev();
|
247 |
wp_send_json_success( array_merge( Scan\Component\Data_Factory::buildData(),
|
248 |
+
[
|
249 |
+
'message' => __( "The suspicious file has been successfully restored.", "defender-security" ),
|
250 |
+
] ) );
|
251 |
} else {
|
252 |
wp_send_json_error( array(
|
253 |
'message' => __( "The item doesn't exist!", "defender-security" )
|
254 |
) );
|
255 |
}
|
256 |
}
|
257 |
+
|
258 |
/**
|
259 |
* Create a new scan
|
260 |
*/
|
262 |
if ( ! $this->checkPermission() ) {
|
263 |
return;
|
264 |
}
|
265 |
+
|
266 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'newScan' ) ) {
|
267 |
return;
|
268 |
}
|
274 |
'percent' => 0
|
275 |
] );
|
276 |
}
|
277 |
+
|
278 |
wp_send_json_error( array(
|
279 |
'message' => $ret->get_error_message(),
|
280 |
) );
|
281 |
}
|
282 |
+
|
283 |
/**
|
284 |
* Request to cancel current scan
|
285 |
*/
|
287 |
if ( ! $this->checkPermission() ) {
|
288 |
return;
|
289 |
}
|
290 |
+
|
291 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'cancelScan' ) ) {
|
292 |
return;
|
293 |
}
|
294 |
+
|
295 |
$activeScan = Scan\Component\Scan_Api::getActiveScan();
|
296 |
if ( is_object( $activeScan ) ) {
|
297 |
$activeScan->delete();
|
298 |
+
( new Scan\Component\Scanning() )->flushCache();
|
299 |
}
|
300 |
$data = Scan\Component\Data_Factory::buildData();
|
301 |
+
|
302 |
wp_send_json_success( $data );
|
303 |
}
|
304 |
+
|
305 |
/**
|
306 |
* Processing the scan
|
307 |
*/
|
309 |
if ( ! $this->checkPermission() ) {
|
310 |
return;
|
311 |
}
|
312 |
+
|
313 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'processScan' ) ) {
|
314 |
return;
|
315 |
}
|
316 |
+
|
317 |
/**
|
318 |
* When we processing the scan by ajax, clear all the which does the same job
|
319 |
*/
|
320 |
wp_clear_scheduled_hook( 'processScanCron' );
|
321 |
+
|
322 |
//$ret = Scan\Component\Scan_Api::processActiveScan();
|
323 |
$scanning = new Scan\Component\Scanning();
|
324 |
$ret = $scanning->run();
|
325 |
if ( $ret == true ) {
|
326 |
do_action( 'sendScanEmail' );
|
327 |
+
|
328 |
$this->submitStatsToDev();
|
329 |
$data = Scan\Component\Data_Factory::buildData();
|
330 |
+
|
331 |
wp_send_json_success( $data );
|
332 |
} else {
|
333 |
$model = Scan\Component\Scan_Api::getActiveScan();
|
342 |
wp_send_json_error( $data );
|
343 |
}
|
344 |
}
|
345 |
+
|
346 |
/**
|
347 |
* Update settings
|
348 |
*/
|
350 |
if ( ! $this->checkPermission() ) {
|
351 |
return;
|
352 |
}
|
353 |
+
|
354 |
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'updateSettings' ) ) {
|
355 |
return;
|
356 |
}
|
357 |
+
|
358 |
$data = stripslashes( $_POST['data'] );
|
359 |
$data = json_decode( $data, true );
|
360 |
$settings = Scan\Model\Settings::instance();
|
365 |
$data[ $key ] = sanitize_text_field( $val );
|
366 |
}
|
367 |
}
|
368 |
+
|
369 |
$settings->import( $data );
|
370 |
$settings->email_all_ok = stripslashes( $settings->email_all_ok );
|
371 |
$settings->email_has_issue = stripslashes( $settings->email_has_issue );
|
372 |
$settings->save();
|
373 |
if ( $this->hasMethod( 'scheduleReportTime' ) ) {
|
374 |
+
if ( $settings->last_report_sent == null ) {
|
375 |
+
$settings->last_report_sent = current_time( 'timestamp' );
|
376 |
+
$settings->save();
|
377 |
+
}
|
378 |
$this->scheduleReportTime( $settings );
|
379 |
$this->submitStatsToDev();
|
380 |
}
|
382 |
'message' => __( "Your settings have been updated.", "defender-security" )
|
383 |
) );
|
384 |
}
|
385 |
+
|
386 |
/**
|
387 |
* Declaring behaviors
|
388 |
* @return array
|
396 |
'endpoints' => '\WP_Defender\Behavior\Endpoint',
|
397 |
'wpmudev' => '\WP_Defender\Behavior\WPMUDEV'
|
398 |
];
|
399 |
+
|
400 |
if ( wp_defender()->isFree == false ) {
|
401 |
$behaviors['pro'] = Scan\Behavior\Pro\Reporting::class;
|
402 |
}
|
403 |
+
|
404 |
return $behaviors;
|
405 |
}
|
406 |
}
|
app/module/scan/model/settings.php
CHANGED
@@ -16,7 +16,7 @@ use WP_Defender\Module\Scan\Behavior\Pro\Vuln_Scan;
|
|
16 |
use WP_Defender\Module\Scan\Component\Scan_Api;
|
17 |
|
18 |
class Settings extends \Hammer\WP\Settings {
|
19 |
-
|
20 |
private static $_instance;
|
21 |
/**
|
22 |
* Scan WP core files
|
@@ -29,29 +29,29 @@ class Settings extends \Hammer\WP\Settings {
|
|
29 |
* @var bool
|
30 |
*/
|
31 |
public $scan_vuln = true;
|
32 |
-
|
33 |
/**
|
34 |
* @var bool
|
35 |
*/
|
36 |
public $scan_content = true;
|
37 |
-
|
38 |
/**
|
39 |
* Receipts to sending notification
|
40 |
* @var array
|
41 |
*/
|
42 |
public $recipients = array();
|
43 |
-
|
44 |
/**
|
45 |
* @var array
|
46 |
*/
|
47 |
public $recipients_notification = array();
|
48 |
-
|
49 |
/**
|
50 |
* Toggle notification on or off
|
51 |
* @var bool
|
52 |
*/
|
53 |
public $notification = true;
|
54 |
-
|
55 |
/**
|
56 |
* @var bool
|
57 |
*/
|
@@ -62,12 +62,12 @@ class Settings extends \Hammer\WP\Settings {
|
|
62 |
* @var bool
|
63 |
*/
|
64 |
public $always_send = false;
|
65 |
-
|
66 |
/**
|
67 |
* @var bool
|
68 |
*/
|
69 |
public $always_send_notification = false;
|
70 |
-
|
71 |
/**
|
72 |
* Maximum filesize to scan, only apply for content scan
|
73 |
* @var int
|
@@ -92,7 +92,7 @@ class Settings extends \Hammer\WP\Settings {
|
|
92 |
* @var string|void
|
93 |
*/
|
94 |
public $email_all_ok = '';
|
95 |
-
|
96 |
/**
|
97 |
* @var string
|
98 |
*/
|
@@ -105,12 +105,12 @@ class Settings extends \Hammer\WP\Settings {
|
|
105 |
* @var string
|
106 |
*/
|
107 |
public $time = '4:00';
|
108 |
-
|
109 |
/**
|
110 |
* @var
|
111 |
*/
|
112 |
public $last_report_sent;
|
113 |
-
|
114 |
/**
|
115 |
* @return array
|
116 |
*/
|
@@ -118,16 +118,17 @@ class Settings extends \Hammer\WP\Settings {
|
|
118 |
$behaviors = array(
|
119 |
'utils' => '\WP_Defender\Behavior\Utils'
|
120 |
);
|
121 |
-
|
122 |
if ( wp_defender()->isFree == false ) {
|
123 |
$behaviors['pro'] = '\WP_Defender\Module\Scan\Behavior\Pro\Model';
|
124 |
}
|
125 |
-
|
126 |
return $behaviors;
|
127 |
}
|
128 |
-
|
129 |
public function __construct( $id, $is_multi ) {
|
130 |
-
$this->email_subject_issue = __( 'Scan of {SITE_URL} complete. {ISSUES_COUNT} issues found.',
|
|
|
131 |
$this->email_has_issue = __( 'Hi {USER_NAME},
|
132 |
|
133 |
WP Defender here, reporting back from the front.
|
@@ -138,7 +139,8 @@ I\'ve finished scanning {SITE_URL} for vulnerabilities and I found {ISSUES_COUNT
|
|
138 |
Stay Safe,
|
139 |
WP Defender
|
140 |
Official WPMU DEV Superhero', "defender-security" );
|
141 |
-
$this->email_subject = __( 'Scan of {SITE_URL} complete. {ISSUES_COUNT} issues found.',
|
|
|
142 |
$this->email_all_ok = __( 'Hi {USER_NAME},
|
143 |
|
144 |
WP Defender here, reporting back from the front.
|
@@ -163,7 +165,7 @@ Official WPMU DEV Superhero', "defender-security" );
|
|
163 |
'email' => $user->user_email
|
164 |
);
|
165 |
}
|
166 |
-
|
167 |
//default is weekly
|
168 |
$this->day = strtolower( date( 'l' ) );
|
169 |
$this->time = '4:00';
|
@@ -174,7 +176,7 @@ Official WPMU DEV Superhero', "defender-security" );
|
|
174 |
$this->scan_content = ! ! $this->scan_content;
|
175 |
$this->scan_core = ! ! $this->scan_core;
|
176 |
$this->scan_vuln = ! ! $this->scan_vuln;
|
177 |
-
|
178 |
if ( ! is_array( $this->recipients ) ) {
|
179 |
$this->recipients = [];
|
180 |
}
|
@@ -183,13 +185,13 @@ Official WPMU DEV Superhero', "defender-security" );
|
|
183 |
$this->recipients_notification = [];
|
184 |
}
|
185 |
$this->recipients_notification = array_values( $this->recipients_notification );
|
186 |
-
|
187 |
$times = Utils::instance()->getTimes();
|
188 |
if ( ! isset( $times[ $this->time ] ) ) {
|
189 |
$this->time = '4:00';
|
190 |
}
|
191 |
}
|
192 |
-
|
193 |
/**
|
194 |
* Act like a factory, return available scans based on pro or not
|
195 |
* @return array
|
@@ -200,34 +202,35 @@ Official WPMU DEV Superhero', "defender-security" );
|
|
200 |
$scans[] = 'gather_core_files';
|
201 |
$scans[] = 'core';
|
202 |
}
|
203 |
-
|
204 |
if ( $this->scan_vuln && wp_defender()->isFree != true ) {
|
205 |
$scans[] = 'vuln';
|
206 |
}
|
207 |
-
|
208 |
if ( $this->scan_content && wp_defender()->isFree != true ) {
|
209 |
//$scans[] = 'md5';
|
210 |
$scans[] = 'content';
|
211 |
}
|
212 |
-
|
213 |
return $scans;
|
214 |
}
|
215 |
-
|
216 |
/**
|
217 |
* @return Settings
|
218 |
*/
|
219 |
public static function instance() {
|
220 |
if ( is_null( self::$_instance ) ) {
|
221 |
-
$class = new Settings( 'wd_scan_settings',
|
|
|
222 |
self::$_instance = $class;
|
223 |
}
|
224 |
-
|
225 |
return self::$_instance;
|
226 |
}
|
227 |
-
|
228 |
/**
|
229 |
* @param $slug
|
230 |
-
* @param
|
231 |
*
|
232 |
* @return Queue|null
|
233 |
*/
|
@@ -238,7 +241,7 @@ Official WPMU DEV Superhero', "defender-security" );
|
|
238 |
$queue->args = $args;
|
239 |
$queue->args['owner'] = $queue;
|
240 |
$queue->attachBehavior( 'core_files', new Core_Files() );
|
241 |
-
|
242 |
return $queue;
|
243 |
case 'core':
|
244 |
$queue = new Queue(
|
@@ -249,21 +252,21 @@ Official WPMU DEV Superhero', "defender-security" );
|
|
249 |
$queue->args = $args;
|
250 |
$queue->args['owner'] = $queue;
|
251 |
$queue->attachBehavior( 'core', new Core_Scan() );
|
252 |
-
|
253 |
return $queue;
|
254 |
case 'vuln':
|
255 |
if ( ! class_exists( '\WP_Defender\Module\Scan\Behavior\Pro\Vuln_Scan' ) ) {
|
256 |
return null;
|
257 |
}
|
258 |
-
|
259 |
$queue = new Queue( array(
|
260 |
'dummy'
|
261 |
), 'vuln', true );
|
262 |
-
|
263 |
$queue->args = $args;
|
264 |
$queue->args['owner'] = $queue;
|
265 |
$queue->attachBehavior( 'vuln', new Vuln_Scan() );
|
266 |
-
|
267 |
return $queue;
|
268 |
break;
|
269 |
case 'gather_content_files':
|
@@ -274,7 +277,7 @@ Official WPMU DEV Superhero', "defender-security" );
|
|
274 |
$queue->args = $args;
|
275 |
$queue->args['owner'] = $queue;
|
276 |
$queue->attachBehavior( 'content_files', new Content_Files() );
|
277 |
-
|
278 |
return $queue;
|
279 |
case 'content':
|
280 |
if ( ! class_exists( '\WP_Defender\Module\Scan\Behavior\Pro\Content_Yara_Scan' ) ) {
|
@@ -287,7 +290,7 @@ Official WPMU DEV Superhero', "defender-security" );
|
|
287 |
$patterns = Scan_Api::getPatterns();
|
288 |
$queue->args['patterns'] = $patterns;
|
289 |
$queue->attachBehavior( 'content', new Content_Yara_Scan() );
|
290 |
-
|
291 |
return $queue;
|
292 |
break;
|
293 |
default:
|
@@ -296,10 +299,10 @@ Official WPMU DEV Superhero', "defender-security" );
|
|
296 |
break;
|
297 |
}
|
298 |
}
|
299 |
-
|
300 |
public function events() {
|
301 |
$that = $this;
|
302 |
-
|
303 |
return array(
|
304 |
self::EVENT_BEFORE_SAVE => array(
|
305 |
array(
|
@@ -324,44 +327,115 @@ Official WPMU DEV Superhero', "defender-security" );
|
|
324 |
$this->$attr = false;
|
325 |
}
|
326 |
}
|
327 |
-
|
328 |
}
|
329 |
)
|
330 |
)
|
331 |
);
|
332 |
}
|
333 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
334 |
/**
|
335 |
* Define labels for settings key, we will use it for HUB
|
336 |
*
|
337 |
-
* @param
|
338 |
*
|
339 |
* @return array|mixed
|
340 |
*/
|
341 |
public function labels( $key = null ) {
|
342 |
$labels = [
|
343 |
-
'scan_core' => __( "Scan
|
344 |
-
'scan_vuln' => __( "Scan
|
345 |
-
'scan_content' => __( "Scan
|
346 |
-
'max_filesize' => __( "Maximum included
|
347 |
-
'
|
348 |
-
'
|
349 |
-
|
350 |
-
'
|
351 |
-
'
|
352 |
-
'
|
353 |
-
'
|
354 |
-
'
|
355 |
-
|
356 |
-
'
|
357 |
-
'
|
358 |
-
|
359 |
-
'
|
|
|
|
|
360 |
];
|
361 |
if ( $key != null ) {
|
362 |
return isset( $labels[ $key ] ) ? $labels[ $key ] : null;
|
363 |
}
|
364 |
-
|
365 |
return $labels;
|
366 |
}
|
367 |
}
|
16 |
use WP_Defender\Module\Scan\Component\Scan_Api;
|
17 |
|
18 |
class Settings extends \Hammer\WP\Settings {
|
19 |
+
|
20 |
private static $_instance;
|
21 |
/**
|
22 |
* Scan WP core files
|
29 |
* @var bool
|
30 |
*/
|
31 |
public $scan_vuln = true;
|
32 |
+
|
33 |
/**
|
34 |
* @var bool
|
35 |
*/
|
36 |
public $scan_content = true;
|
37 |
+
|
38 |
/**
|
39 |
* Receipts to sending notification
|
40 |
* @var array
|
41 |
*/
|
42 |
public $recipients = array();
|
43 |
+
|
44 |
/**
|
45 |
* @var array
|
46 |
*/
|
47 |
public $recipients_notification = array();
|
48 |
+
|
49 |
/**
|
50 |
* Toggle notification on or off
|
51 |
* @var bool
|
52 |
*/
|
53 |
public $notification = true;
|
54 |
+
|
55 |
/**
|
56 |
* @var bool
|
57 |
*/
|
62 |
* @var bool
|
63 |
*/
|
64 |
public $always_send = false;
|
65 |
+
|
66 |
/**
|
67 |
* @var bool
|
68 |
*/
|
69 |
public $always_send_notification = false;
|
70 |
+
|
71 |
/**
|
72 |
* Maximum filesize to scan, only apply for content scan
|
73 |
* @var int
|
92 |
* @var string|void
|
93 |
*/
|
94 |
public $email_all_ok = '';
|
95 |
+
|
96 |
/**
|
97 |
* @var string
|
98 |
*/
|
105 |
* @var string
|
106 |
*/
|
107 |
public $time = '4:00';
|
108 |
+
|
109 |
/**
|
110 |
* @var
|
111 |
*/
|
112 |
public $last_report_sent;
|
113 |
+
|
114 |
/**
|
115 |
* @return array
|
116 |
*/
|
118 |
$behaviors = array(
|
119 |
'utils' => '\WP_Defender\Behavior\Utils'
|
120 |
);
|
121 |
+
|
122 |
if ( wp_defender()->isFree == false ) {
|
123 |
$behaviors['pro'] = '\WP_Defender\Module\Scan\Behavior\Pro\Model';
|
124 |
}
|
125 |
+
|
126 |
return $behaviors;
|
127 |
}
|
128 |
+
|
129 |
public function __construct( $id, $is_multi ) {
|
130 |
+
$this->email_subject_issue = __( 'Scan of {SITE_URL} complete. {ISSUES_COUNT} issues found.',
|
131 |
+
"defender-security" );
|
132 |
$this->email_has_issue = __( 'Hi {USER_NAME},
|
133 |
|
134 |
WP Defender here, reporting back from the front.
|
139 |
Stay Safe,
|
140 |
WP Defender
|
141 |
Official WPMU DEV Superhero', "defender-security" );
|
142 |
+
$this->email_subject = __( 'Scan of {SITE_URL} complete. {ISSUES_COUNT} issues found.',
|
143 |
+
"defender-security" );
|
144 |
$this->email_all_ok = __( 'Hi {USER_NAME},
|
145 |
|
146 |
WP Defender here, reporting back from the front.
|
165 |
'email' => $user->user_email
|
166 |
);
|
167 |
}
|
168 |
+
|
169 |
//default is weekly
|
170 |
$this->day = strtolower( date( 'l' ) );
|
171 |
$this->time = '4:00';
|
176 |
$this->scan_content = ! ! $this->scan_content;
|
177 |
$this->scan_core = ! ! $this->scan_core;
|
178 |
$this->scan_vuln = ! ! $this->scan_vuln;
|
179 |
+
|
180 |
if ( ! is_array( $this->recipients ) ) {
|
181 |
$this->recipients = [];
|
182 |
}
|
185 |
$this->recipients_notification = [];
|
186 |
}
|
187 |
$this->recipients_notification = array_values( $this->recipients_notification );
|
188 |
+
|
189 |
$times = Utils::instance()->getTimes();
|
190 |
if ( ! isset( $times[ $this->time ] ) ) {
|
191 |
$this->time = '4:00';
|
192 |
}
|
193 |
}
|
194 |
+
|
195 |
/**
|
196 |
* Act like a factory, return available scans based on pro or not
|
197 |
* @return array
|
202 |
$scans[] = 'gather_core_files';
|
203 |
$scans[] = 'core';
|
204 |
}
|
205 |
+
|
206 |
if ( $this->scan_vuln && wp_defender()->isFree != true ) {
|
207 |
$scans[] = 'vuln';
|
208 |
}
|
209 |
+
|
210 |
if ( $this->scan_content && wp_defender()->isFree != true ) {
|
211 |
//$scans[] = 'md5';
|
212 |
$scans[] = 'content';
|
213 |
}
|
214 |
+
|
215 |
return $scans;
|
216 |
}
|
217 |
+
|
218 |
/**
|
219 |
* @return Settings
|
220 |
*/
|
221 |
public static function instance() {
|
222 |
if ( is_null( self::$_instance ) ) {
|
223 |
+
$class = new Settings( 'wd_scan_settings',
|
224 |
+
WP_Helper::is_network_activate( wp_defender()->plugin_slug ) );
|
225 |
self::$_instance = $class;
|
226 |
}
|
227 |
+
|
228 |
return self::$_instance;
|
229 |
}
|
230 |
+
|
231 |
/**
|
232 |
* @param $slug
|
233 |
+
* @param array $args
|
234 |
*
|
235 |
* @return Queue|null
|
236 |
*/
|
241 |
$queue->args = $args;
|
242 |
$queue->args['owner'] = $queue;
|
243 |
$queue->attachBehavior( 'core_files', new Core_Files() );
|
244 |
+
|
245 |
return $queue;
|
246 |
case 'core':
|
247 |
$queue = new Queue(
|
252 |
$queue->args = $args;
|
253 |
$queue->args['owner'] = $queue;
|
254 |
$queue->attachBehavior( 'core', new Core_Scan() );
|
255 |
+
|
256 |
return $queue;
|
257 |
case 'vuln':
|
258 |
if ( ! class_exists( '\WP_Defender\Module\Scan\Behavior\Pro\Vuln_Scan' ) ) {
|
259 |
return null;
|
260 |
}
|
261 |
+
|
262 |
$queue = new Queue( array(
|
263 |
'dummy'
|
264 |
), 'vuln', true );
|
265 |
+
|
266 |
$queue->args = $args;
|
267 |
$queue->args['owner'] = $queue;
|
268 |
$queue->attachBehavior( 'vuln', new Vuln_Scan() );
|
269 |
+
|
270 |
return $queue;
|
271 |
break;
|
272 |
case 'gather_content_files':
|
277 |
$queue->args = $args;
|
278 |
$queue->args['owner'] = $queue;
|
279 |
$queue->attachBehavior( 'content_files', new Content_Files() );
|
280 |
+
|
281 |
return $queue;
|
282 |
case 'content':
|
283 |
if ( ! class_exists( '\WP_Defender\Module\Scan\Behavior\Pro\Content_Yara_Scan' ) ) {
|
290 |
$patterns = Scan_Api::getPatterns();
|
291 |
$queue->args['patterns'] = $patterns;
|
292 |
$queue->attachBehavior( 'content', new Content_Yara_Scan() );
|
293 |
+
|
294 |
return $queue;
|
295 |
break;
|
296 |
default:
|
299 |
break;
|
300 |
}
|
301 |
}
|
302 |
+
|
303 |
public function events() {
|
304 |
$that = $this;
|
305 |
+
|
306 |
return array(
|
307 |
self::EVENT_BEFORE_SAVE => array(
|
308 |
array(
|
327 |
$this->$attr = false;
|
328 |
}
|
329 |
}
|
330 |
+
|
331 |
}
|
332 |
)
|
333 |
)
|
334 |
);
|
335 |
}
|
336 |
+
|
337 |
+
public function format_hub_data() {
|
338 |
+
return [
|
339 |
+
'scan_core' => $this->scan_core ? __( 'Yes', "defender-security" ) : __( 'No',
|
340 |
+
"defender-security" ),
|
341 |
+
'scan_vuln' => $this->scan_vuln ? __( 'Yes', "defender-security" ) : __( 'No',
|
342 |
+
"defender-security" ),
|
343 |
+
'scan_content' => $this->scan_content ? __( 'Yes', "defender-security" ) : __( 'No',
|
344 |
+
"defender-security" ),
|
345 |
+
'max_filesize' => $this->max_filesize . ' MB',
|
346 |
+
'notification' => $this->notification ? __( 'Activate',
|
347 |
+
"defender-security" ) : __( 'Inactivate',
|
348 |
+
"defender-security" ),
|
349 |
+
'always_send_notification' => $this->always_send_notification ? __( 'Yes',
|
350 |
+
"defender-security" ) : __( 'No', "defender-security" ),
|
351 |
+
'email_subject_issue' => $this->email_subject_issue,
|
352 |
+
'email_subject' => $this->email_subject,
|
353 |
+
'email_has_issue' => $this->email_has_issue,
|
354 |
+
'email_all_ok' => $this->email_all_ok,
|
355 |
+
'recipients_notification' => empty( $this->recipients_notification ) ? __( 'No recipients',
|
356 |
+
"defender-security" ) : Utils::instance()->recipientsToString( $this->recipients_notification ),
|
357 |
+
'report' => $this->report ? __( 'Activate',
|
358 |
+
"defender-security" ) : __( 'Inactivate', "defender-security" ),
|
359 |
+
'always_send' => $this->always_send ? __( 'Yes',
|
360 |
+
"defender-security" ) : __( 'No', "defender-security" ),
|
361 |
+
'recipients' => empty( $this->recipients ) ? __( 'No recipients',
|
362 |
+
"defender-security" ) : Utils::instance()->recipientsToString( $this->recipients ),
|
363 |
+
'frequency' => Utils::instance()->format_frequency_for_hub( $this->frequency, $this->day,
|
364 |
+
$this->time )
|
365 |
+
];
|
366 |
+
}
|
367 |
+
|
368 |
+
/**
|
369 |
+
* @return array
|
370 |
+
*/
|
371 |
+
public function export_strings( $configs ) {
|
372 |
+
$model = new Settings( 'wd_scan_settings',
|
373 |
+
WP_Helper::is_network_activate( wp_defender()->plugin_slug ) );
|
374 |
+
$model->import( $configs );
|
375 |
+
$strings = [];
|
376 |
+
if ( $this->is_any_active() ) {
|
377 |
+
$strings[] = __( 'Active', "defender-security" );
|
378 |
+
} else {
|
379 |
+
$strings[] = __( 'Inactive', "defender-security" );
|
380 |
+
}
|
381 |
+
|
382 |
+
if ( $model->notification ) {
|
383 |
+
$strings[] = __( 'Email notifications active', "defender-security" );
|
384 |
+
}
|
385 |
+
if ( $model->report && ! wp_defender()->isFree ) {
|
386 |
+
$strings[] = sprintf( __( 'Email reports sending %s', "defender-security" ),
|
387 |
+
Utils::instance()->frequencyToText( $model->frequency ) );
|
388 |
+
} elseif ( wp_defender()->isFree ) {
|
389 |
+
$strings[] = sprintf( __( 'Email report inactive %s', "defender-security" ),
|
390 |
+
'<span class="sui-tag sui-tag-pro">Pro</span>' );
|
391 |
+
}
|
392 |
+
|
393 |
+
return $strings;
|
394 |
+
}
|
395 |
+
|
396 |
+
public function is_any_active() {
|
397 |
+
if ( ! $this->scan_core && wp_defender()->isFree ) {
|
398 |
+
return false;
|
399 |
+
} elseif ( ( ! $this->scan_core && ! $this->scan_content && ! $this->scan_vuln ) && ! wp_defender()->isFree ) {
|
400 |
+
return false;
|
401 |
+
}
|
402 |
+
|
403 |
+
return true;
|
404 |
+
}
|
405 |
+
|
406 |
/**
|
407 |
* Define labels for settings key, we will use it for HUB
|
408 |
*
|
409 |
+
* @param null $key
|
410 |
*
|
411 |
* @return array|mixed
|
412 |
*/
|
413 |
public function labels( $key = null ) {
|
414 |
$labels = [
|
415 |
+
'scan_core' => __( "Scan WordPress Core", "defender-security" ),
|
416 |
+
'scan_vuln' => __( "Scan Plugins & Themes", "defender-security" ),
|
417 |
+
'scan_content' => __( "Scan Suspicious Code", "defender-security" ),
|
418 |
+
'max_filesize' => __( "Maximum included filesize", "defender-security" ),
|
419 |
+
'notification' => __( "Send scan completion email", "defender-security" ),
|
420 |
+
'always_send_notification' => __( "Send scan completion emails even if no issues are detected",
|
421 |
+
"defender-security" ),
|
422 |
+
'email_subject_issue' => __( "Email subject when an issue is found", "defender-security" ),
|
423 |
+
'email_subject' => __( "Email subject when no issues are found", "defender-security" ),
|
424 |
+
'email_has_issue' => __( "Email body when an issue is found", "defender-security" ),
|
425 |
+
'email_all_ok' => __( "Email body when no issues are found", "defender-security" ),
|
426 |
+
'recipients_notification' => __( "Scan completion email recipients", "defender-security" ),
|
427 |
+
|
428 |
+
'report' => __( "Send scheduled email reports", "defender-security" ),
|
429 |
+
'always_send' => __( "Send email report even if no issues are detected",
|
430 |
+
"defender-security" ),
|
431 |
+
'recipients' => __( "Scheduled email report recipients", "defender-security" ),
|
432 |
+
'frequency' => __( "Report Frequency", "defender-security" ),
|
433 |
+
|
434 |
];
|
435 |
if ( $key != null ) {
|
436 |
return isset( $labels[ $key ] ) ? $labels[ $key ] : null;
|
437 |
}
|
438 |
+
|
439 |
return $labels;
|
440 |
}
|
441 |
}
|
app/module/setting.php
CHANGED
@@ -11,7 +11,7 @@ use WP_Defender\Module\Setting\Controller\Rest;
|
|
11 |
|
12 |
class Setting extends Module {
|
13 |
public function __construct() {
|
14 |
-
new Main();
|
15 |
new Rest();
|
16 |
}
|
17 |
}
|
11 |
|
12 |
class Setting extends Module {
|
13 |
public function __construct() {
|
14 |
+
$this->addController( 'main', new Main() );
|
15 |
new Rest();
|
16 |
}
|
17 |
}
|
app/module/setting/component/backup-settings.php
CHANGED
@@ -6,12 +6,14 @@
|
|
6 |
namespace WP_Defender\Module\Setting\Component;
|
7 |
|
8 |
use WP_Defender\Behavior\Utils;
|
|
|
9 |
use WP_Defender\Module\Advanced_Tools\Model\Mask_Settings;
|
|
|
10 |
use WP_Defender\Module\Hardener\Model\Settings;
|
11 |
use WP_Defender\Module\Two_Factor\Model\Auth_Settings;
|
12 |
|
13 |
class Backup_Settings {
|
14 |
-
const KEY = 'defender_last_settings';
|
15 |
|
16 |
/**
|
17 |
* Gather settings from all modules
|
@@ -21,10 +23,19 @@ class Backup_Settings {
|
|
21 |
$security_tweaks = Settings::instance()->exportByKeys( [
|
22 |
'notification_repeat',
|
23 |
'receipts',
|
24 |
-
'notification'
|
|
|
|
|
|
|
|
|
|
|
25 |
] );
|
26 |
-
$
|
27 |
-
|
|
|
|
|
|
|
|
|
28 |
'scan_core',
|
29 |
'scan_vuln',
|
30 |
'scan_content',
|
@@ -54,6 +65,13 @@ class Backup_Settings {
|
|
54 |
'time',
|
55 |
'storage_days'
|
56 |
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
}
|
58 |
$iplockout_model = \WP_Defender\Module\IP_Lockout\Model\Settings::instance();
|
59 |
$iplockout = $iplockout_model->exportByKeys(
|
@@ -106,16 +124,284 @@ class Backup_Settings {
|
|
106 |
'security_tweaks' => $security_tweaks,
|
107 |
'scan' => $scan,
|
108 |
'iplockout' => $iplockout,
|
109 |
-
'advanced_tools' => $advanced_tools,
|
110 |
-
'settings' => $settings
|
111 |
];
|
112 |
if ( isset( $audit ) ) {
|
113 |
$ret['audit'] = $audit;
|
114 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
|
116 |
return $ret;
|
117 |
}
|
118 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
/**
|
120 |
* Backup the previous data before we process new versioon
|
121 |
*/
|
@@ -138,6 +424,7 @@ class Backup_Settings {
|
|
138 |
* @param $data
|
139 |
*/
|
140 |
public static function restoreData( $data ) {
|
|
|
141 |
foreach ( $data as $module => $module_data ) {
|
142 |
$model = self::moduleToModel( $module );
|
143 |
if ( is_object( $model ) ) {
|
@@ -148,37 +435,74 @@ class Backup_Settings {
|
|
148 |
}
|
149 |
$model->import( $module_data );
|
150 |
$model->save();
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
}
|
152 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
}
|
154 |
|
155 |
/**
|
156 |
* @return array
|
157 |
*/
|
158 |
-
public static function parseDataForHub() {
|
159 |
-
$configs
|
160 |
-
|
161 |
-
|
162 |
-
$
|
163 |
-
|
164 |
-
$labels = [];
|
165 |
foreach ( $configs as $module => $module_data ) {
|
166 |
-
$model
|
167 |
-
|
168 |
-
|
|
|
|
|
|
|
|
|
169 |
if ( $key == 'geoIP_db' ) {
|
170 |
continue;
|
171 |
}
|
172 |
$labels[ $module ]['value'][ $key ] = [
|
173 |
'name' => $model->labels( $key ),
|
174 |
-
'value' =>
|
175 |
];
|
176 |
}
|
|
|
177 |
}
|
178 |
|
179 |
return [
|
180 |
'configs' => $configs,
|
181 |
'labels' => $labels,
|
|
|
182 |
];
|
183 |
}
|
184 |
|
@@ -221,14 +545,17 @@ class Backup_Settings {
|
|
221 |
*
|
222 |
* @return Auth_Settings|Mask_Settings|\WP_Defender\Module\Audit\Model\Settings|Settings|\WP_Defender\Module\IP_Lockout\Model\Settings|\WP_Defender\Module\Scan\Model\Settings|\WP_Defender\Module\Setting\Model\Settings
|
223 |
*/
|
224 |
-
|
225 |
switch ( $module ) {
|
226 |
case 'security_tweaks':
|
227 |
return Settings::instance();
|
228 |
case 'scan':
|
229 |
return \WP_Defender\Module\Scan\Model\Settings::instance();
|
230 |
case 'audit':
|
231 |
-
|
|
|
|
|
|
|
232 |
case 'iplockout':
|
233 |
return \WP_Defender\Module\IP_Lockout\Model\Settings::instance();
|
234 |
case 'settings':
|
@@ -244,6 +571,29 @@ class Backup_Settings {
|
|
244 |
}
|
245 |
}
|
246 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
public static function resetSettings() {
|
248 |
$hardener_settings = \WP_Defender\Module\Hardener\Model\Settings::instance();
|
249 |
|
6 |
namespace WP_Defender\Module\Setting\Component;
|
7 |
|
8 |
use WP_Defender\Behavior\Utils;
|
9 |
+
use WP_Defender\Behavior\WPMUDEV;
|
10 |
use WP_Defender\Module\Advanced_Tools\Model\Mask_Settings;
|
11 |
+
use WP_Defender\Module\Advanced_Tools\Model\Security_Headers_Settings;
|
12 |
use WP_Defender\Module\Hardener\Model\Settings;
|
13 |
use WP_Defender\Module\Two_Factor\Model\Auth_Settings;
|
14 |
|
15 |
class Backup_Settings {
|
16 |
+
const KEY = 'defender_last_settings', INDEXER = 'defender_config_indexer';
|
17 |
|
18 |
/**
|
19 |
* Gather settings from all modules
|
23 |
$security_tweaks = Settings::instance()->exportByKeys( [
|
24 |
'notification_repeat',
|
25 |
'receipts',
|
26 |
+
'notification',
|
27 |
+
'data',
|
28 |
+
'fixed',
|
29 |
+
'issues',
|
30 |
+
'ignore',
|
31 |
+
'automate'
|
32 |
] );
|
33 |
+
if ( is_array( $security_tweaks['data'] ) && ! empty( $security_tweaks['data'] ) ) {
|
34 |
+
//$security_tweaks['data'] = array_merge( $security_tweaks['data'], Settings::instance()->export_extra() );
|
35 |
+
unset( $security_tweaks['data']['head_requests'] );
|
36 |
+
}
|
37 |
+
$scan_model = \WP_Defender\Module\Scan\Model\Settings::instance();
|
38 |
+
$scan = $scan_model->exportByKeys( [
|
39 |
'scan_core',
|
40 |
'scan_vuln',
|
41 |
'scan_content',
|
65 |
'time',
|
66 |
'storage_days'
|
67 |
] );
|
68 |
+
if ( wp_defender()->isFree ) {
|
69 |
+
$audit['enabled'] = false;
|
70 |
+
}
|
71 |
+
} else {
|
72 |
+
$audit = [
|
73 |
+
'enabled' => false
|
74 |
+
];
|
75 |
}
|
76 |
$iplockout_model = \WP_Defender\Module\IP_Lockout\Model\Settings::instance();
|
77 |
$iplockout = $iplockout_model->exportByKeys(
|
124 |
'security_tweaks' => $security_tweaks,
|
125 |
'scan' => $scan,
|
126 |
'iplockout' => $iplockout,
|
|
|
|
|
127 |
];
|
128 |
if ( isset( $audit ) ) {
|
129 |
$ret['audit'] = $audit;
|
130 |
}
|
131 |
+
$security_headers = Security_Headers_Settings::instance()->exportByKeys( [
|
132 |
+
'sh_xframe',
|
133 |
+
'sh_xframe_mode',
|
134 |
+
'sh_xframe_urls',
|
135 |
+
'sh_xss_protection',
|
136 |
+
'sh_xss_protection_mode',
|
137 |
+
'sh_content_type_options',
|
138 |
+
'sh_content_type_options_mode',
|
139 |
+
'sh_strict_transport',
|
140 |
+
'hsts_preload',
|
141 |
+
'include_subdomain',
|
142 |
+
'hsts_cache_duration',
|
143 |
+
'sh_referrer_policy',
|
144 |
+
'sh_referrer_policy_mode',
|
145 |
+
'sh_feature_policy',
|
146 |
+
'sh_feature_policy_mode',
|
147 |
+
'sh_feature_policy_urls'
|
148 |
+
] );
|
149 |
+
$ret = array_merge( $ret, [
|
150 |
+
'two_factor' => $advanced_tools['two_factor'],
|
151 |
+
'mask_login' => $advanced_tools['mask_login'],
|
152 |
+
'settings' => $settings,
|
153 |
+
'security_headers' => $security_headers
|
154 |
+
] );
|
155 |
|
156 |
return $ret;
|
157 |
}
|
158 |
|
159 |
+
/**
|
160 |
+
* @return array|object|null
|
161 |
+
*/
|
162 |
+
public static function getConfigs() {
|
163 |
+
$keys = get_site_option( self::INDEXER, false );
|
164 |
+
$results = [];
|
165 |
+
foreach ( $keys as $key ) {
|
166 |
+
$config = get_site_option( $key );
|
167 |
+
|
168 |
+
if ( $config === false ) {
|
169 |
+
self::removeIndex( $key );
|
170 |
+
} else {
|
171 |
+
$results[ $key ] = $config;
|
172 |
+
}
|
173 |
+
}
|
174 |
+
|
175 |
+
return $results;
|
176 |
+
}
|
177 |
+
|
178 |
+
public static function clearConfigs() {
|
179 |
+
$keys = get_site_option( self::INDEXER, false );
|
180 |
+
foreach ( $keys as $key ) {
|
181 |
+
delete_site_option( $key );
|
182 |
+
}
|
183 |
+
delete_site_option( self::INDEXER );
|
184 |
+
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Create a default config
|
188 |
+
*/
|
189 |
+
public static function maybeCreateDefaultConfig() {
|
190 |
+
$keys = get_site_option( self::INDEXER, false );
|
191 |
+
if ( $keys === false ) {
|
192 |
+
$key = 'wp_defender_config_default' . time();
|
193 |
+
if ( ! get_site_option( $key ) ) {
|
194 |
+
self::createProConfig();
|
195 |
+
}
|
196 |
+
}
|
197 |
+
}
|
198 |
+
|
199 |
+
private static function createProConfig() {
|
200 |
+
$user = wp_get_current_user();
|
201 |
+
$default_recipients = [
|
202 |
+
[
|
203 |
+
'first_name' => $user->display_name,
|
204 |
+
'email' => $user->user_email
|
205 |
+
]
|
206 |
+
];
|
207 |
+
|
208 |
+
$data = [
|
209 |
+
'security_tweaks' => [
|
210 |
+
'notification_repeat' => false,
|
211 |
+
'receipts' => $default_recipients,
|
212 |
+
'notification' => true,
|
213 |
+
'automate' => true,
|
214 |
+
],
|
215 |
+
'scan' => [
|
216 |
+
'scan_core' => true,
|
217 |
+
'scan_vuln' => true,
|
218 |
+
'scan_content' => true,
|
219 |
+
'max_filesize' => 3,
|
220 |
+
'report' => true,
|
221 |
+
'always_send' => false,
|
222 |
+
'recipients' => $default_recipients,
|
223 |
+
'day' => 'sunday',
|
224 |
+
'time' => '4:00',
|
225 |
+
'frequency' => '7',
|
226 |
+
'notification' => true,
|
227 |
+
'always_send_notification' => false,
|
228 |
+
'recipients_notification' => $default_recipients,
|
229 |
+
],
|
230 |
+
'audit' => [
|
231 |
+
'enabled' => true,
|
232 |
+
'notification' => true,
|
233 |
+
'receipts' => $default_recipients,
|
234 |
+
'frequency' => '7',
|
235 |
+
'day' => 'sunday',
|
236 |
+
'time' => '4:00',
|
237 |
+
'storage_days' => '6 months'
|
238 |
+
],
|
239 |
+
'iplockout' => [
|
240 |
+
'login_protection' => true,
|
241 |
+
'login_protection_login_attempt' => '5',
|
242 |
+
'login_protection_lockout_timeframe' => '300',
|
243 |
+
'login_protection_lockout_ban' => false,
|
244 |
+
'login_protection_lockout_duration' => '4',
|
245 |
+
'login_protection_lockout_duration_unit' => 'hours',
|
246 |
+
'login_protection_lockout_message' => __( 'You have been locked out due to too many invalid login attempts.',
|
247 |
+
"defender-security" ),
|
248 |
+
'username_blacklist' => 'admin',
|
249 |
+
'detect_404' => true,
|
250 |
+
'detect_404_threshold' => '20',
|
251 |
+
'detect_404_timeframe' => '300',
|
252 |
+
'detect_404_lockout_ban' => false,
|
253 |
+
'detect_404_lockout_duration' => '4',
|
254 |
+
'detect_404_lockout_duration_unit' => 'hours',
|
255 |
+
'detect_404_lockout_message' => __( 'You have been locked out due to too many attempts to access a file that doesn\'t exist.',
|
256 |
+
"defender-security" ),
|
257 |
+
'detect_404_blacklist' => '',
|
258 |
+
'detect_404_whitelist' => '',
|
259 |
+
'detect_404_filetypes_blacklist' => '',
|
260 |
+
'detect_404_ignored_filetypes' => ".css\n.js\n.jpg\n.png\n.gif",
|
261 |
+
'detect_404_logged' => true,
|
262 |
+
'ip_blacklist' => '',
|
263 |
+
'ip_whitelist' => Utils::instance()->getUserIp(),
|
264 |
+
'country_blacklist' => '',
|
265 |
+
'country_whitelist' => '',
|
266 |
+
'ip_lockout_message' => __( 'The administrator has blocked your IP from accessing this website.',
|
267 |
+
"defender-security" ),
|
268 |
+
'login_lockout_notification' => false,
|
269 |
+
'ip_lockout_notification' => false,
|
270 |
+
'receipts' => $default_recipients,
|
271 |
+
'cooldown_enabled' => false,
|
272 |
+
'cooldown_number_lockout' => '3',
|
273 |
+
'cooldown_period' => '24',
|
274 |
+
'report' => true,
|
275 |
+
'report_receipts' => $default_recipients,
|
276 |
+
'report_frequency' => 7,
|
277 |
+
'report_day' => 'sunday',
|
278 |
+
'report_time' => '4:00',
|
279 |
+
'storage_days' => '180',
|
280 |
+
],
|
281 |
+
'two_factor' => [
|
282 |
+
'enabled' => true,
|
283 |
+
'lost_phone' => true,
|
284 |
+
'force_auth' => false,
|
285 |
+
'force_auth_mess' => '',
|
286 |
+
'user_roles' => array_keys( get_editable_roles() ),
|
287 |
+
'force_auth_roles' => [],
|
288 |
+
'custom_graphic' => false,
|
289 |
+
],
|
290 |
+
'mask_login' => [
|
291 |
+
'mask_url ' => '',
|
292 |
+
'redirect_traffic' => false,
|
293 |
+
'redirect_traffic_url' => '',
|
294 |
+
'enabled' => false
|
295 |
+
],
|
296 |
+
'security_headers' => [
|
297 |
+
'sh_xframe' => true,
|
298 |
+
'sh_xframe_mode' => 'sameorigin',
|
299 |
+
'sh_xframe_urls' => '',
|
300 |
+
'sh_xss_protection' => true,
|
301 |
+
'sh_xss_protection_mode' => 'sanitize',
|
302 |
+
'sh_content_type_options' => true,
|
303 |
+
'sh_content_type_options_mode' => 'nosniff',
|
304 |
+
'sh_strict_transport' => true,
|
305 |
+
'hsts_preload' => false,
|
306 |
+
'include_subdomain' => false,
|
307 |
+
'hsts_cache_duration' => '30 days',
|
308 |
+
'sh_referrer_policy' => true,
|
309 |
+
'sh_referrer_policy_mode' => 'origin-when-cross-origin',
|
310 |
+
'sh_feature_policy' => true,
|
311 |
+
'sh_feature_policy_mode' => 'self',
|
312 |
+
'sh_feature_policy_urls' => ''
|
313 |
+
],
|
314 |
+
'settings' => [
|
315 |
+
'uninstall_data' => 'keep',
|
316 |
+
'uninstall_settings' => 'preserve'
|
317 |
+
]
|
318 |
+
];
|
319 |
+
|
320 |
+
$configs = self::parseDataForImport( $data );
|
321 |
+
$configs['name'] = __( 'Basic config', "defender-security" );
|
322 |
+
$configs['description'] = __( 'Recommended default protection for every site', "defender-security" );
|
323 |
+
$configs['immortal'] = true;
|
324 |
+
$key = 'wp_defender_config_' . sanitize_file_name( $configs['name'] ) . time();
|
325 |
+
update_site_option( $key, $configs );
|
326 |
+
self::indexKey( $key );
|
327 |
+
}
|
328 |
+
|
329 |
+
/**
|
330 |
+
* @param $configs
|
331 |
+
*
|
332 |
+
* @return string
|
333 |
+
*/
|
334 |
+
public static function buildConfigDescription( $configs ) {
|
335 |
+
$activated = 0;
|
336 |
+
$always_activated = [
|
337 |
+
'iplockout',
|
338 |
+
];
|
339 |
+
foreach ( $configs as $module => $settings ) {
|
340 |
+
if ( in_array( $module, $always_activated ) ) {
|
341 |
+
$activated += 1;
|
342 |
+
continue;
|
343 |
+
}
|
344 |
+
$model = self::moduleToModel( $module );
|
345 |
+
if ( ! is_object( $model ) ) {
|
346 |
+
continue;
|
347 |
+
}
|
348 |
+
$model->import( $settings );
|
349 |
+
|
350 |
+
switch ( $module ) {
|
351 |
+
case 'security_headers':
|
352 |
+
if ( $model->is_any_activated() ) {
|
353 |
+
$activated += 1;
|
354 |
+
}
|
355 |
+
break;
|
356 |
+
case 'mask_login':
|
357 |
+
if ( $model->isEnabled() ) {
|
358 |
+
$activated += 1;
|
359 |
+
}
|
360 |
+
break;
|
361 |
+
case 'two_factor':
|
362 |
+
if ( $model->enabled ) {
|
363 |
+
$activated += 1;
|
364 |
+
}
|
365 |
+
break;
|
366 |
+
case 'audit':
|
367 |
+
if ( $model->enabled && wp_defender()->isFree == false ) {
|
368 |
+
$activated += 1;
|
369 |
+
}
|
370 |
+
break;
|
371 |
+
case 'security_tweaks':
|
372 |
+
if ( ( is_array( $model->fixed ) && count( $model->fixed ) ) || $model->automate ) {
|
373 |
+
$activated += 1;
|
374 |
+
}
|
375 |
+
break;
|
376 |
+
case 'scan':
|
377 |
+
if ( $model->is_any_active() ) {
|
378 |
+
$activated += 1;
|
379 |
+
}
|
380 |
+
break;
|
381 |
+
}
|
382 |
+
}
|
383 |
+
|
384 |
+
return sprintf( __( '%d/%d modules active', "defender-security" ), $activated, count( $configs ) - 1 );
|
385 |
+
}
|
386 |
+
|
387 |
+
/**
|
388 |
+
* @param $key
|
389 |
+
*/
|
390 |
+
public static function indexKey( $key ) {
|
391 |
+
$keys = get_site_option( self::INDEXER, false );
|
392 |
+
$keys[] = $key;
|
393 |
+
update_site_option( self::INDEXER, $keys );
|
394 |
+
}
|
395 |
+
|
396 |
+
/**
|
397 |
+
* @param $key
|
398 |
+
*/
|
399 |
+
public static function removeIndex( $key ) {
|
400 |
+
$keys = get_site_option( self::INDEXER, false );
|
401 |
+
unset( $keys[ array_search( $key, $keys ) ] );
|
402 |
+
update_site_option( self::INDEXER, $keys );
|
403 |
+
}
|
404 |
+
|
405 |
/**
|
406 |
* Backup the previous data before we process new versioon
|
407 |
*/
|
424 |
* @param $data
|
425 |
*/
|
426 |
public static function restoreData( $data ) {
|
427 |
+
$need_reauth = false;
|
428 |
foreach ( $data as $module => $module_data ) {
|
429 |
$model = self::moduleToModel( $module );
|
430 |
if ( is_object( $model ) ) {
|
435 |
}
|
436 |
$model->import( $module_data );
|
437 |
$model->save();
|
438 |
+
if ( 'security_tweaks' === $module ) {
|
439 |
+
//there is some tweaks that require a re-login, if so, then we should output a message
|
440 |
+
//if combine with mask login, then we need to redirect to new URL
|
441 |
+
//the automate fucntion should return that
|
442 |
+
$need_reauth = $model->automate();
|
443 |
+
}
|
444 |
}
|
445 |
}
|
446 |
+
//we should disable quick setup
|
447 |
+
update_site_option( 'wp_defender_is_activated', 1 );
|
448 |
+
|
449 |
+
return $need_reauth;
|
450 |
+
}
|
451 |
+
|
452 |
+
public static function parseDataForImport( $configs = null ) {
|
453 |
+
if ( empty( $configs ) ) {
|
454 |
+
$configs = self::gatherData();
|
455 |
+
}
|
456 |
+
$strings = [];
|
457 |
+
foreach ( $configs as $module => $module_data ) {
|
458 |
+
$model = self::moduleToModel( $module );
|
459 |
+
if ( ! is_object( $model ) ) {
|
460 |
+
//in free, when audit not present
|
461 |
+
$strings[ $module ][] = sprintf( __( 'Inactive %s', "defender-security" ),
|
462 |
+
'<span class="sui-tag sui-tag-pro">Pro</span>' );
|
463 |
+
continue;
|
464 |
+
}
|
465 |
+
$strings[ $module ] = $model->export_strings( $module_data );
|
466 |
+
}
|
467 |
+
|
468 |
+
return [
|
469 |
+
'configs' => $configs,
|
470 |
+
'strings' => $strings
|
471 |
+
];
|
472 |
}
|
473 |
|
474 |
/**
|
475 |
* @return array
|
476 |
*/
|
477 |
+
public static function parseDataForHub( $configs = null ) {
|
478 |
+
if ( is_null( $configs ) ) {
|
479 |
+
$configs = self::gatherData();
|
480 |
+
}
|
481 |
+
$labels = [];
|
482 |
+
$strings = [];
|
|
|
483 |
foreach ( $configs as $module => $module_data ) {
|
484 |
+
$model = self::moduleToModel( $module );
|
485 |
+
if ( ! is_object( $model ) ) {
|
486 |
+
continue;
|
487 |
+
}
|
488 |
+
$labels[ $module ]['name'] = self::moduleToName( $module );
|
489 |
+
$model->import( $module_data );
|
490 |
+
foreach ( $model->format_hub_data() as $key => $value ) {
|
491 |
if ( $key == 'geoIP_db' ) {
|
492 |
continue;
|
493 |
}
|
494 |
$labels[ $module ]['value'][ $key ] = [
|
495 |
'name' => $model->labels( $key ),
|
496 |
+
'value' => $value
|
497 |
];
|
498 |
}
|
499 |
+
$strings[ $module ] = $model->export_strings( $configs );
|
500 |
}
|
501 |
|
502 |
return [
|
503 |
'configs' => $configs,
|
504 |
'labels' => $labels,
|
505 |
+
'strings' => $strings
|
506 |
];
|
507 |
}
|
508 |
|
545 |
*
|
546 |
* @return Auth_Settings|Mask_Settings|\WP_Defender\Module\Audit\Model\Settings|Settings|\WP_Defender\Module\IP_Lockout\Model\Settings|\WP_Defender\Module\Scan\Model\Settings|\WP_Defender\Module\Setting\Model\Settings
|
547 |
*/
|
548 |
+
public static function moduleToModel( $module ) {
|
549 |
switch ( $module ) {
|
550 |
case 'security_tweaks':
|
551 |
return Settings::instance();
|
552 |
case 'scan':
|
553 |
return \WP_Defender\Module\Scan\Model\Settings::instance();
|
554 |
case 'audit':
|
555 |
+
if ( class_exists( '\WP_Defender\Module\Audit\Model\Settings' ) ) {
|
556 |
+
return \WP_Defender\Module\Audit\Model\Settings::instance();
|
557 |
+
}
|
558 |
+
break;
|
559 |
case 'iplockout':
|
560 |
return \WP_Defender\Module\IP_Lockout\Model\Settings::instance();
|
561 |
case 'settings':
|
571 |
}
|
572 |
}
|
573 |
|
574 |
+
private static function moduleToName( $module ) {
|
575 |
+
switch ( $module ) {
|
576 |
+
case 'security_tweaks':
|
577 |
+
return __( 'Security Recommendations', "defender-security" );
|
578 |
+
case 'scan':
|
579 |
+
return __( 'Malware Scanning', "defender-security" );
|
580 |
+
case 'audit':
|
581 |
+
return __( 'Audit Logging', "defender-security" );
|
582 |
+
case 'iplockout':
|
583 |
+
return __( 'Firewall', "defender-security" );
|
584 |
+
case 'settings':
|
585 |
+
return __( 'Settings', "defender-security" );
|
586 |
+
case 'two_factor':
|
587 |
+
return __( '2FA', "defender-security" );
|
588 |
+
case 'mask_login':
|
589 |
+
return __( 'Mask Login Area', "defender-security" );
|
590 |
+
case 'security_headers':
|
591 |
+
return __( 'Security Headers', "defender-security" );
|
592 |
+
default:
|
593 |
+
break;
|
594 |
+
}
|
595 |
+
}
|
596 |
+
|
597 |
public static function resetSettings() {
|
598 |
$hardener_settings = \WP_Defender\Module\Hardener\Model\Settings::instance();
|
599 |
|
app/module/setting/controller/main.php
CHANGED
@@ -44,10 +44,11 @@ class Main extends Controller {
|
|
44 |
*/
|
45 |
public function adminMenu() {
|
46 |
$cap = is_multisite() ? 'manage_network_options' : 'manage_options';
|
47 |
-
add_submenu_page( 'wp-defender', esc_html__( "Settings", "defender-security" ),
|
48 |
-
|
49 |
-
|
50 |
-
|
|
|
51 |
}
|
52 |
|
53 |
public function actionIndex() {
|
@@ -84,8 +85,16 @@ class Main extends Controller {
|
|
84 |
return [];
|
85 |
}
|
86 |
$settings = Settings::instance();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
|
88 |
return [
|
|
|
89 |
'model' => [
|
90 |
'general' => $settings->exportByKeys( [
|
91 |
'translate',
|
@@ -101,7 +110,13 @@ class Main extends Controller {
|
|
101 |
],
|
102 |
'nonces' => [
|
103 |
'updateSettings' => wp_create_nonce( 'updateSettings' ),
|
104 |
-
'resetSettings' => wp_create_nonce( 'resetSettings' )
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
],
|
106 |
'endpoints' => $this->getAllAvailableEndpoints( Setting::getClassName() ),
|
107 |
'misc' => [
|
44 |
*/
|
45 |
public function adminMenu() {
|
46 |
$cap = is_multisite() ? 'manage_network_options' : 'manage_options';
|
47 |
+
add_submenu_page( 'wp-defender', esc_html__( "Settings", "defender-security" ),
|
48 |
+
esc_html__( "Settings", "defender-security" ), $cap, $this->slug, array(
|
49 |
+
&$this,
|
50 |
+
'actionIndex'
|
51 |
+
) );
|
52 |
}
|
53 |
|
54 |
public function actionIndex() {
|
85 |
return [];
|
86 |
}
|
87 |
$settings = Settings::instance();
|
88 |
+
Setting\Component\Backup_Settings::maybeCreateDefaultConfig();
|
89 |
+
$configs = Setting\Component\Backup_Settings::getConfigs();
|
90 |
+
|
91 |
+
foreach ( $configs as &$config ) {
|
92 |
+
//unset the data as we dont need it
|
93 |
+
unset( $config['configs'] );
|
94 |
+
}
|
95 |
|
96 |
return [
|
97 |
+
'configs' => $configs,
|
98 |
'model' => [
|
99 |
'general' => $settings->exportByKeys( [
|
100 |
'translate',
|
110 |
],
|
111 |
'nonces' => [
|
112 |
'updateSettings' => wp_create_nonce( 'updateSettings' ),
|
113 |
+
'resetSettings' => wp_create_nonce( 'resetSettings' ),
|
114 |
+
'newConfig' => wp_create_nonce( 'newConfig' ),
|
115 |
+
'updateConfig' => wp_create_nonce( 'updateConfig' ),
|
116 |
+
'applyConfig' => wp_create_nonce( 'applyConfig' ),
|
117 |
+
'deleteConfig' => wp_create_nonce( 'deleteConfig' ),
|
118 |
+
'downloadConfig' => wp_create_nonce( 'downloadConfig' ),
|
119 |
+
'importConfig' => wp_create_nonce( 'importConfig' ),
|
120 |
],
|
121 |
'endpoints' => $this->getAllAvailableEndpoints( Setting::getClassName() ),
|
122 |
'misc' => [
|
app/module/setting/controller/rest.php
CHANGED
@@ -9,6 +9,8 @@ namespace WP_Defender\Module\Setting\Controller;
|
|
9 |
use Hammer\Helper\HTTP_Helper;
|
10 |
use WP_Defender\Behavior\Utils;
|
11 |
use WP_Defender\Controller;
|
|
|
|
|
12 |
use WP_Defender\Module\Setting;
|
13 |
use WP_Defender\Module\Two_Factor\Model\Auth_Settings;
|
14 |
|
@@ -18,8 +20,13 @@ class Rest extends Controller {
|
|
18 |
$namespace .= '/settings';
|
19 |
$routes = [
|
20 |
$namespace . '/updateSettings' => 'updateSettings',
|
21 |
-
$namespace . '/resetSettings' => 'resetSettings'
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
23 |
];
|
24 |
$this->registerEndpoints( $routes, Setting::getClassName() );
|
25 |
}
|
@@ -65,12 +72,12 @@ class Rest extends Controller {
|
|
65 |
delete_option( 'wp_defender' );
|
66 |
delete_option( 'wd_db_version' );
|
67 |
delete_site_option( 'wd_db_version' );
|
68 |
-
|
69 |
delete_site_transient( 'wp_defender_free_is_activated' );
|
70 |
delete_site_transient( 'wp_defender_is_activated' );
|
71 |
delete_transient( 'wp_defender_free_is_activated' );
|
72 |
delete_transient( 'wp_defender_is_activated' );
|
73 |
-
|
74 |
delete_site_option( 'wp_defender_free_is_activated' );
|
75 |
delete_site_option( 'wp_defender_is_activated' );
|
76 |
delete_option( 'wp_defender_free_is_activated' );
|
@@ -105,6 +112,292 @@ class Rest extends Controller {
|
|
105 |
wp_send_json_success( $res );
|
106 |
}
|
107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
|
109 |
/**
|
110 |
* @return array
|
9 |
use Hammer\Helper\HTTP_Helper;
|
10 |
use WP_Defender\Behavior\Utils;
|
11 |
use WP_Defender\Controller;
|
12 |
+
use WP_Defender\Module\Advanced_Tools\Component\Mask_Api;
|
13 |
+
use WP_Defender\Module\Advanced_Tools\Model\Mask_Settings;
|
14 |
use WP_Defender\Module\Setting;
|
15 |
use WP_Defender\Module\Two_Factor\Model\Auth_Settings;
|
16 |
|
20 |
$namespace .= '/settings';
|
21 |
$routes = [
|
22 |
$namespace . '/updateSettings' => 'updateSettings',
|
23 |
+
$namespace . '/resetSettings' => 'resetSettings',
|
24 |
+
$namespace . '/newConfig' => 'newConfig',
|
25 |
+
$namespace . '/deleteConfig' => 'deleteConfig',
|
26 |
+
$namespace . '/updateConfig' => 'updateConfig',
|
27 |
+
$namespace . '/applyConfig' => 'applyConfig',
|
28 |
+
$namespace . '/downloadConfig' => 'downloadConfig',
|
29 |
+
$namespace . '/importConfig' => 'importConfig'
|
30 |
];
|
31 |
$this->registerEndpoints( $routes, Setting::getClassName() );
|
32 |
}
|
72 |
delete_option( 'wp_defender' );
|
73 |
delete_option( 'wd_db_version' );
|
74 |
delete_site_option( 'wd_db_version' );
|
75 |
+
|
76 |
delete_site_transient( 'wp_defender_free_is_activated' );
|
77 |
delete_site_transient( 'wp_defender_is_activated' );
|
78 |
delete_transient( 'wp_defender_free_is_activated' );
|
79 |
delete_transient( 'wp_defender_is_activated' );
|
80 |
+
|
81 |
delete_site_option( 'wp_defender_free_is_activated' );
|
82 |
delete_site_option( 'wp_defender_is_activated' );
|
83 |
delete_option( 'wp_defender_free_is_activated' );
|
112 |
wp_send_json_success( $res );
|
113 |
}
|
114 |
|
115 |
+
public function importConfig() {
|
116 |
+
if ( ! $this->checkPermission() ) {
|
117 |
+
return;
|
118 |
+
}
|
119 |
+
|
120 |
+
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'importConfig' ) ) {
|
121 |
+
return;
|
122 |
+
}
|
123 |
+
$file = $_FILES['file'];
|
124 |
+
$tmp = $file['tmp_name'];
|
125 |
+
$content = file_get_contents( $tmp );
|
126 |
+
$importer = json_decode( $content, true );
|
127 |
+
if ( ! is_array( $importer ) ) {
|
128 |
+
wp_send_json_error( [
|
129 |
+
'message' => __( 'The file is corrupted.', "defender-security" )
|
130 |
+
] );
|
131 |
+
}
|
132 |
+
|
133 |
+
if ( ! $this->validate_importer( $importer ) ) {
|
134 |
+
wp_send_json_error( [
|
135 |
+
'message' => __( 'The file is corrupted.', "defender-security" )
|
136 |
+
] );
|
137 |
+
}
|
138 |
+
|
139 |
+
//sanitize the files a bit
|
140 |
+
$name = strip_tags( $importer['name'] );
|
141 |
+
$configs = [
|
142 |
+
'name' => $name,
|
143 |
+
'immortal' => false
|
144 |
+
];
|
145 |
+
|
146 |
+
foreach ( $importer['configs'] as $slug => $module ) {
|
147 |
+
$model = Setting\Component\Backup_Settings::moduleToModel( $slug );
|
148 |
+
if ( ! is_object( $model ) ) {
|
149 |
+
//this cae it is audit on free
|
150 |
+
$configs['configs'][ $slug ] = [];
|
151 |
+
continue;
|
152 |
+
}
|
153 |
+
$model->import( $module );
|
154 |
+
if ( $slug === 'two_factor' ) {
|
155 |
+
/**
|
156 |
+
* Sometime, the custom image broken when import, when that happen, we will fallback
|
157 |
+
* into default image
|
158 |
+
*/
|
159 |
+
if ( empty( $model->custom_graphic_url ) ) {
|
160 |
+
//nothing here, surely it will cause broken, fall back to default
|
161 |
+
$model->custom_graphic_url = wp_defender()->getPluginUrl() . 'assets/img/2factor-disabled.svg';
|
162 |
+
} else {
|
163 |
+
//image should be under wp-content/.., so we catch that part
|
164 |
+
if ( preg_match( '/(\/wp-content\/.+)/', $model->custom_graphic_url, $matches ) ) {
|
165 |
+
$rel_path = $matches[1];
|
166 |
+
$rel_path = ltrim( $rel_path, '/' );
|
167 |
+
$abs_path = ABSPATH . $rel_path;
|
168 |
+
if ( ! file_exists( $abs_path ) ) {
|
169 |
+
//fallback
|
170 |
+
$model->custom_graphic_url = wp_defender()->getPluginUrl() . 'assets/img/2factor-disabled.svg';
|
171 |
+
} else {
|
172 |
+
//should replace with our site url
|
173 |
+
$model->custom_graphic_url = get_site_url( null, $rel_path );
|
174 |
+
}
|
175 |
+
}
|
176 |
+
}
|
177 |
+
}
|
178 |
+
$configs['configs'][ $slug ] = $model->exportByKeys( array_keys( $module ) );
|
179 |
+
}
|
180 |
+
$configs['description'] = Setting\Component\Backup_Settings::buildConfigDescription( $configs['configs'] );
|
181 |
+
$tmp = Setting\Component\Backup_Settings::parseDataForImport( $configs['configs'] );
|
182 |
+
$configs['strings'] = $tmp['strings'];
|
183 |
+
$key = 'wp_defender_config_' . sanitize_file_name( $name ) . time();
|
184 |
+
update_site_option( $key, $configs );
|
185 |
+
Setting\Component\Backup_Settings::indexKey( $key );
|
186 |
+
wp_send_json_success( [
|
187 |
+
'message' => sprintf( __( '<strong>%s</strong> config has been uploaded successfully – you can now apply it to this site.',
|
188 |
+
"defender-security" ),
|
189 |
+
$name ),
|
190 |
+
'configs' => Setting\Component\Backup_Settings::getConfigs()
|
191 |
+
] );
|
192 |
+
}
|
193 |
+
|
194 |
+
private function validate_importer( $importer ) {
|
195 |
+
if ( ! isset( $importer['name'] ) || ! isset( $importer['description'] ) ||
|
196 |
+
! isset( $importer['configs'] ) || ! isset( $importer['strings'] )
|
197 |
+
|| empty( $importer['name'] ) || empty( $importer['description'] ) || empty( $importer['strings'] )
|
198 |
+
) {
|
199 |
+
|
200 |
+
return false;
|
201 |
+
}
|
202 |
+
//validate content
|
203 |
+
//this is the current data, we use this for verify the schema
|
204 |
+
$sample = Setting\Component\Backup_Settings::gatherData();
|
205 |
+
foreach ( $importer['configs'] as $slug => $module ) {
|
206 |
+
//this is not in the sample, file is invalid
|
207 |
+
if ( ! isset( $sample[ $slug ] ) ) {
|
208 |
+
return false;
|
209 |
+
}
|
210 |
+
$keys = array_keys( $sample[ $slug ] );
|
211 |
+
|
212 |
+
$import_keys = array_keys( $module );
|
213 |
+
$diff = array_diff( $import_keys, $keys );
|
214 |
+
if ( count( $diff ) ) {
|
215 |
+
return false;
|
216 |
+
}
|
217 |
+
|
218 |
+
return true;
|
219 |
+
}
|
220 |
+
}
|
221 |
+
|
222 |
+
public function newConfig() {
|
223 |
+
if ( ! $this->checkPermission() ) {
|
224 |
+
return;
|
225 |
+
}
|
226 |
+
|
227 |
+
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'newConfig' ) ) {
|
228 |
+
return;
|
229 |
+
}
|
230 |
+
|
231 |
+
$name = trim( HTTP_Helper::retrievePost( 'name' ) );
|
232 |
+
if ( empty( $name ) ) {
|
233 |
+
wp_send_json_error( [
|
234 |
+
'message' => __( 'Invalid config name', "defender-security" )
|
235 |
+
] );
|
236 |
+
}
|
237 |
+
$name = strip_tags( $name );
|
238 |
+
$key = 'wp_defender_config_' . sanitize_file_name( $name ) . time();
|
239 |
+
$settings = Setting\Component\Backup_Settings::parseDataForImport();
|
240 |
+
$data = array_merge( [
|
241 |
+
'name' => $name,
|
242 |
+
'immortal' => false,
|
243 |
+
'description' => Setting\Component\Backup_Settings::buildConfigDescription( $settings['configs'] )
|
244 |
+
], $settings );
|
245 |
+
unset( $data['labels'] );
|
246 |
+
update_site_option( $key, $data );
|
247 |
+
Setting\Component\Backup_Settings::indexKey( $key );
|
248 |
+
wp_send_json_success( [
|
249 |
+
'message' => sprintf( __( '<strong>%s</strong> config saved successfully.', "defender-security" ),
|
250 |
+
$name ),
|
251 |
+
'configs' => Setting\Component\Backup_Settings::getConfigs()
|
252 |
+
] );
|
253 |
+
}
|
254 |
+
|
255 |
+
public function downloadConfig() {
|
256 |
+
if ( ! $this->checkPermission() ) {
|
257 |
+
return;
|
258 |
+
}
|
259 |
+
|
260 |
+
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'downloadConfig' ) ) {
|
261 |
+
return;
|
262 |
+
}
|
263 |
+
|
264 |
+
$key = trim( HTTP_Helper::retrieveGet( 'key' ) );
|
265 |
+
if ( empty( $key ) ) {
|
266 |
+
wp_send_json_error( [
|
267 |
+
'message' => __( 'Invalid config', "defender-security" )
|
268 |
+
] );
|
269 |
+
}
|
270 |
+
|
271 |
+
$config = get_site_option( $key );
|
272 |
+
if ( false === $config ) {
|
273 |
+
wp_send_json_error( [
|
274 |
+
'message' => __( 'Invalid config', "defender-security" )
|
275 |
+
] );
|
276 |
+
}
|
277 |
+
$sample = Setting\Component\Backup_Settings::gatherData();
|
278 |
+
foreach ( $sample as $slug => $data ) {
|
279 |
+
foreach ( $data as $key => $val ) {
|
280 |
+
if ( ! isset( $config['configs'][ $slug ][ $key ] ) ) {
|
281 |
+
$config['configs'][ $slug ][ $key ] = null;
|
282 |
+
}
|
283 |
+
}
|
284 |
+
}
|
285 |
+
$json = json_encode( $config );
|
286 |
+
$filename = 'wp-defender-config-' . sanitize_file_name( $config['name'] ) . '.json';
|
287 |
+
header( 'Content-disposition: attachment; filename=' . $filename );
|
288 |
+
header( 'Content-type: application/json' );
|
289 |
+
echo $json;
|
290 |
+
exit;
|
291 |
+
}
|
292 |
+
|
293 |
+
public function applyConfig() {
|
294 |
+
if ( ! $this->checkPermission() ) {
|
295 |
+
return;
|
296 |
+
}
|
297 |
+
|
298 |
+
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'applyConfig' ) ) {
|
299 |
+
return;
|
300 |
+
}
|
301 |
+
|
302 |
+
$key = trim( HTTP_Helper::retrievePost( 'key' ) );
|
303 |
+
if ( empty( $key ) ) {
|
304 |
+
wp_send_json_error( [
|
305 |
+
'message' => __( 'Invalid config', "defender-security" )
|
306 |
+
] );
|
307 |
+
}
|
308 |
+
|
309 |
+
$config = get_site_option( $key );
|
310 |
+
if ( false === $config ) {
|
311 |
+
wp_send_json_error( [
|
312 |
+
'message' => __( 'Invalid config', "defender-security" )
|
313 |
+
] );
|
314 |
+
}
|
315 |
+
|
316 |
+
$need_reauth = Setting\Component\Backup_Settings::restoreData( $config['configs'] );
|
317 |
+
$message = sprintf( __( '<strong>%s</strong> config has been applied successfully.',
|
318 |
+
"defender-security" ),
|
319 |
+
$config['name'] );
|
320 |
+
$return = [];
|
321 |
+
if ( $need_reauth ) {
|
322 |
+
$login_url = wp_login_url();
|
323 |
+
if ( Mask_Settings::instance()->isEnabled() ) {
|
324 |
+
$login_url = Mask_Api::getNewLoginUrl();
|
325 |
+
}
|
326 |
+
$message .= '<br/>' . sprintf( __( 'Because of some security tweaks get applied, You will now need to <a href="%s"><strong>re-login</strong></a>.<br/>This will auto reload now',
|
327 |
+
"defender-security" ), $login_url );
|
328 |
+
$return['reload'] = 3;
|
329 |
+
$redirect = urlencode( network_admin_url( 'admin.php?page=wdf-setting&view=configs' ) );
|
330 |
+
if ( HTTP_Helper::retrievePost( 'screen' ) === 'dashboard' ) {
|
331 |
+
$redirect = urlencode( network_admin_url( 'admin.php?page=wp-defender' ) );
|
332 |
+
}
|
333 |
+
$return['login_url'] = add_query_arg( 'redirect_to',
|
334 |
+
$redirect, $login_url );
|
335 |
+
}
|
336 |
+
|
337 |
+
$return['message'] = $message;
|
338 |
+
$return['configs'] = Setting\Component\Backup_Settings::getConfigs();
|
339 |
+
|
340 |
+
wp_send_json_success( $return );
|
341 |
+
}
|
342 |
+
|
343 |
+
public function updateConfig() {
|
344 |
+
if ( ! $this->checkPermission() ) {
|
345 |
+
return;
|
346 |
+
}
|
347 |
+
|
348 |
+
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'updateConfig' ) ) {
|
349 |
+
return;
|
350 |
+
}
|
351 |
+
|
352 |
+
$name = trim( HTTP_Helper::retrievePost( 'name' ) );
|
353 |
+
$key = trim( HTTP_Helper::retrievePost( 'key' ) );
|
354 |
+
if ( empty( $name ) || empty( $key ) ) {
|
355 |
+
wp_send_json_error( [
|
356 |
+
'message' => __( 'Invalid config', "defender-security" )
|
357 |
+
] );
|
358 |
+
}
|
359 |
+
|
360 |
+
$config = get_site_option( $key );
|
361 |
+
if ( false === $config ) {
|
362 |
+
wp_send_json_error( [
|
363 |
+
'message' => __( 'Invalid config', "defender-security" )
|
364 |
+
] );
|
365 |
+
}
|
366 |
+
|
367 |
+
$config['name'] = $name;
|
368 |
+
update_site_option( $key, $config );
|
369 |
+
wp_send_json_success( [
|
370 |
+
'message' => sprintf( __( '<strong>%s</strong> config saved successfully.', "defender-security" ),
|
371 |
+
$name ),
|
372 |
+
'configs' => Setting\Component\Backup_Settings::getConfigs()
|
373 |
+
] );
|
374 |
+
}
|
375 |
+
|
376 |
+
public function deleteConfig() {
|
377 |
+
if ( ! $this->checkPermission() ) {
|
378 |
+
return;
|
379 |
+
}
|
380 |
+
|
381 |
+
if ( ! wp_verify_nonce( HTTP_Helper::retrieveGet( '_wpnonce' ), 'deleteConfig' ) ) {
|
382 |
+
return;
|
383 |
+
}
|
384 |
+
|
385 |
+
$key = trim( HTTP_Helper::retrievePost( 'key' ) );
|
386 |
+
if ( empty( $key ) ) {
|
387 |
+
wp_send_json_error( [
|
388 |
+
'message' => __( 'Invalid config', "defender-security" )
|
389 |
+
] );
|
390 |
+
}
|
391 |
+
if ( strpos( $key, 'wp_defender_config' ) === 0 ) {
|
392 |
+
delete_site_option( $key );
|
393 |
+
wp_send_json_success( [
|
394 |
+
'configs' => Setting\Component\Backup_Settings::getConfigs()
|
395 |
+
] );
|
396 |
+
}
|
397 |
+
wp_send_json_error( [
|
398 |
+
'message' => __( 'Invalid config', "defender-security" )
|
399 |
+
] );
|
400 |
+
}
|
401 |
|
402 |
/**
|
403 |
* @return array
|
app/module/setting/model/settings.php
CHANGED
@@ -9,25 +9,25 @@ use Hammer\Helper\WP_Helper;
|
|
9 |
|
10 |
class Settings extends \Hammer\WP\Settings {
|
11 |
private static $_instance;
|
12 |
-
|
13 |
public $translate;
|
14 |
public $usage_tracking = false;
|
15 |
public $uninstall_data = 'keep';
|
16 |
public $uninstall_settings = 'preserve';
|
17 |
public $high_contrast_mode = false;
|
18 |
-
|
19 |
public function behaviors() {
|
20 |
return array(
|
21 |
'utils' => '\WP_Defender\Behavior\Utils'
|
22 |
);
|
23 |
}
|
24 |
-
|
25 |
public function __construct( $id, $is_multi ) {
|
26 |
parent::__construct( $id, $is_multi );
|
27 |
$this->high_contrast_mode = ! ! $this->high_contrast_mode;
|
28 |
$this->usage_tracking = ! ! $this->usage_tracking;
|
29 |
$site_locale = get_locale();
|
30 |
-
|
31 |
if ( 'en_US' === $site_locale ) {
|
32 |
$site_language = 'English';
|
33 |
} else {
|
@@ -37,32 +37,54 @@ class Settings extends \Hammer\WP\Settings {
|
|
37 |
}
|
38 |
$this->translate = $site_language;
|
39 |
}
|
40 |
-
|
41 |
/**
|
42 |
* @return Settings
|
43 |
*/
|
44 |
public static function instance() {
|
45 |
if ( is_null( self::$_instance ) ) {
|
46 |
-
$class = new Settings( 'wd_main_settings',
|
|
|
47 |
self::$_instance = $class;
|
48 |
}
|
49 |
-
|
50 |
return self::$_instance;
|
51 |
}
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
public function labels( $key = null ) {
|
54 |
$labels = [
|
55 |
-
'translate' => __( '
|
56 |
-
'usage_tracking' => __( "Usage Tracking", "defender-security" ),
|
57 |
-
'uninstall_data' => __( '
|
58 |
-
'uninstall_settings' => __( "
|
59 |
-
'high_contrast_mode' => __( "High Contrast Mode", "defender-security" ),
|
60 |
];
|
61 |
-
|
62 |
if ( $key != null ) {
|
63 |
return isset( $labels[ $key ] ) ? $labels[ $key ] : null;
|
64 |
}
|
65 |
-
|
66 |
return $labels;
|
67 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
}
|
9 |
|
10 |
class Settings extends \Hammer\WP\Settings {
|
11 |
private static $_instance;
|
12 |
+
|
13 |
public $translate;
|
14 |
public $usage_tracking = false;
|
15 |
public $uninstall_data = 'keep';
|
16 |
public $uninstall_settings = 'preserve';
|
17 |
public $high_contrast_mode = false;
|
18 |
+
|
19 |
public function behaviors() {
|
20 |
return array(
|
21 |
'utils' => '\WP_Defender\Behavior\Utils'
|
22 |
);
|
23 |
}
|
24 |
+
|
25 |
public function __construct( $id, $is_multi ) {
|
26 |
parent::__construct( $id, $is_multi );
|
27 |
$this->high_contrast_mode = ! ! $this->high_contrast_mode;
|
28 |
$this->usage_tracking = ! ! $this->usage_tracking;
|
29 |
$site_locale = get_locale();
|
30 |
+
|
31 |
if ( 'en_US' === $site_locale ) {
|
32 |
$site_language = 'English';
|
33 |
} else {
|
37 |
}
|
38 |
$this->translate = $site_language;
|
39 |
}
|
40 |
+
|
41 |
/**
|
42 |
* @return Settings
|
43 |
*/
|
44 |
public static function instance() {
|
45 |
if ( is_null( self::$_instance ) ) {
|
46 |
+
$class = new Settings( 'wd_main_settings',
|
47 |
+
WP_Helper::is_network_activate( wp_defender()->plugin_slug ) );
|
48 |
self::$_instance = $class;
|
49 |
}
|
50 |
+
|
51 |
return self::$_instance;
|
52 |
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* @return array
|
56 |
+
*/
|
57 |
+
public function export_strings() {
|
58 |
+
return [];
|
59 |
+
}
|
60 |
+
|
61 |
public function labels( $key = null ) {
|
62 |
$labels = [
|
63 |
+
'translate' => __( 'General - Translation', "defender-security" ),
|
64 |
+
'usage_tracking' => __( "General - Usage Tracking", "defender-security" ),
|
65 |
+
'uninstall_data' => __( 'Data & Settings - Uninstalling Data', "defender-security" ),
|
66 |
+
'uninstall_settings' => __( "Data & Settings - Uninstalling Settings", "defender-security" ),
|
67 |
+
'high_contrast_mode' => __( "Accessibility - High Contrast Mode", "defender-security" ),
|
68 |
];
|
69 |
+
|
70 |
if ( $key != null ) {
|
71 |
return isset( $labels[ $key ] ) ? $labels[ $key ] : null;
|
72 |
}
|
73 |
+
|
74 |
return $labels;
|
75 |
}
|
76 |
+
|
77 |
+
public function format_hub_data() {
|
78 |
+
return [
|
79 |
+
'translate' => $this->translate,
|
80 |
+
'usage_tracking' => $this->usage_tracking ? __( 'Activate', "defender-security" ) : __( 'Inactive',
|
81 |
+
"defender-security" ),
|
82 |
+
'uninstall_data' => $this->uninstall_data === 'keep' ? __( 'Keep Data',
|
83 |
+
"defender-security" ) : __( 'Delete Data', "defender-security" ),
|
84 |
+
'uninstall_settings' => $this->uninstall_settings === 'preserve' ? __( 'Preserve Settings',
|
85 |
+
"defender-security" ) : __( 'Delete Settings', "defender-security" ),
|
86 |
+
'high_contrast_mode' => $this->high_contrast_mode ? __( 'Activate', "defender-security" ) : __( 'Inactive',
|
87 |
+
"defender-security" ),
|
88 |
+
];
|
89 |
+
}
|
90 |
}
|
app/module/two-factor/model/auth-settings.php
CHANGED
@@ -22,7 +22,7 @@ class Auth_Settings extends \Hammer\WP\Settings {
|
|
22 |
public $email_subject = '';
|
23 |
public $email_sender = '';
|
24 |
public $email_body = '';
|
25 |
-
|
26 |
public function __construct( $id, $is_multi ) {
|
27 |
//fetch the userRoles
|
28 |
if ( ! function_exists( 'get_editable_roles' ) ) {
|
@@ -56,19 +56,20 @@ Administrator';
|
|
56 |
}
|
57 |
$this->force_auth_roles = array_values( $this->force_auth_roles );
|
58 |
}
|
59 |
-
|
60 |
/**
|
61 |
* @return Auth_Settings
|
62 |
*/
|
63 |
public static function instance() {
|
64 |
if ( is_null( self::$_instance ) ) {
|
65 |
-
$class = new Auth_Settings( 'wd_2auth_settings',
|
|
|
66 |
self::$_instance = $class;
|
67 |
}
|
68 |
-
|
69 |
return self::$_instance;
|
70 |
}
|
71 |
-
|
72 |
/**
|
73 |
* @param $plugin
|
74 |
*
|
@@ -80,10 +81,10 @@ Administrator';
|
|
80 |
} elseif ( in_array( '!' . $plugin, $this->is_conflict ) ) {
|
81 |
return false;
|
82 |
}
|
83 |
-
|
84 |
return 0;
|
85 |
}
|
86 |
-
|
87 |
/**
|
88 |
* @param $plugin
|
89 |
*/
|
@@ -93,7 +94,7 @@ Administrator';
|
|
93 |
$this->save();
|
94 |
}
|
95 |
}
|
96 |
-
|
97 |
/**
|
98 |
* @param $plugin
|
99 |
*/
|
@@ -106,10 +107,10 @@ Administrator';
|
|
106 |
}
|
107 |
$this->save();
|
108 |
}
|
109 |
-
|
110 |
public function events() {
|
111 |
$that = $this;
|
112 |
-
|
113 |
return array(
|
114 |
self::EVENT_AFTER_DELETED => array(
|
115 |
array(
|
@@ -122,7 +123,7 @@ Administrator';
|
|
122 |
)
|
123 |
);
|
124 |
}
|
125 |
-
|
126 |
/**
|
127 |
* Email default body.
|
128 |
*/
|
@@ -135,37 +136,67 @@ Copy and paste the passcode into the input field on the login screen to complete
|
|
135 |
|
136 |
Regards,
|
137 |
Administrator';
|
138 |
-
|
139 |
return $content;
|
140 |
}
|
141 |
-
|
142 |
/**
|
143 |
* Define labels for settings key, we will use it for HUB
|
144 |
*
|
145 |
-
* @param
|
146 |
*
|
147 |
* @return array|mixed
|
148 |
*/
|
149 |
public function labels( $key = null ) {
|
150 |
$labels = [
|
151 |
-
'enabled'
|
152 |
-
'user_roles'
|
153 |
-
'lost_phone'
|
154 |
-
'
|
155 |
-
'
|
156 |
-
'
|
157 |
-
'
|
158 |
-
'
|
159 |
-
'
|
160 |
-
'email_sender' => __( "Sender", "defender-security" ),
|
161 |
-
'email_body' => __( "Body", "defender-security" )
|
162 |
-
|
163 |
];
|
164 |
-
|
165 |
if ( $key != null ) {
|
166 |
return isset( $labels[ $key ] ) ? $labels[ $key ] : null;
|
167 |
}
|
168 |
-
|
169 |
return $labels;
|
170 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
}
|
22 |
public $email_subject = '';
|
23 |
public $email_sender = '';
|
24 |
public $email_body = '';
|
25 |
+
|
26 |
public function __construct( $id, $is_multi ) {
|
27 |
//fetch the userRoles
|
28 |
if ( ! function_exists( 'get_editable_roles' ) ) {
|
56 |
}
|
57 |
$this->force_auth_roles = array_values( $this->force_auth_roles );
|
58 |
}
|
59 |
+
|
60 |
/**
|
61 |
* @return Auth_Settings
|
62 |
*/
|
63 |
public static function instance() {
|
64 |
if ( is_null( self::$_instance ) ) {
|
65 |
+
$class = new Auth_Settings( 'wd_2auth_settings',
|
66 |
+
WP_Helper::is_network_activate( wp_defender()->plugin_slug ) );
|
67 |
self::$_instance = $class;
|
68 |
}
|
69 |
+
|
70 |
return self::$_instance;
|
71 |
}
|
72 |
+
|
73 |
/**
|
74 |
* @param $plugin
|
75 |
*
|
81 |
} elseif ( in_array( '!' . $plugin, $this->is_conflict ) ) {
|
82 |
return false;
|
83 |
}
|
84 |
+
|
85 |
return 0;
|
86 |
}
|
87 |
+
|
88 |
/**
|
89 |
* @param $plugin
|
90 |
*/
|
94 |
$this->save();
|
95 |
}
|
96 |
}
|
97 |
+
|
98 |
/**
|
99 |
* @param $plugin
|
100 |
*/
|
107 |
}
|
108 |
$this->save();
|
109 |
}
|
110 |
+
|
111 |
public function events() {
|
112 |
$that = $this;
|
113 |
+
|
114 |
return array(
|
115 |
self::EVENT_AFTER_DELETED => array(
|
116 |
array(
|
123 |
)
|
124 |
);
|
125 |
}
|
126 |
+
|
127 |
/**
|
128 |
* Email default body.
|
129 |
*/
|
136 |
|
137 |
Regards,
|
138 |
Administrator';
|
139 |
+
|
140 |
return $content;
|
141 |
}
|
142 |
+
|
143 |
/**
|
144 |
* Define labels for settings key, we will use it for HUB
|
145 |
*
|
146 |
+
* @param null $key
|
147 |
*
|
148 |
* @return array|mixed
|
149 |
*/
|
150 |
public function labels( $key = null ) {
|
151 |
$labels = [
|
152 |
+
'enabled' => __( 'Enable', "defender-security" ),
|
153 |
+
'user_roles' => __( "Enabled user roles", "defender-security" ),
|
154 |
+
'lost_phone' => __( 'Allow lost phone recovery option', "defender-security" ),
|
155 |
+
'email_subject' => __( "Subject", "defender-security" ),
|
156 |
+
'email_body' => __( "Body", "defender-security" ),
|
157 |
+
'email_sender' => __( "Sender", "defender-security" ),
|
158 |
+
'force_auth' => __( "Force 2FA on user roles", "defender-security" ),
|
159 |
+
'force_auth_mess' => __( "Force 2FA login warning message", "defender-security" ),
|
160 |
+
'custom_graphic' => __( "Use custom login branding graphic", "defender-security" ),
|
|
|
|
|
|
|
161 |
];
|
162 |
+
|
163 |
if ( $key != null ) {
|
164 |
return isset( $labels[ $key ] ) ? $labels[ $key ] : null;
|
165 |
}
|
166 |
+
|
167 |
return $labels;
|
168 |
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* @return array
|
172 |
+
*/
|
173 |
+
public function export_strings( $configs ) {
|
174 |
+
$class = new Auth_Settings( 'wd_2auth_settings',
|
175 |
+
WP_Helper::is_network_activate( wp_defender()->plugin_slug ) );
|
176 |
+
$class->import( $configs );
|
177 |
+
|
178 |
+
return [
|
179 |
+
$class->enabled ? __( 'Active', "defender-security" ) : __( 'Inactive', "defender-security" )
|
180 |
+
];
|
181 |
+
}
|
182 |
+
|
183 |
+
public function format_hub_data() {
|
184 |
+
return [
|
185 |
+
'enabled' => $this->enabled ? __( 'Active', "defender-security" ) : __( 'Inactivate',
|
186 |
+
"defender-security" ),
|
187 |
+
'user_roles' => empty( $this->user_roles ) ? __( 'Nonce', "defender-security" ) : implode( ', ',
|
188 |
+
$this->user_roles ),
|
189 |
+
'lost_phone' => $this->lost_phone ? __( 'Yes', "defender-security" ) : __( 'No',
|
190 |
+
"defender-security" ),
|
191 |
+
'email_subject' => $this->email_subject,
|
192 |
+
'email_body' => $this->email_body,
|
193 |
+
'email_sender' => $this->email_sender,
|
194 |
+
'force_auth' => empty( $this->force_auth_roles ) ? __( 'Nonce',
|
195 |
+
"defender-security" ) : implode( ', ',
|
196 |
+
$this->force_auth_roles ),
|
197 |
+
'force_auth_mess' => $this->force_auth_mess,
|
198 |
+
'custom_graphic' => ! ( $this->custom_graphic ) ? __( 'No',
|
199 |
+
"defender-security" ) : $this->custom_graphic_url
|
200 |
+
];
|
201 |
+
}
|
202 |
}
|
assets/app/advanced-tools.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t=window.webpackHotUpdate;window.webpackHotUpdate=function(e,s){!function(e,t){if(!x[e]||!y[e])return;for(var s in y[e]=!1,t)Object.prototype.hasOwnProperty.call(t,s)&&(p[s]=t[s]);0==--v&&0===g&&S()}(e,s),t&&t(e,s)};var s,i=!0,r="b39acf366faa9b224a1a",a={},o=[],n=[];function l(e){var t=P[e];if(!t)return $;var i=function(i){return t.hot.active?(P[i]?-1===P[i].parents.indexOf(e)&&P[i].parents.push(e):(o=[e],s=i),-1===t.children.indexOf(i)&&t.children.push(i)):(console.warn("[HMR] unexpected require("+i+") from disposed module "+e),o=[]),$(i)},r=function(e){return{configurable:!0,enumerable:!0,get:function(){return $[e]},set:function(t){$[e]=t}}};for(var a in $)Object.prototype.hasOwnProperty.call($,a)&&"e"!==a&&"t"!==a&&Object.defineProperty(i,a,r(a));return i.e=function(e){return"ready"===u&&_("prepare"),g++,$.e(e).then(t,(function(e){throw t(),e}));function t(){g--,"prepare"===u&&(b[e]||k(e),0===g&&0===v&&S())}},i.t=function(e,t){return 1&t&&(e=i(e)),$.t(e,-2&t)},i}function c(t){var i={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:s!==t,active:!0,accept:function(e,t){if(void 0===e)i._selfAccepted=!0;else if("function"==typeof e)i._selfAccepted=e;else if("object"==typeof e)for(var s=0;s<e.length;s++)i._acceptedDependencies[e[s]]=t||function(){};else i._acceptedDependencies[e]=t||function(){}},decline:function(e){if(void 0===e)i._selfDeclined=!0;else if("object"==typeof e)for(var t=0;t<e.length;t++)i._declinedDependencies[e[t]]=!0;else i._declinedDependencies[e]=!0},dispose:function(e){i._disposeHandlers.push(e)},addDisposeHandler:function(e){i._disposeHandlers.push(e)},removeDisposeHandler:function(e){var t=i._disposeHandlers.indexOf(e);t>=0&&i._disposeHandlers.splice(t,1)},invalidate:function(){switch(this._selfInvalidated=!0,u){case"idle":(p={})[t]=e[t],_("ready");break;case"ready":j(t);break;case"prepare":case"check":case"dispose":case"apply":(f=f||[]).push(t)}},check:C,apply:A,status:function(e){if(!e)return u;d.push(e)},addStatusHandler:function(e){d.push(e)},removeStatusHandler:function(e){var t=d.indexOf(e);t>=0&&d.splice(t,1)},data:a[t]};return s=void 0,i}var d=[],u="idle";function _(e){u=e;for(var t=0;t<d.length;t++)d[t].call(null,e)}var m,p,h,f,v=0,g=0,b={},y={},x={};function w(e){return+e+""===e?+e:e}function C(e){if("idle"!==u)throw new Error("check() is only allowed in idle status");return i=e,_("check"),(t=1e4,t=t||1e4,new Promise((function(e,s){if("undefined"==typeof XMLHttpRequest)return s(new Error("No browser support"));try{var i=new XMLHttpRequest,a=$.p+""+r+".hot-update.json";i.open("GET",a,!0),i.timeout=t,i.send(null)}catch(e){return s(e)}i.onreadystatechange=function(){if(4===i.readyState)if(0===i.status)s(new Error("Manifest request to "+a+" timed out."));else if(404===i.status)e();else if(200!==i.status&&304!==i.status)s(new Error("Manifest request to "+a+" failed."));else{try{var t=JSON.parse(i.responseText)}catch(e){return void s(e)}e(t)}}}))).then((function(e){if(!e)return _(T()?"ready":"idle"),null;y={},b={},x=e.c,h=e.h,_("prepare");var t=new Promise((function(e,t){m={resolve:e,reject:t}}));p={};return k(0),"prepare"===u&&0===g&&0===v&&S(),t}));var t}function k(e){x[e]?(y[e]=!0,v++,function(e){var t=document.createElement("script");t.charset="utf-8",t.src=$.p+""+e+"."+r+".hot-update.js",document.head.appendChild(t)}(e)):b[e]=!0}function S(){_("ready");var e=m;if(m=null,e)if(i)Promise.resolve().then((function(){return A(i)})).then((function(t){e.resolve(t)}),(function(t){e.reject(t)}));else{var t=[];for(var s in p)Object.prototype.hasOwnProperty.call(p,s)&&t.push(w(s));e.resolve(t)}}function A(t){if("ready"!==u)throw new Error("apply() is only allowed in ready status");return function t(i){var n,l,c,d,u;function m(e){for(var t=[e],s={},i=t.map((function(e){return{chain:[e],id:e}}));i.length>0;){var r=i.pop(),a=r.id,o=r.chain;if((d=P[a])&&(!d.hot._selfAccepted||d.hot._selfInvalidated)){if(d.hot._selfDeclined)return{type:"self-declined",chain:o,moduleId:a};if(d.hot._main)return{type:"unaccepted",chain:o,moduleId:a};for(var n=0;n<d.parents.length;n++){var l=d.parents[n],c=P[l];if(c){if(c.hot._declinedDependencies[a])return{type:"declined",chain:o.concat([l]),moduleId:a,parentId:l};-1===t.indexOf(l)&&(c.hot._acceptedDependencies[a]?(s[l]||(s[l]=[]),v(s[l],[a])):(delete s[l],t.push(l),i.push({chain:o.concat([l]),id:l})))}}}}return{type:"accepted",moduleId:e,outdatedModules:t,outdatedDependencies:s}}function v(e,t){for(var s=0;s<t.length;s++){var i=t[s];-1===e.indexOf(i)&&e.push(i)}}T();var g={},b=[],y={},C=function(){console.warn("[HMR] unexpected require("+S.moduleId+") to disposed module")};for(var k in p)if(Object.prototype.hasOwnProperty.call(p,k)){var S;u=w(k),S=p[k]?m(u):{type:"disposed",moduleId:k};var A=!1,j=!1,E=!1,O="";switch(S.chain&&(O="\nUpdate propagation: "+S.chain.join(" -> ")),S.type){case"self-declined":i.onDeclined&&i.onDeclined(S),i.ignoreDeclined||(A=new Error("Aborted because of self decline: "+S.moduleId+O));break;case"declined":i.onDeclined&&i.onDeclined(S),i.ignoreDeclined||(A=new Error("Aborted because of declined dependency: "+S.moduleId+" in "+S.parentId+O));break;case"unaccepted":i.onUnaccepted&&i.onUnaccepted(S),i.ignoreUnaccepted||(A=new Error("Aborted because "+u+" is not accepted"+O));break;case"accepted":i.onAccepted&&i.onAccepted(S),j=!0;break;case"disposed":i.onDisposed&&i.onDisposed(S),E=!0;break;default:throw new Error("Unexception type "+S.type)}if(A)return _("abort"),Promise.reject(A);if(j)for(u in y[u]=p[u],v(b,S.outdatedModules),S.outdatedDependencies)Object.prototype.hasOwnProperty.call(S.outdatedDependencies,u)&&(g[u]||(g[u]=[]),v(g[u],S.outdatedDependencies[u]));E&&(v(b,[S.moduleId]),y[u]=C)}var I,D=[];for(l=0;l<b.length;l++)u=b[l],P[u]&&P[u].hot._selfAccepted&&y[u]!==C&&!P[u].hot._selfInvalidated&&D.push({module:u,parents:P[u].parents.slice(),errorHandler:P[u].hot._selfAccepted});_("dispose"),Object.keys(x).forEach((function(e){!1===x[e]&&function(e){delete installedChunks[e]}(e)}));var H,R,N=b.slice();for(;N.length>0;)if(u=N.pop(),d=P[u]){var U={},L=d.hot._disposeHandlers;for(c=0;c<L.length;c++)(n=L[c])(U);for(a[u]=U,d.hot.active=!1,delete P[u],delete g[u],c=0;c<d.children.length;c++){var q=P[d.children[c]];q&&((I=q.parents.indexOf(u))>=0&&q.parents.splice(I,1))}}for(u in g)if(Object.prototype.hasOwnProperty.call(g,u)&&(d=P[u]))for(R=g[u],c=0;c<R.length;c++)H=R[c],(I=d.children.indexOf(H))>=0&&d.children.splice(I,1);_("apply"),void 0!==h&&(r=h,h=void 0);for(u in p=void 0,y)Object.prototype.hasOwnProperty.call(y,u)&&(e[u]=y[u]);var z=null;for(u in g)if(Object.prototype.hasOwnProperty.call(g,u)&&(d=P[u])){R=g[u];var M=[];for(l=0;l<R.length;l++)if(H=R[l],n=d.hot._acceptedDependencies[H]){if(-1!==M.indexOf(n))continue;M.push(n)}for(l=0;l<M.length;l++){n=M[l];try{n(R)}catch(e){i.onErrored&&i.onErrored({type:"accept-errored",moduleId:u,dependencyId:R[l],error:e}),i.ignoreErrored||z||(z=e)}}}for(l=0;l<D.length;l++){var V=D[l];u=V.module,o=V.parents,s=u;try{$(u)}catch(e){if("function"==typeof V.errorHandler)try{V.errorHandler(e)}catch(t){i.onErrored&&i.onErrored({type:"self-accept-error-handler-errored",moduleId:u,error:t,originalError:e}),i.ignoreErrored||z||(z=t),z||(z=e)}else i.onErrored&&i.onErrored({type:"self-accept-errored",moduleId:u,error:e}),i.ignoreErrored||z||(z=e)}}if(z)return _("fail"),Promise.reject(z);if(f)return t(i).then((function(e){return b.forEach((function(t){e.indexOf(t)<0&&e.push(t)})),e}));return _("idle"),new Promise((function(e){e(b)}))}(t=t||{})}function T(){if(f)return p||(p={}),f.forEach(j),f=void 0,!0}function j(t){Object.prototype.hasOwnProperty.call(p,t)||(p[t]=e[t])}var P={};function $(t){if(P[t])return P[t].exports;var s=P[t]={i:t,l:!1,exports:{},hot:c(t),parents:(n=o,o=[],n),children:[]};return e[t].call(s.exports,s,s.exports,l(t)),s.l=!0,s.exports}$.m=e,$.c=P,$.d=function(e,t,s){$.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},$.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},$.t=function(e,t){if(1&t&&(e=$(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if($.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)$.d(s,i,function(t){return e[t]}.bind(null,i));return s},$.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return $.d(t,"a",t),t},$.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},$.p="",$.h=function(){return r},l("./src/advanced-tools.js")($.s="./src/advanced-tools.js")}({"./node_modules/cssfilter/lib/css.js":function(e,t,s){var i=s("./node_modules/cssfilter/lib/default.js"),r=s("./node_modules/cssfilter/lib/parser.js");s("./node_modules/cssfilter/lib/util.js");function a(e){return null==e}function o(e){(e=function(e){var t={};for(var s in e)t[s]=e[s];return t}(e||{})).whiteList=e.whiteList||i.whiteList,e.onAttr=e.onAttr||i.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||i.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||i.safeAttrValue,this.options=e}o.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this.options,s=t.whiteList,i=t.onAttr,o=t.onIgnoreAttr,n=t.safeAttrValue;return r(e,(function(e,t,r,l,c){var d=s[r],u=!1;if(!0===d?u=d:"function"==typeof d?u=d(l):d instanceof RegExp&&(u=d.test(l)),!0!==u&&(u=!1),l=n(r,l)){var _,m={position:t,sourcePosition:e,source:c,isWhite:u};return u?a(_=i(r,l,m))?r+":"+l:_:a(_=o(r,l,m))?void 0:_}}))},e.exports=o},"./node_modules/cssfilter/lib/default.js":function(e,t){function s(){var e={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return e}var i=/javascript\s*\:/gim;t.whiteList=s(),t.getDefaultWhiteList=s,t.onAttr=function(e,t,s){},t.onIgnoreAttr=function(e,t,s){},t.safeAttrValue=function(e,t){return i.test(t)?"":t}},"./node_modules/cssfilter/lib/index.js":function(e,t,s){var i=s("./node_modules/cssfilter/lib/default.js"),r=s("./node_modules/cssfilter/lib/css.js");for(var a in(t=e.exports=function(e,t){return new r(t).process(e)}).FilterCSS=r,i)t[a]=i[a];"undefined"!=typeof window&&(window.filterCSS=e.exports)},"./node_modules/cssfilter/lib/parser.js":function(e,t,s){var i=s("./node_modules/cssfilter/lib/util.js");e.exports=function(e,t){";"!==(e=i.trimRight(e))[e.length-1]&&(e+=";");var s=e.length,r=!1,a=0,o=0,n="";function l(){if(!r){var s=i.trim(e.slice(a,o)),l=s.indexOf(":");if(-1!==l){var c=i.trim(s.slice(0,l)),d=i.trim(s.slice(l+1));if(c){var u=t(a,n.length,c,d,s);u&&(n+=u+"; ")}}}a=o+1}for(;o<s;o++){var c=e[o];if("/"===c&&"*"===e[o+1]){var d=e.indexOf("*/",o+2);if(-1===d)break;a=(o=d+1)+1,r=!1}else"("===c?r=!0:")"===c?r=!1:";"===c?r||l():"\n"===c&&l()}return i.trim(n)}},"./node_modules/cssfilter/lib/util.js":function(e,t){e.exports={indexOf:function(e,t){var s,i;if(Array.prototype.indexOf)return e.indexOf(t);for(s=0,i=e.length;s<i;s++)if(e[s]===t)return s;return-1},forEach:function(e,t,s){var i,r;if(Array.prototype.forEach)return e.forEach(t,s);for(i=0,r=e.length;i<r;i++)t.call(s,e[i],i,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}}},"./node_modules/vue-loader/lib/runtime/componentNormalizer.js":function(e,t,s){"use strict";function i(e,t,s,i,r,a,o,n){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=s,c._compiled=!0),i&&(c.functional=!0),a&&(c._scopeId="data-v-"+a),o?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},c._ssrRegister=l):r&&(l=n?function(){r.call(this,this.$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(e,t){return l.call(t),d(e,t)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:e,options:c}}s.d(t,"a",(function(){return i}))},"./node_modules/xss/lib/default.js":function(e,t,s){var i=s("./node_modules/cssfilter/lib/index.js").FilterCSS,r=s("./node_modules/cssfilter/lib/index.js").getDefaultWhiteList,a=s("./node_modules/xss/lib/util.js");function o(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]}}var n=new i;function l(e){return e.replace(c,"<").replace(d,">")}var c=/</g,d=/>/g,u=/"/g,_=/"/g,m=/&#([a-zA-Z0-9]*);?/gim,p=/:?/gim,h=/&newline;?/gim,f=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,v=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,g=/u\s*r\s*l\s*\(.*/gi;function b(e){return e.replace(u,""")}function y(e){return e.replace(_,'"')}function x(e){return e.replace(m,(function(e,t){return"x"===t[0]||"X"===t[0]?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))}))}function w(e){return e.replace(p,":").replace(h," ")}function C(e){for(var t="",s=0,i=e.length;s<i;s++)t+=e.charCodeAt(s)<32?" ":e.charAt(s);return a.trim(t)}function k(e){return e=C(e=w(e=x(e=y(e))))}function S(e){return e=l(e=b(e))}var A=/<!--[\s\S]*?-->/g;t.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]},t.getDefaultWhiteList=o,t.onTag=function(e,t,s){},t.onIgnoreTag=function(e,t,s){},t.onTagAttr=function(e,t,s){},t.onIgnoreTagAttr=function(e,t,s){},t.safeAttrValue=function(e,t,s,i){if(s=k(s),"href"===t||"src"===t){if("#"===(s=a.trim(s)))return"#";if("http://"!==s.substr(0,7)&&"https://"!==s.substr(0,8)&&"mailto:"!==s.substr(0,7)&&"tel:"!==s.substr(0,4)&&"#"!==s[0]&&"/"!==s[0])return""}else if("background"===t){if(f.lastIndex=0,f.test(s))return""}else if("style"===t){if(v.lastIndex=0,v.test(s))return"";if(g.lastIndex=0,g.test(s)&&(f.lastIndex=0,f.test(s)))return"";!1!==i&&(s=(i=i||n).process(s))}return s=S(s)},t.escapeHtml=l,t.escapeQuote=b,t.unescapeQuote=y,t.escapeHtmlEntities=x,t.escapeDangerHtml5Entities=w,t.clearNonPrintableCharacter=C,t.friendlyAttrValue=k,t.escapeAttrValue=S,t.onIgnoreTagStripAll=function(){return""},t.StripTagBody=function(e,t){"function"!=typeof t&&(t=function(){});var s=!Array.isArray(e),i=[],r=!1;return{onIgnoreTag:function(o,n,l){if(function(t){return!!s||-1!==a.indexOf(e,t)}(o)){if(l.isClosing){var c="[/removed]",d=l.position+c.length;return i.push([!1!==r?r:l.position,d]),r=!1,c}return r||(r=l.position),"[removed]"}return t(o,n,l)},remove:function(e){var t="",s=0;return a.forEach(i,(function(i){t+=e.slice(s,i[0]),s=i[1]})),t+=e.slice(s)}}},t.stripCommentTag=function(e){return e.replace(A,"")},t.stripBlankChar=function(e){var t=e.split("");return(t=t.filter((function(e){var t=e.charCodeAt(0);return 127!==t&&(!(t<=31)||(10===t||13===t))}))).join("")},t.cssFilter=n,t.getDefaultCSSWhiteList=r},"./node_modules/xss/lib/index.js":function(e,t,s){var i=s("./node_modules/xss/lib/default.js"),r=s("./node_modules/xss/lib/parser.js"),a=s("./node_modules/xss/lib/xss.js");function o(e,t){return new a(t).process(e)}for(var n in(t=e.exports=o).filterXSS=o,t.FilterXSS=a,i)t[n]=i[n];for(var n in r)t[n]=r[n];"undefined"!=typeof window&&(window.filterXSS=e.exports),"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=e.exports)},"./node_modules/xss/lib/parser.js":function(e,t,s){var i=s("./node_modules/xss/lib/util.js");function r(e){var t=i.spaceIndex(e);if(-1===t)var s=e.slice(1,-1);else s=e.slice(1,t+1);return"/"===(s=i.trim(s).toLowerCase()).slice(0,1)&&(s=s.slice(1)),"/"===s.slice(-1)&&(s=s.slice(0,-1)),s}function a(e){return"</"===e.slice(0,2)}var o=/[^a-zA-Z0-9_:\.\-]/gim;function n(e,t){for(;t<e.length;t++){var s=e[t];if(" "!==s)return"="===s?t:-1}}function l(e,t){for(;t>0;t--){var s=e[t];if(" "!==s)return"="===s?t:-1}}function c(e){return function(e){return'"'===e[0]&&'"'===e[e.length-1]||"'"===e[0]&&"'"===e[e.length-1]}(e)?e.substr(1,e.length-2):e}t.parseTag=function(e,t,s){var i="",o=0,n=!1,l=!1,c=0,d=e.length,u="",_="";for(c=0;c<d;c++){var m=e.charAt(c);if(!1===n){if("<"===m){n=c;continue}}else if(!1===l){if("<"===m){i+=s(e.slice(o,c)),n=c,o=c;continue}if(">"===m){i+=s(e.slice(o,n)),u=r(_=e.slice(n,c+1)),i+=t(n,i.length,u,_,a(_)),o=c+1,n=!1;continue}if(('"'===m||"'"===m)&&"="===e.charAt(c-1)){l=m;continue}}else if(m===l){l=!1;continue}}return o<e.length&&(i+=s(e.substr(o))),i},t.parseAttr=function(e,t){var s=0,r=[],a=!1,d=e.length;function u(e,s){if(!((e=(e=i.trim(e)).replace(o,"").toLowerCase()).length<1)){var a=t(e,s||"");a&&r.push(a)}}for(var _=0;_<d;_++){var m,p=e.charAt(_);if(!1!==a||"="!==p)if(!1===a||_!==s||'"'!==p&&"'"!==p||"="!==e.charAt(_-1))if(/\s|\n|\t/.test(p)){if(e=e.replace(/\s|\n|\t/g," "),!1===a){if(-1===(m=n(e,_))){u(i.trim(e.slice(s,_))),a=!1,s=_+1;continue}_=m-1;continue}if(-1===(m=l(e,_-1))){u(a,c(i.trim(e.slice(s,_)))),a=!1,s=_+1;continue}}else;else{if(-1===(m=e.indexOf(p,_+1)))break;u(a,i.trim(e.slice(s+1,m))),a=!1,s=(_=m)+1}else a=e.slice(s,_),s=_+1}return s<e.length&&(!1===a?u(e.slice(s)):u(a,c(i.trim(e.slice(s))))),i.trim(r.join(" "))}},"./node_modules/xss/lib/util.js":function(e,t){e.exports={indexOf:function(e,t){var s,i;if(Array.prototype.indexOf)return e.indexOf(t);for(s=0,i=e.length;s<i;s++)if(e[s]===t)return s;return-1},forEach:function(e,t,s){var i,r;if(Array.prototype.forEach)return e.forEach(t,s);for(i=0,r=e.length;i<r;i++)t.call(s,e[i],i,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/.exec(e);return t?t.index:-1}}},"./node_modules/xss/lib/xss.js":function(e,t,s){var i=s("./node_modules/cssfilter/lib/index.js").FilterCSS,r=s("./node_modules/xss/lib/default.js"),a=s("./node_modules/xss/lib/parser.js"),o=a.parseTag,n=a.parseAttr,l=s("./node_modules/xss/lib/util.js");function c(e){return null==e}function d(e){(e=function(e){var t={};for(var s in e)t[s]=e[s];return t}(e||{})).stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=r.onIgnoreTagStripAll),e.whiteList=e.whiteList||r.whiteList,e.onTag=e.onTag||r.onTag,e.onTagAttr=e.onTagAttr||r.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||r.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||r.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||r.safeAttrValue,e.escapeHtml=e.escapeHtml||r.escapeHtml,this.options=e,!1===e.css?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new i(e.css))}d.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this.options,s=t.whiteList,i=t.onTag,a=t.onIgnoreTag,d=t.onTagAttr,u=t.onIgnoreTagAttr,_=t.safeAttrValue,m=t.escapeHtml,p=this.cssFilter;t.stripBlankChar&&(e=r.stripBlankChar(e)),t.allowCommentTag||(e=r.stripCommentTag(e));var h=!1;if(t.stripIgnoreTagBody){h=r.StripTagBody(t.stripIgnoreTagBody,a);a=h.onIgnoreTag}var f=o(e,(function(e,t,r,o,h){var f,v={sourcePosition:e,position:t,isClosing:h,isWhite:s.hasOwnProperty(r)};if(!c(f=i(r,o,v)))return f;if(v.isWhite){if(v.isClosing)return"</"+r+">";var g=function(e){var t=l.spaceIndex(e);if(-1===t)return{html:"",closing:"/"===e[e.length-2]};var s="/"===(e=l.trim(e.slice(t+1,-1)))[e.length-1];return s&&(e=l.trim(e.slice(0,-1))),{html:e,closing:s}}(o),b=s[r],y=n(g.html,(function(e,t){var s,i=-1!==l.indexOf(b,e);return c(s=d(r,e,t,i))?i?(t=_(r,e,t,p))?e+'="'+t+'"':e:c(s=u(r,e,t,i))?void 0:s:s}));o="<"+r;return y&&(o+=" "+y),g.closing&&(o+=" /"),o+=">"}return c(f=a(r,o,v))?m(o):f}),m);return h&&(f=h.remove(f)),f},e.exports=d},"./src/advanced-tools.js":function(e,t,s){"use strict";s.r(t);var i=s("vue"),r=s.n(i),a=s("./src/helper/base_hepler.js"),o={mixins:[a.a],name:"mask-login",data:function(){return{misc:advanced_tools.misc,model:advanced_tools.model.mask_login,nonces:advanced_tools.nonces,endpoints:advanced_tools.endpoints,state:{on_saving:!1,original_state:!1}}},watch:{"model.mask_url":function(e){e=this.convertToSlug(e),this.model.mask_url=e,this.misc.new_login_url=this.misc.home_url+e,this.state.waiting_save=!0},"model.redirect_traffic_url":function(e){e=this.convertToSlug(e),this.model.redirect_traffic_url=e,this.misc.login_redirect_url=this.misc.home_url+e}},mounted:function(){this.state.original_state=this.model.mask_url.length>0},methods:{toggle:function(e){var t=this,s={};s.enabled=e,this.httpPostRequest("updateSettings",{data:JSON.stringify({settings:s,module:"mask-login"})},(function(){t.model.enabled=e}))},updateSettings:function(){var e=this.model,t=this;this.httpPostRequest("updateSettings",{data:JSON.stringify({settings:e,module:"mask-login"})},(function(){t.state.original_state=t.model.mask_url.length>0}))},convertToSlug:function(e){return e.toLowerCase().replace(/[^\w-/.]+/g,"")}},computed:{new_mask_login:function(){return this.misc.new_login_url},login_redirect_url:function(){return this.misc.login_redirect_url}}},n=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),l=Object(n.a)(o,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return!1===e.model.enabled?s("div",{staticClass:"sui-box",attrs:{id:"mask-login"}},[s("div",{staticClass:"sui-box-header"},[s("h3",{staticClass:"sui-box-title"},[e._v("\n\t\t\t\t"+e._s(e.__("Mask Login Area"))+"\n\t\t\t")])]),e._v(" "),s("div",{staticClass:"sui-message"},[e.maybeHideBranding()?e._e():s("img",{staticClass:"sui-image",attrs:{src:e.assetUrl("assets/img/2factor-disabled.svg"),"aria-hidden":"true"}}),e._v(" "),s("div",{staticClass:"sui-message-content"},[s("p",[e._v("\n\t\t\t\t\t"+e._s(e.__("Change the location of WordPress's default login area, making it harder for automated bots to find and also more convenient for your users."))+"\n\t\t\t\t")]),e._v(" "),s("form",{attrs:{method:"post"}},[s("submit-button",{attrs:{type:"button","css-class":"sui-button-blue activate",state:e.state},on:{click:function(t){return e.toggle(!0)}}},[e._v("\n\t\t\t\t\t\t"+e._s(e.__("Activate"))+"\n\t\t\t\t\t")])],1)])])]):s("div",{staticClass:"sui-box",attrs:{id:"mask-login"}},[s("div",{staticClass:"sui-box-header"},[s("h3",{staticClass:"sui-box-title"},[e._v("\n\t\t\t\t"+e._s(e.__("Mask Login Area"))+"\n\t\t\t")])]),e._v(" "),s("form",{attrs:{method:"post"},on:{submit:function(t){return t.preventDefault(),e.updateSettings(t)}}},[s("div",{staticClass:"sui-box-body"},[s("p",[e._v("\n\t\t\t\t\t"+e._s(e.__("Change your default WordPress login URL to hide your login area from hackers and bots."))+"\n\t\t\t\t")]),e._v(" "),!1!==e.misc.compatibility?s("div",{staticClass:"sui-notice sui-notice-error"},[s("div",{staticClass:"sui-notice-content"},[s("div",{staticClass:"sui-notice-message"},[s("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),e._v(" "),s("p",e._l(e.misc.compatibility,(function(t){return s("span",[e._v("\n "+e._s(t)+"\n ")])})),0)])])]):e._e(),e._v(" "),!1===e.state.original_state?s("div",{staticClass:"sui-notice sui-notice-warning"},[s("div",{staticClass:"sui-notice-content"},[s("div",{staticClass:"sui-notice-message"},[s("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),e._v(" "),s("p",[e._v("\n\t\t\t\t\t\t"+e._s(e.__("Masking is currently inactive. Choose your URL and save your settings to finish setup."))+"\n\t\t\t\t\t")])])])]):s("div",{staticClass:"sui-notice sui-notice-info"},[s("div",{staticClass:"sui-notice-content"},[s("div",{staticClass:"sui-notice-message"},[s("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),e._v(" "),s("p",[e._v("\n\t\t\t\t\t\t"+e._s(e.__("Masking is currently active at "))+" "),s("strong",{domProps:{textContent:e._s(e.misc.new_login_url)}})])])])]),e._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[e._v("\n "+e._s(e.__("Masking URL"))+"\n ")]),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n "+e._s(e.__("Choose the new URL slug where users of your website will now navigate to log in or register."))+"\n ")])]),e._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("span",{staticClass:"sui-description"},[e._v("\n "+e._s(e.__("You can specify any URLs. For security reasons, less obvious URLs are recommended as they are harder for bots to guess."))+"\n ")]),e._v(" "),s("div",{staticClass:"sui-form-field"},[s("label",{staticClass:"sui-label"},[e._v("\n\t\t\t\t\t\t\t\t"+e._s(e.__("New Login URL"))+"\n\t\t\t\t\t\t\t")]),e._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.mask_url,expression:"model.mask_url"}],staticClass:"sui-form-control",attrs:{type:"text",name:"mask_url",placeholder:"E.g. dashboard"},domProps:{value:e.model.mask_url},on:{input:function(t){t.target.composing||e.$set(e.model,"mask_url",t.target.value)}}}),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n "+e._s(e.__("Users will login at"))+" "),s("a",{attrs:{href:e.new_mask_login}},[e._v(e._s(e.new_mask_login))]),e._v(". "+e._s(e.__("Note: Registration and Password Reset emails have hardcoded URLs in them. We will update them automatically to match your new login URL"))+"\n ")])])])]),e._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[e._v("\n "+e._s(e.__("Redirect traffic"))+"\n ")]),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n "+e._s(e.__("With this feature you can send visitors and bots who try to visit the default Wordpress login URLs to a separate URL to avoid 404s."))+"\n ")])]),e._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("label",{staticClass:"sui-toggle"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.redirect_traffic,expression:"model.redirect_traffic"}],staticClass:"toggle-checkbox",attrs:{role:"presentation",type:"checkbox",name:"redirect_traffic",id:"redirect_traffic","true-value":!0,"false-value":!1},domProps:{checked:Array.isArray(e.model.redirect_traffic)?e._i(e.model.redirect_traffic,null)>-1:e.model.redirect_traffic},on:{change:function(t){var s=e.model.redirect_traffic,i=t.target,r=!!i.checked;if(Array.isArray(s)){var a=e._i(s,null);i.checked?a<0&&e.$set(e.model,"redirect_traffic",s.concat([null])):a>-1&&e.$set(e.model,"redirect_traffic",s.slice(0,a).concat(s.slice(a+1)))}else e.$set(e.model,"redirect_traffic",r)}}}),e._v(" "),s("span",{staticClass:"sui-toggle-slider"})]),e._v(" "),s("label",{staticClass:"sui-toggle-label",attrs:{for:"redirect_traffic"}},[e._v("\n\t\t\t\t\t\t\t"+e._s(e.__("Enable 404 redirection"))+"\n\t\t\t\t\t\t")]),e._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:!0===e.model.redirect_traffic,expression:"model.redirect_traffic===true"}],staticClass:"sui-border-frame sui-toggle-content",attrs:{id:"redirectTrafficContainer"}},[s("label",{staticClass:"sui-label"},[e._v(e._s(e.__("Redirection URL")))]),e._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.redirect_traffic_url,expression:"model.redirect_traffic_url"}],staticClass:"sui-form-control",attrs:{placeholder:"E.g. 404-error",type:"text",name:"redirect_traffic_url"},domProps:{value:e.model.redirect_traffic_url},on:{input:function(t){t.target.composing||e.$set(e.model,"redirect_traffic_url",t.target.value)}}}),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n "+e._s(e.__("Visitors who visit the default login URLs will be redirected to"))+" "),s("a",{attrs:{href:e.login_redirect_url}},[e._v(e._s(e.login_redirect_url))])])])])]),e._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[e._v("\n "+e._s(e.__("Deactivate"))+"\n ")]),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n "+e._s(e.__("Disable login area masking and return to the default wp-admin and wp-login URLS."))+"\n ")])]),e._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("submit-button",{attrs:{type:"button","css-class":"sui-button-ghost",state:e.state},on:{click:function(t){return e.toggle(!1)}}},[e._v("\n\t\t\t\t\t\t\t"+e._s(e.__("Deactivate"))+"\n\t\t\t\t\t\t")])],1)])]),e._v(" "),s("div",{staticClass:"sui-box-footer"},[s("submit-button",{attrs:{type:"submit",state:e.state,"css-class":"sui-button-blue save-changes"}},[s("i",{staticClass:"sui-icon-save",attrs:{"aria-hidden":"true"}}),e._v("\n\t\t\t\t\t"+e._s(e.__("Save Changes"))+"\n\t\t\t\t")])],1)])])}),[],!1,null,null,null).exports,c={mixins:[a.a],props:["misc","model"],name:"sh-xframe",data:function(){return{state:{on_saving:!1},mode:this.misc.mode,values:this.misc.values,model:this.model,tabUrlsText:""}},created:function(){this.tabUrlsText=vsprintf(this.__("The page <strong>%s</strong> will only be displayed in a frame on the specified origin. One per line."),this.siteUrl)}},d=Object(n.a)(c,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"sui-toggle-content"},[s("span",{staticClass:"sui-description toogle-content-description"},[e._v("\n\t\t"+e._s(e.__("Choose whether or not you want to allow your webpages to be embedded inside iframes."))+"\n\t")]),e._v(" "),s("div",{staticClass:"sui-side-tabs"},[s("div",{staticClass:"sui-tabs-menu"},[s("label",{staticClass:"sui-tab-item",class:{active:"sameorigin"===e.model.sh_xframe_mode},attrs:{for:"xf-sameorigin"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.sh_xframe_mode,expression:"model.sh_xframe_mode"}],attrs:{type:"radio",name:"sh_xframe_mode",value:"sameorigin",id:"xf-sameorigin","data-tab-menu":"xf-sameorigin-box"},domProps:{checked:e._q(e.model.sh_xframe_mode,"sameorigin")},on:{change:function(t){return e.$set(e.model,"sh_xframe_mode","sameorigin")}}}),e._v("\n\t\t\t\t"+e._s(e.__("Sameorigin"))+"\n\t\t\t")]),e._v(" "),s("label",{staticClass:"sui-tab-item",class:{active:"allow-from"==e.model.sh_xframe_mode},attrs:{for:"xf-allow-from"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.sh_xframe_mode,expression:"model.sh_xframe_mode"}],attrs:{type:"radio",name:"sh_xframe_mode",value:"allow-from",id:"xf-allow-from","data-tab-menu":"xf-allow-from-box"},domProps:{checked:e._q(e.model.sh_xframe_mode,"allow-from")},on:{change:function(t){return e.$set(e.model,"sh_xframe_mode","allow-from")}}}),e._v("\n\t\t\t\t"+e._s(e.__("Allow-from"))+"\n\t\t\t")]),e._v(" "),s("label",{staticClass:"sui-tab-item",class:{active:"deny"===e.model.sh_xframe_mode},attrs:{for:"xf-deny"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.sh_xframe_mode,expression:"model.sh_xframe_mode"}],attrs:{type:"radio",name:"sh_xframe_mode",value:"deny",id:"xf-deny","data-tab-menu":"xf-deny-box"},domProps:{checked:e._q(e.model.sh_xframe_mode,"deny")},on:{change:function(t){return e.$set(e.model,"sh_xframe_mode","deny")}}}),e._v("\n\t\t\t\t"+e._s(e.__("Deny"))+"\n\t\t\t")])]),e._v(" "),s("div",{staticClass:"sui-tabs-content"},[s("div",{staticClass:"sui-tab-content sui-tab-boxed",class:{active:"sameorigin"===e.model.sh_xframe_mode},attrs:{id:"xf-sameorigin-box","data-tab-content":"xf-sameorigin-box"}},[s("p",{staticClass:"sui-p-small"},[e._v("\n\t\t\t\t\t"+e._s(e.__("The page can only be displayed in a frame on the same origin as the page itself. The spec leaves it up to browser vendors to decide whether this option applies to the top level, the parent, or the whole chain."))+"\n\t\t\t\t")])]),e._v(" "),s("div",{staticClass:"sui-tab-content sui-tab-boxed",class:{active:"allow-from"===e.model.sh_xframe_mode},attrs:{id:"xf-allow-from-box","data-tab-content":"xf-allow-from-box"}},[s("div",{staticClass:"sui-form-field"},[s("label",{staticClass:"sui-label"},[e._v(e._s(e.__("Allow from URLs")))]),e._v(" "),s("textarea",{directives:[{name:"model",rawName:"v-model",value:e.model.sh_xframe_urls,expression:"model.sh_xframe_urls"}],staticClass:"sui-form-control",attrs:{name:"sh_xframe_urls",placeholder:e.__("Place allowed page URLs, one per line")},domProps:{value:e.model.sh_xframe_urls},on:{input:function(t){t.target.composing||e.$set(e.model,"sh_xframe_urls",t.target.value)}}}),e._v(" "),s("span",{staticClass:"sui-description",domProps:{innerHTML:e._s(e.tabUrlsText)}})])]),e._v(" "),s("div",{staticClass:"sui-tab-content sui-tab-boxed",class:{active:"deny"===e.model.sh_xframe_mode},attrs:{id:"xf-deny-box","data-tab-content":"xf-deny-box"}},[s("p",{staticClass:"sui-p-small"},[e._v("\n\t\t\t\t\t"+e._s(e.__("The page can’t be displayed in a frame, regardless of the site attempting to do so."))+"\n\t\t\t\t")])])])])])}),[],!1,null,null,null).exports,u={mixins:[a.a],props:["misc","model"],name:"sh_xss_protection",data:function(){return{state:{on_saving:!1},mode:this.misc.mode,model:this.model}}},_=Object(n.a)(u,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"sui-toggle-content"},[s("span",{staticClass:"sui-description toogle-content-description"},[e._v("\n "+e._s(e.__("Choose what level of protection X-XSS protection you would like to apply when XSS attacks are detected."))+"\n ")]),e._v(" "),s("div",{staticClass:"sui-side-tabs"},[s("div",{staticClass:"sui-tabs-menu"},[s("label",{staticClass:"sui-tab-item",class:{active:"sanitize"===e.model.sh_xss_protection_mode},attrs:{for:"xss-sanitize"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.sh_xss_protection_mode,expression:"model.sh_xss_protection_mode"}],attrs:{type:"radio",name:"sh_xss_protection_mode",value:"sanitize",id:"xss-sanitize","data-tab-menu":"xss-sanitize-box"},domProps:{checked:e._q(e.model.sh_xss_protection_mode,"sanitize")},on:{change:function(t){return e.$set(e.model,"sh_xss_protection_mode","sanitize")}}}),e._v("\n "+e._s(e.__("Sanitize"))+"\n ")]),e._v(" "),s("label",{staticClass:"sui-tab-item",class:{active:"block"===e.model.sh_xss_protection_mode},attrs:{for:"xss-block"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.sh_xss_protection_mode,expression:"model.sh_xss_protection_mode"}],attrs:{type:"radio",name:"sh_xss_protection_mode",value:"block",id:"xss-block","data-tab-menu":"xss-block-box"},domProps:{checked:e._q(e.model.sh_xss_protection_mode,"block")},on:{change:function(t){return e.$set(e.model,"sh_xss_protection_mode","block")}}}),e._v("\n "+e._s(e.__("Block"))+"\n ")])]),e._v(" "),s("div",{staticClass:"sui-tabs-content"},[s("div",{staticClass:"sui-tab-content sui-tab-boxed",class:{active:"sanitize"===e.model.sh_xss_protection_mode},attrs:{id:"xss-sanitize-box","data-tab-content":"xss-sanitize-box"}},[s("p",{staticClass:"sui-p-small"},[e._v("\n "+e._s(e.__("If a cross-site scripting attack is detected, the browser will sanitize the page (remove the unsafe parts)."))+"\n ")])]),e._v(" "),s("div",{staticClass:"sui-tab-content sui-tab-boxed",class:{active:"block"===e.model.sh_xss_protection_mode},attrs:{id:"xss-block-box","data-tab-content":"xss-allow-from-box"}},[s("span",{staticClass:"sui-description"},[e._v("\n "+e._s(e.__("Enables XSS filtering. Rather than sanitizing the page, the browser will prevent rendering of the page if an attack is detected."))+"\n ")])])])])])}),[],!1,null,null,null).exports,m={mixins:[a.a],name:"sh-content-type-options"},p=Object(n.a)(m,(function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"sui-toggle-content"},[t("span",{staticClass:"sui-description toogle-content-description"},[this._v("\n\t\t\t"+this._s(this.__("Defender will automatically enforce the 'nosniff' X-Content-Type-Options header to help prevent MIME type sniffing and XSS attacks."))+"\n\t\t")])])}),[],!1,null,null,null).exports,h={mixins:[a.a],name:"sh-strict-transport",props:["misc","model"],data:function(){return{state:{on_saving:!1},hsts_preload:this.misc.misc.hsts_preload,allow_subdomain:this.misc.misc.allow_subdomain,include_subdomain:this.misc.misc.include_subdomain,hsts_cache_duration:this.misc.misc.hsts_cache_duration,model:this.model}},created:function(){!1===this.allow_subdomain&&(this.include_subdomain=!1)},mounted:function(){var e=this;jQuery("#hsts-cache-duration").change((function(){var t=jQuery(this).val();e.hsts_cache_duration=t,e.$parent.$emit("hsts_maximum_age",t)}))},computed:{show_hsts_warning:function(){return 1===parseInt(this.model.hsts_preload)},hsts_warning_text:function(){return vsprintf(this.__('Note: Do not include the preload directive by default if you maintain a project that provides HTTPS configuration advice or provides an option to enable HSTS. Be aware that inclusion in the preload list cannot easily be undone. Domains can be removed, but it takes months for a change. Check <a target="_blank" href="%s">here</a> for more information.'),"https://hstspreload.org/")},text_browser_caching:function(){return vsprintf(this.__('Choose when the browser should cache and apply the Strict Transport Security policy for. The recommended value for HSTS Maximum age is at least 30 days. You can learn more about max-age value differences <a target="_blank" href="%s">here</a>.'),"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security#Examples")}},watch:{"misc.hsts_cache_duration":function(){this.hsts_cache_duration=this.misc.hsts_cache_duration}}},f=Object(n.a)(h,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"sui-toggle-content"},[s("div",{staticClass:"sui-border-frame"},[s("label",{staticClass:"sui-checkbox",attrs:{for:"hsts_preload"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.hsts_preload,expression:"model.hsts_preload"}],attrs:{type:"checkbox",name:"model.hsts_preload","true-value":"1","false-value":"0","aria-labelledby":"label_hsts_preload",id:"hsts_preload"},domProps:{checked:Array.isArray(e.model.hsts_preload)?e._i(e.model.hsts_preload,null)>-1:e._q(e.model.hsts_preload,"1")},on:{change:function(t){var s=e.model.hsts_preload,i=t.target,r=i.checked?"1":"0";if(Array.isArray(s)){var a=e._i(s,null);i.checked?a<0&&e.$set(e.model,"hsts_preload",s.concat([null])):a>-1&&e.$set(e.model,"hsts_preload",s.slice(0,a).concat(s.slice(a+1)))}else e.$set(e.model,"hsts_preload",r)}}}),e._v(" "),s("span",{attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",{attrs:{id:"label_hsts_preload"}},[e._v(e._s(e.__("HSTS Preload")))])]),e._v(" "),s("span",{staticClass:"sui-description margin-bottom-10"},[e._v(e._s(e.__("Google maintains an HSTS preload service. By following the guidelines and successfully submitting your domain, browsers will never connect to your domain using an insecure connection.")))]),e._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:e.show_hsts_warning,expression:"show_hsts_warning"}],staticClass:"sui-notice sui-notice-warning"},[s("div",{staticClass:"sui-notice-content"},[s("div",{staticClass:"sui-notice-message"},[s("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),e._v(" "),s("p",{domProps:{innerHTML:e._s(e.hsts_warning_text)}})])])]),e._v(" "),!0===e.allow_subdomain?s("div",{staticClass:"margin-bottom-30"},[s("label",{staticClass:"sui-checkbox",attrs:{for:"include_subdomain"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.include_subdomain,expression:"model.include_subdomain"}],attrs:{type:"checkbox","true-value":"1","false-value":"0","aria-labelledby":"label_include_subdomain",id:"include_subdomain"},domProps:{checked:Array.isArray(e.model.include_subdomain)?e._i(e.model.include_subdomain,null)>-1:e._q(e.model.include_subdomain,"1")},on:{change:function(t){var s=e.model.include_subdomain,i=t.target,r=i.checked?"1":"0";if(Array.isArray(s)){var a=e._i(s,null);i.checked?a<0&&e.$set(e.model,"include_subdomain",s.concat([null])):a>-1&&e.$set(e.model,"include_subdomain",s.slice(0,a).concat(s.slice(a+1)))}else e.$set(e.model,"include_subdomain",r)}}}),e._v(" "),s("span",{attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",{attrs:{id:"label_include_subdomain"}},[e._v(e._s(e.__("Include Subdomains")))])]),e._v(" "),s("span",{staticClass:"sui-description margin-bottom-10"},[e._v(e._s(e.__("If this optional parameter is specified, this rule applies to all of the site's subdomains as well.")))])]):e._e(),e._v(" "),s("div",{staticClass:"toggle-content-header",style:{fontWeight:500}},[e._v(e._s(e.__("Browser Caching")))]),e._v(" "),s("span",{staticClass:"sui-description",domProps:{innerHTML:e._s(e.text_browser_caching)}}),e._v(" "),s("div",{staticClass:"sui-form-field"},[s("div",{staticClass:"sui-row"},[s("div",{staticClass:"sui-col-md-5"},[s("label",{staticClass:"sui-label",attrs:{for:"hsts-cache-duration",id:"label-hsts-cache-duration"}},[e._v(e._s(e.__("HSTS Maximum Age")))]),e._v(" "),s("select",{directives:[{name:"model",rawName:"v-model",value:e.model.hsts_cache_duration,expression:"model.hsts_cache_duration"}],staticClass:"sui-select-sm",attrs:{id:"hsts-cache-duration",name:"hsts_cache_duration","data-module":"sh-strict-transport","aria-labelledby":"label-hsts-cache-duration","data-key":"hsts_cache_duration"},on:{change:function(t){var s=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.model,"hsts_cache_duration",t.target.multiple?s:s[0])}}},[s("option",{attrs:{value:"1 hour"}},[e._v(e._s(e.__("1 hour")))]),e._v(" "),s("option",{attrs:{value:"24 hours"}},[e._v(e._s(e.__("24 hours")))]),e._v(" "),s("option",{attrs:{value:"7 days"}},[e._v(e._s(e.__("7 days")))]),e._v(" "),s("option",{attrs:{value:"30 days"}},[e._v(e._s(e.__("30 days")))]),e._v(" "),s("option",{attrs:{value:"3 months"}},[e._v(e._s(e.__("3 months")))]),e._v(" "),s("option",{attrs:{value:"6 months"}},[e._v(e._s(e.__("6 months")))]),e._v(" "),s("option",{attrs:{value:"1 year"}},[e._v(e._s(e.__("1 year")))]),e._v(" "),s("option",{attrs:{value:"2 years"}},[e._v(e._s(e.__("2 years")))])])])])])])])}),[],!1,null,null,null).exports,v={mixins:[a.a],name:"sh-referrer-policy",props:["misc","model"],data:function(){return{state:{on_saving:!1},mode:null,policyDesc:"",model:this.model}},created:function(){this.mode=this.misc.misc.mode},mounted:function(){var e=this;jQuery("#referrer-policy").change((function(){e.mode=jQuery(this).val()}))},watch:{mode:function(){"no-referrer"===this.mode&&(this.policyDesc=this.__("The Referer header will be omitted entirely. No referrer information is sent along with requests.")),"no-referrer-when-downgrade"===this.mode&&(this.policyDesc=this.__("This is the user agent's default behavior if no policy is specified. The origin is sent as referrer to a-priori as-much-secure destination (HTTPS->HTTPS), but isn't sent to a less secure destination (HTTPS->HTTP).")),"origin"===this.mode&&(this.policyDesc=this.__("Only send the origin of the document as the referrer in all cases. The document https://example.com/page.html will send the referrer https://example.com/.")),"origin-when-cross-origin"===this.mode&&(this.policyDesc=this.__("Send a full URL when performing a same-origin request, but only send the origin of the document for other cases.")),"same-origin"===this.mode&&(this.policyDesc=this.__("A referrer will be sent for same-site origins, but cross-origin requests will contain no referrer information.")),"strict-origin"===this.mode&&(this.policyDesc=this.__("Only send the origin of the document as the referrer to a-priori as-much-secure destination (HTTPS->HTTPS), but don't send it to a less secure destination (HTTPS->HTTP).")),"strict-origin-when-cross-origin"===this.mode&&(this.policyDesc=this.__("Send a full URL when performing a same-origin request, only send the origin of the document to a-priori as-much-secure destination (HTTPS->HTTPS), and send no header to a less secure destination (HTTPS->HTTP).")),"unsafe-url"===this.mode&&(this.policyDesc=this.__("Send a full URL (stripped from parameters) when performing a a same-origin or cross-origin request.")),this.$parent.$emit("mode_referrer_policy",this.mode)}}},g=Object(n.a)(v,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"sui-toggle-content"},[s("span",{staticClass:"sui-description toogle-content-description"},[e._v("\n\t\t"+e._s(e.__("Choose which referrer information to send along with requests."))+"\n\t")]),e._v(" "),s("div",{staticClass:"sui-border-frame"},[s("div",{staticClass:"sui-row"},[s("div",{staticClass:"sui-col-md-7"},[s("label",{staticClass:"sui-label",attrs:{for:"referrer-policy",id:"label-referrer-policy"}},[e._v(e._s(e.__("Referrer Information")))]),e._v(" "),s("select",{directives:[{name:"model",rawName:"v-model",value:e.model.sh_referrer_policy_mode,expression:"model.sh_referrer_policy_mode"}],staticClass:"sui-select-sm",attrs:{id:"referrer-policy",name:"sh_referrer_policy_mode","aria-labelledby":"label-referrer-policy"},on:{change:function(t){var s=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.model,"sh_referrer_policy_mode",t.target.multiple?s:s[0])}}},[s("option",{attrs:{value:"no-referrer"}},[e._v("no-referrer")]),e._v(" "),s("option",{attrs:{value:"no-referrer-when-downgrade"}},[e._v("no-referrer-when-downgrade")]),e._v(" "),s("option",{attrs:{value:"origin"}},[e._v("origin")]),e._v(" "),s("option",{attrs:{value:"origin-when-cross-origin"}},[e._v("origin-when-cross-origin")]),e._v(" "),s("option",{attrs:{value:"same-origin"}},[e._v("same-origin")]),e._v(" "),s("option",{attrs:{value:"strict-origin"}},[e._v("strict-origin")]),e._v(" "),s("option",{attrs:{value:"strict-origin-when-cross-origin"}},[e._v("strict-origin-when-cross-origin")]),e._v(" "),s("option",{attrs:{value:"unsafe-url"}},[e._v("unsafe-url")])])]),e._v(" "),s("div",{staticClass:"sui-col-md-12",style:{marginTop:"10px"}},[s("p",{staticClass:"sui-description",domProps:{innerHTML:e._s(e.policyDesc)}})])])])])}),[],!1,null,null,null).exports,b={mixins:[a.a],props:["misc","model"],name:"sh-feature-policy",data:function(){return{misc:this.misc,state:{on_saving:!1},mode:this.misc.mode,values:this.misc.values,model:this.model,tabUrlsText:""}},created:function(){this.tabUrlsText=vsprintf(this.__("The feature is allowed for specific origins. Place URLs here %s, one per line."),"<strong>https://example.com</strong>")}},y=Object(n.a)(b,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"sui-toggle-content"},[s("span",{staticClass:"sui-description toogle-content-description"},[e._v("\n "+e._s(e.__("Choose an option that matches your requirements from the options below to prevent unwanted actions when your webpages are embedded elsewhere."))+"\n ")]),e._v(" "),s("div",{staticClass:"sui-side-tabs"},[s("div",{staticClass:"sui-tabs-menu"},[s("label",{staticClass:"sui-tab-item",class:{active:"self"===e.model.sh_feature_policy_mode},attrs:{for:"fp-site"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.sh_feature_policy_mode,expression:"model.sh_feature_policy_mode"}],attrs:{type:"radio",name:"model.sh_feature_policy_mode",value:"self",id:"fp-site","data-tab-menu":"fp-site-box"},domProps:{checked:e._q(e.model.sh_feature_policy_mode,"self")},on:{change:function(t){return e.$set(e.model,"sh_feature_policy_mode","self")}}}),e._v("\n "+e._s(e.__("On site & iframe"))+"\n ")]),e._v(" "),s("label",{staticClass:"sui-tab-item",class:{active:"allow"===e.model.sh_feature_policy_mode},attrs:{for:"fp-allow"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.sh_feature_policy_mode,expression:"model.sh_feature_policy_mode"}],attrs:{type:"radio",name:"model.sh_feature_policy_mode",value:"allow",id:"fp-allow","data-tab-menu":"fp-allow-box"},domProps:{checked:e._q(e.model.sh_feature_policy_mode,"allow")},on:{change:function(t){return e.$set(e.model,"sh_feature_policy_mode","allow")}}}),e._v("\n "+e._s(e.__("All"))+"\n ")]),e._v(" "),s("label",{staticClass:"sui-tab-item",class:{active:"origins"===e.model.sh_feature_policy_mode},attrs:{for:"fp-origins"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.sh_feature_policy_mode,expression:"model.sh_feature_policy_mode"}],attrs:{type:"radio",name:"model.sh_feature_policy_mode",value:"origins",id:"fp-origins","data-tab-menu":"fp-origins-box"},domProps:{checked:e._q(e.model.sh_feature_policy_mode,"origins")},on:{change:function(t){return e.$set(e.model,"sh_feature_policy_mode","origins")}}}),e._v("\n "+e._s(e.__("Specific Origins"))+"\n ")]),e._v(" "),s("label",{staticClass:"sui-tab-item",class:{active:"none"===e.model.sh_feature_policy_mode},attrs:{for:"fp-none"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.sh_feature_policy_mode,expression:"model.sh_feature_policy_mode"}],attrs:{type:"radio",name:"model.sh_feature_policy_mode",value:"none",id:"fp-none","data-tab-menu":"fp-none-box"},domProps:{checked:e._q(e.model.sh_feature_policy_mode,"none")},on:{change:function(t){return e.$set(e.model,"sh_feature_policy_mode","none")}}}),e._v("\n "+e._s(e.__("None"))+"\n ")])]),e._v(" "),s("div",{staticClass:"sui-tabs-content"},[s("div",{staticClass:"sui-tab-content sui-tab-boxed",class:{active:"self"===e.model.sh_feature_policy_mode},attrs:{id:"fp-site-box","data-tab-content":"fp-site-box"}},[s("p",{staticClass:"sui-p-small"},[e._v("\n "+e._s(e.__("The page can only be displayed in a frame on the same origin as the page itself. The spec leaves it up to browser vendors to decide whether this option applies to the top level, the parent, or the whole chain."))+"\n ")])]),e._v(" "),s("div",{staticClass:"sui-tab-content sui-tab-boxed",class:{active:"allow"===e.model.sh_feature_policy_mode},attrs:{id:"fp-allow-box","data-tab-content":"fp-allow-box"}},[s("p",{staticClass:"sui-p-small"},[e._v("\n "+e._s(e.__("The feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin."))+"\n ")])]),e._v(" "),s("div",{staticClass:"sui-tab-content sui-tab-boxed",class:{active:"origins"===e.model.sh_feature_policy_mode},attrs:{id:"fp-origins-box","data-tab-content":"fp-origins-box"}},[s("div",{staticClass:"sui-form-field"},[s("label",{staticClass:"sui-label"},[e._v(e._s(e.__("Origin URL")))]),e._v(" "),s("textarea",{directives:[{name:"model",rawName:"v-model",value:e.model.sh_feature_policy_urls,expression:"model.sh_feature_policy_urls"}],staticClass:"sui-form-control",attrs:{name:"sh_feature_policy_urls",placeholder:e.__("Place URLs here, one per line")},domProps:{value:e.model.sh_feature_policy_urls},on:{input:function(t){t.target.composing||e.$set(e.model,"sh_feature_policy_urls",t.target.value)}}}),e._v(" "),s("span",{staticClass:"sui-description",domProps:{innerHTML:e._s(e.tabUrlsText)}})])]),e._v(" "),s("div",{staticClass:"sui-tab-content sui-tab-boxed",class:{active:"none"===e.model.sh_feature_policy_mode},attrs:{id:"fp-none-box","data-tab-content":"fp-none-box"}},[s("p",{staticClass:"sui-p-small"},[e._v("\n "+e._s(e.__("The feature is disabled in top-level and nested browsing contexts."))+"\n ")])])])])])}),[],!1,null,null,null).exports,x={mixins:[a.a],components:{"sh-xframe":d,"sh-xss-protection":_,"sh-content-type":p,"sh-strict-transport":f,"sh-referrer-policy":g,"sh-feature-policy":y},name:"security-headers",data:function(){return{misc:advanced_tools.misc.security_headers,model:advanced_tools.model.security_headers,nonces:advanced_tools.nonces,endpoints:advanced_tools.endpoints,state:{on_saving:!1,original_state:!1}}},methods:{updateSettings:function(){var e=this.model,t=this;this.httpPostRequest("updateSettings",{data:JSON.stringify({settings:e,module:"security-headers"})},(function(){t.state.original_state=!0}))},header_label:function(e){return this.vsprintf(this.__("Enable %s"),e)}},created:function(){this.$on("mode_referrer_policy",(function(e){this.model.sh_referrer_policy_mode=e})),this.$on("hsts_maximum_age",(function(e){this.model.hsts_cache_duration=e}))}},w=Object(n.a)(x,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"sui-box",attrs:{id:"security-headers"}},[s("div",{staticClass:"sui-box-header"},[s("h3",{staticClass:"sui-box-title"},[e._v("\n\t\t\t"+e._s(e.__("Security Headers"))+"\n\t\t")])]),e._v(" "),s("form",{attrs:{method:"post"},on:{submit:function(t){return t.preventDefault(),e.updateSettings(t)}}},[s("div",{staticClass:"sui-box-body"},[s("p",[e._v(e._s(e.__("Add extra security to your website by enabling and configuring the security headers.")))]),e._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[e._v("\n\t\t\t\t\t\t"+e._s(e.misc.sh_xframe.title)+"\n\t\t\t\t\t")]),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n\t\t\t\t\t\t"+e._s(e.misc.sh_xframe.misc.intro_text)+"\n\t\t\t\t\t")])]),e._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("div",{staticClass:"sui-form-field",attrs:{id:"sh_xframe_wrap"}},[s("label",{staticClass:"sui-toggle",attrs:{for:"sh_xframe"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.sh_xframe,expression:"model.sh_xframe"}],staticClass:"toggle-checkbox",attrs:{role:"presentation",type:"checkbox",name:"sh_xframe",id:"sh_xframe","aria-labelledby":"sh_xframe_label","false-value":!1,"true-value":!0},domProps:{checked:Array.isArray(e.model.sh_xframe)?e._i(e.model.sh_xframe,null)>-1:e.model.sh_xframe},on:{change:function(t){var s=e.model.sh_xframe,i=t.target,r=!!i.checked;if(Array.isArray(s)){var a=e._i(s,null);i.checked?a<0&&e.$set(e.model,"sh_xframe",s.concat([null])):a>-1&&e.$set(e.model,"sh_xframe",s.slice(0,a).concat(s.slice(a+1)))}else e.$set(e.model,"sh_xframe",r)}}}),e._v(" "),s("span",{staticClass:"sui-toggle-slider",attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",{staticClass:"sui-toggle-label",attrs:{id:"sh_xframe_label"}},[e._v(e._s(e.header_label(e.misc.sh_xframe.title)))])]),e._v(" "),s("sh-xframe",{directives:[{name:"show",rawName:"v-show",value:!0===e.model.sh_xframe,expression:"true === model.sh_xframe"}],attrs:{misc:e.misc.sh_xframe,model:e.model}})],1)])]),e._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[e._v("\n\t\t\t\t\t\t"+e._s(e.misc.sh_xss_protection.title)+"\n\t\t\t\t\t")]),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n\t\t\t\t\t\t"+e._s(e.misc.sh_xss_protection.misc.intro_text)+"\n\t\t\t\t\t")])]),e._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("div",{staticClass:"sui-form-field",attrs:{id:"sh_xss_protection_wrap"}},[s("label",{staticClass:"sui-toggle",attrs:{for:"sh_xss_protection"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.sh_xss_protection,expression:"model.sh_xss_protection"}],staticClass:"toggle-checkbox",attrs:{role:"presentation",type:"checkbox",name:"sh_xss_protection",id:"sh_xss_protection","aria-labelledby":"sh_xss_protection_label","false-value":!1,"true-value":!0},domProps:{checked:Array.isArray(e.model.sh_xss_protection)?e._i(e.model.sh_xss_protection,null)>-1:e.model.sh_xss_protection},on:{change:function(t){var s=e.model.sh_xss_protection,i=t.target,r=!!i.checked;if(Array.isArray(s)){var a=e._i(s,null);i.checked?a<0&&e.$set(e.model,"sh_xss_protection",s.concat([null])):a>-1&&e.$set(e.model,"sh_xss_protection",s.slice(0,a).concat(s.slice(a+1)))}else e.$set(e.model,"sh_xss_protection",r)}}}),e._v(" "),s("span",{staticClass:"sui-toggle-slider",attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",{staticClass:"sui-toggle-label",attrs:{id:"sh_xss_protection_label"}},[e._v(e._s(e.header_label(e.misc.sh_xss_protection.title)))])]),e._v(" "),s("sh-xss-protection",{directives:[{name:"show",rawName:"v-show",value:!0===e.model.sh_xss_protection,expression:"true === model.sh_xss_protection"}],attrs:{misc:e.misc.sh_xss_protection,model:e.model}})],1)])]),e._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[e._v("\n\t\t\t\t\t\t"+e._s(e.misc.sh_content_type_options.title)+"\n\t\t\t\t\t")]),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n\t\t\t\t\t\t"+e._s(e.misc.sh_content_type_options.misc.intro_text)+"\n\t\t\t\t\t")])]),e._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("div",{staticClass:"sui-form-field",attrs:{id:"sh_content_type_options_wrap"}},[s("label",{staticClass:"sui-toggle",attrs:{for:"sh_content_type_options"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.sh_content_type_options,expression:"model.sh_content_type_options"}],staticClass:"toggle-checkbox",attrs:{role:"presentation",type:"checkbox",name:"sh_content_type_options",id:"sh_content_type_options","aria-labelledby":"sh_content_type_options_label","false-value":!1,"true-value":!0},domProps:{checked:Array.isArray(e.model.sh_content_type_options)?e._i(e.model.sh_content_type_options,null)>-1:e.model.sh_content_type_options},on:{change:function(t){var s=e.model.sh_content_type_options,i=t.target,r=!!i.checked;if(Array.isArray(s)){var a=e._i(s,null);i.checked?a<0&&e.$set(e.model,"sh_content_type_options",s.concat([null])):a>-1&&e.$set(e.model,"sh_content_type_options",s.slice(0,a).concat(s.slice(a+1)))}else e.$set(e.model,"sh_content_type_options",r)}}}),e._v(" "),s("span",{staticClass:"sui-toggle-slider",attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",{staticClass:"sui-toggle-label",attrs:{id:"sh_content_type_options_label"}},[e._v(e._s(e.header_label(e.misc.sh_content_type_options.title)))])]),e._v(" "),s("sh-content-type",{directives:[{name:"show",rawName:"v-show",value:!0===e.model.sh_content_type_options,expression:"true === model.sh_content_type_options"}]})],1)])]),e._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[e._v("\n\t\t\t\t\t\t"+e._s(e.misc.sh_strict_transport.title)+"\n\t\t\t\t\t")]),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n\t\t\t\t\t\t"+e._s(e.misc.sh_strict_transport.misc.intro_text)+"\n\t\t\t\t\t")])]),e._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("div",{staticClass:"sui-form-field",attrs:{id:"sh_strict_transport_wrap"}},[s("label",{staticClass:"sui-toggle",attrs:{for:"sh_strict_transport"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.sh_strict_transport,expression:"model.sh_strict_transport"}],staticClass:"toggle-checkbox",attrs:{role:"presentation",type:"checkbox",name:"sh_strict_transport",id:"sh_strict_transport","aria-labelledby":"sh_strict_transport_label","false-value":!1,"true-value":!0},domProps:{checked:Array.isArray(e.model.sh_strict_transport)?e._i(e.model.sh_strict_transport,null)>-1:e.model.sh_strict_transport},on:{change:function(t){var s=e.model.sh_strict_transport,i=t.target,r=!!i.checked;if(Array.isArray(s)){var a=e._i(s,null);i.checked?a<0&&e.$set(e.model,"sh_strict_transport",s.concat([null])):a>-1&&e.$set(e.model,"sh_strict_transport",s.slice(0,a).concat(s.slice(a+1)))}else e.$set(e.model,"sh_strict_transport",r)}}}),e._v(" "),s("span",{staticClass:"sui-toggle-slider",attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",{staticClass:"sui-toggle-label",attrs:{id:"sh_strict_transport_label"}},[e._v(e._s(e.header_label(e.misc.sh_strict_transport.title)))])]),e._v(" "),s("sh-strict-transport",{directives:[{name:"show",rawName:"v-show",value:!0===e.model.sh_strict_transport,expression:"true === model.sh_strict_transport"}],attrs:{misc:e.misc.sh_strict_transport,model:e.model}})],1)])]),e._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[e._v("\n\t\t\t\t\t\t"+e._s(e.misc.sh_referrer_policy.title)+"\n\t\t\t\t\t")]),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n\t\t\t\t\t\t"+e._s(e.misc.sh_referrer_policy.misc.intro_text)+"\n\t\t\t\t\t")])]),e._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("div",{staticClass:"sui-form-field",attrs:{id:"sh_referrer_policy_wrap"}},[s("label",{staticClass:"sui-toggle",attrs:{for:"sh_referrer_policy"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.sh_referrer_policy,expression:"model.sh_referrer_policy"}],staticClass:"toggle-checkbox",attrs:{role:"presentation",type:"checkbox",name:"sh_referrer_policy",id:"sh_referrer_policy","aria-labelledby":"sh_referrer_policy_label","false-value":!1,"true-value":!0},domProps:{checked:Array.isArray(e.model.sh_referrer_policy)?e._i(e.model.sh_referrer_policy,null)>-1:e.model.sh_referrer_policy},on:{change:function(t){var s=e.model.sh_referrer_policy,i=t.target,r=!!i.checked;if(Array.isArray(s)){var a=e._i(s,null);i.checked?a<0&&e.$set(e.model,"sh_referrer_policy",s.concat([null])):a>-1&&e.$set(e.model,"sh_referrer_policy",s.slice(0,a).concat(s.slice(a+1)))}else e.$set(e.model,"sh_referrer_policy",r)}}}),e._v(" "),s("span",{staticClass:"sui-toggle-slider",attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",{staticClass:"sui-toggle-label",attrs:{id:"sh_referrer_policy_label"}},[e._v(e._s(e.header_label(e.misc.sh_referrer_policy.title)))])]),e._v(" "),s("sh-referrer-policy",{directives:[{name:"show",rawName:"v-show",value:!0===e.model.sh_referrer_policy,expression:"true === model.sh_referrer_policy"}],attrs:{misc:e.misc.sh_referrer_policy,model:e.model}})],1)])]),e._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[e._v("\n\t\t\t\t\t\t"+e._s(e.misc.sh_feature_policy.title)+"\n\t\t\t\t\t")]),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n\t\t\t\t\t\t"+e._s(e.misc.sh_feature_policy.misc.intro_text)+"\n\t\t\t\t\t")])]),e._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("div",{staticClass:"sui-form-field",attrs:{id:"sh_feature_policy_wrap"}},[s("label",{staticClass:"sui-toggle",attrs:{for:"sh_feature_policy"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.sh_feature_policy,expression:"model.sh_feature_policy"}],staticClass:"toggle-checkbox",attrs:{role:"presentation",type:"checkbox",name:"sh_feature_policy",id:"sh_feature_policy","aria-labelledby":"sh_feature_policy_label","false-value":!1,"true-value":!0},domProps:{checked:Array.isArray(e.model.sh_feature_policy)?e._i(e.model.sh_feature_policy,null)>-1:e.model.sh_feature_policy},on:{change:function(t){var s=e.model.sh_feature_policy,i=t.target,r=!!i.checked;if(Array.isArray(s)){var a=e._i(s,null);i.checked?a<0&&e.$set(e.model,"sh_feature_policy",s.concat([null])):a>-1&&e.$set(e.model,"sh_feature_policy",s.slice(0,a).concat(s.slice(a+1)))}else e.$set(e.model,"sh_feature_policy",r)}}}),e._v(" "),s("span",{staticClass:"sui-toggle-slider",attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",{staticClass:"sui-toggle-label",attrs:{id:"sh_feature_policy_label"}},[e._v(e._s(e.header_label(e.misc.sh_feature_policy.title)))])]),e._v(" "),s("sh-feature-policy",{directives:[{name:"show",rawName:"v-show",value:!0===e.model.sh_feature_policy,expression:"true === model.sh_feature_policy"}],attrs:{misc:e.misc.sh_feature_policy,model:e.model}})],1)])])]),e._v(" "),s("div",{staticClass:"sui-box-footer"},[s("div",{staticClass:"sui-actions-right"},[s("submit-button",{attrs:{type:"submit",state:e.state,"css-class":"sui-button-blue save-changes"}},[s("i",{staticClass:"sui-icon-save",attrs:{"aria-hidden":"true"}}),e._v("\n\t\t\t\t\t"+e._s(e.__("Save Changes"))+"\n\t\t\t\t")])],1)])])])}),[],!1,null,null,null).exports,C={mixins:[a.a],components:{"mask-login":l,"security-headers":w},data:function(){return{state:{on_saving:!1},whitelabel:defender.whitelabel,is_free:defender.is_free,view:""}},created:function(){var e=new URLSearchParams(window.location.search).get("view");null===e&&(e="mask-login"),this.view=e},watch:{view:function(e,t){history.replaceState({},null,this.adminUrl()+"admin.php?page=wdf-advanced-tools&view="+this.view)}},mounted:function(){self=this,jQuery(".sui-mobile-nav").change((function(){self.view=jQuery(this).val()}))}},k=Object(n.a)(C,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"sui-wrap",class:[e.maybeHighContrast()]},[s("div",{staticClass:"advanced-tools"},[s("div",{staticClass:"sui-header"},[s("h1",{staticClass:"sui-header-title"},[e._v(e._s(e.__("Advanced Tools")))]),e._v(" "),s("doc-link",{attrs:{link:"https://premium.wpmudev.org/docs/wpmu-dev-plugins/defender/#advanced-tools"}})],1),e._v(" "),s("div",{staticClass:"sui-row-with-sidenav"},[s("div",{staticClass:"sui-sidenav"},[s("ul",{staticClass:"sui-vertical-tabs sui-sidenav-hide-md"},[s("li",{staticClass:"sui-vertical-tab",class:{current:"mask-login"===e.view}},[s("a",{attrs:{"data-tab":"notfound_lockout",href:"#mask-login"},on:{click:function(t){t.preventDefault(),e.view="mask-login"}}},[e._v(e._s(e.__("Mask Login Area")))])]),e._v(" "),s("li",{staticClass:"sui-vertical-tab",class:{current:"security-headers"===e.view}},[s("a",{attrs:{role:"button",href:"#"},on:{click:function(t){t.preventDefault(),e.view="security-headers"}}},[e._v(e._s(e.__("Security Headers")))])])]),e._v(" "),s("div",{staticClass:"sui-sidenav-hide-lg"},[s("select",{staticClass:"sui-mobile-nav"},[s("option",{attrs:{value:"mask-login"}},[e._v(e._s(e.__("Mask Login Area")))]),e._v(" "),s("option",{attrs:{value:"security-headers"}},[e._v(e._s(e.__("Security Headers")))])])])]),e._v(" "),s("mask-login",{directives:[{name:"show",rawName:"v-show",value:"mask-login"===e.view,expression:"view==='mask-login'"}]}),e._v(" "),s("security-headers",{directives:[{name:"show",rawName:"v-show",value:"security-headers"===e.view,expression:"view==='security-headers'"}]})],1)]),e._v(" "),s("app-footer")],1)}),[],!1,null,null,null).exports,S=s("./src/component/submit-button.vue"),A=s("./src/component/footer.vue"),T=s("./src/component/doc-link.vue");r.a.component("app-footer",A.a),r.a.component("doc-link",T.a),r.a.component("submit-button",S.a);new r.a({el:"#defender",components:{advanced_tools:k},render:function(e){return e(k)}})},"./src/component/doc-link.vue":function(e,t,s){"use strict";var i={mixins:[s("./src/helper/base_hepler.js").a],name:"doc-link",props:["link"],data:function(){return{whitelabel:defender.whitelabel}}},r=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),a=Object(r.a)(i,(function(){var e=this.$createElement,t=this._self._c||e;return!1===this.whitelabel.hide_doc_link?t("div",{staticClass:"sui-actions-right"},[t("a",{staticClass:"sui-button sui-button-ghost",attrs:{href:this.link,target:"_blank"}},[t("i",{staticClass:"sui-icon-academy"}),this._v(" "+this._s(this.__("View Documentation"))+"\n ")])]):this._e()}),[],!1,null,null,null);t.a=a.exports},"./src/component/footer.vue":function(e,t,s){"use strict";var i={data:function(){return{whitelabel:defender.whitelabel,is_free:parseInt(defender.is_free)}}},r=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),a=Object(r.a)(i,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[!0===e.whitelabel.change_footer?s("div",{staticClass:"sui-footer"},[e._v("\n "+e._s(e.whitelabel.footer_text)+"\n ")]):s("div",{staticClass:"sui-footer"},[e._v("Made with "),s("i",{staticClass:"sui-icon-heart"}),e._v(" by WPMU DEV")]),e._v(" "),!1===e.whitelabel.hide_doc_link?s("div",[1===e.is_free?s("ul",{staticClass:"sui-footer-nav"},[e._m(0),e._v(" "),e._m(1),e._v(" "),e._m(2),e._v(" "),e._m(3),e._v(" "),e._m(4),e._v(" "),e._m(5),e._v(" "),e._m(6),e._v(" "),e._m(7)]):s("ul",{staticClass:"sui-footer-nav"},[e._m(8),e._v(" "),e._m(9),e._v(" "),e._m(10),e._v(" "),e._m(11),e._v(" "),e._m(12),e._v(" "),e._m(13),e._v(" "),e._m(14),e._v(" "),e._m(15)]),e._v(" "),e._m(16)]):e._e()])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://profiles.wordpress.org/wpmudev#content-plugins",target:"_blank"}},[this._v("Free\n Plugins")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/features/",target:"_blank"}},[this._v("Membership")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/roadmap/",target:"_blank"}},[this._v("Roadmap")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://wordpress.org/support/plugin/plugin-name",target:"_blank"}},[this._v("Support")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/docs/",target:"_blank"}},[this._v("Docs")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/hub/",target:"_blank"}},[this._v("The Hub")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/terms-of-service/",target:"_blank"}},[this._v("Terms of Service")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://incsub.com/privacy-policy/",target:"_blank"}},[this._v("Privacy Policy")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/hub/",target:"_blank"}},[this._v("The Hub")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/projects/category/plugins/",target:"_blank"}},[this._v("Plugins")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/roadmap/",target:"_blank"}},[this._v("Roadmap")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/hub/support/",target:"_blank"}},[this._v("Support")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/docs/",target:"_blank"}},[this._v("Docs")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/hub/community/",target:"_blank"}},[this._v("Community")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/terms-of-service/",target:"_blank"}},[this._v("Terms of Service")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://incsub.com/privacy-policy/",target:"_blank"}},[this._v("Privacy Policy")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("ul",{staticClass:"sui-footer-social"},[s("li",[s("a",{attrs:{href:"https://www.facebook.com/wpmudev",target:"_blank"}},[s("i",{staticClass:"sui-icon-social-facebook",attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",{staticClass:"sui-screen-reader-text"},[e._v("Facebook")])])]),e._v(" "),s("li",[s("a",{attrs:{href:"https://twitter.com/wpmudev",target:"_blank"}},[s("i",{staticClass:"sui-icon-social-twitter",attrs:{"aria-hidden":"true"}})]),e._v(" "),s("span",{staticClass:"sui-screen-reader-text"},[e._v("Twitter")])]),e._v(" "),s("li",[s("a",{attrs:{href:"https://www.instagram.com/wpmu_dev/",target:"_blank"}},[s("i",{staticClass:"sui-icon-instagram",attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",{staticClass:"sui-screen-reader-text"},[e._v("Instagram")])])])])}],!1,null,null,null);t.a=a.exports},"./src/component/submit-button.vue":function(e,t,s){"use strict";var i={name:"submit-button",props:["id","state","text","css-class","type"],computed:{getClass:function(){return"sui-button "+this.cssClass}}},r=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),a=Object(r.a)(i,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("button",{staticClass:"sui-button",class:[e.getClass,{"sui-button-onload":e.state.on_saving}],attrs:{id:e.id,type:e.type,disabled:e.state.on_saving},on:{click:function(t){return e.$emit("click")}}},[s("span",{staticClass:"sui-loading-text"},[e._t("default")],2),e._v(" "),s("i",{staticClass:"sui-icon-loader sui-loading",attrs:{"aria-hidden":"true"}})])}),[],!1,null,null,null);t.a=a.exports},"./src/helper/base_hepler.js":function(e,t,s){"use strict";var i=s("./node_modules/xss/lib/index.js"),r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var s=[],i=!0,r=!1,a=void 0;try{for(var o,n=e[Symbol.iterator]();!(i=(o=n.next()).done)&&(s.push(o.value),!t||s.length!==t);i=!0);}catch(e){r=!0,a=e}finally{try{!i&&n.return&&n.return()}finally{if(r)throw a}}return s}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},a=wp.i18n,o={whiteList:{a:["href","title","target"],span:["class"],strong:["*"]},safeAttrValue:function(e,t,s,r){return"a"===e&&"href"===t&&"%s"===s?"%s":Object(i.safeAttrValue)(e,t,s,r)}},n=new i.FilterXSS(o),l=[];t.a={methods:{__:function(e){var t=a.__(e,"wpdef");return n.process(t)},xss:function(e){return n.process(e)},vsprintf:function(e){return a.sprintf.apply(null,arguments)},siteUrl:function(e){return void 0!==e?defender.site_url+e:defender.site_url},adminUrl:function(e){return void 0!==e?defender.admin_url+e:defender.admin_url},assetUrl:function(e){return defender.defender_url+e},maybeHighContrast:function(){return{"sui-color-accessible":!0===defender.misc.high_contrast}},maybeHideBranding:function(){return defender.whitelabel.hide_branding},isWhitelabelEnabled:function(){return defender.whitelabel.enabled},campaign_url:function(e){return"https://premium.wpmudev.org/project/wp-defender/?utm_source=defender&utm_medium=plugin&utm_campaign="+e},campaignUrl:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"https://premium.wpmudev.org/"+e+"?utm_source=defender&utm_medium=plugin&utm_campaign="+t},httpRequest:function(e,t,s,i,r){var a=this;void 0===r&&(this.state.on_saving=!0);var o=ajaxurl+"?action="+this.endpoints[t]+"&_wpnonce="+this.nonces[t],n=jQuery.ajax({url:o,method:e,data:s,success:function(e){var t=e.data;a.state.on_saving=!1,void 0!==t&&void 0!==t.message&&(e.success?Defender.showNotification("success",t.message):Defender.showNotification("error",t.message)),void 0!==i&&i(e)}});l.push(n)},httpGetRequest:function(e,t,s,i){this.httpRequest("get",e,t,s,i)},httpPostRequest:function(e,t,s,i){this.httpRequest("post",e,t,s,i)},abortAllRequests:function(){for(var e=0;e<l.length;e++)l[e].abort()},getQueryStringParams:function(e){return e?(/^[?#]/.test(e)?e.slice(1):e).split("&").reduce((function(e,t){var s=t.split("="),i=r(s,2),a=i[0],o=i[1];return e[a]=o?decodeURIComponent(o.replace(/\+/g," ")):"",e}),{}):{}},rebindSUI:function(){jQuery("select:not([multiple])").each((function(){SUI.suiSelect(this)})),jQuery(".sui-accordion").each((function(){SUI.suiAccordion(this)}));var e=jQuery(".sui-wrap");SUI.dialogs={},jQuery(".sui-dialog").each((function(){SUI.dialogs[this.id]=new A11yDialog(this,e)}))}}}},vue:function(e,t){e.exports=Vue}});
|
1 |
+
!function(e){var t=window.webpackHotUpdate;window.webpackHotUpdate=function(e,s){!function(e,t){if(!w[e]||!y[e])return;for(var s in y[e]=!1,t)Object.prototype.hasOwnProperty.call(t,s)&&(h[s]=t[s]);0==--v&&0===g&&S()}(e,s),t&&t(e,s)};var s,i=!0,r="aa2de61bdce813924e40",n={},a=[],o=[];function l(e){var t=$[e];if(!t)return P;var i=function(i){return t.hot.active?($[i]?-1===$[i].parents.indexOf(e)&&$[i].parents.push(e):(a=[e],s=i),-1===t.children.indexOf(i)&&t.children.push(i)):(console.warn("[HMR] unexpected require("+i+") from disposed module "+e),a=[]),P(i)},r=function(e){return{configurable:!0,enumerable:!0,get:function(){return P[e]},set:function(t){P[e]=t}}};for(var n in P)Object.prototype.hasOwnProperty.call(P,n)&&"e"!==n&&"t"!==n&&Object.defineProperty(i,n,r(n));return i.e=function(e){return"ready"===d&&_("prepare"),g++,P.e(e).then(t,(function(e){throw t(),e}));function t(){g--,"prepare"===d&&(b[e]||k(e),0===g&&0===v&&S())}},i.t=function(e,t){return 1&t&&(e=i(e)),P.t(e,-2&t)},i}function c(t){var i={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:s!==t,active:!0,accept:function(e,t){if(void 0===e)i._selfAccepted=!0;else if("function"==typeof e)i._selfAccepted=e;else if("object"==typeof e)for(var s=0;s<e.length;s++)i._acceptedDependencies[e[s]]=t||function(){};else i._acceptedDependencies[e]=t||function(){}},decline:function(e){if(void 0===e)i._selfDeclined=!0;else if("object"==typeof e)for(var t=0;t<e.length;t++)i._declinedDependencies[e[t]]=!0;else i._declinedDependencies[e]=!0},dispose:function(e){i._disposeHandlers.push(e)},addDisposeHandler:function(e){i._disposeHandlers.push(e)},removeDisposeHandler:function(e){var t=i._disposeHandlers.indexOf(e);t>=0&&i._disposeHandlers.splice(t,1)},invalidate:function(){switch(this._selfInvalidated=!0,d){case"idle":(h={})[t]=e[t],_("ready");break;case"ready":j(t);break;case"prepare":case"check":case"dispose":case"apply":(f=f||[]).push(t)}},check:C,apply:T,status:function(e){if(!e)return d;u.push(e)},addStatusHandler:function(e){u.push(e)},removeStatusHandler:function(e){var t=u.indexOf(e);t>=0&&u.splice(t,1)},data:n[t]};return s=void 0,i}var u=[],d="idle";function _(e){d=e;for(var t=0;t<u.length;t++)u[t].call(null,e)}var p,h,m,f,v=0,g=0,b={},y={},w={};function x(e){return+e+""===e?+e:e}function C(e){if("idle"!==d)throw new Error("check() is only allowed in idle status");return i=e,_("check"),(t=1e4,t=t||1e4,new Promise((function(e,s){if("undefined"==typeof XMLHttpRequest)return s(new Error("No browser support"));try{var i=new XMLHttpRequest,n=P.p+""+r+".hot-update.json";i.open("GET",n,!0),i.timeout=t,i.send(null)}catch(e){return s(e)}i.onreadystatechange=function(){if(4===i.readyState)if(0===i.status)s(new Error("Manifest request to "+n+" timed out."));else if(404===i.status)e();else if(200!==i.status&&304!==i.status)s(new Error("Manifest request to "+n+" failed."));else{try{var t=JSON.parse(i.responseText)}catch(e){return void s(e)}e(t)}}}))).then((function(e){if(!e)return _(A()?"ready":"idle"),null;y={},b={},w=e.c,m=e.h,_("prepare");var t=new Promise((function(e,t){p={resolve:e,reject:t}}));h={};return k(0),"prepare"===d&&0===g&&0===v&&S(),t}));var t}function k(e){w[e]?(y[e]=!0,v++,function(e){var t=document.createElement("script");t.charset="utf-8",t.src=P.p+""+e+"."+r+".hot-update.js",document.head.appendChild(t)}(e)):b[e]=!0}function S(){_("ready");var e=p;if(p=null,e)if(i)Promise.resolve().then((function(){return T(i)})).then((function(t){e.resolve(t)}),(function(t){e.reject(t)}));else{var t=[];for(var s in h)Object.prototype.hasOwnProperty.call(h,s)&&t.push(x(s));e.resolve(t)}}function T(t){if("ready"!==d)throw new Error("apply() is only allowed in ready status");return function t(i){var o,l,c,u,d;function p(e){for(var t=[e],s={},i=t.map((function(e){return{chain:[e],id:e}}));i.length>0;){var r=i.pop(),n=r.id,a=r.chain;if((u=$[n])&&(!u.hot._selfAccepted||u.hot._selfInvalidated)){if(u.hot._selfDeclined)return{type:"self-declined",chain:a,moduleId:n};if(u.hot._main)return{type:"unaccepted",chain:a,moduleId:n};for(var o=0;o<u.parents.length;o++){var l=u.parents[o],c=$[l];if(c){if(c.hot._declinedDependencies[n])return{type:"declined",chain:a.concat([l]),moduleId:n,parentId:l};-1===t.indexOf(l)&&(c.hot._acceptedDependencies[n]?(s[l]||(s[l]=[]),v(s[l],[n])):(delete s[l],t.push(l),i.push({chain:a.concat([l]),id:l})))}}}}return{type:"accepted",moduleId:e,outdatedModules:t,outdatedDependencies:s}}function v(e,t){for(var s=0;s<t.length;s++){var i=t[s];-1===e.indexOf(i)&&e.push(i)}}A();var g={},b=[],y={},C=function(){console.warn("[HMR] unexpected require("+S.moduleId+") to disposed module")};for(var k in h)if(Object.prototype.hasOwnProperty.call(h,k)){var S;d=x(k),S=h[k]?p(d):{type:"disposed",moduleId:k};var T=!1,j=!1,E=!1,O="";switch(S.chain&&(O="\nUpdate propagation: "+S.chain.join(" -> ")),S.type){case"self-declined":i.onDeclined&&i.onDeclined(S),i.ignoreDeclined||(T=new Error("Aborted because of self decline: "+S.moduleId+O));break;case"declined":i.onDeclined&&i.onDeclined(S),i.ignoreDeclined||(T=new Error("Aborted because of declined dependency: "+S.moduleId+" in "+S.parentId+O));break;case"unaccepted":i.onUnaccepted&&i.onUnaccepted(S),i.ignoreUnaccepted||(T=new Error("Aborted because "+d+" is not accepted"+O));break;case"accepted":i.onAccepted&&i.onAccepted(S),j=!0;break;case"disposed":i.onDisposed&&i.onDisposed(S),E=!0;break;default:throw new Error("Unexception type "+S.type)}if(T)return _("abort"),Promise.reject(T);if(j)for(d in y[d]=h[d],v(b,S.outdatedModules),S.outdatedDependencies)Object.prototype.hasOwnProperty.call(S.outdatedDependencies,d)&&(g[d]||(g[d]=[]),v(g[d],S.outdatedDependencies[d]));E&&(v(b,[S.moduleId]),y[d]=C)}var I,D=[];for(l=0;l<b.length;l++)d=b[l],$[d]&&$[d].hot._selfAccepted&&y[d]!==C&&!$[d].hot._selfInvalidated&&D.push({module:d,parents:$[d].parents.slice(),errorHandler:$[d].hot._selfAccepted});_("dispose"),Object.keys(w).forEach((function(e){!1===w[e]&&function(e){delete installedChunks[e]}(e)}));var H,R,L=b.slice();for(;L.length>0;)if(d=L.pop(),u=$[d]){var U={},N=u.hot._disposeHandlers;for(c=0;c<N.length;c++)(o=N[c])(U);for(n[d]=U,u.hot.active=!1,delete $[d],delete g[d],c=0;c<u.children.length;c++){var M=$[u.children[c]];M&&((I=M.parents.indexOf(d))>=0&&M.parents.splice(I,1))}}for(d in g)if(Object.prototype.hasOwnProperty.call(g,d)&&(u=$[d]))for(R=g[d],c=0;c<R.length;c++)H=R[c],(I=u.children.indexOf(H))>=0&&u.children.splice(I,1);_("apply"),void 0!==m&&(r=m,m=void 0);for(d in h=void 0,y)Object.prototype.hasOwnProperty.call(y,d)&&(e[d]=y[d]);var q=null;for(d in g)if(Object.prototype.hasOwnProperty.call(g,d)&&(u=$[d])){R=g[d];var z=[];for(l=0;l<R.length;l++)if(H=R[l],o=u.hot._acceptedDependencies[H]){if(-1!==z.indexOf(o))continue;z.push(o)}for(l=0;l<z.length;l++){o=z[l];try{o(R)}catch(e){i.onErrored&&i.onErrored({type:"accept-errored",moduleId:d,dependencyId:R[l],error:e}),i.ignoreErrored||q||(q=e)}}}for(l=0;l<D.length;l++){var V=D[l];d=V.module,a=V.parents,s=d;try{P(d)}catch(e){if("function"==typeof V.errorHandler)try{V.errorHandler(e)}catch(t){i.onErrored&&i.onErrored({type:"self-accept-error-handler-errored",moduleId:d,error:t,originalError:e}),i.ignoreErrored||q||(q=t),q||(q=e)}else i.onErrored&&i.onErrored({type:"self-accept-errored",moduleId:d,error:e}),i.ignoreErrored||q||(q=e)}}if(q)return _("fail"),Promise.reject(q);if(f)return t(i).then((function(e){return b.forEach((function(t){e.indexOf(t)<0&&e.push(t)})),e}));return _("idle"),new Promise((function(e){e(b)}))}(t=t||{})}function A(){if(f)return h||(h={}),f.forEach(j),f=void 0,!0}function j(t){Object.prototype.hasOwnProperty.call(h,t)||(h[t]=e[t])}var $={};function P(t){if($[t])return $[t].exports;var s=$[t]={i:t,l:!1,exports:{},hot:c(t),parents:(o=a,a=[],o),children:[]};return e[t].call(s.exports,s,s.exports,l(t)),s.l=!0,s.exports}P.m=e,P.c=$,P.d=function(e,t,s){P.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},P.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},P.t=function(e,t){if(1&t&&(e=P(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(P.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)P.d(s,i,function(t){return e[t]}.bind(null,i));return s},P.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return P.d(t,"a",t),t},P.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},P.p="",P.h=function(){return r},l("./src/advanced-tools.js")(P.s="./src/advanced-tools.js")}({"./node_modules/cssfilter/lib/css.js":function(e,t,s){var i=s("./node_modules/cssfilter/lib/default.js"),r=s("./node_modules/cssfilter/lib/parser.js");s("./node_modules/cssfilter/lib/util.js");function n(e){return null==e}function a(e){(e=function(e){var t={};for(var s in e)t[s]=e[s];return t}(e||{})).whiteList=e.whiteList||i.whiteList,e.onAttr=e.onAttr||i.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||i.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||i.safeAttrValue,this.options=e}a.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this.options,s=t.whiteList,i=t.onAttr,a=t.onIgnoreAttr,o=t.safeAttrValue;return r(e,(function(e,t,r,l,c){var u=s[r],d=!1;if(!0===u?d=u:"function"==typeof u?d=u(l):u instanceof RegExp&&(d=u.test(l)),!0!==d&&(d=!1),l=o(r,l)){var _,p={position:t,sourcePosition:e,source:c,isWhite:d};return d?n(_=i(r,l,p))?r+":"+l:_:n(_=a(r,l,p))?void 0:_}}))},e.exports=a},"./node_modules/cssfilter/lib/default.js":function(e,t){function s(){var e={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return e}var i=/javascript\s*\:/gim;t.whiteList=s(),t.getDefaultWhiteList=s,t.onAttr=function(e,t,s){},t.onIgnoreAttr=function(e,t,s){},t.safeAttrValue=function(e,t){return i.test(t)?"":t}},"./node_modules/cssfilter/lib/index.js":function(e,t,s){var i=s("./node_modules/cssfilter/lib/default.js"),r=s("./node_modules/cssfilter/lib/css.js");for(var n in(t=e.exports=function(e,t){return new r(t).process(e)}).FilterCSS=r,i)t[n]=i[n];"undefined"!=typeof window&&(window.filterCSS=e.exports)},"./node_modules/cssfilter/lib/parser.js":function(e,t,s){var i=s("./node_modules/cssfilter/lib/util.js");e.exports=function(e,t){";"!==(e=i.trimRight(e))[e.length-1]&&(e+=";");var s=e.length,r=!1,n=0,a=0,o="";function l(){if(!r){var s=i.trim(e.slice(n,a)),l=s.indexOf(":");if(-1!==l){var c=i.trim(s.slice(0,l)),u=i.trim(s.slice(l+1));if(c){var d=t(n,o.length,c,u,s);d&&(o+=d+"; ")}}}n=a+1}for(;a<s;a++){var c=e[a];if("/"===c&&"*"===e[a+1]){var u=e.indexOf("*/",a+2);if(-1===u)break;n=(a=u+1)+1,r=!1}else"("===c?r=!0:")"===c?r=!1:";"===c?r||l():"\n"===c&&l()}return i.trim(o)}},"./node_modules/cssfilter/lib/util.js":function(e,t){e.exports={indexOf:function(e,t){var s,i;if(Array.prototype.indexOf)return e.indexOf(t);for(s=0,i=e.length;s<i;s++)if(e[s]===t)return s;return-1},forEach:function(e,t,s){var i,r;if(Array.prototype.forEach)return e.forEach(t,s);for(i=0,r=e.length;i<r;i++)t.call(s,e[i],i,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}}},"./node_modules/vue-loader/lib/runtime/componentNormalizer.js":function(e,t,s){"use strict";function i(e,t,s,i,r,n,a,o){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=s,c._compiled=!0),i&&(c.functional=!0),n&&(c._scopeId="data-v-"+n),a?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},c._ssrRegister=l):r&&(l=o?function(){r.call(this,this.$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(e,t){return l.call(t),u(e,t)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:e,options:c}}s.d(t,"a",(function(){return i}))},"./node_modules/xss/lib/default.js":function(e,t,s){var i=s("./node_modules/cssfilter/lib/index.js").FilterCSS,r=s("./node_modules/cssfilter/lib/index.js").getDefaultWhiteList,n=s("./node_modules/xss/lib/util.js");function a(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]}}var o=new i;function l(e){return e.replace(c,"<").replace(u,">")}var c=/</g,u=/>/g,d=/"/g,_=/"/g,p=/&#([a-zA-Z0-9]*);?/gim,h=/:?/gim,m=/&newline;?/gim,f=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,v=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,g=/u\s*r\s*l\s*\(.*/gi;function b(e){return e.replace(d,""")}function y(e){return e.replace(_,'"')}function w(e){return e.replace(p,(function(e,t){return"x"===t[0]||"X"===t[0]?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))}))}function x(e){return e.replace(h,":").replace(m," ")}function C(e){for(var t="",s=0,i=e.length;s<i;s++)t+=e.charCodeAt(s)<32?" ":e.charAt(s);return n.trim(t)}function k(e){return e=C(e=x(e=w(e=y(e))))}function S(e){return e=l(e=b(e))}var T=/<!--[\s\S]*?-->/g;t.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]},t.getDefaultWhiteList=a,t.onTag=function(e,t,s){},t.onIgnoreTag=function(e,t,s){},t.onTagAttr=function(e,t,s){},t.onIgnoreTagAttr=function(e,t,s){},t.safeAttrValue=function(e,t,s,i){if(s=k(s),"href"===t||"src"===t){if("#"===(s=n.trim(s)))return"#";if("http://"!==s.substr(0,7)&&"https://"!==s.substr(0,8)&&"mailto:"!==s.substr(0,7)&&"tel:"!==s.substr(0,4)&&"#"!==s[0]&&"/"!==s[0])return""}else if("background"===t){if(f.lastIndex=0,f.test(s))return""}else if("style"===t){if(v.lastIndex=0,v.test(s))return"";if(g.lastIndex=0,g.test(s)&&(f.lastIndex=0,f.test(s)))return"";!1!==i&&(s=(i=i||o).process(s))}return s=S(s)},t.escapeHtml=l,t.escapeQuote=b,t.unescapeQuote=y,t.escapeHtmlEntities=w,t.escapeDangerHtml5Entities=x,t.clearNonPrintableCharacter=C,t.friendlyAttrValue=k,t.escapeAttrValue=S,t.onIgnoreTagStripAll=function(){return""},t.StripTagBody=function(e,t){"function"!=typeof t&&(t=function(){});var s=!Array.isArray(e),i=[],r=!1;return{onIgnoreTag:function(a,o,l){if(function(t){return!!s||-1!==n.indexOf(e,t)}(a)){if(l.isClosing){var c="[/removed]",u=l.position+c.length;return i.push([!1!==r?r:l.position,u]),r=!1,c}return r||(r=l.position),"[removed]"}return t(a,o,l)},remove:function(e){var t="",s=0;return n.forEach(i,(function(i){t+=e.slice(s,i[0]),s=i[1]})),t+=e.slice(s)}}},t.stripCommentTag=function(e){return e.replace(T,"")},t.stripBlankChar=function(e){var t=e.split("");return(t=t.filter((function(e){var t=e.charCodeAt(0);return 127!==t&&(!(t<=31)||(10===t||13===t))}))).join("")},t.cssFilter=o,t.getDefaultCSSWhiteList=r},"./node_modules/xss/lib/index.js":function(e,t,s){var i=s("./node_modules/xss/lib/default.js"),r=s("./node_modules/xss/lib/parser.js"),n=s("./node_modules/xss/lib/xss.js");function a(e,t){return new n(t).process(e)}for(var o in(t=e.exports=a).filterXSS=a,t.FilterXSS=n,i)t[o]=i[o];for(var o in r)t[o]=r[o];"undefined"!=typeof window&&(window.filterXSS=e.exports),"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=e.exports)},"./node_modules/xss/lib/parser.js":function(e,t,s){var i=s("./node_modules/xss/lib/util.js");function r(e){var t=i.spaceIndex(e);if(-1===t)var s=e.slice(1,-1);else s=e.slice(1,t+1);return"/"===(s=i.trim(s).toLowerCase()).slice(0,1)&&(s=s.slice(1)),"/"===s.slice(-1)&&(s=s.slice(0,-1)),s}function n(e){return"</"===e.slice(0,2)}var a=/[^a-zA-Z0-9_:\.\-]/gim;function o(e,t){for(;t<e.length;t++){var s=e[t];if(" "!==s)return"="===s?t:-1}}function l(e,t){for(;t>0;t--){var s=e[t];if(" "!==s)return"="===s?t:-1}}function c(e){return function(e){return'"'===e[0]&&'"'===e[e.length-1]||"'"===e[0]&&"'"===e[e.length-1]}(e)?e.substr(1,e.length-2):e}t.parseTag=function(e,t,s){var i="",a=0,o=!1,l=!1,c=0,u=e.length,d="",_="";for(c=0;c<u;c++){var p=e.charAt(c);if(!1===o){if("<"===p){o=c;continue}}else if(!1===l){if("<"===p){i+=s(e.slice(a,c)),o=c,a=c;continue}if(">"===p){i+=s(e.slice(a,o)),d=r(_=e.slice(o,c+1)),i+=t(o,i.length,d,_,n(_)),a=c+1,o=!1;continue}if(('"'===p||"'"===p)&&"="===e.charAt(c-1)){l=p;continue}}else if(p===l){l=!1;continue}}return a<e.length&&(i+=s(e.substr(a))),i},t.parseAttr=function(e,t){var s=0,r=[],n=!1,u=e.length;function d(e,s){if(!((e=(e=i.trim(e)).replace(a,"").toLowerCase()).length<1)){var n=t(e,s||"");n&&r.push(n)}}for(var _=0;_<u;_++){var p,h=e.charAt(_);if(!1!==n||"="!==h)if(!1===n||_!==s||'"'!==h&&"'"!==h||"="!==e.charAt(_-1))if(/\s|\n|\t/.test(h)){if(e=e.replace(/\s|\n|\t/g," "),!1===n){if(-1===(p=o(e,_))){d(i.trim(e.slice(s,_))),n=!1,s=_+1;continue}_=p-1;continue}if(-1===(p=l(e,_-1))){d(n,c(i.trim(e.slice(s,_)))),n=!1,s=_+1;continue}}else;else{if(-1===(p=e.indexOf(h,_+1)))break;d(n,i.trim(e.slice(s+1,p))),n=!1,s=(_=p)+1}else n=e.slice(s,_),s=_+1}return s<e.length&&(!1===n?d(e.slice(s)):d(n,c(i.trim(e.slice(s))))),i.trim(r.join(" "))}},"./node_modules/xss/lib/util.js":function(e,t){e.exports={indexOf:function(e,t){var s,i;if(Array.prototype.indexOf)return e.indexOf(t);for(s=0,i=e.length;s<i;s++)if(e[s]===t)return s;return-1},forEach:function(e,t,s){var i,r;if(Array.prototype.forEach)return e.forEach(t,s);for(i=0,r=e.length;i<r;i++)t.call(s,e[i],i,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/.exec(e);return t?t.index:-1}}},"./node_modules/xss/lib/xss.js":function(e,t,s){var i=s("./node_modules/cssfilter/lib/index.js").FilterCSS,r=s("./node_modules/xss/lib/default.js"),n=s("./node_modules/xss/lib/parser.js"),a=n.parseTag,o=n.parseAttr,l=s("./node_modules/xss/lib/util.js");function c(e){return null==e}function u(e){(e=function(e){var t={};for(var s in e)t[s]=e[s];return t}(e||{})).stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=r.onIgnoreTagStripAll),e.whiteList=e.whiteList||r.whiteList,e.onTag=e.onTag||r.onTag,e.onTagAttr=e.onTagAttr||r.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||r.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||r.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||r.safeAttrValue,e.escapeHtml=e.escapeHtml||r.escapeHtml,this.options=e,!1===e.css?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new i(e.css))}u.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this.options,s=t.whiteList,i=t.onTag,n=t.onIgnoreTag,u=t.onTagAttr,d=t.onIgnoreTagAttr,_=t.safeAttrValue,p=t.escapeHtml,h=this.cssFilter;t.stripBlankChar&&(e=r.stripBlankChar(e)),t.allowCommentTag||(e=r.stripCommentTag(e));var m=!1;if(t.stripIgnoreTagBody){m=r.StripTagBody(t.stripIgnoreTagBody,n);n=m.onIgnoreTag}var f=a(e,(function(e,t,r,a,m){var f,v={sourcePosition:e,position:t,isClosing:m,isWhite:s.hasOwnProperty(r)};if(!c(f=i(r,a,v)))return f;if(v.isWhite){if(v.isClosing)return"</"+r+">";var g=function(e){var t=l.spaceIndex(e);if(-1===t)return{html:"",closing:"/"===e[e.length-2]};var s="/"===(e=l.trim(e.slice(t+1,-1)))[e.length-1];return s&&(e=l.trim(e.slice(0,-1))),{html:e,closing:s}}(a),b=s[r],y=o(g.html,(function(e,t){var s,i=-1!==l.indexOf(b,e);return c(s=u(r,e,t,i))?i?(t=_(r,e,t,h))?e+'="'+t+'"':e:c(s=d(r,e,t,i))?void 0:s:s}));a="<"+r;return y&&(a+=" "+y),g.closing&&(a+=" /"),a+=">"}return c(f=n(r,a,v))?p(a):f}),p);return m&&(f=m.remove(f)),f},e.exports=u},"./src/advanced-tools.js":function(e,t,s){"use strict";s.r(t);var i=s("vue"),r=s.n(i),n=s("./src/helper/base_hepler.js"),a={mixins:[n.a],name:"mask-login",data:function(){return{misc:advanced_tools.misc,model:advanced_tools.model.mask_login,nonces:advanced_tools.nonces,endpoints:advanced_tools.endpoints,state:{on_saving:!1,original_state:!1}}},watch:{"model.mask_url":function(e){e=this.convertToSlug(e),this.model.mask_url=e,this.misc.new_login_url=this.misc.home_url+e,this.state.waiting_save=!0},"model.redirect_traffic_url":function(e){e=this.convertToSlug(e),this.model.redirect_traffic_url=e,this.misc.login_redirect_url=this.misc.home_url+e}},mounted:function(){this.state.original_state=this.model.mask_url.length>0},methods:{toggle:function(e){var t=this,s={};s.enabled=e,this.httpPostRequest("updateSettings",{data:JSON.stringify({settings:s,module:"mask-login"})},(function(){t.model.enabled=e}))},updateSettings:function(){var e=this.model,t=this;this.httpPostRequest("updateSettings",{data:JSON.stringify({settings:e,module:"mask-login"})},(function(){t.state.original_state=t.model.mask_url.length>0}))},convertToSlug:function(e){return e.toLowerCase().replace(/[^\w-/.]+/g,"")}},computed:{new_mask_login:function(){return this.misc.new_login_url},login_redirect_url:function(){return this.misc.login_redirect_url}}},o=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),l=Object(o.a)(a,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return!1===e.model.enabled?s("div",{staticClass:"sui-box",attrs:{id:"mask-login"}},[s("div",{staticClass:"sui-box-header"},[s("h3",{staticClass:"sui-box-title"},[e._v("\n\t\t\t\t"+e._s(e.__("Mask Login Area"))+"\n\t\t\t")])]),e._v(" "),s("div",{staticClass:"sui-message"},[e.maybeHideBranding()?e._e():s("img",{staticClass:"sui-image",attrs:{src:e.assetUrl("assets/img/2factor-disabled.svg"),"aria-hidden":"true"}}),e._v(" "),s("div",{staticClass:"sui-message-content"},[s("p",[e._v("\n\t\t\t\t\t"+e._s(e.__("Change the location of WordPress's default login area, making it harder for automated bots to find and also more convenient for your users."))+"\n\t\t\t\t")]),e._v(" "),s("form",{attrs:{method:"post"}},[s("submit-button",{attrs:{type:"button","css-class":"sui-button-blue activate",state:e.state},on:{click:function(t){return e.toggle(!0)}}},[e._v("\n\t\t\t\t\t\t"+e._s(e.__("Activate"))+"\n\t\t\t\t\t")])],1)])])]):s("div",{staticClass:"sui-box",attrs:{id:"mask-login"}},[s("div",{staticClass:"sui-box-header"},[s("h3",{staticClass:"sui-box-title"},[e._v("\n\t\t\t\t"+e._s(e.__("Mask Login Area"))+"\n\t\t\t")])]),e._v(" "),s("form",{attrs:{method:"post"},on:{submit:function(t){return t.preventDefault(),e.updateSettings(t)}}},[s("div",{staticClass:"sui-box-body"},[s("p",[e._v("\n\t\t\t\t\t"+e._s(e.__("Change your default WordPress login URL to hide your login area from hackers and bots."))+"\n\t\t\t\t")]),e._v(" "),!1!==e.misc.compatibility?s("div",{staticClass:"sui-notice sui-notice-error"},[s("div",{staticClass:"sui-notice-content"},[s("div",{staticClass:"sui-notice-message"},[s("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),e._v(" "),s("p",e._l(e.misc.compatibility,(function(t){return s("span",[e._v("\n "+e._s(t)+"\n ")])})),0)])])]):e._e(),e._v(" "),!1===e.state.original_state?s("div",{staticClass:"sui-notice sui-notice-warning"},[s("div",{staticClass:"sui-notice-content"},[s("div",{staticClass:"sui-notice-message"},[s("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),e._v(" "),s("p",[e._v("\n\t\t\t\t\t\t"+e._s(e.__("Masking is currently inactive. Choose your URL and save your settings to finish setup."))+"\n\t\t\t\t\t")])])])]):s("div",{staticClass:"sui-notice sui-notice-info"},[s("div",{staticClass:"sui-notice-content"},[s("div",{staticClass:"sui-notice-message"},[s("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),e._v(" "),s("p",[e._v("\n\t\t\t\t\t\t"+e._s(e.__("Masking is currently active at "))+" "),s("strong",{domProps:{textContent:e._s(e.misc.new_login_url)}})])])])]),e._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[e._v("\n "+e._s(e.__("Masking URL"))+"\n ")]),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n "+e._s(e.__("Choose the new URL slug where users of your website will now navigate to log in or register."))+"\n ")])]),e._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("span",{staticClass:"sui-description"},[e._v("\n "+e._s(e.__("You can specify any URLs. For security reasons, less obvious URLs are recommended as they are harder for bots to guess."))+"\n ")]),e._v(" "),s("div",{staticClass:"sui-form-field"},[s("label",{staticClass:"sui-label"},[e._v("\n\t\t\t\t\t\t\t\t"+e._s(e.__("New Login URL"))+"\n\t\t\t\t\t\t\t")]),e._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.mask_url,expression:"model.mask_url"}],staticClass:"sui-form-control",attrs:{type:"text",name:"mask_url",placeholder:"E.g. dashboard"},domProps:{value:e.model.mask_url},on:{input:function(t){t.target.composing||e.$set(e.model,"mask_url",t.target.value)}}}),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n "+e._s(e.__("Users will login at"))+" "),s("a",{attrs:{href:e.new_mask_login}},[e._v(e._s(e.new_mask_login))]),e._v(". "+e._s(e.__("Note: Registration and Password Reset emails have hardcoded URLs in them. We will update them automatically to match your new login URL"))+"\n ")])])])]),e._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[e._v("\n "+e._s(e.__("Redirect traffic"))+"\n ")]),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n "+e._s(e.__("With this feature you can send visitors and bots who try to visit the default Wordpress login URLs to a separate URL to avoid 404s."))+"\n ")])]),e._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("label",{staticClass:"sui-toggle"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.redirect_traffic,expression:"model.redirect_traffic"}],staticClass:"toggle-checkbox",attrs:{role:"presentation",type:"checkbox",name:"redirect_traffic",id:"redirect_traffic","true-value":!0,"false-value":!1},domProps:{checked:Array.isArray(e.model.redirect_traffic)?e._i(e.model.redirect_traffic,null)>-1:e.model.redirect_traffic},on:{change:function(t){var s=e.model.redirect_traffic,i=t.target,r=!!i.checked;if(Array.isArray(s)){var n=e._i(s,null);i.checked?n<0&&e.$set(e.model,"redirect_traffic",s.concat([null])):n>-1&&e.$set(e.model,"redirect_traffic",s.slice(0,n).concat(s.slice(n+1)))}else e.$set(e.model,"redirect_traffic",r)}}}),e._v(" "),s("span",{staticClass:"sui-toggle-slider"})]),e._v(" "),s("label",{staticClass:"sui-toggle-label",attrs:{for:"redirect_traffic"}},[e._v("\n\t\t\t\t\t\t\t"+e._s(e.__("Enable 404 redirection"))+"\n\t\t\t\t\t\t")]),e._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:!0===e.model.redirect_traffic,expression:"model.redirect_traffic===true"}],staticClass:"sui-border-frame sui-toggle-content",attrs:{id:"redirectTrafficContainer"}},[s("label",{staticClass:"sui-label"},[e._v(e._s(e.__("Redirection URL")))]),e._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.redirect_traffic_url,expression:"model.redirect_traffic_url"}],staticClass:"sui-form-control",attrs:{placeholder:"E.g. 404-error",type:"text",name:"redirect_traffic_url"},domProps:{value:e.model.redirect_traffic_url},on:{input:function(t){t.target.composing||e.$set(e.model,"redirect_traffic_url",t.target.value)}}}),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n "+e._s(e.__("Visitors who visit the default login URLs will be redirected to"))+" "),s("a",{attrs:{href:e.login_redirect_url}},[e._v(e._s(e.login_redirect_url))])])])])]),e._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[e._v("\n "+e._s(e.__("Deactivate"))+"\n ")]),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n "+e._s(e.__("Disable login area masking and return to the default wp-admin and wp-login URLS."))+"\n ")])]),e._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("submit-button",{attrs:{type:"button","css-class":"sui-button-ghost",state:e.state},on:{click:function(t){return e.toggle(!1)}}},[e._v("\n\t\t\t\t\t\t\t"+e._s(e.__("Deactivate"))+"\n\t\t\t\t\t\t")])],1)])]),e._v(" "),s("div",{staticClass:"sui-box-footer"},[s("submit-button",{attrs:{type:"submit",state:e.state,"css-class":"sui-button-blue save-changes"}},[s("i",{staticClass:"sui-icon-save",attrs:{"aria-hidden":"true"}}),e._v("\n\t\t\t\t\t"+e._s(e.__("Save Changes"))+"\n\t\t\t\t")])],1)])])}),[],!1,null,null,null).exports,c=s("./src/component/sidetab.vue"),u={components:{Sidetab:c.a},mixins:[n.a],props:["misc","model"],name:"sh-xframe",data:function(){return{state:{on_saving:!1},mode:this.misc.mode,values:this.misc.values,tabUrlsText:""}},created:function(){this.tabUrlsText=vsprintf(this.__("The page <strong>%s</strong> will only be displayed in a frame on the specified origin. One per line."),this.siteUrl)}},d=Object(o.a)(u,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"sui-toggle-content"},[s("span",{staticClass:"sui-description toogle-content-description"},[e._v("\n\t\t\t"+e._s(e.__("Choose whether or not you want to allow your webpages to be embedded inside iframes."))+"\n\t\t")]),e._v(" "),s("sidetab",{attrs:{active:e.model.sh_xframe_mode,slug:"sh_xframe_mode",labels:[{text:e.__("Sameorigin"),value:"sameorigin",mute:!1},{text:e.__("Allow-from"),value:"allow-from",mute:!1},{text:e.__("Deny"),value:"deny",mute:!1}]},on:{selected:function(t){e.model.sh_xframe_mode=t}},scopedSlots:e._u([{key:"sameorigin",fn:function(){return[s("p",{staticClass:"sui-p-small"},[e._v("\n "+e._s(e.__("The page can only be displayed in a frame on the same origin as the page itself. The spec leaves it up to browser vendors to decide whether this option applies to the top level, the parent, or the whole chain."))+"\n ")])]},proxy:!0},{key:"allow-from",fn:function(){return[s("div",{staticClass:"sui-form-field"},[s("label",{staticClass:"sui-label"},[e._v(e._s(e.__("Allow from URLs")))]),e._v(" "),s("textarea",{directives:[{name:"model",rawName:"v-model",value:e.model.sh_xframe_urls,expression:"model.sh_xframe_urls"}],staticClass:"sui-form-control",attrs:{name:"sh_xframe_urls",placeholder:e.__("Place allowed page URLs, one per line")},domProps:{value:e.model.sh_xframe_urls},on:{input:function(t){t.target.composing||e.$set(e.model,"sh_xframe_urls",t.target.value)}}}),e._v(" "),s("span",{staticClass:"sui-description",domProps:{innerHTML:e._s(e.tabUrlsText)}})])]},proxy:!0},{key:"deny",fn:function(){return[s("p",{staticClass:"sui-p-small"},[e._v("\n "+e._s(e.__("The page can’t be displayed in a frame, regardless of the site attempting to do so."))+"\n ")])]},proxy:!0}])})],1)}),[],!1,null,null,null).exports,_={components:{Sidetab:c.a},mixins:[n.a],props:["misc","model"],name:"sh_xss_protection",data:function(){return{state:{on_saving:!1},mode:this.misc.mode}}},p=Object(o.a)(_,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"sui-toggle-content"},[s("span",{staticClass:"sui-description toogle-content-description"},[e._v("\n "+e._s(e.__("Choose what level of protection X-XSS protection you would like to apply when XSS attacks are detected."))+"\n ")]),e._v(" "),s("sidetab",{attrs:{slug:"sh_xss_protection_mode",active:e.model.sh_xss_protection_mode,labels:[{text:e.__("Sanitize"),mute:!1,value:"sanitize"},{text:e.__("Block"),mute:!1,value:"block"}]},on:{selected:function(t){e.model.sh_xss_protection_mode=t}},scopedSlots:e._u([{key:"sanitize",fn:function(){return[s("p",{staticClass:"sui-p-small"},[e._v("\n "+e._s(e.__("If a cross-site scripting attack is detected, the browser will sanitize the page (remove the unsafe parts)."))+"\n ")])]},proxy:!0},{key:"block",fn:function(){return[s("span",{staticClass:"sui-description"},[e._v("\n "+e._s(e.__("Enables XSS filtering. Rather than sanitizing the page, the browser will prevent rendering of the page if an attack is detected."))+"\n ")])]},proxy:!0}])})],1)}),[],!1,null,null,null).exports,h={mixins:[n.a],name:"sh-content-type-options"},m=Object(o.a)(h,(function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"sui-toggle-content"},[t("span",{staticClass:"sui-description toogle-content-description"},[this._v("\n\t\t\t"+this._s(this.__("Defender will automatically enforce the 'nosniff' X-Content-Type-Options header to help prevent MIME type sniffing and XSS attacks."))+"\n\t\t")])])}),[],!1,null,null,null).exports,f={mixins:[n.a],name:"sh-strict-transport",props:["misc","model"],data:function(){return{state:{on_saving:!1},hsts_preload:this.misc.misc.hsts_preload,allow_subdomain:this.misc.misc.allow_subdomain,include_subdomain:this.misc.misc.include_subdomain,hsts_cache_duration:this.misc.misc.hsts_cache_duration}},created:function(){!1===this.allow_subdomain&&(this.include_subdomain=!1)},mounted:function(){var e=this;jQuery("#hsts-cache-duration").change((function(){var t=jQuery(this).val();e.hsts_cache_duration=t,e.$parent.$emit("hsts_maximum_age",t)}))},computed:{show_hsts_warning:function(){return 1===parseInt(this.model.hsts_preload)},hsts_warning_text:function(){return vsprintf(this.__('Note: Do not include the preload directive by default if you maintain a project that provides HTTPS configuration advice or provides an option to enable HSTS. Be aware that inclusion in the preload list cannot easily be undone. Domains can be removed, but it takes months for a change. Check <a target="_blank" href="%s">here</a> for more information.'),"https://hstspreload.org/")},text_browser_caching:function(){return vsprintf(this.__('Choose when the browser should cache and apply the Strict Transport Security policy for. The recommended value for HSTS Maximum age is at least 30 days. You can learn more about max-age value differences <a target="_blank" href="%s">here</a>.'),"https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security#Examples")}},watch:{"misc.hsts_cache_duration":function(){this.hsts_cache_duration=this.misc.hsts_cache_duration}}},v=Object(o.a)(f,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"sui-toggle-content"},[s("div",{staticClass:"sui-border-frame"},[s("label",{staticClass:"sui-checkbox",attrs:{for:"hsts_preload"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.hsts_preload,expression:"model.hsts_preload"}],attrs:{type:"checkbox",name:"model.hsts_preload","true-value":"1","false-value":"0","aria-labelledby":"label_hsts_preload",id:"hsts_preload"},domProps:{checked:Array.isArray(e.model.hsts_preload)?e._i(e.model.hsts_preload,null)>-1:e._q(e.model.hsts_preload,"1")},on:{change:function(t){var s=e.model.hsts_preload,i=t.target,r=i.checked?"1":"0";if(Array.isArray(s)){var n=e._i(s,null);i.checked?n<0&&e.$set(e.model,"hsts_preload",s.concat([null])):n>-1&&e.$set(e.model,"hsts_preload",s.slice(0,n).concat(s.slice(n+1)))}else e.$set(e.model,"hsts_preload",r)}}}),e._v(" "),s("span",{attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",{attrs:{id:"label_hsts_preload"}},[e._v(e._s(e.__("HSTS Preload")))])]),e._v(" "),s("span",{staticClass:"sui-description margin-bottom-10"},[e._v(e._s(e.__("Google maintains an HSTS preload service. By following the guidelines and successfully submitting your domain, browsers will never connect to your domain using an insecure connection.")))]),e._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:e.show_hsts_warning,expression:"show_hsts_warning"}],staticClass:"sui-notice sui-notice-warning"},[s("div",{staticClass:"sui-notice-content"},[s("div",{staticClass:"sui-notice-message"},[s("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),e._v(" "),s("p",{domProps:{innerHTML:e._s(e.hsts_warning_text)}})])])]),e._v(" "),!0===e.allow_subdomain?s("div",{staticClass:"margin-bottom-30"},[s("label",{staticClass:"sui-checkbox",attrs:{for:"include_subdomain"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.include_subdomain,expression:"model.include_subdomain"}],attrs:{type:"checkbox","true-value":"1","false-value":"0","aria-labelledby":"label_include_subdomain",id:"include_subdomain"},domProps:{checked:Array.isArray(e.model.include_subdomain)?e._i(e.model.include_subdomain,null)>-1:e._q(e.model.include_subdomain,"1")},on:{change:function(t){var s=e.model.include_subdomain,i=t.target,r=i.checked?"1":"0";if(Array.isArray(s)){var n=e._i(s,null);i.checked?n<0&&e.$set(e.model,"include_subdomain",s.concat([null])):n>-1&&e.$set(e.model,"include_subdomain",s.slice(0,n).concat(s.slice(n+1)))}else e.$set(e.model,"include_subdomain",r)}}}),e._v(" "),s("span",{attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",{attrs:{id:"label_include_subdomain"}},[e._v(e._s(e.__("Include Subdomains")))])]),e._v(" "),s("span",{staticClass:"sui-description margin-bottom-10"},[e._v(e._s(e.__("If this optional parameter is specified, this rule applies to all of the site's subdomains as well.")))])]):e._e(),e._v(" "),s("div",{staticClass:"toggle-content-header",style:{fontWeight:500}},[e._v(e._s(e.__("Browser Caching")))]),e._v(" "),s("span",{staticClass:"sui-description",domProps:{innerHTML:e._s(e.text_browser_caching)}}),e._v(" "),s("div",{staticClass:"sui-form-field"},[s("div",{staticClass:"sui-row"},[s("div",{staticClass:"sui-col-md-5"},[s("label",{staticClass:"sui-label",attrs:{for:"hsts-cache-duration",id:"label-hsts-cache-duration"}},[e._v(e._s(e.__("HSTS Maximum Age")))]),e._v(" "),s("select",{directives:[{name:"model",rawName:"v-model",value:e.model.hsts_cache_duration,expression:"model.hsts_cache_duration"}],staticClass:"sui-select-sm",attrs:{id:"hsts-cache-duration",name:"hsts_cache_duration","data-module":"sh-strict-transport","aria-labelledby":"label-hsts-cache-duration","data-key":"hsts_cache_duration"},on:{change:function(t){var s=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.model,"hsts_cache_duration",t.target.multiple?s:s[0])}}},[s("option",{attrs:{value:"1 hour"}},[e._v(e._s(e.__("1 hour")))]),e._v(" "),s("option",{attrs:{value:"24 hours"}},[e._v(e._s(e.__("24 hours")))]),e._v(" "),s("option",{attrs:{value:"7 days"}},[e._v(e._s(e.__("7 days")))]),e._v(" "),s("option",{attrs:{value:"30 days"}},[e._v(e._s(e.__("30 days")))]),e._v(" "),s("option",{attrs:{value:"3 months"}},[e._v(e._s(e.__("3 months")))]),e._v(" "),s("option",{attrs:{value:"6 months"}},[e._v(e._s(e.__("6 months")))]),e._v(" "),s("option",{attrs:{value:"1 year"}},[e._v(e._s(e.__("1 year")))]),e._v(" "),s("option",{attrs:{value:"2 years"}},[e._v(e._s(e.__("2 years")))])])])])])])])}),[],!1,null,null,null).exports,g={mixins:[n.a],name:"sh-referrer-policy",props:["misc","model"],data:function(){return{state:{on_saving:!1},mode:null,policyDesc:""}},created:function(){this.mode=this.misc.misc.mode},mounted:function(){var e=this;jQuery("#referrer-policy").change((function(){e.mode=jQuery(this).val()}))},watch:{mode:function(){"no-referrer"===this.mode&&(this.policyDesc=this.__("The Referer header will be omitted entirely. No referrer information is sent along with requests.")),"no-referrer-when-downgrade"===this.mode&&(this.policyDesc=this.__("This is the user agent's default behavior if no policy is specified. The origin is sent as referrer to a-priori as-much-secure destination (HTTPS->HTTPS), but isn't sent to a less secure destination (HTTPS->HTTP).")),"origin"===this.mode&&(this.policyDesc=this.__("Only send the origin of the document as the referrer in all cases. The document https://example.com/page.html will send the referrer https://example.com/.")),"origin-when-cross-origin"===this.mode&&(this.policyDesc=this.__("Send a full URL when performing a same-origin request, but only send the origin of the document for other cases.")),"same-origin"===this.mode&&(this.policyDesc=this.__("A referrer will be sent for same-site origins, but cross-origin requests will contain no referrer information.")),"strict-origin"===this.mode&&(this.policyDesc=this.__("Only send the origin of the document as the referrer to a-priori as-much-secure destination (HTTPS->HTTPS), but don't send it to a less secure destination (HTTPS->HTTP).")),"strict-origin-when-cross-origin"===this.mode&&(this.policyDesc=this.__("Send a full URL when performing a same-origin request, only send the origin of the document to a-priori as-much-secure destination (HTTPS->HTTPS), and send no header to a less secure destination (HTTPS->HTTP).")),"unsafe-url"===this.mode&&(this.policyDesc=this.__("Send a full URL (stripped from parameters) when performing a a same-origin or cross-origin request.")),this.$parent.$emit("mode_referrer_policy",this.mode)}}},b=Object(o.a)(g,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"sui-toggle-content"},[s("span",{staticClass:"sui-description toogle-content-description"},[e._v("\n\t\t"+e._s(e.__("Choose which referrer information to send along with requests."))+"\n\t")]),e._v(" "),s("div",{staticClass:"sui-border-frame"},[s("div",{staticClass:"sui-row"},[s("div",{staticClass:"sui-col-md-7"},[s("label",{staticClass:"sui-label",attrs:{for:"referrer-policy",id:"label-referrer-policy"}},[e._v(e._s(e.__("Referrer Information")))]),e._v(" "),s("select",{directives:[{name:"model",rawName:"v-model",value:e.model.sh_referrer_policy_mode,expression:"model.sh_referrer_policy_mode"}],staticClass:"sui-select-sm",attrs:{id:"referrer-policy",name:"sh_referrer_policy_mode","aria-labelledby":"label-referrer-policy"},on:{change:function(t){var s=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.model,"sh_referrer_policy_mode",t.target.multiple?s:s[0])}}},[s("option",{attrs:{value:"no-referrer"}},[e._v("no-referrer")]),e._v(" "),s("option",{attrs:{value:"no-referrer-when-downgrade"}},[e._v("no-referrer-when-downgrade")]),e._v(" "),s("option",{attrs:{value:"origin"}},[e._v("origin")]),e._v(" "),s("option",{attrs:{value:"origin-when-cross-origin"}},[e._v("origin-when-cross-origin")]),e._v(" "),s("option",{attrs:{value:"same-origin"}},[e._v("same-origin")]),e._v(" "),s("option",{attrs:{value:"strict-origin"}},[e._v("strict-origin")]),e._v(" "),s("option",{attrs:{value:"strict-origin-when-cross-origin"}},[e._v("strict-origin-when-cross-origin")]),e._v(" "),s("option",{attrs:{value:"unsafe-url"}},[e._v("unsafe-url")])])]),e._v(" "),s("div",{staticClass:"sui-col-md-12",style:{marginTop:"10px"}},[s("p",{staticClass:"sui-description",domProps:{innerHTML:e._s(e.policyDesc)}})])])])])}),[],!1,null,null,null).exports,y={components:{Sidetab:c.a},mixins:[n.a],props:["misc","model"],name:"sh-feature-policy",data:function(){return{state:{on_saving:!1},mode:this.misc.mode,values:this.misc.values,tabUrlsText:""}},created:function(){this.tabUrlsText=vsprintf(this.__("The feature is allowed for specific origins. Place URLs here %s, one per line."),"<strong>https://example.com</strong>")}},w=Object(o.a)(y,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"sui-toggle-content"},[s("span",{staticClass:"sui-description toogle-content-description"},[e._v("\n "+e._s(e.__("Choose an option that matches your requirements from the options below to prevent unwanted actions when your webpages are embedded elsewhere."))+"\n ")]),e._v(" "),s("sidetab",{attrs:{slug:"sh_feature_policy_mode",active:e.model.sh_feature_policy_mode,labels:[{text:e.__("On site & iframe"),mute:!1,value:"self"},{text:e.__("All"),mute:!1,value:"allow"},{text:e.__("Specific Origins"),mute:!1,value:"origins"},{text:e.__("None"),mute:!1,value:"none"}]},on:{selected:function(t){e.model.sh_feature_policy_mode=t}},scopedSlots:e._u([{key:"self",fn:function(){return[s("p",{staticClass:"sui-p-small"},[e._v("\n "+e._s(e.__("The page can only be displayed in a frame on the same origin as the page itself. The spec leaves it up to browser vendors to decide whether this option applies to the top level, the parent, or the whole chain."))+"\n ")])]},proxy:!0},{key:"allow",fn:function(){return[s("p",{staticClass:"sui-p-small"},[e._v("\n "+e._s(e.__("The feature will be allowed in this document, and all nested browsing contexts (iframes) regardless of their origin."))+"\n ")])]},proxy:!0},{key:"origins",fn:function(){return[s("div",{staticClass:"sui-form-field"},[s("label",{staticClass:"sui-label"},[e._v(e._s(e.__("Origin URL")))]),e._v(" "),s("textarea",{directives:[{name:"model",rawName:"v-model",value:e.model.sh_feature_policy_urls,expression:"model.sh_feature_policy_urls"}],staticClass:"sui-form-control",attrs:{name:"sh_feature_policy_urls",placeholder:e.__("Place URLs here, one per line")},domProps:{value:e.model.sh_feature_policy_urls},on:{input:function(t){t.target.composing||e.$set(e.model,"sh_feature_policy_urls",t.target.value)}}}),e._v(" "),s("span",{staticClass:"sui-description",domProps:{innerHTML:e._s(e.tabUrlsText)}})])]},proxy:!0},{key:"none",fn:function(){return[s("p",{staticClass:"sui-p-small"},[e._v("\n "+e._s(e.__("The feature is disabled in top-level and nested browsing contexts."))+"\n ")])]},proxy:!0}])})],1)}),[],!1,null,null,null).exports,x={mixins:[n.a],components:{"sh-xframe":d,"sh-xss-protection":p,"sh-content-type":m,"sh-strict-transport":v,"sh-referrer-policy":b,"sh-feature-policy":w},name:"security-headers",data:function(){return{misc:advanced_tools.misc.security_headers,model:advanced_tools.model.security_headers,nonces:advanced_tools.nonces,endpoints:advanced_tools.endpoints,state:{on_saving:!1,original_state:!1}}},methods:{updateSettings:function(){var e=this.model,t=this;this.httpPostRequest("updateSettings",{data:JSON.stringify({settings:e,module:"security-headers"})},(function(){t.state.original_state=!0}))},header_label:function(e){return this.vsprintf(this.__("Enable %s"),e)}},created:function(){this.$on("mode_referrer_policy",(function(e){this.model.sh_referrer_policy_mode=e})),this.$on("hsts_maximum_age",(function(e){this.model.hsts_cache_duration=e}))}},C=Object(o.a)(x,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"sui-box",attrs:{id:"security-headers"}},[s("div",{staticClass:"sui-box-header"},[s("h3",{staticClass:"sui-box-title"},[e._v("\n\t\t\t"+e._s(e.__("Security Headers"))+"\n\t\t")])]),e._v(" "),s("form",{attrs:{method:"post"},on:{submit:function(t){return t.preventDefault(),e.updateSettings(t)}}},[s("div",{staticClass:"sui-box-body"},[s("p",[e._v(e._s(e.__("Add extra security to your website by enabling and configuring the security headers.")))]),e._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[e._v("\n\t\t\t\t\t\t"+e._s(e.misc.sh_xframe.title)+"\n\t\t\t\t\t")]),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n\t\t\t\t\t\t"+e._s(e.misc.sh_xframe.misc.intro_text)+"\n\t\t\t\t\t")])]),e._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("div",{staticClass:"sui-form-field",attrs:{id:"sh_xframe_wrap"}},[s("label",{staticClass:"sui-toggle",attrs:{for:"sh_xframe"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.sh_xframe,expression:"model.sh_xframe"}],staticClass:"toggle-checkbox",attrs:{role:"presentation",type:"checkbox",name:"sh_xframe",id:"sh_xframe","aria-labelledby":"sh_xframe_label","false-value":!1,"true-value":!0},domProps:{checked:Array.isArray(e.model.sh_xframe)?e._i(e.model.sh_xframe,null)>-1:e.model.sh_xframe},on:{change:function(t){var s=e.model.sh_xframe,i=t.target,r=!!i.checked;if(Array.isArray(s)){var n=e._i(s,null);i.checked?n<0&&e.$set(e.model,"sh_xframe",s.concat([null])):n>-1&&e.$set(e.model,"sh_xframe",s.slice(0,n).concat(s.slice(n+1)))}else e.$set(e.model,"sh_xframe",r)}}}),e._v(" "),s("span",{staticClass:"sui-toggle-slider",attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",{staticClass:"sui-toggle-label",attrs:{id:"sh_xframe_label"}},[e._v(e._s(e.header_label(e.misc.sh_xframe.title)))])]),e._v(" "),s("sh-xframe",{directives:[{name:"show",rawName:"v-show",value:!0===e.model.sh_xframe,expression:"true === model.sh_xframe"}],attrs:{misc:e.misc.sh_xframe,model:e.model}})],1)])]),e._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[e._v("\n\t\t\t\t\t\t"+e._s(e.misc.sh_xss_protection.title)+"\n\t\t\t\t\t")]),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n\t\t\t\t\t\t"+e._s(e.misc.sh_xss_protection.misc.intro_text)+"\n\t\t\t\t\t")])]),e._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("div",{staticClass:"sui-form-field",attrs:{id:"sh_xss_protection_wrap"}},[s("label",{staticClass:"sui-toggle",attrs:{for:"sh_xss_protection"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.sh_xss_protection,expression:"model.sh_xss_protection"}],staticClass:"toggle-checkbox",attrs:{role:"presentation",type:"checkbox",name:"sh_xss_protection",id:"sh_xss_protection","aria-labelledby":"sh_xss_protection_label","false-value":!1,"true-value":!0},domProps:{checked:Array.isArray(e.model.sh_xss_protection)?e._i(e.model.sh_xss_protection,null)>-1:e.model.sh_xss_protection},on:{change:function(t){var s=e.model.sh_xss_protection,i=t.target,r=!!i.checked;if(Array.isArray(s)){var n=e._i(s,null);i.checked?n<0&&e.$set(e.model,"sh_xss_protection",s.concat([null])):n>-1&&e.$set(e.model,"sh_xss_protection",s.slice(0,n).concat(s.slice(n+1)))}else e.$set(e.model,"sh_xss_protection",r)}}}),e._v(" "),s("span",{staticClass:"sui-toggle-slider",attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",{staticClass:"sui-toggle-label",attrs:{id:"sh_xss_protection_label"}},[e._v(e._s(e.header_label(e.misc.sh_xss_protection.title)))])]),e._v(" "),s("sh-xss-protection",{directives:[{name:"show",rawName:"v-show",value:!0===e.model.sh_xss_protection,expression:"true === model.sh_xss_protection"}],attrs:{misc:e.misc.sh_xss_protection,model:e.model}})],1)])]),e._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[e._v("\n\t\t\t\t\t\t"+e._s(e.misc.sh_content_type_options.title)+"\n\t\t\t\t\t")]),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n\t\t\t\t\t\t"+e._s(e.misc.sh_content_type_options.misc.intro_text)+"\n\t\t\t\t\t")])]),e._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("div",{staticClass:"sui-form-field",attrs:{id:"sh_content_type_options_wrap"}},[s("label",{staticClass:"sui-toggle",attrs:{for:"sh_content_type_options"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.sh_content_type_options,expression:"model.sh_content_type_options"}],staticClass:"toggle-checkbox",attrs:{role:"presentation",type:"checkbox",name:"sh_content_type_options",id:"sh_content_type_options","aria-labelledby":"sh_content_type_options_label","false-value":!1,"true-value":!0},domProps:{checked:Array.isArray(e.model.sh_content_type_options)?e._i(e.model.sh_content_type_options,null)>-1:e.model.sh_content_type_options},on:{change:function(t){var s=e.model.sh_content_type_options,i=t.target,r=!!i.checked;if(Array.isArray(s)){var n=e._i(s,null);i.checked?n<0&&e.$set(e.model,"sh_content_type_options",s.concat([null])):n>-1&&e.$set(e.model,"sh_content_type_options",s.slice(0,n).concat(s.slice(n+1)))}else e.$set(e.model,"sh_content_type_options",r)}}}),e._v(" "),s("span",{staticClass:"sui-toggle-slider",attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",{staticClass:"sui-toggle-label",attrs:{id:"sh_content_type_options_label"}},[e._v(e._s(e.header_label(e.misc.sh_content_type_options.title)))])]),e._v(" "),s("sh-content-type",{directives:[{name:"show",rawName:"v-show",value:!0===e.model.sh_content_type_options,expression:"true === model.sh_content_type_options"}]})],1)])]),e._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[e._v("\n\t\t\t\t\t\t"+e._s(e.misc.sh_strict_transport.title)+"\n\t\t\t\t\t")]),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n\t\t\t\t\t\t"+e._s(e.misc.sh_strict_transport.misc.intro_text)+"\n\t\t\t\t\t")])]),e._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("div",{staticClass:"sui-form-field",attrs:{id:"sh_strict_transport_wrap"}},[s("label",{staticClass:"sui-toggle",attrs:{for:"sh_strict_transport"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.sh_strict_transport,expression:"model.sh_strict_transport"}],staticClass:"toggle-checkbox",attrs:{role:"presentation",type:"checkbox",name:"sh_strict_transport",id:"sh_strict_transport","aria-labelledby":"sh_strict_transport_label","false-value":!1,"true-value":!0},domProps:{checked:Array.isArray(e.model.sh_strict_transport)?e._i(e.model.sh_strict_transport,null)>-1:e.model.sh_strict_transport},on:{change:function(t){var s=e.model.sh_strict_transport,i=t.target,r=!!i.checked;if(Array.isArray(s)){var n=e._i(s,null);i.checked?n<0&&e.$set(e.model,"sh_strict_transport",s.concat([null])):n>-1&&e.$set(e.model,"sh_strict_transport",s.slice(0,n).concat(s.slice(n+1)))}else e.$set(e.model,"sh_strict_transport",r)}}}),e._v(" "),s("span",{staticClass:"sui-toggle-slider",attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",{staticClass:"sui-toggle-label",attrs:{id:"sh_strict_transport_label"}},[e._v(e._s(e.header_label(e.misc.sh_strict_transport.title)))])]),e._v(" "),s("sh-strict-transport",{directives:[{name:"show",rawName:"v-show",value:!0===e.model.sh_strict_transport,expression:"true === model.sh_strict_transport"}],attrs:{misc:e.misc.sh_strict_transport,model:e.model}})],1)])]),e._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[e._v("\n\t\t\t\t\t\t"+e._s(e.misc.sh_referrer_policy.title)+"\n\t\t\t\t\t")]),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n\t\t\t\t\t\t"+e._s(e.misc.sh_referrer_policy.misc.intro_text)+"\n\t\t\t\t\t")])]),e._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("div",{staticClass:"sui-form-field",attrs:{id:"sh_referrer_policy_wrap"}},[s("label",{staticClass:"sui-toggle",attrs:{for:"sh_referrer_policy"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.sh_referrer_policy,expression:"model.sh_referrer_policy"}],staticClass:"toggle-checkbox",attrs:{role:"presentation",type:"checkbox",name:"sh_referrer_policy",id:"sh_referrer_policy","aria-labelledby":"sh_referrer_policy_label","false-value":!1,"true-value":!0},domProps:{checked:Array.isArray(e.model.sh_referrer_policy)?e._i(e.model.sh_referrer_policy,null)>-1:e.model.sh_referrer_policy},on:{change:function(t){var s=e.model.sh_referrer_policy,i=t.target,r=!!i.checked;if(Array.isArray(s)){var n=e._i(s,null);i.checked?n<0&&e.$set(e.model,"sh_referrer_policy",s.concat([null])):n>-1&&e.$set(e.model,"sh_referrer_policy",s.slice(0,n).concat(s.slice(n+1)))}else e.$set(e.model,"sh_referrer_policy",r)}}}),e._v(" "),s("span",{staticClass:"sui-toggle-slider",attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",{staticClass:"sui-toggle-label",attrs:{id:"sh_referrer_policy_label"}},[e._v(e._s(e.header_label(e.misc.sh_referrer_policy.title)))])]),e._v(" "),s("sh-referrer-policy",{directives:[{name:"show",rawName:"v-show",value:!0===e.model.sh_referrer_policy,expression:"true === model.sh_referrer_policy"}],attrs:{misc:e.misc.sh_referrer_policy,model:e.model}})],1)])]),e._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[e._v("\n\t\t\t\t\t\t"+e._s(e.misc.sh_feature_policy.title)+"\n\t\t\t\t\t")]),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n\t\t\t\t\t\t"+e._s(e.misc.sh_feature_policy.misc.intro_text)+"\n\t\t\t\t\t")])]),e._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("div",{staticClass:"sui-form-field",attrs:{id:"sh_feature_policy_wrap"}},[s("label",{staticClass:"sui-toggle",attrs:{for:"sh_feature_policy"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.sh_feature_policy,expression:"model.sh_feature_policy"}],staticClass:"toggle-checkbox",attrs:{role:"presentation",type:"checkbox",name:"sh_feature_policy",id:"sh_feature_policy","aria-labelledby":"sh_feature_policy_label","false-value":!1,"true-value":!0},domProps:{checked:Array.isArray(e.model.sh_feature_policy)?e._i(e.model.sh_feature_policy,null)>-1:e.model.sh_feature_policy},on:{change:function(t){var s=e.model.sh_feature_policy,i=t.target,r=!!i.checked;if(Array.isArray(s)){var n=e._i(s,null);i.checked?n<0&&e.$set(e.model,"sh_feature_policy",s.concat([null])):n>-1&&e.$set(e.model,"sh_feature_policy",s.slice(0,n).concat(s.slice(n+1)))}else e.$set(e.model,"sh_feature_policy",r)}}}),e._v(" "),s("span",{staticClass:"sui-toggle-slider",attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",{staticClass:"sui-toggle-label",attrs:{id:"sh_feature_policy_label"}},[e._v(e._s(e.header_label(e.misc.sh_feature_policy.title)))])]),e._v(" "),s("sh-feature-policy",{directives:[{name:"show",rawName:"v-show",value:!0===e.model.sh_feature_policy,expression:"true === model.sh_feature_policy"}],attrs:{misc:e.misc.sh_feature_policy,model:e.model}})],1)])])]),e._v(" "),s("div",{staticClass:"sui-box-footer"},[s("div",{staticClass:"sui-actions-right"},[s("submit-button",{attrs:{type:"submit",state:e.state,"css-class":"sui-button-blue save-changes"}},[s("i",{staticClass:"sui-icon-save",attrs:{"aria-hidden":"true"}}),e._v("\n\t\t\t\t\t"+e._s(e.__("Save Changes"))+"\n\t\t\t\t")])],1)])])])}),[],!1,null,null,null).exports,k={mixins:[n.a],components:{"mask-login":l,"security-headers":C},data:function(){return{state:{on_saving:!1},whitelabel:defender.whitelabel,is_free:defender.is_free,view:""}},created:function(){var e=new URLSearchParams(window.location.search).get("view");null===e&&(e="mask-login"),this.view=e},watch:{view:function(e,t){history.replaceState({},null,this.adminUrl()+"admin.php?page=wdf-advanced-tools&view="+this.view)}},mounted:function(){self=this,jQuery(".sui-mobile-nav").change((function(){self.view=jQuery(this).val()}))}},S=Object(o.a)(k,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"sui-wrap",class:[e.maybeHighContrast()]},[s("div",{staticClass:"advanced-tools"},[s("div",{staticClass:"sui-header"},[s("h1",{staticClass:"sui-header-title"},[e._v(e._s(e.__("Advanced Tools")))]),e._v(" "),s("doc-link",{attrs:{link:"https://premium.wpmudev.org/docs/wpmu-dev-plugins/defender/#advanced-tools"}})],1),e._v(" "),s("div",{staticClass:"sui-row-with-sidenav"},[s("div",{staticClass:"sui-sidenav"},[s("ul",{staticClass:"sui-vertical-tabs sui-sidenav-hide-md"},[s("li",{staticClass:"sui-vertical-tab",class:{current:"mask-login"===e.view}},[s("a",{attrs:{"data-tab":"notfound_lockout",href:"#mask-login"},on:{click:function(t){t.preventDefault(),e.view="mask-login"}}},[e._v(e._s(e.__("Mask Login Area")))])]),e._v(" "),s("li",{staticClass:"sui-vertical-tab",class:{current:"security-headers"===e.view}},[s("a",{attrs:{role:"button",href:"#"},on:{click:function(t){t.preventDefault(),e.view="security-headers"}}},[e._v(e._s(e.__("Security Headers")))])])]),e._v(" "),s("div",{staticClass:"sui-sidenav-hide-lg"},[s("select",{staticClass:"sui-mobile-nav"},[s("option",{attrs:{value:"mask-login"}},[e._v(e._s(e.__("Mask Login Area")))]),e._v(" "),s("option",{attrs:{value:"security-headers"}},[e._v(e._s(e.__("Security Headers")))])])])]),e._v(" "),s("mask-login",{directives:[{name:"show",rawName:"v-show",value:"mask-login"===e.view,expression:"view==='mask-login'"}]}),e._v(" "),s("security-headers",{directives:[{name:"show",rawName:"v-show",value:"security-headers"===e.view,expression:"view==='security-headers'"}]})],1)]),e._v(" "),s("app-footer")],1)}),[],!1,null,null,null).exports,T=s("./src/component/submit-button.vue"),A=s("./src/component/footer.vue"),j=s("./src/component/doc-link.vue");r.a.component("app-footer",A.a),r.a.component("doc-link",j.a),r.a.component("submit-button",T.a);new r.a({el:"#defender",components:{advanced_tools:S},render:function(e){return e(S)}})},"./src/component/doc-link.vue":function(e,t,s){"use strict";var i={mixins:[s("./src/helper/base_hepler.js").a],name:"doc-link",props:["link"],data:function(){return{whitelabel:defender.whitelabel,is_free:parseInt(defender.is_free)}}},r=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),n=Object(r.a)(i,(function(){var e=this.$createElement,t=this._self._c||e;return 1!==this.is_free&&!1===this.whitelabel.hide_doc_link?t("div",{staticClass:"sui-actions-right"},[t("a",{staticClass:"sui-button sui-button-ghost",attrs:{href:this.link,target:"_blank"}},[t("i",{staticClass:"sui-icon-academy"}),this._v(" "+this._s(this.__("View Documentation"))+"\n ")])]):this._e()}),[],!1,null,null,null);t.a=n.exports},"./src/component/footer.vue":function(e,t,s){"use strict";var i={data:function(){return{whitelabel:defender.whitelabel,is_free:parseInt(defender.is_free)}}},r=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),n=Object(r.a)(i,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[!0===e.whitelabel.change_footer?s("div",{staticClass:"sui-footer"},[e._v("\n "+e._s(e.whitelabel.footer_text)+"\n ")]):s("div",{staticClass:"sui-footer"},[e._v("Made with "),s("i",{staticClass:"sui-icon-heart"}),e._v(" by WPMU DEV")]),e._v(" "),!1===e.whitelabel.hide_doc_link?s("div",[1===e.is_free?s("ul",{staticClass:"sui-footer-nav"},[e._m(0),e._v(" "),e._m(1),e._v(" "),e._m(2),e._v(" "),e._m(3),e._v(" "),e._m(4),e._v(" "),e._m(5),e._v(" "),e._m(6),e._v(" "),e._m(7)]):s("ul",{staticClass:"sui-footer-nav"},[e._m(8),e._v(" "),e._m(9),e._v(" "),e._m(10),e._v(" "),e._m(11),e._v(" "),e._m(12),e._v(" "),e._m(13),e._v(" "),e._m(14),e._v(" "),e._m(15)]),e._v(" "),e._m(16)]):e._e()])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://profiles.wordpress.org/wpmudev#content-plugins",target:"_blank"}},[this._v("Free\n Plugins")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/features/",target:"_blank"}},[this._v("Membership")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/roadmap/",target:"_blank"}},[this._v("Roadmap")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://wordpress.org/support/plugin/plugin-name",target:"_blank"}},[this._v("Support")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/docs/",target:"_blank"}},[this._v("Docs")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/hub/",target:"_blank"}},[this._v("The Hub")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/terms-of-service/",target:"_blank"}},[this._v("Terms of Service")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://incsub.com/privacy-policy/",target:"_blank"}},[this._v("Privacy Policy")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/hub/",target:"_blank"}},[this._v("The Hub")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/projects/category/plugins/",target:"_blank"}},[this._v("Plugins")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/roadmap/",target:"_blank"}},[this._v("Roadmap")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/hub/support/",target:"_blank"}},[this._v("Support")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/docs/",target:"_blank"}},[this._v("Docs")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/hub/community/",target:"_blank"}},[this._v("Community")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/terms-of-service/",target:"_blank"}},[this._v("Terms of Service")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://incsub.com/privacy-policy/",target:"_blank"}},[this._v("Privacy Policy")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("ul",{staticClass:"sui-footer-social"},[s("li",[s("a",{attrs:{href:"https://www.facebook.com/wpmudev",target:"_blank"}},[s("i",{staticClass:"sui-icon-social-facebook",attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",{staticClass:"sui-screen-reader-text"},[e._v("Facebook")])])]),e._v(" "),s("li",[s("a",{attrs:{href:"https://twitter.com/wpmudev",target:"_blank"}},[s("i",{staticClass:"sui-icon-social-twitter",attrs:{"aria-hidden":"true"}})]),e._v(" "),s("span",{staticClass:"sui-screen-reader-text"},[e._v("Twitter")])]),e._v(" "),s("li",[s("a",{attrs:{href:"https://www.instagram.com/wpmu_dev/",target:"_blank"}},[s("i",{staticClass:"sui-icon-instagram",attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",{staticClass:"sui-screen-reader-text"},[e._v("Instagram")])])])])}],!1,null,null,null);t.a=n.exports},"./src/component/sidetab.vue":function(e,t,s){"use strict";var i={name:"sidetab",props:["labels","slug","active"],methods:{getBoxId:function(e){return this.slug+e+"_box"},getId:function(e){return this.slug+e},getClass:function(e){if(this.active===e)return"active"}}},r=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),n=Object(r.a)(i,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"sui-side-tabs"},[s("div",{staticClass:"sui-tabs-menu"},e._l(e.labels,(function(t){return s("label",{staticClass:"sui-tab-item",class:e.getClass(t.value),attrs:{for:e.getId(t.value)},on:{click:function(s){return e.$emit("selected",t.value)}}},[s("input",{attrs:{type:"radio",name:e.slug,id:e.getId(t.value),"data-tab-menu":e.getBoxId(t.key)},domProps:{value:t.value}}),e._v("\n "+e._s(t.text)+"\n ")])})),0),e._v(" "),s("div",{staticClass:"sui-tabs-content"},[e._l(e.labels,(function(t){return!0!==t.mute?s("div",{staticClass:"sui-tab-content sui-tab-boxed",class:e.getClass(t.value),attrs:{id:e.getBoxId(t.key)}},[e._t(t.value)],2):e._e()})),e._v(" "),e._t("shared")],2)])}),[],!1,null,null,null);t.a=n.exports},"./src/component/submit-button.vue":function(e,t,s){"use strict";var i={name:"submit-button",props:["id","state","text","css-class","type"],computed:{getClass:function(){return"sui-button "+this.cssClass}}},r=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),n=Object(r.a)(i,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("button",{staticClass:"sui-button",class:[e.getClass,{"sui-button-onload":e.state.on_saving}],attrs:{id:e.id,type:e.type,disabled:e.state.on_saving},on:{click:function(t){return e.$emit("click")}}},[s("span",{staticClass:"sui-loading-text"},[e._t("default")],2),e._v(" "),s("i",{staticClass:"sui-icon-loader sui-loading",attrs:{"aria-hidden":"true"}})])}),[],!1,null,null,null);t.a=n.exports},"./src/helper/base_hepler.js":function(e,t,s){"use strict";var i=s("./node_modules/xss/lib/index.js"),r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var s=[],i=!0,r=!1,n=void 0;try{for(var a,o=e[Symbol.iterator]();!(i=(a=o.next()).done)&&(s.push(a.value),!t||s.length!==t);i=!0);}catch(e){r=!0,n=e}finally{try{!i&&o.return&&o.return()}finally{if(r)throw n}}return s}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},n=wp.i18n,a={whiteList:{a:["href","title","target"],span:["class"],strong:["*"]},safeAttrValue:function(e,t,s,r){return"a"===e&&"href"===t&&"%s"===s?"%s":Object(i.safeAttrValue)(e,t,s,r)}},o=new i.FilterXSS(a),l=[];t.a={methods:{__:function(e){var t=n.__(e,"wpdef");return o.process(t)},xss:function(e){return o.process(e)},vsprintf:function(e){return n.sprintf.apply(null,arguments)},siteUrl:function(e){return void 0!==e?defender.site_url+e:defender.site_url},adminUrl:function(e){return void 0!==e?defender.admin_url+e:defender.admin_url},assetUrl:function(e){return defender.defender_url+e},maybeHighContrast:function(){return{"sui-color-accessible":!0===defender.misc.high_contrast}},maybeHideBranding:function(){return defender.whitelabel.hide_branding},isWhitelabelEnabled:function(){return defender.whitelabel.enabled},campaign_url:function(e){return"https://premium.wpmudev.org/project/wp-defender/?utm_source=defender&utm_medium=plugin&utm_campaign="+e},campaignUrl:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"https://premium.wpmudev.org/"+e+"?utm_source=defender&utm_medium=plugin&utm_campaign="+t},httpRequest:function(e,t,s,i,r){var n=this;void 0===r&&(this.state.on_saving=!0);var a=ajaxurl+"?action="+this.endpoints[t]+"&_wpnonce="+this.nonces[t],o=jQuery.ajax({url:a,method:e,data:s,success:function(e){var t=e.data;n.state.on_saving=!1,void 0!==t&&void 0!==t.message&&(e.success?Defender.showNotification("success",t.message):Defender.showNotification("error",t.message)),void 0!==i&&i(e)}});l.push(o)},httpGetRequest:function(e,t,s,i){this.httpRequest("get",e,t,s,i)},httpPostRequest:function(e,t,s,i){this.httpRequest("post",e,t,s,i)},abortAllRequests:function(){for(var e=0;e<l.length;e++)l[e].abort()},getQueryStringParams:function(e){return e?(/^[?#]/.test(e)?e.slice(1):e).split("&").reduce((function(e,t){var s=t.split("="),i=r(s,2),n=i[0],a=i[1];return e[n]=a?decodeURIComponent(a.replace(/\+/g," ")):"",e}),{}):{}},rebindSUI:function(){jQuery("select:not([multiple])").each((function(){SUI.suiSelect(this)})),jQuery(".sui-accordion").each((function(){SUI.suiAccordion(this)})),SUI.modalDialog()}}}},vue:function(e,t){e.exports=Vue}});
|
assets/app/audit.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t=window.webpackHotUpdate;window.webpackHotUpdate=function(e,s){!function(e,t){if(!w[e]||!b[e])return;for(var s in b[e]=!1,t)Object.prototype.hasOwnProperty.call(t,s)&&(m[s]=t[s]);0==--v&&0===g&&S()}(e,s),t&&t(e,s)};var s,i=!0,n="b39acf366faa9b224a1a",a={},r=[],o=[];function l(e){var t=Y[e];if(!t)return T;var i=function(i){return t.hot.active?(Y[i]?-1===Y[i].parents.indexOf(e)&&Y[i].parents.push(e):(r=[e],s=i),-1===t.children.indexOf(i)&&t.children.push(i)):(console.warn("[HMR] unexpected require("+i+") from disposed module "+e),r=[]),T(i)},n=function(e){return{configurable:!0,enumerable:!0,get:function(){return T[e]},set:function(t){T[e]=t}}};for(var a in T)Object.prototype.hasOwnProperty.call(T,a)&&"e"!==a&&"t"!==a&&Object.defineProperty(i,a,n(a));return i.e=function(e){return"ready"===c&&h("prepare"),g++,T.e(e).then(t,(function(e){throw t(),e}));function t(){g--,"prepare"===c&&(y[e]||C(e),0===g&&0===v&&S())}},i.t=function(e,t){return 1&t&&(e=i(e)),T.t(e,-2&t)},i}function u(t){var i={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:s!==t,active:!0,accept:function(e,t){if(void 0===e)i._selfAccepted=!0;else if("function"==typeof e)i._selfAccepted=e;else if("object"==typeof e)for(var s=0;s<e.length;s++)i._acceptedDependencies[e[s]]=t||function(){};else i._acceptedDependencies[e]=t||function(){}},decline:function(e){if(void 0===e)i._selfDeclined=!0;else if("object"==typeof e)for(var t=0;t<e.length;t++)i._declinedDependencies[e[t]]=!0;else i._declinedDependencies[e]=!0},dispose:function(e){i._disposeHandlers.push(e)},addDisposeHandler:function(e){i._disposeHandlers.push(e)},removeDisposeHandler:function(e){var t=i._disposeHandlers.indexOf(e);t>=0&&i._disposeHandlers.splice(t,1)},invalidate:function(){switch(this._selfInvalidated=!0,c){case"idle":(m={})[t]=e[t],h("ready");break;case"ready":O(t);break;case"prepare":case"check":case"dispose":case"apply":(p=p||[]).push(t)}},check:x,apply:D,status:function(e){if(!e)return c;d.push(e)},addStatusHandler:function(e){d.push(e)},removeStatusHandler:function(e){var t=d.indexOf(e);t>=0&&d.splice(t,1)},data:a[t]};return s=void 0,i}var d=[],c="idle";function h(e){c=e;for(var t=0;t<d.length;t++)d[t].call(null,e)}var f,m,_,p,v=0,g=0,y={},b={},w={};function k(e){return+e+""===e?+e:e}function x(e){if("idle"!==c)throw new Error("check() is only allowed in idle status");return i=e,h("check"),(t=1e4,t=t||1e4,new Promise((function(e,s){if("undefined"==typeof XMLHttpRequest)return s(new Error("No browser support"));try{var i=new XMLHttpRequest,a=T.p+""+n+".hot-update.json";i.open("GET",a,!0),i.timeout=t,i.send(null)}catch(e){return s(e)}i.onreadystatechange=function(){if(4===i.readyState)if(0===i.status)s(new Error("Manifest request to "+a+" timed out."));else if(404===i.status)e();else if(200!==i.status&&304!==i.status)s(new Error("Manifest request to "+a+" failed."));else{try{var t=JSON.parse(i.responseText)}catch(e){return void s(e)}e(t)}}}))).then((function(e){if(!e)return h(M()?"ready":"idle"),null;b={},y={},w=e.c,_=e.h,h("prepare");var t=new Promise((function(e,t){f={resolve:e,reject:t}}));m={};return C(1),"prepare"===c&&0===g&&0===v&&S(),t}));var t}function C(e){w[e]?(b[e]=!0,v++,function(e){var t=document.createElement("script");t.charset="utf-8",t.src=T.p+""+e+"."+n+".hot-update.js",document.head.appendChild(t)}(e)):y[e]=!0}function S(){h("ready");var e=f;if(f=null,e)if(i)Promise.resolve().then((function(){return D(i)})).then((function(t){e.resolve(t)}),(function(t){e.reject(t)}));else{var t=[];for(var s in m)Object.prototype.hasOwnProperty.call(m,s)&&t.push(k(s));e.resolve(t)}}function D(t){if("ready"!==c)throw new Error("apply() is only allowed in ready status");return function t(i){var o,l,u,d,c;function f(e){for(var t=[e],s={},i=t.map((function(e){return{chain:[e],id:e}}));i.length>0;){var n=i.pop(),a=n.id,r=n.chain;if((d=Y[a])&&(!d.hot._selfAccepted||d.hot._selfInvalidated)){if(d.hot._selfDeclined)return{type:"self-declined",chain:r,moduleId:a};if(d.hot._main)return{type:"unaccepted",chain:r,moduleId:a};for(var o=0;o<d.parents.length;o++){var l=d.parents[o],u=Y[l];if(u){if(u.hot._declinedDependencies[a])return{type:"declined",chain:r.concat([l]),moduleId:a,parentId:l};-1===t.indexOf(l)&&(u.hot._acceptedDependencies[a]?(s[l]||(s[l]=[]),v(s[l],[a])):(delete s[l],t.push(l),i.push({chain:r.concat([l]),id:l})))}}}}return{type:"accepted",moduleId:e,outdatedModules:t,outdatedDependencies:s}}function v(e,t){for(var s=0;s<t.length;s++){var i=t[s];-1===e.indexOf(i)&&e.push(i)}}M();var g={},y=[],b={},x=function(){console.warn("[HMR] unexpected require("+S.moduleId+") to disposed module")};for(var C in m)if(Object.prototype.hasOwnProperty.call(m,C)){var S;c=k(C),S=m[C]?f(c):{type:"disposed",moduleId:C};var D=!1,O=!1,P=!1,j="";switch(S.chain&&(j="\nUpdate propagation: "+S.chain.join(" -> ")),S.type){case"self-declined":i.onDeclined&&i.onDeclined(S),i.ignoreDeclined||(D=new Error("Aborted because of self decline: "+S.moduleId+j));break;case"declined":i.onDeclined&&i.onDeclined(S),i.ignoreDeclined||(D=new Error("Aborted because of declined dependency: "+S.moduleId+" in "+S.parentId+j));break;case"unaccepted":i.onUnaccepted&&i.onUnaccepted(S),i.ignoreUnaccepted||(D=new Error("Aborted because "+c+" is not accepted"+j));break;case"accepted":i.onAccepted&&i.onAccepted(S),O=!0;break;case"disposed":i.onDisposed&&i.onDisposed(S),P=!0;break;default:throw new Error("Unexception type "+S.type)}if(D)return h("abort"),Promise.reject(D);if(O)for(c in b[c]=m[c],v(y,S.outdatedModules),S.outdatedDependencies)Object.prototype.hasOwnProperty.call(S.outdatedDependencies,c)&&(g[c]||(g[c]=[]),v(g[c],S.outdatedDependencies[c]));P&&(v(y,[S.moduleId]),b[c]=x)}var A,E=[];for(l=0;l<y.length;l++)c=y[l],Y[c]&&Y[c].hot._selfAccepted&&b[c]!==x&&!Y[c].hot._selfInvalidated&&E.push({module:c,parents:Y[c].parents.slice(),errorHandler:Y[c].hot._selfAccepted});h("dispose"),Object.keys(w).forEach((function(e){!1===w[e]&&function(e){delete installedChunks[e]}(e)}));var L,R,N=y.slice();for(;N.length>0;)if(c=N.pop(),d=Y[c]){var I={},H=d.hot._disposeHandlers;for(u=0;u<H.length;u++)(o=H[u])(I);for(a[c]=I,d.hot.active=!1,delete Y[c],delete g[c],u=0;u<d.children.length;u++){var U=Y[d.children[u]];U&&((A=U.parents.indexOf(c))>=0&&U.parents.splice(A,1))}}for(c in g)if(Object.prototype.hasOwnProperty.call(g,c)&&(d=Y[c]))for(R=g[c],u=0;u<R.length;u++)L=R[u],(A=d.children.indexOf(L))>=0&&d.children.splice(A,1);h("apply"),void 0!==_&&(n=_,_=void 0);for(c in m=void 0,b)Object.prototype.hasOwnProperty.call(b,c)&&(e[c]=b[c]);var W=null;for(c in g)if(Object.prototype.hasOwnProperty.call(g,c)&&(d=Y[c])){R=g[c];var F=[];for(l=0;l<R.length;l++)if(L=R[l],o=d.hot._acceptedDependencies[L]){if(-1!==F.indexOf(o))continue;F.push(o)}for(l=0;l<F.length;l++){o=F[l];try{o(R)}catch(e){i.onErrored&&i.onErrored({type:"accept-errored",moduleId:c,dependencyId:R[l],error:e}),i.ignoreErrored||W||(W=e)}}}for(l=0;l<E.length;l++){var V=E[l];c=V.module,r=V.parents,s=c;try{T(c)}catch(e){if("function"==typeof V.errorHandler)try{V.errorHandler(e)}catch(t){i.onErrored&&i.onErrored({type:"self-accept-error-handler-errored",moduleId:c,error:t,originalError:e}),i.ignoreErrored||W||(W=t),W||(W=e)}else i.onErrored&&i.onErrored({type:"self-accept-errored",moduleId:c,error:e}),i.ignoreErrored||W||(W=e)}}if(W)return h("fail"),Promise.reject(W);if(p)return t(i).then((function(e){return y.forEach((function(t){e.indexOf(t)<0&&e.push(t)})),e}));return h("idle"),new Promise((function(e){e(y)}))}(t=t||{})}function M(){if(p)return m||(m={}),p.forEach(O),p=void 0,!0}function O(t){Object.prototype.hasOwnProperty.call(m,t)||(m[t]=e[t])}var Y={};function T(t){if(Y[t])return Y[t].exports;var s=Y[t]={i:t,l:!1,exports:{},hot:u(t),parents:(o=r,r=[],o),children:[]};return e[t].call(s.exports,s,s.exports,l(t)),s.l=!0,s.exports}T.m=e,T.c=Y,T.d=function(e,t,s){T.o(e,t)||Object.defineProperty(e,t,{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,t){if(1&t&&(e=T(e)),8&t)return e;if(4&t&&"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&t&&"string"!=typeof e)for(var i in e)T.d(s,i,function(t){return e[t]}.bind(null,i));return s},T.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return T.d(t,"a",t),t},T.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},T.p="",T.h=function(){return n},l("./src/audit.js")(T.s="./src/audit.js")}({"./node_modules/cssfilter/lib/css.js":function(e,t,s){var i=s("./node_modules/cssfilter/lib/default.js"),n=s("./node_modules/cssfilter/lib/parser.js");s("./node_modules/cssfilter/lib/util.js");function a(e){return null==e}function r(e){(e=function(e){var t={};for(var s in e)t[s]=e[s];return t}(e||{})).whiteList=e.whiteList||i.whiteList,e.onAttr=e.onAttr||i.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||i.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||i.safeAttrValue,this.options=e}r.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this.options,s=t.whiteList,i=t.onAttr,r=t.onIgnoreAttr,o=t.safeAttrValue;return n(e,(function(e,t,n,l,u){var d=s[n],c=!1;if(!0===d?c=d:"function"==typeof d?c=d(l):d instanceof RegExp&&(c=d.test(l)),!0!==c&&(c=!1),l=o(n,l)){var h,f={position:t,sourcePosition:e,source:u,isWhite:c};return c?a(h=i(n,l,f))?n+":"+l:h:a(h=r(n,l,f))?void 0:h}}))},e.exports=r},"./node_modules/cssfilter/lib/default.js":function(e,t){function s(){var e={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return e}var i=/javascript\s*\:/gim;t.whiteList=s(),t.getDefaultWhiteList=s,t.onAttr=function(e,t,s){},t.onIgnoreAttr=function(e,t,s){},t.safeAttrValue=function(e,t){return i.test(t)?"":t}},"./node_modules/cssfilter/lib/index.js":function(e,t,s){var i=s("./node_modules/cssfilter/lib/default.js"),n=s("./node_modules/cssfilter/lib/css.js");for(var a in(t=e.exports=function(e,t){return new n(t).process(e)}).FilterCSS=n,i)t[a]=i[a];"undefined"!=typeof window&&(window.filterCSS=e.exports)},"./node_modules/cssfilter/lib/parser.js":function(e,t,s){var i=s("./node_modules/cssfilter/lib/util.js");e.exports=function(e,t){";"!==(e=i.trimRight(e))[e.length-1]&&(e+=";");var s=e.length,n=!1,a=0,r=0,o="";function l(){if(!n){var s=i.trim(e.slice(a,r)),l=s.indexOf(":");if(-1!==l){var u=i.trim(s.slice(0,l)),d=i.trim(s.slice(l+1));if(u){var c=t(a,o.length,u,d,s);c&&(o+=c+"; ")}}}a=r+1}for(;r<s;r++){var u=e[r];if("/"===u&&"*"===e[r+1]){var d=e.indexOf("*/",r+2);if(-1===d)break;a=(r=d+1)+1,n=!1}else"("===u?n=!0:")"===u?n=!1:";"===u?n||l():"\n"===u&&l()}return i.trim(o)}},"./node_modules/cssfilter/lib/util.js":function(e,t){e.exports={indexOf:function(e,t){var s,i;if(Array.prototype.indexOf)return e.indexOf(t);for(s=0,i=e.length;s<i;s++)if(e[s]===t)return s;return-1},forEach:function(e,t,s){var i,n;if(Array.prototype.forEach)return e.forEach(t,s);for(i=0,n=e.length;i<n;i++)t.call(s,e[i],i,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}}},"./node_modules/lodash/_Symbol.js":function(e,t,s){var i=s("./node_modules/lodash/_root.js").Symbol;e.exports=i},"./node_modules/lodash/_baseGetTag.js":function(e,t,s){var i=s("./node_modules/lodash/_Symbol.js"),n=s("./node_modules/lodash/_getRawTag.js"),a=s("./node_modules/lodash/_objectToString.js"),r=i?i.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":r&&r in Object(e)?n(e):a(e)}},"./node_modules/lodash/_baseSlice.js":function(e,t){e.exports=function(e,t,s){var i=-1,n=e.length;t<0&&(t=-t>n?0:n+t),(s=s>n?n:s)<0&&(s+=n),n=t>s?0:s-t>>>0,t>>>=0;for(var a=Array(n);++i<n;)a[i]=e[i+t];return a}},"./node_modules/lodash/_freeGlobal.js":function(e,t,s){(function(t){var s="object"==typeof t&&t&&t.Object===Object&&t;e.exports=s}).call(this,s("./node_modules/webpack/buildin/global.js"))},"./node_modules/lodash/_getRawTag.js":function(e,t,s){var i=s("./node_modules/lodash/_Symbol.js"),n=Object.prototype,a=n.hasOwnProperty,r=n.toString,o=i?i.toStringTag:void 0;e.exports=function(e){var t=a.call(e,o),s=e[o];try{e[o]=void 0;var i=!0}catch(e){}var n=r.call(e);return i&&(t?e[o]=s:delete e[o]),n}},"./node_modules/lodash/_isIndex.js":function(e,t){var s=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var i=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==i||"symbol"!=i&&s.test(e))&&e>-1&&e%1==0&&e<t}},"./node_modules/lodash/_isIterateeCall.js":function(e,t,s){var i=s("./node_modules/lodash/eq.js"),n=s("./node_modules/lodash/isArrayLike.js"),a=s("./node_modules/lodash/_isIndex.js"),r=s("./node_modules/lodash/isObject.js");e.exports=function(e,t,s){if(!r(s))return!1;var o=typeof t;return!!("number"==o?n(s)&&a(t,s.length):"string"==o&&t in s)&&i(s[t],e)}},"./node_modules/lodash/_objectToString.js":function(e,t){var s=Object.prototype.toString;e.exports=function(e){return s.call(e)}},"./node_modules/lodash/_root.js":function(e,t,s){var i=s("./node_modules/lodash/_freeGlobal.js"),n="object"==typeof self&&self&&self.Object===Object&&self,a=i||n||Function("return this")();e.exports=a},"./node_modules/lodash/chunk.js":function(e,t,s){var i=s("./node_modules/lodash/_baseSlice.js"),n=s("./node_modules/lodash/_isIterateeCall.js"),a=s("./node_modules/lodash/toInteger.js"),r=Math.ceil,o=Math.max;e.exports=function(e,t,s){t=(s?n(e,t,s):void 0===t)?1:o(a(t),0);var l=null==e?0:e.length;if(!l||t<1)return[];for(var u=0,d=0,c=Array(r(l/t));u<l;)c[d++]=i(e,u,u+=t);return c}},"./node_modules/lodash/eq.js":function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},"./node_modules/lodash/isArrayLike.js":function(e,t,s){var i=s("./node_modules/lodash/isFunction.js"),n=s("./node_modules/lodash/isLength.js");e.exports=function(e){return null!=e&&n(e.length)&&!i(e)}},"./node_modules/lodash/isFunction.js":function(e,t,s){var i=s("./node_modules/lodash/_baseGetTag.js"),n=s("./node_modules/lodash/isObject.js");e.exports=function(e){if(!n(e))return!1;var t=i(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},"./node_modules/lodash/isLength.js":function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},"./node_modules/lodash/isObject.js":function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},"./node_modules/lodash/isObjectLike.js":function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},"./node_modules/lodash/isSymbol.js":function(e,t,s){var i=s("./node_modules/lodash/_baseGetTag.js"),n=s("./node_modules/lodash/isObjectLike.js");e.exports=function(e){return"symbol"==typeof e||n(e)&&"[object Symbol]"==i(e)}},"./node_modules/lodash/toFinite.js":function(e,t,s){var i=s("./node_modules/lodash/toNumber.js");e.exports=function(e){return e?(e=i(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},"./node_modules/lodash/toInteger.js":function(e,t,s){var i=s("./node_modules/lodash/toFinite.js");e.exports=function(e){var t=i(e),s=t%1;return t==t?s?t-s:t:0}},"./node_modules/lodash/toNumber.js":function(e,t,s){var i=s("./node_modules/lodash/isObject.js"),n=s("./node_modules/lodash/isSymbol.js"),a=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(n(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var s=o.test(e);return s||l.test(e)?u(e.slice(2),s?2:8):r.test(e)?NaN:+e}},"./node_modules/moment/locale sync recursive \\b\\B":function(e,t){function s(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}s.keys=function(){return[]},s.resolve=s,e.exports=s,s.id="./node_modules/moment/locale sync recursive \\b\\B"},"./node_modules/moment/moment.js":function(e,t,s){(function(e){e.exports=function(){"use strict";var t,i;function n(){return t.apply(null,arguments)}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function r(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var s,i=[];for(s=0;s<e.length;++s)i.push(t(e[s],s));return i}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function h(e,t){for(var s in t)c(t,s)&&(e[s]=t[s]);return c(t,"toString")&&(e.toString=t.toString),c(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,s,i){return Ct(e,t,s,i,!0).utc()}function m(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function _(e){if(null==e._isValid){var t=m(e),s=i.call(t.parsedDateParts,(function(e){return null!=e})),n=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&s);if(e._strict&&(n=n&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return n;e._isValid=n}return e._isValid}function p(e){var t=f(NaN);return null!=e?h(m(t),e):m(t).userInvalidated=!0,t}i=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),s=t.length>>>0,i=0;i<s;i++)if(i in t&&e.call(this,t[i],i,t))return!0;return!1};var v=n.momentProperties=[];function g(e,t){var s,i,n;if(o(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),o(t._i)||(e._i=t._i),o(t._f)||(e._f=t._f),o(t._l)||(e._l=t._l),o(t._strict)||(e._strict=t._strict),o(t._tzm)||(e._tzm=t._tzm),o(t._isUTC)||(e._isUTC=t._isUTC),o(t._offset)||(e._offset=t._offset),o(t._pf)||(e._pf=m(t)),o(t._locale)||(e._locale=t._locale),v.length>0)for(s=0;s<v.length;s++)o(n=t[i=v[s]])||(e[i]=n);return e}var y=!1;function b(e){g(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===y&&(y=!0,n.updateOffset(this),y=!1)}function w(e){return e instanceof b||null!=e&&null!=e._isAMomentObject}function k(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function x(e){var t=+e,s=0;return 0!==t&&isFinite(t)&&(s=k(t)),s}function C(e,t,s){var i,n=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),r=0;for(i=0;i<n;i++)(s&&e[i]!==t[i]||!s&&x(e[i])!==x(t[i]))&&r++;return r+a}function S(e){!1===n.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function D(e,t){var s=!0;return h((function(){if(null!=n.deprecationHandler&&n.deprecationHandler(null,e),s){for(var i,a=[],r=0;r<arguments.length;r++){if(i="","object"==typeof arguments[r]){for(var o in i+="\n["+r+"] ",arguments[0])i+=o+": "+arguments[0][o]+", ";i=i.slice(0,-2)}else i=arguments[r];a.push(i)}S(e+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),s=!1}return t.apply(this,arguments)}),t)}var M,O={};function Y(e,t){null!=n.deprecationHandler&&n.deprecationHandler(e,t),O[e]||(S(t),O[e]=!0)}function T(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function P(e,t){var s,i=h({},e);for(s in t)c(t,s)&&(r(e[s])&&r(t[s])?(i[s]={},h(i[s],e[s]),h(i[s],t[s])):null!=t[s]?i[s]=t[s]:delete i[s]);for(s in e)c(e,s)&&!c(t,s)&&r(e[s])&&(i[s]=h({},i[s]));return i}function j(e){null!=e&&this.set(e)}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null,M=Object.keys?Object.keys:function(e){var t,s=[];for(t in e)c(e,t)&&s.push(t);return s};var A={};function E(e,t){var s=e.toLowerCase();A[s]=A[s+"s"]=A[t]=e}function L(e){return"string"==typeof e?A[e]||A[e.toLowerCase()]:void 0}function R(e){var t,s,i={};for(s in e)c(e,s)&&(t=L(s))&&(i[t]=e[s]);return i}var N={};function I(e,t){N[e]=t}function H(e,t,s){var i=""+Math.abs(e),n=t-i.length;return(e>=0?s?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+i}var U=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,W=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,F={},V={};function $(e,t,s,i){var n=i;"string"==typeof i&&(n=function(){return this[i]()}),e&&(V[e]=n),t&&(V[t[0]]=function(){return H(n.apply(this,arguments),t[1],t[2])}),s&&(V[s]=function(){return this.localeData().ordinal(n.apply(this,arguments),e)})}function G(e,t){return e.isValid()?(t=z(t,e.localeData()),F[t]=F[t]||function(e){var t,s,i,n=e.match(U);for(t=0,s=n.length;t<s;t++)V[n[t]]?n[t]=V[n[t]]:n[t]=(i=n[t]).match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"");return function(t){var i,a="";for(i=0;i<s;i++)a+=T(n[i])?n[i].call(t,e):n[i];return a}}(t),F[t](e)):e.localeData().invalidDate()}function z(e,t){var s=5;function i(e){return t.longDateFormat(e)||e}for(W.lastIndex=0;s>=0&&W.test(e);)e=e.replace(W,i),W.lastIndex=0,s-=1;return e}var q=/\d/,Z=/\d\d/,B=/\d{3}/,Q=/\d{4}/,J=/[+-]?\d{6}/,X=/\d\d?/,K=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,se=/\d{1,4}/,ie=/[+-]?\d{1,6}/,ne=/\d+/,ae=/[+-]?\d+/,re=/Z|[+-]\d\d:?\d\d/gi,oe=/Z|[+-]\d\d(?::?\d\d)?/gi,le=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ue={};function de(e,t,s){ue[e]=T(t)?t:function(e,i){return e&&s?s:t}}function ce(e,t){return c(ue,e)?ue[e](t._strict,t._locale):new RegExp(he(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,s,i,n){return t||s||i||n}))))}function he(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var fe={};function me(e,t){var s,i=t;for("string"==typeof e&&(e=[e]),l(t)&&(i=function(e,s){s[t]=x(e)}),s=0;s<e.length;s++)fe[e[s]]=i}function _e(e,t){me(e,(function(e,s,i,n){i._w=i._w||{},t(e,i._w,i,n)}))}function pe(e,t,s){null!=t&&c(fe,e)&&fe[e](t,s._a,s,e)}function ve(e){return ge(e)?366:365}function ge(e){return e%4==0&&e%100!=0||e%400==0}$("Y",0,0,(function(){var e=this.year();return e<=9999?""+e:"+"+e})),$(0,["YY",2],0,(function(){return this.year()%100})),$(0,["YYYY",4],0,"year"),$(0,["YYYYY",5],0,"year"),$(0,["YYYYYY",6,!0],0,"year"),E("year","y"),I("year",1),de("Y",ae),de("YY",X,Z),de("YYYY",se,Q),de("YYYYY",ie,J),de("YYYYYY",ie,J),me(["YYYYY","YYYYYY"],0),me("YYYY",(function(e,t){t[0]=2===e.length?n.parseTwoDigitYear(e):x(e)})),me("YY",(function(e,t){t[0]=n.parseTwoDigitYear(e)})),me("Y",(function(e,t){t[0]=parseInt(e,10)})),n.parseTwoDigitYear=function(e){return x(e)+(x(e)>68?1900:2e3)};var ye,be=we("FullYear",!0);function we(e,t){return function(s){return null!=s?(xe(this,e,s),n.updateOffset(this,t),this):ke(this,e)}}function ke(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function xe(e,t,s){e.isValid()&&!isNaN(s)&&("FullYear"===t&&ge(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](s,e.month(),Ce(s,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](s))}function Ce(e,t){if(isNaN(e)||isNaN(t))return NaN;var s,i=(t%(s=12)+s)%s;return e+=(t-i)/12,1===i?ge(e)?29:28:31-i%7%2}ye=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},$("M",["MM",2],"Mo",(function(){return this.month()+1})),$("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),$("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),E("month","M"),I("month",8),de("M",X),de("MM",X,Z),de("MMM",(function(e,t){return t.monthsShortRegex(e)})),de("MMMM",(function(e,t){return t.monthsRegex(e)})),me(["M","MM"],(function(e,t){t[1]=x(e)-1})),me(["MMM","MMMM"],(function(e,t,s,i){var n=s._locale.monthsParse(e,i,s._strict);null!=n?t[1]=n:m(s).invalidMonth=e}));var Se=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,De="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Me="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Oe(e,t,s){var i,n,a,r=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)a=f([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(a,"").toLocaleLowerCase();return s?"MMM"===t?-1!==(n=ye.call(this._shortMonthsParse,r))?n:null:-1!==(n=ye.call(this._longMonthsParse,r))?n:null:"MMM"===t?-1!==(n=ye.call(this._shortMonthsParse,r))||-1!==(n=ye.call(this._longMonthsParse,r))?n:null:-1!==(n=ye.call(this._longMonthsParse,r))||-1!==(n=ye.call(this._shortMonthsParse,r))?n:null}function Ye(e,t){var s;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=x(t);else if(!l(t=e.localeData().monthsParse(t)))return e;return s=Math.min(e.date(),Ce(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,s),e}function Te(e){return null!=e?(Ye(this,e),n.updateOffset(this,!0),this):ke(this,"Month")}var Pe=le,je=le;function Ae(){function e(e,t){return t.length-e.length}var t,s,i=[],n=[],a=[];for(t=0;t<12;t++)s=f([2e3,t]),i.push(this.monthsShort(s,"")),n.push(this.months(s,"")),a.push(this.months(s,"")),a.push(this.monthsShort(s,""));for(i.sort(e),n.sort(e),a.sort(e),t=0;t<12;t++)i[t]=he(i[t]),n[t]=he(n[t]);for(t=0;t<24;t++)a[t]=he(a[t]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Ee(e,t,s,i,n,a,r){var o;return e<100&&e>=0?(o=new Date(e+400,t,s,i,n,a,r),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,s,i,n,a,r),o}function Le(e){var t;if(e<100&&e>=0){var s=Array.prototype.slice.call(arguments);s[0]=e+400,t=new Date(Date.UTC.apply(null,s)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function Re(e,t,s){var i=7+t-s;return-(7+Le(e,0,i).getUTCDay()-t)%7+i-1}function Ne(e,t,s,i,n){var a,r,o=1+7*(t-1)+(7+s-i)%7+Re(e,i,n);return o<=0?r=ve(a=e-1)+o:o>ve(e)?(a=e+1,r=o-ve(e)):(a=e,r=o),{year:a,dayOfYear:r}}function Ie(e,t,s){var i,n,a=Re(e.year(),t,s),r=Math.floor((e.dayOfYear()-a-1)/7)+1;return r<1?i=r+He(n=e.year()-1,t,s):r>He(e.year(),t,s)?(i=r-He(e.year(),t,s),n=e.year()+1):(n=e.year(),i=r),{week:i,year:n}}function He(e,t,s){var i=Re(e,t,s),n=Re(e+1,t,s);return(ve(e)-i+n)/7}function Ue(e,t){return e.slice(t,7).concat(e.slice(0,t))}$("w",["ww",2],"wo","week"),$("W",["WW",2],"Wo","isoWeek"),E("week","w"),E("isoWeek","W"),I("week",5),I("isoWeek",5),de("w",X),de("ww",X,Z),de("W",X),de("WW",X,Z),_e(["w","ww","W","WW"],(function(e,t,s,i){t[i.substr(0,1)]=x(e)})),$("d",0,"do","day"),$("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),$("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),$("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),$("e",0,0,"weekday"),$("E",0,0,"isoWeekday"),E("day","d"),E("weekday","e"),E("isoWeekday","E"),I("day",11),I("weekday",11),I("isoWeekday",11),de("d",X),de("e",X),de("E",X),de("dd",(function(e,t){return t.weekdaysMinRegex(e)})),de("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),de("dddd",(function(e,t){return t.weekdaysRegex(e)})),_e(["dd","ddd","dddd"],(function(e,t,s,i){var n=s._locale.weekdaysParse(e,i,s._strict);null!=n?t.d=n:m(s).invalidWeekday=e})),_e(["d","e","E"],(function(e,t,s,i){t[i]=x(e)}));var We="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Fe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ve="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function $e(e,t,s){var i,n,a,r=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)a=f([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(a,"").toLocaleLowerCase();return s?"dddd"===t?-1!==(n=ye.call(this._weekdaysParse,r))?n:null:"ddd"===t?-1!==(n=ye.call(this._shortWeekdaysParse,r))?n:null:-1!==(n=ye.call(this._minWeekdaysParse,r))?n:null:"dddd"===t?-1!==(n=ye.call(this._weekdaysParse,r))||-1!==(n=ye.call(this._shortWeekdaysParse,r))||-1!==(n=ye.call(this._minWeekdaysParse,r))?n:null:"ddd"===t?-1!==(n=ye.call(this._shortWeekdaysParse,r))||-1!==(n=ye.call(this._weekdaysParse,r))||-1!==(n=ye.call(this._minWeekdaysParse,r))?n:null:-1!==(n=ye.call(this._minWeekdaysParse,r))||-1!==(n=ye.call(this._weekdaysParse,r))||-1!==(n=ye.call(this._shortWeekdaysParse,r))?n:null}var Ge=le,ze=le,qe=le;function Ze(){function e(e,t){return t.length-e.length}var t,s,i,n,a,r=[],o=[],l=[],u=[];for(t=0;t<7;t++)s=f([2e3,1]).day(t),i=this.weekdaysMin(s,""),n=this.weekdaysShort(s,""),a=this.weekdays(s,""),r.push(i),o.push(n),l.push(a),u.push(i),u.push(n),u.push(a);for(r.sort(e),o.sort(e),l.sort(e),u.sort(e),t=0;t<7;t++)o[t]=he(o[t]),l[t]=he(l[t]),u[t]=he(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Be(){return this.hours()%12||12}function Qe(e,t){$(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Je(e,t){return t._meridiemParse}$("H",["HH",2],0,"hour"),$("h",["hh",2],0,Be),$("k",["kk",2],0,(function(){return this.hours()||24})),$("hmm",0,0,(function(){return""+Be.apply(this)+H(this.minutes(),2)})),$("hmmss",0,0,(function(){return""+Be.apply(this)+H(this.minutes(),2)+H(this.seconds(),2)})),$("Hmm",0,0,(function(){return""+this.hours()+H(this.minutes(),2)})),$("Hmmss",0,0,(function(){return""+this.hours()+H(this.minutes(),2)+H(this.seconds(),2)})),Qe("a",!0),Qe("A",!1),E("hour","h"),I("hour",13),de("a",Je),de("A",Je),de("H",X),de("h",X),de("k",X),de("HH",X,Z),de("hh",X,Z),de("kk",X,Z),de("hmm",K),de("hmmss",ee),de("Hmm",K),de("Hmmss",ee),me(["H","HH"],3),me(["k","kk"],(function(e,t,s){var i=x(e);t[3]=24===i?0:i})),me(["a","A"],(function(e,t,s){s._isPm=s._locale.isPM(e),s._meridiem=e})),me(["h","hh"],(function(e,t,s){t[3]=x(e),m(s).bigHour=!0})),me("hmm",(function(e,t,s){var i=e.length-2;t[3]=x(e.substr(0,i)),t[4]=x(e.substr(i)),m(s).bigHour=!0})),me("hmmss",(function(e,t,s){var i=e.length-4,n=e.length-2;t[3]=x(e.substr(0,i)),t[4]=x(e.substr(i,2)),t[5]=x(e.substr(n)),m(s).bigHour=!0})),me("Hmm",(function(e,t,s){var i=e.length-2;t[3]=x(e.substr(0,i)),t[4]=x(e.substr(i))})),me("Hmmss",(function(e,t,s){var i=e.length-4,n=e.length-2;t[3]=x(e.substr(0,i)),t[4]=x(e.substr(i,2)),t[5]=x(e.substr(n))}));var Xe,Ke=we("Hours",!0),et={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:De,monthsShort:Me,week:{dow:0,doy:6},weekdays:We,weekdaysMin:Ve,weekdaysShort:Fe,meridiemParse:/[ap]\.?m?\.?/i},tt={},st={};function it(e){return e?e.toLowerCase().replace("_","-"):e}function nt(t){var i=null;if(!tt[t]&&void 0!==e&&e&&e.exports)try{i=Xe._abbr,s("./node_modules/moment/locale sync recursive \\b\\B")("./"+t),at(i)}catch(e){}return tt[t]}function at(e,t){var s;return e&&((s=o(t)?ot(e):rt(e,t))?Xe=s:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Xe._abbr}function rt(e,t){if(null!==t){var s,i=et;if(t.abbr=e,null!=tt[e])Y("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=tt[e]._config;else if(null!=t.parentLocale)if(null!=tt[t.parentLocale])i=tt[t.parentLocale]._config;else{if(null==(s=nt(t.parentLocale)))return st[t.parentLocale]||(st[t.parentLocale]=[]),st[t.parentLocale].push({name:e,config:t}),null;i=s._config}return tt[e]=new j(P(i,t)),st[e]&&st[e].forEach((function(e){rt(e.name,e.config)})),at(e),tt[e]}return delete tt[e],null}function ot(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Xe;if(!a(e)){if(t=nt(e))return t;e=[e]}return function(e){for(var t,s,i,n,a=0;a<e.length;){for(t=(n=it(e[a]).split("-")).length,s=(s=it(e[a+1]))?s.split("-"):null;t>0;){if(i=nt(n.slice(0,t).join("-")))return i;if(s&&s.length>=t&&C(n,s,!0)>=t-1)break;t--}a++}return Xe}(e)}function lt(e){var t,s=e._a;return s&&-2===m(e).overflow&&(t=s[1]<0||s[1]>11?1:s[2]<1||s[2]>Ce(s[0],s[1])?2:s[3]<0||s[3]>24||24===s[3]&&(0!==s[4]||0!==s[5]||0!==s[6])?3:s[4]<0||s[4]>59?4:s[5]<0||s[5]>59?5:s[6]<0||s[6]>999?6:-1,m(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),m(e)._overflowWeeks&&-1===t&&(t=7),m(e)._overflowWeekday&&-1===t&&(t=8),m(e).overflow=t),e}function ut(e,t,s){return null!=e?e:null!=t?t:s}function dt(e){var t,s,i,a,r,o=[];if(!e._d){for(i=function(e){var t=new Date(n.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[2]&&null==e._a[1]&&function(e){var t,s,i,n,a,r,o,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)a=1,r=4,s=ut(t.GG,e._a[0],Ie(St(),1,4).year),i=ut(t.W,1),((n=ut(t.E,1))<1||n>7)&&(l=!0);else{a=e._locale._week.dow,r=e._locale._week.doy;var u=Ie(St(),a,r);s=ut(t.gg,e._a[0],u.year),i=ut(t.w,u.week),null!=t.d?((n=t.d)<0||n>6)&&(l=!0):null!=t.e?(n=t.e+a,(t.e<0||t.e>6)&&(l=!0)):n=a}i<1||i>He(s,a,r)?m(e)._overflowWeeks=!0:null!=l?m(e)._overflowWeekday=!0:(o=Ne(s,i,n,a,r),e._a[0]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=ut(e._a[0],i[0]),(e._dayOfYear>ve(r)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),s=Le(r,0,e._dayOfYear),e._a[1]=s.getUTCMonth(),e._a[2]=s.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=i[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Le:Ee).apply(null,o),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==a&&(m(e).weekdayMismatch=!0)}}var ct=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ht=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ft=/Z|[+-]\d\d(?::?\d\d)?/,mt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],_t=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],pt=/^\/?Date\((\-?\d+)/i;function vt(e){var t,s,i,n,a,r,o=e._i,l=ct.exec(o)||ht.exec(o);if(l){for(m(e).iso=!0,t=0,s=mt.length;t<s;t++)if(mt[t][1].exec(l[1])){n=mt[t][0],i=!1!==mt[t][2];break}if(null==n)return void(e._isValid=!1);if(l[3]){for(t=0,s=_t.length;t<s;t++)if(_t[t][1].exec(l[3])){a=(l[2]||" ")+_t[t][0];break}if(null==a)return void(e._isValid=!1)}if(!i&&null!=a)return void(e._isValid=!1);if(l[4]){if(!ft.exec(l[4]))return void(e._isValid=!1);r="Z"}e._f=n+(a||"")+(r||""),kt(e)}else e._isValid=!1}var gt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function yt(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}var bt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function wt(e){var t,s,i,n,a,r,o,l=gt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(l){var u=(t=l[4],s=l[3],i=l[2],n=l[5],a=l[6],r=l[7],o=[yt(t),Me.indexOf(s),parseInt(i,10),parseInt(n,10),parseInt(a,10)],r&&o.push(parseInt(r,10)),o);if(!function(e,t,s){return!e||Fe.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(m(s).weekdayMismatch=!0,s._isValid=!1,!1)}(l[1],u,e))return;e._a=u,e._tzm=function(e,t,s){if(e)return bt[e];if(t)return 0;var i=parseInt(s,10),n=i%100;return(i-n)/100*60+n}(l[8],l[9],l[10]),e._d=Le.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=!0}else e._isValid=!1}function kt(e){if(e._f!==n.ISO_8601)if(e._f!==n.RFC_2822){e._a=[],m(e).empty=!0;var t,s,i,a,r,o=""+e._i,l=o.length,u=0;for(i=z(e._f,e._locale).match(U)||[],t=0;t<i.length;t++)a=i[t],(s=(o.match(ce(a,e))||[])[0])&&((r=o.substr(0,o.indexOf(s))).length>0&&m(e).unusedInput.push(r),o=o.slice(o.indexOf(s)+s.length),u+=s.length),V[a]?(s?m(e).empty=!1:m(e).unusedTokens.push(a),pe(a,s,e)):e._strict&&!s&&m(e).unusedTokens.push(a);m(e).charsLeftOver=l-u,o.length>0&&m(e).unusedInput.push(o),e._a[3]<=12&&!0===m(e).bigHour&&e._a[3]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[3]=function(e,t,s){var i;return null==s?t:null!=e.meridiemHour?e.meridiemHour(t,s):null!=e.isPM?((i=e.isPM(s))&&t<12&&(t+=12),i||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),dt(e),lt(e)}else wt(e);else vt(e)}function xt(e){var t=e._i,s=e._f;return e._locale=e._locale||ot(e._l),null===t||void 0===s&&""===t?p({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),w(t)?new b(lt(t)):(u(t)?e._d=t:a(s)?function(e){var t,s,i,n,a;if(0===e._f.length)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(n=0;n<e._f.length;n++)a=0,t=g({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[n],kt(t),_(t)&&(a+=m(t).charsLeftOver,a+=10*m(t).unusedTokens.length,m(t).score=a,(null==i||a<i)&&(i=a,s=t));h(e,s||t)}(e):s?kt(e):function(e){var t=e._i;o(t)?e._d=new Date(n.now()):u(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=pt.exec(e._i);null===t?(vt(e),!1===e._isValid&&(delete e._isValid,wt(e),!1===e._isValid&&(delete e._isValid,n.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):a(t)?(e._a=d(t.slice(0),(function(e){return parseInt(e,10)})),dt(e)):r(t)?function(e){if(!e._d){var t=R(e._i);e._a=d([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),dt(e)}}(e):l(t)?e._d=new Date(t):n.createFromInputFallback(e)}(e),_(e)||(e._d=null),e))}function Ct(e,t,s,i,n){var o,l={};return!0!==s&&!1!==s||(i=s,s=void 0),(r(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||a(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=n,l._l=s,l._i=e,l._f=t,l._strict=i,(o=new b(lt(xt(l))))._nextDay&&(o.add(1,"d"),o._nextDay=void 0),o}function St(e,t,s,i){return Ct(e,t,s,i,!1)}n.createFromInputFallback=D("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),n.ISO_8601=function(){},n.RFC_2822=function(){};var Dt=D("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=St.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:p()})),Mt=D("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=St.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:p()}));function Ot(e,t){var s,i;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return St();for(s=t[0],i=1;i<t.length;++i)t[i].isValid()&&!t[i][e](s)||(s=t[i]);return s}var Yt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Tt(e){var t=R(e),s=t.year||0,i=t.quarter||0,n=t.month||0,a=t.week||t.isoWeek||0,r=t.day||0,o=t.hour||0,l=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===ye.call(Yt,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var s=!1,i=0;i<Yt.length;++i)if(e[Yt[i]]){if(s)return!1;parseFloat(e[Yt[i]])!==x(e[Yt[i]])&&(s=!0)}return!0}(t),this._milliseconds=+d+1e3*u+6e4*l+1e3*o*60*60,this._days=+r+7*a,this._months=+n+3*i+12*s,this._data={},this._locale=ot(),this._bubble()}function Pt(e){return e instanceof Tt}function jt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function At(e,t){$(e,0,0,(function(){var e=this.utcOffset(),s="+";return e<0&&(e=-e,s="-"),s+H(~~(e/60),2)+t+H(~~e%60,2)}))}At("Z",":"),At("ZZ",""),de("Z",oe),de("ZZ",oe),me(["Z","ZZ"],(function(e,t,s){s._useUTC=!0,s._tzm=Lt(oe,e)}));var Et=/([\+\-]|\d\d)/gi;function Lt(e,t){var s=(t||"").match(e);if(null===s)return null;var i=((s[s.length-1]||[])+"").match(Et)||["-",0,0],n=60*i[1]+x(i[2]);return 0===n?0:"+"===i[0]?n:-n}function Rt(e,t){var s,i;return t._isUTC?(s=t.clone(),i=(w(e)||u(e)?e.valueOf():St(e).valueOf())-s.valueOf(),s._d.setTime(s._d.valueOf()+i),n.updateOffset(s,!1),s):St(e).local()}function Nt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function It(){return!!this.isValid()&&this._isUTC&&0===this._offset}n.updateOffset=function(){};var Ht=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ut=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Wt(e,t){var s,i,n,a,r,o,u=e,d=null;return Pt(e)?u={ms:e._milliseconds,d:e._days,M:e._months}:l(e)?(u={},t?u[t]=e:u.milliseconds=e):(d=Ht.exec(e))?(s="-"===d[1]?-1:1,u={y:0,d:x(d[2])*s,h:x(d[3])*s,m:x(d[4])*s,s:x(d[5])*s,ms:x(jt(1e3*d[6]))*s}):(d=Ut.exec(e))?(s="-"===d[1]?-1:1,u={y:Ft(d[2],s),M:Ft(d[3],s),w:Ft(d[4],s),d:Ft(d[5],s),h:Ft(d[6],s),m:Ft(d[7],s),s:Ft(d[8],s)}):null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(a=St(u.from),r=St(u.to),n=a.isValid()&&r.isValid()?(r=Rt(r,a),a.isBefore(r)?o=Vt(a,r):((o=Vt(r,a)).milliseconds=-o.milliseconds,o.months=-o.months),o):{milliseconds:0,months:0},(u={}).ms=n.milliseconds,u.M=n.months),i=new Tt(u),Pt(e)&&c(e,"_locale")&&(i._locale=e._locale),i}function Ft(e,t){var s=e&&parseFloat(e.replace(",","."));return(isNaN(s)?0:s)*t}function Vt(e,t){var s={};return s.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(s.months,"M").isAfter(t)&&--s.months,s.milliseconds=+t-+e.clone().add(s.months,"M"),s}function $t(e,t){return function(s,i){var n;return null===i||isNaN(+i)||(Y(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=s,s=i,i=n),Gt(this,Wt(s="string"==typeof s?+s:s,i),e),this}}function Gt(e,t,s,i){var a=t._milliseconds,r=jt(t._days),o=jt(t._months);e.isValid()&&(i=null==i||i,o&&Ye(e,ke(e,"Month")+o*s),r&&xe(e,"Date",ke(e,"Date")+r*s),a&&e._d.setTime(e._d.valueOf()+a*s),i&&n.updateOffset(e,r||o))}Wt.fn=Tt.prototype,Wt.invalid=function(){return Wt(NaN)};var zt=$t(1,"add"),qt=$t(-1,"subtract");function Zt(e,t){var s=12*(t.year()-e.year())+(t.month()-e.month()),i=e.clone().add(s,"months");return-(s+(t-i<0?(t-i)/(i-e.clone().add(s-1,"months")):(t-i)/(e.clone().add(s+1,"months")-i)))||0}function Bt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=ot(e))&&(this._locale=t),this)}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Qt=D("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function Jt(){return this._locale}function Xt(e,t){return(e%t+t)%t}function Kt(e,t,s){return e<100&&e>=0?new Date(e+400,t,s)-126227808e5:new Date(e,t,s).valueOf()}function es(e,t,s){return e<100&&e>=0?Date.UTC(e+400,t,s)-126227808e5:Date.UTC(e,t,s)}function ts(e,t){$(0,[e,e.length],0,t)}function ss(e,t,s,i,n){var a;return null==e?Ie(this,i,n).year:(t>(a=He(e,i,n))&&(t=a),is.call(this,e,t,s,i,n))}function is(e,t,s,i,n){var a=Ne(e,t,s,i,n),r=Le(a.year,0,a.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}$(0,["gg",2],0,(function(){return this.weekYear()%100})),$(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),ts("gggg","weekYear"),ts("ggggg","weekYear"),ts("GGGG","isoWeekYear"),ts("GGGGG","isoWeekYear"),E("weekYear","gg"),E("isoWeekYear","GG"),I("weekYear",1),I("isoWeekYear",1),de("G",ae),de("g",ae),de("GG",X,Z),de("gg",X,Z),de("GGGG",se,Q),de("gggg",se,Q),de("GGGGG",ie,J),de("ggggg",ie,J),_e(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,s,i){t[i.substr(0,2)]=x(e)})),_e(["gg","GG"],(function(e,t,s,i){t[i]=n.parseTwoDigitYear(e)})),$("Q",0,"Qo","quarter"),E("quarter","Q"),I("quarter",7),de("Q",q),me("Q",(function(e,t){t[1]=3*(x(e)-1)})),$("D",["DD",2],"Do","date"),E("date","D"),I("date",9),de("D",X),de("DD",X,Z),de("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),me(["D","DD"],2),me("Do",(function(e,t){t[2]=x(e.match(X)[0])}));var ns=we("Date",!0);$("DDD",["DDDD",3],"DDDo","dayOfYear"),E("dayOfYear","DDD"),I("dayOfYear",4),de("DDD",te),de("DDDD",B),me(["DDD","DDDD"],(function(e,t,s){s._dayOfYear=x(e)})),$("m",["mm",2],0,"minute"),E("minute","m"),I("minute",14),de("m",X),de("mm",X,Z),me(["m","mm"],4);var as=we("Minutes",!1);$("s",["ss",2],0,"second"),E("second","s"),I("second",15),de("s",X),de("ss",X,Z),me(["s","ss"],5);var rs,os=we("Seconds",!1);for($("S",0,0,(function(){return~~(this.millisecond()/100)})),$(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),$(0,["SSS",3],0,"millisecond"),$(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),$(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),$(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),$(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),$(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),$(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),E("millisecond","ms"),I("millisecond",16),de("S",te,q),de("SS",te,Z),de("SSS",te,B),rs="SSSS";rs.length<=9;rs+="S")de(rs,ne);function ls(e,t){t[6]=x(1e3*("0."+e))}for(rs="S";rs.length<=9;rs+="S")me(rs,ls);var us=we("Milliseconds",!1);$("z",0,0,"zoneAbbr"),$("zz",0,0,"zoneName");var ds=b.prototype;function cs(e){return e}ds.add=zt,ds.calendar=function(e,t){var s=e||St(),i=Rt(s,this).startOf("day"),a=n.calendarFormat(this,i)||"sameElse",r=t&&(T(t[a])?t[a].call(this,s):t[a]);return this.format(r||this.localeData().calendar(a,this,St(s)))},ds.clone=function(){return new b(this)},ds.diff=function(e,t,s){var i,n,a;if(!this.isValid())return NaN;if(!(i=Rt(e,this)).isValid())return NaN;switch(n=6e4*(i.utcOffset()-this.utcOffset()),t=L(t)){case"year":a=Zt(this,i)/12;break;case"month":a=Zt(this,i);break;case"quarter":a=Zt(this,i)/3;break;case"second":a=(this-i)/1e3;break;case"minute":a=(this-i)/6e4;break;case"hour":a=(this-i)/36e5;break;case"day":a=(this-i-n)/864e5;break;case"week":a=(this-i-n)/6048e5;break;default:a=this-i}return s?a:k(a)},ds.endOf=function(e){var t;if(void 0===(e=L(e))||"millisecond"===e||!this.isValid())return this;var s=this._isUTC?es:Kt;switch(e){case"year":t=s(this.year()+1,0,1)-1;break;case"quarter":t=s(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=s(this.year(),this.month()+1,1)-1;break;case"week":t=s(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=s(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-Xt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-Xt(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-Xt(t,1e3)-1}return this._d.setTime(t),n.updateOffset(this,!0),this},ds.format=function(e){e||(e=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var t=G(this,e);return this.localeData().postformat(t)},ds.from=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||St(e).isValid())?Wt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},ds.fromNow=function(e){return this.from(St(),e)},ds.to=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||St(e).isValid())?Wt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},ds.toNow=function(e){return this.to(St(),e)},ds.get=function(e){return T(this[e=L(e)])?this[e]():this},ds.invalidAt=function(){return m(this).overflow},ds.isAfter=function(e,t){var s=w(e)?e:St(e);return!(!this.isValid()||!s.isValid())&&("millisecond"===(t=L(t)||"millisecond")?this.valueOf()>s.valueOf():s.valueOf()<this.clone().startOf(t).valueOf())},ds.isBefore=function(e,t){var s=w(e)?e:St(e);return!(!this.isValid()||!s.isValid())&&("millisecond"===(t=L(t)||"millisecond")?this.valueOf()<s.valueOf():this.clone().endOf(t).valueOf()<s.valueOf())},ds.isBetween=function(e,t,s,i){var n=w(e)?e:St(e),a=w(t)?t:St(t);return!!(this.isValid()&&n.isValid()&&a.isValid())&&("("===(i=i||"()")[0]?this.isAfter(n,s):!this.isBefore(n,s))&&(")"===i[1]?this.isBefore(a,s):!this.isAfter(a,s))},ds.isSame=function(e,t){var s,i=w(e)?e:St(e);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=L(t)||"millisecond")?this.valueOf()===i.valueOf():(s=i.valueOf(),this.clone().startOf(t).valueOf()<=s&&s<=this.clone().endOf(t).valueOf()))},ds.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},ds.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},ds.isValid=function(){return _(this)},ds.lang=Qt,ds.locale=Bt,ds.localeData=Jt,ds.max=Mt,ds.min=Dt,ds.parsingFlags=function(){return h({},m(this))},ds.set=function(e,t){if("object"==typeof e)for(var s=function(e){var t=[];for(var s in e)t.push({unit:s,priority:N[s]});return t.sort((function(e,t){return e.priority-t.priority})),t}(e=R(e)),i=0;i<s.length;i++)this[s[i].unit](e[s[i].unit]);else if(T(this[e=L(e)]))return this[e](t);return this},ds.startOf=function(e){var t;if(void 0===(e=L(e))||"millisecond"===e||!this.isValid())return this;var s=this._isUTC?es:Kt;switch(e){case"year":t=s(this.year(),0,1);break;case"quarter":t=s(this.year(),this.month()-this.month()%3,1);break;case"month":t=s(this.year(),this.month(),1);break;case"week":t=s(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=s(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Xt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=Xt(t,6e4);break;case"second":t=this._d.valueOf(),t-=Xt(t,1e3)}return this._d.setTime(t),n.updateOffset(this,!0),this},ds.subtract=qt,ds.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},ds.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},ds.toDate=function(){return new Date(this.valueOf())},ds.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,s=t?this.clone().utc():this;return s.year()<0||s.year()>9999?G(s,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):T(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",G(s,"Z")):G(s,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},ds.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var s="["+e+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=t+'[")]';return this.format(s+i+"-MM-DD[T]HH:mm:ss.SSS"+n)},ds.toJSON=function(){return this.isValid()?this.toISOString():null},ds.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},ds.unix=function(){return Math.floor(this.valueOf()/1e3)},ds.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},ds.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},ds.year=be,ds.isLeapYear=function(){return ge(this.year())},ds.weekYear=function(e){return ss.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},ds.isoWeekYear=function(e){return ss.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},ds.quarter=ds.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},ds.month=Te,ds.daysInMonth=function(){return Ce(this.year(),this.month())},ds.week=ds.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},ds.isoWeek=ds.isoWeeks=function(e){var t=Ie(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},ds.weeksInYear=function(){var e=this.localeData()._week;return He(this.year(),e.dow,e.doy)},ds.isoWeeksInYear=function(){return He(this.year(),1,4)},ds.date=ns,ds.day=ds.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},ds.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},ds.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},ds.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},ds.hour=ds.hours=Ke,ds.minute=ds.minutes=as,ds.second=ds.seconds=os,ds.millisecond=ds.milliseconds=us,ds.utcOffset=function(e,t,s){var i,a=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Lt(oe,e)))return this}else Math.abs(e)<16&&!s&&(e*=60);return!this._isUTC&&t&&(i=Nt(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),a!==e&&(!t||this._changeInProgress?Gt(this,Wt(e-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?a:Nt(this)},ds.utc=function(e){return this.utcOffset(0,e)},ds.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Nt(this),"m")),this},ds.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Lt(re,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},ds.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?St(e).utcOffset():0,(this.utcOffset()-e)%60==0)},ds.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},ds.isLocal=function(){return!!this.isValid()&&!this._isUTC},ds.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},ds.isUtc=It,ds.isUTC=It,ds.zoneAbbr=function(){return this._isUTC?"UTC":""},ds.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},ds.dates=D("dates accessor is deprecated. Use date instead.",ns),ds.months=D("months accessor is deprecated. Use month instead",Te),ds.years=D("years accessor is deprecated. Use year instead",be),ds.zone=D("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),ds.isDSTShifted=D("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var e={};if(g(e,this),(e=xt(e))._a){var t=e._isUTC?f(e._a):St(e._a);this._isDSTShifted=this.isValid()&&C(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var hs=j.prototype;function fs(e,t,s,i){var n=ot(),a=f().set(i,t);return n[s](a,e)}function ms(e,t,s){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return fs(e,t,s,"month");var i,n=[];for(i=0;i<12;i++)n[i]=fs(e,i,s,"month");return n}function _s(e,t,s,i){"boolean"==typeof e?(l(t)&&(s=t,t=void 0),t=t||""):(s=t=e,e=!1,l(t)&&(s=t,t=void 0),t=t||"");var n,a=ot(),r=e?a._week.dow:0;if(null!=s)return fs(t,(s+r)%7,i,"day");var o=[];for(n=0;n<7;n++)o[n]=fs(t,(n+r)%7,i,"day");return o}hs.calendar=function(e,t,s){var i=this._calendar[e]||this._calendar.sameElse;return T(i)?i.call(t,s):i},hs.longDateFormat=function(e){var t=this._longDateFormat[e],s=this._longDateFormat[e.toUpperCase()];return t||!s?t:(this._longDateFormat[e]=s.replace(/MMMM|MM|DD|dddd/g,(function(e){return e.slice(1)})),this._longDateFormat[e])},hs.invalidDate=function(){return this._invalidDate},hs.ordinal=function(e){return this._ordinal.replace("%d",e)},hs.preparse=cs,hs.postformat=cs,hs.relativeTime=function(e,t,s,i){var n=this._relativeTime[s];return T(n)?n(e,t,s,i):n.replace(/%d/i,e)},hs.pastFuture=function(e,t){var s=this._relativeTime[e>0?"future":"past"];return T(s)?s(t):s.replace(/%s/i,t)},hs.set=function(e){var t,s;for(s in e)T(t=e[s])?this[s]=t:this["_"+s]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},hs.months=function(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Se).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months.standalone},hs.monthsShort=function(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Se.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},hs.monthsParse=function(e,t,s){var i,n,a;if(this._monthsParseExact)return Oe.call(this,e,t,s);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(n=f([2e3,i]),s&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(n,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(n,"").replace(".","")+"$","i")),s||this._monthsParse[i]||(a="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[i]=new RegExp(a.replace(".",""),"i")),s&&"MMMM"===t&&this._longMonthsParse[i].test(e))return i;if(s&&"MMM"===t&&this._shortMonthsParse[i].test(e))return i;if(!s&&this._monthsParse[i].test(e))return i}},hs.monthsRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||Ae.call(this),e?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=je),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},hs.monthsShortRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||Ae.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=Pe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},hs.week=function(e){return Ie(e,this._week.dow,this._week.doy).week},hs.firstDayOfYear=function(){return this._week.doy},hs.firstDayOfWeek=function(){return this._week.dow},hs.weekdays=function(e,t){var s=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Ue(s,this._week.dow):e?s[e.day()]:s},hs.weekdaysMin=function(e){return!0===e?Ue(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},hs.weekdaysShort=function(e){return!0===e?Ue(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},hs.weekdaysParse=function(e,t,s){var i,n,a;if(this._weekdaysParseExact)return $e.call(this,e,t,s);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(n=f([2e3,1]).day(i),s&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(n,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(n,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(n,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(a="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[i]=new RegExp(a.replace(".",""),"i")),s&&"dddd"===t&&this._fullWeekdaysParse[i].test(e))return i;if(s&&"ddd"===t&&this._shortWeekdaysParse[i].test(e))return i;if(s&&"dd"===t&&this._minWeekdaysParse[i].test(e))return i;if(!s&&this._weekdaysParse[i].test(e))return i}},hs.weekdaysRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Ze.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=Ge),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},hs.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Ze.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ze),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},hs.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Ze.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=qe),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},hs.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},hs.meridiem=function(e,t,s){return e>11?s?"pm":"PM":s?"am":"AM"},at("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===x(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),n.lang=D("moment.lang is deprecated. Use moment.locale instead.",at),n.langData=D("moment.langData is deprecated. Use moment.localeData instead.",ot);var ps=Math.abs;function vs(e,t,s,i){var n=Wt(t,s);return e._milliseconds+=i*n._milliseconds,e._days+=i*n._days,e._months+=i*n._months,e._bubble()}function gs(e){return e<0?Math.floor(e):Math.ceil(e)}function ys(e){return 4800*e/146097}function bs(e){return 146097*e/4800}function ws(e){return function(){return this.as(e)}}var ks=ws("ms"),xs=ws("s"),Cs=ws("m"),Ss=ws("h"),Ds=ws("d"),Ms=ws("w"),Os=ws("M"),Ys=ws("Q"),Ts=ws("y");function Ps(e){return function(){return this.isValid()?this._data[e]:NaN}}var js=Ps("milliseconds"),As=Ps("seconds"),Es=Ps("minutes"),Ls=Ps("hours"),Rs=Ps("days"),Ns=Ps("months"),Is=Ps("years"),Hs=Math.round,Us={ss:44,s:45,m:45,h:22,d:26,M:11};function Ws(e,t,s,i,n){return n.relativeTime(t||1,!!s,e,i)}var Fs=Math.abs;function Vs(e){return(e>0)-(e<0)||+e}function $s(){if(!this.isValid())return this.localeData().invalidDate();var e,t,s=Fs(this._milliseconds)/1e3,i=Fs(this._days),n=Fs(this._months);e=k(s/60),t=k(e/60),s%=60,e%=60;var a=k(n/12),r=n%=12,o=i,l=t,u=e,d=s?s.toFixed(3).replace(/\.?0+$/,""):"",c=this.asSeconds();if(!c)return"P0D";var h=c<0?"-":"",f=Vs(this._months)!==Vs(c)?"-":"",m=Vs(this._days)!==Vs(c)?"-":"",_=Vs(this._milliseconds)!==Vs(c)?"-":"";return h+"P"+(a?f+a+"Y":"")+(r?f+r+"M":"")+(o?m+o+"D":"")+(l||u||d?"T":"")+(l?_+l+"H":"")+(u?_+u+"M":"")+(d?_+d+"S":"")}var Gs=Tt.prototype;return Gs.isValid=function(){return this._isValid},Gs.abs=function(){var e=this._data;return this._milliseconds=ps(this._milliseconds),this._days=ps(this._days),this._months=ps(this._months),e.milliseconds=ps(e.milliseconds),e.seconds=ps(e.seconds),e.minutes=ps(e.minutes),e.hours=ps(e.hours),e.months=ps(e.months),e.years=ps(e.years),this},Gs.add=function(e,t){return vs(this,e,t,1)},Gs.subtract=function(e,t){return vs(this,e,t,-1)},Gs.as=function(e){if(!this.isValid())return NaN;var t,s,i=this._milliseconds;if("month"===(e=L(e))||"quarter"===e||"year"===e)switch(t=this._days+i/864e5,s=this._months+ys(t),e){case"month":return s;case"quarter":return s/3;case"year":return s/12}else switch(t=this._days+Math.round(bs(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+e)}},Gs.asMilliseconds=ks,Gs.asSeconds=xs,Gs.asMinutes=Cs,Gs.asHours=Ss,Gs.asDays=Ds,Gs.asWeeks=Ms,Gs.asMonths=Os,Gs.asQuarters=Ys,Gs.asYears=Ts,Gs.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*x(this._months/12):NaN},Gs._bubble=function(){var e,t,s,i,n,a=this._milliseconds,r=this._days,o=this._months,l=this._data;return a>=0&&r>=0&&o>=0||a<=0&&r<=0&&o<=0||(a+=864e5*gs(bs(o)+r),r=0,o=0),l.milliseconds=a%1e3,e=k(a/1e3),l.seconds=e%60,t=k(e/60),l.minutes=t%60,s=k(t/60),l.hours=s%24,r+=k(s/24),n=k(ys(r)),o+=n,r-=gs(bs(n)),i=k(o/12),o%=12,l.days=r,l.months=o,l.years=i,this},Gs.clone=function(){return Wt(this)},Gs.get=function(e){return e=L(e),this.isValid()?this[e+"s"]():NaN},Gs.milliseconds=js,Gs.seconds=As,Gs.minutes=Es,Gs.hours=Ls,Gs.days=Rs,Gs.weeks=function(){return k(this.days()/7)},Gs.months=Ns,Gs.years=Is,Gs.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),s=function(e,t,s){var i=Wt(e).abs(),n=Hs(i.as("s")),a=Hs(i.as("m")),r=Hs(i.as("h")),o=Hs(i.as("d")),l=Hs(i.as("M")),u=Hs(i.as("y")),d=n<=Us.ss&&["s",n]||n<Us.s&&["ss",n]||a<=1&&["m"]||a<Us.m&&["mm",a]||r<=1&&["h"]||r<Us.h&&["hh",r]||o<=1&&["d"]||o<Us.d&&["dd",o]||l<=1&&["M"]||l<Us.M&&["MM",l]||u<=1&&["y"]||["yy",u];return d[2]=t,d[3]=+e>0,d[4]=s,Ws.apply(null,d)}(this,!e,t);return e&&(s=t.pastFuture(+this,s)),t.postformat(s)},Gs.toISOString=$s,Gs.toString=$s,Gs.toJSON=$s,Gs.locale=Bt,Gs.localeData=Jt,Gs.toIsoString=D("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",$s),Gs.lang=Qt,$("X",0,0,"unix"),$("x",0,0,"valueOf"),de("x",ae),de("X",/[+-]?\d+(\.\d{1,3})?/),me("X",(function(e,t,s){s._d=new Date(1e3*parseFloat(e,10))})),me("x",(function(e,t,s){s._d=new Date(x(e))})),n.version="2.24.0",t=St,n.fn=ds,n.min=function(){var e=[].slice.call(arguments,0);return Ot("isBefore",e)},n.max=function(){var e=[].slice.call(arguments,0);return Ot("isAfter",e)},n.now=function(){return Date.now?Date.now():+new Date},n.utc=f,n.unix=function(e){return St(1e3*e)},n.months=function(e,t){return ms(e,t,"months")},n.isDate=u,n.locale=at,n.invalid=p,n.duration=Wt,n.isMoment=w,n.weekdays=function(e,t,s){return _s(e,t,s,"weekdays")},n.parseZone=function(){return St.apply(null,arguments).parseZone()},n.localeData=ot,n.isDuration=Pt,n.monthsShort=function(e,t){return ms(e,t,"monthsShort")},n.weekdaysMin=function(e,t,s){return _s(e,t,s,"weekdaysMin")},n.defineLocale=rt,n.updateLocale=function(e,t){if(null!=t){var s,i,n=et;null!=(i=nt(e))&&(n=i._config),t=P(n,t),(s=new j(t)).parentLocale=tt[e],tt[e]=s,at(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?tt[e]=tt[e].parentLocale:null!=tt[e]&&delete tt[e]);return tt[e]},n.locales=function(){return M(tt)},n.weekdaysShort=function(e,t,s){return _s(e,t,s,"weekdaysShort")},n.normalizeUnits=L,n.relativeTimeRounding=function(e){return void 0===e?Hs:"function"==typeof e&&(Hs=e,!0)},n.relativeTimeThreshold=function(e,t){return void 0!==Us[e]&&(void 0===t?Us[e]:(Us[e]=t,"s"===e&&(Us.ss=t-1),!0))},n.calendarFormat=function(e,t){var s=e.diff(t,"days",!0);return s<-6?"sameElse":s<-1?"lastWeek":s<0?"lastDay":s<1?"sameDay":s<2?"nextDay":s<7?"nextWeek":"sameElse"},n.prototype=ds,n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},n}()}).call(this,s("./node_modules/webpack/buildin/module.js")(e))},"./node_modules/vue-loader/lib/runtime/componentNormalizer.js":function(e,t,s){"use strict";function i(e,t,s,i,n,a,r,o){var l,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=s,u._compiled=!0),i&&(u.functional=!0),a&&(u._scopeId="data-v-"+a),r?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(r)},u._ssrRegister=l):n&&(l=o?function(){n.call(this,this.$root.$options.shadowRoot)}:n),l)if(u.functional){u._injectStyles=l;var d=u.render;u.render=function(e,t){return l.call(t),d(e,t)}}else{var c=u.beforeCreate;u.beforeCreate=c?[].concat(c,l):[l]}return{exports:e,options:u}}s.d(t,"a",(function(){return i}))},"./node_modules/webpack/buildin/global.js":function(e,t){var s;s=function(){return this}();try{s=s||new Function("return this")()}catch(e){"object"==typeof window&&(s=window)}e.exports=s},"./node_modules/webpack/buildin/module.js":function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},"./node_modules/xss/lib/default.js":function(e,t,s){var i=s("./node_modules/cssfilter/lib/index.js").FilterCSS,n=s("./node_modules/cssfilter/lib/index.js").getDefaultWhiteList,a=s("./node_modules/xss/lib/util.js");function r(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]}}var o=new i;function l(e){return e.replace(u,"<").replace(d,">")}var u=/</g,d=/>/g,c=/"/g,h=/"/g,f=/&#([a-zA-Z0-9]*);?/gim,m=/:?/gim,_=/&newline;?/gim,p=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,v=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,g=/u\s*r\s*l\s*\(.*/gi;function y(e){return e.replace(c,""")}function b(e){return e.replace(h,'"')}function w(e){return e.replace(f,(function(e,t){return"x"===t[0]||"X"===t[0]?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))}))}function k(e){return e.replace(m,":").replace(_," ")}function x(e){for(var t="",s=0,i=e.length;s<i;s++)t+=e.charCodeAt(s)<32?" ":e.charAt(s);return a.trim(t)}function C(e){return e=x(e=k(e=w(e=b(e))))}function S(e){return e=l(e=y(e))}var D=/<!--[\s\S]*?-->/g;t.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]},t.getDefaultWhiteList=r,t.onTag=function(e,t,s){},t.onIgnoreTag=function(e,t,s){},t.onTagAttr=function(e,t,s){},t.onIgnoreTagAttr=function(e,t,s){},t.safeAttrValue=function(e,t,s,i){if(s=C(s),"href"===t||"src"===t){if("#"===(s=a.trim(s)))return"#";if("http://"!==s.substr(0,7)&&"https://"!==s.substr(0,8)&&"mailto:"!==s.substr(0,7)&&"tel:"!==s.substr(0,4)&&"#"!==s[0]&&"/"!==s[0])return""}else if("background"===t){if(p.lastIndex=0,p.test(s))return""}else if("style"===t){if(v.lastIndex=0,v.test(s))return"";if(g.lastIndex=0,g.test(s)&&(p.lastIndex=0,p.test(s)))return"";!1!==i&&(s=(i=i||o).process(s))}return s=S(s)},t.escapeHtml=l,t.escapeQuote=y,t.unescapeQuote=b,t.escapeHtmlEntities=w,t.escapeDangerHtml5Entities=k,t.clearNonPrintableCharacter=x,t.friendlyAttrValue=C,t.escapeAttrValue=S,t.onIgnoreTagStripAll=function(){return""},t.StripTagBody=function(e,t){"function"!=typeof t&&(t=function(){});var s=!Array.isArray(e),i=[],n=!1;return{onIgnoreTag:function(r,o,l){if(function(t){return!!s||-1!==a.indexOf(e,t)}(r)){if(l.isClosing){var u="[/removed]",d=l.position+u.length;return i.push([!1!==n?n:l.position,d]),n=!1,u}return n||(n=l.position),"[removed]"}return t(r,o,l)},remove:function(e){var t="",s=0;return a.forEach(i,(function(i){t+=e.slice(s,i[0]),s=i[1]})),t+=e.slice(s)}}},t.stripCommentTag=function(e){return e.replace(D,"")},t.stripBlankChar=function(e){var t=e.split("");return(t=t.filter((function(e){var t=e.charCodeAt(0);return 127!==t&&(!(t<=31)||(10===t||13===t))}))).join("")},t.cssFilter=o,t.getDefaultCSSWhiteList=n},"./node_modules/xss/lib/index.js":function(e,t,s){var i=s("./node_modules/xss/lib/default.js"),n=s("./node_modules/xss/lib/parser.js"),a=s("./node_modules/xss/lib/xss.js");function r(e,t){return new a(t).process(e)}for(var o in(t=e.exports=r).filterXSS=r,t.FilterXSS=a,i)t[o]=i[o];for(var o in n)t[o]=n[o];"undefined"!=typeof window&&(window.filterXSS=e.exports),"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=e.exports)},"./node_modules/xss/lib/parser.js":function(e,t,s){var i=s("./node_modules/xss/lib/util.js");function n(e){var t=i.spaceIndex(e);if(-1===t)var s=e.slice(1,-1);else s=e.slice(1,t+1);return"/"===(s=i.trim(s).toLowerCase()).slice(0,1)&&(s=s.slice(1)),"/"===s.slice(-1)&&(s=s.slice(0,-1)),s}function a(e){return"</"===e.slice(0,2)}var r=/[^a-zA-Z0-9_:\.\-]/gim;function o(e,t){for(;t<e.length;t++){var s=e[t];if(" "!==s)return"="===s?t:-1}}function l(e,t){for(;t>0;t--){var s=e[t];if(" "!==s)return"="===s?t:-1}}function u(e){return function(e){return'"'===e[0]&&'"'===e[e.length-1]||"'"===e[0]&&"'"===e[e.length-1]}(e)?e.substr(1,e.length-2):e}t.parseTag=function(e,t,s){var i="",r=0,o=!1,l=!1,u=0,d=e.length,c="",h="";for(u=0;u<d;u++){var f=e.charAt(u);if(!1===o){if("<"===f){o=u;continue}}else if(!1===l){if("<"===f){i+=s(e.slice(r,u)),o=u,r=u;continue}if(">"===f){i+=s(e.slice(r,o)),c=n(h=e.slice(o,u+1)),i+=t(o,i.length,c,h,a(h)),r=u+1,o=!1;continue}if(('"'===f||"'"===f)&&"="===e.charAt(u-1)){l=f;continue}}else if(f===l){l=!1;continue}}return r<e.length&&(i+=s(e.substr(r))),i},t.parseAttr=function(e,t){var s=0,n=[],a=!1,d=e.length;function c(e,s){if(!((e=(e=i.trim(e)).replace(r,"").toLowerCase()).length<1)){var a=t(e,s||"");a&&n.push(a)}}for(var h=0;h<d;h++){var f,m=e.charAt(h);if(!1!==a||"="!==m)if(!1===a||h!==s||'"'!==m&&"'"!==m||"="!==e.charAt(h-1))if(/\s|\n|\t/.test(m)){if(e=e.replace(/\s|\n|\t/g," "),!1===a){if(-1===(f=o(e,h))){c(i.trim(e.slice(s,h))),a=!1,s=h+1;continue}h=f-1;continue}if(-1===(f=l(e,h-1))){c(a,u(i.trim(e.slice(s,h)))),a=!1,s=h+1;continue}}else;else{if(-1===(f=e.indexOf(m,h+1)))break;c(a,i.trim(e.slice(s+1,f))),a=!1,s=(h=f)+1}else a=e.slice(s,h),s=h+1}return s<e.length&&(!1===a?c(e.slice(s)):c(a,u(i.trim(e.slice(s))))),i.trim(n.join(" "))}},"./node_modules/xss/lib/util.js":function(e,t){e.exports={indexOf:function(e,t){var s,i;if(Array.prototype.indexOf)return e.indexOf(t);for(s=0,i=e.length;s<i;s++)if(e[s]===t)return s;return-1},forEach:function(e,t,s){var i,n;if(Array.prototype.forEach)return e.forEach(t,s);for(i=0,n=e.length;i<n;i++)t.call(s,e[i],i,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/.exec(e);return t?t.index:-1}}},"./node_modules/xss/lib/xss.js":function(e,t,s){var i=s("./node_modules/cssfilter/lib/index.js").FilterCSS,n=s("./node_modules/xss/lib/default.js"),a=s("./node_modules/xss/lib/parser.js"),r=a.parseTag,o=a.parseAttr,l=s("./node_modules/xss/lib/util.js");function u(e){return null==e}function d(e){(e=function(e){var t={};for(var s in e)t[s]=e[s];return t}(e||{})).stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=n.onIgnoreTagStripAll),e.whiteList=e.whiteList||n.whiteList,e.onTag=e.onTag||n.onTag,e.onTagAttr=e.onTagAttr||n.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||n.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||n.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||n.safeAttrValue,e.escapeHtml=e.escapeHtml||n.escapeHtml,this.options=e,!1===e.css?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new i(e.css))}d.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this.options,s=t.whiteList,i=t.onTag,a=t.onIgnoreTag,d=t.onTagAttr,c=t.onIgnoreTagAttr,h=t.safeAttrValue,f=t.escapeHtml,m=this.cssFilter;t.stripBlankChar&&(e=n.stripBlankChar(e)),t.allowCommentTag||(e=n.stripCommentTag(e));var _=!1;if(t.stripIgnoreTagBody){_=n.StripTagBody(t.stripIgnoreTagBody,a);a=_.onIgnoreTag}var p=r(e,(function(e,t,n,r,_){var p,v={sourcePosition:e,position:t,isClosing:_,isWhite:s.hasOwnProperty(n)};if(!u(p=i(n,r,v)))return p;if(v.isWhite){if(v.isClosing)return"</"+n+">";var g=function(e){var t=l.spaceIndex(e);if(-1===t)return{html:"",closing:"/"===e[e.length-2]};var s="/"===(e=l.trim(e.slice(t+1,-1)))[e.length-1];return s&&(e=l.trim(e.slice(0,-1))),{html:e,closing:s}}(r),y=s[n],b=o(g.html,(function(e,t){var s,i=-1!==l.indexOf(y,e);return u(s=d(n,e,t,i))?i?(t=h(n,e,t,m))?e+'="'+t+'"':e:u(s=c(n,e,t,i))?void 0:s:s}));r="<"+n;return b&&(r+=" "+b),g.closing&&(r+=" /"),r+=">"}return u(p=a(n,r,v))?f(r):p}),f);return _&&(p=_.remove(p)),p},e.exports=d},"./src/audit.js":function(e,t,s){"use strict";s.r(t);var i=s("vue"),n=s.n(i),a=s("./src/helper/base_hepler.js"),r=s("./src/component/footer.vue"),o=s("./node_modules/lodash/chunk.js"),l=s.n(o),u=s("./src/component/pagination.vue"),d=s("./node_modules/moment/moment.js"),c={mixins:[a.a],name:"logs",data:function(){return{filter:{date_range:null,username:"",ip_address:"",events:[],event_all:!0,is_open:!1,date_from:null,date_to:null},event_types:auditData.filters.types,data:{logs:[],chunks:[],total_items:0,total_pages:0,paged:1},misc:auditData.misc,endpoints:auditData.endpoints,nonces:auditData.nonces,state:{on_saving:!1,is_fetching:!1}}},methods:{date_range:function(){},build_filter_url:function(e){},paging:function(e){this.data.paged=e},do_filter:function(){var e=this,t=this.data.logs.filter((function(t){return(""===e.filter.username||-1!==t.user.indexOf(e.filter.username))&&((null===e.filter.ip_address||-1!==t.ip.indexOf(e.filter.ip_address))&&(!1!==e.filter.event_all||-1!==e.filter.events.indexOf(t.event_type)))}));e.data.chunks=l()(t,40),e.data.total_items=t.length,e.data.total_pages=Math.ceil(e.data.total_items/40),e.data.paged=1},fetch_data:function(e){var t=this;this.state.is_fetching=!0;var s=JSON.parse(JSON.stringify(this.filter));delete s.is_open,delete s.event_all,delete s.date_range,this.httpGetRequest("loadData",s,(function(s){!0===s.success?(t.data.logs=Object.values(s.data.logs),t.data.total_items=s.data.total_items,t.data.total_pages=s.data.total_pages,t.data.chunks=l()(t.data.logs,40),t.data.paged=1,t.state.is_fetching=!1,void 0!==e&&e()):Defender.showNotification("error",s.message)}),!1)},format_time:function(e){return Array.isArray(e)?this.$options.filters.moment(new Date(1e3*e[1]),this.misc.date_format):this.$options.filters.moment(new Date(1e3*e),this.misc.date_format)}},computed:{get_logs:function(){var e=[];return this.data.chunks.length>0&&void 0!==this.data.chunks[this.data.paged-1]&&(e=this.data.chunks[this.data.paged-1]),e},get_count:function(){return this.vsprintf(this.__("%s results"),this.data.total_items)},next_icon:function(){return'<i class="sui-icon-chevron-right" aria-hidden="true"></i>'},prev_icon:function(){return'<i class="sui-icon-chevron-left" aria-hidden="true"></i>'},min_date:function(){return d().format()},max_date:function(){return d().subtract(30,"days").format()},get_export_url:function(){var e=ajaxurl+"?action="+this.endpoints.exportAsCvs+"&_wpnonce="+this.nonces.exportAsCvs;return e+="&date_from="+this.filter.date_from,e+="&date_to="+this.filter.date_to,this.filter.events.forEach((function(t){e+="&event_type[]="+t})),e+="&term="+this.filter.username,e+="&ip="+this.filter.ip_address}},watch:{"filter.date_range":function(e,t){null!==e&&null!==t&&e!==t&&this.fetch_data()}},components:{pagination:u.a},created:function(){var e=new URLSearchParams(window.location.search),t=null!==e.get("date_from")?e.get("date_from"):d().subtract(7,"day").format("MM/DD/YYYY"),s=null!==e.get("date_to")?e.get("date_to"):d().format("MM/DD/YYYY");this.filter.date_range=t+" - "+s,this.filter.date_from=t,this.filter.date_to=s;var i=this;this.fetch_data((function(){i.$parent.$emit("events_in_7_days",i.data.logs.length)}))},mounted:function(){var e=this;this.$nextTick((function(){jQuery("#date-range-picker").daterangepicker({autoApply:!0,maxDate:d().format("MM/DD/YYYY"),minDate:d().subtract(1,"year").format("MM/DD/YYYY"),locale:{format:"MM/DD/YYYY",separator:"-"},ranges:{Today:[d(),d()],"7 Days":[d().subtract(6,"days"),d()],"30 Days":[d().subtract(29,"days"),d()]},template:'<div class="daterangepicker wd-calendar"><div class="ranges"></div><div class="drp-calendar left"><div class="calendar-table"></div><div class="calendar-time"></div></div><div class="drp-calendar right"><div class="calendar-table"></div><div class="calendar-time"></div></div></div>',showCustomRangeLabel:!1,alwaysShowCalendars:!0}),jQuery("#date-range-picker").on("apply.daterangepicker",(function(t,s){e.filter.date_range=s.startDate.format("MM/DD/YYYY")+"-"+s.endDate.format("MM/DD/YYYY"),e.filter.date_from=s.startDate.format("MM/DD/YYYY"),e.filter.date_to=s.endDate.format("MM/DD/YYYY")}))}))}},h=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),f=Object(h.a)(c,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"sui-box"},[s("div",{staticClass:"sui-box-header"},[s("h3",{staticClass:"sui-box-title"},[e._v("\n\t\t\t\t"+e._s(e.__("Event Logs"))+"\n\t\t\t")]),e._v(" "),s("div",{staticClass:"sui-actions-right"},[s("a",{staticClass:"sui-button sui-button-ghost",attrs:{href:e.get_export_url}},[s("i",{staticClass:"sui-icon-upload-cloud",attrs:{"aria-hidden":"true"}}),e._v("\n\t\t\t\t\t"+e._s(e.__("Export CSV"))+"\n\t\t\t\t")])])]),e._v(" "),s("div",{staticClass:"sui-box-body"},[s("p",[e._v("\n\t\t\t\t"+e._s(e.__("Here are your latest event logs showing what's been happening behind the scenes."))+"\n\t\t\t")]),e._v(" "),s("div",{staticClass:"sui-row"},[s("div",{staticClass:"sui-col-md-5"},[s("div",{staticClass:"inline-form"},[s("label",[e._v(e._s(e.__("Date range")))]),e._v(" "),s("div",{staticClass:"sui-date"},[s("i",{staticClass:"sui-icon-calendar",attrs:{"aria-hidden":"true"}}),e._v(" "),s("input",{staticClass:"sui-form-control",attrs:{id:"date-range-picker",name:"date_from",type:"text"},domProps:{value:e.filter.date_range}})])])]),e._v(" "),s("div",{staticClass:"sui-col-md-7"},[s("div",{staticClass:"sui-pagination-wrap"},[s("span",{staticClass:"sui-pagination-results",domProps:{textContent:e._s(e.get_count)}}),e._v(" "),e.data.total_items>0?s("pagination",{attrs:{"page-count":e.data.total_pages,"click-handler":e.paging,"prev-text":e.prev_icon,"next-text":e.next_icon,value:e.data.paged,"container-class":"sui-pagination"}}):e._e(),e._v(" "),s("button",{staticClass:"sui-button-icon sui-button-outlined sui-tooltip",attrs:{"data-tooltip":"Filter"},on:{click:function(t){e.filter.is_open=!e.filter.is_open}}},[s("i",{staticClass:"sui-icon-filter",attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",{staticClass:"sui-screen-reader-text"},[e._v("Open search filter")])])],1)])]),e._v(" "),s("div",{staticClass:"sui-pagination-filter",class:{"sui-open":e.filter.is_open}},[s("div",{staticClass:"sui-row"},[s("div",{staticClass:"sui-col-md-4"},[s("div",{staticClass:"sui-form-field"},[s("label",{staticClass:"sui-label"},[e._v(e._s(e.__("Username")))]),e._v(" "),s("div",{staticClass:"sui-control-with-icon sui-right-icon"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.filter.username,expression:"filter.username"}],staticClass:"sui-form-control",attrs:{type:"text"},domProps:{value:e.filter.username},on:{input:function(t){t.target.composing||e.$set(e.filter,"username",t.target.value)}}}),e._v(" "),s("i",{staticClass:"sui-icon-magnifying-glass-search",attrs:{"aria-hidden":"true"}})])])]),e._v(" "),s("div",{staticClass:"sui-col-md-3"},[s("div",{staticClass:"sui-form-field"},[s("label",{staticClass:"sui-label"},[e._v(e._s(e.__("IP Address")))]),e._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:e.filter.ip_address,expression:"filter.ip_address"}],staticClass:"sui-form-control",attrs:{type:"text","data-name":"ip",placeholder:"E.g. 192.168.1.1"},domProps:{value:e.filter.ip_address},on:{input:function(t){t.target.composing||e.$set(e.filter,"ip_address",t.target.value)}}})])])]),e._v(" "),s("div",{staticClass:"sui-row"},[s("div",{staticClass:"sui-col"},[s("div",{staticClass:"sui-form-field"},[s("div",{staticClass:"sui-side-tabs"},[s("div",{staticClass:"sui-tabs-menu"},[s("label",{staticClass:"sui-tab-item",class:{active:!0===e.filter.event_all},attrs:{for:"event_filter_all"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.filter.event_all,expression:"filter.event_all"}],attrs:{type:"radio",id:"event_filter_all","data-tab-menu":""},domProps:{value:!0,checked:e._q(e.filter.event_all,!0)},on:{change:function(t){return e.$set(e.filter,"event_all",!0)}}}),e._v("\n\t\t\t\t\t\t\t\t\t\t"+e._s(e.__("All"))+"\n\t\t\t\t\t\t\t\t\t")]),e._v(" "),s("label",{staticClass:"sui-tab-item",class:{active:!1===e.filter.event_all},attrs:{for:"event_filter"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.filter.event_all,expression:"filter.event_all"}],attrs:{type:"radio","data-tab-menu":"events-box",id:"event_filter"},domProps:{value:!1,checked:e._q(e.filter.event_all,!1)},on:{change:function(t){return e.$set(e.filter,"event_all",!1)}}}),e._v("\n\t\t\t\t\t\t\t\t\t\t"+e._s(e.__("Specific"))+"\n\t\t\t\t\t\t\t\t\t")])]),e._v(" "),s("div",{staticClass:"sui-tabs-content"},[s("div",{staticClass:"sui-tab-content sui-tab-boxed",class:{active:!1===e.filter.event_all},attrs:{id:"events-box","data-tab-content":"events-box"}},[s("div",{staticClass:"sui-row"},e._l(e.event_types,(function(t){return s("label",{staticClass:"sui-checkbox",attrs:{for:"chk_"+t}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.filter.events,expression:"filter.events"}],staticClass:"filterable",attrs:{id:"chk_"+t,type:"checkbox"},domProps:{value:t,checked:Array.isArray(e.filter.events)?e._i(e.filter.events,t)>-1:e.filter.events},on:{change:function(s){var i=e.filter.events,n=s.target,a=!!n.checked;if(Array.isArray(i)){var r=t,o=e._i(i,r);n.checked?o<0&&e.$set(e.filter,"events",i.concat([r])):o>-1&&e.$set(e.filter,"events",i.slice(0,o).concat(i.slice(o+1)))}else e.$set(e.filter,"events",a)}}}),e._v(" "),s("span",{attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",[e._v(e._s(t))])])})),0)])])])])])]),e._v(" "),s("hr"),e._v(" "),s("div",{staticClass:"float-r"},[s("button",{staticClass:"sui-button sui-button-blue",attrs:{type:"submit"},on:{click:e.do_filter}},[e._v("\n\t\t\t\t\t\t"+e._s(e.__("Apply"))+"\n\t\t\t\t\t")])]),e._v(" "),s("div",{staticClass:"clear"})])]),e._v(" "),s("div",{staticClass:"sui-accordion sui-accordion-flushed no-border-top"},[s("div",{staticClass:"sui-accordion-header"},[s("div",[e._v(e._s(e.__("Event summary")))]),e._v(" "),s("div",[e._v(e._s(e.__("Date")))]),e._v(" "),s("div")]),e._v(" "),e._l(e.get_logs,(function(t){return s("div",{staticClass:"sui-accordion-item sui-default"},[s("div",{staticClass:"sui-accordion-item-header"},[s("div",{staticClass:"sui-accordion-item-title",domProps:{textContent:e._s(e.xss(t.msg))}}),e._v(" "),s("div",{domProps:{innerHTML:e._s(e.format_time(t.timestamp))}}),e._v(" "),e._m(0,!0)]),e._v(" "),s("div",{staticClass:"sui-accordion-item-body"},[s("div",{staticClass:"sui-box"},[s("div",{staticClass:"sui-box-body"},[s("strong",[e._v(e._s(e.__("Description")))]),e._v(" "),s("p",{domProps:{textContent:e._s(t.msg)}}),e._v(" "),s("div",{staticClass:"sui-row"},[s("div",{staticClass:"sui-col"},[s("strong",{staticClass:"block"},[e._v(e._s(e.__("Context")))]),e._v(" "),s("a",{staticClass:"block",attrs:{href:e.build_filter_url(t.context)},domProps:{textContent:e._s(e.xss(t.context))}})]),e._v(" "),s("div",{staticClass:"sui-col"},[s("strong",{staticClass:"block"},[e._v(e._s(e.__("Type")))]),e._v(" "),s("a",{staticClass:"block",attrs:{href:e.build_filter_url(t.event_type)},domProps:{textContent:e._s(e.xss(t.event_type))}})]),e._v(" "),s("div",{staticClass:"sui-col"},[s("strong",{staticClass:"block"},[e._v(e._s(e.__("Ip Address")))]),e._v(" "),s("a",{staticClass:"block",attrs:{href:e.build_filter_url(t.ip)},domProps:{textContent:e._s(e.xss(t.ip))}})]),e._v(" "),s("div",{staticClass:"sui-col"},[s("strong",{staticClass:"block"},[e._v(e._s(e.__("User")))]),e._v(" "),s("a",{staticClass:"block",attrs:{href:e.build_filter_url(t.user)},domProps:{textContent:e._s(e.xss(t.user))}})]),e._v(" "),s("div",{staticClass:"sui-col"},[s("strong",{staticClass:"block"},[e._v(e._s(e.__("Date / Time")))]),e._v(" "),s("a",{staticClass:"block",attrs:{href:e.build_filter_url(t.timestamp)}},[e._v("\n\t\t\t\t\t\t\t\t\t\t"+e._s(e._f("moment")(new Date(1e3*t.timestamp),e.misc.date_format))+"\n\t\t\t\t\t\t\t\t\t")])])])])])])])}))],2),e._v(" "),0===e.data.chunks.length?s("div",{staticClass:"sui-row"},[s("div",{staticClass:"sui-col"},[s("div",{staticClass:"sui-notice"},[s("div",{staticClass:"sui-notice-content"},[s("div",{staticClass:"sui-notice-message"},[s("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),e._v(" "),!0===e.state.is_fetching?s("p",[e._v("\n\t\t\t\t\t\t"+e._s(e.__("Loading events..."))+"\n\t\t\t\t\t")]):s("p",[e._v("\n\t\t\t\t\t\t"+e._s(e.__("There have been no events logged in the selected time period."))+"\n\t\t\t\t\t")])])])])])]):e._e(),e._v(" "),s("div",{staticClass:"sui-center-box"},[s("div",{staticClass:"sui-pagination-wrap"},[e.data.total_items>0?s("pagination",{attrs:{"page-count":e.data.total_pages,"click-handler":e.paging,"prev-text":e.prev_icon,"next-text":e.next_icon,value:e.data.paged,"container-class":"sui-pagination"}}):e._e()],1)]),e._v(" "),e.state.is_fetching?s("overlay"):e._e()],1)}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("button",{staticClass:"sui-button-icon sui-accordion-open-indicator",attrs:{"aria-label":"Open item"}},[t("i",{staticClass:"sui-icon-chevron-down",attrs:{"aria-hidden":"true"}})])])}],!1,null,null,null).exports,m={mixins:[a.a],name:"settings",data:function(){return{model:auditData.model.settings,state:{on_saving:!1},nonces:auditData.nonces,endpoints:auditData.endpoints}},methods:{toggle:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"enabled",s=this,i={};i[t]=e,this.httpPostRequest("updateSettings",{data:JSON.stringify(i)},(function(){s.$parent.$emit("enable_state",e)}))},updateSettings:function(){var e=this.model;this.httpPostRequest("updateSettings",{data:JSON.stringify(e)})}},mounted:function(){var e=this;jQuery("#storage_days").change((function(){e.model.storage_days=jQuery(this).val()}))}},_=Object(h.a)(m,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"sui-box audit-settings"},[s("div",{staticClass:"sui-box-header"},[s("h3",{staticClass:"sui-box-title"},[e._v("\n\t\t\t\t"+e._s(e.__("Settings"))+"\n\t\t\t")])]),e._v(" "),s("form",{attrs:{method:"post"},on:{submit:function(t){return t.preventDefault(),e.updateSettings(t)}}},[s("div",{staticClass:"sui-box-body"},[s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[e._v(e._s(e.__("Storage")))]),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n "+e._s(e.__("Events are stored in our API. You can choose how many days to keep logs for before they are removed."))+"\n ")])]),e._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("div",{staticClass:"sui-form-field"},[s("select",{directives:[{name:"model",rawName:"v-model",value:e.model.storage_days,expression:"model.storage_days"}],attrs:{name:"storage_days",id:"storage_days"},on:{change:function(t){var s=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.model,"storage_days",t.target.multiple?s:s[0])}}},[s("option",{attrs:{value:"24 hours"}},[e._v(e._s(e.__("24 hours")))]),e._v(" "),s("option",{attrs:{value:"7 days"}},[e._v(e._s(e.__("7 days")))]),e._v(" "),s("option",{attrs:{value:"30 days"}},[e._v(e._s(e.__("30 days")))]),e._v(" "),s("option",{attrs:{value:"3 months"}},[e._v(e._s(e.__("3 months")))]),e._v(" "),s("option",{attrs:{value:"6 months"}},[e._v(e._s(e.__("6 months")))]),e._v(" "),s("option",{attrs:{value:"12 months"}},[e._v(e._s(e.__("12 months")))])]),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n "+e._s(e.__("Choose how long you'd like to store your event logs locally before wiping the oldest."))+"\n ")])])])]),e._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[e._v("\n "+e._s(e.__("Deactivate"))+"\n ")]),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n "+e._s(e.__("If you no longer want to use this feature you can turn it off at any time."))+"\n ")])]),e._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("submit-button",{attrs:{type:"button","css-class":"sui-button-ghost",state:e.state},on:{click:function(t){return e.toggle(!1)}}},[s("i",{staticClass:"sui-icon-save",attrs:{"aria-hidden":"true"}}),e._v("\n\t\t\t\t\t\t\t"+e._s(e.__("Deactivate"))+"\n\t\t\t\t\t\t")])],1)])]),e._v(" "),s("div",{staticClass:"sui-box-footer"},[s("div",{staticClass:"sui-actions-right"},[s("submit-button",{attrs:{type:"submit","css-class":"sui-button-blue",state:e.state}},[s("i",{staticClass:"sui-icon-save",attrs:{"aria-hidden":"true"}}),e._v("\n\t\t\t\t\t\t"+e._s(e.__("Save Changes"))+"\n\t\t\t\t\t")])],1)])])])}),[],!1,null,null,null).exports,p=s("./src/component/recipients.vue"),v={mixins:[a.a],name:"report",data:function(){return{model:auditData.model.report,misc:auditData.misc,nonces:auditData.nonces,endpoints:auditData.endpoints,state:{on_saving:!1,show_day:!0}}},components:{recipients:p.a},methods:{updateRecipients:function(e){this.model.receipts=e},updateSettings:function(){var e=this.model,t=this;this.httpPostRequest("updateSettings",{data:JSON.stringify(e)},(function(e){t.$parent.$emit("update_report_time",e.data.summary)}))}},mounted:function(){var e=this;jQuery(".report-select").change((function(){var t=jQuery(this).attr("name");e.model[t]=jQuery(this).val()})),this.model.day=this.model.day.toLowerCase()},watch:{"model.frequency":function(){this.state.show_day=this.model.frequency>1}},created:function(){this.state.show_day=this.model.frequency>1},computed:{timezone_text:function(){return this.vsprintf(this.__("Your timezone is set to UTC %s, so your current time is %s."),this.misc.tz,this.misc.current_time)}}},g=Object(h.a)(v,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"sui-box"},[s("div",{staticClass:"sui-box-header"},[s("h3",{staticClass:"sui-box-title"},[e._v("\n "+e._s(e.__("Notification"))+"\n ")])]),e._v(" "),s("form",{attrs:{method:"post"},on:{submit:function(t){return t.preventDefault(),e.updateSettings(t)}}},[s("div",{staticClass:"sui-box-body"},[s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[e._v("\n "+e._s(e.__("Scheduled Reports"))+"\n ")]),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n "+e._s(e.__("Schedule Defender to automatically email you a summary of all your website events."))+"\n ")])]),e._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("label",{staticClass:"sui-toggle"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.notification,expression:"model.notification"}],attrs:{type:"checkbox",name:"notification",id:"toggle_notification"},domProps:{checked:Array.isArray(e.model.notification)?e._i(e.model.notification,null)>-1:e.model.notification},on:{change:function(t){var s=e.model.notification,i=t.target,n=!!i.checked;if(Array.isArray(s)){var a=e._i(s,null);i.checked?a<0&&e.$set(e.model,"notification",s.concat([null])):a>-1&&e.$set(e.model,"notification",s.slice(0,a).concat(s.slice(a+1)))}else e.$set(e.model,"notification",n)}}}),e._v(" "),s("span",{staticClass:"sui-toggle-slider"})]),e._v(" "),s("label",{staticClass:"sui-toggle-label",attrs:{for:"toggle_notification"}},[e._v("\n "+e._s(e.__("Send regular email report"))+"\n ")]),e._v(" "),s("div",{staticClass:"sui-border-frame sui-toggle-content"},[s("div",{staticClass:"margin-top-30"},[s("recipients",{attrs:{id:"report_dialog",recipients:e.model.receipts},on:{"update:recipients":e.updateRecipients}})],1),e._v(" "),s("div",{staticClass:"sui-form-field margin-top-30 schedule-box"},[s("label",{staticClass:"sui-label",attrs:{for:"audit_report_frequency",id:"label_audit_report_frequency"}},[e._v("\n "+e._s(e.__("Frequency"))+"\n ")]),e._v(" "),s("div",{staticClass:"sui-row"},[s("div",{staticClass:"sui-col"},[s("select",{directives:[{name:"model",rawName:"v-model",value:e.model.frequency,expression:"model.frequency"}],staticClass:"report-select",attrs:{id:"audit_report_frequency","aria-labelledby":"label_audit_report_frequency",name:"frequency"},on:{change:function(t){var s=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.model,"frequency",t.target.multiple?s:s[0])}}},[s("option",{attrs:{value:"1"}},[e._v(e._s(e.__("Daily")))]),e._v(" "),s("option",{attrs:{value:"7"}},[e._v(e._s(e.__("Weekly")))]),e._v(" "),s("option",{attrs:{value:"30"}},[e._v(e._s(e.__("Monthly")))])])])]),e._v(" "),s("div",{staticClass:"sui-row"},[s("div",{directives:[{name:"show",rawName:"v-show",value:e.state.show_day,expression:"state.show_day"}],staticClass:"sui-col days-container"},[s("label",{staticClass:"sui-label",attrs:{for:"audit_report_day_week",id:"label_audit_report_day_week"}},[e._v("\n "+e._s(e.__("Day of the week"))+"\n ")]),e._v(" "),s("select",{directives:[{name:"model",rawName:"v-model",value:e.model.day,expression:"model.day"}],staticClass:"report-select",attrs:{id:"audit_report_day_week","aria-labelledby":"label_audit_report_day_week",name:"day"},on:{change:function(t){var s=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.model,"day",t.target.multiple?s:s[0])}}},e._l(e.misc.days_of_week,(function(t){return s("option",{domProps:{value:t.toLowerCase()}},[e._v(e._s(t)+"\n ")])})),0)]),e._v(" "),s("div",{staticClass:"sui-col"},[s("label",{staticClass:"sui-label",attrs:{for:"audit_report_day_time",id:"label_audit_report_day_time"}},[e._v("\n "+e._s(e.__("Time of day"))+"\n ")]),e._v(" "),s("select",{directives:[{name:"model",rawName:"v-model",value:e.model.time,expression:"model.time"}],staticClass:"report-select",attrs:{id:"audit_report_day_time","aria-labelledby":"label_audit_report_day_time",name:"time"},on:{change:function(t){var s=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.model,"time",t.target.multiple?s:s[0])}}},e._l(e.misc.times_of_day,(function(t,i){return s("option",{domProps:{value:i}},[e._v(e._s(t)+"\n ")])})),0)]),e._v(" "),s("div",{staticClass:"sui-col-md-12"},[s("span",{staticClass:"sui-p-small",domProps:{innerHTML:e._s(e.timezone_text)}})])])])])])])]),e._v(" "),s("div",{staticClass:"sui-box-footer"},[s("div",{staticClass:"sui-actions-right"},[s("submit-button",{attrs:{type:"submit","css-class":"sui-button-blue save-changes",state:e.state}},[s("i",{staticClass:"sui-icon-save",attrs:{"aria-hidden":"true"}}),e._v("\n "+e._s(e.__("Save Changes"))+"\n ")])],1)])])])}),[],!1,null,null,null).exports,y={mixins:[a.a],name:"audit",data:function(){return{view:"",summary:{report_time:auditData.summary.report_time,events_in_7_days:"-"},enabled:auditData.enabled,state:{on_saving:!1},nonces:auditData.nonces,endpoints:auditData.endpoints}},components:{"app-footer":r.a,logs:f,settings:_,report:g},methods:{updateSummary:function(e){this.summary.events_in_7_days=e},toggle:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"enabled",s=this,i={};i[t]=e,this.httpPostRequest("updateSettings",{data:JSON.stringify(i)},(function(){s.enabled=e,s.$nextTick((function(){s.rebindSUI()}))}))}},created:function(){var e=new URLSearchParams(window.location.search).get("view");null===e&&(e="logs"),this.view=e,this.$on("events_in_7_days",(function(e){this.summary.events_in_7_days=e})),this.$on("update_report_time",(function(e){this.summary.report_time=e.report_time})),this.$on("enable_state",(function(e){this.enabled=e}))},watch:{view:function(e,t){history.replaceState({},null,this.adminUrl()+"admin.php?page=wdf-logging&view="+this.view)}},mounted:function(){self=this,jQuery(".sui-mobile-nav").change((function(){self.view=jQuery(this).val()}))}},b=Object(h.a)(y,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"sui-wrap",class:e.maybeHighContrast()},[e.enabled?s("div",{staticClass:"auditing"},[s("div",{staticClass:"sui-header"},[s("h1",{staticClass:"sui-header-title"},[e._v("\n "+e._s(e.__("Audit Logging"))+"\n ")]),e._v(" "),s("doc-link",{attrs:{link:"https://premium.wpmudev.org/docs/wpmu-dev-plugins/defender/#audit-logging"}})],1),e._v(" "),s("summary-box",{attrs:{"css-class":"sui-summary-sm"}},[s("div",{staticClass:"sui-summary-segment"},[s("div",{staticClass:"sui-summary-details"},[s("span",{staticClass:"sui-summary-large",domProps:{textContent:e._s(e.summary.events_in_7_days)}}),e._v(" "),s("span",{staticClass:"sui-summary-sub"},[e._v("\n "+e._s(e.__("Events logged in the past 7 days"))+"\n ")])])]),e._v(" "),s("div",{staticClass:"sui-summary-segment"},[s("ul",{staticClass:"sui-list"},[s("li",[s("span",{staticClass:"sui-list-label"},[e._v(e._s(e.__("Reporting")))]),e._v(" "),s("span",{staticClass:"sui-list-detail",domProps:{textContent:e._s(e.summary.report_time)}})])])])]),e._v(" "),s("div",{staticClass:"sui-row-with-sidenav"},[s("div",{staticClass:"sui-sidenav"},[s("ul",{staticClass:"sui-vertical-tabs sui-sidenav-hide-md"},[s("li",{staticClass:"sui-vertical-tab",class:{current:"logs"===e.view},attrs:{id:"tab_log"}},[s("a",{attrs:{href:e.adminUrl("admin.php?page=wdf-logging")},on:{click:function(t){t.preventDefault(),e.view="logs"}}},[e._v(e._s(e.__("Event Logs")))])]),e._v(" "),s("li",{staticClass:"sui-vertical-tab",class:{current:"settings"===e.view},attrs:{id:"tab_settings"}},[s("a",{attrs:{href:e.adminUrl("admin.php?page=wdf-logging&view=settings")},on:{click:function(t){t.preventDefault(),e.view="settings"}}},[e._v(e._s(e.__("Settings")))])]),e._v(" "),s("li",{staticClass:"sui-vertical-tab",class:{current:"report"===e.view},attrs:{id:"tab_report"}},[s("a",{attrs:{href:e.adminUrl("admin.php?page=wdf-logging&view=report")},on:{click:function(t){t.preventDefault(),e.view="report"}}},[e._v(e._s(e.__("Reports")))])])]),e._v(" "),s("div",{staticClass:"sui-sidenav-hide-lg"},[s("select",{staticClass:"sui-mobile-nav",staticStyle:{display:"none"}},[s("option",{attrs:{value:"logs"}},[e._v(e._s(e.__("Event Logs")))]),e._v(" "),s("option",{attrs:{value:"settings"}},[e._v(e._s(e.__("Settings")))]),e._v(" "),s("option",{attrs:{value:"report"}},[e._v(e._s(e.__("Reports")))])])])]),e._v(" "),s("logs",{directives:[{name:"show",rawName:"v-show",value:"logs"===e.view,expression:"view==='logs'"}]}),e._v(" "),s("settings",{directives:[{name:"show",rawName:"v-show",value:"settings"===e.view,expression:"view==='settings'"}]}),e._v(" "),s("report",{directives:[{name:"show",rawName:"v-show",value:"report"===e.view,expression:"view==='report'"}]})],1),e._v(" "),s("app-footer")],1):s("div",{staticClass:"auditing"},[s("div",{staticClass:"sui-header"},[s("h1",{staticClass:"sui-header-title"},[e._v("\n "+e._s(e.__("Audit Logging"))+"\n ")]),e._v(" "),s("div",{staticClass:"sui-actions-right"},[s("doc-link",{attrs:{link:"https://premium.wpmudev.org/docs/wpmu-dev-plugins/defender/#audit-logging"}})],1)]),e._v(" "),s("div",{staticClass:"sui-box"},[s("div",{staticClass:"sui-box-header"},[s("h3",{staticClass:"sui-box-title"},[e._v("\n "+e._s(e.__("Activate"))+"\n ")])]),e._v(" "),s("div",{staticClass:"sui-message"},[!1===e.maybeHideBranding()?s("img",{staticClass:"sui-image",attrs:{src:e.assetUrl("assets/img/audit-disabled-man.svg"),"aria-hidden":"true"}}):e._e(),e._v(" "),s("div",{staticClass:"sui-message-content"},[s("p",[e._v("\n "+e._s(e.__("Track and log each and every event when changes are made to your website and get detailed reports on what's going on behind the scenes, including any hacking attempts onyour site."))+"\n ")]),e._v(" "),s("submit-button",{attrs:{type:"button","css-class":"sui-button-blue activate",state:e.state},on:{click:function(t){return e.toggle(!0)}}},[e._v("\n "+e._s(e.__("Activate"))+"\n ")])],1)])])])])}),[],!1,null,null,null).exports,w={mixins:[a.a],name:"audit-free"},k=Object(h.a)(w,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"sui-wrap",class:e.maybeHighContrast},[s("div",{staticClass:"sui-box"},[s("div",{staticClass:"sui-box-header"},[s("h3",{staticClass:"sui-box-title"},[e._v("\n "+e._s(e.__("Audit Logging"))+"\n ")]),e._v(" "),e._m(0)]),e._v(" "),s("div",{staticClass:"sui-message"},[s("img",{staticClass:"sui-image",attrs:{src:e.assetUrl("assets/img/audit-disabled-man.svg")}}),e._v(" "),s("div",{staticClass:"sui-message-content"},[s("p",[e._v("\n "+e._s(e.__("Track and log each and every event when changes are made to your website and get detailed reports on what's going on behind the scenes, including any hacking attempts on your site. This is a pro feature that requires an active WPMU DEV membership. Try it free today!"))+"\n ")]),e._v(" "),s("a",{staticClass:"sui-button sui-button-purple",attrs:{href:e.campaign_url("defender_auditlogging_upgrade_button"),target:"_blank"}},[e._v("Upgrade to Pro")])])])])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"sui-actions-left"},[t("span",{staticClass:"sui-tag sui-tag-pro"},[this._v("Pro")])])}],!1,null,null,null).exports,x=s("./src/component/overlay.vue"),C=s("./src/component/submit-button.vue"),S=s("./src/component/doc-link.vue"),D=s("./src/component/summary-box.vue");n.a.filter("moment",(function(e,t){return e?d(e).format(t):d().format(t)})),n.a.component("overlay",x.a),n.a.component("submit-button",C.a),n.a.component("app-footer",r.a),n.a.component("doc-link",S.a),n.a.component("summary-box",D.a);new n.a({el:"#defender",components:{audit:b,audit_free:k},render:function(e){return 0===parseInt(defender.is_free)?e(b):e(k)}})},"./src/component/doc-link.vue":function(e,t,s){"use strict";var i={mixins:[s("./src/helper/base_hepler.js").a],name:"doc-link",props:["link"],data:function(){return{whitelabel:defender.whitelabel}}},n=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),a=Object(n.a)(i,(function(){var e=this.$createElement,t=this._self._c||e;return!1===this.whitelabel.hide_doc_link?t("div",{staticClass:"sui-actions-right"},[t("a",{staticClass:"sui-button sui-button-ghost",attrs:{href:this.link,target:"_blank"}},[t("i",{staticClass:"sui-icon-academy"}),this._v(" "+this._s(this.__("View Documentation"))+"\n ")])]):this._e()}),[],!1,null,null,null);t.a=a.exports},"./src/component/footer.vue":function(e,t,s){"use strict";var i={data:function(){return{whitelabel:defender.whitelabel,is_free:parseInt(defender.is_free)}}},n=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),a=Object(n.a)(i,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[!0===e.whitelabel.change_footer?s("div",{staticClass:"sui-footer"},[e._v("\n "+e._s(e.whitelabel.footer_text)+"\n ")]):s("div",{staticClass:"sui-footer"},[e._v("Made with "),s("i",{staticClass:"sui-icon-heart"}),e._v(" by WPMU DEV")]),e._v(" "),!1===e.whitelabel.hide_doc_link?s("div",[1===e.is_free?s("ul",{staticClass:"sui-footer-nav"},[e._m(0),e._v(" "),e._m(1),e._v(" "),e._m(2),e._v(" "),e._m(3),e._v(" "),e._m(4),e._v(" "),e._m(5),e._v(" "),e._m(6),e._v(" "),e._m(7)]):s("ul",{staticClass:"sui-footer-nav"},[e._m(8),e._v(" "),e._m(9),e._v(" "),e._m(10),e._v(" "),e._m(11),e._v(" "),e._m(12),e._v(" "),e._m(13),e._v(" "),e._m(14),e._v(" "),e._m(15)]),e._v(" "),e._m(16)]):e._e()])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://profiles.wordpress.org/wpmudev#content-plugins",target:"_blank"}},[this._v("Free\n Plugins")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/features/",target:"_blank"}},[this._v("Membership")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/roadmap/",target:"_blank"}},[this._v("Roadmap")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://wordpress.org/support/plugin/plugin-name",target:"_blank"}},[this._v("Support")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/docs/",target:"_blank"}},[this._v("Docs")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/hub/",target:"_blank"}},[this._v("The Hub")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/terms-of-service/",target:"_blank"}},[this._v("Terms of Service")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://incsub.com/privacy-policy/",target:"_blank"}},[this._v("Privacy Policy")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/hub/",target:"_blank"}},[this._v("The Hub")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/projects/category/plugins/",target:"_blank"}},[this._v("Plugins")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/roadmap/",target:"_blank"}},[this._v("Roadmap")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/hub/support/",target:"_blank"}},[this._v("Support")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/docs/",target:"_blank"}},[this._v("Docs")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/hub/community/",target:"_blank"}},[this._v("Community")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/terms-of-service/",target:"_blank"}},[this._v("Terms of Service")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://incsub.com/privacy-policy/",target:"_blank"}},[this._v("Privacy Policy")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("ul",{staticClass:"sui-footer-social"},[s("li",[s("a",{attrs:{href:"https://www.facebook.com/wpmudev",target:"_blank"}},[s("i",{staticClass:"sui-icon-social-facebook",attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",{staticClass:"sui-screen-reader-text"},[e._v("Facebook")])])]),e._v(" "),s("li",[s("a",{attrs:{href:"https://twitter.com/wpmudev",target:"_blank"}},[s("i",{staticClass:"sui-icon-social-twitter",attrs:{"aria-hidden":"true"}})]),e._v(" "),s("span",{staticClass:"sui-screen-reader-text"},[e._v("Twitter")])]),e._v(" "),s("li",[s("a",{attrs:{href:"https://www.instagram.com/wpmu_dev/",target:"_blank"}},[s("i",{staticClass:"sui-icon-instagram",attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",{staticClass:"sui-screen-reader-text"},[e._v("Instagram")])])])])}],!1,null,null,null);t.a=a.exports},"./src/component/overlay.vue":function(e,t,s){"use strict";var i={name:"overlay"},n=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),a=Object(n.a)(i,(function(){var e=this.$createElement;this._self._c;return this._m(0)}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"wd-overlay"},[t("i",{staticClass:"sui-icon-loader sui-loading",attrs:{"aria-hidden":"true"}})])}],!1,null,null,null);t.a=a.exports},"./src/component/pagination.vue":function(e,t,s){"use strict";var i={props:{value:{type:Number},pageCount:{type:Number,required:!0},forcePage:{type:Number},clickHandler:{type:Function,default:function(){}},pageRange:{type:Number,default:3},marginPages:{type:Number,default:1},prevText:{type:String,default:"Prev"},nextText:{type:String,default:"Next"},breakViewText:{type:String,default:"…"},containerClass:{type:String},pageClass:{type:String},pageLinkClass:{type:String},prevClass:{type:String},prevLinkClass:{type:String},nextClass:{type:String},nextLinkClass:{type:String},breakViewClass:{type:String},breakViewLinkClass:{type:String},activeClass:{type:String,default:"active"},disabledClass:{type:String,default:"disabled"},noLiSurround:{type:Boolean,default:!1},firstLastButton:{type:Boolean,default:!1},firstButtonText:{type:String,default:"First"},lastButtonText:{type:String,default:"Last"},hidePrevNext:{type:Boolean,default:!1}},beforeUpdate:function(){void 0!==this.forcePage&&this.forcePage!==this.selected&&(this.selected=this.forcePage)},computed:{selected:{get:function(){return this.value||this.innerValue},set:function(e){this.innerValue=e}},pages:function(){var e=this,t={};if(this.pageCount<=this.pageRange)for(var s=0;s<this.pageCount;s++){var i={index:s,content:s+1,selected:s===this.selected-1};t[s]=i}else{for(var n=Math.floor(this.pageRange/2),a=function(s){var i={index:s,content:s+1,selected:s===e.selected-1};t[s]=i},r=function(e){t[e]={disabled:!0,breakView:!0}},o=0;o<this.marginPages;o++)a(o);var l=0;this.selected-n>0&&(l=this.selected-1-n);var u=l+this.pageRange-1;u>=this.pageCount&&(l=(u=this.pageCount-1)-this.pageRange+1);for(var d=l;d<=u&&d<=this.pageCount-1;d++)a(d);l>this.marginPages&&r(l-1),u+1<this.pageCount-this.marginPages&&r(u+1);for(var c=this.pageCount-1;c>=this.pageCount-this.marginPages;c--)a(c)}return t}},data:function(){return{innerValue:1}},methods:{handlePageSelected:function(e){this.selected!==e&&(this.innerValue=e,this.$emit("input",e),this.clickHandler(e))},prevPage:function(){this.selected<=1||this.handlePageSelected(this.selected-1)},nextPage:function(){this.selected>=this.pageCount||this.handlePageSelected(this.selected+1)},firstPageSelected:function(){return 1===this.selected},lastPageSelected:function(){return this.selected===this.pageCount||0===this.pageCount},selectFirstPage:function(){this.selected<=1||this.handlePageSelected(1)},selectLastPage:function(){this.selected>=this.pageCount||this.handlePageSelected(this.pageCount)}}},n=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),a=Object(n.a)(i,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return e.noLiSurround?s("div",{class:e.containerClass},[e.firstLastButton?s("a",{class:[e.pageLinkClass,e.firstPageSelected()?e.disabledClass:""],attrs:{tabindex:"0"},domProps:{innerHTML:e._s(e.firstButtonText)},on:{click:function(t){return e.selectFirstPage()},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.selectFirstPage()}}}):e._e(),e._v(" "),e.firstPageSelected()&&e.hidePrevNext?e._e():s("a",{class:[e.prevLinkClass,e.firstPageSelected()?e.disabledClass:""],attrs:{tabindex:"0"},domProps:{innerHTML:e._s(e.prevText)},on:{click:function(t){return e.prevPage()},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.prevPage()}}}),e._v(" "),e._l(e.pages,(function(t){return[t.breakView?s("a",{class:[e.pageLinkClass,e.breakViewLinkClass,t.disabled?e.disabledClass:""],attrs:{tabindex:"0"}},[e._t("breakViewContent",[e._v(e._s(e.breakViewText))])],2):t.disabled?s("a",{class:[e.pageLinkClass,t.selected?e.activeClass:"",e.disabledClass],attrs:{tabindex:"0"}},[e._v(e._s(t.content))]):s("a",{class:[e.pageLinkClass,t.selected?e.activeClass:""],attrs:{tabindex:"0"},on:{click:function(s){return e.handlePageSelected(t.index+1)},keyup:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:e.handlePageSelected(t.index+1)}}},[e._v(e._s(t.content))])]})),e._v(" "),e.lastPageSelected()&&e.hidePrevNext?e._e():s("a",{class:[e.nextLinkClass,e.lastPageSelected()?e.disabledClass:""],attrs:{tabindex:"0"},domProps:{innerHTML:e._s(e.nextText)},on:{click:function(t){return e.nextPage()},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.nextPage()}}}),e._v(" "),e.firstLastButton?s("a",{class:[e.pageLinkClass,e.lastPageSelected()?e.disabledClass:""],attrs:{tabindex:"0"},domProps:{innerHTML:e._s(e.lastButtonText)},on:{click:function(t){return e.selectLastPage()},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.selectLastPage()}}}):e._e()],2):s("ul",{class:e.containerClass},[e.firstLastButton?s("li",{class:[e.pageClass,e.firstPageSelected()?e.disabledClass:""]},[s("a",{class:e.pageLinkClass,attrs:{tabindex:e.firstPageSelected()?-1:0},domProps:{innerHTML:e._s(e.firstButtonText)},on:{click:function(t){return e.selectFirstPage()},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.selectFirstPage()}}})]):e._e(),e._v(" "),e.firstPageSelected()&&e.hidePrevNext?e._e():s("li",{class:[e.prevClass,e.firstPageSelected()?e.disabledClass:""]},[s("a",{class:e.prevLinkClass,attrs:{tabindex:e.firstPageSelected()?-1:0},domProps:{innerHTML:e._s(e.prevText)},on:{click:function(t){return e.prevPage()},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.prevPage()}}})]),e._v(" "),e._l(e.pages,(function(t){return s("li",{class:[e.pageClass,t.selected?e.activeClass:"",t.disabled?e.disabledClass:"",t.breakView?e.breakViewClass:""]},[t.breakView?s("a",{class:[e.pageLinkClass,e.breakViewLinkClass],attrs:{tabindex:"0"}},[e._t("breakViewContent",[e._v(e._s(e.breakViewText))])],2):t.disabled?s("a",{class:e.pageLinkClass,attrs:{tabindex:"0"}},[e._v(e._s(t.content))]):s("a",{class:e.pageLinkClass,attrs:{disabled:t.selected,tabindex:"0"},on:{click:function(s){return e.handlePageSelected(t.index+1)},keyup:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:e.handlePageSelected(t.index+1)}}},[e._v(e._s(t.content))])])})),e._v(" "),e.lastPageSelected()&&e.hidePrevNext?e._e():s("li",{class:[e.nextClass,e.lastPageSelected()?e.disabledClass:""]},[s("a",{class:e.nextLinkClass,attrs:{tabindex:e.lastPageSelected()?-1:0},domProps:{innerHTML:e._s(e.nextText)},on:{click:function(t){return e.nextPage()},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.nextPage()}}})]),e._v(" "),e.firstLastButton?s("li",{class:[e.pageClass,e.lastPageSelected()?e.disabledClass:""]},[s("a",{class:e.pageLinkClass,attrs:{tabindex:e.lastPageSelected()?-1:0},domProps:{innerHTML:e._s(e.lastButtonText)},on:{click:function(t){return e.selectLastPage()},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.selectLastPage()}}})]):e._e()],2)}),[],!1,null,null,null);t.a=a.exports},"./src/component/recipients.vue":function(e,t,s){"use strict";var i={mixins:[s("./src/helper/base_hepler.js").a],props:["recipients","id"],data:function(){return{first_name:"",email:"",observers:[],can_add:!1,saving_warning:!1,validate:{email:""}}},created:function(){this.observers=this.recipients},watch:{email:function(){if(this.validateEmail(this.email)){var e=!0,t=this;this.observers.forEach((function(s,i){if(s.email===t.email)return e=!1,void(t.validate.email=t.__("This email address is already in use"))})),this.can_add=e,!0===e&&(this.validate.email="")}else this.can_add=!1,this.validate.email=this.__("Invalid email address")},observers:function(){0===this.observers.length?this.saving_warning=!0:this.saving_warning=!1,void 0!==this.event&&this.$emit("update:recipients",this.observers)}},methods:{addRecipient:function(){this.observers.push({first_name:this.first_name,email:this.email}),SUI.closeModal(),this.first_name="",this.email=""},removeRecipient:function(e){this.observers.splice(e,1)},validateEmail:function(e){return/^(([^<>()\[\]\\.,;:\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(String(e).toLowerCase())}}},n=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),a=Object(n.a)(i,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{directives:[{name:"show",rawName:"v-show",value:e.saving_warning,expression:"saving_warning"}],staticClass:"sui-notice sui-notice-warning"},[s("div",{staticClass:"sui-notice-content"},[s("div",{staticClass:"sui-notice-message"},[s("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),e._v(" "),s("p",[e._v("\n "+e._s(e.__("You've removed all recipients. If you save without a recipient, we'll automatically turn of reports"))+"\n ")])])])]),e._v(" "),s("div",{staticClass:"sui-recipients"},[e._l(e.observers,(function(t,i){return s("div",{staticClass:"sui-recipient"},[s("span",{staticClass:"sui-recipient-name"},[e._v(e._s(t.first_name))]),e._v(" "),s("span",{staticClass:"sui-recipient-email"},[e._v(e._s(t.email))]),e._v(" "),s("button",{staticClass:"sui-button-icon",attrs:{type:"button"},on:{click:function(t){return e.removeRecipient(i)}}},[s("i",{staticClass:"sui-icon-trash",attrs:{"aria-hidden":"true"}})])])})),e._v(" "),s("button",{staticClass:"sui-button sui-button-ghost add-recipient",attrs:{"data-modal-open":e.id,"data-modal-mask":"true","data-esc-close":"true"}},[s("i",{staticClass:"sui-icon-plus",attrs:{"aria-hidden":"true"}}),e._v(" "+e._s(e.__("Add Recipient"))+"\n ")])],2),e._v(" "),s("div",{staticClass:"sui-modal sui-modal-md"},[s("div",{staticClass:"sui-modal-content",attrs:{role:"dialog",id:e.id,"aria-modal":"true","aria-labelledby":"Recipient dialog"}},[s("div",{staticClass:"sui-box",attrs:{role:"document"}},[s("div",{staticClass:"sui-box-header"},[s("h3",{staticClass:"sui-box-title"},[e._v("\n "+e._s(e.__("Add Recipient"))+"\n ")]),e._v(" "),e._m(0)]),e._v(" "),s("div",{staticClass:"sui-box-body"},[s("p",[e._v("\n "+e._s(e.__("Add as many recipients as you like, they will receive email reports as per the schedule you set."))+"\n ")]),e._v(" "),s("div",{staticClass:"sui-form-field"},[s("label",{staticClass:"sui-label"},[e._v(e._s(e.__("First name")))]),e._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:e.first_name,expression:"first_name"}],staticClass:"sui-form-control recipient_name",attrs:{type:"text"},domProps:{value:e.first_name},on:{input:function(t){t.target.composing||(e.first_name=t.target.value)}}})]),e._v(" "),s("div",{staticClass:"sui-form-field",class:{"sui-form-field-error":e.validate.email.length>0}},[s("label",{staticClass:"sui-label"},[e._v(e._s(e.__("Email")))]),e._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:e.email,expression:"email"}],staticClass:"sui-form-control recipient_email",attrs:{type:"text"},domProps:{value:e.email},on:{input:function(t){t.target.composing||(e.email=t.target.value)}}}),e._v(" "),s("span",{directives:[{name:"show",rawName:"v-show",value:e.validate.email.length>0,expression:"validate.email.length > 0"}],staticClass:"sui-error-message",domProps:{textContent:e._s(this.validate.email)}})])]),e._v(" "),s("div",{staticClass:"sui-box-footer"},[s("button",{staticClass:"sui-button sui-button-ghost",attrs:{type:"button","data-modal-close":""}},[e._v("\n "+e._s(e.__("Cancel"))+"\n ")]),e._v(" "),s("button",{staticClass:"sui-modal-close sui-button recipient_save",attrs:{type:"button",disabled:!1===e.can_add},on:{click:e.addRecipient}},[e._v(e._s(e.__("Add"))+"\n ")])])])])])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"sui-actions-right"},[t("button",{staticClass:"sui-button-icon",attrs:{type:"button","data-modal-close":"","aria-label":"Close this dialog window"}},[t("i",{staticClass:"sui-icon-close"})])])}],!1,null,null,null);t.a=a.exports},"./src/component/submit-button.vue":function(e,t,s){"use strict";var i={name:"submit-button",props:["id","state","text","css-class","type"],computed:{getClass:function(){return"sui-button "+this.cssClass}}},n=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),a=Object(n.a)(i,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("button",{staticClass:"sui-button",class:[e.getClass,{"sui-button-onload":e.state.on_saving}],attrs:{id:e.id,type:e.type,disabled:e.state.on_saving},on:{click:function(t){return e.$emit("click")}}},[s("span",{staticClass:"sui-loading-text"},[e._t("default")],2),e._v(" "),s("i",{staticClass:"sui-icon-loader sui-loading",attrs:{"aria-hidden":"true"}})])}),[],!1,null,null,null);t.a=a.exports},"./src/component/summary-box.vue":function(e,t,s){"use strict";var i={mixins:[s("./src/helper/base_hepler.js").a],props:["css-class"],name:"summary-box",data:function(){return{whitelabel:defender.whitelabel}},computed:{summary_class:function(){return{"sui-unbranded":!0===this.whitelabel.hide_branding&&0===this.whitelabel.hero_image.length,"sui-rebranded":!0===this.whitelabel.hide_branding&&this.whitelabel.hero_image.length>0}},css_class:function(){return this.cssClass},rebrand_img:function(){if(this.whitelabel.hero_image.length>0)return{"background-image":"url('"+this.whitelabel.hero_image+"')"}}}},n=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),a=Object(n.a)(i,(function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"sui-box sui-summary",class:[this.summary_class,this.css_class],style:this.rebrand_img},[t("div",{staticClass:"sui-summary-image-space",attrs:{"aria-hidden":"true"}}),this._v(" "),this._t("default")],2)}),[],!1,null,null,null);t.a=a.exports},"./src/helper/base_hepler.js":function(e,t,s){"use strict";var i=s("./node_modules/xss/lib/index.js"),n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var s=[],i=!0,n=!1,a=void 0;try{for(var r,o=e[Symbol.iterator]();!(i=(r=o.next()).done)&&(s.push(r.value),!t||s.length!==t);i=!0);}catch(e){n=!0,a=e}finally{try{!i&&o.return&&o.return()}finally{if(n)throw a}}return s}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},a=wp.i18n,r={whiteList:{a:["href","title","target"],span:["class"],strong:["*"]},safeAttrValue:function(e,t,s,n){return"a"===e&&"href"===t&&"%s"===s?"%s":Object(i.safeAttrValue)(e,t,s,n)}},o=new i.FilterXSS(r),l=[];t.a={methods:{__:function(e){var t=a.__(e,"wpdef");return o.process(t)},xss:function(e){return o.process(e)},vsprintf:function(e){return a.sprintf.apply(null,arguments)},siteUrl:function(e){return void 0!==e?defender.site_url+e:defender.site_url},adminUrl:function(e){return void 0!==e?defender.admin_url+e:defender.admin_url},assetUrl:function(e){return defender.defender_url+e},maybeHighContrast:function(){return{"sui-color-accessible":!0===defender.misc.high_contrast}},maybeHideBranding:function(){return defender.whitelabel.hide_branding},isWhitelabelEnabled:function(){return defender.whitelabel.enabled},campaign_url:function(e){return"https://premium.wpmudev.org/project/wp-defender/?utm_source=defender&utm_medium=plugin&utm_campaign="+e},campaignUrl:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"https://premium.wpmudev.org/"+e+"?utm_source=defender&utm_medium=plugin&utm_campaign="+t},httpRequest:function(e,t,s,i,n){var a=this;void 0===n&&(this.state.on_saving=!0);var r=ajaxurl+"?action="+this.endpoints[t]+"&_wpnonce="+this.nonces[t],o=jQuery.ajax({url:r,method:e,data:s,success:function(e){var t=e.data;a.state.on_saving=!1,void 0!==t&&void 0!==t.message&&(e.success?Defender.showNotification("success",t.message):Defender.showNotification("error",t.message)),void 0!==i&&i(e)}});l.push(o)},httpGetRequest:function(e,t,s,i){this.httpRequest("get",e,t,s,i)},httpPostRequest:function(e,t,s,i){this.httpRequest("post",e,t,s,i)},abortAllRequests:function(){for(var e=0;e<l.length;e++)l[e].abort()},getQueryStringParams:function(e){return e?(/^[?#]/.test(e)?e.slice(1):e).split("&").reduce((function(e,t){var s=t.split("="),i=n(s,2),a=i[0],r=i[1];return e[a]=r?decodeURIComponent(r.replace(/\+/g," ")):"",e}),{}):{}},rebindSUI:function(){jQuery("select:not([multiple])").each((function(){SUI.suiSelect(this)})),jQuery(".sui-accordion").each((function(){SUI.suiAccordion(this)}));var e=jQuery(".sui-wrap");SUI.dialogs={},jQuery(".sui-dialog").each((function(){SUI.dialogs[this.id]=new A11yDialog(this,e)}))}}}},vue:function(e,t){e.exports=Vue}});
|
1 |
+
!function(e){var t=window.webpackHotUpdate;window.webpackHotUpdate=function(e,s){!function(e,t){if(!w[e]||!b[e])return;for(var s in b[e]=!1,t)Object.prototype.hasOwnProperty.call(t,s)&&(m[s]=t[s]);0==--v&&0===g&&S()}(e,s),t&&t(e,s)};var s,i=!0,n="aa2de61bdce813924e40",a={},r=[],o=[];function l(e){var t=Y[e];if(!t)return T;var i=function(i){return t.hot.active?(Y[i]?-1===Y[i].parents.indexOf(e)&&Y[i].parents.push(e):(r=[e],s=i),-1===t.children.indexOf(i)&&t.children.push(i)):(console.warn("[HMR] unexpected require("+i+") from disposed module "+e),r=[]),T(i)},n=function(e){return{configurable:!0,enumerable:!0,get:function(){return T[e]},set:function(t){T[e]=t}}};for(var a in T)Object.prototype.hasOwnProperty.call(T,a)&&"e"!==a&&"t"!==a&&Object.defineProperty(i,a,n(a));return i.e=function(e){return"ready"===c&&h("prepare"),g++,T.e(e).then(t,(function(e){throw t(),e}));function t(){g--,"prepare"===c&&(y[e]||C(e),0===g&&0===v&&S())}},i.t=function(e,t){return 1&t&&(e=i(e)),T.t(e,-2&t)},i}function u(t){var i={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:s!==t,active:!0,accept:function(e,t){if(void 0===e)i._selfAccepted=!0;else if("function"==typeof e)i._selfAccepted=e;else if("object"==typeof e)for(var s=0;s<e.length;s++)i._acceptedDependencies[e[s]]=t||function(){};else i._acceptedDependencies[e]=t||function(){}},decline:function(e){if(void 0===e)i._selfDeclined=!0;else if("object"==typeof e)for(var t=0;t<e.length;t++)i._declinedDependencies[e[t]]=!0;else i._declinedDependencies[e]=!0},dispose:function(e){i._disposeHandlers.push(e)},addDisposeHandler:function(e){i._disposeHandlers.push(e)},removeDisposeHandler:function(e){var t=i._disposeHandlers.indexOf(e);t>=0&&i._disposeHandlers.splice(t,1)},invalidate:function(){switch(this._selfInvalidated=!0,c){case"idle":(m={})[t]=e[t],h("ready");break;case"ready":O(t);break;case"prepare":case"check":case"dispose":case"apply":(p=p||[]).push(t)}},check:x,apply:D,status:function(e){if(!e)return c;d.push(e)},addStatusHandler:function(e){d.push(e)},removeStatusHandler:function(e){var t=d.indexOf(e);t>=0&&d.splice(t,1)},data:a[t]};return s=void 0,i}var d=[],c="idle";function h(e){c=e;for(var t=0;t<d.length;t++)d[t].call(null,e)}var f,m,_,p,v=0,g=0,y={},b={},w={};function k(e){return+e+""===e?+e:e}function x(e){if("idle"!==c)throw new Error("check() is only allowed in idle status");return i=e,h("check"),(t=1e4,t=t||1e4,new Promise((function(e,s){if("undefined"==typeof XMLHttpRequest)return s(new Error("No browser support"));try{var i=new XMLHttpRequest,a=T.p+""+n+".hot-update.json";i.open("GET",a,!0),i.timeout=t,i.send(null)}catch(e){return s(e)}i.onreadystatechange=function(){if(4===i.readyState)if(0===i.status)s(new Error("Manifest request to "+a+" timed out."));else if(404===i.status)e();else if(200!==i.status&&304!==i.status)s(new Error("Manifest request to "+a+" failed."));else{try{var t=JSON.parse(i.responseText)}catch(e){return void s(e)}e(t)}}}))).then((function(e){if(!e)return h(M()?"ready":"idle"),null;b={},y={},w=e.c,_=e.h,h("prepare");var t=new Promise((function(e,t){f={resolve:e,reject:t}}));m={};return C(1),"prepare"===c&&0===g&&0===v&&S(),t}));var t}function C(e){w[e]?(b[e]=!0,v++,function(e){var t=document.createElement("script");t.charset="utf-8",t.src=T.p+""+e+"."+n+".hot-update.js",document.head.appendChild(t)}(e)):y[e]=!0}function S(){h("ready");var e=f;if(f=null,e)if(i)Promise.resolve().then((function(){return D(i)})).then((function(t){e.resolve(t)}),(function(t){e.reject(t)}));else{var t=[];for(var s in m)Object.prototype.hasOwnProperty.call(m,s)&&t.push(k(s));e.resolve(t)}}function D(t){if("ready"!==c)throw new Error("apply() is only allowed in ready status");return function t(i){var o,l,u,d,c;function f(e){for(var t=[e],s={},i=t.map((function(e){return{chain:[e],id:e}}));i.length>0;){var n=i.pop(),a=n.id,r=n.chain;if((d=Y[a])&&(!d.hot._selfAccepted||d.hot._selfInvalidated)){if(d.hot._selfDeclined)return{type:"self-declined",chain:r,moduleId:a};if(d.hot._main)return{type:"unaccepted",chain:r,moduleId:a};for(var o=0;o<d.parents.length;o++){var l=d.parents[o],u=Y[l];if(u){if(u.hot._declinedDependencies[a])return{type:"declined",chain:r.concat([l]),moduleId:a,parentId:l};-1===t.indexOf(l)&&(u.hot._acceptedDependencies[a]?(s[l]||(s[l]=[]),v(s[l],[a])):(delete s[l],t.push(l),i.push({chain:r.concat([l]),id:l})))}}}}return{type:"accepted",moduleId:e,outdatedModules:t,outdatedDependencies:s}}function v(e,t){for(var s=0;s<t.length;s++){var i=t[s];-1===e.indexOf(i)&&e.push(i)}}M();var g={},y=[],b={},x=function(){console.warn("[HMR] unexpected require("+S.moduleId+") to disposed module")};for(var C in m)if(Object.prototype.hasOwnProperty.call(m,C)){var S;c=k(C),S=m[C]?f(c):{type:"disposed",moduleId:C};var D=!1,O=!1,P=!1,j="";switch(S.chain&&(j="\nUpdate propagation: "+S.chain.join(" -> ")),S.type){case"self-declined":i.onDeclined&&i.onDeclined(S),i.ignoreDeclined||(D=new Error("Aborted because of self decline: "+S.moduleId+j));break;case"declined":i.onDeclined&&i.onDeclined(S),i.ignoreDeclined||(D=new Error("Aborted because of declined dependency: "+S.moduleId+" in "+S.parentId+j));break;case"unaccepted":i.onUnaccepted&&i.onUnaccepted(S),i.ignoreUnaccepted||(D=new Error("Aborted because "+c+" is not accepted"+j));break;case"accepted":i.onAccepted&&i.onAccepted(S),O=!0;break;case"disposed":i.onDisposed&&i.onDisposed(S),P=!0;break;default:throw new Error("Unexception type "+S.type)}if(D)return h("abort"),Promise.reject(D);if(O)for(c in b[c]=m[c],v(y,S.outdatedModules),S.outdatedDependencies)Object.prototype.hasOwnProperty.call(S.outdatedDependencies,c)&&(g[c]||(g[c]=[]),v(g[c],S.outdatedDependencies[c]));P&&(v(y,[S.moduleId]),b[c]=x)}var E,A=[];for(l=0;l<y.length;l++)c=y[l],Y[c]&&Y[c].hot._selfAccepted&&b[c]!==x&&!Y[c].hot._selfInvalidated&&A.push({module:c,parents:Y[c].parents.slice(),errorHandler:Y[c].hot._selfAccepted});h("dispose"),Object.keys(w).forEach((function(e){!1===w[e]&&function(e){delete installedChunks[e]}(e)}));var L,R,N=y.slice();for(;N.length>0;)if(c=N.pop(),d=Y[c]){var I={},H=d.hot._disposeHandlers;for(u=0;u<H.length;u++)(o=H[u])(I);for(a[c]=I,d.hot.active=!1,delete Y[c],delete g[c],u=0;u<d.children.length;u++){var U=Y[d.children[u]];U&&((E=U.parents.indexOf(c))>=0&&U.parents.splice(E,1))}}for(c in g)if(Object.prototype.hasOwnProperty.call(g,c)&&(d=Y[c]))for(R=g[c],u=0;u<R.length;u++)L=R[u],(E=d.children.indexOf(L))>=0&&d.children.splice(E,1);h("apply"),void 0!==_&&(n=_,_=void 0);for(c in m=void 0,b)Object.prototype.hasOwnProperty.call(b,c)&&(e[c]=b[c]);var W=null;for(c in g)if(Object.prototype.hasOwnProperty.call(g,c)&&(d=Y[c])){R=g[c];var F=[];for(l=0;l<R.length;l++)if(L=R[l],o=d.hot._acceptedDependencies[L]){if(-1!==F.indexOf(o))continue;F.push(o)}for(l=0;l<F.length;l++){o=F[l];try{o(R)}catch(e){i.onErrored&&i.onErrored({type:"accept-errored",moduleId:c,dependencyId:R[l],error:e}),i.ignoreErrored||W||(W=e)}}}for(l=0;l<A.length;l++){var V=A[l];c=V.module,r=V.parents,s=c;try{T(c)}catch(e){if("function"==typeof V.errorHandler)try{V.errorHandler(e)}catch(t){i.onErrored&&i.onErrored({type:"self-accept-error-handler-errored",moduleId:c,error:t,originalError:e}),i.ignoreErrored||W||(W=t),W||(W=e)}else i.onErrored&&i.onErrored({type:"self-accept-errored",moduleId:c,error:e}),i.ignoreErrored||W||(W=e)}}if(W)return h("fail"),Promise.reject(W);if(p)return t(i).then((function(e){return y.forEach((function(t){e.indexOf(t)<0&&e.push(t)})),e}));return h("idle"),new Promise((function(e){e(y)}))}(t=t||{})}function M(){if(p)return m||(m={}),p.forEach(O),p=void 0,!0}function O(t){Object.prototype.hasOwnProperty.call(m,t)||(m[t]=e[t])}var Y={};function T(t){if(Y[t])return Y[t].exports;var s=Y[t]={i:t,l:!1,exports:{},hot:u(t),parents:(o=r,r=[],o),children:[]};return e[t].call(s.exports,s,s.exports,l(t)),s.l=!0,s.exports}T.m=e,T.c=Y,T.d=function(e,t,s){T.o(e,t)||Object.defineProperty(e,t,{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,t){if(1&t&&(e=T(e)),8&t)return e;if(4&t&&"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&t&&"string"!=typeof e)for(var i in e)T.d(s,i,function(t){return e[t]}.bind(null,i));return s},T.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return T.d(t,"a",t),t},T.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},T.p="",T.h=function(){return n},l("./src/audit.js")(T.s="./src/audit.js")}({"./node_modules/cssfilter/lib/css.js":function(e,t,s){var i=s("./node_modules/cssfilter/lib/default.js"),n=s("./node_modules/cssfilter/lib/parser.js");s("./node_modules/cssfilter/lib/util.js");function a(e){return null==e}function r(e){(e=function(e){var t={};for(var s in e)t[s]=e[s];return t}(e||{})).whiteList=e.whiteList||i.whiteList,e.onAttr=e.onAttr||i.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||i.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||i.safeAttrValue,this.options=e}r.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this.options,s=t.whiteList,i=t.onAttr,r=t.onIgnoreAttr,o=t.safeAttrValue;return n(e,(function(e,t,n,l,u){var d=s[n],c=!1;if(!0===d?c=d:"function"==typeof d?c=d(l):d instanceof RegExp&&(c=d.test(l)),!0!==c&&(c=!1),l=o(n,l)){var h,f={position:t,sourcePosition:e,source:u,isWhite:c};return c?a(h=i(n,l,f))?n+":"+l:h:a(h=r(n,l,f))?void 0:h}}))},e.exports=r},"./node_modules/cssfilter/lib/default.js":function(e,t){function s(){var e={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return e}var i=/javascript\s*\:/gim;t.whiteList=s(),t.getDefaultWhiteList=s,t.onAttr=function(e,t,s){},t.onIgnoreAttr=function(e,t,s){},t.safeAttrValue=function(e,t){return i.test(t)?"":t}},"./node_modules/cssfilter/lib/index.js":function(e,t,s){var i=s("./node_modules/cssfilter/lib/default.js"),n=s("./node_modules/cssfilter/lib/css.js");for(var a in(t=e.exports=function(e,t){return new n(t).process(e)}).FilterCSS=n,i)t[a]=i[a];"undefined"!=typeof window&&(window.filterCSS=e.exports)},"./node_modules/cssfilter/lib/parser.js":function(e,t,s){var i=s("./node_modules/cssfilter/lib/util.js");e.exports=function(e,t){";"!==(e=i.trimRight(e))[e.length-1]&&(e+=";");var s=e.length,n=!1,a=0,r=0,o="";function l(){if(!n){var s=i.trim(e.slice(a,r)),l=s.indexOf(":");if(-1!==l){var u=i.trim(s.slice(0,l)),d=i.trim(s.slice(l+1));if(u){var c=t(a,o.length,u,d,s);c&&(o+=c+"; ")}}}a=r+1}for(;r<s;r++){var u=e[r];if("/"===u&&"*"===e[r+1]){var d=e.indexOf("*/",r+2);if(-1===d)break;a=(r=d+1)+1,n=!1}else"("===u?n=!0:")"===u?n=!1:";"===u?n||l():"\n"===u&&l()}return i.trim(o)}},"./node_modules/cssfilter/lib/util.js":function(e,t){e.exports={indexOf:function(e,t){var s,i;if(Array.prototype.indexOf)return e.indexOf(t);for(s=0,i=e.length;s<i;s++)if(e[s]===t)return s;return-1},forEach:function(e,t,s){var i,n;if(Array.prototype.forEach)return e.forEach(t,s);for(i=0,n=e.length;i<n;i++)t.call(s,e[i],i,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}}},"./node_modules/lodash/_Symbol.js":function(e,t,s){var i=s("./node_modules/lodash/_root.js").Symbol;e.exports=i},"./node_modules/lodash/_baseGetTag.js":function(e,t,s){var i=s("./node_modules/lodash/_Symbol.js"),n=s("./node_modules/lodash/_getRawTag.js"),a=s("./node_modules/lodash/_objectToString.js"),r=i?i.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":r&&r in Object(e)?n(e):a(e)}},"./node_modules/lodash/_baseSlice.js":function(e,t){e.exports=function(e,t,s){var i=-1,n=e.length;t<0&&(t=-t>n?0:n+t),(s=s>n?n:s)<0&&(s+=n),n=t>s?0:s-t>>>0,t>>>=0;for(var a=Array(n);++i<n;)a[i]=e[i+t];return a}},"./node_modules/lodash/_freeGlobal.js":function(e,t,s){(function(t){var s="object"==typeof t&&t&&t.Object===Object&&t;e.exports=s}).call(this,s("./node_modules/webpack/buildin/global.js"))},"./node_modules/lodash/_getRawTag.js":function(e,t,s){var i=s("./node_modules/lodash/_Symbol.js"),n=Object.prototype,a=n.hasOwnProperty,r=n.toString,o=i?i.toStringTag:void 0;e.exports=function(e){var t=a.call(e,o),s=e[o];try{e[o]=void 0;var i=!0}catch(e){}var n=r.call(e);return i&&(t?e[o]=s:delete e[o]),n}},"./node_modules/lodash/_isIndex.js":function(e,t){var s=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var i=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==i||"symbol"!=i&&s.test(e))&&e>-1&&e%1==0&&e<t}},"./node_modules/lodash/_isIterateeCall.js":function(e,t,s){var i=s("./node_modules/lodash/eq.js"),n=s("./node_modules/lodash/isArrayLike.js"),a=s("./node_modules/lodash/_isIndex.js"),r=s("./node_modules/lodash/isObject.js");e.exports=function(e,t,s){if(!r(s))return!1;var o=typeof t;return!!("number"==o?n(s)&&a(t,s.length):"string"==o&&t in s)&&i(s[t],e)}},"./node_modules/lodash/_objectToString.js":function(e,t){var s=Object.prototype.toString;e.exports=function(e){return s.call(e)}},"./node_modules/lodash/_root.js":function(e,t,s){var i=s("./node_modules/lodash/_freeGlobal.js"),n="object"==typeof self&&self&&self.Object===Object&&self,a=i||n||Function("return this")();e.exports=a},"./node_modules/lodash/chunk.js":function(e,t,s){var i=s("./node_modules/lodash/_baseSlice.js"),n=s("./node_modules/lodash/_isIterateeCall.js"),a=s("./node_modules/lodash/toInteger.js"),r=Math.ceil,o=Math.max;e.exports=function(e,t,s){t=(s?n(e,t,s):void 0===t)?1:o(a(t),0);var l=null==e?0:e.length;if(!l||t<1)return[];for(var u=0,d=0,c=Array(r(l/t));u<l;)c[d++]=i(e,u,u+=t);return c}},"./node_modules/lodash/eq.js":function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},"./node_modules/lodash/isArrayLike.js":function(e,t,s){var i=s("./node_modules/lodash/isFunction.js"),n=s("./node_modules/lodash/isLength.js");e.exports=function(e){return null!=e&&n(e.length)&&!i(e)}},"./node_modules/lodash/isFunction.js":function(e,t,s){var i=s("./node_modules/lodash/_baseGetTag.js"),n=s("./node_modules/lodash/isObject.js");e.exports=function(e){if(!n(e))return!1;var t=i(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},"./node_modules/lodash/isLength.js":function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},"./node_modules/lodash/isObject.js":function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},"./node_modules/lodash/isObjectLike.js":function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},"./node_modules/lodash/isSymbol.js":function(e,t,s){var i=s("./node_modules/lodash/_baseGetTag.js"),n=s("./node_modules/lodash/isObjectLike.js");e.exports=function(e){return"symbol"==typeof e||n(e)&&"[object Symbol]"==i(e)}},"./node_modules/lodash/toFinite.js":function(e,t,s){var i=s("./node_modules/lodash/toNumber.js");e.exports=function(e){return e?(e=i(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},"./node_modules/lodash/toInteger.js":function(e,t,s){var i=s("./node_modules/lodash/toFinite.js");e.exports=function(e){var t=i(e),s=t%1;return t==t?s?t-s:t:0}},"./node_modules/lodash/toNumber.js":function(e,t,s){var i=s("./node_modules/lodash/isObject.js"),n=s("./node_modules/lodash/isSymbol.js"),a=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(n(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var s=o.test(e);return s||l.test(e)?u(e.slice(2),s?2:8):r.test(e)?NaN:+e}},"./node_modules/moment/locale sync recursive \\b\\B":function(e,t){function s(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}s.keys=function(){return[]},s.resolve=s,e.exports=s,s.id="./node_modules/moment/locale sync recursive \\b\\B"},"./node_modules/moment/moment.js":function(e,t,s){(function(e){e.exports=function(){"use strict";var t,i;function n(){return t.apply(null,arguments)}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function r(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e){return void 0===e}function l(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function u(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var s,i=[];for(s=0;s<e.length;++s)i.push(t(e[s],s));return i}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function h(e,t){for(var s in t)c(t,s)&&(e[s]=t[s]);return c(t,"toString")&&(e.toString=t.toString),c(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,s,i){return Ct(e,t,s,i,!0).utc()}function m(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function _(e){if(null==e._isValid){var t=m(e),s=i.call(t.parsedDateParts,(function(e){return null!=e})),n=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&s);if(e._strict&&(n=n&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return n;e._isValid=n}return e._isValid}function p(e){var t=f(NaN);return null!=e?h(m(t),e):m(t).userInvalidated=!0,t}i=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),s=t.length>>>0,i=0;i<s;i++)if(i in t&&e.call(this,t[i],i,t))return!0;return!1};var v=n.momentProperties=[];function g(e,t){var s,i,n;if(o(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),o(t._i)||(e._i=t._i),o(t._f)||(e._f=t._f),o(t._l)||(e._l=t._l),o(t._strict)||(e._strict=t._strict),o(t._tzm)||(e._tzm=t._tzm),o(t._isUTC)||(e._isUTC=t._isUTC),o(t._offset)||(e._offset=t._offset),o(t._pf)||(e._pf=m(t)),o(t._locale)||(e._locale=t._locale),v.length>0)for(s=0;s<v.length;s++)o(n=t[i=v[s]])||(e[i]=n);return e}var y=!1;function b(e){g(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===y&&(y=!0,n.updateOffset(this),y=!1)}function w(e){return e instanceof b||null!=e&&null!=e._isAMomentObject}function k(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function x(e){var t=+e,s=0;return 0!==t&&isFinite(t)&&(s=k(t)),s}function C(e,t,s){var i,n=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),r=0;for(i=0;i<n;i++)(s&&e[i]!==t[i]||!s&&x(e[i])!==x(t[i]))&&r++;return r+a}function S(e){!1===n.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function D(e,t){var s=!0;return h((function(){if(null!=n.deprecationHandler&&n.deprecationHandler(null,e),s){for(var i,a=[],r=0;r<arguments.length;r++){if(i="","object"==typeof arguments[r]){for(var o in i+="\n["+r+"] ",arguments[0])i+=o+": "+arguments[0][o]+", ";i=i.slice(0,-2)}else i=arguments[r];a.push(i)}S(e+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),s=!1}return t.apply(this,arguments)}),t)}var M,O={};function Y(e,t){null!=n.deprecationHandler&&n.deprecationHandler(e,t),O[e]||(S(t),O[e]=!0)}function T(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function P(e,t){var s,i=h({},e);for(s in t)c(t,s)&&(r(e[s])&&r(t[s])?(i[s]={},h(i[s],e[s]),h(i[s],t[s])):null!=t[s]?i[s]=t[s]:delete i[s]);for(s in e)c(e,s)&&!c(t,s)&&r(e[s])&&(i[s]=h({},i[s]));return i}function j(e){null!=e&&this.set(e)}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null,M=Object.keys?Object.keys:function(e){var t,s=[];for(t in e)c(e,t)&&s.push(t);return s};var E={};function A(e,t){var s=e.toLowerCase();E[s]=E[s+"s"]=E[t]=e}function L(e){return"string"==typeof e?E[e]||E[e.toLowerCase()]:void 0}function R(e){var t,s,i={};for(s in e)c(e,s)&&(t=L(s))&&(i[t]=e[s]);return i}var N={};function I(e,t){N[e]=t}function H(e,t,s){var i=""+Math.abs(e),n=t-i.length;return(e>=0?s?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+i}var U=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,W=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,F={},V={};function $(e,t,s,i){var n=i;"string"==typeof i&&(n=function(){return this[i]()}),e&&(V[e]=n),t&&(V[t[0]]=function(){return H(n.apply(this,arguments),t[1],t[2])}),s&&(V[s]=function(){return this.localeData().ordinal(n.apply(this,arguments),e)})}function G(e,t){return e.isValid()?(t=z(t,e.localeData()),F[t]=F[t]||function(e){var t,s,i,n=e.match(U);for(t=0,s=n.length;t<s;t++)V[n[t]]?n[t]=V[n[t]]:n[t]=(i=n[t]).match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"");return function(t){var i,a="";for(i=0;i<s;i++)a+=T(n[i])?n[i].call(t,e):n[i];return a}}(t),F[t](e)):e.localeData().invalidDate()}function z(e,t){var s=5;function i(e){return t.longDateFormat(e)||e}for(W.lastIndex=0;s>=0&&W.test(e);)e=e.replace(W,i),W.lastIndex=0,s-=1;return e}var q=/\d/,Z=/\d\d/,B=/\d{3}/,Q=/\d{4}/,J=/[+-]?\d{6}/,X=/\d\d?/,K=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,te=/\d{1,3}/,se=/\d{1,4}/,ie=/[+-]?\d{1,6}/,ne=/\d+/,ae=/[+-]?\d+/,re=/Z|[+-]\d\d:?\d\d/gi,oe=/Z|[+-]\d\d(?::?\d\d)?/gi,le=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ue={};function de(e,t,s){ue[e]=T(t)?t:function(e,i){return e&&s?s:t}}function ce(e,t){return c(ue,e)?ue[e](t._strict,t._locale):new RegExp(he(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,s,i,n){return t||s||i||n}))))}function he(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var fe={};function me(e,t){var s,i=t;for("string"==typeof e&&(e=[e]),l(t)&&(i=function(e,s){s[t]=x(e)}),s=0;s<e.length;s++)fe[e[s]]=i}function _e(e,t){me(e,(function(e,s,i,n){i._w=i._w||{},t(e,i._w,i,n)}))}function pe(e,t,s){null!=t&&c(fe,e)&&fe[e](t,s._a,s,e)}function ve(e){return ge(e)?366:365}function ge(e){return e%4==0&&e%100!=0||e%400==0}$("Y",0,0,(function(){var e=this.year();return e<=9999?""+e:"+"+e})),$(0,["YY",2],0,(function(){return this.year()%100})),$(0,["YYYY",4],0,"year"),$(0,["YYYYY",5],0,"year"),$(0,["YYYYYY",6,!0],0,"year"),A("year","y"),I("year",1),de("Y",ae),de("YY",X,Z),de("YYYY",se,Q),de("YYYYY",ie,J),de("YYYYYY",ie,J),me(["YYYYY","YYYYYY"],0),me("YYYY",(function(e,t){t[0]=2===e.length?n.parseTwoDigitYear(e):x(e)})),me("YY",(function(e,t){t[0]=n.parseTwoDigitYear(e)})),me("Y",(function(e,t){t[0]=parseInt(e,10)})),n.parseTwoDigitYear=function(e){return x(e)+(x(e)>68?1900:2e3)};var ye,be=we("FullYear",!0);function we(e,t){return function(s){return null!=s?(xe(this,e,s),n.updateOffset(this,t),this):ke(this,e)}}function ke(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function xe(e,t,s){e.isValid()&&!isNaN(s)&&("FullYear"===t&&ge(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](s,e.month(),Ce(s,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](s))}function Ce(e,t){if(isNaN(e)||isNaN(t))return NaN;var s,i=(t%(s=12)+s)%s;return e+=(t-i)/12,1===i?ge(e)?29:28:31-i%7%2}ye=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},$("M",["MM",2],"Mo",(function(){return this.month()+1})),$("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),$("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),A("month","M"),I("month",8),de("M",X),de("MM",X,Z),de("MMM",(function(e,t){return t.monthsShortRegex(e)})),de("MMMM",(function(e,t){return t.monthsRegex(e)})),me(["M","MM"],(function(e,t){t[1]=x(e)-1})),me(["MMM","MMMM"],(function(e,t,s,i){var n=s._locale.monthsParse(e,i,s._strict);null!=n?t[1]=n:m(s).invalidMonth=e}));var Se=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,De="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Me="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Oe(e,t,s){var i,n,a,r=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)a=f([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(a,"").toLocaleLowerCase();return s?"MMM"===t?-1!==(n=ye.call(this._shortMonthsParse,r))?n:null:-1!==(n=ye.call(this._longMonthsParse,r))?n:null:"MMM"===t?-1!==(n=ye.call(this._shortMonthsParse,r))||-1!==(n=ye.call(this._longMonthsParse,r))?n:null:-1!==(n=ye.call(this._longMonthsParse,r))||-1!==(n=ye.call(this._shortMonthsParse,r))?n:null}function Ye(e,t){var s;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=x(t);else if(!l(t=e.localeData().monthsParse(t)))return e;return s=Math.min(e.date(),Ce(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,s),e}function Te(e){return null!=e?(Ye(this,e),n.updateOffset(this,!0),this):ke(this,"Month")}var Pe=le,je=le;function Ee(){function e(e,t){return t.length-e.length}var t,s,i=[],n=[],a=[];for(t=0;t<12;t++)s=f([2e3,t]),i.push(this.monthsShort(s,"")),n.push(this.months(s,"")),a.push(this.months(s,"")),a.push(this.monthsShort(s,""));for(i.sort(e),n.sort(e),a.sort(e),t=0;t<12;t++)i[t]=he(i[t]),n[t]=he(n[t]);for(t=0;t<24;t++)a[t]=he(a[t]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Ae(e,t,s,i,n,a,r){var o;return e<100&&e>=0?(o=new Date(e+400,t,s,i,n,a,r),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,s,i,n,a,r),o}function Le(e){var t;if(e<100&&e>=0){var s=Array.prototype.slice.call(arguments);s[0]=e+400,t=new Date(Date.UTC.apply(null,s)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function Re(e,t,s){var i=7+t-s;return-(7+Le(e,0,i).getUTCDay()-t)%7+i-1}function Ne(e,t,s,i,n){var a,r,o=1+7*(t-1)+(7+s-i)%7+Re(e,i,n);return o<=0?r=ve(a=e-1)+o:o>ve(e)?(a=e+1,r=o-ve(e)):(a=e,r=o),{year:a,dayOfYear:r}}function Ie(e,t,s){var i,n,a=Re(e.year(),t,s),r=Math.floor((e.dayOfYear()-a-1)/7)+1;return r<1?i=r+He(n=e.year()-1,t,s):r>He(e.year(),t,s)?(i=r-He(e.year(),t,s),n=e.year()+1):(n=e.year(),i=r),{week:i,year:n}}function He(e,t,s){var i=Re(e,t,s),n=Re(e+1,t,s);return(ve(e)-i+n)/7}function Ue(e,t){return e.slice(t,7).concat(e.slice(0,t))}$("w",["ww",2],"wo","week"),$("W",["WW",2],"Wo","isoWeek"),A("week","w"),A("isoWeek","W"),I("week",5),I("isoWeek",5),de("w",X),de("ww",X,Z),de("W",X),de("WW",X,Z),_e(["w","ww","W","WW"],(function(e,t,s,i){t[i.substr(0,1)]=x(e)})),$("d",0,"do","day"),$("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),$("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),$("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),$("e",0,0,"weekday"),$("E",0,0,"isoWeekday"),A("day","d"),A("weekday","e"),A("isoWeekday","E"),I("day",11),I("weekday",11),I("isoWeekday",11),de("d",X),de("e",X),de("E",X),de("dd",(function(e,t){return t.weekdaysMinRegex(e)})),de("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),de("dddd",(function(e,t){return t.weekdaysRegex(e)})),_e(["dd","ddd","dddd"],(function(e,t,s,i){var n=s._locale.weekdaysParse(e,i,s._strict);null!=n?t.d=n:m(s).invalidWeekday=e})),_e(["d","e","E"],(function(e,t,s,i){t[i]=x(e)}));var We="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Fe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ve="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function $e(e,t,s){var i,n,a,r=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)a=f([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(a,"").toLocaleLowerCase();return s?"dddd"===t?-1!==(n=ye.call(this._weekdaysParse,r))?n:null:"ddd"===t?-1!==(n=ye.call(this._shortWeekdaysParse,r))?n:null:-1!==(n=ye.call(this._minWeekdaysParse,r))?n:null:"dddd"===t?-1!==(n=ye.call(this._weekdaysParse,r))||-1!==(n=ye.call(this._shortWeekdaysParse,r))||-1!==(n=ye.call(this._minWeekdaysParse,r))?n:null:"ddd"===t?-1!==(n=ye.call(this._shortWeekdaysParse,r))||-1!==(n=ye.call(this._weekdaysParse,r))||-1!==(n=ye.call(this._minWeekdaysParse,r))?n:null:-1!==(n=ye.call(this._minWeekdaysParse,r))||-1!==(n=ye.call(this._weekdaysParse,r))||-1!==(n=ye.call(this._shortWeekdaysParse,r))?n:null}var Ge=le,ze=le,qe=le;function Ze(){function e(e,t){return t.length-e.length}var t,s,i,n,a,r=[],o=[],l=[],u=[];for(t=0;t<7;t++)s=f([2e3,1]).day(t),i=this.weekdaysMin(s,""),n=this.weekdaysShort(s,""),a=this.weekdays(s,""),r.push(i),o.push(n),l.push(a),u.push(i),u.push(n),u.push(a);for(r.sort(e),o.sort(e),l.sort(e),u.sort(e),t=0;t<7;t++)o[t]=he(o[t]),l[t]=he(l[t]),u[t]=he(u[t]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Be(){return this.hours()%12||12}function Qe(e,t){$(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Je(e,t){return t._meridiemParse}$("H",["HH",2],0,"hour"),$("h",["hh",2],0,Be),$("k",["kk",2],0,(function(){return this.hours()||24})),$("hmm",0,0,(function(){return""+Be.apply(this)+H(this.minutes(),2)})),$("hmmss",0,0,(function(){return""+Be.apply(this)+H(this.minutes(),2)+H(this.seconds(),2)})),$("Hmm",0,0,(function(){return""+this.hours()+H(this.minutes(),2)})),$("Hmmss",0,0,(function(){return""+this.hours()+H(this.minutes(),2)+H(this.seconds(),2)})),Qe("a",!0),Qe("A",!1),A("hour","h"),I("hour",13),de("a",Je),de("A",Je),de("H",X),de("h",X),de("k",X),de("HH",X,Z),de("hh",X,Z),de("kk",X,Z),de("hmm",K),de("hmmss",ee),de("Hmm",K),de("Hmmss",ee),me(["H","HH"],3),me(["k","kk"],(function(e,t,s){var i=x(e);t[3]=24===i?0:i})),me(["a","A"],(function(e,t,s){s._isPm=s._locale.isPM(e),s._meridiem=e})),me(["h","hh"],(function(e,t,s){t[3]=x(e),m(s).bigHour=!0})),me("hmm",(function(e,t,s){var i=e.length-2;t[3]=x(e.substr(0,i)),t[4]=x(e.substr(i)),m(s).bigHour=!0})),me("hmmss",(function(e,t,s){var i=e.length-4,n=e.length-2;t[3]=x(e.substr(0,i)),t[4]=x(e.substr(i,2)),t[5]=x(e.substr(n)),m(s).bigHour=!0})),me("Hmm",(function(e,t,s){var i=e.length-2;t[3]=x(e.substr(0,i)),t[4]=x(e.substr(i))})),me("Hmmss",(function(e,t,s){var i=e.length-4,n=e.length-2;t[3]=x(e.substr(0,i)),t[4]=x(e.substr(i,2)),t[5]=x(e.substr(n))}));var Xe,Ke=we("Hours",!0),et={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:De,monthsShort:Me,week:{dow:0,doy:6},weekdays:We,weekdaysMin:Ve,weekdaysShort:Fe,meridiemParse:/[ap]\.?m?\.?/i},tt={},st={};function it(e){return e?e.toLowerCase().replace("_","-"):e}function nt(t){var i=null;if(!tt[t]&&void 0!==e&&e&&e.exports)try{i=Xe._abbr,s("./node_modules/moment/locale sync recursive \\b\\B")("./"+t),at(i)}catch(e){}return tt[t]}function at(e,t){var s;return e&&((s=o(t)?ot(e):rt(e,t))?Xe=s:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Xe._abbr}function rt(e,t){if(null!==t){var s,i=et;if(t.abbr=e,null!=tt[e])Y("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=tt[e]._config;else if(null!=t.parentLocale)if(null!=tt[t.parentLocale])i=tt[t.parentLocale]._config;else{if(null==(s=nt(t.parentLocale)))return st[t.parentLocale]||(st[t.parentLocale]=[]),st[t.parentLocale].push({name:e,config:t}),null;i=s._config}return tt[e]=new j(P(i,t)),st[e]&&st[e].forEach((function(e){rt(e.name,e.config)})),at(e),tt[e]}return delete tt[e],null}function ot(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Xe;if(!a(e)){if(t=nt(e))return t;e=[e]}return function(e){for(var t,s,i,n,a=0;a<e.length;){for(t=(n=it(e[a]).split("-")).length,s=(s=it(e[a+1]))?s.split("-"):null;t>0;){if(i=nt(n.slice(0,t).join("-")))return i;if(s&&s.length>=t&&C(n,s,!0)>=t-1)break;t--}a++}return Xe}(e)}function lt(e){var t,s=e._a;return s&&-2===m(e).overflow&&(t=s[1]<0||s[1]>11?1:s[2]<1||s[2]>Ce(s[0],s[1])?2:s[3]<0||s[3]>24||24===s[3]&&(0!==s[4]||0!==s[5]||0!==s[6])?3:s[4]<0||s[4]>59?4:s[5]<0||s[5]>59?5:s[6]<0||s[6]>999?6:-1,m(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),m(e)._overflowWeeks&&-1===t&&(t=7),m(e)._overflowWeekday&&-1===t&&(t=8),m(e).overflow=t),e}function ut(e,t,s){return null!=e?e:null!=t?t:s}function dt(e){var t,s,i,a,r,o=[];if(!e._d){for(i=function(e){var t=new Date(n.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[2]&&null==e._a[1]&&function(e){var t,s,i,n,a,r,o,l;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)a=1,r=4,s=ut(t.GG,e._a[0],Ie(St(),1,4).year),i=ut(t.W,1),((n=ut(t.E,1))<1||n>7)&&(l=!0);else{a=e._locale._week.dow,r=e._locale._week.doy;var u=Ie(St(),a,r);s=ut(t.gg,e._a[0],u.year),i=ut(t.w,u.week),null!=t.d?((n=t.d)<0||n>6)&&(l=!0):null!=t.e?(n=t.e+a,(t.e<0||t.e>6)&&(l=!0)):n=a}i<1||i>He(s,a,r)?m(e)._overflowWeeks=!0:null!=l?m(e)._overflowWeekday=!0:(o=Ne(s,i,n,a,r),e._a[0]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=ut(e._a[0],i[0]),(e._dayOfYear>ve(r)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),s=Le(r,0,e._dayOfYear),e._a[1]=s.getUTCMonth(),e._a[2]=s.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=i[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Le:Ae).apply(null,o),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==a&&(m(e).weekdayMismatch=!0)}}var ct=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ht=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ft=/Z|[+-]\d\d(?::?\d\d)?/,mt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],_t=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],pt=/^\/?Date\((\-?\d+)/i;function vt(e){var t,s,i,n,a,r,o=e._i,l=ct.exec(o)||ht.exec(o);if(l){for(m(e).iso=!0,t=0,s=mt.length;t<s;t++)if(mt[t][1].exec(l[1])){n=mt[t][0],i=!1!==mt[t][2];break}if(null==n)return void(e._isValid=!1);if(l[3]){for(t=0,s=_t.length;t<s;t++)if(_t[t][1].exec(l[3])){a=(l[2]||" ")+_t[t][0];break}if(null==a)return void(e._isValid=!1)}if(!i&&null!=a)return void(e._isValid=!1);if(l[4]){if(!ft.exec(l[4]))return void(e._isValid=!1);r="Z"}e._f=n+(a||"")+(r||""),kt(e)}else e._isValid=!1}var gt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function yt(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}var bt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function wt(e){var t,s,i,n,a,r,o,l=gt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(l){var u=(t=l[4],s=l[3],i=l[2],n=l[5],a=l[6],r=l[7],o=[yt(t),Me.indexOf(s),parseInt(i,10),parseInt(n,10),parseInt(a,10)],r&&o.push(parseInt(r,10)),o);if(!function(e,t,s){return!e||Fe.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(m(s).weekdayMismatch=!0,s._isValid=!1,!1)}(l[1],u,e))return;e._a=u,e._tzm=function(e,t,s){if(e)return bt[e];if(t)return 0;var i=parseInt(s,10),n=i%100;return(i-n)/100*60+n}(l[8],l[9],l[10]),e._d=Le.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=!0}else e._isValid=!1}function kt(e){if(e._f!==n.ISO_8601)if(e._f!==n.RFC_2822){e._a=[],m(e).empty=!0;var t,s,i,a,r,o=""+e._i,l=o.length,u=0;for(i=z(e._f,e._locale).match(U)||[],t=0;t<i.length;t++)a=i[t],(s=(o.match(ce(a,e))||[])[0])&&((r=o.substr(0,o.indexOf(s))).length>0&&m(e).unusedInput.push(r),o=o.slice(o.indexOf(s)+s.length),u+=s.length),V[a]?(s?m(e).empty=!1:m(e).unusedTokens.push(a),pe(a,s,e)):e._strict&&!s&&m(e).unusedTokens.push(a);m(e).charsLeftOver=l-u,o.length>0&&m(e).unusedInput.push(o),e._a[3]<=12&&!0===m(e).bigHour&&e._a[3]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[3]=function(e,t,s){var i;return null==s?t:null!=e.meridiemHour?e.meridiemHour(t,s):null!=e.isPM?((i=e.isPM(s))&&t<12&&(t+=12),i||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),dt(e),lt(e)}else wt(e);else vt(e)}function xt(e){var t=e._i,s=e._f;return e._locale=e._locale||ot(e._l),null===t||void 0===s&&""===t?p({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),w(t)?new b(lt(t)):(u(t)?e._d=t:a(s)?function(e){var t,s,i,n,a;if(0===e._f.length)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(n=0;n<e._f.length;n++)a=0,t=g({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[n],kt(t),_(t)&&(a+=m(t).charsLeftOver,a+=10*m(t).unusedTokens.length,m(t).score=a,(null==i||a<i)&&(i=a,s=t));h(e,s||t)}(e):s?kt(e):function(e){var t=e._i;o(t)?e._d=new Date(n.now()):u(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=pt.exec(e._i);null===t?(vt(e),!1===e._isValid&&(delete e._isValid,wt(e),!1===e._isValid&&(delete e._isValid,n.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):a(t)?(e._a=d(t.slice(0),(function(e){return parseInt(e,10)})),dt(e)):r(t)?function(e){if(!e._d){var t=R(e._i);e._a=d([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),dt(e)}}(e):l(t)?e._d=new Date(t):n.createFromInputFallback(e)}(e),_(e)||(e._d=null),e))}function Ct(e,t,s,i,n){var o,l={};return!0!==s&&!1!==s||(i=s,s=void 0),(r(e)&&function(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(e.hasOwnProperty(t))return!1;return!0}(e)||a(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=n,l._l=s,l._i=e,l._f=t,l._strict=i,(o=new b(lt(xt(l))))._nextDay&&(o.add(1,"d"),o._nextDay=void 0),o}function St(e,t,s,i){return Ct(e,t,s,i,!1)}n.createFromInputFallback=D("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),n.ISO_8601=function(){},n.RFC_2822=function(){};var Dt=D("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=St.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:p()})),Mt=D("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=St.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:p()}));function Ot(e,t){var s,i;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return St();for(s=t[0],i=1;i<t.length;++i)t[i].isValid()&&!t[i][e](s)||(s=t[i]);return s}var Yt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Tt(e){var t=R(e),s=t.year||0,i=t.quarter||0,n=t.month||0,a=t.week||t.isoWeek||0,r=t.day||0,o=t.hour||0,l=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=function(e){for(var t in e)if(-1===ye.call(Yt,t)||null!=e[t]&&isNaN(e[t]))return!1;for(var s=!1,i=0;i<Yt.length;++i)if(e[Yt[i]]){if(s)return!1;parseFloat(e[Yt[i]])!==x(e[Yt[i]])&&(s=!0)}return!0}(t),this._milliseconds=+d+1e3*u+6e4*l+1e3*o*60*60,this._days=+r+7*a,this._months=+n+3*i+12*s,this._data={},this._locale=ot(),this._bubble()}function Pt(e){return e instanceof Tt}function jt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Et(e,t){$(e,0,0,(function(){var e=this.utcOffset(),s="+";return e<0&&(e=-e,s="-"),s+H(~~(e/60),2)+t+H(~~e%60,2)}))}Et("Z",":"),Et("ZZ",""),de("Z",oe),de("ZZ",oe),me(["Z","ZZ"],(function(e,t,s){s._useUTC=!0,s._tzm=Lt(oe,e)}));var At=/([\+\-]|\d\d)/gi;function Lt(e,t){var s=(t||"").match(e);if(null===s)return null;var i=((s[s.length-1]||[])+"").match(At)||["-",0,0],n=60*i[1]+x(i[2]);return 0===n?0:"+"===i[0]?n:-n}function Rt(e,t){var s,i;return t._isUTC?(s=t.clone(),i=(w(e)||u(e)?e.valueOf():St(e).valueOf())-s.valueOf(),s._d.setTime(s._d.valueOf()+i),n.updateOffset(s,!1),s):St(e).local()}function Nt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function It(){return!!this.isValid()&&this._isUTC&&0===this._offset}n.updateOffset=function(){};var Ht=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ut=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Wt(e,t){var s,i,n,a,r,o,u=e,d=null;return Pt(e)?u={ms:e._milliseconds,d:e._days,M:e._months}:l(e)?(u={},t?u[t]=e:u.milliseconds=e):(d=Ht.exec(e))?(s="-"===d[1]?-1:1,u={y:0,d:x(d[2])*s,h:x(d[3])*s,m:x(d[4])*s,s:x(d[5])*s,ms:x(jt(1e3*d[6]))*s}):(d=Ut.exec(e))?(s="-"===d[1]?-1:1,u={y:Ft(d[2],s),M:Ft(d[3],s),w:Ft(d[4],s),d:Ft(d[5],s),h:Ft(d[6],s),m:Ft(d[7],s),s:Ft(d[8],s)}):null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(a=St(u.from),r=St(u.to),n=a.isValid()&&r.isValid()?(r=Rt(r,a),a.isBefore(r)?o=Vt(a,r):((o=Vt(r,a)).milliseconds=-o.milliseconds,o.months=-o.months),o):{milliseconds:0,months:0},(u={}).ms=n.milliseconds,u.M=n.months),i=new Tt(u),Pt(e)&&c(e,"_locale")&&(i._locale=e._locale),i}function Ft(e,t){var s=e&&parseFloat(e.replace(",","."));return(isNaN(s)?0:s)*t}function Vt(e,t){var s={};return s.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(s.months,"M").isAfter(t)&&--s.months,s.milliseconds=+t-+e.clone().add(s.months,"M"),s}function $t(e,t){return function(s,i){var n;return null===i||isNaN(+i)||(Y(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),n=s,s=i,i=n),Gt(this,Wt(s="string"==typeof s?+s:s,i),e),this}}function Gt(e,t,s,i){var a=t._milliseconds,r=jt(t._days),o=jt(t._months);e.isValid()&&(i=null==i||i,o&&Ye(e,ke(e,"Month")+o*s),r&&xe(e,"Date",ke(e,"Date")+r*s),a&&e._d.setTime(e._d.valueOf()+a*s),i&&n.updateOffset(e,r||o))}Wt.fn=Tt.prototype,Wt.invalid=function(){return Wt(NaN)};var zt=$t(1,"add"),qt=$t(-1,"subtract");function Zt(e,t){var s=12*(t.year()-e.year())+(t.month()-e.month()),i=e.clone().add(s,"months");return-(s+(t-i<0?(t-i)/(i-e.clone().add(s-1,"months")):(t-i)/(e.clone().add(s+1,"months")-i)))||0}function Bt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=ot(e))&&(this._locale=t),this)}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Qt=D("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function Jt(){return this._locale}function Xt(e,t){return(e%t+t)%t}function Kt(e,t,s){return e<100&&e>=0?new Date(e+400,t,s)-126227808e5:new Date(e,t,s).valueOf()}function es(e,t,s){return e<100&&e>=0?Date.UTC(e+400,t,s)-126227808e5:Date.UTC(e,t,s)}function ts(e,t){$(0,[e,e.length],0,t)}function ss(e,t,s,i,n){var a;return null==e?Ie(this,i,n).year:(t>(a=He(e,i,n))&&(t=a),is.call(this,e,t,s,i,n))}function is(e,t,s,i,n){var a=Ne(e,t,s,i,n),r=Le(a.year,0,a.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}$(0,["gg",2],0,(function(){return this.weekYear()%100})),$(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),ts("gggg","weekYear"),ts("ggggg","weekYear"),ts("GGGG","isoWeekYear"),ts("GGGGG","isoWeekYear"),A("weekYear","gg"),A("isoWeekYear","GG"),I("weekYear",1),I("isoWeekYear",1),de("G",ae),de("g",ae),de("GG",X,Z),de("gg",X,Z),de("GGGG",se,Q),de("gggg",se,Q),de("GGGGG",ie,J),de("ggggg",ie,J),_e(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,s,i){t[i.substr(0,2)]=x(e)})),_e(["gg","GG"],(function(e,t,s,i){t[i]=n.parseTwoDigitYear(e)})),$("Q",0,"Qo","quarter"),A("quarter","Q"),I("quarter",7),de("Q",q),me("Q",(function(e,t){t[1]=3*(x(e)-1)})),$("D",["DD",2],"Do","date"),A("date","D"),I("date",9),de("D",X),de("DD",X,Z),de("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),me(["D","DD"],2),me("Do",(function(e,t){t[2]=x(e.match(X)[0])}));var ns=we("Date",!0);$("DDD",["DDDD",3],"DDDo","dayOfYear"),A("dayOfYear","DDD"),I("dayOfYear",4),de("DDD",te),de("DDDD",B),me(["DDD","DDDD"],(function(e,t,s){s._dayOfYear=x(e)})),$("m",["mm",2],0,"minute"),A("minute","m"),I("minute",14),de("m",X),de("mm",X,Z),me(["m","mm"],4);var as=we("Minutes",!1);$("s",["ss",2],0,"second"),A("second","s"),I("second",15),de("s",X),de("ss",X,Z),me(["s","ss"],5);var rs,os=we("Seconds",!1);for($("S",0,0,(function(){return~~(this.millisecond()/100)})),$(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),$(0,["SSS",3],0,"millisecond"),$(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),$(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),$(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),$(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),$(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),$(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),A("millisecond","ms"),I("millisecond",16),de("S",te,q),de("SS",te,Z),de("SSS",te,B),rs="SSSS";rs.length<=9;rs+="S")de(rs,ne);function ls(e,t){t[6]=x(1e3*("0."+e))}for(rs="S";rs.length<=9;rs+="S")me(rs,ls);var us=we("Milliseconds",!1);$("z",0,0,"zoneAbbr"),$("zz",0,0,"zoneName");var ds=b.prototype;function cs(e){return e}ds.add=zt,ds.calendar=function(e,t){var s=e||St(),i=Rt(s,this).startOf("day"),a=n.calendarFormat(this,i)||"sameElse",r=t&&(T(t[a])?t[a].call(this,s):t[a]);return this.format(r||this.localeData().calendar(a,this,St(s)))},ds.clone=function(){return new b(this)},ds.diff=function(e,t,s){var i,n,a;if(!this.isValid())return NaN;if(!(i=Rt(e,this)).isValid())return NaN;switch(n=6e4*(i.utcOffset()-this.utcOffset()),t=L(t)){case"year":a=Zt(this,i)/12;break;case"month":a=Zt(this,i);break;case"quarter":a=Zt(this,i)/3;break;case"second":a=(this-i)/1e3;break;case"minute":a=(this-i)/6e4;break;case"hour":a=(this-i)/36e5;break;case"day":a=(this-i-n)/864e5;break;case"week":a=(this-i-n)/6048e5;break;default:a=this-i}return s?a:k(a)},ds.endOf=function(e){var t;if(void 0===(e=L(e))||"millisecond"===e||!this.isValid())return this;var s=this._isUTC?es:Kt;switch(e){case"year":t=s(this.year()+1,0,1)-1;break;case"quarter":t=s(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=s(this.year(),this.month()+1,1)-1;break;case"week":t=s(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=s(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-Xt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-Xt(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-Xt(t,1e3)-1}return this._d.setTime(t),n.updateOffset(this,!0),this},ds.format=function(e){e||(e=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var t=G(this,e);return this.localeData().postformat(t)},ds.from=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||St(e).isValid())?Wt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},ds.fromNow=function(e){return this.from(St(),e)},ds.to=function(e,t){return this.isValid()&&(w(e)&&e.isValid()||St(e).isValid())?Wt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},ds.toNow=function(e){return this.to(St(),e)},ds.get=function(e){return T(this[e=L(e)])?this[e]():this},ds.invalidAt=function(){return m(this).overflow},ds.isAfter=function(e,t){var s=w(e)?e:St(e);return!(!this.isValid()||!s.isValid())&&("millisecond"===(t=L(t)||"millisecond")?this.valueOf()>s.valueOf():s.valueOf()<this.clone().startOf(t).valueOf())},ds.isBefore=function(e,t){var s=w(e)?e:St(e);return!(!this.isValid()||!s.isValid())&&("millisecond"===(t=L(t)||"millisecond")?this.valueOf()<s.valueOf():this.clone().endOf(t).valueOf()<s.valueOf())},ds.isBetween=function(e,t,s,i){var n=w(e)?e:St(e),a=w(t)?t:St(t);return!!(this.isValid()&&n.isValid()&&a.isValid())&&("("===(i=i||"()")[0]?this.isAfter(n,s):!this.isBefore(n,s))&&(")"===i[1]?this.isBefore(a,s):!this.isAfter(a,s))},ds.isSame=function(e,t){var s,i=w(e)?e:St(e);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=L(t)||"millisecond")?this.valueOf()===i.valueOf():(s=i.valueOf(),this.clone().startOf(t).valueOf()<=s&&s<=this.clone().endOf(t).valueOf()))},ds.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},ds.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},ds.isValid=function(){return _(this)},ds.lang=Qt,ds.locale=Bt,ds.localeData=Jt,ds.max=Mt,ds.min=Dt,ds.parsingFlags=function(){return h({},m(this))},ds.set=function(e,t){if("object"==typeof e)for(var s=function(e){var t=[];for(var s in e)t.push({unit:s,priority:N[s]});return t.sort((function(e,t){return e.priority-t.priority})),t}(e=R(e)),i=0;i<s.length;i++)this[s[i].unit](e[s[i].unit]);else if(T(this[e=L(e)]))return this[e](t);return this},ds.startOf=function(e){var t;if(void 0===(e=L(e))||"millisecond"===e||!this.isValid())return this;var s=this._isUTC?es:Kt;switch(e){case"year":t=s(this.year(),0,1);break;case"quarter":t=s(this.year(),this.month()-this.month()%3,1);break;case"month":t=s(this.year(),this.month(),1);break;case"week":t=s(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=s(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Xt(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=Xt(t,6e4);break;case"second":t=this._d.valueOf(),t-=Xt(t,1e3)}return this._d.setTime(t),n.updateOffset(this,!0),this},ds.subtract=qt,ds.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},ds.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},ds.toDate=function(){return new Date(this.valueOf())},ds.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,s=t?this.clone().utc():this;return s.year()<0||s.year()>9999?G(s,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):T(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",G(s,"Z")):G(s,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},ds.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var s="["+e+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=t+'[")]';return this.format(s+i+"-MM-DD[T]HH:mm:ss.SSS"+n)},ds.toJSON=function(){return this.isValid()?this.toISOString():null},ds.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},ds.unix=function(){return Math.floor(this.valueOf()/1e3)},ds.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},ds.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},ds.year=be,ds.isLeapYear=function(){return ge(this.year())},ds.weekYear=function(e){return ss.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},ds.isoWeekYear=function(e){return ss.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},ds.quarter=ds.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},ds.month=Te,ds.daysInMonth=function(){return Ce(this.year(),this.month())},ds.week=ds.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},ds.isoWeek=ds.isoWeeks=function(e){var t=Ie(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},ds.weeksInYear=function(){var e=this.localeData()._week;return He(this.year(),e.dow,e.doy)},ds.isoWeeksInYear=function(){return He(this.year(),1,4)},ds.date=ns,ds.day=ds.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},ds.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},ds.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},ds.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},ds.hour=ds.hours=Ke,ds.minute=ds.minutes=as,ds.second=ds.seconds=os,ds.millisecond=ds.milliseconds=us,ds.utcOffset=function(e,t,s){var i,a=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Lt(oe,e)))return this}else Math.abs(e)<16&&!s&&(e*=60);return!this._isUTC&&t&&(i=Nt(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),a!==e&&(!t||this._changeInProgress?Gt(this,Wt(e-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?a:Nt(this)},ds.utc=function(e){return this.utcOffset(0,e)},ds.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Nt(this),"m")),this},ds.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Lt(re,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},ds.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?St(e).utcOffset():0,(this.utcOffset()-e)%60==0)},ds.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},ds.isLocal=function(){return!!this.isValid()&&!this._isUTC},ds.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},ds.isUtc=It,ds.isUTC=It,ds.zoneAbbr=function(){return this._isUTC?"UTC":""},ds.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},ds.dates=D("dates accessor is deprecated. Use date instead.",ns),ds.months=D("months accessor is deprecated. Use month instead",Te),ds.years=D("years accessor is deprecated. Use year instead",be),ds.zone=D("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),ds.isDSTShifted=D("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var e={};if(g(e,this),(e=xt(e))._a){var t=e._isUTC?f(e._a):St(e._a);this._isDSTShifted=this.isValid()&&C(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var hs=j.prototype;function fs(e,t,s,i){var n=ot(),a=f().set(i,t);return n[s](a,e)}function ms(e,t,s){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return fs(e,t,s,"month");var i,n=[];for(i=0;i<12;i++)n[i]=fs(e,i,s,"month");return n}function _s(e,t,s,i){"boolean"==typeof e?(l(t)&&(s=t,t=void 0),t=t||""):(s=t=e,e=!1,l(t)&&(s=t,t=void 0),t=t||"");var n,a=ot(),r=e?a._week.dow:0;if(null!=s)return fs(t,(s+r)%7,i,"day");var o=[];for(n=0;n<7;n++)o[n]=fs(t,(n+r)%7,i,"day");return o}hs.calendar=function(e,t,s){var i=this._calendar[e]||this._calendar.sameElse;return T(i)?i.call(t,s):i},hs.longDateFormat=function(e){var t=this._longDateFormat[e],s=this._longDateFormat[e.toUpperCase()];return t||!s?t:(this._longDateFormat[e]=s.replace(/MMMM|MM|DD|dddd/g,(function(e){return e.slice(1)})),this._longDateFormat[e])},hs.invalidDate=function(){return this._invalidDate},hs.ordinal=function(e){return this._ordinal.replace("%d",e)},hs.preparse=cs,hs.postformat=cs,hs.relativeTime=function(e,t,s,i){var n=this._relativeTime[s];return T(n)?n(e,t,s,i):n.replace(/%d/i,e)},hs.pastFuture=function(e,t){var s=this._relativeTime[e>0?"future":"past"];return T(s)?s(t):s.replace(/%s/i,t)},hs.set=function(e){var t,s;for(s in e)T(t=e[s])?this[s]=t:this["_"+s]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},hs.months=function(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Se).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months.standalone},hs.monthsShort=function(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Se.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},hs.monthsParse=function(e,t,s){var i,n,a;if(this._monthsParseExact)return Oe.call(this,e,t,s);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(n=f([2e3,i]),s&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(n,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(n,"").replace(".","")+"$","i")),s||this._monthsParse[i]||(a="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[i]=new RegExp(a.replace(".",""),"i")),s&&"MMMM"===t&&this._longMonthsParse[i].test(e))return i;if(s&&"MMM"===t&&this._shortMonthsParse[i].test(e))return i;if(!s&&this._monthsParse[i].test(e))return i}},hs.monthsRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||Ee.call(this),e?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=je),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},hs.monthsShortRegex=function(e){return this._monthsParseExact?(c(this,"_monthsRegex")||Ee.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=Pe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},hs.week=function(e){return Ie(e,this._week.dow,this._week.doy).week},hs.firstDayOfYear=function(){return this._week.doy},hs.firstDayOfWeek=function(){return this._week.dow},hs.weekdays=function(e,t){var s=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Ue(s,this._week.dow):e?s[e.day()]:s},hs.weekdaysMin=function(e){return!0===e?Ue(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},hs.weekdaysShort=function(e){return!0===e?Ue(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},hs.weekdaysParse=function(e,t,s){var i,n,a;if(this._weekdaysParseExact)return $e.call(this,e,t,s);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(n=f([2e3,1]).day(i),s&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(n,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(n,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(n,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(a="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[i]=new RegExp(a.replace(".",""),"i")),s&&"dddd"===t&&this._fullWeekdaysParse[i].test(e))return i;if(s&&"ddd"===t&&this._shortWeekdaysParse[i].test(e))return i;if(s&&"dd"===t&&this._minWeekdaysParse[i].test(e))return i;if(!s&&this._weekdaysParse[i].test(e))return i}},hs.weekdaysRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Ze.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=Ge),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},hs.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Ze.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ze),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},hs.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Ze.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=qe),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},hs.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},hs.meridiem=function(e,t,s){return e>11?s?"pm":"PM":s?"am":"AM"},at("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===x(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),n.lang=D("moment.lang is deprecated. Use moment.locale instead.",at),n.langData=D("moment.langData is deprecated. Use moment.localeData instead.",ot);var ps=Math.abs;function vs(e,t,s,i){var n=Wt(t,s);return e._milliseconds+=i*n._milliseconds,e._days+=i*n._days,e._months+=i*n._months,e._bubble()}function gs(e){return e<0?Math.floor(e):Math.ceil(e)}function ys(e){return 4800*e/146097}function bs(e){return 146097*e/4800}function ws(e){return function(){return this.as(e)}}var ks=ws("ms"),xs=ws("s"),Cs=ws("m"),Ss=ws("h"),Ds=ws("d"),Ms=ws("w"),Os=ws("M"),Ys=ws("Q"),Ts=ws("y");function Ps(e){return function(){return this.isValid()?this._data[e]:NaN}}var js=Ps("milliseconds"),Es=Ps("seconds"),As=Ps("minutes"),Ls=Ps("hours"),Rs=Ps("days"),Ns=Ps("months"),Is=Ps("years"),Hs=Math.round,Us={ss:44,s:45,m:45,h:22,d:26,M:11};function Ws(e,t,s,i,n){return n.relativeTime(t||1,!!s,e,i)}var Fs=Math.abs;function Vs(e){return(e>0)-(e<0)||+e}function $s(){if(!this.isValid())return this.localeData().invalidDate();var e,t,s=Fs(this._milliseconds)/1e3,i=Fs(this._days),n=Fs(this._months);e=k(s/60),t=k(e/60),s%=60,e%=60;var a=k(n/12),r=n%=12,o=i,l=t,u=e,d=s?s.toFixed(3).replace(/\.?0+$/,""):"",c=this.asSeconds();if(!c)return"P0D";var h=c<0?"-":"",f=Vs(this._months)!==Vs(c)?"-":"",m=Vs(this._days)!==Vs(c)?"-":"",_=Vs(this._milliseconds)!==Vs(c)?"-":"";return h+"P"+(a?f+a+"Y":"")+(r?f+r+"M":"")+(o?m+o+"D":"")+(l||u||d?"T":"")+(l?_+l+"H":"")+(u?_+u+"M":"")+(d?_+d+"S":"")}var Gs=Tt.prototype;return Gs.isValid=function(){return this._isValid},Gs.abs=function(){var e=this._data;return this._milliseconds=ps(this._milliseconds),this._days=ps(this._days),this._months=ps(this._months),e.milliseconds=ps(e.milliseconds),e.seconds=ps(e.seconds),e.minutes=ps(e.minutes),e.hours=ps(e.hours),e.months=ps(e.months),e.years=ps(e.years),this},Gs.add=function(e,t){return vs(this,e,t,1)},Gs.subtract=function(e,t){return vs(this,e,t,-1)},Gs.as=function(e){if(!this.isValid())return NaN;var t,s,i=this._milliseconds;if("month"===(e=L(e))||"quarter"===e||"year"===e)switch(t=this._days+i/864e5,s=this._months+ys(t),e){case"month":return s;case"quarter":return s/3;case"year":return s/12}else switch(t=this._days+Math.round(bs(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+e)}},Gs.asMilliseconds=ks,Gs.asSeconds=xs,Gs.asMinutes=Cs,Gs.asHours=Ss,Gs.asDays=Ds,Gs.asWeeks=Ms,Gs.asMonths=Os,Gs.asQuarters=Ys,Gs.asYears=Ts,Gs.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*x(this._months/12):NaN},Gs._bubble=function(){var e,t,s,i,n,a=this._milliseconds,r=this._days,o=this._months,l=this._data;return a>=0&&r>=0&&o>=0||a<=0&&r<=0&&o<=0||(a+=864e5*gs(bs(o)+r),r=0,o=0),l.milliseconds=a%1e3,e=k(a/1e3),l.seconds=e%60,t=k(e/60),l.minutes=t%60,s=k(t/60),l.hours=s%24,r+=k(s/24),n=k(ys(r)),o+=n,r-=gs(bs(n)),i=k(o/12),o%=12,l.days=r,l.months=o,l.years=i,this},Gs.clone=function(){return Wt(this)},Gs.get=function(e){return e=L(e),this.isValid()?this[e+"s"]():NaN},Gs.milliseconds=js,Gs.seconds=Es,Gs.minutes=As,Gs.hours=Ls,Gs.days=Rs,Gs.weeks=function(){return k(this.days()/7)},Gs.months=Ns,Gs.years=Is,Gs.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),s=function(e,t,s){var i=Wt(e).abs(),n=Hs(i.as("s")),a=Hs(i.as("m")),r=Hs(i.as("h")),o=Hs(i.as("d")),l=Hs(i.as("M")),u=Hs(i.as("y")),d=n<=Us.ss&&["s",n]||n<Us.s&&["ss",n]||a<=1&&["m"]||a<Us.m&&["mm",a]||r<=1&&["h"]||r<Us.h&&["hh",r]||o<=1&&["d"]||o<Us.d&&["dd",o]||l<=1&&["M"]||l<Us.M&&["MM",l]||u<=1&&["y"]||["yy",u];return d[2]=t,d[3]=+e>0,d[4]=s,Ws.apply(null,d)}(this,!e,t);return e&&(s=t.pastFuture(+this,s)),t.postformat(s)},Gs.toISOString=$s,Gs.toString=$s,Gs.toJSON=$s,Gs.locale=Bt,Gs.localeData=Jt,Gs.toIsoString=D("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",$s),Gs.lang=Qt,$("X",0,0,"unix"),$("x",0,0,"valueOf"),de("x",ae),de("X",/[+-]?\d+(\.\d{1,3})?/),me("X",(function(e,t,s){s._d=new Date(1e3*parseFloat(e,10))})),me("x",(function(e,t,s){s._d=new Date(x(e))})),n.version="2.24.0",t=St,n.fn=ds,n.min=function(){var e=[].slice.call(arguments,0);return Ot("isBefore",e)},n.max=function(){var e=[].slice.call(arguments,0);return Ot("isAfter",e)},n.now=function(){return Date.now?Date.now():+new Date},n.utc=f,n.unix=function(e){return St(1e3*e)},n.months=function(e,t){return ms(e,t,"months")},n.isDate=u,n.locale=at,n.invalid=p,n.duration=Wt,n.isMoment=w,n.weekdays=function(e,t,s){return _s(e,t,s,"weekdays")},n.parseZone=function(){return St.apply(null,arguments).parseZone()},n.localeData=ot,n.isDuration=Pt,n.monthsShort=function(e,t){return ms(e,t,"monthsShort")},n.weekdaysMin=function(e,t,s){return _s(e,t,s,"weekdaysMin")},n.defineLocale=rt,n.updateLocale=function(e,t){if(null!=t){var s,i,n=et;null!=(i=nt(e))&&(n=i._config),t=P(n,t),(s=new j(t)).parentLocale=tt[e],tt[e]=s,at(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?tt[e]=tt[e].parentLocale:null!=tt[e]&&delete tt[e]);return tt[e]},n.locales=function(){return M(tt)},n.weekdaysShort=function(e,t,s){return _s(e,t,s,"weekdaysShort")},n.normalizeUnits=L,n.relativeTimeRounding=function(e){return void 0===e?Hs:"function"==typeof e&&(Hs=e,!0)},n.relativeTimeThreshold=function(e,t){return void 0!==Us[e]&&(void 0===t?Us[e]:(Us[e]=t,"s"===e&&(Us.ss=t-1),!0))},n.calendarFormat=function(e,t){var s=e.diff(t,"days",!0);return s<-6?"sameElse":s<-1?"lastWeek":s<0?"lastDay":s<1?"sameDay":s<2?"nextDay":s<7?"nextWeek":"sameElse"},n.prototype=ds,n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},n}()}).call(this,s("./node_modules/webpack/buildin/module.js")(e))},"./node_modules/vue-loader/lib/runtime/componentNormalizer.js":function(e,t,s){"use strict";function i(e,t,s,i,n,a,r,o){var l,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=s,u._compiled=!0),i&&(u.functional=!0),a&&(u._scopeId="data-v-"+a),r?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(r)},u._ssrRegister=l):n&&(l=o?function(){n.call(this,this.$root.$options.shadowRoot)}:n),l)if(u.functional){u._injectStyles=l;var d=u.render;u.render=function(e,t){return l.call(t),d(e,t)}}else{var c=u.beforeCreate;u.beforeCreate=c?[].concat(c,l):[l]}return{exports:e,options:u}}s.d(t,"a",(function(){return i}))},"./node_modules/webpack/buildin/global.js":function(e,t){var s;s=function(){return this}();try{s=s||new Function("return this")()}catch(e){"object"==typeof window&&(s=window)}e.exports=s},"./node_modules/webpack/buildin/module.js":function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},"./node_modules/xss/lib/default.js":function(e,t,s){var i=s("./node_modules/cssfilter/lib/index.js").FilterCSS,n=s("./node_modules/cssfilter/lib/index.js").getDefaultWhiteList,a=s("./node_modules/xss/lib/util.js");function r(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]}}var o=new i;function l(e){return e.replace(u,"<").replace(d,">")}var u=/</g,d=/>/g,c=/"/g,h=/"/g,f=/&#([a-zA-Z0-9]*);?/gim,m=/:?/gim,_=/&newline;?/gim,p=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,v=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,g=/u\s*r\s*l\s*\(.*/gi;function y(e){return e.replace(c,""")}function b(e){return e.replace(h,'"')}function w(e){return e.replace(f,(function(e,t){return"x"===t[0]||"X"===t[0]?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))}))}function k(e){return e.replace(m,":").replace(_," ")}function x(e){for(var t="",s=0,i=e.length;s<i;s++)t+=e.charCodeAt(s)<32?" ":e.charAt(s);return a.trim(t)}function C(e){return e=x(e=k(e=w(e=b(e))))}function S(e){return e=l(e=y(e))}var D=/<!--[\s\S]*?-->/g;t.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]},t.getDefaultWhiteList=r,t.onTag=function(e,t,s){},t.onIgnoreTag=function(e,t,s){},t.onTagAttr=function(e,t,s){},t.onIgnoreTagAttr=function(e,t,s){},t.safeAttrValue=function(e,t,s,i){if(s=C(s),"href"===t||"src"===t){if("#"===(s=a.trim(s)))return"#";if("http://"!==s.substr(0,7)&&"https://"!==s.substr(0,8)&&"mailto:"!==s.substr(0,7)&&"tel:"!==s.substr(0,4)&&"#"!==s[0]&&"/"!==s[0])return""}else if("background"===t){if(p.lastIndex=0,p.test(s))return""}else if("style"===t){if(v.lastIndex=0,v.test(s))return"";if(g.lastIndex=0,g.test(s)&&(p.lastIndex=0,p.test(s)))return"";!1!==i&&(s=(i=i||o).process(s))}return s=S(s)},t.escapeHtml=l,t.escapeQuote=y,t.unescapeQuote=b,t.escapeHtmlEntities=w,t.escapeDangerHtml5Entities=k,t.clearNonPrintableCharacter=x,t.friendlyAttrValue=C,t.escapeAttrValue=S,t.onIgnoreTagStripAll=function(){return""},t.StripTagBody=function(e,t){"function"!=typeof t&&(t=function(){});var s=!Array.isArray(e),i=[],n=!1;return{onIgnoreTag:function(r,o,l){if(function(t){return!!s||-1!==a.indexOf(e,t)}(r)){if(l.isClosing){var u="[/removed]",d=l.position+u.length;return i.push([!1!==n?n:l.position,d]),n=!1,u}return n||(n=l.position),"[removed]"}return t(r,o,l)},remove:function(e){var t="",s=0;return a.forEach(i,(function(i){t+=e.slice(s,i[0]),s=i[1]})),t+=e.slice(s)}}},t.stripCommentTag=function(e){return e.replace(D,"")},t.stripBlankChar=function(e){var t=e.split("");return(t=t.filter((function(e){var t=e.charCodeAt(0);return 127!==t&&(!(t<=31)||(10===t||13===t))}))).join("")},t.cssFilter=o,t.getDefaultCSSWhiteList=n},"./node_modules/xss/lib/index.js":function(e,t,s){var i=s("./node_modules/xss/lib/default.js"),n=s("./node_modules/xss/lib/parser.js"),a=s("./node_modules/xss/lib/xss.js");function r(e,t){return new a(t).process(e)}for(var o in(t=e.exports=r).filterXSS=r,t.FilterXSS=a,i)t[o]=i[o];for(var o in n)t[o]=n[o];"undefined"!=typeof window&&(window.filterXSS=e.exports),"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=e.exports)},"./node_modules/xss/lib/parser.js":function(e,t,s){var i=s("./node_modules/xss/lib/util.js");function n(e){var t=i.spaceIndex(e);if(-1===t)var s=e.slice(1,-1);else s=e.slice(1,t+1);return"/"===(s=i.trim(s).toLowerCase()).slice(0,1)&&(s=s.slice(1)),"/"===s.slice(-1)&&(s=s.slice(0,-1)),s}function a(e){return"</"===e.slice(0,2)}var r=/[^a-zA-Z0-9_:\.\-]/gim;function o(e,t){for(;t<e.length;t++){var s=e[t];if(" "!==s)return"="===s?t:-1}}function l(e,t){for(;t>0;t--){var s=e[t];if(" "!==s)return"="===s?t:-1}}function u(e){return function(e){return'"'===e[0]&&'"'===e[e.length-1]||"'"===e[0]&&"'"===e[e.length-1]}(e)?e.substr(1,e.length-2):e}t.parseTag=function(e,t,s){var i="",r=0,o=!1,l=!1,u=0,d=e.length,c="",h="";for(u=0;u<d;u++){var f=e.charAt(u);if(!1===o){if("<"===f){o=u;continue}}else if(!1===l){if("<"===f){i+=s(e.slice(r,u)),o=u,r=u;continue}if(">"===f){i+=s(e.slice(r,o)),c=n(h=e.slice(o,u+1)),i+=t(o,i.length,c,h,a(h)),r=u+1,o=!1;continue}if(('"'===f||"'"===f)&&"="===e.charAt(u-1)){l=f;continue}}else if(f===l){l=!1;continue}}return r<e.length&&(i+=s(e.substr(r))),i},t.parseAttr=function(e,t){var s=0,n=[],a=!1,d=e.length;function c(e,s){if(!((e=(e=i.trim(e)).replace(r,"").toLowerCase()).length<1)){var a=t(e,s||"");a&&n.push(a)}}for(var h=0;h<d;h++){var f,m=e.charAt(h);if(!1!==a||"="!==m)if(!1===a||h!==s||'"'!==m&&"'"!==m||"="!==e.charAt(h-1))if(/\s|\n|\t/.test(m)){if(e=e.replace(/\s|\n|\t/g," "),!1===a){if(-1===(f=o(e,h))){c(i.trim(e.slice(s,h))),a=!1,s=h+1;continue}h=f-1;continue}if(-1===(f=l(e,h-1))){c(a,u(i.trim(e.slice(s,h)))),a=!1,s=h+1;continue}}else;else{if(-1===(f=e.indexOf(m,h+1)))break;c(a,i.trim(e.slice(s+1,f))),a=!1,s=(h=f)+1}else a=e.slice(s,h),s=h+1}return s<e.length&&(!1===a?c(e.slice(s)):c(a,u(i.trim(e.slice(s))))),i.trim(n.join(" "))}},"./node_modules/xss/lib/util.js":function(e,t){e.exports={indexOf:function(e,t){var s,i;if(Array.prototype.indexOf)return e.indexOf(t);for(s=0,i=e.length;s<i;s++)if(e[s]===t)return s;return-1},forEach:function(e,t,s){var i,n;if(Array.prototype.forEach)return e.forEach(t,s);for(i=0,n=e.length;i<n;i++)t.call(s,e[i],i,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/.exec(e);return t?t.index:-1}}},"./node_modules/xss/lib/xss.js":function(e,t,s){var i=s("./node_modules/cssfilter/lib/index.js").FilterCSS,n=s("./node_modules/xss/lib/default.js"),a=s("./node_modules/xss/lib/parser.js"),r=a.parseTag,o=a.parseAttr,l=s("./node_modules/xss/lib/util.js");function u(e){return null==e}function d(e){(e=function(e){var t={};for(var s in e)t[s]=e[s];return t}(e||{})).stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=n.onIgnoreTagStripAll),e.whiteList=e.whiteList||n.whiteList,e.onTag=e.onTag||n.onTag,e.onTagAttr=e.onTagAttr||n.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||n.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||n.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||n.safeAttrValue,e.escapeHtml=e.escapeHtml||n.escapeHtml,this.options=e,!1===e.css?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new i(e.css))}d.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this.options,s=t.whiteList,i=t.onTag,a=t.onIgnoreTag,d=t.onTagAttr,c=t.onIgnoreTagAttr,h=t.safeAttrValue,f=t.escapeHtml,m=this.cssFilter;t.stripBlankChar&&(e=n.stripBlankChar(e)),t.allowCommentTag||(e=n.stripCommentTag(e));var _=!1;if(t.stripIgnoreTagBody){_=n.StripTagBody(t.stripIgnoreTagBody,a);a=_.onIgnoreTag}var p=r(e,(function(e,t,n,r,_){var p,v={sourcePosition:e,position:t,isClosing:_,isWhite:s.hasOwnProperty(n)};if(!u(p=i(n,r,v)))return p;if(v.isWhite){if(v.isClosing)return"</"+n+">";var g=function(e){var t=l.spaceIndex(e);if(-1===t)return{html:"",closing:"/"===e[e.length-2]};var s="/"===(e=l.trim(e.slice(t+1,-1)))[e.length-1];return s&&(e=l.trim(e.slice(0,-1))),{html:e,closing:s}}(r),y=s[n],b=o(g.html,(function(e,t){var s,i=-1!==l.indexOf(y,e);return u(s=d(n,e,t,i))?i?(t=h(n,e,t,m))?e+'="'+t+'"':e:u(s=c(n,e,t,i))?void 0:s:s}));r="<"+n;return b&&(r+=" "+b),g.closing&&(r+=" /"),r+=">"}return u(p=a(n,r,v))?f(r):p}),f);return _&&(p=_.remove(p)),p},e.exports=d},"./src/audit.js":function(e,t,s){"use strict";s.r(t);var i=s("vue"),n=s.n(i),a=s("./src/helper/base_hepler.js"),r=s("./src/component/footer.vue"),o=s("./node_modules/lodash/chunk.js"),l=s.n(o),u=s("./src/component/pagination.vue"),d=s("./node_modules/moment/moment.js"),c={mixins:[a.a],name:"logs",data:function(){return{filter:{date_range:null,username:"",ip_address:"",events:[],event_all:!0,is_open:!1,date_from:null,date_to:null},event_types:auditData.filters.types,data:{logs:[],chunks:[],total_items:0,total_pages:0,paged:1},misc:auditData.misc,endpoints:auditData.endpoints,nonces:auditData.nonces,state:{on_saving:!1,is_fetching:!1}}},methods:{date_range:function(){},build_filter_url:function(e){},paging:function(e){this.data.paged=e},do_filter:function(){var e=this,t=this.data.logs.filter((function(t){return(""===e.filter.username||-1!==t.user.indexOf(e.filter.username))&&((null===e.filter.ip_address||-1!==t.ip.indexOf(e.filter.ip_address))&&(!1!==e.filter.event_all||-1!==e.filter.events.indexOf(t.event_type)))}));e.data.chunks=l()(t,40),e.data.total_items=t.length,e.data.total_pages=Math.ceil(e.data.total_items/40),e.data.paged=1},fetch_data:function(e){var t=this;this.state.is_fetching=!0;var s=JSON.parse(JSON.stringify(this.filter));delete s.is_open,delete s.event_all,delete s.date_range,this.httpGetRequest("loadData",s,(function(s){!0===s.success?(t.data.logs=Object.values(s.data.logs),t.data.total_items=s.data.total_items,t.data.total_pages=s.data.total_pages,t.data.chunks=l()(t.data.logs,40),t.data.paged=1,t.state.is_fetching=!1,void 0!==e&&e()):Defender.showNotification("error",s.message)}),!1)},format_time:function(e){return Array.isArray(e)?this.$options.filters.moment(new Date(1e3*e[1]),this.misc.date_format):this.$options.filters.moment(new Date(1e3*e),this.misc.date_format)}},computed:{get_logs:function(){var e=[];return this.data.chunks.length>0&&void 0!==this.data.chunks[this.data.paged-1]&&(e=this.data.chunks[this.data.paged-1]),e},get_count:function(){return this.vsprintf(this.__("%s results"),this.data.total_items)},next_icon:function(){return'<i class="sui-icon-chevron-right" aria-hidden="true"></i>'},prev_icon:function(){return'<i class="sui-icon-chevron-left" aria-hidden="true"></i>'},min_date:function(){return d().format()},max_date:function(){return d().subtract(30,"days").format()},get_export_url:function(){var e=ajaxurl+"?action="+this.endpoints.exportAsCvs+"&_wpnonce="+this.nonces.exportAsCvs;return e+="&date_from="+this.filter.date_from,e+="&date_to="+this.filter.date_to,this.filter.events.forEach((function(t){e+="&event_type[]="+t})),e+="&term="+this.filter.username,e+="&ip="+this.filter.ip_address}},watch:{"filter.date_range":function(e,t){null!==e&&null!==t&&e!==t&&this.fetch_data()}},components:{pagination:u.a},created:function(){var e=new URLSearchParams(window.location.search),t=null!==e.get("date_from")?e.get("date_from"):d().subtract(7,"day").format("MM/DD/YYYY"),s=null!==e.get("date_to")?e.get("date_to"):d().format("MM/DD/YYYY");this.filter.date_range=t+" - "+s,this.filter.date_from=t,this.filter.date_to=s;var i=this;this.fetch_data((function(){i.$parent.$emit("events_in_7_days",i.data.logs.length)}))},mounted:function(){var e=this;this.$nextTick((function(){jQuery("#date-range-picker").daterangepicker({autoApply:!0,maxDate:d().format("MM/DD/YYYY"),minDate:d().subtract(1,"year").format("MM/DD/YYYY"),locale:{format:"MM/DD/YYYY",separator:"-"},ranges:{Today:[d(),d()],"7 Days":[d().subtract(6,"days"),d()],"30 Days":[d().subtract(29,"days"),d()]},template:'<div class="daterangepicker wd-calendar"><div class="ranges"></div><div class="drp-calendar left"><div class="calendar-table"></div><div class="calendar-time"></div></div><div class="drp-calendar right"><div class="calendar-table"></div><div class="calendar-time"></div></div></div>',showCustomRangeLabel:!1,alwaysShowCalendars:!0}),jQuery("#date-range-picker").on("apply.daterangepicker",(function(t,s){e.filter.date_range=s.startDate.format("MM/DD/YYYY")+"-"+s.endDate.format("MM/DD/YYYY"),e.filter.date_from=s.startDate.format("MM/DD/YYYY"),e.filter.date_to=s.endDate.format("MM/DD/YYYY")}))}))}},h=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),f=Object(h.a)(c,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"sui-box"},[s("div",{staticClass:"sui-box-header"},[s("h3",{staticClass:"sui-box-title"},[e._v("\n\t\t\t\t"+e._s(e.__("Event Logs"))+"\n\t\t\t")]),e._v(" "),s("div",{staticClass:"sui-actions-right"},[s("a",{staticClass:"sui-button sui-button-ghost",attrs:{href:e.get_export_url}},[s("i",{staticClass:"sui-icon-upload-cloud",attrs:{"aria-hidden":"true"}}),e._v("\n\t\t\t\t\t"+e._s(e.__("Export CSV"))+"\n\t\t\t\t")])])]),e._v(" "),s("div",{staticClass:"sui-box-body"},[s("p",[e._v("\n\t\t\t\t"+e._s(e.__("Here are your latest event logs showing what's been happening behind the scenes."))+"\n\t\t\t")]),e._v(" "),s("div",{staticClass:"sui-row"},[s("div",{staticClass:"sui-col-md-5"},[s("div",{staticClass:"inline-form"},[s("label",[e._v(e._s(e.__("Date range")))]),e._v(" "),s("div",{staticClass:"sui-date"},[s("i",{staticClass:"sui-icon-calendar",attrs:{"aria-hidden":"true"}}),e._v(" "),s("input",{staticClass:"sui-form-control",attrs:{id:"date-range-picker",name:"date_from",type:"text"},domProps:{value:e.filter.date_range}})])])]),e._v(" "),s("div",{staticClass:"sui-col-md-7"},[s("div",{staticClass:"sui-pagination-wrap"},[s("span",{staticClass:"sui-pagination-results",domProps:{textContent:e._s(e.get_count)}}),e._v(" "),e.data.total_items>0?s("pagination",{attrs:{"page-count":e.data.total_pages,"click-handler":e.paging,"prev-text":e.prev_icon,"next-text":e.next_icon,value:e.data.paged,"container-class":"sui-pagination"}}):e._e(),e._v(" "),s("button",{staticClass:"sui-button-icon sui-button-outlined sui-tooltip",attrs:{"data-tooltip":"Filter"},on:{click:function(t){e.filter.is_open=!e.filter.is_open}}},[s("i",{staticClass:"sui-icon-filter",attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",{staticClass:"sui-screen-reader-text"},[e._v("Open search filter")])])],1)])]),e._v(" "),s("div",{staticClass:"sui-pagination-filter",class:{"sui-open":e.filter.is_open}},[s("div",{staticClass:"sui-row"},[s("div",{staticClass:"sui-col-md-4"},[s("div",{staticClass:"sui-form-field"},[s("label",{staticClass:"sui-label"},[e._v(e._s(e.__("Username")))]),e._v(" "),s("div",{staticClass:"sui-control-with-icon sui-right-icon"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.filter.username,expression:"filter.username"}],staticClass:"sui-form-control",attrs:{type:"text"},domProps:{value:e.filter.username},on:{input:function(t){t.target.composing||e.$set(e.filter,"username",t.target.value)}}}),e._v(" "),s("i",{staticClass:"sui-icon-magnifying-glass-search",attrs:{"aria-hidden":"true"}})])])]),e._v(" "),s("div",{staticClass:"sui-col-md-3"},[s("div",{staticClass:"sui-form-field"},[s("label",{staticClass:"sui-label"},[e._v(e._s(e.__("IP Address")))]),e._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:e.filter.ip_address,expression:"filter.ip_address"}],staticClass:"sui-form-control",attrs:{type:"text","data-name":"ip",placeholder:"E.g. 192.168.1.1"},domProps:{value:e.filter.ip_address},on:{input:function(t){t.target.composing||e.$set(e.filter,"ip_address",t.target.value)}}})])])]),e._v(" "),s("div",{staticClass:"sui-row"},[s("div",{staticClass:"sui-col"},[s("div",{staticClass:"sui-form-field"},[s("div",{staticClass:"sui-side-tabs"},[s("div",{staticClass:"sui-tabs-menu"},[s("label",{staticClass:"sui-tab-item",class:{active:!0===e.filter.event_all},attrs:{for:"event_filter_all"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.filter.event_all,expression:"filter.event_all"}],attrs:{type:"radio",id:"event_filter_all","data-tab-menu":""},domProps:{value:!0,checked:e._q(e.filter.event_all,!0)},on:{change:function(t){return e.$set(e.filter,"event_all",!0)}}}),e._v("\n\t\t\t\t\t\t\t\t\t\t"+e._s(e.__("All"))+"\n\t\t\t\t\t\t\t\t\t")]),e._v(" "),s("label",{staticClass:"sui-tab-item",class:{active:!1===e.filter.event_all},attrs:{for:"event_filter"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.filter.event_all,expression:"filter.event_all"}],attrs:{type:"radio","data-tab-menu":"events-box",id:"event_filter"},domProps:{value:!1,checked:e._q(e.filter.event_all,!1)},on:{change:function(t){return e.$set(e.filter,"event_all",!1)}}}),e._v("\n\t\t\t\t\t\t\t\t\t\t"+e._s(e.__("Specific"))+"\n\t\t\t\t\t\t\t\t\t")])]),e._v(" "),s("div",{staticClass:"sui-tabs-content"},[s("div",{staticClass:"sui-tab-content sui-tab-boxed",class:{active:!1===e.filter.event_all},attrs:{id:"events-box","data-tab-content":"events-box"}},[s("div",{staticClass:"sui-row"},e._l(e.event_types,(function(t){return s("label",{staticClass:"sui-checkbox",attrs:{for:"chk_"+t}},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.filter.events,expression:"filter.events"}],staticClass:"filterable",attrs:{id:"chk_"+t,type:"checkbox"},domProps:{value:t,checked:Array.isArray(e.filter.events)?e._i(e.filter.events,t)>-1:e.filter.events},on:{change:function(s){var i=e.filter.events,n=s.target,a=!!n.checked;if(Array.isArray(i)){var r=t,o=e._i(i,r);n.checked?o<0&&e.$set(e.filter,"events",i.concat([r])):o>-1&&e.$set(e.filter,"events",i.slice(0,o).concat(i.slice(o+1)))}else e.$set(e.filter,"events",a)}}}),e._v(" "),s("span",{attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",[e._v(e._s(t))])])})),0)])])])])])]),e._v(" "),s("hr"),e._v(" "),s("div",{staticClass:"float-r"},[s("button",{staticClass:"sui-button sui-button-blue",attrs:{type:"submit"},on:{click:e.do_filter}},[e._v("\n\t\t\t\t\t\t"+e._s(e.__("Apply"))+"\n\t\t\t\t\t")])]),e._v(" "),s("div",{staticClass:"clear"})])]),e._v(" "),s("div",{staticClass:"sui-accordion sui-accordion-flushed no-border-top"},[s("div",{staticClass:"sui-accordion-header"},[s("div",[e._v(e._s(e.__("Event summary")))]),e._v(" "),s("div",[e._v(e._s(e.__("Date")))]),e._v(" "),s("div")]),e._v(" "),e._l(e.get_logs,(function(t){return s("div",{staticClass:"sui-accordion-item sui-default"},[s("div",{staticClass:"sui-accordion-item-header"},[s("div",{staticClass:"sui-accordion-item-title",domProps:{textContent:e._s(e.xss(t.msg))}}),e._v(" "),s("div",{domProps:{innerHTML:e._s(e.format_time(t.timestamp))}}),e._v(" "),e._m(0,!0)]),e._v(" "),s("div",{staticClass:"sui-accordion-item-body"},[s("div",{staticClass:"sui-box"},[s("div",{staticClass:"sui-box-body"},[s("strong",[e._v(e._s(e.__("Description")))]),e._v(" "),s("p",{domProps:{textContent:e._s(t.msg)}}),e._v(" "),s("div",{staticClass:"sui-row"},[s("div",{staticClass:"sui-col"},[s("strong",{staticClass:"block"},[e._v(e._s(e.__("Context")))]),e._v(" "),s("a",{staticClass:"block",attrs:{href:e.build_filter_url(t.context)},domProps:{textContent:e._s(e.xss(t.context))}})]),e._v(" "),s("div",{staticClass:"sui-col"},[s("strong",{staticClass:"block"},[e._v(e._s(e.__("Type")))]),e._v(" "),s("a",{staticClass:"block",attrs:{href:e.build_filter_url(t.event_type)},domProps:{textContent:e._s(e.xss(t.event_type))}})]),e._v(" "),s("div",{staticClass:"sui-col"},[s("strong",{staticClass:"block"},[e._v(e._s(e.__("Ip Address")))]),e._v(" "),s("a",{staticClass:"block",attrs:{href:e.build_filter_url(t.ip)},domProps:{textContent:e._s(e.xss(t.ip))}})]),e._v(" "),s("div",{staticClass:"sui-col"},[s("strong",{staticClass:"block"},[e._v(e._s(e.__("User")))]),e._v(" "),s("a",{staticClass:"block",attrs:{href:e.build_filter_url(t.user)},domProps:{textContent:e._s(e.xss(t.user))}})]),e._v(" "),s("div",{staticClass:"sui-col"},[s("strong",{staticClass:"block"},[e._v(e._s(e.__("Date / Time")))]),e._v(" "),s("a",{staticClass:"block",attrs:{href:e.build_filter_url(t.timestamp)}},[e._v("\n\t\t\t\t\t\t\t\t\t\t"+e._s(e._f("moment")(new Date(1e3*t.timestamp),e.misc.date_format))+"\n\t\t\t\t\t\t\t\t\t")])])])])])])])}))],2),e._v(" "),0===e.data.chunks.length?s("div",{staticClass:"sui-row"},[s("div",{staticClass:"sui-col"},[s("div",{staticClass:"sui-notice"},[s("div",{staticClass:"sui-notice-content"},[s("div",{staticClass:"sui-notice-message"},[s("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),e._v(" "),!0===e.state.is_fetching?s("p",[e._v("\n\t\t\t\t\t\t"+e._s(e.__("Loading events..."))+"\n\t\t\t\t\t")]):s("p",[e._v("\n\t\t\t\t\t\t"+e._s(e.__("There have been no events logged in the selected time period."))+"\n\t\t\t\t\t")])])])])])]):e._e(),e._v(" "),s("div",{staticClass:"sui-center-box"},[s("div",{staticClass:"sui-pagination-wrap"},[e.data.total_items>0?s("pagination",{attrs:{"page-count":e.data.total_pages,"click-handler":e.paging,"prev-text":e.prev_icon,"next-text":e.next_icon,value:e.data.paged,"container-class":"sui-pagination"}}):e._e()],1)]),e._v(" "),e.state.is_fetching?s("overlay"):e._e()],1)}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("button",{staticClass:"sui-button-icon sui-accordion-open-indicator",attrs:{"aria-label":"Open item"}},[t("i",{staticClass:"sui-icon-chevron-down",attrs:{"aria-hidden":"true"}})])])}],!1,null,null,null).exports,m={mixins:[a.a],name:"settings",data:function(){return{model:auditData.model.settings,state:{on_saving:!1},nonces:auditData.nonces,endpoints:auditData.endpoints}},methods:{toggle:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"enabled",s=this,i={};i[t]=e,this.httpPostRequest("updateSettings",{data:JSON.stringify(i)},(function(){s.$parent.$emit("enable_state",e)}))},updateSettings:function(){var e=this.model;this.httpPostRequest("updateSettings",{data:JSON.stringify(e)})}},mounted:function(){var e=this;jQuery("#storage_days").change((function(){e.model.storage_days=jQuery(this).val()}))}},_=Object(h.a)(m,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"sui-box audit-settings"},[s("div",{staticClass:"sui-box-header"},[s("h3",{staticClass:"sui-box-title"},[e._v("\n\t\t\t\t"+e._s(e.__("Settings"))+"\n\t\t\t")])]),e._v(" "),s("form",{attrs:{method:"post"},on:{submit:function(t){return t.preventDefault(),e.updateSettings(t)}}},[s("div",{staticClass:"sui-box-body"},[s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[e._v(e._s(e.__("Storage")))]),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n "+e._s(e.__("Events are stored in our API. You can choose how many days to keep logs for before they are removed."))+"\n ")])]),e._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("div",{staticClass:"sui-form-field"},[s("select",{directives:[{name:"model",rawName:"v-model",value:e.model.storage_days,expression:"model.storage_days"}],attrs:{name:"storage_days",id:"storage_days"},on:{change:function(t){var s=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.model,"storage_days",t.target.multiple?s:s[0])}}},[s("option",{attrs:{value:"24 hours"}},[e._v(e._s(e.__("24 hours")))]),e._v(" "),s("option",{attrs:{value:"7 days"}},[e._v(e._s(e.__("7 days")))]),e._v(" "),s("option",{attrs:{value:"30 days"}},[e._v(e._s(e.__("30 days")))]),e._v(" "),s("option",{attrs:{value:"3 months"}},[e._v(e._s(e.__("3 months")))]),e._v(" "),s("option",{attrs:{value:"6 months"}},[e._v(e._s(e.__("6 months")))]),e._v(" "),s("option",{attrs:{value:"12 months"}},[e._v(e._s(e.__("12 months")))])]),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n "+e._s(e.__("Choose how long you'd like to store your event logs locally before wiping the oldest."))+"\n ")])])])]),e._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[e._v("\n "+e._s(e.__("Deactivate"))+"\n ")]),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n "+e._s(e.__("If you no longer want to use this feature you can turn it off at any time."))+"\n ")])]),e._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("submit-button",{attrs:{type:"button","css-class":"sui-button-ghost",state:e.state},on:{click:function(t){return e.toggle(!1)}}},[s("i",{staticClass:"sui-icon-save",attrs:{"aria-hidden":"true"}}),e._v("\n\t\t\t\t\t\t\t"+e._s(e.__("Deactivate"))+"\n\t\t\t\t\t\t")])],1)])]),e._v(" "),s("div",{staticClass:"sui-box-footer"},[s("div",{staticClass:"sui-actions-right"},[s("submit-button",{attrs:{type:"submit","css-class":"sui-button-blue",state:e.state}},[s("i",{staticClass:"sui-icon-save",attrs:{"aria-hidden":"true"}}),e._v("\n\t\t\t\t\t\t"+e._s(e.__("Save Changes"))+"\n\t\t\t\t\t")])],1)])])])}),[],!1,null,null,null).exports,p=s("./src/component/recipients.vue"),v={mixins:[a.a],name:"report",data:function(){return{model:auditData.model.report,misc:auditData.misc,nonces:auditData.nonces,endpoints:auditData.endpoints,state:{on_saving:!1,show_day:!0}}},components:{recipients:p.a},methods:{updateRecipients:function(e){this.model.receipts=e},updateSettings:function(){var e=this.model,t=this;this.httpPostRequest("updateSettings",{data:JSON.stringify(e)},(function(e){t.$parent.$emit("update_report_time",e.data.summary)}))}},mounted:function(){var e=this;jQuery(".report-select").change((function(){var t=jQuery(this).attr("name");e.model[t]=jQuery(this).val()})),this.model.day=this.model.day.toLowerCase()},watch:{"model.frequency":function(){this.state.show_day=this.model.frequency>1}},created:function(){this.state.show_day=this.model.frequency>1},computed:{timezone_text:function(){return this.vsprintf(this.__("Your timezone is set to UTC %s, so your current time is %s."),this.misc.tz,this.misc.current_time)}}},g=Object(h.a)(v,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"sui-box"},[s("div",{staticClass:"sui-box-header"},[s("h3",{staticClass:"sui-box-title"},[e._v("\n "+e._s(e.__("Notification"))+"\n ")])]),e._v(" "),s("form",{attrs:{method:"post"},on:{submit:function(t){return t.preventDefault(),e.updateSettings(t)}}},[s("div",{staticClass:"sui-box-body"},[s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[e._v("\n "+e._s(e.__("Scheduled Reports"))+"\n ")]),e._v(" "),s("span",{staticClass:"sui-description"},[e._v("\n "+e._s(e.__("Schedule Defender to automatically email you a summary of all your website events."))+"\n ")])]),e._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("label",{staticClass:"sui-toggle"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.model.notification,expression:"model.notification"}],attrs:{type:"checkbox",name:"notification",id:"toggle_notification"},domProps:{checked:Array.isArray(e.model.notification)?e._i(e.model.notification,null)>-1:e.model.notification},on:{change:function(t){var s=e.model.notification,i=t.target,n=!!i.checked;if(Array.isArray(s)){var a=e._i(s,null);i.checked?a<0&&e.$set(e.model,"notification",s.concat([null])):a>-1&&e.$set(e.model,"notification",s.slice(0,a).concat(s.slice(a+1)))}else e.$set(e.model,"notification",n)}}}),e._v(" "),s("span",{staticClass:"sui-toggle-slider"})]),e._v(" "),s("label",{staticClass:"sui-toggle-label",attrs:{for:"toggle_notification"}},[e._v("\n "+e._s(e.__("Send regular email report"))+"\n ")]),e._v(" "),s("div",{staticClass:"sui-border-frame sui-toggle-content"},[s("div",{staticClass:"margin-top-30"},[s("recipients",{attrs:{id:"report_dialog",recipients:e.model.receipts},on:{"update:recipients":e.updateRecipients}})],1),e._v(" "),s("div",{staticClass:"sui-form-field margin-top-30 schedule-box"},[s("label",{staticClass:"sui-label",attrs:{for:"audit_report_frequency",id:"label_audit_report_frequency"}},[e._v("\n "+e._s(e.__("Frequency"))+"\n ")]),e._v(" "),s("div",{staticClass:"sui-row"},[s("div",{staticClass:"sui-col"},[s("select",{directives:[{name:"model",rawName:"v-model",value:e.model.frequency,expression:"model.frequency"}],staticClass:"report-select",attrs:{id:"audit_report_frequency","aria-labelledby":"label_audit_report_frequency",name:"frequency"},on:{change:function(t){var s=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.model,"frequency",t.target.multiple?s:s[0])}}},[s("option",{attrs:{value:"1"}},[e._v(e._s(e.__("Daily")))]),e._v(" "),s("option",{attrs:{value:"7"}},[e._v(e._s(e.__("Weekly")))]),e._v(" "),s("option",{attrs:{value:"30"}},[e._v(e._s(e.__("Monthly")))])])])]),e._v(" "),s("div",{staticClass:"sui-row"},[s("div",{directives:[{name:"show",rawName:"v-show",value:e.state.show_day,expression:"state.show_day"}],staticClass:"sui-col days-container"},[s("label",{staticClass:"sui-label",attrs:{for:"audit_report_day_week",id:"label_audit_report_day_week"}},[e._v("\n "+e._s(e.__("Day of the week"))+"\n ")]),e._v(" "),s("select",{directives:[{name:"model",rawName:"v-model",value:e.model.day,expression:"model.day"}],staticClass:"report-select",attrs:{id:"audit_report_day_week","aria-labelledby":"label_audit_report_day_week",name:"day"},on:{change:function(t){var s=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.model,"day",t.target.multiple?s:s[0])}}},e._l(e.misc.days_of_week,(function(t){return s("option",{domProps:{value:t.toLowerCase()}},[e._v(e._s(t)+"\n ")])})),0)]),e._v(" "),s("div",{staticClass:"sui-col"},[s("label",{staticClass:"sui-label",attrs:{for:"audit_report_day_time",id:"label_audit_report_day_time"}},[e._v("\n "+e._s(e.__("Time of day"))+"\n ")]),e._v(" "),s("select",{directives:[{name:"model",rawName:"v-model",value:e.model.time,expression:"model.time"}],staticClass:"report-select",attrs:{id:"audit_report_day_time","aria-labelledby":"label_audit_report_day_time",name:"time"},on:{change:function(t){var s=Array.prototype.filter.call(t.target.options,(function(e){return e.selected})).map((function(e){return"_value"in e?e._value:e.value}));e.$set(e.model,"time",t.target.multiple?s:s[0])}}},e._l(e.misc.times_of_day,(function(t,i){return s("option",{domProps:{value:i}},[e._v(e._s(t)+"\n ")])})),0)]),e._v(" "),s("div",{staticClass:"sui-col-md-12"},[s("span",{staticClass:"sui-p-small",domProps:{innerHTML:e._s(e.timezone_text)}})])])])])])])]),e._v(" "),s("div",{staticClass:"sui-box-footer"},[s("div",{staticClass:"sui-actions-right"},[s("submit-button",{attrs:{type:"submit","css-class":"sui-button-blue save-changes",state:e.state}},[s("i",{staticClass:"sui-icon-save",attrs:{"aria-hidden":"true"}}),e._v("\n "+e._s(e.__("Save Changes"))+"\n ")])],1)])])])}),[],!1,null,null,null).exports,y={mixins:[a.a],name:"audit",data:function(){return{view:"",summary:{report_time:auditData.summary.report_time,events_in_7_days:"-"},enabled:auditData.enabled,state:{on_saving:!1},nonces:auditData.nonces,endpoints:auditData.endpoints}},components:{"app-footer":r.a,logs:f,settings:_,report:g},methods:{updateSummary:function(e){this.summary.events_in_7_days=e},toggle:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"enabled",s=this,i={};i[t]=e,this.httpPostRequest("updateSettings",{data:JSON.stringify(i)},(function(){s.enabled=e,s.$nextTick((function(){s.rebindSUI()}))}))}},created:function(){var e=new URLSearchParams(window.location.search).get("view");null===e&&(e="logs"),this.view=e,this.$on("events_in_7_days",(function(e){this.summary.events_in_7_days=e})),this.$on("update_report_time",(function(e){this.summary.report_time=e.report_time})),this.$on("enable_state",(function(e){this.enabled=e}))},watch:{view:function(e,t){history.replaceState({},null,this.adminUrl()+"admin.php?page=wdf-logging&view="+this.view)}},mounted:function(){self=this,jQuery(".sui-mobile-nav").change((function(){self.view=jQuery(this).val()}))}},b=Object(h.a)(y,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"sui-wrap",class:e.maybeHighContrast()},[e.enabled?s("div",{staticClass:"auditing"},[s("div",{staticClass:"sui-header"},[s("h1",{staticClass:"sui-header-title"},[e._v("\n "+e._s(e.__("Audit Logging"))+"\n ")]),e._v(" "),s("doc-link",{attrs:{link:"https://premium.wpmudev.org/docs/wpmu-dev-plugins/defender/#audit-logging"}})],1),e._v(" "),s("summary-box",{attrs:{"css-class":"sui-summary-sm"}},[s("div",{staticClass:"sui-summary-segment"},[s("div",{staticClass:"sui-summary-details"},[s("span",{staticClass:"sui-summary-large",domProps:{textContent:e._s(e.summary.events_in_7_days)}}),e._v(" "),s("span",{staticClass:"sui-summary-sub"},[e._v("\n "+e._s(e.__("Events logged in the past 7 days"))+"\n ")])])]),e._v(" "),s("div",{staticClass:"sui-summary-segment"},[s("ul",{staticClass:"sui-list"},[s("li",[s("span",{staticClass:"sui-list-label"},[e._v(e._s(e.__("Reporting")))]),e._v(" "),s("span",{staticClass:"sui-list-detail",domProps:{textContent:e._s(e.summary.report_time)}})])])])]),e._v(" "),s("div",{staticClass:"sui-row-with-sidenav"},[s("div",{staticClass:"sui-sidenav"},[s("ul",{staticClass:"sui-vertical-tabs sui-sidenav-hide-md"},[s("li",{staticClass:"sui-vertical-tab",class:{current:"logs"===e.view},attrs:{id:"tab_log"}},[s("a",{attrs:{href:e.adminUrl("admin.php?page=wdf-logging")},on:{click:function(t){t.preventDefault(),e.view="logs"}}},[e._v(e._s(e.__("Event Logs")))])]),e._v(" "),s("li",{staticClass:"sui-vertical-tab",class:{current:"settings"===e.view},attrs:{id:"tab_settings"}},[s("a",{attrs:{href:e.adminUrl("admin.php?page=wdf-logging&view=settings")},on:{click:function(t){t.preventDefault(),e.view="settings"}}},[e._v(e._s(e.__("Settings")))])]),e._v(" "),s("li",{staticClass:"sui-vertical-tab",class:{current:"report"===e.view},attrs:{id:"tab_report"}},[s("a",{attrs:{href:e.adminUrl("admin.php?page=wdf-logging&view=report")},on:{click:function(t){t.preventDefault(),e.view="report"}}},[e._v(e._s(e.__("Reports")))])])]),e._v(" "),s("div",{staticClass:"sui-sidenav-hide-lg"},[s("select",{staticClass:"sui-mobile-nav",staticStyle:{display:"none"}},[s("option",{attrs:{value:"logs"}},[e._v(e._s(e.__("Event Logs")))]),e._v(" "),s("option",{attrs:{value:"settings"}},[e._v(e._s(e.__("Settings")))]),e._v(" "),s("option",{attrs:{value:"report"}},[e._v(e._s(e.__("Reports")))])])])]),e._v(" "),s("logs",{directives:[{name:"show",rawName:"v-show",value:"logs"===e.view,expression:"view==='logs'"}]}),e._v(" "),s("settings",{directives:[{name:"show",rawName:"v-show",value:"settings"===e.view,expression:"view==='settings'"}]}),e._v(" "),s("report",{directives:[{name:"show",rawName:"v-show",value:"report"===e.view,expression:"view==='report'"}]})],1),e._v(" "),s("app-footer")],1):s("div",{staticClass:"auditing"},[s("div",{staticClass:"sui-header"},[s("h1",{staticClass:"sui-header-title"},[e._v("\n "+e._s(e.__("Audit Logging"))+"\n ")]),e._v(" "),s("div",{staticClass:"sui-actions-right"},[s("doc-link",{attrs:{link:"https://premium.wpmudev.org/docs/wpmu-dev-plugins/defender/#audit-logging"}})],1)]),e._v(" "),s("div",{staticClass:"sui-box"},[s("div",{staticClass:"sui-box-header"},[s("h3",{staticClass:"sui-box-title"},[e._v("\n "+e._s(e.__("Activate"))+"\n ")])]),e._v(" "),s("div",{staticClass:"sui-message"},[!1===e.maybeHideBranding()?s("img",{staticClass:"sui-image",attrs:{src:e.assetUrl("assets/img/audit-disabled-man.svg"),"aria-hidden":"true"}}):e._e(),e._v(" "),s("div",{staticClass:"sui-message-content"},[s("p",[e._v("\n "+e._s(e.__("Track and log each and every event when changes are made to your website and get detailed reports on what's going on behind the scenes, including any hacking attempts onyour site."))+"\n ")]),e._v(" "),s("submit-button",{attrs:{type:"button","css-class":"sui-button-blue activate",state:e.state},on:{click:function(t){return e.toggle(!0)}}},[e._v("\n "+e._s(e.__("Activate"))+"\n ")])],1)])])])])}),[],!1,null,null,null).exports,w={mixins:[a.a],name:"audit-free"},k=Object(h.a)(w,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"sui-wrap",class:e.maybeHighContrast()},[s("div",{staticClass:"sui-box"},[s("div",{staticClass:"sui-box-header"},[s("h3",{staticClass:"sui-box-title"},[e._v("\n "+e._s(e.__("Audit Logging"))+"\n ")]),e._v(" "),e._m(0)]),e._v(" "),s("div",{staticClass:"sui-message"},[s("img",{staticClass:"sui-image",attrs:{src:e.assetUrl("assets/img/audit-disabled-man.svg")}}),e._v(" "),s("div",{staticClass:"sui-message-content"},[s("p",[e._v("\n "+e._s(e.__("Track and log each and every event when changes are made to your website and get detailed reports on what's going on behind the scenes, including any hacking attempts on your site. This is a pro feature that requires an active WPMU DEV membership. Try it free today!"))+"\n ")]),e._v(" "),s("a",{staticClass:"sui-button sui-button-purple",attrs:{href:e.campaign_url("defender_auditlogging_upgrade_button"),target:"_blank"}},[e._v("Upgrade to Pro")])])])])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"sui-actions-left"},[t("span",{staticClass:"sui-tag sui-tag-pro"},[this._v("Pro")])])}],!1,null,null,null).exports,x=s("./src/component/overlay.vue"),C=s("./src/component/submit-button.vue"),S=s("./src/component/doc-link.vue"),D=s("./src/component/summary-box.vue");n.a.filter("moment",(function(e,t){return e?d(e).format(t):d().format(t)})),n.a.component("overlay",x.a),n.a.component("submit-button",C.a),n.a.component("app-footer",r.a),n.a.component("doc-link",S.a),n.a.component("summary-box",D.a);new n.a({el:"#defender",components:{audit:b,audit_free:k},render:function(e){return 0===parseInt(defender.is_free)?e(b):e(k)}})},"./src/component/doc-link.vue":function(e,t,s){"use strict";var i={mixins:[s("./src/helper/base_hepler.js").a],name:"doc-link",props:["link"],data:function(){return{whitelabel:defender.whitelabel,is_free:parseInt(defender.is_free)}}},n=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),a=Object(n.a)(i,(function(){var e=this.$createElement,t=this._self._c||e;return 1!==this.is_free&&!1===this.whitelabel.hide_doc_link?t("div",{staticClass:"sui-actions-right"},[t("a",{staticClass:"sui-button sui-button-ghost",attrs:{href:this.link,target:"_blank"}},[t("i",{staticClass:"sui-icon-academy"}),this._v(" "+this._s(this.__("View Documentation"))+"\n ")])]):this._e()}),[],!1,null,null,null);t.a=a.exports},"./src/component/footer.vue":function(e,t,s){"use strict";var i={data:function(){return{whitelabel:defender.whitelabel,is_free:parseInt(defender.is_free)}}},n=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),a=Object(n.a)(i,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[!0===e.whitelabel.change_footer?s("div",{staticClass:"sui-footer"},[e._v("\n "+e._s(e.whitelabel.footer_text)+"\n ")]):s("div",{staticClass:"sui-footer"},[e._v("Made with "),s("i",{staticClass:"sui-icon-heart"}),e._v(" by WPMU DEV")]),e._v(" "),!1===e.whitelabel.hide_doc_link?s("div",[1===e.is_free?s("ul",{staticClass:"sui-footer-nav"},[e._m(0),e._v(" "),e._m(1),e._v(" "),e._m(2),e._v(" "),e._m(3),e._v(" "),e._m(4),e._v(" "),e._m(5),e._v(" "),e._m(6),e._v(" "),e._m(7)]):s("ul",{staticClass:"sui-footer-nav"},[e._m(8),e._v(" "),e._m(9),e._v(" "),e._m(10),e._v(" "),e._m(11),e._v(" "),e._m(12),e._v(" "),e._m(13),e._v(" "),e._m(14),e._v(" "),e._m(15)]),e._v(" "),e._m(16)]):e._e()])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://profiles.wordpress.org/wpmudev#content-plugins",target:"_blank"}},[this._v("Free\n Plugins")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/features/",target:"_blank"}},[this._v("Membership")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/roadmap/",target:"_blank"}},[this._v("Roadmap")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://wordpress.org/support/plugin/plugin-name",target:"_blank"}},[this._v("Support")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/docs/",target:"_blank"}},[this._v("Docs")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/hub/",target:"_blank"}},[this._v("The Hub")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/terms-of-service/",target:"_blank"}},[this._v("Terms of Service")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://incsub.com/privacy-policy/",target:"_blank"}},[this._v("Privacy Policy")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/hub/",target:"_blank"}},[this._v("The Hub")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/projects/category/plugins/",target:"_blank"}},[this._v("Plugins")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/roadmap/",target:"_blank"}},[this._v("Roadmap")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/hub/support/",target:"_blank"}},[this._v("Support")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/docs/",target:"_blank"}},[this._v("Docs")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/hub/community/",target:"_blank"}},[this._v("Community")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://premium.wpmudev.org/terms-of-service/",target:"_blank"}},[this._v("Terms of Service")])])},function(){var e=this.$createElement,t=this._self._c||e;return t("li",[t("a",{attrs:{href:"https://incsub.com/privacy-policy/",target:"_blank"}},[this._v("Privacy Policy")])])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("ul",{staticClass:"sui-footer-social"},[s("li",[s("a",{attrs:{href:"https://www.facebook.com/wpmudev",target:"_blank"}},[s("i",{staticClass:"sui-icon-social-facebook",attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",{staticClass:"sui-screen-reader-text"},[e._v("Facebook")])])]),e._v(" "),s("li",[s("a",{attrs:{href:"https://twitter.com/wpmudev",target:"_blank"}},[s("i",{staticClass:"sui-icon-social-twitter",attrs:{"aria-hidden":"true"}})]),e._v(" "),s("span",{staticClass:"sui-screen-reader-text"},[e._v("Twitter")])]),e._v(" "),s("li",[s("a",{attrs:{href:"https://www.instagram.com/wpmu_dev/",target:"_blank"}},[s("i",{staticClass:"sui-icon-instagram",attrs:{"aria-hidden":"true"}}),e._v(" "),s("span",{staticClass:"sui-screen-reader-text"},[e._v("Instagram")])])])])}],!1,null,null,null);t.a=a.exports},"./src/component/overlay.vue":function(e,t,s){"use strict";var i={name:"overlay"},n=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),a=Object(n.a)(i,(function(){var e=this.$createElement;this._self._c;return this._m(0)}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"wd-overlay"},[t("i",{staticClass:"sui-icon-loader sui-loading",attrs:{"aria-hidden":"true"}})])}],!1,null,null,null);t.a=a.exports},"./src/component/pagination.vue":function(e,t,s){"use strict";var i={props:{value:{type:Number},pageCount:{type:Number,required:!0},forcePage:{type:Number},clickHandler:{type:Function,default:function(){}},pageRange:{type:Number,default:3},marginPages:{type:Number,default:1},prevText:{type:String,default:"Prev"},nextText:{type:String,default:"Next"},breakViewText:{type:String,default:"…"},containerClass:{type:String},pageClass:{type:String},pageLinkClass:{type:String},prevClass:{type:String},prevLinkClass:{type:String},nextClass:{type:String},nextLinkClass:{type:String},breakViewClass:{type:String},breakViewLinkClass:{type:String},activeClass:{type:String,default:"active"},disabledClass:{type:String,default:"disabled"},noLiSurround:{type:Boolean,default:!1},firstLastButton:{type:Boolean,default:!1},firstButtonText:{type:String,default:"First"},lastButtonText:{type:String,default:"Last"},hidePrevNext:{type:Boolean,default:!1}},beforeUpdate:function(){void 0!==this.forcePage&&this.forcePage!==this.selected&&(this.selected=this.forcePage)},computed:{selected:{get:function(){return this.value||this.innerValue},set:function(e){this.innerValue=e}},pages:function(){var e=this,t={};if(this.pageCount<=this.pageRange)for(var s=0;s<this.pageCount;s++){var i={index:s,content:s+1,selected:s===this.selected-1};t[s]=i}else{for(var n=Math.floor(this.pageRange/2),a=function(s){var i={index:s,content:s+1,selected:s===e.selected-1};t[s]=i},r=function(e){t[e]={disabled:!0,breakView:!0}},o=0;o<this.marginPages;o++)a(o);var l=0;this.selected-n>0&&(l=this.selected-1-n);var u=l+this.pageRange-1;u>=this.pageCount&&(l=(u=this.pageCount-1)-this.pageRange+1);for(var d=l;d<=u&&d<=this.pageCount-1;d++)a(d);l>this.marginPages&&r(l-1),u+1<this.pageCount-this.marginPages&&r(u+1);for(var c=this.pageCount-1;c>=this.pageCount-this.marginPages;c--)a(c)}return t}},data:function(){return{innerValue:1}},methods:{handlePageSelected:function(e){this.selected!==e&&(this.innerValue=e,this.$emit("input",e),this.clickHandler(e))},prevPage:function(){this.selected<=1||this.handlePageSelected(this.selected-1)},nextPage:function(){this.selected>=this.pageCount||this.handlePageSelected(this.selected+1)},firstPageSelected:function(){return 1===this.selected},lastPageSelected:function(){return this.selected===this.pageCount||0===this.pageCount},selectFirstPage:function(){this.selected<=1||this.handlePageSelected(1)},selectLastPage:function(){this.selected>=this.pageCount||this.handlePageSelected(this.pageCount)}}},n=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),a=Object(n.a)(i,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return e.noLiSurround?s("div",{class:e.containerClass},[e.firstLastButton?s("a",{class:[e.pageLinkClass,e.firstPageSelected()?e.disabledClass:""],attrs:{tabindex:"0"},domProps:{innerHTML:e._s(e.firstButtonText)},on:{click:function(t){return e.selectFirstPage()},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.selectFirstPage()}}}):e._e(),e._v(" "),e.firstPageSelected()&&e.hidePrevNext?e._e():s("a",{class:[e.prevLinkClass,e.firstPageSelected()?e.disabledClass:""],attrs:{tabindex:"0"},domProps:{innerHTML:e._s(e.prevText)},on:{click:function(t){return e.prevPage()},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.prevPage()}}}),e._v(" "),e._l(e.pages,(function(t){return[t.breakView?s("a",{class:[e.pageLinkClass,e.breakViewLinkClass,t.disabled?e.disabledClass:""],attrs:{tabindex:"0"}},[e._t("breakViewContent",[e._v(e._s(e.breakViewText))])],2):t.disabled?s("a",{class:[e.pageLinkClass,t.selected?e.activeClass:"",e.disabledClass],attrs:{tabindex:"0"}},[e._v(e._s(t.content))]):s("a",{class:[e.pageLinkClass,t.selected?e.activeClass:""],attrs:{tabindex:"0"},on:{click:function(s){return e.handlePageSelected(t.index+1)},keyup:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:e.handlePageSelected(t.index+1)}}},[e._v(e._s(t.content))])]})),e._v(" "),e.lastPageSelected()&&e.hidePrevNext?e._e():s("a",{class:[e.nextLinkClass,e.lastPageSelected()?e.disabledClass:""],attrs:{tabindex:"0"},domProps:{innerHTML:e._s(e.nextText)},on:{click:function(t){return e.nextPage()},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.nextPage()}}}),e._v(" "),e.firstLastButton?s("a",{class:[e.pageLinkClass,e.lastPageSelected()?e.disabledClass:""],attrs:{tabindex:"0"},domProps:{innerHTML:e._s(e.lastButtonText)},on:{click:function(t){return e.selectLastPage()},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.selectLastPage()}}}):e._e()],2):s("ul",{class:e.containerClass},[e.firstLastButton?s("li",{class:[e.pageClass,e.firstPageSelected()?e.disabledClass:""]},[s("a",{class:e.pageLinkClass,attrs:{tabindex:e.firstPageSelected()?-1:0},domProps:{innerHTML:e._s(e.firstButtonText)},on:{click:function(t){return e.selectFirstPage()},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.selectFirstPage()}}})]):e._e(),e._v(" "),e.firstPageSelected()&&e.hidePrevNext?e._e():s("li",{class:[e.prevClass,e.firstPageSelected()?e.disabledClass:""]},[s("a",{class:e.prevLinkClass,attrs:{tabindex:e.firstPageSelected()?-1:0},domProps:{innerHTML:e._s(e.prevText)},on:{click:function(t){return e.prevPage()},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.prevPage()}}})]),e._v(" "),e._l(e.pages,(function(t){return s("li",{class:[e.pageClass,t.selected?e.activeClass:"",t.disabled?e.disabledClass:"",t.breakView?e.breakViewClass:""]},[t.breakView?s("a",{class:[e.pageLinkClass,e.breakViewLinkClass],attrs:{tabindex:"0"}},[e._t("breakViewContent",[e._v(e._s(e.breakViewText))])],2):t.disabled?s("a",{class:e.pageLinkClass,attrs:{tabindex:"0"}},[e._v(e._s(t.content))]):s("a",{class:e.pageLinkClass,attrs:{disabled:t.selected,tabindex:"0"},on:{click:function(s){return e.handlePageSelected(t.index+1)},keyup:function(s){return!s.type.indexOf("key")&&e._k(s.keyCode,"enter",13,s.key,"Enter")?null:e.handlePageSelected(t.index+1)}}},[e._v(e._s(t.content))])])})),e._v(" "),e.lastPageSelected()&&e.hidePrevNext?e._e():s("li",{class:[e.nextClass,e.lastPageSelected()?e.disabledClass:""]},[s("a",{class:e.nextLinkClass,attrs:{tabindex:e.lastPageSelected()?-1:0},domProps:{innerHTML:e._s(e.nextText)},on:{click:function(t){return e.nextPage()},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.nextPage()}}})]),e._v(" "),e.firstLastButton?s("li",{class:[e.pageClass,e.lastPageSelected()?e.disabledClass:""]},[s("a",{class:e.pageLinkClass,attrs:{tabindex:e.lastPageSelected()?-1:0},domProps:{innerHTML:e._s(e.lastButtonText)},on:{click:function(t){return e.selectLastPage()},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.selectLastPage()}}})]):e._e()],2)}),[],!1,null,null,null);t.a=a.exports},"./src/component/recipients.vue":function(e,t,s){"use strict";var i={mixins:[s("./src/helper/base_hepler.js").a],props:["recipients","id"],data:function(){return{first_name:"",email:"",observers:[],can_add:!1,saving_warning:!1,validate:{email:""}}},created:function(){this.observers=this.recipients},watch:{email:function(){if(this.validateEmail(this.email)){var e=!0,t=this;this.observers.forEach((function(s,i){if(s.email===t.email)return e=!1,void(t.validate.email=t.__("This email address is already in use"))})),this.can_add=e,!0===e&&(this.validate.email="")}else this.can_add=!1,this.validate.email=this.__("Invalid email address")},observers:function(){0===this.observers.length?this.saving_warning=!0:this.saving_warning=!1,void 0!==this.event&&this.$emit("update:recipients",this.observers)}},methods:{addRecipient:function(){this.observers.push({first_name:this.first_name,email:this.email}),SUI.closeModal(),this.first_name="",this.email=""},removeRecipient:function(e){this.observers.splice(e,1)},validateEmail:function(e){return/^(([^<>()\[\]\\.,;:\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(String(e).toLowerCase())}}},n=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),a=Object(n.a)(i,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{directives:[{name:"show",rawName:"v-show",value:e.saving_warning,expression:"saving_warning"}],staticClass:"sui-notice sui-notice-warning"},[s("div",{staticClass:"sui-notice-content"},[s("div",{staticClass:"sui-notice-message"},[s("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),e._v(" "),s("p",[e._v("\n "+e._s(e.__("You've removed all recipients. If you save without a recipient, we'll automatically turn off reports"))+"\n ")])])])]),e._v(" "),s("div",{staticClass:"sui-recipients"},[e._l(e.observers,(function(t,i){return s("div",{staticClass:"sui-recipient"},[s("span",{staticClass:"sui-recipient-name"},[e._v(e._s(t.first_name))]),e._v(" "),s("span",{staticClass:"sui-recipient-email"},[e._v(e._s(t.email))]),e._v(" "),s("button",{staticClass:"sui-button-icon",attrs:{type:"button"},on:{click:function(t){return e.removeRecipient(i)}}},[s("i",{staticClass:"sui-icon-trash",attrs:{"aria-hidden":"true"}})])])})),e._v(" "),s("button",{staticClass:"sui-button sui-button-ghost add-recipient",attrs:{"data-modal-open":e.id,"data-modal-mask":"true","data-esc-close":"true"}},[s("i",{staticClass:"sui-icon-plus",attrs:{"aria-hidden":"true"}}),e._v(" "+e._s(e.__("Add Recipient"))+"\n ")])],2),e._v(" "),s("div",{staticClass:"sui-modal sui-modal-md"},[s("div",{staticClass:"sui-modal-content",attrs:{role:"dialog",id:e.id,"aria-modal":"true","aria-labelledby":"Recipient dialog"}},[s("div",{staticClass:"sui-box",attrs:{role:"document"}},[s("div",{staticClass:"sui-box-header"},[s("h3",{staticClass:"sui-box-title"},[e._v("\n "+e._s(e.__("Add Recipient"))+"\n ")]),e._v(" "),e._m(0)]),e._v(" "),s("div",{staticClass:"sui-box-body"},[s("p",[e._v("\n "+e._s(e.__("Add as many recipients as you like, they will receive email reports as per the schedule you set."))+"\n ")]),e._v(" "),s("div",{staticClass:"sui-form-field"},[s("label",{staticClass:"sui-label"},[e._v(e._s(e.__("First name")))]),e._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:e.first_name,expression:"first_name"}],staticClass:"sui-form-control recipient_name",attrs:{type:"text"},domProps:{value:e.first_name},on:{input:function(t){t.target.composing||(e.first_name=t.target.value)}}})]),e._v(" "),s("div",{staticClass:"sui-form-field",class:{"sui-form-field-error":e.validate.email.length>0}},[s("label",{staticClass:"sui-label"},[e._v(e._s(e.__("Email")))]),e._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:e.email,expression:"email"}],staticClass:"sui-form-control recipient_email",attrs:{type:"text"},domProps:{value:e.email},on:{input:function(t){t.target.composing||(e.email=t.target.value)}}}),e._v(" "),s("span",{directives:[{name:"show",rawName:"v-show",value:e.validate.email.length>0,expression:"validate.email.length > 0"}],staticClass:"sui-error-message",domProps:{textContent:e._s(this.validate.email)}})])]),e._v(" "),s("div",{staticClass:"sui-box-footer"},[s("button",{staticClass:"sui-button sui-button-ghost",attrs:{type:"button","data-modal-close":""}},[e._v("\n "+e._s(e.__("Cancel"))+"\n ")]),e._v(" "),s("button",{staticClass:"sui-modal-close sui-button recipient_save",attrs:{type:"button",disabled:!1===e.can_add},on:{click:e.addRecipient}},[e._v(e._s(e.__("Add"))+"\n ")])])])])])])}),[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"sui-actions-right"},[t("button",{staticClass:"sui-button-icon",attrs:{type:"button","data-modal-close":"","aria-label":"Close this dialog window"}},[t("i",{staticClass:"sui-icon-close"})])])}],!1,null,null,null);t.a=a.exports},"./src/component/submit-button.vue":function(e,t,s){"use strict";var i={name:"submit-button",props:["id","state","text","css-class","type"],computed:{getClass:function(){return"sui-button "+this.cssClass}}},n=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),a=Object(n.a)(i,(function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("button",{staticClass:"sui-button",class:[e.getClass,{"sui-button-onload":e.state.on_saving}],attrs:{id:e.id,type:e.type,disabled:e.state.on_saving},on:{click:function(t){return e.$emit("click")}}},[s("span",{staticClass:"sui-loading-text"},[e._t("default")],2),e._v(" "),s("i",{staticClass:"sui-icon-loader sui-loading",attrs:{"aria-hidden":"true"}})])}),[],!1,null,null,null);t.a=a.exports},"./src/component/summary-box.vue":function(e,t,s){"use strict";var i={mixins:[s("./src/helper/base_hepler.js").a],props:["css-class"],name:"summary-box",data:function(){return{whitelabel:defender.whitelabel}},computed:{summary_class:function(){return{"sui-unbranded":!0===this.whitelabel.hide_branding&&0===this.whitelabel.hero_image.length,"sui-rebranded":!0===this.whitelabel.hide_branding&&this.whitelabel.hero_image.length>0}},css_class:function(){return this.cssClass},rebrand_img:function(){if(this.whitelabel.hero_image.length>0)return{"background-image":"url('"+this.whitelabel.hero_image+"')"}}}},n=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),a=Object(n.a)(i,(function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"sui-box sui-summary",class:[this.summary_class,this.css_class],style:this.rebrand_img},[t("div",{staticClass:"sui-summary-image-space",attrs:{"aria-hidden":"true"}}),this._v(" "),this._t("default")],2)}),[],!1,null,null,null);t.a=a.exports},"./src/helper/base_hepler.js":function(e,t,s){"use strict";var i=s("./node_modules/xss/lib/index.js"),n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var s=[],i=!0,n=!1,a=void 0;try{for(var r,o=e[Symbol.iterator]();!(i=(r=o.next()).done)&&(s.push(r.value),!t||s.length!==t);i=!0);}catch(e){n=!0,a=e}finally{try{!i&&o.return&&o.return()}finally{if(n)throw a}}return s}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},a=wp.i18n,r={whiteList:{a:["href","title","target"],span:["class"],strong:["*"]},safeAttrValue:function(e,t,s,n){return"a"===e&&"href"===t&&"%s"===s?"%s":Object(i.safeAttrValue)(e,t,s,n)}},o=new i.FilterXSS(r),l=[];t.a={methods:{__:function(e){var t=a.__(e,"wpdef");return o.process(t)},xss:function(e){return o.process(e)},vsprintf:function(e){return a.sprintf.apply(null,arguments)},siteUrl:function(e){return void 0!==e?defender.site_url+e:defender.site_url},adminUrl:function(e){return void 0!==e?defender.admin_url+e:defender.admin_url},assetUrl:function(e){return defender.defender_url+e},maybeHighContrast:function(){return{"sui-color-accessible":!0===defender.misc.high_contrast}},maybeHideBranding:function(){return defender.whitelabel.hide_branding},isWhitelabelEnabled:function(){return defender.whitelabel.enabled},campaign_url:function(e){return"https://premium.wpmudev.org/project/wp-defender/?utm_source=defender&utm_medium=plugin&utm_campaign="+e},campaignUrl:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"https://premium.wpmudev.org/"+e+"?utm_source=defender&utm_medium=plugin&utm_campaign="+t},httpRequest:function(e,t,s,i,n){var a=this;void 0===n&&(this.state.on_saving=!0);var r=ajaxurl+"?action="+this.endpoints[t]+"&_wpnonce="+this.nonces[t],o=jQuery.ajax({url:r,method:e,data:s,success:function(e){var t=e.data;a.state.on_saving=!1,void 0!==t&&void 0!==t.message&&(e.success?Defender.showNotification("success",t.message):Defender.showNotification("error",t.message)),void 0!==i&&i(e)}});l.push(o)},httpGetRequest:function(e,t,s,i){this.httpRequest("get",e,t,s,i)},httpPostRequest:function(e,t,s,i){this.httpRequest("post",e,t,s,i)},abortAllRequests:function(){for(var e=0;e<l.length;e++)l[e].abort()},getQueryStringParams:function(e){return e?(/^[?#]/.test(e)?e.slice(1):e).split("&").reduce((function(e,t){var s=t.split("="),i=n(s,2),a=i[0],r=i[1];return e[a]=r?decodeURIComponent(r.replace(/\+/g," ")):"",e}),{}):{}},rebindSUI:function(){jQuery("select:not([multiple])").each((function(){SUI.suiSelect(this)})),jQuery(".sui-accordion").each((function(){SUI.suiAccordion(this)})),SUI.modalDialog()}}}},vue:function(e,t){e.exports=Vue}});
|
assets/app/dashboard.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(t){var s=window.webpackHotUpdate;window.webpackHotUpdate=function(t,e){!function(t,s){if(!C[t]||!y[t])return;for(var e in y[t]=!1,s)Object.prototype.hasOwnProperty.call(s,e)&&(h[e]=s[e]);0==--m&&0===g&&A()}(t,e),s&&s(t,e)};var e,i=!0,a="b39acf366faa9b224a1a",n={},o=[],r=[];function l(t){var s=j[t];if(!s)return E;var i=function(i){return s.hot.active?(j[i]?-1===j[i].parents.indexOf(t)&&j[i].parents.push(t):(o=[t],e=i),-1===s.children.indexOf(i)&&s.children.push(i)):(console.warn("[HMR] unexpected require("+i+") from disposed module "+t),o=[]),E(i)},a=function(t){return{configurable:!0,enumerable:!0,get:function(){return E[t]},set:function(s){E[t]=s}}};for(var n in E)Object.prototype.hasOwnProperty.call(E,n)&&"e"!==n&&"t"!==n&&Object.defineProperty(i,n,a(n));return i.e=function(t){return"ready"===d&&_("prepare"),g++,E.e(t).then(s,(function(t){throw s(),t}));function s(){g--,"prepare"===d&&(b[t]||x(t),0===g&&0===m&&A())}},i.t=function(t,s){return 1&s&&(t=i(t)),E.t(t,-2&s)},i}function c(s){var i={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:e!==s,active:!0,accept:function(t,s){if(void 0===t)i._selfAccepted=!0;else if("function"==typeof t)i._selfAccepted=t;else if("object"==typeof t)for(var e=0;e<t.length;e++)i._acceptedDependencies[t[e]]=s||function(){};else i._acceptedDependencies[t]=s||function(){}},decline:function(t){if(void 0===t)i._selfDeclined=!0;else if("object"==typeof t)for(var s=0;s<t.length;s++)i._declinedDependencies[t[s]]=!0;else i._declinedDependencies[t]=!0},dispose:function(t){i._disposeHandlers.push(t)},addDisposeHandler:function(t){i._disposeHandlers.push(t)},removeDisposeHandler:function(t){var s=i._disposeHandlers.indexOf(t);s>=0&&i._disposeHandlers.splice(s,1)},invalidate:function(){switch(this._selfInvalidated=!0,d){case"idle":(h={})[s]=t[s],_("ready");break;case"ready":P(s);break;case"prepare":case"check":case"dispose":case"apply":(f=f||[]).push(s)}},check:k,apply:S,status:function(t){if(!t)return d;u.push(t)},addStatusHandler:function(t){u.push(t)},removeStatusHandler:function(t){var s=u.indexOf(t);s>=0&&u.splice(s,1)},data:n[s]};return e=void 0,i}var u=[],d="idle";function _(t){d=t;for(var s=0;s<u.length;s++)u[s].call(null,t)}var p,h,v,f,m=0,g=0,b={},y={},C={};function w(t){return+t+""===t?+t:t}function k(t){if("idle"!==d)throw new Error("check() is only allowed in idle status");return i=t,_("check"),(s=1e4,s=s||1e4,new Promise((function(t,e){if("undefined"==typeof XMLHttpRequest)return e(new Error("No browser support"));try{var i=new XMLHttpRequest,n=E.p+""+a+".hot-update.json";i.open("GET",n,!0),i.timeout=s,i.send(null)}catch(t){return e(t)}i.onreadystatechange=function(){if(4===i.readyState)if(0===i.status)e(new Error("Manifest request to "+n+" timed out."));else if(404===i.status)t();else if(200!==i.status&&304!==i.status)e(new Error("Manifest request to "+n+" failed."));else{try{var s=JSON.parse(i.responseText)}catch(t){return void e(t)}t(s)}}}))).then((function(t){if(!t)return _(T()?"ready":"idle"),null;y={},b={},C=t.c,v=t.h,_("prepare");var s=new Promise((function(t,s){p={resolve:t,reject:s}}));h={};return x(2),"prepare"===d&&0===g&&0===m&&A(),s}));var s}function x(t){C[t]?(y[t]=!0,m++,function(t){var s=document.createElement("script");s.charset="utf-8",s.src=E.p+""+t+"."+a+".hot-update.js",document.head.appendChild(s)}(t)):b[t]=!0}function A(){_("ready");var t=p;if(p=null,t)if(i)Promise.resolve().then((function(){return S(i)})).then((function(s){t.resolve(s)}),(function(s){t.reject(s)}));else{var s=[];for(var e in h)Object.prototype.hasOwnProperty.call(h,e)&&s.push(w(e));t.resolve(s)}}function S(s){if("ready"!==d)throw new Error("apply() is only allowed in ready status");return function s(i){var r,l,c,u,d;function p(t){for(var s=[t],e={},i=s.map((function(t){return{chain:[t],id:t}}));i.length>0;){var a=i.pop(),n=a.id,o=a.chain;if((u=j[n])&&(!u.hot._selfAccepted||u.hot._selfInvalidated)){if(u.hot._selfDeclined)return{type:"self-declined",chain:o,moduleId:n};if(u.hot._main)return{type:"unaccepted",chain:o,moduleId:n};for(var r=0;r<u.parents.length;r++){var l=u.parents[r],c=j[l];if(c){if(c.hot._declinedDependencies[n])return{type:"declined",chain:o.concat([l]),moduleId:n,parentId:l};-1===s.indexOf(l)&&(c.hot._acceptedDependencies[n]?(e[l]||(e[l]=[]),m(e[l],[n])):(delete e[l],s.push(l),i.push({chain:o.concat([l]),id:l})))}}}}return{type:"accepted",moduleId:t,outdatedModules:s,outdatedDependencies:e}}function m(t,s){for(var e=0;e<s.length;e++){var i=s[e];-1===t.indexOf(i)&&t.push(i)}}T();var g={},b=[],y={},k=function(){console.warn("[HMR] unexpected require("+A.moduleId+") to disposed module")};for(var x in h)if(Object.prototype.hasOwnProperty.call(h,x)){var A;d=w(x),A=h[x]?p(d):{type:"disposed",moduleId:x};var S=!1,P=!1,I=!1,O="";switch(A.chain&&(O="\nUpdate propagation: "+A.chain.join(" -> ")),A.type){case"self-declined":i.onDeclined&&i.onDeclined(A),i.ignoreDeclined||(S=new Error("Aborted because of self decline: "+A.moduleId+O));break;case"declined":i.onDeclined&&i.onDeclined(A),i.ignoreDeclined||(S=new Error("Aborted because of declined dependency: "+A.moduleId+" in "+A.parentId+O));break;case"unaccepted":i.onUnaccepted&&i.onUnaccepted(A),i.ignoreUnaccepted||(S=new Error("Aborted because "+d+" is not accepted"+O));break;case"accepted":i.onAccepted&&i.onAccepted(A),P=!0;break;case"disposed":i.onDisposed&&i.onDisposed(A),I=!0;break;default:throw new Error("Unexception type "+A.type)}if(S)return _("abort"),Promise.reject(S);if(P)for(d in y[d]=h[d],m(b,A.outdatedModules),A.outdatedDependencies)Object.prototype.hasOwnProperty.call(A.outdatedDependencies,d)&&(g[d]||(g[d]=[]),m(g[d],A.outdatedDependencies[d]));I&&(m(b,[A.moduleId]),y[d]=k)}var $,D=[];for(l=0;l<b.length;l++)d=b[l],j[d]&&j[d].hot._selfAccepted&&y[d]!==k&&!j[d].hot._selfInvalidated&&D.push({module:d,parents:j[d].parents.slice(),errorHandler:j[d].hot._selfAccepted});_("dispose"),Object.keys(C).forEach((function(t){!1===C[t]&&function(t){delete installedChunks[t]}(t)}));var W,q,R=b.slice();for(;R.length>0;)if(d=R.pop(),u=j[d]){var M={},L=u.hot._disposeHandlers;for(c=0;c<L.length;c++)(r=L[c])(M);for(n[d]=M,u.hot.active=!1,delete j[d],delete g[d],c=0;c<u.children.length;c++){var U=j[u.children[c]];U&&(($=U.parents.indexOf(d))>=0&&U.parents.splice($,1))}}for(d in g)if(Object.prototype.hasOwnProperty.call(g,d)&&(u=j[d]))for(q=g[d],c=0;c<q.length;c++)W=q[c],($=u.children.indexOf(W))>=0&&u.children.splice($,1);_("apply"),void 0!==v&&(a=v,v=void 0);for(d in h=void 0,y)Object.prototype.hasOwnProperty.call(y,d)&&(t[d]=y[d]);var F=null;for(d in g)if(Object.prototype.hasOwnProperty.call(g,d)&&(u=j[d])){q=g[d];var H=[];for(l=0;l<q.length;l++)if(W=q[l],r=u.hot._acceptedDependencies[W]){if(-1!==H.indexOf(r))continue;H.push(r)}for(l=0;l<H.length;l++){r=H[l];try{r(q)}catch(t){i.onErrored&&i.onErrored({type:"accept-errored",moduleId:d,dependencyId:q[l],error:t}),i.ignoreErrored||F||(F=t)}}}for(l=0;l<D.length;l++){var z=D[l];d=z.module,o=z.parents,e=d;try{E(d)}catch(t){if("function"==typeof z.errorHandler)try{z.errorHandler(t)}catch(s){i.onErrored&&i.onErrored({type:"self-accept-error-handler-errored",moduleId:d,error:s,originalError:t}),i.ignoreErrored||F||(F=s),F||(F=t)}else i.onErrored&&i.onErrored({type:"self-accept-errored",moduleId:d,error:t}),i.ignoreErrored||F||(F=t)}}if(F)return _("fail"),Promise.reject(F);if(f)return s(i).then((function(t){return b.forEach((function(s){t.indexOf(s)<0&&t.push(s)})),t}));return _("idle"),new Promise((function(t){t(b)}))}(s=s||{})}function T(){if(f)return h||(h={}),f.forEach(P),f=void 0,!0}function P(s){Object.prototype.hasOwnProperty.call(h,s)||(h[s]=t[s])}var j={};function E(s){if(j[s])return j[s].exports;var e=j[s]={i:s,l:!1,exports:{},hot:c(s),parents:(r=o,o=[],r),children:[]};return t[s].call(e.exports,e,e.exports,l(s)),e.l=!0,e.exports}E.m=t,E.c=j,E.d=function(t,s,e){E.o(t,s)||Object.defineProperty(t,s,{enumerable:!0,get:e})},E.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},E.t=function(t,s){if(1&s&&(t=E(t)),8&s)return t;if(4&s&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(E.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&s&&"string"!=typeof t)for(var i in t)E.d(e,i,function(s){return t[s]}.bind(null,i));return e},E.n=function(t){var s=t&&t.__esModule?function(){return t.default}:function(){return t};return E.d(s,"a",s),s},E.o=function(t,s){return Object.prototype.hasOwnProperty.call(t,s)},E.p="",E.h=function(){return a},l("./src/dashboard.js")(E.s="./src/dashboard.js")}({"./node_modules/cssfilter/lib/css.js":function(t,s,e){var i=e("./node_modules/cssfilter/lib/default.js"),a=e("./node_modules/cssfilter/lib/parser.js");e("./node_modules/cssfilter/lib/util.js");function n(t){return null==t}function o(t){(t=function(t){var s={};for(var e in t)s[e]=t[e];return s}(t||{})).whiteList=t.whiteList||i.whiteList,t.onAttr=t.onAttr||i.onAttr,t.onIgnoreAttr=t.onIgnoreAttr||i.onIgnoreAttr,t.safeAttrValue=t.safeAttrValue||i.safeAttrValue,this.options=t}o.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var s=this.options,e=s.whiteList,i=s.onAttr,o=s.onIgnoreAttr,r=s.safeAttrValue;return a(t,(function(t,s,a,l,c){var u=e[a],d=!1;if(!0===u?d=u:"function"==typeof u?d=u(l):u instanceof RegExp&&(d=u.test(l)),!0!==d&&(d=!1),l=r(a,l)){var _,p={position:s,sourcePosition:t,source:c,isWhite:d};return d?n(_=i(a,l,p))?a+":"+l:_:n(_=o(a,l,p))?void 0:_}}))},t.exports=o},"./node_modules/cssfilter/lib/default.js":function(t,s){function e(){var t={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return t}var i=/javascript\s*\:/gim;s.whiteList=e(),s.getDefaultWhiteList=e,s.onAttr=function(t,s,e){},s.onIgnoreAttr=function(t,s,e){},s.safeAttrValue=function(t,s){return i.test(s)?"":s}},"./node_modules/cssfilter/lib/index.js":function(t,s,e){var i=e("./node_modules/cssfilter/lib/default.js"),a=e("./node_modules/cssfilter/lib/css.js");for(var n in(s=t.exports=function(t,s){return new a(s).process(t)}).FilterCSS=a,i)s[n]=i[n];"undefined"!=typeof window&&(window.filterCSS=t.exports)},"./node_modules/cssfilter/lib/parser.js":function(t,s,e){var i=e("./node_modules/cssfilter/lib/util.js");t.exports=function(t,s){";"!==(t=i.trimRight(t))[t.length-1]&&(t+=";");var e=t.length,a=!1,n=0,o=0,r="";function l(){if(!a){var e=i.trim(t.slice(n,o)),l=e.indexOf(":");if(-1!==l){var c=i.trim(e.slice(0,l)),u=i.trim(e.slice(l+1));if(c){var d=s(n,r.length,c,u,e);d&&(r+=d+"; ")}}}n=o+1}for(;o<e;o++){var c=t[o];if("/"===c&&"*"===t[o+1]){var u=t.indexOf("*/",o+2);if(-1===u)break;n=(o=u+1)+1,a=!1}else"("===c?a=!0:")"===c?a=!1:";"===c?a||l():"\n"===c&&l()}return i.trim(r)}},"./node_modules/cssfilter/lib/util.js":function(t,s){t.exports={indexOf:function(t,s){var e,i;if(Array.prototype.indexOf)return t.indexOf(s);for(e=0,i=t.length;e<i;e++)if(t[e]===s)return e;return-1},forEach:function(t,s,e){var i,a;if(Array.prototype.forEach)return t.forEach(s,e);for(i=0,a=t.length;i<a;i++)s.call(e,t[i],i,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(t){return String.prototype.trimRight?t.trimRight():t.replace(/(\s*$)/g,"")}}},"./node_modules/vue-loader/lib/runtime/componentNormalizer.js":function(t,s,e){"use strict";function i(t,s,e,i,a,n,o,r){var l,c="function"==typeof t?t.options:t;if(s&&(c.render=s,c.staticRenderFns=e,c._compiled=!0),i&&(c.functional=!0),n&&(c._scopeId="data-v-"+n),o?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),a&&a.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},c._ssrRegister=l):a&&(l=r?function(){a.call(this,this.$root.$options.shadowRoot)}:a),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,s){return l.call(s),u(t,s)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}e.d(s,"a",(function(){return i}))},"./node_modules/xss/lib/default.js":function(t,s,e){var i=e("./node_modules/cssfilter/lib/index.js").FilterCSS,a=e("./node_modules/cssfilter/lib/index.js").getDefaultWhiteList,n=e("./node_modules/xss/lib/util.js");function o(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]}}var r=new i;function l(t){return t.replace(c,"<").replace(u,">")}var c=/</g,u=/>/g,d=/"/g,_=/"/g,p=/&#([a-zA-Z0-9]*);?/gim,h=/:?/gim,v=/&newline;?/gim,f=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,m=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,g=/u\s*r\s*l\s*\(.*/gi;function b(t){return t.replace(d,""")}function y(t){return t.replace(_,'"')}function C(t){return t.replace(p,(function(t,s){return"x"===s[0]||"X"===s[0]?String.fromCharCode(parseInt(s.substr(1),16)):String.fromCharCode(parseInt(s,10))}))}function w(t){return t.replace(h,":").replace(v," ")}function k(t){for(var s="",e=0,i=t.length;e<i;e++)s+=t.charCodeAt(e)<32?" ":t.charAt(e);return n.trim(s)}function x(t){return t=k(t=w(t=C(t=y(t))))}function A(t){return t=l(t=b(t))}var S=/<!--[\s\S]*?-->/g;s.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]},s.getDefaultWhiteList=o,s.onTag=function(t,s,e){},s.onIgnoreTag=function(t,s,e){},s.onTagAttr=function(t,s,e){},s.onIgnoreTagAttr=function(t,s,e){},s.safeAttrValue=function(t,s,e,i){if(e=x(e),"href"===s||"src"===s){if("#"===(e=n.trim(e)))return"#";if("http://"!==e.substr(0,7)&&"https://"!==e.substr(0,8)&&"mailto:"!==e.substr(0,7)&&"tel:"!==e.substr(0,4)&&"#"!==e[0]&&"/"!==e[0])return""}else if("background"===s){if(f.lastIndex=0,f.test(e))return""}else if("style"===s){if(m.lastIndex=0,m.test(e))return"";if(g.lastIndex=0,g.test(e)&&(f.lastIndex=0,f.test(e)))return"";!1!==i&&(e=(i=i||r).process(e))}return e=A(e)},s.escapeHtml=l,s.escapeQuote=b,s.unescapeQuote=y,s.escapeHtmlEntities=C,s.escapeDangerHtml5Entities=w,s.clearNonPrintableCharacter=k,s.friendlyAttrValue=x,s.escapeAttrValue=A,s.onIgnoreTagStripAll=function(){return""},s.StripTagBody=function(t,s){"function"!=typeof s&&(s=function(){});var e=!Array.isArray(t),i=[],a=!1;return{onIgnoreTag:function(o,r,l){if(function(s){return!!e||-1!==n.indexOf(t,s)}(o)){if(l.isClosing){var c="[/removed]",u=l.position+c.length;return i.push([!1!==a?a:l.position,u]),a=!1,c}return a||(a=l.position),"[removed]"}return s(o,r,l)},remove:function(t){var s="",e=0;return n.forEach(i,(function(i){s+=t.slice(e,i[0]),e=i[1]})),s+=t.slice(e)}}},s.stripCommentTag=function(t){return t.replace(S,"")},s.stripBlankChar=function(t){var s=t.split("");return(s=s.filter((function(t){var s=t.charCodeAt(0);return 127!==s&&(!(s<=31)||(10===s||13===s))}))).join("")},s.cssFilter=r,s.getDefaultCSSWhiteList=a},"./node_modules/xss/lib/index.js":function(t,s,e){var i=e("./node_modules/xss/lib/default.js"),a=e("./node_modules/xss/lib/parser.js"),n=e("./node_modules/xss/lib/xss.js");function o(t,s){return new n(s).process(t)}for(var r in(s=t.exports=o).filterXSS=o,s.FilterXSS=n,i)s[r]=i[r];for(var r in a)s[r]=a[r];"undefined"!=typeof window&&(window.filterXSS=t.exports),"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=t.exports)},"./node_modules/xss/lib/parser.js":function(t,s,e){var i=e("./node_modules/xss/lib/util.js");function a(t){var s=i.spaceIndex(t);if(-1===s)var e=t.slice(1,-1);else e=t.slice(1,s+1);return"/"===(e=i.trim(e).toLowerCase()).slice(0,1)&&(e=e.slice(1)),"/"===e.slice(-1)&&(e=e.slice(0,-1)),e}function n(t){return"</"===t.slice(0,2)}var o=/[^a-zA-Z0-9_:\.\-]/gim;function r(t,s){for(;s<t.length;s++){var e=t[s];if(" "!==e)return"="===e?s:-1}}function l(t,s){for(;s>0;s--){var e=t[s];if(" "!==e)return"="===e?s:-1}}function c(t){return function(t){return'"'===t[0]&&'"'===t[t.length-1]||"'"===t[0]&&"'"===t[t.length-1]}(t)?t.substr(1,t.length-2):t}s.parseTag=function(t,s,e){var i="",o=0,r=!1,l=!1,c=0,u=t.length,d="",_="";for(c=0;c<u;c++){var p=t.charAt(c);if(!1===r){if("<"===p){r=c;continue}}else if(!1===l){if("<"===p){i+=e(t.slice(o,c)),r=c,o=c;continue}if(">"===p){i+=e(t.slice(o,r)),d=a(_=t.slice(r,c+1)),i+=s(r,i.length,d,_,n(_)),o=c+1,r=!1;continue}if(('"'===p||"'"===p)&&"="===t.charAt(c-1)){l=p;continue}}else if(p===l){l=!1;continue}}return o<t.length&&(i+=e(t.substr(o))),i},s.parseAttr=function(t,s){var e=0,a=[],n=!1,u=t.length;function d(t,e){if(!((t=(t=i.trim(t)).replace(o,"").toLowerCase()).length<1)){var n=s(t,e||"");n&&a.push(n)}}for(var _=0;_<u;_++){var p,h=t.charAt(_);if(!1!==n||"="!==h)if(!1===n||_!==e||'"'!==h&&"'"!==h||"="!==t.charAt(_-1))if(/\s|\n|\t/.test(h)){if(t=t.replace(/\s|\n|\t/g," "),!1===n){if(-1===(p=r(t,_))){d(i.trim(t.slice(e,_))),n=!1,e=_+1;continue}_=p-1;continue}if(-1===(p=l(t,_-1))){d(n,c(i.trim(t.slice(e,_)))),n=!1,e=_+1;continue}}else;else{if(-1===(p=t.indexOf(h,_+1)))break;d(n,i.trim(t.slice(e+1,p))),n=!1,e=(_=p)+1}else n=t.slice(e,_),e=_+1}return e<t.length&&(!1===n?d(t.slice(e)):d(n,c(i.trim(t.slice(e))))),i.trim(a.join(" "))}},"./node_modules/xss/lib/util.js":function(t,s){t.exports={indexOf:function(t,s){var e,i;if(Array.prototype.indexOf)return t.indexOf(s);for(e=0,i=t.length;e<i;e++)if(t[e]===s)return e;return-1},forEach:function(t,s,e){var i,a;if(Array.prototype.forEach)return t.forEach(s,e);for(i=0,a=t.length;i<a;i++)s.call(e,t[i],i,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(t){var s=/\s|\n|\t/.exec(t);return s?s.index:-1}}},"./node_modules/xss/lib/xss.js":function(t,s,e){var i=e("./node_modules/cssfilter/lib/index.js").FilterCSS,a=e("./node_modules/xss/lib/default.js"),n=e("./node_modules/xss/lib/parser.js"),o=n.parseTag,r=n.parseAttr,l=e("./node_modules/xss/lib/util.js");function c(t){return null==t}function u(t){(t=function(t){var s={};for(var e in t)s[e]=t[e];return s}(t||{})).stripIgnoreTag&&(t.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),t.onIgnoreTag=a.onIgnoreTagStripAll),t.whiteList=t.whiteList||a.whiteList,t.onTag=t.onTag||a.onTag,t.onTagAttr=t.onTagAttr||a.onTagAttr,t.onIgnoreTag=t.onIgnoreTag||a.onIgnoreTag,t.onIgnoreTagAttr=t.onIgnoreTagAttr||a.onIgnoreTagAttr,t.safeAttrValue=t.safeAttrValue||a.safeAttrValue,t.escapeHtml=t.escapeHtml||a.escapeHtml,this.options=t,!1===t.css?this.cssFilter=!1:(t.css=t.css||{},this.cssFilter=new i(t.css))}u.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var s=this.options,e=s.whiteList,i=s.onTag,n=s.onIgnoreTag,u=s.onTagAttr,d=s.onIgnoreTagAttr,_=s.safeAttrValue,p=s.escapeHtml,h=this.cssFilter;s.stripBlankChar&&(t=a.stripBlankChar(t)),s.allowCommentTag||(t=a.stripCommentTag(t));var v=!1;if(s.stripIgnoreTagBody){v=a.StripTagBody(s.stripIgnoreTagBody,n);n=v.onIgnoreTag}var f=o(t,(function(t,s,a,o,v){var f,m={sourcePosition:t,position:s,isClosing:v,isWhite:e.hasOwnProperty(a)};if(!c(f=i(a,o,m)))return f;if(m.isWhite){if(m.isClosing)return"</"+a+">";var g=function(t){var s=l.spaceIndex(t);if(-1===s)return{html:"",closing:"/"===t[t.length-2]};var e="/"===(t=l.trim(t.slice(s+1,-1)))[t.length-1];return e&&(t=l.trim(t.slice(0,-1))),{html:t,closing:e}}(o),b=e[a],y=r(g.html,(function(t,s){var e,i=-1!==l.indexOf(b,t);return c(e=u(a,t,s,i))?i?(s=_(a,t,s,h))?t+'="'+s+'"':t:c(e=d(a,t,s,i))?void 0:e:e}));o="<"+a;return y&&(o+=" "+y),g.closing&&(o+=" /"),o+=">"}return c(f=n(a,o,m))?p(o):f}),p);return v&&(f=v.remove(f)),f},t.exports=u},"./src/component/doc-link.vue":function(t,s,e){"use strict";var i={mixins:[e("./src/helper/base_hepler.js").a],name:"doc-link",props:["link"],data:function(){return{whitelabel:defender.whitelabel}}},a=e("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),n=Object(a.a)(i,(function(){var t=this.$createElement,s=this._self._c||t;return!1===this.whitelabel.hide_doc_link?s("div",{staticClass:"sui-actions-right"},[s("a",{staticClass:"sui-button sui-button-ghost",attrs:{href:this.link,target:"_blank"}},[s("i",{staticClass:"sui-icon-academy"}),this._v(" "+this._s(this.__("View Documentation"))+"\n ")])]):this._e()}),[],!1,null,null,null);s.a=n.exports},"./src/component/footer.vue":function(t,s,e){"use strict";var i={data:function(){return{whitelabel:defender.whitelabel,is_free:parseInt(defender.is_free)}}},a=e("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),n=Object(a.a)(i,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[!0===t.whitelabel.change_footer?e("div",{staticClass:"sui-footer"},[t._v("\n "+t._s(t.whitelabel.footer_text)+"\n ")]):e("div",{staticClass:"sui-footer"},[t._v("Made with "),e("i",{staticClass:"sui-icon-heart"}),t._v(" by WPMU DEV")]),t._v(" "),!1===t.whitelabel.hide_doc_link?e("div",[1===t.is_free?e("ul",{staticClass:"sui-footer-nav"},[t._m(0),t._v(" "),t._m(1),t._v(" "),t._m(2),t._v(" "),t._m(3),t._v(" "),t._m(4),t._v(" "),t._m(5),t._v(" "),t._m(6),t._v(" "),t._m(7)]):e("ul",{staticClass:"sui-footer-nav"},[t._m(8),t._v(" "),t._m(9),t._v(" "),t._m(10),t._v(" "),t._m(11),t._v(" "),t._m(12),t._v(" "),t._m(13),t._v(" "),t._m(14),t._v(" "),t._m(15)]),t._v(" "),t._m(16)]):t._e()])}),[function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://profiles.wordpress.org/wpmudev#content-plugins",target:"_blank"}},[this._v("Free\n Plugins")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://premium.wpmudev.org/features/",target:"_blank"}},[this._v("Membership")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://premium.wpmudev.org/roadmap/",target:"_blank"}},[this._v("Roadmap")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://wordpress.org/support/plugin/plugin-name",target:"_blank"}},[this._v("Support")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://premium.wpmudev.org/docs/",target:"_blank"}},[this._v("Docs")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://premium.wpmudev.org/hub/",target:"_blank"}},[this._v("The Hub")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://premium.wpmudev.org/terms-of-service/",target:"_blank"}},[this._v("Terms of Service")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://incsub.com/privacy-policy/",target:"_blank"}},[this._v("Privacy Policy")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://premium.wpmudev.org/hub/",target:"_blank"}},[this._v("The Hub")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://premium.wpmudev.org/projects/category/plugins/",target:"_blank"}},[this._v("Plugins")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://premium.wpmudev.org/roadmap/",target:"_blank"}},[this._v("Roadmap")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://premium.wpmudev.org/hub/support/",target:"_blank"}},[this._v("Support")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://premium.wpmudev.org/docs/",target:"_blank"}},[this._v("Docs")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://premium.wpmudev.org/hub/community/",target:"_blank"}},[this._v("Community")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://premium.wpmudev.org/terms-of-service/",target:"_blank"}},[this._v("Terms of Service")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://incsub.com/privacy-policy/",target:"_blank"}},[this._v("Privacy Policy")])])},function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("ul",{staticClass:"sui-footer-social"},[e("li",[e("a",{attrs:{href:"https://www.facebook.com/wpmudev",target:"_blank"}},[e("i",{staticClass:"sui-icon-social-facebook",attrs:{"aria-hidden":"true"}}),t._v(" "),e("span",{staticClass:"sui-screen-reader-text"},[t._v("Facebook")])])]),t._v(" "),e("li",[e("a",{attrs:{href:"https://twitter.com/wpmudev",target:"_blank"}},[e("i",{staticClass:"sui-icon-social-twitter",attrs:{"aria-hidden":"true"}})]),t._v(" "),e("span",{staticClass:"sui-screen-reader-text"},[t._v("Twitter")])]),t._v(" "),e("li",[e("a",{attrs:{href:"https://www.instagram.com/wpmu_dev/",target:"_blank"}},[e("i",{staticClass:"sui-icon-instagram",attrs:{"aria-hidden":"true"}}),t._v(" "),e("span",{staticClass:"sui-screen-reader-text"},[t._v("Instagram")])])])])}],!1,null,null,null);s.a=n.exports},"./src/component/overlay.vue":function(t,s,e){"use strict";var i={name:"overlay"},a=e("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),n=Object(a.a)(i,(function(){var t=this.$createElement;this._self._c;return this._m(0)}),[function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"wd-overlay"},[s("i",{staticClass:"sui-icon-loader sui-loading",attrs:{"aria-hidden":"true"}})])}],!1,null,null,null);s.a=n.exports},"./src/component/submit-button.vue":function(t,s,e){"use strict";var i={name:"submit-button",props:["id","state","text","css-class","type"],computed:{getClass:function(){return"sui-button "+this.cssClass}}},a=e("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),n=Object(a.a)(i,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("button",{staticClass:"sui-button",class:[t.getClass,{"sui-button-onload":t.state.on_saving}],attrs:{id:t.id,type:t.type,disabled:t.state.on_saving},on:{click:function(s){return t.$emit("click")}}},[e("span",{staticClass:"sui-loading-text"},[t._t("default")],2),t._v(" "),e("i",{staticClass:"sui-icon-loader sui-loading",attrs:{"aria-hidden":"true"}})])}),[],!1,null,null,null);s.a=n.exports},"./src/component/summary-box.vue":function(t,s,e){"use strict";var i={mixins:[e("./src/helper/base_hepler.js").a],props:["css-class"],name:"summary-box",data:function(){return{whitelabel:defender.whitelabel}},computed:{summary_class:function(){return{"sui-unbranded":!0===this.whitelabel.hide_branding&&0===this.whitelabel.hero_image.length,"sui-rebranded":!0===this.whitelabel.hide_branding&&this.whitelabel.hero_image.length>0}},css_class:function(){return this.cssClass},rebrand_img:function(){if(this.whitelabel.hero_image.length>0)return{"background-image":"url('"+this.whitelabel.hero_image+"')"}}}},a=e("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),n=Object(a.a)(i,(function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"sui-box sui-summary",class:[this.summary_class,this.css_class],style:this.rebrand_img},[s("div",{staticClass:"sui-summary-image-space",attrs:{"aria-hidden":"true"}}),this._v(" "),this._t("default")],2)}),[],!1,null,null,null);s.a=n.exports},"./src/dashboard.js":function(t,s,e){"use strict";e.r(s);var i=e("vue"),a=e.n(i),n=e("./src/helper/base_hepler.js"),o={mixins:[n.a],name:"security-tweaks",data:function(){return{rules:dashboard.security_tweaks.rules,count:dashboard.security_tweaks.count.issues}},methods:{handleRedirect:function(t){window.location.href=this.adminUrl("admin.php?page=wdf-hardener#"+t.slug)}}},r=e("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),l=Object(r.a)(o,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box hardener-widget"},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("i",{staticClass:"sui-icon-wrench-tool",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("Security Tweaks"))+"\n ")]),t._v(" "),t.count>0?e("div",{staticClass:"sui-actions-left"},[e("div",{staticClass:"sui-tag sui-tag-warning",domProps:{textContent:t._s(t.count)}})]):t._e()]),t._v(" "),e("div",{staticClass:"sui-box-body"},[e("p",[t._v("\n "+t._s(t.__("Defender checks for basic security tweaks you can make to enhance your website’s defense against hackers and bots."))+"\n ")]),t._v(" "),0===t.count?e("div",{staticClass:"sui-notice sui-notice-success"},[e("p",[t._v("\n "+t._s(t.__("You’ve actioned all of the recommended security tweaks."))+"\n ")])]):t._e()]),t._v(" "),t.count>0?e("div",{staticClass:"sui-accordion sui-accordion-flushed no-border-bottom"},t._l(t.rules,(function(s){return e("div",{staticClass:"sui-accordion-item sui-warning",on:{click:function(e){return t.handleRedirect(s)}}},[e("div",{staticClass:"sui-accordion-item-header"},[e("div",{staticClass:"sui-accordion-item-title"},[e("i",{staticClass:"sui-icon-warning-alert sui-warning",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(s.title)+"\n "),t._m(0,!0)])])])})),0):t._e(),t._v(" "),e("div",{staticClass:"sui-box-footer"},[e("div",{staticClass:"sui-actions-left"},[e("a",{staticClass:"sui-button sui-button-ghost",attrs:{href:t.adminUrl("admin.php?page=wdf-hardener")}},[e("i",{staticClass:"sui-icon-eye",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("View All"))+"\n ")])])])])}),[function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"sui-actions-right"},[s("i",{staticClass:"sui-icon-chevron-right",attrs:{"aria-hidden":"true"}})])}],!1,null,null,null).exports,c={mixins:[n.a],name:"file-scanning",data:function(){return{scan:dashboard.scan.scan,state:{on_saving:!1,canceling:!1},nonces:dashboard.scan.nonces,endpoints:dashboard.scan.endpoints,polling_state:null,report:dashboard.scan.report}},methods:{newScan:function(){var t=this;this.httpPostRequest("newScan",{},(function(s){t.$nextTick((function(){t.scan={},t.scan.status=s.data.status,t.scan.percent=s.data.percent,t.scan.status_text=s.data.status_text,t.polling()}))}))},cancelScan:function(){if(!0!==this.state.canceling){this.abortAllRequests();var t=this;clearTimeout(this.polling_state),this.state.canceling=!0,this.httpPostRequest("cancelScan",{},(function(s){t.$nextTick((function(){t.scan=s.data.scan,t.state.canceling=!1,t.$emit("scanCanceled",t.scan)}))}))}},refreshStatus:function(){var t=this;this.httpPostRequest("processScan",{},(function(s){!1===s.success?(t.scan=s.data,t.polling()):(t.scan=s.data.scan,t.$emit("scanCompleted",t.scan,s.data.scan.count.total))}))},polling:function(){!1===this.state.canceling&&(this.polling_state=setTimeout(this.refreshStatus(),500))},resultIndicator:function(t){return t>0?'<span class="sui-tag sui-tag-error">'+t+"</span>":'<i aria-hidden="true" class="sui-icon-check-tick sui-success"></i>'}},computed:{statusText:function(){return this.scan.status_text},reportText:function(){if(!1!==this.report.enabled){var t=void 0;switch(parseInt(this.report.frequency)){case 1:t="daily";break;case 7:t="weekly";break;case 30:t="monthly"}return this.vsprintf(this.__("Automatic scans are running %s"),t)}},percent:function(){return this.scan.percent}},mounted:function(){null===this.scan||"process"!==this.scan.status&&"init"!==this.scan.status||this.polling()}},u=Object(r.a)(c,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("i",{staticClass:"sui-icon-layers",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("Malware Scanning"))+"\n ")]),t._v(" "),null!==t.scan&&"finish"===t.scan.status?e("div",{staticClass:"sui-actions-left"},[null!==t.scan&&t.scan.count.total>0?e("span",{staticClass:"sui-tag sui-tag-error"},[t._v(t._s(t.scan.count.total))]):t._e()]):t._e()]),t._v(" "),e("div",{staticClass:"sui-box-body",class:{"no-padding-bottom":null!==t.scan&&"finish"===t.scan.status}},[e("p",[t._v("\n "+t._s(t.__("Scan your website for file changes, vulnerabilities and injected code and get notified about anything suspicious."))+"\n ")]),t._v(" "),null===t.scan?e("div",[e("submit-button",{attrs:{type:"button","css-class":"sui-button-blue",state:t.state},on:{click:t.newScan}},[t._v("\n "+t._s(t.__("Run scan"))+"\n ")])],1):"process"===t.scan.status||"init"===t.scan.status?e("div",[e("div",{staticClass:"sui-progress-block"},[e("div",{staticClass:"sui-progress"},[t._m(0),t._v(" "),e("span",{staticClass:"sui-progress-text"},[e("span",{domProps:{textContent:t._s(t.percent+"%")}})]),t._v(" "),e("div",{staticClass:"sui-progress-bar",attrs:{"aria-hidden":"true"}},[e("span",{style:{width:t.percent+"%"}})])]),t._v(" "),e("button",{staticClass:"sui-button-icon sui-tooltip",attrs:{type:"button",disabled:t.state.canceling,"data-tooltip":"Cancel"},on:{click:t.cancelScan}},[e("i",{staticClass:"sui-icon-close",attrs:{"aria-hidden":"true"}})])]),t._v(" "),e("div",{staticClass:"sui-progress-state"},[e("span",{domProps:{textContent:t._s(t.statusText)}})])]):e("div",{staticClass:"sui-field-list sui-flushed no-border"},[e("div",{staticClass:"sui-field-list-body"},[e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("strong",[t._v("\n "+t._s(t.__("WordPress Core"))+"\n ")])]),t._v(" "),e("span",{domProps:{innerHTML:t._s(t.resultIndicator(t.scan.count.core))}})]),t._v(" "),e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("strong",[t._v("\n "+t._s(t.__("Plugins & Themes"))+"\n ")])]),t._v(" "),e("span",{domProps:{innerHTML:t._s(t.resultIndicator(t.scan.count.vuln))}})]),t._v(" "),e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("strong",[t._v(t._s(t.__("Suspicious Code")))])]),t._v(" "),e("span",{domProps:{innerHTML:t._s(t.resultIndicator(t.scan.count.content))}})])])])]),t._v(" "),null!==t.scan&&"finish"===t.scan.status?e("div",{staticClass:"sui-box-footer"},[e("div",{staticClass:"sui-actions-left"},[e("a",{staticClass:"sui-button sui-button-ghost",attrs:{href:t.adminUrl("admin.php?page=wdf-scan")}},[e("i",{staticClass:"sui-icon-eye",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("View Report"))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-actions-right"},[e("p",{staticClass:"sui-p-small",domProps:{textContent:t._s(t.reportText)}})])]):t._e()])}),[function(){var t=this.$createElement,s=this._self._c||t;return s("span",{staticClass:"sui-progress-icon",attrs:{"aria-hidden":"true"}},[s("i",{staticClass:"sui-icon-loader sui-loading"})])}],!1,null,null,null).exports,d={mixins:[n.a],name:"file-scanning",data:function(){return{scan:dashboard.scan.scan,state:{on_saving:!1,canceling:!1},nonces:dashboard.scan.nonces,endpoints:dashboard.scan.endpoints,polling_state:null,report:dashboard.scan.report}},methods:{newScan:function(){var t=this;this.httpPostRequest("newScan",{},(function(s){t.$nextTick((function(){t.scan={},t.scan.status=s.data.status,t.scan.percent=s.data.percent,t.scan.status_text=s.data.status_text,t.polling()}))}))},cancelScan:function(){if(!0!==this.state.canceling){this.abortAllRequests();var t=this;clearTimeout(this.polling_state),this.state.canceling=!0,this.httpPostRequest("cancelScan",{},(function(s){t.$nextTick((function(){t.scan=s.data.scan,t.state.canceling=!1}))}))}},refreshStatus:function(){var t=this;this.httpPostRequest("processScan",{},(function(s){!1===s.success?(t.scan=s.data,t.polling()):t.scan=s.data.scan}))},polling:function(){!1===this.state.canceling&&(this.polling_state=setTimeout(this.refreshStatus(),500))},resultIndicator:function(t){return t>0?'<span class="sui-tag sui-tag-error">'+t+"</span>":'<i aria-hidden="true" class="sui-icon-check-tick sui-success"></i>'}},computed:{statusText:function(){return this.scan.status_text},percent:function(){return this.scan.percent}},mounted:function(){null===this.scan||"process"!==this.scan.status&&"init"!==this.scan.status||this.polling()}},_=Object(r.a)(d,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("i",{staticClass:"sui-icon-layers",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("Malware Scanning"))+"\n ")]),t._v(" "),null!==t.scan&&"finish"===t.scan.status?e("div",{staticClass:"sui-actions-left"},[t.scan.count.total>0?e("span",{staticClass:"sui-tag sui-tag-error"},[t._v(t._s(t.scan.count.total))]):t._e()]):t._e()]),t._v(" "),e("div",{staticClass:"sui-box-body",class:{"no-padding-bottom":null!==t.scan&&"finish"===t.scan.status}},[e("p",[t._v("\n "+t._s(t.__("Scan your website for file changes, vulnerabilities and injected code and get notified about anything suspicious."))+"\n ")]),t._v(" "),null===t.scan?e("div",[e("submit-button",{attrs:{type:"button","css-class":"sui-button-blue",state:t.state},on:{click:t.newScan}},[t._v("\n "+t._s(t.__("Run scan"))+"\n ")])],1):"process"===t.scan.status||"init"===t.scan.status?e("div",[e("div",{staticClass:"sui-progress-block"},[e("div",{staticClass:"sui-progress"},[t._m(0),t._v(" "),e("span",{staticClass:"sui-progress-text"},[e("span",{domProps:{textContent:t._s(t.percent+"%")}})]),t._v(" "),e("div",{staticClass:"sui-progress-bar",attrs:{"aria-hidden":"true"}},[e("span",{style:{width:t.percent+"%"}})])]),t._v(" "),e("button",{staticClass:"sui-button-icon sui-tooltip",attrs:{type:"button",disabled:t.state.canceling,"data-tooltip":"Cancel"},on:{click:t.cancelScan}},[e("i",{staticClass:"sui-icon-close",attrs:{"aria-hidden":"true"}})])]),t._v(" "),e("div",{staticClass:"sui-progress-state"},[e("span",{domProps:{textContent:t._s(t.statusText)}})])]):e("div",{staticClass:"sui-field-list sui-flushed no-border"},[e("div",{staticClass:"sui-field-list-body"},[e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("strong",[t._v("\n "+t._s(t.__("WordPress Core"))+"\n ")])]),t._v(" "),e("span",{domProps:{innerHTML:t._s(t.resultIndicator(t.scan.count.core))}})]),t._v(" "),e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("strong",[t._v("\n "+t._s(t.__("Plugins & Themes"))+"\n ")])]),t._v(" "),e("a",{staticClass:"sui-button sui-button-purple sui-tooltip",attrs:{href:t.campaign_url("defender_dash_filescan_pro_tag"),target:"_blank","data-tooltip":"Try Defender Pro free today"}},[t._v("\n "+t._s(t.__("Pro Feature"))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("strong",[t._v(t._s(t.__("Suspicious Code")))])]),t._v(" "),e("a",{staticClass:"sui-button sui-button-purple sui-tooltip",attrs:{href:t.campaign_url("defender_dash_filescan_pro_tag"),target:"_blank","data-tooltip":"Try Defender Pro free today"}},[t._v("\n "+t._s(t.__("Pro Feature"))+"\n ")])])])])]),t._v(" "),null!==t.scan&&"finish"===t.scan.status?e("div",{staticClass:"sui-box-footer"},[e("div",{staticClass:"sui-actions-left"},[e("a",{staticClass:"sui-button sui-button-ghost",attrs:{href:t.adminUrl("admin.php?page=wdf-scan")}},[e("i",{staticClass:"sui-icon-eye",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("View Report"))+"\n ")])])]):t._e()])}),[function(){var t=this.$createElement,s=this._self._c||t;return s("span",{staticClass:"sui-progress-icon",attrs:{"aria-hidden":"true"}},[s("i",{staticClass:"sui-icon-loader sui-loading"})])}],!1,null,null,null).exports,p={mixins:[n.a],name:"blacklist",data:function(){return{state:{on_saving:!1},status:"fetching",nonces:dashboard.blacklist.nonces,endpoints:dashboard.blacklist.endpoints}},methods:{toggle:function(){var t=this;this.httpGetRequest("toggleBlacklistWidget",{},(function(s){switch(parseInt(s.data.status)){case-1:t.status="new";break;case 0:t.status="blacklisted";break;case 1:t.status="good"}}))}},mounted:function(){var t=this;this.httpGetRequest("blacklistWidgetStatus",{},(function(s){switch(parseInt(s.data.status)){case-1:t.status="new";break;case 0:t.status="blacklisted";break;case 1:t.status="good"}}))}},h=Object(r.a)(p,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("i",{staticClass:"sui-icon-target",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("Blacklist Monitor"))+"\n ")]),t._v(" "),"blacklisted"===t.status||"good"===t.status?e("div",{staticClass:"sui-actions-right"},[e("label",{staticClass:"sui-toggle"},[e("input",{staticClass:"toggle-checkbox",attrs:{type:"checkbox",checked:"checked"},on:{click:t.toggle}}),t._v(" "),e("span",{staticClass:"sui-toggle-slider"})])]):t._e()]),t._v(" "),e("div",{staticClass:"sui-box-body"},[e("p",[t._v("\n "+t._s(t.__("Automatically check if you’re on Google’s blacklist every 6 hours. If something’s wrong, we’ll let you know via email."))+"\n ")]),t._v(" "),"fetching"===t.status?e("div",{staticClass:"sui-notice sui-notice-info"},[e("div",{staticClass:"sui-notice-content"},[e("div",{staticClass:"sui-notice-message"},[e("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),t._v(" "),e("p",[t._v("\n "+t._s(t.__("Fetching your domain info..."))+"\n ")])])])]):"new"===t.status?e("form",{staticClass:"margin-top-30",attrs:{method:"post"}},[e("submit-button",{attrs:{type:"button","css-class":"sui-button-blue",state:t.state},on:{click:function(s){return t.toggle(!0)}}},[t._v("\n "+t._s(t.__("Activate"))+"\n ")])],1):"blacklisted"===t.status?e("div",{staticClass:"sui-notice sui-notice-error"},[e("div",{staticClass:"sui-notice-content"},[e("div",{staticClass:"sui-notice-message"},[e("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),t._v(" "),e("p",[t._v("\n "+t._s(t.__("Your domain is currently on Google’s blacklist. Check out the article below to find out how to fix up your domain."))+"\n ")])])])]):"good"===t.status?e("div",{staticClass:"sui-notice sui-notice-success"},[e("div",{staticClass:"sui-notice-content"},[e("div",{staticClass:"sui-notice-message"},[e("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),t._v(" "),e("p",[t._v("\n "+t._s(t.__("Your domain is currently clean."))+"\n ")])])])]):t._e(),t._v(" "),"new"!==t.status?e("div",{staticClass:"sui-center-box no-padding-bottom"},[e("p",{staticClass:"sui-p-small"},[t._v("\n "+t._s(t.__("Want to know more about blacklisting?"))+" "),e("a",{attrs:{target:"_blank",href:"https://premium.wpmudev.org/blog/get-off-googles-blacklist/"}},[t._v(t._s(t.__("Read this article.")))])])]):t._e()]),t._v(" "),e("overlay",{directives:[{name:"show",rawName:"v-show",value:!0===t.state.on_saving,expression:"state.on_saving===true"}]})],1)}),[],!1,null,null,null).exports,v={mixins:[n.a],name:"blacklist-free"},f=Object(r.a)(v,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("i",{staticClass:"sui-icon-target",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("Blacklist Monitor"))+"\n ")]),t._v(" "),e("div",{staticClass:"sui-actions-left"},[e("span",{staticClass:"sui-tag sui-tag-pro"},[t._v(t._s(t.__("Pro")))])])]),t._v(" "),e("div",{staticClass:"sui-box-body sui-upsell-items"},[e("div",{staticClass:"sui-padding-left sui-padding-right sui-padding-top"},[e("p",[t._v("\n "+t._s(t.__("Automatically check if you’re on Google’s blacklist every 6 hours. If something’s wrong, we’ll let you know via email."))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-box-settings-row sui-upsell-row"},[e("img",{staticClass:"sui-image sui-upsell-image",attrs:{src:t.assetUrl("assets/img/dashboard-blacklist.svg")}}),t._v(" "),e("div",{staticClass:"sui-upsell-notice"},[e("div",[e("p",[t._v("\n "+t._s(t.__("Defender will warn you if your site has been flagged as unsafe. Get blacklist Monitor as part of a WPMU DEV membership."))),e("br"),t._v(" "),e("a",{staticClass:"premium-button sui-button sui-button-purple",attrs:{target:"_blank",href:t.campaign_url("defender_dash_blacklist_upgrade_button")}},[t._v(t._s(t.__("Try Pro Free Today")))]),t._v(".\n ")])])])])])])}),[],!1,null,null,null).exports,m={mixins:[n.a],name:"ip-lockout",data:function(){return{state:{on_saving:!1},nonces:dashboard.ip_lockout.nonces,endpoints:dashboard.ip_lockout.endpoints,summary:dashboard.ip_lockout.summary,notification:dashboard.ip_lockout.notification,enabled:dashboard.ip_lockout.enabled}},methods:{updateSettings:function(){var t=this;this.httpPostRequest("updateSettings",{data:JSON.stringify({login_protection:!0,detect_404:!0})},(function(){t.enabled=!0}))}},computed:{notificationText:function(){return this.notification?this.__("Lockout notifications are enabled"):this.__("Lockout notifications are disabled")}}},g=Object(r.a)(m,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box",attrs:{id:"ip-lockout"}},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("i",{staticClass:"sui-icon-lock",attrs:{"aria-hidden":"true"}}),t._v("\n\t\t\t"+t._s(t.__("Firewall"))+"\n\t\t")])]),t._v(" "),e("div",{staticClass:"sui-box-body",class:{"no-padding-bottom":!0===t.enabled}},[e("p",[t._v("\n\t\t\t"+t._s(t.__("Protect to your login area and have Defender automatically lockout any suspicious behaviour."))+"\n\t\t")]),t._v(" "),!1===t.enabled?e("form",{attrs:{method:"post"},on:{submit:function(s){return s.preventDefault(),t.updateSettings(s)}}},[e("submit-button",{attrs:{type:"submit","css-class":"sui-button-blue activate",state:t.state}},[t._v("\n\t\t\t\t"+t._s(t.__("Activate"))+"\n\t\t\t")])],1):e("div",{staticClass:"sui-field-list sui-flushed no-border"},[e("div",{staticClass:"sui-field-list-body"},[e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("strong",[t._v(t._s(t.__("Last lockout")))])]),t._v(" "),e("span",{domProps:{textContent:t._s(t.summary.lastLockout)}})]),t._v(" "),e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("strong",[t._v(t._s(t.__("Login lockouts this week")))])]),t._v(" "),e("span",{domProps:{textContent:t._s(t.summary.ip.week)}})]),t._v(" "),e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("strong",[t._v(t._s(t.__("404 lockouts this week")))])]),t._v(" "),e("span",{domProps:{textContent:t._s(t.summary.nf.week)}})])])])]),t._v(" "),!0===t.enabled?e("div",{staticClass:"sui-box-footer"},[e("div",{staticClass:"sui-actions-left"},[e("a",{staticClass:"sui-button sui-button-ghost",attrs:{href:t.adminUrl("admin.php?page=wdf-ip-lockout&view=logs")}},[e("i",{staticClass:"sui-icon-eye",attrs:{"aria-hidden":"true"}}),t._v("\n\t\t\t\t"+t._s(t.__("View logs"))+"\n\t\t\t")])]),t._v(" "),e("div",{staticClass:"sui-actions-right"},[e("p",{staticClass:"sui-p-small",domProps:{textContent:t._s(t.notificationText)}})])]):t._e()])}),[],!1,null,null,null).exports,b={mixins:[n.a],name:"audit",data:function(){return{state:{on_saving:!1},nonces:dashboard.audit.nonces,endpoints:dashboard.audit.endpoints,enabled:dashboard.audit.enabled,report:dashboard.audit.report,summary:{monthCount:"-",dayCount:"-",weekCount:"n/a",lastEvent:"-"}}},methods:{updateSettings:function(){var t=this;this.httpPostRequest("updateSettings",{data:JSON.stringify({enabled:!0})},(function(){t.enabled=!0,t.$nextTick((function(){t.loadData()}))}))},loadData:function(){var t=this;this.httpGetRequest("summary",{},(function(s){t.summary=s.data}))}},computed:{reportText:function(){return this.report?this.__("Audit log reports are enabled"):this.__("Audit log reports are disabled")}},mounted:function(){!0===this.enabled&&this.loadData()}},y=Object(r.a)(b,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box",attrs:{id:"audit-logging"}},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("i",{staticClass:"sui-icon-eye",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("Audit Logging"))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-box-body",class:{"no-padding-bottom":t.enabled}},[e("p",[t._v("\n "+t._s(t.__("Track and log events when changes are made to your website, giving you full visibility over what's going on behind the scenes."))+"\n ")]),t._v(" "),!1===t.enabled?e("form",{attrs:{method:"post"},on:{submit:function(s){return s.preventDefault(),t.updateSettings(s)}}},[e("submit-button",{attrs:{type:"submit","css-class":"sui-button-blue activate",state:t.state}},[t._v("\n "+t._s(t.__("Activate"))+"\n ")])],1):e("div",[e("div",{staticClass:"sui-notice"},[e("div",{staticClass:"sui-notice-content"},[e("div",{staticClass:"sui-notice-message"},[e("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),t._v(" "),e("p",[t._v("\n "+t._s(t.summary.weekCount)+" "+t._s(t.__(" events logged in the past 7 days."))+"\n ")])])])]),t._v(" "),e("div",{staticClass:"sui-field-list sui-flushed no-border"},[e("div",{staticClass:"sui-field-list-body"},[e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("strong",[t._v(t._s(t.__("Last event logged")))])]),t._v(" "),e("span",[t._v("\n "+t._s(t.summary.lastEvent)+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("strong",[t._v(t._s(t.__("Events logged this month")))])]),t._v(" "),e("span",[t._v(t._s(t.summary.monthCount))])])])])])]),t._v(" "),!0===t.enabled?e("div",{staticClass:"sui-box-footer"},[e("div",{staticClass:"sui-actions-left"},[e("a",{staticClass:"sui-button sui-button-ghost",attrs:{href:t.adminUrl("admin.php?page=wdf-logging")}},[e("i",{staticClass:"sui-icon-eye",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("View Logs"))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-actions-right"},[e("p",{staticClass:"sui-p-small",domProps:{textContent:t._s(t.reportText)}})])]):t._e(),t._v(" "),t.state.on_saving?e("overlay"):t._e()],1)}),[],!1,null,null,null).exports,C={mixins:[n.a],name:"audit-free"},w=Object(r.a)(C,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("i",{staticClass:"sui-icon-eye",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("Audit Logging"))+"\n ")]),t._v(" "),e("div",{staticClass:"sui-actions-left"},[e("span",{staticClass:"sui-tag sui-tag-pro"},[t._v(t._s(t.__("Pro")))])])]),t._v(" "),e("div",{staticClass:"sui-box-body sui-upsell-items"},[e("div",{staticClass:"sui-padding-left sui-padding-right sui-padding-top"},[e("p",[t._v("\n "+t._s(t.__("Track and log events when changes are made to your website giving you full visibility of what's going on behind the scenes."))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-box-settings-row sui-upsell-row"},[e("img",{staticClass:"sui-image sui-upsell-image",attrs:{src:t.assetUrl("assets/img/audit-presale.svg")}}),t._v(" "),e("div",{staticClass:"sui-upsell-notice"},[e("p",[t._v("\n "+t._s(t.__("Get an automatic report about the changes made on your website with Audit Logging. Get Audit Logging as part of a WPMU DEV membership."))),e("br"),t._v(" "),e("a",{staticClass:"premium-button sui-button sui-button-purple",attrs:{target:"_blank",href:t.campaign_url("defender_dash_auditlogging_upsell_link")}},[t._v(t._s(t.__("Try Pro Free Today")))])])])])])])}),[],!1,null,null,null).exports,k={mixins:[n.a],name:"report",data:function(){return{scan:dashboard.report.scan,ip_lockout:dashboard.report.ip_lockout,audit:dashboard.report.audit}},methods:{statusText:function(t){if(-1===t)return'<span class="sui-tag sui-tag-disabled">'+this.__("Inactive")+"</span>";var s=void 0;switch(parseInt(t)){case 1:s=this.__("Daily");break;case 7:s=this.__("Weekly");break;case 30:s=this.__("Monthly")}return'<span class="sui-tag sui-tag-blue">'+s+"</span>"}}},x=Object(r.a)(k,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("i",{staticClass:"sui-icon-graph-line",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("Reporting"))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-box-body no-padding-bottom"},[e("p",[t._v(t._s(t.__("Get tailored security reports delivered to your inbox so you don't have to worry about checking in.")))]),t._v(" "),e("div",{staticClass:"sui-field-list sui-flushed no-border"},[e("div",{staticClass:"sui-field-list-body"},[e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("small",[e("strong",[t._v(t._s(t.__("Malware Scanning")))])])]),t._v(" "),e("span",{domProps:{innerHTML:t._s(t.statusText(t.scan))}})]),t._v(" "),e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("small",[e("strong",[t._v(t._s(t.__("Firewall")))])])]),t._v(" "),e("span",{domProps:{innerHTML:t._s(t.statusText(t.ip_lockout))}})]),t._v(" "),e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("small",[e("strong",[t._v(t._s(t.__("Audit Logging")))])])]),t._v(" "),e("span",{domProps:{innerHTML:t._s(t.statusText(t.audit))}})])])])]),t._v(" "),e("div",{staticClass:"sui-box-footer"},[e("p",{staticClass:"sui-p-small text-center"},[t._v("\n "+t._s(t.__("You can also"))+" "),e("a",{attrs:{target:"_blank",href:"https://premium.wpmudev.org/reports/"}},[t._v(t._s(t.__("create PDF reports")))]),t._v(" "+t._s(t.__("to send to your clients via The Hub."))+"\n ")])])])}),[],!1,null,null,null).exports,A={mixins:[n.a],name:"report",data:function(){return{scan:dashboard.report.scan,ip_lockout:dashboard.report.ip_lockout,audit:dashboard.report.audit}},methods:{statusText:function(t){if(-1===t)return'<span class="sui-tag sui-tag-disabled">'+this.__("Inactive")+"</span>";var s=void 0;switch(parseInt(t)){case 1:s=this.__("Daily");break;case 7:s=this.__("Weekly");break;case 30:s=this.__("Monthly")}return'<span class="sui-tag sui-tag-blue">'+s+"</span>"}}},S=Object(r.a)(A,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("i",{staticClass:"sui-icon-graph-line",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("Reporting"))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-box-body sui-upsell-items"},[e("div",{staticClass:"sui-box-settings-row no-padding-bottom"},[e("p",[t._v(t._s(t.__("Get tailored security reports delivered to your inbox so you don't have to worry about checking in.")))])]),t._v(" "),e("div",{staticClass:"sui-field-list no-border"},[e("div",{staticClass:"sui-field-list-body"},[e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("small",[e("strong",[t._v(t._s(t.__("Malware Scanning")))])])]),t._v(" "),e("span",{staticClass:"sui-tag sui-tag-disabled"},[t._v(t._s(t.__("Inactive")))])]),t._v(" "),e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("small",[e("strong",[t._v(t._s(t.__("IP Lockouts")))])])]),t._v(" "),e("span",{staticClass:"sui-tag sui-tag-disabled"},[t._v(t._s(t.__("Inactive")))])]),t._v(" "),e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("small",[e("strong",[t._v(t._s(t.__("Audit Logging")))])])]),t._v(" "),e("span",{staticClass:"sui-tag sui-tag-disabled"},[t._v(t._s(t.__("Inactive")))])])])]),t._v(" "),e("div",{staticClass:"sui-box-settings-row sui-upsell-row"},[e("img",{staticClass:"sui-image sui-upsell-image",attrs:{src:t.assetUrl("/assets/img/dev-man-pre.svg")}}),t._v(" "),e("div",{staticClass:"sui-upsell-notice"},[e("p",[t._v("\n "+t._s(t.__("Schedule automatic reports and recieve directly to your inbox. Get reporting as part of a WPMU DEV membership."))),e("br"),t._v(" "),e("a",{staticClass:"premium-button sui-button sui-button-purple",attrs:{target:"_blank",href:t.campaign_url("defender_dash_reports_upsell_link")}},[t._v(t._s(t.__("Try Pro Free Today")))])])])])])])}),[],!1,null,null,null).exports,T={mixins:[n.a],name:"advanced-tools",data:function(){return{state:{on_saving:!1},nonces:dashboard.advanced_tools.nonces,endpoints:dashboard.advanced_tools.endpoints,mask_login:dashboard.advanced_tools.mask_login,security_headers:dashboard.advanced_tools.security_headers}},methods:{updateSettings:function(t){var s=this;this.httpPostRequest("updateSettings",{data:JSON.stringify({settings:{enabled:!0},module:t})},(function(){"auth"===t?s.two_factor.enabled=!0:s.mask_login.enabled=!0}))}}},P=Object(r.a)(T,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box advanced-tools"},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("i",{staticClass:"sui-icon-wand-magic",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("Advanced Tools"))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-box-body"},[e("p",[t._v("\n "+t._s(t.__("Enable advanced tools for enhanced protection against even the most aggressive of hackers and bots."))+"\n ")]),t._v(" "),e("hr",{staticClass:"sui-flushed"}),t._v(" "),e("strong",[t._v(t._s(t.__("Security Headers")))]),t._v(" "),e("span",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("Add extra security to your website by enabling and configuring the security headers."))+"\n ")]),t._v(" "),Object.keys(t.security_headers).length?e("div",[e("div",{staticClass:"sui-field-list sui-flushed margin-top-30 no-border"},[e("div",{staticClass:"sui-field-list-body"},t._l(t.security_headers,(function(s){return e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("strong",{domProps:{textContent:t._s(s.title)}})]),t._v(" "),e("span",{staticClass:"sui-tag sui-tag-success"},[t._v(t._s(t.__("Enabled")))])])})),0)]),t._v(" "),e("hr",{staticClass:"sui-flushed no-margin-bottom no-margin-top"})]):t._e(),t._v(" "),e("a",{staticClass:"sui-button margin-top-10",attrs:{href:t.adminUrl("admin.php?page=wdf-advanced-tools&view=security-headers")}},[e("i",{staticClass:"sui-icon-wrench-tool"}),t._v("\n "+t._s(t.__("Configure"))+"\n ")]),t._v(" "),e("hr",{staticClass:"sui-flushed"}),t._v(" "),e("strong",[t._v(t._s(t.__("Mask Login Area")))]),t._v(" "),e("span",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("Change the location of WordPress's default login area."))+"\n ")]),t._v(" "),!1===t.mask_login.enabled?e("form",{staticClass:"margin-top-10",attrs:{method:"post"},on:{submit:function(s){return s.preventDefault(),t.updateSettings()}}},[e("submit-button",{attrs:{type:"submit","css-class":"sui-button-blue",state:t.state}},[t._v("\n "+t._s(t.__("Activate"))+"\n ")])],1):!1===t.mask_login.useable?e("div",{staticClass:"sui-notice sui-notice-warning margin-top-10"},[e("div",{staticClass:"sui-notice-content"},[e("div",{staticClass:"sui-notice-message"},[e("p",[t._v("\n "+t._s(t.__("Masking is currently inactive. Choose your URL and save your settings to finish setup."))+"\n "),e("br"),t._v(" "),e("a",{staticClass:"sui-button margin-top-10",attrs:{href:t.adminUrl("admin.php?page=wdf-advanced-tools&view=mask-login")}},[t._v("\n "+t._s(t.__("Finish Setup"))+"\n ")])])])])]):!0===t.mask_login.useable?e("div",{staticClass:"sui-notice sui-notice-success margin-top-10"},[e("div",{staticClass:"sui-notice-content"},[e("div",{staticClass:"sui-notice-message"},[e("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),t._v(" "),e("p",[t._v("\n "+t._s(t.__("Masking is currently active at "))+"\n "),e("a",{attrs:{target:"_blank",href:t.mask_login.login_url}},[t._v(t._s(t.mask_login.login_url))])])])])]):t._e()])])}),[],!1,null,null,null).exports,j={mixins:[n.a],name:"quick-setup",data:function(){return{state:{on_saving:!1},model:{activate_scan:!0,activate_audit:!0,activate_lockout:!0,activate_blacklist:!0},status:"normal",nonces:dashboard.quick_setup.nonces,endpoints:dashboard.quick_setup.endpoints}},methods:{activate:function(){this.httpPostRequest("activate",this.model,(function(t){window.location.reload()}))},skip:function(){this.httpPostRequest("skip",this.model,(function(t){SUI.closeModal()}))}},mounted:function(){document.onreadystatechange=function(){if("complete"===document.readyState){SUI.openModal("activator","wpbody",void 0,!1,!1)}}}},E=Object(r.a)(j,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-modal sui-modal-lg"},[e("div",{staticClass:"sui-modal-content",attrs:{role:"dialog",id:"activator","aria-modal":"true","aria-labelledby":"Quick setup"}},["normal"===t.status?e("div",{staticClass:"sui-box",attrs:{role:"document"}},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[t._v("\n "+t._s(t.__("Quick Setup"))+"\n ")]),t._v(" "),e("div",{staticClass:"sui-actions-right"},[e("form",{attrs:{method:"post"},on:{submit:function(s){return s.preventDefault(),t.skip(s)}}},[e("submit-button",{attrs:{type:"submit","css-class":"sui-button-ghost quicksetup-skip",state:t.state}},[t._v("\n "+t._s(t.__("Skip"))+"\n ")])],1)])]),t._v(" "),e("form",{attrs:{method:"post"},on:{submit:function(s){return s.preventDefault(),t.activate(s)}}},[e("div",{staticClass:"sui-box-body"},[e("p",[t._v("\n "+t._s(t.__("Welcome to Defender, the hottest security plugin for WordPress! Let’s quickly set up the basics for you, then you can fine tweak each setting as you go – our recommendations are on by default."))+"\n ")]),t._v(" "),e("hr",{staticClass:"sui-flushed"}),t._v(" "),e("div",{staticClass:"sui-row"},[e("div",{staticClass:"sui-col-md-10"},[e("span",{staticClass:"sui-settings-label"},[t._v("\n "+t._s(t.__("Automatic Malware Scanning & Reporting"))+"\n ")]),t._v(" "),e("span",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("Scan your website for file changes, vulnerabilities and injected code and get notified about anything suspicious."))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-col-md-2"},[e("div",{staticClass:"sui-form-field tr"},[e("label",{staticClass:"sui-toggle"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.model.activate_scan,expression:"model.activate_scan"}],staticClass:"toggle-checkbox",attrs:{type:"checkbox",name:"activator[]",checked:"",id:"active_scan",value:"activate_scan"},domProps:{checked:Array.isArray(t.model.activate_scan)?t._i(t.model.activate_scan,"activate_scan")>-1:t.model.activate_scan},on:{change:function(s){var e=t.model.activate_scan,i=s.target,a=!!i.checked;if(Array.isArray(e)){var n="activate_scan",o=t._i(e,n);i.checked?o<0&&t.$set(t.model,"activate_scan",e.concat([n])):o>-1&&t.$set(t.model,"activate_scan",e.slice(0,o).concat(e.slice(o+1)))}else t.$set(t.model,"activate_scan",a)}}}),t._v(" "),e("span",{staticClass:"sui-toggle-slider"})])])])]),t._v(" "),e("hr",{staticClass:"sui-flushed"}),t._v(" "),e("div",{staticClass:"sui-row"},[e("div",{staticClass:"sui-col-md-10"},[e("span",{staticClass:"sui-settings-label"},[t._v("\n "+t._s(t.__("Audit Logging"))+"\n ")]),t._v(" "),e("span",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("Track and log events when changes are made to your website giving you full visibility of what’s going on behind the scenes."))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-col-md-2"},[e("div",{staticClass:"sui-form-field tr"},[e("label",{staticClass:"sui-toggle"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.model.activate_audit,expression:"model.activate_audit"}],staticClass:"toggle-checkbox",attrs:{type:"checkbox",name:"activator[]",checked:"",id:"active_audit",value:"activate_audit"},domProps:{checked:Array.isArray(t.model.activate_audit)?t._i(t.model.activate_audit,"activate_audit")>-1:t.model.activate_audit},on:{change:function(s){var e=t.model.activate_audit,i=s.target,a=!!i.checked;if(Array.isArray(e)){var n="activate_audit",o=t._i(e,n);i.checked?o<0&&t.$set(t.model,"activate_audit",e.concat([n])):o>-1&&t.$set(t.model,"activate_audit",e.slice(0,o).concat(e.slice(o+1)))}else t.$set(t.model,"activate_audit",a)}}}),t._v(" "),e("span",{staticClass:"sui-toggle-slider"})])])])]),t._v(" "),e("hr",{staticClass:"sui-flushed"}),t._v(" "),e("div",{staticClass:"sui-row"},[e("div",{staticClass:"sui-col-md-10"},[e("span",{staticClass:"sui-settings-label"},[t._v("\n "+t._s(t.__("Firewall"))+"\n ")]),t._v(" "),e("span",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("Protect your login area and have Defender automatically lockout any suspicious behaviour."))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-col-md-2"},[e("div",{staticClass:"sui-form-field tr"},[e("label",{staticClass:"sui-toggle"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.model.activate_lockout,expression:"model.activate_lockout"}],staticClass:"toggle-checkbox",attrs:{type:"checkbox",checked:"",name:"activator[]",id:"activate_lockout",value:"activate_lockout"},domProps:{checked:Array.isArray(t.model.activate_lockout)?t._i(t.model.activate_lockout,"activate_lockout")>-1:t.model.activate_lockout},on:{change:function(s){var e=t.model.activate_lockout,i=s.target,a=!!i.checked;if(Array.isArray(e)){var n="activate_lockout",o=t._i(e,n);i.checked?o<0&&t.$set(t.model,"activate_lockout",e.concat([n])):o>-1&&t.$set(t.model,"activate_lockout",e.slice(0,o).concat(e.slice(o+1)))}else t.$set(t.model,"activate_lockout",a)}}}),t._v(" "),e("span",{staticClass:"sui-toggle-slider"})])])])]),t._v(" "),e("hr",{staticClass:"sui-flushed"}),t._v(" "),e("div",{staticClass:"sui-row"},[e("div",{staticClass:"sui-col-md-10"},[e("span",{staticClass:"sui-settings-label"},[t._v("\n "+t._s(t.__("Blacklist Monitor"))+"\n ")]),t._v(" "),e("span",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("Automatically check if you’re on Google’s blacklist every 6 hours. If something’s wrong, we’ll let you know via email."))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-col-md-2"},[e("div",{staticClass:"sui-form-field tr"},[e("label",{staticClass:"sui-toggle"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.model.activate_blacklist,expression:"model.activate_blacklist"}],staticClass:"toggle-checkbox",attrs:{type:"checkbox",checked:"",name:"activator[]",id:"activate_blacklist",value:"activate_blacklist"},domProps:{checked:Array.isArray(t.model.activate_blacklist)?t._i(t.model.activate_blacklist,"activate_blacklist")>-1:t.model.activate_blacklist},on:{change:function(s){var e=t.model.activate_blacklist,i=s.target,a=!!i.checked;if(Array.isArray(e)){var n="activate_blacklist",o=t._i(e,n);i.checked?o<0&&t.$set(t.model,"activate_blacklist",e.concat([n])):o>-1&&t.$set(t.model,"activate_blacklist",e.slice(0,o).concat(e.slice(o+1)))}else t.$set(t.model,"activate_blacklist",a)}}}),t._v(" "),e("span",{staticClass:"sui-toggle-slider"})])])])])]),t._v(" "),e("div",{staticClass:"sui-box-footer"},[e("div",{staticClass:"sui-row"},[e("div",{staticClass:"sui-col-md-9"},[e("small",[t._v("\n "+t._s(t.__("Note: These services will be configured with our recommended settings. You can change these at any time."))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-col-md-3"},[e("submit-button",{attrs:{type:"submit",state:t.state,"css-class":"sui-button-blue quicksetup-apply"}},[t._v("\n "+t._s(t.__("Get Started"))+"\n ")])],1)])])]),t._v(" "),t.maybeHideBranding?e("img",{staticClass:"sui-image sui-image-center",attrs:{src:t.assetUrl("/assets/img/defender-activator.svg")}}):t._e()]):e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-body"},[e("p",[t._v("\n "+t._s(t.__("Just a moment while Defender activates those services for you.."))+"\n ")]),t._v(" "),t._m(0),t._v(" "),t._m(1)])])])])}),[function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"sui-progress-block"},[s("div",{staticClass:"sui-progress"},[s("div",{staticClass:"sui-progress-text scan-progress-text sui-icon-loader sui-loading"},[s("span",[this._v("0%")])]),this._v(" "),s("div",{staticClass:"sui-progress-bar scan-progress-bar"},[s("span",{staticStyle:{width:"0%"}})])])])},function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"sui-progress-state"},[s("span",{staticClass:"status-text"})])}],!1,null,null,null).exports,I={mixins:[n.a],name:"quick-setup",data:function(){return{state:{on_saving:!1},model:{activate_scan:!0,activate_lockout:!0},status:"normal",nonces:dashboard.quick_setup.nonces,endpoints:dashboard.quick_setup.endpoints}},methods:{activate:function(){this.httpPostRequest("activate",this.model,(function(t){window.location.reload()}))},skip:function(){this.httpPostRequest("skip",this.model,(function(t){SUI.closeModal()}))}},mounted:function(){document.onreadystatechange=function(){if("complete"===document.readyState){SUI.openModal("activator","wpbody",void 0,!1,!1)}}}},O=Object(r.a)(I,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-modal sui-modal-lg"},[e("div",{staticClass:"sui-modal-content",attrs:{role:"dialog",id:"activator","aria-modal":"true","aria-labelledby":"Quick setup"}},["normal"===t.status?e("div",{staticClass:"sui-box",attrs:{role:"document"}},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[t._v("\n "+t._s(t.__("Quick Setup"))+"\n ")]),t._v(" "),e("div",{staticClass:"sui-actions-right"},[e("form",{attrs:{method:"post"},on:{submit:function(s){return s.preventDefault(),t.skip(s)}}},[e("submit-button",{attrs:{type:"submit","css-class":"sui-button-ghost",state:t.state}},[t._v("\n "+t._s(t.__("Skip"))+"\n ")])],1)])]),t._v(" "),e("form",{attrs:{method:"post"},on:{submit:function(s){return s.preventDefault(),t.activate(s)}}},[e("div",{staticClass:"sui-box-body"},[e("p",[t._v("\n "+t._s(t.__("Welcome to Defender, the hottest security plugin for WordPress! Let’s quickly set up the basics for you, then you can fine tweak each setting as you go – our recommendations are on by default."))+"\n ")]),t._v(" "),e("hr",{staticClass:"sui-flushed"}),t._v(" "),e("div",{staticClass:"sui-row"},[e("div",{staticClass:"sui-col-md-10"},[e("span",{staticClass:"sui-settings-label"},[t._v("\n "+t._s(t.__("Malware Scanning"))+"\n ")]),t._v(" "),e("span",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("Scan your website for file changes, vulnerabilities and injected code and get notified about anything suspicious."))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-col-md-2"},[e("div",{staticClass:"sui-form-field tr"},[e("label",{staticClass:"sui-toggle"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.model.activate_scan,expression:"model.activate_scan"}],staticClass:"toggle-checkbox",attrs:{type:"checkbox",name:"activator[]",checked:"",id:"active_scan",value:"activate_scan"},domProps:{checked:Array.isArray(t.model.activate_scan)?t._i(t.model.activate_scan,"activate_scan")>-1:t.model.activate_scan},on:{change:function(s){var e=t.model.activate_scan,i=s.target,a=!!i.checked;if(Array.isArray(e)){var n="activate_scan",o=t._i(e,n);i.checked?o<0&&t.$set(t.model,"activate_scan",e.concat([n])):o>-1&&t.$set(t.model,"activate_scan",e.slice(0,o).concat(e.slice(o+1)))}else t.$set(t.model,"activate_scan",a)}}}),t._v(" "),e("span",{staticClass:"sui-toggle-slider"})])])])]),t._v(" "),e("hr",{staticClass:"sui-flushed"}),t._v(" "),e("div",{staticClass:"sui-row"},[e("div",{staticClass:"sui-col-md-10"},[e("span",{staticClass:"sui-settings-label"},[t._v("\n "+t._s(t.__("Firewall"))+"\n ")]),t._v(" "),e("span",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("Protect your login area and have Defender automatically lockout any suspicious behaviour."))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-col-md-2"},[e("div",{staticClass:"sui-form-field tr"},[e("label",{staticClass:"sui-toggle"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.model.activate_lockout,expression:"model.activate_lockout"}],staticClass:"toggle-checkbox",attrs:{type:"checkbox",checked:"",name:"activator[]",id:"activate_lockout",value:"activate_lockout"},domProps:{checked:Array.isArray(t.model.activate_lockout)?t._i(t.model.activate_lockout,"activate_lockout")>-1:t.model.activate_lockout},on:{change:function(s){var e=t.model.activate_lockout,i=s.target,a=!!i.checked;if(Array.isArray(e)){var n="activate_lockout",o=t._i(e,n);i.checked?o<0&&t.$set(t.model,"activate_lockout",e.concat([n])):o>-1&&t.$set(t.model,"activate_lockout",e.slice(0,o).concat(e.slice(o+1)))}else t.$set(t.model,"activate_lockout",a)}}}),t._v(" "),e("span",{staticClass:"sui-toggle-slider"})])])])])]),t._v(" "),e("div",{staticClass:"sui-box-footer"},[e("div",{staticClass:"sui-row"},[e("div",{staticClass:"sui-col-md-9"},[e("small",[t._v("\n "+t._s(t.__("Note: These services will be configured with our recommended settings. You can change these at any time."))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-col-md-3"},[e("submit-button",{attrs:{type:"submit",state:t.state,"css-class":"sui-button sui-button-blue"}},[t._v("\n "+t._s(t.__("Get Started"))+"\n ")])],1)])])]),t._v(" "),t.maybeHideBranding?e("img",{staticClass:"sui-image sui-image-center",attrs:{src:t.assetUrl("/assets/img/defender-activator.svg")}}):t._e()]):e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-body"},[e("p",[t._v("\n "+t._s(t.__("Just a moment while Defender activates those services for you.."))+"\n ")]),t._v(" "),t._m(0),t._v(" "),t._m(1)])])])])}),[function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"sui-progress-block"},[s("div",{staticClass:"sui-progress"},[s("div",{staticClass:"sui-progress-text scan-progress-text sui-icon-loader sui-loading"},[s("span",[this._v("0%")])]),this._v(" "),s("div",{staticClass:"sui-progress-bar scan-progress-bar"},[s("span",{staticStyle:{width:"0%"}})])])])},function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"sui-progress-state"},[s("span",{staticClass:"status-text"})])}],!1,null,null,null).exports,$={mixins:[n.a],name:"cross-sale"},D=Object(r.a)($,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("section",[e("div",{staticClass:"sui-row",attrs:{id:"sui-cross-sell-footer"}},[t._m(0),t._v(" "),e("h3",[t._v(t._s(t.__("Check out our other free wordpress.org plugins!")))])]),t._v(" "),e("div",{staticClass:"sui-row sui-cross-sell-modules"},[e("div",{staticClass:"sui-col-md-4"},[t._m(1),t._v(" "),e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-body"},[e("h3",[t._v(t._s(t.__("Smush Image Compression and Optimization")))]),t._v(" "),e("p",[t._v(t._s(t.__("Resize, optimize and compress all of your images with the incredibly powerful and award-winning, 100% free WordPress image optimizer.")))]),t._v(" "),e("a",{staticClass:"sui-button sui-button-ghost",attrs:{href:"https://wordpress.org/plugins/wp-smushit/",target:"_blank"}},[t._v("\n "+t._s(t.__("View features"))+" "),e("i",{staticClass:"sui-icon-arrow-right",attrs:{"aria-hidden":"true"}})])])])]),t._v(" "),e("div",{staticClass:"sui-col-md-4"},[t._m(2),t._v(" "),e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-body"},[e("h3",[t._v(t._s(t.__("Hummingbird Page Speed Optimization")))]),t._v(" "),e("p",[t._v(t._s(t.__("Performance Tests, File Optimization & Compression, Page, Browser & Gravatar Caching, GZIP Compression, CloudFlare Integration & more.")))]),t._v(" "),e("a",{staticClass:"sui-button sui-button-ghost",attrs:{href:"https://wordpress.org/plugins/hummingbird-performance/",target:"_blank"}},[t._v("\n "+t._s(t.__("View features"))+" "),e("i",{staticClass:"sui-icon-arrow-right",attrs:{"aria-hidden":"true"}})])])])]),t._v(" "),e("div",{staticClass:"sui-col-md-4"},[t._m(3),t._v(" "),e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-body"},[e("h3",[t._v(t._s(t.__("SmartCrawl Search Engine Optimization")))]),t._v(" "),e("p",[t._v(t._s(t.__("Customize Titles & Meta Data, OpenGraph, Twitter & Pinterest Support, Auto-Keyword Linking, SEO & Readability Analysis, Sitemaps, URL Crawler & more.")))]),t._v(" "),e("a",{staticClass:"sui-button sui-button-ghost",attrs:{href:"https://wordpress.org/plugins/smartcrawl-seo/",target:"_blank"}},[t._v("\n "+t._s(t.__("View features"))+" "),e("i",{staticClass:"sui-icon-arrow-right",attrs:{"aria-hidden":"true"}})])])])])]),t._v(" "),e("div",{staticClass:"sui-cross-sell-bottom"},[e("h3",[t._v(t._s(t.__("WPMU DEV - Your All-in-One WordPress Platform")))]),t._v(" "),e("p",[t._v(t._s(t.__("Pretty much everything you need for developing and managing WordPress based websites, and then some")))]),t._v(" "),e("a",{staticClass:"sui-button sui-button-green",attrs:{href:"https://premium.wpmudev.org/?utm_source=defender&utm_medium=plugin&utm_campaign=defender_dash_footer_upsell_notice",target:"_blank",role:"button"}},[t._v(t._s(t.__("Learn more"))+"\n ")]),t._v(" "),e("img",{staticClass:"sui-image",attrs:{src:t.assetUrl("assets/img/dev-team.png"),srcset:t.assetUrl("assets/img/dev-team@2x.png 2x"),"aria-hidden":"true"}})])])}),[function(){var t=this.$createElement,s=this._self._c||t;return s("div",[s("span",{staticClass:"sui-icon-plugin-2"})])},function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"sui-cross-1",attrs:{"aria-hidden":"true"}},[s("span")])},function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"sui-cross-2",attrs:{"aria-hidden":"true"}},[s("span")])},function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"sui-cross-3",attrs:{"aria-hidden":"true"}},[s("span")])}],!1,null,null,null).exports,W={mixins:[n.a],name:"two-fa",data:function(){return{state:{on_saving:!1},enabled:dashboard.two_fa.enabled,useable:dashboard.two_fa.useable,nonces:dashboard.two_fa.nonces,endpoints:dashboard.two_fa.endpoints}},methods:{updateSettings:function(t){var s=this,e={enabled:!0};this.httpPostRequest("updateSettings",{data:JSON.stringify({settings:e,module:"auth"})},(function(){s.enabled=!0}))}}},q=Object(r.a)(W,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box two_fa"},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("i",{staticClass:"sui-icon-lock",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("Two-Factor Authentication"))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-box-body"},[e("p",[t._v(t._s(t.__("Add an extra layer of security to your WordPress account to ensure that you’re the only person who can log in, even if someone else knows your password."))+"\n ")]),t._v(" "),!1===t.enabled?e("form",{staticClass:"margin-top-10 margin-bottom-10",attrs:{method:"post"},on:{submit:function(s){return s.preventDefault(),t.updateSettings("auth")}}},[e("submit-button",{attrs:{type:"submit","css-class":"sui-button-blue",state:t.state}},[t._v("\n "+t._s(t.__("Activate"))+"\n ")])],1):!1===t.useable?e("div",{staticClass:"sui-notice sui-notice-warning margin-bottom-30 margin-top-10"},[e("div",{staticClass:"sui-notice-content"},[e("div",{staticClass:"sui-notice-message"},[e("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),t._v(" "),e("p",{domProps:{textContent:t._s(t.__("Two-factor authentication is currently inactive. Configure and save your settings to finish setup."))}}),t._v(" "),e("p",[e("a",{staticClass:"sui-button",attrs:{href:t.adminUrl("admin.php?page=wdf-2fa")}},[t._v("\n "+t._s(t.__("Finish Setup"))+"\n ")])])])])]):!0===t.useable?e("div",{staticClass:"sui-notice sui-notice-success margin-top-10 margin-bottom-30"},[e("div",{staticClass:"sui-notice-message"},[e("div",{staticClass:"sui-notice-content"},[e("div",{staticClass:"sui-notice-message"},[e("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),t._v(" "),e("p",{domProps:{textContent:t._s(t.__("Two-factor authentication is now active. User roles with this feature enabled must visit their Profile page to complete setup and sync their account with the Authenticator app."))}})])])])]):t._e(),t._v(" "),!0===t.useable?e("small",{domProps:{textContent:t._s(t.__("Note: Each user on your website must individually enable two-factor authentication via their user profile in order to enable and use this security feature."))}}):t._e()])])}),[],!1,null,null,null).exports,R={name:"waf",mixins:[n.a],data:function(){return{on_us:dashboard.waf.waf.hosted,site_id:dashboard.waf.site_id,status:dashboard.waf.waf.status}},computed:{get_migrate_url:function(){return"https://premium.wpmudev.org/hub2/site/"+this.site_id+"/hosting"},get_waf_url:function(){return"https://premium.wpmudev.org/hub2/site/"+this.site_id+"/hosting/tools#update-waf"},get_waf_text:function(){return this.vsprintf(this.__('At this time, you can manage all WAF settings via <a target="_blank" href="%s">The Hub.</a>'),"https://premium.wpmudev.org/hub2/")},get_footer_text:function(){return!1===this.on_us?this.vsprintf(this.__('You can learn more about the WAF <a target="_blank" href="%s">here</a>.'),"http://premium.wpmudev.org/waf"):!0===this.on_us&&!1===this.status?this.vsprintf(this.__('Enable this feature via <a target="_blank" href="%s">The Hub</a> today or learn more <a target="_blank" href="%s">here</a>.'),this.get_waf_url,"http://premium.wpmudev.org/waf"):!0===this.on_us&&!0===this.status?this.vsprintf(this.__('At this time, you can manage all WAF settings via <a href="%s">The Hub</a>.'),this.get_waf_url):void 0}}},M=Object(r.a)(R,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("img",{attrs:{src:t.assetUrl("/assets/img/waf@3x.svg")}}),t._v(" \n "+t._s(t.__("Web Application Firewall"))+"\n ")])]),t._v(" "),!1===t.on_us?e("div",{staticClass:"sui-box-body"},[e("p",[t._v("\n "+t._s(t.__("The new Web Application Firewall (WAF) filters incoming requests against a highly optimized managed ruleset to block hackers and bot attacks before they reach your site. It's our basic Firewall with advanced layers of protection."))+"\n ")]),t._v(" "),e("a",{staticClass:"sui-button sui-button-blue",attrs:{target:"_blank",href:t.get_migrate_url}},[t._v(t._s(t.__("Migrate my site")))]),t._v(" "),e("p",{staticClass:"sui-description margin-top-30 text-center",domProps:{innerHTML:t._s(t.get_footer_text)}})]):t._e(),t._v(" "),!0===t.on_us&&!1===t.status?e("div",{staticClass:"sui-box-body"},[e("p",[t._v("\n "+t._s(t.__("The new Web Application Firewall (WAF) filters incoming requests against a highly optimized managed ruleset to block hackers and bot attacks before they reach your site. It's our basic Firewall with advanced layers of protection."))+"\n ")]),t._v(" "),e("a",{staticClass:"sui-button sui-button-blue",attrs:{target:"_blank",href:t.get_waf_url}},[t._v(t._s(t.__("Activate WAF")))]),t._v(" "),e("p",{staticClass:"sui-description margin-top-30 text-center",domProps:{innerHTML:t._s(t.get_footer_text)}})]):t._e(),t._v(" "),!0===t.on_us&&!0===t.status?e("div",{staticClass:"sui-box-body"},[e("p",[t._v("\n "+t._s(t.__("The new Web Application Firewall (WAF) filters incoming requests against a highly optimized managed ruleset to block hackers and bot attacks before they reach your site. It's our basic Firewall with advanced layers of protection."))+"\n ")]),t._v(" "),e("div",{staticClass:"sui-notice sui-notice-info"},[e("div",{staticClass:"sui-notice-content"},[e("div",{staticClass:"sui-notice-message"},[e("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),t._v(" "),e("p",[t._v(t._s(t.__("This site has WAF protection enabled.")))])])])]),t._v(" "),e("p",{staticClass:"text-center sui-description no-margin-top",domProps:{innerHTML:t._s(t.get_waf_text)}})]):t._e()])}),[],!1,null,null,null).exports,L={name:"waf_free",mixins:[n.a],computed:{get_url:function(){return defender.is_membership?"http://premium.wpmudev.org/waf":this.campaignUrl("waf","defender_dash_waf_upgrade_button")}}},U=Object(r.a)(L,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("img",{attrs:{src:t.assetUrl("/assets/img/waf@3x.svg")}}),t._v(" \n "+t._s(t.__("Web Application Firewall"))+"\n ")]),t._v(" "),e("div",{staticClass:"sui-actions-left"},[e("span",{staticClass:"sui-tag sui-tag-pro"},[t._v(t._s(t.__("Pro")))])])]),t._v(" "),e("div",{staticClass:"sui-box-body"},[e("p",[t._v("\n "+t._s(t.__("The new Web Application Firewall (WAF) filters incoming requests against a highly optimized managed ruleset to block hackers and bot attacks before they reach your site. It's our basic Firewall with advanced layers of protection."))+"\n ")]),t._v(" "),e("div",{staticClass:"sui-box-settings-row sui-upsell-row"},[e("div",{staticClass:"sui-upsell-notice no-padding"},[e("p",[t._v("\n "+t._s(t.__("This feature is available to members who host their sites with WPMU DEV."))),e("br"),t._v(" "),e("a",{staticClass:"premium-button sui-button sui-button-purple",attrs:{target:"_blank",href:t.get_url}},[t._v(t._s(t.__("Try Pro Free Today")))])])])])])])}),[],!1,null,null,null).exports,F={name:"waf-modal",mixins:[n.a],data:function(){return{nonces:dashboard.new_features.nonces,endpoints:dashboard.new_features.endpoints,state:{on_saving:!1}}},methods:{hide:function(){this.httpPostRequest("hide",this.model,(function(t){SUI.closeModal()}))}},computed:{get_link_line:function(){var t="",s="http://premium.wpmudev.org/waf";return dashboard.waf.waf.hosted&&1!==parseInt(defender.is_free)?dashboard.waf.waf.hosted&&!dashboard.waf.waf.whitelabel_enable&&(t=this.vsprintf(this.__('Enable this feature via <a target="_blank" href="%s"">The Hub</a> today or learn more <a target="_blank" href="%s">here</a>.'),"https://premium.wpmudev.org/hub2/site/"+dashboard.waf.site_id+"/hosting/tools#update-waf",s)):t=this.vsprintf(this.__('This feature is available to members who host their sites with WPMU DEV. You can learn more about WAF <a target="_blank" href="%s">here</a>.'),s),t}},mounted:function(){document.onreadystatechange=function(){if("complete"===document.readyState){SUI.openModal("waf-modal","wpbody","waf-modal",!1,!1)}}}},H=Object(r.a)(F,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-modal sui-modal-md"},[e("div",{staticClass:"sui-modal-content",attrs:{role:"dialog",id:"waf-modal","aria-modal":"true","aria-label":"waf-modal-label"}},[e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},[e("figure",{staticClass:"sui-box-banner",attrs:{"aria-hidden":"true"}},[e("img",{attrs:{src:t.assetUrl("assets/img/waf-modal.png")}})]),t._v(" "),e("button",{staticClass:"modal-close-button sui-button-icon sui-button-float--right",on:{click:t.hide}},[e("i",{staticClass:"sui-icon-close sui-md",attrs:{"aria-hidden":"true"}}),t._v(" "),e("span",{staticClass:"sui-screen-reader-text"},[t._v(t._s(t.__("Close this dialog.")))])]),t._v(" "),e("h3",{staticClass:"sui-box-title sui-lg",attrs:{id:"waf-modal-label"}},[t._v("\n "+t._s(t.__("New Web Application Firewall"))+"\n ")]),t._v(" "),e("p",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("The new Web Application Firewall (WAF) is a first layer of protection to block hackers and bot attacks before they reach your site."))+"\n ")]),t._v(" "),e("div",{staticClass:"text-left waf-description"},[e("p",{staticClass:"sui-description how-does-it-work"},[t._v(t._s(t.__("How Does it Work?")))]),t._v(" "),e("p",{staticClass:"sui-description"},[t._v(t._s(t.__("The WAF filters requests against a highly optimized managed ruleset covering common attacks (OWASP top ten) and performs virtual patching of WordPress core, plugin, and theme vulnerabilities.")))]),t._v(" "),e("p",{staticClass:"sui-description",domProps:{innerHTML:t._s(t.get_link_line)}})])]),t._v(" "),e("div",{staticClass:"sui-box-footer sui-flatten sui-content-center sui-spacing-bottom--50"},[e("submit-button",{attrs:{type:"submit",state:t.state,"css-class":"sui-button quicksetup-apply"},on:{click:t.hide}},[t._v("\n "+t._s(t.__("Got it"))+"\n ")])],1)])])])}),[],!1,null,null,null).exports,z={mixins:[n.a],name:"dashboard",data:function(){return{quick_setup:parseInt(dashboard.quick_setup.show),show_features:dashboard.new_features.show,is_free:parseInt(defender.is_free),security_tweaks:{count:{issues:dashboard.security_tweaks.count.issues,resolved:dashboard.security_tweaks.count.resolved,total:dashboard.security_tweaks.count.total}},queue_waf:dashboard.waf.waf.maybe_show,scan:{count:0,scan:dashboard.scan.scan},ip_lockout:{last_lockout:dashboard.ip_lockout.summary.lastLockout},nonces:dashboard.scan.nonces,endpoints:dashboard.scan.endpoints,state:{on_saving:!1}}},components:{WafModal:H,waf_free:U,Waf:M,TwoFa:q,"security-tweaks":l,"file-scanning":u,"file-scanning-free":_,blacklist:h,"blacklist-free":f,"ip-lockout":g,audit:y,"audit-free":w,report:x,"report-free":S,"advanced-tools":P,"quick-setup":E,"quick-setup-free":O,"cross-sale":D},methods:{countScanIssues:function(){var t=dashboard.scan.scan;return null===t||"init"===t.status||"progress"===t.status?0:t.count.total},newScan:function(){var t=this;this.httpPostRequest("newScan",{},(function(s){t.$nextTick((function(){var e=t.$refs["file-scanning"];e.scan={},t.scan.scan={},t.scan.scan.status=s.data.status,e.scan.status=s.data.status,e.scan.percent=s.data.percent,e.scan.status_text=s.data.status_text,e.polling()}))}))},scanCanceled:function(t){this.scan.scan=t},scanCompleted:function(t,s){this.scan.count=s,this.scan.scan=t}},computed:{tooltips:function(){var t=this.__("You don't have any outstanding security issues, nice work!");return 1===this.security_tweaks.count.issues&&0===this.scan.count?t=this.__("You have one security tweak left to do. We recommend you action it, or ignore it if it's irrelevant."):0===this.security_tweaks.count.issues&&1===this.scan.count?t=this.__("We've detected a potential security risk in your file system. We recommend you take a look and action a fix, or ignore the file if it's harmless."):1===this.security_tweaks.count.issues&&1===this.scan.count?t=this.__("You have one security tweak left to do, and one potential security risk in your file system. We recommend you take a look and action fixes, or ignore the issues if they are harmless."):1===this.security_tweaks.count.issues&&this.scan.count>1?t=this.vsprintf(this.__("You have one security tweak left to do, and %s potential security risks in your file system. We recommend you take a look and action fixes, or ignore the issues if they are harmless"),this.scan.count):this.security_tweaks.count.issues>1&&1===this.scan.count?t=this.vsprintf(this.__("You have %s security tweaks left to do, and one potential security risk in your file system. We recommend you take a look and action fixes, or ignore the issues if they are harmless."),this.security_tweaks.count.issues):this.security_tweaks.count.issues>1&&this.scan.count>1?t=this.vsprintf(this.__("You have %s security tweaks left to do, and %s potential security risks in your file system. We recommend you take a look and action fixes, or ignore the issues if they are harmless."),this.security_tweaks.count.issues,this.scan.count):this.security_tweaks.count.issues>1&&0===this.scan.count?t=this.vsprintf(this.__("You have %d security tweaks left to do. We recommend you action it, or ignore it if it's irrelevant."),this.security_tweaks.count.issues):0===this.security_tweaks.count.issues&&this.scan.count>1&&(t=this.vsprintf(this.__("We've detected %d potential security risks in your file system. We recommend you take a look and action a fix, or ignore the file if it's harmless."),this.scan.count)),t},securityTweaksIndicator:function(){return this.security_tweaks.count.resolved+"/"+this.security_tweaks.count.total},countTotalIssues:function(){return this.scan.count+this.security_tweaks.count.issues}},mounted:function(){var t=this;this.$nextTick((function(){t.scan.count=t.countScanIssues()}))}},V=Object(r.a)(z,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-wrap",class:t.maybeHighContrast()},[e("div",{staticClass:"defender-dashboard"},[e("div",{staticClass:"sui-header"},[e("h1",{staticClass:"sui-header-title"},[t._v(t._s(t.__("Dashboard")))]),t._v(" "),e("div",{staticClass:"sui-actions-right"},[e("doc-link",{attrs:{link:"https://premium.wpmudev.org/docs/wpmu-dev-plugins/defender"}})],1)]),t._v(" "),e("summary-box",[e("div",{staticClass:"sui-summary-segment"},[e("div",{staticClass:"sui-summary-details"},[e("span",{staticClass:"sui-summary-large",domProps:{textContent:t._s(t.countTotalIssues)}}),t._v(" "),e("span",{staticClass:"sui-tooltip sui-tooltip-top-left sui-tooltip-constrained",attrs:{"data-tooltip":t.tooltips}},[0===this.security_tweaks.count.issues&&0===this.scan.count?e("i",{staticClass:"sui-icon-check-tick sui-success",attrs:{"aria-hidden":"true"}}):e("i",{staticClass:"sui-icon-info sui-warning",attrs:{"aria-hidden":"true"}})]),t._v(" "),e("span",{staticClass:"sui-summary-sub"},[t._v(t._s(t.__("security issues")))])])]),t._v(" "),e("div",{staticClass:"sui-summary-segment"},[e("ul",{staticClass:"sui-list"},[e("li",[e("span",{staticClass:"sui-list-label"},[t._v(t._s(t.__("Security Tweaks Actioned")))]),t._v(" "),e("span",{staticClass:"sui-list-detail",domProps:{textContent:t._s(t.securityTweaksIndicator)}})]),t._v(" "),e("li",[e("span",{staticClass:"sui-list-label"},[t._v(t._s(t.__("Malware Scan Issues")))]),t._v(" "),e("span",{staticClass:"sui-list-detail"},[null===t.scan.scan?e("submit-button",{attrs:{type:"button","css-class":"sui-button-blue",state:t.state},on:{click:t.newScan}},[t._v("\n "+t._s(t.__("New Scan"))+"\n ")]):"init"===t.scan.scan.status||"progress"===t.scan.scan.status?e("i",{staticClass:"sui-icon-loader sui-loading"}):0===t.scan.count?e("i",{staticClass:"sui-icon-check-tick sui-success"}):e("span",{staticClass:"sui-tag sui-tag-error"},[t._v(t._s(t.scan.count))])],1)]),t._v(" "),e("li",[e("span",{staticClass:"sui-list-label"},[t._v(t._s(t.__("Last Lockout")))]),t._v(" "),e("span",{staticClass:"sui-list-detail"},[t._v(t._s(t.ip_lockout.last_lockout))])])])])]),t._v(" "),e("div",{staticClass:"sui-row"},[e("div",{staticClass:"sui-col-md-6"},[e("security-tweaks"),t._v(" "),0===t.is_free&&!0===t.queue_waf?e("waf"):t._e(),t._v(" "),1===t.is_free?e("waf_free"):t._e(),t._v(" "),0===t.is_free?e("blacklist"):1===t.is_free?e("blacklist-free"):t._e(),t._v(" "),e("advanced-tools")],1),t._v(" "),e("div",{staticClass:"sui-col-md-6"},[0===t.is_free?e("file-scanning",{ref:"file-scanning",on:{scanCanceled:t.scanCanceled,scanCompleted:t.scanCompleted}}):1===t.is_free?e("file-scanning-free",{ref:"file-scanning",attrs:{scanCompleted:"scanCompleted"},on:{scanCanceled:t.scanCanceled}}):t._e(),t._v(" "),e("ip-lockout"),t._v(" "),0===t.is_free&&t.queue_waf?e("audit"):1===t.is_free?e("audit-free"):t._e(),t._v(" "),e("two-fa"),t._v(" "),0===t.is_free?e("report"):1===t.is_free?e("report-free"):t._e()],1)]),t._v(" "),1===t.is_free?e("cross-sale"):t._e(),t._v(" "),e("app-footer")],1),t._v(" "),1===t.quick_setup&&0===t.is_free?e("quick-setup"):1===t.quick_setup&&1===t.is_free?e("quick-setup-free"):1==t.show_features?e("waf-modal"):t._e()],1)}),[],!1,null,null,null).exports,N=e("./src/component/overlay.vue"),G=e("./src/component/submit-button.vue"),Y=e("./src/component/footer.vue"),B=e("./src/component/doc-link.vue"),Q=e("./src/component/summary-box.vue");a.a.component("overlay",N.a),a.a.component("submit-button",G.a),a.a.component("app-footer",Y.a),a.a.component("doc-link",B.a),a.a.component("summary-box",Q.a);new a.a({el:"#defender",components:{dashboard:V},render:function(t){return t(V)}})},"./src/helper/base_hepler.js":function(t,s,e){"use strict";var i=e("./node_modules/xss/lib/index.js"),a=function(t,s){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,s){var e=[],i=!0,a=!1,n=void 0;try{for(var o,r=t[Symbol.iterator]();!(i=(o=r.next()).done)&&(e.push(o.value),!s||e.length!==s);i=!0);}catch(t){a=!0,n=t}finally{try{!i&&r.return&&r.return()}finally{if(a)throw n}}return e}(t,s);throw new TypeError("Invalid attempt to destructure non-iterable instance")},n=wp.i18n,o={whiteList:{a:["href","title","target"],span:["class"],strong:["*"]},safeAttrValue:function(t,s,e,a){return"a"===t&&"href"===s&&"%s"===e?"%s":Object(i.safeAttrValue)(t,s,e,a)}},r=new i.FilterXSS(o),l=[];s.a={methods:{__:function(t){var s=n.__(t,"wpdef");return r.process(s)},xss:function(t){return r.process(t)},vsprintf:function(t){return n.sprintf.apply(null,arguments)},siteUrl:function(t){return void 0!==t?defender.site_url+t:defender.site_url},adminUrl:function(t){return void 0!==t?defender.admin_url+t:defender.admin_url},assetUrl:function(t){return defender.defender_url+t},maybeHighContrast:function(){return{"sui-color-accessible":!0===defender.misc.high_contrast}},maybeHideBranding:function(){return defender.whitelabel.hide_branding},isWhitelabelEnabled:function(){return defender.whitelabel.enabled},campaign_url:function(t){return"https://premium.wpmudev.org/project/wp-defender/?utm_source=defender&utm_medium=plugin&utm_campaign="+t},campaignUrl:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"https://premium.wpmudev.org/"+t+"?utm_source=defender&utm_medium=plugin&utm_campaign="+s},httpRequest:function(t,s,e,i,a){var n=this;void 0===a&&(this.state.on_saving=!0);var o=ajaxurl+"?action="+this.endpoints[s]+"&_wpnonce="+this.nonces[s],r=jQuery.ajax({url:o,method:t,data:e,success:function(t){var s=t.data;n.state.on_saving=!1,void 0!==s&&void 0!==s.message&&(t.success?Defender.showNotification("success",s.message):Defender.showNotification("error",s.message)),void 0!==i&&i(t)}});l.push(r)},httpGetRequest:function(t,s,e,i){this.httpRequest("get",t,s,e,i)},httpPostRequest:function(t,s,e,i){this.httpRequest("post",t,s,e,i)},abortAllRequests:function(){for(var t=0;t<l.length;t++)l[t].abort()},getQueryStringParams:function(t){return t?(/^[?#]/.test(t)?t.slice(1):t).split("&").reduce((function(t,s){var e=s.split("="),i=a(e,2),n=i[0],o=i[1];return t[n]=o?decodeURIComponent(o.replace(/\+/g," ")):"",t}),{}):{}},rebindSUI:function(){jQuery("select:not([multiple])").each((function(){SUI.suiSelect(this)})),jQuery(".sui-accordion").each((function(){SUI.suiAccordion(this)}));var t=jQuery(".sui-wrap");SUI.dialogs={},jQuery(".sui-dialog").each((function(){SUI.dialogs[this.id]=new A11yDialog(this,t)}))}}}},vue:function(t,s){t.exports=Vue}});
|
1 |
+
!function(t){var s=window.webpackHotUpdate;window.webpackHotUpdate=function(t,e){!function(t,s){if(!w[t]||!C[t])return;for(var e in C[t]=!1,s)Object.prototype.hasOwnProperty.call(s,e)&&(h[e]=s[e]);0==--m&&0===g&&S()}(t,e),s&&s(t,e)};var e,i=!0,a="aa2de61bdce813924e40",n={},o=[],r=[];function l(t){var s=A[t];if(!s)return E;var i=function(i){return s.hot.active?(A[i]?-1===A[i].parents.indexOf(t)&&A[i].parents.push(t):(o=[t],e=i),-1===s.children.indexOf(i)&&s.children.push(i)):(console.warn("[HMR] unexpected require("+i+") from disposed module "+t),o=[]),E(i)},a=function(t){return{configurable:!0,enumerable:!0,get:function(){return E[t]},set:function(s){E[t]=s}}};for(var n in E)Object.prototype.hasOwnProperty.call(E,n)&&"e"!==n&&"t"!==n&&Object.defineProperty(i,n,a(n));return i.e=function(t){return"ready"===d&&_("prepare"),g++,E.e(t).then(s,(function(t){throw s(),t}));function s(){g--,"prepare"===d&&(b[t]||x(t),0===g&&0===m&&S())}},i.t=function(t,s){return 1&s&&(t=i(t)),E.t(t,-2&s)},i}function c(s){var i={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:e!==s,active:!0,accept:function(t,s){if(void 0===t)i._selfAccepted=!0;else if("function"==typeof t)i._selfAccepted=t;else if("object"==typeof t)for(var e=0;e<t.length;e++)i._acceptedDependencies[t[e]]=s||function(){};else i._acceptedDependencies[t]=s||function(){}},decline:function(t){if(void 0===t)i._selfDeclined=!0;else if("object"==typeof t)for(var s=0;s<t.length;s++)i._declinedDependencies[t[s]]=!0;else i._declinedDependencies[t]=!0},dispose:function(t){i._disposeHandlers.push(t)},addDisposeHandler:function(t){i._disposeHandlers.push(t)},removeDisposeHandler:function(t){var s=i._disposeHandlers.indexOf(t);s>=0&&i._disposeHandlers.splice(s,1)},invalidate:function(){switch(this._selfInvalidated=!0,d){case"idle":(h={})[s]=t[s],_("ready");break;case"ready":j(s);break;case"prepare":case"check":case"dispose":case"apply":(v=v||[]).push(s)}},check:k,apply:T,status:function(t){if(!t)return d;u.push(t)},addStatusHandler:function(t){u.push(t)},removeStatusHandler:function(t){var s=u.indexOf(t);s>=0&&u.splice(s,1)},data:n[s]};return e=void 0,i}var u=[],d="idle";function _(t){d=t;for(var s=0;s<u.length;s++)u[s].call(null,t)}var p,h,f,v,m=0,g=0,b={},C={},w={};function y(t){return+t+""===t?+t:t}function k(t){if("idle"!==d)throw new Error("check() is only allowed in idle status");return i=t,_("check"),(s=1e4,s=s||1e4,new Promise((function(t,e){if("undefined"==typeof XMLHttpRequest)return e(new Error("No browser support"));try{var i=new XMLHttpRequest,n=E.p+""+a+".hot-update.json";i.open("GET",n,!0),i.timeout=s,i.send(null)}catch(t){return e(t)}i.onreadystatechange=function(){if(4===i.readyState)if(0===i.status)e(new Error("Manifest request to "+n+" timed out."));else if(404===i.status)t();else if(200!==i.status&&304!==i.status)e(new Error("Manifest request to "+n+" failed."));else{try{var s=JSON.parse(i.responseText)}catch(t){return void e(t)}t(s)}}}))).then((function(t){if(!t)return _(P()?"ready":"idle"),null;C={},b={},w=t.c,f=t.h,_("prepare");var s=new Promise((function(t,s){p={resolve:t,reject:s}}));h={};return x(2),"prepare"===d&&0===g&&0===m&&S(),s}));var s}function x(t){w[t]?(C[t]=!0,m++,function(t){var s=document.createElement("script");s.charset="utf-8",s.src=E.p+""+t+"."+a+".hot-update.js",document.head.appendChild(s)}(t)):b[t]=!0}function S(){_("ready");var t=p;if(p=null,t)if(i)Promise.resolve().then((function(){return T(i)})).then((function(s){t.resolve(s)}),(function(s){t.reject(s)}));else{var s=[];for(var e in h)Object.prototype.hasOwnProperty.call(h,e)&&s.push(y(e));t.resolve(s)}}function T(s){if("ready"!==d)throw new Error("apply() is only allowed in ready status");return function s(i){var r,l,c,u,d;function p(t){for(var s=[t],e={},i=s.map((function(t){return{chain:[t],id:t}}));i.length>0;){var a=i.pop(),n=a.id,o=a.chain;if((u=A[n])&&(!u.hot._selfAccepted||u.hot._selfInvalidated)){if(u.hot._selfDeclined)return{type:"self-declined",chain:o,moduleId:n};if(u.hot._main)return{type:"unaccepted",chain:o,moduleId:n};for(var r=0;r<u.parents.length;r++){var l=u.parents[r],c=A[l];if(c){if(c.hot._declinedDependencies[n])return{type:"declined",chain:o.concat([l]),moduleId:n,parentId:l};-1===s.indexOf(l)&&(c.hot._acceptedDependencies[n]?(e[l]||(e[l]=[]),m(e[l],[n])):(delete e[l],s.push(l),i.push({chain:o.concat([l]),id:l})))}}}}return{type:"accepted",moduleId:t,outdatedModules:s,outdatedDependencies:e}}function m(t,s){for(var e=0;e<s.length;e++){var i=s[e];-1===t.indexOf(i)&&t.push(i)}}P();var g={},b=[],C={},k=function(){console.warn("[HMR] unexpected require("+S.moduleId+") to disposed module")};for(var x in h)if(Object.prototype.hasOwnProperty.call(h,x)){var S;d=y(x),S=h[x]?p(d):{type:"disposed",moduleId:x};var T=!1,j=!1,I=!1,D="";switch(S.chain&&(D="\nUpdate propagation: "+S.chain.join(" -> ")),S.type){case"self-declined":i.onDeclined&&i.onDeclined(S),i.ignoreDeclined||(T=new Error("Aborted because of self decline: "+S.moduleId+D));break;case"declined":i.onDeclined&&i.onDeclined(S),i.ignoreDeclined||(T=new Error("Aborted because of declined dependency: "+S.moduleId+" in "+S.parentId+D));break;case"unaccepted":i.onUnaccepted&&i.onUnaccepted(S),i.ignoreUnaccepted||(T=new Error("Aborted because "+d+" is not accepted"+D));break;case"accepted":i.onAccepted&&i.onAccepted(S),j=!0;break;case"disposed":i.onDisposed&&i.onDisposed(S),I=!0;break;default:throw new Error("Unexception type "+S.type)}if(T)return _("abort"),Promise.reject(T);if(j)for(d in C[d]=h[d],m(b,S.outdatedModules),S.outdatedDependencies)Object.prototype.hasOwnProperty.call(S.outdatedDependencies,d)&&(g[d]||(g[d]=[]),m(g[d],S.outdatedDependencies[d]));I&&(m(b,[S.moduleId]),C[d]=k)}var $,O=[];for(l=0;l<b.length;l++)d=b[l],A[d]&&A[d].hot._selfAccepted&&C[d]!==k&&!A[d].hot._selfInvalidated&&O.push({module:d,parents:A[d].parents.slice(),errorHandler:A[d].hot._selfAccepted});_("dispose"),Object.keys(w).forEach((function(t){!1===w[t]&&function(t){delete installedChunks[t]}(t)}));var M,L,U=b.slice();for(;U.length>0;)if(d=U.pop(),u=A[d]){var W={},H=u.hot._disposeHandlers;for(c=0;c<H.length;c++)(r=H[c])(W);for(n[d]=W,u.hot.active=!1,delete A[d],delete g[d],c=0;c<u.children.length;c++){var q=A[u.children[c]];q&&(($=q.parents.indexOf(d))>=0&&q.parents.splice($,1))}}for(d in g)if(Object.prototype.hasOwnProperty.call(g,d)&&(u=A[d]))for(L=g[d],c=0;c<L.length;c++)M=L[c],($=u.children.indexOf(M))>=0&&u.children.splice($,1);_("apply"),void 0!==f&&(a=f,f=void 0);for(d in h=void 0,C)Object.prototype.hasOwnProperty.call(C,d)&&(t[d]=C[d]);var R=null;for(d in g)if(Object.prototype.hasOwnProperty.call(g,d)&&(u=A[d])){L=g[d];var F=[];for(l=0;l<L.length;l++)if(M=L[l],r=u.hot._acceptedDependencies[M]){if(-1!==F.indexOf(r))continue;F.push(r)}for(l=0;l<F.length;l++){r=F[l];try{r(L)}catch(t){i.onErrored&&i.onErrored({type:"accept-errored",moduleId:d,dependencyId:L[l],error:t}),i.ignoreErrored||R||(R=t)}}}for(l=0;l<O.length;l++){var N=O[l];d=N.module,o=N.parents,e=d;try{E(d)}catch(t){if("function"==typeof N.errorHandler)try{N.errorHandler(t)}catch(s){i.onErrored&&i.onErrored({type:"self-accept-error-handler-errored",moduleId:d,error:s,originalError:t}),i.ignoreErrored||R||(R=s),R||(R=t)}else i.onErrored&&i.onErrored({type:"self-accept-errored",moduleId:d,error:t}),i.ignoreErrored||R||(R=t)}}if(R)return _("fail"),Promise.reject(R);if(v)return s(i).then((function(t){return b.forEach((function(s){t.indexOf(s)<0&&t.push(s)})),t}));return _("idle"),new Promise((function(t){t(b)}))}(s=s||{})}function P(){if(v)return h||(h={}),v.forEach(j),v=void 0,!0}function j(s){Object.prototype.hasOwnProperty.call(h,s)||(h[s]=t[s])}var A={};function E(s){if(A[s])return A[s].exports;var e=A[s]={i:s,l:!1,exports:{},hot:c(s),parents:(r=o,o=[],r),children:[]};return t[s].call(e.exports,e,e.exports,l(s)),e.l=!0,e.exports}E.m=t,E.c=A,E.d=function(t,s,e){E.o(t,s)||Object.defineProperty(t,s,{enumerable:!0,get:e})},E.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},E.t=function(t,s){if(1&s&&(t=E(t)),8&s)return t;if(4&s&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(E.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&s&&"string"!=typeof t)for(var i in t)E.d(e,i,function(s){return t[s]}.bind(null,i));return e},E.n=function(t){var s=t&&t.__esModule?function(){return t.default}:function(){return t};return E.d(s,"a",s),s},E.o=function(t,s){return Object.prototype.hasOwnProperty.call(t,s)},E.p="",E.h=function(){return a},l("./src/dashboard.js")(E.s="./src/dashboard.js")}({"./node_modules/css-loader/index.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/module/dashboard/component/tutorial.vue?vue&type=style&index=0&id=111cbf2d&scoped=true&lang=css&":function(t,s,e){(t.exports=e("./node_modules/css-loader/lib/css-base.js")(!1)).push([t.i,"\n.slider__control[data-v-111cbf2d] {\n position: absolute;\n top: 50%;\n display: none;\n}\n.slider__control_left[data-v-111cbf2d] {\n left: 15px;\n}\n.slider__control_right[data-v-111cbf2d] {\n right: 15px;\n}\n@media (min-width: 783px) and (max-width: 1199px){\n.slider__control_show[data-v-111cbf2d] {\n display: flex;\n}\n}\n",""])},"./node_modules/css-loader/lib/css-base.js":function(t,s){t.exports=function(t){var s=[];return s.toString=function(){return this.map((function(s){var e=function(t,s){var e=t[1]||"",i=t[3];if(!i)return e;if(s&&"function"==typeof btoa){var a=(o=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),n=i.sources.map((function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"}));return[e].concat(n).concat([a]).join("\n")}var o;return[e].join("\n")}(s,t);return s[2]?"@media "+s[2]+"{"+e+"}":e})).join("")},s.i=function(t,e){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},a=0;a<this.length;a++){var n=this[a][0];"number"==typeof n&&(i[n]=!0)}for(a=0;a<t.length;a++){var o=t[a];"number"==typeof o[0]&&i[o[0]]||(e&&!o[2]?o[2]=e:e&&(o[2]="("+o[2]+") and ("+e+")"),s.push(o))}},s}},"./node_modules/cssfilter/lib/css.js":function(t,s,e){var i=e("./node_modules/cssfilter/lib/default.js"),a=e("./node_modules/cssfilter/lib/parser.js");e("./node_modules/cssfilter/lib/util.js");function n(t){return null==t}function o(t){(t=function(t){var s={};for(var e in t)s[e]=t[e];return s}(t||{})).whiteList=t.whiteList||i.whiteList,t.onAttr=t.onAttr||i.onAttr,t.onIgnoreAttr=t.onIgnoreAttr||i.onIgnoreAttr,t.safeAttrValue=t.safeAttrValue||i.safeAttrValue,this.options=t}o.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var s=this.options,e=s.whiteList,i=s.onAttr,o=s.onIgnoreAttr,r=s.safeAttrValue;return a(t,(function(t,s,a,l,c){var u=e[a],d=!1;if(!0===u?d=u:"function"==typeof u?d=u(l):u instanceof RegExp&&(d=u.test(l)),!0!==d&&(d=!1),l=r(a,l)){var _,p={position:s,sourcePosition:t,source:c,isWhite:d};return d?n(_=i(a,l,p))?a+":"+l:_:n(_=o(a,l,p))?void 0:_}}))},t.exports=o},"./node_modules/cssfilter/lib/default.js":function(t,s){function e(){var t={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return t}var i=/javascript\s*\:/gim;s.whiteList=e(),s.getDefaultWhiteList=e,s.onAttr=function(t,s,e){},s.onIgnoreAttr=function(t,s,e){},s.safeAttrValue=function(t,s){return i.test(s)?"":s}},"./node_modules/cssfilter/lib/index.js":function(t,s,e){var i=e("./node_modules/cssfilter/lib/default.js"),a=e("./node_modules/cssfilter/lib/css.js");for(var n in(s=t.exports=function(t,s){return new a(s).process(t)}).FilterCSS=a,i)s[n]=i[n];"undefined"!=typeof window&&(window.filterCSS=t.exports)},"./node_modules/cssfilter/lib/parser.js":function(t,s,e){var i=e("./node_modules/cssfilter/lib/util.js");t.exports=function(t,s){";"!==(t=i.trimRight(t))[t.length-1]&&(t+=";");var e=t.length,a=!1,n=0,o=0,r="";function l(){if(!a){var e=i.trim(t.slice(n,o)),l=e.indexOf(":");if(-1!==l){var c=i.trim(e.slice(0,l)),u=i.trim(e.slice(l+1));if(c){var d=s(n,r.length,c,u,e);d&&(r+=d+"; ")}}}n=o+1}for(;o<e;o++){var c=t[o];if("/"===c&&"*"===t[o+1]){var u=t.indexOf("*/",o+2);if(-1===u)break;n=(o=u+1)+1,a=!1}else"("===c?a=!0:")"===c?a=!1:";"===c?a||l():"\n"===c&&l()}return i.trim(r)}},"./node_modules/cssfilter/lib/util.js":function(t,s){t.exports={indexOf:function(t,s){var e,i;if(Array.prototype.indexOf)return t.indexOf(s);for(e=0,i=t.length;e<i;e++)if(t[e]===s)return e;return-1},forEach:function(t,s,e){var i,a;if(Array.prototype.forEach)return t.forEach(s,e);for(i=0,a=t.length;i<a;i++)s.call(e,t[i],i,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(t){return String.prototype.trimRight?t.trimRight():t.replace(/(\s*$)/g,"")}}},"./node_modules/vue-loader/lib/runtime/componentNormalizer.js":function(t,s,e){"use strict";function i(t,s,e,i,a,n,o,r){var l,c="function"==typeof t?t.options:t;if(s&&(c.render=s,c.staticRenderFns=e,c._compiled=!0),i&&(c.functional=!0),n&&(c._scopeId="data-v-"+n),o?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),a&&a.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},c._ssrRegister=l):a&&(l=r?function(){a.call(this,this.$root.$options.shadowRoot)}:a),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,s){return l.call(s),u(t,s)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}e.d(s,"a",(function(){return i}))},"./node_modules/vue-style-loader/index.js!./node_modules/css-loader/index.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/module/dashboard/component/tutorial.vue?vue&type=style&index=0&id=111cbf2d&scoped=true&lang=css&":function(t,s,e){var i=e("./node_modules/css-loader/index.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/module/dashboard/component/tutorial.vue?vue&type=style&index=0&id=111cbf2d&scoped=true&lang=css&");"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);(0,e("./node_modules/vue-style-loader/lib/addStylesClient.js").default)("7b61ed9e",i,!0,{})},"./node_modules/vue-style-loader/lib/addStylesClient.js":function(t,s,e){"use strict";function i(t,s){for(var e=[],i={},a=0;a<s.length;a++){var n=s[a],o=n[0],r={id:t+":"+a,css:n[1],media:n[2],sourceMap:n[3]};i[o]?i[o].parts.push(r):e.push(i[o]={id:o,parts:[r]})}return e}e.r(s),e.d(s,"default",(function(){return p}));var a="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!a)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var n={},o=a&&(document.head||document.getElementsByTagName("head")[0]),r=null,l=0,c=!1,u=function(){},d=null,_="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function p(t,s,e,a){c=e,d=a||{};var o=i(t,s);return h(o),function(s){for(var e=[],a=0;a<o.length;a++){var r=o[a];(l=n[r.id]).refs--,e.push(l)}s?h(o=i(t,s)):o=[];for(a=0;a<e.length;a++){var l;if(0===(l=e[a]).refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete n[l.id]}}}}function h(t){for(var s=0;s<t.length;s++){var e=t[s],i=n[e.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](e.parts[a]);for(;a<e.parts.length;a++)i.parts.push(v(e.parts[a]));i.parts.length>e.parts.length&&(i.parts.length=e.parts.length)}else{var o=[];for(a=0;a<e.parts.length;a++)o.push(v(e.parts[a]));n[e.id]={id:e.id,refs:1,parts:o}}}}function f(){var t=document.createElement("style");return t.type="text/css",o.appendChild(t),t}function v(t){var s,e,i=document.querySelector('style[data-vue-ssr-id~="'+t.id+'"]');if(i){if(c)return u;i.parentNode.removeChild(i)}if(_){var a=l++;i=r||(r=f()),s=b.bind(null,i,a,!1),e=b.bind(null,i,a,!0)}else i=f(),s=C.bind(null,i),e=function(){i.parentNode.removeChild(i)};return s(t),function(i){if(i){if(i.css===t.css&&i.media===t.media&&i.sourceMap===t.sourceMap)return;s(t=i)}else e()}}var m,g=(m=[],function(t,s){return m[t]=s,m.filter(Boolean).join("\n")});function b(t,s,e,i){var a=e?"":i.css;if(t.styleSheet)t.styleSheet.cssText=g(s,a);else{var n=document.createTextNode(a),o=t.childNodes;o[s]&&t.removeChild(o[s]),o.length?t.insertBefore(n,o[s]):t.appendChild(n)}}function C(t,s){var e=s.css,i=s.media,a=s.sourceMap;if(i&&t.setAttribute("media",i),d.ssrId&&t.setAttribute("data-vue-ssr-id",s.id),a&&(e+="\n/*# sourceURL="+a.sources[0]+" */",e+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},"./node_modules/xss/lib/default.js":function(t,s,e){var i=e("./node_modules/cssfilter/lib/index.js").FilterCSS,a=e("./node_modules/cssfilter/lib/index.js").getDefaultWhiteList,n=e("./node_modules/xss/lib/util.js");function o(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]}}var r=new i;function l(t){return t.replace(c,"<").replace(u,">")}var c=/</g,u=/>/g,d=/"/g,_=/"/g,p=/&#([a-zA-Z0-9]*);?/gim,h=/:?/gim,f=/&newline;?/gim,v=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,m=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,g=/u\s*r\s*l\s*\(.*/gi;function b(t){return t.replace(d,""")}function C(t){return t.replace(_,'"')}function w(t){return t.replace(p,(function(t,s){return"x"===s[0]||"X"===s[0]?String.fromCharCode(parseInt(s.substr(1),16)):String.fromCharCode(parseInt(s,10))}))}function y(t){return t.replace(h,":").replace(f," ")}function k(t){for(var s="",e=0,i=t.length;e<i;e++)s+=t.charCodeAt(e)<32?" ":t.charAt(e);return n.trim(s)}function x(t){return t=k(t=y(t=w(t=C(t))))}function S(t){return t=l(t=b(t))}var T=/<!--[\s\S]*?-->/g;s.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]},s.getDefaultWhiteList=o,s.onTag=function(t,s,e){},s.onIgnoreTag=function(t,s,e){},s.onTagAttr=function(t,s,e){},s.onIgnoreTagAttr=function(t,s,e){},s.safeAttrValue=function(t,s,e,i){if(e=x(e),"href"===s||"src"===s){if("#"===(e=n.trim(e)))return"#";if("http://"!==e.substr(0,7)&&"https://"!==e.substr(0,8)&&"mailto:"!==e.substr(0,7)&&"tel:"!==e.substr(0,4)&&"#"!==e[0]&&"/"!==e[0])return""}else if("background"===s){if(v.lastIndex=0,v.test(e))return""}else if("style"===s){if(m.lastIndex=0,m.test(e))return"";if(g.lastIndex=0,g.test(e)&&(v.lastIndex=0,v.test(e)))return"";!1!==i&&(e=(i=i||r).process(e))}return e=S(e)},s.escapeHtml=l,s.escapeQuote=b,s.unescapeQuote=C,s.escapeHtmlEntities=w,s.escapeDangerHtml5Entities=y,s.clearNonPrintableCharacter=k,s.friendlyAttrValue=x,s.escapeAttrValue=S,s.onIgnoreTagStripAll=function(){return""},s.StripTagBody=function(t,s){"function"!=typeof s&&(s=function(){});var e=!Array.isArray(t),i=[],a=!1;return{onIgnoreTag:function(o,r,l){if(function(s){return!!e||-1!==n.indexOf(t,s)}(o)){if(l.isClosing){var c="[/removed]",u=l.position+c.length;return i.push([!1!==a?a:l.position,u]),a=!1,c}return a||(a=l.position),"[removed]"}return s(o,r,l)},remove:function(t){var s="",e=0;return n.forEach(i,(function(i){s+=t.slice(e,i[0]),e=i[1]})),s+=t.slice(e)}}},s.stripCommentTag=function(t){return t.replace(T,"")},s.stripBlankChar=function(t){var s=t.split("");return(s=s.filter((function(t){var s=t.charCodeAt(0);return 127!==s&&(!(s<=31)||(10===s||13===s))}))).join("")},s.cssFilter=r,s.getDefaultCSSWhiteList=a},"./node_modules/xss/lib/index.js":function(t,s,e){var i=e("./node_modules/xss/lib/default.js"),a=e("./node_modules/xss/lib/parser.js"),n=e("./node_modules/xss/lib/xss.js");function o(t,s){return new n(s).process(t)}for(var r in(s=t.exports=o).filterXSS=o,s.FilterXSS=n,i)s[r]=i[r];for(var r in a)s[r]=a[r];"undefined"!=typeof window&&(window.filterXSS=t.exports),"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=t.exports)},"./node_modules/xss/lib/parser.js":function(t,s,e){var i=e("./node_modules/xss/lib/util.js");function a(t){var s=i.spaceIndex(t);if(-1===s)var e=t.slice(1,-1);else e=t.slice(1,s+1);return"/"===(e=i.trim(e).toLowerCase()).slice(0,1)&&(e=e.slice(1)),"/"===e.slice(-1)&&(e=e.slice(0,-1)),e}function n(t){return"</"===t.slice(0,2)}var o=/[^a-zA-Z0-9_:\.\-]/gim;function r(t,s){for(;s<t.length;s++){var e=t[s];if(" "!==e)return"="===e?s:-1}}function l(t,s){for(;s>0;s--){var e=t[s];if(" "!==e)return"="===e?s:-1}}function c(t){return function(t){return'"'===t[0]&&'"'===t[t.length-1]||"'"===t[0]&&"'"===t[t.length-1]}(t)?t.substr(1,t.length-2):t}s.parseTag=function(t,s,e){var i="",o=0,r=!1,l=!1,c=0,u=t.length,d="",_="";for(c=0;c<u;c++){var p=t.charAt(c);if(!1===r){if("<"===p){r=c;continue}}else if(!1===l){if("<"===p){i+=e(t.slice(o,c)),r=c,o=c;continue}if(">"===p){i+=e(t.slice(o,r)),d=a(_=t.slice(r,c+1)),i+=s(r,i.length,d,_,n(_)),o=c+1,r=!1;continue}if(('"'===p||"'"===p)&&"="===t.charAt(c-1)){l=p;continue}}else if(p===l){l=!1;continue}}return o<t.length&&(i+=e(t.substr(o))),i},s.parseAttr=function(t,s){var e=0,a=[],n=!1,u=t.length;function d(t,e){if(!((t=(t=i.trim(t)).replace(o,"").toLowerCase()).length<1)){var n=s(t,e||"");n&&a.push(n)}}for(var _=0;_<u;_++){var p,h=t.charAt(_);if(!1!==n||"="!==h)if(!1===n||_!==e||'"'!==h&&"'"!==h||"="!==t.charAt(_-1))if(/\s|\n|\t/.test(h)){if(t=t.replace(/\s|\n|\t/g," "),!1===n){if(-1===(p=r(t,_))){d(i.trim(t.slice(e,_))),n=!1,e=_+1;continue}_=p-1;continue}if(-1===(p=l(t,_-1))){d(n,c(i.trim(t.slice(e,_)))),n=!1,e=_+1;continue}}else;else{if(-1===(p=t.indexOf(h,_+1)))break;d(n,i.trim(t.slice(e+1,p))),n=!1,e=(_=p)+1}else n=t.slice(e,_),e=_+1}return e<t.length&&(!1===n?d(t.slice(e)):d(n,c(i.trim(t.slice(e))))),i.trim(a.join(" "))}},"./node_modules/xss/lib/util.js":function(t,s){t.exports={indexOf:function(t,s){var e,i;if(Array.prototype.indexOf)return t.indexOf(s);for(e=0,i=t.length;e<i;e++)if(t[e]===s)return e;return-1},forEach:function(t,s,e){var i,a;if(Array.prototype.forEach)return t.forEach(s,e);for(i=0,a=t.length;i<a;i++)s.call(e,t[i],i,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(t){var s=/\s|\n|\t/.exec(t);return s?s.index:-1}}},"./node_modules/xss/lib/xss.js":function(t,s,e){var i=e("./node_modules/cssfilter/lib/index.js").FilterCSS,a=e("./node_modules/xss/lib/default.js"),n=e("./node_modules/xss/lib/parser.js"),o=n.parseTag,r=n.parseAttr,l=e("./node_modules/xss/lib/util.js");function c(t){return null==t}function u(t){(t=function(t){var s={};for(var e in t)s[e]=t[e];return s}(t||{})).stripIgnoreTag&&(t.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),t.onIgnoreTag=a.onIgnoreTagStripAll),t.whiteList=t.whiteList||a.whiteList,t.onTag=t.onTag||a.onTag,t.onTagAttr=t.onTagAttr||a.onTagAttr,t.onIgnoreTag=t.onIgnoreTag||a.onIgnoreTag,t.onIgnoreTagAttr=t.onIgnoreTagAttr||a.onIgnoreTagAttr,t.safeAttrValue=t.safeAttrValue||a.safeAttrValue,t.escapeHtml=t.escapeHtml||a.escapeHtml,this.options=t,!1===t.css?this.cssFilter=!1:(t.css=t.css||{},this.cssFilter=new i(t.css))}u.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var s=this.options,e=s.whiteList,i=s.onTag,n=s.onIgnoreTag,u=s.onTagAttr,d=s.onIgnoreTagAttr,_=s.safeAttrValue,p=s.escapeHtml,h=this.cssFilter;s.stripBlankChar&&(t=a.stripBlankChar(t)),s.allowCommentTag||(t=a.stripCommentTag(t));var f=!1;if(s.stripIgnoreTagBody){f=a.StripTagBody(s.stripIgnoreTagBody,n);n=f.onIgnoreTag}var v=o(t,(function(t,s,a,o,f){var v,m={sourcePosition:t,position:s,isClosing:f,isWhite:e.hasOwnProperty(a)};if(!c(v=i(a,o,m)))return v;if(m.isWhite){if(m.isClosing)return"</"+a+">";var g=function(t){var s=l.spaceIndex(t);if(-1===s)return{html:"",closing:"/"===t[t.length-2]};var e="/"===(t=l.trim(t.slice(s+1,-1)))[t.length-1];return e&&(t=l.trim(t.slice(0,-1))),{html:t,closing:e}}(o),b=e[a],C=r(g.html,(function(t,s){var e,i=-1!==l.indexOf(b,t);return c(e=u(a,t,s,i))?i?(s=_(a,t,s,h))?t+'="'+s+'"':t:c(e=d(a,t,s,i))?void 0:e:e}));o="<"+a;return C&&(o+=" "+C),g.closing&&(o+=" /"),o+=">"}return c(v=n(a,o,m))?p(o):v}),p);return f&&(v=f.remove(v)),v},t.exports=u},"./src/component/doc-link.vue":function(t,s,e){"use strict";var i={mixins:[e("./src/helper/base_hepler.js").a],name:"doc-link",props:["link"],data:function(){return{whitelabel:defender.whitelabel,is_free:parseInt(defender.is_free)}}},a=e("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),n=Object(a.a)(i,(function(){var t=this.$createElement,s=this._self._c||t;return 1!==this.is_free&&!1===this.whitelabel.hide_doc_link?s("div",{staticClass:"sui-actions-right"},[s("a",{staticClass:"sui-button sui-button-ghost",attrs:{href:this.link,target:"_blank"}},[s("i",{staticClass:"sui-icon-academy"}),this._v(" "+this._s(this.__("View Documentation"))+"\n ")])]):this._e()}),[],!1,null,null,null);s.a=n.exports},"./src/component/footer.vue":function(t,s,e){"use strict";var i={data:function(){return{whitelabel:defender.whitelabel,is_free:parseInt(defender.is_free)}}},a=e("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),n=Object(a.a)(i,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",[!0===t.whitelabel.change_footer?e("div",{staticClass:"sui-footer"},[t._v("\n "+t._s(t.whitelabel.footer_text)+"\n ")]):e("div",{staticClass:"sui-footer"},[t._v("Made with "),e("i",{staticClass:"sui-icon-heart"}),t._v(" by WPMU DEV")]),t._v(" "),!1===t.whitelabel.hide_doc_link?e("div",[1===t.is_free?e("ul",{staticClass:"sui-footer-nav"},[t._m(0),t._v(" "),t._m(1),t._v(" "),t._m(2),t._v(" "),t._m(3),t._v(" "),t._m(4),t._v(" "),t._m(5),t._v(" "),t._m(6),t._v(" "),t._m(7)]):e("ul",{staticClass:"sui-footer-nav"},[t._m(8),t._v(" "),t._m(9),t._v(" "),t._m(10),t._v(" "),t._m(11),t._v(" "),t._m(12),t._v(" "),t._m(13),t._v(" "),t._m(14),t._v(" "),t._m(15)]),t._v(" "),t._m(16)]):t._e()])}),[function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://profiles.wordpress.org/wpmudev#content-plugins",target:"_blank"}},[this._v("Free\n Plugins")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://premium.wpmudev.org/features/",target:"_blank"}},[this._v("Membership")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://premium.wpmudev.org/roadmap/",target:"_blank"}},[this._v("Roadmap")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://wordpress.org/support/plugin/plugin-name",target:"_blank"}},[this._v("Support")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://premium.wpmudev.org/docs/",target:"_blank"}},[this._v("Docs")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://premium.wpmudev.org/hub/",target:"_blank"}},[this._v("The Hub")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://premium.wpmudev.org/terms-of-service/",target:"_blank"}},[this._v("Terms of Service")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://incsub.com/privacy-policy/",target:"_blank"}},[this._v("Privacy Policy")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://premium.wpmudev.org/hub/",target:"_blank"}},[this._v("The Hub")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://premium.wpmudev.org/projects/category/plugins/",target:"_blank"}},[this._v("Plugins")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://premium.wpmudev.org/roadmap/",target:"_blank"}},[this._v("Roadmap")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://premium.wpmudev.org/hub/support/",target:"_blank"}},[this._v("Support")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://premium.wpmudev.org/docs/",target:"_blank"}},[this._v("Docs")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://premium.wpmudev.org/hub/community/",target:"_blank"}},[this._v("Community")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://premium.wpmudev.org/terms-of-service/",target:"_blank"}},[this._v("Terms of Service")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("li",[s("a",{attrs:{href:"https://incsub.com/privacy-policy/",target:"_blank"}},[this._v("Privacy Policy")])])},function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("ul",{staticClass:"sui-footer-social"},[e("li",[e("a",{attrs:{href:"https://www.facebook.com/wpmudev",target:"_blank"}},[e("i",{staticClass:"sui-icon-social-facebook",attrs:{"aria-hidden":"true"}}),t._v(" "),e("span",{staticClass:"sui-screen-reader-text"},[t._v("Facebook")])])]),t._v(" "),e("li",[e("a",{attrs:{href:"https://twitter.com/wpmudev",target:"_blank"}},[e("i",{staticClass:"sui-icon-social-twitter",attrs:{"aria-hidden":"true"}})]),t._v(" "),e("span",{staticClass:"sui-screen-reader-text"},[t._v("Twitter")])]),t._v(" "),e("li",[e("a",{attrs:{href:"https://www.instagram.com/wpmu_dev/",target:"_blank"}},[e("i",{staticClass:"sui-icon-instagram",attrs:{"aria-hidden":"true"}}),t._v(" "),e("span",{staticClass:"sui-screen-reader-text"},[t._v("Instagram")])])])])}],!1,null,null,null);s.a=n.exports},"./src/component/overlay.vue":function(t,s,e){"use strict";var i={name:"overlay"},a=e("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),n=Object(a.a)(i,(function(){var t=this.$createElement;this._self._c;return this._m(0)}),[function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"wd-overlay"},[s("i",{staticClass:"sui-icon-loader sui-loading",attrs:{"aria-hidden":"true"}})])}],!1,null,null,null);s.a=n.exports},"./src/component/submit-button.vue":function(t,s,e){"use strict";var i={name:"submit-button",props:["id","state","text","css-class","type"],computed:{getClass:function(){return"sui-button "+this.cssClass}}},a=e("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),n=Object(a.a)(i,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("button",{staticClass:"sui-button",class:[t.getClass,{"sui-button-onload":t.state.on_saving}],attrs:{id:t.id,type:t.type,disabled:t.state.on_saving},on:{click:function(s){return t.$emit("click")}}},[e("span",{staticClass:"sui-loading-text"},[t._t("default")],2),t._v(" "),e("i",{staticClass:"sui-icon-loader sui-loading",attrs:{"aria-hidden":"true"}})])}),[],!1,null,null,null);s.a=n.exports},"./src/component/summary-box.vue":function(t,s,e){"use strict";var i={mixins:[e("./src/helper/base_hepler.js").a],props:["css-class"],name:"summary-box",data:function(){return{whitelabel:defender.whitelabel}},computed:{summary_class:function(){return{"sui-unbranded":!0===this.whitelabel.hide_branding&&0===this.whitelabel.hero_image.length,"sui-rebranded":!0===this.whitelabel.hide_branding&&this.whitelabel.hero_image.length>0}},css_class:function(){return this.cssClass},rebrand_img:function(){if(this.whitelabel.hero_image.length>0)return{"background-image":"url('"+this.whitelabel.hero_image+"')"}}}},a=e("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),n=Object(a.a)(i,(function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"sui-box sui-summary",class:[this.summary_class,this.css_class],style:this.rebrand_img},[s("div",{staticClass:"sui-summary-image-space",attrs:{"aria-hidden":"true"}}),this._v(" "),this._t("default")],2)}),[],!1,null,null,null);s.a=n.exports},"./src/dashboard.js":function(t,s,e){"use strict";e.r(s);var i=e("vue"),a=e.n(i),n=e("./src/helper/base_hepler.js"),o={mixins:[n.a],name:"security-tweaks",data:function(){return{rules:dashboard.security_tweaks.rules,count:dashboard.security_tweaks.count.issues}},methods:{handleRedirect:function(t){window.location.href=this.adminUrl("admin.php?page=wdf-hardener#"+t.slug)}}},r=e("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),l=Object(r.a)(o,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box hardener-widget"},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("i",{staticClass:"sui-icon-wrench-tool",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("Security Tweaks"))+"\n ")]),t._v(" "),t.count>0?e("div",{staticClass:"sui-actions-left"},[e("div",{staticClass:"sui-tag sui-tag-warning",domProps:{textContent:t._s(t.count)}})]):t._e()]),t._v(" "),e("div",{staticClass:"sui-box-body"},[e("p",[t._v("\n "+t._s(t.__("Defender checks for basic security tweaks you can make to enhance your website’s defense against hackers and bots."))+"\n ")]),t._v(" "),0===t.count?e("div",{staticClass:"sui-notice sui-notice-success"},[e("p",[t._v("\n "+t._s(t.__("You’ve actioned all of the recommended security tweaks."))+"\n ")])]):t._e()]),t._v(" "),t.count>0?e("div",{staticClass:"sui-accordion sui-accordion-flushed no-border-bottom"},t._l(t.rules,(function(s){return e("div",{staticClass:"sui-accordion-item sui-warning",on:{click:function(e){return t.handleRedirect(s)}}},[e("div",{staticClass:"sui-accordion-item-header"},[e("div",{staticClass:"sui-accordion-item-title"},[e("i",{staticClass:"sui-icon-warning-alert sui-warning",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(s.title)+"\n "),t._m(0,!0)])])])})),0):t._e(),t._v(" "),e("div",{staticClass:"sui-box-footer"},[e("div",{staticClass:"sui-actions-left"},[e("a",{staticClass:"sui-button sui-button-ghost",attrs:{href:t.adminUrl("admin.php?page=wdf-hardener")}},[e("i",{staticClass:"sui-icon-eye",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("View All"))+"\n ")])])])])}),[function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"sui-actions-right"},[s("i",{staticClass:"sui-icon-chevron-right",attrs:{"aria-hidden":"true"}})])}],!1,null,null,null).exports,c={mixins:[n.a],name:"file-scanning",data:function(){return{scan:dashboard.scan.scan,state:{on_saving:!1,canceling:!1},nonces:dashboard.scan.nonces,endpoints:dashboard.scan.endpoints,polling_state:null,report:dashboard.scan.report}},methods:{newScan:function(){var t=this;this.httpPostRequest("newScan",{},(function(s){t.$nextTick((function(){t.scan={},t.scan.status=s.data.status,t.scan.percent=s.data.percent,t.scan.status_text=s.data.status_text,t.polling()}))}))},cancelScan:function(){if(!0!==this.state.canceling){this.abortAllRequests();var t=this;clearTimeout(this.polling_state),this.state.canceling=!0,this.httpPostRequest("cancelScan",{},(function(s){t.$nextTick((function(){t.scan=s.data.scan,t.state.canceling=!1,t.$emit("scanCanceled",t.scan)}))}))}},refreshStatus:function(){var t=this;this.httpPostRequest("processScan",{},(function(s){!1===s.success?(t.scan=s.data,t.polling()):(t.scan=s.data.scan,t.$emit("scanCompleted",t.scan,s.data.scan.count.total))}))},polling:function(){!1===this.state.canceling&&(this.polling_state=setTimeout(this.refreshStatus(),500))},resultIndicator:function(t){return t>0?'<span class="sui-tag sui-tag-error">'+t+"</span>":'<i aria-hidden="true" class="sui-icon-check-tick sui-success"></i>'}},computed:{statusText:function(){return this.scan.status_text},reportText:function(){if(!1!==this.report.enabled){var t=void 0;switch(parseInt(this.report.frequency)){case 1:t="daily";break;case 7:t="weekly";break;case 30:t="monthly"}return this.vsprintf(this.__("Automatic scans are running %s"),t)}},percent:function(){return this.scan.percent}},mounted:function(){null===this.scan||"process"!==this.scan.status&&"init"!==this.scan.status||this.polling()}},u=Object(r.a)(c,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("i",{staticClass:"sui-icon-layers",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("Malware Scanning"))+"\n ")]),t._v(" "),null!==t.scan&&"finish"===t.scan.status?e("div",{staticClass:"sui-actions-left"},[null!==t.scan&&t.scan.count.total>0?e("span",{staticClass:"sui-tag sui-tag-error"},[t._v(t._s(t.scan.count.total))]):t._e()]):t._e()]),t._v(" "),e("div",{staticClass:"sui-box-body",class:{"no-padding-bottom":null!==t.scan&&"finish"===t.scan.status}},[e("p",[t._v("\n "+t._s(t.__("Scan your website for file changes, vulnerabilities and injected code and get notified about anything suspicious."))+"\n ")]),t._v(" "),null===t.scan?e("div",[e("submit-button",{attrs:{type:"button","css-class":"sui-button-blue",state:t.state},on:{click:t.newScan}},[t._v("\n "+t._s(t.__("Run scan"))+"\n ")])],1):"process"===t.scan.status||"init"===t.scan.status?e("div",[e("div",{staticClass:"sui-progress-block"},[e("div",{staticClass:"sui-progress"},[t._m(0),t._v(" "),e("span",{staticClass:"sui-progress-text"},[e("span",{domProps:{textContent:t._s(t.percent+"%")}})]),t._v(" "),e("div",{staticClass:"sui-progress-bar",attrs:{"aria-hidden":"true"}},[e("span",{style:{width:t.percent+"%"}})])]),t._v(" "),e("button",{staticClass:"sui-button-icon sui-tooltip",attrs:{type:"button",disabled:t.state.canceling,"data-tooltip":"Cancel"},on:{click:t.cancelScan}},[e("i",{staticClass:"sui-icon-close",attrs:{"aria-hidden":"true"}})])]),t._v(" "),e("div",{staticClass:"sui-progress-state"},[e("span",{domProps:{textContent:t._s(t.statusText)}})])]):e("div",{staticClass:"sui-field-list sui-flushed no-border"},[e("div",{staticClass:"sui-field-list-body"},[e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("strong",[t._v("\n "+t._s(t.__("WordPress Core"))+"\n ")])]),t._v(" "),e("span",{domProps:{innerHTML:t._s(t.resultIndicator(t.scan.count.core))}})]),t._v(" "),e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("strong",[t._v("\n "+t._s(t.__("Plugins & Themes"))+"\n ")])]),t._v(" "),e("span",{domProps:{innerHTML:t._s(t.resultIndicator(t.scan.count.vuln))}})]),t._v(" "),e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("strong",[t._v(t._s(t.__("Suspicious Code")))])]),t._v(" "),e("span",{domProps:{innerHTML:t._s(t.resultIndicator(t.scan.count.content))}})])])])]),t._v(" "),null!==t.scan&&"finish"===t.scan.status?e("div",{staticClass:"sui-box-footer"},[e("div",{staticClass:"sui-actions-left"},[e("a",{staticClass:"sui-button sui-button-ghost",attrs:{href:t.adminUrl("admin.php?page=wdf-scan")}},[e("i",{staticClass:"sui-icon-eye",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("View Report"))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-actions-right"},[e("p",{staticClass:"sui-p-small",domProps:{textContent:t._s(t.reportText)}})])]):t._e()])}),[function(){var t=this.$createElement,s=this._self._c||t;return s("span",{staticClass:"sui-progress-icon",attrs:{"aria-hidden":"true"}},[s("i",{staticClass:"sui-icon-loader sui-loading"})])}],!1,null,null,null).exports,d={mixins:[n.a],name:"file-scanning",data:function(){return{scan:dashboard.scan.scan,state:{on_saving:!1,canceling:!1},nonces:dashboard.scan.nonces,endpoints:dashboard.scan.endpoints,polling_state:null,report:dashboard.scan.report}},methods:{newScan:function(){var t=this;this.httpPostRequest("newScan",{},(function(s){t.$nextTick((function(){t.scan={},t.scan.status=s.data.status,t.scan.percent=s.data.percent,t.scan.status_text=s.data.status_text,t.polling()}))}))},cancelScan:function(){if(!0!==this.state.canceling){this.abortAllRequests();var t=this;clearTimeout(this.polling_state),this.state.canceling=!0,this.httpPostRequest("cancelScan",{},(function(s){t.$nextTick((function(){t.scan=s.data.scan,t.state.canceling=!1}))}))}},refreshStatus:function(){var t=this;this.httpPostRequest("processScan",{},(function(s){!1===s.success?(t.scan=s.data,t.polling()):t.scan=s.data.scan}))},polling:function(){!1===this.state.canceling&&(this.polling_state=setTimeout(this.refreshStatus(),500))},resultIndicator:function(t){return t>0?'<span class="sui-tag sui-tag-error">'+t+"</span>":'<i aria-hidden="true" class="sui-icon-check-tick sui-success"></i>'}},computed:{statusText:function(){return this.scan.status_text},percent:function(){return this.scan.percent}},mounted:function(){null===this.scan||"process"!==this.scan.status&&"init"!==this.scan.status||this.polling()}},_=Object(r.a)(d,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("i",{staticClass:"sui-icon-layers",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("Malware Scanning"))+"\n ")]),t._v(" "),null!==t.scan&&"finish"===t.scan.status?e("div",{staticClass:"sui-actions-left"},[t.scan.count.total>0?e("span",{staticClass:"sui-tag sui-tag-error"},[t._v(t._s(t.scan.count.total))]):t._e()]):t._e()]),t._v(" "),e("div",{staticClass:"sui-box-body",class:{"no-padding-bottom":null!==t.scan&&"finish"===t.scan.status}},[e("p",[t._v("\n "+t._s(t.__("Scan your website for file changes, vulnerabilities and injected code and get notified about anything suspicious."))+"\n ")]),t._v(" "),null===t.scan?e("div",[e("submit-button",{attrs:{type:"button","css-class":"sui-button-blue",state:t.state},on:{click:t.newScan}},[t._v("\n "+t._s(t.__("Run scan"))+"\n ")])],1):"process"===t.scan.status||"init"===t.scan.status?e("div",[e("div",{staticClass:"sui-progress-block"},[e("div",{staticClass:"sui-progress"},[t._m(0),t._v(" "),e("span",{staticClass:"sui-progress-text"},[e("span",{domProps:{textContent:t._s(t.percent+"%")}})]),t._v(" "),e("div",{staticClass:"sui-progress-bar",attrs:{"aria-hidden":"true"}},[e("span",{style:{width:t.percent+"%"}})])]),t._v(" "),e("button",{staticClass:"sui-button-icon sui-tooltip",attrs:{type:"button",disabled:t.state.canceling,"data-tooltip":"Cancel"},on:{click:t.cancelScan}},[e("i",{staticClass:"sui-icon-close",attrs:{"aria-hidden":"true"}})])]),t._v(" "),e("div",{staticClass:"sui-progress-state"},[e("span",{domProps:{textContent:t._s(t.statusText)}})])]):e("div",{staticClass:"sui-field-list sui-flushed no-border"},[e("div",{staticClass:"sui-field-list-body"},[e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("strong",[t._v("\n "+t._s(t.__("WordPress Core"))+"\n ")])]),t._v(" "),e("span",{domProps:{innerHTML:t._s(t.resultIndicator(t.scan.count.core))}})]),t._v(" "),e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("strong",[t._v("\n "+t._s(t.__("Plugins & Themes"))+"\n ")])]),t._v(" "),e("a",{staticClass:"sui-button sui-button-purple sui-tooltip",attrs:{href:t.campaign_url("defender_dash_filescan_pro_tag"),target:"_blank","data-tooltip":"Try Defender Pro free today"}},[t._v("\n "+t._s(t.__("Pro Feature"))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("strong",[t._v(t._s(t.__("Suspicious Code")))])]),t._v(" "),e("a",{staticClass:"sui-button sui-button-purple sui-tooltip",attrs:{href:t.campaign_url("defender_dash_filescan_pro_tag"),target:"_blank","data-tooltip":"Try Defender Pro free today"}},[t._v("\n "+t._s(t.__("Pro Feature"))+"\n ")])])])])]),t._v(" "),null!==t.scan&&"finish"===t.scan.status?e("div",{staticClass:"sui-box-footer"},[e("div",{staticClass:"sui-actions-left"},[e("a",{staticClass:"sui-button sui-button-ghost",attrs:{href:t.adminUrl("admin.php?page=wdf-scan")}},[e("i",{staticClass:"sui-icon-eye",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("View Report"))+"\n ")])])]):t._e()])}),[function(){var t=this.$createElement,s=this._self._c||t;return s("span",{staticClass:"sui-progress-icon",attrs:{"aria-hidden":"true"}},[s("i",{staticClass:"sui-icon-loader sui-loading"})])}],!1,null,null,null).exports,p={mixins:[n.a],name:"blacklist",data:function(){return{state:{on_saving:!1},status:"fetching",nonces:dashboard.blacklist.nonces,endpoints:dashboard.blacklist.endpoints}},methods:{toggle:function(){var t=this;this.httpGetRequest("toggleBlacklistWidget",{},(function(s){switch(parseInt(s.data.status)){case-1:t.status="new";break;case 0:t.status="blacklisted";break;case 1:t.status="good"}}))}},mounted:function(){var t=this;this.httpGetRequest("blacklistWidgetStatus",{},(function(s){switch(parseInt(s.data.status)){case-1:t.status="new";break;case 0:t.status="blacklisted";break;case 1:t.status="good"}}))}},h=Object(r.a)(p,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("i",{staticClass:"sui-icon-target",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("Blacklist Monitor"))+"\n ")]),t._v(" "),"blacklisted"===t.status||"good"===t.status?e("div",{staticClass:"sui-actions-right"},[e("label",{staticClass:"sui-toggle"},[e("input",{staticClass:"toggle-checkbox",attrs:{type:"checkbox",checked:"checked"},on:{click:t.toggle}}),t._v(" "),e("span",{staticClass:"sui-toggle-slider"})])]):t._e()]),t._v(" "),e("div",{staticClass:"sui-box-body"},[e("p",[t._v("\n "+t._s(t.__("Automatically check if you’re on Google’s blacklist every 6 hours. If something’s wrong, we’ll let you know via email."))+"\n ")]),t._v(" "),"fetching"===t.status?e("div",{staticClass:"sui-notice sui-notice-info"},[e("div",{staticClass:"sui-notice-content"},[e("div",{staticClass:"sui-notice-message"},[e("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),t._v(" "),e("p",[t._v("\n "+t._s(t.__("Fetching your domain info..."))+"\n ")])])])]):"new"===t.status?e("form",{staticClass:"margin-top-30",attrs:{method:"post"}},[e("submit-button",{attrs:{type:"button","css-class":"sui-button-blue",state:t.state},on:{click:function(s){return t.toggle(!0)}}},[t._v("\n "+t._s(t.__("Activate"))+"\n ")])],1):"blacklisted"===t.status?e("div",{staticClass:"sui-notice sui-notice-error"},[e("div",{staticClass:"sui-notice-content"},[e("div",{staticClass:"sui-notice-message"},[e("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),t._v(" "),e("p",[t._v("\n "+t._s(t.__("Your domain is currently on Google’s blacklist. Check out the article below to find out how to fix up your domain."))+"\n ")])])])]):"good"===t.status?e("div",{staticClass:"sui-notice sui-notice-success"},[e("div",{staticClass:"sui-notice-content"},[e("div",{staticClass:"sui-notice-message"},[e("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),t._v(" "),e("p",[t._v("\n "+t._s(t.__("Your domain is currently clean."))+"\n ")])])])]):t._e(),t._v(" "),"new"!==t.status?e("div",{staticClass:"sui-center-box no-padding-bottom"},[e("p",{staticClass:"sui-p-small"},[t._v("\n "+t._s(t.__("Want to know more about blacklisting?"))+" "),e("a",{attrs:{target:"_blank",href:"https://premium.wpmudev.org/blog/get-off-googles-blacklist/"}},[t._v(t._s(t.__("Read this article.")))])])]):t._e()]),t._v(" "),e("overlay",{directives:[{name:"show",rawName:"v-show",value:!0===t.state.on_saving,expression:"state.on_saving===true"}]})],1)}),[],!1,null,null,null).exports,f={mixins:[n.a],name:"blacklist-free"},v=Object(r.a)(f,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("i",{staticClass:"sui-icon-target",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("Blacklist Monitor"))+"\n ")]),t._v(" "),e("div",{staticClass:"sui-actions-left"},[e("span",{staticClass:"sui-tag sui-tag-pro"},[t._v(t._s(t.__("Pro")))])])]),t._v(" "),e("div",{staticClass:"sui-box-body sui-upsell-items"},[e("div",{staticClass:"sui-padding-left sui-padding-right sui-padding-top"},[e("p",[t._v("\n "+t._s(t.__("Automatically check if you’re on Google’s blacklist every 6 hours. If something’s wrong, we’ll let you know via email."))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-box-settings-row sui-upsell-row"},[e("img",{staticClass:"sui-image sui-upsell-image",attrs:{src:t.assetUrl("assets/img/dashboard-blacklist.svg")}}),t._v(" "),e("div",{staticClass:"sui-upsell-notice"},[e("div",[e("p",[t._v("\n "+t._s(t.__("Defender will warn you if your site has been flagged as unsafe. Get blacklist Monitor as part of a WPMU DEV membership."))),e("br"),t._v(" "),e("a",{staticClass:"premium-button sui-button sui-button-purple",attrs:{target:"_blank",href:t.campaign_url("defender_dash_blacklist_upgrade_button")}},[t._v(t._s(t.__("Try Pro Free Today")))]),t._v(".\n ")])])])])])])}),[],!1,null,null,null).exports,m={mixins:[n.a],name:"ip-lockout",data:function(){return{state:{on_saving:!1},nonces:dashboard.ip_lockout.nonces,endpoints:dashboard.ip_lockout.endpoints,summary:dashboard.ip_lockout.summary,notification:dashboard.ip_lockout.notification,enabled:dashboard.ip_lockout.enabled}},methods:{updateSettings:function(){var t=this;this.httpPostRequest("updateSettings",{data:JSON.stringify({login_protection:!0,detect_404:!0})},(function(){t.enabled=!0}))}},computed:{notificationText:function(){return this.notification?this.__("Lockout notifications are enabled"):this.__("Lockout notifications are disabled")}}},g=Object(r.a)(m,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box",attrs:{id:"ip-lockout"}},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("i",{staticClass:"sui-icon-lock",attrs:{"aria-hidden":"true"}}),t._v("\n\t\t\t"+t._s(t.__("Firewall"))+"\n\t\t")])]),t._v(" "),e("div",{staticClass:"sui-box-body",class:{"no-padding-bottom":!0===t.enabled}},[e("p",[t._v("\n\t\t\t"+t._s(t.__("Protect to your login area and have Defender automatically lockout any suspicious behaviour."))+"\n\t\t")]),t._v(" "),!1===t.enabled?e("form",{attrs:{method:"post"},on:{submit:function(s){return s.preventDefault(),t.updateSettings(s)}}},[e("submit-button",{attrs:{type:"submit","css-class":"sui-button-blue activate",state:t.state}},[t._v("\n\t\t\t\t"+t._s(t.__("Activate"))+"\n\t\t\t")])],1):e("div",{staticClass:"sui-field-list sui-flushed no-border"},[e("div",{staticClass:"sui-field-list-body"},[e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("strong",[t._v(t._s(t.__("Last lockout")))])]),t._v(" "),e("span",{domProps:{textContent:t._s(t.summary.lastLockout)}})]),t._v(" "),e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("strong",[t._v(t._s(t.__("Login lockouts this week")))])]),t._v(" "),e("span",{domProps:{textContent:t._s(t.summary.ip.week)}})]),t._v(" "),e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("strong",[t._v(t._s(t.__("404 lockouts this week")))])]),t._v(" "),e("span",{domProps:{textContent:t._s(t.summary.nf.week)}})])])])]),t._v(" "),!0===t.enabled?e("div",{staticClass:"sui-box-footer"},[e("div",{staticClass:"sui-actions-left"},[e("a",{staticClass:"sui-button sui-button-ghost",attrs:{href:t.adminUrl("admin.php?page=wdf-ip-lockout&view=logs")}},[e("i",{staticClass:"sui-icon-eye",attrs:{"aria-hidden":"true"}}),t._v("\n\t\t\t\t"+t._s(t.__("View logs"))+"\n\t\t\t")])]),t._v(" "),e("div",{staticClass:"sui-actions-right"},[e("p",{staticClass:"sui-p-small",domProps:{textContent:t._s(t.notificationText)}})])]):t._e()])}),[],!1,null,null,null).exports,b={mixins:[n.a],name:"audit",data:function(){return{state:{on_saving:!1},nonces:dashboard.audit.nonces,endpoints:dashboard.audit.endpoints,enabled:dashboard.audit.enabled,report:dashboard.audit.report,summary:{monthCount:"-",dayCount:"-",weekCount:"n/a",lastEvent:"-"}}},methods:{updateSettings:function(){var t=this;this.httpPostRequest("updateSettings",{data:JSON.stringify({enabled:!0})},(function(){t.enabled=!0,t.$nextTick((function(){t.loadData()}))}))},loadData:function(){var t=this;this.httpGetRequest("summary",{},(function(s){t.summary=s.data}))}},computed:{reportText:function(){return this.report?this.__("Audit log reports are enabled"):this.__("Audit log reports are disabled")}},mounted:function(){!0===this.enabled&&this.loadData()}},C=Object(r.a)(b,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box",attrs:{id:"audit-logging"}},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("i",{staticClass:"sui-icon-eye",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("Audit Logging"))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-box-body",class:{"no-padding-bottom":t.enabled}},[e("p",[t._v("\n "+t._s(t.__("Track and log events when changes are made to your website, giving you full visibility over what's going on behind the scenes."))+"\n ")]),t._v(" "),!1===t.enabled?e("form",{attrs:{method:"post"},on:{submit:function(s){return s.preventDefault(),t.updateSettings(s)}}},[e("submit-button",{attrs:{type:"submit","css-class":"sui-button-blue activate",state:t.state}},[t._v("\n "+t._s(t.__("Activate"))+"\n ")])],1):e("div",[e("div",{staticClass:"sui-notice"},[e("div",{staticClass:"sui-notice-content"},[e("div",{staticClass:"sui-notice-message"},[e("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),t._v(" "),e("p",[t._v("\n "+t._s(t.summary.weekCount)+" "+t._s(t.__(" events logged in the past 7 days."))+"\n ")])])])]),t._v(" "),e("div",{staticClass:"sui-field-list sui-flushed no-border"},[e("div",{staticClass:"sui-field-list-body"},[e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("strong",[t._v(t._s(t.__("Last event logged")))])]),t._v(" "),e("span",[t._v("\n "+t._s(t.summary.lastEvent)+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("strong",[t._v(t._s(t.__("Events logged this month")))])]),t._v(" "),e("span",[t._v(t._s(t.summary.monthCount))])])])])])]),t._v(" "),!0===t.enabled?e("div",{staticClass:"sui-box-footer"},[e("div",{staticClass:"sui-actions-left"},[e("a",{staticClass:"sui-button sui-button-ghost",attrs:{href:t.adminUrl("admin.php?page=wdf-logging")}},[e("i",{staticClass:"sui-icon-eye",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("View Logs"))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-actions-right"},[e("p",{staticClass:"sui-p-small",domProps:{textContent:t._s(t.reportText)}})])]):t._e(),t._v(" "),t.state.on_saving?e("overlay"):t._e()],1)}),[],!1,null,null,null).exports,w={mixins:[n.a],name:"audit-free"},y=Object(r.a)(w,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("i",{staticClass:"sui-icon-eye",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("Audit Logging"))+"\n ")]),t._v(" "),e("div",{staticClass:"sui-actions-left"},[e("span",{staticClass:"sui-tag sui-tag-pro"},[t._v(t._s(t.__("Pro")))])])]),t._v(" "),e("div",{staticClass:"sui-box-body sui-upsell-items"},[e("div",{staticClass:"sui-padding-left sui-padding-right sui-padding-top"},[e("p",[t._v("\n "+t._s(t.__("Track and log events when changes are made to your website giving you full visibility of what's going on behind the scenes."))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-box-settings-row sui-upsell-row"},[e("img",{staticClass:"sui-image sui-upsell-image",attrs:{src:t.assetUrl("assets/img/audit-presale.svg")}}),t._v(" "),e("div",{staticClass:"sui-upsell-notice"},[e("p",[t._v("\n "+t._s(t.__("Get an automatic report about the changes made on your website with Audit Logging. Get Audit Logging as part of a WPMU DEV membership."))),e("br"),t._v(" "),e("a",{staticClass:"premium-button sui-button sui-button-purple",attrs:{target:"_blank",href:t.campaign_url("defender_dash_auditlogging_upsell_link")}},[t._v(t._s(t.__("Try Pro Free Today")))])])])])])])}),[],!1,null,null,null).exports,k={mixins:[n.a],name:"report",data:function(){return{scan:dashboard.report.scan,ip_lockout:dashboard.report.ip_lockout,audit:dashboard.report.audit}},methods:{statusText:function(t){if(-1===t)return'<span class="sui-tag sui-tag-disabled">'+this.__("Inactive")+"</span>";var s=void 0;switch(parseInt(t)){case 1:s=this.__("Daily");break;case 7:s=this.__("Weekly");break;case 30:s=this.__("Monthly")}return'<span class="sui-tag sui-tag-blue">'+s+"</span>"}}},x=Object(r.a)(k,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("i",{staticClass:"sui-icon-graph-line",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("Reporting"))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-box-body no-padding-bottom"},[e("p",[t._v(t._s(t.__("Get tailored security reports delivered to your inbox so you don't have to worry about checking in.")))]),t._v(" "),e("div",{staticClass:"sui-field-list sui-flushed no-border"},[e("div",{staticClass:"sui-field-list-body"},[e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("small",[e("strong",[t._v(t._s(t.__("Malware Scanning")))])])]),t._v(" "),e("span",{domProps:{innerHTML:t._s(t.statusText(t.scan))}})]),t._v(" "),e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("small",[e("strong",[t._v(t._s(t.__("Firewall")))])])]),t._v(" "),e("span",{domProps:{innerHTML:t._s(t.statusText(t.ip_lockout))}})]),t._v(" "),e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("small",[e("strong",[t._v(t._s(t.__("Audit Logging")))])])]),t._v(" "),e("span",{domProps:{innerHTML:t._s(t.statusText(t.audit))}})])])])]),t._v(" "),e("div",{staticClass:"sui-box-footer"},[e("p",{staticClass:"sui-p-small text-center"},[t._v("\n "+t._s(t.__("You can also"))+" "),e("a",{attrs:{target:"_blank",href:"https://premium.wpmudev.org/reports/"}},[t._v(t._s(t.__("create PDF reports")))]),t._v(" "+t._s(t.__("to send to your clients via The Hub."))+"\n ")])])])}),[],!1,null,null,null).exports,S={mixins:[n.a],name:"report",data:function(){return{scan:dashboard.report.scan,ip_lockout:dashboard.report.ip_lockout,audit:dashboard.report.audit}},methods:{statusText:function(t){if(-1===t)return'<span class="sui-tag sui-tag-disabled">'+this.__("Inactive")+"</span>";var s=void 0;switch(parseInt(t)){case 1:s=this.__("Daily");break;case 7:s=this.__("Weekly");break;case 30:s=this.__("Monthly")}return'<span class="sui-tag sui-tag-blue">'+s+"</span>"}}},T=Object(r.a)(S,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("i",{staticClass:"sui-icon-graph-line",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("Reporting"))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-box-body sui-upsell-items"},[e("div",{staticClass:"sui-box-settings-row no-padding-bottom"},[e("p",[t._v(t._s(t.__("Get tailored security reports delivered to your inbox so you don't have to worry about checking in.")))])]),t._v(" "),e("div",{staticClass:"sui-field-list no-border"},[e("div",{staticClass:"sui-field-list-body"},[e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("small",[e("strong",[t._v(t._s(t.__("Malware Scanning")))])])]),t._v(" "),e("span",{staticClass:"sui-tag sui-tag-disabled"},[t._v(t._s(t.__("Inactive")))])]),t._v(" "),e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("small",[e("strong",[t._v(t._s(t.__("IP Lockouts")))])])]),t._v(" "),e("span",{staticClass:"sui-tag sui-tag-disabled"},[t._v(t._s(t.__("Inactive")))])]),t._v(" "),e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("small",[e("strong",[t._v(t._s(t.__("Audit Logging")))])])]),t._v(" "),e("span",{staticClass:"sui-tag sui-tag-disabled"},[t._v(t._s(t.__("Inactive")))])])])]),t._v(" "),e("div",{staticClass:"sui-box-settings-row sui-upsell-row"},[e("img",{staticClass:"sui-image sui-upsell-image",attrs:{src:t.assetUrl("/assets/img/dev-man-pre.svg")}}),t._v(" "),e("div",{staticClass:"sui-upsell-notice"},[e("p",[t._v("\n "+t._s(t.__("Schedule automatic reports and recieve directly to your inbox. Get reporting as part of a WPMU DEV membership."))),e("br"),t._v(" "),e("a",{staticClass:"premium-button sui-button sui-button-purple",attrs:{target:"_blank",href:t.campaign_url("defender_dash_reports_upsell_link")}},[t._v(t._s(t.__("Try Pro Free Today")))])])])])])])}),[],!1,null,null,null).exports,P={mixins:[n.a],name:"advanced-tools",data:function(){return{state:{on_saving:!1},nonces:dashboard.advanced_tools.nonces,endpoints:dashboard.advanced_tools.endpoints,mask_login:dashboard.advanced_tools.mask_login,security_headers:dashboard.advanced_tools.security_headers}},methods:{updateSettings:function(t){var s=this;this.httpPostRequest("updateSettings",{data:JSON.stringify({settings:{enabled:!0},module:t})},(function(){"auth"===t?s.two_factor.enabled=!0:s.mask_login.enabled=!0}))}}},j=Object(r.a)(P,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box advanced-tools"},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("i",{staticClass:"sui-icon-wand-magic",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("Advanced Tools"))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-box-body"},[e("p",[t._v("\n "+t._s(t.__("Enable advanced tools for enhanced protection against even the most aggressive of hackers and bots."))+"\n ")]),t._v(" "),e("hr",{staticClass:"sui-flushed"}),t._v(" "),e("strong",[t._v(t._s(t.__("Security Headers")))]),t._v(" "),e("span",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("Add extra security to your website by enabling and configuring the security headers."))+"\n ")]),t._v(" "),Object.keys(t.security_headers).length?e("div",[e("div",{staticClass:"sui-field-list sui-flushed margin-top-30 no-border"},[e("div",{staticClass:"sui-field-list-body"},t._l(t.security_headers,(function(s){return e("div",{staticClass:"sui-field-list-item"},[e("label",{staticClass:"sui-field-list-item-label"},[e("strong",{domProps:{textContent:t._s(s.title)}})]),t._v(" "),e("span",{staticClass:"sui-tag sui-tag-success"},[t._v(t._s(t.__("Enabled")))])])})),0)]),t._v(" "),e("hr",{staticClass:"sui-flushed no-margin-bottom no-margin-top"})]):t._e(),t._v(" "),e("a",{staticClass:"sui-button margin-top-10",attrs:{href:t.adminUrl("admin.php?page=wdf-advanced-tools&view=security-headers")}},[e("i",{staticClass:"sui-icon-wrench-tool"}),t._v("\n "+t._s(t.__("Configure"))+"\n ")]),t._v(" "),e("hr",{staticClass:"sui-flushed"}),t._v(" "),e("strong",[t._v(t._s(t.__("Mask Login Area")))]),t._v(" "),e("span",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("Change the location of WordPress's default login area."))+"\n ")]),t._v(" "),!1===t.mask_login.enabled?e("form",{staticClass:"margin-top-10",attrs:{method:"post"},on:{submit:function(s){return s.preventDefault(),t.updateSettings()}}},[e("submit-button",{attrs:{type:"submit","css-class":"sui-button-blue",state:t.state}},[t._v("\n "+t._s(t.__("Activate"))+"\n ")])],1):!1===t.mask_login.useable?e("div",{staticClass:"sui-notice sui-notice-warning margin-top-10"},[e("div",{staticClass:"sui-notice-content"},[e("div",{staticClass:"sui-notice-message"},[e("p",[t._v("\n "+t._s(t.__("Masking is currently inactive. Choose your URL and save your settings to finish setup."))+"\n "),e("br"),t._v(" "),e("a",{staticClass:"sui-button margin-top-10",attrs:{href:t.adminUrl("admin.php?page=wdf-advanced-tools&view=mask-login")}},[t._v("\n "+t._s(t.__("Finish Setup"))+"\n ")])])])])]):!0===t.mask_login.useable?e("div",{staticClass:"sui-notice sui-notice-success margin-top-10"},[e("div",{staticClass:"sui-notice-content"},[e("div",{staticClass:"sui-notice-message"},[e("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),t._v(" "),e("p",[t._v("\n "+t._s(t.__("Masking is currently active at "))+"\n "),e("a",{attrs:{target:"_blank",href:t.mask_login.login_url}},[t._v(t._s(t.mask_login.login_url))])])])])]):t._e()])])}),[],!1,null,null,null).exports,A={mixins:[n.a],name:"quick-setup",data:function(){return{state:{on_saving:!1},model:{activate_scan:!0,activate_audit:!0,activate_lockout:!0,activate_blacklist:!0},status:"normal",nonces:dashboard.quick_setup.nonces,endpoints:dashboard.quick_setup.endpoints}},methods:{activate:function(){this.httpPostRequest("activate",this.model,(function(t){window.location.reload()}))},skip:function(){this.httpPostRequest("skip",this.model,(function(t){SUI.closeModal()}))}},mounted:function(){document.onreadystatechange=function(){if("complete"===document.readyState){SUI.openModal("activator","wpbody",void 0,!1,!1)}}}},E=Object(r.a)(A,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-modal sui-modal-lg"},[e("div",{staticClass:"sui-modal-content",attrs:{role:"dialog",id:"activator","aria-modal":"true","aria-labelledby":"Quick setup"}},["normal"===t.status?e("div",{staticClass:"sui-box",attrs:{role:"document"}},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[t._v("\n "+t._s(t.__("Quick Setup"))+"\n ")]),t._v(" "),e("div",{staticClass:"sui-actions-right"},[e("form",{attrs:{method:"post"},on:{submit:function(s){return s.preventDefault(),t.skip(s)}}},[e("submit-button",{attrs:{type:"submit","css-class":"sui-button-ghost quicksetup-skip",state:t.state}},[t._v("\n "+t._s(t.__("Skip"))+"\n ")])],1)])]),t._v(" "),e("form",{attrs:{method:"post"},on:{submit:function(s){return s.preventDefault(),t.activate(s)}}},[e("div",{staticClass:"sui-box-body"},[e("p",[t._v("\n "+t._s(t.__("Welcome to Defender, the hottest security plugin for WordPress! Let’s quickly set up the basics for you, then you can fine tweak each setting as you go – our recommendations are on by default."))+"\n ")]),t._v(" "),e("hr",{staticClass:"sui-flushed"}),t._v(" "),e("div",{staticClass:"sui-row"},[e("div",{staticClass:"sui-col-md-10"},[e("span",{staticClass:"sui-settings-label"},[t._v("\n "+t._s(t.__("Automatic Malware Scanning & Reporting"))+"\n ")]),t._v(" "),e("span",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("Scan your website for file changes, vulnerabilities and injected code and get notified about anything suspicious."))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-col-md-2"},[e("div",{staticClass:"sui-form-field tr"},[e("label",{staticClass:"sui-toggle"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.model.activate_scan,expression:"model.activate_scan"}],staticClass:"toggle-checkbox",attrs:{type:"checkbox",name:"activator[]",checked:"",id:"active_scan",value:"activate_scan"},domProps:{checked:Array.isArray(t.model.activate_scan)?t._i(t.model.activate_scan,"activate_scan")>-1:t.model.activate_scan},on:{change:function(s){var e=t.model.activate_scan,i=s.target,a=!!i.checked;if(Array.isArray(e)){var n="activate_scan",o=t._i(e,n);i.checked?o<0&&t.$set(t.model,"activate_scan",e.concat([n])):o>-1&&t.$set(t.model,"activate_scan",e.slice(0,o).concat(e.slice(o+1)))}else t.$set(t.model,"activate_scan",a)}}}),t._v(" "),e("span",{staticClass:"sui-toggle-slider"})])])])]),t._v(" "),e("hr",{staticClass:"sui-flushed"}),t._v(" "),e("div",{staticClass:"sui-row"},[e("div",{staticClass:"sui-col-md-10"},[e("span",{staticClass:"sui-settings-label"},[t._v("\n "+t._s(t.__("Audit Logging"))+"\n ")]),t._v(" "),e("span",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("Track and log events when changes are made to your website giving you full visibility of what’s going on behind the scenes."))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-col-md-2"},[e("div",{staticClass:"sui-form-field tr"},[e("label",{staticClass:"sui-toggle"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.model.activate_audit,expression:"model.activate_audit"}],staticClass:"toggle-checkbox",attrs:{type:"checkbox",name:"activator[]",checked:"",id:"active_audit",value:"activate_audit"},domProps:{checked:Array.isArray(t.model.activate_audit)?t._i(t.model.activate_audit,"activate_audit")>-1:t.model.activate_audit},on:{change:function(s){var e=t.model.activate_audit,i=s.target,a=!!i.checked;if(Array.isArray(e)){var n="activate_audit",o=t._i(e,n);i.checked?o<0&&t.$set(t.model,"activate_audit",e.concat([n])):o>-1&&t.$set(t.model,"activate_audit",e.slice(0,o).concat(e.slice(o+1)))}else t.$set(t.model,"activate_audit",a)}}}),t._v(" "),e("span",{staticClass:"sui-toggle-slider"})])])])]),t._v(" "),e("hr",{staticClass:"sui-flushed"}),t._v(" "),e("div",{staticClass:"sui-row"},[e("div",{staticClass:"sui-col-md-10"},[e("span",{staticClass:"sui-settings-label"},[t._v("\n "+t._s(t.__("Firewall"))+"\n ")]),t._v(" "),e("span",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("Protect your login area and have Defender automatically lockout any suspicious behaviour."))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-col-md-2"},[e("div",{staticClass:"sui-form-field tr"},[e("label",{staticClass:"sui-toggle"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.model.activate_lockout,expression:"model.activate_lockout"}],staticClass:"toggle-checkbox",attrs:{type:"checkbox",checked:"",name:"activator[]",id:"activate_lockout",value:"activate_lockout"},domProps:{checked:Array.isArray(t.model.activate_lockout)?t._i(t.model.activate_lockout,"activate_lockout")>-1:t.model.activate_lockout},on:{change:function(s){var e=t.model.activate_lockout,i=s.target,a=!!i.checked;if(Array.isArray(e)){var n="activate_lockout",o=t._i(e,n);i.checked?o<0&&t.$set(t.model,"activate_lockout",e.concat([n])):o>-1&&t.$set(t.model,"activate_lockout",e.slice(0,o).concat(e.slice(o+1)))}else t.$set(t.model,"activate_lockout",a)}}}),t._v(" "),e("span",{staticClass:"sui-toggle-slider"})])])])]),t._v(" "),e("hr",{staticClass:"sui-flushed"}),t._v(" "),e("div",{staticClass:"sui-row"},[e("div",{staticClass:"sui-col-md-10"},[e("span",{staticClass:"sui-settings-label"},[t._v("\n "+t._s(t.__("Blacklist Monitor"))+"\n ")]),t._v(" "),e("span",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("Automatically check if you’re on Google’s blacklist every 6 hours. If something’s wrong, we’ll let you know via email."))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-col-md-2"},[e("div",{staticClass:"sui-form-field tr"},[e("label",{staticClass:"sui-toggle"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.model.activate_blacklist,expression:"model.activate_blacklist"}],staticClass:"toggle-checkbox",attrs:{type:"checkbox",checked:"",name:"activator[]",id:"activate_blacklist",value:"activate_blacklist"},domProps:{checked:Array.isArray(t.model.activate_blacklist)?t._i(t.model.activate_blacklist,"activate_blacklist")>-1:t.model.activate_blacklist},on:{change:function(s){var e=t.model.activate_blacklist,i=s.target,a=!!i.checked;if(Array.isArray(e)){var n="activate_blacklist",o=t._i(e,n);i.checked?o<0&&t.$set(t.model,"activate_blacklist",e.concat([n])):o>-1&&t.$set(t.model,"activate_blacklist",e.slice(0,o).concat(e.slice(o+1)))}else t.$set(t.model,"activate_blacklist",a)}}}),t._v(" "),e("span",{staticClass:"sui-toggle-slider"})])])])])]),t._v(" "),e("div",{staticClass:"sui-box-footer"},[e("div",{staticClass:"sui-row"},[e("div",{staticClass:"sui-col-md-9"},[e("small",[t._v("\n "+t._s(t.__("Note: These services will be configured with our recommended settings. You can change these at any time."))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-col-md-3"},[e("submit-button",{attrs:{type:"submit",state:t.state,"css-class":"sui-button-blue quicksetup-apply"}},[t._v("\n "+t._s(t.__("Get Started"))+"\n ")])],1)])])]),t._v(" "),t.maybeHideBranding?t._e():e("img",{staticClass:"sui-image sui-image-center",attrs:{src:t.assetUrl("/assets/img/defender-activator.svg")}})]):e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-body"},[e("p",[t._v("\n "+t._s(t.__("Just a moment while Defender activates those services for you.."))+"\n ")]),t._v(" "),t._m(0),t._v(" "),t._m(1)])])])])}),[function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"sui-progress-block"},[s("div",{staticClass:"sui-progress"},[s("div",{staticClass:"sui-progress-text scan-progress-text sui-icon-loader sui-loading"},[s("span",[this._v("0%")])]),this._v(" "),s("div",{staticClass:"sui-progress-bar scan-progress-bar"},[s("span",{staticStyle:{width:"0%"}})])])])},function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"sui-progress-state"},[s("span",{staticClass:"status-text"})])}],!1,null,null,null).exports,I={mixins:[n.a],name:"quick-setup",data:function(){return{state:{on_saving:!1},model:{activate_scan:!0,activate_lockout:!0},status:"normal",nonces:dashboard.quick_setup.nonces,endpoints:dashboard.quick_setup.endpoints}},methods:{activate:function(){this.httpPostRequest("activate",this.model,(function(t){window.location.reload()}))},skip:function(){this.httpPostRequest("skip",this.model,(function(t){SUI.closeModal()}))}},mounted:function(){document.onreadystatechange=function(){if("complete"===document.readyState){SUI.openModal("activator","wpbody",void 0,!1,!1)}}}},D=Object(r.a)(I,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-modal sui-modal-lg"},[e("div",{staticClass:"sui-modal-content",attrs:{role:"dialog",id:"activator","aria-modal":"true","aria-labelledby":"Quick setup"}},["normal"===t.status?e("div",{staticClass:"sui-box",attrs:{role:"document"}},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[t._v("\n "+t._s(t.__("Quick Setup"))+"\n ")]),t._v(" "),e("div",{staticClass:"sui-actions-right"},[e("form",{attrs:{method:"post"},on:{submit:function(s){return s.preventDefault(),t.skip(s)}}},[e("submit-button",{attrs:{type:"submit","css-class":"sui-button-ghost",state:t.state}},[t._v("\n "+t._s(t.__("Skip"))+"\n ")])],1)])]),t._v(" "),e("form",{attrs:{method:"post"},on:{submit:function(s){return s.preventDefault(),t.activate(s)}}},[e("div",{staticClass:"sui-box-body"},[e("p",[t._v("\n "+t._s(t.__("Welcome to Defender, the hottest security plugin for WordPress! Let’s quickly set up the basics for you, then you can fine tweak each setting as you go – our recommendations are on by default."))+"\n ")]),t._v(" "),e("hr",{staticClass:"sui-flushed"}),t._v(" "),e("div",{staticClass:"sui-row"},[e("div",{staticClass:"sui-col-md-10"},[e("span",{staticClass:"sui-settings-label"},[t._v("\n "+t._s(t.__("Malware Scanning"))+"\n ")]),t._v(" "),e("span",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("Scan your website for file changes, vulnerabilities and injected code and get notified about anything suspicious."))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-col-md-2"},[e("div",{staticClass:"sui-form-field tr"},[e("label",{staticClass:"sui-toggle"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.model.activate_scan,expression:"model.activate_scan"}],staticClass:"toggle-checkbox",attrs:{type:"checkbox",name:"activator[]",checked:"",id:"active_scan",value:"activate_scan"},domProps:{checked:Array.isArray(t.model.activate_scan)?t._i(t.model.activate_scan,"activate_scan")>-1:t.model.activate_scan},on:{change:function(s){var e=t.model.activate_scan,i=s.target,a=!!i.checked;if(Array.isArray(e)){var n="activate_scan",o=t._i(e,n);i.checked?o<0&&t.$set(t.model,"activate_scan",e.concat([n])):o>-1&&t.$set(t.model,"activate_scan",e.slice(0,o).concat(e.slice(o+1)))}else t.$set(t.model,"activate_scan",a)}}}),t._v(" "),e("span",{staticClass:"sui-toggle-slider"})])])])]),t._v(" "),e("hr",{staticClass:"sui-flushed"}),t._v(" "),e("div",{staticClass:"sui-row"},[e("div",{staticClass:"sui-col-md-10"},[e("span",{staticClass:"sui-settings-label"},[t._v("\n "+t._s(t.__("Firewall"))+"\n ")]),t._v(" "),e("span",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("Protect your login area and have Defender automatically lockout any suspicious behaviour."))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-col-md-2"},[e("div",{staticClass:"sui-form-field tr"},[e("label",{staticClass:"sui-toggle"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.model.activate_lockout,expression:"model.activate_lockout"}],staticClass:"toggle-checkbox",attrs:{type:"checkbox",checked:"",name:"activator[]",id:"activate_lockout",value:"activate_lockout"},domProps:{checked:Array.isArray(t.model.activate_lockout)?t._i(t.model.activate_lockout,"activate_lockout")>-1:t.model.activate_lockout},on:{change:function(s){var e=t.model.activate_lockout,i=s.target,a=!!i.checked;if(Array.isArray(e)){var n="activate_lockout",o=t._i(e,n);i.checked?o<0&&t.$set(t.model,"activate_lockout",e.concat([n])):o>-1&&t.$set(t.model,"activate_lockout",e.slice(0,o).concat(e.slice(o+1)))}else t.$set(t.model,"activate_lockout",a)}}}),t._v(" "),e("span",{staticClass:"sui-toggle-slider"})])])])])]),t._v(" "),e("div",{staticClass:"sui-box-footer"},[e("div",{staticClass:"sui-row"},[e("div",{staticClass:"sui-col-md-9"},[e("small",[t._v("\n "+t._s(t.__("Note: These services will be configured with our recommended settings. You can change these at any time."))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-col-md-3"},[e("submit-button",{attrs:{type:"submit",state:t.state,"css-class":"sui-button sui-button-blue"}},[t._v("\n "+t._s(t.__("Get Started"))+"\n ")])],1)])])]),t._v(" "),t.maybeHideBranding?e("img",{staticClass:"sui-image sui-image-center",attrs:{src:t.assetUrl("/assets/img/defender-activator.svg")}}):t._e()]):e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-body"},[e("p",[t._v("\n "+t._s(t.__("Just a moment while Defender activates those services for you.."))+"\n ")]),t._v(" "),t._m(0),t._v(" "),t._m(1)])])])])}),[function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"sui-progress-block"},[s("div",{staticClass:"sui-progress"},[s("div",{staticClass:"sui-progress-text scan-progress-text sui-icon-loader sui-loading"},[s("span",[this._v("0%")])]),this._v(" "),s("div",{staticClass:"sui-progress-bar scan-progress-bar"},[s("span",{staticStyle:{width:"0%"}})])])])},function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"sui-progress-state"},[s("span",{staticClass:"status-text"})])}],!1,null,null,null).exports,$={mixins:[n.a],name:"cross-sale"},O=Object(r.a)($,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("section",[e("div",{staticClass:"sui-row",attrs:{id:"sui-cross-sell-footer"}},[t._m(0),t._v(" "),e("h3",[t._v(t._s(t.__("Check out our other free wordpress.org plugins!")))])]),t._v(" "),e("div",{staticClass:"sui-row sui-cross-sell-modules"},[e("div",{staticClass:"sui-col-md-4"},[t._m(1),t._v(" "),e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-body"},[e("h3",[t._v(t._s(t.__("Smush Image Compression and Optimization")))]),t._v(" "),e("p",[t._v(t._s(t.__("Resize, optimize and compress all of your images with the incredibly powerful and award-winning, 100% free WordPress image optimizer.")))]),t._v(" "),e("a",{staticClass:"sui-button sui-button-ghost",attrs:{href:"https://wordpress.org/plugins/wp-smushit/",target:"_blank"}},[t._v("\n "+t._s(t.__("View features"))+" "),e("i",{staticClass:"sui-icon-arrow-right",attrs:{"aria-hidden":"true"}})])])])]),t._v(" "),e("div",{staticClass:"sui-col-md-4"},[t._m(2),t._v(" "),e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-body"},[e("h3",[t._v(t._s(t.__("Hummingbird Page Speed Optimization")))]),t._v(" "),e("p",[t._v(t._s(t.__("Performance Tests, File Optimization & Compression, Page, Browser & Gravatar Caching, GZIP Compression, CloudFlare Integration & more.")))]),t._v(" "),e("a",{staticClass:"sui-button sui-button-ghost",attrs:{href:"https://wordpress.org/plugins/hummingbird-performance/",target:"_blank"}},[t._v("\n "+t._s(t.__("View features"))+" "),e("i",{staticClass:"sui-icon-arrow-right",attrs:{"aria-hidden":"true"}})])])])]),t._v(" "),e("div",{staticClass:"sui-col-md-4"},[t._m(3),t._v(" "),e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-body"},[e("h3",[t._v(t._s(t.__("SmartCrawl Search Engine Optimization")))]),t._v(" "),e("p",[t._v(t._s(t.__("Customize Titles & Meta Data, OpenGraph, Twitter & Pinterest Support, Auto-Keyword Linking, SEO & Readability Analysis, Sitemaps, URL Crawler & more.")))]),t._v(" "),e("a",{staticClass:"sui-button sui-button-ghost",attrs:{href:"https://wordpress.org/plugins/smartcrawl-seo/",target:"_blank"}},[t._v("\n "+t._s(t.__("View features"))+" "),e("i",{staticClass:"sui-icon-arrow-right",attrs:{"aria-hidden":"true"}})])])])])]),t._v(" "),e("div",{staticClass:"sui-cross-sell-bottom"},[e("h3",[t._v(t._s(t.__("WPMU DEV - Your All-in-One WordPress Platform")))]),t._v(" "),e("p",[t._v(t._s(t.__("Pretty much everything you need for developing and managing WordPress based websites, and then some")))]),t._v(" "),e("a",{staticClass:"sui-button sui-button-green",attrs:{href:"https://premium.wpmudev.org/?utm_source=defender&utm_medium=plugin&utm_campaign=defender_dash_footer_upsell_notice",target:"_blank",role:"button"}},[t._v(t._s(t.__("Learn more"))+"\n ")]),t._v(" "),e("img",{staticClass:"sui-image",attrs:{src:t.assetUrl("assets/img/dev-team.png"),srcset:t.assetUrl("assets/img/dev-team@2x.png 2x"),"aria-hidden":"true"}})])])}),[function(){var t=this.$createElement,s=this._self._c||t;return s("div",[s("span",{staticClass:"sui-icon-plugin-2"})])},function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"sui-cross-1",attrs:{"aria-hidden":"true"}},[s("span")])},function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"sui-cross-2",attrs:{"aria-hidden":"true"}},[s("span")])},function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"sui-cross-3",attrs:{"aria-hidden":"true"}},[s("span")])}],!1,null,null,null).exports,M={mixins:[n.a],name:"two-fa",data:function(){return{state:{on_saving:!1},enabled:dashboard.two_fa.enabled,useable:dashboard.two_fa.useable,nonces:dashboard.two_fa.nonces,endpoints:dashboard.two_fa.endpoints}},methods:{updateSettings:function(t){var s=this,e={enabled:!0};this.httpPostRequest("updateSettings",{data:JSON.stringify({settings:e,module:"auth"})},(function(){s.enabled=!0}))}}},L=Object(r.a)(M,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box two_fa"},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("i",{staticClass:"sui-icon-lock",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("Two-Factor Authentication"))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-box-body"},[e("p",[t._v(t._s(t.__("Add an extra layer of security to your WordPress account to ensure that you’re the only person who can log in, even if someone else knows your password."))+"\n ")]),t._v(" "),!1===t.enabled?e("form",{staticClass:"margin-top-10 margin-bottom-10",attrs:{method:"post"},on:{submit:function(s){return s.preventDefault(),t.updateSettings("auth")}}},[e("submit-button",{attrs:{type:"submit","css-class":"sui-button-blue",state:t.state}},[t._v("\n "+t._s(t.__("Activate"))+"\n ")])],1):!1===t.useable?e("div",{staticClass:"sui-notice sui-notice-warning margin-bottom-30 margin-top-10"},[e("div",{staticClass:"sui-notice-content"},[e("div",{staticClass:"sui-notice-message"},[e("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),t._v(" "),e("p",{domProps:{textContent:t._s(t.__("Two-factor authentication is currently inactive. Configure and save your settings to finish setup."))}}),t._v(" "),e("p",[e("a",{staticClass:"sui-button",attrs:{href:t.adminUrl("admin.php?page=wdf-2fa")}},[t._v("\n "+t._s(t.__("Finish Setup"))+"\n ")])])])])]):!0===t.useable?e("div",{staticClass:"sui-notice sui-notice-success margin-top-10 margin-bottom-30"},[e("div",{staticClass:"sui-notice-message"},[e("div",{staticClass:"sui-notice-content"},[e("div",{staticClass:"sui-notice-message"},[e("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),t._v(" "),e("p",{domProps:{textContent:t._s(t.__("Two-factor authentication is now active. User roles with this feature enabled must visit their Profile page to complete setup and sync their account with the Authenticator app."))}})])])])]):t._e(),t._v(" "),!0===t.useable?e("small",{domProps:{textContent:t._s(t.__("Note: Each user on your website must individually enable two-factor authentication via their user profile in order to enable and use this security feature."))}}):t._e()])])}),[],!1,null,null,null).exports,U={name:"waf",mixins:[n.a],data:function(){return{on_us:dashboard.waf.waf.hosted,site_id:dashboard.waf.site_id,status:dashboard.waf.waf.status}},computed:{get_migrate_url:function(){return"https://premium.wpmudev.org/hub2/site/"+this.site_id+"/hosting"},get_waf_url:function(){return"https://premium.wpmudev.org/hub2/site/"+this.site_id+"/hosting/tools#update-waf"},get_waf_text:function(){return this.vsprintf(this.__('At this time, you can manage all WAF settings via <a target="_blank" href="%s">The Hub.</a>'),"https://premium.wpmudev.org/hub2/")},get_footer_text:function(){return!1===this.on_us?this.vsprintf(this.__('You can learn more about the WAF <a target="_blank" href="%s">here</a>.'),"http://premium.wpmudev.org/waf"):!0===this.on_us&&!1===this.status?this.vsprintf(this.__('Enable this feature via <a target="_blank" href="%s">The Hub</a> today or learn more <a target="_blank" href="%s">here</a>.'),this.get_waf_url,"http://premium.wpmudev.org/waf"):!0===this.on_us&&!0===this.status?this.vsprintf(this.__('At this time, you can manage all WAF settings via <a href="%s">The Hub</a>.'),this.get_waf_url):void 0}}},W=Object(r.a)(U,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("img",{attrs:{src:t.assetUrl("/assets/img/waf@3x.svg")}}),t._v(" \n "+t._s(t.__("Web Application Firewall"))+"\n ")])]),t._v(" "),!1===t.on_us?e("div",{staticClass:"sui-box-body"},[e("p",[t._v("\n "+t._s(t.__("The new Web Application Firewall (WAF) filters incoming requests against a highly optimized managed ruleset to block hackers and bot attacks before they reach your site. It's our basic Firewall with advanced layers of protection."))+"\n ")]),t._v(" "),e("a",{staticClass:"sui-button sui-button-blue",attrs:{target:"_blank",href:t.get_migrate_url}},[t._v(t._s(t.__("Migrate my site")))]),t._v(" "),e("p",{staticClass:"sui-description margin-top-30 text-center",domProps:{innerHTML:t._s(t.get_footer_text)}})]):t._e(),t._v(" "),!0===t.on_us&&!1===t.status?e("div",{staticClass:"sui-box-body"},[e("p",[t._v("\n "+t._s(t.__("The new Web Application Firewall (WAF) filters incoming requests against a highly optimized managed ruleset to block hackers and bot attacks before they reach your site. It's our basic Firewall with advanced layers of protection."))+"\n ")]),t._v(" "),e("a",{staticClass:"sui-button sui-button-blue",attrs:{target:"_blank",href:t.get_waf_url}},[t._v(t._s(t.__("Activate WAF")))]),t._v(" "),e("p",{staticClass:"sui-description margin-top-30 text-center",domProps:{innerHTML:t._s(t.get_footer_text)}})]):t._e(),t._v(" "),!0===t.on_us&&!0===t.status?e("div",{staticClass:"sui-box-body"},[e("p",[t._v("\n "+t._s(t.__("The new Web Application Firewall (WAF) filters incoming requests against a highly optimized managed ruleset to block hackers and bot attacks before they reach your site. It's our basic Firewall with advanced layers of protection."))+"\n ")]),t._v(" "),e("div",{staticClass:"sui-notice sui-notice-info"},[e("div",{staticClass:"sui-notice-content"},[e("div",{staticClass:"sui-notice-message"},[e("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),t._v(" "),e("p",[t._v(t._s(t.__("This site has WAF protection enabled.")))])])])]),t._v(" "),e("p",{staticClass:"text-center sui-description no-margin-top",domProps:{innerHTML:t._s(t.get_waf_text)}})]):t._e()])}),[],!1,null,null,null).exports,H={name:"waf_free",mixins:[n.a],computed:{get_url:function(){return defender.is_membership?"http://premium.wpmudev.org/waf":this.campaignUrl("waf","defender_dash_waf_upgrade_button")}}},q=Object(r.a)(H,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("img",{attrs:{src:t.assetUrl("/assets/img/waf@3x.svg")}}),t._v(" \n "+t._s(t.__("Web Application Firewall"))+"\n ")]),t._v(" "),e("div",{staticClass:"sui-actions-left"},[e("span",{staticClass:"sui-tag sui-tag-pro"},[t._v(t._s(t.__("Pro")))])])]),t._v(" "),e("div",{staticClass:"sui-box-body"},[e("p",[t._v("\n "+t._s(t.__("The new Web Application Firewall (WAF) filters incoming requests against a highly optimized managed ruleset to block hackers and bot attacks before they reach your site. It's our basic Firewall with advanced layers of protection."))+"\n ")]),t._v(" "),e("div",{staticClass:"sui-box-settings-row sui-upsell-row"},[e("div",{staticClass:"sui-upsell-notice no-padding"},[e("p",[t._v("\n "+t._s(t.__("This feature is available to members who host their sites with WPMU DEV."))),e("br"),t._v(" "),e("a",{staticClass:"premium-button sui-button sui-button-purple",attrs:{target:"_blank",href:t.get_url}},[t._v(t._s(t.__("Try Pro Free Today")))])])])])])])}),[],!1,null,null,null).exports,R={name:"waf-modal",mixins:[n.a],data:function(){return{nonces:dashboard.new_features.nonces,endpoints:dashboard.new_features.endpoints,state:{on_saving:!1}}},methods:{hide:function(){this.httpPostRequest("hide",this.model,(function(t){SUI.closeModal()}))}},computed:{get_link_line:function(){var t="",s="http://premium.wpmudev.org/waf";return dashboard.waf.waf.hosted&&1!==parseInt(defender.is_free)?dashboard.waf.waf.hosted&&!dashboard.waf.waf.whitelabel_enable&&(t=this.vsprintf(this.__('Enable this feature via <a target="_blank" href="%s"">The Hub</a> today or learn more <a target="_blank" href="%s">here</a>.'),"https://premium.wpmudev.org/hub2/site/"+dashboard.waf.site_id+"/hosting/tools#update-waf",s)):t=this.vsprintf(this.__('This feature is available to members who host their sites with WPMU DEV. You can learn more about WAF <a target="_blank" href="%s">here</a>.'),s),t}},mounted:function(){document.onreadystatechange=function(){if("complete"===document.readyState){SUI.openModal("waf-modal","wpbody","waf-modal",!1,!1)}}}},F=Object(r.a)(R,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-modal sui-modal-md"},[e("div",{staticClass:"sui-modal-content",attrs:{role:"dialog",id:"waf-modal","aria-modal":"true","aria-label":"waf-modal-label"}},[e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},[e("figure",{staticClass:"sui-box-banner",attrs:{"aria-hidden":"true"}},[e("img",{attrs:{src:t.assetUrl("assets/img/waf-modal.png")}})]),t._v(" "),e("button",{staticClass:"modal-close-button sui-button-icon sui-button-float--right",on:{click:t.hide}},[e("i",{staticClass:"sui-icon-close sui-md",attrs:{"aria-hidden":"true"}}),t._v(" "),e("span",{staticClass:"sui-screen-reader-text"},[t._v(t._s(t.__("Close this dialog.")))])]),t._v(" "),e("h3",{staticClass:"sui-box-title sui-lg",attrs:{id:"waf-modal-label"}},[t._v("\n "+t._s(t.__("New Web Application Firewall"))+"\n ")]),t._v(" "),e("p",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("The new Web Application Firewall (WAF) is a first layer of protection to block hackers and bot attacks before they reach your site."))+"\n ")]),t._v(" "),e("div",{staticClass:"text-left waf-description"},[e("p",{staticClass:"sui-description how-does-it-work"},[t._v(t._s(t.__("How Does it Work?")))]),t._v(" "),e("p",{staticClass:"sui-description"},[t._v(t._s(t.__("The WAF filters requests against a highly optimized managed ruleset covering common attacks (OWASP top ten) and performs virtual patching of WordPress core, plugin, and theme vulnerabilities.")))]),t._v(" "),e("p",{staticClass:"sui-description",domProps:{innerHTML:t._s(t.get_link_line)}})])]),t._v(" "),e("div",{staticClass:"sui-box-footer sui-flatten sui-content-center sui-spacing-bottom--50"},[e("submit-button",{attrs:{type:"submit",state:t.state,"css-class":"sui-button quicksetup-apply"},on:{click:t.hide}},[t._v("\n "+t._s(t.__("Got it"))+"\n ")])],1)])])])}),[],!1,null,null,null).exports,N={name:"preset-config-modal",mixins:[n.a],data:function(){return{nonces:dashboard.new_features.nonces,endpoints:dashboard.new_features.endpoints,state:{on_saving:!1}}},methods:{hide:function(){this.httpPostRequest("hide",this.model,(function(t){SUI.closeModal()}))}},computed:{get_link_line:function(){var t="",s="http://premium.wpmudev.org/waf";return dashboard.waf.waf.hosted&&1!==parseInt(defender.is_free)?dashboard.waf.waf.hosted&&!dashboard.waf.waf.whitelabel_enable&&(t=this.vsprintf(this.__('Enable this feature via <a target="_blank" href="%s"">The Hub</a> today or learn more <a target="_blank" href="%s">here</a>.'),"https://premium.wpmudev.org/hub2/site/"+dashboard.waf.site_id+"/hosting/tools#update-waf",s)):t=this.vsprintf(this.__('This feature is available to members who host their sites with WPMU DEV. You can learn more about WAF <a target="_blank" href="%s">here</a>.'),s),t}},mounted:function(){document.onreadystatechange=function(){if("complete"===document.readyState){SUI.openModal("waf-modal","wpbody","waf-modal",!1,!1)}}}},z=Object(r.a)(N,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-modal sui-modal-md"},[e("div",{staticClass:"sui-modal-content",attrs:{role:"dialog",id:"waf-modal","aria-modal":"true","aria-label":"waf-modal-label"}},[e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},[e("figure",{staticClass:"sui-box-banner",attrs:{"aria-hidden":"true"}},[e("img",{attrs:{src:t.assetUrl("assets/img/upgrade-presets.svg")}})]),t._v(" "),e("button",{staticClass:"modal-close-button sui-button-icon sui-button-float--right",on:{click:t.hide}},[e("i",{staticClass:"sui-icon-close sui-md",attrs:{"aria-hidden":"true"}}),t._v(" "),e("span",{staticClass:"sui-screen-reader-text"},[t._v(t._s(t.__("Close this dialog.")))])]),t._v(" "),e("h3",{staticClass:"sui-box-title sui-lg",attrs:{id:"waf-modal-label"}},[t._v("\n "+t._s(t.__("Preset configurations are here!"))+"\n ")]),t._v(" "),e("p",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("That’s right folks, you can now save your Defender settings, download them and reapply them on another site in just a few clicks! No more having to repeat setting up Defender on all your new client sites, just upload your config and go."))+"\n ")]),t._v(" "),e("div",{staticClass:"text-left waf-description"},[e("p",{staticClass:"sui-description how-does-it-work"},[t._v(t._s(t.__("Coming soon – Apply presets to multiple sites via The Hub")))]),t._v(" "),e("p",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("If you’re a WPMU DEV member you get it one better – all your configs are automatically uploaded and shared across all your sites, ready to be applied whenever you like from either The Hub of the plugin… Boom!"))+"\n ")])])]),t._v(" "),e("div",{staticClass:"sui-box-footer sui-flatten sui-content-center sui-spacing-bottom--50"},[e("submit-button",{attrs:{type:"submit",state:t.state,"css-class":"sui-button quicksetup-apply"},on:{click:t.hide}},[t._v("\n "+t._s(t.__("Awesome, let's go!"))+"\n ")])],1)])])])}),[],!1,null,null,null).exports,V={name:"preset-config",mixins:[n.a],data:function(){return{endpoints:dashboard.settings.endpoints,nonces:dashboard.settings.nonces,configs:dashboard.settings.configs,config_name:"",new_config_name:"",current_config:"",state:{on_saving:!1}}},computed:{download_config_url:function(){return ajaxurl+"?action="+this.endpoints.downloadConfig+"&_wpnonce="+this.nonces.downloadConfig+"&key="+this.current_config},config:function(){return this.configs[this.current_config]},hub_text:function(){return this.vsprintf(this.__('Did you know you can apply your configs to any connected website in <a href="%s">The Hub</a>'),"")},apply_text:function(){if(void 0!==this.config)return this.vsprintf(this.__('Are you sure you want to apply the <span class="text-gray-500 font-semibold">%s</span> settings config to <span class="text-gray-500 font-semibold">%s</span>? We recommend you have a backup available as your existing settings configuration will be overridden.'),this.config.name,this.siteUrl)},delete_text:function(){if(void 0!==this.config)return this.vsprintf(this.__('Are you sure you want to delete the <span class="text-gray-500 font-semibold">%s</span> config file? You will no longer be able to apply it to this or other connected sites.'),this.config.name)}},methods:{apply_config:function(){var t=this;this.httpPostRequest("applyConfig",{key:t.current_config,screen:"dashboard"},(function(s){!0===s.success&&(void 0!==s.data.login_url?setTimeout((function(){location.href=s.data.login_url}),2e3):(t.configs=s.data.configs,t.$nextTick((function(){t.config_name="",SUI.closeModal()}))))}))},new_config:function(){var t=this;this.httpPostRequest("newConfig",{name:t.config_name},(function(s){!0===s.success&&(t.configs=s.data.configs,t.$nextTick((function(){t.config_name="",SUI.closeModal()})))}))},rename_config:function(){var t=this;this.httpPostRequest("updateConfig",{key:t.current_config,name:t.new_config_name},(function(s){!0===s.success&&(t.configs=s.data.configs,t.$nextTick((function(){SUI.closeModal()})))}))},delete_config:function(){var t=this;this.httpPostRequest("deleteConfig",{key:t.current_config},(function(s){!0===s.success&&(t.configs=s.data.configs,t.$nextTick((function(){SUI.closeModal()})))}))}}},G=Object(r.a)(V,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-box preset-config"},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[e("i",{staticClass:"sui-icon-wrench-tool",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("Preset Configs"))+"\n ")]),t._v(" "),e("div",{staticClass:"sui-actions-right"},[e("a",{staticClass:"sui-button sui-button-ghost",attrs:{href:t.adminUrl("admin.php?page=wdf-setting&view=configs")}},[e("i",{staticClass:"sui-icon-wrench-tool",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("Manage Configs"))+"\n ")])])]),t._v(" "),e("div",{staticClass:"sui-box-body"},[e("p",[t._v("\n "+t._s(t.__("Configs bundle your Defender settings and make them available to download and apply on your other sites."))+"\n ")]),t._v(" "),e("div",{staticClass:"sui-field-list sui-flushed no-border-top margin-bottom-30"},[e("div",{staticClass:"sui-field-list-body"},t._l(t.configs,(function(s,i){return e("div",{staticClass:"sui-field-list-item",on:{mouseenter:function(e){t.current_config=i,t.new_config_name=s.name}}},[e("label",{staticClass:"sui-field-list-item-label flex content-center items-center"},[t._m(0,!0),t._v(" "),e("strong",{domProps:{textContent:t._s(s.name)}}),t._v(" "),s.immortal?e("i",{staticClass:"sui-icon-check-tick ml-2",attrs:{"aria-hidden":"true"}}):t._e()]),t._v(" "),e("div",{staticClass:"sui-dropdown sui-accordion-item-action"},[t._m(1,!0),t._v(" "),e("ul",[e("li",[e("a",{attrs:{href:"#","data-modal-open":"apply-config","data-modal-open-focus":"configs","data-modal-close-focus":"wpwrap","data-modal-mask":"false","data-esc-close":"true"}},[e("i",{staticClass:"sui-icon-check",attrs:{"aria-hidden":"true"}}),t._v(" "+t._s(t.__("Apply")))])]),t._v(" "),e("li",[e("a",{attrs:{href:t.download_config_url}},[e("i",{staticClass:"sui-icon-download",attrs:{"aria-hidden":"true"}}),t._v(" "+t._s(t.__("Download")))])]),t._v(" "),0==s.immortal?e("li",[e("a",{attrs:{href:"","data-modal-open":"rename-config","data-modal-open-focus":"configs","data-modal-close-focus":"wpwrap","data-modal-mask":"false","data-esc-close":"true"}},[e("i",{staticClass:"sui-icon-blog",attrs:{"aria-hidden":"true"}}),t._v(" "+t._s(t.__("Rename")))])]):t._e(),t._v(" "),0==s.immortal?e("li",[e("a",{attrs:{href:"","data-modal-open":"delete-config","data-modal-open-focus":"configs","data-modal-close-focus":"wpwrap","data-modal-mask":"false","data-esc-close":"true"}},[e("i",{staticClass:"sui-icon-trash",attrs:{"aria-hidden":"true"}}),t._v(" "+t._s(t.__("Delete")))])]):t._e()])])])})),0)]),t._v(" "),e("div",{staticClass:"sui-notice sui-notice-info"},[e("div",{staticClass:"sui-notice-content"},[e("div",{staticClass:"sui-notice-message"},[e("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),t._v(" "),e("p",[t._v(t._s(t.__("Use configs to save preset configurations of Defender's settings, then upload and apply them to your other sites in just a few clicks! P.s. save as many of them as you like - you can have unlimited preset configs.")))])])])])]),t._v(" "),e("div",{staticClass:"sui-modal sui-modal-sm"},[e("div",{staticClass:"sui-modal-content",attrs:{role:"dialog",id:"new-config","aria-modal":"true","aria-labelledby":"save-new-config","aria-describedby":"save-new-config"}},[e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},[t._m(2),t._v(" "),e("h3",{staticClass:"sui-box-title sui-lg"},[t._v(t._s(t.__("Save Current Config")))]),t._v(" "),e("p",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("Save your current Defender settings configuration. You’ll be able to then download and apply it to your other sites with Defender installed."))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-box-body"},[e("div",{staticClass:"sui-form-field"},[e("label",{staticClass:"sui-label"},[t._v(t._s(t.__("Config name")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.config_name,expression:"config_name"}],staticClass:"sui-form-control",attrs:{type:"text"},domProps:{value:t.config_name},on:{input:function(s){s.target.composing||(t.config_name=s.target.value)}}})])]),t._v(" "),e("div",{staticClass:"sui-box-footer sui-content-right"},[e("button",{staticClass:"sui-button sui-button-ghost",attrs:{"data-modal-close":""}},[t._v("\n Cancel\n ")]),t._v(" "),e("submit-button",{attrs:{state:t.state,"css-class":"sui-button sui-button-blue",disabled:!t.config_name.length},on:{click:t.new_config}},[e("i",{staticClass:"sui-icon-save",attrs:{"aria-hidden":"true"}}),t._v(" "+t._s(t.__("Save new"))+"\n ")])],1)])])]),t._v(" "),e("div",{staticClass:"sui-modal sui-modal-sm"},[e("div",{staticClass:"sui-modal-content",attrs:{role:"dialog",id:"rename-config","aria-modal":"true","aria-labelledby":"rename-config","aria-describedby":"rename-config"}},[e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},[t._m(3),t._v(" "),e("h3",{staticClass:"sui-box-title sui-lg"},[t._v(t._s(t.__("Rename Config")))]),t._v(" "),e("p",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("Change your config name to something recognizable."))+"\n ")])]),t._v(" "),e("div",{staticClass:"sui-box-body"},[e("div",{staticClass:"sui-form-field"},[e("label",{staticClass:"sui-label"},[t._v(t._s(t.__("New config name")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.new_config_name,expression:"new_config_name"}],staticClass:"sui-form-control",attrs:{type:"text"},domProps:{value:t.new_config_name},on:{input:function(s){s.target.composing||(t.new_config_name=s.target.value)}}})])]),t._v(" "),e("div",{staticClass:"sui-box-footer sui-content-right"},[e("button",{staticClass:"sui-button sui-button-ghost",attrs:{"data-modal-close":""}},[t._v("\n Cancel\n ")]),t._v(" "),e("submit-button",{attrs:{state:t.state,"css-class":"sui-button sui-button-blue",disabled:!t.new_config_name.length},on:{click:t.rename_config}},[e("i",{staticClass:"sui-icon-save",attrs:{"aria-hidden":"true"}}),t._v(" "+t._s(t.__("Save"))+"\n ")])],1)])])]),t._v(" "),e("div",{staticClass:"sui-modal sui-modal-sm"},[e("div",{staticClass:"sui-modal-content",attrs:{role:"dialog",id:"apply-config","aria-modal":"true","aria-labelledby":"apply-config","aria-describedby":"apply-config"}},[e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},[t._m(4),t._v(" "),e("h3",{staticClass:"sui-box-title sui-lg"},[t._v(t._s(t.__("Apply config")))]),t._v(" "),e("p",{staticClass:"sui-description",domProps:{innerHTML:t._s(t.apply_text)}})]),t._v(" "),e("div",{staticClass:"sui-box-footer sui-flatten sui-content-center"},[e("button",{staticClass:"sui-button sui-button-ghost",attrs:{"data-modal-close":""}},[t._v("\n Cancel\n ")]),t._v(" "),e("submit-button",{attrs:{state:t.state,"css-class":"sui-button sui-button-blue",disabled:!t.new_config_name.length},on:{click:t.apply_config}},[e("i",{staticClass:"sui-icon-check",attrs:{"aria-hidden":"true"}}),t._v(" "+t._s(t.__("Apply"))+"\n ")])],1)])])]),t._v(" "),e("div",{staticClass:"sui-modal sui-modal-sm"},[e("div",{staticClass:"sui-modal-content",attrs:{role:"dialog",id:"delete-config","aria-modal":"true","aria-labelledby":"delete-config","aria-describedby":"delete-config"}},[e("div",{staticClass:"sui-box"},[e("div",{staticClass:"sui-box-header sui-flatten sui-content-center sui-spacing-top--60"},[t._m(5),t._v(" "),e("h3",{staticClass:"sui-box-title sui-lg"},[t._v(t._s(t.__("Delete Configuration File")))]),t._v(" "),e("p",{staticClass:"sui-description",domProps:{innerHTML:t._s(t.delete_text)}})]),t._v(" "),e("div",{staticClass:"sui-box-footer sui-flatten sui-content-center"},[e("button",{staticClass:"sui-button sui-button-ghost",attrs:{"data-modal-close":""}},[t._v("\n "+t._s(t.__("Cancel"))+"\n ")]),t._v(" "),e("submit-button",{attrs:{"css-class":"sui-button sui-button-red",state:t.state},on:{click:t.delete_config}},[t._v("\n "+t._s(t.__("Delete"))+"\n ")])],1)])])])])}),[function(){var t=this.$createElement,s=this._self._c||t;return s("span",{staticClass:"defender-container"},[s("i",{staticClass:"sui-icon-defender",attrs:{"aria-hidden":"true"}})])},function(){var t=this.$createElement,s=this._self._c||t;return s("button",{staticClass:"sui-button-icon sui-dropdown-anchor",attrs:{"aria-label":"Dropdown"}},[s("i",{staticClass:"sui-icon-more",attrs:{"aria-hidden":"true"}})])},function(){var t=this.$createElement,s=this._self._c||t;return s("button",{staticClass:"sui-button-icon sui-button-float--right",attrs:{"data-modal-close":""}},[s("i",{staticClass:"sui-icon-close sui-md",attrs:{"aria-hidden":"true"}}),this._v(" "),s("span",{staticClass:"sui-screen-reader-text"},[this._v("Close this dialog.")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("button",{staticClass:"sui-button-icon sui-button-float--right",attrs:{"data-modal-close":""}},[s("i",{staticClass:"sui-icon-close sui-md",attrs:{"aria-hidden":"true"}}),this._v(" "),s("span",{staticClass:"sui-screen-reader-text"},[this._v("Close this dialog.")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("button",{staticClass:"sui-button-icon sui-button-float--right",attrs:{"data-modal-close":""}},[s("i",{staticClass:"sui-icon-close sui-md",attrs:{"aria-hidden":"true"}}),this._v(" "),s("span",{staticClass:"sui-screen-reader-text"},[this._v("Close this dialog.")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("button",{staticClass:"sui-button-icon sui-button-float--right",attrs:{"data-modal-close":""}},[s("i",{staticClass:"sui-icon-close sui-md",attrs:{"aria-hidden":"true"}}),this._v(" "),s("span",{staticClass:"sui-screen-reader-text"},[this._v("Close this dialog.")])])}],!1,null,null,null).exports,B={mixins:[n.a],name:"tutorial",props:["link"],data:function(){return{showMore:!1,whitelabel:defender.whitelabel,width:{document:0},suiBreakpoints:{tablet:782,largeDevice:1200},tutorialLink1:"https://premium.wpmudev.org/blog/stop-hackers-with-defender-wordpress-security-plugin/",tutorialLink2:"https://premium.wpmudev.org/blog/delete-suspicious-code-defender/",tutorialLink3:"https://premium.wpmudev.org/blog/how-to-get-the-most-out-of-defender-security/",tutorialLink4:"https://premium.wpmudev.org/blog/defender-ip-address-lockout-firewall/"}},created:function(){this.showMore=!this.isMobile()},computed:{documentWidth:function(){return this.width.document}},watch:{documentWidth:function(){this.reload()}},mounted:function(){var t=this;this.$nextTick((function(){window.addEventListener("resize",t.getWidthDocument),t.getWidthDocument()}))},methods:{isMobile:function(){return screen.width<=760},tutorialTitle:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,s=arguments[1],e="";switch(t){case 1:e=this.__("How to Stop Hackers in Their Tracks with Defender");break;case 2:e=1640<=this.width.document||500<this.width.document&&793>this.width.document?this.__("Find Out if You’re Hacked: How to Find and Delete Suspicious Code with Defender"):this.__("Find Out if You’re Hacked: How to Find and Delete Suspicious Code...");break;case 3:e=this.__("How to Get the Most Out of Defender Security");break;case 4:e=1540<=this.width.document||430<this.width.document&&793>this.width.document?this.__("How to Create a Powerful and Secure Customized Firewall with Defender"):this.__("How to Create a Powerful and Secure Customized Firewall...")}return this.vsprintf('<a href="%s" target="_blank">%s</a>',s,e)},tutorialDesc:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,s=arguments[1],e=void 0,i=this.__("Read article");switch(t){case 1:e=this.__("Defender deters hackers with IP banning, login lockout, updating security keys, and more.");break;case 2:e=this.__("Detecting suspicious code within a site isn’t always that simple and can easily go unnoticed.");break;case 3:e=this.__("Keeping your WordPress site safe often requires no more than the click of a button with Defender.");break;case 4:e=this.__("Hackers can be persistent at trying to get into your site and drop malicious code...")}return this.vsprintf('<a href="%s" target="_blank">%s <span>%s</span></a>',s,e,i)},nextSlide:function(){jQuery(".wd-tutorial-post").hide().last().show(),jQuery(".slider__control_right").hide(),jQuery(".slider__control_left").show()},prevSlide:function(){jQuery(".wd-tutorial-post").show().last().hide(),jQuery(".slider__control_right").show(),jQuery(".slider__control_left").hide()},getWidthDocument:function(){this.width.document=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},reload:function(){this.suiBreakpoints.largeDevice<=this.width.document||this.suiBreakpoints.tablet>=this.width.document?(jQuery(".slider__control").hide(),jQuery(".wd-tutorial-post").show()):this.prevSlide()}},beforeDestroy:function(){window.removeEventListener("resize",this.getWidthDocument)}},Y=(e("./src/module/dashboard/component/tutorial.vue?vue&type=style&index=0&id=111cbf2d&scoped=true&lang=css&"),Object(r.a)(B,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return 0==t.whitelabel.hide_doc_link?e("div",{staticClass:"sui-box wd-tutorial"},[e("div",{staticClass:"sui-box-header"},[e("h3",{staticClass:"sui-box-title"},[t._v("\n "+t._s(t.__("Tutorials"))+"\n ")]),t._v(" "),e("div",{staticClass:"sui-actions-right"},[e("a",{staticClass:"wd-link",attrs:{href:"https://premium.wpmudev.org/blog/category/tutorials/",target:"_blank"}},[e("i",{staticClass:"sui-icon-open-new-window icon-link-blue sui-sm",attrs:{"aria-hidden":"true"}}),t._v(t._s(t.__("View all"))+"\n ")])])]),t._v(" "),e("div",{staticClass:"sui-box-body"},[e("div",{staticClass:"sui-row"},[e("div",{staticClass:"sui-col-lg-3 sui-col-md-4 wd-tutorial-post"},[e("div",{staticClass:"wd-tutorial-title"},[e("img",{staticClass:"sui-image",attrs:{src:t.assetUrl("assets/img/tutorial1.png"),srcset:t.assetUrl("assets/img/tutorial1@2x.png 2x"),"aria-hidden":"true"}}),t._v(" "),e("div",{staticClass:"wd-tutorial-title-text"},[e("small",{staticClass:"no-margin-bottom",domProps:{innerHTML:t._s(t.tutorialTitle(1,t.tutorialLink1))}}),t._v(" "),e("p",{staticClass:"sui-description no-margin-top"},[t._v(t._s(t.__("*5 min read")))])])]),t._v(" "),e("p",{staticClass:"sui-description wd-tutorial-desc",domProps:{innerHTML:t._s(t.tutorialDesc(1,t.tutorialLink1))}})]),t._v(" "),e("div",{staticClass:"sui-col-lg-3 sui-col-md-4 wd-tutorial-post"},[e("div",{staticClass:"wd-tutorial-title"},[e("img",{staticClass:"sui-image",attrs:{src:t.assetUrl("assets/img/tutorial2.png"),srcset:t.assetUrl("assets/img/tutorial2@2x.png 2x"),"aria-hidden":"true"}}),t._v(" "),e("div",{staticClass:"wd-tutorial-title-text"},[e("small",{staticClass:"no-margin-bottom",domProps:{innerHTML:t._s(t.tutorialTitle(2,t.tutorialLink2))}}),t._v(" "),e("p",{staticClass:"sui-description no-margin-top"},[t._v(t._s(t.__("*6 min read")))])])]),t._v(" "),e("p",{staticClass:"sui-description wd-tutorial-desc",domProps:{innerHTML:t._s(t.tutorialDesc(2,t.tutorialLink2))}})]),t._v(" "),t.showMore?e("div",{staticClass:"sui-col-lg-3 sui-col-md-4 wd-tutorial-post"},[e("div",{staticClass:"wd-tutorial-title"},[e("img",{staticClass:"sui-image",attrs:{src:t.assetUrl("assets/img/tutorial3.png"),srcset:t.assetUrl("assets/img/tutorial3@2x.png 2x"),"aria-hidden":"true"}}),t._v(" "),e("div",{staticClass:"wd-tutorial-title-text"},[e("small",{staticClass:"no-margin-bottom",domProps:{innerHTML:t._s(t.tutorialTitle(3,t.tutorialLink3))}}),t._v(" "),e("p",{staticClass:"sui-description no-margin-top"},[t._v(t._s(t.__("*7 min read")))])])]),t._v(" "),e("p",{staticClass:"sui-description wd-tutorial-desc",domProps:{innerHTML:t._s(t.tutorialDesc(3,t.tutorialLink3))}})]):t._e(),t._v(" "),t.showMore?e("div",{staticClass:"sui-col-lg-3 sui-col-md-4 wd-tutorial-post"},[e("div",{staticClass:"wd-tutorial-title"},[e("img",{staticClass:"sui-image",attrs:{src:t.assetUrl("assets/img/tutorial4.png"),srcset:t.assetUrl("assets/img/tutorial4@2x.png 2x"),"aria-hidden":"true"}}),t._v(" "),e("div",{staticClass:"wd-tutorial-title-text"},[e("small",{staticClass:"no-margin-bottom",domProps:{innerHTML:t._s(t.tutorialTitle(4,t.tutorialLink4))}}),t._v(" "),e("p",{staticClass:"sui-description no-margin-top"},[t._v(t._s(t.__("*6 min read")))])])]),t._v(" "),e("p",{staticClass:"sui-description wd-tutorial-desc",domProps:{innerHTML:t._s(t.tutorialDesc(4,t.tutorialLink4))}})]):t._e(),t._v(" "),e("a",{staticClass:"wd-link wd-link-show-more icon-link-blue",attrs:{href:"#","aria-expanded":!!t.showMore},on:{click:function(s){t.showMore=!t.showMore}}},[t._v("\n "+t._s(t.__("Show"))+" "+t._s(t.showMore?"less":"more")+" "),e("i",{staticClass:"icon-link-blue sui-sm",class:t.showMore?"sui-icon-chevron-up":"sui-icon-chevron-down",attrs:{"aria-hidden":"true"}})])]),t._v(" "),e("a",{staticClass:"slider__control slider__control_left",attrs:{href:"#",role:"button"},on:{click:t.prevSlide}},[e("i",{staticClass:"sui-icon-chevron-left sui-sm",attrs:{"aria-hidden":"true"}})]),t._v(" "),e("a",{staticClass:"slider__control slider__control_right slider__control_show",attrs:{href:"#",role:"button"},on:{click:t.nextSlide}},[e("i",{staticClass:"sui-icon-chevron-right sui-sm",attrs:{"aria-hidden":"true"}})])])]):t._e()}),[],!1,null,"111cbf2d",null).exports),Q={mixins:[n.a],name:"dashboard",data:function(){return{quick_setup:parseInt(dashboard.quick_setup.show),show_features:dashboard.new_features.show,is_free:parseInt(defender.is_free),security_tweaks:{count:{issues:dashboard.security_tweaks.count.issues,resolved:dashboard.security_tweaks.count.resolved,total:dashboard.security_tweaks.count.total}},queue_waf:dashboard.waf.waf.maybe_show,scan:{count:0,scan:dashboard.scan.scan},ip_lockout:{last_lockout:dashboard.ip_lockout.summary.lastLockout},nonces:dashboard.scan.nonces,endpoints:dashboard.scan.endpoints,state:{on_saving:!1}}},components:{Tutorial:Y,PresetConfig:G,PresetConfigModal:z,WafModal:F,waf_free:q,Waf:W,TwoFa:L,"security-tweaks":l,"file-scanning":u,"file-scanning-free":_,blacklist:h,"blacklist-free":v,"ip-lockout":g,audit:C,"audit-free":y,report:x,"report-free":T,"advanced-tools":j,"quick-setup":E,"quick-setup-free":D,"cross-sale":O},methods:{countScanIssues:function(){var t=dashboard.scan.scan;return null===t||"init"===t.status||"progress"===t.status?0:t.count.total},newScan:function(){var t=this;this.httpPostRequest("newScan",{},(function(s){t.$nextTick((function(){var e=t.$refs["file-scanning"];e.scan={},t.scan.scan={},t.scan.scan.status=s.data.status,e.scan.status=s.data.status,e.scan.percent=s.data.percent,e.scan.status_text=s.data.status_text,e.polling()}))}))},scanCanceled:function(t){this.scan.scan=t},scanCompleted:function(t,s){this.scan.count=s,this.scan.scan=t}},computed:{tooltips:function(){var t=this.__("You don't have any outstanding security issues, nice work!");return 1===this.security_tweaks.count.issues&&0===this.scan.count?t=this.__("You have one security tweak left to do. We recommend you action it, or ignore it if it's irrelevant."):0===this.security_tweaks.count.issues&&1===this.scan.count?t=this.__("We've detected a potential security risk in your file system. We recommend you take a look and action a fix, or ignore the file if it's harmless."):1===this.security_tweaks.count.issues&&1===this.scan.count?t=this.__("You have one security tweak left to do, and one potential security risk in your file system. We recommend you take a look and action fixes, or ignore the issues if they are harmless."):1===this.security_tweaks.count.issues&&this.scan.count>1?t=this.vsprintf(this.__("You have one security tweak left to do, and %s potential security risks in your file system. We recommend you take a look and action fixes, or ignore the issues if they are harmless"),this.scan.count):this.security_tweaks.count.issues>1&&1===this.scan.count?t=this.vsprintf(this.__("You have %s security tweaks left to do, and one potential security risk in your file system. We recommend you take a look and action fixes, or ignore the issues if they are harmless."),this.security_tweaks.count.issues):this.security_tweaks.count.issues>1&&this.scan.count>1?t=this.vsprintf(this.__("You have %s security tweaks left to do, and %s potential security risks in your file system. We recommend you take a look and action fixes, or ignore the issues if they are harmless."),this.security_tweaks.count.issues,this.scan.count):this.security_tweaks.count.issues>1&&0===this.scan.count?t=this.vsprintf(this.__("You have %d security tweaks left to do. We recommend you action it, or ignore it if it's irrelevant."),this.security_tweaks.count.issues):0===this.security_tweaks.count.issues&&this.scan.count>1&&(t=this.vsprintf(this.__("We've detected %d potential security risks in your file system. We recommend you take a look and action a fix, or ignore the file if it's harmless."),this.scan.count)),t},securityTweaksIndicator:function(){return this.security_tweaks.count.resolved+"/"+this.security_tweaks.count.total},countTotalIssues:function(){return this.scan.count+this.security_tweaks.count.issues}},mounted:function(){var t=this;this.$nextTick((function(){t.scan.count=t.countScanIssues()}))}},X=Object(r.a)(Q,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"sui-wrap",class:t.maybeHighContrast()},[e("div",{staticClass:"defender-dashboard"},[e("div",{staticClass:"sui-header"},[e("h1",{staticClass:"sui-header-title"},[t._v(t._s(t.__("Dashboard")))]),t._v(" "),e("doc-link",{attrs:{link:"https://premium.wpmudev.org/docs/wpmu-dev-plugins/defender"}})],1),t._v(" "),e("tutorial"),t._v(" "),e("summary-box",[e("div",{staticClass:"sui-summary-segment"},[e("div",{staticClass:"sui-summary-details"},[e("span",{staticClass:"sui-summary-large",domProps:{textContent:t._s(t.countTotalIssues)}}),t._v(" "),e("span",{staticClass:"sui-tooltip sui-tooltip-top-left sui-tooltip-constrained",attrs:{"data-tooltip":t.tooltips}},[0===this.security_tweaks.count.issues&&0===this.scan.count?e("i",{staticClass:"sui-icon-check-tick sui-success",attrs:{"aria-hidden":"true"}}):e("i",{staticClass:"sui-icon-info sui-warning",attrs:{"aria-hidden":"true"}})]),t._v(" "),e("span",{staticClass:"sui-summary-sub"},[t._v(t._s(t.__("security issues")))])])]),t._v(" "),e("div",{staticClass:"sui-summary-segment"},[e("ul",{staticClass:"sui-list"},[e("li",[e("span",{staticClass:"sui-list-label"},[t._v(t._s(t.__("Security Tweaks Actioned")))]),t._v(" "),e("span",{staticClass:"sui-list-detail",domProps:{textContent:t._s(t.securityTweaksIndicator)}})]),t._v(" "),e("li",[e("span",{staticClass:"sui-list-label"},[t._v(t._s(t.__("Malware Scan Issues")))]),t._v(" "),e("span",{staticClass:"sui-list-detail"},[null===t.scan.scan?e("submit-button",{attrs:{type:"button","css-class":"sui-button-blue",state:t.state},on:{click:t.newScan}},[t._v("\n "+t._s(t.__("New Scan"))+"\n ")]):"init"===t.scan.scan.status||"progress"===t.scan.scan.status?e("i",{staticClass:"sui-icon-loader sui-loading"}):0===t.scan.count?e("i",{staticClass:"sui-icon-check-tick sui-success"}):e("span",{staticClass:"sui-tag sui-tag-error"},[t._v(t._s(t.scan.count))])],1)]),t._v(" "),e("li",[e("span",{staticClass:"sui-list-label"},[t._v(t._s(t.__("Last Lockout")))]),t._v(" "),e("span",{staticClass:"sui-list-detail"},[t._v(t._s(t.ip_lockout.last_lockout))])])])])]),t._v(" "),e("div",{staticClass:"sui-row"},[e("div",{staticClass:"sui-col-md-6"},[e("security-tweaks"),t._v(" "),0===t.is_free&&!0===t.queue_waf?e("waf"):t._e(),t._v(" "),1===t.is_free?e("waf_free"):t._e(),t._v(" "),0===t.is_free?e("blacklist"):1===t.is_free?e("blacklist-free"):t._e(),t._v(" "),e("advanced-tools"),t._v(" "),e("preset-config")],1),t._v(" "),e("div",{staticClass:"sui-col-md-6"},[0===t.is_free?e("file-scanning",{ref:"file-scanning",on:{scanCanceled:t.scanCanceled,scanCompleted:t.scanCompleted}}):1===t.is_free?e("file-scanning-free",{ref:"file-scanning",attrs:{scanCompleted:"scanCompleted"},on:{scanCanceled:t.scanCanceled}}):t._e(),t._v(" "),e("ip-lockout"),t._v(" "),0===t.is_free&&t.queue_waf?e("audit"):1===t.is_free?e("audit-free"):t._e(),t._v(" "),e("two-fa"),t._v(" "),0===t.is_free?e("report"):1===t.is_free?e("report-free"):t._e()],1)]),t._v(" "),1===t.is_free?e("cross-sale"):t._e(),t._v(" "),e("app-footer")],1),t._v(" "),1===t.quick_setup&&0===t.is_free?e("quick-setup"):1===t.quick_setup&&1===t.is_free?e("quick-setup-free"):1==t.show_features?e("preset-config-modal"):t._e()],1)}),[],!1,null,null,null).exports,J=e("./src/component/overlay.vue"),Z=e("./src/component/submit-button.vue"),K=e("./src/component/footer.vue"),tt=e("./src/component/doc-link.vue"),st=e("./src/component/summary-box.vue");a.a.component("overlay",J.a),a.a.component("submit-button",Z.a),a.a.component("app-footer",K.a),a.a.component("doc-link",tt.a),a.a.component("summary-box",st.a);new a.a({el:"#defender",components:{dashboard:X},render:function(t){return t(X)}})},"./src/helper/base_hepler.js":function(t,s,e){"use strict";var i=e("./node_modules/xss/lib/index.js"),a=function(t,s){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,s){var e=[],i=!0,a=!1,n=void 0;try{for(var o,r=t[Symbol.iterator]();!(i=(o=r.next()).done)&&(e.push(o.value),!s||e.length!==s);i=!0);}catch(t){a=!0,n=t}finally{try{!i&&r.return&&r.return()}finally{if(a)throw n}}return e}(t,s);throw new TypeError("Invalid attempt to destructure non-iterable instance")},n=wp.i18n,o={whiteList:{a:["href","title","target"],span:["class"],strong:["*"]},safeAttrValue:function(t,s,e,a){return"a"===t&&"href"===s&&"%s"===e?"%s":Object(i.safeAttrValue)(t,s,e,a)}},r=new i.FilterXSS(o),l=[];s.a={methods:{__:function(t){var s=n.__(t,"wpdef");return r.process(s)},xss:function(t){return r.process(t)},vsprintf:function(t){return n.sprintf.apply(null,arguments)},siteUrl:function(t){return void 0!==t?defender.site_url+t:defender.site_url},adminUrl:function(t){return void 0!==t?defender.admin_url+t:defender.admin_url},assetUrl:function(t){return defender.defender_url+t},maybeHighContrast:function(){return{"sui-color-accessible":!0===defender.misc.high_contrast}},maybeHideBranding:function(){return defender.whitelabel.hide_branding},isWhitelabelEnabled:function(){return defender.whitelabel.enabled},campaign_url:function(t){return"https://premium.wpmudev.org/project/wp-defender/?utm_source=defender&utm_medium=plugin&utm_campaign="+t},campaignUrl:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"https://premium.wpmudev.org/"+t+"?utm_source=defender&utm_medium=plugin&utm_campaign="+s},httpRequest:function(t,s,e,i,a){var n=this;void 0===a&&(this.state.on_saving=!0);var o=ajaxurl+"?action="+this.endpoints[s]+"&_wpnonce="+this.nonces[s],r=jQuery.ajax({url:o,method:t,data:e,success:function(t){var s=t.data;n.state.on_saving=!1,void 0!==s&&void 0!==s.message&&(t.success?Defender.showNotification("success",s.message):Defender.showNotification("error",s.message)),void 0!==i&&i(t)}});l.push(r)},httpGetRequest:function(t,s,e,i){this.httpRequest("get",t,s,e,i)},httpPostRequest:function(t,s,e,i){this.httpRequest("post",t,s,e,i)},abortAllRequests:function(){for(var t=0;t<l.length;t++)l[t].abort()},getQueryStringParams:function(t){return t?(/^[?#]/.test(t)?t.slice(1):t).split("&").reduce((function(t,s){var e=s.split("="),i=a(e,2),n=i[0],o=i[1];return t[n]=o?decodeURIComponent(o.replace(/\+/g," ")):"",t}),{}):{}},rebindSUI:function(){jQuery("select:not([multiple])").each((function(){SUI.suiSelect(this)})),jQuery(".sui-accordion").each((function(){SUI.suiAccordion(this)})),SUI.modalDialog()}}}},"./src/module/dashboard/component/tutorial.vue?vue&type=style&index=0&id=111cbf2d&scoped=true&lang=css&":function(t,s,e){"use strict";var i=e("./node_modules/vue-style-loader/index.js!./node_modules/css-loader/index.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js?!./src/module/dashboard/component/tutorial.vue?vue&type=style&index=0&id=111cbf2d&scoped=true&lang=css&");e.n(i).a},vue:function(t,s){t.exports=Vue}});
|
assets/app/ip-lockout.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(t){var e=window.webpackHotUpdate;window.webpackHotUpdate=function(t,s){!function(t,e){if(!k[t]||!y[t])return;for(var s in y[t]=!1,e)Object.prototype.hasOwnProperty.call(e,s)&&(m[s]=e[s]);0==--v&&0===g&&j()}(t,s),e&&e(t,s)};var s,i=!0,o="b39acf366faa9b224a1a",n={},a=[],r=[];function l(t){var e=M[t];if(!e)return O;var i=function(i){return e.hot.active?(M[i]?-1===M[i].parents.indexOf(t)&&M[i].parents.push(t):(a=[t],s=i),-1===e.children.indexOf(i)&&e.children.push(i)):(console.warn("[HMR] unexpected require("+i+") from disposed module "+t),a=[]),O(i)},o=function(t){return{configurable:!0,enumerable:!0,get:function(){return O[t]},set:function(e){O[t]=e}}};for(var n in O)Object.prototype.hasOwnProperty.call(O,n)&&"e"!==n&&"t"!==n&&Object.defineProperty(i,n,o(n));return i.e=function(t){return"ready"===c&&_("prepare"),g++,O.e(t).then(e,(function(t){throw e(),t}));function e(){g--,"prepare"===c&&(b[t]||x(t),0===g&&0===v&&j())}},i.t=function(t,e){return 1&e&&(t=i(t)),O.t(t,-2&e)},i}function u(e){var i={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:s!==e,active:!0,accept:function(t,e){if(void 0===t)i._selfAccepted=!0;else if("function"==typeof t)i._selfAccepted=t;else if("object"==typeof t)for(var s=0;s<t.length;s++)i._acceptedDependencies[t[s]]=e||function(){};else i._acceptedDependencies[t]=e||function(){}},decline:function(t){if(void 0===t)i._selfDeclined=!0;else if("object"==typeof t)for(var e=0;e<t.length;e++)i._declinedDependencies[t[e]]=!0;else i._declinedDependencies[t]=!0},dispose:function(t){i._disposeHandlers.push(t)},addDisposeHandler:function(t){i._disposeHandlers.push(t)},removeDisposeHandler:function(t){var e=i._disposeHandlers.indexOf(t);e>=0&&i._disposeHandlers.splice(e,1)},invalidate:function(){switch(this._selfInvalidated=!0,c){case"idle":(m={})[e]=t[e],_("ready");break;case"ready":D(e);break;case"prepare":case"check":case"dispose":case"apply":(f=f||[]).push(e)}},check:C,apply:S,status:function(t){if(!t)return c;d.push(t)},addStatusHandler:function(t){d.push(t)},removeStatusHandler:function(t){var e=d.indexOf(t);e>=0&&d.splice(e,1)},data:n[e]};return s=void 0,i}var d=[],c="idle";function _(t){c=t;for(var e=0;e<d.length;e++)d[e].call(null,t)}var h,m,p,f,v=0,g=0,b={},y={},k={};function w(t){return+t+""===t?+t:t}function C(t){if("idle"!==c)throw new Error("check() is only allowed in idle status");return i=t,_("check"),(e=1e4,e=e||1e4,new Promise((function(t,s){if("undefined"==typeof XMLHttpRequest)return s(new Error("No browser support"));try{var i=new XMLHttpRequest,n=O.p+""+o+".hot-update.json";i.open("GET",n,!0),i.timeout=e,i.send(null)}catch(t){return s(t)}i.onreadystatechange=function(){if(4===i.readyState)if(0===i.status)s(new Error("Manifest request to "+n+" timed out."));else if(404===i.status)t();else if(200!==i.status&&304!==i.status)s(new Error("Manifest request to "+n+" failed."));else{try{var e=JSON.parse(i.responseText)}catch(t){return void s(t)}t(e)}}}))).then((function(t){if(!t)return _(P()?"ready":"idle"),null;y={},b={},k=t.c,p=t.h,_("prepare");var e=new Promise((function(t,e){h={resolve:t,reject:e}}));m={};return x(3),"prepare"===c&&0===g&&0===v&&j(),e}));var e}function x(t){k[t]?(y[t]=!0,v++,function(t){var e=document.createElement("script");e.charset="utf-8",e.src=O.p+""+t+"."+o+".hot-update.js",document.head.appendChild(e)}(t)):b[t]=!0}function j(){_("ready");var t=h;if(h=null,t)if(i)Promise.resolve().then((function(){return S(i)})).then((function(e){t.resolve(e)}),(function(e){t.reject(e)}));else{var e=[];for(var s in m)Object.prototype.hasOwnProperty.call(m,s)&&e.push(w(s));t.resolve(e)}}function S(e){if("ready"!==c)throw new Error("apply() is only allowed in ready status");return function e(i){var r,l,u,d,c;function h(t){for(var e=[t],s={},i=e.map((function(t){return{chain:[t],id:t}}));i.length>0;){var o=i.pop(),n=o.id,a=o.chain;if((d=M[n])&&(!d.hot._selfAccepted||d.hot._selfInvalidated)){if(d.hot._selfDeclined)return{type:"self-declined",chain:a,moduleId:n};if(d.hot._main)return{type:"unaccepted",chain:a,moduleId:n};for(var r=0;r<d.parents.length;r++){var l=d.parents[r],u=M[l];if(u){if(u.hot._declinedDependencies[n])return{type:"declined",chain:a.concat([l]),moduleId:n,parentId:l};-1===e.indexOf(l)&&(u.hot._acceptedDependencies[n]?(s[l]||(s[l]=[]),v(s[l],[n])):(delete s[l],e.push(l),i.push({chain:a.concat([l]),id:l})))}}}}return{type:"accepted",moduleId:t,outdatedModules:e,outdatedDependencies:s}}function v(t,e){for(var s=0;s<e.length;s++){var i=e[s];-1===t.indexOf(i)&&t.push(i)}}P();var g={},b=[],y={},C=function(){console.warn("[HMR] unexpected require("+j.moduleId+") to disposed module")};for(var x in m)if(Object.prototype.hasOwnProperty.call(m,x)){var j;c=w(x),j=m[x]?h(c):{type:"disposed",moduleId:x};var S=!1,D=!1,T=!1,A="";switch(j.chain&&(A="\nUpdate propagation: "+j.chain.join(" -> ")),j.type){case"self-declined":i.onDeclined&&i.onDeclined(j),i.ignoreDeclined||(S=new Error("Aborted because of self decline: "+j.moduleId+A));break;case"declined":i.onDeclined&&i.onDeclined(j),i.ignoreDeclined||(S=new Error("Aborted because of declined dependency: "+j.moduleId+" in "+j.parentId+A));break;case"unaccepted":i.onUnaccepted&&i.onUnaccepted(j),i.ignoreUnaccepted||(S=new Error("Aborted because "+c+" is not accepted"+A));break;case"accepted":i.onAccepted&&i.onAccepted(j),D=!0;break;case"disposed":i.onDisposed&&i.onDisposed(j),T=!0;break;default:throw new Error("Unexception type "+j.type)}if(S)return _("abort"),Promise.reject(S);if(D)for(c in y[c]=m[c],v(b,j.outdatedModules),j.outdatedDependencies)Object.prototype.hasOwnProperty.call(j.outdatedDependencies,c)&&(g[c]||(g[c]=[]),v(g[c],j.outdatedDependencies[c]));T&&(v(b,[j.moduleId]),y[c]=C)}var Y,I=[];for(l=0;l<b.length;l++)c=b[l],M[c]&&M[c].hot._selfAccepted&&y[c]!==C&&!M[c].hot._selfInvalidated&&I.push({module:c,parents:M[c].parents.slice(),errorHandler:M[c].hot._selfAccepted});_("dispose"),Object.keys(k).forEach((function(t){!1===k[t]&&function(t){delete installedChunks[t]}(t)}));var L,N,E=b.slice();for(;E.length>0;)if(c=E.pop(),d=M[c]){var H={},R=d.hot._disposeHandlers;for(u=0;u<R.length;u++)(r=R[u])(H);for(n[c]=H,d.hot.active=!1,delete M[c],delete g[c],u=0;u<d.children.length;u++){var U=M[d.children[u]];U&&((Y=U.parents.indexOf(c))>=0&&U.parents.splice(Y,1))}}for(c in g)if(Object.prototype.hasOwnProperty.call(g,c)&&(d=M[c]))for(N=g[c],u=0;u<N.length;u++)L=N[u],(Y=d.children.indexOf(L))>=0&&d.children.splice(Y,1);_("apply"),void 0!==p&&(o=p,p=void 0);for(c in m=void 0,y)Object.prototype.hasOwnProperty.call(y,c)&&(t[c]=y[c]);var $=null;for(c in g)if(Object.prototype.hasOwnProperty.call(g,c)&&(d=M[c])){N=g[c];var F=[];for(l=0;l<N.length;l++)if(L=N[l],r=d.hot._acceptedDependencies[L]){if(-1!==F.indexOf(r))continue;F.push(r)}for(l=0;l<F.length;l++){r=F[l];try{r(N)}catch(t){i.onErrored&&i.onErrored({type:"accept-errored",moduleId:c,dependencyId:N[l],error:t}),i.ignoreErrored||$||($=t)}}}for(l=0;l<I.length;l++){var W=I[l];c=W.module,a=W.parents,s=c;try{O(c)}catch(t){if("function"==typeof W.errorHandler)try{W.errorHandler(t)}catch(e){i.onErrored&&i.onErrored({type:"self-accept-error-handler-errored",moduleId:c,error:e,originalError:t}),i.ignoreErrored||$||($=e),$||($=t)}else i.onErrored&&i.onErrored({type:"self-accept-errored",moduleId:c,error:t}),i.ignoreErrored||$||($=t)}}if($)return _("fail"),Promise.reject($);if(f)return e(i).then((function(t){return b.forEach((function(e){t.indexOf(e)<0&&t.push(e)})),t}));return _("idle"),new Promise((function(t){t(b)}))}(e=e||{})}function P(){if(f)return m||(m={}),f.forEach(D),f=void 0,!0}function D(e){Object.prototype.hasOwnProperty.call(m,e)||(m[e]=t[e])}var M={};function O(e){if(M[e])return M[e].exports;var s=M[e]={i:e,l:!1,exports:{},hot:u(e),parents:(r=a,a=[],r),children:[]};return t[e].call(s.exports,s,s.exports,l(e)),s.l=!0,s.exports}O.m=t,O.c=M,O.d=function(t,e,s){O.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},O.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},O.t=function(t,e){if(1&e&&(t=O(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(O.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)O.d(s,i,function(e){return t[e]}.bind(null,i));return s},O.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return O.d(e,"a",e),e},O.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},O.p="",O.h=function(){return o},l("./src/ip-lockout.js")(O.s="./src/ip-lockout.js")}({"./node_modules/cssfilter/lib/css.js":function(t,e,s){var i=s("./node_modules/cssfilter/lib/default.js"),o=s("./node_modules/cssfilter/lib/parser.js");s("./node_modules/cssfilter/lib/util.js");function n(t){return null==t}function a(t){(t=function(t){var e={};for(var s in t)e[s]=t[s];return e}(t||{})).whiteList=t.whiteList||i.whiteList,t.onAttr=t.onAttr||i.onAttr,t.onIgnoreAttr=t.onIgnoreAttr||i.onIgnoreAttr,t.safeAttrValue=t.safeAttrValue||i.safeAttrValue,this.options=t}a.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var e=this.options,s=e.whiteList,i=e.onAttr,a=e.onIgnoreAttr,r=e.safeAttrValue;return o(t,(function(t,e,o,l,u){var d=s[o],c=!1;if(!0===d?c=d:"function"==typeof d?c=d(l):d instanceof RegExp&&(c=d.test(l)),!0!==c&&(c=!1),l=r(o,l)){var _,h={position:e,sourcePosition:t,source:u,isWhite:c};return c?n(_=i(o,l,h))?o+":"+l:_:n(_=a(o,l,h))?void 0:_}}))},t.exports=a},"./node_modules/cssfilter/lib/default.js":function(t,e){function s(){var t={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return t}var i=/javascript\s*\:/gim;e.whiteList=s(),e.getDefaultWhiteList=s,e.onAttr=function(t,e,s){},e.onIgnoreAttr=function(t,e,s){},e.safeAttrValue=function(t,e){return i.test(e)?"":e}},"./node_modules/cssfilter/lib/index.js":function(t,e,s){var i=s("./node_modules/cssfilter/lib/default.js"),o=s("./node_modules/cssfilter/lib/css.js");for(var n in(e=t.exports=function(t,e){return new o(e).process(t)}).FilterCSS=o,i)e[n]=i[n];"undefined"!=typeof window&&(window.filterCSS=t.exports)},"./node_modules/cssfilter/lib/parser.js":function(t,e,s){var i=s("./node_modules/cssfilter/lib/util.js");t.exports=function(t,e){";"!==(t=i.trimRight(t))[t.length-1]&&(t+=";");var s=t.length,o=!1,n=0,a=0,r="";function l(){if(!o){var s=i.trim(t.slice(n,a)),l=s.indexOf(":");if(-1!==l){var u=i.trim(s.slice(0,l)),d=i.trim(s.slice(l+1));if(u){var c=e(n,r.length,u,d,s);c&&(r+=c+"; ")}}}n=a+1}for(;a<s;a++){var u=t[a];if("/"===u&&"*"===t[a+1]){var d=t.indexOf("*/",a+2);if(-1===d)break;n=(a=d+1)+1,o=!1}else"("===u?o=!0:")"===u?o=!1:";"===u?o||l():"\n"===u&&l()}return i.trim(r)}},"./node_modules/cssfilter/lib/util.js":function(t,e){t.exports={indexOf:function(t,e){var s,i;if(Array.prototype.indexOf)return t.indexOf(e);for(s=0,i=t.length;s<i;s++)if(t[s]===e)return s;return-1},forEach:function(t,e,s){var i,o;if(Array.prototype.forEach)return t.forEach(e,s);for(i=0,o=t.length;i<o;i++)e.call(s,t[i],i,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(t){return String.prototype.trimRight?t.trimRight():t.replace(/(\s*$)/g,"")}}},"./node_modules/lodash/_DataView.js":function(t,e,s){var i=s("./node_modules/lodash/_getNative.js")(s("./node_modules/lodash/_root.js"),"DataView");t.exports=i},"./node_modules/lodash/_Hash.js":function(t,e,s){var i=s("./node_modules/lodash/_hashClear.js"),o=s("./node_modules/lodash/_hashDelete.js"),n=s("./node_modules/lodash/_hashGet.js"),a=s("./node_modules/lodash/_hashHas.js"),r=s("./node_modules/lodash/_hashSet.js");function l(t){var e=-1,s=null==t?0:t.length;for(this.clear();++e<s;){var i=t[e];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=n,l.prototype.has=a,l.prototype.set=r,t.exports=l},"./node_modules/lodash/_ListCache.js":function(t,e,s){var i=s("./node_modules/lodash/_listCacheClear.js"),o=s("./node_modules/lodash/_listCacheDelete.js"),n=s("./node_modules/lodash/_listCacheGet.js"),a=s("./node_modules/lodash/_listCacheHas.js"),r=s("./node_modules/lodash/_listCacheSet.js");function l(t){var e=-1,s=null==t?0:t.length;for(this.clear();++e<s;){var i=t[e];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=n,l.prototype.has=a,l.prototype.set=r,t.exports=l},"./node_modules/lodash/_Map.js":function(t,e,s){var i=s("./node_modules/lodash/_getNative.js")(s("./node_modules/lodash/_root.js"),"Map");t.exports=i},"./node_modules/lodash/_MapCache.js":function(t,e,s){var i=s("./node_modules/lodash/_mapCacheClear.js"),o=s("./node_modules/lodash/_mapCacheDelete.js"),n=s("./node_modules/lodash/_mapCacheGet.js"),a=s("./node_modules/lodash/_mapCacheHas.js"),r=s("./node_modules/lodash/_mapCacheSet.js");function l(t){var e=-1,s=null==t?0:t.length;for(this.clear();++e<s;){var i=t[e];this.set(i[0],i[1])}}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=n,l.prototype.has=a,l.prototype.set=r,t.exports=l},"./node_modules/lodash/_Promise.js":function(t,e,s){var i=s("./node_modules/lodash/_getNative.js")(s("./node_modules/lodash/_root.js"),"Promise");t.exports=i},"./node_modules/lodash/_Set.js":function(t,e,s){var i=s("./node_modules/lodash/_getNative.js")(s("./node_modules/lodash/_root.js"),"Set");t.exports=i},"./node_modules/lodash/_SetCache.js":function(t,e,s){var i=s("./node_modules/lodash/_MapCache.js"),o=s("./node_modules/lodash/_setCacheAdd.js"),n=s("./node_modules/lodash/_setCacheHas.js");function a(t){var e=-1,s=null==t?0:t.length;for(this.__data__=new i;++e<s;)this.add(t[e])}a.prototype.add=a.prototype.push=o,a.prototype.has=n,t.exports=a},"./node_modules/lodash/_Stack.js":function(t,e,s){var i=s("./node_modules/lodash/_ListCache.js"),o=s("./node_modules/lodash/_stackClear.js"),n=s("./node_modules/lodash/_stackDelete.js"),a=s("./node_modules/lodash/_stackGet.js"),r=s("./node_modules/lodash/_stackHas.js"),l=s("./node_modules/lodash/_stackSet.js");function u(t){var e=this.__data__=new i(t);this.size=e.size}u.prototype.clear=o,u.prototype.delete=n,u.prototype.get=a,u.prototype.has=r,u.prototype.set=l,t.exports=u},"./node_modules/lodash/_Symbol.js":function(t,e,s){var i=s("./node_modules/lodash/_root.js").Symbol;t.exports=i},"./node_modules/lodash/_Uint8Array.js":function(t,e,s){var i=s("./node_modules/lodash/_root.js").Uint8Array;t.exports=i},"./node_modules/lodash/_WeakMap.js":function(t,e,s){var i=s("./node_modules/lodash/_getNative.js")(s("./node_modules/lodash/_root.js"),"WeakMap");t.exports=i},"./node_modules/lodash/_arrayFilter.js":function(t,e){t.exports=function(t,e){for(var s=-1,i=null==t?0:t.length,o=0,n=[];++s<i;){var a=t[s];e(a,s,t)&&(n[o++]=a)}return n}},"./node_modules/lodash/_arrayLikeKeys.js":function(t,e,s){var i=s("./node_modules/lodash/_baseTimes.js"),o=s("./node_modules/lodash/isArguments.js"),n=s("./node_modules/lodash/isArray.js"),a=s("./node_modules/lodash/isBuffer.js"),r=s("./node_modules/lodash/_isIndex.js"),l=s("./node_modules/lodash/isTypedArray.js"),u=Object.prototype.hasOwnProperty;t.exports=function(t,e){var s=n(t),d=!s&&o(t),c=!s&&!d&&a(t),_=!s&&!d&&!c&&l(t),h=s||d||c||_,m=h?i(t.length,String):[],p=m.length;for(var f in t)!e&&!u.call(t,f)||h&&("length"==f||c&&("offset"==f||"parent"==f)||_&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||r(f,p))||m.push(f);return m}},"./node_modules/lodash/_arrayMap.js":function(t,e){t.exports=function(t,e){for(var s=-1,i=null==t?0:t.length,o=Array(i);++s<i;)o[s]=e(t[s],s,t);return o}},"./node_modules/lodash/_arrayPush.js":function(t,e){t.exports=function(t,e){for(var s=-1,i=e.length,o=t.length;++s<i;)t[o+s]=e[s];return t}},"./node_modules/lodash/_arraySome.js":function(t,e){t.exports=function(t,e){for(var s=-1,i=null==t?0:t.length;++s<i;)if(e(t[s],s,t))return!0;return!1}},"./node_modules/lodash/_assocIndexOf.js":function(t,e,s){var i=s("./node_modules/lodash/eq.js");t.exports=function(t,e){for(var s=t.length;s--;)if(i(t[s][0],e))return s;return-1}},"./node_modules/lodash/_baseFindIndex.js":function(t,e){t.exports=function(t,e,s,i){for(var o=t.length,n=s+(i?1:-1);i?n--:++n<o;)if(e(t[n],n,t))return n;return-1}},"./node_modules/lodash/_baseGet.js":function(t,e,s){var i=s("./node_modules/lodash/_castPath.js"),o=s("./node_modules/lodash/_toKey.js");t.exports=function(t,e){for(var s=0,n=(e=i(e,t)).length;null!=t&&s<n;)t=t[o(e[s++])];return s&&s==n?t:void 0}},"./node_modules/lodash/_baseGetAllKeys.js":function(t,e,s){var i=s("./node_modules/lodash/_arrayPush.js"),o=s("./node_modules/lodash/isArray.js");t.exports=function(t,e,s){var n=e(t);return o(t)?n:i(n,s(t))}},"./node_modules/lodash/_baseGetTag.js":function(t,e,s){var i=s("./node_modules/lodash/_Symbol.js"),o=s("./node_modules/lodash/_getRawTag.js"),n=s("./node_modules/lodash/_objectToString.js"),a=i?i.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?o(t):n(t)}},"./node_modules/lodash/_baseHasIn.js":function(t,e){t.exports=function(t,e){return null!=t&&e in Object(t)}},"./node_modules/lodash/_baseIsArguments.js":function(t,e,s){var i=s("./node_modules/lodash/_baseGetTag.js"),o=s("./node_modules/lodash/isObjectLike.js");t.exports=function(t){return o(t)&&"[object Arguments]"==i(t)}},"./node_modules/lodash/_baseIsEqual.js":function(t,e,s){var i=s("./node_modules/lodash/_baseIsEqualDeep.js"),o=s("./node_modules/lodash/isObjectLike.js");t.exports=function t(e,s,n,a,r){return e===s||(null==e||null==s||!o(e)&&!o(s)?e!=e&&s!=s:i(e,s,n,a,t,r))}},"./node_modules/lodash/_baseIsEqualDeep.js":function(t,e,s){var i=s("./node_modules/lodash/_Stack.js"),o=s("./node_modules/lodash/_equalArrays.js"),n=s("./node_modules/lodash/_equalByTag.js"),a=s("./node_modules/lodash/_equalObjects.js"),r=s("./node_modules/lodash/_getTag.js"),l=s("./node_modules/lodash/isArray.js"),u=s("./node_modules/lodash/isBuffer.js"),d=s("./node_modules/lodash/isTypedArray.js"),c="[object Object]",_=Object.prototype.hasOwnProperty;t.exports=function(t,e,s,h,m,p){var f=l(t),v=l(e),g=f?"[object Array]":r(t),b=v?"[object Array]":r(e),y=(g="[object Arguments]"==g?c:g)==c,k=(b="[object Arguments]"==b?c:b)==c,w=g==b;if(w&&u(t)){if(!u(e))return!1;f=!0,y=!1}if(w&&!y)return p||(p=new i),f||d(t)?o(t,e,s,h,m,p):n(t,e,g,s,h,m,p);if(!(1&s)){var C=y&&_.call(t,"__wrapped__"),x=k&&_.call(e,"__wrapped__");if(C||x){var j=C?t.value():t,S=x?e.value():e;return p||(p=new i),m(j,S,s,h,p)}}return!!w&&(p||(p=new i),a(t,e,s,h,m,p))}},"./node_modules/lodash/_baseIsMatch.js":function(t,e,s){var i=s("./node_modules/lodash/_Stack.js"),o=s("./node_modules/lodash/_baseIsEqual.js");t.exports=function(t,e,s,n){var a=s.length,r=a,l=!n;if(null==t)return!r;for(t=Object(t);a--;){var u=s[a];if(l&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++a<r;){var d=(u=s[a])[0],c=t[d],_=u[1];if(l&&u[2]){if(void 0===c&&!(d in t))return!1}else{var h=new i;if(n)var m=n(c,_,d,t,e,h);if(!(void 0===m?o(_,c,3,n,h):m))return!1}}return!0}},"./node_modules/lodash/_baseIsNative.js":function(t,e,s){var i=s("./node_modules/lodash/isFunction.js"),o=s("./node_modules/lodash/_isMasked.js"),n=s("./node_modules/lodash/isObject.js"),a=s("./node_modules/lodash/_toSource.js"),r=/^\[object .+?Constructor\]$/,l=Function.prototype,u=Object.prototype,d=l.toString,c=u.hasOwnProperty,_=RegExp("^"+d.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!n(t)||o(t))&&(i(t)?_:r).test(a(t))}},"./node_modules/lodash/_baseIsTypedArray.js":function(t,e,s){var i=s("./node_modules/lodash/_baseGetTag.js"),o=s("./node_modules/lodash/isLength.js"),n=s("./node_modules/lodash/isObjectLike.js"),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return n(t)&&o(t.length)&&!!a[i(t)]}},"./node_modules/lodash/_baseIteratee.js":function(t,e,s){var i=s("./node_modules/lodash/_baseMatches.js"),o=s("./node_modules/lodash/_baseMatchesProperty.js"),n=s("./node_modules/lodash/identity.js"),a=s("./node_modules/lodash/isArray.js"),r=s("./node_modules/lodash/property.js");t.exports=function(t){return"function"==typeof t?t:null==t?n:"object"==typeof t?a(t)?o(t[0],t[1]):i(t):r(t)}},"./node_modules/lodash/_baseKeys.js":function(t,e,s){var i=s("./node_modules/lodash/_isPrototype.js"),o=s("./node_modules/lodash/_nativeKeys.js"),n=Object.prototype.hasOwnProperty;t.exports=function(t){if(!i(t))return o(t);var e=[];for(var s in Object(t))n.call(t,s)&&"constructor"!=s&&e.push(s);return e}},"./node_modules/lodash/_baseMatches.js":function(t,e,s){var i=s("./node_modules/lodash/_baseIsMatch.js"),o=s("./node_modules/lodash/_getMatchData.js"),n=s("./node_modules/lodash/_matchesStrictComparable.js");t.exports=function(t){var e=o(t);return 1==e.length&&e[0][2]?n(e[0][0],e[0][1]):function(s){return s===t||i(s,t,e)}}},"./node_modules/lodash/_baseMatchesProperty.js":function(t,e,s){var i=s("./node_modules/lodash/_baseIsEqual.js"),o=s("./node_modules/lodash/get.js"),n=s("./node_modules/lodash/hasIn.js"),a=s("./node_modules/lodash/_isKey.js"),r=s("./node_modules/lodash/_isStrictComparable.js"),l=s("./node_modules/lodash/_matchesStrictComparable.js"),u=s("./node_modules/lodash/_toKey.js");t.exports=function(t,e){return a(t)&&r(e)?l(u(t),e):function(s){var a=o(s,t);return void 0===a&&a===e?n(s,t):i(e,a,3)}}},"./node_modules/lodash/_baseProperty.js":function(t,e){t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},"./node_modules/lodash/_basePropertyDeep.js":function(t,e,s){var i=s("./node_modules/lodash/_baseGet.js");t.exports=function(t){return function(e){return i(e,t)}}},"./node_modules/lodash/_baseSlice.js":function(t,e){t.exports=function(t,e,s){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(s=s>o?o:s)<0&&(s+=o),o=e>s?0:s-e>>>0,e>>>=0;for(var n=Array(o);++i<o;)n[i]=t[i+e];return n}},"./node_modules/lodash/_baseTimes.js":function(t,e){t.exports=function(t,e){for(var s=-1,i=Array(t);++s<t;)i[s]=e(s);return i}},"./node_modules/lodash/_baseToString.js":function(t,e,s){var i=s("./node_modules/lodash/_Symbol.js"),o=s("./node_modules/lodash/_arrayMap.js"),n=s("./node_modules/lodash/isArray.js"),a=s("./node_modules/lodash/isSymbol.js"),r=i?i.prototype:void 0,l=r?r.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(n(e))return o(e,t)+"";if(a(e))return l?l.call(e):"";var s=e+"";return"0"==s&&1/e==-1/0?"-0":s}},"./node_modules/lodash/_baseUnary.js":function(t,e){t.exports=function(t){return function(e){return t(e)}}},"./node_modules/lodash/_cacheHas.js":function(t,e){t.exports=function(t,e){return t.has(e)}},"./node_modules/lodash/_castPath.js":function(t,e,s){var i=s("./node_modules/lodash/isArray.js"),o=s("./node_modules/lodash/_isKey.js"),n=s("./node_modules/lodash/_stringToPath.js"),a=s("./node_modules/lodash/toString.js");t.exports=function(t,e){return i(t)?t:o(t,e)?[t]:n(a(t))}},"./node_modules/lodash/_coreJsData.js":function(t,e,s){var i=s("./node_modules/lodash/_root.js")["__core-js_shared__"];t.exports=i},"./node_modules/lodash/_createFind.js":function(t,e,s){var i=s("./node_modules/lodash/_baseIteratee.js"),o=s("./node_modules/lodash/isArrayLike.js"),n=s("./node_modules/lodash/keys.js");t.exports=function(t){return function(e,s,a){var r=Object(e);if(!o(e)){var l=i(s,3);e=n(e),s=function(t){return l(r[t],t,r)}}var u=t(e,s,a);return u>-1?r[l?e[u]:u]:void 0}}},"./node_modules/lodash/_equalArrays.js":function(t,e,s){var i=s("./node_modules/lodash/_SetCache.js"),o=s("./node_modules/lodash/_arraySome.js"),n=s("./node_modules/lodash/_cacheHas.js");t.exports=function(t,e,s,a,r,l){var u=1&s,d=t.length,c=e.length;if(d!=c&&!(u&&c>d))return!1;var _=l.get(t);if(_&&l.get(e))return _==e;var h=-1,m=!0,p=2&s?new i:void 0;for(l.set(t,e),l.set(e,t);++h<d;){var f=t[h],v=e[h];if(a)var g=u?a(v,f,h,e,t,l):a(f,v,h,t,e,l);if(void 0!==g){if(g)continue;m=!1;break}if(p){if(!o(e,(function(t,e){if(!n(p,e)&&(f===t||r(f,t,s,a,l)))return p.push(e)}))){m=!1;break}}else if(f!==v&&!r(f,v,s,a,l)){m=!1;break}}return l.delete(t),l.delete(e),m}},"./node_modules/lodash/_equalByTag.js":function(t,e,s){var i=s("./node_modules/lodash/_Symbol.js"),o=s("./node_modules/lodash/_Uint8Array.js"),n=s("./node_modules/lodash/eq.js"),a=s("./node_modules/lodash/_equalArrays.js"),r=s("./node_modules/lodash/_mapToArray.js"),l=s("./node_modules/lodash/_setToArray.js"),u=i?i.prototype:void 0,d=u?u.valueOf:void 0;t.exports=function(t,e,s,i,u,c,_){switch(s){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!c(new o(t),new o(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return n(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var h=r;case"[object Set]":var m=1&i;if(h||(h=l),t.size!=e.size&&!m)return!1;var p=_.get(t);if(p)return p==e;i|=2,_.set(t,e);var f=a(h(t),h(e),i,u,c,_);return _.delete(t),f;case"[object Symbol]":if(d)return d.call(t)==d.call(e)}return!1}},"./node_modules/lodash/_equalObjects.js":function(t,e,s){var i=s("./node_modules/lodash/_getAllKeys.js"),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,s,n,a,r){var l=1&s,u=i(t),d=u.length;if(d!=i(e).length&&!l)return!1;for(var c=d;c--;){var _=u[c];if(!(l?_ in e:o.call(e,_)))return!1}var h=r.get(t);if(h&&r.get(e))return h==e;var m=!0;r.set(t,e),r.set(e,t);for(var p=l;++c<d;){var f=t[_=u[c]],v=e[_];if(n)var g=l?n(v,f,_,e,t,r):n(f,v,_,t,e,r);if(!(void 0===g?f===v||a(f,v,s,n,r):g)){m=!1;break}p||(p="constructor"==_)}if(m&&!p){var b=t.constructor,y=e.constructor;b==y||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(m=!1)}return r.delete(t),r.delete(e),m}},"./node_modules/lodash/_freeGlobal.js":function(t,e,s){(function(e){var s="object"==typeof e&&e&&e.Object===Object&&e;t.exports=s}).call(this,s("./node_modules/webpack/buildin/global.js"))},"./node_modules/lodash/_getAllKeys.js":function(t,e,s){var i=s("./node_modules/lodash/_baseGetAllKeys.js"),o=s("./node_modules/lodash/_getSymbols.js"),n=s("./node_modules/lodash/keys.js");t.exports=function(t){return i(t,n,o)}},"./node_modules/lodash/_getMapData.js":function(t,e,s){var i=s("./node_modules/lodash/_isKeyable.js");t.exports=function(t,e){var s=t.__data__;return i(e)?s["string"==typeof e?"string":"hash"]:s.map}},"./node_modules/lodash/_getMatchData.js":function(t,e,s){var i=s("./node_modules/lodash/_isStrictComparable.js"),o=s("./node_modules/lodash/keys.js");t.exports=function(t){for(var e=o(t),s=e.length;s--;){var n=e[s],a=t[n];e[s]=[n,a,i(a)]}return e}},"./node_modules/lodash/_getNative.js":function(t,e,s){var i=s("./node_modules/lodash/_baseIsNative.js"),o=s("./node_modules/lodash/_getValue.js");t.exports=function(t,e){var s=o(t,e);return i(s)?s:void 0}},"./node_modules/lodash/_getRawTag.js":function(t,e,s){var i=s("./node_modules/lodash/_Symbol.js"),o=Object.prototype,n=o.hasOwnProperty,a=o.toString,r=i?i.toStringTag:void 0;t.exports=function(t){var e=n.call(t,r),s=t[r];try{t[r]=void 0;var i=!0}catch(t){}var o=a.call(t);return i&&(e?t[r]=s:delete t[r]),o}},"./node_modules/lodash/_getSymbols.js":function(t,e,s){var i=s("./node_modules/lodash/_arrayFilter.js"),o=s("./node_modules/lodash/stubArray.js"),n=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,r=a?function(t){return null==t?[]:(t=Object(t),i(a(t),(function(e){return n.call(t,e)})))}:o;t.exports=r},"./node_modules/lodash/_getTag.js":function(t,e,s){var i=s("./node_modules/lodash/_DataView.js"),o=s("./node_modules/lodash/_Map.js"),n=s("./node_modules/lodash/_Promise.js"),a=s("./node_modules/lodash/_Set.js"),r=s("./node_modules/lodash/_WeakMap.js"),l=s("./node_modules/lodash/_baseGetTag.js"),u=s("./node_modules/lodash/_toSource.js"),d=u(i),c=u(o),_=u(n),h=u(a),m=u(r),p=l;(i&&"[object DataView]"!=p(new i(new ArrayBuffer(1)))||o&&"[object Map]"!=p(new o)||n&&"[object Promise]"!=p(n.resolve())||a&&"[object Set]"!=p(new a)||r&&"[object WeakMap]"!=p(new r))&&(p=function(t){var e=l(t),s="[object Object]"==e?t.constructor:void 0,i=s?u(s):"";if(i)switch(i){case d:return"[object DataView]";case c:return"[object Map]";case _:return"[object Promise]";case h:return"[object Set]";case m:return"[object WeakMap]"}return e}),t.exports=p},"./node_modules/lodash/_getValue.js":function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},"./node_modules/lodash/_hasPath.js":function(t,e,s){var i=s("./node_modules/lodash/_castPath.js"),o=s("./node_modules/lodash/isArguments.js"),n=s("./node_modules/lodash/isArray.js"),a=s("./node_modules/lodash/_isIndex.js"),r=s("./node_modules/lodash/isLength.js"),l=s("./node_modules/lodash/_toKey.js");t.exports=function(t,e,s){for(var u=-1,d=(e=i(e,t)).length,c=!1;++u<d;){var _=l(e[u]);if(!(c=null!=t&&s(t,_)))break;t=t[_]}return c||++u!=d?c:!!(d=null==t?0:t.length)&&r(d)&&a(_,d)&&(n(t)||o(t))}},"./node_modules/lodash/_hashClear.js":function(t,e,s){var i=s("./node_modules/lodash/_nativeCreate.js");t.exports=function(){this.__data__=i?i(null):{},this.size=0}},"./node_modules/lodash/_hashDelete.js":function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},"./node_modules/lodash/_hashGet.js":function(t,e,s){var i=s("./node_modules/lodash/_nativeCreate.js"),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(i){var s=e[t];return"__lodash_hash_undefined__"===s?void 0:s}return o.call(e,t)?e[t]:void 0}},"./node_modules/lodash/_hashHas.js":function(t,e,s){var i=s("./node_modules/lodash/_nativeCreate.js"),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return i?void 0!==e[t]:o.call(e,t)}},"./node_modules/lodash/_hashSet.js":function(t,e,s){var i=s("./node_modules/lodash/_nativeCreate.js");t.exports=function(t,e){var s=this.__data__;return this.size+=this.has(t)?0:1,s[t]=i&&void 0===e?"__lodash_hash_undefined__":e,this}},"./node_modules/lodash/_isIndex.js":function(t,e){var s=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var i=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==i||"symbol"!=i&&s.test(t))&&t>-1&&t%1==0&&t<e}},"./node_modules/lodash/_isIterateeCall.js":function(t,e,s){var i=s("./node_modules/lodash/eq.js"),o=s("./node_modules/lodash/isArrayLike.js"),n=s("./node_modules/lodash/_isIndex.js"),a=s("./node_modules/lodash/isObject.js");t.exports=function(t,e,s){if(!a(s))return!1;var r=typeof e;return!!("number"==r?o(s)&&n(e,s.length):"string"==r&&e in s)&&i(s[e],t)}},"./node_modules/lodash/_isKey.js":function(t,e,s){var i=s("./node_modules/lodash/isArray.js"),o=s("./node_modules/lodash/isSymbol.js"),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(i(t))return!1;var s=typeof t;return!("number"!=s&&"symbol"!=s&&"boolean"!=s&&null!=t&&!o(t))||(a.test(t)||!n.test(t)||null!=e&&t in Object(e))}},"./node_modules/lodash/_isKeyable.js":function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},"./node_modules/lodash/_isMasked.js":function(t,e,s){var i,o=s("./node_modules/lodash/_coreJsData.js"),n=(i=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";t.exports=function(t){return!!n&&n in t}},"./node_modules/lodash/_isPrototype.js":function(t,e){var s=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||s)}},"./node_modules/lodash/_isStrictComparable.js":function(t,e,s){var i=s("./node_modules/lodash/isObject.js");t.exports=function(t){return t==t&&!i(t)}},"./node_modules/lodash/_listCacheClear.js":function(t,e){t.exports=function(){this.__data__=[],this.size=0}},"./node_modules/lodash/_listCacheDelete.js":function(t,e,s){var i=s("./node_modules/lodash/_assocIndexOf.js"),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,s=i(e,t);return!(s<0)&&(s==e.length-1?e.pop():o.call(e,s,1),--this.size,!0)}},"./node_modules/lodash/_listCacheGet.js":function(t,e,s){var i=s("./node_modules/lodash/_assocIndexOf.js");t.exports=function(t){var e=this.__data__,s=i(e,t);return s<0?void 0:e[s][1]}},"./node_modules/lodash/_listCacheHas.js":function(t,e,s){var i=s("./node_modules/lodash/_assocIndexOf.js");t.exports=function(t){return i(this.__data__,t)>-1}},"./node_modules/lodash/_listCacheSet.js":function(t,e,s){var i=s("./node_modules/lodash/_assocIndexOf.js");t.exports=function(t,e){var s=this.__data__,o=i(s,t);return o<0?(++this.size,s.push([t,e])):s[o][1]=e,this}},"./node_modules/lodash/_mapCacheClear.js":function(t,e,s){var i=s("./node_modules/lodash/_Hash.js"),o=s("./node_modules/lodash/_ListCache.js"),n=s("./node_modules/lodash/_Map.js");t.exports=function(){this.size=0,this.__data__={hash:new i,map:new(n||o),string:new i}}},"./node_modules/lodash/_mapCacheDelete.js":function(t,e,s){var i=s("./node_modules/lodash/_getMapData.js");t.exports=function(t){var e=i(this,t).delete(t);return this.size-=e?1:0,e}},"./node_modules/lodash/_mapCacheGet.js":function(t,e,s){var i=s("./node_modules/lodash/_getMapData.js");t.exports=function(t){return i(this,t).get(t)}},"./node_modules/lodash/_mapCacheHas.js":function(t,e,s){var i=s("./node_modules/lodash/_getMapData.js");t.exports=function(t){return i(this,t).has(t)}},"./node_modules/lodash/_mapCacheSet.js":function(t,e,s){var i=s("./node_modules/lodash/_getMapData.js");t.exports=function(t,e){var s=i(this,t),o=s.size;return s.set(t,e),this.size+=s.size==o?0:1,this}},"./node_modules/lodash/_mapToArray.js":function(t,e){t.exports=function(t){var e=-1,s=Array(t.size);return t.forEach((function(t,i){s[++e]=[i,t]})),s}},"./node_modules/lodash/_matchesStrictComparable.js":function(t,e){t.exports=function(t,e){return function(s){return null!=s&&(s[t]===e&&(void 0!==e||t in Object(s)))}}},"./node_modules/lodash/_memoizeCapped.js":function(t,e,s){var i=s("./node_modules/lodash/memoize.js");t.exports=function(t){var e=i(t,(function(t){return 500===s.size&&s.clear(),t})),s=e.cache;return e}},"./node_modules/lodash/_nativeCreate.js":function(t,e,s){var i=s("./node_modules/lodash/_getNative.js")(Object,"create");t.exports=i},"./node_modules/lodash/_nativeKeys.js":function(t,e,s){var i=s("./node_modules/lodash/_overArg.js")(Object.keys,Object);t.exports=i},"./node_modules/lodash/_nodeUtil.js":function(t,e,s){(function(t){var i=s("./node_modules/lodash/_freeGlobal.js"),o=e&&!e.nodeType&&e,n=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=n&&n.exports===o&&i.process,r=function(){try{var t=n&&n.require&&n.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=r}).call(this,s("./node_modules/webpack/buildin/module.js")(t))},"./node_modules/lodash/_objectToString.js":function(t,e){var s=Object.prototype.toString;t.exports=function(t){return s.call(t)}},"./node_modules/lodash/_overArg.js":function(t,e){t.exports=function(t,e){return function(s){return t(e(s))}}},"./node_modules/lodash/_root.js":function(t,e,s){var i=s("./node_modules/lodash/_freeGlobal.js"),o="object"==typeof self&&self&&self.Object===Object&&self,n=i||o||Function("return this")();t.exports=n},"./node_modules/lodash/_setCacheAdd.js":function(t,e){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},"./node_modules/lodash/_setCacheHas.js":function(t,e){t.exports=function(t){return this.__data__.has(t)}},"./node_modules/lodash/_setToArray.js":function(t,e){t.exports=function(t){var e=-1,s=Array(t.size);return t.forEach((function(t){s[++e]=t})),s}},"./node_modules/lodash/_stackClear.js":function(t,e,s){var i=s("./node_modules/lodash/_ListCache.js");t.exports=function(){this.__data__=new i,this.size=0}},"./node_modules/lodash/_stackDelete.js":function(t,e){t.exports=function(t){var e=this.__data__,s=e.delete(t);return this.size=e.size,s}},"./node_modules/lodash/_stackGet.js":function(t,e){t.exports=function(t){return this.__data__.get(t)}},"./node_modules/lodash/_stackHas.js":function(t,e){t.exports=function(t){return this.__data__.has(t)}},"./node_modules/lodash/_stackSet.js":function(t,e,s){var i=s("./node_modules/lodash/_ListCache.js"),o=s("./node_modules/lodash/_Map.js"),n=s("./node_modules/lodash/_MapCache.js");t.exports=function(t,e){var s=this.__data__;if(s instanceof i){var a=s.__data__;if(!o||a.length<199)return a.push([t,e]),this.size=++s.size,this;s=this.__data__=new n(a)}return s.set(t,e),this.size=s.size,this}},"./node_modules/lodash/_stringToPath.js":function(t,e,s){var i=s("./node_modules/lodash/_memoizeCapped.js"),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,a=i((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(o,(function(t,s,i,o){e.push(i?o.replace(n,"$1"):s||t)})),e}));t.exports=a},"./node_modules/lodash/_toKey.js":function(t,e,s){var i=s("./node_modules/lodash/isSymbol.js");t.exports=function(t){if("string"==typeof t||i(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},"./node_modules/lodash/_toSource.js":function(t,e){var s=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return s.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},"./node_modules/lodash/chunk.js":function(t,e,s){var i=s("./node_modules/lodash/_baseSlice.js"),o=s("./node_modules/lodash/_isIterateeCall.js"),n=s("./node_modules/lodash/toInteger.js"),a=Math.ceil,r=Math.max;t.exports=function(t,e,s){e=(s?o(t,e,s):void 0===e)?1:r(n(e),0);var l=null==t?0:t.length;if(!l||e<1)return[];for(var u=0,d=0,c=Array(a(l/e));u<l;)c[d++]=i(t,u,u+=e);return c}},"./node_modules/lodash/eq.js":function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},"./node_modules/lodash/find.js":function(t,e,s){var i=s("./node_modules/lodash/_createFind.js")(s("./node_modules/lodash/findIndex.js"));t.exports=i},"./node_modules/lodash/findIndex.js":function(t,e,s){var i=s("./node_modules/lodash/_baseFindIndex.js"),o=s("./node_modules/lodash/_baseIteratee.js"),n=s("./node_modules/lodash/toInteger.js"),a=Math.max;t.exports=function(t,e,s){var r=null==t?0:t.length;if(!r)return-1;var l=null==s?0:n(s);return l<0&&(l=a(r+l,0)),i(t,o(e,3),l)}},"./node_modules/lodash/get.js":function(t,e,s){var i=s("./node_modules/lodash/_baseGet.js");t.exports=function(t,e,s){var o=null==t?void 0:i(t,e);return void 0===o?s:o}},"./node_modules/lodash/hasIn.js":function(t,e,s){var i=s("./node_modules/lodash/_baseHasIn.js"),o=s("./node_modules/lodash/_hasPath.js");t.exports=function(t,e){return null!=t&&o(t,e,i)}},"./node_modules/lodash/identity.js":function(t,e){t.exports=function(t){return t}},"./node_modules/lodash/isArguments.js":function(t,e,s){var i=s("./node_modules/lodash/_baseIsArguments.js"),o=s("./node_modules/lodash/isObjectLike.js"),n=Object.prototype,a=n.hasOwnProperty,r=n.propertyIsEnumerable,l=i(function(){return arguments}())?i:function(t){return o(t)&&a.call(t,"callee")&&!r.call(t,"callee")};t.exports=l},"./node_modules/lodash/isArray.js":function(t,e){var s=Array.isArray;t.exports=s},"./node_modules/lodash/isArrayLike.js":function(t,e,s){var i=s("./node_modules/lodash/isFunction.js"),o=s("./node_modules/lodash/isLength.js");t.exports=function(t){return null!=t&&o(t.length)&&!i(t)}},"./node_modules/lodash/isBuffer.js":function(t,e,s){(function(t){var i=s("./node_modules/lodash/_root.js"),o=s("./node_modules/lodash/stubFalse.js"),n=e&&!e.nodeType&&e,a=n&&"object"==typeof t&&t&&!t.nodeType&&t,r=a&&a.exports===n?i.Buffer:void 0,l=(r?r.isBuffer:void 0)||o;t.exports=l}).call(this,s("./node_modules/webpack/buildin/module.js")(t))},"./node_modules/lodash/isFunction.js":function(t,e,s){var i=s("./node_modules/lodash/_baseGetTag.js"),o=s("./node_modules/lodash/isObject.js");t.exports=function(t){if(!o(t))return!1;var e=i(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},"./node_modules/lodash/isLength.js":function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},"./node_modules/lodash/isObject.js":function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},"./node_modules/lodash/isObjectLike.js":function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},"./node_modules/lodash/isSymbol.js":function(t,e,s){var i=s("./node_modules/lodash/_baseGetTag.js"),o=s("./node_modules/lodash/isObjectLike.js");t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==i(t)}},"./node_modules/lodash/isTypedArray.js":function(t,e,s){var i=s("./node_modules/lodash/_baseIsTypedArray.js"),o=s("./node_modules/lodash/_baseUnary.js"),n=s("./node_modules/lodash/_nodeUtil.js"),a=n&&n.isTypedArray,r=a?o(a):i;t.exports=r},"./node_modules/lodash/keys.js":function(t,e,s){var i=s("./node_modules/lodash/_arrayLikeKeys.js"),o=s("./node_modules/lodash/_baseKeys.js"),n=s("./node_modules/lodash/isArrayLike.js");t.exports=function(t){return n(t)?i(t):o(t)}},"./node_modules/lodash/memoize.js":function(t,e,s){var i=s("./node_modules/lodash/_MapCache.js");function o(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var s=function(){var i=arguments,o=e?e.apply(this,i):i[0],n=s.cache;if(n.has(o))return n.get(o);var a=t.apply(this,i);return s.cache=n.set(o,a)||n,a};return s.cache=new(o.Cache||i),s}o.Cache=i,t.exports=o},"./node_modules/lodash/property.js":function(t,e,s){var i=s("./node_modules/lodash/_baseProperty.js"),o=s("./node_modules/lodash/_basePropertyDeep.js"),n=s("./node_modules/lodash/_isKey.js"),a=s("./node_modules/lodash/_toKey.js");t.exports=function(t){return n(t)?i(a(t)):o(t)}},"./node_modules/lodash/stubArray.js":function(t,e){t.exports=function(){return[]}},"./node_modules/lodash/stubFalse.js":function(t,e){t.exports=function(){return!1}},"./node_modules/lodash/toFinite.js":function(t,e,s){var i=s("./node_modules/lodash/toNumber.js");t.exports=function(t){return t?(t=i(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},"./node_modules/lodash/toInteger.js":function(t,e,s){var i=s("./node_modules/lodash/toFinite.js");t.exports=function(t){var e=i(t),s=e%1;return e==e?s?e-s:e:0}},"./node_modules/lodash/toNumber.js":function(t,e,s){var i=s("./node_modules/lodash/isObject.js"),o=s("./node_modules/lodash/isSymbol.js"),n=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,l=/^0o[0-7]+$/i,u=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(o(t))return NaN;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(n,"");var s=r.test(t);return s||l.test(t)?u(t.slice(2),s?2:8):a.test(t)?NaN:+t}},"./node_modules/lodash/toString.js":function(t,e,s){var i=s("./node_modules/lodash/_baseToString.js");t.exports=function(t){return null==t?"":i(t)}},"./node_modules/moment/locale sync recursive \\b\\B":function(t,e){function s(t){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}s.keys=function(){return[]},s.resolve=s,t.exports=s,s.id="./node_modules/moment/locale sync recursive \\b\\B"},"./node_modules/moment/moment.js":function(t,e,s){(function(t){t.exports=function(){"use strict";var e,i;function o(){return e.apply(null,arguments)}function n(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function a(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function r(t){return void 0===t}function l(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function u(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function d(t,e){var s,i=[];for(s=0;s<t.length;++s)i.push(e(t[s],s));return i}function c(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function _(t,e){for(var s in e)c(e,s)&&(t[s]=e[s]);return c(e,"toString")&&(t.toString=e.toString),c(e,"valueOf")&&(t.valueOf=e.valueOf),t}function h(t,e,s,i){return xe(t,e,s,i,!0).utc()}function m(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function p(t){if(null==t._isValid){var e=m(t),s=i.call(e.parsedDateParts,(function(t){return null!=t})),o=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&s);if(t._strict&&(o=o&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return o;t._isValid=o}return t._isValid}function f(t){var e=h(NaN);return null!=t?_(m(e),t):m(e).userInvalidated=!0,e}i=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),s=e.length>>>0,i=0;i<s;i++)if(i in e&&t.call(this,e[i],i,e))return!0;return!1};var v=o.momentProperties=[];function g(t,e){var s,i,o;if(r(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),r(e._i)||(t._i=e._i),r(e._f)||(t._f=e._f),r(e._l)||(t._l=e._l),r(e._strict)||(t._strict=e._strict),r(e._tzm)||(t._tzm=e._tzm),r(e._isUTC)||(t._isUTC=e._isUTC),r(e._offset)||(t._offset=e._offset),r(e._pf)||(t._pf=m(e)),r(e._locale)||(t._locale=e._locale),v.length>0)for(s=0;s<v.length;s++)r(o=e[i=v[s]])||(t[i]=o);return t}var b=!1;function y(t){g(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,o.updateOffset(this),b=!1)}function k(t){return t instanceof y||null!=t&&null!=t._isAMomentObject}function w(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function C(t){var e=+t,s=0;return 0!==e&&isFinite(e)&&(s=w(e)),s}function x(t,e,s){var i,o=Math.min(t.length,e.length),n=Math.abs(t.length-e.length),a=0;for(i=0;i<o;i++)(s&&t[i]!==e[i]||!s&&C(t[i])!==C(e[i]))&&a++;return a+n}function j(t){!1===o.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function S(t,e){var s=!0;return _((function(){if(null!=o.deprecationHandler&&o.deprecationHandler(null,t),s){for(var i,n=[],a=0;a<arguments.length;a++){if(i="","object"==typeof arguments[a]){for(var r in i+="\n["+a+"] ",arguments[0])i+=r+": "+arguments[0][r]+", ";i=i.slice(0,-2)}else i=arguments[a];n.push(i)}j(t+"\nArguments: "+Array.prototype.slice.call(n).join("")+"\n"+(new Error).stack),s=!1}return e.apply(this,arguments)}),e)}var P,D={};function M(t,e){null!=o.deprecationHandler&&o.deprecationHandler(t,e),D[t]||(j(e),D[t]=!0)}function O(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function T(t,e){var s,i=_({},t);for(s in e)c(e,s)&&(a(t[s])&&a(e[s])?(i[s]={},_(i[s],t[s]),_(i[s],e[s])):null!=e[s]?i[s]=e[s]:delete i[s]);for(s in t)c(t,s)&&!c(e,s)&&a(t[s])&&(i[s]=_({},i[s]));return i}function A(t){null!=t&&this.set(t)}o.suppressDeprecationWarnings=!1,o.deprecationHandler=null,P=Object.keys?Object.keys:function(t){var e,s=[];for(e in t)c(t,e)&&s.push(e);return s};var Y={};function I(t,e){var s=t.toLowerCase();Y[s]=Y[s+"s"]=Y[e]=t}function L(t){return"string"==typeof t?Y[t]||Y[t.toLowerCase()]:void 0}function N(t){var e,s,i={};for(s in t)c(t,s)&&(e=L(s))&&(i[e]=t[s]);return i}var E={};function H(t,e){E[t]=e}function R(t,e,s){var i=""+Math.abs(t),o=e-i.length;return(t>=0?s?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+i}var U=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,$=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,F={},W={};function q(t,e,s,i){var o=i;"string"==typeof i&&(o=function(){return this[i]()}),t&&(W[t]=o),e&&(W[e[0]]=function(){return R(o.apply(this,arguments),e[1],e[2])}),s&&(W[s]=function(){return this.localeData().ordinal(o.apply(this,arguments),t)})}function V(t,e){return t.isValid()?(e=z(e,t.localeData()),F[e]=F[e]||function(t){var e,s,i,o=t.match(U);for(e=0,s=o.length;e<s;e++)W[o[e]]?o[e]=W[o[e]]:o[e]=(i=o[e]).match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"");return function(e){var i,n="";for(i=0;i<s;i++)n+=O(o[i])?o[i].call(e,t):o[i];return n}}(e),F[e](t)):t.localeData().invalidDate()}function z(t,e){var s=5;function i(t){return e.longDateFormat(t)||t}for($.lastIndex=0;s>=0&&$.test(t);)t=t.replace($,i),$.lastIndex=0,s-=1;return t}var G=/\d/,B=/\d\d/,Q=/\d{3}/,Z=/\d{4}/,J=/[+-]?\d{6}/,K=/\d\d?/,X=/\d\d\d\d?/,tt=/\d\d\d\d\d\d?/,et=/\d{1,3}/,st=/\d{1,4}/,it=/[+-]?\d{1,6}/,ot=/\d+/,nt=/[+-]?\d+/,at=/Z|[+-]\d\d:?\d\d/gi,rt=/Z|[+-]\d\d(?::?\d\d)?/gi,lt=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ut={};function dt(t,e,s){ut[t]=O(e)?e:function(t,i){return t&&s?s:e}}function ct(t,e){return c(ut,t)?ut[t](e._strict,e._locale):new RegExp(_t(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,s,i,o){return e||s||i||o}))))}function _t(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var ht={};function mt(t,e){var s,i=e;for("string"==typeof t&&(t=[t]),l(e)&&(i=function(t,s){s[e]=C(t)}),s=0;s<t.length;s++)ht[t[s]]=i}function pt(t,e){mt(t,(function(t,s,i,o){i._w=i._w||{},e(t,i._w,i,o)}))}function ft(t,e,s){null!=e&&c(ht,t)&&ht[t](e,s._a,s,t)}function vt(t){return gt(t)?366:365}function gt(t){return t%4==0&&t%100!=0||t%400==0}q("Y",0,0,(function(){var t=this.year();return t<=9999?""+t:"+"+t})),q(0,["YY",2],0,(function(){return this.year()%100})),q(0,["YYYY",4],0,"year"),q(0,["YYYYY",5],0,"year"),q(0,["YYYYYY",6,!0],0,"year"),I("year","y"),H("year",1),dt("Y",nt),dt("YY",K,B),dt("YYYY",st,Z),dt("YYYYY",it,J),dt("YYYYYY",it,J),mt(["YYYYY","YYYYYY"],0),mt("YYYY",(function(t,e){e[0]=2===t.length?o.parseTwoDigitYear(t):C(t)})),mt("YY",(function(t,e){e[0]=o.parseTwoDigitYear(t)})),mt("Y",(function(t,e){e[0]=parseInt(t,10)})),o.parseTwoDigitYear=function(t){return C(t)+(C(t)>68?1900:2e3)};var bt,yt=kt("FullYear",!0);function kt(t,e){return function(s){return null!=s?(Ct(this,t,s),o.updateOffset(this,e),this):wt(this,t)}}function wt(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function Ct(t,e,s){t.isValid()&&!isNaN(s)&&("FullYear"===e&>(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](s,t.month(),xt(s,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](s))}function xt(t,e){if(isNaN(t)||isNaN(e))return NaN;var s,i=(e%(s=12)+s)%s;return t+=(e-i)/12,1===i?gt(t)?29:28:31-i%7%2}bt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},q("M",["MM",2],"Mo",(function(){return this.month()+1})),q("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),q("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),I("month","M"),H("month",8),dt("M",K),dt("MM",K,B),dt("MMM",(function(t,e){return e.monthsShortRegex(t)})),dt("MMMM",(function(t,e){return e.monthsRegex(t)})),mt(["M","MM"],(function(t,e){e[1]=C(t)-1})),mt(["MMM","MMMM"],(function(t,e,s,i){var o=s._locale.monthsParse(t,i,s._strict);null!=o?e[1]=o:m(s).invalidMonth=t}));var jt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,St="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Pt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Dt(t,e,s){var i,o,n,a=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)n=h([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(n,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(n,"").toLocaleLowerCase();return s?"MMM"===e?-1!==(o=bt.call(this._shortMonthsParse,a))?o:null:-1!==(o=bt.call(this._longMonthsParse,a))?o:null:"MMM"===e?-1!==(o=bt.call(this._shortMonthsParse,a))||-1!==(o=bt.call(this._longMonthsParse,a))?o:null:-1!==(o=bt.call(this._longMonthsParse,a))||-1!==(o=bt.call(this._shortMonthsParse,a))?o:null}function Mt(t,e){var s;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=C(e);else if(!l(e=t.localeData().monthsParse(e)))return t;return s=Math.min(t.date(),xt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,s),t}function Ot(t){return null!=t?(Mt(this,t),o.updateOffset(this,!0),this):wt(this,"Month")}var Tt=lt,At=lt;function Yt(){function t(t,e){return e.length-t.length}var e,s,i=[],o=[],n=[];for(e=0;e<12;e++)s=h([2e3,e]),i.push(this.monthsShort(s,"")),o.push(this.months(s,"")),n.push(this.months(s,"")),n.push(this.monthsShort(s,""));for(i.sort(t),o.sort(t),n.sort(t),e=0;e<12;e++)i[e]=_t(i[e]),o[e]=_t(o[e]);for(e=0;e<24;e++)n[e]=_t(n[e]);this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function It(t,e,s,i,o,n,a){var r;return t<100&&t>=0?(r=new Date(t+400,e,s,i,o,n,a),isFinite(r.getFullYear())&&r.setFullYear(t)):r=new Date(t,e,s,i,o,n,a),r}function Lt(t){var e;if(t<100&&t>=0){var s=Array.prototype.slice.call(arguments);s[0]=t+400,e=new Date(Date.UTC.apply(null,s)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)}else e=new Date(Date.UTC.apply(null,arguments));return e}function Nt(t,e,s){var i=7+e-s;return-(7+Lt(t,0,i).getUTCDay()-e)%7+i-1}function Et(t,e,s,i,o){var n,a,r=1+7*(e-1)+(7+s-i)%7+Nt(t,i,o);return r<=0?a=vt(n=t-1)+r:r>vt(t)?(n=t+1,a=r-vt(t)):(n=t,a=r),{year:n,dayOfYear:a}}function Ht(t,e,s){var i,o,n=Nt(t.year(),e,s),a=Math.floor((t.dayOfYear()-n-1)/7)+1;return a<1?i=a+Rt(o=t.year()-1,e,s):a>Rt(t.year(),e,s)?(i=a-Rt(t.year(),e,s),o=t.year()+1):(o=t.year(),i=a),{week:i,year:o}}function Rt(t,e,s){var i=Nt(t,e,s),o=Nt(t+1,e,s);return(vt(t)-i+o)/7}function Ut(t,e){return t.slice(e,7).concat(t.slice(0,e))}q("w",["ww",2],"wo","week"),q("W",["WW",2],"Wo","isoWeek"),I("week","w"),I("isoWeek","W"),H("week",5),H("isoWeek",5),dt("w",K),dt("ww",K,B),dt("W",K),dt("WW",K,B),pt(["w","ww","W","WW"],(function(t,e,s,i){e[i.substr(0,1)]=C(t)})),q("d",0,"do","day"),q("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),q("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),q("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),q("e",0,0,"weekday"),q("E",0,0,"isoWeekday"),I("day","d"),I("weekday","e"),I("isoWeekday","E"),H("day",11),H("weekday",11),H("isoWeekday",11),dt("d",K),dt("e",K),dt("E",K),dt("dd",(function(t,e){return e.weekdaysMinRegex(t)})),dt("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),dt("dddd",(function(t,e){return e.weekdaysRegex(t)})),pt(["dd","ddd","dddd"],(function(t,e,s,i){var o=s._locale.weekdaysParse(t,i,s._strict);null!=o?e.d=o:m(s).invalidWeekday=t})),pt(["d","e","E"],(function(t,e,s,i){e[i]=C(t)}));var $t="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ft="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Wt="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function qt(t,e,s){var i,o,n,a=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)n=h([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(n,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(n,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(n,"").toLocaleLowerCase();return s?"dddd"===e?-1!==(o=bt.call(this._weekdaysParse,a))?o:null:"ddd"===e?-1!==(o=bt.call(this._shortWeekdaysParse,a))?o:null:-1!==(o=bt.call(this._minWeekdaysParse,a))?o:null:"dddd"===e?-1!==(o=bt.call(this._weekdaysParse,a))||-1!==(o=bt.call(this._shortWeekdaysParse,a))||-1!==(o=bt.call(this._minWeekdaysParse,a))?o:null:"ddd"===e?-1!==(o=bt.call(this._shortWeekdaysParse,a))||-1!==(o=bt.call(this._weekdaysParse,a))||-1!==(o=bt.call(this._minWeekdaysParse,a))?o:null:-1!==(o=bt.call(this._minWeekdaysParse,a))||-1!==(o=bt.call(this._weekdaysParse,a))||-1!==(o=bt.call(this._shortWeekdaysParse,a))?o:null}var Vt=lt,zt=lt,Gt=lt;function Bt(){function t(t,e){return e.length-t.length}var e,s,i,o,n,a=[],r=[],l=[],u=[];for(e=0;e<7;e++)s=h([2e3,1]).day(e),i=this.weekdaysMin(s,""),o=this.weekdaysShort(s,""),n=this.weekdays(s,""),a.push(i),r.push(o),l.push(n),u.push(i),u.push(o),u.push(n);for(a.sort(t),r.sort(t),l.sort(t),u.sort(t),e=0;e<7;e++)r[e]=_t(r[e]),l[e]=_t(l[e]),u[e]=_t(u[e]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Qt(){return this.hours()%12||12}function Zt(t,e){q(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function Jt(t,e){return e._meridiemParse}q("H",["HH",2],0,"hour"),q("h",["hh",2],0,Qt),q("k",["kk",2],0,(function(){return this.hours()||24})),q("hmm",0,0,(function(){return""+Qt.apply(this)+R(this.minutes(),2)})),q("hmmss",0,0,(function(){return""+Qt.apply(this)+R(this.minutes(),2)+R(this.seconds(),2)})),q("Hmm",0,0,(function(){return""+this.hours()+R(this.minutes(),2)})),q("Hmmss",0,0,(function(){return""+this.hours()+R(this.minutes(),2)+R(this.seconds(),2)})),Zt("a",!0),Zt("A",!1),I("hour","h"),H("hour",13),dt("a",Jt),dt("A",Jt),dt("H",K),dt("h",K),dt("k",K),dt("HH",K,B),dt("hh",K,B),dt("kk",K,B),dt("hmm",X),dt("hmmss",tt),dt("Hmm",X),dt("Hmmss",tt),mt(["H","HH"],3),mt(["k","kk"],(function(t,e,s){var i=C(t);e[3]=24===i?0:i})),mt(["a","A"],(function(t,e,s){s._isPm=s._locale.isPM(t),s._meridiem=t})),mt(["h","hh"],(function(t,e,s){e[3]=C(t),m(s).bigHour=!0})),mt("hmm",(function(t,e,s){var i=t.length-2;e[3]=C(t.substr(0,i)),e[4]=C(t.substr(i)),m(s).bigHour=!0})),mt("hmmss",(function(t,e,s){var i=t.length-4,o=t.length-2;e[3]=C(t.substr(0,i)),e[4]=C(t.substr(i,2)),e[5]=C(t.substr(o)),m(s).bigHour=!0})),mt("Hmm",(function(t,e,s){var i=t.length-2;e[3]=C(t.substr(0,i)),e[4]=C(t.substr(i))})),mt("Hmmss",(function(t,e,s){var i=t.length-4,o=t.length-2;e[3]=C(t.substr(0,i)),e[4]=C(t.substr(i,2)),e[5]=C(t.substr(o))}));var Kt,Xt=kt("Hours",!0),te={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:St,monthsShort:Pt,week:{dow:0,doy:6},weekdays:$t,weekdaysMin:Wt,weekdaysShort:Ft,meridiemParse:/[ap]\.?m?\.?/i},ee={},se={};function ie(t){return t?t.toLowerCase().replace("_","-"):t}function oe(e){var i=null;if(!ee[e]&&void 0!==t&&t&&t.exports)try{i=Kt._abbr,s("./node_modules/moment/locale sync recursive \\b\\B")("./"+e),ne(i)}catch(t){}return ee[e]}function ne(t,e){var s;return t&&((s=r(e)?re(t):ae(t,e))?Kt=s:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),Kt._abbr}function ae(t,e){if(null!==e){var s,i=te;if(e.abbr=t,null!=ee[t])M("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=ee[t]._config;else if(null!=e.parentLocale)if(null!=ee[e.parentLocale])i=ee[e.parentLocale]._config;else{if(null==(s=oe(e.parentLocale)))return se[e.parentLocale]||(se[e.parentLocale]=[]),se[e.parentLocale].push({name:t,config:e}),null;i=s._config}return ee[t]=new A(T(i,e)),se[t]&&se[t].forEach((function(t){ae(t.name,t.config)})),ne(t),ee[t]}return delete ee[t],null}function re(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Kt;if(!n(t)){if(e=oe(t))return e;t=[t]}return function(t){for(var e,s,i,o,n=0;n<t.length;){for(e=(o=ie(t[n]).split("-")).length,s=(s=ie(t[n+1]))?s.split("-"):null;e>0;){if(i=oe(o.slice(0,e).join("-")))return i;if(s&&s.length>=e&&x(o,s,!0)>=e-1)break;e--}n++}return Kt}(t)}function le(t){var e,s=t._a;return s&&-2===m(t).overflow&&(e=s[1]<0||s[1]>11?1:s[2]<1||s[2]>xt(s[0],s[1])?2:s[3]<0||s[3]>24||24===s[3]&&(0!==s[4]||0!==s[5]||0!==s[6])?3:s[4]<0||s[4]>59?4:s[5]<0||s[5]>59?5:s[6]<0||s[6]>999?6:-1,m(t)._overflowDayOfYear&&(e<0||e>2)&&(e=2),m(t)._overflowWeeks&&-1===e&&(e=7),m(t)._overflowWeekday&&-1===e&&(e=8),m(t).overflow=e),t}function ue(t,e,s){return null!=t?t:null!=e?e:s}function de(t){var e,s,i,n,a,r=[];if(!t._d){for(i=function(t){var e=new Date(o.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}(t),t._w&&null==t._a[2]&&null==t._a[1]&&function(t){var e,s,i,o,n,a,r,l;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)n=1,a=4,s=ue(e.GG,t._a[0],Ht(je(),1,4).year),i=ue(e.W,1),((o=ue(e.E,1))<1||o>7)&&(l=!0);else{n=t._locale._week.dow,a=t._locale._week.doy;var u=Ht(je(),n,a);s=ue(e.gg,t._a[0],u.year),i=ue(e.w,u.week),null!=e.d?((o=e.d)<0||o>6)&&(l=!0):null!=e.e?(o=e.e+n,(e.e<0||e.e>6)&&(l=!0)):o=n}i<1||i>Rt(s,n,a)?m(t)._overflowWeeks=!0:null!=l?m(t)._overflowWeekday=!0:(r=Et(s,i,o,n,a),t._a[0]=r.year,t._dayOfYear=r.dayOfYear)}(t),null!=t._dayOfYear&&(a=ue(t._a[0],i[0]),(t._dayOfYear>vt(a)||0===t._dayOfYear)&&(m(t)._overflowDayOfYear=!0),s=Lt(a,0,t._dayOfYear),t._a[1]=s.getUTCMonth(),t._a[2]=s.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=r[e]=i[e];for(;e<7;e++)t._a[e]=r[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[3]&&0===t._a[4]&&0===t._a[5]&&0===t._a[6]&&(t._nextDay=!0,t._a[3]=0),t._d=(t._useUTC?Lt:It).apply(null,r),n=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[3]=24),t._w&&void 0!==t._w.d&&t._w.d!==n&&(m(t).weekdayMismatch=!0)}}var ce=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,_e=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,he=/Z|[+-]\d\d(?::?\d\d)?/,me=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],pe=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],fe=/^\/?Date\((\-?\d+)/i;function ve(t){var e,s,i,o,n,a,r=t._i,l=ce.exec(r)||_e.exec(r);if(l){for(m(t).iso=!0,e=0,s=me.length;e<s;e++)if(me[e][1].exec(l[1])){o=me[e][0],i=!1!==me[e][2];break}if(null==o)return void(t._isValid=!1);if(l[3]){for(e=0,s=pe.length;e<s;e++)if(pe[e][1].exec(l[3])){n=(l[2]||" ")+pe[e][0];break}if(null==n)return void(t._isValid=!1)}if(!i&&null!=n)return void(t._isValid=!1);if(l[4]){if(!he.exec(l[4]))return void(t._isValid=!1);a="Z"}t._f=o+(n||"")+(a||""),we(t)}else t._isValid=!1}var ge=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function be(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}var ye={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ke(t){var e,s,i,o,n,a,r,l=ge.exec(t._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(l){var u=(e=l[4],s=l[3],i=l[2],o=l[5],n=l[6],a=l[7],r=[be(e),Pt.indexOf(s),parseInt(i,10),parseInt(o,10),parseInt(n,10)],a&&r.push(parseInt(a,10)),r);if(!function(t,e,s){return!t||Ft.indexOf(t)===new Date(e[0],e[1],e[2]).getDay()||(m(s).weekdayMismatch=!0,s._isValid=!1,!1)}(l[1],u,t))return;t._a=u,t._tzm=function(t,e,s){if(t)return ye[t];if(e)return 0;var i=parseInt(s,10),o=i%100;return(i-o)/100*60+o}(l[8],l[9],l[10]),t._d=Lt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),m(t).rfc2822=!0}else t._isValid=!1}function we(t){if(t._f!==o.ISO_8601)if(t._f!==o.RFC_2822){t._a=[],m(t).empty=!0;var e,s,i,n,a,r=""+t._i,l=r.length,u=0;for(i=z(t._f,t._locale).match(U)||[],e=0;e<i.length;e++)n=i[e],(s=(r.match(ct(n,t))||[])[0])&&((a=r.substr(0,r.indexOf(s))).length>0&&m(t).unusedInput.push(a),r=r.slice(r.indexOf(s)+s.length),u+=s.length),W[n]?(s?m(t).empty=!1:m(t).unusedTokens.push(n),ft(n,s,t)):t._strict&&!s&&m(t).unusedTokens.push(n);m(t).charsLeftOver=l-u,r.length>0&&m(t).unusedInput.push(r),t._a[3]<=12&&!0===m(t).bigHour&&t._a[3]>0&&(m(t).bigHour=void 0),m(t).parsedDateParts=t._a.slice(0),m(t).meridiem=t._meridiem,t._a[3]=function(t,e,s){var i;return null==s?e:null!=t.meridiemHour?t.meridiemHour(e,s):null!=t.isPM?((i=t.isPM(s))&&e<12&&(e+=12),i||12!==e||(e=0),e):e}(t._locale,t._a[3],t._meridiem),de(t),le(t)}else ke(t);else ve(t)}function Ce(t){var e=t._i,s=t._f;return t._locale=t._locale||re(t._l),null===e||void 0===s&&""===e?f({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),k(e)?new y(le(e)):(u(e)?t._d=e:n(s)?function(t){var e,s,i,o,n;if(0===t._f.length)return m(t).invalidFormat=!0,void(t._d=new Date(NaN));for(o=0;o<t._f.length;o++)n=0,e=g({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[o],we(e),p(e)&&(n+=m(e).charsLeftOver,n+=10*m(e).unusedTokens.length,m(e).score=n,(null==i||n<i)&&(i=n,s=e));_(t,s||e)}(t):s?we(t):function(t){var e=t._i;r(e)?t._d=new Date(o.now()):u(e)?t._d=new Date(e.valueOf()):"string"==typeof e?function(t){var e=fe.exec(t._i);null===e?(ve(t),!1===t._isValid&&(delete t._isValid,ke(t),!1===t._isValid&&(delete t._isValid,o.createFromInputFallback(t)))):t._d=new Date(+e[1])}(t):n(e)?(t._a=d(e.slice(0),(function(t){return parseInt(t,10)})),de(t)):a(e)?function(t){if(!t._d){var e=N(t._i);t._a=d([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),de(t)}}(t):l(e)?t._d=new Date(e):o.createFromInputFallback(t)}(t),p(t)||(t._d=null),t))}function xe(t,e,s,i,o){var r,l={};return!0!==s&&!1!==s||(i=s,s=void 0),(a(t)&&function(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}(t)||n(t)&&0===t.length)&&(t=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=o,l._l=s,l._i=t,l._f=e,l._strict=i,(r=new y(le(Ce(l))))._nextDay&&(r.add(1,"d"),r._nextDay=void 0),r}function je(t,e,s,i){return xe(t,e,s,i,!1)}o.createFromInputFallback=S("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),o.ISO_8601=function(){},o.RFC_2822=function(){};var Se=S("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=je.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:f()})),Pe=S("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=je.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:f()}));function De(t,e){var s,i;if(1===e.length&&n(e[0])&&(e=e[0]),!e.length)return je();for(s=e[0],i=1;i<e.length;++i)e[i].isValid()&&!e[i][t](s)||(s=e[i]);return s}var Me=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Oe(t){var e=N(t),s=e.year||0,i=e.quarter||0,o=e.month||0,n=e.week||e.isoWeek||0,a=e.day||0,r=e.hour||0,l=e.minute||0,u=e.second||0,d=e.millisecond||0;this._isValid=function(t){for(var e in t)if(-1===bt.call(Me,e)||null!=t[e]&&isNaN(t[e]))return!1;for(var s=!1,i=0;i<Me.length;++i)if(t[Me[i]]){if(s)return!1;parseFloat(t[Me[i]])!==C(t[Me[i]])&&(s=!0)}return!0}(e),this._milliseconds=+d+1e3*u+6e4*l+1e3*r*60*60,this._days=+a+7*n,this._months=+o+3*i+12*s,this._data={},this._locale=re(),this._bubble()}function Te(t){return t instanceof Oe}function Ae(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Ye(t,e){q(t,0,0,(function(){var t=this.utcOffset(),s="+";return t<0&&(t=-t,s="-"),s+R(~~(t/60),2)+e+R(~~t%60,2)}))}Ye("Z",":"),Ye("ZZ",""),dt("Z",rt),dt("ZZ",rt),mt(["Z","ZZ"],(function(t,e,s){s._useUTC=!0,s._tzm=Le(rt,t)}));var Ie=/([\+\-]|\d\d)/gi;function Le(t,e){var s=(e||"").match(t);if(null===s)return null;var i=((s[s.length-1]||[])+"").match(Ie)||["-",0,0],o=60*i[1]+C(i[2]);return 0===o?0:"+"===i[0]?o:-o}function Ne(t,e){var s,i;return e._isUTC?(s=e.clone(),i=(k(t)||u(t)?t.valueOf():je(t).valueOf())-s.valueOf(),s._d.setTime(s._d.valueOf()+i),o.updateOffset(s,!1),s):je(t).local()}function Ee(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function He(){return!!this.isValid()&&this._isUTC&&0===this._offset}o.updateOffset=function(){};var Re=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ue=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function $e(t,e){var s,i,o,n,a,r,u=t,d=null;return Te(t)?u={ms:t._milliseconds,d:t._days,M:t._months}:l(t)?(u={},e?u[e]=t:u.milliseconds=t):(d=Re.exec(t))?(s="-"===d[1]?-1:1,u={y:0,d:C(d[2])*s,h:C(d[3])*s,m:C(d[4])*s,s:C(d[5])*s,ms:C(Ae(1e3*d[6]))*s}):(d=Ue.exec(t))?(s="-"===d[1]?-1:1,u={y:Fe(d[2],s),M:Fe(d[3],s),w:Fe(d[4],s),d:Fe(d[5],s),h:Fe(d[6],s),m:Fe(d[7],s),s:Fe(d[8],s)}):null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(n=je(u.from),a=je(u.to),o=n.isValid()&&a.isValid()?(a=Ne(a,n),n.isBefore(a)?r=We(n,a):((r=We(a,n)).milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0},(u={}).ms=o.milliseconds,u.M=o.months),i=new Oe(u),Te(t)&&c(t,"_locale")&&(i._locale=t._locale),i}function Fe(t,e){var s=t&&parseFloat(t.replace(",","."));return(isNaN(s)?0:s)*e}function We(t,e){var s={};return s.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(s.months,"M").isAfter(e)&&--s.months,s.milliseconds=+e-+t.clone().add(s.months,"M"),s}function qe(t,e){return function(s,i){var o;return null===i||isNaN(+i)||(M(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=s,s=i,i=o),Ve(this,$e(s="string"==typeof s?+s:s,i),t),this}}function Ve(t,e,s,i){var n=e._milliseconds,a=Ae(e._days),r=Ae(e._months);t.isValid()&&(i=null==i||i,r&&Mt(t,wt(t,"Month")+r*s),a&&Ct(t,"Date",wt(t,"Date")+a*s),n&&t._d.setTime(t._d.valueOf()+n*s),i&&o.updateOffset(t,a||r))}$e.fn=Oe.prototype,$e.invalid=function(){return $e(NaN)};var ze=qe(1,"add"),Ge=qe(-1,"subtract");function Be(t,e){var s=12*(e.year()-t.year())+(e.month()-t.month()),i=t.clone().add(s,"months");return-(s+(e-i<0?(e-i)/(i-t.clone().add(s-1,"months")):(e-i)/(t.clone().add(s+1,"months")-i)))||0}function Qe(t){var e;return void 0===t?this._locale._abbr:(null!=(e=re(t))&&(this._locale=e),this)}o.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",o.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Ze=S("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));function Je(){return this._locale}function Ke(t,e){return(t%e+e)%e}function Xe(t,e,s){return t<100&&t>=0?new Date(t+400,e,s)-126227808e5:new Date(t,e,s).valueOf()}function ts(t,e,s){return t<100&&t>=0?Date.UTC(t+400,e,s)-126227808e5:Date.UTC(t,e,s)}function es(t,e){q(0,[t,t.length],0,e)}function ss(t,e,s,i,o){var n;return null==t?Ht(this,i,o).year:(e>(n=Rt(t,i,o))&&(e=n),is.call(this,t,e,s,i,o))}function is(t,e,s,i,o){var n=Et(t,e,s,i,o),a=Lt(n.year,0,n.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}q(0,["gg",2],0,(function(){return this.weekYear()%100})),q(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),es("gggg","weekYear"),es("ggggg","weekYear"),es("GGGG","isoWeekYear"),es("GGGGG","isoWeekYear"),I("weekYear","gg"),I("isoWeekYear","GG"),H("weekYear",1),H("isoWeekYear",1),dt("G",nt),dt("g",nt),dt("GG",K,B),dt("gg",K,B),dt("GGGG",st,Z),dt("gggg",st,Z),dt("GGGGG",it,J),dt("ggggg",it,J),pt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,s,i){e[i.substr(0,2)]=C(t)})),pt(["gg","GG"],(function(t,e,s,i){e[i]=o.parseTwoDigitYear(t)})),q("Q",0,"Qo","quarter"),I("quarter","Q"),H("quarter",7),dt("Q",G),mt("Q",(function(t,e){e[1]=3*(C(t)-1)})),q("D",["DD",2],"Do","date"),I("date","D"),H("date",9),dt("D",K),dt("DD",K,B),dt("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),mt(["D","DD"],2),mt("Do",(function(t,e){e[2]=C(t.match(K)[0])}));var os=kt("Date",!0);q("DDD",["DDDD",3],"DDDo","dayOfYear"),I("dayOfYear","DDD"),H("dayOfYear",4),dt("DDD",et),dt("DDDD",Q),mt(["DDD","DDDD"],(function(t,e,s){s._dayOfYear=C(t)})),q("m",["mm",2],0,"minute"),I("minute","m"),H("minute",14),dt("m",K),dt("mm",K,B),mt(["m","mm"],4);var ns=kt("Minutes",!1);q("s",["ss",2],0,"second"),I("second","s"),H("second",15),dt("s",K),dt("ss",K,B),mt(["s","ss"],5);var as,rs=kt("Seconds",!1);for(q("S",0,0,(function(){return~~(this.millisecond()/100)})),q(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),q(0,["SSS",3],0,"millisecond"),q(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),q(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),q(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),q(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),q(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),q(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),I("millisecond","ms"),H("millisecond",16),dt("S",et,G),dt("SS",et,B),dt("SSS",et,Q),as="SSSS";as.length<=9;as+="S")dt(as,ot);function ls(t,e){e[6]=C(1e3*("0."+t))}for(as="S";as.length<=9;as+="S")mt(as,ls);var us=kt("Milliseconds",!1);q("z",0,0,"zoneAbbr"),q("zz",0,0,"zoneName");var ds=y.prototype;function cs(t){return t}ds.add=ze,ds.calendar=function(t,e){var s=t||je(),i=Ne(s,this).startOf("day"),n=o.calendarFormat(this,i)||"sameElse",a=e&&(O(e[n])?e[n].call(this,s):e[n]);return this.format(a||this.localeData().calendar(n,this,je(s)))},ds.clone=function(){return new y(this)},ds.diff=function(t,e,s){var i,o,n;if(!this.isValid())return NaN;if(!(i=Ne(t,this)).isValid())return NaN;switch(o=6e4*(i.utcOffset()-this.utcOffset()),e=L(e)){case"year":n=Be(this,i)/12;break;case"month":n=Be(this,i);break;case"quarter":n=Be(this,i)/3;break;case"second":n=(this-i)/1e3;break;case"minute":n=(this-i)/6e4;break;case"hour":n=(this-i)/36e5;break;case"day":n=(this-i-o)/864e5;break;case"week":n=(this-i-o)/6048e5;break;default:n=this-i}return s?n:w(n)},ds.endOf=function(t){var e;if(void 0===(t=L(t))||"millisecond"===t||!this.isValid())return this;var s=this._isUTC?ts:Xe;switch(t){case"year":e=s(this.year()+1,0,1)-1;break;case"quarter":e=s(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=s(this.year(),this.month()+1,1)-1;break;case"week":e=s(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=s(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=36e5-Ke(e+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":e=this._d.valueOf(),e+=6e4-Ke(e,6e4)-1;break;case"second":e=this._d.valueOf(),e+=1e3-Ke(e,1e3)-1}return this._d.setTime(e),o.updateOffset(this,!0),this},ds.format=function(t){t||(t=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var e=V(this,t);return this.localeData().postformat(e)},ds.from=function(t,e){return this.isValid()&&(k(t)&&t.isValid()||je(t).isValid())?$e({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},ds.fromNow=function(t){return this.from(je(),t)},ds.to=function(t,e){return this.isValid()&&(k(t)&&t.isValid()||je(t).isValid())?$e({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},ds.toNow=function(t){return this.to(je(),t)},ds.get=function(t){return O(this[t=L(t)])?this[t]():this},ds.invalidAt=function(){return m(this).overflow},ds.isAfter=function(t,e){var s=k(t)?t:je(t);return!(!this.isValid()||!s.isValid())&&("millisecond"===(e=L(e)||"millisecond")?this.valueOf()>s.valueOf():s.valueOf()<this.clone().startOf(e).valueOf())},ds.isBefore=function(t,e){var s=k(t)?t:je(t);return!(!this.isValid()||!s.isValid())&&("millisecond"===(e=L(e)||"millisecond")?this.valueOf()<s.valueOf():this.clone().endOf(e).valueOf()<s.valueOf())},ds.isBetween=function(t,e,s,i){var o=k(t)?t:je(t),n=k(e)?e:je(e);return!!(this.isValid()&&o.isValid()&&n.isValid())&&("("===(i=i||"()")[0]?this.isAfter(o,s):!this.isBefore(o,s))&&(")"===i[1]?this.isBefore(n,s):!this.isAfter(n,s))},ds.isSame=function(t,e){var s,i=k(t)?t:je(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=L(e)||"millisecond")?this.valueOf()===i.valueOf():(s=i.valueOf(),this.clone().startOf(e).valueOf()<=s&&s<=this.clone().endOf(e).valueOf()))},ds.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},ds.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},ds.isValid=function(){return p(this)},ds.lang=Ze,ds.locale=Qe,ds.localeData=Je,ds.max=Pe,ds.min=Se,ds.parsingFlags=function(){return _({},m(this))},ds.set=function(t,e){if("object"==typeof t)for(var s=function(t){var e=[];for(var s in t)e.push({unit:s,priority:E[s]});return e.sort((function(t,e){return t.priority-e.priority})),e}(t=N(t)),i=0;i<s.length;i++)this[s[i].unit](t[s[i].unit]);else if(O(this[t=L(t)]))return this[t](e);return this},ds.startOf=function(t){var e;if(void 0===(t=L(t))||"millisecond"===t||!this.isValid())return this;var s=this._isUTC?ts:Xe;switch(t){case"year":e=s(this.year(),0,1);break;case"quarter":e=s(this.year(),this.month()-this.month()%3,1);break;case"month":e=s(this.year(),this.month(),1);break;case"week":e=s(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=s(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=Ke(e+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":e=this._d.valueOf(),e-=Ke(e,6e4);break;case"second":e=this._d.valueOf(),e-=Ke(e,1e3)}return this._d.setTime(e),o.updateOffset(this,!0),this},ds.subtract=Ge,ds.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},ds.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},ds.toDate=function(){return new Date(this.valueOf())},ds.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,s=e?this.clone().utc():this;return s.year()<0||s.year()>9999?V(s,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):O(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",V(s,"Z")):V(s,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},ds.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var s="["+t+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",o=e+'[")]';return this.format(s+i+"-MM-DD[T]HH:mm:ss.SSS"+o)},ds.toJSON=function(){return this.isValid()?this.toISOString():null},ds.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},ds.unix=function(){return Math.floor(this.valueOf()/1e3)},ds.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},ds.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},ds.year=yt,ds.isLeapYear=function(){return gt(this.year())},ds.weekYear=function(t){return ss.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},ds.isoWeekYear=function(t){return ss.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},ds.quarter=ds.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},ds.month=Ot,ds.daysInMonth=function(){return xt(this.year(),this.month())},ds.week=ds.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},ds.isoWeek=ds.isoWeeks=function(t){var e=Ht(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},ds.weeksInYear=function(){var t=this.localeData()._week;return Rt(this.year(),t.dow,t.doy)},ds.isoWeeksInYear=function(){return Rt(this.year(),1,4)},ds.date=os,ds.day=ds.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=function(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}(t,this.localeData()),this.add(t-e,"d")):e},ds.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},ds.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=function(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7},ds.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},ds.hour=ds.hours=Xt,ds.minute=ds.minutes=ns,ds.second=ds.seconds=rs,ds.millisecond=ds.milliseconds=us,ds.utcOffset=function(t,e,s){var i,n=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=Le(rt,t)))return this}else Math.abs(t)<16&&!s&&(t*=60);return!this._isUTC&&e&&(i=Ee(this)),this._offset=t,this._isUTC=!0,null!=i&&this.add(i,"m"),n!==t&&(!e||this._changeInProgress?Ve(this,$e(t-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,o.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?n:Ee(this)},ds.utc=function(t){return this.utcOffset(0,t)},ds.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ee(this),"m")),this},ds.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Le(at,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},ds.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?je(t).utcOffset():0,(this.utcOffset()-t)%60==0)},ds.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},ds.isLocal=function(){return!!this.isValid()&&!this._isUTC},ds.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},ds.isUtc=He,ds.isUTC=He,ds.zoneAbbr=function(){return this._isUTC?"UTC":""},ds.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},ds.dates=S("dates accessor is deprecated. Use date instead.",os),ds.months=S("months accessor is deprecated. Use month instead",Ot),ds.years=S("years accessor is deprecated. Use year instead",yt),ds.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),ds.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!r(this._isDSTShifted))return this._isDSTShifted;var t={};if(g(t,this),(t=Ce(t))._a){var e=t._isUTC?h(t._a):je(t._a);this._isDSTShifted=this.isValid()&&x(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var _s=A.prototype;function hs(t,e,s,i){var o=re(),n=h().set(i,e);return o[s](n,t)}function ms(t,e,s){if(l(t)&&(e=t,t=void 0),t=t||"",null!=e)return hs(t,e,s,"month");var i,o=[];for(i=0;i<12;i++)o[i]=hs(t,i,s,"month");return o}function ps(t,e,s,i){"boolean"==typeof t?(l(e)&&(s=e,e=void 0),e=e||""):(s=e=t,t=!1,l(e)&&(s=e,e=void 0),e=e||"");var o,n=re(),a=t?n._week.dow:0;if(null!=s)return hs(e,(s+a)%7,i,"day");var r=[];for(o=0;o<7;o++)r[o]=hs(e,(o+a)%7,i,"day");return r}_s.calendar=function(t,e,s){var i=this._calendar[t]||this._calendar.sameElse;return O(i)?i.call(e,s):i},_s.longDateFormat=function(t){var e=this._longDateFormat[t],s=this._longDateFormat[t.toUpperCase()];return e||!s?e:(this._longDateFormat[t]=s.replace(/MMMM|MM|DD|dddd/g,(function(t){return t.slice(1)})),this._longDateFormat[t])},_s.invalidDate=function(){return this._invalidDate},_s.ordinal=function(t){return this._ordinal.replace("%d",t)},_s.preparse=cs,_s.postformat=cs,_s.relativeTime=function(t,e,s,i){var o=this._relativeTime[s];return O(o)?o(t,e,s,i):o.replace(/%d/i,t)},_s.pastFuture=function(t,e){var s=this._relativeTime[t>0?"future":"past"];return O(s)?s(e):s.replace(/%s/i,e)},_s.set=function(t){var e,s;for(s in t)O(e=t[s])?this[s]=e:this["_"+s]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},_s.months=function(t,e){return t?n(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||jt).test(e)?"format":"standalone"][t.month()]:n(this._months)?this._months:this._months.standalone},_s.monthsShort=function(t,e){return t?n(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[jt.test(e)?"format":"standalone"][t.month()]:n(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},_s.monthsParse=function(t,e,s){var i,o,n;if(this._monthsParseExact)return Dt.call(this,t,e,s);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(o=h([2e3,i]),s&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),s||this._monthsParse[i]||(n="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[i]=new RegExp(n.replace(".",""),"i")),s&&"MMMM"===e&&this._longMonthsParse[i].test(t))return i;if(s&&"MMM"===e&&this._shortMonthsParse[i].test(t))return i;if(!s&&this._monthsParse[i].test(t))return i}},_s.monthsRegex=function(t){return this._monthsParseExact?(c(this,"_monthsRegex")||Yt.call(this),t?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=At),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},_s.monthsShortRegex=function(t){return this._monthsParseExact?(c(this,"_monthsRegex")||Yt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=Tt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},_s.week=function(t){return Ht(t,this._week.dow,this._week.doy).week},_s.firstDayOfYear=function(){return this._week.doy},_s.firstDayOfWeek=function(){return this._week.dow},_s.weekdays=function(t,e){var s=n(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Ut(s,this._week.dow):t?s[t.day()]:s},_s.weekdaysMin=function(t){return!0===t?Ut(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},_s.weekdaysShort=function(t){return!0===t?Ut(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},_s.weekdaysParse=function(t,e,s){var i,o,n;if(this._weekdaysParseExact)return qt.call(this,t,e,s);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(o=h([2e3,1]).day(i),s&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(n="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[i]=new RegExp(n.replace(".",""),"i")),s&&"dddd"===e&&this._fullWeekdaysParse[i].test(t))return i;if(s&&"ddd"===e&&this._shortWeekdaysParse[i].test(t))return i;if(s&&"dd"===e&&this._minWeekdaysParse[i].test(t))return i;if(!s&&this._weekdaysParse[i].test(t))return i}},_s.weekdaysRegex=function(t){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Bt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=Vt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},_s.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Bt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=zt),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},_s.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Bt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Gt),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},_s.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},_s.meridiem=function(t,e,s){return t>11?s?"pm":"PM":s?"am":"AM"},ne("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===C(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),o.lang=S("moment.lang is deprecated. Use moment.locale instead.",ne),o.langData=S("moment.langData is deprecated. Use moment.localeData instead.",re);var fs=Math.abs;function vs(t,e,s,i){var o=$e(e,s);return t._milliseconds+=i*o._milliseconds,t._days+=i*o._days,t._months+=i*o._months,t._bubble()}function gs(t){return t<0?Math.floor(t):Math.ceil(t)}function bs(t){return 4800*t/146097}function ys(t){return 146097*t/4800}function ks(t){return function(){return this.as(t)}}var ws=ks("ms"),Cs=ks("s"),xs=ks("m"),js=ks("h"),Ss=ks("d"),Ps=ks("w"),Ds=ks("M"),Ms=ks("Q"),Os=ks("y");function Ts(t){return function(){return this.isValid()?this._data[t]:NaN}}var As=Ts("milliseconds"),Ys=Ts("seconds"),Is=Ts("minutes"),Ls=Ts("hours"),Ns=Ts("days"),Es=Ts("months"),Hs=Ts("years"),Rs=Math.round,Us={ss:44,s:45,m:45,h:22,d:26,M:11};function $s(t,e,s,i,o){return o.relativeTime(e||1,!!s,t,i)}var Fs=Math.abs;function Ws(t){return(t>0)-(t<0)||+t}function qs(){if(!this.isValid())return this.localeData().invalidDate();var t,e,s=Fs(this._milliseconds)/1e3,i=Fs(this._days),o=Fs(this._months);t=w(s/60),e=w(t/60),s%=60,t%=60;var n=w(o/12),a=o%=12,r=i,l=e,u=t,d=s?s.toFixed(3).replace(/\.?0+$/,""):"",c=this.asSeconds();if(!c)return"P0D";var _=c<0?"-":"",h=Ws(this._months)!==Ws(c)?"-":"",m=Ws(this._days)!==Ws(c)?"-":"",p=Ws(this._milliseconds)!==Ws(c)?"-":"";return _+"P"+(n?h+n+"Y":"")+(a?h+a+"M":"")+(r?m+r+"D":"")+(l||u||d?"T":"")+(l?p+l+"H":"")+(u?p+u+"M":"")+(d?p+d+"S":"")}var Vs=Oe.prototype;return Vs.isValid=function(){return this._isValid},Vs.abs=function(){var t=this._data;return this._milliseconds=fs(this._milliseconds),this._days=fs(this._days),this._months=fs(this._months),t.milliseconds=fs(t.milliseconds),t.seconds=fs(t.seconds),t.minutes=fs(t.minutes),t.hours=fs(t.hours),t.months=fs(t.months),t.years=fs(t.years),this},Vs.add=function(t,e){return vs(this,t,e,1)},Vs.subtract=function(t,e){return vs(this,t,e,-1)},Vs.as=function(t){if(!this.isValid())return NaN;var e,s,i=this._milliseconds;if("month"===(t=L(t))||"quarter"===t||"year"===t)switch(e=this._days+i/864e5,s=this._months+bs(e),t){case"month":return s;case"quarter":return s/3;case"year":return s/12}else switch(e=this._days+Math.round(ys(this._months)),t){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return 24*e+i/36e5;case"minute":return 1440*e+i/6e4;case"second":return 86400*e+i/1e3;case"millisecond":return Math.floor(864e5*e)+i;default:throw new Error("Unknown unit "+t)}},Vs.asMilliseconds=ws,Vs.asSeconds=Cs,Vs.asMinutes=xs,Vs.asHours=js,Vs.asDays=Ss,Vs.asWeeks=Ps,Vs.asMonths=Ds,Vs.asQuarters=Ms,Vs.asYears=Os,Vs.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*C(this._months/12):NaN},Vs._bubble=function(){var t,e,s,i,o,n=this._milliseconds,a=this._days,r=this._months,l=this._data;return n>=0&&a>=0&&r>=0||n<=0&&a<=0&&r<=0||(n+=864e5*gs(ys(r)+a),a=0,r=0),l.milliseconds=n%1e3,t=w(n/1e3),l.seconds=t%60,e=w(t/60),l.minutes=e%60,s=w(e/60),l.hours=s%24,a+=w(s/24),o=w(bs(a)),r+=o,a-=gs(ys(o)),i=w(r/12),r%=12,l.days=a,l.months=r,l.years=i,this},Vs.clone=function(){return $e(this)},Vs.get=function(t){return t=L(t),this.isValid()?this[t+"s"]():NaN},Vs.milliseconds=As,Vs.seconds=Ys,Vs.minutes=Is,Vs.hours=Ls,Vs.days=Ns,Vs.weeks=function(){return w(this.days()/7)},Vs.months=Es,Vs.years=Hs,Vs.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),s=function(t,e,s){var i=$e(t).abs(),o=Rs(i.as("s")),n=Rs(i.as("m")),a=Rs(i.as("h")),r=Rs(i.as("d")),l=Rs(i.as("M")),u=Rs(i.as("y")),d=o<=Us.ss&&["s",o]||o<Us.s&&["ss",o]||n<=1&&["m"]||n<Us.m&&["mm",n]||a<=1&&["h"]||a<Us.h&&["hh",a]||r<=1&&["d"]||r<Us.d&&["dd",r]||l<=1&&["M"]||l<Us.M&&["MM",l]||u<=1&&["y"]||["yy",u];return d[2]=e,d[3]=+t>0,d[4]=s,$s.apply(null,d)}(this,!t,e);return t&&(s=e.pastFuture(+this,s)),e.postformat(s)},Vs.toISOString=qs,Vs.toString=qs,Vs.toJSON=qs,Vs.locale=Qe,Vs.localeData=Je,Vs.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",qs),Vs.lang=Ze,q("X",0,0,"unix"),q("x",0,0,"valueOf"),dt("x",nt),dt("X",/[+-]?\d+(\.\d{1,3})?/),mt("X",(function(t,e,s){s._d=new Date(1e3*parseFloat(t,10))})),mt("x",(function(t,e,s){s._d=new Date(C(t))})),o.version="2.24.0",e=je,o.fn=ds,o.min=function(){var t=[].slice.call(arguments,0);return De("isBefore",t)},o.max=function(){var t=[].slice.call(arguments,0);return De("isAfter",t)},o.now=function(){return Date.now?Date.now():+new Date},o.utc=h,o.unix=function(t){return je(1e3*t)},o.months=function(t,e){return ms(t,e,"months")},o.isDate=u,o.locale=ne,o.invalid=f,o.duration=$e,o.isMoment=k,o.weekdays=function(t,e,s){return ps(t,e,s,"weekdays")},o.parseZone=function(){return je.apply(null,arguments).parseZone()},o.localeData=re,o.isDuration=Te,o.monthsShort=function(t,e){return ms(t,e,"monthsShort")},o.weekdaysMin=function(t,e,s){return ps(t,e,s,"weekdaysMin")},o.defineLocale=ae,o.updateLocale=function(t,e){if(null!=e){var s,i,o=te;null!=(i=oe(t))&&(o=i._config),e=T(o,e),(s=new A(e)).parentLocale=ee[t],ee[t]=s,ne(t)}else null!=ee[t]&&(null!=ee[t].parentLocale?ee[t]=ee[t].parentLocale:null!=ee[t]&&delete ee[t]);return ee[t]},o.locales=function(){return P(ee)},o.weekdaysShort=function(t,e,s){return ps(t,e,s,"weekdaysShort")},o.normalizeUnits=L,o.relativeTimeRounding=function(t){return void 0===t?Rs:"function"==typeof t&&(Rs=t,!0)},o.relativeTimeThreshold=function(t,e){return void 0!==Us[t]&&(void 0===e?Us[t]:(Us[t]=e,"s"===t&&(Us.ss=e-1),!0))},o.calendarFormat=function(t,e){var s=t.diff(e,"days",!0);return s<-6?"sameElse":s<-1?"lastWeek":s<0?"lastDay":s<1?"sameDay":s<2?"nextDay":s<7?"nextWeek":"sameElse"},o.prototype=ds,o.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},o}()}).call(this,s("./node_modules/webpack/buildin/module.js")(t))},"./node_modules/vue-loader/lib/runtime/componentNormalizer.js":function(t,e,s){"use strict";function i(t,e,s,i,o,n,a,r){var l,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=s,u._compiled=!0),i&&(u.functional=!0),n&&(u._scopeId="data-v-"+n),a?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=l):o&&(l=r?function(){o.call(this,this.$root.$options.shadowRoot)}:o),l)if(u.functional){u._injectStyles=l;var d=u.render;u.render=function(t,e){return l.call(e),d(t,e)}}else{var c=u.beforeCreate;u.beforeCreate=c?[].concat(c,l):[l]}return{exports:t,options:u}}s.d(e,"a",(function(){return i}))},"./node_modules/webpack/buildin/global.js":function(t,e){var s;s=function(){return this}();try{s=s||new Function("return this")()}catch(t){"object"==typeof window&&(s=window)}t.exports=s},"./node_modules/webpack/buildin/module.js":function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},"./node_modules/xss/lib/default.js":function(t,e,s){var i=s("./node_modules/cssfilter/lib/index.js").FilterCSS,o=s("./node_modules/cssfilter/lib/index.js").getDefaultWhiteList,n=s("./node_modules/xss/lib/util.js");function a(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]}}var r=new i;function l(t){return t.replace(u,"<").replace(d,">")}var u=/</g,d=/>/g,c=/"/g,_=/"/g,h=/&#([a-zA-Z0-9]*);?/gim,m=/:?/gim,p=/&newline;?/gim,f=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,v=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,g=/u\s*r\s*l\s*\(.*/gi;function b(t){return t.replace(c,""")}function y(t){return t.replace(_,'"')}function k(t){return t.replace(h,(function(t,e){return"x"===e[0]||"X"===e[0]?String.fromCharCode(parseInt(e.substr(1),16)):String.fromCharCode(parseInt(e,10))}))}function w(t){return t.replace(m,":").replace(p," ")}function C(t){for(var e="",s=0,i=t.length;s<i;s++)e+=t.charCodeAt(s)<32?" ":t.charAt(s);return n.trim(e)}function x(t){return t=C(t=w(t=k(t=y(t))))}function j(t){return t=l(t=b(t))}var S=/<!--[\s\S]*?-->/g;e.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]},e.getDefaultWhiteList=a,e.onTag=function(t,e,s){},e.onIgnoreTag=function(t,e,s){},e.onTagAttr=function(t,e,s){},e.onIgnoreTagAttr=function(t,e,s){},e.safeAttrValue=function(t,e,s,i){if(s=x(s),"href"===e||"src"===e){if("#"===(s=n.trim(s)))return"#";if("http://"!==s.substr(0,7)&&"https://"!==s.substr(0,8)&&"mailto:"!==s.substr(0,7)&&"tel:"!==s.substr(0,4)&&"#"!==s[0]&&"/"!==s[0])return""}else if("background"===e){if(f.lastIndex=0,f.test(s))return""}else if("style"===e){if(v.lastIndex=0,v.test(s))return"";if(g.lastIndex=0,g.test(s)&&(f.lastIndex=0,f.test(s)))return"";!1!==i&&(s=(i=i||r).process(s))}return s=j(s)},e.escapeHtml=l,e.escapeQuote=b,e.unescapeQuote=y,e.escapeHtmlEntities=k,e.escapeDangerHtml5Entities=w,e.clearNonPrintableCharacter=C,e.friendlyAttrValue=x,e.escapeAttrValue=j,e.onIgnoreTagStripAll=function(){return""},e.StripTagBody=function(t,e){"function"!=typeof e&&(e=function(){});var s=!Array.isArray(t),i=[],o=!1;return{onIgnoreTag:function(a,r,l){if(function(e){return!!s||-1!==n.indexOf(t,e)}(a)){if(l.isClosing){var u="[/removed]",d=l.position+u.length;return i.push([!1!==o?o:l.position,d]),o=!1,u}return o||(o=l.position),"[removed]"}return e(a,r,l)},remove:function(t){var e="",s=0;return n.forEach(i,(function(i){e+=t.slice(s,i[0]),s=i[1]})),e+=t.slice(s)}}},e.stripCommentTag=function(t){return t.replace(S,"")},e.stripBlankChar=function(t){var e=t.split("");return(e=e.filter((function(t){var e=t.charCodeAt(0);return 127!==e&&(!(e<=31)||(10===e||13===e))}))).join("")},e.cssFilter=r,e.getDefaultCSSWhiteList=o},"./node_modules/xss/lib/index.js":function(t,e,s){var i=s("./node_modules/xss/lib/default.js"),o=s("./node_modules/xss/lib/parser.js"),n=s("./node_modules/xss/lib/xss.js");function a(t,e){return new n(e).process(t)}for(var r in(e=t.exports=a).filterXSS=a,e.FilterXSS=n,i)e[r]=i[r];for(var r in o)e[r]=o[r];"undefined"!=typeof window&&(window.filterXSS=t.exports),"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=t.exports)},"./node_modules/xss/lib/parser.js":function(t,e,s){var i=s("./node_modules/xss/lib/util.js");function o(t){var e=i.spaceIndex(t);if(-1===e)var s=t.slice(1,-1);else s=t.slice(1,e+1);return"/"===(s=i.trim(s).toLowerCase()).slice(0,1)&&(s=s.slice(1)),"/"===s.slice(-1)&&(s=s.slice(0,-1)),s}function n(t){return"</"===t.slice(0,2)}var a=/[^a-zA-Z0-9_:\.\-]/gim;function r(t,e){for(;e<t.length;e++){var s=t[e];if(" "!==s)return"="===s?e:-1}}function l(t,e){for(;e>0;e--){var s=t[e];if(" "!==s)return"="===s?e:-1}}function u(t){return function(t){return'"'===t[0]&&'"'===t[t.length-1]||"'"===t[0]&&"'"===t[t.length-1]}(t)?t.substr(1,t.length-2):t}e.parseTag=function(t,e,s){var i="",a=0,r=!1,l=!1,u=0,d=t.length,c="",_="";for(u=0;u<d;u++){var h=t.charAt(u);if(!1===r){if("<"===h){r=u;continue}}else if(!1===l){if("<"===h){i+=s(t.slice(a,u)),r=u,a=u;continue}if(">"===h){i+=s(t.slice(a,r)),c=o(_=t.slice(r,u+1)),i+=e(r,i.length,c,_,n(_)),a=u+1,r=!1;continue}if(('"'===h||"'"===h)&&"="===t.charAt(u-1)){l=h;continue}}else if(h===l){l=!1;continue}}return a<t.length&&(i+=s(t.substr(a))),i},e.parseAttr=function(t,e){var s=0,o=[],n=!1,d=t.length;function c(t,s){if(!((t=(t=i.trim(t)).replace(a,"").toLowerCase()).length<1)){var n=e(t,s||"");n&&o.push(n)}}for(var _=0;_<d;_++){var h,m=t.charAt(_);if(!1!==n||"="!==m)if(!1===n||_!==s||'"'!==m&&"'"!==m||"="!==t.charAt(_-1))if(/\s|\n|\t/.test(m)){if(t=t.replace(/\s|\n|\t/g," "),!1===n){if(-1===(h=r(t,_))){c(i.trim(t.slice(s,_))),n=!1,s=_+1;continue}_=h-1;continue}if(-1===(h=l(t,_-1))){c(n,u(i.trim(t.slice(s,_)))),n=!1,s=_+1;continue}}else;else{if(-1===(h=t.indexOf(m,_+1)))break;c(n,i.trim(t.slice(s+1,h))),n=!1,s=(_=h)+1}else n=t.slice(s,_),s=_+1}return s<t.length&&(!1===n?c(t.slice(s)):c(n,u(i.trim(t.slice(s))))),i.trim(o.join(" "))}},"./node_modules/xss/lib/util.js":function(t,e){t.exports={indexOf:function(t,e){var s,i;if(Array.prototype.indexOf)return t.indexOf(e);for(s=0,i=t.length;s<i;s++)if(t[s]===e)return s;return-1},forEach:function(t,e,s){var i,o;if(Array.prototype.forEach)return t.forEach(e,s);for(i=0,o=t.length;i<o;i++)e.call(s,t[i],i,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(t){var e=/\s|\n|\t/.exec(t);return e?e.index:-1}}},"./node_modules/xss/lib/xss.js":function(t,e,s){var i=s("./node_modules/cssfilter/lib/index.js").FilterCSS,o=s("./node_modules/xss/lib/default.js"),n=s("./node_modules/xss/lib/parser.js"),a=n.parseTag,r=n.parseAttr,l=s("./node_modules/xss/lib/util.js");function u(t){return null==t}function d(t){(t=function(t){var e={};for(var s in t)e[s]=t[s];return e}(t||{})).stripIgnoreTag&&(t.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),t.onIgnoreTag=o.onIgnoreTagStripAll),t.whiteList=t.whiteList||o.whiteList,t.onTag=t.onTag||o.onTag,t.onTagAttr=t.onTagAttr||o.onTagAttr,t.onIgnoreTag=t.onIgnoreTag||o.onIgnoreTag,t.onIgnoreTagAttr=t.onIgnoreTagAttr||o.onIgnoreTagAttr,t.safeAttrValue=t.safeAttrValue||o.safeAttrValue,t.escapeHtml=t.escapeHtml||o.escapeHtml,this.options=t,!1===t.css?this.cssFilter=!1:(t.css=t.css||{},this.cssFilter=new i(t.css))}d.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var e=this.options,s=e.whiteList,i=e.onTag,n=e.onIgnoreTag,d=e.onTagAttr,c=e.onIgnoreTagAttr,_=e.safeAttrValue,h=e.escapeHtml,m=this.cssFilter;e.stripBlankChar&&(t=o.stripBlankChar(t)),e.allowCommentTag||(t=o.stripCommentTag(t));var p=!1;if(e.stripIgnoreTagBody){p=o.StripTagBody(e.stripIgnoreTagBody,n);n=p.onIgnoreTag}var f=a(t,(function(t,e,o,a,p){var f,v={sourcePosition:t,position:e,isClosing:p,isWhite:s.hasOwnProperty(o)};if(!u(f=i(o,a,v)))return f;if(v.isWhite){if(v.isClosing)return"</"+o+">";var g=function(t){var e=l.spaceIndex(t);if(-1===e)return{html:"",closing:"/"===t[t.length-2]};var s="/"===(t=l.trim(t.slice(e+1,-1)))[t.length-1];return s&&(t=l.trim(t.slice(0,-1))),{html:t,closing:s}}(a),b=s[o],y=r(g.html,(function(t,e){var s,i=-1!==l.indexOf(b,t);return u(s=d(o,t,e,i))?i?(e=_(o,t,e,m))?t+'="'+e+'"':t:u(s=c(o,t,e,i))?void 0:s:s}));a="<"+o;return y&&(a+=" "+y),g.closing&&(a+=" /"),a+=">"}return u(f=n(o,a,v))?h(a):f}),h);return p&&(f=p.remove(f)),f},t.exports=d},"./src/component/doc-link.vue":function(t,e,s){"use strict";var i={mixins:[s("./src/helper/base_hepler.js").a],name:"doc-link",props:["link"],data:function(){return{whitelabel:defender.whitelabel}}},o=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),n=Object(o.a)(i,(function(){var t=this.$createElement,e=this._self._c||t;return!1===this.whitelabel.hide_doc_link?e("div",{staticClass:"sui-actions-right"},[e("a",{staticClass:"sui-button sui-button-ghost",attrs:{href:this.link,target:"_blank"}},[e("i",{staticClass:"sui-icon-academy"}),this._v(" "+this._s(this.__("View Documentation"))+"\n ")])]):this._e()}),[],!1,null,null,null);e.a=n.exports},"./src/component/footer.vue":function(t,e,s){"use strict";var i={data:function(){return{whitelabel:defender.whitelabel,is_free:parseInt(defender.is_free)}}},o=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),n=Object(o.a)(i,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[!0===t.whitelabel.change_footer?s("div",{staticClass:"sui-footer"},[t._v("\n "+t._s(t.whitelabel.footer_text)+"\n ")]):s("div",{staticClass:"sui-footer"},[t._v("Made with "),s("i",{staticClass:"sui-icon-heart"}),t._v(" by WPMU DEV")]),t._v(" "),!1===t.whitelabel.hide_doc_link?s("div",[1===t.is_free?s("ul",{staticClass:"sui-footer-nav"},[t._m(0),t._v(" "),t._m(1),t._v(" "),t._m(2),t._v(" "),t._m(3),t._v(" "),t._m(4),t._v(" "),t._m(5),t._v(" "),t._m(6),t._v(" "),t._m(7)]):s("ul",{staticClass:"sui-footer-nav"},[t._m(8),t._v(" "),t._m(9),t._v(" "),t._m(10),t._v(" "),t._m(11),t._v(" "),t._m(12),t._v(" "),t._m(13),t._v(" "),t._m(14),t._v(" "),t._m(15)]),t._v(" "),t._m(16)]):t._e()])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("a",{attrs:{href:"https://profiles.wordpress.org/wpmudev#content-plugins",target:"_blank"}},[this._v("Free\n Plugins")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("a",{attrs:{href:"https://premium.wpmudev.org/features/",target:"_blank"}},[this._v("Membership")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("a",{attrs:{href:"https://premium.wpmudev.org/roadmap/",target:"_blank"}},[this._v("Roadmap")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("a",{attrs:{href:"https://wordpress.org/support/plugin/plugin-name",target:"_blank"}},[this._v("Support")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("a",{attrs:{href:"https://premium.wpmudev.org/docs/",target:"_blank"}},[this._v("Docs")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("a",{attrs:{href:"https://premium.wpmudev.org/hub/",target:"_blank"}},[this._v("The Hub")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("a",{attrs:{href:"https://premium.wpmudev.org/terms-of-service/",target:"_blank"}},[this._v("Terms of Service")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("a",{attrs:{href:"https://incsub.com/privacy-policy/",target:"_blank"}},[this._v("Privacy Policy")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("a",{attrs:{href:"https://premium.wpmudev.org/hub/",target:"_blank"}},[this._v("The Hub")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("a",{attrs:{href:"https://premium.wpmudev.org/projects/category/plugins/",target:"_blank"}},[this._v("Plugins")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("a",{attrs:{href:"https://premium.wpmudev.org/roadmap/",target:"_blank"}},[this._v("Roadmap")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("a",{attrs:{href:"https://premium.wpmudev.org/hub/support/",target:"_blank"}},[this._v("Support")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("a",{attrs:{href:"https://premium.wpmudev.org/docs/",target:"_blank"}},[this._v("Docs")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("a",{attrs:{href:"https://premium.wpmudev.org/hub/community/",target:"_blank"}},[this._v("Community")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("a",{attrs:{href:"https://premium.wpmudev.org/terms-of-service/",target:"_blank"}},[this._v("Terms of Service")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("a",{attrs:{href:"https://incsub.com/privacy-policy/",target:"_blank"}},[this._v("Privacy Policy")])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("ul",{staticClass:"sui-footer-social"},[s("li",[s("a",{attrs:{href:"https://www.facebook.com/wpmudev",target:"_blank"}},[s("i",{staticClass:"sui-icon-social-facebook",attrs:{"aria-hidden":"true"}}),t._v(" "),s("span",{staticClass:"sui-screen-reader-text"},[t._v("Facebook")])])]),t._v(" "),s("li",[s("a",{attrs:{href:"https://twitter.com/wpmudev",target:"_blank"}},[s("i",{staticClass:"sui-icon-social-twitter",attrs:{"aria-hidden":"true"}})]),t._v(" "),s("span",{staticClass:"sui-screen-reader-text"},[t._v("Twitter")])]),t._v(" "),s("li",[s("a",{attrs:{href:"https://www.instagram.com/wpmu_dev/",target:"_blank"}},[s("i",{staticClass:"sui-icon-instagram",attrs:{"aria-hidden":"true"}}),t._v(" "),s("span",{staticClass:"sui-screen-reader-text"},[t._v("Instagram")])])])])}],!1,null,null,null);e.a=n.exports},"./src/component/overlay.vue":function(t,e,s){"use strict";var i={name:"overlay"},o=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),n=Object(o.a)(i,(function(){var t=this.$createElement;this._self._c;return this._m(0)}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"wd-overlay"},[e("i",{staticClass:"sui-icon-loader sui-loading",attrs:{"aria-hidden":"true"}})])}],!1,null,null,null);e.a=n.exports},"./src/component/pagination.vue":function(t,e,s){"use strict";var i={props:{value:{type:Number},pageCount:{type:Number,required:!0},forcePage:{type:Number},clickHandler:{type:Function,default:function(){}},pageRange:{type:Number,default:3},marginPages:{type:Number,default:1},prevText:{type:String,default:"Prev"},nextText:{type:String,default:"Next"},breakViewText:{type:String,default:"…"},containerClass:{type:String},pageClass:{type:String},pageLinkClass:{type:String},prevClass:{type:String},prevLinkClass:{type:String},nextClass:{type:String},nextLinkClass:{type:String},breakViewClass:{type:String},breakViewLinkClass:{type:String},activeClass:{type:String,default:"active"},disabledClass:{type:String,default:"disabled"},noLiSurround:{type:Boolean,default:!1},firstLastButton:{type:Boolean,default:!1},firstButtonText:{type:String,default:"First"},lastButtonText:{type:String,default:"Last"},hidePrevNext:{type:Boolean,default:!1}},beforeUpdate:function(){void 0!==this.forcePage&&this.forcePage!==this.selected&&(this.selected=this.forcePage)},computed:{selected:{get:function(){return this.value||this.innerValue},set:function(t){this.innerValue=t}},pages:function(){var t=this,e={};if(this.pageCount<=this.pageRange)for(var s=0;s<this.pageCount;s++){var i={index:s,content:s+1,selected:s===this.selected-1};e[s]=i}else{for(var o=Math.floor(this.pageRange/2),n=function(s){var i={index:s,content:s+1,selected:s===t.selected-1};e[s]=i},a=function(t){e[t]={disabled:!0,breakView:!0}},r=0;r<this.marginPages;r++)n(r);var l=0;this.selected-o>0&&(l=this.selected-1-o);var u=l+this.pageRange-1;u>=this.pageCount&&(l=(u=this.pageCount-1)-this.pageRange+1);for(var d=l;d<=u&&d<=this.pageCount-1;d++)n(d);l>this.marginPages&&a(l-1),u+1<this.pageCount-this.marginPages&&a(u+1);for(var c=this.pageCount-1;c>=this.pageCount-this.marginPages;c--)n(c)}return e}},data:function(){return{innerValue:1}},methods:{handlePageSelected:function(t){this.selected!==t&&(this.innerValue=t,this.$emit("input",t),this.clickHandler(t))},prevPage:function(){this.selected<=1||this.handlePageSelected(this.selected-1)},nextPage:function(){this.selected>=this.pageCount||this.handlePageSelected(this.selected+1)},firstPageSelected:function(){return 1===this.selected},lastPageSelected:function(){return this.selected===this.pageCount||0===this.pageCount},selectFirstPage:function(){this.selected<=1||this.handlePageSelected(1)},selectLastPage:function(){this.selected>=this.pageCount||this.handlePageSelected(this.pageCount)}}},o=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),n=Object(o.a)(i,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.noLiSurround?s("div",{class:t.containerClass},[t.firstLastButton?s("a",{class:[t.pageLinkClass,t.firstPageSelected()?t.disabledClass:""],attrs:{tabindex:"0"},domProps:{innerHTML:t._s(t.firstButtonText)},on:{click:function(e){return t.selectFirstPage()},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.selectFirstPage()}}}):t._e(),t._v(" "),t.firstPageSelected()&&t.hidePrevNext?t._e():s("a",{class:[t.prevLinkClass,t.firstPageSelected()?t.disabledClass:""],attrs:{tabindex:"0"},domProps:{innerHTML:t._s(t.prevText)},on:{click:function(e){return t.prevPage()},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.prevPage()}}}),t._v(" "),t._l(t.pages,(function(e){return[e.breakView?s("a",{class:[t.pageLinkClass,t.breakViewLinkClass,e.disabled?t.disabledClass:""],attrs:{tabindex:"0"}},[t._t("breakViewContent",[t._v(t._s(t.breakViewText))])],2):e.disabled?s("a",{class:[t.pageLinkClass,e.selected?t.activeClass:"",t.disabledClass],attrs:{tabindex:"0"}},[t._v(t._s(e.content))]):s("a",{class:[t.pageLinkClass,e.selected?t.activeClass:""],attrs:{tabindex:"0"},on:{click:function(s){return t.handlePageSelected(e.index+1)},keyup:function(s){return!s.type.indexOf("key")&&t._k(s.keyCode,"enter",13,s.key,"Enter")?null:t.handlePageSelected(e.index+1)}}},[t._v(t._s(e.content))])]})),t._v(" "),t.lastPageSelected()&&t.hidePrevNext?t._e():s("a",{class:[t.nextLinkClass,t.lastPageSelected()?t.disabledClass:""],attrs:{tabindex:"0"},domProps:{innerHTML:t._s(t.nextText)},on:{click:function(e){return t.nextPage()},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.nextPage()}}}),t._v(" "),t.firstLastButton?s("a",{class:[t.pageLinkClass,t.lastPageSelected()?t.disabledClass:""],attrs:{tabindex:"0"},domProps:{innerHTML:t._s(t.lastButtonText)},on:{click:function(e){return t.selectLastPage()},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.selectLastPage()}}}):t._e()],2):s("ul",{class:t.containerClass},[t.firstLastButton?s("li",{class:[t.pageClass,t.firstPageSelected()?t.disabledClass:""]},[s("a",{class:t.pageLinkClass,attrs:{tabindex:t.firstPageSelected()?-1:0},domProps:{innerHTML:t._s(t.firstButtonText)},on:{click:function(e){return t.selectFirstPage()},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.selectFirstPage()}}})]):t._e(),t._v(" "),t.firstPageSelected()&&t.hidePrevNext?t._e():s("li",{class:[t.prevClass,t.firstPageSelected()?t.disabledClass:""]},[s("a",{class:t.prevLinkClass,attrs:{tabindex:t.firstPageSelected()?-1:0},domProps:{innerHTML:t._s(t.prevText)},on:{click:function(e){return t.prevPage()},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.prevPage()}}})]),t._v(" "),t._l(t.pages,(function(e){return s("li",{class:[t.pageClass,e.selected?t.activeClass:"",e.disabled?t.disabledClass:"",e.breakView?t.breakViewClass:""]},[e.breakView?s("a",{class:[t.pageLinkClass,t.breakViewLinkClass],attrs:{tabindex:"0"}},[t._t("breakViewContent",[t._v(t._s(t.breakViewText))])],2):e.disabled?s("a",{class:t.pageLinkClass,attrs:{tabindex:"0"}},[t._v(t._s(e.content))]):s("a",{class:t.pageLinkClass,attrs:{disabled:e.selected,tabindex:"0"},on:{click:function(s){return t.handlePageSelected(e.index+1)},keyup:function(s){return!s.type.indexOf("key")&&t._k(s.keyCode,"enter",13,s.key,"Enter")?null:t.handlePageSelected(e.index+1)}}},[t._v(t._s(e.content))])])})),t._v(" "),t.lastPageSelected()&&t.hidePrevNext?t._e():s("li",{class:[t.nextClass,t.lastPageSelected()?t.disabledClass:""]},[s("a",{class:t.nextLinkClass,attrs:{tabindex:t.lastPageSelected()?-1:0},domProps:{innerHTML:t._s(t.nextText)},on:{click:function(e){return t.nextPage()},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.nextPage()}}})]),t._v(" "),t.firstLastButton?s("li",{class:[t.pageClass,t.lastPageSelected()?t.disabledClass:""]},[s("a",{class:t.pageLinkClass,attrs:{tabindex:t.lastPageSelected()?-1:0},domProps:{innerHTML:t._s(t.lastButtonText)},on:{click:function(e){return t.selectLastPage()},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.selectLastPage()}}})]):t._e()],2)}),[],!1,null,null,null);e.a=n.exports},"./src/component/recipients.vue":function(t,e,s){"use strict";var i={mixins:[s("./src/helper/base_hepler.js").a],props:["recipients","id"],data:function(){return{first_name:"",email:"",observers:[],can_add:!1,saving_warning:!1,validate:{email:""}}},created:function(){this.observers=this.recipients},watch:{email:function(){if(this.validateEmail(this.email)){var t=!0,e=this;this.observers.forEach((function(s,i){if(s.email===e.email)return t=!1,void(e.validate.email=e.__("This email address is already in use"))})),this.can_add=t,!0===t&&(this.validate.email="")}else this.can_add=!1,this.validate.email=this.__("Invalid email address")},observers:function(){0===this.observers.length?this.saving_warning=!0:this.saving_warning=!1,void 0!==this.event&&this.$emit("update:recipients",this.observers)}},methods:{addRecipient:function(){this.observers.push({first_name:this.first_name,email:this.email}),SUI.closeModal(),this.first_name="",this.email=""},removeRecipient:function(t){this.observers.splice(t,1)},validateEmail:function(t){return/^(([^<>()\[\]\\.,;:\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(String(t).toLowerCase())}}},o=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),n=Object(o.a)(i,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("div",{directives:[{name:"show",rawName:"v-show",value:t.saving_warning,expression:"saving_warning"}],staticClass:"sui-notice sui-notice-warning"},[s("div",{staticClass:"sui-notice-content"},[s("div",{staticClass:"sui-notice-message"},[s("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),t._v(" "),s("p",[t._v("\n "+t._s(t.__("You've removed all recipients. If you save without a recipient, we'll automatically turn of reports"))+"\n ")])])])]),t._v(" "),s("div",{staticClass:"sui-recipients"},[t._l(t.observers,(function(e,i){return s("div",{staticClass:"sui-recipient"},[s("span",{staticClass:"sui-recipient-name"},[t._v(t._s(e.first_name))]),t._v(" "),s("span",{staticClass:"sui-recipient-email"},[t._v(t._s(e.email))]),t._v(" "),s("button",{staticClass:"sui-button-icon",attrs:{type:"button"},on:{click:function(e){return t.removeRecipient(i)}}},[s("i",{staticClass:"sui-icon-trash",attrs:{"aria-hidden":"true"}})])])})),t._v(" "),s("button",{staticClass:"sui-button sui-button-ghost add-recipient",attrs:{"data-modal-open":t.id,"data-modal-mask":"true","data-esc-close":"true"}},[s("i",{staticClass:"sui-icon-plus",attrs:{"aria-hidden":"true"}}),t._v(" "+t._s(t.__("Add Recipient"))+"\n ")])],2),t._v(" "),s("div",{staticClass:"sui-modal sui-modal-md"},[s("div",{staticClass:"sui-modal-content",attrs:{role:"dialog",id:t.id,"aria-modal":"true","aria-labelledby":"Recipient dialog"}},[s("div",{staticClass:"sui-box",attrs:{role:"document"}},[s("div",{staticClass:"sui-box-header"},[s("h3",{staticClass:"sui-box-title"},[t._v("\n "+t._s(t.__("Add Recipient"))+"\n ")]),t._v(" "),t._m(0)]),t._v(" "),s("div",{staticClass:"sui-box-body"},[s("p",[t._v("\n "+t._s(t.__("Add as many recipients as you like, they will receive email reports as per the schedule you set."))+"\n ")]),t._v(" "),s("div",{staticClass:"sui-form-field"},[s("label",{staticClass:"sui-label"},[t._v(t._s(t.__("First name")))]),t._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:t.first_name,expression:"first_name"}],staticClass:"sui-form-control recipient_name",attrs:{type:"text"},domProps:{value:t.first_name},on:{input:function(e){e.target.composing||(t.first_name=e.target.value)}}})]),t._v(" "),s("div",{staticClass:"sui-form-field",class:{"sui-form-field-error":t.validate.email.length>0}},[s("label",{staticClass:"sui-label"},[t._v(t._s(t.__("Email")))]),t._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:t.email,expression:"email"}],staticClass:"sui-form-control recipient_email",attrs:{type:"text"},domProps:{value:t.email},on:{input:function(e){e.target.composing||(t.email=e.target.value)}}}),t._v(" "),s("span",{directives:[{name:"show",rawName:"v-show",value:t.validate.email.length>0,expression:"validate.email.length > 0"}],staticClass:"sui-error-message",domProps:{textContent:t._s(this.validate.email)}})])]),t._v(" "),s("div",{staticClass:"sui-box-footer"},[s("button",{staticClass:"sui-button sui-button-ghost",attrs:{type:"button","data-modal-close":""}},[t._v("\n "+t._s(t.__("Cancel"))+"\n ")]),t._v(" "),s("button",{staticClass:"sui-modal-close sui-button recipient_save",attrs:{type:"button",disabled:!1===t.can_add},on:{click:t.addRecipient}},[t._v(t._s(t.__("Add"))+"\n ")])])])])])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"sui-actions-right"},[e("button",{staticClass:"sui-button-icon",attrs:{type:"button","data-modal-close":"","aria-label":"Close this dialog window"}},[e("i",{staticClass:"sui-icon-close"})])])}],!1,null,null,null);e.a=n.exports},"./src/component/submit-button.vue":function(t,e,s){"use strict";var i={name:"submit-button",props:["id","state","text","css-class","type"],computed:{getClass:function(){return"sui-button "+this.cssClass}}},o=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),n=Object(o.a)(i,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("button",{staticClass:"sui-button",class:[t.getClass,{"sui-button-onload":t.state.on_saving}],attrs:{id:t.id,type:t.type,disabled:t.state.on_saving},on:{click:function(e){return t.$emit("click")}}},[s("span",{staticClass:"sui-loading-text"},[t._t("default")],2),t._v(" "),s("i",{staticClass:"sui-icon-loader sui-loading",attrs:{"aria-hidden":"true"}})])}),[],!1,null,null,null);e.a=n.exports},"./src/component/summary-box.vue":function(t,e,s){"use strict";var i={mixins:[s("./src/helper/base_hepler.js").a],props:["css-class"],name:"summary-box",data:function(){return{whitelabel:defender.whitelabel}},computed:{summary_class:function(){return{"sui-unbranded":!0===this.whitelabel.hide_branding&&0===this.whitelabel.hero_image.length,"sui-rebranded":!0===this.whitelabel.hide_branding&&this.whitelabel.hero_image.length>0}},css_class:function(){return this.cssClass},rebrand_img:function(){if(this.whitelabel.hero_image.length>0)return{"background-image":"url('"+this.whitelabel.hero_image+"')"}}}},o=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),n=Object(o.a)(i,(function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"sui-box sui-summary",class:[this.summary_class,this.css_class],style:this.rebrand_img},[e("div",{staticClass:"sui-summary-image-space",attrs:{"aria-hidden":"true"}}),this._v(" "),this._t("default")],2)}),[],!1,null,null,null);e.a=n.exports},"./src/helper/base_hepler.js":function(t,e,s){"use strict";var i=s("./node_modules/xss/lib/index.js"),o=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var s=[],i=!0,o=!1,n=void 0;try{for(var a,r=t[Symbol.iterator]();!(i=(a=r.next()).done)&&(s.push(a.value),!e||s.length!==e);i=!0);}catch(t){o=!0,n=t}finally{try{!i&&r.return&&r.return()}finally{if(o)throw n}}return s}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},n=wp.i18n,a={whiteList:{a:["href","title","target"],span:["class"],strong:["*"]},safeAttrValue:function(t,e,s,o){return"a"===t&&"href"===e&&"%s"===s?"%s":Object(i.safeAttrValue)(t,e,s,o)}},r=new i.FilterXSS(a),l=[];e.a={methods:{__:function(t){var e=n.__(t,"wpdef");return r.process(e)},xss:function(t){return r.process(t)},vsprintf:function(t){return n.sprintf.apply(null,arguments)},siteUrl:function(t){return void 0!==t?defender.site_url+t:defender.site_url},adminUrl:function(t){return void 0!==t?defender.admin_url+t:defender.admin_url},assetUrl:function(t){return defender.defender_url+t},maybeHighContrast:function(){return{"sui-color-accessible":!0===defender.misc.high_contrast}},maybeHideBranding:function(){return defender.whitelabel.hide_branding},isWhitelabelEnabled:function(){return defender.whitelabel.enabled},campaign_url:function(t){return"https://premium.wpmudev.org/project/wp-defender/?utm_source=defender&utm_medium=plugin&utm_campaign="+t},campaignUrl:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"https://premium.wpmudev.org/"+t+"?utm_source=defender&utm_medium=plugin&utm_campaign="+e},httpRequest:function(t,e,s,i,o){var n=this;void 0===o&&(this.state.on_saving=!0);var a=ajaxurl+"?action="+this.endpoints[e]+"&_wpnonce="+this.nonces[e],r=jQuery.ajax({url:a,method:t,data:s,success:function(t){var e=t.data;n.state.on_saving=!1,void 0!==e&&void 0!==e.message&&(t.success?Defender.showNotification("success",e.message):Defender.showNotification("error",e.message)),void 0!==i&&i(t)}});l.push(r)},httpGetRequest:function(t,e,s,i){this.httpRequest("get",t,e,s,i)},httpPostRequest:function(t,e,s,i){this.httpRequest("post",t,e,s,i)},abortAllRequests:function(){for(var t=0;t<l.length;t++)l[t].abort()},getQueryStringParams:function(t){return t?(/^[?#]/.test(t)?t.slice(1):t).split("&").reduce((function(t,e){var s=e.split("="),i=o(s,2),n=i[0],a=i[1];return t[n]=a?decodeURIComponent(a.replace(/\+/g," ")):"",t}),{}):{}},rebindSUI:function(){jQuery("select:not([multiple])").each((function(){SUI.suiSelect(this)})),jQuery(".sui-accordion").each((function(){SUI.suiAccordion(this)}));var t=jQuery(".sui-wrap");SUI.dialogs={},jQuery(".sui-dialog").each((function(){SUI.dialogs[this.id]=new A11yDialog(this,t)}))}}}},"./src/ip-lockout.js":function(t,e,s){"use strict";s.r(e);var i=s("vue"),o=s.n(i),n=s("./src/helper/base_hepler.js"),a={mixins:[n.a],name:"ip-lockout",props:["view"],data:function(){return{model:iplockout.model.ip_lockout,summary_data:iplockout.summaryData,state:{on_saving:!1},nonces:iplockout.nonces,endpoints:iplockout.endpoints,misc:iplockout.misc}},methods:{toggle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"login_protection",s=this,i={};i[e]=t,this.httpPostRequest("updateSettings",{data:JSON.stringify(i)},(function(){s.model[e]=t,!0===t&&s.$nextTick((function(){s.rebindSUI()}))}))},updateSettings:function(){var t=this.model;this.httpPostRequest("updateSettings",{data:JSON.stringify(t)})}},computed:{notification:function(){return 0===this.summary_data.ip.day?this.__("Login protection is enabled. There are no lockouts logged yet."):this.vsprintf(this.__('There have been %s lockouts in the last 24 hours. <a href="%s"><strong>View log</strong></a>.'),this.summary_data.ip.day,this.adminUrl("admin.php?page=wdf-ip-lockout&view=logs"))},banned_username:function(){return this.vsprintf(this.__("We recommend adding the usernames <strong>admin</strong>, <strong>administrator</strong> and your hostname <strong>%s</strong> as these are common for bots to try logging in with. One username per line"),this.misc.host)},demo_link:function(){return this.vsprintf(this.__('This message will be displayed across your website during the lockout period. See a quick preview <a href="%s">here</a>.'),this.siteUrl("?def-lockout-demo=1&type=login"))}},mounted:function(){var t=this;jQuery(".jquery-select").change((function(){var e=jQuery(this).val(),s=jQuery(this).attr("name");t.model[s]=e}))}},r=s("./node_modules/vue-loader/lib/runtime/componentNormalizer.js"),l=Object(r.a)(a,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return!1===t.model.login_protection||0===t.model.login_protection?s("div",{staticClass:"sui-box",attrs:{"data-tab":"login_lockout"}},[s("div",{staticClass:"sui-box-header"},[s("h3",{staticClass:"sui-box-title"},[t._v("\n "+t._s(t.__("Login Protection"))+"\n ")])]),t._v(" "),s("div",{staticClass:"sui-message"},[t.maybeHideBranding()?t._e():s("img",{staticClass:"sui-image",attrs:{src:t.assetUrl("assets/img/lockout-man.svg")}}),t._v(" "),s("div",{staticClass:"sui-message-content"},[s("p",[t._v("\n "+t._s(t.__("Put a stop to hackers trying to randomly guess your login credentials. Defender will lock out users after a set number of failed login attempts."))+"\n ")]),t._v(" "),s("form",{staticClass:"ip-frm",attrs:{method:"post"},on:{submit:function(e){return e.preventDefault(),t.toggle(!0,"login_protection")}}},[s("submit-button",{attrs:{type:"submit","css-class":"sui-button-blue",state:t.state}},[t._v("\n "+t._s(t.__("Activate"))+"\n ")])],1)])])]):!0===t.model.login_protection||1===t.model.login_protection?s("div",{staticClass:"sui-box"},[s("form",{staticClass:"ip-frm",attrs:{method:"post",id:"lockout-login-frm"},on:{submit:function(e){return e.preventDefault(),t.updateSettings(e)}}},[s("div",{staticClass:"sui-box-header"},[s("h3",{staticClass:"sui-box-title"},[t._v("\n "+t._s(t.__("Login Protection"))+"\n ")])]),t._v(" "),s("div",{staticClass:"sui-box-body"},[s("p",[t._v("\n "+t._s(t.__("Put a stop to hackers trying to randomly guess your login credentials. Defender will lock out users after a set number of failed login attempts."))+"\n ")]),t._v(" "),t.summary_data.ip.day>0?s("div",{staticClass:"sui-notice sui-notice-error"},[s("div",{staticClass:"sui-notice-content"},[s("div",{staticClass:"sui-notice-message"},[s("i",{staticClass:"sui-icon-info sui-notice-icon sui-md"}),t._v(" "),s("p",{domProps:{innerHTML:t._s(t.notification)}})])])]):s("div",{staticClass:"sui-notice sui-notice-info"},[s("div",{staticClass:"sui-notice-content"},[s("div",{staticClass:"sui-notice-message"},[s("i",{staticClass:"sui-icon-info sui-notice-icon sui-md"}),t._v(" "),s("p",{domProps:{innerHTML:t._s(t.notification)}})])])]),t._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[t._v(t._s(t.__("Threshold")))]),t._v(" "),s("span",{staticClass:"sui-description"},[t._v(t._s(t.__("Specify how many failed login attempts within a specific time period will trigger a lockout.")))])]),t._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("div",{staticClass:"sui-form-field"},[s("div",{staticClass:"sui-row"},[s("div",{staticClass:"sui-col-md-3"},[s("label",{staticClass:"sui-label"},[t._v(t._s(t.__("Failed logins")))]),t._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:t.model.login_protection_login_attempt,expression:"model.login_protection_login_attempt"}],staticClass:"sui-form-control sui-input-sm",attrs:{size:"8",type:"text",id:"login_protection_login_attempt",name:"login_protection_login_attempt"},domProps:{value:t.model.login_protection_login_attempt},on:{input:function(e){e.target.composing||t.$set(t.model,"login_protection_login_attempt",e.target.value)}}})]),t._v(" "),s("div",{staticClass:"sui-col"},[s("label",{staticClass:"sui-label"},[t._v("\n "+t._s(t.__("Timeframe"))+"\n ")]),t._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:t.model.login_protection_lockout_timeframe,expression:"model.login_protection_lockout_timeframe"}],staticClass:"sui-form-control sui-input-sm sui-field-has-suffix",attrs:{size:"8",id:"login_lockout_timeframe",name:"login_protection_lockout_timeframe",type:"text"},domProps:{value:t.model.login_protection_lockout_timeframe},on:{input:function(e){e.target.composing||t.$set(t.model,"login_protection_lockout_timeframe",e.target.value)}}}),t._v(" "),s("span",{staticClass:"sui-field-suffix"},[t._v(t._s(t.__("seconds")))])])])])])]),t._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[t._v(t._s(t.__("Duration")))]),t._v(" "),s("span",{staticClass:"sui-description"},[t._v(t._s(t.__("Choose how long you'd like to ban the locked out user for.")))])]),t._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("div",{staticClass:"sui-side-tabs"},[s("div",{staticClass:"sui-tabs-menu"},[s("label",{staticClass:"sui-tab-item",class:{active:!1===t.model.login_protection_lockout_ban},attrs:{for:"timeframe"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.model.login_protection_lockout_ban,expression:"model.login_protection_lockout_ban"}],attrs:{type:"radio",name:"login_protection_lockout_ban",id:"timeframe","data-tab-menu":"timeframe-box"},domProps:{value:!1,checked:t._q(t.model.login_protection_lockout_ban,!1)},on:{change:function(e){return t.$set(t.model,"login_protection_lockout_ban",!1)}}}),t._v("\n "+t._s(t.__("Timeframe"))+"\n ")]),t._v(" "),s("label",{staticClass:"sui-tab-item",class:{active:!0===t.model.login_protection_lockout_ban},attrs:{for:"permanent"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.model.login_protection_lockout_ban,expression:"model.login_protection_lockout_ban"}],attrs:{type:"radio",name:"login_protection_lockout_ban","data-tab-menu":"",id:"permanent"},domProps:{value:!0,checked:t._q(t.model.login_protection_lockout_ban,!0)},on:{change:function(e){return t.$set(t.model,"login_protection_lockout_ban",!0)}}}),t._v("\n "+t._s(t.__("Permanent"))+"\n ")])]),t._v(" "),s("div",{staticClass:"sui-tabs-content"},[s("div",{staticClass:"sui-tab-content sui-tab-boxed",class:{active:!1===t.model.login_protection_lockout_ban},attrs:{id:"timeframe-box","data-tab-content":"timeframe-box"}},[s("div",{staticClass:"sui-row"},[s("div",{staticClass:"sui-col-md-3"},[s("label",{staticClass:"sui-label",attrs:{for:"login_protection_lockout_duration",id:"label_login_protection_lockout_duration"}},[t._v(t._s(t.__("Duration")))]),t._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:t.model.login_protection_lockout_duration,expression:"model.login_protection_lockout_duration"}],staticClass:"sui-form-control sui-input-sm",attrs:{size:"4",name:"login_protection_lockout_duration",id:"login_protection_lockout_duration",type:"text","aria-labelledby":"label_login_protection_lockout_duration"},domProps:{value:t.model.login_protection_lockout_duration},on:{input:function(e){e.target.composing||t.$set(t.model,"login_protection_lockout_duration",e.target.value)}}})]),t._v(" "),s("div",{staticClass:"sui-col-md-4"},[s("label",{staticClass:"sui-label",attrs:{for:"lockout-duration-unit",id:"label_lockout_duration_unit"}},[t._v(" ")]),t._v(" "),s("select",{directives:[{name:"model",rawName:"v-model",value:t.model.login_protection_lockout_duration_unit,expression:"model.login_protection_lockout_duration_unit"}],staticClass:"jquery-select sui-select",attrs:{id:"lockout-duration-unit","aria-labelledby":"label_lockout_duration_unit",name:"login_protection_lockout_duration_unit","data-minimum-results-for-search":"Infinity"},on:{change:function(e){var s=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.model,"login_protection_lockout_duration_unit",e.target.multiple?s:s[0])}}},[s("option",{attrs:{value:"seconds"}},[t._v(t._s(t.__("Seconds")))]),t._v(" "),s("option",{attrs:{value:"minutes"}},[t._v(t._s(t.__("Minutes")))]),t._v(" "),s("option",{attrs:{value:"hours"}},[t._v(t._s(t.__("Hours")))])])])])])])])])]),t._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[t._v(t._s(t.__("Message")))]),t._v(" "),s("span",{staticClass:"sui-description"},[t._v(t._s(t.__("Customize the message locked out users will see.")))])]),t._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("div",{staticClass:"sui-form-field"},[s("label",{staticClass:"sui-label"},[t._v(t._s(t.__("Custom message")))]),t._v(" "),s("textarea",{directives:[{name:"model",rawName:"v-model",value:t.model.login_protection_lockout_message,expression:"model.login_protection_lockout_message"}],staticClass:"sui-form-control",attrs:{name:"login_protection_lockout_message",id:"login_protection_lockout_message"},domProps:{value:t.model.login_protection_lockout_message},on:{input:function(e){e.target.composing||t.$set(t.model,"login_protection_lockout_message",e.target.value)}}}),t._v(" "),s("span",{staticClass:"sui-description",domProps:{innerHTML:t._s(t.demo_link)}})])])]),t._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[t._v(t._s(t.__("Banned usernames")))]),t._v(" "),s("span",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("It is highly recommended you avoid using the default username ‘admin'. Use this tool to automatically lockout and ban users who try to login with common usernames."))+"\n ")])]),t._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("div",{staticClass:"sui-form-field"},[s("label",{staticClass:"sui-label"},[t._v(t._s(t.__("Banned usernames")))]),t._v(" "),s("textarea",{directives:[{name:"model",rawName:"v-model",value:t.model.username_blacklist,expression:"model.username_blacklist"}],staticClass:"sui-form-control",attrs:{placeholder:t.__("Type usernames, one per line"),id:"username_blacklist",name:"username_blacklist",rows:"8"},domProps:{value:t.model.username_blacklist},on:{input:function(e){e.target.composing||t.$set(t.model,"username_blacklist",e.target.value)}}}),t._v(" "),s("span",{staticClass:"sui-description",domProps:{innerHTML:t._s(t.banned_username)}})])])]),t._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[t._v("\n "+t._s(t.__("Deactivate"))+"\n ")]),t._v(" "),s("span",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("If you no longer want to use this feature you can turn it off at any time."))+"\n ")])]),t._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("submit-button",{attrs:{type:"button","css-class":"sui-button-ghost",state:t.state},on:{click:function(e){return t.toggle(!1,"login_protection")}}},[t._v("\n "+t._s(t.__("Deactivate"))+"\n ")])],1)])]),t._v(" "),s("div",{staticClass:"sui-box-footer"},[s("div",{staticClass:"sui-actions-right"},[s("submit-button",{attrs:{type:"submit",state:t.state,"css-class":"sui-button-blue"}},[s("i",{staticClass:"sui-icon-save",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.__("Save Changes"))+"\n ")])],1)])])]):t._e()}),[],!1,null,null,null).exports,u={mixins:[n.a],name:"nf-lockout",props:["view"],data:function(){return{model:iplockout.model.nf_lockout,summary_data:iplockout.summaryData,state:{on_saving:!1},nonces:iplockout.nonces,endpoints:iplockout.endpoints,misc:iplockout.misc}},methods:{toggle:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"login_protection",s=this,i={};i[e]=t,this.httpPostRequest("updateSettings",{data:JSON.stringify(i)},(function(){s.model[e]=t,!0===t&&s.$nextTick((function(){s.rebindSUI()}))}))},updateSettings:function(){var t=this.model;this.httpPostRequest("updateSettings",{data:JSON.stringify(t)})}},computed:{notification:function(){return 0===this.summary_data.nf.day?this.__("404 detection is enabled. There are no lockouts logged yet."):this.vsprintf(this.__('There have been %s lockouts in the last 24 hours. <a href="%s"><strong>View log</strong></a>.'),this.summary_data.nf.day,this.adminUrl("admin.php?page=wdf-ip-lockout&view=logs"))},demo_link:function(){return this.vsprintf(this.__('This message will be displayed across your website during the lockout period. See a quick preview <a href="%s">here</a>.'),this.siteUrl("?def-lockout-demo=1&type=404"))}},mounted:function(){var t=this;jQuery(".jquery-select").change((function(){var e=jQuery(this).val(),s=jQuery(this).attr("name");t.model[s]=e}))}},d=Object(r.a)(u,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return!1===t.model.detect_404||0===t.model.detect_404?s("div",{staticClass:"sui-box"},[s("div",{staticClass:"sui-box-header"},[s("h3",{staticClass:"sui-box-title"},[t._v("\n\t\t\t"+t._s(t.__("404 Detection"))+"\n\t\t")])]),t._v(" "),s("div",{staticClass:"sui-message"},[!1===t.maybeHideBranding()?s("img",{staticClass:"sui-image",attrs:{src:t.assetUrl("assets/img/lockout-man.svg")}}):t._e(),t._v(" "),s("div",{staticClass:"sui-message-content"},[s("p",[t._v("\n\t\t\t\t"+t._s(t.__("With 404 detection enabled, Defender will keep an eye out for IP addresses that repeatedly request pages on your website that don't exist and then temporarily block them from accessing your site."))+"\n\t\t\t")]),t._v(" "),s("form",{attrs:{method:"post"},on:{submit:function(e){return e.preventDefault(),t.toggle(!0,"detect_404")}}},[s("submit-button",{staticClass:"sui-button-blue",attrs:{type:"submit",state:t.state}},[t._v("\n\t\t\t\t\t"+t._s(t.__("Activate"))+"\n\t\t\t\t")])],1)])])]):!0===t.model.detect_404||1===t.model.detect_404?s("div",{staticClass:"sui-box",attrs:{"data-tab":"notfound_lockout"}},[s("form",{staticClass:"ip-frm",attrs:{method:"post",id:"lockout-notfound-frm"},on:{submit:function(e){return e.preventDefault(),t.updateSettings(e)}}},[s("div",{staticClass:"sui-box-header"},[s("h3",{staticClass:"sui-box-title"},[t._v("\n\t\t\t\t"+t._s(t.__("404 Detection"))+"\n\t\t\t")])]),t._v(" "),s("div",{staticClass:"sui-box-body"},[s("p",[t._v("\n\t\t\t\t"+t._s(t.__("With 404 detection enabled, Defender will keep an eye out for IP addresses that repeatedly request pages on your website that don't exist and then temporarily block them from accessing your site."))+"\n\t\t\t")]),t._v(" "),s("div",{staticClass:"sui-notice",class:{"sui-notice-error":t.summary_data.nf.day>0,"sui-notice-info":0===t.summary_data.nf.day}},[s("div",{staticClass:"sui-notice-content"},[s("div",{staticClass:"sui-notice-message"},[s("i",{staticClass:"sui-icon-info sui-notice-icon sui-md"}),t._v(" "),s("p",{domProps:{innerHTML:t._s(t.notification)}})])])]),t._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[t._v(t._s(t.__("Threshold")))]),t._v(" "),s("span",{staticClass:"sui-description"},[t._v("\n\t\t\t\t\t\t"+t._s(t.__("Specify how many 404 errors within a specific time period will trigger a lockout."))+"\n\t\t\t\t\t")])]),t._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("div",{staticClass:"sui-row"},[s("div",{staticClass:"sui-col-md-3"},[s("label",{staticClass:"sui-label"},[t._v(t._s(t.__("404 hits")))]),t._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:t.model.detect_404_threshold,expression:"model.detect_404_threshold"}],staticClass:"sui-form-control sui-input-sm",attrs:{size:"8",type:"text",id:"detect_404_threshold",name:"detect_404_threshold"},domProps:{value:t.model.detect_404_threshold},on:{input:function(e){e.target.composing||t.$set(t.model,"detect_404_threshold",e.target.value)}}})]),t._v(" "),s("div",{staticClass:"sui-col"},[s("label",{staticClass:"sui-label"},[t._v(t._s(t.__("Timeframe")))]),t._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:t.model.detect_404_timeframe,expression:"model.detect_404_timeframe"}],staticClass:"sui-form-control sui-input-sm sui-field-has-suffix",attrs:{size:"8",id:"detect_404_timeframe",name:"detect_404_timeframe",type:"text"},domProps:{value:t.model.detect_404_timeframe},on:{input:function(e){e.target.composing||t.$set(t.model,"detect_404_timeframe",e.target.value)}}}),t._v(" "),s("span",{staticClass:"sui-field-suffix"},[t._v(t._s(t.__("seconds")))])])])])]),t._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[t._v(t._s(t.__("Duration")))]),t._v(" "),s("span",{staticClass:"sui-description"},[t._v(t._s(t.__("Choose how long you'd like to ban the locked out user for.")))])]),t._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("div",{staticClass:"sui-side-tabs"},[s("div",{staticClass:"sui-tabs-menu"},[s("label",{staticClass:"sui-tab-item",class:{active:!1===t.model.detect_404_lockout_ban},attrs:{for:"nf_timeframe"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.model.detect_404_lockout_ban,expression:"model.detect_404_lockout_ban"}],attrs:{type:"radio",name:"detect_404_lockout_ban",id:"nf_timeframe","data-tab-menu":"nf-timeframe-box"},domProps:{value:!1,checked:t._q(t.model.detect_404_lockout_ban,!1)},on:{change:function(e){return t.$set(t.model,"detect_404_lockout_ban",!1)}}}),t._v("\n\t\t\t\t\t\t\t\t"+t._s(t.__("Timeframe"))+"\n\t\t\t\t\t\t\t")]),t._v(" "),s("label",{staticClass:"sui-tab-item",class:{active:!0===t.model.detect_404_lockout_ban},attrs:{for:"nf_permanent"}},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.model.detect_404_lockout_ban,expression:"model.detect_404_lockout_ban"}],attrs:{type:"radio",name:"detect_404_lockout_ban","data-tab-menu":"",id:"nf_permanent"},domProps:{value:!0,checked:t._q(t.model.detect_404_lockout_ban,!0)},on:{change:function(e){return t.$set(t.model,"detect_404_lockout_ban",!0)}}}),t._v("\n\t\t\t\t\t\t\t\t"+t._s(t.__("Permanent"))+"\n\t\t\t\t\t\t\t")])]),t._v(" "),s("div",{staticClass:"sui-tabs-content"},[s("div",{staticClass:"sui-tab-content sui-tab-boxed",class:{active:!1===t.model.detect_404_lockout_ban},attrs:{id:"nf-timeframe-box","data-tab-content":"nf-timeframe-box"}},[s("div",{staticClass:"sui-row"},[s("div",{staticClass:"sui-col-md-3"},[s("label",{staticClass:"sui-label",attrs:{for:"detect_404_lockout_duration",id:"label_detect_404_lockout_duration"}},[t._v(t._s(t.__("Duration")))]),t._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:t.model.detect_404_lockout_duration,expression:"model.detect_404_lockout_duration"}],staticClass:"sui-form-control sui-input-sm",attrs:{size:"4",name:"detect_404_lockout_duration",id:"detect_404_lockout_duration",type:"text","aria-labelledby":"label_detect_404_lockout_duration"},domProps:{value:t.model.detect_404_lockout_duration},on:{input:function(e){e.target.composing||t.$set(t.model,"detect_404_lockout_duration",e.target.value)}}})]),t._v(" "),s("div",{staticClass:"sui-col-md-4"},[s("label",{staticClass:"sui-label",attrs:{for:"detect_404_lockout_duration_unit",id:"label_detect_404_lockout_duration_unit"}},[t._v(" ")]),t._v(" "),s("select",{directives:[{name:"model",rawName:"v-model",value:t.model.detect_404_lockout_duration_unit,expression:"model.detect_404_lockout_duration_unit"}],staticClass:"jquery-select sui-select",attrs:{id:"detect_404_lockout_duration_unit","aria-labelledby":"label_detect_404_lockout_duration_unit",name:"detect_404_lockout_duration_unit","data-minimum-results-for-search":"Infinity"},on:{change:function(e){var s=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.model,"detect_404_lockout_duration_unit",e.target.multiple?s:s[0])}}},[s("option",{attrs:{value:"seconds"}},[t._v(t._s(t.__("Seconds")))]),t._v(" "),s("option",{attrs:{value:"minutes"}},[t._v(t._s(t.__("Minutes")))]),t._v(" "),s("option",{attrs:{value:"hours"}},[t._v(t._s(t.__("Hours")))])])])])])])])])]),t._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[t._v(t._s(t.__("Message")))]),t._v(" "),s("span",{staticClass:"sui-description"},[t._v(t._s(t.__("Customize the message locked out users will see.")))])]),t._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("div",{staticClass:"sui-form-field"},[s("textarea",{directives:[{name:"model",rawName:"v-model",value:t.model.detect_404_lockout_message,expression:"model.detect_404_lockout_message"}],staticClass:"sui-form-control",attrs:{name:"detect_404_lockout_message",id:"detect_404_lockout_message"},domProps:{value:t.model.detect_404_lockout_message},on:{input:function(e){e.target.composing||t.$set(t.model,"detect_404_lockout_message",e.target.value)}}}),t._v(" "),s("span",{staticClass:"sui-description",domProps:{innerHTML:t._s(t.demo_link)}})])])]),t._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[t._v("\n\t\t\t\t\t\t"+t._s(t.__("Files & Folders"))+"\n\t\t\t\t\t")]),t._v(" "),s("span",{staticClass:"sui-description"},[t._v("\n\t\t\t\t\t\t"+t._s(t.__("Choose specific files and folders that you want to automatically ban users/bots from accessing, or whitelist access to."))+"\n\t\t\t\t\t")])]),t._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("strong",[t._v(t._s(t.__("Blacklist")))]),t._v(" "),s("p",{staticClass:"sui-description"},[t._v("\n\t\t\t\t\t\t"+t._s(t.__("Add file or folder URLs you want to automatically ban. Users or bots who request blacklisted them will be locked out as per your 404 rules above."))+"\n\t\t\t\t\t")]),t._v(" "),s("div",{staticClass:"sui-border-frame"},[s("label",{staticClass:"sui-label"},[t._v(t._s(t.__("Blaclisted files & folders")))]),t._v(" "),s("textarea",{directives:[{name:"model",rawName:"v-model",value:t.model.detect_404_blacklist,expression:"model.detect_404_blacklist"}],staticClass:"sui-form-control",attrs:{name:"detect_404_blacklist",rows:"8"},domProps:{value:t.model.detect_404_blacklist},on:{input:function(e){e.target.composing||t.$set(t.model,"detect_404_blacklist",e.target.value)}}}),t._v(" "),s("span",{staticClass:"sui-description"},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.__("One URL per line. You must list the full path beginning with a /."))+"\n\t\t\t\t\t\t")])]),t._v(" "),s("strong",[t._v(t._s(t.__("Whitelist")))]),t._v(" "),s("p",{staticClass:"sui-description"},[t._v("\n\t\t\t\t\t\t"+t._s(t.__("If you know a common file or folder on your website is missing, you can record it here so it doesn't count towards a lockout record."))+"\n\t\t\t\t\t")]),t._v(" "),s("div",{staticClass:"sui-border-frame"},[s("label",{staticClass:"sui-label"},[t._v(t._s(t.__("Whitelisted files & folders")))]),t._v(" "),s("textarea",{directives:[{name:"model",rawName:"v-model",value:t.model.detect_404_whitelist,expression:"model.detect_404_whitelist"}],staticClass:"sui-form-control",attrs:{id:"detect_404_whitelist",name:"detect_404_whitelist",rows:"8"},domProps:{value:t.model.detect_404_whitelist},on:{input:function(e){e.target.composing||t.$set(t.model,"detect_404_whitelist",e.target.value)}}}),t._v(" "),s("span",{staticClass:"sui-description"},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.__("One URL per line. You must list the full path beginning with a /."))+"\n\t\t\t\t\t\t")])])])]),t._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[t._v("\n\t\t\t\t\t\t"+t._s(t.__("Filetypes & Extensions"))+"\n\t\t\t\t\t")]),t._v(" "),s("span",{staticClass:"sui-description"},[t._v("\n\t\t\t\t\t\t"+t._s(t.__("Choose which types of files or extentions you want to auto-ban or whitelist."))+"\n\t\t\t\t\t")])]),t._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("strong",[t._v(t._s(t.__("Blacklist")))]),t._v(" "),s("p",{staticClass:"sui-description"},[t._v("\n\t\t\t\t\t\t"+t._s(t.__("Add a common filetype or extention you want to auto-ban. Users or bots who request blacklisted filetypes or extensions will be locked out as per your 404 rules above."))+"\n\t\t\t\t\t")]),t._v(" "),s("div",{staticClass:"sui-border-frame"},[s("label",{staticClass:"sui-label"},[t._v(t._s(t.__("Blaclisted filetypes & extensions")))]),t._v(" "),s("textarea",{directives:[{name:"model",rawName:"v-model",value:t.model.detect_404_filetypes_blacklist,expression:"model.detect_404_filetypes_blacklist"}],staticClass:"sui-form-control",attrs:{name:"detect_404_filetypes_blacklist",rows:"8"},domProps:{value:t.model.detect_404_filetypes_blacklist},on:{input:function(e){e.target.composing||t.$set(t.model,"detect_404_filetypes_blacklist",e.target.value)}}})]),t._v(" "),s("strong",[t._v(t._s(t.__("Whitelist")))]),t._v(" "),s("p",{staticClass:"sui-description"},[t._v("\n\t\t\t\t\t\t"+t._s(t.__("Defender will log the 404 error, but won't lockout the user for these filetypes."))+"\n\t\t\t\t\t")]),t._v(" "),s("div",{staticClass:"sui-border-frame"},[s("label",{staticClass:"sui-label"},[t._v(t._s(t.__("Whitelisted filetypes & extentions")))]),t._v(" "),s("textarea",{directives:[{name:"model",rawName:"v-model",value:t.model.detect_404_ignored_filetypes,expression:"model.detect_404_ignored_filetypes"}],staticClass:"sui-form-control",attrs:{id:"detect_404_blacklist",name:"detect_404_ignored_filetypes",rows:"8"},domProps:{value:t.model.detect_404_ignored_filetypes},on:{input:function(e){e.target.composing||t.$set(t.model,"detect_404_ignored_filetypes",e.target.value)}}})])])]),t._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[t._v("\n\t\t\t\t\t\t"+t._s(t.__("Exclusions"))+"\n\t\t\t\t\t")]),t._v(" "),s("span",{staticClass:"sui-description"},[t._v("\n\t\t\t\t\t\t"+t._s(t.__("By default, Defender will monitor all interactions with your website but you can choose to disable 404 detection for specific areas of your site."))+"\n\t\t\t\t\t")])]),t._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("div",{staticClass:"sui-form-field"},[s("label",{staticClass:"sui-toggle"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.model.detect_404_logged,expression:"model.detect_404_logged"}],attrs:{id:"detect_404_logged",type:"checkbox","true-value":"true","false-value":"false",name:"detect_404_logged"},domProps:{checked:Array.isArray(t.model.detect_404_logged)?t._i(t.model.detect_404_logged,null)>-1:t._q(t.model.detect_404_logged,"true")},on:{change:function(e){var s=t.model.detect_404_logged,i=e.target,o=i.checked?"true":"false";if(Array.isArray(s)){var n=t._i(s,null);i.checked?n<0&&t.$set(t.model,"detect_404_logged",s.concat([null])):n>-1&&t.$set(t.model,"detect_404_logged",s.slice(0,n).concat(s.slice(n+1)))}else t.$set(t.model,"detect_404_logged",o)}}}),t._v(" "),s("span",{staticClass:"sui-toggle-slider"})]),t._v(" "),s("label",{staticClass:"sui-toggle-label",attrs:{for:"detect_404_logged"}},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.__("Monitor 404s from logged in users"))+"\n\t\t\t\t\t\t")])])])]),t._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[t._v("\n\t\t\t\t\t\t"+t._s(t.__("Deactivate"))+"\n\t\t\t\t\t")]),t._v(" "),s("span",{staticClass:"sui-description"},[t._v("\n\t\t\t\t\t\t"+t._s(t.__("If you no longer want to use this feature you can turn it off at any time."))+"\n\t\t\t\t\t")])]),t._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("submit-button",{attrs:{type:"button","css-class":"sui-button-ghost",state:t.state},on:{click:function(e){return t.toggle(!1,"detect_404")}}},[t._v("\n\t\t\t\t\t\t"+t._s(t.__("Deactivate"))+"\n\t\t\t\t\t")])],1)])]),t._v(" "),s("div",{staticClass:"sui-box-footer"},[s("div",{staticClass:"sui-actions-right"},[s("submit-button",{attrs:{type:"submit","css-class":"sui-button-blue",state:t.state}},[s("i",{staticClass:"sui-icon-save",attrs:{"aria-hidden":"true"}}),t._v("\n\t\t\t\t\t"+t._s(t.__("Save Changes"))+"\n\t\t\t\t")])],1)])])]):t._e()}),[],!1,null,null,null).exports,c=s("./node_modules/lodash/find.js"),_=s.n(c),h=s("./node_modules/lodash/chunk.js"),m=s.n(h),p={mixins:[n.a],name:"locked-ips-dialog",data:function(){return{nonces:iplockout.nonces,endpoints:iplockout.endpoints,blacklist:{ips_locked:[],chunks:[],ip:"",paged:1,count:0,filtered_count:0},state:{ip_actioning:[],on_saving:!1},per_page:20}},methods:{query_locked_ips:function(){var t=this;this.httpPostRequest("queryLockedIps",{},(function(e){t.blacklist.ips_locked=Object.values(e.data.ips_locked),t.blacklist.chunks=m()(t.blacklist.ips_locked,t.per_page),t.blacklist.count=t.blacklist.ips_locked.length,t.blacklist.filtered_count=t.blacklist.ips_locked.length,t.$emit("fetched",t.blacklist.ips_locked.length)}),!0)},ip_action:function(t,e){var s=this;this.state.ip_actioning.push(t),this.httpPostRequest("ipAction",{ip:t,behavior:e},(function(i){var o=s.state.ip_actioning.indexOf(t);if(-1!==o&&s.state.ip_actioning.splice(o,1),!0===i.success){var n="unban"===e?"normal":"blocked",a=_()(s.blacklist.ips_locked,["ip",t]);a&&(a.status=n)}}),!0)}},computed:{filtered_locked_ips:function(){if(this.blacklist.ip.length>0){var t=this.blacklist.ip,e=this.blacklist.ips_locked.filter((function(e){return e.ip.indexOf(t)>-1}));this.blacklist.filtered_count=e.length,this.blacklist.chunks=m()(e,this.per_page)}return this.blacklist.chunks[this.blacklist.paged-1]},no_ip_address:function(){return this.vsprintf(this.__('Sorry, we couldn\'t find any IP Address matching "<strong>%s</strong>"'),this.blacklist.ip)}},created:function(){this.query_locked_ips()}},f=Object(r.a)(p,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"sui-modal sui-modal-md"},[s("div",{staticClass:"sui-modal-content locked-ips-dialog",attrs:{role:"dialog",id:"ips-modal","aria-modal":"true","aria-labelledby":"ips-dialog-title","aria-describedby":"ips-dialog-desc"}},[s("div",{staticClass:"sui-box no-padding-bottom",attrs:{role:"document"}},[s("div",{staticClass:"sui-box-header"},[s("h3",{staticClass:"sui-box-title",attrs:{id:"ips-dialog-title"}},[t._v(t._s(t.__("Temporary IP Block List")))]),t._v(" "),t._m(0)]),t._v(" "),s("div",{staticClass:"sui-box-body"},[s("p",{attrs:{id:"ips-dialog-desc"}},[t._v("\n "+t._s(t.__("Here's a list of IP addresses that are currently temporarily blocked for bad behaviour. Select the IPs you want to unblock below."))+"\n ")])]),t._v(" "),s("div",{staticClass:"sui-box-selectors sui-box-selectors-col-1 no-margin-bottom no-margin-top"},[s("ul",{staticClass:"ul-ips"},[s("li",[s("div",{staticClass:"sui-with-button sui-with-button-icon"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.blacklist.ip,expression:"blacklist.ip"}],staticClass:"sui-form-control",attrs:{type:"text",placeholder:t.__("Type IP Address")},domProps:{value:t.blacklist.ip},on:{input:function(e){e.target.composing||t.$set(t.blacklist,"ip",e.target.value)}}}),t._v(" "),t._m(1)])]),t._v(" "),t._l(t.filtered_locked_ips,(function(e,i){return s("li",["blocked"===e.status?s("label",{staticClass:"sui-box-selector"},[s("span",[s("i",{staticClass:"sui-icon-lock",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(e.ip)+"\n "),s("button",{staticClass:"sui-tooltip sui-button-icon",class:{"sui-button-onload":t.state.ip_actioning.indexOf(e.ip)>-1},attrs:{type:"button","data-tooltip":"Unblock"},on:{click:function(s){return t.ip_action(e.ip,"unban")}}},[s("span",{staticClass:"sui-loading-text",attrs:{"aria-hidden":"true"}},[s("i",{staticClass:"sui-icon-unlock",attrs:{"aria-hidden":"true"}}),t._v(" "),s("span",{staticClass:"sui-screen-reader-text"},[t._v(t._s(t.__("Unlock")))])]),t._v(" "),s("i",{staticClass:"sui-icon-loader sui-loading",attrs:{"aria-hidden":"true"}})])])]):s("label",{staticClass:"sui-box-selector-selected"},[s("span",[s("i",{staticClass:"sui-icon-unlock",attrs:{"aria-hidden":"true"}}),t._v("\n IP "),s("strong",[t._v(t._s(e.ip))]),t._v(" "+t._s(t.__("is unblocked"))+"\n "),s("button",{staticClass:"sui-tooltip sui-button-icon",class:{"sui-button-onload":t.state.ip_actioning.indexOf(e.ip)>-1},attrs:{type:"button","data-tooltip":"Undo"},on:{click:function(s){return t.ip_action(e.ip,"ban")}}},[s("span",{staticClass:"sui-loading-text",attrs:{"aria-hidden":"true"}},[s("i",{staticClass:"sui-icon-undo",attrs:{"aria-hidden":"true"}}),t._v(" "),s("span",{staticClass:"sui-screen-reader-text"},[t._v(t._s(t.__("Undo")))])]),t._v(" "),s("i",{staticClass:"sui-icon-loader sui-loading",attrs:{"aria-hidden":"true"}})])])])])}))],2)]),t._v(" "),t.blacklist.chunks.length>0?s("div",{staticClass:"sui-box-body"},[s("div",{staticClass:"sui-pagination-wrap"},[s("span",{staticClass:"sui-tag"},[t._v(t._s(t.blacklist.filtered_count)+" "+t._s(t.__("results")))]),t._v(" "),t.blacklist.chunks.length>1?s("ul",{staticClass:"sui-pagination"},[s("li",[s("a",{staticClass:"prev",attrs:{href:"#",disabled:1===t.blacklist.paged||!0===t.state.ip_actioning,"data-paged":"1"},on:{click:function(e){e.preventDefault(),t.blacklist.paged-=1}}},[s("i",{staticClass:"sui-icon-chevron-left",attrs:{"aria-hidden":"true"}})])]),t._v(" "),s("li",[s("a",{staticClass:"next",attrs:{href:"#",disabled:t.blacklist.paged===Math.ceil(t.blacklist.ips_locked.length/t.per_page)||!0===t.state.ip_actioning,"data-paged":"2"},on:{click:function(e){t.blacklist.paged+=1}}},[s("i",{staticClass:"sui-icon-chevron-right",attrs:{"aria-hidden":"true"}})])])]):t._e()])]):s("div",{staticClass:"sui-box-body no-padding-top no-padding-bottom text-center"},[s("p",{style:{marginTop:"20px"},domProps:{innerHTML:t._s(this.no_ip_address)}}),t._v(" "),s("img",{staticClass:"sui-image sui-image-center",attrs:{src:t.assetUrl("assets/img/dashboard-blacklist.svg"),"aria-hidden":"true"}})])])])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"sui-actions-right"},[e("button",{staticClass:"sui-button-icon",attrs:{"data-modal-close":"","aria-label":"Close this dialog window"}},[e("i",{staticClass:"sui-icon-close"})])])},function(){var t=this.$createElement,e=this._self._c||t;return e("button",{staticClass:"sui-button-icon",attrs:{type:"button"}},[e("i",{staticClass:"sui-icon-magnifying-glass-search",attrs:{"aria-hidden":"true"}})])}],!1,null,null,null).exports,v={mixins:[n.a],name:"ip_blacklist",props:["view"],data:function(){return{model:iplockout.model.blacklist,state:{on_saving:!1},geo_downloadable:!1,nonces:iplockout.nonces,endpoints:iplockout.endpoints,misc:iplockout.misc,ip_import:{id:!1,name:null},blacklist:{count:null},api_key:null}},components:{"locked-ips-dialog":f},methods:{download_geodb:function(){var t=this;this.httpPostRequest("downloadGeoDB",{api_key:t.api_key},(function(e){t.$nextTick((function(){!0===e.success?(t.misc.geo_db_downloaded=!0,location.reload()):Defender.showNotification("error",e.data.message)}))}))},import_ip:function(){var t=this;this.httpPostRequest("importIPs",{id:t.ip_import.id},(function(){t.ip_import={id:!1,name:null}}))},remove_import_file:function(){this.ip_import.id=!1,this.ip_import.name=null},update_settings:function(){var t=this.model;this.httpPostRequest("updateSettings",{data:JSON.stringify(t)})}},computed:{user_ip_notice:function(){return this.vsprintf(this.__("We recommend you add your own IP to avoid getting locked out accidentally! Your current IP is <span class='admin-ip'>%s</span>"),this.misc.user_ip)},log_status:function(){return null===this.blacklist.count?this.__("Loading data..."):0===this.blacklist.count?this.__("There are no IP addresses being blocked at the moment."):1===this.blacklist.count?this.__("1 IP address is currently blocked from viewing your site."):this.vsprintf(this.__("%d IP addresses are currently blocked from viewing your site."),this.blacklist.count)},demo_link:function(){return this.vsprintf(this.__('This message will be displayed across your website during the lockout period. See a quick preview <a href="%s">here</a>.'),this.siteUrl("?def-lockout-demo=1&type=blacklist"))},ip_block_count:function(){return this.vsprintf(this.__("%s results"),this.blacklist.count)},export_url:function(){return this.adminUrl("admin.php?page=wdf-ip-lockout&view=export&_wpnonce="+this.nonces.exportIPs)},geodb_download_instruction:function(){var t='<span class="sui-description">'+this.vsprintf(this.__("1. <a target='_blank' href='%s'>Sign up for a free account</a> with MaxMind for access to the free GeoLite2 Database."),"https://www.maxmind.com/en/geolite2/signup")+"</span>";return t+='<span class="sui-description">'+this.vsprintf(this.__('2. Visit <a target="_blank" href="%s">https://www.maxmind.com/en/accounts/current/license-key</a>.'),"https://www.maxmind.com/en/accounts/current/license-key")+"</span>",t+='<span class="sui-description">'+this.__("3. Create a new key or use an existing license key. Note: A license key is displayed, in full, only once to the person that generates the key.")+"</span>",t+='<span class="sui-description">'+this.__("4. Paste the license key below and click the download button.")+"</span>"},maxmind_product_description:function(){return this.vsprintf(this.__("This product includes GeoLite2 data created by MaxMind, available from <a target='_blank' href='%s'>https://www.maxmind.com</a>.","https://www.maxmind.com"))}},watch:{api_key:function(t,e){t.trim().length>0?this.geo_downloadable=!0:this.geo_downloadable=!1}},mounted:function(){var t=void 0,e=this;jQuery(".file-picker").click((function(){t||(t=wp.media.frames.file_frame=wp.media({title:"Choose an Import file",button:{text:"Choose File"},multiple:!1})).on("select",(function(){var s=t.state().get("selection").first().toJSON();e.ip_import.id=s.id,e.ip_import.name=s.filename,jQuery(".upload-input").addClass("sui-has_file"),jQuery(".upload-input .sui-upload-file span").text(s.filename)})),t.open()}));var s=this;jQuery(".jquery-select").change((function(){var t=jQuery(this).val(),e=jQuery(this).attr("name");s.model[e]=t})),"string"==typeof this.model.country_blacklist&&(this.model.country_blacklist.length?this.model.country_blacklist=this.model.country_blacklist.split(","):this.model.country_blacklist=[]),"string"==typeof this.model.country_whitelist&&(this.model.country_whitelist.length?this.model.country_whitelist=this.model.country_whitelist.split(","):this.model.country_whitelist=[])}},g=Object(r.a)(v,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"sui-box"},[s("form",{attrs:{method:"post"},on:{submit:function(e){return e.preventDefault(),t.update_settings(e)}}},[s("div",{staticClass:"sui-box-header"},[s("h3",{staticClass:"sui-box-title"},[t._v("\n\t\t\t\t\t"+t._s(t.__("IP Banning"))+"\n\t\t\t\t")])]),t._v(" "),s("div",{staticClass:"sui-box-body"},[s("p",[t._v("\n\t\t\t\t\t"+t._s(t.__("Choose which IP addresses you wish to permanently ban from accessing your website."))+"\n\t\t\t\t")]),t._v(" "),s("hr"),t._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[t._v("\n "+t._s(t.__("IP Addresses"))+"\n ")]),t._v(" "),s("span",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("Add IP addresses you want to permanently ban from, or always allow access to your website."))+"\n ")])]),t._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("strong",[t._v(t._s(t.__("Blacklist")))]),t._v(" "),s("p",{staticClass:"sui-description"},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.__("Any IP addresses you list here will be completely blocked from accessing your website, including admins."))+"\n\t\t\t\t\t\t")]),t._v(" "),s("div",{staticClass:"sui-border-frame"},[s("label",{staticClass:"sui-label"},[t._v(t._s(t.__("Blacklisted IPs")))]),t._v(" "),s("textarea",{directives:[{name:"model",rawName:"v-model",value:t.model.ip_blacklist,expression:"model.ip_blacklist"}],staticClass:"sui-form-control",attrs:{id:"ip_blacklist",name:"ip_blacklist",placeholder:t.__("Add IP addresses here, one per line"),rows:"8"},domProps:{value:t.model.ip_blacklist},on:{input:function(e){e.target.composing||t.$set(t.model,"ip_blacklist",e.target.value)}}}),t._v(" "),s("span",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("Both IPv4 and IPv6 are supported. IP ranges are also accepted in format xxx.xxx.xxx.xxx-xxx.xxx.xxx.xxx."))+"\n ")])]),t._v(" "),s("strong",[t._v(t._s(t.__("Whitelist")))]),t._v(" "),s("p",{staticClass:"sui-description"},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.__("Any IP addresses you list here will be exempt any existing or new ban rules outlined in login protection, 404 detection or IP ban lists."))+"\n\t\t\t\t\t\t")]),t._v(" "),s("div",{staticClass:"sui-border-frame"},[s("label",{staticClass:"sui-label"},[t._v(t._s(t.__("Allowed IPs")))]),t._v(" "),s("textarea",{directives:[{name:"model",rawName:"v-model",value:t.model.ip_whitelist,expression:"model.ip_whitelist"}],staticClass:"sui-form-control",attrs:{id:"ip_whitelist",name:"ip_whitelist",placeholder:t.__("Add IP addresses here, one per line"),rows:"8"},domProps:{value:t.model.ip_whitelist},on:{input:function(e){e.target.composing||t.$set(t.model,"ip_whitelist",e.target.value)}}}),t._v(" "),s("span",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("One IP address per line. Both IPv4 and IPv6 are supported. IP ranges are also accepted in format xxx.xxx.xxx.xxx-xxx.xxx.xxx.xxx."))+"\n ")])]),t._v(" "),s("div",{staticClass:"sui-notice"},[s("div",{staticClass:"sui-notice-content"},[s("div",{staticClass:"sui-notice-message"},[s("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),t._v(" "),s("p",{domProps:{innerHTML:t._s(t.user_ip_notice)}})])])])])]),t._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[t._v(t._s(t.__("Active Lockouts")))]),t._v(" "),s("span",{staticClass:"sui-description"},[t._v("\n "+t._s(t.__("View IP addresses that are temporarily blocked from accessing your site according to your lockout rules. You can release IP addresses from the temporarily block here."))+"\n ")])]),t._v(" "),s("div",{staticClass:"sui-box-settings-col-2"},[s("div",{staticClass:"sui-notice sui-notice-info margin-bottom-10"},[s("div",{staticClass:"sui-notice-content"},[s("div",{staticClass:"sui-notice-message"},[s("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),t._v(" "),s("p",{domProps:{innerHTML:t._s(t.log_status)}})])])]),t._v(" "),s("button",{directives:[{name:"show",rawName:"v-show",value:t.blacklist.count>0,expression:"blacklist.count > 0"}],staticClass:"sui-button sui-button-gray",attrs:{type:"button","data-modal-open":"ips-modal"}},[t._v("\n\t\t\t\t\t\t\t"+t._s(t.__("Unlock ips"))+"\n\t\t\t\t\t\t")])])]),t._v(" "),s("div",{staticClass:"sui-box-settings-row"},[s("div",{staticClass:"sui-box-settings-col-1"},[s("span",{staticClass:"sui-settings-label"},[t._v(t._s(t.__("Locations")))]),t._v(" "),s("span",{staticClass:"sui-description"},[t._v(t._s(t.__("Ban countries you don't expect/want traffic from to protect your site from unwanted hackers and bots in a specific location.")))])]),t._v(" "),!1===t.misc.geo_requirement?s("div",{staticClass:"sui-box-settings-col-2"},[s("div",{staticClass:"sui-notice sui-notice-warning"},[s("div",{staticClass:"sui-notice-content"},[s("div",{staticClass:"sui-notice-message"},[s("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),t._v(" "),s("p",[t._v("\n\t\t\t\t\t\t\t\t"+t._s(t.__("This feature requires PHP 5.4 or newer. Please upgrade your PHP version if you wish to use location banning."))+"\n\t\t\t\t\t\t\t")])])])])]):s("div",{staticClass:"sui-box-settings-col-2 geo-ip-block"},[!1===t.misc.geo_db_downloaded?s("div",[s("div",{staticClass:"sui-notice sui-notice-info margin-bottom-10"},[s("div",{staticClass:"sui-notice-content"},[s("div",{staticClass:"sui-notice-message"},[s("i",{staticClass:"sui-notice-icon sui-icon-info sui-md",attrs:{"aria-hidden":"true"}}),t
|
|