Version Description
( 2022-11-02 ) =
- Enhance: Security hardening
- Enhance: WP 6.1 compatibility
Download this release
Release Info
Developer | khaxan |
Plugin | Hummingbird Page Speed Optimization |
Version | 3.3.6 |
Comparing to | |
See all releases |
Code changes from version 3.3.4 to 3.3.6
admin/ajax/caching/class-browser.php
CHANGED
@@ -44,6 +44,11 @@ class Browser {
|
|
44 |
public function browser_caching_status() {
|
45 |
check_ajax_referer( 'wphb-fetch' );
|
46 |
|
|
|
|
|
|
|
|
|
|
|
47 |
$params = filter_input( INPUT_POST, 'data', FILTER_UNSAFE_RAW );
|
48 |
$params = json_decode( html_entity_decode( $params ), true );
|
49 |
|
@@ -87,6 +92,11 @@ class Browser {
|
|
87 |
public function update_expiry() {
|
88 |
check_ajax_referer( 'wphb-fetch' );
|
89 |
|
|
|
|
|
|
|
|
|
|
|
90 |
$data = filter_input( INPUT_POST, 'data', FILTER_UNSAFE_RAW );
|
91 |
$data = json_decode( html_entity_decode( $data ), true );
|
92 |
|
44 |
public function browser_caching_status() {
|
45 |
check_ajax_referer( 'wphb-fetch' );
|
46 |
|
47 |
+
// Check permission.
|
48 |
+
if ( ! current_user_can( Utils::get_admin_capability() ) ) {
|
49 |
+
die();
|
50 |
+
}
|
51 |
+
|
52 |
$params = filter_input( INPUT_POST, 'data', FILTER_UNSAFE_RAW );
|
53 |
$params = json_decode( html_entity_decode( $params ), true );
|
54 |
|
92 |
public function update_expiry() {
|
93 |
check_ajax_referer( 'wphb-fetch' );
|
94 |
|
95 |
+
// Check permission.
|
96 |
+
if ( ! current_user_can( Utils::get_admin_capability() ) ) {
|
97 |
+
die();
|
98 |
+
}
|
99 |
+
|
100 |
$data = filter_input( INPUT_POST, 'data', FILTER_UNSAFE_RAW );
|
101 |
$data = json_decode( html_entity_decode( $data ), true );
|
102 |
|
admin/ajax/caching/class-integrations.php
CHANGED
@@ -46,6 +46,11 @@ class Integrations {
|
|
46 |
* @since 3.0.0
|
47 |
*/
|
48 |
public function cloudflare_status() {
|
|
|
|
|
|
|
|
|
|
|
49 |
$options = Utils::get_module( 'cloudflare' )->get_options();
|
50 |
$expiry = Utils::get_module( 'cloudflare' )->get_caching_expiration();
|
51 |
$frequencies = Cloudflare::get_frequencies();
|
@@ -78,6 +83,11 @@ class Integrations {
|
|
78 |
public function cloudflare_apo_status() {
|
79 |
check_ajax_referer( 'wphb-fetch' );
|
80 |
|
|
|
|
|
|
|
|
|
|
|
81 |
Utils::get_module( 'cloudflare' )->get_apo_settings();
|
82 |
$this->cloudflare_status();
|
83 |
|
@@ -92,6 +102,11 @@ class Integrations {
|
|
92 |
public function cloudflare_disconnect() {
|
93 |
check_ajax_referer( 'wphb-fetch' );
|
94 |
|
|
|
|
|
|
|
|
|
|
|
95 |
Utils::get_module( 'cloudflare' )->disconnect();
|
96 |
|
97 |
$this->cloudflare_status();
|
@@ -105,6 +120,11 @@ class Integrations {
|
|
105 |
public function cloudflare_zones() {
|
106 |
check_ajax_referer( 'wphb-fetch' );
|
107 |
|
|
|
|
|
|
|
|
|
|
|
108 |
$zones = Utils::get_module( 'cloudflare' )->get_zones_list();
|
109 |
|
110 |
// This will end processing if zones are an issue.
|
@@ -128,6 +148,11 @@ class Integrations {
|
|
128 |
public function cloudflare_clear_cache() {
|
129 |
check_ajax_referer( 'wphb-fetch' );
|
130 |
|
|
|
|
|
|
|
|
|
|
|
131 |
Utils::get_module( 'cloudflare' )->clear_cache();
|
132 |
|
133 |
wp_send_json_success();
|
@@ -141,6 +166,11 @@ class Integrations {
|
|
141 |
public function cloudflare_save_zone() {
|
142 |
check_ajax_referer( 'wphb-fetch' );
|
143 |
|
|
|
|
|
|
|
|
|
|
|
144 |
$zone = filter_input( INPUT_POST, 'data', FILTER_UNSAFE_RAW );
|
145 |
$zone = json_decode( html_entity_decode( $zone ), true );
|
146 |
|
@@ -170,6 +200,11 @@ class Integrations {
|
|
170 |
public function cloudflare_toggle_apo() {
|
171 |
check_ajax_referer( 'wphb-fetch' );
|
172 |
|
|
|
|
|
|
|
|
|
|
|
173 |
$status = filter_input( INPUT_POST, 'data', FILTER_UNSAFE_RAW );
|
174 |
$status = json_decode( html_entity_decode( $status ), true );
|
175 |
|
@@ -194,6 +229,11 @@ class Integrations {
|
|
194 |
public function cloudflare_toggle_device_cache() {
|
195 |
check_ajax_referer( 'wphb-fetch' );
|
196 |
|
|
|
|
|
|
|
|
|
|
|
197 |
$status = filter_input( INPUT_POST, 'data', FILTER_UNSAFE_RAW );
|
198 |
$status = json_decode( html_entity_decode( $status ), true );
|
199 |
|
46 |
* @since 3.0.0
|
47 |
*/
|
48 |
public function cloudflare_status() {
|
49 |
+
// Check permission.
|
50 |
+
if ( ! current_user_can( Utils::get_admin_capability() ) ) {
|
51 |
+
die();
|
52 |
+
}
|
53 |
+
|
54 |
$options = Utils::get_module( 'cloudflare' )->get_options();
|
55 |
$expiry = Utils::get_module( 'cloudflare' )->get_caching_expiration();
|
56 |
$frequencies = Cloudflare::get_frequencies();
|
83 |
public function cloudflare_apo_status() {
|
84 |
check_ajax_referer( 'wphb-fetch' );
|
85 |
|
86 |
+
// Check permission.
|
87 |
+
if ( ! current_user_can( Utils::get_admin_capability() ) ) {
|
88 |
+
die();
|
89 |
+
}
|
90 |
+
|
91 |
Utils::get_module( 'cloudflare' )->get_apo_settings();
|
92 |
$this->cloudflare_status();
|
93 |
|
102 |
public function cloudflare_disconnect() {
|
103 |
check_ajax_referer( 'wphb-fetch' );
|
104 |
|
105 |
+
// Check permission.
|
106 |
+
if ( ! current_user_can( Utils::get_admin_capability() ) ) {
|
107 |
+
die();
|
108 |
+
}
|
109 |
+
|
110 |
Utils::get_module( 'cloudflare' )->disconnect();
|
111 |
|
112 |
$this->cloudflare_status();
|
120 |
public function cloudflare_zones() {
|
121 |
check_ajax_referer( 'wphb-fetch' );
|
122 |
|
123 |
+
// Check permission.
|
124 |
+
if ( ! current_user_can( Utils::get_admin_capability() ) ) {
|
125 |
+
die();
|
126 |
+
}
|
127 |
+
|
128 |
$zones = Utils::get_module( 'cloudflare' )->get_zones_list();
|
129 |
|
130 |
// This will end processing if zones are an issue.
|
148 |
public function cloudflare_clear_cache() {
|
149 |
check_ajax_referer( 'wphb-fetch' );
|
150 |
|
151 |
+
// Check permission.
|
152 |
+
if ( ! current_user_can( Utils::get_admin_capability() ) ) {
|
153 |
+
die();
|
154 |
+
}
|
155 |
+
|
156 |
Utils::get_module( 'cloudflare' )->clear_cache();
|
157 |
|
158 |
wp_send_json_success();
|
166 |
public function cloudflare_save_zone() {
|
167 |
check_ajax_referer( 'wphb-fetch' );
|
168 |
|
169 |
+
// Check permission.
|
170 |
+
if ( ! current_user_can( Utils::get_admin_capability() ) ) {
|
171 |
+
die();
|
172 |
+
}
|
173 |
+
|
174 |
$zone = filter_input( INPUT_POST, 'data', FILTER_UNSAFE_RAW );
|
175 |
$zone = json_decode( html_entity_decode( $zone ), true );
|
176 |
|
200 |
public function cloudflare_toggle_apo() {
|
201 |
check_ajax_referer( 'wphb-fetch' );
|
202 |
|
203 |
+
// Check permission.
|
204 |
+
if ( ! current_user_can( Utils::get_admin_capability() ) ) {
|
205 |
+
die();
|
206 |
+
}
|
207 |
+
|
208 |
$status = filter_input( INPUT_POST, 'data', FILTER_UNSAFE_RAW );
|
209 |
$status = json_decode( html_entity_decode( $status ), true );
|
210 |
|
229 |
public function cloudflare_toggle_device_cache() {
|
230 |
check_ajax_referer( 'wphb-fetch' );
|
231 |
|
232 |
+
// Check permission.
|
233 |
+
if ( ! current_user_can( Utils::get_admin_capability() ) ) {
|
234 |
+
die();
|
235 |
+
}
|
236 |
+
|
237 |
$status = filter_input( INPUT_POST, 'data', FILTER_UNSAFE_RAW );
|
238 |
$status = json_decode( html_entity_decode( $status ), true );
|
239 |
|
admin/ajax/class-gzip.php
CHANGED
@@ -36,6 +36,11 @@ class Gzip {
|
|
36 |
public function status() {
|
37 |
check_ajax_referer( 'wphb-fetch' );
|
38 |
|
|
|
|
|
|
|
|
|
|
|
39 |
$params = filter_input( INPUT_POST, 'data', FILTER_UNSAFE_RAW );
|
40 |
$params = json_decode( html_entity_decode( $params ), true );
|
41 |
|
@@ -54,6 +59,11 @@ class Gzip {
|
|
54 |
public function apply_rules() {
|
55 |
check_ajax_referer( 'wphb-fetch' );
|
56 |
|
|
|
|
|
|
|
|
|
|
|
57 |
$params = filter_input( INPUT_POST, 'data', FILTER_UNSAFE_RAW );
|
58 |
$params = json_decode( html_entity_decode( $params ), true );
|
59 |
|
36 |
public function status() {
|
37 |
check_ajax_referer( 'wphb-fetch' );
|
38 |
|
39 |
+
// Check permission.
|
40 |
+
if ( ! current_user_can( Utils::get_admin_capability() ) ) {
|
41 |
+
die();
|
42 |
+
}
|
43 |
+
|
44 |
$params = filter_input( INPUT_POST, 'data', FILTER_UNSAFE_RAW );
|
45 |
$params = json_decode( html_entity_decode( $params ), true );
|
46 |
|
59 |
public function apply_rules() {
|
60 |
check_ajax_referer( 'wphb-fetch' );
|
61 |
|
62 |
+
// Check permission.
|
63 |
+
if ( ! current_user_can( Utils::get_admin_capability() ) ) {
|
64 |
+
die();
|
65 |
+
}
|
66 |
+
|
67 |
$params = filter_input( INPUT_POST, 'data', FILTER_UNSAFE_RAW );
|
68 |
$params = json_decode( html_entity_decode( $params ), true );
|
69 |
|
admin/ajax/class-minify.php
CHANGED
@@ -76,6 +76,11 @@ class Minify {
|
|
76 |
public function minify_status() {
|
77 |
check_ajax_referer( 'wphb-fetch' );
|
78 |
|
|
|
|
|
|
|
|
|
|
|
79 |
$options = Utils::get_module( 'minify' )->get_options();
|
80 |
|
81 |
list( $excluded_styles, $excluded_scripts ) = $this->get_exclusions( $options );
|
@@ -105,6 +110,11 @@ class Minify {
|
|
105 |
public function minify_clear_cache() {
|
106 |
check_ajax_referer( 'wphb-fetch' );
|
107 |
|
|
|
|
|
|
|
|
|
|
|
108 |
Utils::get_module( 'minify' )->clear_cache( false );
|
109 |
|
110 |
wp_send_json_success();
|
@@ -118,6 +128,11 @@ class Minify {
|
|
118 |
public function minify_recheck_files() {
|
119 |
check_ajax_referer( 'wphb-fetch' );
|
120 |
|
|
|
|
|
|
|
|
|
|
|
121 |
Utils::get_module( 'minify' )->clear_cache( false );
|
122 |
|
123 |
$collector = Utils::get_module( 'minify' )->sources_collector;
|
@@ -138,6 +153,11 @@ class Minify {
|
|
138 |
public function minify_reset_settings() {
|
139 |
check_ajax_referer( 'wphb-fetch' );
|
140 |
|
|
|
|
|
|
|
|
|
|
|
141 |
$options = Utils::get_module( 'minify' )->get_options();
|
142 |
|
143 |
$defaults = Settings::get_default_settings();
|
@@ -161,6 +181,11 @@ class Minify {
|
|
161 |
public function minify_save_settings() {
|
162 |
check_ajax_referer( 'wphb-fetch' );
|
163 |
|
|
|
|
|
|
|
|
|
|
|
164 |
$settings = filter_input( INPUT_POST, 'data', FILTER_DEFAULT, FILTER_UNSAFE_RAW );
|
165 |
$settings = json_decode( html_entity_decode( $settings ), true );
|
166 |
|
76 |
public function minify_status() {
|
77 |
check_ajax_referer( 'wphb-fetch' );
|
78 |
|
79 |
+
// Check permission.
|
80 |
+
if ( ! current_user_can( Utils::get_admin_capability() ) ) {
|
81 |
+
die();
|
82 |
+
}
|
83 |
+
|
84 |
$options = Utils::get_module( 'minify' )->get_options();
|
85 |
|
86 |
list( $excluded_styles, $excluded_scripts ) = $this->get_exclusions( $options );
|
110 |
public function minify_clear_cache() {
|
111 |
check_ajax_referer( 'wphb-fetch' );
|
112 |
|
113 |
+
// Check permission.
|
114 |
+
if ( ! current_user_can( Utils::get_admin_capability() ) ) {
|
115 |
+
die();
|
116 |
+
}
|
117 |
+
|
118 |
Utils::get_module( 'minify' )->clear_cache( false );
|
119 |
|
120 |
wp_send_json_success();
|
128 |
public function minify_recheck_files() {
|
129 |
check_ajax_referer( 'wphb-fetch' );
|
130 |
|
131 |
+
// Check permission.
|
132 |
+
if ( ! current_user_can( Utils::get_admin_capability() ) ) {
|
133 |
+
die();
|
134 |
+
}
|
135 |
+
|
136 |
Utils::get_module( 'minify' )->clear_cache( false );
|
137 |
|
138 |
$collector = Utils::get_module( 'minify' )->sources_collector;
|
153 |
public function minify_reset_settings() {
|
154 |
check_ajax_referer( 'wphb-fetch' );
|
155 |
|
156 |
+
// Check permission.
|
157 |
+
if ( ! current_user_can( Utils::get_admin_capability() ) ) {
|
158 |
+
die();
|
159 |
+
}
|
160 |
+
|
161 |
$options = Utils::get_module( 'minify' )->get_options();
|
162 |
|
163 |
$defaults = Settings::get_default_settings();
|
181 |
public function minify_save_settings() {
|
182 |
check_ajax_referer( 'wphb-fetch' );
|
183 |
|
184 |
+
// Check permission.
|
185 |
+
if ( ! current_user_can( Utils::get_admin_capability() ) ) {
|
186 |
+
die();
|
187 |
+
}
|
188 |
+
|
189 |
$settings = filter_input( INPUT_POST, 'data', FILTER_DEFAULT, FILTER_UNSAFE_RAW );
|
190 |
$settings = json_decode( html_entity_decode( $settings ), true );
|
191 |
|
admin/ajax/class-setup.php
CHANGED
@@ -65,6 +65,11 @@ class Setup {
|
|
65 |
public function check_requirements() {
|
66 |
check_ajax_referer( 'wphb-fetch' );
|
67 |
|
|
|
|
|
|
|
|
|
|
|
68 |
$status = array(
|
69 |
'advCacheFile' => false,
|
70 |
'fastCGI' => false,
|
@@ -98,6 +103,11 @@ class Setup {
|
|
98 |
public function remove_advanced_cache() {
|
99 |
check_ajax_referer( 'wphb-fetch' );
|
100 |
|
|
|
|
|
|
|
|
|
|
|
101 |
$adv_cache_file = dirname( get_theme_root() ) . '/advanced-cache.php';
|
102 |
if ( file_exists( $adv_cache_file ) ) {
|
103 |
unlink( $adv_cache_file );
|
@@ -116,6 +126,11 @@ class Setup {
|
|
116 |
public function disable_fast_cgi() {
|
117 |
check_ajax_referer( 'wphb-fetch' );
|
118 |
|
|
|
|
|
|
|
|
|
|
|
119 |
$site_id = $this->get_site_id();
|
120 |
if ( $site_id ) {
|
121 |
Utils::get_api()->hosting->disable_fast_cgi( $site_id );
|
@@ -133,6 +148,12 @@ class Setup {
|
|
133 |
*/
|
134 |
public function cancel() {
|
135 |
check_ajax_referer( 'wphb-fetch' );
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
update_option( 'wphb_run_onboarding', null );
|
137 |
wp_send_json_success();
|
138 |
}
|
@@ -146,6 +167,12 @@ class Setup {
|
|
146 |
*/
|
147 |
public function complete() {
|
148 |
check_ajax_referer( 'wphb-fetch' );
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
update_option( 'wphb_run_onboarding', null );
|
150 |
wp_send_json_success();
|
151 |
}
|
@@ -160,6 +187,11 @@ class Setup {
|
|
160 |
public function update_settings() {
|
161 |
check_ajax_referer( 'wphb-fetch' );
|
162 |
|
|
|
|
|
|
|
|
|
|
|
163 |
$settings = filter_input( INPUT_POST, 'data', FILTER_UNSAFE_RAW );
|
164 |
$settings = json_decode( html_entity_decode( $settings ), true );
|
165 |
|
65 |
public function check_requirements() {
|
66 |
check_ajax_referer( 'wphb-fetch' );
|
67 |
|
68 |
+
// Check permission.
|
69 |
+
if ( ! current_user_can( Utils::get_admin_capability() ) ) {
|
70 |
+
die();
|
71 |
+
}
|
72 |
+
|
73 |
$status = array(
|
74 |
'advCacheFile' => false,
|
75 |
'fastCGI' => false,
|
103 |
public function remove_advanced_cache() {
|
104 |
check_ajax_referer( 'wphb-fetch' );
|
105 |
|
106 |
+
// Check permission.
|
107 |
+
if ( ! current_user_can( Utils::get_admin_capability() ) ) {
|
108 |
+
die();
|
109 |
+
}
|
110 |
+
|
111 |
$adv_cache_file = dirname( get_theme_root() ) . '/advanced-cache.php';
|
112 |
if ( file_exists( $adv_cache_file ) ) {
|
113 |
unlink( $adv_cache_file );
|
126 |
public function disable_fast_cgi() {
|
127 |
check_ajax_referer( 'wphb-fetch' );
|
128 |
|
129 |
+
// Check permission.
|
130 |
+
if ( ! current_user_can( Utils::get_admin_capability() ) ) {
|
131 |
+
die();
|
132 |
+
}
|
133 |
+
|
134 |
$site_id = $this->get_site_id();
|
135 |
if ( $site_id ) {
|
136 |
Utils::get_api()->hosting->disable_fast_cgi( $site_id );
|
148 |
*/
|
149 |
public function cancel() {
|
150 |
check_ajax_referer( 'wphb-fetch' );
|
151 |
+
|
152 |
+
// Check permission.
|
153 |
+
if ( ! current_user_can( Utils::get_admin_capability() ) ) {
|
154 |
+
die();
|
155 |
+
}
|
156 |
+
|
157 |
update_option( 'wphb_run_onboarding', null );
|
158 |
wp_send_json_success();
|
159 |
}
|
167 |
*/
|
168 |
public function complete() {
|
169 |
check_ajax_referer( 'wphb-fetch' );
|
170 |
+
|
171 |
+
// Check permission.
|
172 |
+
if ( ! current_user_can( Utils::get_admin_capability() ) ) {
|
173 |
+
die();
|
174 |
+
}
|
175 |
+
|
176 |
update_option( 'wphb_run_onboarding', null );
|
177 |
wp_send_json_success();
|
178 |
}
|
187 |
public function update_settings() {
|
188 |
check_ajax_referer( 'wphb-fetch' );
|
189 |
|
190 |
+
// Check permission.
|
191 |
+
if ( ! current_user_can( Utils::get_admin_capability() ) ) {
|
192 |
+
die();
|
193 |
+
}
|
194 |
+
|
195 |
$settings = filter_input( INPUT_POST, 'data', FILTER_UNSAFE_RAW );
|
196 |
$settings = json_decode( html_entity_decode( $settings ), true );
|
197 |
|
admin/assets/js/wphb-app.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
!function(){var t={9576:function(t,e,n){var r=n(8891);!function(){"use strict";window.wphbMixPanel={init:function(){void 0!==wphb.mixpanel&&wphb.mixpanel.enabled&&(r.init("5d545622e3a040aca63f2089b0e6cae7",{opt_out_tracking_by_default:!0,ip:!1}),r.register({plugin:wphb.mixpanel.plugin,plugin_type:wphb.mixpanel.plugin_type,plugin_version:wphb.mixpanel.plugin_version,wp_version:wphb.mixpanel.wp_version,wp_type:wphb.mixpanel.wp_type,locale:wphb.mixpanel.locale,active_theme:wphb.mixpanel.active_theme,php_version:wphb.mixpanel.php_version,mysql_version:wphb.mixpanel.mysql_version,server_type:wphb.mixpanel.server_type}))},optIn:function(){wphb.mixpanel.enabled=!0,this.init(),r.opt_in_tracking()},optOut:function(){r.opt_out_tracking()},deactivate:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.track("plugin_deactivate",{reason:t,feedback:e})},enableFeature:function(t){this.track("plugin_feature_activate",{feature:t})},disableFeature:function(t){this.track("plugin_feature_deactivate",{feature:t})},track:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};void 0!==wphb.mixpanel&&wphb.mixpanel.enabled&&(r.has_opted_out_tracking()||r.track(t,e))}}}()},4743:function(t,e,n){"use strict";n.r(e);var r=n(4218),i=n(3265),o=n(4814);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(){return u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=l(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},u.apply(this,arguments)}function l(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h(t);if(e){var i=h(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function f(t,e){if(e&&("object"===s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}var g,m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(l,t);var e,n,o,s=d(l);function l(){return a(this,l),s.apply(this,arguments)}return e=l,(n=[{key:"step",value:function(t){var e=this;u(h(l.prototype),"step",this).call(this,t),this.currentStep++,t>0?r.Z.advanced.clearOrphanedBatch(3e3).then((function(t){var n=1e3;void 0!==t.highCPU&&t.highCPU?(n=1e4,document.getElementById("site-health-orphanned-speed").classList.remove("sui-hidden")):document.getElementById("site-health-orphanned-speed").classList.add("sui-hidden"),window.setTimeout((function(){e.updateProgressBar(e.getProgress()),e.step(e.totalSteps-e.currentStep)}),n)})):this.onFinish()}},{key:"onStart",value:function(){return document.getElementById("site-health-orphaned-progress").classList.remove("sui-hidden"),document.getElementById("site-health-orphaned-clear").classList.add("sui-button-onload"),Promise.resolve()}},{key:"onFinish",value:function(){u(h(l.prototype),"onFinish",this).call(this),window.SUI.closeModal(),document.getElementById("count-ao-orphaned").innerHTML="0",window.WPHB_Admin.notices.show((0,i.K)("successAoOrphanedPurge"))}}])&&c(e.prototype,n),o&&c(e,o),Object.defineProperty(e,"prototype",{writable:!1}),l}(o.Z);g=jQuery,WPHB_Admin.advanced={module:"advanced",init:function(){var t=this,e=this,n=g("#wphb-system-info-dropdown"),o=window.location.hash;if(g("#wphb-db-delete-all, .wphb-db-row-delete").on("click",(function(t){t.preventDefault(),e.showModal(t.target.dataset.entries,t.target.dataset.type)})),g('form[id="advanced-general-settings"], form[id="advanced-lazy-settings"]').on("submit",(function(t){t.preventDefault();var e=g(this).find(".sui-button-blue");e.addClass("sui-button-onload-text"),r.Z.advanced.saveSettings(g(this).serialize(),t.target.id).then((function(t){e.removeClass("sui-button-onload-text"),void 0!==t&&t.success?WPHB_Admin.notices.show():WPHB_Admin.notices.show((0,i.K)("errorSettingsUpdate"),"error")}))})),g("#wphb-system-info-php").removeClass("sui-hidden"),o){var s=o.replace("#","");g(".wphb-sys-info-table").addClass("sui-hidden"),g("#wphb-system-info-"+s).removeClass("sui-hidden"),n.val(s).trigger("sui:change")}n.on("change",(function(t){t.preventDefault(),g(".wphb-sys-info-table").addClass("sui-hidden"),g("#wphb-system-info-"+g(this).val()).removeClass("sui-hidden"),location.hash=g(this).val()})),g("#wphb-adv-paste-value").on("click",(function(t){t.preventDefault();var e=g('textarea[name="url_strings"]');""===e.val()?e.val(e.attr("placeholder")):e.val(e.val()+"\n"+e.attr("placeholder"))}));var a=document.getElementById("cart_fragments");a&&a.addEventListener("change",(function(t){t.preventDefault(),g("#cart_fragments_desc").toggle()}));for(var c=document.querySelectorAll('input[name="button[alignment][align]"]'),u=document.getElementById("button_margin_l"),l=document.getElementById("button_margin_r"),p=function(t){c[t].addEventListener("change",(function(){"center"===c[t].value&&c[t].checked?(u.setAttribute("disabled","disabled"),l.setAttribute("disabled","disabled"),u.value=0,l.value=0):(u.removeAttribute("disabled"),l.removeAttribute("disabled"))}))},d=0;d<c.length;d++)p(d);g('input[id="lazy_load"]').on("change",(function(){g("#wphb-lazy-load-comments-wrap, #sui-upsell-gravtar-caching").toggle()})),!0===window.location.search.includes("view=lazy")&&this.createPickers();var f=document.getElementById("btn-cache-purge");f&&f.addEventListener("click",(function(){return t.purgeDb()}));var h=document.getElementById("btn-minify-purge");h&&h.addEventListener("click",(function(){return t.purgeDb("minify")}));var _=document.getElementById("site-health-orphaned-clear");return _&&_.addEventListener("click",(function(){var t=document.getElementById("count-ao-orphaned").innerHTML,e=Math.ceil(parseInt(t)/3e3);new m(e,0).start()})),this},showModal:function(t,e){var n,r=g("#wphb-database-cleanup-modal"),o='<span class="sui-icon-trash" aria-hidden="true"></span>';"drafts"===e?(n=(0,i.K)("dbDeleteDrafts"),o+=(0,i.K)("dbDeleteDraftsButton")):(n=(0,i.K)("db_delete")+" "+t+" "+(0,i.K)("db_entries")+"? "+(0,i.K)("db_backup"),o+=(0,i.K)("dbDeleteButton")),r.find("p").html(n),r.find(".sui-button-red").attr("data-type",e).html(o),window.SUI.openModal("wphb-database-cleanup-modal","wpbody-content","wphb-clear-database-confirm",!1)},confirmDelete:function(t){var e;window.SUI.closeModal();var n=g(".box-advanced-db .sui-box-footer");e="all"===t?n:g(".box-advanced-db .wphb-border-frame").find("div[data-type="+t+"]");var o=g("#wphb-db-delete-all"),s=e.find(".wphb-db-row-delete");o.addClass("sui-button-onload-text"),s.addClass("sui-button-onload"),r.Z.advanced.deleteSelectedData(t).then((function(t){for(var e in o.removeClass("sui-button-onload-text"),s.removeClass("sui-button-onload"),t.left)if("total"===e){var r=(0,i.K)("deleteAll")+" ("+t.left[e]+")";n.find(".wphb-db-delete-all").html(r),n.find("#wphb-db-delete-all").attr("data-entries",t.left[e])}else{var a=g(".box-advanced-db div[data-type="+e+"]");a.find(".wphb-db-items").html(t.left[e]),a.find(".wphb-db-row-delete").attr("data-entries",t.left[e]).attr("disabled","0"===t.left[e])}WPHB_Admin.notices.show(t.message)})).catch((function(t){WPHB_Admin.notices.show(t,"error"),o.removeClass("sui-button-onload-text"),s.removeClass("sui-button-onload")}))},createPickers:function(){var t=g(".sui-colorpicker-input");t.wpColorPicker({change:function(t,e){var n=g(this);n.val()!==e.color.toCSS()&&n.val(e.color.toCSS()).trigger("change")}}),t.hasClass("wp-color-picker")&&t.each((function(){var t=g(this),e=t.closest(".sui-colorpicker-wrap"),n=e.find(".sui-colorpicker-value span[role=button]"),r=e.find(".sui-colorpicker-value"),i=t.closest(".wp-picker-container"),o=i.find(".wp-color-result");t.on("change",(function(){n.find("span").css({"background-color":o.css("background-color")}),r.find("input").val(t.val())})),e.find(".sui-button, span[role=button]").on("click",(function(t){o.click(),t.preventDefault(),t.stopPropagation()})),r.find("button").on("click",(function(e){i.find(".wp-picker-clear").click(),r.find("input").val(""),t.val("").trigger("change"),n.find("span").css({"background-color":""}),e.preventDefault(),e.stopPropagation()}))}))},purgeDb:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cache",e=document.getElementById("btn-"+t+"-purge");e&&(e.classList.add("sui-button-onload-text"),r.Z.common.call("wphb_advanced_purge_"+t).then((function(){document.getElementById("count-"+t).innerHTML="0",e.classList.remove("sui-button-onload-text");var n="successAdvPurge"+t.charAt(0).toUpperCase()+t.slice(1);WPHB_Admin.notices.show((0,i.K)(n))})))}}},6232:function(t,e,n){"use strict";n.r(e);var r=n(4218),i=n(3265),o=n(4814);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(){return u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=l(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},u.apply(this,arguments)}function l(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h(t);if(e){var i=h(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function f(t,e){if(e&&("object"===s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}var g,m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(s,t);var e,n,i,o=d(s);function s(){return a(this,s),o.apply(this,arguments)}return e=s,(n=[{key:"step",value:function(t){var e=this;if(u(h(s.prototype),"step",this).call(this,t),this.currentStep++,t>0){var n=20*(this.totalSteps-t);r.Z.caching.clearCacheBatch(20,n).then((function(){e.updateProgressBar(e.getProgress()),e.step(e.totalSteps-e.currentStep)}))}else this.onFinish()}},{key:"onStart",value:function(){var t=this;return r.Z.common.call("wphb_get_network_sites").then((function(e){t.totalSteps=Math.ceil(parseInt(e)/20)}))}},{key:"onFinish",value:function(){u(h(s.prototype),"onFinish",this).call(this),location.reload()}}])&&c(e.prototype,n),i&&c(e,i),Object.defineProperty(e,"prototype",{writable:!1}),s}(o.Z),_=m;g=jQuery,WPHB_Admin.caching={module:"caching",init:function(){var t=this,e=this,n=window.location.hash,o=g('form[id="page_cache-form"]'),s=g('form[id="rss-form"]'),a=g('div[id="wphb-box-caching-gravatar"]'),c=g('form[id="settings-form"]');this.scanner=new _(1,0),n&&g(n).length&&setTimeout((function(){g("html, body").animate({scrollTop:g(n).offset().top},"slow")}),300),o.on("submit",(function(t){t.preventDefault(),e.saveSettings("page_cache",o)})),o.on("click",".sui-box-header .sui-button",(function(t){t.preventDefault(),e.clearCache("page_cache",o)}));var u=document.getElementById("clear_interval");u&&u.addEventListener("change",(function(t){t.preventDefault(),g("#page_cache_clear_interval").toggle()}));var l=document.getElementById("wphb-cancel-cache-preload");l&&l.addEventListener("click",(function(t){t.preventDefault(),r.Z.common.call("wphb_preload_cancel").then((function(){window.location.reload()}))}));var p=document.getElementById("preload");p&&p.addEventListener("change",(function(t){t.preventDefault(),g("#page_cache_preload_type").toggle()})),g("#wphb-remove-advanced-cache").on("click",(function(t){t.preventDefault(),r.Z.common.call("wphb_remove_advanced_cache").then((function(){return location.reload()}))})),g("#configure-link").on("click",(function(t){t.preventDefault(),g("html, body").animate({scrollTop:g("#wphb-box-caching-settings").offset().top},"slow")})),a.on("click",".sui-box-header .sui-button",(function(t){t.preventDefault(),e.clearCache("gravatar",a)})),s.on("submit",(function(t){t.preventDefault();var n=s.find("#rss-expiry-time");n.val(Math.abs(n.val())),e.saveSettings("rss",s)}));var d=document.getElementById("redis-settings-form");d&&d.addEventListener("submit",(function(t){t.preventDefault();var e=document.getElementById("redis-connect-save");e.classList.add("sui-button-onload-text");var n=document.getElementById("redis-host").value,i=document.getElementById("redis-port").value,o=document.getElementById("redis-password").value,s=document.getElementById("redis-db").value,a=document.getElementById("redis-connected").value;i||(i=6379),r.Z.caching.redisSaveSettings(n,i,o,s).then((function(t){if(void 0!==t&&t.success)window.location.search+="1"===a?"&updated=redis-auth-2":"&updated=redis-auth";else{var n=document.getElementById("redis-connect-notice-on-modal");n.innerHTML=t.message,n.parentNode.parentNode.parentNode.classList.remove("sui-hidden"),n.parentNode.parentNode.classList.add("sui-spacing-top--10"),e.classList.remove("sui-button-onload-text")}}))}));var f=document.getElementById("object-cache");f&&f.addEventListener("change",(function(t){t.target.checked?wphbMixPanel.enableFeature("Redis Cache"):wphbMixPanel.disableFeature("Redis Cache"),r.Z.caching.redisObjectCache(t.target.checked).then((function(t){void 0!==t&&t.success?window.location.search+="&updated=redis-object-cache":WPHB_Admin.notices.show((0,i.K)("errorSettingsUpdate"),"error")}))}));var h=document.getElementById("clear-redis-cache");h&&h.addEventListener("click",(function(){h.classList.add("sui-button-onload-text"),r.Z.common.call("wphb_redis_cache_purge").then((function(){h.classList.remove("sui-button-onload-text"),WPHB_Admin.notices.show((0,i.K)("successRedisPurge"))}))}));var m=document.getElementById("redis-disconnect");return m&&m.addEventListener("click",(function(e){e.preventDefault(),t.redisDisable()})),c.on("submit",(function(t){t.preventDefault();var n=g('input[name="detection"]:checked',c).val();"auto"!==n&&"none"!==n||g(".wphb-notice.notice-info").slideUp(),e.saveSettings("other_cache",c)})),this},redisDisable:function(){r.Z.common.call("wphb_redis_disconnect").then((function(){window.location.search+="&updated=redis-disconnect"}))},saveSettings:function(t,e){var n=e.find("button.sui-button");n.addClass("sui-button-onload-text"),r.Z.caching.saveSettings(t,e.serialize()).then((function(e){n.removeClass("sui-button-onload-text"),void 0!==e&&e.success?"page_cache"===t?window.location.search+="&updated=true":WPHB_Admin.notices.show():WPHB_Admin.notices.show((0,i.K)("errorSettingsUpdate"),"error")}))},clearCache:function(t,e){var n=e.find(".sui-box-header .sui-button");n.addClass("sui-button-onload-text"),r.Z.caching.clearCache(t).then((function(e){void 0!==e&&e.success?"page_cache"===t?(g(".box-caching-summary span.sui-summary-large").html("0"),WPHB_Admin.notices.show((0,i.K)("successPageCachePurge"))):"gravatar"===t&&WPHB_Admin.notices.show((0,i.K)("successGravatarPurge")):WPHB_Admin.notices.show((0,i.K)("errorCachePurge"),"error"),n.removeClass("sui-button-onload-text")}))},clearNetworkCache:function(){window.SUI.slideModal("ccnw-slide-two","slide-next","next"),this.scanner.start()}}},8040:function(t,e,n){"use strict";n.r(e);var r,i=n(4218),o=n(3265);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}r=jQuery,WPHB_Admin.cloudflare={module:"cloudflare",init:function(){return wphb.cloudflare.is.connected&&r('input[type="submit"].cloudflare-clear-cache').on("click",function(t){t.preventDefault(),this.purgeCache.apply(r(t.target),[this])}.bind(this)),this.bindActions(),this},bindActions:function(){var t=this,e=document.getElementById("cloudflare-credentials");e&&e.addEventListener("submit",(function(e){e.preventDefault(),t.connect("cloudflare-connect-save")}));var n=document.getElementById("cf-recheck-zones");n&&n.addEventListener("click",(function(e){e.preventDefault(),t.recheck(e)}));var i=document.getElementById("cloudflare-zone-save");i&&i.addEventListener("click",(function(e){e.preventDefault(),t.connect("cloudflare-zone-save")}));var o=document.getElementById("cloudflare-show-key-help");o&&o.addEventListener("click",(function(e){e.preventDefault(),t.toggleHelp()}));var s=document.getElementById("cloudflare-connect-steps");s&&s.addEventListener("click",(function(e){e.preventDefault(),t.toggleHelp()})),r('input[name="cf_connection_type"]').on("change",(function(){t.hideHelp(),t.switchLabel()})),r("form#cloudflare-credentials input").on("keyup",(function(){var t=!0;r("form#cloudflare-credentials input").each((function(){""!==r(this).val()&&(t=!1)})),r("#cloudflare-connect-save").prop("disabled",t)}))},purgeCache:function(){this.attr("disabled",!0),i.Z.common.call("wphb_cloudflare_purge_cache").then((function(){WPHB_Admin.notices.show((0,o.K)("successCloudflarePurge"))})).catch((function(t){WPHB_Admin.notices.show(t.responseText,"error")})),this.removeAttr("disabled")},connect:function(t){var e=document.getElementById(t);e.classList.add("sui-button-onload-text");var n=document.getElementById("cf-token-tab").checked?"token":"key",r=document.getElementById("api-"+n+"-form-field");r.classList.remove("sui-form-field-error");var o=document.getElementById("error-api-"+n);o.innerHTML="",o.style.display="none";var a=document.getElementById("cloudflare-email").value,c=document.getElementById("cloudflare-api-key").value,u=document.getElementById("cloudflare-api-token").value,l=jQuery("#cloudflare-zones").find(":selected");i.Z.cloudflare.connect(a,c,u,l.text()).then((function(t){void 0!==t&&void 0!==t.zones?(WPHB_Admin.cloudflare.populateSelectWithZones(t.zones),window.SUI.slideModal("slide-cloudflare-zones","cloudflare-zone-recheck","next")):window.location.reload()})).catch((function(t){void 0!==t.response&&s(t.response.data)&&void 0!==t.response.data.code?400!==t.response.data.code&&403!==t.response.data.code||(r.classList.add("sui-form-field-error"),o.innerHTML=t.message,o.style.display="block"):WPHB_Admin.notices.show(t,"error")})).finally((function(){e.classList.remove("sui-button-onload-text")}))},populateSelectWithZones:function(t){var e=jQuery("#cloudflare-zones");e.SUIselect2("destroy"),t.forEach((function(t){if(0===e.find("option[value='"+t.value+"']").length){var n=new Option(t.label,t.value);e.append(n).trigger("change")}})),e.SUIselect2({minimumResultsForSearch:-1})},recheck:function(t){t.target.classList.add("sui-button-onload-text"),i.Z.common.call("wphb_cloudflare_recheck_zones").then((function(t){void 0!==t&&void 0!==t.zones?WPHB_Admin.cloudflare.populateSelectWithZones(t.zones):window.location.reload()})).catch((function(t){WPHB_Admin.notices.show(t,"error")})).finally((function(){t.target.classList.remove("sui-button-onload-text")}))},toggleHelp:function(){var t=document.getElementById("cf-token-tab").checked?"token":"key";document.getElementById("cloudflare-"+t+"-how-to").classList.toggle("sui-hidden");var e=document.getElementById("cloudflare-show-key-help").querySelector("span:last-of-type");e.classList.contains("sui-icon-chevron-down")?(e.classList.remove("sui-icon-chevron-down"),e.classList.add("sui-icon-chevron-up")):(e.classList.remove("sui-icon-chevron-up"),e.classList.add("sui-icon-chevron-down"))},hideHelp:function(){r("#cloudflare-key-how-to").addClass("sui-hidden"),r("#cloudflare-token-how-to").addClass("sui-hidden"),r("span.sui-icon-chevron-up").addClass("sui-icon-chevron-down").removeClass("sui-icon-chevron-up")},switchLabel:function(){var t=document.getElementById("cf-token-tab").checked?"token":"key";document.getElementById("cloudflare-email").value="",document.getElementById("cloudflare-api-key").value="",document.getElementById("cloudflare-api-token").value="",document.querySelector("#cloudflare-show-key-help > span:first-of-type").innerHTML=wphb.strings["CloudflareHelpAPI"+t]}}},3823:function(t,e,n){"use strict";n.r(e);var r,i=n(4218);r=jQuery,WPHB_Admin.dashboard={module:"dashboard",init:function(){r(".wphb-performance-report-item").on("click",(function(){var t=r(this).data("performance-url");t&&(location.href=t)}));var t=document.getElementById("clear-cache-modal-button");return t&&t.addEventListener("click",this.clearCache),this},clearCache:function(){var t=this;this.classList.toggle("sui-button-onload-text");for(var e=document.querySelectorAll('input[type="checkbox"]'),n=[],r=0;r<e.length;r++)!1!==e[r].checked&&n.push(e[r].dataset.module);i.Z.common.clearCaches(n).then((function(e){t.classList.toggle("sui-button-onload-text"),SUI.closeModal(),WPHB_Admin.notices.show(e.message)}))},hideUpgradeSummary:function(){window.SUI.closeModal(),i.Z.common.call("wphb_hide_upgrade_summary")}}},8060:function(t,e,n){"use strict";n.r(e);var r=n(4218),i=n(3265);n(8891);!function(t){var e={modules:[],init:function(){t(".sui-mobile-nav").on("change",(function(t){window.location.href=t.target.value})),t("select#wphb-performance-report-type").on("change",(function(t){var e=new URL(window.location);e.searchParams.set("type",t.target.value),window.location=e})),t(".wphb-logging-buttons").on("click",".wphb-logs-clear",(function(t){t.preventDefault(),r.Z.common.clearLogs(t.target.dataset.module).then((function(t){void 0!==t.success&&(t.success?e.notices.show(t.message):e.notices.show(t.message,"error"))}))})),t("#performance-run-test, #performance-scan-website").on("click",(function(){wphbMixPanel.track("plugin_scan_started",{score_mobile_previous:(0,i.K)("previousScoreMobile"),score_desktop_previous:(0,i.K)("previousScoreDesktop")})}))},initModule:function(t){return this.hasOwnProperty(t)?(this.modules[t]=this[t].init(),this.modules[t]):{}},getModule:function(t){return void 0!==this.modules[t]?this.modules[t]:this.initModule(t)}};e.notices={init:function(){var e=this,n=document.getElementById("dismiss-cf-notice");n&&(n.onclick=function(t){return e.dismissCloudflareNotice(t)});var i=document.getElementById("wphb-floating-http2-info");i&&i.addEventListener("click",(function(e){e.preventDefault(),r.Z.common.dismissNotice("http2-info"),t(".wphb-box-notice").slideUp()}))},show:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"success",n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];""===t&&(t=(0,i.K)("successUpdate"));var r={type:e,dismiss:{show:!1,label:(0,i.K)("dismissLabel"),tooltip:(0,i.K)("dismissLabel")},icon:"info"};n||(r.dismiss.show=!0),window.SUI.openNotice("wphb-ajax-update-notice","<p>"+t+"</p>",r)},dismiss:function(t){var e=t.closest(".sui-notice").getAttribute("id");r.Z.common.dismissNotice(e),window.SUI.closeNotice(e)},dismissCloudflareNotice:function(e){e.preventDefault(),r.Z.common.call("wphb_cf_notice_dismiss");var n=t(".cf-dash-notice");n.slideUp(),n.parent().addClass("no-background-image")}},window.WPHB_Admin=e}(jQuery)},8839:function(t,e,n){"use strict";n.r(e);var r=n(4218),i=n(3265),o=function(t,e,n,r){var o=t,s=e.toLowerCase(),a=!!n&&n.toLowerCase(),c=r.toLowerCase(),u=o.find(".wphb-minification-file-select input[type=checkbox]"),l=!1,p=!0;return{hide:function(){o.addClass("out-of-filter"),p=!1},show:function(){o.removeClass("out-of-filter"),p=!0},getElement:function(){return o},getId:function(){return o.attr("id")},getFilter:function(){return s},matchFilter:function(t){return""===t||(t=t.toLowerCase(),s.search(t)>-1)},matchSecondaryFilter:function(t){return""===t||!!a&&(t=t.toLowerCase(),a===t)},matchTypeFilter:function(t){return""===t||!c||("all"===t||c===t)},isVisible:function(){return p},isSelected:function(){return l},isType:function(t){return t===u.attr("data-type")},select:function(){l=!0,u.prop("checked",!0)},unSelect:function(){l=!1,u.prop("checked",!1)},change:function(t,e){var n=o.find(".toggle-"+t);if(t="position-footer"===t?"footer":t,void 0!==n&&!0!==n.prop("disabled")){var r=t.charAt(0).toUpperCase()+t.slice(1),s=(0,i.K)(e.toString()+r);n.prop("checked",e),n.toggleClass("changed"),n.closest(".wphb-border-row").find("span.wphb-row-status").removeClass("hidden"),n.next().attr("data-tooltip",s)}}}};function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}var a=function(){var t=[],e="",n="",r="";return{push:function(e){"object"===s(e)&&t.push(e)},getItems:function(){return t},getItem:function(e){return!!t[e]&&t[e]},getItemById:function(e,n){var r=!1;for(var i in t)if("wphb-file-"+e+"-"+n===t[i].getId()){r=t[i];break}return r},getItemsByDataType:function(e){var n=[];for(var r in t)t[r].isType(e)&&n.push(t[r]);return n},getVisibleItems:function(){var e=[];for(var n in t)t[n].isVisible()&&e.push(t[n]);return e},getSelectedItems:function(){var e=[];for(var n in t)t[n].isVisible()&&t[n].isSelected()&&e.push(t[n]);return e},addFilter:function(t,i){"type"===i?r=t:"secondary"===i?n=t:e=t},clearFilters:function(){e="",n="",r="",this.applyFilters()},applyFilters:function(){for(var i in t)t[i]&&(t[i].matchFilter(e)&&t[i].matchSecondaryFilter(n)&&t[i].matchTypeFilter(r)?t[i].show():t[i].hide())}}};function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=d(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},p.apply(this,arguments)}function d(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=m(t)););return t}function f(t,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},f(t,e)}function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=m(t);if(e){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return g(this,n)}}function g(t,e){if(e&&("object"===c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}var v,y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(a,t);var e,n,o,s=h(a);function a(){return u(this,a),s.apply(this,arguments)}return e=a,(n=[{key:"step",value:function(t){var e=this;p(m(a.prototype),"step",this).call(this,t),t>=0?r.Z.minification.checkStep(this.currentStep).then((function(){t-=1,e.updateProgressBar(e.getProgress()),e.step(t)})):r.Z.minification.finishCheck().then((function(t){e.onFinish(t)}))}},{key:"cancel",value:function(){p(m(a.prototype),"cancel",this).call(this),r.Z.minification.cancelScan().then((function(){window.location.href=(0,i.R)("minification")}))}},{key:"onStart",value:function(){return r.Z.minification.startCheck()}},{key:"onFinish",value:function(t){p(m(a.prototype),"onFinish",this).call(this),void 0!==t.assets_msg&&(document.getElementById("assetsFound").innerHTML=t.assets_msg),window.SUI.closeModal(),window.SUI.openModal("wphb-assets-modal","wpbody-content")}}])&&l(e.prototype,n),o&&l(e,o),Object.defineProperty(e,"prototype",{writable:!1}),a}(n(4814).Z),b=y;v=jQuery,WPHB_Admin.minification={module:"minification",$checkFilesResultsContainer:null,checkURLSList:null,checkedURLS:0,init:function(){var t=this;this.scanner=new b(wphb.minification.get.totalSteps,wphb.minification.get.currentScanStep),v("#check-files").on("click",(function(t){t.preventDefault(),v(document).trigger("check-files")})),v(document).on("check-files",(function(){window.SUI.openModal("check-files-modal","wpbody-content","check-files-modal"),v(this).attr("disabled",!0),t.scanner.start()})),v(':input.toggle-checkbox, :input[id*="wphb-minification-include"]').on("change",(function(){var t=v(this).closest(".wphb-border-row"),e=t.find("span.wphb-row-status-changed");v(this).toggleClass("changed"),0!==t.find(".changed").length?e.removeClass("sui-hidden"):e.addClass("sui-hidden"),0!==v(".wphb-minification-files").find("input.changed").length?v("#wphb-publish-changes").removeClass("disabled"):v("#wphb-publish-changes").addClass("disabled")})),v(":input.wphb-minification-file-selector, :input.wphb-minification-bulk-file-selector").on("change",(function(){v(this).toggleClass("changed");var t=v(".wphb-minification-files").find("input.changed");v(".sui-actions-left > #bulk-update").toggleClass("button-notice disabled",0===t.length)})),v("#bulk-update").on("click",(function(t){t.preventDefault();var e=v('input[data-type="CSS"].wphb-minification-file-selector:checked'),n=v('input[data-type="JS"].wphb-minification-file-selector:checked');v('#bulk-update-modal label[for="filter-inline"]').toggleClass("sui-hidden",0===e.length),v('#bulk-update-modal label[for="filter-defer"]').toggleClass("sui-hidden",0===n.length),v('#bulk-update-modal label[for="filter-async"]').toggleClass("sui-hidden",0===n.length),window.SUI.openModal("bulk-update-modal",this,"bulk-update-cancel",!0)})),v("#wphb-minification-filter-button").on("click",(function(){v(".wphb-minification-filter").toggle("slow"),v("#wphb-minification-filter-button").toggleClass("active")})),v(".wphb-discard").on("click",(function(t){return t.preventDefault(),confirm((0,i.K)("discardAlert"))&&location.reload(),!1})),v(".wphb-enqueued-files input").on("change",(function(){v(".wphb-discard").attr("disabled",!1)}));var e=v("input[type=checkbox][name=use_cdn]");e.on("change",(function(){v("#cdn_file_exclude").toggleClass("sui-hidden");var t=v(this).is(":checked");e.each((function(){this.checked=t})),r.Z.minification.toggleCDN(t).then((function(){WPHB_Admin.notices.show()}))})),v(".wphb-minification-advanced-group > :input.toggle-checkbox").on("change",(function(){var t,e=v("label[for='"+v(this).attr("id")+"']");v(this).hasClass("toggle-minify")&&(t=(0,i.K)(this.checked.toString()+"Minify"),e.attr("data-tooltip",t)),v(this).hasClass("toggle-combine")&&(t=(0,i.K)(this.checked.toString()+"Combine"),e.attr("data-tooltip",t)),v(this).hasClass("toggle-position-footer")&&(t=(0,i.K)(this.checked.toString()+"Footer"),e.attr("data-tooltip",t)),v(this).hasClass("toggle-inline")&&(t=(0,i.K)(this.checked.toString()+"Inline"),e.attr("data-tooltip",t)),v(this).hasClass("toggle-defer")&&(t=(0,i.K)(this.checked.toString()+"Defer"),e.attr("data-tooltip",t)),v(this).hasClass("toggle-font-optimize")&&(t=(0,i.K)(this.checked.toString()+"Font"),e.attr("data-tooltip",t)),v(this).hasClass("toggle-preload")&&(t=(0,i.K)(this.checked.toString()+"Preload"),e.attr("data-tooltip",t)),v(this).hasClass("toggle-async")&&(t=(0,i.K)(this.checked.toString()+"Async"),e.attr("data-tooltip",t))})),v(".wphb-minification-exclude > :input.toggle-checkbox").on("change",(function(){v(this).closest(".wphb-border-row").toggleClass("disabled");var t=v("label[for='"+v(this).attr("id")+"']");t.hasClass("fileIncluded")?(t.find("span").removeClass("sui-icon-eye-hide").addClass("sui-icon-eye"),t.attr("data-tooltip",(0,i.K)("includeFile")),t.removeClass("fileIncluded")):(t.find("span").removeClass("sui-icon-eye").addClass("sui-icon-eye-hide"),t.attr("data-tooltip",(0,i.K)("excludeFile")),t.addClass("fileIncluded"))})),v(".wphb-compressed .wphb-filename-extension").on("click",(function(){var t=v(this).closest(".wphb-border-row");t.find(".fileinfo-group").removeClass("wphb-compressed"),t.find(".wphb-row-status").removeClass("sui-hidden wphb-row-status-changed").addClass("wphb-row-status-queued sui-tooltip-constrained").attr("data-tooltip",(0,i.K)("queuedTooltip")).find("span").attr("class","sui-icon-loader sui-loading"),r.Z.minification.resetAsset(t.attr("data-filter"))})),v("input[type=checkbox][name=debug_log]").on("change",(function(){var t=v(this).is(":checked");r.Z.minification.toggleLog(t).then((function(){WPHB_Admin.notices.show(),t?v(".wphb-logging-box").show():v(".wphb-logging-box").hide()}))})),v("#wphb-minification-tools-form").on("submit",(function(t){t.preventDefault();var e=v(this).find(".spinner");e.addClass("visible"),r.Z.minification.saveCriticalCss(v(this).serialize()).then((function(t){e.removeClass("visible"),void 0!==t&&t.success?WPHB_Admin.notices.show(t.message):WPHB_Admin.notices.show(t.message,"error")}))}));var n=document.getElementById("file_path");null!==n&&(n.onchange=function(t){t.preventDefault(),r.Z.minification.updateAssetPath(v(this).val()).then((function(t){t.message?WPHB_Admin.notices.show(t.message,"error"):WPHB_Admin.notices.show()}))}),v("#wphb-network-ao").on("click",(function(){v("#wphb-network-border-frame").toggleClass("sui-hidden")})),v("#wphb-box-minification-network-settings").on("change","input[type=radio]",(function(t){var e=document.querySelectorAll("input[name="+t.target.name+"]");"log"===t.target.name&&v(".wphb-logs-frame").toggle(t.target.value);for(var n=0;n<e.length;++n)e[n].parentNode.classList.remove("active");t.target.parentNode.classList.add("active")})),v("#wphb-ao-network-settings").on("click",(function(t){t.preventDefault();var e=v(".sui-box-footer").find(".spinner");e.addClass("visible");var n=v("#ao-network-settings-form").serialize();r.Z.minification.saveNetworkSettings(n).then((function(t){e.removeClass("visible"),void 0!==t&&t.success?WPHB_Admin.notices.show():WPHB_Admin.notices.show((0,i.K)("errorSettingsUpdate"),"error")}))})),v("#wphb-ao-settings-update").on("click",(function(e){e.preventDefault();var n=v(".sui-box-footer").find(".spinner");n.addClass("visible");var i=t.getMultiSelectValues("cdn_exclude");r.Z.minification.updateExcludeList(JSON.stringify(i)).then((function(){n.removeClass("visible"),WPHB_Admin.notices.show()}))}));for(var o=document.querySelectorAll("[name=asset_optimization_mode]"),s="auto",a=0;a<o.length;a++)!0===o[a].checked&&(s=o[a].value),o[a].addEventListener("click",(function(){s!==this.value&&(document.getElementById("wphb-ao-"+s+"-label").classList.add("active"),document.getElementById("wphb-ao-"+this.value+"-label").classList.remove("active"),"manual"===s&&"auto"===this.value&&(!0===wphb.minification.get.showSwitchModal?window.SUI.openModal("wphb-basic-minification-modal","wphb-switch-to-basic"):WPHB_Admin.minification.switchView("basic")))}));var c=document.getElementById("manual-ao-hdiw-modal-expand");c&&(c.onclick=function(){document.getElementById("manual-ao-hdiw-modal").classList.remove("sui-modal-sm"),document.getElementById("manual-ao-hdiw-modal-header-wrap").classList.remove("sui-box-sticky"),document.getElementById("automatic-ao-hdiw-modal").classList.remove("sui-modal-sm")});var u=document.getElementById("manual-ao-hdiw-modal-collapse");u&&(u.onclick=function(){document.getElementById("manual-ao-hdiw-modal").classList.add("sui-modal-sm");var t=document.getElementById("manual-ao-hdiw-modal-header-wrap");t.classList.contains("video-playing")&&t.classList.add("sui-box-sticky"),document.getElementById("automatic-ao-hdiw-modal").classList.add("sui-modal-sm")});var l=document.getElementById("automatic-ao-hdiw-modal-expand");l&&(l.onclick=function(){document.getElementById("automatic-ao-hdiw-modal").classList.remove("sui-modal-sm"),document.getElementById("manual-ao-hdiw-modal").classList.remove("sui-modal-sm")});var p=document.getElementById("automatic-ao-hdiw-modal-collapse");p&&(p.onclick=function(){document.getElementById("automatic-ao-hdiw-modal").classList.add("sui-modal-sm"),document.getElementById("manual-ao-hdiw-modal").classList.add("sui-modal-sm")});var d=document.getElementById("hdw-auto-trigger-label");d&&d.addEventListener("click",(function(){window.SUI.replaceModal("automatic-ao-hdiw-modal-content","wphb-box-minification-summary-meta-box")}));var f=document.getElementById("hdw-manual-trigger-label");f&&f.addEventListener("click",(function(){window.SUI.replaceModal("manual-ao-hdiw-modal-content","wphb-box-minification-summary-meta-box")})),this.rowsCollection=new WPHB_Admin.minification.RowsCollection,v(".wphb-border-row").each((function(e,n){var r;r=v(n).data("filter-secondary")?new WPHB_Admin.minification.Row(v(n),v(n).data("filter"),v(n).data("filter-secondary"),v(n).data("filter-type")):new WPHB_Admin.minification.Row(v(n),v(n).data("filter"),!1,v(n).data("filter-type")),t.rowsCollection.push(r)}));var h=v("#wphb-s");h.on("keydown",(function(t){if(13===t.keyCode)return event.preventDefault(),!1})),h.on("keyup",(function(){t.rowsCollection.addFilter(v(this).val(),"primary"),t.rowsCollection.applyFilters()})),v("#wphb-secondary-filter").on("change",(function(){t.rowsCollection.addFilter(v(this).val(),"secondary"),t.rowsCollection.applyFilters()})),v('[name="asset_optimization_filter"]').on("change",(function(){t.rowsCollection.addFilter(v(this).val(),"type"),t.rowsCollection.applyFilters()}));var g=document.getElementById("wphb-clear-filters");g&&g.addEventListener("click",(function(e){e.preventDefault(),v("#wphb-filter-all").prop("checked",!0),v(".wphb-minification-filter .sui-tab-item").removeClass("active"),v("#wphb-filter-all-label").addClass("active"),v("#wphb-secondary-filter").val(null).trigger("change"),h.val(""),t.rowsCollection.clearFilters()})),v("input.wphb-minification-file-selector").on("click",(function(){var e=v(this),n=t.rowsCollection.getItemById(e.data("type"),e.data("handle"));n&&(e.is(":checked")?n.select():n.unSelect())})),v(".wphb-minification-bulk-file-selector").on("click",(function(){var e=v(this),n=t.rowsCollection.getItemsByDataType(e.attr("data-type"));for(var r in n)n.hasOwnProperty(r)&&(e.is(":checked")?n[r].select():n[r].unSelect())})),v("body").on("click",".wphb-border-row",(function(){window.innerWidth<783&&(v(this).find(".wphb-minification-row-details").toggle(),v(this).find(".fileinfo-group").toggleClass("opened"))}));var m=_.debounce((function(){window.innerWidth>=783?v(".wphb-minification-row-details").css("display","flex"):v(".wphb-minification-row-details").css("display","none")}),250);return window.addEventListener("resize",m),this},switchView:function(t){var e=!1,n=document.getElementById("hide-"+t+"-modal");n&&!0===n.checked&&(e=!0),r.Z.minification.toggleView(t,e).then((function(){window.location.href=(0,i.R)("minification")}))},goToSettings:function(){window.SUI.closeModal(),r.Z.minification.toggleCDN(v("input#enable_cdn").is(":checked")).then((function(){window.location.href=(0,i.R)("minification")}))},getMultiSelectValues:function(t){for(var e=v("#"+t).find(":selected"),n={scripts:[],styles:[]},r=0;r<e.length;++r)n[e[r].dataset.type].push(e[r].value);return n},skipUpgrade:function(){r.Z.common.call("wphb_ao_skip_upgrade").then((function(){window.location.href=(0,i.R)("minification")}))},doUpgrade:function(){r.Z.common.call("wphb_ao_do_upgrade").then((function(){window.location.href=(0,i.R)("minification")}))},processBulkUpdateSelections:function(){var t=this.rowsCollection.getSelectedItems();["minify","combine","position-footer","defer","inline","preload","async"].forEach((function(e){var n="#bulk-update-modal input#filter-"+e,r=v(n).prop("checked");for(var i in t)t.hasOwnProperty(i)&&t[i].change(e,r);v(n).prop("checked",!1)})),v("input[type=submit]").removeClass("disabled")},purgeOrphanedData:function(){var t=document.getElementById("count-ao-orphaned").innerHTML;r.Z.advanced.clearOrphanedBatch(t).then((function(){window.location.reload()}))}},WPHB_Admin.minification.Row=o,WPHB_Admin.minification.RowsCollection=a},153:function(t,e,n){"use strict";n.r(e);n(2414);var r,i=n(4218),o=n(3265);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(){a=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",c=r.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),s=new O(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return P()}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=k(s,n);if(a){if(a===d)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=p(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,s),o}function p(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var d={};function f(){}function h(){}function g(){}var m={};u(m,i,(function(){return this}));var _=Object.getPrototypeOf,v=_&&_(_(E([])));v&&v!==e&&n.call(v,i)&&(m=v);var y=g.prototype=f.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function r(i,o,a,c){var u=p(t[i],t,o);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==s(d)&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(d).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function k(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=p(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,d;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return h.prototype=g,u(y,"constructor",g),u(g,"constructor",h),h.displayName=u(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(w.prototype),u(w.prototype,o,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var s=new w(l(e,n,r,i),o);return t.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},b(y),u(y,c,"Generator"),u(y,i,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return s.type="throw",s.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(a&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function c(t,e,n,r,i,o,s){try{var a=t[o](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,i)}r=jQuery,WPHB_Admin.notifications={module:"notifications",exclude:[],edit:!1,settings:{view:"schedule",module:"",type:"",schedule:{frequency:7,time:"",weekDay:"",monthDay:"",threshold:0},recipients:[],performance:{device:"both",metrics:!0,audits:!0,fieldData:!0},uptime:{showPing:!0},database:{revisions:!0,drafts:!0,trash:!0,spam:!0,trashComment:!0,expiredTransients:!0,transients:!1}},moduleData:{},init:function(t){var e=this;return this.moduleData=t,r(".wphb-disable-notification").on("click",this.disable),r(".wphb-enable-notification").on("click",(function(t){return e.renderTemplate(t,"add")})),r(".wphb-configure-notification").on("click",(function(t){return e.renderTemplate(t,"edit")})),this.maybeOpenModal(),this},maybeOpenModal:function(){var t=window.location.hash;if(0!==t.length&&2===(t=(t=t.substring(1)).split("-")).length){var e=r('button.wphb-configure-notification[data-id="'+t[0]+'"][data-type="'+t[1]+'"]');0===e.length&&(e=r('.wphb-enable-notification[data-id="'+t[0]+'"][data-type="'+t[1]+'"]')),0!==e.length&&e.trigger("click")}},renderTemplate:function(t,e){t.preventDefault(),this.settings.module=t.currentTarget.dataset.id,this.settings.type=t.currentTarget.dataset.type;var n=t.currentTarget.dataset.view;if(this.settings.view="schedule","edit"===e&&"recipients"===n&&(this.settings.view=n),this.moduleData.hasOwnProperty(this.settings.type)){var i=this.moduleData[this.settings.type];i.hasOwnProperty(this.settings.module)&&((i=i[this.settings.module]).hasOwnProperty("schedule")&&(this.settings.schedule=i.schedule),i.hasOwnProperty("settings")&&(this.settings[this.settings.module]=i.settings),i.hasOwnProperty("recipients")&&(this.settings.recipients=i.recipients,this.exclude=i.recipients.reduce((function(t,e){return 0<e.id&&t.push(parseInt(e.id)),t}),[])))}this.loadUsers();var o=WPHB_Admin.notifications.template(e+"-notifications-content")(this.settings);o&&(r("#notification-modal").html(o),this.initSUI(),this.mapActions(),"edit"===e?(this.edit=!0,this.addSelections()):this.toggleUserNotice(),SUI.openModal("notification-modal",r(this)))},loadUsers:function(){var t=this,e=this;i.Z.notifications.getUsers(this.exclude).then((function(n){if(void 0!==n){var i=0;n.forEach((function(t){e.addToUsersList(t,0==i++)})),t.fixRecipientCSS(r("#modal-wp-user-list"))}})).catch((function(t){window.console.log(t)}))},processScheduleSettings:function(){if("uptime"===this.settings.module&&"notifications"===this.settings.type){var t=r("select#report-threshold");this.settings.schedule.threshold=t.val()}else{var e=r('input[name="report-frequency"]:checked');this.settings.schedule={frequency:e.val(),time:r("select#report-time").val(),weekDay:r("select#report-day").val(),monthDay:r("select#report-day-month").val(),threshold:""}}},processAdditionalSettings:function(){if("reports"===this.settings.type)if("performance"!==this.settings.module)if("uptime"!==this.settings.module){if("database"===this.settings.module){var t=r("input#revisions").is(":checked"),e=r("input#drafts").is(":checked"),n=r("input#trash").is(":checked"),i=r("input#spam").is(":checked"),o=r("input#trashComment").is(":checked"),s=r("input#expiredTransients").is(":checked"),a=r("input#transients").is(":checked");this.settings.database={revisions:t,drafts:e,trash:n,spam:i,trashComment:o,expiredTransients:s,transients:a}}}else{var c=r("input#show_ping").is(":checked");this.settings.uptime={showPing:c}}else{var u=r('input[name="report-type"]:checked').val(),l=r("input#metrics").is(":checked"),p=r("input#audits").is(":checked"),d=r("input#field-data").is(":checked");this.settings.performance={device:u,metrics:l,audits:p,fieldData:d}}},update:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=event.target;e.classList.add("sui-button-onload-text"),this.processScheduleSettings(),t&&this.processAdditionalSettings(),i.Z.notifications.enable(this.settings,this.edit).then((function(t){history.pushState("",document.title,window.location.pathname+window.location.search),window.location.search+="&status="+t.code})).catch((function(t){window.console.log(t)}))},activate:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.getModuleName();""!==e&&wphbMixPanel.enableFeature(e),this.update(t)},mapActions:function(){var t=this;this.initUserSelects(),this.toggleAddButton(),r("#add-recipient-button").on("click",(function(){t.handleAddButtonClick()})),r('input[name="report-frequency"]').on("change",this.handleFrequencySelect)},addSelections:function(){r("#report-time").val(this.settings.schedule.time).trigger("change"),7===this.settings.schedule.frequency&&r("#report-day").val(this.settings.schedule.weekDay).trigger("change"),30===this.settings.schedule.frequency&&r("#report-day-month").val(this.settings.schedule.monthDay).trigger("change"),r("#report-threshold").val(this.settings.schedule.threshold).trigger("change")},initSUI:function(){r(".sui-select").each((function(){var t=r(this);"icon"===t.data("theme")?SUI.select.initIcon(t):"color"===t.data("theme")?SUI.select.initColor(t):"search"===t.data("theme")?SUI.select.initSearch(t):SUI.select.init(t)})),SUI.modalDialog(),SUI.tabs(),SUI.notice(),r(".sui-side-tabs label.sui-tab-item input").each((function(){SUI.sideTabs(this)}))},handleFrequencySelect:function(){var t=r(this).val(),e=r(".schedule-box"),n=e.find('[data-type="week"]'),i=e.find('[data-type="month"]');n.toggleClass("sui-hidden","30"===t||"1"===t),i.toggleClass("sui-hidden","7"===t||"1"===t)},getModuleName:function(){var t="";return"performance"===this.settings.module&&"reports"===this.settings.type?t="Performance Reports":"uptime"===this.settings.module&&"reports"===this.settings.type?t="Uptime Reports":"uptime"===this.settings.module&&"notifications"===this.settings.type&&(t="Uptime Notifications"),t},disable:function(){event.preventDefault();var t=event.target.dataset.id,e=event.target.dataset.type;if(void 0!==t&&void 0!==e){var n=WPHB_Admin.notifications.getModuleName();""!==n&&wphbMixPanel.disableFeature(n),i.Z.notifications.disable(t,e).then((function(){window.location.search+="&status=disabled"})).catch((function(t){window.console.log(t)}))}},toggleAddButton:function(){var t=r('#notifications-invite-users-content input[id^="recipient-"]');t.on("keyup",(function(){var e=!1;t.each((function(){""===r(this).val()&&(e=!0)})),e?r("#add-recipient-button").attr("disabled","disabled"):r("#add-recipient-button").attr("disabled",!1)}))},handleAddButtonClick:function(){var t=this,e=event.target;e.classList.add("sui-button-onload-text");var n=r("input#recipient-name"),o=r("input#recipient-email"),s=r("#error-recipient-email");i.Z.notifications.getAvatar(o.val()).then((function(r){s.html(""),s.parents().removeClass("sui-form-field-error");var i={name:n.val(),email:o.val(),role:"",avatar:r,id:0};t.confirmSubscription(i).then((function(r){void 0!==r&&(i.is_pending=r.pending,i.is_subscribed=r.subscribed,i.is_can_resend_confirmation=r.canResend),t.addUser(i,"email"),n.val("").trigger("keyup"),o.val("").trigger("keyup"),e.classList.remove("sui-button-onload-text")}))})).catch((function(t){s.html(t),s.parents().addClass("sui-form-field-error"),e.classList.remove("sui-button-onload-text")}))},initUserSelects:function(){var t=r("#search-users"),e=this;t.SUIselect2({minimumInputLength:3,maximumSelectionLength:1,ajax:{url:ajaxurl,method:"POST",dataType:"json",delay:250,data:function(t){return{action:"wphb_pro_search_users",nonce:wphb.nonces.HBFetchNonce,query:t.term,exclude:e.exclude}},processResults:function(t){return{results:jQuery.map(t.data,(function(t,e){return{text:t.name,id:e,user:{name:t.name,email:t.email,role:t.role,avatar:t.avatar,id:t.id}}}))}}}}),t.on("select2:select",(function(n){e.add(n.params.data.user),t.val(null).trigger("change")}))},confirmSubscription:function(t){var e,n=this;return(e=a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("uptime"===n.settings.module&&"notifications"===n.settings.type){e.next=2;break}return e.abrupt("return");case 2:return e.abrupt("return",i.Z.notifications.sendConfirmationEmail(t.name,t.email));case 3:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(t){c(o,r,i,s,a,"next",t)}function a(t){c(o,r,i,s,a,"throw",t)}s(void 0)}))})()},resendInvite:function(t,e){var n=r(this);n.attr("disabled","disabled"),i.Z.notifications.resendConfirmationEmail(t,e).then((function(t){var e=r(".notifications-resend-notice");e.find("p").html(t.message),e.removeClass("sui-hidden"),n.attr("disabled",!1)}))},addUser:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"user",n=this.settings.recipients.findIndex((function(e){return t.email===e.email}));if(n>-1)this.toggleUserNotice(!0);else{var i=r("#modal-"+e+"-recipients-list"),s=(0,o.K)("removeRecipient"),a=""===t.role?t.email:t.role,c="";void 0!==t.is_pending&&(c=t.is_pending||void 0===t.is_subscribed||t.is_subscribed?t.is_pending?"pending":"confirmed":"unsubscribed");var u='<img src="'.concat(t.avatar,'" alt="').concat(t.email,'">'),l="";if("pending"===c||"unsubscribed"===c){var p=(0,o.K)("awaitingConfirmation"),d=(0,o.K)("resendInvite");u='<span class="sui-tooltip" data-tooltip="'.concat(p,'">').concat(u,"</span>"),l='<button type="button" class="resend-invite sui-button-icon sui-tooltip" data-tooltip="'.concat(d,'"\n\t\t\t\t\tonclick="WPHB_Admin.notifications.resendInvite( \'').concat(t.name,"', '").concat(t.email,'\' )">\n\t\t\t\t\t<span class="sui-icon-send" aria-hidden="true"></span>\n\t\t\t\t</button>')}var f='\n\t\t\t\t<div class="sui-recipient" data-id="'.concat(t.id,'" data-email="').concat(t.email,'">\n\t\t\t\t\t<span class="sui-recipient-name">\n\t\t\t\t\t\t<span class="subscriber ').concat(c,'">').concat(u,'</span>\n\t\t\t\t\t\t<span class="wphb-recipient-name">').concat(t.name,'</span>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span class="sui-recipient-email">').concat(a,"</span>\n\t\t\t\t\t").concat(l,'\n\t\t\t\t\t<button type="button" class="sui-button-icon sui-tooltip" data-tooltip="').concat(s,'"\n\t\t\t\t\t\tonclick="WPHB_Admin.notifications.removeUser( ').concat(t.id,", '").concat(t.email,"', '").concat(e,'\' )">\n\t\t\t\t\t\t<span class="sui-icon-trash" aria-hidden="true"></span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t');i.append(f),this.settings.recipients.push(t),"user"===e&&this.exclude.push(t.id),this.toggleRecipientList(i)}},addToUsersList:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=r("#modal-wp-user-list"),i=e?"sui-tooltip-bottom-right":"sui-tooltip-top-right",s='\n\t\t\t\t<div class="sui-recipient" data-id="'.concat(t.id,'" data-email="').concat(t.email,'">\n\t\t\t\t\t<span class="sui-recipient-name">\n\t\t\t\t\t\t<span class="subscriber">\n\t\t\t\t\t\t\t<img src="').concat(t.avatar,'" alt="').concat(t.email,'">\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class="wphb-recipient-name">').concat(t.name,'</span>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span class="sui-recipient-email">').concat(t.role,'</span>\n\t\t\t\t\t<button type="button" class="sui-button-icon sui-tooltip ').concat(i,'"\n\t\t\t\t\t\tdata-tooltip="').concat((0,o.K)("addRecipient"),"\"\n\t\t\t\t\t\tonclick='WPHB_Admin.notifications.add( ").concat(JSON.stringify(t),' )\'>\n\t\t\t\t\t\t<span class="sui-icon-plus" aria-hidden="true"></span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t');n.append(s),this.toggleRecipientList(n)},removeUser:function(t,e){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"user",o=r("#modal-"+i+"-recipients-list"),s='.sui-recipient[data-email="'+e+'"]',a=o.find(s);a.remove(),"user"===i&&((n=this.exclude.indexOf(t))>-1&&this.exclude.splice(n,1),this.returnToList(a)),(n=this.settings.recipients.findIndex((function(n){return t===parseInt(n.id)&&e===n.email})))>-1&&this.settings.recipients.splice(n,1),this.toggleRecipientList(o)},add:function(t){var e=this;this.confirmSubscription(t).then((function(n){void 0!==n&&(t.is_pending=n.pending,t.is_subscribed=n.subscribed,t.is_can_resend_confirmation=n.canResend),e.addUser(t);var i=r("#modal-wp-user-list"),o='.sui-recipient[data-email="'+t.email+'"]';i.find(o).remove(),e.fixRecipientCSS(i),e.toggleRecipientList(i,!1)}))},returnToList:function(t){var e=r("#modal-wp-user-list"),n={id:t.data("id"),name:t.find(".wphb-recipient-name").text(),email:t.data("email"),role:t.find(".sui-recipient-email").text(),avatar:t.find("img").attr("src")},i="WPHB_Admin.notifications.add("+JSON.stringify(n)+")";t.find(".resend-invite").remove(),t.find(".sui-icon-trash").removeClass("sui-icon-trash").addClass("sui-icon-plus"),t.find("button").attr("onclick",i).attr("data-tooltip",(0,o.K)("addRecipient")).addClass("sui-tooltip-top-right"),e.append(t),this.fixRecipientCSS(e),this.toggleRecipientList(e,!1)},fixRecipientCSS:function(t){var e=t.children().length>1?"hidden":"unset";t.css("overflow-x",e),t.find(".sui-recipient:first-of-type .sui-tooltip").removeClass("sui-tooltip-top-right").addClass("sui-tooltip-bottom-right")},toggleRecipientList:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=0===t.html().trim().length;t.parent("div").toggleClass("sui-hidden",n).toggleClass("sui-margin-top",!n),e&&this.toggleUserNotice()},toggleUserNotice:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=r(".notifications-recipients-notice"),n=r("#notification-modal .sui-button.sui-button-blue"),i=r(".notification-next-buttons"),s=(0,o.K)("noRecipients");t?s=(0,o.K)("recipientExists"):this.edit&&(s=(0,o.K)("noRecipientDisable")),e.find("p").html(s),t?(e.removeClass("sui-hidden"),setTimeout((function(){return e.addClass("sui-hidden")}),3e3)):0===this.settings.recipients.length?(this.edit||(n.attr("disabled","disabled"),i.attr("disabled","disabled")),e.removeClass("sui-hidden")):(n.attr("disabled",!1),i.attr("disabled",!1),e.addClass("sui-hidden"))}},WPHB_Admin.notifications.template=_.memoize((function(t){var e,n={evaluate:/<#([\s\S]+?)#>/g,interpolate:/{{{([\s\S]+?)}}}/g,escape:/{{([^}]+?)}}(?!})/g,variable:"data"};return function(i){return _.templateSettings=n,(e=e||_.template(r("#"+t).html()))(i)}}))},1082:function(t,e,n){"use strict";n.r(e);var r=n(4218),i=n(4814),o=n(3265);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(){return u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=l(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},u.apply(this,arguments)}function l(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h(t);if(e){var i=h(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function f(t,e){if(e&&("object"===s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}var g,m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(l,t);var e,n,i,s=d(l);function l(){return a(this,l),s.apply(this,arguments)}return e=l,(n=[{key:"step",value:function(t){var e=this;u(h(l.prototype),"step",this).call(this,t),this.currentStep++,this.updateProgressBar(this.getProgress()),r.Z.common.call("wphb_performance_run_test").then((function(t){t.finished?e.onFinish(t):window.setTimeout((function(){e.step(e.totalSteps-e.currentStep)}),3e3)}))}},{key:"updateProgressBar",value:function(t){var e=this;0===t&&(this.currentStep=2,this.timer=window.setInterval((function(){e.currentStep+=1,e.updateProgressBar(e.getProgress())}),100));var n=document.querySelector(".wphb-performance-scan-modal .sui-progress-state .sui-progress-state-text");if(3===t&&(n.innerHTML=(0,o.K)("scanRunning")),73===t&&(clearInterval(this.timer),this.timer=!1,this.timer=window.setInterval((function(){e.currentStep+=1,e.updateProgressBar(e.getProgress())}),1e3),n.innerHTML=(0,o.K)("scanAnalyzing")),99===t&&(n.innerHTML=(0,o.K)("scanWaiting"),clearInterval(this.timer),this.timer=!1),document.querySelector(".wphb-performance-scan-modal .sui-progress-block .sui-progress-text span").innerHTML=t+"%",document.querySelector(".wphb-performance-scan-modal .sui-progress-block .sui-progress-bar span").style.width=t+"%",100===t){var r=document.querySelector(".wphb-performance-scan-modal .sui-progress-block span.sui-icon-loader");r.classList.remove("sui-icon-loader","sui-loading"),r.classList.add("sui-icon-check"),n.innerHTML=(0,o.K)("scanComplete"),clearInterval(this.timer),this.timer=!1}}},{key:"onStart",value:function(){return Promise.resolve()}},{key:"onFinish",value:function(t){u(h(l.prototype),"onFinish",this).call(this),window.wphbMixPanel.track("plugin_scan_finished",{score_mobile:t.mobileScore,score_desktop:t.desktopScore}),window.setTimeout((function(){window.location=(0,o.R)("audits")}),2e3)}}])&&c(e.prototype,n),i&&c(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}(i.Z),_=m;function v(t){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(t)}function y(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return b(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}g=jQuery,WPHB_Admin.performance={module:"performance",iteration:0,progress:0,pressedKeys:[],key_timer:!1,init:function(){var t=this,e=this;this.wphbSetInterval(),document.onkeyup=function(t){clearInterval(e.key_timer),e.wphbSetInterval(),t=t||event,e.pressedKeys.push(t.keyCode);var n=e.pressedKeys.length;n>=2&&66===e.pressedKeys[n-1]&&72===e.pressedKeys[n-2]&&(document.getElementById("wphb-error-details").style.display="block")},this.scanner=new _(100,0),g("#run-performance-test").on("click",(function(t){t.preventDefault(),e.startPerformanceScan()}));var n=window.location.hash;if(n){var i=g(n);i.length&&!i.hasClass("sui-box")&&(i.find(".sui-accordion-open-indicator").trigger("click"),g("html, body").animate({scrollTop:i.offset().top},1e3))}return g("body").on("submit",".settings-frm",(function(t){t.preventDefault();var e=g(this).serialize();return r.Z.performance.savePerformanceTestSettings(e).then((function(){return WPHB_Admin.notices.show()})),!1})),"undefined"!=typeof google&&"undefined"!=typeof wphbHistoricFieldData&&(google.charts.load("current",{packages:["corechart","bar"]}),google.charts.setOnLoadCallback((function(){t.drawChart(wphbHistoricFieldData.fcp,"first_contentful_paint"),g(window).resize((function(){return t.drawChart(wphbHistoricFieldData.fcp,"first_contentful_paint")}))})),google.charts.setOnLoadCallback((function(){t.drawChart(wphbHistoricFieldData.fid,"first_input_delay"),g(window).resize((function(){return t.drawChart(wphbHistoricFieldData.fid,"first_input_delay")}))}))),g("input[name=subsite-tests]").on("change",(function(t){var e="subsite_tests-false"===t.target.id?"subsite_tests-true":"subsite_tests-false";t.target.parentNode.classList.add("active"),document.getElementById(e).parentNode.classList.remove("active")})),g("input[name=report-type]").on("change",(function(t){for(var e=document.querySelectorAll("input[name=report-type]"),n=0;n<e.length;++n)e[n].parentNode.classList.remove("active");t.target.parentNode.classList.add("active")})),g("g.metric").on({mouseenter:function(){g(".wphb-gauge__wrapper").addClass("state--highlight"),g(this).addClass("metric--highlight")},mouseleave:function(){g(".wphb-gauge__wrapper").removeClass("state--highlight"),g(this).removeClass("metric--highlight")}}),g("#wphb-audits-filter-button").on("click",(function(t){t.preventDefault(),g(".wphb-audits-filter").toggle("slow"),g(this).toggleClass("active").blur()})),g('input[name="audits_filter"]').on("change",(function(){for(var t=g(".sui-accordion-item"),e=0,n=Object.entries(t);e<n.length;e++){var r=y(n[e],2),i=r[0],o=r[1];"object"===v(o)&&"prevObject"!==i&&(o.classList.remove("sui-hidden"),"all"===this.value||o.dataset.metrics.includes(this.value)||o.classList.add("sui-hidden"))}})),this},startPerformanceScan:function(){window.SUI.openModal("run-performance-test-modal","wpbody-content"),g(this).attr("disabled",!0),this.scanner.start()},wphbSetInterval:function(){var t=this;this.key_timer=window.setInterval((function(){t.pressedKeys=[]}),1e3)},drawChart:function(t,e){var n=google.visualization.arrayToDataTable([["Type","Fast",{type:"string",role:"tooltip",p:{html:!0}},"Average",{type:"string",role:"tooltip",p:{html:!0}},"Slow",{type:"string",role:"tooltip",p:{html:!0}}],["",t.fast,this.generateTooltip("fast",t.fast_desc),t.average,this.generateTooltip("average",t.average_desc),t.slow,this.generateTooltip("slow",t.slow_desc)]]);new google.visualization.BarChart(document.getElementById(e)).draw(n,{tooltip:{isHtml:!0},colors:["#1ABC9C","#FECF2F","#FF6D6D"],chartArea:{width:"100%"},hAxis:{baselineColor:"#fff",gridlines:{color:"#fff",count:0},textPosition:"none"},isStacked:"percent",height:80,legend:"none"})},generateTooltip:function(t,e){return'<div class="wphb-field-data-tooltip wphb-tooltip-'+t+'">'+e+"</div>"}}},2969:function(t,e,n){"use strict";n.r(e);var r,i=n(4218),o=n(3265);r=jQuery,WPHB_Admin.settings={module:"settings",init:function(){var t=r("body"),e=t.find(".wrap-wphb-settings");return r(".sui-box-footer").on("click","button.sui-button-blue",(function(n){n.preventDefault();var o=t.find(".settings-frm").serialize(),s=r("#color_accessible");s.length&&(s.is(":checked")?e.addClass("sui-color-accessible"):e.removeClass("sui-color-accessible"));var a=document.getElementById("tracking");return a&&!0===a.checked&&wphbMixPanel.optIn(),i.Z.settings.saveSettings(o).then((function(){WPHB_Admin.notices.show()})),!1})),r("input[name=remove_settings]").on("change",(function(t){var e="remove_settings-false"===t.target.id?"remove_settings-true":"remove_settings-false";t.target.parentNode.classList.add("active"),document.getElementById(e).parentNode.classList.remove("active")})),r("input[name=remove_data]").on("change",(function(t){var e="remove_data-false"===t.target.id?"remove_data-true":"remove_data-false";t.target.parentNode.classList.add("active"),document.getElementById(e).parentNode.classList.remove("active")})),r("#wphb-import-file-input").on("change",(function(){var t=r(this)[0];if(t.files.length){var e=t.files[0];r("#wphb-import-file-name").text(e.name),r("#wphb-import-upload-wrap").addClass("sui-has_file"),r("#wphb-import-btn").removeAttr("disabled")}else r("#wphb-import-file-name").text(""),r("#wphb-import-upload-wrap").removeClass("sui-has_file"),r("#wphb-import-btn").attr("disabled","disabled")})),r("#wphb-import-remove-file").on("click",(function(){r("#wphb-import-file-input").val("").trigger("change")})),r("#wphb-begin-import-btn").on("click",(function(t){t.preventDefault(),r(this).attr("disabled","disabled").addClass("sui-button-onload-text");var e=r("#wphb-import-remove-file");e.attr("disabled","disabled");var n=r("#wphb-import-file-input")[0];if(0===n.files.length)return!1;var o=new FormData;o.append("settings_json_file",n.files[0],n.files[0].name),i.Z.settings.importSettings(o).then((function(t){WPHB_Admin.notices.show(t.message),e.trigger("click")})).catch((function(t){WPHB_Admin.notices.show(t,"error")})).finally((function(){r("#wphb-begin-import-btn").removeAttr("disabled").removeClass("sui-button-onload-text"),e.removeAttr("disabled"),window.SUI.closeModal()}))})),r("#wphb-export-btn").on("click",(function(t){t.preventDefault(),i.Z.settings.exportSettings()})),r('input[id="control"]').on("change",(function(){r(".cache-control-options").toggle()})),this},confirmReset:function(){i.Z.common.call("wphb_reset_settings").then((function(){i.Z.common.call("wphb_redis_disconnect"),window.location.href=(0,o.R)("resetSettings")}))}}},2790:function(t,e,n){"use strict";n.r(e);var r,i=n(3265);r=jQuery,WPHB_Admin.uptime={module:"uptime",$dataRangeSelector:null,chartData:null,downtimeChartData:null,timer:null,$spinner:null,dataRange:null,dateFormat:"MMM d",init:function(){var t=this;this.$spinner=r(".spinner"),this.$dataRangeSelector=r("#wphb-uptime-data-range"),this.chartData=r("#uptime-chart-json").val(),this.downtimeChartData=r("#downtime-chart-json").val(),this.$disableUptime=r("#wphb-disable-uptime"),this.dataRange=this.getUrlParameter("data-range"),this.$dataRangeSelector.on("change",(function(){window.location.href=r(this).find(":selected").data("url")}));var e=this;"undefined"!=typeof google&&google.charts.load("current",{packages:["corechart","timeline"]}),this.$disableUptime.on("click",(function(t){t.preventDefault(),e.$spinner.css("visibility","visible"),r(this).is(":checked")&&e.timer?(clearTimeout(e.timer),e.$spinner.css("visibility","hidden")):e.timer=setTimeout((function(){location.href=(0,i.R)("disableUptime")}),3e3)})),void 0!==this.dataRange&&r(".wrap-wphb-uptime .wphb-tab a").each((function(){this.href+="&data-range="+e.dataRange})),"day"===this.dataRange&&(this.dateFormat="h:mma"),null!==document.getElementById("uptime-chart")&&google.charts.setOnLoadCallback((function(){return t.drawResponseTimeChart()})),null!==document.getElementById("downtime-chart")&&google.charts.setOnLoadCallback((function(){return t.drawDowntimeChart()})),r("#uptime-re-check-status").on("click",(function(t){t.preventDefault(),location.reload()}))},drawResponseTimeChart:function(){var t=new google.visualization.DataTable;t.addColumn("datetime","Day"),t.addColumn("number","Response Time (ms)"),t.addColumn({type:"string",role:"tooltip",p:{html:!0}});for(var e=JSON.parse(this.chartData),n=0;n<e.length;n++)e[n][0]=new Date(e[n][0]),e[n][1]=Math.round(e[n][1]),e[n][2]=this.createUptimeTooltip(e[n][0],e[n][1]),0===Math.round(e[n][1])&&(e[n][1]=-100);t.addRows(e);var i={chartArea:{left:80,top:20,width:"90%",height:"90%"},colors:["#24ADE5"],curveType:"function",legend:{position:"none"},vAxis:{format:"#### ms",gridlines:{count:5},minorGridlines:{count:0},viewWindow:{min:0}},hAxis:{format:this.dateFormat,minorGridlines:{count:0}},tooltip:{isHtml:!0},series:{0:{axis:"Resp"}},axes:{y:{Resp:{label:"Response Time (ms)"}}}},o=new google.visualization.AreaChart(document.getElementById("uptime-chart"));o.draw(t,i),r(window).resize((function(){o.draw(t,i)}))},drawDowntimeChart:function(){var t=document.getElementById("downtime-chart"),e=new google.visualization.Timeline(t),n=new google.visualization.DataTable;n.addColumn({type:"string"}),n.addColumn({type:"string",id:"Status"}),n.addColumn({type:"string",role:"tooltip",p:{html:!0}}),n.addColumn({type:"datetime",id:"Start Period"}),n.addColumn({type:"datetime",id:"End Period"});for(var i=JSON.parse(this.downtimeChartData),o=0;o<i.length;o++)i[o][3]=new Date(i[o][3]),i[o][4]=new Date(i[o][4]);n.addRows(i);for(var s=[],a={Down:"#FF6D6D",Unknown:"#F8F8F8",Up:"#D1F1EA"},c=0;c<n.getNumberOfRows();c++)s.push(a[n.getValue(c,1)]);var u={timeline:{showBarLabels:!1,showRowLabels:!1,barLabelStyle:{fontSize:33},avoidOverlappingGridLines:!1},hAxis:{format:this.dateFormat},colors:s,height:170},l=[];google.visualization.events.addListener(e,"ready",(function(){var e=t.getElementsByTagName("rect");Array.prototype.forEach.call(e,(function(t){parseFloat(t.getAttribute("x"))>0&&l.push(t.getAttribute("fill"))}))})),google.visualization.events.addListener(e,"onmouseover",(function(e){var n=t.getElementsByTagName("rect");n[n.length-1].setAttribute("fill",l[e.row]);var r=n[n.length-1].getAttribute("width");r>3&&n[n.length-1].setAttribute("width",r-1+"px")})),e.draw(n,u),r(window).resize((function(){e.draw(n,u)}))},createUptimeTooltip:function(t,e){return'<span class="response-time-tooltip">'+e+'ms</span><span class="uptime-date-tooltip">'+this.formatTooltipDate(t)+"</span>"},formatTooltipDate:function(t){var e=t.getDate(),n=t.getMonth(),r=t.getHours(),i=r,o=(t.getMinutes()<10?"0":"")+t.getMinutes(),s="AM";return i>=12&&(i=r-12,s="PM"),0===i&&(i=12),["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][n]+" "+e+" @ "+i+":"+o+s},getUrlParameter:function(t){var e,n,r=decodeURIComponent(window.location.search.substring(1)).split("&");for(n=0;n<r.length;n++)if((e=r[n].split("="))[0]===t)return void 0===e[1]||e[1]}}},4218:function(t,e,n){"use strict";var r=n(8583),i=n.n(r);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}var s=new function(){var t=ajaxurl,e=wphb.nonces.HBFetchNonce,r="wphb_";function o(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"GET",s={url:t,method:o,cache:!1};i instanceof FormData?(i.append("nonce",e),i.append("action",r),s.contentType=!1,s.processData=!1):(i.nonce=e,i.action=r),s.data=i;var c=n(2702).Promise;return new c((function(t,e){jQuery.ajax(s).done(t).fail(e)})).then((function(t){return a(t)}))}var s={caching:{saveSettings:function(t,e){return o(r+t+"_save_settings",{data:e},"POST").then((function(t){return t}))},clearCache:function(t){return o("wphb_clear_module_cache",{module:t},"POST").then((function(t){return t}))},clearCacheForPost:function(t){return o("wphb_gutenberg_clear_post_cache",{postId:t},"POST")},redisSaveSettings:function(t,e,n,r){return o("wphb_redis_save_settings",{host:t,port:e,password:n,db:r},"POST")},redisObjectCache:function(t){return o("wphb_redis_toggle_object_cache",{value:t},"POST")},clearCacheBatch:function(t,e){return o("wphb_clear_network_cache",{sites:t,offset:e},"POST")}},cloudflare:{connect:function(t,e,n,r){return o("wphb_cloudflare_connect",{email:t,key:e,token:n,zone:r},"POST").then((function(t){return t}))}},minification:{toggleCDN:function(t){return o("wphb_minification_toggle_cdn",{value:t},"POST")},toggleLog:function(t){return o("wphb_minification_toggle_log",{value:t},"POST")},toggleView:function(t,e){return o("wphb_minification_toggle_view",{value:t,hide:e},"POST")},startCheck:function(){return o("wphb_minification_start_check",{},"POST")},checkStep:function(t){return o("wphb_minification_check_step",{step:t},"POST").then((function(t){return t}))},finishCheck:function(){return o("wphb_minification_finish_scan",{},"POST").then((function(t){return t}))},cancelScan:function(){return o("wphb_minification_cancel_scan",{},"POST")},saveCriticalCss:function(t){return o("wphb_minification_save_critical_css",{form:t},"POST").then((function(t){return t}))},updateAssetPath:function(t){return o("wphb_minification_update_asset_path",{value:t},"POST")},resetAsset:function(t){return o("wphb_minification_reset_asset",{value:t},"POST")},saveNetworkSettings:function(t){return o("wphb_minification_update_network_settings",{settings:t},"POST")},updateExcludeList:function(t){return o("wphb_minification_save_exclude_list",{data:t},"POST")}},performance:{savePerformanceTestSettings:function(t){return o("wphb_performance_save_settings",{data:t},"POST")}},advanced:{saveSettings:function(t,e){return o("wphb_advanced_save_settings",{data:t,form:e},"POST").then((function(t){return t}))},deleteSelectedData:function(t){return o("wphb_advanced_db_delete_data",{data:t},"POST").then((function(t){return t}))},clearOrphanedBatch:function(t){return o("wphb_advanced_purge_orphaned",{rows:t},"POST")}},settings:{saveSettings:function(t){return o("wphb_admin_settings_save_settings",{form_data:t},"POST").then((function(t){return t}))},importSettings:function(t){return o("wphb_admin_settings_import_settings",t,"POST").then((function(t){return t}))},exportSettings:function(){window.location=t+"?action=wphb_admin_settings_export_settings&nonce="+e}},common:{dismissNotice:function(t){return o("wphb_notice_dismiss",{id:t},"POST")},clearLogs:function(t){return o("wphb_logger_clear",{module:t},"POST").then((function(t){return t}))},call:function(t){return o(t,{},"POST").then((function(t){return t}))},clearCaches:function(t){return o("wphb_clear_caches",{modules:t},"POST").then((function(t){return t}))}},notifications:{resendConfirmationEmail:function(t,e){return o("wphb_pro_resend_confirmation",{name:t,email:e},"POST").then((function(t){return t}))},sendConfirmationEmail:function(t,e){return o("wphb_pro_send_confirmation",{name:t,email:e},"POST").then((function(t){return t}))},disable:function(t,e){return o("wphb_pro_disable_notification",{id:t,type:e},"POST")},enable:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n="wphb_pro_enable_notification";return o(n,{settings:t,update:e},"POST").then((function(t){return t}))},getAvatar:function(t){return o("wphb_pro_get_avatar",{email:t},"POST").then((function(t){return t}))},getUsers:function(t){return o("wphb_pro_search_users",{exclude:t},"POST").then((function(t){return t}))}}};i()(this,s)};function a(t){if("object"!==o(t)&&(t=JSON.parse(t)),t.success)return t.data;var e=t.data||{},n=new Error(e.message||"Error trying to fetch response from server");throw n.response=t,n}e.Z=s},3265:function(t,e,n){"use strict";n.d(e,{K:function(){return r},R:function(){return i}});var r=function(t){return wphb.strings[t]||""},i=function(t){return wphb.links[t]||""}},4814:function(t,e){"use strict";function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.totalSteps=parseInt(e),this.currentStep=parseInt(n),this.cancelling=!1}var e,r,i;return e=t,r=[{key:"start",value:function(){var t=this;this.updateProgressBar(this.getProgress());var e=this.totalSteps-this.currentStep;0!==this.currentStep?this.step(e):this.onStart().then((function(){t.step(e)}))}},{key:"cancel",value:function(){this.cancelling=!0,this.updateProgressBar(0,!0)}},{key:"getProgress",value:function(){if(this.cancelling)return 0;var t=this.totalSteps-this.currentStep;return Math.min(Math.round(100*parseInt(this.totalSteps-t)/this.totalSteps),99)}},{key:"updateProgressBar",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t>100&&(t=100),document.querySelector(".sui-progress-block .sui-progress-text span").innerHTML=t+"%",document.querySelector(".sui-progress-block .sui-progress-bar span").style.width=t+"%",t>=90&&(document.querySelector(".sui-progress-state .sui-progress-state-text").innerHTML="Finalizing..."),e&&(document.querySelector(".sui-progress-state .sui-progress-state-text").innerHTML="Cancelling...")}},{key:"step",value:function(t){t>=0&&(this.currentStep=this.totalSteps-t)}},{key:"onStart",value:function(){throw new Error("onStart() must be implemented in child class")}},{key:"onFinish",value:function(){this.updateProgressBar(100)}}],r&&n(e.prototype,r),i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.Z=r},9256:function(t,e,n){var r=n(8719);t.exports=r},1457:function(t,e,n){n(4553);var r=n(2649);t.exports=r("Array","findIndex")},2414:function(t,e,n){n(9956)},9956:function(t,e,n){var r=n(9256);t.exports=r},9662:function(t,e,n){var r=n(614),i=n(6330),o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not a function")}},1223:function(t,e,n){var r=n(5112),i=n(30),o=n(3070).f,s=r("unscopables"),a=Array.prototype;null==a[s]&&o(a,s,{configurable:!0,value:i(null)}),t.exports=function(t){a[s][t]=!0}},9670:function(t,e,n){var r=n(111),i=String,o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not an object")}},1318:function(t,e,n){var r=n(5656),i=n(1400),o=n(6244),s=function(t){return function(e,n,s){var a,c=r(e),u=o(c),l=i(s,u);if(t&&n!=n){for(;u>l;)if((a=c[l++])!=a)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},2092:function(t,e,n){var r=n(9974),i=n(1702),o=n(8361),s=n(7908),a=n(6244),c=n(5417),u=i([].push),l=function(t){var e=1==t,n=2==t,i=3==t,l=4==t,p=6==t,d=7==t,f=5==t||p;return function(h,g,m,_){for(var v,y,b=s(h),w=o(b),k=r(g,m),S=a(w),x=0,O=_||c,E=e?O(h,S):n||d?O(h,0):void 0;S>x;x++)if((f||x in w)&&(y=k(v=w[x],x,b),t))if(e)E[x]=y;else if(y)switch(t){case 3:return!0;case 5:return v;case 6:return x;case 2:u(E,v)}else switch(t){case 4:return!1;case 7:u(E,v)}return p?-1:i||l?l:E}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},7475:function(t,e,n){var r=n(3157),i=n(4411),o=n(111),s=n(5112)("species"),a=Array;t.exports=function(t){var e;return r(t)&&(e=t.constructor,(i(e)&&(e===a||r(e.prototype))||o(e)&&null===(e=e[s]))&&(e=void 0)),void 0===e?a:e}},5417:function(t,e,n){var r=n(7475);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},4326:function(t,e,n){var r=n(1702),i=r({}.toString),o=r("".slice);t.exports=function(t){return o(i(t),8,-1)}},648:function(t,e,n){var r=n(1694),i=n(614),o=n(4326),s=n(5112)("toStringTag"),a=Object,c="Arguments"==o(function(){return arguments}());t.exports=r?o:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=a(t),s))?n:c?o(e):"Object"==(r=o(e))&&i(e.callee)?"Arguments":r}},9920:function(t,e,n){var r=n(2597),i=n(3887),o=n(1236),s=n(3070);t.exports=function(t,e,n){for(var a=i(e),c=s.f,u=o.f,l=0;l<a.length;l++){var p=a[l];r(t,p)||n&&r(n,p)||c(t,p,u(e,p))}}},8880:function(t,e,n){var r=n(9781),i=n(3070),o=n(9114);t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},9114:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},8052:function(t,e,n){var r=n(614),i=n(3070),o=n(6339),s=n(3072);t.exports=function(t,e,n,a){a||(a={});var c=a.enumerable,u=void 0!==a.name?a.name:e;if(r(n)&&o(n,u,a),a.global)c?t[e]=n:s(e,n);else{try{a.unsafe?t[e]&&(c=!0):delete t[e]}catch(t){}c?t[e]=n:i.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},3072:function(t,e,n){var r=n(7854),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},9781:function(t,e,n){var r=n(7293);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:function(t,e,n){var r=n(7854),i=n(111),o=r.document,s=i(o)&&i(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},8113:function(t,e,n){var r=n(5005);t.exports=r("navigator","userAgent")||""},7392:function(t,e,n){var r,i,o=n(7854),s=n(8113),a=o.process,c=o.Deno,u=a&&a.versions||c&&c.version,l=u&&u.v8;l&&(i=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(i=+r[1]),t.exports=i},2649:function(t,e,n){var r=n(7854),i=n(1702);t.exports=function(t,e){return i(r[t].prototype[e])}},748:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(t,e,n){var r=n(7854),i=n(1236).f,o=n(8880),s=n(8052),a=n(3072),c=n(9920),u=n(4705);t.exports=function(t,e){var n,l,p,d,f,h=t.target,g=t.global,m=t.stat;if(n=g?r:m?r[h]||a(h,{}):(r[h]||{}).prototype)for(l in e){if(d=e[l],p=t.dontCallGetSet?(f=i(n,l))&&f.value:n[l],!u(g?l:h+(m?".":"#")+l,t.forced)&&void 0!==p){if(typeof d==typeof p)continue;c(d,p)}(t.sham||p&&p.sham)&&o(d,"sham",!0),s(n,l,d,t)}}},7293:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},9974:function(t,e,n){var r=n(1702),i=n(9662),o=n(4374),s=r(r.bind);t.exports=function(t,e){return i(t),void 0===e?t:o?s(t,e):function(){return t.apply(e,arguments)}}},4374:function(t,e,n){var r=n(7293);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},1460:function(t,e,n){var r=n(4374),i=Function.prototype.call;t.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},6530:function(t,e,n){var r=n(9781),i=n(2597),o=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=i(o,"name"),c=a&&"something"===function(){}.name,u=a&&(!r||r&&s(o,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:u}},1702:function(t,e,n){var r=n(4374),i=Function.prototype,o=i.bind,s=i.call,a=r&&o.bind(s,s);t.exports=r?function(t){return t&&a(t)}:function(t){return t&&function(){return s.apply(t,arguments)}}},5005:function(t,e,n){var r=n(7854),i=n(614),o=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t]):r[t]&&r[t][e]}},8173:function(t,e,n){var r=n(9662);t.exports=function(t,e){var n=t[e];return null==n?void 0:r(n)}},7854:function(t,e,n){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},2597:function(t,e,n){var r=n(1702),i=n(7908),o=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},3501:function(t){t.exports={}},490:function(t,e,n){var r=n(5005);t.exports=r("document","documentElement")},4664:function(t,e,n){var r=n(9781),i=n(7293),o=n(317);t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},8361:function(t,e,n){var r=n(1702),i=n(7293),o=n(4326),s=Object,a=r("".split);t.exports=i((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?a(t,""):s(t)}:s},2788:function(t,e,n){var r=n(1702),i=n(614),o=n(5465),s=r(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return s(t)}),t.exports=o.inspectSource},9909:function(t,e,n){var r,i,o,s=n(8536),a=n(7854),c=n(1702),u=n(111),l=n(8880),p=n(2597),d=n(5465),f=n(6200),h=n(3501),g="Object already initialized",m=a.TypeError,_=a.WeakMap;if(s||d.state){var v=d.state||(d.state=new _),y=c(v.get),b=c(v.has),w=c(v.set);r=function(t,e){if(b(v,t))throw new m(g);return e.facade=t,w(v,t,e),e},i=function(t){return y(v,t)||{}},o=function(t){return b(v,t)}}else{var k=f("state");h[k]=!0,r=function(t,e){if(p(t,k))throw new m(g);return e.facade=t,l(t,k,e),e},i=function(t){return p(t,k)?t[k]:{}},o=function(t){return p(t,k)}}t.exports={set:r,get:i,has:o,enforce:function(t){return o(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=i(e)).type!==t)throw m("Incompatible receiver, "+t+" required");return n}}}},3157:function(t,e,n){var r=n(4326);t.exports=Array.isArray||function(t){return"Array"==r(t)}},614:function(t){t.exports=function(t){return"function"==typeof t}},4411:function(t,e,n){var r=n(1702),i=n(7293),o=n(614),s=n(648),a=n(5005),c=n(2788),u=function(){},l=[],p=a("Reflect","construct"),d=/^\s*(?:class|function)\b/,f=r(d.exec),h=!d.exec(u),g=function(t){if(!o(t))return!1;try{return p(u,l,t),!0}catch(t){return!1}},m=function(t){if(!o(t))return!1;switch(s(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!f(d,c(t))}catch(t){return!0}};m.sham=!0,t.exports=!p||i((function(){var t;return g(g.call)||!g(Object)||!g((function(){t=!0}))||t}))?m:g},4705:function(t,e,n){var r=n(7293),i=n(614),o=/#|\.prototype\./,s=function(t,e){var n=c[a(t)];return n==l||n!=u&&(i(e)?r(e):!!e)},a=s.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=s.data={},u=s.NATIVE="N",l=s.POLYFILL="P";t.exports=s},111:function(t,e,n){var r=n(614);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},1913:function(t){t.exports=!1},2190:function(t,e,n){var r=n(5005),i=n(614),o=n(7976),s=n(3307),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return i(e)&&o(e.prototype,a(t))}},6244:function(t,e,n){var r=n(7466);t.exports=function(t){return r(t.length)}},6339:function(t,e,n){var r=n(7293),i=n(614),o=n(2597),s=n(9781),a=n(6530).CONFIGURABLE,c=n(2788),u=n(9909),l=u.enforce,p=u.get,d=Object.defineProperty,f=s&&!r((function(){return 8!==d((function(){}),"length",{value:8}).length})),h=String(String).split("String"),g=t.exports=function(t,e,n){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!o(t,"name")||a&&t.name!==e)&&(s?d(t,"name",{value:e,configurable:!0}):t.name=e),f&&n&&o(n,"arity")&&t.length!==n.arity&&d(t,"length",{value:n.arity});try{n&&o(n,"constructor")&&n.constructor?s&&d(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=l(t);return o(r,"source")||(r.source=h.join("string"==typeof e?e:"")),t};Function.prototype.toString=g((function(){return i(this)&&p(this).source||c(this)}),"toString")},4758:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},133:function(t,e,n){var r=n(7392),i=n(7293);t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},8536:function(t,e,n){var r=n(7854),i=n(614),o=n(2788),s=r.WeakMap;t.exports=i(s)&&/native code/.test(o(s))},30:function(t,e,n){var r,i=n(9670),o=n(6048),s=n(748),a=n(3501),c=n(490),u=n(317),l=n(6200),p=l("IE_PROTO"),d=function(){},f=function(t){return"<script>"+t+"</"+"script>"},h=function(t){t.write(f("")),t.close();var e=t.parentWindow.Object;return t=null,e},g=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;g="undefined"!=typeof document?document.domain&&r?h(r):((e=u("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(f("document.F=Object")),t.close(),t.F):h(r);for(var n=s.length;n--;)delete g.prototype[s[n]];return g()};a[p]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(d.prototype=i(t),n=new d,d.prototype=null,n[p]=t):n=g(),void 0===e?n:o.f(n,e)}},6048:function(t,e,n){var r=n(9781),i=n(3353),o=n(3070),s=n(9670),a=n(5656),c=n(1956);e.f=r&&!i?Object.defineProperties:function(t,e){s(t);for(var n,r=a(e),i=c(e),u=i.length,l=0;u>l;)o.f(t,n=i[l++],r[n]);return t}},3070:function(t,e,n){var r=n(9781),i=n(4664),o=n(3353),s=n(9670),a=n(4948),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,p="enumerable",d="configurable",f="writable";e.f=r?o?function(t,e,n){if(s(t),e=a(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&f in n&&!n.writable){var r=l(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:d in n?n.configurable:r.configurable,enumerable:p in n?n.enumerable:r.enumerable,writable:!1})}return u(t,e,n)}:u:function(t,e,n){if(s(t),e=a(e),s(n),i)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},1236:function(t,e,n){var r=n(9781),i=n(1460),o=n(5296),s=n(9114),a=n(5656),c=n(4948),u=n(2597),l=n(4664),p=Object.getOwnPropertyDescriptor;e.f=r?p:function(t,e){if(t=a(t),e=c(e),l)try{return p(t,e)}catch(t){}if(u(t,e))return s(!i(o.f,t,e),t[e])}},8006:function(t,e,n){var r=n(6324),i=n(748).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},5181:function(t,e){e.f=Object.getOwnPropertySymbols},7976:function(t,e,n){var r=n(1702);t.exports=r({}.isPrototypeOf)},6324:function(t,e,n){var r=n(1702),i=n(2597),o=n(5656),s=n(1318).indexOf,a=n(3501),c=r([].push);t.exports=function(t,e){var n,r=o(t),u=0,l=[];for(n in r)!i(a,n)&&i(r,n)&&c(l,n);for(;e.length>u;)i(r,n=e[u++])&&(~s(l,n)||c(l,n));return l}},1956:function(t,e,n){var r=n(6324),i=n(748);t.exports=Object.keys||function(t){return r(t,i)}},5296:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},2140:function(t,e,n){var r=n(1460),i=n(614),o=n(111),s=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&i(n=t.toString)&&!o(a=r(n,t)))return a;if(i(n=t.valueOf)&&!o(a=r(n,t)))return a;if("string"!==e&&i(n=t.toString)&&!o(a=r(n,t)))return a;throw s("Can't convert object to primitive value")}},3887:function(t,e,n){var r=n(5005),i=n(1702),o=n(8006),s=n(5181),a=n(9670),c=i([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(a(t)),n=s.f;return n?c(e,n(t)):e}},4488:function(t){var e=TypeError;t.exports=function(t){if(null==t)throw e("Can't call method on "+t);return t}},6200:function(t,e,n){var r=n(2309),i=n(9711),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},5465:function(t,e,n){var r=n(7854),i=n(3072),o="__core-js_shared__",s=r[o]||i(o,{});t.exports=s},2309:function(t,e,n){var r=n(1913),i=n(5465);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.23.3",mode:r?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.3/LICENSE",source:"https://github.com/zloirock/core-js"})},1400:function(t,e,n){var r=n(9303),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},5656:function(t,e,n){var r=n(8361),i=n(4488);t.exports=function(t){return r(i(t))}},9303:function(t,e,n){var r=n(4758);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},7466:function(t,e,n){var r=n(9303),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},7908:function(t,e,n){var r=n(4488),i=Object;t.exports=function(t){return i(r(t))}},7593:function(t,e,n){var r=n(1460),i=n(111),o=n(2190),s=n(8173),a=n(2140),c=n(5112),u=TypeError,l=c("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var n,c=s(t,l);if(c){if(void 0===e&&(e="default"),n=r(c,t,e),!i(n)||o(n))return n;throw u("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},4948:function(t,e,n){var r=n(7593),i=n(2190);t.exports=function(t){var e=r(t,"string");return i(e)?e:e+""}},1694:function(t,e,n){var r={};r[n(5112)("toStringTag")]="z",t.exports="[object z]"===String(r)},6330:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},9711:function(t,e,n){var r=n(1702),i=0,o=Math.random(),s=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++i+o,36)}},3307:function(t,e,n){var r=n(133);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:function(t,e,n){var r=n(9781),i=n(7293);t.exports=r&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},5112:function(t,e,n){var r=n(7854),i=n(2309),o=n(2597),s=n(9711),a=n(133),c=n(3307),u=i("wks"),l=r.Symbol,p=l&&l.for,d=c?l:l&&l.withoutSetter||s;t.exports=function(t){if(!o(u,t)||!a&&"string"!=typeof u[t]){var e="Symbol."+t;a&&o(l,t)?u[t]=l[t]:u[t]=c&&p?p(e):d(e)}return u[t]}},4553:function(t,e,n){"use strict";var r=n(2109),i=n(2092).findIndex,o=n(1223),s="findIndex",a=!0;s in[]&&Array(1).findIndex((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o(s)},8719:function(t,e,n){var r=n(1457);t.exports=r},2702:function(t,e,n){t.exports=function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}var r=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},i=0,o=void 0,s=void 0,a=function(t,e){b[i]=t,b[i+1]=e,2===(i+=2)&&(s?s(w):S())};function c(t){s=t}function u(t){a=t}var l="undefined"!=typeof window?window:void 0,p=l||{},d=p.MutationObserver||p.WebKitMutationObserver,f="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function g(){return function(){return process.nextTick(w)}}function m(){return void 0!==o?function(){o(w)}:y()}function _(){var t=0,e=new d(w),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function v(){var t=new MessageChannel;return t.port1.onmessage=w,function(){return t.port2.postMessage(0)}}function y(){var t=setTimeout;return function(){return t(w,1)}}var b=new Array(1e3);function w(){for(var t=0;t<i;t+=2)(0,b[t])(b[t+1]),b[t]=void 0,b[t+1]=void 0;i=0}function k(){try{var t=Function("return this")().require("vertx");return o=t.runOnLoop||t.runOnContext,m()}catch(t){return y()}}var S=void 0;function x(t,e){var n=this,r=new this.constructor(P);void 0===r[E]&&Z(r);var i=n._state;if(i){var o=arguments[i-1];a((function(){return $(i,r,o,n._result)}))}else N(n,r,t,e);return r}function O(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(P);return F(n,t),n}S=f?g():d?_():h?v():void 0===l?k():y();var E=Math.random().toString(36).substring(2);function P(){}var C=void 0,I=1,j=2;function B(){return new TypeError("You cannot resolve a promise with itself")}function A(){return new TypeError("A promises callback cannot return that same promise.")}function T(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}function D(t,e,n){a((function(t){var r=!1,i=T(n,e,(function(n){r||(r=!0,e!==n?F(t,n):M(t,n))}),(function(e){r||(r=!0,R(t,e))}),"Settle: "+(t._label||" unknown promise"));!r&&i&&(r=!0,R(t,i))}),t)}function L(t,e){e._state===I?M(t,e._result):e._state===j?R(t,e._result):N(e,void 0,(function(e){return F(t,e)}),(function(e){return R(t,e)}))}function q(t,n,r){n.constructor===t.constructor&&r===x&&n.constructor.resolve===O?L(t,n):void 0===r?M(t,n):e(r)?D(t,n,r):M(t,n)}function F(e,n){if(e===n)R(e,B());else if(t(n)){var r=void 0;try{r=n.then}catch(t){return void R(e,t)}q(e,n,r)}else M(e,n)}function U(t){t._onerror&&t._onerror(t._result),H(t)}function M(t,e){t._state===C&&(t._result=e,t._state=I,0!==t._subscribers.length&&a(H,t))}function R(t,e){t._state===C&&(t._state=j,t._result=e,a(U,t))}function N(t,e,n,r){var i=t._subscribers,o=i.length;t._onerror=null,i[o]=e,i[o+I]=n,i[o+j]=r,0===o&&t._state&&a(H,t)}function H(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,i=void 0,o=t._result,s=0;s<e.length;s+=3)r=e[s],i=e[s+n],r?$(n,r,i,o):i(o);t._subscribers.length=0}}function $(t,n,r,i){var o=e(r),s=void 0,a=void 0,c=!0;if(o){try{s=r(i)}catch(t){c=!1,a=t}if(n===s)return void R(n,A())}else s=i;n._state!==C||(o&&c?F(n,s):!1===c?R(n,a):t===I?M(n,s):t===j&&R(n,s))}function z(t,e){try{e((function(e){F(t,e)}),(function(e){R(t,e)}))}catch(e){R(t,e)}}var W=0;function K(){return W++}function Z(t){t[E]=W++,t._state=void 0,t._result=void 0,t._subscribers=[]}function G(){return new Error("Array Methods must be provided an Array")}var Q=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(P),this.promise[E]||Z(this.promise),r(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?M(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&M(this.promise,this._result))):R(this.promise,G())}return t.prototype._enumerate=function(t){for(var e=0;this._state===C&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===O){var i=void 0,o=void 0,s=!1;try{i=t.then}catch(t){s=!0,o=t}if(i===x&&t._state!==C)this._settledAt(t._state,e,t._result);else if("function"!=typeof i)this._remaining--,this._result[e]=t;else if(n===et){var a=new n(P);s?R(a,o):q(a,t,i),this._willSettleAt(a,e)}else this._willSettleAt(new n((function(e){return e(t)})),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===C&&(this._remaining--,t===j?R(r,n):this._result[e]=n),0===this._remaining&&M(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;N(t,void 0,(function(t){return n._settledAt(I,e,t)}),(function(t){return n._settledAt(j,e,t)}))},t}();function J(t){return new Q(this,t).promise}function V(t){var e=this;return r(t)?new e((function(n,r){for(var i=t.length,o=0;o<i;o++)e.resolve(t[o]).then(n,r)})):new e((function(t,e){return e(new TypeError("You must pass an array to race."))}))}function Y(t){var e=new this(P);return R(e,t),e}function X(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function tt(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var et=function(){function t(e){this[E]=K(),this._result=this._state=void 0,this._subscribers=[],P!==e&&("function"!=typeof e&&X(),this instanceof t?z(this,e):tt())}return t.prototype.catch=function(t){return this.then(null,t)},t.prototype.finally=function(t){var n=this,r=n.constructor;return e(t)?n.then((function(e){return r.resolve(t()).then((function(){return e}))}),(function(e){return r.resolve(t()).then((function(){throw e}))})):n.then(t,t)},t}();function nt(){var t=void 0;if(void 0!==n.g)t=n.g;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var r=null;try{r=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===r&&!e.cast)return}t.Promise=et}return et.prototype.then=x,et.all=J,et.race=V,et.resolve=O,et.reject=Y,et._setScheduler=c,et._setAsap=u,et._asap=a,et.polyfill=nt,et.Promise=et,et}()},2705:function(t,e,n){var r=n(5639).Symbol;t.exports=r},6874:function(t){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},4636:function(t,e,n){var r=n(2545),i=n(5694),o=n(1469),s=n(4144),a=n(5776),c=n(6719),u=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=o(t),l=!n&&i(t),p=!n&&!l&&s(t),d=!n&&!l&&!p&&c(t),f=n||l||p||d,h=f?r(t.length,String):[],g=h.length;for(var m in t)!e&&!u.call(t,m)||f&&("length"==m||p&&("offset"==m||"parent"==m)||d&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||a(m,g))||h.push(m);return h}},4865:function(t,e,n){var r=n(9465),i=n(7813),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var s=t[e];o.call(t,e)&&i(s,n)&&(void 0!==n||e in t)||r(t,e,n)}},9465:function(t,e,n){var r=n(8777);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},4239:function(t,e,n){var r=n(2705),i=n(9607),o=n(2333),s=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?i(t):o(t)}},9454:function(t,e,n){var r=n(4239),i=n(7005);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},8458:function(t,e,n){var r=n(3560),i=n(5346),o=n(3218),s=n(346),a=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,p=u.hasOwnProperty,d=RegExp("^"+l.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(r(t)?d:a).test(s(t))}},8749:function(t,e,n){var r=n(4239),i=n(1780),o=n(7005),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!s[r(t)]}},280:function(t,e,n){var r=n(5726),i=n(6916),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))o.call(t,n)&&"constructor"!=n&&e.push(n);return e}},5976:function(t,e,n){var r=n(6557),i=n(5357),o=n(61);t.exports=function(t,e){return o(i(t,e,r),t+"")}},6560:function(t,e,n){var r=n(5703),i=n(8777),o=n(6557),s=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:o;t.exports=s},2545:function(t){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},7518:function(t){t.exports=function(t){return function(e){return t(e)}}},8363:function(t,e,n){var r=n(4865),i=n(9465);t.exports=function(t,e,n,o){var s=!n;n||(n={});for(var a=-1,c=e.length;++a<c;){var u=e[a],l=o?o(n[u],t[u],u,n,t):void 0;void 0===l&&(l=t[u]),s?i(n,u,l):r(n,u,l)}return n}},4429:function(t,e,n){var r=n(5639)["__core-js_shared__"];t.exports=r},1463:function(t,e,n){var r=n(5976),i=n(6612);t.exports=function(t){return r((function(e,n){var r=-1,o=n.length,s=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(s=t.length>3&&"function"==typeof s?(o--,s):void 0,a&&i(n[0],n[1],a)&&(s=o<3?void 0:s,o=1),e=Object(e);++r<o;){var c=n[r];c&&t(e,c,r,s)}return e}))}},8777:function(t,e,n){var r=n(852),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},1957:function(t,e,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r},852:function(t,e,n){var r=n(8458),i=n(7801);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},9607:function(t,e,n){var r=n(2705),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,a),n=t[a];try{t[a]=void 0;var r=!0}catch(t){}var i=s.call(t);return r&&(e?t[a]=n:delete t[a]),i}},7801:function(t){t.exports=function(t,e){return null==t?void 0:t[e]}},5776:function(t){var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}},6612:function(t,e,n){var r=n(7813),i=n(8612),o=n(5776),s=n(3218);t.exports=function(t,e,n){if(!s(n))return!1;var a=typeof e;return!!("number"==a?i(n)&&o(e,n.length):"string"==a&&e in n)&&r(n[e],t)}},5346:function(t,e,n){var r,i=n(4429),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!o&&o in t}},5726:function(t){var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},6916:function(t,e,n){var r=n(5569)(Object.keys,Object);t.exports=r},1167:function(t,e,n){t=n.nmd(t);var r=n(1957),i=e&&!e.nodeType&&e,o=i&&t&&!t.nodeType&&t,s=o&&o.exports===i&&r.process,a=function(){try{var t=o&&o.require&&o.require("util").types;return t||s&&s.binding&&s.binding("util")}catch(t){}}();t.exports=a},2333:function(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},5569:function(t){t.exports=function(t,e){return function(n){return t(e(n))}}},5357:function(t,e,n){var r=n(6874),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,s=-1,a=i(o.length-e,0),c=Array(a);++s<a;)c[s]=o[e+s];s=-1;for(var u=Array(e+1);++s<e;)u[s]=o[s];return u[e]=n(c),r(t,this,u)}}},5639:function(t,e,n){var r=n(1957),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},61:function(t,e,n){var r=n(6560),i=n(1275)(r);t.exports=i},1275:function(t){var e=Date.now;t.exports=function(t){var n=0,r=0;return function(){var i=e(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},346:function(t){var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},8583:function(t,e,n){var r=n(4865),i=n(8363),o=n(1463),s=n(8612),a=n(5726),c=n(3674),u=Object.prototype.hasOwnProperty,l=o((function(t,e){if(a(e)||s(e))i(e,c(e),t);else for(var n in e)u.call(e,n)&&r(t,n,e[n])}));t.exports=l},5703:function(t){t.exports=function(t){return function(){return t}}},7813:function(t){t.exports=function(t,e){return t===e||t!=t&&e!=e}},6557:function(t){t.exports=function(t){return t}},5694:function(t,e,n){var r=n(9454),i=n(7005),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return i(t)&&s.call(t,"callee")&&!a.call(t,"callee")};t.exports=c},1469:function(t){var e=Array.isArray;t.exports=e},8612:function(t,e,n){var r=n(3560),i=n(1780);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},4144:function(t,e,n){t=n.nmd(t);var r=n(5639),i=n(5062),o=e&&!e.nodeType&&e,s=o&&t&&!t.nodeType&&t,a=s&&s.exports===o?r.Buffer:void 0,c=(a?a.isBuffer:void 0)||i;t.exports=c},3560:function(t,e,n){var r=n(4239),i=n(3218);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},1780:function(t){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},3218:function(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},7005:function(t){t.exports=function(t){return null!=t&&"object"==typeof t}},6719:function(t,e,n){var r=n(8749),i=n(7518),o=n(1167),s=o&&o.isTypedArray,a=s?i(s):r;t.exports=a},3674:function(t,e,n){var r=n(4636),i=n(280),o=n(8612);t.exports=function(t){return o(t)?r(t):i(t)}},5062:function(t){t.exports=function(){return!1}},8891:function(t){"use strict";var e,n={DEBUG:!1,LIB_VERSION:"2.45.0"};if("undefined"==typeof window){var r={hostname:""};e={navigator:{userAgent:""},document:{location:r,referrer:""},screen:{width:0,height:0},location:r}}else e=window;var i,o,s,a,c,u,l,p,d,f,h,g=Array.prototype,m=Function.prototype,_=Object.prototype,v=g.slice,y=_.toString,b=_.hasOwnProperty,w=e.console,k=e.navigator,S=e.document,x=e.opera,O=e.screen,E=k.userAgent,P=m.bind,C=g.forEach,I=g.indexOf,j=g.map,B=Array.isArray,A={},T={trim:function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},D={log:function(){if(n.DEBUG&&!T.isUndefined(w)&&w)try{w.log.apply(w,arguments)}catch(t){T.each(arguments,(function(t){w.log(t)}))}},warn:function(){if(n.DEBUG&&!T.isUndefined(w)&&w){var t=["Mixpanel warning:"].concat(T.toArray(arguments));try{w.warn.apply(w,t)}catch(e){T.each(t,(function(t){w.warn(t)}))}}},error:function(){if(n.DEBUG&&!T.isUndefined(w)&&w){var t=["Mixpanel error:"].concat(T.toArray(arguments));try{w.error.apply(w,t)}catch(e){T.each(t,(function(t){w.error(t)}))}}},critical:function(){if(!T.isUndefined(w)&&w){var t=["Mixpanel error:"].concat(T.toArray(arguments));try{w.error.apply(w,t)}catch(e){T.each(t,(function(t){w.error(t)}))}}}},L=function(t,e){return function(){return arguments[0]="["+e+"] "+arguments[0],t.apply(D,arguments)}},q=function(t){return{log:L(D.log,t),error:L(D.error,t),critical:L(D.critical,t)}};T.bind=function(t,e){var n,r;if(P&&t.bind===P)return P.apply(t,v.call(arguments,1));if(!T.isFunction(t))throw new TypeError;return n=v.call(arguments,2),r=function(){if(!(this instanceof r))return t.apply(e,n.concat(v.call(arguments)));var i={};i.prototype=t.prototype;var o=new i;i.prototype=null;var s=t.apply(o,n.concat(v.call(arguments)));return Object(s)===s?s:o},r},T.each=function(t,e,n){if(null!=t)if(C&&t.forEach===C)t.forEach(e,n);else if(t.length===+t.length){for(var r=0,i=t.length;r<i;r++)if(r in t&&e.call(n,t[r],r,t)===A)return}else for(var o in t)if(b.call(t,o)&&e.call(n,t[o],o,t)===A)return},T.extend=function(t){return T.each(v.call(arguments,1),(function(e){for(var n in e)void 0!==e[n]&&(t[n]=e[n])})),t},T.isArray=B||function(t){return"[object Array]"===y.call(t)},T.isFunction=function(t){try{return/^\s*\bfunction\b/.test(t)}catch(t){return!1}},T.isArguments=function(t){return!(!t||!b.call(t,"callee"))},T.toArray=function(t){return t?t.toArray?t.toArray():T.isArray(t)||T.isArguments(t)?v.call(t):T.values(t):[]},T.map=function(t,e,n){if(j&&t.map===j)return t.map(e,n);var r=[];return T.each(t,(function(t){r.push(e.call(n,t))})),r},T.keys=function(t){var e=[];return null===t||T.each(t,(function(t,n){e[e.length]=n})),e},T.values=function(t){var e=[];return null===t||T.each(t,(function(t){e[e.length]=t})),e},T.include=function(t,e){var n=!1;return null===t?n:I&&t.indexOf===I?-1!=t.indexOf(e):(T.each(t,(function(t){if(n||(n=t===e))return A})),n)},T.includes=function(t,e){return-1!==t.indexOf(e)},T.inherit=function(t,e){return t.prototype=new e,t.prototype.constructor=t,t.superclass=e.prototype,t},T.isObject=function(t){return t===Object(t)&&!T.isArray(t)},T.isEmptyObject=function(t){if(T.isObject(t)){for(var e in t)if(b.call(t,e))return!1;return!0}return!1},T.isUndefined=function(t){return void 0===t},T.isString=function(t){return"[object String]"==y.call(t)},T.isDate=function(t){return"[object Date]"==y.call(t)},T.isNumber=function(t){return"[object Number]"==y.call(t)},T.isElement=function(t){return!(!t||1!==t.nodeType)},T.encodeDates=function(t){return T.each(t,(function(e,n){T.isDate(e)?t[n]=T.formatDate(e):T.isObject(e)&&(t[n]=T.encodeDates(e))})),t},T.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},T.formatDate=function(t){function e(t){return t<10?"0"+t:t}return t.getUTCFullYear()+"-"+e(t.getUTCMonth()+1)+"-"+e(t.getUTCDate())+"T"+e(t.getUTCHours())+":"+e(t.getUTCMinutes())+":"+e(t.getUTCSeconds())},T.strip_empty_properties=function(t){var e={};return T.each(t,(function(t,n){T.isString(t)&&t.length>0&&(e[n]=t)})),e},T.truncate=function(t,e){var n;return"string"==typeof t?n=t.slice(0,e):T.isArray(t)?(n=[],T.each(t,(function(t){n.push(T.truncate(t,e))}))):T.isObject(t)?(n={},T.each(t,(function(t,r){n[r]=T.truncate(t,e)}))):n=t,n},T.JSONEncode=function(t){var e=function(t){var e=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return e.lastIndex=0,e.test(t)?'"'+t.replace(e,(function(t){var e=n[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'},n=function(t,r){var i="",o=0,s="",a="",c=0,u=i,l=[],p=r[t];switch(p&&"object"==typeof p&&"function"==typeof p.toJSON&&(p=p.toJSON(t)),typeof p){case"string":return e(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":return String(p);case"object":if(!p)return"null";if(i+=" ",l=[],"[object Array]"===y.apply(p)){for(c=p.length,o=0;o<c;o+=1)l[o]=n(o,p)||"null";return a=0===l.length?"[]":i?"[\n"+i+l.join(",\n"+i)+"\n"+u+"]":"["+l.join(",")+"]",i=u,a}for(s in p)b.call(p,s)&&(a=n(s,p))&&l.push(e(s)+(i?": ":":")+a);return a=0===l.length?"{}":i?"{"+l.join(",")+u+"}":"{"+l.join(",")+"}",i=u,a}};return n("",{"":t})},T.JSONDecode=(c={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},u=function(t){var e=new SyntaxError(t);throw e.at=i,e.text=s,e},l=function(t){return t&&t!==o&&u("Expected '"+t+"' instead of '"+o+"'"),o=s.charAt(i),i+=1,o},p=function(){var t,e="";for("-"===o&&(e="-",l("-"));o>="0"&&o<="9";)e+=o,l();if("."===o)for(e+=".";l()&&o>="0"&&o<="9";)e+=o;if("e"===o||"E"===o)for(e+=o,l(),"-"!==o&&"+"!==o||(e+=o,l());o>="0"&&o<="9";)e+=o,l();if(t=+e,isFinite(t))return t;u("Bad number")},d=function(){var t,e,n,r="";if('"'===o)for(;l();){if('"'===o)return l(),r;if("\\"===o)if(l(),"u"===o){for(n=0,e=0;e<4&&(t=parseInt(l(),16),isFinite(t));e+=1)n=16*n+t;r+=String.fromCharCode(n)}else{if("string"!=typeof c[o])break;r+=c[o]}else r+=o}u("Bad string")},f=function(){for(;o&&o<=" ";)l()},a=function(){switch(f(),o){case"{":return function(){var t,e={};if("{"===o){if(l("{"),f(),"}"===o)return l("}"),e;for(;o;){if(t=d(),f(),l(":"),Object.hasOwnProperty.call(e,t)&&u('Duplicate key "'+t+'"'),e[t]=a(),f(),"}"===o)return l("}"),e;l(","),f()}}u("Bad object")}();case"[":return function(){var t=[];if("["===o){if(l("["),f(),"]"===o)return l("]"),t;for(;o;){if(t.push(a()),f(),"]"===o)return l("]"),t;l(","),f()}}u("Bad array")}();case'"':return d();case"-":return p();default:return o>="0"&&o<="9"?p():function(){switch(o){case"t":return l("t"),l("r"),l("u"),l("e"),!0;case"f":return l("f"),l("a"),l("l"),l("s"),l("e"),!1;case"n":return l("n"),l("u"),l("l"),l("l"),null}u('Unexpected "'+o+'"')}()}},function(t){var e;return s=t,i=0,o=" ",e=a(),f(),o&&u("Syntax error"),e}),T.base64Encode=function(t){var e,n,r,i,o,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,c=0,u="",l=[];if(!t)return t;t=T.utf8Encode(t);do{e=(o=t.charCodeAt(a++)<<16|t.charCodeAt(a++)<<8|t.charCodeAt(a++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,l[c++]=s.charAt(e)+s.charAt(n)+s.charAt(r)+s.charAt(i)}while(a<t.length);switch(u=l.join(""),t.length%3){case 1:u=u.slice(0,-2)+"==";break;case 2:u=u.slice(0,-1)+"="}return u},T.utf8Encode=function(t){var e,n,r,i,o="";for(e=n=0,r=(t=(t+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,i=0;i<r;i++){var s=t.charCodeAt(i),a=null;s<128?n++:a=s>127&&s<2048?String.fromCharCode(s>>6|192,63&s|128):String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128),null!==a&&(n>e&&(o+=t.substring(e,n)),o+=a,e=n=i+1)}return n>e&&(o+=t.substring(e,t.length)),o},T.UUID=(h=function(){for(var t=1*new Date,e=0;t==1*new Date;)e++;return t.toString(16)+e.toString(16)},function(){var t=(O.height*O.width).toString(16);return h()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var t,e,n=E,r=[],i=0;function o(t,e){var n,i=0;for(n=0;n<e.length;n++)i|=r[n]<<8*n;return t^i}for(t=0;t<n.length;t++)e=n.charCodeAt(t),r.unshift(255&e),r.length>=4&&(i=o(i,r),r=[]);return r.length>0&&(i=o(i,r)),i.toString(16)}()+"-"+t+"-"+h()});var F=["ahrefsbot","baiduspider","bingbot","bingpreview","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandexbot","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];T.isBlockedUA=function(t){var e;for(t=t.toLowerCase(),e=0;e<F.length;e++)if(-1!==t.indexOf(F[e]))return!0;return!1},T.HTTPBuildQuery=function(t,e){var n,r,i=[];return T.isUndefined(e)&&(e="&"),T.each(t,(function(t,e){n=encodeURIComponent(t.toString()),r=encodeURIComponent(e),i[i.length]=r+"="+n})),i.join(e)},T.getQueryParam=function(t,e){e=e.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);if(null===n||n&&"string"!=typeof n[1]&&n[1].length)return"";var r=n[1];try{r=decodeURIComponent(r)}catch(t){D.error("Skipping decoding for malformed query param: "+r)}return r.replace(/\+/g," ")},T.cookie={get:function(t){for(var e=t+"=",n=S.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];" "==i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(e))return decodeURIComponent(i.substring(e.length,i.length))}return null},parse:function(t){var e;try{e=T.JSONDecode(T.cookie.get(t))||{}}catch(t){}return e},set_seconds:function(t,e,n,r,i,o,s){var a="",c="",u="";if(s)a="; domain="+s;else if(r){var l=z(S.location.hostname);a=l?"; domain=."+l:""}if(n){var p=new Date;p.setTime(p.getTime()+1e3*n),c="; expires="+p.toGMTString()}o&&(i=!0,u="; SameSite=None"),i&&(u+="; secure"),S.cookie=t+"="+encodeURIComponent(e)+c+"; path=/"+a+u},set:function(t,e,n,r,i,o,s){var a="",c="",u="";if(s)a="; domain="+s;else if(r){var l=z(S.location.hostname);a=l?"; domain=."+l:""}if(n){var p=new Date;p.setTime(p.getTime()+24*n*60*60*1e3),c="; expires="+p.toGMTString()}o&&(i=!0,u="; SameSite=None"),i&&(u+="; secure");var d=t+"="+encodeURIComponent(e)+c+"; path=/"+a+u;return S.cookie=d,d},remove:function(t,e,n){T.cookie.set(t,"",-1,e,!1,!1,n)}};var U=null,M=function(t,e){if(null!==U&&!e)return U;var n=!0;try{t=t||window.localStorage;var r="__mplss_"+N(8);t.setItem(r,"xyz"),"xyz"!==t.getItem(r)&&(n=!1),t.removeItem(r)}catch(t){n=!1}return U=n,n};T.localStorage={is_supported:function(t){var e=M(null,t);return e||D.error("localStorage unsupported; falling back to cookie store"),e},error:function(t){D.error("localStorage error: "+t)},get:function(t){try{return window.localStorage.getItem(t)}catch(t){T.localStorage.error(t)}return null},parse:function(t){try{return T.JSONDecode(T.localStorage.get(t))||{}}catch(t){}return null},set:function(t,e){try{window.localStorage.setItem(t,e)}catch(t){T.localStorage.error(t)}},remove:function(t){try{window.localStorage.removeItem(t)}catch(t){T.localStorage.error(t)}}},T.register_event=function(){function t(e){return e&&(e.preventDefault=t.preventDefault,e.stopPropagation=t.stopPropagation),e}return t.preventDefault=function(){this.returnValue=!1},t.stopPropagation=function(){this.cancelBubble=!0},function(e,n,r,i,o){if(e)if(e.addEventListener&&!i)e.addEventListener(n,r,!!o);else{var s="on"+n,a=e[s];e[s]=function(e,n,r){return function(i){if(i=i||t(window.event)){var o,s,a=!0;return T.isFunction(r)&&(o=r(i)),s=n.call(e,i),!1!==o&&!1!==s||(a=!1),a}}}(e,r,a)}else D.error("No valid element provided to register_event")}}();var R=new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');T.dom_query=function(){function t(t){return t.all?t.all:t.getElementsByTagName("*")}var e=/[\t\r\n]/g;function n(t,n){var r=" "+n+" ";return(" "+t.className+" ").replace(e," ").indexOf(r)>=0}function r(e){if(!S.getElementsByTagName)return[];var r,i,o,s,a,c,u,l,p,d,f=e.split(" "),h=[S];for(c=0;c<f.length;c++)if((r=f[c].replace(/^\s+/,"").replace(/\s+$/,"")).indexOf("#")>-1){o=(i=r.split("#"))[0];var g=i[1],m=S.getElementById(g);if(!m||o&&m.nodeName.toLowerCase()!=o)return[];h=[m]}else if(r.indexOf(".")>-1){o=(i=r.split("."))[0];var _=i[1];for(o||(o="*"),s=[],a=0,u=0;u<h.length;u++)for(p="*"==o?t(h[u]):h[u].getElementsByTagName(o),l=0;l<p.length;l++)s[a++]=p[l];for(h=[],d=0,u=0;u<s.length;u++)s[u].className&&T.isString(s[u].className)&&n(s[u],_)&&(h[d++]=s[u])}else{var v=r.match(R);if(v){o=v[1];var y,b=v[2],w=v[3],k=v[4];for(o||(o="*"),s=[],a=0,u=0;u<h.length;u++)for(p="*"==o?t(h[u]):h[u].getElementsByTagName(o),l=0;l<p.length;l++)s[a++]=p[l];switch(h=[],d=0,w){case"=":y=function(t){return t.getAttribute(b)==k};break;case"~":y=function(t){return t.getAttribute(b).match(new RegExp("\\b"+k+"\\b"))};break;case"|":y=function(t){return t.getAttribute(b).match(new RegExp("^"+k+"-?"))};break;case"^":y=function(t){return 0===t.getAttribute(b).indexOf(k)};break;case"$":y=function(t){return t.getAttribute(b).lastIndexOf(k)==t.getAttribute(b).length-k.length};break;case"*":y=function(t){return t.getAttribute(b).indexOf(k)>-1};break;default:y=function(t){return t.getAttribute(b)}}for(h=[],d=0,u=0;u<s.length;u++)y(s[u])&&(h[d++]=s[u])}else{for(o=r,s=[],a=0,u=0;u<h.length;u++)for(p=h[u].getElementsByTagName(o),l=0;l<p.length;l++)s[a++]=p[l];h=s}}return h}return function(t){return T.isElement(t)?[t]:T.isObject(t)&&!T.isUndefined(t.length)?t:r.call(this,t)}}(),T.info={campaignParams:function(){var t="utm_source utm_medium utm_campaign utm_content utm_term".split(" "),e="",n={};return T.each(t,(function(t){(e=T.getQueryParam(S.URL,t)).length&&(n[t]=e)})),n},searchEngine:function(t){return 0===t.search("https?://(.*)google.([^/?]*)")?"google":0===t.search("https?://(.*)bing.com")?"bing":0===t.search("https?://(.*)yahoo.com")?"yahoo":0===t.search("https?://(.*)duckduckgo.com")?"duckduckgo":null},searchInfo:function(t){var e=T.info.searchEngine(t),n="yahoo"!=e?"q":"p",r={};if(null!==e){r.$search_engine=e;var i=T.getQueryParam(t,n);i.length&&(r.mp_keyword=i)}return r},browser:function(t,e,n){return e=e||"",n||T.includes(t," OPR/")?T.includes(t,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":T.includes(t,"IEMobile")||T.includes(t,"WPDesktop")?"Internet Explorer Mobile":T.includes(t,"SamsungBrowser/")?"Samsung Internet":T.includes(t,"Edge")||T.includes(t,"Edg/")?"Microsoft Edge":T.includes(t,"FBIOS")?"Facebook Mobile":T.includes(t,"Chrome")?"Chrome":T.includes(t,"CriOS")?"Chrome iOS":T.includes(t,"UCWEB")||T.includes(t,"UCBrowser")?"UC Browser":T.includes(t,"FxiOS")?"Firefox iOS":T.includes(e,"Apple")?T.includes(t,"Mobile")?"Mobile Safari":"Safari":T.includes(t,"Android")?"Android Mobile":T.includes(t,"Konqueror")?"Konqueror":T.includes(t,"Firefox")?"Firefox":T.includes(t,"MSIE")||T.includes(t,"Trident/")?"Internet Explorer":T.includes(t,"Gecko")?"Mozilla":""},browserVersion:function(t,e,n){var r={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/}[T.info.browser(t,e,n)];if(void 0===r)return null;var i=t.match(r);return i?parseFloat(i[i.length-2]):null},os:function(){var t=E;return/Windows/i.test(t)?/Phone/.test(t)||/WPDesktop/.test(t)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(t)?"iOS":/Android/.test(t)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":/Mac/i.test(t)?"Mac OS X":/Linux/.test(t)?"Linux":/CrOS/.test(t)?"Chrome OS":""},device:function(t){return/Windows Phone/i.test(t)||/WPDesktop/.test(t)?"Windows Phone":/iPad/.test(t)?"iPad":/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":/Android/.test(t)?"Android":""},referringDomain:function(t){var e=t.split("/");return e.length>=3?e[2]:""},properties:function(){return T.extend(T.strip_empty_properties({$os:T.info.os(),$browser:T.info.browser(E,k.vendor,x),$referrer:S.referrer,$referring_domain:T.info.referringDomain(S.referrer),$device:T.info.device(E)}),{$current_url:e.location.href,$browser_version:T.info.browserVersion(E,k.vendor,x),$screen_height:O.height,$screen_width:O.width,mp_lib:"web",$lib_version:n.LIB_VERSION,$insert_id:N(),time:T.timestamp()/1e3})},people_properties:function(){return T.extend(T.strip_empty_properties({$os:T.info.os(),$browser:T.info.browser(E,k.vendor,x)}),{$browser_version:T.info.browserVersion(E,k.vendor,x)})},pageviewInfo:function(t){return T.strip_empty_properties({mp_page:t,mp_referrer:S.referrer,mp_browser:T.info.browser(E,k.vendor,x),mp_platform:T.info.os()})}};var N=function(t){var e=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return t?e.substring(0,t):e},H=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,$=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,z=function(t){var e=$,n=t.split("."),r=n[n.length-1];(r.length>4||"com"===r||"org"===r)&&(e=H);var i=t.match(e);return i?i[0]:""},W=null,K=null;"undefined"!=typeof JSON&&(W=JSON.stringify,K=JSON.parse),W=W||T.JSONEncode,K=K||T.JSONDecode,T.toArray=T.toArray,T.isObject=T.isObject,T.JSONEncode=T.JSONEncode,T.JSONDecode=T.JSONDecode,T.isBlockedUA=T.isBlockedUA,T.isEmptyObject=T.isEmptyObject,T.info=T.info,T.info.device=T.info.device,T.info.browser=T.info.browser,T.info.browserVersion=T.info.browserVersion,T.info.properties=T.info.properties;var Z=function(){};Z.prototype.create_properties=function(){},Z.prototype.event_handler=function(){},Z.prototype.after_track_handler=function(){},Z.prototype.init=function(t){return this.mp=t,this},Z.prototype.track=function(t,e,n,r){var i=this,o=T.dom_query(t);if(0!==o.length)return T.each(o,(function(t){T.register_event(t,this.override_event,(function(t){var o={},s=i.create_properties(n,this),a=i.mp.get_config("track_links_timeout");i.event_handler(t,this,o),window.setTimeout(i.track_callback(r,s,o,!0),a),i.mp.track(e,s,i.track_callback(r,s,o))}))}),this),!0;D.error("The DOM query ("+t+") returned 0 elements")},Z.prototype.track_callback=function(t,e,n,r){r=r||!1;var i=this;return function(){n.callback_fired||(n.callback_fired=!0,t&&!1===t(r,e)||i.after_track_handler(e,n,r))}},Z.prototype.create_properties=function(t,e){return"function"==typeof t?t(e):T.extend({},t)};var G=function(){this.override_event="click"};T.inherit(G,Z),G.prototype.create_properties=function(t,e){var n=G.superclass.create_properties.apply(this,arguments);return e.href&&(n.url=e.href),n},G.prototype.event_handler=function(t,e,n){n.new_tab=2===t.which||t.metaKey||t.ctrlKey||"_blank"===e.target,n.href=e.href,n.new_tab||t.preventDefault()},G.prototype.after_track_handler=function(t,e){e.new_tab||setTimeout((function(){window.location=e.href}),0)};var Q=function(){this.override_event="submit"};T.inherit(Q,Z),Q.prototype.event_handler=function(t,e,n){n.element=e,t.preventDefault()},Q.prototype.after_track_handler=function(t,e){setTimeout((function(){e.element.submit()}),0)};var J=q("lock"),V=function(t,e){e=e||{},this.storageKey=t,this.storage=e.storage||window.localStorage,this.pollIntervalMS=e.pollIntervalMS||100,this.timeoutMS=e.timeoutMS||2e3};V.prototype.withLock=function(t,e,n){n||"function"==typeof e||(n=e,e=null);var r=n||(new Date).getTime()+"|"+Math.random(),i=(new Date).getTime(),o=this.storageKey,s=this.pollIntervalMS,a=this.timeoutMS,c=this.storage,u=o+":X",l=o+":Y",p=o+":Z",d=function(t){e&&e(t)},f=function(t){if((new Date).getTime()-i>a)return J.error("Timeout waiting for mutex on "+o+"; clearing lock. ["+r+"]"),c.removeItem(p),c.removeItem(l),void m();setTimeout((function(){try{t()}catch(t){d(t)}}),s*(Math.random()+.1))},h=function(t,e){t()?e():f((function(){h(t,e)}))},g=function(){var t=c.getItem(l);if(t&&t!==r)return!1;if(c.setItem(l,r),c.getItem(l)===r)return!0;if(!M(c,!0))throw new Error("localStorage support dropped while acquiring lock");return!1},m=function(){c.setItem(u,r),h(g,(function(){c.getItem(u)!==r?f((function(){c.getItem(l)===r?h((function(){return!c.getItem(p)}),_):m()})):_()}))},_=function(){c.setItem(p,"1");try{t()}finally{c.removeItem(p),c.getItem(l)===r&&c.removeItem(l),c.getItem(u)===r&&c.removeItem(u)}};try{if(!M(c,!0))throw new Error("localStorage support check failed");m()}catch(t){d(t)}};var Y=q("batch"),X=function(t,e){e=e||{},this.storageKey=t,this.storage=e.storage||window.localStorage,this.reportError=e.errorReporter||T.bind(Y.error,Y),this.lock=new V(t,{storage:this.storage}),this.pid=e.pid||null,this.memQueue=[]};X.prototype.enqueue=function(t,e,n){var r={id:N(),flushAfter:(new Date).getTime()+2*e,payload:t};this.lock.withLock(T.bind((function(){var e;try{var i=this.readFromStorage();i.push(r),(e=this.saveToStorage(i))&&this.memQueue.push(r)}catch(n){this.reportError("Error enqueueing item",t),e=!1}n&&n(e)}),this),T.bind((function(t){this.reportError("Error acquiring storage lock",t),n&&n(!1)}),this),this.pid)},X.prototype.fillBatch=function(t){var e=this.memQueue.slice(0,t);if(e.length<t){var n=this.readFromStorage();if(n.length){var r={};T.each(e,(function(t){r[t.id]=!0}));for(var i=0;i<n.length;i++){var o=n[i];if((new Date).getTime()>o.flushAfter&&!r[o.id]&&(o.orphaned=!0,e.push(o),e.length>=t))break}}}return e};var tt=function(t,e){var n=[];return T.each(t,(function(t){t.id&&!e[t.id]&&n.push(t)})),n};X.prototype.removeItemsByID=function(t,e){var n={};T.each(t,(function(t){n[t]=!0})),this.memQueue=tt(this.memQueue,n);var r=T.bind((function(){var e;try{var r=this.readFromStorage();if(r=tt(r,n),e=this.saveToStorage(r)){r=this.readFromStorage();for(var i=0;i<r.length;i++){var o=r[i];if(o.id&&n[o.id])return this.reportError("Item not removed from storage"),!1}}}catch(n){this.reportError("Error removing items",t),e=!1}return e}),this);this.lock.withLock((function(){var t=r();e&&e(t)}),T.bind((function(t){var n=!1;if(this.reportError("Error acquiring storage lock",t),!M(this.storage,!0)&&!(n=r()))try{this.storage.removeItem(this.storageKey)}catch(t){this.reportError("Error clearing queue",t)}e&&e(n)}),this),this.pid)};var et=function(t,e){var n=[];return T.each(t,(function(t){var r=t.id;if(r in e){var i=e[r];null!==i&&(t.payload=i,n.push(t))}else n.push(t)})),n};X.prototype.updatePayloads=function(t,e){this.memQueue=et(this.memQueue,t),this.lock.withLock(T.bind((function(){var n;try{var r=this.readFromStorage();r=et(r,t),n=this.saveToStorage(r)}catch(e){this.reportError("Error updating items",t),n=!1}e&&e(n)}),this),T.bind((function(t){this.reportError("Error acquiring storage lock",t),e&&e(!1)}),this),this.pid)},X.prototype.readFromStorage=function(){var t;try{(t=this.storage.getItem(this.storageKey))&&(t=K(t),T.isArray(t)||(this.reportError("Invalid storage entry:",t),t=null))}catch(e){this.reportError("Error retrieving queue",e),t=null}return t||[]},X.prototype.saveToStorage=function(t){try{return this.storage.setItem(this.storageKey,W(t)),!0}catch(t){return this.reportError("Error saving queue",t),!1}},X.prototype.clear=function(){this.memQueue=[],this.storage.removeItem(this.storageKey)};var nt=q("batch"),rt=function(t,e){this.errorReporter=e.errorReporter,this.queue=new X(t,{errorReporter:T.bind(this.reportError,this),storage:e.storage}),this.libConfig=e.libConfig,this.sendRequest=e.sendRequestFunc,this.beforeSendHook=e.beforeSendHook,this.stopAllBatching=e.stopAllBatchingFunc,this.batchSize=this.libConfig.batch_size,this.flushInterval=this.libConfig.batch_flush_interval_ms,this.stopped=!this.libConfig.batch_autostart,this.consecutiveRemovalFailures=0};rt.prototype.enqueue=function(t,e){this.queue.enqueue(t,this.flushInterval,e)},rt.prototype.start=function(){this.stopped=!1,this.consecutiveRemovalFailures=0,this.flush()},rt.prototype.stop=function(){this.stopped=!0,this.timeoutID&&(clearTimeout(this.timeoutID),this.timeoutID=null)},rt.prototype.clear=function(){this.queue.clear()},rt.prototype.resetBatchSize=function(){this.batchSize=this.libConfig.batch_size},rt.prototype.resetFlush=function(){this.scheduleFlush(this.libConfig.batch_flush_interval_ms)},rt.prototype.scheduleFlush=function(t){this.flushInterval=t,this.stopped||(this.timeoutID=setTimeout(T.bind(this.flush,this),this.flushInterval))},rt.prototype.flush=function(t){try{if(this.requestInProgress)return void nt.log("Flush: Request already in progress");t=t||{};var e=this.libConfig.batch_request_timeout_ms,n=(new Date).getTime(),r=this.batchSize,i=this.queue.fillBatch(r),o=[],s={};if(T.each(i,(function(t){var e=t.payload;this.beforeSendHook&&!t.orphaned&&(e=this.beforeSendHook(e)),e&&o.push(e),s[t.id]=e}),this),o.length<1)return void this.resetFlush();this.requestInProgress=!0;var a=T.bind((function(o){this.requestInProgress=!1;try{var a=!1;if(t.unloading)this.queue.updatePayloads(s);else if(T.isObject(o)&&"timeout"===o.error&&(new Date).getTime()-n>=e)this.reportError("Network timeout; retrying"),this.flush();else if(T.isObject(o)&&o.xhr_req&&(o.xhr_req.status>=500||429===o.xhr_req.status||"timeout"===o.error)){var c=2*this.flushInterval,u=o.xhr_req.responseHeaders;if(u){var l=u["Retry-After"];l&&(c=1e3*parseInt(l,10)||c)}c=Math.min(6e5,c),this.reportError("Error; retry in "+c+" ms"),this.scheduleFlush(c)}else if(T.isObject(o)&&o.xhr_req&&413===o.xhr_req.status)if(i.length>1){var p=Math.max(1,Math.floor(r/2));this.batchSize=Math.min(this.batchSize,p,i.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush()}else this.reportError("Single-event request too large; dropping",i),this.resetBatchSize(),a=!0;else a=!0;a&&this.queue.removeItemsByID(T.map(i,(function(t){return t.id})),T.bind((function(t){t?(this.consecutiveRemovalFailures=0,this.flush()):(this.reportError("Failed to remove items from queue"),++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush())}),this))}catch(t){this.reportError("Error handling API response",t),this.resetFlush()}}),this),c={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:e};t.unloading&&(c.transport="sendBeacon"),nt.log("MIXPANEL REQUEST:",o),this.sendRequest(o,c,a)}catch(t){this.reportError("Error flushing request queue",t),this.resetFlush()}},rt.prototype.reportError=function(t,e){if(nt.error.apply(nt.error,arguments),this.errorReporter)try{e instanceof Error||(e=new Error(t)),this.errorReporter(t,e)}catch(e){nt.error(e)}};function it(t,e){gt(!0,t,e)}function ot(t,e){gt(!1,t,e)}function st(t,e){return"1"===ht(t,e)}function at(t,n){if(function(t){if(t&&t.ignoreDnt)return!1;var n=t&&t.window||e,r=n.navigator||{},i=!1;return T.each([r.doNotTrack,r.msDoNotTrack,n.doNotTrack],(function(t){T.includes([!0,1,"1","yes"],t)&&(i=!0)})),i}(n))return D.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var r="0"===ht(t,n);return r&&D.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),r}function ct(t){return mt(t,(function(t){return this.get_config(t)}))}function ut(t){return mt(t,(function(t){return this._get_config(t)}))}function lt(t){return mt(t,(function(t){return this._get_config(t)}))}function pt(t,e){dt(e=e||{}).remove(ft(t,e),!!e.crossSubdomainCookie,e.cookieDomain)}function dt(t){return"localStorage"===(t=t||{}).persistenceType?T.localStorage:T.cookie}function ft(t,e){return((e=e||{}).persistencePrefix||"__mp_opt_in_out_")+t}function ht(t,e){return dt(e).get(ft(t,e))}function gt(t,e,n){T.isString(e)&&e.length?(dt(n=n||{}).set(ft(e,n),t?1:0,T.isNumber(n.cookieExpiration)?n.cookieExpiration:null,!!n.crossSubdomainCookie,!!n.secureCookie,!!n.crossSiteCookie,n.cookieDomain),n.track&&t&&n.track(n.trackEventName||"$opt_in",n.trackProperties,{send_immediately:!0})):D.error("gdpr."+(t?"optIn":"optOut")+" called with an invalid token")}function mt(t,e){return function(){var n=!1;try{var r=e.call(this,"token"),i=e.call(this,"ignore_dnt"),o=e.call(this,"opt_out_tracking_persistence_type"),s=e.call(this,"opt_out_tracking_cookie_prefix"),a=e.call(this,"window");r&&(n=at(r,{ignoreDnt:i,persistenceType:o,persistencePrefix:s,window:a}))}catch(t){D.error("Unexpected error when checking tracking opt-out status: "+t)}if(!n)return t.apply(this,arguments);var c=arguments[arguments.length-1];"function"==typeof c&&c(0)}}var _t="$set",vt="$set_once",yt="$unset",bt="$add",wt="$append",kt="$union",St="$remove",xt={set_action:function(t,e){var n={},r={};return T.isObject(t)?T.each(t,(function(t,e){this._is_reserved_property(e)||(r[e]=t)}),this):r[t]=e,n.$set=r,n},unset_action:function(t){var e={},n=[];return T.isArray(t)||(t=[t]),T.each(t,(function(t){this._is_reserved_property(t)||n.push(t)}),this),e.$unset=n,e},set_once_action:function(t,e){var n={},r={};return T.isObject(t)?T.each(t,(function(t,e){this._is_reserved_property(e)||(r[e]=t)}),this):r[t]=e,n.$set_once=r,n},union_action:function(t,e){var n={},r={};return T.isObject(t)?T.each(t,(function(t,e){this._is_reserved_property(e)||(r[e]=T.isArray(t)?t:[t])}),this):r[t]=T.isArray(e)?e:[e],n.$union=r,n},append_action:function(t,e){var n={},r={};return T.isObject(t)?T.each(t,(function(t,e){this._is_reserved_property(e)||(r[e]=t)}),this):r[t]=e,n.$append=r,n},remove_action:function(t,e){var n={},r={};return T.isObject(t)?T.each(t,(function(t,e){this._is_reserved_property(e)||(r[e]=t)}),this):r[t]=e,n.$remove=r,n},delete_action:function(){var t={$delete:""};return t}},Ot=function(){};T.extend(Ot.prototype,xt),Ot.prototype._init=function(t,e,n){this._mixpanel=t,this._group_key=e,this._group_id=n},Ot.prototype.set=lt((function(t,e,n){var r=this.set_action(t,e);return T.isObject(t)&&(n=e),this._send_request(r,n)})),Ot.prototype.set_once=lt((function(t,e,n){var r=this.set_once_action(t,e);return T.isObject(t)&&(n=e),this._send_request(r,n)})),Ot.prototype.unset=lt((function(t,e){var n=this.unset_action(t);return this._send_request(n,e)})),Ot.prototype.union=lt((function(t,e,n){T.isObject(t)&&(n=e);var r=this.union_action(t,e);return this._send_request(r,n)})),Ot.prototype.delete=lt((function(t){var e=this.delete_action();return this._send_request(e,t)})),Ot.prototype.remove=lt((function(t,e,n){var r=this.remove_action(t,e);return this._send_request(r,n)})),Ot.prototype._send_request=function(t,e){t.$group_key=this._group_key,t.$group_id=this._group_id,t.$token=this._get_config("token");var n=T.encodeDates(t);return this._mixpanel._track_or_batch({type:"groups",data:n,endpoint:this._get_config("api_host")+"/groups/",batcher:this._mixpanel.request_batchers.groups},e)},Ot.prototype._is_reserved_property=function(t){return"$group_key"===t||"$group_id"===t},Ot.prototype._get_config=function(t){return this._mixpanel.get_config(t)},Ot.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id},Ot.prototype.remove=Ot.prototype.remove,Ot.prototype.set=Ot.prototype.set,Ot.prototype.set_once=Ot.prototype.set_once,Ot.prototype.union=Ot.prototype.union,Ot.prototype.unset=Ot.prototype.unset,Ot.prototype.toString=Ot.prototype.toString;var Et=function(){};T.extend(Et.prototype,xt),Et.prototype._init=function(t){this._mixpanel=t},Et.prototype.set=ut((function(t,e,n){var r=this.set_action(t,e);return T.isObject(t)&&(n=e),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),r.$set=T.extend({},T.info.people_properties(),this._mixpanel.persistence.get_referrer_info(),r.$set),this._send_request(r,n)})),Et.prototype.set_once=ut((function(t,e,n){var r=this.set_once_action(t,e);return T.isObject(t)&&(n=e),this._send_request(r,n)})),Et.prototype.unset=ut((function(t,e){var n=this.unset_action(t);return this._send_request(n,e)})),Et.prototype.increment=ut((function(t,e,n){var r={},i={};return T.isObject(t)?(T.each(t,(function(t,e){if(!this._is_reserved_property(e)){if(isNaN(parseFloat(t)))return void D.error("Invalid increment value passed to mixpanel.people.increment - must be a number");i[e]=t}}),this),n=e):(T.isUndefined(e)&&(e=1),i[t]=e),r.$add=i,this._send_request(r,n)})),Et.prototype.append=ut((function(t,e,n){T.isObject(t)&&(n=e);var r=this.append_action(t,e);return this._send_request(r,n)})),Et.prototype.remove=ut((function(t,e,n){T.isObject(t)&&(n=e);var r=this.remove_action(t,e);return this._send_request(r,n)})),Et.prototype.union=ut((function(t,e,n){T.isObject(t)&&(n=e);var r=this.union_action(t,e);return this._send_request(r,n)})),Et.prototype.track_charge=ut((function(t,e,n){if(T.isNumber(t)||(t=parseFloat(t),!isNaN(t)))return this.append("$transactions",T.extend({$amount:t},e),n);D.error("Invalid value passed to mixpanel.people.track_charge - must be a number")})),Et.prototype.clear_charges=function(t){return this.set("$transactions",[],t)},Et.prototype.delete_user=function(){if(this._identify_called()){var t={$delete:this._mixpanel.get_distinct_id()};return this._send_request(t)}D.error("mixpanel.people.delete_user() requires you to call identify() first")},Et.prototype.toString=function(){return this._mixpanel.toString()+".people"},Et.prototype._send_request=function(t,e){t.$token=this._get_config("token"),t.$distinct_id=this._mixpanel.get_distinct_id();var n=this._mixpanel.get_property("$device_id"),r=this._mixpanel.get_property("$user_id"),i=this._mixpanel.get_property("$had_persisted_distinct_id");n&&(t.$device_id=n),r&&(t.$user_id=r),i&&(t.$had_persisted_distinct_id=i);var o=T.encodeDates(t);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:o,endpoint:this._get_config("api_host")+"/engage/",batcher:this._mixpanel.request_batchers.people},e):(this._enqueue(t),T.isUndefined(e)||(this._get_config("verbose")?e({status:-1,error:null}):e(-1)),T.truncate(o,255))},Et.prototype._get_config=function(t){return this._mixpanel.get_config(t)},Et.prototype._identify_called=function(){return!0===this._mixpanel._flags.identify_called},Et.prototype._enqueue=function(t){_t in t?this._mixpanel.persistence._add_to_people_queue(_t,t):vt in t?this._mixpanel.persistence._add_to_people_queue(vt,t):yt in t?this._mixpanel.persistence._add_to_people_queue(yt,t):bt in t?this._mixpanel.persistence._add_to_people_queue(bt,t):wt in t?this._mixpanel.persistence._add_to_people_queue(wt,t):St in t?this._mixpanel.persistence._add_to_people_queue(St,t):kt in t?this._mixpanel.persistence._add_to_people_queue(kt,t):D.error("Invalid call to _enqueue():",t)},Et.prototype._flush_one_queue=function(t,e,n,r){var i=this,o=T.extend({},this._mixpanel.persistence._get_queue(t)),s=o;T.isUndefined(o)||!T.isObject(o)||T.isEmptyObject(o)||(i._mixpanel.persistence._pop_from_people_queue(t,o),r&&(s=r(o)),e.call(i,s,(function(e,r){0===e&&i._mixpanel.persistence._add_to_people_queue(t,o),T.isUndefined(n)||n(e,r)})))},Et.prototype._flush=function(t,e,n,r,i,o,s){var a=this,c=this._mixpanel.persistence._get_queue(wt),u=this._mixpanel.persistence._get_queue(St);if(this._flush_one_queue(_t,this.set,t),this._flush_one_queue(vt,this.set_once,r),this._flush_one_queue(yt,this.unset,o,(function(t){return T.keys(t)})),this._flush_one_queue(bt,this.increment,e),this._flush_one_queue(kt,this.union,i),!T.isUndefined(c)&&T.isArray(c)&&c.length){for(var l,p=function(t,e){0===t&&a._mixpanel.persistence._add_to_people_queue(wt,l),T.isUndefined(n)||n(t,e)},d=c.length-1;d>=0;d--)l=c.pop(),T.isEmptyObject(l)||a.append(l,p);a._mixpanel.persistence.save()}if(!T.isUndefined(u)&&T.isArray(u)&&u.length){for(var f,h=function(t,e){0===t&&a._mixpanel.persistence._add_to_people_queue(St,f),T.isUndefined(s)||s(t,e)},g=u.length-1;g>=0;g--)f=u.pop(),T.isEmptyObject(f)||a.remove(f,h);a._mixpanel.persistence.save()}},Et.prototype._is_reserved_property=function(t){return"$distinct_id"===t||"$token"===t||"$device_id"===t||"$user_id"===t||"$had_persisted_distinct_id"===t},Et.prototype.set=Et.prototype.set,Et.prototype.set_once=Et.prototype.set_once,Et.prototype.unset=Et.prototype.unset,Et.prototype.increment=Et.prototype.increment,Et.prototype.append=Et.prototype.append,Et.prototype.remove=Et.prototype.remove,Et.prototype.union=Et.prototype.union,Et.prototype.track_charge=Et.prototype.track_charge,Et.prototype.clear_charges=Et.prototype.clear_charges,Et.prototype.delete_user=Et.prototype.delete_user,Et.prototype.toString=Et.prototype.toString;var Pt,Ct,It="__mps",jt="__mpso",Bt="__mpus",At="__mpa",Tt="__mpap",Dt="__mpr",Lt="__mpu",qt="$people_distinct_id",Ft="__alias",Ut="__timers",Mt=[It,jt,Bt,At,Tt,Dt,Lt,qt,Ft,Ut],Rt=function(t){this.props={},this.campaign_params_saved=!1,t.persistence_name?this.name="mp_"+t.persistence_name:this.name="mp_"+t.token+"_mixpanel";var e=t.persistence;"cookie"!==e&&"localStorage"!==e&&(D.critical("Unknown persistence type "+e+"; falling back to cookie"),e=t.persistence="cookie"),"localStorage"===e&&T.localStorage.is_supported()?this.storage=T.localStorage:this.storage=T.cookie,this.load(),this.update_config(t),this.upgrade(t),this.save()};Rt.prototype.properties=function(){var t={};return T.each(this.props,(function(e,n){T.include(Mt,n)||(t[n]=e)})),t},Rt.prototype.load=function(){if(!this.disabled){var t=this.storage.parse(this.name);t&&(this.props=T.extend({},t))}},Rt.prototype.upgrade=function(t){var e,n,r=t.upgrade;r&&(e="mp_super_properties","string"==typeof r&&(e=r),n=this.storage.parse(e),this.storage.remove(e),this.storage.remove(e,!0),n&&(this.props=T.extend(this.props,n.all,n.events))),t.cookie_name||"mixpanel"===t.name||(e="mp_"+t.token+"_"+t.name,(n=this.storage.parse(e))&&(this.storage.remove(e),this.storage.remove(e,!0),this.register_once(n))),this.storage===T.localStorage&&(n=T.cookie.parse(this.name),T.cookie.remove(this.name),T.cookie.remove(this.name,!0),n&&this.register_once(n))},Rt.prototype.save=function(){this.disabled||this.storage.set(this.name,T.JSONEncode(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)},Rt.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)},Rt.prototype.clear=function(){this.remove(),this.props={}},Rt.prototype.register_once=function(t,e,n){return!!T.isObject(t)&&(void 0===e&&(e="None"),this.expire_days=void 0===n?this.default_expiry:n,T.each(t,(function(t,n){this.props.hasOwnProperty(n)&&this.props[n]!==e||(this.props[n]=t)}),this),this.save(),!0)},Rt.prototype.register=function(t,e){return!!T.isObject(t)&&(this.expire_days=void 0===e?this.default_expiry:e,T.extend(this.props,t),this.save(),!0)},Rt.prototype.unregister=function(t){t in this.props&&(delete this.props[t],this.save())},Rt.prototype.update_campaign_params=function(){this.campaign_params_saved||(this.register_once(T.info.campaignParams()),this.campaign_params_saved=!0)},Rt.prototype.update_search_keyword=function(t){this.register(T.info.searchInfo(t))},Rt.prototype.update_referrer_info=function(t){this.register_once({$initial_referrer:t||"$direct",$initial_referring_domain:T.info.referringDomain(t)||"$direct"},"")},Rt.prototype.get_referrer_info=function(){return T.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},Rt.prototype.safe_merge=function(t){return T.each(this.props,(function(e,n){n in t||(t[n]=e)})),t},Rt.prototype.update_config=function(t){this.default_expiry=this.expire_days=t.cookie_expiration,this.set_disabled(t.disable_persistence),this.set_cookie_domain(t.cookie_domain),this.set_cross_site(t.cross_site_cookie),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie)},Rt.prototype.set_disabled=function(t){this.disabled=t,this.disabled?this.remove():this.save()},Rt.prototype.set_cookie_domain=function(t){t!==this.cookie_domain&&(this.remove(),this.cookie_domain=t,this.save())},Rt.prototype.set_cross_site=function(t){t!==this.cross_site&&(this.cross_site=t,this.remove(),this.save())},Rt.prototype.set_cross_subdomain=function(t){t!==this.cross_subdomain&&(this.cross_subdomain=t,this.remove(),this.save())},Rt.prototype.get_cross_subdomain=function(){return this.cross_subdomain},Rt.prototype.set_secure=function(t){t!==this.secure&&(this.secure=!!t,this.remove(),this.save())},Rt.prototype._add_to_people_queue=function(t,e){var n=this._get_queue_key(t),r=e[t],i=this._get_or_create_queue(_t),o=this._get_or_create_queue(vt),s=this._get_or_create_queue(yt),a=this._get_or_create_queue(bt),c=this._get_or_create_queue(kt),u=this._get_or_create_queue(St,[]),l=this._get_or_create_queue(wt,[]);n===It?(T.extend(i,r),this._pop_from_people_queue(bt,r),this._pop_from_people_queue(kt,r),this._pop_from_people_queue(yt,r)):n===jt?(T.each(r,(function(t,e){e in o||(o[e]=t)})),this._pop_from_people_queue(yt,r)):n===Bt?T.each(r,(function(t){T.each([i,o,a,c],(function(e){t in e&&delete e[t]})),T.each(l,(function(e){t in e&&delete e[t]})),s[t]=!0})):n===At?(T.each(r,(function(t,e){e in i?i[e]+=t:(e in a||(a[e]=0),a[e]+=t)}),this),this._pop_from_people_queue(yt,r)):n===Lt?(T.each(r,(function(t,e){T.isArray(t)&&(e in c||(c[e]=[]),c[e]=c[e].concat(t))})),this._pop_from_people_queue(yt,r)):n===Dt?(u.push(r),this._pop_from_people_queue(wt,r)):n===Tt&&(l.push(r),this._pop_from_people_queue(yt,r)),D.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),D.log(e),this.save()},Rt.prototype._pop_from_people_queue=function(t,e){var n=this._get_queue(t);T.isUndefined(n)||(T.each(e,(function(e,r){t===wt||t===St?T.each(n,(function(t){t[r]===e&&delete t[r]})):delete n[r]}),this),this.save())},Rt.prototype._get_queue_key=function(t){return t===_t?It:t===vt?jt:t===yt?Bt:t===bt?At:t===wt?Tt:t===St?Dt:t===kt?Lt:void D.error("Invalid queue:",t)},Rt.prototype._get_queue=function(t){return this.props[this._get_queue_key(t)]},Rt.prototype._get_or_create_queue=function(t,e){var n=this._get_queue_key(t);return e=T.isUndefined(e)?{}:e,this.props[n]||(this.props[n]=e)},Rt.prototype.set_event_timer=function(t,e){var n=this.props.__timers||{};n[t]=e,this.props.__timers=n,this.save()},Rt.prototype.remove_event_timer=function(t){var e=(this.props.__timers||{})[t];return T.isUndefined(e)||(delete this.props.__timers[t],this.save()),e};var Nt=function(t){return t},Ht=function(){},$t="mixpanel",zt="base64",Wt=e.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,Kt=!Wt&&-1===E.indexOf("MSIE")&&-1===E.indexOf("Mozilla"),Zt=null;k.sendBeacon&&(Zt=function(){return k.sendBeacon.apply(k,arguments)});var Gt={api_host:"https://api-js.mixpanel.com",api_method:"POST",api_transport:"XHR",api_payload_format:zt,app_host:"https://mixpanel.com",cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:Ht,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:Ht,store_google:!0,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{}},Qt=!1,Jt=function(){},Vt=function(t,e,r){var i,o=r===$t?Ct:Ct[r];if(o&&0===Pt)i=o;else{if(o&&!T.isArray(o))return void D.error("You have already initialized "+r);i=new Jt}return i._cached_groups={},i._init(t,e,r),i.people=new Et,i.people._init(i),n.DEBUG=n.DEBUG||i.get_config("debug"),!T.isUndefined(o)&&T.isArray(o)&&(i._execute_array.call(i.people,o.people),i._execute_array(o)),i};Jt.prototype.init=function(t,e,n){if(T.isUndefined(n))this.report_error("You must name your new library: init(token, config, name)");else{if(n!==$t){var r=Vt(t,e,n);return Ct[n]=r,r._loaded(),r}this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet")}},Jt.prototype._init=function(t,n,r){n=n||{},this.__loaded=!0,this.config={};var i={};"api_payload_format"in n||(n.api_host||Gt.api_host).match(/\.mixpanel\.com$/)&&(i.api_payload_format="json");if(this.set_config(T.extend({},Gt,i,n,{name:r,token:t,callback_fn:(r===$t?r:"mixpanel."+r)+"._jsc"})),this._jsc=Ht,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests)if(T.localStorage.is_supported(!0)&&Wt){if(this.init_batchers(),Zt&&e.addEventListener){var o=T.bind((function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})}),this);e.addEventListener("pagehide",(function(t){t.persisted&&o()})),e.addEventListener("visibilitychange",(function(){"hidden"===S.visibilityState&&o()}))}}else this._batch_requests=!1,D.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support");this.persistence=this.cookie=new Rt(this.config),this.unpersisted_superprops={},this._gdpr_init();var s=T.UUID();this.get_distinct_id()||this.register_once({distinct_id:s,$device_id:s},"")},Jt.prototype._loaded=function(){this.get_config("loaded")(this),this._set_default_superprops()},Jt.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(S.referrer),this.get_config("store_google")&&this.persistence.update_campaign_params(),this.get_config("save_referrer")&&this.persistence.update_referrer_info(S.referrer)},Jt.prototype._dom_loaded=function(){T.each(this.__dom_loaded_queue,(function(t){this._track_dom.apply(this,t)}),this),this.has_opted_out_tracking()||T.each(this.__request_queue,(function(t){this._send_request.apply(this,t)}),this),delete this.__dom_loaded_queue,delete this.__request_queue},Jt.prototype._track_dom=function(t,e){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!Qt)return this.__dom_loaded_queue.push([t,e]),!1;var n=(new t).init(this);return n.track.apply(n,e)},Jt.prototype._prepare_callback=function(t,e){if(T.isUndefined(t))return null;if(Wt){return function(n){t(n,e)}}var n=this._jsc,r=""+Math.floor(1e8*Math.random()),i=this.get_config("callback_fn")+"["+r+"]";return n[r]=function(i){delete n[r],t(i,e)},i},Jt.prototype._send_request=function(t,e,n,r){var i=!0;if(Kt)return this.__request_queue.push(arguments),i;var o={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},s=null;r||!T.isFunction(n)&&"string"!=typeof n||(r=n,n=null),n=T.extend(o,n||{}),Wt||(n.method="GET");var a="POST"===n.method,c=Zt&&a&&"sendbeacon"===n.transport.toLowerCase(),u=n.verbose;e.verbose&&(u=!0),this.get_config("test")&&(e.test=1),u&&(e.verbose=1),this.get_config("img")&&(e.img=1),Wt||(r?e.callback=r:(u||this.get_config("test"))&&(e.callback="(function(){})")),e.ip=this.get_config("ip")?1:0,e._=(new Date).getTime().toString(),a&&(s="data="+encodeURIComponent(e.data),delete e.data),t+="?"+T.HTTPBuildQuery(e);var l=this;if("img"in e){var p=S.createElement("img");p.src=t,S.body.appendChild(p)}else if(c){try{i=Zt(t,s)}catch(t){l.report_error(t),i=!1}try{r&&r(i?1:0)}catch(t){l.report_error(t)}}else if(Wt)try{var d=new XMLHttpRequest;d.open(n.method,t,!0);var f=this.get_config("xhr_headers");if(a&&(f["Content-Type"]="application/x-www-form-urlencoded"),T.each(f,(function(t,e){d.setRequestHeader(e,t)})),n.timeout_ms&&void 0!==d.timeout){d.timeout=n.timeout_ms;var h=(new Date).getTime()}d.withCredentials=!0,d.onreadystatechange=function(){var t;if(4===d.readyState)if(200===d.status){if(r)if(u){var e;try{e=T.JSONDecode(d.responseText)}catch(t){if(l.report_error(t),!n.ignore_json_errors)return;e=d.responseText}r(e)}else r(Number(d.responseText))}else t=d.timeout&&!d.status&&(new Date).getTime()-h>=d.timeout?"timeout":"Bad HTTP status: "+d.status+" "+d.statusText,l.report_error(t),r&&r(u?{status:0,error:t,xhr_req:d}:0)},d.send(s)}catch(t){l.report_error(t),i=!1}else{var g=S.createElement("script");g.type="text/javascript",g.async=!0,g.defer=!0,g.src=t;var m=S.getElementsByTagName("script")[0];m.parentNode.insertBefore(g,m)}return i},Jt.prototype._execute_array=function(t){var e,n=[],r=[],i=[];T.each(t,(function(t){t&&(e=t[0],T.isArray(e)?i.push(t):"function"==typeof t?t.call(this):T.isArray(t)&&"alias"===e?n.push(t):T.isArray(t)&&-1!==e.indexOf("track")&&"function"==typeof this[e]?i.push(t):r.push(t))}),this);var o=function(t,e){T.each(t,(function(t){if(T.isArray(t[0])){var n=e;T.each(t,(function(t){n=n[t[0]].apply(n,t.slice(1))}))}else this[t[0]].apply(this,t.slice(1))}),e)};o(n,this),o(r,this),o(i,this)},Jt.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events},Jt.prototype.init_batchers=function(){var t=this.get_config("token");if(!this.are_batchers_initialized()){var e=T.bind((function(e){return new rt("__mpq_"+t+e.queue_suffix,{libConfig:this.config,sendRequestFunc:T.bind((function(t,n,r){this._send_request(this.get_config("api_host")+e.endpoint,this._encode_data_for_request(t),n,this._prepare_callback(r,t))}),this),beforeSendHook:T.bind((function(t){return this._run_hook("before_send_"+e.type,t)}),this),errorReporter:this.get_config("error_reporter"),stopAllBatchingFunc:T.bind(this.stop_batch_senders,this)})}),this);this.request_batchers={events:e({type:"events",endpoint:"/track/",queue_suffix:"_ev"}),people:e({type:"people",endpoint:"/engage/",queue_suffix:"_pp"}),groups:e({type:"groups",endpoint:"/groups/",queue_suffix:"_gr"})}}this.get_config("batch_autostart")&&this.start_batch_senders()},Jt.prototype.start_batch_senders=function(){this.are_batchers_initialized()&&(this._batch_requests=!0,T.each(this.request_batchers,(function(t){t.start()})))},Jt.prototype.stop_batch_senders=function(){this._batch_requests=!1,T.each(this.request_batchers,(function(t){t.stop(),t.clear()}))},Jt.prototype.push=function(t){this._execute_array([t])},Jt.prototype.disable=function(t){void 0===t?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(t)},Jt.prototype._encode_data_for_request=function(t){var e=T.JSONEncode(t);return this.get_config("api_payload_format")===zt&&(e=T.base64Encode(e)),{data:e}},Jt.prototype._track_or_batch=function(t,e){var n=T.truncate(t.data,255),r=t.endpoint,i=t.batcher,o=t.should_send_immediately,s=t.send_request_options||{};e=e||Ht;var a=!0,c=T.bind((function(){return s.skip_hooks||(n=this._run_hook("before_send_"+t.type,n)),n?(D.log("MIXPANEL REQUEST:"),D.log(n),this._send_request(r,this._encode_data_for_request(n),s,this._prepare_callback(e,n))):null}),this);return this._batch_requests&&!o?i.enqueue(n,(function(t){t?e(1,n):c()})):a=c(),a&&n},Jt.prototype.track=ct((function(t,e,n,r){r||"function"!=typeof n||(r=n,n=null);var i=(n=n||{}).transport;i&&(n.transport=i);var o=n.send_immediately;if("function"!=typeof r&&(r=Ht),T.isUndefined(t))this.report_error("No event name provided to mixpanel.track");else{if(!this._event_is_disabled(t)){(e=e||{}).token=this.get_config("token");var s=this.persistence.remove_event_timer(t);if(!T.isUndefined(s)){var a=(new Date).getTime()-s;e.$duration=parseFloat((a/1e3).toFixed(3))}this._set_default_superprops(),e=T.extend({},T.info.properties(),this.persistence.properties(),this.unpersisted_superprops,e);var c=this.get_config("property_blacklist");T.isArray(c)?T.each(c,(function(t){delete e[t]})):this.report_error("Invalid value for property_blacklist config: "+c);var u={event:t,properties:e};return this._track_or_batch({type:"events",data:u,endpoint:this.get_config("api_host")+"/track/",batcher:this.request_batchers.events,should_send_immediately:o,send_request_options:n},r)}r(0)}})),Jt.prototype.set_group=ct((function(t,e,n){T.isArray(e)||(e=[e]);var r={};return r[t]=e,this.register(r),this.people.set(t,e,n)})),Jt.prototype.add_group=ct((function(t,e,n){var r=this.get_property(t);if(void 0===r){var i={};i[t]=[e],this.register(i)}else-1===r.indexOf(e)&&(r.push(e),this.register(i));return this.people.union(t,e,n)})),Jt.prototype.remove_group=ct((function(t,e,n){var r=this.get_property(t);if(void 0!==r){var i=r.indexOf(e);i>-1&&(r.splice(i,1),this.register({group_key:r})),0===r.length&&this.unregister(t)}return this.people.remove(t,e,n)})),Jt.prototype.track_with_groups=ct((function(t,e,n,r){var i=T.extend({},e||{});return T.each(n,(function(t,e){null!=t&&(i[e]=t)})),this.track(t,i,r)})),Jt.prototype._create_map_key=function(t,e){return t+"_"+JSON.stringify(e)},Jt.prototype._remove_group_from_cache=function(t,e){delete this._cached_groups[this._create_map_key(t,e)]},Jt.prototype.get_group=function(t,e){var n=this._create_map_key(t,e),r=this._cached_groups[n];return void 0!==r&&r._group_key===t&&r._group_id===e||((r=new Ot)._init(this,t,e),this._cached_groups[n]=r),r},Jt.prototype.track_pageview=function(t){T.isUndefined(t)&&(t=S.location.href),this.track("mp_page_view",T.info.pageviewInfo(t))},Jt.prototype.track_links=function(){return this._track_dom.call(this,G,arguments)},Jt.prototype.track_forms=function(){return this._track_dom.call(this,Q,arguments)},Jt.prototype.time_event=function(t){T.isUndefined(t)?this.report_error("No event name provided to mixpanel.time_event"):this._event_is_disabled(t)||this.persistence.set_event_timer(t,(new Date).getTime())};var Yt={persistent:!0},Xt=function(t){var e;return e=T.isObject(t)?t:T.isUndefined(t)?{}:{days:t},T.extend({},Yt,e)};Jt.prototype.register=function(t,e){var n=Xt(e);n.persistent?this.persistence.register(t,n.days):T.extend(this.unpersisted_superprops,t)},Jt.prototype.register_once=function(t,e,n){var r=Xt(n);r.persistent?this.persistence.register_once(t,e,r.days):(void 0===e&&(e="None"),T.each(t,(function(t,n){this.unpersisted_superprops.hasOwnProperty(n)&&this.unpersisted_superprops[n]!==e||(this.unpersisted_superprops[n]=t)}),this))},Jt.prototype.unregister=function(t,e){(e=Xt(e)).persistent?this.persistence.unregister(t):delete this.unpersisted_superprops[t]},Jt.prototype._register_single=function(t,e){var n={};n[t]=e,this.register(n)},Jt.prototype.identify=function(t,e,n,r,i,o,s,a){var c=this.get_distinct_id();if(this.register({$user_id:t}),!this.get_property("$device_id")){var u=c;this.register_once({$had_persisted_distinct_id:!0,$device_id:u},"")}t!==c&&t!==this.get_property(Ft)&&(this.unregister(Ft),this.register({distinct_id:t})),this._flags.identify_called=!0,this.people._flush(e,n,r,i,o,s,a),t!==c&&this.track("$identify",{distinct_id:t,$anon_distinct_id:c},{skip_hooks:!0})},Jt.prototype.reset=function(){this.persistence.clear(),this._flags.identify_called=!1;var t=T.UUID();this.register_once({distinct_id:t,$device_id:t},"")},Jt.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},Jt.prototype.alias=function(t,e){if(t===this.get_property(qt))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var n=this;return T.isUndefined(e)&&(e=this.get_distinct_id()),t!==e?(this._register_single(Ft,t),this.track("$create_alias",{alias:t,distinct_id:e},{skip_hooks:!0},(function(){n.identify(t)}))):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(t),-1)},Jt.prototype.name_tag=function(t){this._register_single("mp_name_tag",t)},Jt.prototype.set_config=function(t){T.isObject(t)&&(T.extend(this.config,t),t.batch_size&&T.each(this.request_batchers,(function(t){t.resetBatchSize()})),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),n.DEBUG=n.DEBUG||this.get_config("debug"))},Jt.prototype.get_config=function(t){return this.config[t]},Jt.prototype._run_hook=function(t){var e=(this.config.hooks[t]||Nt).apply(this,v.call(arguments,1));return void 0===e&&(this.report_error(t+" hook did not return a value"),e=null),e},Jt.prototype.get_property=function(t){return this.persistence.props[t]},Jt.prototype.toString=function(){var t=this.get_config("name");return t!==$t&&(t="mixpanel."+t),t},Jt.prototype._event_is_disabled=function(t){return T.isBlockedUA(E)||this._flags.disable_all_events||T.include(this.__disabled_events,t)},Jt.prototype._gdpr_init=function(){"localStorage"===this.get_config("opt_out_tracking_persistence_type")&&T.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_tracking()||!this.get_config("opt_out_tracking_by_default")&&!T.cookie.get("mp_optout")||(T.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},Jt.prototype._gdpr_update_persistence=function(t){var e;if(t&&t.clear_persistence)e=!0;else{if(!t||!t.enable_persistence)return;e=!1}this.get_config("disable_persistence")||this.persistence.disabled===e||this.persistence.set_disabled(e),e&&T.each(this.request_batchers,(function(t){t.clear()}))},Jt.prototype._gdpr_call_func=function(t,e){return e=T.extend({track:T.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},e),T.localStorage.is_supported()||(e.persistence_type="cookie"),t(this.get_config("token"),{track:e.track,trackEventName:e.track_event_name,trackProperties:e.track_properties,persistenceType:e.persistence_type,persistencePrefix:e.cookie_prefix,cookieDomain:e.cookie_domain,cookieExpiration:e.cookie_expiration,crossSiteCookie:e.cross_site_cookie,crossSubdomainCookie:e.cross_subdomain_cookie,secureCookie:e.secure_cookie,ignoreDnt:e.ignore_dnt})},Jt.prototype.opt_in_tracking=function(t){t=T.extend({enable_persistence:!0},t),this._gdpr_call_func(it,t),this._gdpr_update_persistence(t)},Jt.prototype.opt_out_tracking=function(t){(t=T.extend({clear_persistence:!0,delete_user:!0},t)).delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(ot,t),this._gdpr_update_persistence(t)},Jt.prototype.has_opted_in_tracking=function(t){return this._gdpr_call_func(st,t)},Jt.prototype.has_opted_out_tracking=function(t){return this._gdpr_call_func(at,t)},Jt.prototype.clear_opt_in_out_tracking=function(t){t=T.extend({enable_persistence:!0},t),this._gdpr_call_func(pt,t),this._gdpr_update_persistence(t)},Jt.prototype.report_error=function(t,e){D.error.apply(D.error,arguments);try{e||t instanceof Error||(t=new Error(t)),this.get_config("error_reporter")(t,e)}catch(e){D.error(e)}},Jt.prototype.init=Jt.prototype.init,Jt.prototype.reset=Jt.prototype.reset,Jt.prototype.disable=Jt.prototype.disable,Jt.prototype.time_event=Jt.prototype.time_event,Jt.prototype.track=Jt.prototype.track,Jt.prototype.track_links=Jt.prototype.track_links,Jt.prototype.track_forms=Jt.prototype.track_forms,Jt.prototype.track_pageview=Jt.prototype.track_pageview,Jt.prototype.register=Jt.prototype.register,Jt.prototype.register_once=Jt.prototype.register_once,Jt.prototype.unregister=Jt.prototype.unregister,Jt.prototype.identify=Jt.prototype.identify,Jt.prototype.alias=Jt.prototype.alias,Jt.prototype.name_tag=Jt.prototype.name_tag,Jt.prototype.set_config=Jt.prototype.set_config,Jt.prototype.get_config=Jt.prototype.get_config,Jt.prototype.get_property=Jt.prototype.get_property,Jt.prototype.get_distinct_id=Jt.prototype.get_distinct_id,Jt.prototype.toString=Jt.prototype.toString,Jt.prototype.opt_out_tracking=Jt.prototype.opt_out_tracking,Jt.prototype.opt_in_tracking=Jt.prototype.opt_in_tracking,Jt.prototype.has_opted_out_tracking=Jt.prototype.has_opted_out_tracking,Jt.prototype.has_opted_in_tracking=Jt.prototype.has_opted_in_tracking,Jt.prototype.clear_opt_in_out_tracking=Jt.prototype.clear_opt_in_out_tracking,Jt.prototype.get_group=Jt.prototype.get_group,Jt.prototype.set_group=Jt.prototype.set_group,Jt.prototype.add_group=Jt.prototype.add_group,Jt.prototype.remove_group=Jt.prototype.remove_group,Jt.prototype.track_with_groups=Jt.prototype.track_with_groups,Jt.prototype.start_batch_senders=Jt.prototype.start_batch_senders,Jt.prototype.stop_batch_senders=Jt.prototype.stop_batch_senders,Rt.prototype.properties=Rt.prototype.properties,Rt.prototype.update_search_keyword=Rt.prototype.update_search_keyword,Rt.prototype.update_referrer_info=Rt.prototype.update_referrer_info,Rt.prototype.get_cross_subdomain=Rt.prototype.get_cross_subdomain,Rt.prototype.clear=Rt.prototype.clear;var te={},ee=function(){Ct.init=function(t,n,r){if(r)return Ct[r]||(Ct[r]=te[r]=Vt(t,n,r),Ct[r]._loaded()),Ct[r];var i=Ct;te.mixpanel?i=te.mixpanel:t&&((i=Vt(t,n,$t))._loaded(),te.mixpanel=i),Ct=i,1===Pt&&(e.mixpanel=Ct),T.each(te,(function(t,e){e!==$t&&(Ct[e]=t)})),Ct._=T}};var ne=(Pt=0,Ct=new Jt,ee(),Ct.init(),function(){function t(){t.done||(t.done=!0,Qt=!0,Kt=!1,T.each(te,(function(t){t._dom_loaded()})))}if(S.addEventListener)"complete"===S.readyState?t():S.addEventListener("DOMContentLoaded",t,!1);else if(S.attachEvent){S.attachEvent("onreadystatechange",t);var n=!1;try{n=null===e.frameElement}catch(t){}S.documentElement.doScroll&&n&&function e(){try{S.documentElement.doScroll("left")}catch(t){return void setTimeout(e,1)}t()}()}T.register_event(e,"load",t,!0)}(),Ct);t.exports=ne}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},function(){"use strict";n(8060),n(1082),n(6232),n(8839),n(3823),n(2790),n(8040),n(4743),n(2969),n(153),n(9576),jQuery(document).ready((function(){window.WPHB_Admin.init(),window.WPHB_Admin.notices.init(),window.wphbMixPanel.init()}))}()}();
|
2 |
//# sourceMappingURL=wphb-app.min.js.map
|
1 |
+
!function(){var t={9576:function(t,e,n){var r=n(8891);!function(){"use strict";window.wphbMixPanel={init:function(){void 0!==wphb.mixpanel&&wphb.mixpanel.enabled&&(r.init("5d545622e3a040aca63f2089b0e6cae7",{opt_out_tracking_by_default:!0,ip:!1}),r.register({plugin:wphb.mixpanel.plugin,plugin_type:wphb.mixpanel.plugin_type,plugin_version:wphb.mixpanel.plugin_version,wp_version:wphb.mixpanel.wp_version,wp_type:wphb.mixpanel.wp_type,locale:wphb.mixpanel.locale,active_theme:wphb.mixpanel.active_theme,php_version:wphb.mixpanel.php_version,mysql_version:wphb.mixpanel.mysql_version,server_type:wphb.mixpanel.server_type}))},optIn:function(){wphb.mixpanel.enabled=!0,this.init(),r.opt_in_tracking()},optOut:function(){r.opt_out_tracking()},deactivate:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.track("plugin_deactivate",{reason:t,feedback:e})},enableFeature:function(t){this.track("plugin_feature_activate",{feature:t})},disableFeature:function(t){this.track("plugin_feature_deactivate",{feature:t})},track:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};void 0!==wphb.mixpanel&&wphb.mixpanel.enabled&&(r.has_opted_out_tracking()||r.track(t,e))}}}()},4743:function(t,e,n){"use strict";n.r(e);var r=n(4218),i=n(3265),o=n(4814);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(){return u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=l(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},u.apply(this,arguments)}function l(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h(t);if(e){var i=h(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function f(t,e){if(e&&("object"===s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}var g,m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(l,t);var e,n,o,s=d(l);function l(){return a(this,l),s.apply(this,arguments)}return e=l,(n=[{key:"step",value:function(t){var e=this;u(h(l.prototype),"step",this).call(this,t),this.currentStep++,t>0?r.Z.advanced.clearOrphanedBatch(3e3).then((function(t){var n=1e3;void 0!==t.highCPU&&t.highCPU?(n=1e4,document.getElementById("site-health-orphanned-speed").classList.remove("sui-hidden")):document.getElementById("site-health-orphanned-speed").classList.add("sui-hidden"),window.setTimeout((function(){e.updateProgressBar(e.getProgress()),e.step(e.totalSteps-e.currentStep)}),n)})):this.onFinish()}},{key:"onStart",value:function(){return document.getElementById("site-health-orphaned-progress").classList.remove("sui-hidden"),document.getElementById("site-health-orphaned-clear").classList.add("sui-button-onload"),Promise.resolve()}},{key:"onFinish",value:function(){u(h(l.prototype),"onFinish",this).call(this),window.SUI.closeModal(),document.getElementById("count-ao-orphaned").innerHTML="0",window.WPHB_Admin.notices.show((0,i.K)("successAoOrphanedPurge"))}}])&&c(e.prototype,n),o&&c(e,o),Object.defineProperty(e,"prototype",{writable:!1}),l}(o.Z);g=jQuery,WPHB_Admin.advanced={module:"advanced",init:function(){var t=this,e=this,n=g("#wphb-system-info-dropdown"),o=window.location.hash;if(g("#wphb-db-delete-all, .wphb-db-row-delete").on("click",(function(t){t.preventDefault(),e.showModal(t.target.dataset.entries,t.target.dataset.type)})),g('form[id="advanced-general-settings"], form[id="advanced-lazy-settings"]').on("submit",(function(t){t.preventDefault();var e=g(this).find(".sui-button-blue");e.addClass("sui-button-onload-text"),r.Z.advanced.saveSettings(g(this).serialize(),t.target.id).then((function(t){e.removeClass("sui-button-onload-text"),void 0!==t&&t.success?WPHB_Admin.notices.show():WPHB_Admin.notices.show((0,i.K)("errorSettingsUpdate"),"error")}))})),g("#wphb-system-info-php").removeClass("sui-hidden"),o){var s=o.replace("#","");g(".wphb-sys-info-table").addClass("sui-hidden"),g("#wphb-system-info-"+s).removeClass("sui-hidden"),n.val(s).trigger("sui:change")}n.on("change",(function(t){t.preventDefault(),g(".wphb-sys-info-table").addClass("sui-hidden"),g("#wphb-system-info-"+g(this).val()).removeClass("sui-hidden"),location.hash=g(this).val()})),g("#wphb-adv-paste-value").on("click",(function(t){t.preventDefault();var e=g('textarea[name="url_strings"]');""===e.val()?e.val(e.attr("placeholder")):e.val(e.val()+"\n"+e.attr("placeholder"))}));var a=document.getElementById("cart_fragments");a&&a.addEventListener("change",(function(t){t.preventDefault(),g("#cart_fragments_desc").toggle()}));for(var c=document.querySelectorAll('input[name="button[alignment][align]"]'),u=document.getElementById("button_margin_l"),l=document.getElementById("button_margin_r"),p=function(t){c[t].addEventListener("change",(function(){"center"===c[t].value&&c[t].checked?(u.setAttribute("disabled","disabled"),l.setAttribute("disabled","disabled"),u.value=0,l.value=0):(u.removeAttribute("disabled"),l.removeAttribute("disabled"))}))},d=0;d<c.length;d++)p(d);g('input[id="lazy_load"]').on("change",(function(){g("#wphb-lazy-load-comments-wrap, #sui-upsell-gravtar-caching").toggle()})),!0===window.location.search.includes("view=lazy")&&this.createPickers();var f=document.getElementById("btn-cache-purge");f&&f.addEventListener("click",(function(){return t.purgeDb()}));var h=document.getElementById("btn-minify-purge");h&&h.addEventListener("click",(function(){return t.purgeDb("minify")}));var _=document.getElementById("site-health-orphaned-clear");return _&&_.addEventListener("click",(function(){var t=document.getElementById("count-ao-orphaned").innerHTML,e=Math.ceil(parseInt(t)/3e3);new m(e,0).start()})),this},showModal:function(t,e){var n,r=g("#wphb-database-cleanup-modal"),o='<span class="sui-icon-trash" aria-hidden="true"></span>';"drafts"===e?(n=(0,i.K)("dbDeleteDrafts"),o+=(0,i.K)("dbDeleteDraftsButton")):(n=(0,i.K)("db_delete")+" "+t+" "+(0,i.K)("db_entries")+"? "+(0,i.K)("db_backup"),o+=(0,i.K)("dbDeleteButton")),r.find("p").html(n),r.find(".sui-button-red").attr("data-type",e).html(o),window.SUI.openModal("wphb-database-cleanup-modal","wpbody-content","wphb-clear-database-confirm",!1)},confirmDelete:function(t){var e;window.SUI.closeModal();var n=g(".box-advanced-db .sui-box-footer");e="all"===t?n:g(".box-advanced-db .wphb-border-frame").find("div[data-type="+t+"]");var o=g("#wphb-db-delete-all"),s=e.find(".wphb-db-row-delete");o.addClass("sui-button-onload-text"),s.addClass("sui-button-onload"),r.Z.advanced.deleteSelectedData(t).then((function(t){for(var e in o.removeClass("sui-button-onload-text"),s.removeClass("sui-button-onload"),t.left)if("total"===e){var r=(0,i.K)("deleteAll")+" ("+t.left[e]+")";n.find(".wphb-db-delete-all").html(r),n.find("#wphb-db-delete-all").attr("data-entries",t.left[e])}else{var a=g(".box-advanced-db div[data-type="+e+"]");a.find(".wphb-db-items").html(t.left[e]),a.find(".wphb-db-row-delete").attr("data-entries",t.left[e]).attr("disabled","0"===t.left[e])}WPHB_Admin.notices.show(t.message)})).catch((function(t){WPHB_Admin.notices.show(t,"error"),o.removeClass("sui-button-onload-text"),s.removeClass("sui-button-onload")}))},createPickers:function(){var t=g(".sui-colorpicker-input");t.wpColorPicker({change:function(t,e){var n=g(this);n.val()!==e.color.toCSS()&&n.val(e.color.toCSS()).trigger("change")}}),t.hasClass("wp-color-picker")&&t.each((function(){var t=g(this),e=t.closest(".sui-colorpicker-wrap"),n=e.find(".sui-colorpicker-value span[role=button]"),r=e.find(".sui-colorpicker-value"),i=t.closest(".wp-picker-container"),o=i.find(".wp-color-result");t.on("change",(function(){n.find("span").css({"background-color":o.css("background-color")}),r.find("input").val(t.val())})),e.find(".sui-button, span[role=button]").on("click",(function(t){o.click(),t.preventDefault(),t.stopPropagation()})),r.find("button").on("click",(function(e){i.find(".wp-picker-clear").click(),r.find("input").val(""),t.val("").trigger("change"),n.find("span").css({"background-color":""}),e.preventDefault(),e.stopPropagation()}))}))},purgeDb:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cache",e=document.getElementById("btn-"+t+"-purge");e&&(e.classList.add("sui-button-onload-text"),r.Z.common.call("wphb_advanced_purge_"+t).then((function(){document.getElementById("count-"+t).innerHTML="0",e.classList.remove("sui-button-onload-text");var n="successAdvPurge"+t.charAt(0).toUpperCase()+t.slice(1);WPHB_Admin.notices.show((0,i.K)(n))})))}}},6232:function(t,e,n){"use strict";n.r(e);var r=n(4218),i=n(3265),o=n(4814);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(){return u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=l(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},u.apply(this,arguments)}function l(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h(t);if(e){var i=h(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function f(t,e){if(e&&("object"===s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}var g,m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(s,t);var e,n,i,o=d(s);function s(){return a(this,s),o.apply(this,arguments)}return e=s,(n=[{key:"step",value:function(t){var e=this;if(u(h(s.prototype),"step",this).call(this,t),this.currentStep++,t>0){var n=20*(this.totalSteps-t);r.Z.caching.clearCacheBatch(20,n).then((function(){e.updateProgressBar(e.getProgress()),e.step(e.totalSteps-e.currentStep)}))}else this.onFinish()}},{key:"onStart",value:function(){var t=this;return r.Z.common.call("wphb_get_network_sites").then((function(e){t.totalSteps=Math.ceil(parseInt(e)/20)}))}},{key:"onFinish",value:function(){u(h(s.prototype),"onFinish",this).call(this),location.reload()}}])&&c(e.prototype,n),i&&c(e,i),Object.defineProperty(e,"prototype",{writable:!1}),s}(o.Z),_=m;g=jQuery,WPHB_Admin.caching={module:"caching",init:function(){var t=this,e=this,n=window.location.hash,o=g('form[id="page_cache-form"]'),s=g('form[id="rss-form"]'),a=g('div[id="wphb-box-caching-gravatar"]'),c=g('form[id="settings-form"]');this.scanner=new _(1,0),n&&g(n).length&&setTimeout((function(){g("html, body").animate({scrollTop:g(n).offset().top},"slow")}),300),o.on("submit",(function(t){t.preventDefault(),e.saveSettings("page_cache",o)})),o.on("click",".sui-box-header .sui-button",(function(t){t.preventDefault(),e.clearCache("page_cache",o)}));var u=document.getElementById("clear_interval");u&&u.addEventListener("change",(function(t){t.preventDefault(),g("#page_cache_clear_interval").toggle()}));var l=document.getElementById("wphb-cancel-cache-preload");l&&l.addEventListener("click",(function(t){t.preventDefault(),r.Z.common.call("wphb_preload_cancel").then((function(){window.location.reload()}))}));var p=document.getElementById("preload");p&&p.addEventListener("change",(function(t){t.preventDefault(),g("#page_cache_preload_type").toggle()})),g("#wphb-remove-advanced-cache").on("click",(function(t){t.preventDefault(),r.Z.common.call("wphb_remove_advanced_cache").then((function(){return location.reload()}))})),g("#configure-link").on("click",(function(t){t.preventDefault(),g("html, body").animate({scrollTop:g("#wphb-box-caching-settings").offset().top},"slow")})),a.on("click",".sui-box-header .sui-button",(function(t){t.preventDefault(),e.clearCache("gravatar",a)})),s.on("submit",(function(t){t.preventDefault();var n=s.find("#rss-expiry-time");n.val(Math.abs(n.val())),e.saveSettings("rss",s)}));var d=document.getElementById("redis-settings-form");d&&d.addEventListener("submit",(function(t){t.preventDefault();var e=document.getElementById("redis-connect-save");e.classList.add("sui-button-onload-text");var n=document.getElementById("redis-host").value,i=document.getElementById("redis-port").value,o=document.getElementById("redis-password").value,s=document.getElementById("redis-db").value,a=document.getElementById("redis-connected").value;i||(i=6379),r.Z.caching.redisSaveSettings(n,i,o,s).then((function(t){if(void 0!==t&&t.success)window.location.search+="1"===a?"&updated=redis-auth-2":"&updated=redis-auth";else{var n=document.getElementById("redis-connect-notice-on-modal");n.innerHTML=t.message,n.parentNode.parentNode.parentNode.classList.remove("sui-hidden"),n.parentNode.parentNode.classList.add("sui-spacing-top--10"),e.classList.remove("sui-button-onload-text")}}))}));var f=document.getElementById("object-cache");f&&f.addEventListener("change",(function(t){t.target.checked?wphbMixPanel.enableFeature("Redis Cache"):wphbMixPanel.disableFeature("Redis Cache"),r.Z.caching.redisObjectCache(t.target.checked).then((function(t){void 0!==t&&t.success?window.location.search+="&updated=redis-object-cache":WPHB_Admin.notices.show((0,i.K)("errorSettingsUpdate"),"error")}))}));var h=document.getElementById("clear-redis-cache");h&&h.addEventListener("click",(function(){h.classList.add("sui-button-onload-text"),r.Z.common.call("wphb_redis_cache_purge").then((function(){h.classList.remove("sui-button-onload-text"),WPHB_Admin.notices.show((0,i.K)("successRedisPurge"))}))}));var m=document.getElementById("redis-disconnect");return m&&m.addEventListener("click",(function(e){e.preventDefault(),t.redisDisable()})),c.on("submit",(function(t){t.preventDefault();var n=g('input[name="detection"]:checked',c).val();"auto"!==n&&"none"!==n||g(".wphb-notice.notice-info").slideUp(),e.saveSettings("other_cache",c)})),this},redisDisable:function(){r.Z.common.call("wphb_redis_disconnect").then((function(){window.location.search+="&updated=redis-disconnect"}))},saveSettings:function(t,e){var n=e.find("button.sui-button");n.addClass("sui-button-onload-text"),r.Z.caching.saveSettings(t,e.serialize()).then((function(e){n.removeClass("sui-button-onload-text"),void 0!==e&&e.success?"page_cache"===t?window.location.search+="&updated=true":WPHB_Admin.notices.show():WPHB_Admin.notices.show((0,i.K)("errorSettingsUpdate"),"error")}))},clearCache:function(t,e){var n=e.find(".sui-box-header .sui-button");n.addClass("sui-button-onload-text"),r.Z.caching.clearCache(t).then((function(e){void 0!==e&&e.success?"page_cache"===t?(g(".box-caching-summary span.sui-summary-large").html("0"),WPHB_Admin.notices.show((0,i.K)("successPageCachePurge"))):"gravatar"===t&&WPHB_Admin.notices.show((0,i.K)("successGravatarPurge")):WPHB_Admin.notices.show((0,i.K)("errorCachePurge"),"error"),n.removeClass("sui-button-onload-text")}))},clearNetworkCache:function(){window.SUI.slideModal("ccnw-slide-two","slide-next","next"),this.scanner.start()}}},8040:function(t,e,n){"use strict";n.r(e);var r,i=n(4218),o=n(3265);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}r=jQuery,WPHB_Admin.cloudflare={module:"cloudflare",init:function(){return wphb.cloudflare.is.connected&&r('input[type="submit"].cloudflare-clear-cache').on("click",function(t){t.preventDefault(),this.purgeCache.apply(r(t.target),[this])}.bind(this)),this.bindActions(),this},bindActions:function(){var t=this,e=document.getElementById("cloudflare-credentials");e&&e.addEventListener("submit",(function(e){e.preventDefault(),t.connect("cloudflare-connect-save")}));var n=document.getElementById("cf-recheck-zones");n&&n.addEventListener("click",(function(e){e.preventDefault(),t.recheck(e)}));var i=document.getElementById("cloudflare-zone-save");i&&i.addEventListener("click",(function(e){e.preventDefault(),t.connect("cloudflare-zone-save")}));var o=document.getElementById("cloudflare-show-key-help");o&&o.addEventListener("click",(function(e){e.preventDefault(),t.toggleHelp()}));var s=document.getElementById("cloudflare-connect-steps");s&&s.addEventListener("click",(function(e){e.preventDefault(),t.toggleHelp()})),r('input[name="cf_connection_type"]').on("change",(function(){t.hideHelp(),t.switchLabel()})),r("form#cloudflare-credentials input").on("keyup",(function(){var t=!0;r("form#cloudflare-credentials input").each((function(){""!==r(this).val()&&(t=!1)})),r("#cloudflare-connect-save").prop("disabled",t)}))},purgeCache:function(){this.attr("disabled",!0),i.Z.common.call("wphb_cloudflare_purge_cache").then((function(){WPHB_Admin.notices.show((0,o.K)("successCloudflarePurge"))})).catch((function(t){WPHB_Admin.notices.show(t.responseText,"error")})),this.removeAttr("disabled")},connect:function(t){var e=document.getElementById(t);e.classList.add("sui-button-onload-text");var n=document.getElementById("cf-token-tab").checked?"token":"key",r=document.getElementById("api-"+n+"-form-field");r.classList.remove("sui-form-field-error");var o=document.getElementById("error-api-"+n);o.innerHTML="",o.style.display="none";var a=document.getElementById("cloudflare-email").value,c=document.getElementById("cloudflare-api-key").value,u=document.getElementById("cloudflare-api-token").value,l=jQuery("#cloudflare-zones").find(":selected");i.Z.cloudflare.connect(a,c,u,l.text()).then((function(t){void 0!==t&&void 0!==t.zones?(WPHB_Admin.cloudflare.populateSelectWithZones(t.zones),window.SUI.slideModal("slide-cloudflare-zones","cloudflare-zone-recheck","next")):window.location.reload()})).catch((function(t){void 0!==t.response&&s(t.response.data)&&void 0!==t.response.data.code?400!==t.response.data.code&&403!==t.response.data.code||(r.classList.add("sui-form-field-error"),o.innerHTML=t.message,o.style.display="block"):WPHB_Admin.notices.show(t,"error")})).finally((function(){e.classList.remove("sui-button-onload-text")}))},populateSelectWithZones:function(t){var e=jQuery("#cloudflare-zones");e.SUIselect2("destroy"),t.forEach((function(t){if(0===e.find("option[value='"+t.value+"']").length){var n=new Option(t.label,t.value);e.append(n).trigger("change")}})),e.SUIselect2({minimumResultsForSearch:-1})},recheck:function(t){t.target.classList.add("sui-button-onload-text"),i.Z.common.call("wphb_cloudflare_recheck_zones").then((function(t){void 0!==t&&void 0!==t.zones?WPHB_Admin.cloudflare.populateSelectWithZones(t.zones):window.location.reload()})).catch((function(t){WPHB_Admin.notices.show(t,"error")})).finally((function(){t.target.classList.remove("sui-button-onload-text")}))},toggleHelp:function(){var t=document.getElementById("cf-token-tab").checked?"token":"key";document.getElementById("cloudflare-"+t+"-how-to").classList.toggle("sui-hidden");var e=document.getElementById("cloudflare-show-key-help").querySelector("span:last-of-type");e.classList.contains("sui-icon-chevron-down")?(e.classList.remove("sui-icon-chevron-down"),e.classList.add("sui-icon-chevron-up")):(e.classList.remove("sui-icon-chevron-up"),e.classList.add("sui-icon-chevron-down"))},hideHelp:function(){r("#cloudflare-key-how-to").addClass("sui-hidden"),r("#cloudflare-token-how-to").addClass("sui-hidden"),r("span.sui-icon-chevron-up").addClass("sui-icon-chevron-down").removeClass("sui-icon-chevron-up")},switchLabel:function(){var t=document.getElementById("cf-token-tab").checked?"token":"key";document.getElementById("cloudflare-email").value="",document.getElementById("cloudflare-api-key").value="",document.getElementById("cloudflare-api-token").value="",document.querySelector("#cloudflare-show-key-help > span:first-of-type").innerHTML=wphb.strings["CloudflareHelpAPI"+t]}}},3823:function(t,e,n){"use strict";n.r(e);var r,i=n(4218);r=jQuery,WPHB_Admin.dashboard={module:"dashboard",init:function(){r(".wphb-performance-report-item").on("click",(function(){var t=r(this).data("performance-url");t&&(location.href=t)}));var t=document.getElementById("clear-cache-modal-button");return t&&t.addEventListener("click",this.clearCache),this},clearCache:function(){var t=this;this.classList.toggle("sui-button-onload-text");for(var e=document.querySelectorAll('input[type="checkbox"]'),n=[],r=0;r<e.length;r++)!1!==e[r].checked&&n.push(e[r].dataset.module);i.Z.common.clearCaches(n).then((function(e){t.classList.toggle("sui-button-onload-text"),SUI.closeModal(),WPHB_Admin.notices.show(e.message)}))},hideUpgradeSummary:function(){window.SUI.closeModal(),i.Z.common.call("wphb_hide_upgrade_summary")}}},8060:function(t,e,n){"use strict";n.r(e);var r=n(4218),i=n(3265);n(8891);!function(t){var e={modules:[],init:function(){t(".sui-mobile-nav").on("change",(function(t){window.location.href=t.target.value})),t("select#wphb-performance-report-type").on("change",(function(t){var e=new URL(window.location);e.searchParams.set("type",t.target.value),window.location=e})),t(".wphb-logging-buttons").on("click",".wphb-logs-clear",(function(t){t.preventDefault(),r.Z.common.clearLogs(t.target.dataset.module).then((function(t){void 0!==t.success&&(t.success?e.notices.show(t.message):e.notices.show(t.message,"error"))}))})),t("#performance-run-test, #performance-scan-website").on("click",(function(){wphbMixPanel.track("plugin_scan_started",{score_mobile_previous:(0,i.K)("previousScoreMobile"),score_desktop_previous:(0,i.K)("previousScoreDesktop")})}))},initModule:function(t){return this.hasOwnProperty(t)?(this.modules[t]=this[t].init(),this.modules[t]):{}},getModule:function(t){return void 0!==this.modules[t]?this.modules[t]:this.initModule(t)}};e.notices={init:function(){var e=this,n=document.getElementById("dismiss-cf-notice");n&&(n.onclick=function(t){return e.dismissCloudflareNotice(t)});var i=document.getElementById("wphb-floating-http2-info");i&&i.addEventListener("click",(function(e){e.preventDefault(),r.Z.common.dismissNotice("http2-info"),t(".wphb-box-notice").slideUp()}))},show:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"success",n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];""===t&&(t=(0,i.K)("successUpdate"));var r={type:e,dismiss:{show:!1,label:(0,i.K)("dismissLabel"),tooltip:(0,i.K)("dismissLabel")},icon:"info"};n||(r.dismiss.show=!0),window.SUI.openNotice("wphb-ajax-update-notice","<p>"+t+"</p>",r)},dismiss:function(t){var e=t.closest(".sui-notice").getAttribute("id");r.Z.common.dismissNotice(e),window.SUI.closeNotice(e)},dismissCloudflareNotice:function(e){e.preventDefault(),r.Z.common.call("wphb_cf_notice_dismiss");var n=t(".cf-dash-notice");n.slideUp(),n.parent().addClass("no-background-image")}},window.WPHB_Admin=e}(jQuery)},8839:function(t,e,n){"use strict";n.r(e);var r=n(4218),i=n(3265),o=function(t,e,n,r){var o=t,s=e.toLowerCase(),a=!!n&&n.toLowerCase(),c=r.toLowerCase(),u=o.find(".wphb-minification-file-select input[type=checkbox]"),l=!1,p=!0;return{hide:function(){o.addClass("out-of-filter"),p=!1},show:function(){o.removeClass("out-of-filter"),p=!0},getElement:function(){return o},getId:function(){return o.attr("id")},getFilter:function(){return s},matchFilter:function(t){return""===t||(t=t.toLowerCase(),s.search(t)>-1)},matchSecondaryFilter:function(t){return""===t||!!a&&(t=t.toLowerCase(),a===t)},matchTypeFilter:function(t){return""===t||!c||("all"===t||c===t)},isVisible:function(){return p},isSelected:function(){return l},isType:function(t){return t===u.attr("data-type")},select:function(){l=!0,u.prop("checked",!0)},unSelect:function(){l=!1,u.prop("checked",!1)},change:function(t,e){var n=o.find(".toggle-"+t);if(t="position-footer"===t?"footer":t,void 0!==n&&!0!==n.prop("disabled")){var r=t.charAt(0).toUpperCase()+t.slice(1),s=(0,i.K)(e.toString()+r);n.prop("checked",e),n.toggleClass("changed"),n.closest(".wphb-border-row").find("span.wphb-row-status").removeClass("hidden"),n.next().attr("data-tooltip",s)}}}};function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}var a=function(){var t=[],e="",n="",r="";return{push:function(e){"object"===s(e)&&t.push(e)},getItems:function(){return t},getItem:function(e){return!!t[e]&&t[e]},getItemById:function(e,n){var r=!1;for(var i in t)if("wphb-file-"+e+"-"+n===t[i].getId()){r=t[i];break}return r},getItemsByDataType:function(e){var n=[];for(var r in t)t[r].isType(e)&&n.push(t[r]);return n},getVisibleItems:function(){var e=[];for(var n in t)t[n].isVisible()&&e.push(t[n]);return e},getSelectedItems:function(){var e=[];for(var n in t)t[n].isVisible()&&t[n].isSelected()&&e.push(t[n]);return e},addFilter:function(t,i){"type"===i?r=t:"secondary"===i?n=t:e=t},clearFilters:function(){e="",n="",r="",this.applyFilters()},applyFilters:function(){for(var i in t)t[i]&&(t[i].matchFilter(e)&&t[i].matchSecondaryFilter(n)&&t[i].matchTypeFilter(r)?t[i].show():t[i].hide())}}};function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=d(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},p.apply(this,arguments)}function d(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=m(t)););return t}function f(t,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},f(t,e)}function h(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=m(t);if(e){var i=m(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return g(this,n)}}function g(t,e){if(e&&("object"===c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}var v,y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(a,t);var e,n,o,s=h(a);function a(){return u(this,a),s.apply(this,arguments)}return e=a,(n=[{key:"step",value:function(t){var e=this;p(m(a.prototype),"step",this).call(this,t),t>=0?r.Z.minification.checkStep(this.currentStep).then((function(){t-=1,e.updateProgressBar(e.getProgress()),e.step(t)})):r.Z.minification.finishCheck().then((function(t){e.onFinish(t)}))}},{key:"cancel",value:function(){p(m(a.prototype),"cancel",this).call(this),r.Z.minification.cancelScan().then((function(){window.location.href=(0,i.R)("minification")}))}},{key:"onStart",value:function(){return r.Z.minification.startCheck()}},{key:"onFinish",value:function(t){p(m(a.prototype),"onFinish",this).call(this),void 0!==t.assets_msg&&(document.getElementById("assetsFound").innerHTML=t.assets_msg),window.SUI.closeModal(),window.SUI.openModal("wphb-assets-modal","wpbody-content")}}])&&l(e.prototype,n),o&&l(e,o),Object.defineProperty(e,"prototype",{writable:!1}),a}(n(4814).Z),b=y;v=jQuery,WPHB_Admin.minification={module:"minification",$checkFilesResultsContainer:null,checkURLSList:null,checkedURLS:0,init:function(){var t=this;this.scanner=new b(wphb.minification.get.totalSteps,wphb.minification.get.currentScanStep),v("#check-files").on("click",(function(t){t.preventDefault(),v(document).trigger("check-files")})),v(document).on("check-files",(function(){window.SUI.openModal("check-files-modal","wpbody-content","check-files-modal"),v(this).attr("disabled",!0),t.scanner.start()})),v(':input.toggle-checkbox, :input[id*="wphb-minification-include"]').on("change",(function(){var t=v(this).closest(".wphb-border-row"),e=t.find("span.wphb-row-status-changed");v(this).toggleClass("changed"),0!==t.find(".changed").length?e.removeClass("sui-hidden"):e.addClass("sui-hidden"),0!==v(".wphb-minification-files").find("input.changed").length?v("#wphb-publish-changes").removeClass("disabled"):v("#wphb-publish-changes").addClass("disabled")})),v(":input.wphb-minification-file-selector, :input.wphb-minification-bulk-file-selector").on("change",(function(){v(this).toggleClass("changed");var t=v(".wphb-minification-files").find("input.changed");v(".sui-actions-left > #bulk-update").toggleClass("button-notice disabled",0===t.length)})),v("#bulk-update").on("click",(function(t){t.preventDefault();var e=v('input[data-type="CSS"].wphb-minification-file-selector:checked'),n=v('input[data-type="JS"].wphb-minification-file-selector:checked');v('#bulk-update-modal label[for="filter-inline"]').toggleClass("sui-hidden",0===e.length),v('#bulk-update-modal label[for="filter-defer"]').toggleClass("sui-hidden",0===n.length),v('#bulk-update-modal label[for="filter-async"]').toggleClass("sui-hidden",0===n.length),window.SUI.openModal("bulk-update-modal",this,"bulk-update-cancel",!0)})),v("#wphb-minification-filter-button").on("click",(function(){v(".wphb-minification-filter").toggle("slow"),v("#wphb-minification-filter-button").toggleClass("active")})),v(".wphb-discard").on("click",(function(t){return t.preventDefault(),confirm((0,i.K)("discardAlert"))&&location.reload(),!1})),v(".wphb-enqueued-files input").on("change",(function(){v(".wphb-discard").attr("disabled",!1)}));var e=v("input[type=checkbox][name=use_cdn]");e.on("change",(function(){v("#cdn_file_exclude").toggleClass("sui-hidden");var t=v(this).is(":checked");e.each((function(){this.checked=t})),r.Z.minification.toggleCDN(t).then((function(){WPHB_Admin.notices.show()}))})),v(".wphb-minification-advanced-group > :input.toggle-checkbox").on("change",(function(){var t,e=v("label[for='"+v(this).attr("id")+"']");v(this).hasClass("toggle-minify")&&(t=(0,i.K)(this.checked.toString()+"Minify"),e.attr("data-tooltip",t)),v(this).hasClass("toggle-combine")&&(t=(0,i.K)(this.checked.toString()+"Combine"),e.attr("data-tooltip",t)),v(this).hasClass("toggle-position-footer")&&(t=(0,i.K)(this.checked.toString()+"Footer"),e.attr("data-tooltip",t)),v(this).hasClass("toggle-inline")&&(t=(0,i.K)(this.checked.toString()+"Inline"),e.attr("data-tooltip",t)),v(this).hasClass("toggle-defer")&&(t=(0,i.K)(this.checked.toString()+"Defer"),e.attr("data-tooltip",t)),v(this).hasClass("toggle-font-optimize")&&(t=(0,i.K)(this.checked.toString()+"Font"),e.attr("data-tooltip",t)),v(this).hasClass("toggle-preload")&&(t=(0,i.K)(this.checked.toString()+"Preload"),e.attr("data-tooltip",t)),v(this).hasClass("toggle-async")&&(t=(0,i.K)(this.checked.toString()+"Async"),e.attr("data-tooltip",t))})),v(".wphb-minification-exclude > :input.toggle-checkbox").on("change",(function(){v(this).closest(".wphb-border-row").toggleClass("disabled");var t=v("label[for='"+v(this).attr("id")+"']");t.hasClass("fileIncluded")?(t.find("span").removeClass("sui-icon-eye-hide").addClass("sui-icon-eye"),t.attr("data-tooltip",(0,i.K)("includeFile")),t.removeClass("fileIncluded")):(t.find("span").removeClass("sui-icon-eye").addClass("sui-icon-eye-hide"),t.attr("data-tooltip",(0,i.K)("excludeFile")),t.addClass("fileIncluded"))})),v(".wphb-compressed .wphb-filename-extension").on("click",(function(){var t=v(this).closest(".wphb-border-row");t.find(".fileinfo-group").removeClass("wphb-compressed"),t.find(".wphb-row-status").removeClass("sui-hidden wphb-row-status-changed").addClass("wphb-row-status-queued sui-tooltip-constrained").attr("data-tooltip",(0,i.K)("queuedTooltip")).find("span").attr("class","sui-icon-loader sui-loading"),r.Z.minification.resetAsset(t.attr("data-filter"))})),v("input[type=checkbox][name=debug_log]").on("change",(function(){var t=v(this).is(":checked");r.Z.minification.toggleLog(t).then((function(){WPHB_Admin.notices.show(),t?v(".wphb-logging-box").show():v(".wphb-logging-box").hide()}))})),v("#wphb-minification-tools-form").on("submit",(function(t){t.preventDefault();var e=v(this).find(".spinner");e.addClass("visible"),r.Z.minification.saveCriticalCss(v(this).serialize()).then((function(t){e.removeClass("visible"),void 0!==t&&t.success?WPHB_Admin.notices.show(t.message):WPHB_Admin.notices.show(t.message,"error")}))}));var n=document.getElementById("file_path");null!==n&&(n.onchange=function(t){t.preventDefault(),r.Z.minification.updateAssetPath(v(this).val()).then((function(t){t.message?WPHB_Admin.notices.show(t.message,"error"):WPHB_Admin.notices.show()}))}),v("#wphb-network-ao").on("click",(function(){v("#wphb-network-border-frame").toggleClass("sui-hidden")})),v("#wphb-box-minification-network-settings").on("change","input[type=radio]",(function(t){var e=document.querySelectorAll("input[name="+t.target.name+"]");"log"===t.target.name&&v(".wphb-logs-frame").toggle(t.target.value);for(var n=0;n<e.length;++n)e[n].parentNode.classList.remove("active");t.target.parentNode.classList.add("active")})),v("#wphb-ao-network-settings").on("click",(function(t){t.preventDefault();var e=v(".sui-box-footer").find(".spinner");e.addClass("visible");var n=v("#ao-network-settings-form").serialize();r.Z.minification.saveNetworkSettings(n).then((function(t){e.removeClass("visible"),void 0!==t&&t.success?WPHB_Admin.notices.show():WPHB_Admin.notices.show((0,i.K)("errorSettingsUpdate"),"error")}))})),v("#wphb-ao-settings-update").on("click",(function(e){e.preventDefault();var n=v(".sui-box-footer").find(".spinner");n.addClass("visible");var i=t.getMultiSelectValues("cdn_exclude");r.Z.minification.updateExcludeList(JSON.stringify(i)).then((function(){n.removeClass("visible"),WPHB_Admin.notices.show()}))}));for(var o=document.querySelectorAll("[name=asset_optimization_mode]"),s="auto",a=0;a<o.length;a++)!0===o[a].checked&&(s=o[a].value),o[a].addEventListener("click",(function(){s!==this.value&&(document.getElementById("wphb-ao-"+s+"-label").classList.add("active"),document.getElementById("wphb-ao-"+this.value+"-label").classList.remove("active"),"manual"===s&&"auto"===this.value&&(!0===wphb.minification.get.showSwitchModal?window.SUI.openModal("wphb-basic-minification-modal","wphb-switch-to-basic"):WPHB_Admin.minification.switchView("basic")))}));var c=document.getElementById("manual-ao-hdiw-modal-expand");c&&(c.onclick=function(){document.getElementById("manual-ao-hdiw-modal").classList.remove("sui-modal-sm"),document.getElementById("manual-ao-hdiw-modal-header-wrap").classList.remove("sui-box-sticky"),document.getElementById("automatic-ao-hdiw-modal").classList.remove("sui-modal-sm")});var u=document.getElementById("manual-ao-hdiw-modal-collapse");u&&(u.onclick=function(){document.getElementById("manual-ao-hdiw-modal").classList.add("sui-modal-sm");var t=document.getElementById("manual-ao-hdiw-modal-header-wrap");t.classList.contains("video-playing")&&t.classList.add("sui-box-sticky"),document.getElementById("automatic-ao-hdiw-modal").classList.add("sui-modal-sm")});var l=document.getElementById("automatic-ao-hdiw-modal-expand");l&&(l.onclick=function(){document.getElementById("automatic-ao-hdiw-modal").classList.remove("sui-modal-sm"),document.getElementById("manual-ao-hdiw-modal").classList.remove("sui-modal-sm")});var p=document.getElementById("automatic-ao-hdiw-modal-collapse");p&&(p.onclick=function(){document.getElementById("automatic-ao-hdiw-modal").classList.add("sui-modal-sm"),document.getElementById("manual-ao-hdiw-modal").classList.add("sui-modal-sm")});var d=document.getElementById("hdw-auto-trigger-label");d&&d.addEventListener("click",(function(){window.SUI.replaceModal("automatic-ao-hdiw-modal-content","wphb-box-minification-summary-meta-box")}));var f=document.getElementById("hdw-manual-trigger-label");f&&f.addEventListener("click",(function(){window.SUI.replaceModal("manual-ao-hdiw-modal-content","wphb-box-minification-summary-meta-box")})),this.rowsCollection=new WPHB_Admin.minification.RowsCollection,v(".wphb-border-row").each((function(e,n){var r;r=v(n).data("filter-secondary")?new WPHB_Admin.minification.Row(v(n),v(n).data("filter"),v(n).data("filter-secondary"),v(n).data("filter-type")):new WPHB_Admin.minification.Row(v(n),v(n).data("filter"),!1,v(n).data("filter-type")),t.rowsCollection.push(r)}));var h=v("#wphb-s");h.on("keydown",(function(t){if(13===t.keyCode)return event.preventDefault(),!1})),h.on("keyup",(function(){t.rowsCollection.addFilter(v(this).val(),"primary"),t.rowsCollection.applyFilters()})),v("#wphb-secondary-filter").on("change",(function(){t.rowsCollection.addFilter(v(this).val(),"secondary"),t.rowsCollection.applyFilters()})),v('[name="asset_optimization_filter"]').on("change",(function(){t.rowsCollection.addFilter(v(this).val(),"type"),t.rowsCollection.applyFilters()}));var g=document.getElementById("wphb-clear-filters");g&&g.addEventListener("click",(function(e){e.preventDefault(),v("#wphb-filter-all").prop("checked",!0),v(".wphb-minification-filter .sui-tab-item").removeClass("active"),v("#wphb-filter-all-label").addClass("active"),v("#wphb-secondary-filter").val(null).trigger("change"),h.val(""),t.rowsCollection.clearFilters()})),v("input.wphb-minification-file-selector").on("click",(function(){var e=v(this),n=t.rowsCollection.getItemById(e.data("type"),e.data("handle"));n&&(e.is(":checked")?n.select():n.unSelect())})),v(".wphb-minification-bulk-file-selector").on("click",(function(){var e=v(this),n=t.rowsCollection.getItemsByDataType(e.attr("data-type"));for(var r in n)n.hasOwnProperty(r)&&(e.is(":checked")?n[r].select():n[r].unSelect())})),v("body").on("click",".wphb-border-row",(function(){window.innerWidth<783&&(v(this).find(".wphb-minification-row-details").toggle(),v(this).find(".fileinfo-group").toggleClass("opened"))}));var m=_.debounce((function(){window.innerWidth>=783?v(".wphb-minification-row-details").css("display","flex"):v(".wphb-minification-row-details").css("display","none")}),250);return window.addEventListener("resize",m),this},switchView:function(t){var e=!1,n=document.getElementById("hide-"+t+"-modal");n&&!0===n.checked&&(e=!0),r.Z.minification.toggleView(t,e).then((function(){window.location.href=(0,i.R)("minification")}))},goToSettings:function(){window.SUI.closeModal(),r.Z.minification.toggleCDN(v("input#enable_cdn").is(":checked")).then((function(){window.location.href=(0,i.R)("minification")}))},getMultiSelectValues:function(t){for(var e=v("#"+t).find(":selected"),n={scripts:[],styles:[]},r=0;r<e.length;++r)n[e[r].dataset.type].push(e[r].value);return n},skipUpgrade:function(){r.Z.common.call("wphb_ao_skip_upgrade").then((function(){window.location.href=(0,i.R)("minification")}))},doUpgrade:function(){r.Z.common.call("wphb_ao_do_upgrade").then((function(){window.location.href=(0,i.R)("minification")}))},processBulkUpdateSelections:function(){var t=this.rowsCollection.getSelectedItems();["minify","combine","position-footer","defer","inline","preload","async"].forEach((function(e){var n="#bulk-update-modal input#filter-"+e,r=v(n).prop("checked");for(var i in t)t.hasOwnProperty(i)&&t[i].change(e,r);v(n).prop("checked",!1)})),v("input[type=submit]").removeClass("disabled")},purgeOrphanedData:function(){var t=document.getElementById("count-ao-orphaned").innerHTML;r.Z.advanced.clearOrphanedBatch(t).then((function(){window.location.reload()}))}},WPHB_Admin.minification.Row=o,WPHB_Admin.minification.RowsCollection=a},153:function(t,e,n){"use strict";n.r(e);n(2414);var r,i=n(4218),o=n(3265);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(){a=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",c=r.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof f?e:f,o=Object.create(i.prototype),s=new O(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return P()}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=k(s,n);if(a){if(a===d)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=p(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,s),o}function p(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var d={};function f(){}function h(){}function g(){}var m={};u(m,i,(function(){return this}));var _=Object.getPrototypeOf,v=_&&_(_(E([])));v&&v!==e&&n.call(v,i)&&(m=v);var y=g.prototype=f.prototype=Object.create(m);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function r(i,o,a,c){var u=p(t[i],t,o);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==s(d)&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(d).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;this._invoke=function(t,n){function o(){return new e((function(e,i){r(t,n,e,i)}))}return i=i?i.then(o,o):o()}}function k(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=p(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,d;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function E(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return h.prototype=g,u(y,"constructor",g),u(g,"constructor",h),h.displayName=u(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,u(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(w.prototype),u(w.prototype,o,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var s=new w(l(e,n,r,i),o);return t.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},b(y),u(y,c,"Generator"),u(y,i,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return s.type="throw",s.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(a&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}function c(t,e,n,r,i,o,s){try{var a=t[o](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,i)}r=jQuery,WPHB_Admin.notifications={module:"notifications",exclude:[],edit:!1,settings:{view:"schedule",module:"",type:"",schedule:{frequency:7,time:"",weekDay:"",monthDay:"",threshold:0},recipients:[],performance:{device:"both",metrics:!0,audits:!0,fieldData:!0},uptime:{showPing:!0},database:{revisions:!0,drafts:!0,trash:!0,spam:!0,trashComment:!0,expiredTransients:!0,transients:!1}},moduleData:{},init:function(t){var e=this;return this.moduleData=t,r(".wphb-disable-notification").on("click",this.disable),r(".wphb-enable-notification").on("click",(function(t){return e.renderTemplate(t,"add")})),r(".wphb-configure-notification").on("click",(function(t){return e.renderTemplate(t,"edit")})),this.maybeOpenModal(),this},maybeOpenModal:function(){var t=window.location.hash;if(0!==t.length&&2===(t=(t=t.substring(1)).split("-")).length){var e=r('button.wphb-configure-notification[data-id="'+t[0]+'"][data-type="'+t[1]+'"]');0===e.length&&(e=r('.wphb-enable-notification[data-id="'+t[0]+'"][data-type="'+t[1]+'"]')),0!==e.length&&e.trigger("click")}},renderTemplate:function(t,e){t.preventDefault(),this.settings.module=t.currentTarget.dataset.id,this.settings.type=t.currentTarget.dataset.type;var n=t.currentTarget.dataset.view;if(this.settings.view="schedule","edit"===e&&"recipients"===n&&(this.settings.view=n),this.moduleData.hasOwnProperty(this.settings.type)){var i=this.moduleData[this.settings.type];i.hasOwnProperty(this.settings.module)&&((i=i[this.settings.module]).hasOwnProperty("schedule")&&(this.settings.schedule=i.schedule),i.hasOwnProperty("settings")&&(this.settings[this.settings.module]=i.settings),i.hasOwnProperty("recipients")&&(this.settings.recipients=i.recipients,this.exclude=i.recipients.reduce((function(t,e){return 0<e.id&&t.push(parseInt(e.id)),t}),[])))}this.loadUsers();var o=WPHB_Admin.notifications.template(e+"-notifications-content")(this.settings);o&&(r("#notification-modal").html(o),this.initSUI(),this.mapActions(),"edit"===e?(this.edit=!0,this.addSelections()):this.toggleUserNotice(),SUI.openModal("notification-modal",r(this)))},loadUsers:function(){var t=this,e=this;i.Z.notifications.getUsers(this.exclude).then((function(n){if(void 0!==n){var i=0;n.forEach((function(t){e.addToUsersList(t,0==i++)})),t.fixRecipientCSS(r("#modal-wp-user-list"))}})).catch((function(t){window.console.log(t)}))},processScheduleSettings:function(){if("uptime"===this.settings.module&&"notifications"===this.settings.type){var t=r("select#report-threshold");this.settings.schedule.threshold=t.val()}else{var e=r('input[name="report-frequency"]:checked');this.settings.schedule={frequency:e.val(),time:r("select#report-time").val(),weekDay:r("select#report-day").val(),monthDay:r("select#report-day-month").val(),threshold:""}}},processAdditionalSettings:function(){if("reports"===this.settings.type)if("performance"!==this.settings.module)if("uptime"!==this.settings.module){if("database"===this.settings.module){var t=r("input#revisions").is(":checked"),e=r("input#drafts").is(":checked"),n=r("input#trash").is(":checked"),i=r("input#spam").is(":checked"),o=r("input#trashComment").is(":checked"),s=r("input#expiredTransients").is(":checked"),a=r("input#transients").is(":checked");this.settings.database={revisions:t,drafts:e,trash:n,spam:i,trashComment:o,expiredTransients:s,transients:a}}}else{var c=r("input#show_ping").is(":checked");this.settings.uptime={showPing:c}}else{var u=r('input[name="report-type"]:checked').val(),l=r("input#metrics").is(":checked"),p=r("input#audits").is(":checked"),d=r("input#field-data").is(":checked");this.settings.performance={device:u,metrics:l,audits:p,fieldData:d}}},update:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=event.target;e.classList.add("sui-button-onload-text"),this.processScheduleSettings(),t&&this.processAdditionalSettings(),i.Z.notifications.enable(this.settings,this.edit).then((function(t){history.pushState("",document.title,window.location.pathname+window.location.search),window.location.search+="&status="+t.code})).catch((function(t){window.console.log(t)}))},activate:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.getModuleName();""!==e&&wphbMixPanel.enableFeature(e),this.update(t)},mapActions:function(){var t=this;this.initUserSelects(),this.toggleAddButton(),r("#add-recipient-button").on("click",(function(){t.handleAddButtonClick()})),r('input[name="report-frequency"]').on("change",this.handleFrequencySelect)},addSelections:function(){r("#report-time").val(this.settings.schedule.time).trigger("change"),7===this.settings.schedule.frequency&&r("#report-day").val(this.settings.schedule.weekDay).trigger("change"),30===this.settings.schedule.frequency&&r("#report-day-month").val(this.settings.schedule.monthDay).trigger("change"),r("#report-threshold").val(this.settings.schedule.threshold).trigger("change")},initSUI:function(){r(".sui-select").each((function(){var t=r(this);"icon"===t.data("theme")?SUI.select.initIcon(t):"color"===t.data("theme")?SUI.select.initColor(t):"search"===t.data("theme")?SUI.select.initSearch(t):SUI.select.init(t)})),SUI.modalDialog(),SUI.tabs(),SUI.notice(),r(".sui-side-tabs label.sui-tab-item input").each((function(){SUI.sideTabs(this)}))},handleFrequencySelect:function(){var t=r(this).val(),e=r(".schedule-box"),n=e.find('[data-type="week"]'),i=e.find('[data-type="month"]');n.toggleClass("sui-hidden","30"===t||"1"===t),i.toggleClass("sui-hidden","7"===t||"1"===t)},getModuleName:function(){var t="";return"performance"===this.settings.module&&"reports"===this.settings.type?t="Performance Reports":"uptime"===this.settings.module&&"reports"===this.settings.type?t="Uptime Reports":"uptime"===this.settings.module&&"notifications"===this.settings.type&&(t="Uptime Notifications"),t},disable:function(){event.preventDefault();var t=event.target.dataset.id,e=event.target.dataset.type;if(void 0!==t&&void 0!==e){var n=WPHB_Admin.notifications.getModuleName();""!==n&&wphbMixPanel.disableFeature(n),i.Z.notifications.disable(t,e).then((function(){window.location.search+="&status=disabled"})).catch((function(t){window.console.log(t)}))}},toggleAddButton:function(){var t=r('#notifications-invite-users-content input[id^="recipient-"]');t.on("keyup",(function(){var e=!1;t.each((function(){""===r(this).val()&&(e=!0)})),e?r("#add-recipient-button").attr("disabled","disabled"):r("#add-recipient-button").attr("disabled",!1)}))},handleAddButtonClick:function(){var t=this,e=event.target;e.classList.add("sui-button-onload-text");var n=r("input#recipient-name"),o=r("input#recipient-email"),s=r("#error-recipient-email");i.Z.notifications.getAvatar(o.val()).then((function(r){s.html(""),s.parents().removeClass("sui-form-field-error");var i={name:n.val(),email:o.val(),role:"",avatar:r,id:0};t.confirmSubscription(i).then((function(r){void 0!==r&&(i.is_pending=r.pending,i.is_subscribed=r.subscribed,i.is_can_resend_confirmation=r.canResend),t.addUser(i,"email"),n.val("").trigger("keyup"),o.val("").trigger("keyup"),e.classList.remove("sui-button-onload-text")}))})).catch((function(t){s.html(t),s.parents().addClass("sui-form-field-error"),e.classList.remove("sui-button-onload-text")}))},initUserSelects:function(){var t=r("#search-users"),e=this;t.SUIselect2({minimumInputLength:3,maximumSelectionLength:1,ajax:{url:ajaxurl,method:"POST",dataType:"json",delay:250,data:function(t){return{action:"wphb_pro_search_users",nonce:wphb.nonces.HBFetchNonce,query:t.term,exclude:e.exclude}},processResults:function(t){return{results:jQuery.map(t.data,(function(t,e){return{text:t.name,id:e,user:{name:t.name,email:t.email,role:t.role,avatar:t.avatar,id:t.id}}}))}}}}),t.on("select2:select",(function(n){e.add(n.params.data.user),t.val(null).trigger("change")}))},confirmSubscription:function(t){var e,n=this;return(e=a().mark((function e(){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("uptime"===n.settings.module&&"notifications"===n.settings.type){e.next=2;break}return e.abrupt("return");case 2:return e.abrupt("return",i.Z.notifications.sendConfirmationEmail(t.name,t.email));case 3:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function s(t){c(o,r,i,s,a,"next",t)}function a(t){c(o,r,i,s,a,"throw",t)}s(void 0)}))})()},resendInvite:function(t,e){var n=r(this);n.attr("disabled","disabled"),i.Z.notifications.resendConfirmationEmail(t,e).then((function(t){var e=r(".notifications-resend-notice");e.find("p").html(t.message),e.removeClass("sui-hidden"),n.attr("disabled",!1)}))},addUser:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"user",n=this.settings.recipients.findIndex((function(e){return t.email===e.email}));if(n>-1)this.toggleUserNotice(!0);else{var i=r("#modal-"+e+"-recipients-list"),s=(0,o.K)("removeRecipient"),a=""===t.role?t.email:t.role,c="";void 0!==t.is_pending&&(c=t.is_pending||void 0===t.is_subscribed||t.is_subscribed?t.is_pending?"pending":"confirmed":"unsubscribed");var u='<img src="'.concat(t.avatar,'" alt="').concat(t.email,'">'),l="";if("pending"===c||"unsubscribed"===c){var p=(0,o.K)("awaitingConfirmation"),d=(0,o.K)("resendInvite");u='<span class="sui-tooltip" data-tooltip="'.concat(p,'">').concat(u,"</span>"),l='<button type="button" class="resend-invite sui-button-icon sui-tooltip" data-tooltip="'.concat(d,'"\n\t\t\t\t\tonclick="WPHB_Admin.notifications.resendInvite( \'').concat(t.name,"', '").concat(t.email,'\' )">\n\t\t\t\t\t<span class="sui-icon-send" aria-hidden="true"></span>\n\t\t\t\t</button>')}var f='\n\t\t\t\t<div class="sui-recipient" data-id="'.concat(t.id,'" data-email="').concat(t.email,'">\n\t\t\t\t\t<span class="sui-recipient-name">\n\t\t\t\t\t\t<span class="subscriber ').concat(c,'">').concat(u,'</span>\n\t\t\t\t\t\t<span class="wphb-recipient-name">').concat(t.name,'</span>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span class="sui-recipient-email">').concat(a,"</span>\n\t\t\t\t\t").concat(l,'\n\t\t\t\t\t<button type="button" class="sui-button-icon sui-tooltip" data-tooltip="').concat(s,'"\n\t\t\t\t\t\tonclick="WPHB_Admin.notifications.removeUser( ').concat(t.id,", '").concat(t.email,"', '").concat(e,'\' )">\n\t\t\t\t\t\t<span class="sui-icon-trash" aria-hidden="true"></span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t');i.append(f),this.settings.recipients.push(t),"user"===e&&this.exclude.push(t.id),this.toggleRecipientList(i)}},addToUsersList:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=r("#modal-wp-user-list"),i=e?"sui-tooltip-bottom-right":"sui-tooltip-top-right",s='\n\t\t\t\t<div class="sui-recipient" data-id="'.concat(t.id,'" data-email="').concat(t.email,'">\n\t\t\t\t\t<span class="sui-recipient-name">\n\t\t\t\t\t\t<span class="subscriber">\n\t\t\t\t\t\t\t<img src="').concat(t.avatar,'" alt="').concat(t.email,'">\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class="wphb-recipient-name">').concat(t.name,'</span>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span class="sui-recipient-email">').concat(t.role,'</span>\n\t\t\t\t\t<button type="button" class="sui-button-icon sui-tooltip ').concat(i,'"\n\t\t\t\t\t\tdata-tooltip="').concat((0,o.K)("addRecipient"),"\"\n\t\t\t\t\t\tonclick='WPHB_Admin.notifications.add( ").concat(JSON.stringify(t),' )\'>\n\t\t\t\t\t\t<span class="sui-icon-plus" aria-hidden="true"></span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t');n.append(s),this.toggleRecipientList(n)},removeUser:function(t,e){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"user",o=r("#modal-"+i+"-recipients-list"),s='.sui-recipient[data-email="'+e+'"]',a=o.find(s);a.remove(),"user"===i&&((n=this.exclude.indexOf(t))>-1&&this.exclude.splice(n,1),this.returnToList(a)),(n=this.settings.recipients.findIndex((function(n){return t===parseInt(n.id)&&e===n.email})))>-1&&this.settings.recipients.splice(n,1),this.toggleRecipientList(o)},add:function(t){var e=this;this.confirmSubscription(t).then((function(n){void 0!==n&&(t.is_pending=n.pending,t.is_subscribed=n.subscribed,t.is_can_resend_confirmation=n.canResend),e.addUser(t);var i=r("#modal-wp-user-list"),o='.sui-recipient[data-email="'+t.email+'"]';i.find(o).remove(),e.fixRecipientCSS(i),e.toggleRecipientList(i,!1)}))},returnToList:function(t){var e=r("#modal-wp-user-list"),n={id:t.data("id"),name:t.find(".wphb-recipient-name").text(),email:t.data("email"),role:t.find(".sui-recipient-email").text(),avatar:t.find("img").attr("src")},i="WPHB_Admin.notifications.add("+JSON.stringify(n)+")";t.find(".resend-invite").remove(),t.find(".sui-icon-trash").removeClass("sui-icon-trash").addClass("sui-icon-plus"),t.find("button").attr("onclick",i).attr("data-tooltip",(0,o.K)("addRecipient")).addClass("sui-tooltip-top-right"),e.append(t),this.fixRecipientCSS(e),this.toggleRecipientList(e,!1)},fixRecipientCSS:function(t){var e=t.children().length>1?"hidden":"unset";t.css("overflow-x",e),t.find(".sui-recipient:first-of-type .sui-tooltip").removeClass("sui-tooltip-top-right").addClass("sui-tooltip-bottom-right")},toggleRecipientList:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=0===t.html().trim().length;t.parent("div").toggleClass("sui-hidden",n).toggleClass("sui-margin-top",!n),e&&this.toggleUserNotice()},toggleUserNotice:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=r(".notifications-recipients-notice"),n=r("#notification-modal .sui-button.sui-button-blue"),i=r(".notification-next-buttons"),s=(0,o.K)("noRecipients");t?s=(0,o.K)("recipientExists"):this.edit&&(s=(0,o.K)("noRecipientDisable")),e.find("p").html(s),t?(e.removeClass("sui-hidden"),setTimeout((function(){return e.addClass("sui-hidden")}),3e3)):0===this.settings.recipients.length?(this.edit||(n.attr("disabled","disabled"),i.attr("disabled","disabled")),e.removeClass("sui-hidden")):(n.attr("disabled",!1),i.attr("disabled",!1),e.addClass("sui-hidden"))}},WPHB_Admin.notifications.template=_.memoize((function(t){var e,n={evaluate:/<#([\s\S]+?)#>/g,interpolate:/{{{([\s\S]+?)}}}/g,escape:/{{([^}]+?)}}(?!})/g,variable:"data"};return function(i){return _.templateSettings=n,(e=e||_.template(r("#"+t).html()))(i)}}))},1082:function(t,e,n){"use strict";n.r(e);var r=n(4218),i=n(4814),o=n(3265);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(){return u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=l(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},u.apply(this,arguments)}function l(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=h(t);if(e){var i=h(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function f(t,e){if(e&&("object"===s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}var g,m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(l,t);var e,n,i,s=d(l);function l(){return a(this,l),s.apply(this,arguments)}return e=l,(n=[{key:"step",value:function(t){var e=this;u(h(l.prototype),"step",this).call(this,t),this.currentStep++,this.updateProgressBar(this.getProgress()),r.Z.common.call("wphb_performance_run_test").then((function(t){t.finished?e.onFinish(t):window.setTimeout((function(){e.step(e.totalSteps-e.currentStep)}),3e3)}))}},{key:"updateProgressBar",value:function(t){var e=this;0===t&&(this.currentStep=2,this.timer=window.setInterval((function(){e.currentStep+=1,e.updateProgressBar(e.getProgress())}),100));var n=document.querySelector(".wphb-performance-scan-modal .sui-progress-state .sui-progress-state-text");if(3===t&&(n.innerHTML=(0,o.K)("scanRunning")),73===t&&(clearInterval(this.timer),this.timer=!1,this.timer=window.setInterval((function(){e.currentStep+=1,e.updateProgressBar(e.getProgress())}),1e3),n.innerHTML=(0,o.K)("scanAnalyzing")),99===t&&(n.innerHTML=(0,o.K)("scanWaiting"),clearInterval(this.timer),this.timer=!1),document.querySelector(".wphb-performance-scan-modal .sui-progress-block .sui-progress-text span").innerHTML=t+"%",document.querySelector(".wphb-performance-scan-modal .sui-progress-block .sui-progress-bar span").style.width=t+"%",100===t){var r=document.querySelector(".wphb-performance-scan-modal .sui-progress-block span.sui-icon-loader");r.classList.remove("sui-icon-loader","sui-loading"),r.classList.add("sui-icon-check"),n.innerHTML=(0,o.K)("scanComplete"),clearInterval(this.timer),this.timer=!1}}},{key:"onStart",value:function(){return Promise.resolve()}},{key:"onFinish",value:function(t){u(h(l.prototype),"onFinish",this).call(this),window.wphbMixPanel.track("plugin_scan_finished",{score_mobile:t.mobileScore,score_desktop:t.desktopScore}),window.setTimeout((function(){window.location=(0,o.R)("audits")}),2e3)}}])&&c(e.prototype,n),i&&c(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}(i.Z),_=m;function v(t){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(t)}function y(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,i,o=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);s=!0);}catch(t){a=!0,i=t}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return b(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}g=jQuery,WPHB_Admin.performance={module:"performance",iteration:0,progress:0,pressedKeys:[],key_timer:!1,init:function(){var t=this,e=this;this.wphbSetInterval(),document.onkeyup=function(t){clearInterval(e.key_timer),e.wphbSetInterval(),t=t||event,e.pressedKeys.push(t.keyCode);var n=e.pressedKeys.length;n>=2&&66===e.pressedKeys[n-1]&&72===e.pressedKeys[n-2]&&(document.getElementById("wphb-error-details").style.display="block")},this.scanner=new _(100,0),g("#run-performance-test").on("click",(function(t){t.preventDefault(),e.startPerformanceScan()}));var n=window.location.hash;if(n){var i=g(n);i.length&&!i.hasClass("sui-box")&&(i.find(".sui-accordion-open-indicator").trigger("click"),g("html, body").animate({scrollTop:i.offset().top},1e3))}return g("body").on("submit",".settings-frm",(function(t){t.preventDefault();var e=g(this).serialize();return r.Z.performance.savePerformanceTestSettings(e).then((function(){return WPHB_Admin.notices.show()})),!1})),"undefined"!=typeof google&&"undefined"!=typeof wphbHistoricFieldData&&(google.charts.load("current",{packages:["corechart","bar"]}),google.charts.setOnLoadCallback((function(){t.drawChart(wphbHistoricFieldData.fcp,"first_contentful_paint"),g(window).resize((function(){return t.drawChart(wphbHistoricFieldData.fcp,"first_contentful_paint")}))})),google.charts.setOnLoadCallback((function(){t.drawChart(wphbHistoricFieldData.fid,"first_input_delay"),g(window).resize((function(){return t.drawChart(wphbHistoricFieldData.fid,"first_input_delay")}))}))),g("input[name=subsite-tests]").on("change",(function(t){var e="subsite_tests-false"===t.target.id?"subsite_tests-true":"subsite_tests-false";t.target.parentNode.classList.add("active"),document.getElementById(e).parentNode.classList.remove("active")})),g("input[name=report-type]").on("change",(function(t){for(var e=document.querySelectorAll("input[name=report-type]"),n=0;n<e.length;++n)e[n].parentNode.classList.remove("active");t.target.parentNode.classList.add("active")})),g("g.metric").on({mouseenter:function(){g(".wphb-gauge__wrapper").addClass("state--highlight"),g(this).addClass("metric--highlight")},mouseleave:function(){g(".wphb-gauge__wrapper").removeClass("state--highlight"),g(this).removeClass("metric--highlight")}}),g("#wphb-audits-filter-button").on("click",(function(t){t.preventDefault(),g(".wphb-audits-filter").toggle("slow"),g(this).toggleClass("active").blur()})),g('input[name="audits_filter"]').on("change",(function(){for(var t=g(".sui-accordion-item"),e=0,n=Object.entries(t);e<n.length;e++){var r=y(n[e],2),i=r[0],o=r[1];"object"===v(o)&&"prevObject"!==i&&(o.classList.remove("sui-hidden"),"all"===this.value||o.dataset.metrics.includes(this.value)||o.classList.add("sui-hidden"))}})),this},startPerformanceScan:function(){window.SUI.openModal("run-performance-test-modal","wpbody-content"),g(this).attr("disabled",!0),this.scanner.start()},wphbSetInterval:function(){var t=this;this.key_timer=window.setInterval((function(){t.pressedKeys=[]}),1e3)},drawChart:function(t,e){var n=google.visualization.arrayToDataTable([["Type","Fast",{type:"string",role:"tooltip",p:{html:!0}},"Average",{type:"string",role:"tooltip",p:{html:!0}},"Slow",{type:"string",role:"tooltip",p:{html:!0}}],["",t.fast,this.generateTooltip("fast",t.fast_desc),t.average,this.generateTooltip("average",t.average_desc),t.slow,this.generateTooltip("slow",t.slow_desc)]]);new google.visualization.BarChart(document.getElementById(e)).draw(n,{tooltip:{isHtml:!0},colors:["#1ABC9C","#FECF2F","#FF6D6D"],chartArea:{width:"100%"},hAxis:{baselineColor:"#fff",gridlines:{color:"#fff",count:0},textPosition:"none"},isStacked:"percent",height:80,legend:"none"})},generateTooltip:function(t,e){return'<div class="wphb-field-data-tooltip wphb-tooltip-'+t+'">'+e+"</div>"}}},2969:function(t,e,n){"use strict";n.r(e);var r,i=n(4218),o=n(3265);r=jQuery,WPHB_Admin.settings={module:"settings",init:function(){var t=r("body"),e=t.find(".wrap-wphb-settings");return r(".sui-box-footer").on("click","button.sui-button-blue",(function(n){n.preventDefault();var o=t.find(".settings-frm").serialize(),s=r("#color_accessible");s.length&&(s.is(":checked")?e.addClass("sui-color-accessible"):e.removeClass("sui-color-accessible"));var a=document.getElementById("tracking");return a&&!0===a.checked&&wphbMixPanel.optIn(),i.Z.settings.saveSettings(o).then((function(){WPHB_Admin.notices.show()})),!1})),r("input[name=remove_settings]").on("change",(function(t){var e="remove_settings-false"===t.target.id?"remove_settings-true":"remove_settings-false";t.target.parentNode.classList.add("active"),document.getElementById(e).parentNode.classList.remove("active")})),r("input[name=remove_data]").on("change",(function(t){var e="remove_data-false"===t.target.id?"remove_data-true":"remove_data-false";t.target.parentNode.classList.add("active"),document.getElementById(e).parentNode.classList.remove("active")})),r("#wphb-import-file-input").on("change",(function(){var t=r(this)[0];if(t.files.length){var e=t.files[0];r("#wphb-import-file-name").text(e.name),r("#wphb-import-upload-wrap").addClass("sui-has_file"),r("#wphb-import-btn").removeAttr("disabled")}else r("#wphb-import-file-name").text(""),r("#wphb-import-upload-wrap").removeClass("sui-has_file"),r("#wphb-import-btn").attr("disabled","disabled")})),r("#wphb-import-remove-file").on("click",(function(){r("#wphb-import-file-input").val("").trigger("change")})),r("#wphb-begin-import-btn").on("click",(function(t){t.preventDefault(),r(this).attr("disabled","disabled").addClass("sui-button-onload-text");var e=r("#wphb-import-remove-file");e.attr("disabled","disabled");var n=r("#wphb-import-file-input")[0];if(0===n.files.length)return!1;var o=new FormData;o.append("settings_json_file",n.files[0],n.files[0].name),i.Z.settings.importSettings(o).then((function(t){WPHB_Admin.notices.show(t.message),e.trigger("click")})).catch((function(t){WPHB_Admin.notices.show(t,"error")})).finally((function(){r("#wphb-begin-import-btn").removeAttr("disabled").removeClass("sui-button-onload-text"),e.removeAttr("disabled"),window.SUI.closeModal()}))})),r("#wphb-export-btn").on("click",(function(t){t.preventDefault(),i.Z.settings.exportSettings()})),r('input[id="control"]').on("change",(function(){r(".cache-control-options").toggle()})),this},confirmReset:function(){i.Z.common.call("wphb_reset_settings").then((function(){i.Z.common.call("wphb_redis_disconnect"),window.location.href=(0,o.R)("resetSettings")}))}}},2790:function(t,e,n){"use strict";n.r(e);var r,i=n(3265);r=jQuery,WPHB_Admin.uptime={module:"uptime",$dataRangeSelector:null,chartData:null,downtimeChartData:null,timer:null,$spinner:null,dataRange:null,dateFormat:"MMM d",init:function(){var t=this;this.$spinner=r(".spinner"),this.$dataRangeSelector=r("#wphb-uptime-data-range"),this.chartData=r("#uptime-chart-json").val(),this.downtimeChartData=r("#downtime-chart-json").val(),this.$disableUptime=r("#wphb-disable-uptime"),this.dataRange=this.getUrlParameter("data-range"),this.$dataRangeSelector.on("change",(function(){window.location.href=r(this).find(":selected").data("url")}));var e=this;"undefined"!=typeof google&&google.charts.load("current",{packages:["corechart","timeline"]}),this.$disableUptime.on("click",(function(t){t.preventDefault(),e.$spinner.css("visibility","visible"),r(this).is(":checked")&&e.timer?(clearTimeout(e.timer),e.$spinner.css("visibility","hidden")):e.timer=setTimeout((function(){location.href=(0,i.R)("disableUptime")}),3e3)})),void 0!==this.dataRange&&r(".wrap-wphb-uptime .wphb-tab a").each((function(){this.href+="&data-range="+e.dataRange})),"day"===this.dataRange&&(this.dateFormat="h:mma"),null!==document.getElementById("uptime-chart")&&google.charts.setOnLoadCallback((function(){return t.drawResponseTimeChart()})),null!==document.getElementById("downtime-chart")&&google.charts.setOnLoadCallback((function(){return t.drawDowntimeChart()})),r("#uptime-re-check-status").on("click",(function(t){t.preventDefault(),location.reload()}))},drawResponseTimeChart:function(){var t=new google.visualization.DataTable;t.addColumn("datetime","Day"),t.addColumn("number","Response Time (ms)"),t.addColumn({type:"string",role:"tooltip",p:{html:!0}});for(var e=JSON.parse(this.chartData),n=0;n<e.length;n++)e[n][0]=new Date(e[n][0]),e[n][1]=Math.round(e[n][1]),e[n][2]=this.createUptimeTooltip(e[n][0],e[n][1]),0===Math.round(e[n][1])&&(e[n][1]=-100);t.addRows(e);var i={chartArea:{left:80,top:20,width:"90%",height:"90%"},colors:["#24ADE5"],curveType:"function",legend:{position:"none"},vAxis:{format:"#### ms",gridlines:{count:5},minorGridlines:{count:0},viewWindow:{min:0}},hAxis:{format:this.dateFormat,minorGridlines:{count:0}},tooltip:{isHtml:!0},series:{0:{axis:"Resp"}},axes:{y:{Resp:{label:"Response Time (ms)"}}}},o=new google.visualization.AreaChart(document.getElementById("uptime-chart"));o.draw(t,i),r(window).resize((function(){o.draw(t,i)}))},drawDowntimeChart:function(){var t=document.getElementById("downtime-chart"),e=new google.visualization.Timeline(t),n=new google.visualization.DataTable;n.addColumn({type:"string"}),n.addColumn({type:"string",id:"Status"}),n.addColumn({type:"string",role:"tooltip",p:{html:!0}}),n.addColumn({type:"datetime",id:"Start Period"}),n.addColumn({type:"datetime",id:"End Period"});for(var i=JSON.parse(this.downtimeChartData),o=0;o<i.length;o++)i[o][3]=new Date(i[o][3]),i[o][4]=new Date(i[o][4]);n.addRows(i);for(var s=[],a={Down:"#FF6D6D",Unknown:"#F8F8F8",Up:"#D1F1EA"},c=0;c<n.getNumberOfRows();c++)s.push(a[n.getValue(c,1)]);var u={timeline:{showBarLabels:!1,showRowLabels:!1,barLabelStyle:{fontSize:33},avoidOverlappingGridLines:!1},hAxis:{format:this.dateFormat},colors:s,height:170},l=[];google.visualization.events.addListener(e,"ready",(function(){var e=t.getElementsByTagName("rect");Array.prototype.forEach.call(e,(function(t){parseFloat(t.getAttribute("x"))>0&&l.push(t.getAttribute("fill"))}))})),google.visualization.events.addListener(e,"onmouseover",(function(e){var n=t.getElementsByTagName("rect");n[n.length-1].setAttribute("fill",l[e.row]);var r=n[n.length-1].getAttribute("width");r>3&&n[n.length-1].setAttribute("width",r-1+"px")})),e.draw(n,u),r(window).resize((function(){e.draw(n,u)}))},createUptimeTooltip:function(t,e){return'<span class="response-time-tooltip">'+e+'ms</span><span class="uptime-date-tooltip">'+this.formatTooltipDate(t)+"</span>"},formatTooltipDate:function(t){var e=t.getDate(),n=t.getMonth(),r=t.getHours(),i=r,o=(t.getMinutes()<10?"0":"")+t.getMinutes(),s="AM";return i>=12&&(i=r-12,s="PM"),0===i&&(i=12),["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][n]+" "+e+" @ "+i+":"+o+s},getUrlParameter:function(t){var e,n,r=decodeURIComponent(window.location.search.substring(1)).split("&");for(n=0;n<r.length;n++)if((e=r[n].split("="))[0]===t)return void 0===e[1]||e[1]}}},4218:function(t,e,n){"use strict";var r=n(8583),i=n.n(r);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}var s=new function(){var t=ajaxurl,e=wphb.nonces.HBFetchNonce,r="wphb_";function o(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"GET",s={url:t,method:o,cache:!1};i instanceof FormData?(i.append("nonce",e),i.append("action",r),s.contentType=!1,s.processData=!1):(i.nonce=e,i.action=r),s.data=i;var c=n(2702).Promise;return new c((function(t,e){jQuery.ajax(s).done(t).fail(e)})).then((function(t){return a(t)}))}var s={caching:{saveSettings:function(t,e){return o(r+t+"_save_settings",{data:e},"POST").then((function(t){return t}))},clearCache:function(t){return o("wphb_clear_module_cache",{module:t},"POST").then((function(t){return t}))},clearCacheForPost:function(t){return o("wphb_gutenberg_clear_post_cache",{postId:t},"POST")},redisSaveSettings:function(t,e,n,r){return o("wphb_redis_save_settings",{host:t,port:e,password:n,db:r},"POST")},redisObjectCache:function(t){return o("wphb_redis_toggle_object_cache",{value:t},"POST")},clearCacheBatch:function(t,e){return o("wphb_clear_network_cache",{sites:t,offset:e},"POST")}},cloudflare:{connect:function(t,e,n,r){return o("wphb_cloudflare_connect",{email:t,key:e,token:n,zone:r},"POST").then((function(t){return t}))}},minification:{toggleCDN:function(t){return o("wphb_minification_toggle_cdn",{value:t},"POST")},toggleLog:function(t){return o("wphb_minification_toggle_log",{value:t},"POST")},toggleView:function(t,e){return o("wphb_minification_toggle_view",{value:t,hide:e},"POST")},startCheck:function(){return o("wphb_minification_start_check",{},"POST")},checkStep:function(t){return o("wphb_minification_check_step",{step:t},"POST").then((function(t){return t}))},finishCheck:function(){return o("wphb_minification_finish_scan",{},"POST").then((function(t){return t}))},cancelScan:function(){return o("wphb_minification_cancel_scan",{},"POST")},saveCriticalCss:function(t){return o("wphb_minification_save_critical_css",{form:t},"POST").then((function(t){return t}))},updateAssetPath:function(t){return o("wphb_minification_update_asset_path",{value:t},"POST")},resetAsset:function(t){return o("wphb_minification_reset_asset",{value:t},"POST")},saveNetworkSettings:function(t){return o("wphb_minification_update_network_settings",{settings:t},"POST")},updateExcludeList:function(t){return o("wphb_minification_save_exclude_list",{data:t},"POST")}},performance:{savePerformanceTestSettings:function(t){return o("wphb_performance_save_settings",{data:t},"POST")}},advanced:{saveSettings:function(t,e){return o("wphb_advanced_save_settings",{data:t,form:e},"POST").then((function(t){return t}))},deleteSelectedData:function(t){return o("wphb_advanced_db_delete_data",{data:t},"POST").then((function(t){return t}))},clearOrphanedBatch:function(t){return o("wphb_advanced_purge_orphaned",{rows:t},"POST")}},settings:{saveSettings:function(t){return o("wphb_admin_settings_save_settings",{form_data:t},"POST").then((function(t){return t}))},importSettings:function(t){return o("wphb_admin_settings_import_settings",t,"POST").then((function(t){return t}))},exportSettings:function(){window.location=t+"?action=wphb_admin_settings_export_settings&nonce="+e}},common:{dismissNotice:function(t){return o("wphb_notice_dismiss",{id:t},"POST")},clearLogs:function(t){return o("wphb_logger_clear",{module:t},"POST").then((function(t){return t}))},call:function(t){return o(t,{},"POST").then((function(t){return t}))},clearCaches:function(t){return o("wphb_clear_caches",{modules:t},"POST").then((function(t){return t}))}},notifications:{resendConfirmationEmail:function(t,e){return o("wphb_pro_resend_confirmation",{name:t,email:e},"POST").then((function(t){return t}))},sendConfirmationEmail:function(t,e){return o("wphb_pro_send_confirmation",{name:t,email:e},"POST").then((function(t){return t}))},disable:function(t,e){return o("wphb_pro_disable_notification",{id:t,type:e},"POST")},enable:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n="wphb_pro_enable_notification";return o(n,{settings:t,update:e},"POST").then((function(t){return t}))},getAvatar:function(t){return o("wphb_pro_get_avatar",{email:t},"POST").then((function(t){return t}))},getUsers:function(t){return o("wphb_pro_search_users",{exclude:t},"POST").then((function(t){return t}))}}};i()(this,s)};function a(t){if("object"!==o(t)&&(t=JSON.parse(t)),t.success)return t.data;var e=t.data||{},n=new Error(e.message||"Error trying to fetch response from server");throw n.response=t,n}e.Z=s},3265:function(t,e,n){"use strict";n.d(e,{K:function(){return r},R:function(){return i}});var r=function(t){return wphb.strings[t]||""},i=function(t){return wphb.links[t]||""}},4814:function(t,e){"use strict";function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var r=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.totalSteps=parseInt(e),this.currentStep=parseInt(n),this.cancelling=!1}var e,r,i;return e=t,r=[{key:"start",value:function(){var t=this;this.updateProgressBar(this.getProgress());var e=this.totalSteps-this.currentStep;0!==this.currentStep?this.step(e):this.onStart().then((function(){t.step(e)}))}},{key:"cancel",value:function(){this.cancelling=!0,this.updateProgressBar(0,!0)}},{key:"getProgress",value:function(){if(this.cancelling)return 0;var t=this.totalSteps-this.currentStep;return Math.min(Math.round(100*parseInt(this.totalSteps-t)/this.totalSteps),99)}},{key:"updateProgressBar",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t>100&&(t=100),document.querySelector(".sui-progress-block .sui-progress-text span").innerHTML=t+"%",document.querySelector(".sui-progress-block .sui-progress-bar span").style.width=t+"%",t>=90&&(document.querySelector(".sui-progress-state .sui-progress-state-text").innerHTML="Finalizing..."),e&&(document.querySelector(".sui-progress-state .sui-progress-state-text").innerHTML="Cancelling...")}},{key:"step",value:function(t){t>=0&&(this.currentStep=this.totalSteps-t)}},{key:"onStart",value:function(){throw new Error("onStart() must be implemented in child class")}},{key:"onFinish",value:function(){this.updateProgressBar(100)}}],r&&n(e.prototype,r),i&&n(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.Z=r},9256:function(t,e,n){var r=n(8719);t.exports=r},1457:function(t,e,n){n(4553);var r=n(2649);t.exports=r("Array","findIndex")},2414:function(t,e,n){n(9956)},9956:function(t,e,n){var r=n(9256);t.exports=r},9662:function(t,e,n){var r=n(614),i=n(6330),o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not a function")}},1223:function(t,e,n){var r=n(5112),i=n(30),o=n(3070).f,s=r("unscopables"),a=Array.prototype;null==a[s]&&o(a,s,{configurable:!0,value:i(null)}),t.exports=function(t){a[s][t]=!0}},9670:function(t,e,n){var r=n(111),i=String,o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not an object")}},1318:function(t,e,n){var r=n(5656),i=n(1400),o=n(6244),s=function(t){return function(e,n,s){var a,c=r(e),u=o(c),l=i(s,u);if(t&&n!=n){for(;u>l;)if((a=c[l++])!=a)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},2092:function(t,e,n){var r=n(9974),i=n(1702),o=n(8361),s=n(7908),a=n(6244),c=n(5417),u=i([].push),l=function(t){var e=1==t,n=2==t,i=3==t,l=4==t,p=6==t,d=7==t,f=5==t||p;return function(h,g,m,_){for(var v,y,b=s(h),w=o(b),k=r(g,m),S=a(w),x=0,O=_||c,E=e?O(h,S):n||d?O(h,0):void 0;S>x;x++)if((f||x in w)&&(y=k(v=w[x],x,b),t))if(e)E[x]=y;else if(y)switch(t){case 3:return!0;case 5:return v;case 6:return x;case 2:u(E,v)}else switch(t){case 4:return!1;case 7:u(E,v)}return p?-1:i||l?l:E}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},7475:function(t,e,n){var r=n(3157),i=n(4411),o=n(111),s=n(5112)("species"),a=Array;t.exports=function(t){var e;return r(t)&&(e=t.constructor,(i(e)&&(e===a||r(e.prototype))||o(e)&&null===(e=e[s]))&&(e=void 0)),void 0===e?a:e}},5417:function(t,e,n){var r=n(7475);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},4326:function(t,e,n){var r=n(84),i=r({}.toString),o=r("".slice);t.exports=function(t){return o(i(t),8,-1)}},648:function(t,e,n){var r=n(1694),i=n(614),o=n(4326),s=n(5112)("toStringTag"),a=Object,c="Arguments"==o(function(){return arguments}());t.exports=r?o:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=a(t),s))?n:c?o(e):"Object"==(r=o(e))&&i(e.callee)?"Arguments":r}},9920:function(t,e,n){var r=n(2597),i=n(3887),o=n(1236),s=n(3070);t.exports=function(t,e,n){for(var a=i(e),c=s.f,u=o.f,l=0;l<a.length;l++){var p=a[l];r(t,p)||n&&r(n,p)||c(t,p,u(e,p))}}},8880:function(t,e,n){var r=n(9781),i=n(3070),o=n(9114);t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},9114:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},8052:function(t,e,n){var r=n(614),i=n(3070),o=n(6339),s=n(3072);t.exports=function(t,e,n,a){a||(a={});var c=a.enumerable,u=void 0!==a.name?a.name:e;if(r(n)&&o(n,u,a),a.global)c?t[e]=n:s(e,n);else{try{a.unsafe?t[e]&&(c=!0):delete t[e]}catch(t){}c?t[e]=n:i.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},3072:function(t,e,n){var r=n(7854),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},9781:function(t,e,n){var r=n(7293);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4154:function(t){var e="object"==typeof document&&document.all,n=void 0===e&&void 0!==e;t.exports={all:e,IS_HTMLDDA:n}},317:function(t,e,n){var r=n(7854),i=n(111),o=r.document,s=i(o)&&i(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},8113:function(t,e,n){var r=n(5005);t.exports=r("navigator","userAgent")||""},7392:function(t,e,n){var r,i,o=n(7854),s=n(8113),a=o.process,c=o.Deno,u=a&&a.versions||c&&c.version,l=u&&u.v8;l&&(i=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(i=+r[1]),t.exports=i},2649:function(t,e,n){var r=n(7854),i=n(1702);t.exports=function(t,e){return i(r[t].prototype[e])}},748:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(t,e,n){var r=n(7854),i=n(1236).f,o=n(8880),s=n(8052),a=n(3072),c=n(9920),u=n(4705);t.exports=function(t,e){var n,l,p,d,f,h=t.target,g=t.global,m=t.stat;if(n=g?r:m?r[h]||a(h,{}):(r[h]||{}).prototype)for(l in e){if(d=e[l],p=t.dontCallGetSet?(f=i(n,l))&&f.value:n[l],!u(g?l:h+(m?".":"#")+l,t.forced)&&void 0!==p){if(typeof d==typeof p)continue;c(d,p)}(t.sham||p&&p.sham)&&o(d,"sham",!0),s(n,l,d,t)}}},7293:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},9974:function(t,e,n){var r=n(1702),i=n(9662),o=n(4374),s=r(r.bind);t.exports=function(t,e){return i(t),void 0===e?t:o?s(t,e):function(){return t.apply(e,arguments)}}},4374:function(t,e,n){var r=n(7293);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},1460:function(t,e,n){var r=n(4374),i=Function.prototype.call;t.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},6530:function(t,e,n){var r=n(9781),i=n(2597),o=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=i(o,"name"),c=a&&"something"===function(){}.name,u=a&&(!r||r&&s(o,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:u}},84:function(t,e,n){var r=n(4374),i=Function.prototype,o=i.call,s=r&&i.bind.bind(o,o);t.exports=r?s:function(t){return function(){return o.apply(t,arguments)}}},1702:function(t,e,n){var r=n(4326),i=n(84);t.exports=function(t){if("Function"===r(t))return i(t)}},5005:function(t,e,n){var r=n(7854),i=n(614),o=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t]):r[t]&&r[t][e]}},8173:function(t,e,n){var r=n(9662),i=n(8554);t.exports=function(t,e){var n=t[e];return i(n)?void 0:r(n)}},7854:function(t,e,n){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},2597:function(t,e,n){var r=n(1702),i=n(7908),o=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},3501:function(t){t.exports={}},490:function(t,e,n){var r=n(5005);t.exports=r("document","documentElement")},4664:function(t,e,n){var r=n(9781),i=n(7293),o=n(317);t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},8361:function(t,e,n){var r=n(1702),i=n(7293),o=n(4326),s=Object,a=r("".split);t.exports=i((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?a(t,""):s(t)}:s},2788:function(t,e,n){var r=n(1702),i=n(614),o=n(5465),s=r(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return s(t)}),t.exports=o.inspectSource},9909:function(t,e,n){var r,i,o,s=n(4811),a=n(7854),c=n(111),u=n(8880),l=n(2597),p=n(5465),d=n(6200),f=n(3501),h="Object already initialized",g=a.TypeError,m=a.WeakMap;if(s||p.state){var _=p.state||(p.state=new m);_.get=_.get,_.has=_.has,_.set=_.set,r=function(t,e){if(_.has(t))throw g(h);return e.facade=t,_.set(t,e),e},i=function(t){return _.get(t)||{}},o=function(t){return _.has(t)}}else{var v=d("state");f[v]=!0,r=function(t,e){if(l(t,v))throw g(h);return e.facade=t,u(t,v,e),e},i=function(t){return l(t,v)?t[v]:{}},o=function(t){return l(t,v)}}t.exports={set:r,get:i,has:o,enforce:function(t){return o(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=i(e)).type!==t)throw g("Incompatible receiver, "+t+" required");return n}}}},3157:function(t,e,n){var r=n(4326);t.exports=Array.isArray||function(t){return"Array"==r(t)}},614:function(t,e,n){var r=n(4154),i=r.all;t.exports=r.IS_HTMLDDA?function(t){return"function"==typeof t||t===i}:function(t){return"function"==typeof t}},4411:function(t,e,n){var r=n(1702),i=n(7293),o=n(614),s=n(648),a=n(5005),c=n(2788),u=function(){},l=[],p=a("Reflect","construct"),d=/^\s*(?:class|function)\b/,f=r(d.exec),h=!d.exec(u),g=function(t){if(!o(t))return!1;try{return p(u,l,t),!0}catch(t){return!1}},m=function(t){if(!o(t))return!1;switch(s(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return h||!!f(d,c(t))}catch(t){return!0}};m.sham=!0,t.exports=!p||i((function(){var t;return g(g.call)||!g(Object)||!g((function(){t=!0}))||t}))?m:g},4705:function(t,e,n){var r=n(7293),i=n(614),o=/#|\.prototype\./,s=function(t,e){var n=c[a(t)];return n==l||n!=u&&(i(e)?r(e):!!e)},a=s.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=s.data={},u=s.NATIVE="N",l=s.POLYFILL="P";t.exports=s},8554:function(t){t.exports=function(t){return null==t}},111:function(t,e,n){var r=n(614),i=n(4154),o=i.all;t.exports=i.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:r(t)||t===o}:function(t){return"object"==typeof t?null!==t:r(t)}},1913:function(t){t.exports=!1},2190:function(t,e,n){var r=n(5005),i=n(614),o=n(7976),s=n(3307),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return i(e)&&o(e.prototype,a(t))}},6244:function(t,e,n){var r=n(7466);t.exports=function(t){return r(t.length)}},6339:function(t,e,n){var r=n(7293),i=n(614),o=n(2597),s=n(9781),a=n(6530).CONFIGURABLE,c=n(2788),u=n(9909),l=u.enforce,p=u.get,d=Object.defineProperty,f=s&&!r((function(){return 8!==d((function(){}),"length",{value:8}).length})),h=String(String).split("String"),g=t.exports=function(t,e,n){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!o(t,"name")||a&&t.name!==e)&&(s?d(t,"name",{value:e,configurable:!0}):t.name=e),f&&n&&o(n,"arity")&&t.length!==n.arity&&d(t,"length",{value:n.arity});try{n&&o(n,"constructor")&&n.constructor?s&&d(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=l(t);return o(r,"source")||(r.source=h.join("string"==typeof e?e:"")),t};Function.prototype.toString=g((function(){return i(this)&&p(this).source||c(this)}),"toString")},4758:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},30:function(t,e,n){var r,i=n(9670),o=n(6048),s=n(748),a=n(3501),c=n(490),u=n(317),l=n(6200),p=l("IE_PROTO"),d=function(){},f=function(t){return"<script>"+t+"</"+"script>"},h=function(t){t.write(f("")),t.close();var e=t.parentWindow.Object;return t=null,e},g=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;g="undefined"!=typeof document?document.domain&&r?h(r):((e=u("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(f("document.F=Object")),t.close(),t.F):h(r);for(var n=s.length;n--;)delete g.prototype[s[n]];return g()};a[p]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(d.prototype=i(t),n=new d,d.prototype=null,n[p]=t):n=g(),void 0===e?n:o.f(n,e)}},6048:function(t,e,n){var r=n(9781),i=n(3353),o=n(3070),s=n(9670),a=n(5656),c=n(1956);e.f=r&&!i?Object.defineProperties:function(t,e){s(t);for(var n,r=a(e),i=c(e),u=i.length,l=0;u>l;)o.f(t,n=i[l++],r[n]);return t}},3070:function(t,e,n){var r=n(9781),i=n(4664),o=n(3353),s=n(9670),a=n(4948),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,p="enumerable",d="configurable",f="writable";e.f=r?o?function(t,e,n){if(s(t),e=a(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&f in n&&!n.writable){var r=l(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:d in n?n.configurable:r.configurable,enumerable:p in n?n.enumerable:r.enumerable,writable:!1})}return u(t,e,n)}:u:function(t,e,n){if(s(t),e=a(e),s(n),i)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},1236:function(t,e,n){var r=n(9781),i=n(1460),o=n(5296),s=n(9114),a=n(5656),c=n(4948),u=n(2597),l=n(4664),p=Object.getOwnPropertyDescriptor;e.f=r?p:function(t,e){if(t=a(t),e=c(e),l)try{return p(t,e)}catch(t){}if(u(t,e))return s(!i(o.f,t,e),t[e])}},8006:function(t,e,n){var r=n(6324),i=n(748).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},5181:function(t,e){e.f=Object.getOwnPropertySymbols},7976:function(t,e,n){var r=n(1702);t.exports=r({}.isPrototypeOf)},6324:function(t,e,n){var r=n(1702),i=n(2597),o=n(5656),s=n(1318).indexOf,a=n(3501),c=r([].push);t.exports=function(t,e){var n,r=o(t),u=0,l=[];for(n in r)!i(a,n)&&i(r,n)&&c(l,n);for(;e.length>u;)i(r,n=e[u++])&&(~s(l,n)||c(l,n));return l}},1956:function(t,e,n){var r=n(6324),i=n(748);t.exports=Object.keys||function(t){return r(t,i)}},5296:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},2140:function(t,e,n){var r=n(1460),i=n(614),o=n(111),s=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&i(n=t.toString)&&!o(a=r(n,t)))return a;if(i(n=t.valueOf)&&!o(a=r(n,t)))return a;if("string"!==e&&i(n=t.toString)&&!o(a=r(n,t)))return a;throw s("Can't convert object to primitive value")}},3887:function(t,e,n){var r=n(5005),i=n(1702),o=n(8006),s=n(5181),a=n(9670),c=i([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(a(t)),n=s.f;return n?c(e,n(t)):e}},4488:function(t,e,n){var r=n(8554),i=TypeError;t.exports=function(t){if(r(t))throw i("Can't call method on "+t);return t}},6200:function(t,e,n){var r=n(2309),i=n(9711),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},5465:function(t,e,n){var r=n(7854),i=n(3072),o="__core-js_shared__",s=r[o]||i(o,{});t.exports=s},2309:function(t,e,n){var r=n(1913),i=n(5465);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.26.0",mode:r?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.0/LICENSE",source:"https://github.com/zloirock/core-js"})},6293:function(t,e,n){var r=n(7392),i=n(7293);t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},1400:function(t,e,n){var r=n(9303),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},5656:function(t,e,n){var r=n(8361),i=n(4488);t.exports=function(t){return r(i(t))}},9303:function(t,e,n){var r=n(4758);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},7466:function(t,e,n){var r=n(9303),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},7908:function(t,e,n){var r=n(4488),i=Object;t.exports=function(t){return i(r(t))}},7593:function(t,e,n){var r=n(1460),i=n(111),o=n(2190),s=n(8173),a=n(2140),c=n(5112),u=TypeError,l=c("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var n,c=s(t,l);if(c){if(void 0===e&&(e="default"),n=r(c,t,e),!i(n)||o(n))return n;throw u("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},4948:function(t,e,n){var r=n(7593),i=n(2190);t.exports=function(t){var e=r(t,"string");return i(e)?e:e+""}},1694:function(t,e,n){var r={};r[n(5112)("toStringTag")]="z",t.exports="[object z]"===String(r)},6330:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},9711:function(t,e,n){var r=n(1702),i=0,o=Math.random(),s=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++i+o,36)}},3307:function(t,e,n){var r=n(6293);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3353:function(t,e,n){var r=n(9781),i=n(7293);t.exports=r&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},4811:function(t,e,n){var r=n(7854),i=n(614),o=r.WeakMap;t.exports=i(o)&&/native code/.test(String(o))},5112:function(t,e,n){var r=n(7854),i=n(2309),o=n(2597),s=n(9711),a=n(6293),c=n(3307),u=i("wks"),l=r.Symbol,p=l&&l.for,d=c?l:l&&l.withoutSetter||s;t.exports=function(t){if(!o(u,t)||!a&&"string"!=typeof u[t]){var e="Symbol."+t;a&&o(l,t)?u[t]=l[t]:u[t]=c&&p?p(e):d(e)}return u[t]}},4553:function(t,e,n){"use strict";var r=n(2109),i=n(2092).findIndex,o=n(1223),s="findIndex",a=!0;s in[]&&Array(1).findIndex((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o(s)},8719:function(t,e,n){var r=n(1457);t.exports=r},2702:function(t,e,n){t.exports=function(){"use strict";function t(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function e(t){return"function"==typeof t}var r=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},i=0,o=void 0,s=void 0,a=function(t,e){b[i]=t,b[i+1]=e,2===(i+=2)&&(s?s(w):S())};function c(t){s=t}function u(t){a=t}var l="undefined"!=typeof window?window:void 0,p=l||{},d=p.MutationObserver||p.WebKitMutationObserver,f="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function g(){return function(){return process.nextTick(w)}}function m(){return void 0!==o?function(){o(w)}:y()}function _(){var t=0,e=new d(w),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function v(){var t=new MessageChannel;return t.port1.onmessage=w,function(){return t.port2.postMessage(0)}}function y(){var t=setTimeout;return function(){return t(w,1)}}var b=new Array(1e3);function w(){for(var t=0;t<i;t+=2)(0,b[t])(b[t+1]),b[t]=void 0,b[t+1]=void 0;i=0}function k(){try{var t=Function("return this")().require("vertx");return o=t.runOnLoop||t.runOnContext,m()}catch(t){return y()}}var S=void 0;function x(t,e){var n=this,r=new this.constructor(P);void 0===r[E]&&Z(r);var i=n._state;if(i){var o=arguments[i-1];a((function(){return $(i,r,o,n._result)}))}else N(n,r,t,e);return r}function O(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(P);return F(n,t),n}S=f?g():d?_():h?v():void 0===l?k():y();var E=Math.random().toString(36).substring(2);function P(){}var C=void 0,I=1,j=2;function A(){return new TypeError("You cannot resolve a promise with itself")}function B(){return new TypeError("A promises callback cannot return that same promise.")}function T(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}function D(t,e,n){a((function(t){var r=!1,i=T(n,e,(function(n){r||(r=!0,e!==n?F(t,n):U(t,n))}),(function(e){r||(r=!0,R(t,e))}),"Settle: "+(t._label||" unknown promise"));!r&&i&&(r=!0,R(t,i))}),t)}function L(t,e){e._state===I?U(t,e._result):e._state===j?R(t,e._result):N(e,void 0,(function(e){return F(t,e)}),(function(e){return R(t,e)}))}function q(t,n,r){n.constructor===t.constructor&&r===x&&n.constructor.resolve===O?L(t,n):void 0===r?U(t,n):e(r)?D(t,n,r):U(t,n)}function F(e,n){if(e===n)R(e,A());else if(t(n)){var r=void 0;try{r=n.then}catch(t){return void R(e,t)}q(e,n,r)}else U(e,n)}function M(t){t._onerror&&t._onerror(t._result),H(t)}function U(t,e){t._state===C&&(t._result=e,t._state=I,0!==t._subscribers.length&&a(H,t))}function R(t,e){t._state===C&&(t._state=j,t._result=e,a(M,t))}function N(t,e,n,r){var i=t._subscribers,o=i.length;t._onerror=null,i[o]=e,i[o+I]=n,i[o+j]=r,0===o&&t._state&&a(H,t)}function H(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,i=void 0,o=t._result,s=0;s<e.length;s+=3)r=e[s],i=e[s+n],r?$(n,r,i,o):i(o);t._subscribers.length=0}}function $(t,n,r,i){var o=e(r),s=void 0,a=void 0,c=!0;if(o){try{s=r(i)}catch(t){c=!1,a=t}if(n===s)return void R(n,B())}else s=i;n._state!==C||(o&&c?F(n,s):!1===c?R(n,a):t===I?U(n,s):t===j&&R(n,s))}function z(t,e){try{e((function(e){F(t,e)}),(function(e){R(t,e)}))}catch(e){R(t,e)}}var W=0;function K(){return W++}function Z(t){t[E]=W++,t._state=void 0,t._result=void 0,t._subscribers=[]}function G(){return new Error("Array Methods must be provided an Array")}var Q=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(P),this.promise[E]||Z(this.promise),r(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?U(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&U(this.promise,this._result))):R(this.promise,G())}return t.prototype._enumerate=function(t){for(var e=0;this._state===C&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===O){var i=void 0,o=void 0,s=!1;try{i=t.then}catch(t){s=!0,o=t}if(i===x&&t._state!==C)this._settledAt(t._state,e,t._result);else if("function"!=typeof i)this._remaining--,this._result[e]=t;else if(n===et){var a=new n(P);s?R(a,o):q(a,t,i),this._willSettleAt(a,e)}else this._willSettleAt(new n((function(e){return e(t)})),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===C&&(this._remaining--,t===j?R(r,n):this._result[e]=n),0===this._remaining&&U(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;N(t,void 0,(function(t){return n._settledAt(I,e,t)}),(function(t){return n._settledAt(j,e,t)}))},t}();function J(t){return new Q(this,t).promise}function V(t){var e=this;return r(t)?new e((function(n,r){for(var i=t.length,o=0;o<i;o++)e.resolve(t[o]).then(n,r)})):new e((function(t,e){return e(new TypeError("You must pass an array to race."))}))}function Y(t){var e=new this(P);return R(e,t),e}function X(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function tt(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var et=function(){function t(e){this[E]=K(),this._result=this._state=void 0,this._subscribers=[],P!==e&&("function"!=typeof e&&X(),this instanceof t?z(this,e):tt())}return t.prototype.catch=function(t){return this.then(null,t)},t.prototype.finally=function(t){var n=this,r=n.constructor;return e(t)?n.then((function(e){return r.resolve(t()).then((function(){return e}))}),(function(e){return r.resolve(t()).then((function(){throw e}))})):n.then(t,t)},t}();function nt(){var t=void 0;if(void 0!==n.g)t=n.g;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var r=null;try{r=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===r&&!e.cast)return}t.Promise=et}return et.prototype.then=x,et.all=J,et.race=V,et.resolve=O,et.reject=Y,et._setScheduler=c,et._setAsap=u,et._asap=a,et.polyfill=nt,et.Promise=et,et}()},2705:function(t,e,n){var r=n(5639).Symbol;t.exports=r},6874:function(t){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},4636:function(t,e,n){var r=n(2545),i=n(5694),o=n(1469),s=n(4144),a=n(5776),c=n(6719),u=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=o(t),l=!n&&i(t),p=!n&&!l&&s(t),d=!n&&!l&&!p&&c(t),f=n||l||p||d,h=f?r(t.length,String):[],g=h.length;for(var m in t)!e&&!u.call(t,m)||f&&("length"==m||p&&("offset"==m||"parent"==m)||d&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||a(m,g))||h.push(m);return h}},4865:function(t,e,n){var r=n(9465),i=n(7813),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var s=t[e];o.call(t,e)&&i(s,n)&&(void 0!==n||e in t)||r(t,e,n)}},9465:function(t,e,n){var r=n(8777);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},4239:function(t,e,n){var r=n(2705),i=n(9607),o=n(2333),s=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?i(t):o(t)}},9454:function(t,e,n){var r=n(4239),i=n(7005);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},8458:function(t,e,n){var r=n(3560),i=n(5346),o=n(3218),s=n(346),a=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,p=u.hasOwnProperty,d=RegExp("^"+l.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(r(t)?d:a).test(s(t))}},8749:function(t,e,n){var r=n(4239),i=n(1780),o=n(7005),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!s[r(t)]}},280:function(t,e,n){var r=n(5726),i=n(6916),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))o.call(t,n)&&"constructor"!=n&&e.push(n);return e}},5976:function(t,e,n){var r=n(6557),i=n(5357),o=n(61);t.exports=function(t,e){return o(i(t,e,r),t+"")}},6560:function(t,e,n){var r=n(5703),i=n(8777),o=n(6557),s=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:o;t.exports=s},2545:function(t){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},7518:function(t){t.exports=function(t){return function(e){return t(e)}}},8363:function(t,e,n){var r=n(4865),i=n(9465);t.exports=function(t,e,n,o){var s=!n;n||(n={});for(var a=-1,c=e.length;++a<c;){var u=e[a],l=o?o(n[u],t[u],u,n,t):void 0;void 0===l&&(l=t[u]),s?i(n,u,l):r(n,u,l)}return n}},4429:function(t,e,n){var r=n(5639)["__core-js_shared__"];t.exports=r},1463:function(t,e,n){var r=n(5976),i=n(6612);t.exports=function(t){return r((function(e,n){var r=-1,o=n.length,s=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(s=t.length>3&&"function"==typeof s?(o--,s):void 0,a&&i(n[0],n[1],a)&&(s=o<3?void 0:s,o=1),e=Object(e);++r<o;){var c=n[r];c&&t(e,c,r,s)}return e}))}},8777:function(t,e,n){var r=n(852),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},1957:function(t,e,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r},852:function(t,e,n){var r=n(8458),i=n(7801);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},9607:function(t,e,n){var r=n(2705),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,a),n=t[a];try{t[a]=void 0;var r=!0}catch(t){}var i=s.call(t);return r&&(e?t[a]=n:delete t[a]),i}},7801:function(t){t.exports=function(t,e){return null==t?void 0:t[e]}},5776:function(t){var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}},6612:function(t,e,n){var r=n(7813),i=n(8612),o=n(5776),s=n(3218);t.exports=function(t,e,n){if(!s(n))return!1;var a=typeof e;return!!("number"==a?i(n)&&o(e,n.length):"string"==a&&e in n)&&r(n[e],t)}},5346:function(t,e,n){var r,i=n(4429),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!o&&o in t}},5726:function(t){var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},6916:function(t,e,n){var r=n(5569)(Object.keys,Object);t.exports=r},1167:function(t,e,n){t=n.nmd(t);var r=n(1957),i=e&&!e.nodeType&&e,o=i&&t&&!t.nodeType&&t,s=o&&o.exports===i&&r.process,a=function(){try{var t=o&&o.require&&o.require("util").types;return t||s&&s.binding&&s.binding("util")}catch(t){}}();t.exports=a},2333:function(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},5569:function(t){t.exports=function(t,e){return function(n){return t(e(n))}}},5357:function(t,e,n){var r=n(6874),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,s=-1,a=i(o.length-e,0),c=Array(a);++s<a;)c[s]=o[e+s];s=-1;for(var u=Array(e+1);++s<e;)u[s]=o[s];return u[e]=n(c),r(t,this,u)}}},5639:function(t,e,n){var r=n(1957),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},61:function(t,e,n){var r=n(6560),i=n(1275)(r);t.exports=i},1275:function(t){var e=Date.now;t.exports=function(t){var n=0,r=0;return function(){var i=e(),o=16-(i-r);if(r=i,o>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},346:function(t){var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},8583:function(t,e,n){var r=n(4865),i=n(8363),o=n(1463),s=n(8612),a=n(5726),c=n(3674),u=Object.prototype.hasOwnProperty,l=o((function(t,e){if(a(e)||s(e))i(e,c(e),t);else for(var n in e)u.call(e,n)&&r(t,n,e[n])}));t.exports=l},5703:function(t){t.exports=function(t){return function(){return t}}},7813:function(t){t.exports=function(t,e){return t===e||t!=t&&e!=e}},6557:function(t){t.exports=function(t){return t}},5694:function(t,e,n){var r=n(9454),i=n(7005),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return i(t)&&s.call(t,"callee")&&!a.call(t,"callee")};t.exports=c},1469:function(t){var e=Array.isArray;t.exports=e},8612:function(t,e,n){var r=n(3560),i=n(1780);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},4144:function(t,e,n){t=n.nmd(t);var r=n(5639),i=n(5062),o=e&&!e.nodeType&&e,s=o&&t&&!t.nodeType&&t,a=s&&s.exports===o?r.Buffer:void 0,c=(a?a.isBuffer:void 0)||i;t.exports=c},3560:function(t,e,n){var r=n(4239),i=n(3218);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},1780:function(t){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},3218:function(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},7005:function(t){t.exports=function(t){return null!=t&&"object"==typeof t}},6719:function(t,e,n){var r=n(8749),i=n(7518),o=n(1167),s=o&&o.isTypedArray,a=s?i(s):r;t.exports=a},3674:function(t,e,n){var r=n(4636),i=n(280),o=n(8612);t.exports=function(t){return o(t)?r(t):i(t)}},5062:function(t){t.exports=function(){return!1}},8891:function(t){"use strict";var e,n={DEBUG:!1,LIB_VERSION:"2.45.0"};if("undefined"==typeof window){var r={hostname:""};e={navigator:{userAgent:""},document:{location:r,referrer:""},screen:{width:0,height:0},location:r}}else e=window;var i,o,s,a,c,u,l,p,d,f,h,g=Array.prototype,m=Function.prototype,_=Object.prototype,v=g.slice,y=_.toString,b=_.hasOwnProperty,w=e.console,k=e.navigator,S=e.document,x=e.opera,O=e.screen,E=k.userAgent,P=m.bind,C=g.forEach,I=g.indexOf,j=g.map,A=Array.isArray,B={},T={trim:function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},D={log:function(){if(n.DEBUG&&!T.isUndefined(w)&&w)try{w.log.apply(w,arguments)}catch(t){T.each(arguments,(function(t){w.log(t)}))}},warn:function(){if(n.DEBUG&&!T.isUndefined(w)&&w){var t=["Mixpanel warning:"].concat(T.toArray(arguments));try{w.warn.apply(w,t)}catch(e){T.each(t,(function(t){w.warn(t)}))}}},error:function(){if(n.DEBUG&&!T.isUndefined(w)&&w){var t=["Mixpanel error:"].concat(T.toArray(arguments));try{w.error.apply(w,t)}catch(e){T.each(t,(function(t){w.error(t)}))}}},critical:function(){if(!T.isUndefined(w)&&w){var t=["Mixpanel error:"].concat(T.toArray(arguments));try{w.error.apply(w,t)}catch(e){T.each(t,(function(t){w.error(t)}))}}}},L=function(t,e){return function(){return arguments[0]="["+e+"] "+arguments[0],t.apply(D,arguments)}},q=function(t){return{log:L(D.log,t),error:L(D.error,t),critical:L(D.critical,t)}};T.bind=function(t,e){var n,r;if(P&&t.bind===P)return P.apply(t,v.call(arguments,1));if(!T.isFunction(t))throw new TypeError;return n=v.call(arguments,2),r=function(){if(!(this instanceof r))return t.apply(e,n.concat(v.call(arguments)));var i={};i.prototype=t.prototype;var o=new i;i.prototype=null;var s=t.apply(o,n.concat(v.call(arguments)));return Object(s)===s?s:o},r},T.each=function(t,e,n){if(null!=t)if(C&&t.forEach===C)t.forEach(e,n);else if(t.length===+t.length){for(var r=0,i=t.length;r<i;r++)if(r in t&&e.call(n,t[r],r,t)===B)return}else for(var o in t)if(b.call(t,o)&&e.call(n,t[o],o,t)===B)return},T.extend=function(t){return T.each(v.call(arguments,1),(function(e){for(var n in e)void 0!==e[n]&&(t[n]=e[n])})),t},T.isArray=A||function(t){return"[object Array]"===y.call(t)},T.isFunction=function(t){try{return/^\s*\bfunction\b/.test(t)}catch(t){return!1}},T.isArguments=function(t){return!(!t||!b.call(t,"callee"))},T.toArray=function(t){return t?t.toArray?t.toArray():T.isArray(t)||T.isArguments(t)?v.call(t):T.values(t):[]},T.map=function(t,e,n){if(j&&t.map===j)return t.map(e,n);var r=[];return T.each(t,(function(t){r.push(e.call(n,t))})),r},T.keys=function(t){var e=[];return null===t||T.each(t,(function(t,n){e[e.length]=n})),e},T.values=function(t){var e=[];return null===t||T.each(t,(function(t){e[e.length]=t})),e},T.include=function(t,e){var n=!1;return null===t?n:I&&t.indexOf===I?-1!=t.indexOf(e):(T.each(t,(function(t){if(n||(n=t===e))return B})),n)},T.includes=function(t,e){return-1!==t.indexOf(e)},T.inherit=function(t,e){return t.prototype=new e,t.prototype.constructor=t,t.superclass=e.prototype,t},T.isObject=function(t){return t===Object(t)&&!T.isArray(t)},T.isEmptyObject=function(t){if(T.isObject(t)){for(var e in t)if(b.call(t,e))return!1;return!0}return!1},T.isUndefined=function(t){return void 0===t},T.isString=function(t){return"[object String]"==y.call(t)},T.isDate=function(t){return"[object Date]"==y.call(t)},T.isNumber=function(t){return"[object Number]"==y.call(t)},T.isElement=function(t){return!(!t||1!==t.nodeType)},T.encodeDates=function(t){return T.each(t,(function(e,n){T.isDate(e)?t[n]=T.formatDate(e):T.isObject(e)&&(t[n]=T.encodeDates(e))})),t},T.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},T.formatDate=function(t){function e(t){return t<10?"0"+t:t}return t.getUTCFullYear()+"-"+e(t.getUTCMonth()+1)+"-"+e(t.getUTCDate())+"T"+e(t.getUTCHours())+":"+e(t.getUTCMinutes())+":"+e(t.getUTCSeconds())},T.strip_empty_properties=function(t){var e={};return T.each(t,(function(t,n){T.isString(t)&&t.length>0&&(e[n]=t)})),e},T.truncate=function(t,e){var n;return"string"==typeof t?n=t.slice(0,e):T.isArray(t)?(n=[],T.each(t,(function(t){n.push(T.truncate(t,e))}))):T.isObject(t)?(n={},T.each(t,(function(t,r){n[r]=T.truncate(t,e)}))):n=t,n},T.JSONEncode=function(t){var e=function(t){var e=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return e.lastIndex=0,e.test(t)?'"'+t.replace(e,(function(t){var e=n[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+t+'"'},n=function(t,r){var i="",o=0,s="",a="",c=0,u=i,l=[],p=r[t];switch(p&&"object"==typeof p&&"function"==typeof p.toJSON&&(p=p.toJSON(t)),typeof p){case"string":return e(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":return String(p);case"object":if(!p)return"null";if(i+=" ",l=[],"[object Array]"===y.apply(p)){for(c=p.length,o=0;o<c;o+=1)l[o]=n(o,p)||"null";return a=0===l.length?"[]":i?"[\n"+i+l.join(",\n"+i)+"\n"+u+"]":"["+l.join(",")+"]",i=u,a}for(s in p)b.call(p,s)&&(a=n(s,p))&&l.push(e(s)+(i?": ":":")+a);return a=0===l.length?"{}":i?"{"+l.join(",")+u+"}":"{"+l.join(",")+"}",i=u,a}};return n("",{"":t})},T.JSONDecode=(c={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},u=function(t){var e=new SyntaxError(t);throw e.at=i,e.text=s,e},l=function(t){return t&&t!==o&&u("Expected '"+t+"' instead of '"+o+"'"),o=s.charAt(i),i+=1,o},p=function(){var t,e="";for("-"===o&&(e="-",l("-"));o>="0"&&o<="9";)e+=o,l();if("."===o)for(e+=".";l()&&o>="0"&&o<="9";)e+=o;if("e"===o||"E"===o)for(e+=o,l(),"-"!==o&&"+"!==o||(e+=o,l());o>="0"&&o<="9";)e+=o,l();if(t=+e,isFinite(t))return t;u("Bad number")},d=function(){var t,e,n,r="";if('"'===o)for(;l();){if('"'===o)return l(),r;if("\\"===o)if(l(),"u"===o){for(n=0,e=0;e<4&&(t=parseInt(l(),16),isFinite(t));e+=1)n=16*n+t;r+=String.fromCharCode(n)}else{if("string"!=typeof c[o])break;r+=c[o]}else r+=o}u("Bad string")},f=function(){for(;o&&o<=" ";)l()},a=function(){switch(f(),o){case"{":return function(){var t,e={};if("{"===o){if(l("{"),f(),"}"===o)return l("}"),e;for(;o;){if(t=d(),f(),l(":"),Object.hasOwnProperty.call(e,t)&&u('Duplicate key "'+t+'"'),e[t]=a(),f(),"}"===o)return l("}"),e;l(","),f()}}u("Bad object")}();case"[":return function(){var t=[];if("["===o){if(l("["),f(),"]"===o)return l("]"),t;for(;o;){if(t.push(a()),f(),"]"===o)return l("]"),t;l(","),f()}}u("Bad array")}();case'"':return d();case"-":return p();default:return o>="0"&&o<="9"?p():function(){switch(o){case"t":return l("t"),l("r"),l("u"),l("e"),!0;case"f":return l("f"),l("a"),l("l"),l("s"),l("e"),!1;case"n":return l("n"),l("u"),l("l"),l("l"),null}u('Unexpected "'+o+'"')}()}},function(t){var e;return s=t,i=0,o=" ",e=a(),f(),o&&u("Syntax error"),e}),T.base64Encode=function(t){var e,n,r,i,o,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,c=0,u="",l=[];if(!t)return t;t=T.utf8Encode(t);do{e=(o=t.charCodeAt(a++)<<16|t.charCodeAt(a++)<<8|t.charCodeAt(a++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,l[c++]=s.charAt(e)+s.charAt(n)+s.charAt(r)+s.charAt(i)}while(a<t.length);switch(u=l.join(""),t.length%3){case 1:u=u.slice(0,-2)+"==";break;case 2:u=u.slice(0,-1)+"="}return u},T.utf8Encode=function(t){var e,n,r,i,o="";for(e=n=0,r=(t=(t+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,i=0;i<r;i++){var s=t.charCodeAt(i),a=null;s<128?n++:a=s>127&&s<2048?String.fromCharCode(s>>6|192,63&s|128):String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128),null!==a&&(n>e&&(o+=t.substring(e,n)),o+=a,e=n=i+1)}return n>e&&(o+=t.substring(e,t.length)),o},T.UUID=(h=function(){for(var t=1*new Date,e=0;t==1*new Date;)e++;return t.toString(16)+e.toString(16)},function(){var t=(O.height*O.width).toString(16);return h()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var t,e,n=E,r=[],i=0;function o(t,e){var n,i=0;for(n=0;n<e.length;n++)i|=r[n]<<8*n;return t^i}for(t=0;t<n.length;t++)e=n.charCodeAt(t),r.unshift(255&e),r.length>=4&&(i=o(i,r),r=[]);return r.length>0&&(i=o(i,r)),i.toString(16)}()+"-"+t+"-"+h()});var F=["ahrefsbot","baiduspider","bingbot","bingpreview","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandexbot","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];T.isBlockedUA=function(t){var e;for(t=t.toLowerCase(),e=0;e<F.length;e++)if(-1!==t.indexOf(F[e]))return!0;return!1},T.HTTPBuildQuery=function(t,e){var n,r,i=[];return T.isUndefined(e)&&(e="&"),T.each(t,(function(t,e){n=encodeURIComponent(t.toString()),r=encodeURIComponent(e),i[i.length]=r+"="+n})),i.join(e)},T.getQueryParam=function(t,e){e=e.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);if(null===n||n&&"string"!=typeof n[1]&&n[1].length)return"";var r=n[1];try{r=decodeURIComponent(r)}catch(t){D.error("Skipping decoding for malformed query param: "+r)}return r.replace(/\+/g," ")},T.cookie={get:function(t){for(var e=t+"=",n=S.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];" "==i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(e))return decodeURIComponent(i.substring(e.length,i.length))}return null},parse:function(t){var e;try{e=T.JSONDecode(T.cookie.get(t))||{}}catch(t){}return e},set_seconds:function(t,e,n,r,i,o,s){var a="",c="",u="";if(s)a="; domain="+s;else if(r){var l=z(S.location.hostname);a=l?"; domain=."+l:""}if(n){var p=new Date;p.setTime(p.getTime()+1e3*n),c="; expires="+p.toGMTString()}o&&(i=!0,u="; SameSite=None"),i&&(u+="; secure"),S.cookie=t+"="+encodeURIComponent(e)+c+"; path=/"+a+u},set:function(t,e,n,r,i,o,s){var a="",c="",u="";if(s)a="; domain="+s;else if(r){var l=z(S.location.hostname);a=l?"; domain=."+l:""}if(n){var p=new Date;p.setTime(p.getTime()+24*n*60*60*1e3),c="; expires="+p.toGMTString()}o&&(i=!0,u="; SameSite=None"),i&&(u+="; secure");var d=t+"="+encodeURIComponent(e)+c+"; path=/"+a+u;return S.cookie=d,d},remove:function(t,e,n){T.cookie.set(t,"",-1,e,!1,!1,n)}};var M=null,U=function(t,e){if(null!==M&&!e)return M;var n=!0;try{t=t||window.localStorage;var r="__mplss_"+N(8);t.setItem(r,"xyz"),"xyz"!==t.getItem(r)&&(n=!1),t.removeItem(r)}catch(t){n=!1}return M=n,n};T.localStorage={is_supported:function(t){var e=U(null,t);return e||D.error("localStorage unsupported; falling back to cookie store"),e},error:function(t){D.error("localStorage error: "+t)},get:function(t){try{return window.localStorage.getItem(t)}catch(t){T.localStorage.error(t)}return null},parse:function(t){try{return T.JSONDecode(T.localStorage.get(t))||{}}catch(t){}return null},set:function(t,e){try{window.localStorage.setItem(t,e)}catch(t){T.localStorage.error(t)}},remove:function(t){try{window.localStorage.removeItem(t)}catch(t){T.localStorage.error(t)}}},T.register_event=function(){function t(e){return e&&(e.preventDefault=t.preventDefault,e.stopPropagation=t.stopPropagation),e}return t.preventDefault=function(){this.returnValue=!1},t.stopPropagation=function(){this.cancelBubble=!0},function(e,n,r,i,o){if(e)if(e.addEventListener&&!i)e.addEventListener(n,r,!!o);else{var s="on"+n,a=e[s];e[s]=function(e,n,r){return function(i){if(i=i||t(window.event)){var o,s,a=!0;return T.isFunction(r)&&(o=r(i)),s=n.call(e,i),!1!==o&&!1!==s||(a=!1),a}}}(e,r,a)}else D.error("No valid element provided to register_event")}}();var R=new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');T.dom_query=function(){function t(t){return t.all?t.all:t.getElementsByTagName("*")}var e=/[\t\r\n]/g;function n(t,n){var r=" "+n+" ";return(" "+t.className+" ").replace(e," ").indexOf(r)>=0}function r(e){if(!S.getElementsByTagName)return[];var r,i,o,s,a,c,u,l,p,d,f=e.split(" "),h=[S];for(c=0;c<f.length;c++)if((r=f[c].replace(/^\s+/,"").replace(/\s+$/,"")).indexOf("#")>-1){o=(i=r.split("#"))[0];var g=i[1],m=S.getElementById(g);if(!m||o&&m.nodeName.toLowerCase()!=o)return[];h=[m]}else if(r.indexOf(".")>-1){o=(i=r.split("."))[0];var _=i[1];for(o||(o="*"),s=[],a=0,u=0;u<h.length;u++)for(p="*"==o?t(h[u]):h[u].getElementsByTagName(o),l=0;l<p.length;l++)s[a++]=p[l];for(h=[],d=0,u=0;u<s.length;u++)s[u].className&&T.isString(s[u].className)&&n(s[u],_)&&(h[d++]=s[u])}else{var v=r.match(R);if(v){o=v[1];var y,b=v[2],w=v[3],k=v[4];for(o||(o="*"),s=[],a=0,u=0;u<h.length;u++)for(p="*"==o?t(h[u]):h[u].getElementsByTagName(o),l=0;l<p.length;l++)s[a++]=p[l];switch(h=[],d=0,w){case"=":y=function(t){return t.getAttribute(b)==k};break;case"~":y=function(t){return t.getAttribute(b).match(new RegExp("\\b"+k+"\\b"))};break;case"|":y=function(t){return t.getAttribute(b).match(new RegExp("^"+k+"-?"))};break;case"^":y=function(t){return 0===t.getAttribute(b).indexOf(k)};break;case"$":y=function(t){return t.getAttribute(b).lastIndexOf(k)==t.getAttribute(b).length-k.length};break;case"*":y=function(t){return t.getAttribute(b).indexOf(k)>-1};break;default:y=function(t){return t.getAttribute(b)}}for(h=[],d=0,u=0;u<s.length;u++)y(s[u])&&(h[d++]=s[u])}else{for(o=r,s=[],a=0,u=0;u<h.length;u++)for(p=h[u].getElementsByTagName(o),l=0;l<p.length;l++)s[a++]=p[l];h=s}}return h}return function(t){return T.isElement(t)?[t]:T.isObject(t)&&!T.isUndefined(t.length)?t:r.call(this,t)}}(),T.info={campaignParams:function(){var t="utm_source utm_medium utm_campaign utm_content utm_term".split(" "),e="",n={};return T.each(t,(function(t){(e=T.getQueryParam(S.URL,t)).length&&(n[t]=e)})),n},searchEngine:function(t){return 0===t.search("https?://(.*)google.([^/?]*)")?"google":0===t.search("https?://(.*)bing.com")?"bing":0===t.search("https?://(.*)yahoo.com")?"yahoo":0===t.search("https?://(.*)duckduckgo.com")?"duckduckgo":null},searchInfo:function(t){var e=T.info.searchEngine(t),n="yahoo"!=e?"q":"p",r={};if(null!==e){r.$search_engine=e;var i=T.getQueryParam(t,n);i.length&&(r.mp_keyword=i)}return r},browser:function(t,e,n){return e=e||"",n||T.includes(t," OPR/")?T.includes(t,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":T.includes(t,"IEMobile")||T.includes(t,"WPDesktop")?"Internet Explorer Mobile":T.includes(t,"SamsungBrowser/")?"Samsung Internet":T.includes(t,"Edge")||T.includes(t,"Edg/")?"Microsoft Edge":T.includes(t,"FBIOS")?"Facebook Mobile":T.includes(t,"Chrome")?"Chrome":T.includes(t,"CriOS")?"Chrome iOS":T.includes(t,"UCWEB")||T.includes(t,"UCBrowser")?"UC Browser":T.includes(t,"FxiOS")?"Firefox iOS":T.includes(e,"Apple")?T.includes(t,"Mobile")?"Mobile Safari":"Safari":T.includes(t,"Android")?"Android Mobile":T.includes(t,"Konqueror")?"Konqueror":T.includes(t,"Firefox")?"Firefox":T.includes(t,"MSIE")||T.includes(t,"Trident/")?"Internet Explorer":T.includes(t,"Gecko")?"Mozilla":""},browserVersion:function(t,e,n){var r={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/}[T.info.browser(t,e,n)];if(void 0===r)return null;var i=t.match(r);return i?parseFloat(i[i.length-2]):null},os:function(){var t=E;return/Windows/i.test(t)?/Phone/.test(t)||/WPDesktop/.test(t)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(t)?"iOS":/Android/.test(t)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":/Mac/i.test(t)?"Mac OS X":/Linux/.test(t)?"Linux":/CrOS/.test(t)?"Chrome OS":""},device:function(t){return/Windows Phone/i.test(t)||/WPDesktop/.test(t)?"Windows Phone":/iPad/.test(t)?"iPad":/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(t)?"BlackBerry":/Android/.test(t)?"Android":""},referringDomain:function(t){var e=t.split("/");return e.length>=3?e[2]:""},properties:function(){return T.extend(T.strip_empty_properties({$os:T.info.os(),$browser:T.info.browser(E,k.vendor,x),$referrer:S.referrer,$referring_domain:T.info.referringDomain(S.referrer),$device:T.info.device(E)}),{$current_url:e.location.href,$browser_version:T.info.browserVersion(E,k.vendor,x),$screen_height:O.height,$screen_width:O.width,mp_lib:"web",$lib_version:n.LIB_VERSION,$insert_id:N(),time:T.timestamp()/1e3})},people_properties:function(){return T.extend(T.strip_empty_properties({$os:T.info.os(),$browser:T.info.browser(E,k.vendor,x)}),{$browser_version:T.info.browserVersion(E,k.vendor,x)})},pageviewInfo:function(t){return T.strip_empty_properties({mp_page:t,mp_referrer:S.referrer,mp_browser:T.info.browser(E,k.vendor,x),mp_platform:T.info.os()})}};var N=function(t){var e=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return t?e.substring(0,t):e},H=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,$=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,z=function(t){var e=$,n=t.split("."),r=n[n.length-1];(r.length>4||"com"===r||"org"===r)&&(e=H);var i=t.match(e);return i?i[0]:""},W=null,K=null;"undefined"!=typeof JSON&&(W=JSON.stringify,K=JSON.parse),W=W||T.JSONEncode,K=K||T.JSONDecode,T.toArray=T.toArray,T.isObject=T.isObject,T.JSONEncode=T.JSONEncode,T.JSONDecode=T.JSONDecode,T.isBlockedUA=T.isBlockedUA,T.isEmptyObject=T.isEmptyObject,T.info=T.info,T.info.device=T.info.device,T.info.browser=T.info.browser,T.info.browserVersion=T.info.browserVersion,T.info.properties=T.info.properties;var Z=function(){};Z.prototype.create_properties=function(){},Z.prototype.event_handler=function(){},Z.prototype.after_track_handler=function(){},Z.prototype.init=function(t){return this.mp=t,this},Z.prototype.track=function(t,e,n,r){var i=this,o=T.dom_query(t);if(0!==o.length)return T.each(o,(function(t){T.register_event(t,this.override_event,(function(t){var o={},s=i.create_properties(n,this),a=i.mp.get_config("track_links_timeout");i.event_handler(t,this,o),window.setTimeout(i.track_callback(r,s,o,!0),a),i.mp.track(e,s,i.track_callback(r,s,o))}))}),this),!0;D.error("The DOM query ("+t+") returned 0 elements")},Z.prototype.track_callback=function(t,e,n,r){r=r||!1;var i=this;return function(){n.callback_fired||(n.callback_fired=!0,t&&!1===t(r,e)||i.after_track_handler(e,n,r))}},Z.prototype.create_properties=function(t,e){return"function"==typeof t?t(e):T.extend({},t)};var G=function(){this.override_event="click"};T.inherit(G,Z),G.prototype.create_properties=function(t,e){var n=G.superclass.create_properties.apply(this,arguments);return e.href&&(n.url=e.href),n},G.prototype.event_handler=function(t,e,n){n.new_tab=2===t.which||t.metaKey||t.ctrlKey||"_blank"===e.target,n.href=e.href,n.new_tab||t.preventDefault()},G.prototype.after_track_handler=function(t,e){e.new_tab||setTimeout((function(){window.location=e.href}),0)};var Q=function(){this.override_event="submit"};T.inherit(Q,Z),Q.prototype.event_handler=function(t,e,n){n.element=e,t.preventDefault()},Q.prototype.after_track_handler=function(t,e){setTimeout((function(){e.element.submit()}),0)};var J=q("lock"),V=function(t,e){e=e||{},this.storageKey=t,this.storage=e.storage||window.localStorage,this.pollIntervalMS=e.pollIntervalMS||100,this.timeoutMS=e.timeoutMS||2e3};V.prototype.withLock=function(t,e,n){n||"function"==typeof e||(n=e,e=null);var r=n||(new Date).getTime()+"|"+Math.random(),i=(new Date).getTime(),o=this.storageKey,s=this.pollIntervalMS,a=this.timeoutMS,c=this.storage,u=o+":X",l=o+":Y",p=o+":Z",d=function(t){e&&e(t)},f=function(t){if((new Date).getTime()-i>a)return J.error("Timeout waiting for mutex on "+o+"; clearing lock. ["+r+"]"),c.removeItem(p),c.removeItem(l),void m();setTimeout((function(){try{t()}catch(t){d(t)}}),s*(Math.random()+.1))},h=function(t,e){t()?e():f((function(){h(t,e)}))},g=function(){var t=c.getItem(l);if(t&&t!==r)return!1;if(c.setItem(l,r),c.getItem(l)===r)return!0;if(!U(c,!0))throw new Error("localStorage support dropped while acquiring lock");return!1},m=function(){c.setItem(u,r),h(g,(function(){c.getItem(u)!==r?f((function(){c.getItem(l)===r?h((function(){return!c.getItem(p)}),_):m()})):_()}))},_=function(){c.setItem(p,"1");try{t()}finally{c.removeItem(p),c.getItem(l)===r&&c.removeItem(l),c.getItem(u)===r&&c.removeItem(u)}};try{if(!U(c,!0))throw new Error("localStorage support check failed");m()}catch(t){d(t)}};var Y=q("batch"),X=function(t,e){e=e||{},this.storageKey=t,this.storage=e.storage||window.localStorage,this.reportError=e.errorReporter||T.bind(Y.error,Y),this.lock=new V(t,{storage:this.storage}),this.pid=e.pid||null,this.memQueue=[]};X.prototype.enqueue=function(t,e,n){var r={id:N(),flushAfter:(new Date).getTime()+2*e,payload:t};this.lock.withLock(T.bind((function(){var e;try{var i=this.readFromStorage();i.push(r),(e=this.saveToStorage(i))&&this.memQueue.push(r)}catch(n){this.reportError("Error enqueueing item",t),e=!1}n&&n(e)}),this),T.bind((function(t){this.reportError("Error acquiring storage lock",t),n&&n(!1)}),this),this.pid)},X.prototype.fillBatch=function(t){var e=this.memQueue.slice(0,t);if(e.length<t){var n=this.readFromStorage();if(n.length){var r={};T.each(e,(function(t){r[t.id]=!0}));for(var i=0;i<n.length;i++){var o=n[i];if((new Date).getTime()>o.flushAfter&&!r[o.id]&&(o.orphaned=!0,e.push(o),e.length>=t))break}}}return e};var tt=function(t,e){var n=[];return T.each(t,(function(t){t.id&&!e[t.id]&&n.push(t)})),n};X.prototype.removeItemsByID=function(t,e){var n={};T.each(t,(function(t){n[t]=!0})),this.memQueue=tt(this.memQueue,n);var r=T.bind((function(){var e;try{var r=this.readFromStorage();if(r=tt(r,n),e=this.saveToStorage(r)){r=this.readFromStorage();for(var i=0;i<r.length;i++){var o=r[i];if(o.id&&n[o.id])return this.reportError("Item not removed from storage"),!1}}}catch(n){this.reportError("Error removing items",t),e=!1}return e}),this);this.lock.withLock((function(){var t=r();e&&e(t)}),T.bind((function(t){var n=!1;if(this.reportError("Error acquiring storage lock",t),!U(this.storage,!0)&&!(n=r()))try{this.storage.removeItem(this.storageKey)}catch(t){this.reportError("Error clearing queue",t)}e&&e(n)}),this),this.pid)};var et=function(t,e){var n=[];return T.each(t,(function(t){var r=t.id;if(r in e){var i=e[r];null!==i&&(t.payload=i,n.push(t))}else n.push(t)})),n};X.prototype.updatePayloads=function(t,e){this.memQueue=et(this.memQueue,t),this.lock.withLock(T.bind((function(){var n;try{var r=this.readFromStorage();r=et(r,t),n=this.saveToStorage(r)}catch(e){this.reportError("Error updating items",t),n=!1}e&&e(n)}),this),T.bind((function(t){this.reportError("Error acquiring storage lock",t),e&&e(!1)}),this),this.pid)},X.prototype.readFromStorage=function(){var t;try{(t=this.storage.getItem(this.storageKey))&&(t=K(t),T.isArray(t)||(this.reportError("Invalid storage entry:",t),t=null))}catch(e){this.reportError("Error retrieving queue",e),t=null}return t||[]},X.prototype.saveToStorage=function(t){try{return this.storage.setItem(this.storageKey,W(t)),!0}catch(t){return this.reportError("Error saving queue",t),!1}},X.prototype.clear=function(){this.memQueue=[],this.storage.removeItem(this.storageKey)};var nt=q("batch"),rt=function(t,e){this.errorReporter=e.errorReporter,this.queue=new X(t,{errorReporter:T.bind(this.reportError,this),storage:e.storage}),this.libConfig=e.libConfig,this.sendRequest=e.sendRequestFunc,this.beforeSendHook=e.beforeSendHook,this.stopAllBatching=e.stopAllBatchingFunc,this.batchSize=this.libConfig.batch_size,this.flushInterval=this.libConfig.batch_flush_interval_ms,this.stopped=!this.libConfig.batch_autostart,this.consecutiveRemovalFailures=0};rt.prototype.enqueue=function(t,e){this.queue.enqueue(t,this.flushInterval,e)},rt.prototype.start=function(){this.stopped=!1,this.consecutiveRemovalFailures=0,this.flush()},rt.prototype.stop=function(){this.stopped=!0,this.timeoutID&&(clearTimeout(this.timeoutID),this.timeoutID=null)},rt.prototype.clear=function(){this.queue.clear()},rt.prototype.resetBatchSize=function(){this.batchSize=this.libConfig.batch_size},rt.prototype.resetFlush=function(){this.scheduleFlush(this.libConfig.batch_flush_interval_ms)},rt.prototype.scheduleFlush=function(t){this.flushInterval=t,this.stopped||(this.timeoutID=setTimeout(T.bind(this.flush,this),this.flushInterval))},rt.prototype.flush=function(t){try{if(this.requestInProgress)return void nt.log("Flush: Request already in progress");t=t||{};var e=this.libConfig.batch_request_timeout_ms,n=(new Date).getTime(),r=this.batchSize,i=this.queue.fillBatch(r),o=[],s={};if(T.each(i,(function(t){var e=t.payload;this.beforeSendHook&&!t.orphaned&&(e=this.beforeSendHook(e)),e&&o.push(e),s[t.id]=e}),this),o.length<1)return void this.resetFlush();this.requestInProgress=!0;var a=T.bind((function(o){this.requestInProgress=!1;try{var a=!1;if(t.unloading)this.queue.updatePayloads(s);else if(T.isObject(o)&&"timeout"===o.error&&(new Date).getTime()-n>=e)this.reportError("Network timeout; retrying"),this.flush();else if(T.isObject(o)&&o.xhr_req&&(o.xhr_req.status>=500||429===o.xhr_req.status||"timeout"===o.error)){var c=2*this.flushInterval,u=o.xhr_req.responseHeaders;if(u){var l=u["Retry-After"];l&&(c=1e3*parseInt(l,10)||c)}c=Math.min(6e5,c),this.reportError("Error; retry in "+c+" ms"),this.scheduleFlush(c)}else if(T.isObject(o)&&o.xhr_req&&413===o.xhr_req.status)if(i.length>1){var p=Math.max(1,Math.floor(r/2));this.batchSize=Math.min(this.batchSize,p,i.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush()}else this.reportError("Single-event request too large; dropping",i),this.resetBatchSize(),a=!0;else a=!0;a&&this.queue.removeItemsByID(T.map(i,(function(t){return t.id})),T.bind((function(t){t?(this.consecutiveRemovalFailures=0,this.flush()):(this.reportError("Failed to remove items from queue"),++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush())}),this))}catch(t){this.reportError("Error handling API response",t),this.resetFlush()}}),this),c={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:e};t.unloading&&(c.transport="sendBeacon"),nt.log("MIXPANEL REQUEST:",o),this.sendRequest(o,c,a)}catch(t){this.reportError("Error flushing request queue",t),this.resetFlush()}},rt.prototype.reportError=function(t,e){if(nt.error.apply(nt.error,arguments),this.errorReporter)try{e instanceof Error||(e=new Error(t)),this.errorReporter(t,e)}catch(e){nt.error(e)}};function it(t,e){gt(!0,t,e)}function ot(t,e){gt(!1,t,e)}function st(t,e){return"1"===ht(t,e)}function at(t,n){if(function(t){if(t&&t.ignoreDnt)return!1;var n=t&&t.window||e,r=n.navigator||{},i=!1;return T.each([r.doNotTrack,r.msDoNotTrack,n.doNotTrack],(function(t){T.includes([!0,1,"1","yes"],t)&&(i=!0)})),i}(n))return D.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var r="0"===ht(t,n);return r&&D.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),r}function ct(t){return mt(t,(function(t){return this.get_config(t)}))}function ut(t){return mt(t,(function(t){return this._get_config(t)}))}function lt(t){return mt(t,(function(t){return this._get_config(t)}))}function pt(t,e){dt(e=e||{}).remove(ft(t,e),!!e.crossSubdomainCookie,e.cookieDomain)}function dt(t){return"localStorage"===(t=t||{}).persistenceType?T.localStorage:T.cookie}function ft(t,e){return((e=e||{}).persistencePrefix||"__mp_opt_in_out_")+t}function ht(t,e){return dt(e).get(ft(t,e))}function gt(t,e,n){T.isString(e)&&e.length?(dt(n=n||{}).set(ft(e,n),t?1:0,T.isNumber(n.cookieExpiration)?n.cookieExpiration:null,!!n.crossSubdomainCookie,!!n.secureCookie,!!n.crossSiteCookie,n.cookieDomain),n.track&&t&&n.track(n.trackEventName||"$opt_in",n.trackProperties,{send_immediately:!0})):D.error("gdpr."+(t?"optIn":"optOut")+" called with an invalid token")}function mt(t,e){return function(){var n=!1;try{var r=e.call(this,"token"),i=e.call(this,"ignore_dnt"),o=e.call(this,"opt_out_tracking_persistence_type"),s=e.call(this,"opt_out_tracking_cookie_prefix"),a=e.call(this,"window");r&&(n=at(r,{ignoreDnt:i,persistenceType:o,persistencePrefix:s,window:a}))}catch(t){D.error("Unexpected error when checking tracking opt-out status: "+t)}if(!n)return t.apply(this,arguments);var c=arguments[arguments.length-1];"function"==typeof c&&c(0)}}var _t="$set",vt="$set_once",yt="$unset",bt="$add",wt="$append",kt="$union",St="$remove",xt={set_action:function(t,e){var n={},r={};return T.isObject(t)?T.each(t,(function(t,e){this._is_reserved_property(e)||(r[e]=t)}),this):r[t]=e,n.$set=r,n},unset_action:function(t){var e={},n=[];return T.isArray(t)||(t=[t]),T.each(t,(function(t){this._is_reserved_property(t)||n.push(t)}),this),e.$unset=n,e},set_once_action:function(t,e){var n={},r={};return T.isObject(t)?T.each(t,(function(t,e){this._is_reserved_property(e)||(r[e]=t)}),this):r[t]=e,n.$set_once=r,n},union_action:function(t,e){var n={},r={};return T.isObject(t)?T.each(t,(function(t,e){this._is_reserved_property(e)||(r[e]=T.isArray(t)?t:[t])}),this):r[t]=T.isArray(e)?e:[e],n.$union=r,n},append_action:function(t,e){var n={},r={};return T.isObject(t)?T.each(t,(function(t,e){this._is_reserved_property(e)||(r[e]=t)}),this):r[t]=e,n.$append=r,n},remove_action:function(t,e){var n={},r={};return T.isObject(t)?T.each(t,(function(t,e){this._is_reserved_property(e)||(r[e]=t)}),this):r[t]=e,n.$remove=r,n},delete_action:function(){var t={$delete:""};return t}},Ot=function(){};T.extend(Ot.prototype,xt),Ot.prototype._init=function(t,e,n){this._mixpanel=t,this._group_key=e,this._group_id=n},Ot.prototype.set=lt((function(t,e,n){var r=this.set_action(t,e);return T.isObject(t)&&(n=e),this._send_request(r,n)})),Ot.prototype.set_once=lt((function(t,e,n){var r=this.set_once_action(t,e);return T.isObject(t)&&(n=e),this._send_request(r,n)})),Ot.prototype.unset=lt((function(t,e){var n=this.unset_action(t);return this._send_request(n,e)})),Ot.prototype.union=lt((function(t,e,n){T.isObject(t)&&(n=e);var r=this.union_action(t,e);return this._send_request(r,n)})),Ot.prototype.delete=lt((function(t){var e=this.delete_action();return this._send_request(e,t)})),Ot.prototype.remove=lt((function(t,e,n){var r=this.remove_action(t,e);return this._send_request(r,n)})),Ot.prototype._send_request=function(t,e){t.$group_key=this._group_key,t.$group_id=this._group_id,t.$token=this._get_config("token");var n=T.encodeDates(t);return this._mixpanel._track_or_batch({type:"groups",data:n,endpoint:this._get_config("api_host")+"/groups/",batcher:this._mixpanel.request_batchers.groups},e)},Ot.prototype._is_reserved_property=function(t){return"$group_key"===t||"$group_id"===t},Ot.prototype._get_config=function(t){return this._mixpanel.get_config(t)},Ot.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id},Ot.prototype.remove=Ot.prototype.remove,Ot.prototype.set=Ot.prototype.set,Ot.prototype.set_once=Ot.prototype.set_once,Ot.prototype.union=Ot.prototype.union,Ot.prototype.unset=Ot.prototype.unset,Ot.prototype.toString=Ot.prototype.toString;var Et=function(){};T.extend(Et.prototype,xt),Et.prototype._init=function(t){this._mixpanel=t},Et.prototype.set=ut((function(t,e,n){var r=this.set_action(t,e);return T.isObject(t)&&(n=e),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),r.$set=T.extend({},T.info.people_properties(),this._mixpanel.persistence.get_referrer_info(),r.$set),this._send_request(r,n)})),Et.prototype.set_once=ut((function(t,e,n){var r=this.set_once_action(t,e);return T.isObject(t)&&(n=e),this._send_request(r,n)})),Et.prototype.unset=ut((function(t,e){var n=this.unset_action(t);return this._send_request(n,e)})),Et.prototype.increment=ut((function(t,e,n){var r={},i={};return T.isObject(t)?(T.each(t,(function(t,e){if(!this._is_reserved_property(e)){if(isNaN(parseFloat(t)))return void D.error("Invalid increment value passed to mixpanel.people.increment - must be a number");i[e]=t}}),this),n=e):(T.isUndefined(e)&&(e=1),i[t]=e),r.$add=i,this._send_request(r,n)})),Et.prototype.append=ut((function(t,e,n){T.isObject(t)&&(n=e);var r=this.append_action(t,e);return this._send_request(r,n)})),Et.prototype.remove=ut((function(t,e,n){T.isObject(t)&&(n=e);var r=this.remove_action(t,e);return this._send_request(r,n)})),Et.prototype.union=ut((function(t,e,n){T.isObject(t)&&(n=e);var r=this.union_action(t,e);return this._send_request(r,n)})),Et.prototype.track_charge=ut((function(t,e,n){if(T.isNumber(t)||(t=parseFloat(t),!isNaN(t)))return this.append("$transactions",T.extend({$amount:t},e),n);D.error("Invalid value passed to mixpanel.people.track_charge - must be a number")})),Et.prototype.clear_charges=function(t){return this.set("$transactions",[],t)},Et.prototype.delete_user=function(){if(this._identify_called()){var t={$delete:this._mixpanel.get_distinct_id()};return this._send_request(t)}D.error("mixpanel.people.delete_user() requires you to call identify() first")},Et.prototype.toString=function(){return this._mixpanel.toString()+".people"},Et.prototype._send_request=function(t,e){t.$token=this._get_config("token"),t.$distinct_id=this._mixpanel.get_distinct_id();var n=this._mixpanel.get_property("$device_id"),r=this._mixpanel.get_property("$user_id"),i=this._mixpanel.get_property("$had_persisted_distinct_id");n&&(t.$device_id=n),r&&(t.$user_id=r),i&&(t.$had_persisted_distinct_id=i);var o=T.encodeDates(t);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:o,endpoint:this._get_config("api_host")+"/engage/",batcher:this._mixpanel.request_batchers.people},e):(this._enqueue(t),T.isUndefined(e)||(this._get_config("verbose")?e({status:-1,error:null}):e(-1)),T.truncate(o,255))},Et.prototype._get_config=function(t){return this._mixpanel.get_config(t)},Et.prototype._identify_called=function(){return!0===this._mixpanel._flags.identify_called},Et.prototype._enqueue=function(t){_t in t?this._mixpanel.persistence._add_to_people_queue(_t,t):vt in t?this._mixpanel.persistence._add_to_people_queue(vt,t):yt in t?this._mixpanel.persistence._add_to_people_queue(yt,t):bt in t?this._mixpanel.persistence._add_to_people_queue(bt,t):wt in t?this._mixpanel.persistence._add_to_people_queue(wt,t):St in t?this._mixpanel.persistence._add_to_people_queue(St,t):kt in t?this._mixpanel.persistence._add_to_people_queue(kt,t):D.error("Invalid call to _enqueue():",t)},Et.prototype._flush_one_queue=function(t,e,n,r){var i=this,o=T.extend({},this._mixpanel.persistence._get_queue(t)),s=o;T.isUndefined(o)||!T.isObject(o)||T.isEmptyObject(o)||(i._mixpanel.persistence._pop_from_people_queue(t,o),r&&(s=r(o)),e.call(i,s,(function(e,r){0===e&&i._mixpanel.persistence._add_to_people_queue(t,o),T.isUndefined(n)||n(e,r)})))},Et.prototype._flush=function(t,e,n,r,i,o,s){var a=this,c=this._mixpanel.persistence._get_queue(wt),u=this._mixpanel.persistence._get_queue(St);if(this._flush_one_queue(_t,this.set,t),this._flush_one_queue(vt,this.set_once,r),this._flush_one_queue(yt,this.unset,o,(function(t){return T.keys(t)})),this._flush_one_queue(bt,this.increment,e),this._flush_one_queue(kt,this.union,i),!T.isUndefined(c)&&T.isArray(c)&&c.length){for(var l,p=function(t,e){0===t&&a._mixpanel.persistence._add_to_people_queue(wt,l),T.isUndefined(n)||n(t,e)},d=c.length-1;d>=0;d--)l=c.pop(),T.isEmptyObject(l)||a.append(l,p);a._mixpanel.persistence.save()}if(!T.isUndefined(u)&&T.isArray(u)&&u.length){for(var f,h=function(t,e){0===t&&a._mixpanel.persistence._add_to_people_queue(St,f),T.isUndefined(s)||s(t,e)},g=u.length-1;g>=0;g--)f=u.pop(),T.isEmptyObject(f)||a.remove(f,h);a._mixpanel.persistence.save()}},Et.prototype._is_reserved_property=function(t){return"$distinct_id"===t||"$token"===t||"$device_id"===t||"$user_id"===t||"$had_persisted_distinct_id"===t},Et.prototype.set=Et.prototype.set,Et.prototype.set_once=Et.prototype.set_once,Et.prototype.unset=Et.prototype.unset,Et.prototype.increment=Et.prototype.increment,Et.prototype.append=Et.prototype.append,Et.prototype.remove=Et.prototype.remove,Et.prototype.union=Et.prototype.union,Et.prototype.track_charge=Et.prototype.track_charge,Et.prototype.clear_charges=Et.prototype.clear_charges,Et.prototype.delete_user=Et.prototype.delete_user,Et.prototype.toString=Et.prototype.toString;var Pt,Ct,It="__mps",jt="__mpso",At="__mpus",Bt="__mpa",Tt="__mpap",Dt="__mpr",Lt="__mpu",qt="$people_distinct_id",Ft="__alias",Mt="__timers",Ut=[It,jt,At,Bt,Tt,Dt,Lt,qt,Ft,Mt],Rt=function(t){this.props={},this.campaign_params_saved=!1,t.persistence_name?this.name="mp_"+t.persistence_name:this.name="mp_"+t.token+"_mixpanel";var e=t.persistence;"cookie"!==e&&"localStorage"!==e&&(D.critical("Unknown persistence type "+e+"; falling back to cookie"),e=t.persistence="cookie"),"localStorage"===e&&T.localStorage.is_supported()?this.storage=T.localStorage:this.storage=T.cookie,this.load(),this.update_config(t),this.upgrade(t),this.save()};Rt.prototype.properties=function(){var t={};return T.each(this.props,(function(e,n){T.include(Ut,n)||(t[n]=e)})),t},Rt.prototype.load=function(){if(!this.disabled){var t=this.storage.parse(this.name);t&&(this.props=T.extend({},t))}},Rt.prototype.upgrade=function(t){var e,n,r=t.upgrade;r&&(e="mp_super_properties","string"==typeof r&&(e=r),n=this.storage.parse(e),this.storage.remove(e),this.storage.remove(e,!0),n&&(this.props=T.extend(this.props,n.all,n.events))),t.cookie_name||"mixpanel"===t.name||(e="mp_"+t.token+"_"+t.name,(n=this.storage.parse(e))&&(this.storage.remove(e),this.storage.remove(e,!0),this.register_once(n))),this.storage===T.localStorage&&(n=T.cookie.parse(this.name),T.cookie.remove(this.name),T.cookie.remove(this.name,!0),n&&this.register_once(n))},Rt.prototype.save=function(){this.disabled||this.storage.set(this.name,T.JSONEncode(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)},Rt.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)},Rt.prototype.clear=function(){this.remove(),this.props={}},Rt.prototype.register_once=function(t,e,n){return!!T.isObject(t)&&(void 0===e&&(e="None"),this.expire_days=void 0===n?this.default_expiry:n,T.each(t,(function(t,n){this.props.hasOwnProperty(n)&&this.props[n]!==e||(this.props[n]=t)}),this),this.save(),!0)},Rt.prototype.register=function(t,e){return!!T.isObject(t)&&(this.expire_days=void 0===e?this.default_expiry:e,T.extend(this.props,t),this.save(),!0)},Rt.prototype.unregister=function(t){t in this.props&&(delete this.props[t],this.save())},Rt.prototype.update_campaign_params=function(){this.campaign_params_saved||(this.register_once(T.info.campaignParams()),this.campaign_params_saved=!0)},Rt.prototype.update_search_keyword=function(t){this.register(T.info.searchInfo(t))},Rt.prototype.update_referrer_info=function(t){this.register_once({$initial_referrer:t||"$direct",$initial_referring_domain:T.info.referringDomain(t)||"$direct"},"")},Rt.prototype.get_referrer_info=function(){return T.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},Rt.prototype.safe_merge=function(t){return T.each(this.props,(function(e,n){n in t||(t[n]=e)})),t},Rt.prototype.update_config=function(t){this.default_expiry=this.expire_days=t.cookie_expiration,this.set_disabled(t.disable_persistence),this.set_cookie_domain(t.cookie_domain),this.set_cross_site(t.cross_site_cookie),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie)},Rt.prototype.set_disabled=function(t){this.disabled=t,this.disabled?this.remove():this.save()},Rt.prototype.set_cookie_domain=function(t){t!==this.cookie_domain&&(this.remove(),this.cookie_domain=t,this.save())},Rt.prototype.set_cross_site=function(t){t!==this.cross_site&&(this.cross_site=t,this.remove(),this.save())},Rt.prototype.set_cross_subdomain=function(t){t!==this.cross_subdomain&&(this.cross_subdomain=t,this.remove(),this.save())},Rt.prototype.get_cross_subdomain=function(){return this.cross_subdomain},Rt.prototype.set_secure=function(t){t!==this.secure&&(this.secure=!!t,this.remove(),this.save())},Rt.prototype._add_to_people_queue=function(t,e){var n=this._get_queue_key(t),r=e[t],i=this._get_or_create_queue(_t),o=this._get_or_create_queue(vt),s=this._get_or_create_queue(yt),a=this._get_or_create_queue(bt),c=this._get_or_create_queue(kt),u=this._get_or_create_queue(St,[]),l=this._get_or_create_queue(wt,[]);n===It?(T.extend(i,r),this._pop_from_people_queue(bt,r),this._pop_from_people_queue(kt,r),this._pop_from_people_queue(yt,r)):n===jt?(T.each(r,(function(t,e){e in o||(o[e]=t)})),this._pop_from_people_queue(yt,r)):n===At?T.each(r,(function(t){T.each([i,o,a,c],(function(e){t in e&&delete e[t]})),T.each(l,(function(e){t in e&&delete e[t]})),s[t]=!0})):n===Bt?(T.each(r,(function(t,e){e in i?i[e]+=t:(e in a||(a[e]=0),a[e]+=t)}),this),this._pop_from_people_queue(yt,r)):n===Lt?(T.each(r,(function(t,e){T.isArray(t)&&(e in c||(c[e]=[]),c[e]=c[e].concat(t))})),this._pop_from_people_queue(yt,r)):n===Dt?(u.push(r),this._pop_from_people_queue(wt,r)):n===Tt&&(l.push(r),this._pop_from_people_queue(yt,r)),D.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),D.log(e),this.save()},Rt.prototype._pop_from_people_queue=function(t,e){var n=this._get_queue(t);T.isUndefined(n)||(T.each(e,(function(e,r){t===wt||t===St?T.each(n,(function(t){t[r]===e&&delete t[r]})):delete n[r]}),this),this.save())},Rt.prototype._get_queue_key=function(t){return t===_t?It:t===vt?jt:t===yt?At:t===bt?Bt:t===wt?Tt:t===St?Dt:t===kt?Lt:void D.error("Invalid queue:",t)},Rt.prototype._get_queue=function(t){return this.props[this._get_queue_key(t)]},Rt.prototype._get_or_create_queue=function(t,e){var n=this._get_queue_key(t);return e=T.isUndefined(e)?{}:e,this.props[n]||(this.props[n]=e)},Rt.prototype.set_event_timer=function(t,e){var n=this.props.__timers||{};n[t]=e,this.props.__timers=n,this.save()},Rt.prototype.remove_event_timer=function(t){var e=(this.props.__timers||{})[t];return T.isUndefined(e)||(delete this.props.__timers[t],this.save()),e};var Nt=function(t){return t},Ht=function(){},$t="mixpanel",zt="base64",Wt=e.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,Kt=!Wt&&-1===E.indexOf("MSIE")&&-1===E.indexOf("Mozilla"),Zt=null;k.sendBeacon&&(Zt=function(){return k.sendBeacon.apply(k,arguments)});var Gt={api_host:"https://api-js.mixpanel.com",api_method:"POST",api_transport:"XHR",api_payload_format:zt,app_host:"https://mixpanel.com",cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:Ht,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:Ht,store_google:!0,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{}},Qt=!1,Jt=function(){},Vt=function(t,e,r){var i,o=r===$t?Ct:Ct[r];if(o&&0===Pt)i=o;else{if(o&&!T.isArray(o))return void D.error("You have already initialized "+r);i=new Jt}return i._cached_groups={},i._init(t,e,r),i.people=new Et,i.people._init(i),n.DEBUG=n.DEBUG||i.get_config("debug"),!T.isUndefined(o)&&T.isArray(o)&&(i._execute_array.call(i.people,o.people),i._execute_array(o)),i};Jt.prototype.init=function(t,e,n){if(T.isUndefined(n))this.report_error("You must name your new library: init(token, config, name)");else{if(n!==$t){var r=Vt(t,e,n);return Ct[n]=r,r._loaded(),r}this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet")}},Jt.prototype._init=function(t,n,r){n=n||{},this.__loaded=!0,this.config={};var i={};"api_payload_format"in n||(n.api_host||Gt.api_host).match(/\.mixpanel\.com$/)&&(i.api_payload_format="json");if(this.set_config(T.extend({},Gt,i,n,{name:r,token:t,callback_fn:(r===$t?r:"mixpanel."+r)+"._jsc"})),this._jsc=Ht,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests)if(T.localStorage.is_supported(!0)&&Wt){if(this.init_batchers(),Zt&&e.addEventListener){var o=T.bind((function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})}),this);e.addEventListener("pagehide",(function(t){t.persisted&&o()})),e.addEventListener("visibilitychange",(function(){"hidden"===S.visibilityState&&o()}))}}else this._batch_requests=!1,D.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support");this.persistence=this.cookie=new Rt(this.config),this.unpersisted_superprops={},this._gdpr_init();var s=T.UUID();this.get_distinct_id()||this.register_once({distinct_id:s,$device_id:s},"")},Jt.prototype._loaded=function(){this.get_config("loaded")(this),this._set_default_superprops()},Jt.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(S.referrer),this.get_config("store_google")&&this.persistence.update_campaign_params(),this.get_config("save_referrer")&&this.persistence.update_referrer_info(S.referrer)},Jt.prototype._dom_loaded=function(){T.each(this.__dom_loaded_queue,(function(t){this._track_dom.apply(this,t)}),this),this.has_opted_out_tracking()||T.each(this.__request_queue,(function(t){this._send_request.apply(this,t)}),this),delete this.__dom_loaded_queue,delete this.__request_queue},Jt.prototype._track_dom=function(t,e){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!Qt)return this.__dom_loaded_queue.push([t,e]),!1;var n=(new t).init(this);return n.track.apply(n,e)},Jt.prototype._prepare_callback=function(t,e){if(T.isUndefined(t))return null;if(Wt){return function(n){t(n,e)}}var n=this._jsc,r=""+Math.floor(1e8*Math.random()),i=this.get_config("callback_fn")+"["+r+"]";return n[r]=function(i){delete n[r],t(i,e)},i},Jt.prototype._send_request=function(t,e,n,r){var i=!0;if(Kt)return this.__request_queue.push(arguments),i;var o={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},s=null;r||!T.isFunction(n)&&"string"!=typeof n||(r=n,n=null),n=T.extend(o,n||{}),Wt||(n.method="GET");var a="POST"===n.method,c=Zt&&a&&"sendbeacon"===n.transport.toLowerCase(),u=n.verbose;e.verbose&&(u=!0),this.get_config("test")&&(e.test=1),u&&(e.verbose=1),this.get_config("img")&&(e.img=1),Wt||(r?e.callback=r:(u||this.get_config("test"))&&(e.callback="(function(){})")),e.ip=this.get_config("ip")?1:0,e._=(new Date).getTime().toString(),a&&(s="data="+encodeURIComponent(e.data),delete e.data),t+="?"+T.HTTPBuildQuery(e);var l=this;if("img"in e){var p=S.createElement("img");p.src=t,S.body.appendChild(p)}else if(c){try{i=Zt(t,s)}catch(t){l.report_error(t),i=!1}try{r&&r(i?1:0)}catch(t){l.report_error(t)}}else if(Wt)try{var d=new XMLHttpRequest;d.open(n.method,t,!0);var f=this.get_config("xhr_headers");if(a&&(f["Content-Type"]="application/x-www-form-urlencoded"),T.each(f,(function(t,e){d.setRequestHeader(e,t)})),n.timeout_ms&&void 0!==d.timeout){d.timeout=n.timeout_ms;var h=(new Date).getTime()}d.withCredentials=!0,d.onreadystatechange=function(){var t;if(4===d.readyState)if(200===d.status){if(r)if(u){var e;try{e=T.JSONDecode(d.responseText)}catch(t){if(l.report_error(t),!n.ignore_json_errors)return;e=d.responseText}r(e)}else r(Number(d.responseText))}else t=d.timeout&&!d.status&&(new Date).getTime()-h>=d.timeout?"timeout":"Bad HTTP status: "+d.status+" "+d.statusText,l.report_error(t),r&&r(u?{status:0,error:t,xhr_req:d}:0)},d.send(s)}catch(t){l.report_error(t),i=!1}else{var g=S.createElement("script");g.type="text/javascript",g.async=!0,g.defer=!0,g.src=t;var m=S.getElementsByTagName("script")[0];m.parentNode.insertBefore(g,m)}return i},Jt.prototype._execute_array=function(t){var e,n=[],r=[],i=[];T.each(t,(function(t){t&&(e=t[0],T.isArray(e)?i.push(t):"function"==typeof t?t.call(this):T.isArray(t)&&"alias"===e?n.push(t):T.isArray(t)&&-1!==e.indexOf("track")&&"function"==typeof this[e]?i.push(t):r.push(t))}),this);var o=function(t,e){T.each(t,(function(t){if(T.isArray(t[0])){var n=e;T.each(t,(function(t){n=n[t[0]].apply(n,t.slice(1))}))}else this[t[0]].apply(this,t.slice(1))}),e)};o(n,this),o(r,this),o(i,this)},Jt.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events},Jt.prototype.init_batchers=function(){var t=this.get_config("token");if(!this.are_batchers_initialized()){var e=T.bind((function(e){return new rt("__mpq_"+t+e.queue_suffix,{libConfig:this.config,sendRequestFunc:T.bind((function(t,n,r){this._send_request(this.get_config("api_host")+e.endpoint,this._encode_data_for_request(t),n,this._prepare_callback(r,t))}),this),beforeSendHook:T.bind((function(t){return this._run_hook("before_send_"+e.type,t)}),this),errorReporter:this.get_config("error_reporter"),stopAllBatchingFunc:T.bind(this.stop_batch_senders,this)})}),this);this.request_batchers={events:e({type:"events",endpoint:"/track/",queue_suffix:"_ev"}),people:e({type:"people",endpoint:"/engage/",queue_suffix:"_pp"}),groups:e({type:"groups",endpoint:"/groups/",queue_suffix:"_gr"})}}this.get_config("batch_autostart")&&this.start_batch_senders()},Jt.prototype.start_batch_senders=function(){this.are_batchers_initialized()&&(this._batch_requests=!0,T.each(this.request_batchers,(function(t){t.start()})))},Jt.prototype.stop_batch_senders=function(){this._batch_requests=!1,T.each(this.request_batchers,(function(t){t.stop(),t.clear()}))},Jt.prototype.push=function(t){this._execute_array([t])},Jt.prototype.disable=function(t){void 0===t?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(t)},Jt.prototype._encode_data_for_request=function(t){var e=T.JSONEncode(t);return this.get_config("api_payload_format")===zt&&(e=T.base64Encode(e)),{data:e}},Jt.prototype._track_or_batch=function(t,e){var n=T.truncate(t.data,255),r=t.endpoint,i=t.batcher,o=t.should_send_immediately,s=t.send_request_options||{};e=e||Ht;var a=!0,c=T.bind((function(){return s.skip_hooks||(n=this._run_hook("before_send_"+t.type,n)),n?(D.log("MIXPANEL REQUEST:"),D.log(n),this._send_request(r,this._encode_data_for_request(n),s,this._prepare_callback(e,n))):null}),this);return this._batch_requests&&!o?i.enqueue(n,(function(t){t?e(1,n):c()})):a=c(),a&&n},Jt.prototype.track=ct((function(t,e,n,r){r||"function"!=typeof n||(r=n,n=null);var i=(n=n||{}).transport;i&&(n.transport=i);var o=n.send_immediately;if("function"!=typeof r&&(r=Ht),T.isUndefined(t))this.report_error("No event name provided to mixpanel.track");else{if(!this._event_is_disabled(t)){(e=e||{}).token=this.get_config("token");var s=this.persistence.remove_event_timer(t);if(!T.isUndefined(s)){var a=(new Date).getTime()-s;e.$duration=parseFloat((a/1e3).toFixed(3))}this._set_default_superprops(),e=T.extend({},T.info.properties(),this.persistence.properties(),this.unpersisted_superprops,e);var c=this.get_config("property_blacklist");T.isArray(c)?T.each(c,(function(t){delete e[t]})):this.report_error("Invalid value for property_blacklist config: "+c);var u={event:t,properties:e};return this._track_or_batch({type:"events",data:u,endpoint:this.get_config("api_host")+"/track/",batcher:this.request_batchers.events,should_send_immediately:o,send_request_options:n},r)}r(0)}})),Jt.prototype.set_group=ct((function(t,e,n){T.isArray(e)||(e=[e]);var r={};return r[t]=e,this.register(r),this.people.set(t,e,n)})),Jt.prototype.add_group=ct((function(t,e,n){var r=this.get_property(t);if(void 0===r){var i={};i[t]=[e],this.register(i)}else-1===r.indexOf(e)&&(r.push(e),this.register(i));return this.people.union(t,e,n)})),Jt.prototype.remove_group=ct((function(t,e,n){var r=this.get_property(t);if(void 0!==r){var i=r.indexOf(e);i>-1&&(r.splice(i,1),this.register({group_key:r})),0===r.length&&this.unregister(t)}return this.people.remove(t,e,n)})),Jt.prototype.track_with_groups=ct((function(t,e,n,r){var i=T.extend({},e||{});return T.each(n,(function(t,e){null!=t&&(i[e]=t)})),this.track(t,i,r)})),Jt.prototype._create_map_key=function(t,e){return t+"_"+JSON.stringify(e)},Jt.prototype._remove_group_from_cache=function(t,e){delete this._cached_groups[this._create_map_key(t,e)]},Jt.prototype.get_group=function(t,e){var n=this._create_map_key(t,e),r=this._cached_groups[n];return void 0!==r&&r._group_key===t&&r._group_id===e||((r=new Ot)._init(this,t,e),this._cached_groups[n]=r),r},Jt.prototype.track_pageview=function(t){T.isUndefined(t)&&(t=S.location.href),this.track("mp_page_view",T.info.pageviewInfo(t))},Jt.prototype.track_links=function(){return this._track_dom.call(this,G,arguments)},Jt.prototype.track_forms=function(){return this._track_dom.call(this,Q,arguments)},Jt.prototype.time_event=function(t){T.isUndefined(t)?this.report_error("No event name provided to mixpanel.time_event"):this._event_is_disabled(t)||this.persistence.set_event_timer(t,(new Date).getTime())};var Yt={persistent:!0},Xt=function(t){var e;return e=T.isObject(t)?t:T.isUndefined(t)?{}:{days:t},T.extend({},Yt,e)};Jt.prototype.register=function(t,e){var n=Xt(e);n.persistent?this.persistence.register(t,n.days):T.extend(this.unpersisted_superprops,t)},Jt.prototype.register_once=function(t,e,n){var r=Xt(n);r.persistent?this.persistence.register_once(t,e,r.days):(void 0===e&&(e="None"),T.each(t,(function(t,n){this.unpersisted_superprops.hasOwnProperty(n)&&this.unpersisted_superprops[n]!==e||(this.unpersisted_superprops[n]=t)}),this))},Jt.prototype.unregister=function(t,e){(e=Xt(e)).persistent?this.persistence.unregister(t):delete this.unpersisted_superprops[t]},Jt.prototype._register_single=function(t,e){var n={};n[t]=e,this.register(n)},Jt.prototype.identify=function(t,e,n,r,i,o,s,a){var c=this.get_distinct_id();if(this.register({$user_id:t}),!this.get_property("$device_id")){var u=c;this.register_once({$had_persisted_distinct_id:!0,$device_id:u},"")}t!==c&&t!==this.get_property(Ft)&&(this.unregister(Ft),this.register({distinct_id:t})),this._flags.identify_called=!0,this.people._flush(e,n,r,i,o,s,a),t!==c&&this.track("$identify",{distinct_id:t,$anon_distinct_id:c},{skip_hooks:!0})},Jt.prototype.reset=function(){this.persistence.clear(),this._flags.identify_called=!1;var t=T.UUID();this.register_once({distinct_id:t,$device_id:t},"")},Jt.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},Jt.prototype.alias=function(t,e){if(t===this.get_property(qt))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var n=this;return T.isUndefined(e)&&(e=this.get_distinct_id()),t!==e?(this._register_single(Ft,t),this.track("$create_alias",{alias:t,distinct_id:e},{skip_hooks:!0},(function(){n.identify(t)}))):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(t),-1)},Jt.prototype.name_tag=function(t){this._register_single("mp_name_tag",t)},Jt.prototype.set_config=function(t){T.isObject(t)&&(T.extend(this.config,t),t.batch_size&&T.each(this.request_batchers,(function(t){t.resetBatchSize()})),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),n.DEBUG=n.DEBUG||this.get_config("debug"))},Jt.prototype.get_config=function(t){return this.config[t]},Jt.prototype._run_hook=function(t){var e=(this.config.hooks[t]||Nt).apply(this,v.call(arguments,1));return void 0===e&&(this.report_error(t+" hook did not return a value"),e=null),e},Jt.prototype.get_property=function(t){return this.persistence.props[t]},Jt.prototype.toString=function(){var t=this.get_config("name");return t!==$t&&(t="mixpanel."+t),t},Jt.prototype._event_is_disabled=function(t){return T.isBlockedUA(E)||this._flags.disable_all_events||T.include(this.__disabled_events,t)},Jt.prototype._gdpr_init=function(){"localStorage"===this.get_config("opt_out_tracking_persistence_type")&&T.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_tracking()||!this.get_config("opt_out_tracking_by_default")&&!T.cookie.get("mp_optout")||(T.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},Jt.prototype._gdpr_update_persistence=function(t){var e;if(t&&t.clear_persistence)e=!0;else{if(!t||!t.enable_persistence)return;e=!1}this.get_config("disable_persistence")||this.persistence.disabled===e||this.persistence.set_disabled(e),e&&T.each(this.request_batchers,(function(t){t.clear()}))},Jt.prototype._gdpr_call_func=function(t,e){return e=T.extend({track:T.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},e),T.localStorage.is_supported()||(e.persistence_type="cookie"),t(this.get_config("token"),{track:e.track,trackEventName:e.track_event_name,trackProperties:e.track_properties,persistenceType:e.persistence_type,persistencePrefix:e.cookie_prefix,cookieDomain:e.cookie_domain,cookieExpiration:e.cookie_expiration,crossSiteCookie:e.cross_site_cookie,crossSubdomainCookie:e.cross_subdomain_cookie,secureCookie:e.secure_cookie,ignoreDnt:e.ignore_dnt})},Jt.prototype.opt_in_tracking=function(t){t=T.extend({enable_persistence:!0},t),this._gdpr_call_func(it,t),this._gdpr_update_persistence(t)},Jt.prototype.opt_out_tracking=function(t){(t=T.extend({clear_persistence:!0,delete_user:!0},t)).delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(ot,t),this._gdpr_update_persistence(t)},Jt.prototype.has_opted_in_tracking=function(t){return this._gdpr_call_func(st,t)},Jt.prototype.has_opted_out_tracking=function(t){return this._gdpr_call_func(at,t)},Jt.prototype.clear_opt_in_out_tracking=function(t){t=T.extend({enable_persistence:!0},t),this._gdpr_call_func(pt,t),this._gdpr_update_persistence(t)},Jt.prototype.report_error=function(t,e){D.error.apply(D.error,arguments);try{e||t instanceof Error||(t=new Error(t)),this.get_config("error_reporter")(t,e)}catch(e){D.error(e)}},Jt.prototype.init=Jt.prototype.init,Jt.prototype.reset=Jt.prototype.reset,Jt.prototype.disable=Jt.prototype.disable,Jt.prototype.time_event=Jt.prototype.time_event,Jt.prototype.track=Jt.prototype.track,Jt.prototype.track_links=Jt.prototype.track_links,Jt.prototype.track_forms=Jt.prototype.track_forms,Jt.prototype.track_pageview=Jt.prototype.track_pageview,Jt.prototype.register=Jt.prototype.register,Jt.prototype.register_once=Jt.prototype.register_once,Jt.prototype.unregister=Jt.prototype.unregister,Jt.prototype.identify=Jt.prototype.identify,Jt.prototype.alias=Jt.prototype.alias,Jt.prototype.name_tag=Jt.prototype.name_tag,Jt.prototype.set_config=Jt.prototype.set_config,Jt.prototype.get_config=Jt.prototype.get_config,Jt.prototype.get_property=Jt.prototype.get_property,Jt.prototype.get_distinct_id=Jt.prototype.get_distinct_id,Jt.prototype.toString=Jt.prototype.toString,Jt.prototype.opt_out_tracking=Jt.prototype.opt_out_tracking,Jt.prototype.opt_in_tracking=Jt.prototype.opt_in_tracking,Jt.prototype.has_opted_out_tracking=Jt.prototype.has_opted_out_tracking,Jt.prototype.has_opted_in_tracking=Jt.prototype.has_opted_in_tracking,Jt.prototype.clear_opt_in_out_tracking=Jt.prototype.clear_opt_in_out_tracking,Jt.prototype.get_group=Jt.prototype.get_group,Jt.prototype.set_group=Jt.prototype.set_group,Jt.prototype.add_group=Jt.prototype.add_group,Jt.prototype.remove_group=Jt.prototype.remove_group,Jt.prototype.track_with_groups=Jt.prototype.track_with_groups,Jt.prototype.start_batch_senders=Jt.prototype.start_batch_senders,Jt.prototype.stop_batch_senders=Jt.prototype.stop_batch_senders,Rt.prototype.properties=Rt.prototype.properties,Rt.prototype.update_search_keyword=Rt.prototype.update_search_keyword,Rt.prototype.update_referrer_info=Rt.prototype.update_referrer_info,Rt.prototype.get_cross_subdomain=Rt.prototype.get_cross_subdomain,Rt.prototype.clear=Rt.prototype.clear;var te={},ee=function(){Ct.init=function(t,n,r){if(r)return Ct[r]||(Ct[r]=te[r]=Vt(t,n,r),Ct[r]._loaded()),Ct[r];var i=Ct;te.mixpanel?i=te.mixpanel:t&&((i=Vt(t,n,$t))._loaded(),te.mixpanel=i),Ct=i,1===Pt&&(e.mixpanel=Ct),T.each(te,(function(t,e){e!==$t&&(Ct[e]=t)})),Ct._=T}};var ne=(Pt=0,Ct=new Jt,ee(),Ct.init(),function(){function t(){t.done||(t.done=!0,Qt=!0,Kt=!1,T.each(te,(function(t){t._dom_loaded()})))}if(S.addEventListener)"complete"===S.readyState?t():S.addEventListener("DOMContentLoaded",t,!1);else if(S.attachEvent){S.attachEvent("onreadystatechange",t);var n=!1;try{n=null===e.frameElement}catch(t){}S.documentElement.doScroll&&n&&function e(){try{S.documentElement.doScroll("left")}catch(t){return void setTimeout(e,1)}t()}()}T.register_event(e,"load",t,!0)}(),Ct);t.exports=ne}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},function(){"use strict";n(8060),n(1082),n(6232),n(8839),n(3823),n(2790),n(8040),n(4743),n(2969),n(153),n(9576),jQuery(document).ready((function(){window.WPHB_Admin.init(),window.WPHB_Admin.notices.init(),window.wphbMixPanel.init()}))}()}();
|
2 |
//# sourceMappingURL=wphb-app.min.js.map
|
admin/assets/js/wphb-app.min.js.map
CHANGED
@@ -1 +1 @@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BCERnE,EAAS,MACTA,EAAS,MACTA,EAAS,MACTA,EAAS,MACTA,EAAS,MACTA,EAAS,MACTA,EAAS,MACTA,EAAS,MACTA,EAAS,MACTA,EAAS,KACTA,EAAS,MAETiE,OAAQrB,UAAWivD,OAAO,WACzB5xD,OAAO2D,WAAWzD,OAClBF,OAAO2D,WAAWC,QAAQ1D,OAC1BF,OAAOC,aAAaC,U","sources":["webpack://wp-hummingbird/./_src/js/mixpanel.js","webpack://wp-hummingbird/./_src/js/scanners/OrphanedScanner.js","webpack://wp-hummingbird/./_src/js/modules/admin-advanced.js","webpack://wp-hummingbird/./_src/js/scanners/CacheScanner.js","webpack://wp-hummingbird/./_src/js/modules/admin-caching.js","webpack://wp-hummingbird/./_src/js/modules/admin-cloudflare.js","webpack://wp-hummingbird/./_src/js/modules/admin-dashboard.js","webpack://wp-hummingbird/./_src/js/modules/admin-main.js","webpack://wp-hummingbird/./_src/js/minification/Row.js","webpack://wp-hummingbird/./_src/js/minification/RowsCollection.js","webpack://wp-hummingbird/./_src/js/modules/admin-minification.js","webpack://wp-hummingbird/./_src/js/scanners/MinifyScanner.js","webpack://wp-hummingbird/./_src/js/modules/admin-notifications.js","webpack://wp-hummingbird/./_src/js/modules/admin-performance.js","webpack://wp-hummingbird/./_src/js/scanners/PerfScanner.js","webpack://wp-hummingbird/./_src/js/modules/admin-settings.js","webpack://wp-hummingbird/./_src/js/modules/admin-uptime.js","webpack://wp-hummingbird/./_src/js/utils/fetcher.js","webpack://wp-hummingbird/./_src/js/utils/helpers.js","webpack://wp-hummingbird/./_src/js/utils/scanner.js","webpack://wp-hummingbird/./node_modules/core-js/actual/array/find-index.js","webpack://wp-hummingbird/./node_modules/core-js/es/array/find-index.js","webpack://wp-hummingbird/./node_modules/core-js/features/array/find-index.js","webpack://wp-hummingbird/./node_modules/core-js/full/array/find-index.js","webpack://wp-hummingbird/./node_modules/core-js/internals/a-callable.js","webpack://wp-hummingbird/./node_modules/core-js/internals/add-to-unscopables.js","webpack://wp-hummingbird/./node_modules/core-js/internals/an-object.js","webpack://wp-hummingbird/./node_modules/core-js/internals/array-includes.js","webpack://wp-hummingbird/./node_modules/core-js/internals/array-iteration.js","webpack://wp-hummingbird/./node_modules/core-js/internals/array-species-constructor.js","webpack://wp-hummingbird/./node_modules/core-js/internals/array-species-create.js","webpack://wp-hummingbird/./node_modules/core-js/internals/classof-raw.js","webpack://wp-hummingbird/./node_modules/core-js/internals/classof.js","webpack://wp-hummingbird/./node_modules/core-js/internals/copy-constructor-properties.js","webpack://wp-hummingbird/./node_modules/core-js/internals/create-non-enumerable-property.js","webpack://wp-hummingbird/./node_modules/core-js/internals/create-property-descriptor.js","webpack://wp-hummingbird/./node_modules/core-js/internals/define-built-in.js","webpack://wp-hummingbird/./node_modules/core-js/internals/define-global-property.js","webpack://wp-hummingbird/./node_modules/core-js/internals/descriptors.js","webpack://wp-hummingbird/./node_modules/core-js/internals/document-create-element.js","webpack://wp-hummingbird/./node_modules/core-js/internals/engine-user-agent.js","webpack://wp-hummingbird/./node_modules/core-js/internals/engine-v8-version.js","webpack://wp-hummingbird/./node_modules/core-js/internals/entry-unbind.js","webpack://wp-hummingbird/./node_modules/core-js/internals/enum-bug-keys.js","webpack://wp-hummingbird/./node_modules/core-js/internals/export.js","webpack://wp-hummingbird/./node_modules/core-js/internals/fails.js","webpack://wp-hummingbird/./node_modules/core-js/internals/function-bind-context.js","webpack://wp-hummingbird/./node_modules/core-js/internals/function-bind-native.js","webpack://wp-hummingbird/./node_modules/core-js/internals/function-call.js","webpack://wp-hummingbird/./node_modules/core-js/internals/function-name.js","webpack://wp-hummingbird/./node_modules/core-js/internals/function-uncurry-this.js","webpack://wp-hummingbird/./node_modules/core-js/internals/get-built-in.js","webpack://wp-hummingbird/./node_modules/core-js/internals/get-method.js","webpack://wp-hummingbird/./node_modules/core-js/internals/global.js","webpack://wp-hummingbird/./node_modules/core-js/internals/has-own-property.js","webpack://wp-hummingbird/./node_modules/core-js/internals/hidden-keys.js","webpack://wp-hummingbird/./node_modules/core-js/internals/html.js","webpack://wp-hummingbird/./node_modules/core-js/internals/ie8-dom-define.js","webpack://wp-hummingbird/./node_modules/core-js/internals/indexed-object.js","webpack://wp-hummingbird/./node_modules/core-js/internals/inspect-source.js","webpack://wp-hummingbird/./node_modules/core-js/internals/internal-state.js","webpack://wp-hummingbird/./node_modules/core-js/internals/is-array.js","webpack://wp-hummingbird/./node_modules/core-js/internals/is-callable.js","webpack://wp-hummingbird/./node_modules/core-js/internals/is-constructor.js","webpack://wp-hummingbird/./node_modules/core-js/internals/is-forced.js","webpack://wp-hummingbird/./node_modules/core-js/internals/is-object.js","webpack://wp-hummingbird/./node_modules/core-js/internals/is-pure.js","webpack://wp-hummingbird/./node_modules/core-js/internals/is-symbol.js","webpack://wp-hummingbird/./node_modules/core-js/internals/length-of-array-like.js","webpack://wp-hummingbird/./node_modules/core-js/internals/make-built-in.js","webpack://wp-hummingbird/./node_modules/core-js/internals/math-trunc.js","webpack://wp-hummingbird/./node_modules/core-js/internals/native-symbol.js","webpack://wp-hummingbird/./node_modules/core-js/internals/native-weak-map.js","webpack://wp-hummingbird/./node_modules/core-js/internals/object-create.js","webpack://wp-hummingbird/./node_modules/core-js/internals/object-define-properties.js","webpack://wp-hummingbird/./node_modules/core-js/internals/object-define-property.js","webpack://wp-hummingbird/./node_modules/core-js/internals/object-get-own-property-descriptor.js","webpack://wp-hummingbird/./node_modules/core-js/internals/object-get-own-property-names.js","webpack://wp-hummingbird/./node_modules/core-js/internals/object-get-own-property-symbols.js","webpack://wp-hummingbird/./node_modules/core-js/internals/object-is-prototype-of.js","webpack://wp-hummingbird/./node_modules/core-js/internals/object-keys-internal.js","webpack://wp-hummingbird/./node_modules/core-js/internals/object-keys.js","webpack://wp-hummingbird/./node_modules/core-js/internals/object-property-is-enumerable.js","webpack://wp-hummingbird/./node_modules/core-js/internals/ordinary-to-primitive.js","webpack://wp-hummingbird/./node_modules/core-js/internals/own-keys.js","webpack://wp-hummingbird/./node_modules/core-js/internals/require-object-coercible.js","webpack://wp-hummingbird/./node_modules/core-js/internals/shared-key.js","webpack://wp-hummingbird/./node_modules/core-js/internals/shared-store.js","webpack://wp-hummingbird/./node_modules/core-js/internals/shared.js","webpack://wp-hummingbird/./node_modules/core-js/internals/to-absolute-index.js","webpack://wp-hummingbird/./node_modules/core-js/internals/to-indexed-object.js","webpack://wp-hummingbird/./node_modules/core-js/internals/to-integer-or-infinity.js","webpack://wp-hummingbird/./node_modules/core-js/internals/to-length.js","webpack://wp-hummingbird/./node_modules/core-js/internals/to-object.js","webpack://wp-hummingbird/./node_modules/core-js/internals/to-primitive.js","webpack://wp-hummingbird/./node_modules/core-js/internals/to-property-key.js","webpack://wp-hummingbird/./node_modules/core-js/internals/to-string-tag-support.js","webpack://wp-hummingbird/./node_modules/core-js/internals/try-to-string.js","webpack://wp-hummingbird/./node_modules/core-js/internals/uid.js","webpack://wp-hummingbird/./node_modules/core-js/internals/use-symbol-as-uid.js","webpack://wp-hummingbird/./node_modules/core-js/internals/v8-prototype-define-bug.js","webpack://wp-hummingbird/./node_modules/core-js/internals/well-known-symbol.js","webpack://wp-hummingbird/./node_modules/core-js/modules/es.array.find-index.js","webpack://wp-hummingbird/./node_modules/core-js/stable/array/find-index.js","webpack://wp-hummingbird/./node_modules/es6-promise/dist/es6-promise.js","webpack://wp-hummingbird/./node_modules/lodash/_Symbol.js","webpack://wp-hummingbird/./node_modules/lodash/_apply.js","webpack://wp-hummingbird/./node_modules/lodash/_arrayLikeKeys.js","webpack://wp-hummingbird/./node_modules/lodash/_assignValue.js","webpack://wp-hummingbird/./node_modules/lodash/_baseAssignValue.js","webpack://wp-hummingbird/./node_modules/lodash/_baseGetTag.js","webpack://wp-hummingbird/./node_modules/lodash/_baseIsArguments.js","webpack://wp-hummingbird/./node_modules/lodash/_baseIsNative.js","webpack://wp-hummingbird/./node_modules/lodash/_baseIsTypedArray.js","webpack://wp-hummingbird/./node_modules/lodash/_baseKeys.js","webpack://wp-hummingbird/./node_modules/lodash/_baseRest.js","webpack://wp-hummingbird/./node_modules/lodash/_baseSetToString.js","webpack://wp-hummingbird/./node_modules/lodash/_baseTimes.js","webpack://wp-hummingbird/./node_modules/lodash/_baseUnary.js","webpack://wp-hummingbird/./node_modules/lodash/_copyObject.js","webpack://wp-hummingbird/./node_modules/lodash/_coreJsData.js","webpack://wp-hummingbird/./node_modules/lodash/_createAssigner.js","webpack://wp-hummingbird/./node_modules/lodash/_defineProperty.js","webpack://wp-hummingbird/./node_modules/lodash/_freeGlobal.js","webpack://wp-hummingbird/./node_modules/lodash/_getNative.js","webpack://wp-hummingbird/./node_modules/lodash/_getRawTag.js","webpack://wp-hummingbird/./node_modules/lodash/_getValue.js","webpack://wp-hummingbird/./node_modules/lodash/_isIndex.js","webpack://wp-hummingbird/./node_modules/lodash/_isIterateeCall.js","webpack://wp-hummingbird/./node_modules/lodash/_isMasked.js","webpack://wp-hummingbird/./node_modules/lodash/_isPrototype.js","webpack://wp-hummingbird/./node_modules/lodash/_nativeKeys.js","webpack://wp-hummingbird/./node_modules/lodash/_nodeUtil.js","webpack://wp-hummingbird/./node_modules/lodash/_objectToString.js","webpack://wp-hummingbird/./node_modules/lodash/_overArg.js","webpack://wp-hummingbird/./node_modules/lodash/_overRest.js","webpack://wp-hummingbird/./node_modules/lodash/_root.js","webpack://wp-hummingbird/./node_modules/lodash/_setToString.js","webpack://wp-hummingbird/./node_modules/lodash/_shortOut.js","webpack://wp-hummingbird/./node_modules/lodash/_toSource.js","webpack://wp-hummingbird/./node_modules/lodash/assign.js","webpack://wp-hummingbird/./node_modules/lodash/constant.js","webpack://wp-hummingbird/./node_modules/lodash/eq.js","webpack://wp-hummingbird/./node_modules/lodash/identity.js","webpack://wp-hummingbird/./node_modules/lodash/isArguments.js","webpack://wp-hummingbird/./node_modules/lodash/isArray.js","webpack://wp-hummingbird/./node_modules/lodash/isArrayLike.js","webpack://wp-hummingbird/./node_modules/lodash/isBuffer.js","webpack://wp-hummingbird/./node_modules/lodash/isFunction.js","webpack://wp-hummingbird/./node_modules/lodash/isLength.js","webpack://wp-hummingbird/./node_modules/lodash/isObject.js","webpack://wp-hummingbird/./node_modules/lodash/isObjectLike.js","webpack://wp-hummingbird/./node_modules/lodash/isTypedArray.js","webpack://wp-hummingbird/./node_modules/lodash/keys.js","webpack://wp-hummingbird/./node_modules/lodash/stubFalse.js","webpack://wp-hummingbird/./node_modules/mixpanel-browser/dist/mixpanel.cjs.js","webpack://wp-hummingbird/webpack/bootstrap","webpack://wp-hummingbird/webpack/runtime/compat get default export","webpack://wp-hummingbird/webpack/runtime/define property getters","webpack://wp-hummingbird/webpack/runtime/global","webpack://wp-hummingbird/webpack/runtime/hasOwnProperty shorthand","webpack://wp-hummingbird/webpack/runtime/make namespace object","webpack://wp-hummingbird/webpack/runtime/node module decorator","webpack://wp-hummingbird/./_src/js/app.js"],"sourcesContent":["/* global wphb */\n\nconst MixPanel = require( 'mixpanel-browser' );\n\n( function() {\n\t'use strict';\n\n\twindow.wphbMixPanel = {\n\t\t/**\n\t\t * Init super properties (common with every request).\n\t\t */\n\t\tinit() {\n\t\t\tif (\n\t\t\t\t'undefined' === typeof wphb.mixpanel ||\n\t\t\t\t! wphb.mixpanel.enabled\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tMixPanel.init( '5d545622e3a040aca63f2089b0e6cae7', {\n\t\t\t\topt_out_tracking_by_default: true,\n\t\t\t\tip: false,\n\t\t\t} );\n\n\t\t\tMixPanel.register( {\n\t\t\t\tplugin: wphb.mixpanel.plugin,\n\t\t\t\tplugin_type: wphb.mixpanel.plugin_type,\n\t\t\t\tplugin_version: wphb.mixpanel.plugin_version,\n\t\t\t\twp_version: wphb.mixpanel.wp_version,\n\t\t\t\twp_type: wphb.mixpanel.wp_type,\n\t\t\t\tlocale: wphb.mixpanel.locale,\n\t\t\t\tactive_theme: wphb.mixpanel.active_theme,\n\t\t\t\tphp_version: wphb.mixpanel.php_version,\n\t\t\t\tmysql_version: wphb.mixpanel.mysql_version,\n\t\t\t\tserver_type: wphb.mixpanel.server_type,\n\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Opt in tracking.\n\t\t */\n\t\toptIn() {\n\t\t\twphb.mixpanel.enabled = true;\n\t\t\tthis.init();\n\t\t\tMixPanel.opt_in_tracking();\n\t\t},\n\n\t\t/**\n\t\t * Opt out tracking.\n\t\t */\n\t\toptOut() {\n\t\t\tMixPanel.opt_out_tracking();\n\t\t},\n\n\t\t/**\n\t\t * Deactivate feedback.\n\t\t *\n\t\t * @param {string} reason Deactivation reason.\n\t\t * @param {string} feedback Deactivation feedback.\n\t\t */\n\t\tdeactivate( reason, feedback = '' ) {\n\t\t\tthis.track( 'plugin_deactivate', {\n\t\t\t\treason,\n\t\t\t\tfeedback,\n\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Track feature enable.\n\t\t *\n\t\t * @param {string} feature Feature name.\n\t\t */\n\t\tenableFeature( feature ) {\n\t\t\tthis.track( 'plugin_feature_activate', { feature } );\n\t\t},\n\n\t\t/**\n\t\t * Track feature disable.\n\t\t *\n\t\t * @param {string} feature Feature name.\n\t\t */\n\t\tdisableFeature( feature ) {\n\t\t\tthis.track( 'plugin_feature_deactivate', { feature } );\n\t\t},\n\n\t\t/**\n\t\t * Track an event.\n\t\t *\n\t\t * @param {string} event Event ID.\n\t\t * @param {Object} data Event data.\n\t\t */\n\t\ttrack( event, data = {} ) {\n\t\t\tif (\n\t\t\t\t'undefined' === typeof wphb.mixpanel ||\n\t\t\t\t! wphb.mixpanel.enabled\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( ! MixPanel.has_opted_out_tracking() ) {\n\t\t\t\tMixPanel.track( event, data );\n\t\t\t}\n\t\t}\n\t};\n}() );\n","import Scanner from '../utils/scanner';\nimport Fetcher from '../utils/fetcher';\nimport { getString } from '../utils/helpers';\n\nexport const BATCH_SIZE = 3000;\n\n/**\n * OrphanedScanner class responsible for clearing out orphaned Asset Optimization data.\n *\n * @since 2.7.0\n */\nexport class OrphanedScanner extends Scanner {\n\t/**\n\t * Run step.\n\t *\n\t * @since 2.7.0\n\t *\n\t * @param {number} remainingSteps\n\t */\n\tstep( remainingSteps ) {\n\t\tsuper.step( remainingSteps );\n\n\t\tthis.currentStep++;\n\n\t\tif ( remainingSteps > 0 ) {\n\t\t\tFetcher.advanced\n\t\t\t\t.clearOrphanedBatch( BATCH_SIZE )\n\t\t\t\t.then( ( response ) => {\n\t\t\t\t\tlet timeout = 1000;\n\t\t\t\t\tif (\n\t\t\t\t\t\t'undefined' !== typeof response.highCPU &&\n\t\t\t\t\t\tresponse.highCPU\n\t\t\t\t\t) {\n\t\t\t\t\t\ttimeout = 10000;\n\t\t\t\t\t\tdocument\n\t\t\t\t\t\t\t.getElementById( 'site-health-orphanned-speed' )\n\t\t\t\t\t\t\t.classList.remove( 'sui-hidden' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdocument\n\t\t\t\t\t\t\t.getElementById( 'site-health-orphanned-speed' )\n\t\t\t\t\t\t\t.classList.add( 'sui-hidden' );\n\t\t\t\t\t}\n\n\t\t\t\t\t// SQL operations can be CPU sensitive, so let's give the server some time to breathe.\n\t\t\t\t\twindow.setTimeout( () => {\n\t\t\t\t\t\tthis.updateProgressBar( this.getProgress() );\n\t\t\t\t\t\tthis.step( this.totalSteps - this.currentStep );\n\t\t\t\t\t}, timeout );\n\t\t\t\t} );\n\t\t} else {\n\t\t\tthis.onFinish();\n\t\t}\n\t}\n\n\t/**\n\t * Initialize scanner.\n\t *\n\t * @since 2.7.0\n\t */\n\tonStart() {\n\t\tdocument\n\t\t\t.getElementById( 'site-health-orphaned-progress' )\n\t\t\t.classList.remove( 'sui-hidden' );\n\n\t\tdocument\n\t\t\t.getElementById( 'site-health-orphaned-clear' )\n\t\t\t.classList.add( 'sui-button-onload' );\n\n\t\treturn Promise.resolve();\n\t}\n\n\t/**\n\t * Finish up.\n\t *\n\t * @since 2.7.0\n\t */\n\tonFinish() {\n\t\tsuper.onFinish();\n\n\t\twindow.SUI.closeModal();\n\t\tdocument.getElementById( 'count-ao-orphaned' ).innerHTML = '0';\n\t\twindow.WPHB_Admin.notices.show( getString( 'successAoOrphanedPurge' ) );\n\t}\n}\n","/* global WPHB_Admin */\n\n/**\n * Internal dependencies\n */\nimport Fetcher from '../utils/fetcher';\nimport { getString } from '../utils/helpers';\nimport { OrphanedScanner, BATCH_SIZE } from '../scanners/OrphanedScanner';\n\n( function( $ ) {\n\t'use strict';\n\n\tWPHB_Admin.advanced = {\n\t\tmodule: 'advanced',\n\n\t\tinit() {\n\t\t\tconst self = this,\n\t\t\t\tsystemInfoDropdown = $( '#wphb-system-info-dropdown' ),\n\t\t\t\thash = window.location.hash;\n\n\t\t\t/**\n\t\t\t * Process form submit for advanced tools forms\n\t\t\t */\n\t\t\t$( '#wphb-db-delete-all, .wphb-db-row-delete' ).on(\n\t\t\t\t'click',\n\t\t\t\tfunction( e ) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tself.showModal(\n\t\t\t\t\t\te.target.dataset.entries,\n\t\t\t\t\t\te.target.dataset.type\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * Process form submit for advanced tools forms\n\t\t\t */\n\t\t\t$(\n\t\t\t\t'form[id=\"advanced-general-settings\"], form[id=\"advanced-lazy-settings\"]'\n\t\t\t).on( 'submit', function( e ) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tconst button = $( this ).find( '.sui-button-blue' );\n\t\t\t\tbutton.addClass( 'sui-button-onload-text' );\n\n\t\t\t\tFetcher.advanced\n\t\t\t\t\t.saveSettings( $( this ).serialize(), e.target.id )\n\t\t\t\t\t.then( ( response ) => {\n\t\t\t\t\t\tbutton.removeClass( 'sui-button-onload-text' );\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t'undefined' !== typeof response &&\n\t\t\t\t\t\t\tresponse.success\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tWPHB_Admin.notices.show();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tWPHB_Admin.notices.show(\n\t\t\t\t\t\t\t\tgetString( 'errorSettingsUpdate' ),\n\t\t\t\t\t\t\t\t'error'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * Show initial system information table.\n\t\t\t */\n\t\t\t$( '#wphb-system-info-php' ).removeClass( 'sui-hidden' );\n\t\t\tif ( hash ) {\n\t\t\t\tconst system = hash.replace( '#', '' );\n\t\t\t\t$( '.wphb-sys-info-table' ).addClass( 'sui-hidden' );\n\t\t\t\t$( '#wphb-system-info-' + system ).removeClass( 'sui-hidden' );\n\t\t\t\tsystemInfoDropdown.val( system ).trigger( 'sui:change' );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Show/hide system information tables on dropdown change.\n\t\t\t */\n\t\t\tsystemInfoDropdown.on( 'change', function( e ) {\n\t\t\t\te.preventDefault();\n\t\t\t\t$( '.wphb-sys-info-table' ).addClass( 'sui-hidden' );\n\t\t\t\t$( '#wphb-system-info-' + $( this ).val() ).removeClass(\n\t\t\t\t\t'sui-hidden'\n\t\t\t\t);\n\t\t\t\tlocation.hash = $( this ).val();\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * Paste default values to url strings option.\n\t\t\t *\n\t\t\t * @since 1.9.0\n\t\t\t */\n\t\t\t$( '#wphb-adv-paste-value' ).on( 'click', function( e ) {\n\t\t\t\te.preventDefault();\n\t\t\t\tconst urlStrings = $( 'textarea[name=\"url_strings\"]' );\n\t\t\t\tif ( '' === urlStrings.val() ) {\n\t\t\t\t\turlStrings.val( urlStrings.attr( 'placeholder' ) );\n\t\t\t\t} else {\n\t\t\t\t\turlStrings.val(\n\t\t\t\t\t\turlStrings.val() +\n\t\t\t\t\t\t\t'\\n' +\n\t\t\t\t\t\t\turlStrings.attr( 'placeholder' )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * Toggle woo cart fragments settings.\n\t\t\t *\n\t\t\t * @since 2.2.0\n\t\t\t */\n\t\t\tconst fragmentsToggle = document.getElementById( 'cart_fragments' );\n\t\t\tif ( fragmentsToggle ) {\n\t\t\t\tfragmentsToggle.addEventListener( 'change', function( e ) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\t$( '#cart_fragments_desc' ).toggle();\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// If button is center aligned, Disable left and right margin and set them to 0.\n\t\t\tconst alignOptions = document.querySelectorAll(\n\t\t\t\t'input[name=\"button[alignment][align]\"]'\n\t\t\t);\n\t\t\tconst marginLeft = document.getElementById( 'button_margin_l' );\n\t\t\tconst marginRight = document.getElementById( 'button_margin_r' );\n\t\t\tfor ( let i = 0; i < alignOptions.length; i++ ) {\n\t\t\t\talignOptions[ i ].addEventListener( 'change', function() {\n\t\t\t\t\tif (\n\t\t\t\t\t\t'center' === alignOptions[ i ].value &&\n\t\t\t\t\t\talignOptions[ i ].checked\n\t\t\t\t\t) {\n\t\t\t\t\t\tmarginLeft.setAttribute( 'disabled', 'disabled' );\n\t\t\t\t\t\tmarginRight.setAttribute( 'disabled', 'disabled' );\n\t\t\t\t\t\tmarginLeft.value = 0;\n\t\t\t\t\t\tmarginRight.value = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmarginLeft.removeAttribute( 'disabled' );\n\t\t\t\t\t\tmarginRight.removeAttribute( 'disabled' );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Show/Hide Lazy comments load options\n\t\t\t *\n\t\t\t */\n\t\t\t$( 'input[id=\"lazy_load\"]' ).on( 'change', function() {\n\t\t\t\t$(\n\t\t\t\t\t'#wphb-lazy-load-comments-wrap, #sui-upsell-gravtar-caching'\n\t\t\t\t).toggle();\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * Initialize color picker on lazy load\n\t\t\t */\n\t\t\tif ( true === window.location.search.includes( 'view=lazy' ) ) {\n\t\t\t\tthis.createPickers();\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Purge cache on plugin health page.\n\t\t\t *\n\t\t\t * @since 2.7.0\n\t\t\t */\n\t\t\tconst purgeBtn = document.getElementById( 'btn-cache-purge' );\n\t\t\tif ( purgeBtn ) {\n\t\t\t\tpurgeBtn.addEventListener( 'click', () => this.purgeDb() );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Purge asset optimization on plugin health page.\n\t\t\t *\n\t\t\t * @since 2.7.0\n\t\t\t */\n\t\t\tconst purgeAObtn = document.getElementById( 'btn-minify-purge' );\n\t\t\tif ( purgeAObtn ) {\n\t\t\t\tpurgeAObtn.addEventListener( 'click', () =>\n\t\t\t\t\tthis.purgeDb( 'minify' )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Purge orphaned data from modal.\n\t\t\t *\n\t\t\t * @since 2.7.0\n\t\t\t */\n\t\t\tconst purgeModalBtn = document.getElementById(\n\t\t\t\t'site-health-orphaned-clear'\n\t\t\t);\n\t\t\tif ( purgeModalBtn ) {\n\t\t\t\tpurgeModalBtn.addEventListener( 'click', () => {\n\t\t\t\t\tconst count = document.getElementById( 'count-ao-orphaned' )\n\t\t\t\t\t\t.innerHTML;\n\t\t\t\t\tconst steps = Math.ceil( parseInt( count ) / BATCH_SIZE );\n\n\t\t\t\t\tconst scanner = new OrphanedScanner( steps, 0 );\n\t\t\t\t\tscanner.start();\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Show the modal window asking if a user is sure he wants to delete the db records.\n\t\t *\n\t\t * @param {string} items Number of records to delete.\n\t\t * @param {string} type Data type to delete from db (See data-type element for each row in the code).\n\t\t */\n\t\tshowModal( items, type ) {\n\t\t\tconst modal = $( '#wphb-database-cleanup-modal' );\n\n\t\t\tlet dialog;\n\t\t\tlet btn = '<span class=\"sui-icon-trash\" aria-hidden=\"true\"></span>';\n\n\t\t\tif ( 'drafts' === type ) {\n\t\t\t\tdialog = getString( 'dbDeleteDrafts' );\n\t\t\t\tbtn += getString( 'dbDeleteDraftsButton' );\n\t\t\t} else {\n\t\t\t\tdialog =\n\t\t\t\t\tgetString( 'db_delete' ) +\n\t\t\t\t\t' ' +\n\t\t\t\t\titems +\n\t\t\t\t\t' ' +\n\t\t\t\t\tgetString( 'db_entries' ) +\n\t\t\t\t\t'? ' +\n\t\t\t\t\tgetString( 'db_backup' );\n\t\t\t\tbtn += getString( 'dbDeleteButton' );\n\t\t\t}\n\n\t\t\tmodal.find( 'p' ).html( dialog );\n\t\t\tmodal\n\t\t\t\t.find( '.sui-button-red' )\n\t\t\t\t.attr( 'data-type', type )\n\t\t\t\t.html( btn );\n\n\t\t\twindow.SUI.openModal(\n\t\t\t\t'wphb-database-cleanup-modal',\n\t\t\t\t'wpbody-content',\n\t\t\t\t'wphb-clear-database-confirm',\n\t\t\t\tfalse\n\t\t\t);\n\t\t},\n\n\t\t/**\n\t\t * Process database cleanup (both individual and all entries).\n\t\t *\n\t\t * @param {string} type Data type to delete from db (See data-type element for each row in the code).\n\t\t */\n\t\tconfirmDelete( type ) {\n\t\t\twindow.SUI.closeModal();\n\n\t\t\tlet row;\n\t\t\tconst footer = $( '.box-advanced-db .sui-box-footer' );\n\n\t\t\tif ( 'all' === type ) {\n\t\t\t\trow = footer;\n\t\t\t} else {\n\t\t\t\trow = $( '.box-advanced-db .wphb-border-frame' ).find(\n\t\t\t\t\t'div[data-type=' + type + ']'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst allBtn = $( '#wphb-db-delete-all' );\n\t\t\tconst button = row.find( '.wphb-db-row-delete' );\n\n\t\t\tallBtn.addClass( 'sui-button-onload-text' );\n\t\t\tbutton.addClass( 'sui-button-onload' );\n\n\t\t\tFetcher.advanced\n\t\t\t\t.deleteSelectedData( type )\n\t\t\t\t.then( ( response ) => {\n\t\t\t\t\tallBtn.removeClass( 'sui-button-onload-text' );\n\t\t\t\t\tbutton.removeClass( 'sui-button-onload' );\n\n\t\t\t\t\tfor ( const prop in response.left ) {\n\t\t\t\t\t\tif ( 'total' === prop ) {\n\t\t\t\t\t\t\tconst leftString =\n\t\t\t\t\t\t\t\tgetString( 'deleteAll' ) +\n\t\t\t\t\t\t\t\t' (' +\n\t\t\t\t\t\t\t\tresponse.left[ prop ] +\n\t\t\t\t\t\t\t\t')';\n\t\t\t\t\t\t\tfooter\n\t\t\t\t\t\t\t\t.find( '.wphb-db-delete-all' )\n\t\t\t\t\t\t\t\t.html( leftString );\n\t\t\t\t\t\t\tfooter\n\t\t\t\t\t\t\t\t.find( '#wphb-db-delete-all' )\n\t\t\t\t\t\t\t\t.attr( 'data-entries', response.left[ prop ] );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconst itemRow = $(\n\t\t\t\t\t\t\t\t'.box-advanced-db div[data-type=' + prop + ']'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\titemRow\n\t\t\t\t\t\t\t\t.find( '.wphb-db-items' )\n\t\t\t\t\t\t\t\t.html( response.left[ prop ] );\n\t\t\t\t\t\t\titemRow\n\t\t\t\t\t\t\t\t.find( '.wphb-db-row-delete' )\n\t\t\t\t\t\t\t\t.attr( 'data-entries', response.left[ prop ] )\n\t\t\t\t\t\t\t\t.attr(\n\t\t\t\t\t\t\t\t\t'disabled',\n\t\t\t\t\t\t\t\t\t'0' === response.left[ prop ]\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tWPHB_Admin.notices.show( response.message );\n\t\t\t\t} )\n\t\t\t\t.catch( ( error ) => {\n\t\t\t\t\tWPHB_Admin.notices.show( error, 'error' );\n\t\t\t\t\tallBtn.removeClass( 'sui-button-onload-text' );\n\t\t\t\t\tbutton.removeClass( 'sui-button-onload' );\n\t\t\t\t} );\n\t\t},\n\n\t\tcreatePickers() {\n\t\t\tconst $suiPickerInputs = $( '.sui-colorpicker-input' );\n\n\t\t\t$suiPickerInputs.wpColorPicker( {\n\t\t\t\tchange( event, ui ) {\n\t\t\t\t\tconst $this = $( this );\n\n\t\t\t\t\t// Prevent the model from being marked as changed on load.\n\t\t\t\t\tif ( $this.val() !== ui.color.toCSS() ) {\n\t\t\t\t\t\t$this.val( ui.color.toCSS() ).trigger( 'change' );\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t} );\n\n\t\t\tif ( $suiPickerInputs.hasClass( 'wp-color-picker' ) ) {\n\t\t\t\t$suiPickerInputs.each( function() {\n\t\t\t\t\tconst $suiPickerInput = $( this ),\n\t\t\t\t\t\t$suiPicker = $suiPickerInput.closest(\n\t\t\t\t\t\t\t'.sui-colorpicker-wrap'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t$suiPickerColor = $suiPicker.find(\n\t\t\t\t\t\t\t'.sui-colorpicker-value span[role=button]'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t$suiPickerValue = $suiPicker.find(\n\t\t\t\t\t\t\t'.sui-colorpicker-value'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t$wpPicker = $suiPickerInput.closest(\n\t\t\t\t\t\t\t'.wp-picker-container'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t$wpPickerButton = $wpPicker.find( '.wp-color-result' );\n\t\t\t\t\t// Listen to color change\n\t\t\t\t\t$suiPickerInput.on( 'change', function() {\n\t\t\t\t\t\t// Change color preview\n\t\t\t\t\t\t$suiPickerColor.find( 'span' ).css( {\n\t\t\t\t\t\t\t'background-color': $wpPickerButton.css(\n\t\t\t\t\t\t\t\t'background-color'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t// Change color value\n\t\t\t\t\t\t$suiPickerValue\n\t\t\t\t\t\t\t.find( 'input' )\n\t\t\t\t\t\t\t.val( $suiPickerInput.val() );\n\t\t\t\t\t} );\n\n\t\t\t\t\t// Open iris picker\n\t\t\t\t\t$suiPicker\n\t\t\t\t\t\t.find( '.sui-button, span[role=button]' )\n\t\t\t\t\t\t.on( 'click', function( e ) {\n\t\t\t\t\t\t\t$wpPickerButton.click();\n\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t// Clear color value\n\t\t\t\t\t$suiPickerValue\n\t\t\t\t\t\t.find( 'button' )\n\t\t\t\t\t\t.on( 'click', function( e ) {\n\t\t\t\t\t\t\t$wpPicker.find( '.wp-picker-clear' ).click();\n\t\t\t\t\t\t\t$suiPickerValue.find( 'input' ).val( '' );\n\t\t\t\t\t\t\t$suiPickerInput.val( '' ).trigger( 'change' );\n\t\t\t\t\t\t\t$suiPickerColor.find( 'span' ).css( {\n\t\t\t\t\t\t\t\t'background-color': '',\n\t\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Purge page cache preloader database entries or asset optimization custom post type groups and orphaned data.\n\t\t *\n\t\t * @since 2.7.0\n\t\t *\n\t\t * @param {string} type What to purge. Accepts: cache, minify.\n\t\t */\n\t\tpurgeDb( type = 'cache' ) {\n\t\t\tconst button = document.getElementById( 'btn-' + type + '-purge' );\n\n\t\t\tif ( ! button ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tbutton.classList.add( 'sui-button-onload-text' );\n\n\t\t\tFetcher.common.call( 'wphb_advanced_purge_' + type ).then( () => {\n\t\t\t\tdocument.getElementById( 'count-' + type ).innerHTML = '0';\n\n\t\t\t\tbutton.classList.remove( 'sui-button-onload-text' );\n\n\t\t\t\tconst str =\n\t\t\t\t\t'successAdvPurge' +\n\t\t\t\t\ttype.charAt( 0 ).toUpperCase() +\n\t\t\t\t\ttype.slice( 1 );\n\n\t\t\t\tWPHB_Admin.notices.show( getString( str ) );\n\t\t\t} );\n\t\t},\n\t};\n} )( jQuery );\n","import Scanner from '../utils/scanner';\nimport Fetcher from '../utils/fetcher';\n\n// Number of sites to clear out per request.\nconst BATCH_SIZE = 20;\n\n/**\n * CacheScanner class responsible for clearing out network cache on subsites.\n *\n * @since 2.7.0\n */\nclass CacheScanner extends Scanner {\n\t/**\n\t * Run step.\n\t *\n\t * @since 2.7.0\n\t *\n\t * @param {number} remainingSteps\n\t */\n\tstep( remainingSteps ) {\n\t\tsuper.step( remainingSteps );\n\n\t\tthis.currentStep++;\n\n\t\tif ( remainingSteps > 0 ) {\n\t\t\tconst offset = ( this.totalSteps - remainingSteps ) * BATCH_SIZE;\n\n\t\t\tFetcher.caching.clearCacheBatch( BATCH_SIZE, offset ).then( () => {\n\t\t\t\tthis.updateProgressBar( this.getProgress() );\n\t\t\t\tthis.step( this.totalSteps - this.currentStep );\n\t\t\t} );\n\t\t} else {\n\t\t\tthis.onFinish();\n\t\t}\n\t}\n\n\t/**\n\t * Set the total number of steps based on the number of subsites and BATCH_SIZE.\n\t *\n\t * @since 2.7.0\n\t */\n\tonStart() {\n\t\treturn Fetcher.common\n\t\t\t.call( 'wphb_get_network_sites' )\n\t\t\t.then( ( response ) => {\n\t\t\t\tthis.totalSteps = Math.ceil(\n\t\t\t\t\tparseInt( response ) / BATCH_SIZE\n\t\t\t\t);\n\t\t\t} );\n\t}\n\n\t/**\n\t * Finish up.\n\t *\n\t * @since 2.7.0\n\t */\n\tonFinish() {\n\t\tsuper.onFinish();\n\t\tlocation.reload();\n\t}\n}\n\nexport default CacheScanner;\n","/* global WPHB_Admin */\n/* global wphbMixPanel */\n\n/**\n * Internal dependencies\n */\nimport Fetcher from '../utils/fetcher';\nimport { getString } from '../utils/helpers';\nimport CacheScanner from '../scanners/CacheScanner';\n\n( function( $ ) {\n\t'use strict';\n\tWPHB_Admin.caching = {\n\t\tmodule: 'caching',\n\n\t\tinit() {\n\t\t\tconst self = this,\n\t\t\t\thash = window.location.hash,\n\t\t\t\tpageCachingForm = $( 'form[id=\"page_cache-form\"]' ),\n\t\t\t\trssForm = $( 'form[id=\"rss-form\"]' ),\n\t\t\t\tgravatarDiv = $( 'div[id=\"wphb-box-caching-gravatar\"]' ),\n\t\t\t\tsettingsForm = $( 'form[id=\"settings-form\"]' );\n\n\t\t\t// We assume there's at least one site, but this.scanner.init() will properly set the total sites.\n\t\t\tthis.scanner = new CacheScanner( 1, 0 );\n\n\t\t\tif ( hash && $( hash ).length ) {\n\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t$( 'html, body' ).animate(\n\t\t\t\t\t\t{ scrollTop: $( hash ).offset().top },\n\t\t\t\t\t\t'slow'\n\t\t\t\t\t);\n\t\t\t\t}, 300 );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * PAGE CACHING\n\t\t\t *\n\t\t\t * @since 1.7.0\n\t\t\t */\n\n\t\t\t// Save page caching settings.\n\t\t\tpageCachingForm.on( 'submit', ( e ) => {\n\t\t\t\te.preventDefault();\n\t\t\t\tself.saveSettings( 'page_cache', pageCachingForm );\n\t\t\t} );\n\n\t\t\t// Clear page cache.\n\t\t\tpageCachingForm.on(\n\t\t\t\t'click',\n\t\t\t\t'.sui-box-header .sui-button',\n\t\t\t\t( e ) => {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tself.clearCache( 'page_cache', pageCachingForm );\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * Toggle clear cache settings.\n\t\t\t *\n\t\t\t * @since 2.1.0\n\t\t\t */\n\t\t\tconst intervalToggle = document.getElementById( 'clear_interval' );\n\t\t\tif ( intervalToggle ) {\n\t\t\t\tintervalToggle.addEventListener( 'change', function( e ) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\t$( '#page_cache_clear_interval' ).toggle();\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Cancel cache preload.\n\t\t\t *\n\t\t\t * @since 2.1.0\n\t\t\t */\n\t\t\tconst cancelPreload = document.getElementById(\n\t\t\t\t'wphb-cancel-cache-preload'\n\t\t\t);\n\t\t\tif ( cancelPreload ) {\n\t\t\t\tcancelPreload.addEventListener( 'click', function( e ) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tFetcher.common.call( 'wphb_preload_cancel' ).then( () => {\n\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Show/hide preload settings.\n\t\t\t *\n\t\t\t * @since 2.3.0\n\t\t\t */\n\t\t\tconst preloadToggle = document.getElementById( 'preload' );\n\t\t\tif ( preloadToggle ) {\n\t\t\t\tpreloadToggle.addEventListener( 'change', function( e ) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\t$( '#page_cache_preload_type' ).toggle();\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Remove advanced-cache.php file.\n\t\t\t *\n\t\t\t * @since 3.1.1\n\t\t\t */\n\t\t\t$( '#wphb-remove-advanced-cache' ).on( 'click', ( e ) => {\n\t\t\t\te.preventDefault();\n\t\t\t\tFetcher.common\n\t\t\t\t\t.call( 'wphb_remove_advanced_cache' )\n\t\t\t\t\t.then( () => location.reload() );\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * CLOUDFLARE\n\t\t\t */\n\t\t\t// \"# of your cache types don’t meet the recommended expiry period\" notice clicked.\n\t\t\t$( '#configure-link' ).on( 'click', function( e ) {\n\t\t\t\te.preventDefault();\n\t\t\t\t$( 'html, body' ).animate(\n\t\t\t\t\t{\n\t\t\t\t\t\tscrollTop: $( '#wphb-box-caching-settings' ).offset()\n\t\t\t\t\t\t\t.top,\n\t\t\t\t\t},\n\t\t\t\t\t'slow'\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * GRAVATAR CACHING\n\t\t\t *\n\t\t\t * @since 1.9.0\n\t\t\t */\n\n\t\t\t// Clear cache.\n\t\t\tgravatarDiv.on( 'click', '.sui-box-header .sui-button', ( e ) => {\n\t\t\t\te.preventDefault();\n\t\t\t\tself.clearCache( 'gravatar', gravatarDiv );\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * RSS CACHING\n\t\t\t *\n\t\t\t * @since 1.8.0\n\t\t\t */\n\n\t\t\t// Parse rss cache settings.\n\t\t\trssForm.on( 'submit', ( e ) => {\n\t\t\t\te.preventDefault();\n\n\t\t\t\t// Make sure a positive value is always reflected for the rss expiry time input.\n\t\t\t\tconst rssExpiryTime = rssForm.find( '#rss-expiry-time' );\n\t\t\t\trssExpiryTime.val( Math.abs( rssExpiryTime.val() ) );\n\n\t\t\t\tself.saveSettings( 'rss', rssForm );\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * INTEGRATIONS\n\t\t\t *\n\t\t\t * @since 2.5.0\n\t\t\t */\n\t\t\tconst redisForm = document.getElementById( 'redis-settings-form' );\n\t\t\tif ( redisForm ) {\n\t\t\t\tredisForm.addEventListener( 'submit', ( e ) => {\n\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\tconst btn = document.getElementById( 'redis-connect-save' );\n\t\t\t\t\tbtn.classList.add( 'sui-button-onload-text' );\n\n\t\t\t\t\tconst host = document.getElementById( 'redis-host' ).value;\n\t\t\t\t\tlet port = document.getElementById( 'redis-port' ).value;\n\t\t\t\t\tconst pass = document.getElementById( 'redis-password' )\n\t\t\t\t\t\t.value;\n\t\t\t\t\tconst db = document.getElementById( 'redis-db' ).value;\n\t\t\t\t\tconst connected = document.getElementById(\n\t\t\t\t\t\t'redis-connected'\n\t\t\t\t\t).value;\n\n\t\t\t\t\tif ( ! port ) {\n\t\t\t\t\t\tport = 6379;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Submit via Fetcher. then close modal.\n\t\t\t\t\tFetcher.caching\n\t\t\t\t\t\t.redisSaveSettings( host, port, pass, db )\n\t\t\t\t\t\t.then( ( response ) => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t'undefined' !== typeof response &&\n\t\t\t\t\t\t\t\tresponse.success\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\twindow.location.search +=\n\t\t\t\t\t\t\t\t\tconnected === '1'\n\t\t\t\t\t\t\t\t\t\t? '&updated=redis-auth-2'\n\t\t\t\t\t\t\t\t\t\t: '&updated=redis-auth';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tconst notice = document.getElementById(\n\t\t\t\t\t\t\t\t\t'redis-connect-notice-on-modal'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tnotice.innerHTML = response.message;\n\t\t\t\t\t\t\t\tnotice.parentNode.parentNode.parentNode.classList.remove(\n\t\t\t\t\t\t\t\t\t'sui-hidden'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tnotice.parentNode.parentNode.classList.add(\n\t\t\t\t\t\t\t\t\t'sui-spacing-top--10'\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\tbtn.classList.remove(\n\t\t\t\t\t\t\t\t\t'sui-button-onload-text'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tconst objectCache = document.getElementById( 'object-cache' );\n\t\t\tif ( objectCache ) {\n\t\t\t\tobjectCache.addEventListener( 'change', ( e ) => {\n\t\t\t\t\t// Track feature enable.\n\t\t\t\t\tif ( e.target.checked ) {\n\t\t\t\t\t\twphbMixPanel.enableFeature( 'Redis Cache' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\twphbMixPanel.disableFeature( 'Redis Cache' );\n\t\t\t\t\t}\n\n\t\t\t\t\tFetcher.caching\n\t\t\t\t\t\t.redisObjectCache( e.target.checked )\n\t\t\t\t\t\t.then( ( response ) => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t'undefined' !== typeof response &&\n\t\t\t\t\t\t\t\tresponse.success\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\twindow.location.search +=\n\t\t\t\t\t\t\t\t\t'&updated=redis-object-cache';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tWPHB_Admin.notices.show(\n\t\t\t\t\t\t\t\t\tgetString( 'errorSettingsUpdate' ),\n\t\t\t\t\t\t\t\t\t'error'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tconst objectCachePurge = document.getElementById(\n\t\t\t\t'clear-redis-cache'\n\t\t\t);\n\t\t\tif ( objectCachePurge ) {\n\t\t\t\tobjectCachePurge.addEventListener( 'click', () => {\n\t\t\t\t\tobjectCachePurge.classList.add( 'sui-button-onload-text' );\n\t\t\t\t\tFetcher.common\n\t\t\t\t\t\t.call( 'wphb_redis_cache_purge' )\n\t\t\t\t\t\t.then( () => {\n\t\t\t\t\t\t\tobjectCachePurge.classList.remove(\n\t\t\t\t\t\t\t\t'sui-button-onload-text'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tWPHB_Admin.notices.show(\n\t\t\t\t\t\t\t\tgetString( 'successRedisPurge' )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tconst redisCacheDisable = document.getElementById(\n\t\t\t\t'redis-disconnect'\n\t\t\t);\n\t\t\tif ( redisCacheDisable ) {\n\t\t\t\tredisCacheDisable.addEventListener( 'click', ( e ) => {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tthis.redisDisable();\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * SETTINGS\n\t\t\t *\n\t\t\t * @since 1.8.1\n\t\t\t */\n\n\t\t\t// Parse page cache settings.\n\t\t\tsettingsForm.on( 'submit', ( e ) => {\n\t\t\t\te.preventDefault();\n\n\t\t\t\t// Hide the notice if it is showing.\n\t\t\t\tconst detection = $(\n\t\t\t\t\t'input[name=\"detection\"]:checked',\n\t\t\t\t\tsettingsForm\n\t\t\t\t).val();\n\t\t\t\tif ( 'auto' === detection || 'none' === detection ) {\n\t\t\t\t\t$( '.wphb-notice.notice-info' ).slideUp();\n\t\t\t\t}\n\n\t\t\t\tself.saveSettings( 'other_cache', settingsForm );\n\t\t\t} );\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Disable Redis cache.\n\t\t *\n\t\t * @since 2.5.0\n\t\t */\n\t\tredisDisable: () => {\n\t\t\tFetcher.common.call( 'wphb_redis_disconnect' ).then( () => {\n\t\t\t\twindow.location.search += '&updated=redis-disconnect';\n\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Process form submit from page caching, rss and settings forms.\n\t\t *\n\t\t * @since 1.9.0\n\t\t *\n\t\t * @param {string} module Module name.\n\t\t * @param {Object} form Form.\n\t\t */\n\t\tsaveSettings: ( module, form ) => {\n\t\t\tconst button = form.find( 'button.sui-button' );\n\t\t\tbutton.addClass( 'sui-button-onload-text' );\n\n\t\t\tFetcher.caching\n\t\t\t\t.saveSettings( module, form.serialize() )\n\t\t\t\t.then( ( response ) => {\n\t\t\t\t\tbutton.removeClass( 'sui-button-onload-text' );\n\n\t\t\t\t\tif ( 'undefined' !== typeof response && response.success ) {\n\t\t\t\t\t\tif ( 'page_cache' === module ) {\n\t\t\t\t\t\t\twindow.location.search += '&updated=true';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tWPHB_Admin.notices.show();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tWPHB_Admin.notices.show(\n\t\t\t\t\t\t\tgetString( 'errorSettingsUpdate' ),\n\t\t\t\t\t\t\t'error'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Unified clear cache method that clears: page cache, gravatar cache and browser cache.\n\t\t *\n\t\t * @since 1.9.0\n\t\t *\n\t\t * @param {string} module Module for which to clear the cache.\n\t\t * @param {Object} form Form from which the call was made.\n\t\t */\n\t\tclearCache: ( module, form ) => {\n\t\t\tconst button = form.find( '.sui-box-header .sui-button' );\n\t\t\tbutton.addClass( 'sui-button-onload-text' );\n\n\t\t\tFetcher.caching.clearCache( module ).then( ( response ) => {\n\t\t\t\tif ( 'undefined' !== typeof response && response.success ) {\n\t\t\t\t\tif ( 'page_cache' === module ) {\n\t\t\t\t\t\t$( '.box-caching-summary span.sui-summary-large' ).html(\n\t\t\t\t\t\t\t'0'\n\t\t\t\t\t\t);\n\t\t\t\t\t\tWPHB_Admin.notices.show(\n\t\t\t\t\t\t\tgetString( 'successPageCachePurge' )\n\t\t\t\t\t\t);\n\t\t\t\t\t} else if ( 'gravatar' === module ) {\n\t\t\t\t\t\tWPHB_Admin.notices.show(\n\t\t\t\t\t\t\tgetString( 'successGravatarPurge' )\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tWPHB_Admin.notices.show(\n\t\t\t\t\t\tgetString( 'errorCachePurge' ),\n\t\t\t\t\t\t'error'\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tbutton.removeClass( 'sui-button-onload-text' );\n\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Clear network wide page cache.\n\t\t *\n\t\t * @since 2.7.0\n\t\t */\n\t\tclearNetworkCache() {\n\t\t\twindow.SUI.slideModal( 'ccnw-slide-two', 'slide-next', 'next' );\n\t\t\tthis.scanner.start();\n\t\t},\n\t};\n} )( jQuery );\n","/* global wphb */\n/* global WPHB_Admin */\n\nimport Fetcher from '../utils/fetcher';\nimport { getString } from '../utils/helpers';\n\n( function( $ ) {\n\tWPHB_Admin.cloudflare = {\n\t\tmodule: 'cloudflare',\n\n\t\tinit() {\n\t\t\t/** @member {Array} wphb */\n\t\t\tif ( wphb.cloudflare.is.connected ) {\n\t\t\t\t$( 'input[type=\"submit\"].cloudflare-clear-cache' ).on(\n\t\t\t\t\t'click',\n\t\t\t\t\tfunction( e ) {\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\tthis.purgeCache.apply( $( e.target ), [ this ] );\n\t\t\t\t\t}.bind( this )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.bindActions();\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Bind actions.\n\t\t */\n\t\tbindActions() {\n\t\t\t// On submit from the Cloudflare connect modal.\n\t\t\tconst cfModal = document.getElementById( 'cloudflare-credentials' );\n\t\t\tif ( cfModal ) {\n\t\t\t\tcfModal.addEventListener( 'submit', ( e ) => {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tthis.connect( 'cloudflare-connect-save' );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Re-check zones.\n\t\t\tconst reChkBtn = document.getElementById( 'cf-recheck-zones' );\n\t\t\tif ( reChkBtn ) {\n\t\t\t\treChkBtn.addEventListener( 'click', ( e ) => {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tthis.recheck( e );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Save zone from modal.\n\t\t\tconst saveBtn = document.getElementById( 'cloudflare-zone-save' );\n\t\t\tif ( saveBtn ) {\n\t\t\t\tsaveBtn.addEventListener( 'click', ( e ) => {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tthis.connect( 'cloudflare-zone-save' );\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Show key help in modal.\n\t\t\tconst keyHelpLnk = document.getElementById(\n\t\t\t\t'cloudflare-show-key-help'\n\t\t\t);\n\t\t\tif ( keyHelpLnk ) {\n\t\t\t\tkeyHelpLnk.addEventListener( 'click', ( e ) => {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tthis.toggleHelp();\n\t\t\t\t} );\n\t\t\t}\n\t\t\tconst topHelpLnk = document.getElementById(\n\t\t\t\t'cloudflare-connect-steps'\n\t\t\t);\n\t\t\tif ( topHelpLnk ) {\n\t\t\t\ttopHelpLnk.addEventListener( 'click', ( e ) => {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tthis.toggleHelp();\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t$( 'input[name=\"cf_connection_type\"]' ).on( 'change', () => {\n\t\t\t\tthis.hideHelp();\n\t\t\t\tthis.switchLabel();\n\t\t\t} );\n\n\t\t\t// Enable/disable 'Connect' button based on form input.\n\t\t\t$( 'form#cloudflare-credentials input' ).on( 'keyup', function() {\n\t\t\t\tlet disabled = true;\n\n\t\t\t\t$( 'form#cloudflare-credentials input' ).each( function() {\n\t\t\t\t\tif ( '' !== $( this ).val() ) {\n\t\t\t\t\t\tdisabled = false;\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\t$( '#cloudflare-connect-save' ).prop( 'disabled', disabled );\n\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Purge Cloudflare cache.\n\t\t */\n\t\tpurgeCache() {\n\t\t\tconst $button = this;\n\t\t\t$button.attr( 'disabled', true );\n\n\t\t\tFetcher.common\n\t\t\t\t.call( 'wphb_cloudflare_purge_cache' )\n\t\t\t\t.then( () => {\n\t\t\t\t\tWPHB_Admin.notices.show(\n\t\t\t\t\t\tgetString( 'successCloudflarePurge' )\n\t\t\t\t\t);\n\t\t\t\t} )\n\t\t\t\t.catch( ( reject ) => {\n\t\t\t\t\tWPHB_Admin.notices.show( reject.responseText, 'error' );\n\t\t\t\t} );\n\n\t\t\t$button.removeAttr( 'disabled' );\n\t\t},\n\n\t\t/**\n\t\t * Connect to Cloudflare.\n\t\t *\n\t\t * @since 3.0.0\n\t\t *\n\t\t * @param {string} id Button ID for loader animation.\n\t\t */\n\t\tconnect: ( id ) => {\n\t\t\tconst btn = document.getElementById( id );\n\t\t\tbtn.classList.add( 'sui-button-onload-text' );\n\n\t\t\tconst type = document.getElementById( 'cf-token-tab' ).checked\n\t\t\t\t? 'token'\n\t\t\t\t: 'key';\n\n\t\t\t// Remove errors.\n\t\t\tconst apiKeyField = document.getElementById(\n\t\t\t\t'api-' + type + '-form-field'\n\t\t\t);\n\t\t\tapiKeyField.classList.remove( 'sui-form-field-error' );\n\t\t\tconst apiKeyError = document.getElementById( 'error-api-' + type );\n\t\t\tapiKeyError.innerHTML = '';\n\t\t\tapiKeyError.style.display = 'none';\n\n\t\t\t// Get key/values.\n\t\t\tconst email = document.getElementById( 'cloudflare-email' ).value;\n\t\t\tconst key = document.getElementById( 'cloudflare-api-key' ).value;\n\t\t\tconst token = document.getElementById( 'cloudflare-api-token' )\n\t\t\t\t.value;\n\t\t\tconst zone = jQuery( '#cloudflare-zones' ).find( ':selected' );\n\n\t\t\tFetcher.cloudflare\n\t\t\t\t.connect( email, key, token, zone.text() )\n\t\t\t\t.then( ( response ) => {\n\t\t\t\t\tif (\n\t\t\t\t\t\t'undefined' !== typeof response &&\n\t\t\t\t\t\t'undefined' !== typeof response.zones\n\t\t\t\t\t) {\n\t\t\t\t\t\tWPHB_Admin.cloudflare.populateSelectWithZones(\n\t\t\t\t\t\t\tresponse.zones\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\twindow.SUI.slideModal(\n\t\t\t\t\t\t\t'slide-cloudflare-zones',\n\t\t\t\t\t\t\t'cloudflare-zone-recheck',\n\t\t\t\t\t\t\t'next'\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// All good, reload page.\n\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t}\n\t\t\t\t} )\n\t\t\t\t.catch( ( error ) => {\n\t\t\t\t\tif (\n\t\t\t\t\t\t'undefined' !== typeof error.response &&\n\t\t\t\t\t\t'undefined' &&\n\t\t\t\t\t\ttypeof error.response.data &&\n\t\t\t\t\t\t'undefined' !== typeof error.response.data.code\n\t\t\t\t\t) {\n\t\t\t\t\t\t// There was one of known errors with wrong API keys.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t400 === error.response.data.code ||\n\t\t\t\t\t\t\t403 === error.response.data.code\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tapiKeyField.classList.add( 'sui-form-field-error' );\n\t\t\t\t\t\t\tapiKeyError.innerHTML = error.message;\n\t\t\t\t\t\t\tapiKeyError.style.display = 'block';\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Fallback for unknown errors.\n\t\t\t\t\t\tWPHB_Admin.notices.show( error, 'error' );\n\t\t\t\t\t}\n\t\t\t\t} )\n\t\t\t\t.finally( () => {\n\t\t\t\t\tbtn.classList.remove( 'sui-button-onload-text' );\n\t\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Pre-populate a select with zones.\n\t\t *\n\t\t * @since 3.0.0\n\t\t *\n\t\t * @param {Array} zones\n\t\t */\n\t\tpopulateSelectWithZones: ( zones ) => {\n\t\t\tconst select = jQuery( '#cloudflare-zones' );\n\n\t\t\tselect.SUIselect2( 'destroy' );\n\n\t\t\tzones.forEach( ( zone ) => {\n\t\t\t\tif (\n\t\t\t\t\t0 ===\n\t\t\t\t\tselect.find( \"option[value='\" + zone.value + \"']\" ).length\n\t\t\t\t) {\n\t\t\t\t\t// Only add a new zone if it's not already present.\n\t\t\t\t\tconst option = new Option( zone.label, zone.value );\n\t\t\t\t\tselect.append( option ).trigger( 'change' );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tselect.SUIselect2( { minimumResultsForSearch: -1 } );\n\t\t},\n\n\t\t/**\n\t\t * Re-check Cloudflare zones.\n\t\t *\n\t\t * @since 3.0.0\n\t\t *\n\t\t * @param {Object} e\n\t\t */\n\t\trecheck: ( e ) => {\n\t\t\te.target.classList.add( 'sui-button-onload-text' );\n\n\t\t\tFetcher.common\n\t\t\t\t.call( 'wphb_cloudflare_recheck_zones' )\n\t\t\t\t.then( ( response ) => {\n\t\t\t\t\tif (\n\t\t\t\t\t\t'undefined' !== typeof response &&\n\t\t\t\t\t\t'undefined' !== typeof response.zones\n\t\t\t\t\t) {\n\t\t\t\t\t\tWPHB_Admin.cloudflare.populateSelectWithZones(\n\t\t\t\t\t\t\tresponse.zones\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// All good, reload page.\n\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t}\n\t\t\t\t} )\n\t\t\t\t.catch( ( error ) => {\n\t\t\t\t\tWPHB_Admin.notices.show( error, 'error' );\n\t\t\t\t} )\n\t\t\t\t.finally( () => {\n\t\t\t\t\te.target.classList.remove( 'sui-button-onload-text' );\n\t\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Toggle key help from the modal.\n\t\t *\n\t\t * @since 3.0.0\n\t\t */\n\t\ttoggleHelp: () => {\n\t\t\tconst token = document.getElementById( 'cf-token-tab' ).checked;\n\t\t\tconst type = token ? 'token' : 'key';\n\n\t\t\tdocument\n\t\t\t\t.getElementById( 'cloudflare-' + type + '-how-to' )\n\t\t\t\t.classList.toggle( 'sui-hidden' );\n\n\t\t\tconst icon = document\n\t\t\t\t.getElementById( 'cloudflare-show-key-help' )\n\t\t\t\t.querySelector( 'span:last-of-type' );\n\t\t\tif ( icon.classList.contains( 'sui-icon-chevron-down' ) ) {\n\t\t\t\ticon.classList.remove( 'sui-icon-chevron-down' );\n\t\t\t\ticon.classList.add( 'sui-icon-chevron-up' );\n\t\t\t} else {\n\t\t\t\ticon.classList.remove( 'sui-icon-chevron-up' );\n\t\t\t\ticon.classList.add( 'sui-icon-chevron-down' );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Hide instructions on connect modal when switching between key/token tabs.\n\t\t *\n\t\t * @since 3.1.0\n\t\t */\n\t\thideHelp: () => {\n\t\t\t$( '#cloudflare-key-how-to' ).addClass( 'sui-hidden' );\n\t\t\t$( '#cloudflare-token-how-to' ).addClass( 'sui-hidden' );\n\n\t\t\t$( 'span.sui-icon-chevron-up' )\n\t\t\t\t.addClass( 'sui-icon-chevron-down' )\n\t\t\t\t.removeClass( 'sui-icon-chevron-up' );\n\t\t},\n\n\t\t/**\n\t\t * Switch label based on section in modal.\n\t\t *\n\t\t * @since 3.1.0\n\t\t */\n\t\tswitchLabel: () => {\n\t\t\tconst token = document.getElementById( 'cf-token-tab' ).checked;\n\t\t\tconst type = token ? 'token' : 'key';\n\n\t\t\tdocument.getElementById( 'cloudflare-email' ).value = '';\n\t\t\tdocument.getElementById( 'cloudflare-api-key' ).value = '';\n\t\t\tdocument.getElementById( 'cloudflare-api-token' ).value = '';\n\n\t\t\tdocument.querySelector(\n\t\t\t\t'#cloudflare-show-key-help > span:first-of-type'\n\t\t\t).innerHTML = wphb.strings[ 'CloudflareHelpAPI' + type ];\n\t\t},\n\t};\n}( jQuery ) );\n","/* global WPHB_Admin */\n/* global SUI */\n\nimport Fetcher from '../utils/fetcher';\n\n( function( $ ) {\n\tWPHB_Admin.dashboard = {\n\t\tmodule: 'dashboard',\n\n\t\tinit() {\n\t\t\t$( '.wphb-performance-report-item' ).on( 'click', function() {\n\t\t\t\tconst url = $( this ).data( 'performance-url' );\n\t\t\t\tif ( url ) {\n\t\t\t\t\tlocation.href = url;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tconst clearCacheModalButton = document.getElementById(\n\t\t\t\t'clear-cache-modal-button'\n\t\t\t);\n\t\t\tif ( clearCacheModalButton ) {\n\t\t\t\tclearCacheModalButton.addEventListener(\n\t\t\t\t\t'click',\n\t\t\t\t\tthis.clearCache\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Clear selected cache.\n\t\t *\n\t\t * @since 2.7.1\n\t\t */\n\t\tclearCache() {\n\t\t\tthis.classList.toggle( 'sui-button-onload-text' );\n\n\t\t\tconst checkboxes = document.querySelectorAll(\n\t\t\t\t'input[type=\"checkbox\"]'\n\t\t\t);\n\n\t\t\tconst modules = [];\n\t\t\tfor ( let i = 0; i < checkboxes.length; i++ ) {\n\t\t\t\tif ( false === checkboxes[ i ].checked ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tmodules.push( checkboxes[ i ].dataset.module );\n\t\t\t}\n\n\t\t\tFetcher.common.clearCaches( modules ).then( ( response ) => {\n\t\t\t\tthis.classList.toggle( 'sui-button-onload-text' );\n\t\t\t\tSUI.closeModal();\n\t\t\t\tWPHB_Admin.notices.show( response.message );\n\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Hide upgrade summary modal.\n\t\t */\n\t\thideUpgradeSummary: () => {\n\t\t\twindow.SUI.closeModal();\n\t\t\tFetcher.common.call( 'wphb_hide_upgrade_summary' );\n\t\t},\n\t};\n}( jQuery ) );\n","/* global wphb */\n/* global wphbMixPanel */\n\n/**\n * Internal dependencies\n */\nimport Fetcher from '../utils/fetcher';\nimport { getString } from '../utils/helpers';\n\n/**\n * External dependencies\n */\nconst MixPanel = require( 'mixpanel-browser' );\n\n( function( $ ) {\n\t'use strict';\n\n\tconst WPHB_Admin = {\n\t\tmodules: [],\n\t\t// Common functionality to all screens\n\t\tinit() {\n\t\t\t/**\n\t\t\t * Handles the tab navigation on mobile.\n\t\t\t *\n\t\t\t * @since 2.7.2\n\t\t\t */\n\t\t\t$( '.sui-mobile-nav' ).on( 'change', ( e ) => {\n\t\t\t\twindow.location.href = e.target.value;\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * Refresh page, when selecting a report type.\n\t\t\t *\n\t\t\t * @since 2.0.0\n\t\t\t */\n\t\t\t$( 'select#wphb-performance-report-type' ).on(\n\t\t\t\t'change',\n\t\t\t\tfunction( e ) {\n\t\t\t\t\tconst url = new URL( window.location );\n\t\t\t\t\turl.searchParams.set( 'type', e.target.value );\n\t\t\t\t\twindow.location = url;\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * Clear log button clicked.\n\t\t\t *\n\t\t\t * @since 1.9.2\n\t\t\t */\n\t\t\t$( '.wphb-logging-buttons' ).on(\n\t\t\t\t'click',\n\t\t\t\t'.wphb-logs-clear',\n\t\t\t\tfunction( e ) {\n\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\tFetcher.common\n\t\t\t\t\t\t.clearLogs( e.target.dataset.module )\n\t\t\t\t\t\t.then( ( response ) => {\n\t\t\t\t\t\t\tif ( 'undefined' === typeof response.success ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( response.success ) {\n\t\t\t\t\t\t\t\tWPHB_Admin.notices.show( response.message );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tWPHB_Admin.notices.show(\n\t\t\t\t\t\t\t\t\tresponse.message,\n\t\t\t\t\t\t\t\t\t'error'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * Track performance report scan init.\n\t\t\t *\n\t\t\t * @since 2.5.0\n\t\t\t */\n\t\t\t$( '#performance-run-test, #performance-scan-website' ).on(\n\t\t\t\t'click',\n\t\t\t\t() => {\n\t\t\t\t\twphbMixPanel.track( 'plugin_scan_started', {\n\t\t\t\t\t\tscore_mobile_previous: getString(\n\t\t\t\t\t\t\t'previousScoreMobile'\n\t\t\t\t\t\t),\n\t\t\t\t\t\tscore_desktop_previous: getString(\n\t\t\t\t\t\t\t'previousScoreDesktop'\n\t\t\t\t\t\t),\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\n\t\tinitModule( module ) {\n\t\t\tif ( this.hasOwnProperty( module ) ) {\n\t\t\t\tthis.modules[ module ] = this[ module ].init();\n\t\t\t\treturn this.modules[ module ];\n\t\t\t}\n\n\t\t\treturn {};\n\t\t},\n\n\t\tgetModule( module ) {\n\t\t\tif ( typeof this.modules[ module ] !== 'undefined' ) {\n\t\t\t\treturn this.modules[ module ];\n\t\t\t}\n\t\t\treturn this.initModule( module );\n\t\t},\n\t};\n\n\t/**\n\t * Admin notices.\n\t */\n\tWPHB_Admin.notices = {\n\t\tinit() {\n\t\t\tconst cfNotice = document.getElementById( 'dismiss-cf-notice' );\n\t\t\tif ( cfNotice ) {\n\t\t\t\tcfNotice.onclick = ( e ) => this.dismissCloudflareNotice( e );\n\t\t\t}\n\n\t\t\tconst http2Notice = document.getElementById(\n\t\t\t\t'wphb-floating-http2-info'\n\t\t\t);\n\t\t\tif ( http2Notice ) {\n\t\t\t\thttp2Notice.addEventListener( 'click', ( e ) => {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tFetcher.common.dismissNotice( 'http2-info' );\n\t\t\t\t\t$( '.wphb-box-notice' ).slideUp();\n\t\t\t\t} );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Show notice.\n\t\t *\n\t\t * @since 1.8\n\t\t *\n\t\t * @param {string} message Message to display.\n\t\t * @param {string} type Error or success.\n\t\t * @param {boolean} dismiss Auto dismiss message.\n\t\t */\n\t\tshow( message = '', type = 'success', dismiss = true ) {\n\t\t\tif ( '' === message ) {\n\t\t\t\tmessage = getString( 'successUpdate' );\n\t\t\t}\n\n\t\t\tconst options = {\n\t\t\t\ttype,\n\t\t\t\tdismiss: {\n\t\t\t\t\tshow: false,\n\t\t\t\t\tlabel: getString( 'dismissLabel' ),\n\t\t\t\t\ttooltip: getString( 'dismissLabel' ),\n\t\t\t\t},\n\t\t\t\ticon: 'info',\n\t\t\t};\n\n\t\t\tif ( ! dismiss ) {\n\t\t\t\toptions.dismiss.show = true;\n\t\t\t}\n\n\t\t\twindow.SUI.openNotice(\n\t\t\t\t'wphb-ajax-update-notice',\n\t\t\t\t'<p>' + message + '</p>',\n\t\t\t\toptions\n\t\t\t);\n\t\t},\n\n\t\t/**\n\t\t * Dismiss notice.\n\t\t *\n\t\t * @since 2.6.0 Refactored and moved from WPHB_Admin.init()\n\t\t *\n\t\t * @param {Object} el\n\t\t */\n\t\tdismiss( el ) {\n\t\t\tconst noticeId = el.closest( '.sui-notice' ).getAttribute( 'id' );\n\t\t\tFetcher.common.dismissNotice( noticeId );\n\t\t\twindow.SUI.closeNotice( noticeId );\n\t\t},\n\n\t\t/**\n\t\t * Dismiss Cloudflare notice from Dashboard or Caching pages.\n\t\t *\n\t\t * @since 2.6.0 Refactored and moved from WPHB_Admin.dashboard.init() && WPHB_ADMIN.caching.init()\n\t\t *\n\t\t * @param {Object} e\n\t\t */\n\t\tdismissCloudflareNotice( e ) {\n\t\t\te.preventDefault();\n\t\t\tFetcher.common.call( 'wphb_cf_notice_dismiss' );\n\t\t\tconst cloudFlareDashNotice = $( '.cf-dash-notice' );\n\t\t\tcloudFlareDashNotice.slideUp();\n\t\t\tcloudFlareDashNotice.parent().addClass( 'no-background-image' );\n\t\t},\n\t};\n\n\twindow.WPHB_Admin = WPHB_Admin;\n} )( jQuery );\n","import { getString } from '../utils/helpers';\n\nconst Row = ( _element, _filter, _filterSec, _filterType ) => {\n\tconst $el = _element;\n\tconst filter = _filter.toLowerCase();\n\tconst filterSecondary = _filterSec ? _filterSec.toLowerCase() : false;\n\tconst filterType = _filterType.toLowerCase();\n\tconst $selectCheckbox = $el.find(\n\t\t'.wphb-minification-file-select input[type=checkbox]'\n\t);\n\tlet selected = false;\n\tlet visible = true;\n\n\treturn {\n\t\thide() {\n\t\t\t$el.addClass( 'out-of-filter' );\n\t\t\tvisible = false;\n\t\t},\n\n\t\tshow() {\n\t\t\t$el.removeClass( 'out-of-filter' );\n\t\t\tvisible = true;\n\t\t},\n\n\t\tgetElement() {\n\t\t\treturn $el;\n\t\t},\n\n\t\tgetId() {\n\t\t\treturn $el.attr( 'id' );\n\t\t},\n\n\t\tgetFilter() {\n\t\t\treturn filter;\n\t\t},\n\n\t\tmatchFilter( text ) {\n\t\t\tif ( text === '' ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\ttext = text.toLowerCase();\n\t\t\treturn filter.search( text ) > -1;\n\t\t},\n\n\t\tmatchSecondaryFilter( text ) {\n\t\t\tif ( text === '' ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif ( ! filterSecondary ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\ttext = text.toLowerCase();\n\t\t\treturn filterSecondary === text;\n\t\t},\n\n\t\tmatchTypeFilter( text ) {\n\t\t\tif ( text === '' || ! filterType ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif ( text === 'all' ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn filterType === text;\n\t\t},\n\n\t\tisVisible() {\n\t\t\treturn visible;\n\t\t},\n\n\t\tisSelected() {\n\t\t\treturn selected;\n\t\t},\n\n\t\tisType( type ) {\n\t\t\treturn type === $selectCheckbox.attr( 'data-type' );\n\t\t},\n\n\t\tselect() {\n\t\t\tselected = true;\n\t\t\t$selectCheckbox.prop( 'checked', true );\n\t\t},\n\n\t\tunSelect() {\n\t\t\tselected = false;\n\t\t\t$selectCheckbox.prop( 'checked', false );\n\t\t},\n\n\t\tchange( what, value ) {\n\t\t\tconst el = $el.find( '.toggle-' + what );\n\t\t\twhat = 'position-footer' === what ? 'footer' : what;\n\n\t\t\t// Only action for found items.\n\t\t\tif ( 'undefined' === typeof el ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Skip disabled items.\n\t\t\tif ( true === el.prop( 'disabled' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Uppercase the type.\n\t\t\tconst type = what.charAt( 0 ).toUpperCase() + what.slice( 1 );\n\t\t\tconst tooltip = getString( value.toString() + type );\n\n\t\t\t// Change checkbox value.\n\t\t\tel.prop( 'checked', value );\n\t\t\tel.toggleClass( 'changed' );\n\n\t\t\t// Add the notice icon on the left of the row.\n\t\t\tel.closest( '.wphb-border-row' )\n\t\t\t\t.find( 'span.wphb-row-status' )\n\t\t\t\t.removeClass( 'hidden' );\n\n\t\t\t// Change the tooltip.\n\t\t\tel.next().attr( 'data-tooltip', tooltip );\n\t\t},\n\t};\n};\n\nexport default Row;\n","const RowsCollection = () => {\n\tconst items = [];\n\tlet currentFilter = '';\n\tlet currentSecondaryFilter = '';\n\tlet currentTypeFilter = '';\n\n\treturn {\n\t\tpush( row ) {\n\t\t\tif ( typeof row === 'object' ) {\n\t\t\t\titems.push( row );\n\t\t\t}\n\t\t},\n\n\t\tgetItems() {\n\t\t\treturn items;\n\t\t},\n\n\t\tgetItem( i ) {\n\t\t\tif ( items[ i ] ) {\n\t\t\t\treturn items[ i ];\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\n\t\t/**\n\t\t * Get a collection item by type and ID\n\t\t *\n\t\t * @param type\n\t\t * @param id\n\t\t */\n\t\tgetItemById( type, id ) {\n\t\t\tlet value = false;\n\t\t\tfor ( const i in items ) {\n\t\t\t\tif ( 'wphb-file-' + type + '-' + id === items[ i ].getId() ) {\n\t\t\t\t\tvalue = items[ i ];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn value;\n\t\t},\n\n\t\tgetItemsByDataType( type ) {\n\t\t\tconst selected = [];\n\n\t\t\tfor ( const i in items ) {\n\t\t\t\tif ( items[ i ].isType( type ) ) {\n\t\t\t\t\tselected.push( items[ i ] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn selected;\n\t\t},\n\n\t\tgetVisibleItems() {\n\t\t\tconst visible = [];\n\t\t\tfor ( const i in items ) {\n\t\t\t\tif ( items[ i ].isVisible() ) {\n\t\t\t\t\tvisible.push( items[ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn visible;\n\t\t},\n\n\t\tgetSelectedItems() {\n\t\t\tconst selected = [];\n\n\t\t\tfor ( const i in items ) {\n\t\t\t\tif ( items[ i ].isVisible() && items[ i ].isSelected() ) {\n\t\t\t\t\tselected.push( items[ i ] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn selected;\n\t\t},\n\n\t\taddFilter( filter, type ) {\n\t\t\tif ( type === 'type' ) {\n\t\t\t\tcurrentTypeFilter = filter;\n\t\t\t} else if ( type === 'secondary' ) {\n\t\t\t\tcurrentSecondaryFilter = filter;\n\t\t\t} else {\n\t\t\t\tcurrentFilter = filter;\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Clear selected filters.\n\t\t *\n\t\t * @since 2.7.1\n\t\t */\n\t\tclearFilters() {\n\t\t\tcurrentFilter = '';\n\t\t\tcurrentSecondaryFilter = '';\n\t\t\tcurrentTypeFilter = '';\n\t\t\tthis.applyFilters();\n\t\t},\n\n\t\tapplyFilters() {\n\t\t\tfor ( const i in items ) {\n\t\t\t\tif ( items[ i ] ) {\n\t\t\t\t\tif (\n\t\t\t\t\t\titems[ i ].matchFilter( currentFilter ) &&\n\t\t\t\t\t\titems[ i ].matchSecondaryFilter(\n\t\t\t\t\t\t\tcurrentSecondaryFilter\n\t\t\t\t\t\t) &&\n\t\t\t\t\t\titems[ i ].matchTypeFilter( currentTypeFilter )\n\t\t\t\t\t) {\n\t\t\t\t\t\titems[ i ].show();\n\t\t\t\t\t} else {\n\t\t\t\t\t\titems[ i ].hide();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t};\n};\n\nexport default RowsCollection;\n","/* global WPHB_Admin */\n/* global wphb */\n\n/**\n * Asset Optimization scripts.\n *\n * @package\n */\n\nimport Fetcher from '../utils/fetcher';\nimport { getString, getLink } from '../utils/helpers';\nimport Row from '../minification/Row';\nimport RowsCollection from '../minification/RowsCollection';\nimport MinifyScanner from '../scanners/MinifyScanner';\n\n( function( $ ) {\n\t'use strict';\n\n\tWPHB_Admin.minification = {\n\t\tmodule: 'minification',\n\t\t$checkFilesResultsContainer: null,\n\t\tcheckURLSList: null,\n\t\tcheckedURLS: 0,\n\n\t\tinit() {\n\t\t\tconst self = this;\n\n\t\t\t// Init files scanner.\n\t\t\tthis.scanner = new MinifyScanner(\n\t\t\t\twphb.minification.get.totalSteps,\n\t\t\t\twphb.minification.get.currentScanStep\n\t\t\t);\n\n\t\t\t// Check files button.\n\t\t\t$( '#check-files' ).on( 'click', function( e ) {\n\t\t\t\te.preventDefault();\n\t\t\t\t$( document ).trigger( 'check-files' );\n\t\t\t} );\n\n\t\t\t$( document ).on( 'check-files', function() {\n\t\t\t\twindow.SUI.openModal( 'check-files-modal', 'wpbody-content', 'check-files-modal' );\n\t\t\t\t$( this ).attr( 'disabled', true );\n\t\t\t\tself.scanner.start();\n\t\t\t} );\n\n\t\t\t// Track changes done to minification files.\n\t\t\t$(\n\t\t\t\t':input.toggle-checkbox, :input[id*=\"wphb-minification-include\"]'\n\t\t\t).on( 'change', function() {\n\t\t\t\tconst row = $( this ).closest( '.wphb-border-row' );\n\t\t\t\tconst rowStatus = row.find( 'span.wphb-row-status-changed' );\n\t\t\t\t$( this ).toggleClass( 'changed' );\n\t\t\t\tif ( row.find( '.changed' ).length !== 0 ) {\n\t\t\t\t\trowStatus.removeClass( 'sui-hidden' );\n\t\t\t\t} else {\n\t\t\t\t\trowStatus.addClass( 'sui-hidden' );\n\t\t\t\t}\n\t\t\t\tconst changed = $( '.wphb-minification-files' ).find(\n\t\t\t\t\t'input.changed'\n\t\t\t\t);\n\t\t\t\tif ( changed.length !== 0 ) {\n\t\t\t\t\t$( '#wphb-publish-changes' ).removeClass( 'disabled' );\n\t\t\t\t} else {\n\t\t\t\t\t$( '#wphb-publish-changes' ).addClass( 'disabled' );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// Enable/disable bulk update button.\n\t\t\t$(\n\t\t\t\t':input.wphb-minification-file-selector, :input.wphb-minification-bulk-file-selector'\n\t\t\t).on( 'change', function() {\n\t\t\t\t$( this ).toggleClass( 'changed' );\n\t\t\t\tconst changed = $( '.wphb-minification-files' ).find(\n\t\t\t\t\t'input.changed'\n\t\t\t\t);\n\n\t\t\t\t$( '.sui-actions-left > #bulk-update' ).toggleClass(\n\t\t\t\t\t'button-notice disabled',\n\t\t\t\t\t0 === changed.length\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * Open up bulk update modal. Make sure we hide elements not applicable to\n\t\t\t * the selection.\n\t\t\t */\n\t\t\t$( '#bulk-update' ).on( 'click', function( e ) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tconst css = $(\n\t\t\t\t\t'input[data-type=\"CSS\"].wphb-minification-file-selector:checked'\n\t\t\t\t);\n\t\t\t\tconst js = $(\n\t\t\t\t\t'input[data-type=\"JS\"].wphb-minification-file-selector:checked'\n\t\t\t\t);\n\n\t\t\t\t$(\n\t\t\t\t\t'#bulk-update-modal label[for=\"filter-inline\"]'\n\t\t\t\t).toggleClass( 'sui-hidden', 0 === css.length );\n\n\t\t\t\t$( '#bulk-update-modal label[for=\"filter-defer\"]' ).toggleClass(\n\t\t\t\t\t'sui-hidden',\n\t\t\t\t\t0 === js.length\n\t\t\t\t);\n\n\t\t\t\t$( '#bulk-update-modal label[for=\"filter-async\"]' ).toggleClass(\n\t\t\t\t\t'sui-hidden',\n\t\t\t\t\t0 === js.length\n\t\t\t\t);\n\n\t\t\t\twindow.SUI.openModal(\n\t\t\t\t\t'bulk-update-modal',\n\t\t\t\t\tthis,\n\t\t\t\t\t'bulk-update-cancel',\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t} );\n\n\t\t\t// Filter action button on Asset Optimization page\n\t\t\t$( '#wphb-minification-filter-button' ).on( 'click', function() {\n\t\t\t\t$( '.wphb-minification-filter' ).toggle( 'slow' );\n\t\t\t\t$( '#wphb-minification-filter-button' ).toggleClass( 'active' );\n\t\t\t} );\n\n\t\t\t// Discard changes button click\n\t\t\t$( '.wphb-discard' ).on( 'click', function( e ) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tif ( confirm( getString( 'discardAlert' ) ) ) {\n\t\t\t\t\tlocation.reload();\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t} );\n\n\t\t\t// Enable discard button on any change\n\t\t\t$( '.wphb-enqueued-files input' ).on( 'change', function() {\n\t\t\t\t$( '.wphb-discard' ).attr( 'disabled', false );\n\t\t\t} );\n\n\t\t\t// CDN checkbox update status\n\t\t\tconst checkboxes = $( 'input[type=checkbox][name=use_cdn]' );\n\t\t\tcheckboxes.on( 'change', function() {\n\t\t\t\t$( '#cdn_file_exclude' ).toggleClass( 'sui-hidden' );\n\t\t\t\tconst cdnValue = $( this ).is( ':checked' );\n\n\t\t\t\t// Handle two CDN checkboxes on Asset Optimization page\n\t\t\t\tcheckboxes.each( function() {\n\t\t\t\t\tthis.checked = cdnValue;\n\t\t\t\t} );\n\n\t\t\t\t// Update CDN status\n\t\t\t\tFetcher.minification.toggleCDN( cdnValue ).then( () => {\n\t\t\t\t\tWPHB_Admin.notices.show();\n\t\t\t\t} );\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * Improve tooltip handling.\n\t\t\t *\n\t\t\t * @since 3.0.0\n\t\t\t */\n\t\t\tconst aoButtons = $(\n\t\t\t\t'.wphb-minification-advanced-group > :input.toggle-checkbox'\n\t\t\t);\n\t\t\taoButtons.on( 'change', function() {\n\t\t\t\tconst label = $(\n\t\t\t\t\t\"label[for='\" + $( this ).attr( 'id' ) + \"']\"\n\t\t\t\t);\n\n\t\t\t\tlet str;\n\n\t\t\t\t// Minify.\n\t\t\t\tif ( $( this ).hasClass( 'toggle-minify' ) ) {\n\t\t\t\t\tstr = getString( this.checked.toString() + 'Minify' );\n\t\t\t\t\tlabel.attr( 'data-tooltip', str );\n\t\t\t\t}\n\t\t\t\t// Combine.\n\t\t\t\tif ( $( this ).hasClass( 'toggle-combine' ) ) {\n\t\t\t\t\tstr = getString( this.checked.toString() + 'Combine' );\n\t\t\t\t\tlabel.attr( 'data-tooltip', str );\n\t\t\t\t}\n\t\t\t\t// Footer.\n\t\t\t\tif ( $( this ).hasClass( 'toggle-position-footer' ) ) {\n\t\t\t\t\tstr = getString( this.checked.toString() + 'Footer' );\n\t\t\t\t\tlabel.attr( 'data-tooltip', str );\n\t\t\t\t}\n\t\t\t\t// Inline.\n\t\t\t\tif ( $( this ).hasClass( 'toggle-inline' ) ) {\n\t\t\t\t\tstr = getString( this.checked.toString() + 'Inline' );\n\t\t\t\t\tlabel.attr( 'data-tooltip', str );\n\t\t\t\t}\n\t\t\t\t// Defer.\n\t\t\t\tif ( $( this ).hasClass( 'toggle-defer' ) ) {\n\t\t\t\t\tstr = getString( this.checked.toString() + 'Defer' );\n\t\t\t\t\tlabel.attr( 'data-tooltip', str );\n\t\t\t\t}\n\t\t\t\t// Font optimization.\n\t\t\t\tif ( $( this ).hasClass( 'toggle-font-optimize' ) ) {\n\t\t\t\t\tstr = getString( this.checked.toString() + 'Font' );\n\t\t\t\t\tlabel.attr( 'data-tooltip', str );\n\t\t\t\t}\n\t\t\t\t// Preload.\n\t\t\t\tif ( $( this ).hasClass( 'toggle-preload' ) ) {\n\t\t\t\t\tstr = getString( this.checked.toString() + 'Preload' );\n\t\t\t\t\tlabel.attr( 'data-tooltip', str );\n\t\t\t\t}\n\t\t\t\t// Async.\n\t\t\t\tif ( $( this ).hasClass( 'toggle-async' ) ) {\n\t\t\t\t\tstr = getString( this.checked.toString() + 'Async' );\n\t\t\t\t\tlabel.attr( 'data-tooltip', str );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t// Exclude file buttons.\n\t\t\tconst excludeButtons = $(\n\t\t\t\t'.wphb-minification-exclude > :input.toggle-checkbox'\n\t\t\t);\n\t\t\texcludeButtons.on( 'change', function() {\n\t\t\t\tconst row = $( this ).closest( '.wphb-border-row' );\n\t\t\t\trow.toggleClass( 'disabled' );\n\t\t\t\tconst label = $(\n\t\t\t\t\t\"label[for='\" + $( this ).attr( 'id' ) + \"']\"\n\t\t\t\t);\n\t\t\t\tif ( label.hasClass( 'fileIncluded' ) ) {\n\t\t\t\t\tlabel\n\t\t\t\t\t\t.find( 'span' )\n\t\t\t\t\t\t.removeClass( 'sui-icon-eye-hide' )\n\t\t\t\t\t\t.addClass( 'sui-icon-eye' );\n\t\t\t\t\tlabel.attr( 'data-tooltip', getString( 'includeFile' ) );\n\t\t\t\t\tlabel.removeClass( 'fileIncluded' );\n\t\t\t\t} else {\n\t\t\t\t\tlabel\n\t\t\t\t\t\t.find( 'span' )\n\t\t\t\t\t\t.removeClass( 'sui-icon-eye' )\n\t\t\t\t\t\t.addClass( 'sui-icon-eye-hide' );\n\t\t\t\t\tlabel.attr( 'data-tooltip', getString( 'excludeFile' ) );\n\t\t\t\t\tlabel.addClass( 'fileIncluded' );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * Regenerate individual file.\n\t\t\t *\n\t\t\t * @since 1.9.2\n\t\t\t */\n\t\t\t$( '.wphb-compressed .wphb-filename-extension' ).on(\n\t\t\t\t'click',\n\t\t\t\tfunction() {\n\t\t\t\t\tconst row = $( this ).closest( '.wphb-border-row' );\n\n\t\t\t\t\trow.find( '.fileinfo-group' ).removeClass(\n\t\t\t\t\t\t'wphb-compressed'\n\t\t\t\t\t);\n\n\t\t\t\t\trow.find( '.wphb-row-status' )\n\t\t\t\t\t\t.removeClass( 'sui-hidden wphb-row-status-changed' )\n\t\t\t\t\t\t.addClass(\n\t\t\t\t\t\t\t'wphb-row-status-queued sui-tooltip-constrained'\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.attr( 'data-tooltip', getString( 'queuedTooltip' ) )\n\t\t\t\t\t\t.find( 'span' )\n\t\t\t\t\t\t.attr( 'class', 'sui-icon-loader sui-loading' );\n\n\t\t\t\t\tFetcher.minification.resetAsset(\n\t\t\t\t\t\trow.attr( 'data-filter' )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t$( 'input[type=checkbox][name=debug_log]' ).on(\n\t\t\t\t'change',\n\t\t\t\tfunction() {\n\t\t\t\t\tconst enabled = $( this ).is( ':checked' );\n\t\t\t\t\tFetcher.minification.toggleLog( enabled ).then( () => {\n\t\t\t\t\t\tWPHB_Admin.notices.show();\n\t\t\t\t\t\tif ( enabled ) {\n\t\t\t\t\t\t\t$( '.wphb-logging-box' ).show();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$( '.wphb-logging-box' ).hide();\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * Save critical css file\n\t\t\t */\n\t\t\t$( '#wphb-minification-tools-form' ).on( 'submit', function( e ) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tconst spinner = $( this ).find( '.spinner' );\n\t\t\t\tspinner.addClass( 'visible' );\n\n\t\t\t\tFetcher.minification\n\t\t\t\t\t.saveCriticalCss( $( this ).serialize() )\n\t\t\t\t\t.then( ( response ) => {\n\t\t\t\t\t\tspinner.removeClass( 'visible' );\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t'undefined' !== typeof response &&\n\t\t\t\t\t\t\tresponse.success\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tWPHB_Admin.notices.show( response.message );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tWPHB_Admin.notices.show(\n\t\t\t\t\t\t\t\tresponse.message,\n\t\t\t\t\t\t\t\t'error'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * Parse custom asset dir input\n\t\t\t *\n\t\t\t * @since 1.9\n\t\t\t */\n\t\t\tconst textField = document.getElementById( 'file_path' );\n\t\t\tif ( null !== textField ) {\n\t\t\t\ttextField.onchange = function( e ) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tFetcher.minification\n\t\t\t\t\t\t.updateAssetPath( $( this ).val() )\n\t\t\t\t\t\t.then( ( response ) => {\n\t\t\t\t\t\t\tif ( response.message ) {\n\t\t\t\t\t\t\t\tWPHB_Admin.notices.show(\n\t\t\t\t\t\t\t\t\tresponse.message,\n\t\t\t\t\t\t\t\t\t'error'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tWPHB_Admin.notices.show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Asset optimization network settings page.\n\t\t\t *\n\t\t\t * @since 2.0.0\n\t\t\t */\n\n\t\t\t// Show/hide settings, based on checkbox value.\n\t\t\t$( '#wphb-network-ao' ).on( 'click', function() {\n\t\t\t\t$( '#wphb-network-border-frame' ).toggleClass( 'sui-hidden' );\n\t\t\t} );\n\n\t\t\t// Handle settings select.\n\t\t\t$( '#wphb-box-minification-network-settings' ).on(\n\t\t\t\t'change',\n\t\t\t\t'input[type=radio]',\n\t\t\t\tfunction( e ) {\n\t\t\t\t\tconst divs = document.querySelectorAll(\n\t\t\t\t\t\t'input[name=' + e.target.name + ']'\n\t\t\t\t\t);\n\n\t\t\t\t\t// Toggle logs frame.\n\t\t\t\t\tif ( 'log' === e.target.name ) {\n\t\t\t\t\t\t$( '.wphb-logs-frame' ).toggle( e.target.value );\n\t\t\t\t\t}\n\n\t\t\t\t\tfor ( let i = 0; i < divs.length; ++i ) {\n\t\t\t\t\t\tdivs[ i ].parentNode.classList.remove( 'active' );\n\t\t\t\t\t}\n\n\t\t\t\t\te.target.parentNode.classList.add( 'active' );\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// Submit settings.\n\t\t\t$( '#wphb-ao-network-settings' ).on( 'click', function( e ) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tconst spinner = $( '.sui-box-footer' ).find( '.spinner' );\n\t\t\t\tspinner.addClass( 'visible' );\n\n\t\t\t\tconst form = $( '#ao-network-settings-form' ).serialize();\n\t\t\t\tFetcher.minification\n\t\t\t\t\t.saveNetworkSettings( form )\n\t\t\t\t\t.then( ( response ) => {\n\t\t\t\t\t\tspinner.removeClass( 'visible' );\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t'undefined' !== typeof response &&\n\t\t\t\t\t\t\tresponse.success\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tWPHB_Admin.notices.show();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tWPHB_Admin.notices.show(\n\t\t\t\t\t\t\t\tgetString( 'errorSettingsUpdate' ),\n\t\t\t\t\t\t\t\t'error'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t} );\n\n\t\t\t$( '#wphb-ao-settings-update' ).on( 'click', function( e ) {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tconst spinner = $( '.sui-box-footer' ).find( '.spinner' );\n\t\t\t\tspinner.addClass( 'visible' );\n\n\t\t\t\tconst data = self.getMultiSelectValues( 'cdn_exclude' );\n\n\t\t\t\tFetcher.minification\n\t\t\t\t\t.updateExcludeList( JSON.stringify( data ) )\n\t\t\t\t\t.then( () => {\n\t\t\t\t\t\tspinner.removeClass( 'visible' );\n\t\t\t\t\t\tWPHB_Admin.notices.show();\n\t\t\t\t\t} );\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * Asset optimization 2.0\n\t\t\t *\n\t\t\t * @since 2.6.0\n\t\t\t */\n\n\t\t\t/**\n\t\t\t * This is such a weird piece of code. Unfortunately, it was written during the sad time\n\t\t\t * when my coffee machine broke down. Sorry.\n\t\t\t * Increment the WTF Counter if you've checked it out and went like \"Huh???\"\n\t\t\t *\n\t\t\t * wtf_counter = 2\n\t\t\t */\n\t\t\tconst modeToggles = document.querySelectorAll(\n\t\t\t\t'[name=asset_optimization_mode]'\n\t\t\t);\n\t\t\tlet current = 'auto';\n\t\t\tfor ( let i = 0; i < modeToggles.length; i++ ) {\n\t\t\t\t// Set the current selection.\n\t\t\t\tif ( true === modeToggles[ i ].checked ) {\n\t\t\t\t\tcurrent = modeToggles[ i ].value;\n\t\t\t\t}\n\n\t\t\t\tmodeToggles[ i ].addEventListener( 'click', function() {\n\t\t\t\t\t// Ignore clicking on the selected value.\n\t\t\t\t\tif ( current === this.value ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Visually switch toggles.\n\t\t\t\t\tdocument\n\t\t\t\t\t\t.getElementById( 'wphb-ao-' + current + '-label' )\n\t\t\t\t\t\t.classList.add( 'active' );\n\t\t\t\t\tdocument\n\t\t\t\t\t\t.getElementById( 'wphb-ao-' + this.value + '-label' )\n\t\t\t\t\t\t.classList.remove( 'active' );\n\n\t\t\t\t\tif ( 'manual' === current && 'auto' === this.value ) {\n\t\t\t\t\t\tif ( true === wphb.minification.get.showSwitchModal ) {\n\t\t\t\t\t\t\twindow.SUI.openModal(\n\t\t\t\t\t\t\t\t'wphb-basic-minification-modal',\n\t\t\t\t\t\t\t\t'wphb-switch-to-basic'\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tWPHB_Admin.minification.switchView( 'basic' );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// How does it work? stuff.\n\t\t\tconst expandButtonManual = document.getElementById(\n\t\t\t\t'manual-ao-hdiw-modal-expand'\n\t\t\t);\n\t\t\tif ( expandButtonManual ) {\n\t\t\t\texpandButtonManual.onclick = function() {\n\t\t\t\t\tdocument\n\t\t\t\t\t\t.getElementById( 'manual-ao-hdiw-modal' )\n\t\t\t\t\t\t.classList.remove( 'sui-modal-sm' );\n\t\t\t\t\tdocument\n\t\t\t\t\t\t.getElementById( 'manual-ao-hdiw-modal-header-wrap' )\n\t\t\t\t\t\t.classList.remove( 'sui-box-sticky' );\n\t\t\t\t\tdocument\n\t\t\t\t\t\t.getElementById( 'automatic-ao-hdiw-modal' )\n\t\t\t\t\t\t.classList.remove( 'sui-modal-sm' );\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst collapseButtonManual = document.getElementById(\n\t\t\t\t'manual-ao-hdiw-modal-collapse'\n\t\t\t);\n\t\t\tif ( collapseButtonManual ) {\n\t\t\t\tcollapseButtonManual.onclick = function() {\n\t\t\t\t\tdocument\n\t\t\t\t\t\t.getElementById( 'manual-ao-hdiw-modal' )\n\t\t\t\t\t\t.classList.add( 'sui-modal-sm' );\n\t\t\t\t\tconst el = document.getElementById(\n\t\t\t\t\t\t'manual-ao-hdiw-modal-header-wrap'\n\t\t\t\t\t);\n\t\t\t\t\tif ( el.classList.contains( 'video-playing' ) ) {\n\t\t\t\t\t\tel.classList.add( 'sui-box-sticky' );\n\t\t\t\t\t}\n\t\t\t\t\tdocument\n\t\t\t\t\t\t.getElementById( 'automatic-ao-hdiw-modal' )\n\t\t\t\t\t\t.classList.add( 'sui-modal-sm' );\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// How does it work? stuff.\n\t\t\tconst expandButtonAuto = document.getElementById(\n\t\t\t\t'automatic-ao-hdiw-modal-expand'\n\t\t\t);\n\t\t\tif ( expandButtonAuto ) {\n\t\t\t\texpandButtonAuto.onclick = function() {\n\t\t\t\t\tdocument\n\t\t\t\t\t\t.getElementById( 'automatic-ao-hdiw-modal' )\n\t\t\t\t\t\t.classList.remove( 'sui-modal-sm' );\n\t\t\t\t\tdocument\n\t\t\t\t\t\t.getElementById( 'manual-ao-hdiw-modal' )\n\t\t\t\t\t\t.classList.remove( 'sui-modal-sm' );\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst collapseButtonAuto = document.getElementById(\n\t\t\t\t'automatic-ao-hdiw-modal-collapse'\n\t\t\t);\n\t\t\tif ( collapseButtonAuto ) {\n\t\t\t\tcollapseButtonAuto.onclick = function() {\n\t\t\t\t\tdocument\n\t\t\t\t\t\t.getElementById( 'automatic-ao-hdiw-modal' )\n\t\t\t\t\t\t.classList.add( 'sui-modal-sm' );\n\t\t\t\t\tdocument\n\t\t\t\t\t\t.getElementById( 'manual-ao-hdiw-modal' )\n\t\t\t\t\t\t.classList.add( 'sui-modal-sm' );\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst autoTrigger = document.getElementById(\n\t\t\t\t'hdw-auto-trigger-label'\n\t\t\t);\n\t\t\tif ( autoTrigger ) {\n\t\t\t\tautoTrigger.addEventListener( 'click', () => {\n\t\t\t\t\twindow.SUI.replaceModal(\n\t\t\t\t\t\t'automatic-ao-hdiw-modal-content',\n\t\t\t\t\t\t'wphb-box-minification-summary-meta-box'\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tconst manualTrigger = document.getElementById(\n\t\t\t\t'hdw-manual-trigger-label'\n\t\t\t);\n\t\t\tif ( manualTrigger ) {\n\t\t\t\tmanualTrigger.addEventListener( 'click', () => {\n\t\t\t\t\twindow.SUI.replaceModal(\n\t\t\t\t\t\t'manual-ao-hdiw-modal-content',\n\t\t\t\t\t\t'wphb-box-minification-summary-meta-box'\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Asset Optimization filters\n\t\t\t *\n\t\t\t * @type {RowsCollection|*}\n\t\t\t */\n\t\t\tthis.rowsCollection = new WPHB_Admin.minification.RowsCollection();\n\n\t\t\tconst rows = $( '.wphb-border-row' );\n\n\t\t\trows.each( function( index, row ) {\n\t\t\t\tlet _row;\n\t\t\t\tif ( $( row ).data( 'filter-secondary' ) ) {\n\t\t\t\t\t_row = new WPHB_Admin.minification.Row(\n\t\t\t\t\t\t$( row ),\n\t\t\t\t\t\t$( row ).data( 'filter' ),\n\t\t\t\t\t\t$( row ).data( 'filter-secondary' ),\n\t\t\t\t\t\t$( row ).data( 'filter-type' )\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t_row = new WPHB_Admin.minification.Row(\n\t\t\t\t\t\t$( row ),\n\t\t\t\t\t\t$( row ).data( 'filter' ),\n\t\t\t\t\t\tfalse,\n\t\t\t\t\t\t$( row ).data( 'filter-type' )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tself.rowsCollection.push( _row );\n\t\t\t} );\n\n\t\t\t// Filter search box\n\t\t\tconst filterInput = $( '#wphb-s' );\n\t\t\t// Prevent enter submitting form to rescan files.\n\t\t\tfilterInput.on( 'keydown', function( e ) {\n\t\t\t\tif ( 13 === e.keyCode ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} );\n\t\t\tfilterInput.on( 'keyup', function() {\n\t\t\t\tself.rowsCollection.addFilter( $( this ).val(), 'primary' );\n\t\t\t\tself.rowsCollection.applyFilters();\n\t\t\t} );\n\n\t\t\t// Filter dropdown\n\t\t\t$( '#wphb-secondary-filter' ).on( 'change', function() {\n\t\t\t\tself.rowsCollection.addFilter( $( this ).val(), 'secondary' );\n\t\t\t\tself.rowsCollection.applyFilters();\n\t\t\t} );\n\n\t\t\t// Files filter.\n\t\t\t$( '[name=\"asset_optimization_filter\"]' ).on(\n\t\t\t\t'change',\n\t\t\t\tfunction() {\n\t\t\t\t\tself.rowsCollection.addFilter( $( this ).val(), 'type' );\n\t\t\t\t\tself.rowsCollection.applyFilters();\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// Clear filters button.\n\t\t\tconst clFilters = document.getElementById( 'wphb-clear-filters' );\n\t\t\tif ( clFilters ) {\n\t\t\t\tclFilters.addEventListener( 'click', function( e ) {\n\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\t// There is probably an easier way to do via SUI.\n\t\t\t\t\t$( '#wphb-filter-all' ).prop( 'checked', true );\n\t\t\t\t\t$( '.wphb-minification-filter .sui-tab-item' ).removeClass(\n\t\t\t\t\t\t'active'\n\t\t\t\t\t);\n\t\t\t\t\t$( '#wphb-filter-all-label' ).addClass( 'active' );\n\n\t\t\t\t\t// Reset select.\n\t\t\t\t\t$( '#wphb-secondary-filter' )\n\t\t\t\t\t\t.val( null )\n\t\t\t\t\t\t.trigger( 'change' );\n\n\t\t\t\t\t// Reset input.\n\t\t\t\t\tfilterInput.val( '' );\n\n\t\t\t\t\tself.rowsCollection.clearFilters();\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Files selectors\n\t\t\tconst filesList = $( 'input.wphb-minification-file-selector' );\n\t\t\tfilesList.on( 'click', function() {\n\t\t\t\tconst $this = $( this );\n\t\t\t\tconst element = self.rowsCollection.getItemById(\n\t\t\t\t\t$this.data( 'type' ),\n\t\t\t\t\t$this.data( 'handle' )\n\t\t\t\t);\n\t\t\t\tif ( ! element ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( $this.is( ':checked' ) ) {\n\t\t\t\t\telement.select();\n\t\t\t\t} else {\n\t\t\t\t\telement.unSelect();\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * Handle select/deselect of all files of a certain type for\n\t\t\t * use on bulk update.\n\t\t\t *\n\t\t\t * @type {*|jQuery|HTMLElement}\n\t\t\t */\n\t\t\tconst selectAll = $( '.wphb-minification-bulk-file-selector' );\n\t\t\tselectAll.on( 'click', function() {\n\t\t\t\tconst $this = $( this );\n\t\t\t\tconst items = self.rowsCollection.getItemsByDataType(\n\t\t\t\t\t$this.attr( 'data-type' )\n\t\t\t\t);\n\t\t\t\tfor ( const i in items ) {\n\t\t\t\t\tif ( items.hasOwnProperty( i ) ) {\n\t\t\t\t\t\tif ( $this.is( ':checked' ) ) {\n\t\t\t\t\t\t\titems[ i ].select();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\titems[ i ].unSelect();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t/* Show details of minification row on mobile devices */\n\t\t\t$( 'body' ).on( 'click', '.wphb-border-row', function() {\n\t\t\t\tif ( window.innerWidth < 783 ) {\n\t\t\t\t\t$( this ).find( '.wphb-minification-row-details' ).toggle();\n\t\t\t\t\t$( this ).find( '.fileinfo-group' ).toggleClass( 'opened' );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * Catch window resize and revert styles for responsive dive\n\t\t\t * 1/4 of a second should be enough to trigger during device\n\t\t\t * rotations (from portrait to landscape mode)\n\t\t\t */\n\t\t\tconst minificationResizeRows = _.debounce( function() {\n\t\t\t\tif ( window.innerWidth >= 783 ) {\n\t\t\t\t\t$( '.wphb-minification-row-details' ).css(\n\t\t\t\t\t\t'display',\n\t\t\t\t\t\t'flex'\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t$( '.wphb-minification-row-details' ).css(\n\t\t\t\t\t\t'display',\n\t\t\t\t\t\t'none'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}, 250 );\n\n\t\t\twindow.addEventListener( 'resize', minificationResizeRows );\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Switch from advanced to basic view.\n\t\t * Called from switch view modal.\n\t\t *\n\t\t * @param {string} mode\n\t\t */\n\t\tswitchView( mode ) {\n\t\t\tlet hide = false;\n\t\t\tconst trackBox = document.getElementById(\n\t\t\t\t'hide-' + mode + '-modal'\n\t\t\t);\n\n\t\t\tif ( trackBox && true === trackBox.checked ) {\n\t\t\t\thide = true;\n\t\t\t}\n\n\t\t\tFetcher.minification.toggleView( mode, hide ).then( () => {\n\t\t\t\twindow.location.href = getLink( 'minification' );\n\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Go to the Asset Optimization files page.\n\t\t *\n\t\t * @since 1.9.2\n\t\t * @since 2.1.0 Added show_tour parameter.\n\t\t * @since 2.6.0 Remove show_tour parameter.\n\t\t */\n\t\tgoToSettings() {\n\t\t\twindow.SUI.closeModal();\n\n\t\t\tFetcher.minification\n\t\t\t\t.toggleCDN( $( 'input#enable_cdn' ).is( ':checked' ) )\n\t\t\t\t.then( () => {\n\t\t\t\t\twindow.location.href = getLink( 'minification' );\n\t\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Get all selected values from multiselect.\n\t\t *\n\t\t * @since 2.6.0\n\t\t *\n\t\t * @param {string} id Select ID.\n\t\t * @return {{styles: *[], scripts: *[]}} Styles & scripts array.\n\t\t */\n\t\tgetMultiSelectValues( id ) {\n\t\t\tconst selected = $( '#' + id ).find( ':selected' );\n\n\t\t\tconst data = { scripts: [], styles: [] };\n\n\t\t\tfor ( let i = 0; i < selected.length; ++i ) {\n\t\t\t\tdata[ selected[ i ].dataset.type ].push( selected[ i ].value );\n\t\t\t}\n\n\t\t\treturn data;\n\t\t},\n\n\t\t/**\n\t\t * Skip upgrade.\n\t\t *\n\t\t * @since 2.6.0\n\t\t */\n\t\tskipUpgrade() {\n\t\t\tFetcher.common.call( 'wphb_ao_skip_upgrade' ).then( () => {\n\t\t\t\twindow.location.href = getLink( 'minification' );\n\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Perform AO upgrade.\n\t\t *\n\t\t * @since 2.6.0\n\t\t */\n\t\tdoUpgrade() {\n\t\t\tFetcher.common.call( 'wphb_ao_do_upgrade' ).then( () => {\n\t\t\t\twindow.location.href = getLink( 'minification' );\n\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Process actions from bulk update modal.\n\t\t */\n\t\tprocessBulkUpdateSelections() {\n\t\t\tconst selectedFiles = this.rowsCollection.getSelectedItems();\n\n\t\t\tconst actions = [\n\t\t\t\t'minify',\n\t\t\t\t'combine',\n\t\t\t\t'position-footer',\n\t\t\t\t'defer',\n\t\t\t\t'inline',\n\t\t\t\t'preload',\n\t\t\t\t'async',\n\t\t\t];\n\n\t\t\tactions.forEach( ( action ) => {\n\t\t\t\tconst sel = '#bulk-update-modal input#filter-' + action;\n\t\t\t\tconst val = $( sel ).prop( 'checked' );\n\n\t\t\t\tfor ( const i in selectedFiles ) {\n\t\t\t\t\tif ( selectedFiles.hasOwnProperty( i ) ) {\n\t\t\t\t\t\tselectedFiles[ i ].change( action, val );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$( sel ).prop( 'checked', false );\n\t\t\t} );\n\n\t\t\t// Enable the Publish Changes button.\n\t\t\t$( 'input[type=submit]' ).removeClass( 'disabled' );\n\t\t},\n\n\t\t/**\n\t\t * Purge asset optimization orphaned data.\n\t\t *\n\t\t * @since 3.1.2\n\t\t */\n\t\tpurgeOrphanedData() {\n\t\t\tconst count = document.getElementById( 'count-ao-orphaned' )\n\t\t\t\t.innerHTML;\n\n\t\t\tFetcher.advanced.clearOrphanedBatch( count ).then( () => {\n\t\t\t\twindow.location.reload();\n\t\t\t} );\n\t\t},\n\t}; // End WPHB_Admin.minification\n\n\tWPHB_Admin.minification.Row = Row;\n\tWPHB_Admin.minification.RowsCollection = RowsCollection;\n} )( jQuery );\n","import Scanner from '../utils/scanner';\nimport Fetcher from '../utils/fetcher';\nimport { getLink } from '../utils/helpers';\n\nclass MinifyScanner extends Scanner {\n\t/**\n\t * Execute a scan step recursively.\n\t *\n\t * @param {number} remainingSteps\n\t */\n\tstep( remainingSteps ) {\n\t\tsuper.step( remainingSteps );\n\n\t\tif ( remainingSteps >= 0 ) {\n\t\t\tFetcher.minification.checkStep( this.currentStep ).then( () => {\n\t\t\t\tremainingSteps = remainingSteps - 1;\n\t\t\t\tthis.updateProgressBar( this.getProgress() );\n\t\t\t\tthis.step( remainingSteps );\n\t\t\t} );\n\t\t} else {\n\t\t\tFetcher.minification.finishCheck().then( ( response ) => {\n\t\t\t\tthis.onFinish( response );\n\t\t\t} );\n\t\t}\n\t}\n\n\tcancel() {\n\t\tsuper.cancel();\n\t\tFetcher.minification.cancelScan().then( () => {\n\t\t\twindow.location.href = getLink( 'minification' );\n\t\t} );\n\t}\n\n\tonStart() {\n\t\treturn Fetcher.minification.startCheck();\n\t}\n\n\tonFinish( response ) {\n\t\tsuper.onFinish();\n\n\t\tif ( 'undefined' !== typeof response.assets_msg ) {\n\t\t\tdocument.getElementById( 'assetsFound' ).innerHTML =\n\t\t\t\tresponse.assets_msg;\n\t\t}\n\n\t\twindow.SUI.closeModal();\n\t\twindow.SUI.openModal( 'wphb-assets-modal', 'wpbody-content' );\n\t}\n}\n\nexport default MinifyScanner;\n","/* global WPHB_Admin */\n/* global SUI */\n/* global ajaxurl */\n/* global wphb */\n/* global _ */\n/* global wphbMixPanel */\n\n/**\n * External dependencies\n */\nimport 'core-js/features/array/find-index';\n\n/**\n * Internal dependencies\n */\nimport HBFetcher from '../utils/fetcher';\nimport { getString } from '../utils/helpers';\n\n/**\n * Notifications module.\n *\n * @since 3.1.1\n */\n( function( $ ) {\n\t'use strict';\n\n\tWPHB_Admin.notifications = {\n\t\tmodule: 'notifications',\n\t\texclude: [],\n\t\tedit: false,\n\t\tsettings: {\n\t\t\tview: 'schedule',\n\t\t\tmodule: '',\n\t\t\ttype: '',\n\t\t\tschedule: {\n\t\t\t\tfrequency: 7,\n\t\t\t\ttime: '',\n\t\t\t\tweekDay: '',\n\t\t\t\tmonthDay: '',\n\t\t\t\tthreshold: 0,\n\t\t\t},\n\t\t\trecipients: [],\n\t\t\tperformance: {\n\t\t\t\tdevice: 'both',\n\t\t\t\tmetrics: true,\n\t\t\t\taudits: true,\n\t\t\t\tfieldData: true,\n\t\t\t},\n\t\t\tuptime: {\n\t\t\t\tshowPing: true,\n\t\t\t},\n\t\t\tdatabase: {\n\t\t\t\trevisions: true,\n\t\t\t\tdrafts: true,\n\t\t\t\ttrash: true,\n\t\t\t\tspam: true,\n\t\t\t\ttrashComment: true,\n\t\t\t\texpiredTransients: true,\n\t\t\t\ttransients: false,\n\t\t\t},\n\t\t},\n\t\tmoduleData: {},\n\n\t\t/**\n\t\t * Initialize the module.\n\t\t *\n\t\t * @since 3.1.1\n\t\t * @param {Object} settings\n\t\t * @return {WPHB_Admin.notifications} Notifications module.\n\t\t */\n\t\tinit( settings ) {\n\t\t\tthis.moduleData = settings;\n\n\t\t\t$( '.wphb-disable-notification' ).on( 'click', this.disable );\n\t\t\t$( '.wphb-enable-notification' ).on( 'click', ( e ) =>\n\t\t\t\tthis.renderTemplate( e, 'add' )\n\t\t\t);\n\n\t\t\t$( '.wphb-configure-notification' ).on( 'click', ( e ) =>\n\t\t\t\tthis.renderTemplate( e, 'edit' )\n\t\t\t);\n\n\t\t\tthis.maybeOpenModal();\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Handle opening modals from other pages via hash.\n\t\t *\n\t\t * @since 3.2.0\n\t\t */\n\t\tmaybeOpenModal() {\n\t\t\tlet hash = window.location.hash;\n\t\t\tif ( 0 === hash.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\thash = hash.substring( 1 );\n\t\t\thash = hash.split( '-' );\n\t\t\tif ( 2 !== hash.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet el = $(\n\t\t\t\t'button.wphb-configure-notification[data-id=\"' +\n\t\t\t\t\thash[ 0 ] +\n\t\t\t\t\t'\"][data-type=\"' +\n\t\t\t\t\thash[ 1 ] +\n\t\t\t\t\t'\"]'\n\t\t\t);\n\n\t\t\tif ( 0 === el.length ) {\n\t\t\t\tel = $(\n\t\t\t\t\t'.wphb-enable-notification[data-id=\"' +\n\t\t\t\t\t\thash[ 0 ] +\n\t\t\t\t\t\t'\"][data-type=\"' +\n\t\t\t\t\t\thash[ 1 ] +\n\t\t\t\t\t\t'\"]'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( 0 !== el.length ) {\n\t\t\t\tel.trigger( 'click' );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Render template.\n\t\t *\n\t\t * @since 3.1.1\n\t\t * @param {Object} e\n\t\t * @param {string} id Template ID.\n\t\t */\n\t\trenderTemplate( e, id ) {\n\t\t\te.preventDefault();\n\n\t\t\tthis.settings.module = e.currentTarget.dataset.id;\n\t\t\tthis.settings.type = e.currentTarget.dataset.type;\n\n\t\t\tconst view = e.currentTarget.dataset.view;\n\t\t\tthis.settings.view = 'schedule';\n\t\t\tif ( 'edit' === id && 'recipients' === view ) {\n\t\t\t\tthis.settings.view = view;\n\t\t\t}\n\n\t\t\t// Just in case - make sure we have the correct data.\n\t\t\tif ( this.moduleData.hasOwnProperty( this.settings.type ) ) {\n\t\t\t\tlet data = this.moduleData[ this.settings.type ];\n\n\t\t\t\tif ( data.hasOwnProperty( this.settings.module ) ) {\n\t\t\t\t\tdata = data[ this.settings.module ];\n\n\t\t\t\t\t// Add schedule.\n\t\t\t\t\tif ( data.hasOwnProperty( 'schedule' ) ) {\n\t\t\t\t\t\tthis.settings.schedule = data.schedule;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Add settings.\n\t\t\t\t\tif ( data.hasOwnProperty( 'settings' ) ) {\n\t\t\t\t\t\tthis.settings[ this.settings.module ] = data.settings;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( data.hasOwnProperty( 'recipients' ) ) {\n\t\t\t\t\t\tthis.settings.recipients = data.recipients;\n\t\t\t\t\t\t// Populate exclude IDs list based on user IDs.\n\t\t\t\t\t\tthis.exclude = data.recipients.reduce(\n\t\t\t\t\t\t\t( o, r ) => (\n\t\t\t\t\t\t\t\t0 < r.id && o.push( parseInt( r.id ) ), o\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t[]\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.loadUsers();\n\n\t\t\tconst template = WPHB_Admin.notifications.template(\n\t\t\t\tid + '-notifications-content'\n\t\t\t);\n\t\t\tconst content = template( this.settings );\n\n\t\t\tif ( content ) {\n\t\t\t\t$( '#notification-modal' ).html( content );\n\n\t\t\t\tthis.initSUI();\n\t\t\t\tthis.mapActions();\n\n\t\t\t\tif ( 'edit' === id ) {\n\t\t\t\t\tthis.edit = true;\n\t\t\t\t\tthis.addSelections();\n\t\t\t\t} else {\n\t\t\t\t\tthis.toggleUserNotice();\n\t\t\t\t}\n\n\t\t\t\tSUI.openModal( 'notification-modal', $( this ) );\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Ajax call to fetch load 10 WordPress users.\n\t\t */\n\t\tloadUsers() {\n\t\t\tconst self = this;\n\n\t\t\tHBFetcher.notifications\n\t\t\t\t.getUsers( this.exclude )\n\t\t\t\t.then( ( response ) => {\n\t\t\t\t\tif ( 'undefined' === typeof response ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tlet i = 0;\n\t\t\t\t\tresponse.forEach( function( user ) {\n\t\t\t\t\t\tself.addToUsersList( user, 0 === i++ );\n\t\t\t\t\t} );\n\n\t\t\t\t\t// Fix overflow for user selectors.\n\t\t\t\t\tthis.fixRecipientCSS( $( '#modal-wp-user-list' ) );\n\t\t\t\t} )\n\t\t\t\t.catch( ( error ) => {\n\t\t\t\t\twindow.console.log( error );\n\t\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Process schedule selections.\n\t\t *\n\t\t * @since 3.1.1\n\t\t */\n\t\tprocessScheduleSettings() {\n\t\t\tconst threshold =\n\t\t\t\t'uptime' === this.settings.module &&\n\t\t\t\t'notifications' === this.settings.type;\n\n\t\t\tif ( threshold ) {\n\t\t\t\tconst select = $( 'select#report-threshold' );\n\t\t\t\tthis.settings.schedule.threshold = select.val();\n\t\t\t} else {\n\t\t\t\tconst frequency = $( 'input[name=\"report-frequency\"]:checked' );\n\t\t\t\tthis.settings.schedule = {\n\t\t\t\t\tfrequency: frequency.val(),\n\t\t\t\t\ttime: $( 'select#report-time' ).val(),\n\t\t\t\t\tweekDay: $( 'select#report-day' ).val(),\n\t\t\t\t\tmonthDay: $( 'select#report-day-month' ).val(),\n\t\t\t\t\tthreshold: '',\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Process additional settings tab.\n\t\t *\n\t\t * @since 3.1.1\n\t\t */\n\t\tprocessAdditionalSettings() {\n\t\t\tif ( 'reports' !== this.settings.type ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( 'performance' === this.settings.module ) {\n\t\t\t\tconst device = $( 'input[name=\"report-type\"]:checked' ).val();\n\t\t\t\tconst metrics = $( 'input#metrics' ).is( ':checked' );\n\t\t\t\tconst audits = $( 'input#audits' ).is( ':checked' );\n\t\t\t\tconst fieldData = $( 'input#field-data' ).is( ':checked' );\n\n\t\t\t\tthis.settings.performance = {\n\t\t\t\t\tdevice,\n\t\t\t\t\tmetrics,\n\t\t\t\t\taudits,\n\t\t\t\t\tfieldData,\n\t\t\t\t};\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( 'uptime' === this.settings.module ) {\n\t\t\t\tconst showPing = $( 'input#show_ping' ).is( ':checked' );\n\t\t\t\tthis.settings.uptime = { showPing };\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( 'database' === this.settings.module ) {\n\t\t\t\tconst revisions = $( 'input#revisions' ).is( ':checked' );\n\t\t\t\tconst drafts = $( 'input#drafts' ).is( ':checked' );\n\t\t\t\tconst trash = $( 'input#trash' ).is( ':checked' );\n\t\t\t\tconst spam = $( 'input#spam' ).is( ':checked' );\n\t\t\t\tconst trashComment = $( 'input#trashComment' ).is( ':checked' );\n\t\t\t\tconst expiredTransients = $( 'input#expiredTransients' ).is( ':checked' );\n\t\t\t\tconst transients = $( 'input#transients' ).is( ':checked' );\n\n\t\t\t\tthis.settings.database = {\n\t\t\t\t\trevisions,\n\t\t\t\t\tdrafts,\n\t\t\t\t\ttrash,\n\t\t\t\t\tspam,\n\t\t\t\t\ttrashComment,\n\t\t\t\t\texpiredTransients,\n\t\t\t\t\ttransients,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Update settings in reports (during activate and edit).\n\t\t *\n\t\t * @since 3.1.1\n\t\t * @param {boolean} processSettings\n\t\t */\n\t\tupdate( processSettings = false ) {\n\t\t\tconst btn = event.target;\n\t\t\tbtn.classList.add( 'sui-button-onload-text' );\n\n\t\t\tthis.processScheduleSettings();\n\t\t\tif ( processSettings ) {\n\t\t\t\tthis.processAdditionalSettings();\n\t\t\t}\n\n\t\t\tHBFetcher.notifications\n\t\t\t\t.enable( this.settings, this.edit )\n\t\t\t\t.then( ( response ) => {\n\t\t\t\t\thistory.pushState( \"\", document.title, window.location.pathname + window.location.search );\n\t\t\t\t\twindow.location.search += '&status=' + response.code;\n\t\t\t\t} )\n\t\t\t\t.catch( ( error ) => {\n\t\t\t\t\twindow.console.log( error );\n\t\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Activate the reports module.\n\t\t *\n\t\t * @since 3.1.1\n\t\t * @param {boolean} processSettings\n\t\t */\n\t\tactivate( processSettings = false ) {\n\t\t\tconst moduleName = this.getModuleName();\n\t\t\tif ( '' !== moduleName ) {\n\t\t\t\twphbMixPanel.enableFeature( moduleName );\n\t\t\t}\n\n\t\t\tthis.update( processSettings );\n\t\t},\n\n\t\t/**\n\t\t * Map modal actions.\n\t\t *\n\t\t * @since 3.1.1\n\t\t */\n\t\tmapActions() {\n\t\t\tthis.initUserSelects();\n\t\t\tthis.toggleAddButton();\n\n\t\t\t$( '#add-recipient-button' ).on( 'click', () => {\n\t\t\t\tthis.handleAddButtonClick();\n\t\t\t} );\n\n\t\t\tconst frequency = $( 'input[name=\"report-frequency\"]' );\n\t\t\tfrequency.on( 'change', this.handleFrequencySelect );\n\t\t},\n\n\t\t/**\n\t\t * When editing notifications, make sure we have the proper selections for schedule data.\n\t\t *\n\t\t * @since 3.1.1\n\t\t */\n\t\taddSelections() {\n\t\t\t$( '#report-time' )\n\t\t\t\t.val( this.settings.schedule.time )\n\t\t\t\t.trigger( 'change' );\n\n\t\t\tif ( 7 === this.settings.schedule.frequency ) {\n\t\t\t\t$( '#report-day' )\n\t\t\t\t\t.val( this.settings.schedule.weekDay )\n\t\t\t\t\t.trigger( 'change' );\n\t\t\t}\n\n\t\t\tif ( 30 === this.settings.schedule.frequency ) {\n\t\t\t\t$( '#report-day-month' )\n\t\t\t\t\t.val( this.settings.schedule.monthDay )\n\t\t\t\t\t.trigger( 'change' );\n\t\t\t}\n\n\t\t\t$( '#report-threshold' )\n\t\t\t\t.val( this.settings.schedule.threshold )\n\t\t\t\t.trigger( 'change' );\n\t\t},\n\n\t\t/**\n\t\t * Due to how we load the template, we need to re-initialize the SUI related modules.\n\t\t *\n\t\t * @since 3.1.1\n\t\t */\n\t\tinitSUI() {\n\t\t\t$( '.sui-select' ).each( function() {\n\t\t\t\tconst select = $( this );\n\t\t\t\tif ( 'icon' === select.data( 'theme' ) ) {\n\t\t\t\t\tSUI.select.initIcon( select );\n\t\t\t\t} else if ( 'color' === select.data( 'theme' ) ) {\n\t\t\t\t\tSUI.select.initColor( select );\n\t\t\t\t} else if ( 'search' === select.data( 'theme' ) ) {\n\t\t\t\t\tSUI.select.initSearch( select );\n\t\t\t\t} else {\n\t\t\t\t\tSUI.select.init( select );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tSUI.modalDialog();\n\t\t\tSUI.tabs();\n\t\t\tSUI.notice();\n\n\t\t\t$( '.sui-side-tabs label.sui-tab-item input' ).each( function() {\n\t\t\t\tSUI.sideTabs( this );\n\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Process frequency change in modal.\n\t\t *\n\t\t * @since 3.1.1\n\t\t */\n\t\thandleFrequencySelect() {\n\t\t\tconst freq = $( this ).val();\n\t\t\tconst scheduleBox = $( '.schedule-box' );\n\n\t\t\tconst weekDiv = scheduleBox.find( '[data-type=\"week\"]' );\n\t\t\tconst monthDiv = scheduleBox.find( '[data-type=\"month\"]' );\n\n\t\t\tweekDiv.toggleClass( 'sui-hidden', '30' === freq || '1' === freq );\n\t\t\tmonthDiv.toggleClass( 'sui-hidden', '7' === freq || '1' === freq );\n\t\t},\n\n\t\t/**\n\t\t * Get module name string for tracking.\n\t\t * Do not translate these strings, they are used in Mixpanel tracking.\n\t\t *\n\t\t * @since 3.1.1\n\t\t * @return {string} Module name.\n\t\t */\n\t\tgetModuleName() {\n\t\t\tlet moduleName = '';\n\n\t\t\tif (\n\t\t\t\t'performance' === this.settings.module &&\n\t\t\t\t'reports' === this.settings.type\n\t\t\t) {\n\t\t\t\tmoduleName = 'Performance Reports';\n\t\t\t} else if (\n\t\t\t\t'uptime' === this.settings.module &&\n\t\t\t\t'reports' === this.settings.type\n\t\t\t) {\n\t\t\t\tmoduleName = 'Uptime Reports';\n\t\t\t} else if (\n\t\t\t\t'uptime' === this.settings.module &&\n\t\t\t\t'notifications' === this.settings.type\n\t\t\t) {\n\t\t\t\tmoduleName = 'Uptime Notifications';\n\t\t\t}\n\n\t\t\treturn moduleName;\n\t\t},\n\n\t\t/**\n\t\t * Disable notification.\n\t\t *\n\t\t * @since 3.1.1\n\t\t */\n\t\tdisable() {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst id = event.target.dataset.id;\n\t\t\tconst type = event.target.dataset.type;\n\n\t\t\tif ( 'undefined' === typeof id || 'undefined' === typeof type ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst moduleName = WPHB_Admin.notifications.getModuleName();\n\t\t\tif ( '' !== moduleName ) {\n\t\t\t\twphbMixPanel.disableFeature( moduleName );\n\t\t\t}\n\n\t\t\tHBFetcher.notifications\n\t\t\t\t.disable( id, type )\n\t\t\t\t.then( () => {\n\t\t\t\t\twindow.location.search += '&status=disabled';\n\t\t\t\t} )\n\t\t\t\t.catch( ( error ) => {\n\t\t\t\t\twindow.console.log( error );\n\t\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Toggle Add Recipient button based on input. Disable if fields not filled.\n\t\t *\n\t\t * @since 3.1.1\n\t\t */\n\t\ttoggleAddButton() {\n\t\t\tconst inputs = $(\n\t\t\t\t'#notifications-invite-users-content input[id^=\"recipient-\"]'\n\t\t\t);\n\n\t\t\tinputs.on( 'keyup', function() {\n\t\t\t\tlet empty = false;\n\t\t\t\tinputs.each( function() {\n\t\t\t\t\tif ( '' === $( this ).val() ) {\n\t\t\t\t\t\tempty = true;\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\tif ( empty ) {\n\t\t\t\t\t$( '#add-recipient-button' ).attr( 'disabled', 'disabled' );\n\t\t\t\t} else {\n\t\t\t\t\t$( '#add-recipient-button' ).attr( 'disabled', false );\n\t\t\t\t}\n\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Handle \"Add recipient\" button click on \"Add by email\" section of the modal.\n\t\t *\n\t\t * @since 3.1.1\n\t\t */\n\t\thandleAddButtonClick() {\n\t\t\tconst btn = event.target;\n\t\t\tbtn.classList.add( 'sui-button-onload-text' );\n\n\t\t\tconst name = $( 'input#recipient-name' );\n\t\t\tconst email = $( 'input#recipient-email' );\n\t\t\tconst err = $( '#error-recipient-email' );\n\n\t\t\tHBFetcher.notifications\n\t\t\t\t.getAvatar( email.val() )\n\t\t\t\t.then( ( avatar ) => {\n\t\t\t\t\terr.html( '' );\n\t\t\t\t\terr.parents().removeClass( 'sui-form-field-error' );\n\n\t\t\t\t\tconst user = {\n\t\t\t\t\t\tname: name.val(),\n\t\t\t\t\t\temail: email.val(),\n\t\t\t\t\t\trole: '',\n\t\t\t\t\t\tavatar,\n\t\t\t\t\t\tid: 0,\n\t\t\t\t\t};\n\n\t\t\t\t\tthis.confirmSubscription( user ).then( ( response ) => {\n\t\t\t\t\t\tif ( undefined !== response ) {\n\t\t\t\t\t\t\tuser.is_pending = response.pending;\n\t\t\t\t\t\t\tuser.is_subscribed = response.subscribed;\n\t\t\t\t\t\t\tuser.is_can_resend_confirmation =\n\t\t\t\t\t\t\t\tresponse.canResend;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.addUser( user, 'email' );\n\n\t\t\t\t\t\t// Reset inputs.\n\t\t\t\t\t\tname.val( '' ).trigger( 'keyup' );\n\t\t\t\t\t\temail.val( '' ).trigger( 'keyup' );\n\t\t\t\t\t\tbtn.classList.remove( 'sui-button-onload-text' );\n\t\t\t\t\t} );\n\t\t\t\t} )\n\t\t\t\t.catch( ( error ) => {\n\t\t\t\t\terr.html( error );\n\t\t\t\t\terr.parents().addClass( 'sui-form-field-error' );\n\t\t\t\t\tbtn.classList.remove( 'sui-button-onload-text' );\n\t\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Initialize the search user select.\n\t\t *\n\t\t * @since 3.1.1\n\t\t */\n\t\tinitUserSelects() {\n\t\t\tconst userSelect = $( '#search-users' );\n\t\t\tconst self = this;\n\n\t\t\tuserSelect.SUIselect2( {\n\t\t\t\tminimumInputLength: 3,\n\t\t\t\tmaximumSelectionLength: 1,\n\t\t\t\tajax: {\n\t\t\t\t\turl: ajaxurl,\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\tdataType: 'json',\n\t\t\t\t\tdelay: 250,\n\t\t\t\t\tdata( params ) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\taction: 'wphb_pro_search_users',\n\t\t\t\t\t\t\tnonce: wphb.nonces.HBFetchNonce,\n\t\t\t\t\t\t\tquery: params.term,\n\t\t\t\t\t\t\texclude: self.exclude,\n\t\t\t\t\t\t};\n\t\t\t\t\t},\n\t\t\t\t\tprocessResults( data ) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tresults: jQuery.map(\n\t\t\t\t\t\t\t\tdata.data,\n\t\t\t\t\t\t\t\tfunction( item, index ) {\n\t\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\t\ttext: item.name,\n\t\t\t\t\t\t\t\t\t\tid: index,\n\t\t\t\t\t\t\t\t\t\tuser: {\n\t\t\t\t\t\t\t\t\t\t\tname: item.name,\n\t\t\t\t\t\t\t\t\t\t\temail: item.email,\n\t\t\t\t\t\t\t\t\t\t\trole: item.role,\n\t\t\t\t\t\t\t\t\t\t\tavatar: item.avatar,\n\t\t\t\t\t\t\t\t\t\t\tid: item.id,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t};\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t} );\n\n\t\t\tuserSelect.on( 'select2:select', function( e ) {\n\t\t\t\tself.add( e.params.data.user );\n\t\t\t\tuserSelect.val( null ).trigger( 'change' );\n\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Send out a confirmation email to the user.\n\t\t *\n\t\t * @since 3.1.1\n\t\t * @param {Object} user\n\t\t */\n\t\tasync confirmSubscription( user ) {\n\t\t\tif (\n\t\t\t\t'uptime' !== this.settings.module ||\n\t\t\t\t'notifications' !== this.settings.type\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\treturn HBFetcher.notifications.sendConfirmationEmail(\n\t\t\t\tuser.name,\n\t\t\t\tuser.email\n\t\t\t);\n\t\t},\n\n\t\t/**\n\t\t * Resend invite.\n\t\t *\n\t\t * @since 3.1.1\n\t\t * @param {string} name\n\t\t * @param {string} email\n\t\t */\n\t\tresendInvite( name, email ) {\n\t\t\tconst self = $( this );\n\t\t\tself.attr( 'disabled', 'disabled' );\n\t\t\tHBFetcher.notifications\n\t\t\t\t.resendConfirmationEmail( name, email )\n\t\t\t\t.then( ( response ) => {\n\t\t\t\t\tconst notice = $( '.notifications-resend-notice' );\n\t\t\t\t\tnotice.find( 'p' ).html( response.message );\n\t\t\t\t\tnotice.removeClass( 'sui-hidden' );\n\t\t\t\t\tself.attr( 'disabled', false );\n\t\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Add a user recipient row to modal UI.\n\t\t *\n\t\t * @since 3.1.1\n\t\t * @param {Object} user User object.\n\t\t * @param {string} type Accepts: user (\"Add users\" section), email (\"Add by email\" section).\n\t\t */\n\t\taddUser( user, type = 'user' ) {\n\t\t\t// Check if recipient already exists.\n\t\t\tconst index = this.settings.recipients.findIndex(\n\t\t\t\t( r ) => user.email === r.email\n\t\t\t);\n\t\t\tif ( index > -1 ) {\n\t\t\t\tthis.toggleUserNotice( true );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst recipientList = $( '#modal-' + type + '-recipients-list' );\n\t\t\tconst tooltip = getString( 'removeRecipient' );\n\t\t\tconst role = '' === user.role ? user.email : user.role;\n\n\t\t\tlet subClass = '';\n\t\t\tif ( 'undefined' !== typeof user.is_pending ) {\n\t\t\t\tif (\n\t\t\t\t\t! user.is_pending &&\n\t\t\t\t\t'undefined' !== typeof user.is_subscribed &&\n\t\t\t\t\t! user.is_subscribed\n\t\t\t\t) {\n\t\t\t\t\tsubClass = 'unsubscribed';\n\t\t\t\t} else {\n\t\t\t\t\tsubClass = user.is_pending ? 'pending' : 'confirmed';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet img = `<img src=\"${ user.avatar }\" alt=\"${ user.email }\">`;\n\t\t\tlet confirmBtn = ``;\n\t\t\tif ( 'pending' === subClass || 'unsubscribed' === subClass ) {\n\t\t\t\tconst confirmTooltip = getString( 'awaitingConfirmation' );\n\t\t\t\tconst resendTooltip = getString( 'resendInvite' );\n\t\t\t\timg = `<span class=\"sui-tooltip\" data-tooltip=\"${ confirmTooltip }\">${ img }</span>`;\n\t\t\t\tconfirmBtn = `<button type=\"button\" class=\"resend-invite sui-button-icon sui-tooltip\" data-tooltip=\"${ resendTooltip }\"\n\t\t\t\t\tonclick=\"WPHB_Admin.notifications.resendInvite( '${ user.name }', '${ user.email }' )\">\n\t\t\t\t\t<span class=\"sui-icon-send\" aria-hidden=\"true\"></span>\n\t\t\t\t</button>`;\n\t\t\t}\n\n\t\t\tconst row = `\n\t\t\t\t<div class=\"sui-recipient\" data-id=\"${ user.id }\" data-email=\"${ user.email }\">\n\t\t\t\t\t<span class=\"sui-recipient-name\">\n\t\t\t\t\t\t<span class=\"subscriber ${ subClass }\">${ img }</span>\n\t\t\t\t\t\t<span class=\"wphb-recipient-name\">${ user.name }</span>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span class=\"sui-recipient-email\">${ role }</span>\n\t\t\t\t\t${ confirmBtn }\n\t\t\t\t\t<button type=\"button\" class=\"sui-button-icon sui-tooltip\" data-tooltip=\"${ tooltip }\"\n\t\t\t\t\t\tonclick=\"WPHB_Admin.notifications.removeUser( ${ user.id }, '${ user.email }', '${ type }' )\">\n\t\t\t\t\t\t<span class=\"sui-icon-trash\" aria-hidden=\"true\"></span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t`;\n\n\t\t\trecipientList.append( row );\n\n\t\t\t// Add to the recipients and exclude arrays.\n\t\t\tthis.settings.recipients.push( user );\n\t\t\tif ( 'user' === type ) {\n\t\t\t\tthis.exclude.push( user.id );\n\t\t\t}\n\n\t\t\tthis.toggleRecipientList( recipientList );\n\t\t},\n\n\t\t/**\n\t\t * Populate \"Users\" list.\n\t\t *\n\t\t * @since 3.1.1\n\t\t * @param {Object} user\n\t\t * @param {boolean} first\n\t\t */\n\t\taddToUsersList( user, first = false ) {\n\t\t\tconst recipientList = $( '#modal-wp-user-list' );\n\n\t\t\tconst tooltipClass = first\n\t\t\t\t? 'sui-tooltip-bottom-right'\n\t\t\t\t: 'sui-tooltip-top-right';\n\n\t\t\tconst row = `\n\t\t\t\t<div class=\"sui-recipient\" data-id=\"${ user.id }\" data-email=\"${ user.email }\">\n\t\t\t\t\t<span class=\"sui-recipient-name\">\n\t\t\t\t\t\t<span class=\"subscriber\">\n\t\t\t\t\t\t\t<img src=\"${ user.avatar }\" alt=\"${ user.email }\">\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class=\"wphb-recipient-name\">${ user.name }</span>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span class=\"sui-recipient-email\">${ user.role }</span>\n\t\t\t\t\t<button type=\"button\" class=\"sui-button-icon sui-tooltip ${ tooltipClass }\"\n\t\t\t\t\t\tdata-tooltip=\"${ getString( 'addRecipient' ) }\"\n\t\t\t\t\t\tonclick='WPHB_Admin.notifications.add( ${ JSON.stringify( user ) } )'>\n\t\t\t\t\t\t<span class=\"sui-icon-plus\" aria-hidden=\"true\"></span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t`;\n\n\t\t\trecipientList.append( row );\n\t\t\tthis.toggleRecipientList( recipientList );\n\t\t},\n\n\t\t/**\n\t\t * Remove a user recipient row from modal UI.\n\t\t *\n\t\t * @since 3.1.1\n\t\t * @param {number} id User ID to remove.\n\t\t * @param {string} email User email.\n\t\t * @param {string} type Accepts: user (\"Add users\" section), email (\"Add by email\" section).\n\t\t */\n\t\tremoveUser( id, email, type = 'user' ) {\n\t\t\tconst recipientList = $( '#modal-' + type + '-recipients-list' );\n\t\t\tconst el = '.sui-recipient[data-email=\"' + email + '\"]';\n\n\t\t\t// Remove Div.\n\t\t\tconst row = recipientList.find( el );\n\t\t\trow.remove();\n\n\t\t\t// Remove from exclude list.\n\t\t\tlet index;\n\t\t\tif ( 'user' === type ) {\n\t\t\t\tindex = this.exclude.indexOf( id );\n\t\t\t\tif ( index > -1 ) {\n\t\t\t\t\tthis.exclude.splice( index, 1 );\n\t\t\t\t}\n\t\t\t\tthis.returnToList( row );\n\t\t\t}\n\n\t\t\t// Remove from recipients array.\n\t\t\tindex = this.settings.recipients.findIndex(\n\t\t\t\t( r ) => id === parseInt( r.id ) && email === r.email\n\t\t\t);\n\t\t\tif ( index > -1 ) {\n\t\t\t\tthis.settings.recipients.splice( index, 1 );\n\t\t\t}\n\n\t\t\t// Hide title if no more elements.\n\t\t\tthis.toggleRecipientList( recipientList );\n\t\t},\n\n\t\t/**\n\t\t * Add user from the \"Users\" list.\n\t\t *\n\t\t * @since 3.1.1\n\t\t * @param {Object} user\n\t\t */\n\t\tadd( user ) {\n\t\t\tthis.confirmSubscription( user ).then( ( response ) => {\n\t\t\t\tif ( undefined !== response ) {\n\t\t\t\t\tuser.is_pending = response.pending;\n\t\t\t\t\tuser.is_subscribed = response.subscribed;\n\t\t\t\t\tuser.is_can_resend_confirmation = response.canResend;\n\t\t\t\t}\n\n\t\t\t\tthis.addUser( user );\n\n\t\t\t\tconst recipientList = $( '#modal-wp-user-list' );\n\t\t\t\tconst el = '.sui-recipient[data-email=\"' + user.email + '\"]';\n\n\t\t\t\t// Remove Div.\n\t\t\t\trecipientList.find( el ).remove();\n\n\t\t\t\tthis.fixRecipientCSS( recipientList );\n\t\t\t\tthis.toggleRecipientList( recipientList, false );\n\t\t\t} );\n\t\t},\n\n\t\t/**\n\t\t * Return user back to \"Users\" list.\n\t\t *\n\t\t * @since 3.1.1\n\t\t * @param {Object} el User row.\n\t\t */\n\t\treturnToList( el ) {\n\t\t\tconst recipientList = $( '#modal-wp-user-list' );\n\n\t\t\tconst user = {\n\t\t\t\tid: el.data( 'id' ),\n\t\t\t\tname: el.find( '.wphb-recipient-name' ).text(),\n\t\t\t\temail: el.data( 'email' ),\n\t\t\t\trole: el.find( '.sui-recipient-email' ).text(),\n\t\t\t\tavatar: el.find( 'img' ).attr( 'src' ),\n\t\t\t};\n\n\t\t\tconst onClickFunction =\n\t\t\t\t'WPHB_Admin.notifications.add(' + JSON.stringify( user ) + ')';\n\n\t\t\t// Remove the resend icon.\n\t\t\tel.find( '.resend-invite' ).remove();\n\n\t\t\tel.find( '.sui-icon-trash' )\n\t\t\t\t.removeClass( 'sui-icon-trash' )\n\t\t\t\t.addClass( 'sui-icon-plus' );\n\n\t\t\tel.find( 'button' )\n\t\t\t\t.attr( 'onclick', onClickFunction )\n\t\t\t\t.attr( 'data-tooltip', getString( 'addRecipient' ) )\n\t\t\t\t.addClass( 'sui-tooltip-top-right' );\n\n\t\t\trecipientList.append( el );\n\n\t\t\tthis.fixRecipientCSS( recipientList );\n\t\t\tthis.toggleRecipientList( recipientList, false );\n\t\t},\n\n\t\t/**\n\t\t * Fix recipient overflow.\n\t\t *\n\t\t * @since 3.2.0\n\t\t * @param {Object} list\n\t\t */\n\t\tfixRecipientCSS( list ) {\n\t\t\tconst val = list.children().length > 1 ? 'hidden' : 'unset';\n\t\t\tlist.css( 'overflow-x', val );\n\n\t\t\tlist.find( '.sui-recipient:first-of-type .sui-tooltip' )\n\t\t\t\t.removeClass( 'sui-tooltip-top-right' )\n\t\t\t\t.addClass( 'sui-tooltip-bottom-right' );\n\t\t},\n\n\t\t/**\n\t\t * Show/hide recipient list based on child items.\n\t\t *\n\t\t * @since 3.1.1\n\t\t * @param {Object} el Recipient list element.\n\t\t * @param {boolean} userNotice Show user notice when no recipients.\n\t\t */\n\t\ttoggleRecipientList( el, userNotice = true ) {\n\t\t\tconst hasItems = 0 === el.html().trim().length;\n\n\t\t\tel.parent( 'div' )\n\t\t\t\t.toggleClass( 'sui-hidden', hasItems )\n\t\t\t\t.toggleClass( 'sui-margin-top', ! hasItems );\n\n\t\t\tif ( userNotice ) {\n\t\t\t\tthis.toggleUserNotice();\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Do not allow saving settings if no users are added to a notification.\n\t\t *\n\t\t * @since 3.1.1\n\t\t * @param {boolean} recipientExists Show the recipient already exists notice.\n\t\t */\n\t\ttoggleUserNotice( recipientExists = false ) {\n\t\t\tconst notice = $( '.notifications-recipients-notice' );\n\t\t\tconst btn = $( '#notification-modal .sui-button.sui-button-blue' );\n\t\t\tconst continueButton = $( '.notification-next-buttons' );\n\n\t\t\tlet text = getString( 'noRecipients' );\n\t\t\tif ( recipientExists ) {\n\t\t\t\ttext = getString( 'recipientExists' );\n\t\t\t} else if ( this.edit ) {\n\t\t\t\ttext = getString( 'noRecipientDisable' );\n\t\t\t}\n\n\t\t\tnotice.find( 'p' ).html( text );\n\n\t\t\tif ( recipientExists ) {\n\t\t\t\tnotice.removeClass( 'sui-hidden' );\n\t\t\t\tsetTimeout( () => notice.addClass( 'sui-hidden' ), 3000 );\n\t\t\t} else if ( 0 === this.settings.recipients.length ) {\n\t\t\t\tif ( ! this.edit ) {\n\t\t\t\t\tbtn.attr( 'disabled', 'disabled' );\n\t\t\t\t\tcontinueButton.attr( 'disabled', 'disabled' );\n\t\t\t\t}\n\t\t\t\tnotice.removeClass( 'sui-hidden' );\n\t\t\t} else {\n\t\t\t\tbtn.attr( 'disabled', false );\n\t\t\t\tcontinueButton.attr( 'disabled', false );\n\t\t\t\tnotice.addClass( 'sui-hidden' );\n\t\t\t}\n\t\t},\n\t};\n\n\t/**\n\t * Template function (underscores based).\n\t *\n\t * @type {Function}\n\t */\n\tWPHB_Admin.notifications.template = _.memoize( ( id ) => {\n\t\tlet compiled;\n\t\tconst options = {\n\t\t\tevaluate: /<#([\\s\\S]+?)#>/g,\n\t\t\tinterpolate: /{{{([\\s\\S]+?)}}}/g,\n\t\t\tescape: /{{([^}]+?)}}(?!})/g,\n\t\t\tvariable: 'data',\n\t\t};\n\n\t\treturn ( data ) => {\n\t\t\t_.templateSettings = options;\n\t\t\tcompiled = compiled || _.template( $( '#' + id ).html() );\n\t\t\treturn compiled( data );\n\t\t};\n\t} );\n} )( jQuery );\n","/* global WPHB_Admin */\n/* global wphbHistoricFieldData */\n/* global google */\n\nimport Fetcher from '../utils/fetcher';\nimport PerfScanner from '../scanners/PerfScanner';\n\n( function( $ ) {\n\t'use strict';\n\tWPHB_Admin.performance = {\n\t\tmodule: 'performance',\n\t\titeration: 0,\n\t\tprogress: 0,\n\t\tpressedKeys: [],\n\t\tkey_timer: false,\n\n\t\tinit() {\n\t\t\tconst self = this;\n\n\t\t\tthis.wphbSetInterval();\n\n\t\t\tdocument.onkeyup = function( e ) {\n\t\t\t\tclearInterval( self.key_timer );\n\t\t\t\tself.wphbSetInterval();\n\t\t\t\te = e || event;\n\t\t\t\tself.pressedKeys.push( e.keyCode );\n\t\t\t\tconst count = self.pressedKeys.length;\n\t\t\t\tif ( count >= 2 ) {\n\t\t\t\t\t// Get the previous key pressed. If they are H+B, we'll display the error\n\t\t\t\t\tif (\n\t\t\t\t\t\t66 === self.pressedKeys[ count - 1 ] &&\n\t\t\t\t\t\t72 === self.pressedKeys[ count - 2 ]\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst errorDetails = document.getElementById(\n\t\t\t\t\t\t\t'wphb-error-details'\n\t\t\t\t\t\t);\n\t\t\t\t\t\terrorDetails.style.display = 'block';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Init scanner.\n\t\t\tthis.scanner = new PerfScanner( 100, 0 );\n\n\t\t\t// Run performance test from empty report meta box.\n\t\t\t$( '#run-performance-test' ).on( 'click', function( e ) {\n\t\t\t\te.preventDefault();\n\t\t\t\tself.startPerformanceScan();\n\t\t\t} );\n\n\t\t\t// If a hash is present in URL, let's open the rule extra content\n\t\t\tconst hash = window.location.hash;\n\t\t\tif ( hash ) {\n\t\t\t\tconst row = $( hash );\n\t\t\t\tif ( row.length && ! row.hasClass( 'sui-box' ) ) {\n\t\t\t\t\trow.find( '.sui-accordion-open-indicator' ).trigger(\n\t\t\t\t\t\t'click'\n\t\t\t\t\t);\n\t\t\t\t\t$( 'html, body' ).animate(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tscrollTop: row.offset().top,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t1000\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Save performance test settings\n\t\t\t$( 'body' ).on( 'submit', '.settings-frm', function( e ) {\n\t\t\t\te.preventDefault();\n\t\t\t\tconst formData = $( this ).serialize();\n\n\t\t\t\tFetcher.performance\n\t\t\t\t\t.savePerformanceTestSettings( formData )\n\t\t\t\t\t.then( () => WPHB_Admin.notices.show() );\n\t\t\t\treturn false;\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * Init Google charts on Historic Field Data meta box page.\n\t\t\t *\n\t\t\t * @since 2.0.0\n\t\t\t */\n\t\t\tif (\n\t\t\t\t'undefined' !== typeof google &&\n\t\t\t\t'undefined' !== typeof wphbHistoricFieldData\n\t\t\t) {\n\t\t\t\tgoogle.charts.load( 'current', {\n\t\t\t\t\tpackages: [ 'corechart', 'bar' ],\n\t\t\t\t} );\n\n\t\t\t\tgoogle.charts.setOnLoadCallback( () => {\n\t\t\t\t\tthis.drawChart(\n\t\t\t\t\t\twphbHistoricFieldData.fcp,\n\t\t\t\t\t\t'first_contentful_paint'\n\t\t\t\t\t);\n\t\t\t\t\t$( window ).resize( () =>\n\t\t\t\t\t\tthis.drawChart(\n\t\t\t\t\t\t\twphbHistoricFieldData.fcp,\n\t\t\t\t\t\t\t'first_contentful_paint'\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t} );\n\n\t\t\t\tgoogle.charts.setOnLoadCallback( () => {\n\t\t\t\t\tthis.drawChart(\n\t\t\t\t\t\twphbHistoricFieldData.fid,\n\t\t\t\t\t\t'first_input_delay'\n\t\t\t\t\t);\n\t\t\t\t\t$( window ).resize( () =>\n\t\t\t\t\t\tthis.drawChart(\n\t\t\t\t\t\t\twphbHistoricFieldData.fid,\n\t\t\t\t\t\t\t'first_input_delay'\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Parse subsite settings change.\n\t\t\t *\n\t\t\t * @since 2.0.0\n\t\t\t */\n\t\t\t$( 'input[name=subsite-tests]' ).on( 'change', function( e ) {\n\t\t\t\tconst otherClass =\n\t\t\t\t\t'subsite_tests-false' === e.target.id\n\t\t\t\t\t\t? 'subsite_tests-true'\n\t\t\t\t\t\t: 'subsite_tests-false';\n\t\t\t\te.target.parentNode.classList.add( 'active' );\n\t\t\t\tdocument\n\t\t\t\t\t.getElementById( otherClass )\n\t\t\t\t\t.parentNode.classList.remove( 'active' );\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * Parse report type setting change.\n\t\t\t *\n\t\t\t * @since 2.0.0\n\t\t\t */\n\t\t\t$( 'input[name=report-type]' ).on( 'change', function( e ) {\n\t\t\t\tconst divs = document.querySelectorAll(\n\t\t\t\t\t'input[name=report-type]'\n\t\t\t\t);\n\t\t\t\tfor ( let i = 0; i < divs.length; ++i ) {\n\t\t\t\t\tdivs[ i ].parentNode.classList.remove( 'active' );\n\t\t\t\t}\n\t\t\t\te.target.parentNode.classList.add( 'active' );\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * Performance doughnut chart hover states.\n\t\t\t *\n\t\t\t * @since 3.0.0\n\t\t\t */\n\t\t\t$( 'g.metric' ).on( {\n\t\t\t\tmouseenter() {\n\t\t\t\t\t$( '.wphb-gauge__wrapper' ).addClass( 'state--highlight' );\n\t\t\t\t\t$( this ).addClass( 'metric--highlight' );\n\t\t\t\t},\n\t\t\t\tmouseleave() {\n\t\t\t\t\t$( '.wphb-gauge__wrapper' ).removeClass(\n\t\t\t\t\t\t'state--highlight'\n\t\t\t\t\t);\n\t\t\t\t\t$( this ).removeClass( 'metric--highlight' );\n\t\t\t\t},\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * Filter action button on audits page\n\t\t\t *\n\t\t\t * @since 3.1.0\n\t\t\t */\n\t\t\t$( '#wphb-audits-filter-button' ).on( 'click', function( e ) {\n\t\t\t\te.preventDefault();\n\t\t\t\t$( '.wphb-audits-filter' ).toggle( 'slow' );\n\t\t\t\t$( this ).toggleClass( 'active' ).blur();\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * Process filter selection.\n\t\t\t *\n\t\t\t * @since 3.1.0\n\t\t\t */\n\t\t\t$( 'input[name=\"audits_filter\"]' ).on( 'change', function() {\n\t\t\t\tconst audits = $( '.sui-accordion-item' );\n\n\t\t\t\tfor ( const [ id, audit ] of Object.entries( audits ) ) {\n\t\t\t\t\tif ( 'object' !== typeof audit || 'prevObject' === id ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\taudit.classList.remove( 'sui-hidden' ); // Reset visibility.\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t'all' !== this.value &&\n\t\t\t\t\t\t! audit.dataset.metrics.includes( this.value )\n\t\t\t\t\t) {\n\t\t\t\t\t\taudit.classList.add( 'sui-hidden' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Start performance scan.\n\t\t */\n\t\tstartPerformanceScan() {\n\t\t\twindow.SUI.openModal(\n\t\t\t\t'run-performance-test-modal',\n\t\t\t\t'wpbody-content'\n\t\t\t);\n\n\t\t\t$( this ).attr( 'disabled', true );\n\t\t\tthis.scanner.start();\n\t\t},\n\n\t\twphbSetInterval() {\n\t\t\tconst self = this;\n\n\t\t\tthis.key_timer = window.setInterval( function() {\n\t\t\t\t// Clean pressedKeys every 1sec\n\t\t\t\tself.pressedKeys = [];\n\t\t\t}, 1000 );\n\t\t},\n\n\t\t/**\n\t\t * Draw chart on Historic Field Data meta box.\n\t\t *\n\t\t * @since 2.0.0\n\t\t *\n\t\t * @param {Object} strings\n\t\t * @param {string} chartID\n\t\t */\n\t\tdrawChart( strings, chartID ) {\n\t\t\tconst data = google.visualization.arrayToDataTable( [\n\t\t\t\t[\n\t\t\t\t\t'Type',\n\t\t\t\t\t'Fast',\n\t\t\t\t\t{ type: 'string', role: 'tooltip', p: { html: true } },\n\t\t\t\t\t'Average',\n\t\t\t\t\t{ type: 'string', role: 'tooltip', p: { html: true } },\n\t\t\t\t\t'Slow',\n\t\t\t\t\t{ type: 'string', role: 'tooltip', p: { html: true } },\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'',\n\t\t\t\t\tstrings.fast,\n\t\t\t\t\tthis.generateTooltip( 'fast', strings.fast_desc ),\n\t\t\t\t\tstrings.average,\n\t\t\t\t\tthis.generateTooltip( 'average', strings.average_desc ),\n\t\t\t\t\tstrings.slow,\n\t\t\t\t\tthis.generateTooltip( 'slow', strings.slow_desc ),\n\t\t\t\t],\n\t\t\t] );\n\n\t\t\tconst options = {\n\t\t\t\ttooltip: { isHtml: true },\n\t\t\t\tcolors: [ '#1ABC9C', '#FECF2F', '#FF6D6D' ],\n\t\t\t\tchartArea: { width: '100%' },\n\t\t\t\thAxis: {\n\t\t\t\t\tbaselineColor: '#fff',\n\t\t\t\t\tgridlines: { color: '#fff', count: 0 },\n\t\t\t\t\ttextPosition: 'none',\n\t\t\t\t},\n\t\t\t\tisStacked: 'percent',\n\t\t\t\theight: 80,\n\t\t\t\tlegend: 'none',\n\t\t\t};\n\n\t\t\tconst chart = new google.visualization.BarChart(\n\t\t\t\tdocument.getElementById( chartID )\n\t\t\t);\n\t\t\tchart.draw( data, options );\n\t\t},\n\n\t\t/**\n\t\t * Generate custom tooltip.\n\t\t *\n\t\t * @since 2.0.0\n\t\t *\n\t\t * @param {string} type Metrics type. Accepts: fast, average, slow.\n\t\t * @param {string} value Tooltip text.\n\t\t *\n\t\t * @return {string} Div element.\n\t\t */\n\t\tgenerateTooltip( type, value ) {\n\t\t\treturn (\n\t\t\t\t'<div class=\"wphb-field-data-tooltip wphb-tooltip-' +\n\t\t\t\ttype +\n\t\t\t\t'\">' +\n\t\t\t\tvalue +\n\t\t\t\t'</div>'\n\t\t\t);\n\t\t},\n\t};\n} )( jQuery );\n","import Scanner from '../utils/scanner';\nimport Fetcher from '../utils/fetcher';\nimport { getString, getLink } from '../utils/helpers';\n\nclass PerfScanner extends Scanner {\n\t/**\n\t * Execute a scan step recursively.\n\t *\n\t * @param {number} remainingSteps\n\t */\n\tstep( remainingSteps ) {\n\t\tsuper.step( remainingSteps );\n\n\t\tthis.currentStep++;\n\n\t\t// Update progress bar.\n\t\tthis.updateProgressBar( this.getProgress() );\n\n\t\tFetcher.common\n\t\t\t.call( 'wphb_performance_run_test' )\n\t\t\t.then( ( response ) => {\n\t\t\t\tif ( ! response.finished ) {\n\t\t\t\t\t// Try again 3 seconds later\n\t\t\t\t\twindow.setTimeout( () => {\n\t\t\t\t\t\tthis.step( this.totalSteps - this.currentStep );\n\t\t\t\t\t}, 3000 );\n\t\t\t\t} else {\n\t\t\t\t\tthis.onFinish( response );\n\t\t\t\t}\n\t\t\t} );\n\t}\n\n\tupdateProgressBar( progress, cancel = false ) {\n\t\t// Test has been initialized.\n\t\tif ( 0 === progress ) {\n\t\t\tthis.currentStep = 2;\n\n\t\t\tthis.timer = window.setInterval( () => {\n\t\t\t\tthis.currentStep += 1;\n\t\t\t\tthis.updateProgressBar( this.getProgress() );\n\t\t\t}, 100 );\n\t\t}\n\n\t\tconst progressStatus = document.querySelector(\n\t\t\t'.wphb-performance-scan-modal .sui-progress-state .sui-progress-state-text'\n\t\t);\n\n\t\tif ( 3 === progress ) {\n\t\t\tprogressStatus.innerHTML = getString( 'scanRunning' );\n\t\t}\n\n\t\tif ( 73 === progress ) {\n\t\t\tclearInterval( this.timer );\n\t\t\tthis.timer = false;\n\n\t\t\tthis.timer = window.setInterval( () => {\n\t\t\t\tthis.currentStep += 1;\n\t\t\t\tthis.updateProgressBar( this.getProgress() );\n\t\t\t}, 1000 );\n\n\t\t\tprogressStatus.innerHTML = getString( 'scanAnalyzing' );\n\t\t}\n\n\t\tif ( 99 === progress ) {\n\t\t\tprogressStatus.innerHTML = getString( 'scanWaiting' );\n\t\t\tclearInterval( this.timer );\n\t\t\tthis.timer = false;\n\t\t}\n\n\t\tdocument.querySelector(\n\t\t\t'.wphb-performance-scan-modal .sui-progress-block .sui-progress-text span'\n\t\t).innerHTML = progress + '%';\n\n\t\tdocument.querySelector(\n\t\t\t'.wphb-performance-scan-modal .sui-progress-block .sui-progress-bar span'\n\t\t).style.width = progress + '%';\n\n\t\tif ( 100 === progress ) {\n\t\t\tconst loader = document.querySelector(\n\t\t\t\t'.wphb-performance-scan-modal .sui-progress-block span.sui-icon-loader'\n\t\t\t);\n\t\t\tloader.classList.remove( 'sui-icon-loader', 'sui-loading' );\n\t\t\tloader.classList.add( 'sui-icon-check' );\n\n\t\t\tprogressStatus.innerHTML = getString( 'scanComplete' );\n\t\t\tclearInterval( this.timer );\n\t\t\tthis.timer = false;\n\t\t}\n\t}\n\n\tonStart() {\n\t\treturn Promise.resolve();\n\t}\n\n\tonFinish( response ) {\n\t\tsuper.onFinish();\n\n\t\twindow.wphbMixPanel.track( 'plugin_scan_finished', {\n\t\t\tscore_mobile: response.mobileScore,\n\t\t\tscore_desktop: response.desktopScore,\n\t\t} );\n\n\t\t// Give a second for the report to be saved to the db.\n\t\twindow.setTimeout( function() {\n\t\t\twindow.location = getLink( 'audits' );\n\t\t}, 2000 );\n\t}\n}\n\nexport default PerfScanner;\n","/* global WPHB_Admin */\n/* global wphbMixPanel */\n\nimport Fetcher from '../utils/fetcher';\nimport { getLink } from '../utils/helpers';\n\n( function( $ ) {\n\t'use strict';\n\n\tWPHB_Admin.settings = {\n\t\tmodule: 'settings',\n\n\t\tinit() {\n\t\t\tconst body = $( 'body' );\n\t\t\tconst wrap = body.find( '.wrap-wphb-settings' );\n\n\t\t\t// Save settings\n\t\t\t$( '.sui-box-footer' ).on( 'click', 'button.sui-button-blue', function( e ) {\n\t\t\t\te.preventDefault();\n\t\t\t\tconst form_data = body.find( '.settings-frm' ).serialize();\n\n\t\t\t\tconst contrastDiv = $( '#color_accessible' );\n\t\t\t\tif ( contrastDiv.length ) {\n\t\t\t\t\tif ( contrastDiv.is( ':checked' ) ) {\n\t\t\t\t\t\twrap.addClass( 'sui-color-accessible' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\twrap.removeClass( 'sui-color-accessible' );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Opt in to tracking.\n\t\t\t\t *\n\t\t\t\t * @since 2.5.0\n\t\t\t\t */\n\t\t\t\tconst tracking = document.getElementById( 'tracking' );\n\t\t\t\tif ( tracking && true === tracking.checked ) {\n\t\t\t\t\twphbMixPanel.optIn();\n\t\t\t\t}\n\n\t\t\t\tFetcher.settings.saveSettings( form_data ).then( () => {\n\t\t\t\t\tWPHB_Admin.notices.show();\n\t\t\t\t} );\n\n\t\t\t\treturn false;\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * Parse remove settings change.\n\t\t\t */\n\t\t\t$( 'input[name=remove_settings]' ).on( 'change', function( e ) {\n\t\t\t\tconst otherClass =\n\t\t\t\t\t'remove_settings-false' === e.target.id\n\t\t\t\t\t\t? 'remove_settings-true'\n\t\t\t\t\t\t: 'remove_settings-false';\n\t\t\t\te.target.parentNode.classList.add( 'active' );\n\t\t\t\tdocument\n\t\t\t\t\t.getElementById( otherClass )\n\t\t\t\t\t.parentNode.classList.remove( 'active' );\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * Parse remove data change.\n\t\t\t */\n\t\t\t$( 'input[name=remove_data]' ).on( 'change', function( e ) {\n\t\t\t\tconst otherClass =\n\t\t\t\t\t'remove_data-false' === e.target.id\n\t\t\t\t\t\t? 'remove_data-true'\n\t\t\t\t\t\t: 'remove_data-false';\n\t\t\t\te.target.parentNode.classList.add( 'active' );\n\t\t\t\tdocument\n\t\t\t\t\t.getElementById( otherClass )\n\t\t\t\t\t.parentNode.classList.remove( 'active' );\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * Handle import file change.\n\t\t\t *\n\t\t\t * @since 2.6.0\n\t\t\t */\n\t\t\t$( '#wphb-import-file-input' ).on( 'change', function() {\n\t\t\t\tconst elm = $( this )[ 0 ];\n\t\t\t\tif ( elm.files.length ) {\n\t\t\t\t\tconst file = elm.files[ 0 ];\n\t\t\t\t\t$( '#wphb-import-file-name' ).text( file.name );\n\t\t\t\t\t$( '#wphb-import-upload-wrap' ).addClass( 'sui-has_file' );\n\t\t\t\t\t$( '#wphb-import-btn' ).removeAttr( 'disabled' );\n\t\t\t\t} else {\n\t\t\t\t\t$( '#wphb-import-file-name' ).text( '' );\n\t\t\t\t\t$( '#wphb-import-upload-wrap' ).removeClass(\n\t\t\t\t\t\t'sui-has_file'\n\t\t\t\t\t);\n\t\t\t\t\t$( '#wphb-import-btn' ).attr( 'disabled', 'disabled' );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * Handle import file remove button.\n\t\t\t *\n\t\t\t * @since 2.6.0\n\t\t\t */\n\t\t\t$( '#wphb-import-remove-file' ).on( 'click', function() {\n\t\t\t\t$( '#wphb-import-file-input' ).val( '' ).trigger( 'change' );\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * Handle import button click.\n\t\t\t *\n\t\t\t * @since 2.6.0\n\t\t\t */\n\t\t\t$( '#wphb-begin-import-btn' ).on( 'click', function( e ) {\n\t\t\t\te.preventDefault();\n\t\t\t\t$( this )\n\t\t\t\t\t.attr( 'disabled', 'disabled' )\n\t\t\t\t\t.addClass( 'sui-button-onload-text' );\n\n\t\t\t\tconst removeFileBtn = $( '#wphb-import-remove-file' );\n\n\t\t\t\tremoveFileBtn.attr( 'disabled', 'disabled' );\n\n\t\t\t\tconst fileEl = $( '#wphb-import-file-input' )[ 0 ];\n\t\t\t\tif ( 0 === fileEl.files.length ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tconst formData = new FormData();\n\t\t\t\tformData.append(\n\t\t\t\t\t'settings_json_file',\n\t\t\t\t\tfileEl.files[ 0 ],\n\t\t\t\t\tfileEl.files[ 0 ].name\n\t\t\t\t);\n\n\t\t\t\tFetcher.settings\n\t\t\t\t\t.importSettings( formData )\n\t\t\t\t\t.then( ( response ) => {\n\t\t\t\t\t\tWPHB_Admin.notices.show( response.message );\n\t\t\t\t\t\tremoveFileBtn.trigger( 'click' );\n\t\t\t\t\t} )\n\t\t\t\t\t.catch( ( error ) => {\n\t\t\t\t\t\tWPHB_Admin.notices.show( error, 'error' );\n\t\t\t\t\t} )\n\t\t\t\t\t.finally( () => {\n\t\t\t\t\t\t$( '#wphb-begin-import-btn' )\n\t\t\t\t\t\t\t.removeAttr( 'disabled' )\n\t\t\t\t\t\t\t.removeClass( 'sui-button-onload-text' );\n\t\t\t\t\t\tremoveFileBtn.removeAttr( 'disabled' );\n\t\t\t\t\t\twindow.SUI.closeModal();\n\t\t\t\t\t} );\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * Handle export button click.\n\t\t\t *\n\t\t\t * @since 2.6.0\n\t\t\t */\n\t\t\t$( '#wphb-export-btn' ).on( 'click', function( e ) {\n\t\t\t\te.preventDefault();\n\t\t\t\tFetcher.settings.exportSettings();\n\t\t\t} );\n\n\t\t\t/**\n\t\t\t * Show/hide options for admin bar cache control.\n\t\t\t *\n\t\t\t * @since 3.0.1\n\t\t\t */\n\t\t\t$( 'input[id=\"control\"]' ).on( 'change', function() {\n\t\t\t\t$( '.cache-control-options' ).toggle();\n\t\t\t} );\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Parse confirm settings reset from the modal.\n\t\t *\n\t\t * @since 2.0.0\n\t\t */\n\t\tconfirmReset: () => {\n\t\t\tFetcher.common.call( 'wphb_reset_settings' ).then( () => {\n\t\t\t\tFetcher.common.call( 'wphb_redis_disconnect' );\n\t\t\t\twindow.location.href = getLink( 'resetSettings' );\n\t\t\t} );\n\t\t},\n\t};\n} )( jQuery );\n","/* global WPHB_Admin */\n/* global google */\n\n/**\n * Internal dependencies\n */\nimport { getLink } from '../utils/helpers';\n\n( function( $ ) {\n\tWPHB_Admin.uptime = {\n\t\tmodule: 'uptime',\n\t\t$dataRangeSelector: null,\n\t\tchartData: null,\n\t\tdowntimeChartData: null,\n\t\ttimer: null,\n\t\t$spinner: null,\n\t\tdataRange: null,\n\t\tdateFormat: 'MMM d',\n\t\tinit() {\n\t\t\tthis.$spinner = $( '.spinner' );\n\t\t\tthis.$dataRangeSelector = $( '#wphb-uptime-data-range' );\n\t\t\tthis.chartData = $( '#uptime-chart-json' ).val();\n\t\t\tthis.downtimeChartData = $( '#downtime-chart-json' ).val();\n\t\t\tthis.$disableUptime = $( '#wphb-disable-uptime' );\n\t\t\tthis.dataRange = this.getUrlParameter( 'data-range' );\n\n\t\t\tthis.$dataRangeSelector.on( 'change', function() {\n\t\t\t\twindow.location.href = $( this )\n\t\t\t\t\t.find( ':selected' )\n\t\t\t\t\t.data( 'url' );\n\t\t\t} );\n\n\t\t\tconst self = this;\n\n\t\t\tif ( 'undefined' !== typeof google ) {\n\t\t\t\tgoogle.charts.load( 'current', {\n\t\t\t\t\tpackages: [ 'corechart', 'timeline' ],\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tthis.$disableUptime.on( 'click', function( e ) {\n\t\t\t\te.preventDefault();\n\t\t\t\tself.$spinner.css( 'visibility', 'visible' );\n\t\t\t\tconst value = $( this ).is( ':checked' );\n\t\t\t\tif ( value && self.timer ) {\n\t\t\t\t\tclearTimeout( self.timer );\n\t\t\t\t\tself.$spinner.css( 'visibility', 'hidden' );\n\t\t\t\t} else {\n\t\t\t\t\t// you have 3 seconds to change your mind\n\t\t\t\t\tself.timer = setTimeout( function() {\n\t\t\t\t\t\tlocation.href = getLink( 'disableUptime' );\n\t\t\t\t\t}, 3000 );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\t/* If data range has been selected change the tab urls to retain the chosen range */\n\t\t\tif ( undefined !== this.dataRange ) {\n\t\t\t\t$( '.wrap-wphb-uptime .wphb-tab a' ).each( function() {\n\t\t\t\t\tthis.href += '&data-range=' + self.dataRange;\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tif ( 'day' === this.dataRange ) {\n\t\t\t\tthis.dateFormat = 'h:mma';\n\t\t\t}\n\n\t\t\tif ( null !== document.getElementById( 'uptime-chart' ) ) {\n\t\t\t\tgoogle.charts.setOnLoadCallback( () =>\n\t\t\t\t\tthis.drawResponseTimeChart()\n\t\t\t\t);\n\t\t\t}\n\t\t\tif ( null !== document.getElementById( 'downtime-chart' ) ) {\n\t\t\t\tgoogle.charts.setOnLoadCallback( () =>\n\t\t\t\t\tthis.drawDowntimeChart()\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t/* Re-check Uptime status */\n\t\t\t$( '#uptime-re-check-status' ).on( 'click', function( e ) {\n\t\t\t\te.preventDefault();\n\t\t\t\tlocation.reload();\n\t\t\t} );\n\t\t},\n\n\t\tdrawResponseTimeChart() {\n\t\t\tconst data = new google.visualization.DataTable();\n\t\t\tdata.addColumn( 'datetime', 'Day' );\n\t\t\tdata.addColumn( 'number', 'Response Time (ms)' );\n\t\t\tdata.addColumn( {\n\t\t\t\ttype: 'string',\n\t\t\t\trole: 'tooltip',\n\t\t\t\tp: { html: true },\n\t\t\t} );\n\t\t\tconst chartArray = JSON.parse( this.chartData );\n\t\t\tfor ( let i = 0; i < chartArray.length; i++ ) {\n\t\t\t\tchartArray[ i ][ 0 ] = new Date( chartArray[ i ][ 0 ] );\n\t\t\t\tchartArray[ i ][ 1 ] = Math.round( chartArray[ i ][ 1 ] );\n\t\t\t\tchartArray[ i ][ 2 ] = this.createUptimeTooltip(\n\t\t\t\t\tchartArray[ i ][ 0 ],\n\t\t\t\t\tchartArray[ i ][ 1 ]\n\t\t\t\t);\n\n\t\t\t\t/* brings the graph below the x axis */\n\t\t\t\tif ( Math.round( chartArray[ i ][ 1 ] ) === 0 ) {\n\t\t\t\t\tchartArray[ i ][ 1 ] = -100;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdata.addRows( chartArray );\n\n\t\t\tconst options = {\n\t\t\t\tchartArea: {\n\t\t\t\t\tleft: 80,\n\t\t\t\t\ttop: 20,\n\t\t\t\t\twidth: '90%',\n\t\t\t\t\theight: '90%',\n\t\t\t\t},\n\t\t\t\tcolors: [ '#24ADE5' ],\n\t\t\t\tcurveType: 'function',\n\t\t\t\t/*interpolateNulls: true,*/\n\t\t\t\tlegend: { position: 'none' },\n\t\t\t\tvAxis: {\n\t\t\t\t\tformat: '#### ms',\n\t\t\t\t\tgridlines: { count: 5 },\n\t\t\t\t\tminorGridlines: { count: 0 },\n\t\t\t\t\tviewWindow: { min: 0 } /* don't display negative values */,\n\t\t\t\t},\n\t\t\t\thAxis: {\n\t\t\t\t\tformat: this.dateFormat,\n\t\t\t\t\tminorGridlines: { count: 0 },\n\t\t\t\t},\n\t\t\t\ttooltip: { isHtml: true },\n\t\t\t\tseries: {\n\t\t\t\t\t0: { axis: 'Resp' },\n\t\t\t\t},\n\t\t\t\taxes: {\n\t\t\t\t\ty: {\n\t\t\t\t\t\tResp: { label: 'Response Time (ms)' },\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tconst chart = new google.visualization.AreaChart(\n\t\t\t\tdocument.getElementById( 'uptime-chart' )\n\t\t\t);\n\t\t\tchart.draw( data, options );\n\n\t\t\t$( window ).resize( function() {\n\t\t\t\tchart.draw( data, options );\n\t\t\t} );\n\t\t},\n\n\t\tdrawDowntimeChart() {\n\t\t\tconst container = document.getElementById( 'downtime-chart' );\n\t\t\tconst chart = new google.visualization.Timeline( container );\n\t\t\tconst dataTable = new google.visualization.DataTable();\n\t\t\tdataTable.addColumn( { type: 'string' } );\n\t\t\tdataTable.addColumn( { type: 'string', id: 'Status' } );\n\t\t\tdataTable.addColumn( {\n\t\t\t\ttype: 'string',\n\t\t\t\trole: 'tooltip',\n\t\t\t\tp: { html: true },\n\t\t\t} );\n\t\t\tdataTable.addColumn( { type: 'datetime', id: 'Start Period' } );\n\t\t\tdataTable.addColumn( { type: 'datetime', id: 'End Period' } );\n\t\t\tconst chartArray = JSON.parse( this.downtimeChartData );\n\t\t\tfor ( let i = 0; i < chartArray.length; i++ ) {\n\t\t\t\tchartArray[ i ][ 3 ] = new Date( chartArray[ i ][ 3 ] );\n\t\t\t\tchartArray[ i ][ 4 ] = new Date( chartArray[ i ][ 4 ] );\n\t\t\t}\n\t\t\tdataTable.addRows( chartArray );\n\t\t\tconst colors = [];\n\t\t\tconst colorMap = {\n\t\t\t\t// should contain a map of category -> color for every category\n\t\t\t\tDown: '#FF6D6D',\n\t\t\t\tUnknown: '#F8F8F8',\n\t\t\t\tUp: '#D1F1EA',\n\t\t\t};\n\t\t\tfor ( let i = 0; i < dataTable.getNumberOfRows(); i++ ) {\n\t\t\t\tcolors.push( colorMap[ dataTable.getValue( i, 1 ) ] );\n\t\t\t}\n\t\t\tconst options = {\n\t\t\t\ttimeline: {\n\t\t\t\t\tshowBarLabels: false,\n\t\t\t\t\tshowRowLabels: false,\n\t\t\t\t\tbarLabelStyle: {\n\t\t\t\t\t\tfontSize: 33,\n\t\t\t\t\t},\n\t\t\t\t\tavoidOverlappingGridLines: false,\n\t\t\t\t},\n\t\t\t\thAxis: {\n\t\t\t\t\tformat: this.dateFormat,\n\t\t\t\t},\n\t\t\t\tcolors,\n\t\t\t\theight: 170,\n\t\t\t};\n\t\t\tconst origColors = [];\n\t\t\tgoogle.visualization.events.addListener(\n\t\t\t\tchart,\n\t\t\t\t'ready',\n\t\t\t\tfunction() {\n\t\t\t\t\tconst bars = container.getElementsByTagName( 'rect' );\n\t\t\t\t\tArray.prototype.forEach.call( bars, function( bar ) {\n\t\t\t\t\t\tif ( parseFloat( bar.getAttribute( 'x' ) ) > 0 ) {\n\t\t\t\t\t\t\torigColors.push( bar.getAttribute( 'fill' ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t);\n\t\t\tgoogle.visualization.events.addListener(\n\t\t\t\tchart,\n\t\t\t\t'onmouseover',\n\t\t\t\tfunction( e ) {\n\t\t\t\t\t// set original color\n\t\t\t\t\tconst bars = container.getElementsByTagName( 'rect' );\n\t\t\t\t\tbars[ bars.length - 1 ].setAttribute(\n\t\t\t\t\t\t'fill',\n\t\t\t\t\t\torigColors[ e.row ]\n\t\t\t\t\t);\n\t\t\t\t\tconst width = bars[ bars.length - 1 ].getAttribute(\n\t\t\t\t\t\t'width'\n\t\t\t\t\t);\n\t\t\t\t\tif ( width > 3 ) {\n\t\t\t\t\t\tbars[ bars.length - 1 ].setAttribute(\n\t\t\t\t\t\t\t'width',\n\t\t\t\t\t\t\twidth - 1 + 'px'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t\tchart.draw( dataTable, options );\n\n\t\t\t$( window ).resize( function() {\n\t\t\t\tchart.draw( dataTable, options );\n\t\t\t} );\n\t\t},\n\n\t\tcreateUptimeTooltip( date, responseTime ) {\n\t\t\tconst formattedDate = this.formatTooltipDate( date );\n\t\t\treturn (\n\t\t\t\t'<span class=\"response-time-tooltip\">' +\n\t\t\t\tresponseTime +\n\t\t\t\t'ms</span>' +\n\t\t\t\t'<span class=\"uptime-date-tooltip\">' +\n\t\t\t\tformattedDate +\n\t\t\t\t'</span>'\n\t\t\t);\n\t\t},\n\n\t\tformatTooltipDate( date ) {\n\t\t\tconst monthNames = [\n\t\t\t\t'Jan',\n\t\t\t\t'Feb',\n\t\t\t\t'Mar',\n\t\t\t\t'Apr',\n\t\t\t\t'May',\n\t\t\t\t'Jun',\n\t\t\t\t'Jul',\n\t\t\t\t'Aug',\n\t\t\t\t'Sep',\n\t\t\t\t'Oct',\n\t\t\t\t'Nov',\n\t\t\t\t'Dec',\n\t\t\t];\n\n\t\t\tconst day = date.getDate();\n\t\t\tconst monthIndex = date.getMonth();\n\t\t\tconst hh = date.getHours();\n\t\t\tlet h = hh;\n\t\t\tconst minutes =\n\t\t\t\t( date.getMinutes() < 10 ? '0' : '' ) + date.getMinutes();\n\t\t\tlet dd = 'AM';\n\t\t\tif ( h >= 12 ) {\n\t\t\t\th = hh - 12;\n\t\t\t\tdd = 'PM';\n\t\t\t}\n\t\t\tif ( h === 0 ) {\n\t\t\t\th = 12;\n\t\t\t}\n\t\t\treturn (\n\t\t\t\tmonthNames[ monthIndex ] +\n\t\t\t\t' ' +\n\t\t\t\tday +\n\t\t\t\t' @ ' +\n\t\t\t\th +\n\t\t\t\t':' +\n\t\t\t\tminutes +\n\t\t\t\tdd\n\t\t\t);\n\t\t},\n\n\t\tgetUrlParameter: function getUrlParameter( sParam ) {\n\t\t\tconst sPageURL = decodeURIComponent(\n\t\t\t\t\twindow.location.search.substring( 1 )\n\t\t\t\t),\n\t\t\t\tsURLVariables = sPageURL.split( '&' );\n\t\t\tlet sParameterName, i;\n\n\t\t\tfor ( i = 0; i < sURLVariables.length; i++ ) {\n\t\t\t\tsParameterName = sURLVariables[ i ].split( '=' );\n\n\t\t\t\tif ( sParameterName[ 0 ] === sParam ) {\n\t\t\t\t\treturn sParameterName[ 1 ] === undefined\n\t\t\t\t\t\t? true\n\t\t\t\t\t\t: sParameterName[ 1 ];\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t};\n} )( jQuery );\n","/* global ajaxurl */\n/* global wphb */\n\n/**\n * External dependencies\n */\nimport assign from 'lodash/assign';\n\n/**\n * Fetcher.\n *\n * @member {string} wphb.nonces.HBFetchNonce\n * @class\n */\nfunction Fetcher() {\n\tconst fetchUrl = ajaxurl;\n\tconst fetchNonce = wphb.nonces.HBFetchNonce;\n\tconst actionPrefix = 'wphb_';\n\tconst actionPrefixPro = 'wphb_pro_';\n\n\t/**\n\t * Request ajax with a promise.\n\t * Use FormData Object as data if you need to upload file\n\t *\n\t * @param {string} action\n\t * @param {Object|FormData} data\n\t * @param {string} method\n\t * @return {Promise<any>} Request results.\n\t */\n\tfunction request( action, data = {}, method = 'GET' ) {\n\t\tconst args = {\n\t\t\turl: fetchUrl,\n\t\t\tmethod,\n\t\t\tcache: false\n\t\t};\n\n\t\tif ( data instanceof FormData ) {\n\t\t\tdata.append( 'nonce', fetchNonce );\n\t\t\tdata.append( 'action', action );\n\t\t\targs.contentType = false;\n\t\t\targs.processData = false;\n\t\t} else {\n\t\t\tdata.nonce \t= fetchNonce;\n\t\t\tdata.action = action;\n\t\t}\n\t\targs.data = data;\n\t\tconst Promise = require( 'es6-promise' ).Promise;\n\t\treturn new Promise( ( resolve, reject ) => {\n\t\t\tjQuery.ajax( args ).done( resolve ).fail( reject );\n\t\t} ).then( ( response ) => checkStatus( response ) );\n\t}\n\n\tconst methods = {\n\t\t/**\n\t\t * Caching module actions.\n\t\t */\n\t\tcaching: {\n\t\t\t/**\n\t\t\t * Unified save settings method.\n\t\t\t *\n\t\t\t * @since 1.9.0\n\t\t\t * @param {string} module\n\t\t\t * @param {string} data Serialized form data.\n\t\t\t */\n\t\t\tsaveSettings: ( module, data ) => {\n\t\t\t\treturn request(\n\t\t\t\t\tactionPrefix + module + '_save_settings',\n\t\t\t\t\t{ data },\n\t\t\t\t\t'POST'\n\t\t\t\t).then( ( response ) => {\n\t\t\t\t\treturn response;\n\t\t\t\t} );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Clear cache for selected module.\n\t\t\t *\n\t\t\t * @since 1.9.0\n\t\t\t * @param {string} module\n\t\t\t */\n\t\t\tclearCache: ( module ) => {\n\t\t\t\treturn request(\n\t\t\t\t\tactionPrefix + 'clear_module_cache',\n\t\t\t\t\t{ module },\n\t\t\t\t\t'POST'\n\t\t\t\t).then( ( response ) => {\n\t\t\t\t\treturn response;\n\t\t\t\t} );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Clear cache for post.\n\t\t\t *\n\t\t\t * @param {number} postId\n\t\t\t */\n\t\t\tclearCacheForPost: ( postId ) => {\n\t\t\t\treturn request(\n\t\t\t\t\tactionPrefix + 'gutenberg_clear_post_cache',\n\t\t\t\t\t{ postId },\n\t\t\t\t\t'POST'\n\t\t\t\t);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Save Redis settings.\n\t\t\t *\n\t\t\t * @since 2.5.0\n\t\t\t *\n\t\t\t * @param {string} host\n\t\t\t * @param {number} port\n\t\t\t * @param {string} password\n\t\t\t * @param {number} db\n\t\t\t */\n\t\t\tredisSaveSettings( host, port, password, db ) {\n\t\t\t\treturn request(\n\t\t\t\t\tactionPrefix + 'redis_save_settings',\n\t\t\t\t\t{ host, port, password, db },\n\t\t\t\t\t'POST'\n\t\t\t\t);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Toggle Redis object cache setting.\n\t\t\t *\n\t\t\t * @since 2.5.0\n\t\t\t *\n\t\t\t * @param {boolean} value\n\t\t\t */\n\t\t\tredisObjectCache( value ) {\n\t\t\t\treturn request(\n\t\t\t\t\tactionPrefix + 'redis_toggle_object_cache',\n\t\t\t\t\t{ value },\n\t\t\t\t\t'POST'\n\t\t\t\t);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Clear out page cache for a batch of subsites in a network.\n\t\t\t *\n\t\t\t * @since 2.7.0\n\t\t\t *\n\t\t\t * @param {number} sites\n\t\t\t * @param {number} offset\n\t\t\t */\n\t\t\tclearCacheBatch( sites, offset ) {\n\t\t\t\treturn request(\n\t\t\t\t\tactionPrefix + 'clear_network_cache',\n\t\t\t\t\t{ sites, offset },\n\t\t\t\t\t'POST'\n\t\t\t\t);\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * Cloudflare module actions.\n\t\t */\n\t\tcloudflare: {\n\t\t\t/**\n\t\t\t * Connect to Cloudflare.\n\t\t\t *\n\t\t\t * @since 3.0.0\n\t\t\t *\n\t\t\t * @param {string} email\n\t\t\t * @param {string} key\n\t\t\t * @param {string} token\n\t\t\t * @param {string} zone\n\t\t\t */\n\t\t\tconnect: ( email, key, token, zone ) => {\n\t\t\t\treturn request(\n\t\t\t\t\tactionPrefix + 'cloudflare_connect',\n\t\t\t\t\t{ email, key, token, zone },\n\t\t\t\t\t'POST'\n\t\t\t\t).then( ( response ) => {\n\t\t\t\t\treturn response;\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * Asset Optimization module actions.\n\t\t */\n\t\tminification: {\n\t\t\t/**\n\t\t\t * Toggle CDN settings.\n\t\t\t *\n\t\t\t * @param {string} value CDN checkbox value.\n\t\t\t */\n\t\t\ttoggleCDN: ( value ) => {\n\t\t\t\tconst action = actionPrefix + 'minification_toggle_cdn';\n\t\t\t\treturn request( action, { value }, 'POST' );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Toggle logs settings.\n\t\t\t *\n\t\t\t * @param {string} value\n\t\t\t */\n\t\t\ttoggleLog: ( value ) => {\n\t\t\t\tconst action = actionPrefix + 'minification_toggle_log';\n\t\t\t\treturn request( action, { value }, 'POST' );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Toggle minification advanced mode.\n\t\t\t *\n\t\t\t * @param {string} value\n\t\t\t * @param {boolean} hide\n\t\t\t */\n\t\t\ttoggleView: ( value, hide ) => {\n\t\t\t\tconst action = actionPrefix + 'minification_toggle_view';\n\t\t\t\treturn request( action, { value, hide }, 'POST' );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Start minification check.\n\t\t\t */\n\t\t\tstartCheck: () => {\n\t\t\t\tconst action = actionPrefix + 'minification_start_check';\n\t\t\t\treturn request( action, {}, 'POST' );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Do a step in minification process.\n\t\t\t *\n\t\t\t * @param {number} step\n\t\t\t */\n\t\t\tcheckStep: ( step ) => {\n\t\t\t\tconst action = actionPrefix + 'minification_check_step';\n\t\t\t\treturn request( action, { step }, 'POST' ).then(\n\t\t\t\t\t( response ) => {\n\t\t\t\t\t\treturn response;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Finish minification process.\n\t\t\t */\n\t\t\tfinishCheck: () => {\n\t\t\t\tconst action = actionPrefix + 'minification_finish_scan';\n\t\t\t\treturn request( action, {}, 'POST' ).then( ( response ) => {\n\t\t\t\t\treturn response;\n\t\t\t\t} );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Cancel minification scan.\n\t\t\t */\n\t\t\tcancelScan: function cancelScan() {\n\t\t\t\tconst action = actionPrefix + 'minification_cancel_scan';\n\t\t\t\treturn request( action, {}, 'POST' );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Process critical css form.\n\t\t\t *\n\t\t\t * @since 1.8\n\t\t\t * @param {string} form\n\t\t\t */\n\t\t\tsaveCriticalCss: ( form ) => {\n\t\t\t\tconst action = actionPrefix + 'minification_save_critical_css';\n\t\t\t\treturn request( action, { form }, 'POST' ).then(\n\t\t\t\t\t( response ) => {\n\t\t\t\t\t\treturn response;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Update custom asset path\n\t\t\t *\n\t\t\t * @since 1.9\n\t\t\t * @param {string} value\n\t\t\t */\n\t\t\tupdateAssetPath: ( value ) => {\n\t\t\t\tconst action = actionPrefix + 'minification_update_asset_path';\n\t\t\t\treturn request( action, { value }, 'POST' );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Reset individual file.\n\t\t\t *\n\t\t\t * @since 1.9.2\n\t\t\t * @param {string} value\n\t\t\t */\n\t\t\tresetAsset: ( value ) => {\n\t\t\t\tconst action = actionPrefix + 'minification_reset_asset';\n\t\t\t\treturn request( action, { value }, 'POST' );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Save settings in network admin.\n\t\t\t *\n\t\t\t * @since 2.0.0\n\t\t\t * @param {string} settings\n\t\t\t */\n\t\t\tsaveNetworkSettings: ( settings ) => {\n\t\t\t\tconst action =\n\t\t\t\t\tactionPrefix + 'minification_update_network_settings';\n\t\t\t\treturn request( action, { settings }, 'POST' );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Update the CDN exclude list.\n\t\t\t *\n\t\t\t * @since 2.4.0\n\t\t\t * @param {Object} data\n\t\t\t */\n\t\t\tupdateExcludeList: ( data ) => {\n\t\t\t\tconst action = actionPrefix + 'minification_save_exclude_list';\n\t\t\t\treturn request( action, { data }, 'POST' );\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * Performance module actions.\n\t\t */\n\t\tperformance: {\n\t\t\t/**\n\t\t\t * Save performance test settings.\n\t\t\t *\n\t\t\t * @param {string} data From data.\n\t\t\t */\n\t\t\tsavePerformanceTestSettings: ( data ) => {\n\t\t\t\tconst action = actionPrefix + 'performance_save_settings';\n\t\t\t\treturn request( action, { data }, 'POST' );\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * Advanced tools module actions.\n\t\t */\n\t\tadvanced: {\n\t\t\t/**\n\t\t\t * Save settings from advanced tools general and db cleanup sections.\n\t\t\t *\n\t\t\t * @param {string} data Type.\n\t\t\t * @param {string} form Serialized form.\n\t\t\t */\n\t\t\tsaveSettings: ( data, form ) => {\n\t\t\t\tconst action = actionPrefix + 'advanced_save_settings';\n\t\t\t\treturn request( action, { data, form }, 'POST' ).then(\n\t\t\t\t\t( response ) => {\n\t\t\t\t\t\treturn response;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Delete selected data from database.\n\t\t\t *\n\t\t\t * @param {string} data\n\t\t\t */\n\t\t\tdeleteSelectedData: ( data ) => {\n\t\t\t\tconst action = actionPrefix + 'advanced_db_delete_data';\n\t\t\t\treturn request( action, { data }, 'POST' ).then(\n\t\t\t\t\t( response ) => {\n\t\t\t\t\t\treturn response;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Clear out a batch of orphaned asset optimization data.\n\t\t\t *\n\t\t\t * @since 2.7.0\n\t\t\t *\n\t\t\t * @param {number} rows\n\t\t\t */\n\t\t\tclearOrphanedBatch( rows ) {\n\t\t\t\treturn request(\n\t\t\t\t\tactionPrefix + 'advanced_purge_orphaned',\n\t\t\t\t\t{ rows },\n\t\t\t\t\t'POST'\n\t\t\t\t);\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * Settings actions.\n\t\t */\n\t\tsettings: {\n\t\t\t/**\n\t\t\t * Save settings from HB admin settings.\n\t\t\t *\n\t\t\t * @param {string} form_data\n\t\t\t */\n\t\t\tsaveSettings: ( form_data ) => {\n\t\t\t\tconst action = actionPrefix + 'admin_settings_save_settings';\n\t\t\t\treturn request( action, { form_data }, 'POST' ).then(\n\t\t\t\t\t( response ) => {\n\t\t\t\t\t\treturn response;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Upload settings import file from HB admin settings.\n\t\t\t *\n\t\t\t * @param {Object} form_data\n\t\t\t */\n\t\t\timportSettings: ( form_data ) => {\n\t\t\t\tconst action = actionPrefix + 'admin_settings_import_settings';\n\t\t\t\treturn request( action, form_data, 'POST' ).then(\n\t\t\t\t\t( response ) => {\n\t\t\t\t\t\treturn response;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Export settings from HB admin settings.\n\t\t\t */\n\t\t\texportSettings: () => {\n\t\t\t\tconst action = actionPrefix + 'admin_settings_export_settings';\n\t\t\t\twindow.location =\n\t\t\t\t\tfetchUrl + '?action=' + action + '&nonce=' + fetchNonce;\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * Common actions that are used by several modules.\n\t\t *\n\t\t * @since 1.9.3\n\t\t */\n\t\tcommon: {\n\t\t\t/**\n\t\t\t * Dismiss notice.\n\t\t\t *\n\t\t\t * @param {string} id\n\t\t\t */\n\t\t\tdismissNotice: ( id ) => {\n\t\t\t\treturn request(\n\t\t\t\t\tactionPrefix + 'notice_dismiss',\n\t\t\t\t\t{ id },\n\t\t\t\t\t'POST'\n\t\t\t\t);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Clear logs.\n\t\t\t *\n\t\t\t * @since 1.9.2\n\t\t\t *\n\t\t\t * @param {string} module Module slug.\n\t\t\t */\n\t\t\tclearLogs: ( module ) => {\n\t\t\t\tconst action = actionPrefix + 'logger_clear';\n\t\t\t\treturn request( action, { module }, 'POST' ).then(\n\t\t\t\t\t( response ) => {\n\t\t\t\t\t\treturn response;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Do a POST request to an AJAX endpoint.\n\t\t\t *\n\t\t\t * @since 2.5.0\n\t\t\t * @param {string} endpoint AJAX endpoint.\n\t\t\t */\n\t\t\tcall: ( endpoint ) => {\n\t\t\t\treturn request( endpoint, {}, 'POST' ).then( ( response ) => {\n\t\t\t\t\treturn response;\n\t\t\t\t} );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Clear selected module cache.\n\t\t\t *\n\t\t\t * @since 2.7.1\n\t\t\t *\n\t\t\t * @param {Array} modules List of modules to clear cache for.\n\t\t\t */\n\t\t\tclearCaches: ( modules ) => {\n\t\t\t\tconst action = actionPrefix + 'clear_caches';\n\t\t\t\treturn request( action, { modules }, 'POST' ).then(\n\t\t\t\t\t( response ) => {\n\t\t\t\t\t\treturn response;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * Notifications module actions.\n\t\t *\n\t\t * @since 3.1.1\n\t\t */\n\t\tnotifications: {\n\t\t\t/**\n\t\t\t * Resend email confirmation.\n\t\t\t *\n\t\t\t * @since 2.3.0\n\t\t\t * @since 3.1.1 Moved from uptime module.\n\t\t\t *\n\t\t\t * @param {string} name JSON encoded recipient name string.\n\t\t\t * @param {string} email JSON encoded recipient email string.\n\t\t\t */\n\t\t\tresendConfirmationEmail: ( name, email ) => {\n\t\t\t\tconst action = actionPrefixPro + 'resend_confirmation';\n\t\t\t\treturn request( action, { name, email }, 'POST' ).then(\n\t\t\t\t\t( response ) => {\n\t\t\t\t\t\treturn response;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Send email confirmation.\n\t\t\t *\n\t\t\t * @since 3.1.1\n\t\t\t *\n\t\t\t * @param {string} name JSON encoded recipient name string.\n\t\t\t * @param {string} email JSON encoded recipient email string.\n\t\t\t */\n\t\t\tsendConfirmationEmail: ( name, email ) => {\n\t\t\t\tconst action = actionPrefixPro + 'send_confirmation';\n\t\t\t\treturn request( action, { name, email }, 'POST' ).then(\n\t\t\t\t\t( response ) => {\n\t\t\t\t\t\treturn response;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Disable notification.\n\t\t\t *\n\t\t\t * @since 3.1.1\n\t\t\t * @param {string} id\n\t\t\t * @param {string} type\n\t\t\t */\n\t\t\tdisable: ( id, type ) => {\n\t\t\t\tconst action = actionPrefixPro + 'disable_notification';\n\t\t\t\treturn request( action, { id, type }, 'POST' );\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Activate/enable notification and save settings.\n\t\t\t *\n\t\t\t * @since 3.1.1\n\t\t\t * @param {Object} settings Settings object.\n\t\t\t * @param {boolean} update Is this an update of current settings?\n\t\t\t *\n\t\t\t */\n\t\t\tenable: ( settings, update = false ) => {\n\t\t\t\tconst action = actionPrefixPro + 'enable_notification';\n\t\t\t\treturn request( action, { settings, update }, 'POST' ).then(\n\t\t\t\t\t( response ) => {\n\t\t\t\t\t\treturn response;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Get user avatar based on email.\n\t\t\t *\n\t\t\t * @since 3.1.1\n\t\t\t * @param {string} email\n\t\t\t */\n\t\t\tgetAvatar: ( email ) => {\n\t\t\t\tconst action = actionPrefixPro + 'get_avatar';\n\t\t\t\treturn request( action, { email }, 'POST' ).then(\n\t\t\t\t\t( response ) => {\n\t\t\t\t\t\treturn response;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\n\t\t\t/**\n\t\t\t * Get users.\n\t\t\t *\n\t\t\t * @since 3.1.1\n\t\t\t * @param {Array} exclude\n\t\t\t */\n\t\t\tgetUsers: ( exclude ) => {\n\t\t\t\tconst action = actionPrefixPro + 'search_users';\n\t\t\t\treturn request( action, { exclude }, 'POST' ).then(\n\t\t\t\t\t( response ) => {\n\t\t\t\t\t\treturn response;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\t\t},\n\t};\n\n\tassign( this, methods );\n}\n\nconst HBFetcher = new Fetcher();\nexport default HBFetcher;\n\n/**\n * Check status.\n *\n * @param {Object|string} response\n * @return {*} Response\n */\nfunction checkStatus( response ) {\n\tif ( typeof response !== 'object' ) {\n\t\tresponse = JSON.parse( response );\n\t}\n\tif ( response.success ) {\n\t\treturn response.data;\n\t}\n\n\tconst data = response.data || {};\n\tconst error = new Error(\n\t\tdata.message || 'Error trying to fetch response from server'\n\t);\n\terror.response = response;\n\tthrow error;\n}\n","/* global wphb */\n\n/**\n * Strings internationalization\n *\n * @param {string} str\n * @return {*|string} String\n */\nexport const getString = ( str ) => {\n\treturn wphb.strings[ str ] || '';\n};\n\n/**\n * Get a link to a HB screen\n *\n * @param {string} screen Screen slug\n * @return {string} URL\n */\nexport const getLink = ( screen ) => {\n\treturn wphb.links[ screen ] || '';\n};\n","/**\n * Scanner class.\n *\n * @since 2.7.0\n */\nclass Scanner {\n\tconstructor( totalSteps, currentStep ) {\n\t\tthis.totalSteps = parseInt( totalSteps );\n\t\tthis.currentStep = parseInt( currentStep );\n\t\tthis.cancelling = false;\n\t}\n\n\t/**\n\t * Start the scan.\n\t */\n\tstart() {\n\t\tthis.updateProgressBar( this.getProgress() );\n\n\t\tconst remainingSteps = this.totalSteps - this.currentStep;\n\n\t\tif ( this.currentStep !== 0 ) {\n\t\t\t// Scan already started.\n\t\t\tthis.step( remainingSteps );\n\t\t} else {\n\t\t\tthis.onStart().then( () => {\n\t\t\t\tthis.step( remainingSteps );\n\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * Cancel scan.\n\t */\n\tcancel() {\n\t\tthis.cancelling = true;\n\t\tthis.updateProgressBar( 0, true );\n\t}\n\n\t/**\n\t * Get scan progress.\n\t *\n\t * @return {number} Progress 0-99.\n\t */\n\tgetProgress() {\n\t\tif ( this.cancelling ) {\n\t\t\treturn 0;\n\t\t}\n\t\tconst remainingSteps = this.totalSteps - this.currentStep;\n\t\treturn Math.min(\n\t\t\tMath.round(\n\t\t\t\t( parseInt( this.totalSteps - remainingSteps ) * 100 ) /\n\t\t\t\t\tthis.totalSteps\n\t\t\t),\n\t\t\t99\n\t\t);\n\t}\n\n\t/**\n\t * Update progress bar.\n\t *\n\t * @param {number} progress Progress percentage.\n\t * @param {boolean} cancel Cancel the scan.\n\t */\n\tupdateProgressBar( progress, cancel = false ) {\n\t\tif ( progress > 100 ) {\n\t\t\tprogress = 100;\n\t\t}\n\n\t\t// Update progress bar.\n\t\tdocument.querySelector(\n\t\t\t'.sui-progress-block .sui-progress-text span'\n\t\t).innerHTML = progress + '%';\n\n\t\tdocument.querySelector(\n\t\t\t'.sui-progress-block .sui-progress-bar span'\n\t\t).style.width = progress + '%';\n\n\t\tif ( progress >= 90 ) {\n\t\t\tdocument.querySelector(\n\t\t\t\t'.sui-progress-state .sui-progress-state-text'\n\t\t\t).innerHTML = 'Finalizing...';\n\t\t}\n\n\t\tif ( cancel ) {\n\t\t\tdocument.querySelector(\n\t\t\t\t'.sui-progress-state .sui-progress-state-text'\n\t\t\t).innerHTML = 'Cancelling...';\n\t\t}\n\t}\n\n\t/**\n\t * Execute a scan step.\n\t *\n\t * @param {number} remainingSteps\n\t */\n\tstep( remainingSteps ) {\n\t\tif ( remainingSteps >= 0 ) {\n\t\t\tthis.currentStep = this.totalSteps - remainingSteps;\n\t\t}\n\t}\n\n\t/**\n\t * On start function.\n\t */\n\tonStart() {\n\t\tthrow new Error( 'onStart() must be implemented in child class' );\n\t}\n\n\t/**\n\t * On finish function.\n\t */\n\tonFinish() {\n\t\tthis.updateProgressBar( 100 );\n\t}\n}\n\nexport default Scanner;\n","var parent = require('../../stable/array/find-index');\n\nmodule.exports = parent;\n","require('../../modules/es.array.find-index');\nvar entryUnbind = require('../../internals/entry-unbind');\n\nmodule.exports = entryUnbind('Array', 'findIndex');\n","module.exports = require('../../full/array/find-index');\n","var parent = require('../../actual/array/find-index');\n\nmodule.exports = parent;\n","var isCallable = require('../internals/is-callable');\nvar tryToString = require('../internals/try-to-string');\n\nvar $TypeError = TypeError;\n\n// `Assert: IsCallable(argument) is true`\nmodule.exports = function (argument) {\n if (isCallable(argument)) return argument;\n throw $TypeError(tryToString(argument) + ' is not a function');\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar create = require('../internals/object-create');\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n defineProperty(ArrayPrototype, UNSCOPABLES, {\n configurable: true,\n value: create(null)\n });\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};\n","var isObject = require('../internals/is-object');\n\nvar $String = String;\nvar $TypeError = TypeError;\n\n// `Assert: Type(argument) is Object`\nmodule.exports = function (argument) {\n if (isObject(argument)) return argument;\n throw $TypeError($String(argument) + ' is not an object');\n};\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = lengthOfArrayLike(O);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare -- NaN check\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare -- NaN check\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.es/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.es/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","var bind = require('../internals/function-bind-context');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar IndexedObject = require('../internals/indexed-object');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\nvar push = uncurryThis([].push);\n\n// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation\nvar createMethod = function (TYPE) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var IS_FILTER_REJECT = TYPE == 7;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n return function ($this, callbackfn, that, specificCreate) {\n var O = toObject($this);\n var self = IndexedObject(O);\n var boundFunction = bind(callbackfn, that);\n var length = lengthOfArrayLike(self);\n var index = 0;\n var create = specificCreate || arraySpeciesCreate;\n var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;\n var value, result;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n value = self[index];\n result = boundFunction(value, index, O);\n if (TYPE) {\n if (IS_MAP) target[index] = result; // map\n else if (result) switch (TYPE) {\n case 3: return true; // some\n case 5: return value; // find\n case 6: return index; // findIndex\n case 2: push(target, value); // filter\n } else switch (TYPE) {\n case 4: return false; // every\n case 7: push(target, value); // filterReject\n }\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.forEach` method\n // https://tc39.es/ecma262/#sec-array.prototype.foreach\n forEach: createMethod(0),\n // `Array.prototype.map` method\n // https://tc39.es/ecma262/#sec-array.prototype.map\n map: createMethod(1),\n // `Array.prototype.filter` method\n // https://tc39.es/ecma262/#sec-array.prototype.filter\n filter: createMethod(2),\n // `Array.prototype.some` method\n // https://tc39.es/ecma262/#sec-array.prototype.some\n some: createMethod(3),\n // `Array.prototype.every` method\n // https://tc39.es/ecma262/#sec-array.prototype.every\n every: createMethod(4),\n // `Array.prototype.find` method\n // https://tc39.es/ecma262/#sec-array.prototype.find\n find: createMethod(5),\n // `Array.prototype.findIndex` method\n // https://tc39.es/ecma262/#sec-array.prototype.findIndex\n findIndex: createMethod(6),\n // `Array.prototype.filterReject` method\n // https://github.com/tc39/proposal-array-filtering\n filterReject: createMethod(7)\n};\n","var isArray = require('../internals/is-array');\nvar isConstructor = require('../internals/is-constructor');\nvar isObject = require('../internals/is-object');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\nvar $Array = Array;\n\n// a part of `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray) {\n var C;\n if (isArray(originalArray)) {\n C = originalArray.constructor;\n // cross-realm fallback\n if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;\n else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return C === undefined ? $Array : C;\n};\n","var arraySpeciesConstructor = require('../internals/array-species-constructor');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);\n};\n","var uncurryThis = require('../internals/function-uncurry-this');\n\nvar toString = uncurryThis({}.toString);\nvar stringSlice = uncurryThis(''.slice);\n\nmodule.exports = function (it) {\n return stringSlice(toString(it), 8, -1);\n};\n","var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar isCallable = require('../internals/is-callable');\nvar classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar $Object = Object;\n\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;\n};\n","var hasOwn = require('../internals/has-own-property');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source, exceptions) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {\n defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n }\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var isCallable = require('../internals/is-callable');\nvar definePropertyModule = require('../internals/object-define-property');\nvar makeBuiltIn = require('../internals/make-built-in');\nvar defineGlobalProperty = require('../internals/define-global-property');\n\nmodule.exports = function (O, key, value, options) {\n if (!options) options = {};\n var simple = options.enumerable;\n var name = options.name !== undefined ? options.name : key;\n if (isCallable(value)) makeBuiltIn(value, name, options);\n if (options.global) {\n if (simple) O[key] = value;\n else defineGlobalProperty(key, value);\n } else {\n try {\n if (!options.unsafe) delete O[key];\n else if (O[key]) simple = true;\n } catch (error) { /* empty */ }\n if (simple) O[key] = value;\n else definePropertyModule.f(O, key, {\n value: value,\n enumerable: false,\n configurable: !options.nonConfigurable,\n writable: !options.nonWritable\n });\n } return O;\n};\n","var global = require('../internals/global');\n\n// eslint-disable-next-line es-x/no-object-defineproperty -- safe\nvar defineProperty = Object.defineProperty;\n\nmodule.exports = function (key, value) {\n try {\n defineProperty(global, key, { value: value, configurable: true, writable: true });\n } catch (error) {\n global[key] = value;\n } return value;\n};\n","var fails = require('../internals/fails');\n\n// Detect IE8's incomplete defineProperty implementation\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n","var global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar Deno = global.Deno;\nvar versions = process && process.versions || Deno && Deno.version;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n // in old Chrome, versions of V8 isn't V8 = Chrome / 10\n // but their correct versions are not interesting for us\n version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);\n}\n\n// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`\n// so check `userAgent` even if `.v8` exists, but 0\nif (!version && userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = +match[1];\n }\n}\n\nmodule.exports = version;\n","var global = require('../internals/global');\nvar uncurryThis = require('../internals/function-uncurry-this');\n\nmodule.exports = function (CONSTRUCTOR, METHOD) {\n return uncurryThis(global[CONSTRUCTOR].prototype[METHOD]);\n};\n","// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar defineGlobalProperty = require('../internals/define-global-property');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.dontCallGetSet - prevent calling a getter on target\n options.name - the .name of the function if it does not match the key\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || defineGlobalProperty(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.dontCallGetSet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty == typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n defineBuiltIn(target, key, sourceProperty, options);\n }\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","var uncurryThis = require('../internals/function-uncurry-this');\nvar aCallable = require('../internals/a-callable');\nvar NATIVE_BIND = require('../internals/function-bind-native');\n\nvar bind = uncurryThis(uncurryThis.bind);\n\n// optional / simple context binding\nmodule.exports = function (fn, that) {\n aCallable(fn);\n return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es-x/no-function-prototype-bind -- safe\n var test = (function () { /* empty */ }).bind();\n // eslint-disable-next-line no-prototype-builtins -- safe\n return typeof test != 'function' || test.hasOwnProperty('prototype');\n});\n","var NATIVE_BIND = require('../internals/function-bind-native');\n\nvar call = Function.prototype.call;\n\nmodule.exports = NATIVE_BIND ? call.bind(call) : function () {\n return call.apply(call, arguments);\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar hasOwn = require('../internals/has-own-property');\n\nvar FunctionPrototype = Function.prototype;\n// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe\nvar getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;\n\nvar EXISTS = hasOwn(FunctionPrototype, 'name');\n// additional protection from minified / mangled / dropped function names\nvar PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';\nvar CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));\n\nmodule.exports = {\n EXISTS: EXISTS,\n PROPER: PROPER,\n CONFIGURABLE: CONFIGURABLE\n};\n","var NATIVE_BIND = require('../internals/function-bind-native');\n\nvar FunctionPrototype = Function.prototype;\nvar bind = FunctionPrototype.bind;\nvar call = FunctionPrototype.call;\nvar uncurryThis = NATIVE_BIND && bind.bind(call, call);\n\nmodule.exports = NATIVE_BIND ? function (fn) {\n return fn && uncurryThis(fn);\n} : function (fn) {\n return fn && function () {\n return call.apply(fn, arguments);\n };\n};\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\n\nvar aFunction = function (argument) {\n return isCallable(argument) ? argument : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];\n};\n","var aCallable = require('../internals/a-callable');\n\n// `GetMethod` abstract operation\n// https://tc39.es/ecma262/#sec-getmethod\nmodule.exports = function (V, P) {\n var func = V[P];\n return func == null ? undefined : aCallable(func);\n};\n","var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line es-x/no-global-this -- safe\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n // eslint-disable-next-line no-restricted-globals -- safe\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func -- fallback\n (function () { return this; })() || Function('return this')();\n","var uncurryThis = require('../internals/function-uncurry-this');\nvar toObject = require('../internals/to-object');\n\nvar hasOwnProperty = uncurryThis({}.hasOwnProperty);\n\n// `HasOwnProperty` abstract operation\n// https://tc39.es/ecma262/#sec-hasownproperty\n// eslint-disable-next-line es-x/no-object-hasown -- safe\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n return hasOwnProperty(toObject(it), key);\n};\n","module.exports = {};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thanks to IE8 for its funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n","var uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar $Object = Object;\nvar split = uncurryThis(''.split);\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins -- safe\n return !$Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split(it, '') : $Object(it);\n} : $Object;\n","var uncurryThis = require('../internals/function-uncurry-this');\nvar isCallable = require('../internals/is-callable');\nvar store = require('../internals/shared-store');\n\nvar functionToString = uncurryThis(Function.toString);\n\n// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper\nif (!isCallable(store.inspectSource)) {\n store.inspectSource = function (it) {\n return functionToString(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar hasOwn = require('../internals/has-own-property');\nvar shared = require('../internals/shared-store');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar TypeError = global.TypeError;\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP || shared.state) {\n var store = shared.state || (shared.state = new WeakMap());\n var wmget = uncurryThis(store.get);\n var wmhas = uncurryThis(store.has);\n var wmset = uncurryThis(store.set);\n set = function (it, metadata) {\n if (wmhas(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n wmset(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget(store, it) || {};\n };\n has = function (it) {\n return wmhas(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return hasOwn(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return hasOwn(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","var classof = require('../internals/classof-raw');\n\n// `IsArray` abstract operation\n// https://tc39.es/ecma262/#sec-isarray\n// eslint-disable-next-line es-x/no-array-isarray -- safe\nmodule.exports = Array.isArray || function isArray(argument) {\n return classof(argument) == 'Array';\n};\n","// `IsCallable` abstract operation\n// https://tc39.es/ecma262/#sec-iscallable\nmodule.exports = function (argument) {\n return typeof argument == 'function';\n};\n","var uncurryThis = require('../internals/function-uncurry-this');\nvar fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar classof = require('../internals/classof');\nvar getBuiltIn = require('../internals/get-built-in');\nvar inspectSource = require('../internals/inspect-source');\n\nvar noop = function () { /* empty */ };\nvar empty = [];\nvar construct = getBuiltIn('Reflect', 'construct');\nvar constructorRegExp = /^\\s*(?:class|function)\\b/;\nvar exec = uncurryThis(constructorRegExp.exec);\nvar INCORRECT_TO_STRING = !constructorRegExp.exec(noop);\n\nvar isConstructorModern = function isConstructor(argument) {\n if (!isCallable(argument)) return false;\n try {\n construct(noop, empty, argument);\n return true;\n } catch (error) {\n return false;\n }\n};\n\nvar isConstructorLegacy = function isConstructor(argument) {\n if (!isCallable(argument)) return false;\n switch (classof(argument)) {\n case 'AsyncFunction':\n case 'GeneratorFunction':\n case 'AsyncGeneratorFunction': return false;\n }\n try {\n // we can't check .prototype since constructors produced by .bind haven't it\n // `Function#toString` throws on some built-it function in some legacy engines\n // (for example, `DOMQuad` and similar in FF41-)\n return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));\n } catch (error) {\n return true;\n }\n};\n\nisConstructorLegacy.sham = true;\n\n// `IsConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-isconstructor\nmodule.exports = !construct || fails(function () {\n var called;\n return isConstructorModern(isConstructorModern.call)\n || !isConstructorModern(Object)\n || !isConstructorModern(function () { called = true; })\n || called;\n}) ? isConstructorLegacy : isConstructorModern;\n","var fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : isCallable(detection) ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","var isCallable = require('../internals/is-callable');\n\nmodule.exports = function (it) {\n return typeof it == 'object' ? it !== null : isCallable(it);\n};\n","module.exports = false;\n","var getBuiltIn = require('../internals/get-built-in');\nvar isCallable = require('../internals/is-callable');\nvar isPrototypeOf = require('../internals/object-is-prototype-of');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar $Object = Object;\n\nmodule.exports = USE_SYMBOL_AS_UID ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n var $Symbol = getBuiltIn('Symbol');\n return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));\n};\n","var toLength = require('../internals/to-length');\n\n// `LengthOfArrayLike` abstract operation\n// https://tc39.es/ecma262/#sec-lengthofarraylike\nmodule.exports = function (obj) {\n return toLength(obj.length);\n};\n","var fails = require('../internals/fails');\nvar isCallable = require('../internals/is-callable');\nvar hasOwn = require('../internals/has-own-property');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar CONFIGURABLE_FUNCTION_NAME = require('../internals/function-name').CONFIGURABLE;\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar enforceInternalState = InternalStateModule.enforce;\nvar getInternalState = InternalStateModule.get;\n// eslint-disable-next-line es-x/no-object-defineproperty -- safe\nvar defineProperty = Object.defineProperty;\n\nvar CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {\n return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;\n});\n\nvar TEMPLATE = String(String).split('String');\n\nvar makeBuiltIn = module.exports = function (value, name, options) {\n if (String(name).slice(0, 7) === 'Symbol(') {\n name = '[' + String(name).replace(/^Symbol\\(([^)]*)\\)/, '$1') + ']';\n }\n if (options && options.getter) name = 'get ' + name;\n if (options && options.setter) name = 'set ' + name;\n if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {\n if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });\n else value.name = name;\n }\n if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {\n defineProperty(value, 'length', { value: options.arity });\n }\n try {\n if (options && hasOwn(options, 'constructor') && options.constructor) {\n if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });\n // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable\n } else if (value.prototype) value.prototype = undefined;\n } catch (error) { /* empty */ }\n var state = enforceInternalState(value);\n if (!hasOwn(state, 'source')) {\n state.source = TEMPLATE.join(typeof name == 'string' ? name : '');\n } return value;\n};\n\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n// eslint-disable-next-line no-extend-native -- required\nFunction.prototype.toString = makeBuiltIn(function toString() {\n return isCallable(this) && getInternalState(this).source || inspectSource(this);\n}, 'toString');\n","var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `Math.trunc` method\n// https://tc39.es/ecma262/#sec-math.trunc\n// eslint-disable-next-line es-x/no-math-trunc -- safe\nmodule.exports = Math.trunc || function trunc(x) {\n var n = +x;\n return (n > 0 ? floor : ceil)(n);\n};\n","/* eslint-disable es-x/no-symbol -- required for testing */\nvar V8_VERSION = require('../internals/engine-v8-version');\nvar fails = require('../internals/fails');\n\n// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n var symbol = Symbol();\n // Chrome 38 Symbol has incorrect toString conversion\n // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances\n return !String(symbol) || !(Object(symbol) instanceof Symbol) ||\n // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n});\n","var global = require('../internals/global');\nvar isCallable = require('../internals/is-callable');\nvar inspectSource = require('../internals/inspect-source');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = isCallable(WeakMap) && /native code/.test(inspectSource(WeakMap));\n","/* global ActiveXObject -- old IE, WSH */\nvar anObject = require('../internals/an-object');\nvar definePropertiesModule = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n activeXDocument = new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = typeof document != 'undefined'\n ? document.domain && activeXDocument\n ? NullProtoObjectViaActiveX(activeXDocument) // old IE\n : NullProtoObjectViaIFrame()\n : NullProtoObjectViaActiveX(activeXDocument); // WSH\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\n// eslint-disable-next-line es-x/no-object-create -- safe\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : definePropertiesModule.f(result, Properties);\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar V8_PROTOTYPE_DEFINE_BUG = require('../internals/v8-prototype-define-bug');\nvar definePropertyModule = require('../internals/object-define-property');\nvar anObject = require('../internals/an-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar objectKeys = require('../internals/object-keys');\n\n// `Object.defineProperties` method\n// https://tc39.es/ecma262/#sec-object.defineproperties\n// eslint-disable-next-line es-x/no-object-defineproperties -- safe\nexports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var props = toIndexedObject(Properties);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);\n return O;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar V8_PROTOTYPE_DEFINE_BUG = require('../internals/v8-prototype-define-bug');\nvar anObject = require('../internals/an-object');\nvar toPropertyKey = require('../internals/to-property-key');\n\nvar $TypeError = TypeError;\n// eslint-disable-next-line es-x/no-object-defineproperty -- safe\nvar $defineProperty = Object.defineProperty;\n// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar ENUMERABLE = 'enumerable';\nvar CONFIGURABLE = 'configurable';\nvar WRITABLE = 'writable';\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {\n var current = $getOwnPropertyDescriptor(O, P);\n if (current && current[WRITABLE]) {\n O[P] = Attributes.value;\n Attributes = {\n configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],\n enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],\n writable: false\n };\n }\n } return $defineProperty(O, P, Attributes);\n} : $defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return $defineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw $TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar call = require('../internals/function-call');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPropertyKey = require('../internals/to-property-key');\nvar hasOwn = require('../internals/has-own-property');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\n// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPropertyKey(P);\n if (IE8_DOM_DEFINE) try {\n return $getOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);\n};\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n// eslint-disable-next-line es-x/no-object-getownpropertynames -- safe\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n","var uncurryThis = require('../internals/function-uncurry-this');\n\nmodule.exports = uncurryThis({}.isPrototypeOf);\n","var uncurryThis = require('../internals/function-uncurry-this');\nvar hasOwn = require('../internals/has-own-property');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar push = uncurryThis([].push);\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (hasOwn(O, key = names[i++])) {\n ~indexOf(result, key) || push(result, key);\n }\n return result;\n};\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n// eslint-disable-next-line es-x/no-object-keys -- safe\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n","'use strict';\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n","var call = require('../internals/function-call');\nvar isCallable = require('../internals/is-callable');\nvar isObject = require('../internals/is-object');\n\nvar $TypeError = TypeError;\n\n// `OrdinaryToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-ordinarytoprimitive\nmodule.exports = function (input, pref) {\n var fn, val;\n if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;\n if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;\n if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;\n throw $TypeError(\"Can't convert object to primitive value\");\n};\n","var getBuiltIn = require('../internals/get-built-in');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\nvar concat = uncurryThis([].concat);\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;\n};\n","var $TypeError = TypeError;\n\n// `RequireObjectCoercible` abstract operation\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw $TypeError(\"Can't call method on \" + it);\n return it;\n};\n","var shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n","var global = require('../internals/global');\nvar defineGlobalProperty = require('../internals/define-global-property');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || defineGlobalProperty(SHARED, {});\n\nmodule.exports = store;\n","var IS_PURE = require('../internals/is-pure');\nvar store = require('../internals/shared-store');\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.23.3',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',\n license: 'https://github.com/zloirock/core-js/blob/v3.23.3/LICENSE',\n source: 'https://github.com/zloirock/core-js'\n});\n","var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toIntegerOrInfinity(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","var trunc = require('../internals/math-trunc');\n\n// `ToIntegerOrInfinity` abstract operation\n// https://tc39.es/ecma262/#sec-tointegerorinfinity\nmodule.exports = function (argument) {\n var number = +argument;\n // eslint-disable-next-line no-self-compare -- NaN check\n return number !== number || number === 0 ? 0 : trunc(number);\n};\n","var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.es/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar $Object = Object;\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return $Object(requireObjectCoercible(argument));\n};\n","var call = require('../internals/function-call');\nvar isObject = require('../internals/is-object');\nvar isSymbol = require('../internals/is-symbol');\nvar getMethod = require('../internals/get-method');\nvar ordinaryToPrimitive = require('../internals/ordinary-to-primitive');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar $TypeError = TypeError;\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\nmodule.exports = function (input, pref) {\n if (!isObject(input) || isSymbol(input)) return input;\n var exoticToPrim = getMethod(input, TO_PRIMITIVE);\n var result;\n if (exoticToPrim) {\n if (pref === undefined) pref = 'default';\n result = call(exoticToPrim, input, pref);\n if (!isObject(result) || isSymbol(result)) return result;\n throw $TypeError(\"Can't convert object to primitive value\");\n }\n if (pref === undefined) pref = 'number';\n return ordinaryToPrimitive(input, pref);\n};\n","var toPrimitive = require('../internals/to-primitive');\nvar isSymbol = require('../internals/is-symbol');\n\n// `ToPropertyKey` abstract operation\n// https://tc39.es/ecma262/#sec-topropertykey\nmodule.exports = function (argument) {\n var key = toPrimitive(argument, 'string');\n return isSymbol(key) ? key : key + '';\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n","var $String = String;\n\nmodule.exports = function (argument) {\n try {\n return $String(argument);\n } catch (error) {\n return 'Object';\n }\n};\n","var uncurryThis = require('../internals/function-uncurry-this');\n\nvar id = 0;\nvar postfix = Math.random();\nvar toString = uncurryThis(1.0.toString);\n\nmodule.exports = function (key) {\n return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);\n};\n","/* eslint-disable es-x/no-symbol -- required for testing */\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\n && !Symbol.sham\n && typeof Symbol.iterator == 'symbol';\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\n\n// V8 ~ Chrome 36-\n// https://bugs.chromium.org/p/v8/issues/detail?id=3334\nmodule.exports = DESCRIPTORS && fails(function () {\n // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing\n return Object.defineProperty(function () { /* empty */ }, 'prototype', {\n value: 42,\n writable: false\n }).prototype != 42;\n});\n","var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar hasOwn = require('../internals/has-own-property');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar symbolFor = Symbol && Symbol['for'];\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!hasOwn(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {\n var description = 'Symbol.' + name;\n if (NATIVE_SYMBOL && hasOwn(Symbol, name)) {\n WellKnownSymbolsStore[name] = Symbol[name];\n } else if (USE_SYMBOL_AS_UID && symbolFor) {\n WellKnownSymbolsStore[name] = symbolFor(description);\n } else {\n WellKnownSymbolsStore[name] = createWellKnownSymbol(description);\n }\n } return WellKnownSymbolsStore[name];\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar $findIndex = require('../internals/array-iteration').findIndex;\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\nvar FIND_INDEX = 'findIndex';\nvar SKIPS_HOLES = true;\n\n// Shouldn't skip holes\nif (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES = false; });\n\n// `Array.prototype.findIndex` method\n// https://tc39.es/ecma262/#sec-array.prototype.findindex\n$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {\n findIndex: function findIndex(callbackfn /* , that = undefined */) {\n return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables(FIND_INDEX);\n","var parent = require('../../es/array/find-index');\n\nmodule.exports = parent;\n","/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.8+1e68dce6\n */\n\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.ES6Promise = factory());\n}(this, (function () { 'use strict';\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\n\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\n\nvar len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof require === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}\n\nfunction then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve$1(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n resolve(promise, object);\n return promise;\n}\n\nvar PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {\n try {\n then$$1.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then$$1) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then$$1, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then$$1) {\n if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then$$1 === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then$$1)) {\n handleForeignThenable(promise, maybeThenable, then$$1);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n var then$$1 = void 0;\n try {\n then$$1 = value.then;\n } catch (error) {\n reject(promise, error);\n return;\n }\n handleMaybeThenable(promise, value, then$$1);\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = true;\n\n if (hasCallback) {\n try {\n value = callback(detail);\n } catch (e) {\n succeeded = false;\n error = e;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (succeeded === false) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n}\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve$$1 = c.resolve;\n\n\n if (resolve$$1 === resolve$1) {\n var _then = void 0;\n var error = void 0;\n var didError = false;\n try {\n _then = entry.then;\n } catch (e) {\n didError = true;\n error = e;\n }\n\n if (_then === then && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise$1) {\n var promise = new c(noop);\n if (didError) {\n reject(promise, error);\n } else {\n handleMaybeThenable(promise, entry, _then);\n }\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve$$1) {\n return resolve$$1(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve$$1(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject$1(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n reject(promise, reason);\n return promise;\n}\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise$1 = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n if (isFunction(callback)) {\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n }\n\n return promise.then(callback, callback);\n };\n\n return Promise;\n}();\n\nPromise$1.prototype.then = then;\nPromise$1.all = all;\nPromise$1.race = race;\nPromise$1.resolve = resolve$1;\nPromise$1.reject = reject$1;\nPromise$1._setScheduler = setScheduler;\nPromise$1._setAsap = setAsap;\nPromise$1._asap = asap;\n\n/*global self*/\nfunction polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise$1;\n}\n\n// Strange compat..\nPromise$1.polyfill = polyfill;\nPromise$1.Promise = Promise$1;\n\nreturn Promise$1;\n\n})));\n\n\n\n//# sourceMappingURL=es6-promise.map\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var baseRest = require('./_baseRest'),\n isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\nmodule.exports = createAssigner;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","var eq = require('./eq'),\n isArrayLike = require('./isArrayLike'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject');\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var assignValue = require('./_assignValue'),\n copyObject = require('./_copyObject'),\n createAssigner = require('./_createAssigner'),\n isArrayLike = require('./isArrayLike'),\n isPrototype = require('./_isPrototype'),\n keys = require('./keys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns own enumerable string keyed properties of source objects to the\n * destination object. Source objects are applied from left to right.\n * Subsequent sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object` and is loosely based on\n * [`Object.assign`](https://mdn.io/Object/assign).\n *\n * @static\n * @memberOf _\n * @since 0.10.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.assignIn\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * function Bar() {\n * this.c = 3;\n * }\n *\n * Foo.prototype.b = 2;\n * Bar.prototype.d = 4;\n *\n * _.assign({ 'a': 0 }, new Foo, new Bar);\n * // => { 'a': 1, 'c': 3 }\n */\nvar assign = createAssigner(function(object, source) {\n if (isPrototype(source) || isArrayLike(source)) {\n copyObject(source, keys(source), object);\n return;\n }\n for (var key in source) {\n if (hasOwnProperty.call(source, key)) {\n assignValue(object, key, source[key]);\n }\n }\n});\n\nmodule.exports = assign;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","'use strict';\n\nvar Config = {\n DEBUG: false,\n LIB_VERSION: '2.45.0'\n};\n\n// since es6 imports are static and we run unit tests from the console, window won't be defined when importing this file\nvar window$1;\nif (typeof(window) === 'undefined') {\n var loc = {\n hostname: ''\n };\n window$1 = {\n navigator: { userAgent: '' },\n document: {\n location: loc,\n referrer: ''\n },\n screen: { width: 0, height: 0 },\n location: loc\n };\n} else {\n window$1 = window;\n}\n\n/*\n * Saved references to long variable names, so that closure compiler can\n * minimize file size.\n */\n\nvar ArrayProto = Array.prototype;\nvar FuncProto = Function.prototype;\nvar ObjProto = Object.prototype;\nvar slice = ArrayProto.slice;\nvar toString = ObjProto.toString;\nvar hasOwnProperty = ObjProto.hasOwnProperty;\nvar windowConsole = window$1.console;\nvar navigator = window$1.navigator;\nvar document$1 = window$1.document;\nvar windowOpera = window$1.opera;\nvar screen = window$1.screen;\nvar userAgent = navigator.userAgent;\nvar nativeBind = FuncProto.bind;\nvar nativeForEach = ArrayProto.forEach;\nvar nativeIndexOf = ArrayProto.indexOf;\nvar nativeMap = ArrayProto.map;\nvar nativeIsArray = Array.isArray;\nvar breaker = {};\nvar _ = {\n trim: function(str) {\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill\n return str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n }\n};\n\n// Console override\nvar console = {\n /** @type {function(...*)} */\n log: function() {\n if (Config.DEBUG && !_.isUndefined(windowConsole) && windowConsole) {\n try {\n windowConsole.log.apply(windowConsole, arguments);\n } catch (err) {\n _.each(arguments, function(arg) {\n windowConsole.log(arg);\n });\n }\n }\n },\n /** @type {function(...*)} */\n warn: function() {\n if (Config.DEBUG && !_.isUndefined(windowConsole) && windowConsole) {\n var args = ['Mixpanel warning:'].concat(_.toArray(arguments));\n try {\n windowConsole.warn.apply(windowConsole, args);\n } catch (err) {\n _.each(args, function(arg) {\n windowConsole.warn(arg);\n });\n }\n }\n },\n /** @type {function(...*)} */\n error: function() {\n if (Config.DEBUG && !_.isUndefined(windowConsole) && windowConsole) {\n var args = ['Mixpanel error:'].concat(_.toArray(arguments));\n try {\n windowConsole.error.apply(windowConsole, args);\n } catch (err) {\n _.each(args, function(arg) {\n windowConsole.error(arg);\n });\n }\n }\n },\n /** @type {function(...*)} */\n critical: function() {\n if (!_.isUndefined(windowConsole) && windowConsole) {\n var args = ['Mixpanel error:'].concat(_.toArray(arguments));\n try {\n windowConsole.error.apply(windowConsole, args);\n } catch (err) {\n _.each(args, function(arg) {\n windowConsole.error(arg);\n });\n }\n }\n }\n};\n\nvar log_func_with_prefix = function(func, prefix) {\n return function() {\n arguments[0] = '[' + prefix + '] ' + arguments[0];\n return func.apply(console, arguments);\n };\n};\nvar console_with_prefix = function(prefix) {\n return {\n log: log_func_with_prefix(console.log, prefix),\n error: log_func_with_prefix(console.error, prefix),\n critical: log_func_with_prefix(console.critical, prefix)\n };\n};\n\n\n// UNDERSCORE\n// Embed part of the Underscore Library\n_.bind = function(func, context) {\n var args, bound;\n if (nativeBind && func.bind === nativeBind) {\n return nativeBind.apply(func, slice.call(arguments, 1));\n }\n if (!_.isFunction(func)) {\n throw new TypeError();\n }\n args = slice.call(arguments, 2);\n bound = function() {\n if (!(this instanceof bound)) {\n return func.apply(context, args.concat(slice.call(arguments)));\n }\n var ctor = {};\n ctor.prototype = func.prototype;\n var self = new ctor();\n ctor.prototype = null;\n var result = func.apply(self, args.concat(slice.call(arguments)));\n if (Object(result) === result) {\n return result;\n }\n return self;\n };\n return bound;\n};\n\n/**\n * @param {*=} obj\n * @param {function(...*)=} iterator\n * @param {Object=} context\n */\n_.each = function(obj, iterator, context) {\n if (obj === null || obj === undefined) {\n return;\n }\n if (nativeForEach && obj.forEach === nativeForEach) {\n obj.forEach(iterator, context);\n } else if (obj.length === +obj.length) {\n for (var i = 0, l = obj.length; i < l; i++) {\n if (i in obj && iterator.call(context, obj[i], i, obj) === breaker) {\n return;\n }\n }\n } else {\n for (var key in obj) {\n if (hasOwnProperty.call(obj, key)) {\n if (iterator.call(context, obj[key], key, obj) === breaker) {\n return;\n }\n }\n }\n }\n};\n\n_.extend = function(obj) {\n _.each(slice.call(arguments, 1), function(source) {\n for (var prop in source) {\n if (source[prop] !== void 0) {\n obj[prop] = source[prop];\n }\n }\n });\n return obj;\n};\n\n_.isArray = nativeIsArray || function(obj) {\n return toString.call(obj) === '[object Array]';\n};\n\n// from a comment on http://dbj.org/dbj/?p=286\n// fails on only one very rare and deliberate custom object:\n// var bomb = { toString : undefined, valueOf: function(o) { return \"function BOMBA!\"; }};\n_.isFunction = function(f) {\n try {\n return /^\\s*\\bfunction\\b/.test(f);\n } catch (x) {\n return false;\n }\n};\n\n_.isArguments = function(obj) {\n return !!(obj && hasOwnProperty.call(obj, 'callee'));\n};\n\n_.toArray = function(iterable) {\n if (!iterable) {\n return [];\n }\n if (iterable.toArray) {\n return iterable.toArray();\n }\n if (_.isArray(iterable)) {\n return slice.call(iterable);\n }\n if (_.isArguments(iterable)) {\n return slice.call(iterable);\n }\n return _.values(iterable);\n};\n\n_.map = function(arr, callback, context) {\n if (nativeMap && arr.map === nativeMap) {\n return arr.map(callback, context);\n } else {\n var results = [];\n _.each(arr, function(item) {\n results.push(callback.call(context, item));\n });\n return results;\n }\n};\n\n_.keys = function(obj) {\n var results = [];\n if (obj === null) {\n return results;\n }\n _.each(obj, function(value, key) {\n results[results.length] = key;\n });\n return results;\n};\n\n_.values = function(obj) {\n var results = [];\n if (obj === null) {\n return results;\n }\n _.each(obj, function(value) {\n results[results.length] = value;\n });\n return results;\n};\n\n_.include = function(obj, target) {\n var found = false;\n if (obj === null) {\n return found;\n }\n if (nativeIndexOf && obj.indexOf === nativeIndexOf) {\n return obj.indexOf(target) != -1;\n }\n _.each(obj, function(value) {\n if (found || (found = (value === target))) {\n return breaker;\n }\n });\n return found;\n};\n\n_.includes = function(str, needle) {\n return str.indexOf(needle) !== -1;\n};\n\n// Underscore Addons\n_.inherit = function(subclass, superclass) {\n subclass.prototype = new superclass();\n subclass.prototype.constructor = subclass;\n subclass.superclass = superclass.prototype;\n return subclass;\n};\n\n_.isObject = function(obj) {\n return (obj === Object(obj) && !_.isArray(obj));\n};\n\n_.isEmptyObject = function(obj) {\n if (_.isObject(obj)) {\n for (var key in obj) {\n if (hasOwnProperty.call(obj, key)) {\n return false;\n }\n }\n return true;\n }\n return false;\n};\n\n_.isUndefined = function(obj) {\n return obj === void 0;\n};\n\n_.isString = function(obj) {\n return toString.call(obj) == '[object String]';\n};\n\n_.isDate = function(obj) {\n return toString.call(obj) == '[object Date]';\n};\n\n_.isNumber = function(obj) {\n return toString.call(obj) == '[object Number]';\n};\n\n_.isElement = function(obj) {\n return !!(obj && obj.nodeType === 1);\n};\n\n_.encodeDates = function(obj) {\n _.each(obj, function(v, k) {\n if (_.isDate(v)) {\n obj[k] = _.formatDate(v);\n } else if (_.isObject(v)) {\n obj[k] = _.encodeDates(v); // recurse\n }\n });\n return obj;\n};\n\n_.timestamp = function() {\n Date.now = Date.now || function() {\n return +new Date;\n };\n return Date.now();\n};\n\n_.formatDate = function(d) {\n // YYYY-MM-DDTHH:MM:SS in UTC\n function pad(n) {\n return n < 10 ? '0' + n : n;\n }\n return d.getUTCFullYear() + '-' +\n pad(d.getUTCMonth() + 1) + '-' +\n pad(d.getUTCDate()) + 'T' +\n pad(d.getUTCHours()) + ':' +\n pad(d.getUTCMinutes()) + ':' +\n pad(d.getUTCSeconds());\n};\n\n_.strip_empty_properties = function(p) {\n var ret = {};\n _.each(p, function(v, k) {\n if (_.isString(v) && v.length > 0) {\n ret[k] = v;\n }\n });\n return ret;\n};\n\n/*\n * this function returns a copy of object after truncating it. If\n * passed an Array or Object it will iterate through obj and\n * truncate all the values recursively.\n */\n_.truncate = function(obj, length) {\n var ret;\n\n if (typeof(obj) === 'string') {\n ret = obj.slice(0, length);\n } else if (_.isArray(obj)) {\n ret = [];\n _.each(obj, function(val) {\n ret.push(_.truncate(val, length));\n });\n } else if (_.isObject(obj)) {\n ret = {};\n _.each(obj, function(val, key) {\n ret[key] = _.truncate(val, length);\n });\n } else {\n ret = obj;\n }\n\n return ret;\n};\n\n_.JSONEncode = (function() {\n return function(mixed_val) {\n var value = mixed_val;\n var quote = function(string) {\n var escapable = /[\\\\\"\\x00-\\x1f\\x7f-\\x9f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g; // eslint-disable-line no-control-regex\n var meta = { // table of character substitutions\n '\\b': '\\\\b',\n '\\t': '\\\\t',\n '\\n': '\\\\n',\n '\\f': '\\\\f',\n '\\r': '\\\\r',\n '\"': '\\\\\"',\n '\\\\': '\\\\\\\\'\n };\n\n escapable.lastIndex = 0;\n return escapable.test(string) ?\n '\"' + string.replace(escapable, function(a) {\n var c = meta[a];\n return typeof c === 'string' ? c :\n '\\\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);\n }) + '\"' :\n '\"' + string + '\"';\n };\n\n var str = function(key, holder) {\n var gap = '';\n var indent = ' ';\n var i = 0; // The loop counter.\n var k = ''; // The member key.\n var v = ''; // The member value.\n var length = 0;\n var mind = gap;\n var partial = [];\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n if (value && typeof value === 'object' &&\n typeof value.toJSON === 'function') {\n value = value.toJSON(key);\n }\n\n // What happens next depends on the value's type.\n switch (typeof value) {\n case 'string':\n return quote(value);\n\n case 'number':\n // JSON numbers must be finite. Encode non-finite numbers as null.\n return isFinite(value) ? String(value) : 'null';\n\n case 'boolean':\n case 'null':\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce 'null'. The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n case 'object':\n // If the type is 'object', we might be dealing with an object or an array or\n // null.\n // Due to a specification blunder in ECMAScript, typeof null is 'object',\n // so watch out for that case.\n if (!value) {\n return 'null';\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n gap += indent;\n partial = [];\n\n // Is the value an array?\n if (toString.apply(value) === '[object Array]') {\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || 'null';\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n v = partial.length === 0 ? '[]' :\n gap ? '[\\n' + gap +\n partial.join(',\\n' + gap) + '\\n' +\n mind + ']' :\n '[' + partial.join(',') + ']';\n gap = mind;\n return v;\n }\n\n // Iterate through all of the keys in the object.\n for (k in value) {\n if (hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (gap ? ': ' : ':') + v);\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n v = partial.length === 0 ? '{}' :\n gap ? '{' + partial.join(',') + '' +\n mind + '}' : '{' + partial.join(',') + '}';\n gap = mind;\n return v;\n }\n };\n\n // Make a fake root object containing our value under the key of ''.\n // Return the result of stringifying the value.\n return str('', {\n '': value\n });\n };\n})();\n\n/**\n * From https://github.com/douglascrockford/JSON-js/blob/master/json_parse.js\n * Slightly modified to throw a real Error rather than a POJO\n */\n_.JSONDecode = (function() {\n var at, // The index of the current character\n ch, // The current character\n escapee = {\n '\"': '\"',\n '\\\\': '\\\\',\n '/': '/',\n 'b': '\\b',\n 'f': '\\f',\n 'n': '\\n',\n 'r': '\\r',\n 't': '\\t'\n },\n text,\n error = function(m) {\n var e = new SyntaxError(m);\n e.at = at;\n e.text = text;\n throw e;\n },\n next = function(c) {\n // If a c parameter is provided, verify that it matches the current character.\n if (c && c !== ch) {\n error('Expected \\'' + c + '\\' instead of \\'' + ch + '\\'');\n }\n // Get the next character. When there are no more characters,\n // return the empty string.\n ch = text.charAt(at);\n at += 1;\n return ch;\n },\n number = function() {\n // Parse a number value.\n var number,\n string = '';\n\n if (ch === '-') {\n string = '-';\n next('-');\n }\n while (ch >= '0' && ch <= '9') {\n string += ch;\n next();\n }\n if (ch === '.') {\n string += '.';\n while (next() && ch >= '0' && ch <= '9') {\n string += ch;\n }\n }\n if (ch === 'e' || ch === 'E') {\n string += ch;\n next();\n if (ch === '-' || ch === '+') {\n string += ch;\n next();\n }\n while (ch >= '0' && ch <= '9') {\n string += ch;\n next();\n }\n }\n number = +string;\n if (!isFinite(number)) {\n error('Bad number');\n } else {\n return number;\n }\n },\n\n string = function() {\n // Parse a string value.\n var hex,\n i,\n string = '',\n uffff;\n // When parsing for string values, we must look for \" and \\ characters.\n if (ch === '\"') {\n while (next()) {\n if (ch === '\"') {\n next();\n return string;\n }\n if (ch === '\\\\') {\n next();\n if (ch === 'u') {\n uffff = 0;\n for (i = 0; i < 4; i += 1) {\n hex = parseInt(next(), 16);\n if (!isFinite(hex)) {\n break;\n }\n uffff = uffff * 16 + hex;\n }\n string += String.fromCharCode(uffff);\n } else if (typeof escapee[ch] === 'string') {\n string += escapee[ch];\n } else {\n break;\n }\n } else {\n string += ch;\n }\n }\n }\n error('Bad string');\n },\n white = function() {\n // Skip whitespace.\n while (ch && ch <= ' ') {\n next();\n }\n },\n word = function() {\n // true, false, or null.\n switch (ch) {\n case 't':\n next('t');\n next('r');\n next('u');\n next('e');\n return true;\n case 'f':\n next('f');\n next('a');\n next('l');\n next('s');\n next('e');\n return false;\n case 'n':\n next('n');\n next('u');\n next('l');\n next('l');\n return null;\n }\n error('Unexpected \"' + ch + '\"');\n },\n value, // Placeholder for the value function.\n array = function() {\n // Parse an array value.\n var array = [];\n\n if (ch === '[') {\n next('[');\n white();\n if (ch === ']') {\n next(']');\n return array; // empty array\n }\n while (ch) {\n array.push(value());\n white();\n if (ch === ']') {\n next(']');\n return array;\n }\n next(',');\n white();\n }\n }\n error('Bad array');\n },\n object = function() {\n // Parse an object value.\n var key,\n object = {};\n\n if (ch === '{') {\n next('{');\n white();\n if (ch === '}') {\n next('}');\n return object; // empty object\n }\n while (ch) {\n key = string();\n white();\n next(':');\n if (Object.hasOwnProperty.call(object, key)) {\n error('Duplicate key \"' + key + '\"');\n }\n object[key] = value();\n white();\n if (ch === '}') {\n next('}');\n return object;\n }\n next(',');\n white();\n }\n }\n error('Bad object');\n };\n\n value = function() {\n // Parse a JSON value. It could be an object, an array, a string,\n // a number, or a word.\n white();\n switch (ch) {\n case '{':\n return object();\n case '[':\n return array();\n case '\"':\n return string();\n case '-':\n return number();\n default:\n return ch >= '0' && ch <= '9' ? number() : word();\n }\n };\n\n // Return the json_parse function. It will have access to all of the\n // above functions and variables.\n return function(source) {\n var result;\n\n text = source;\n at = 0;\n ch = ' ';\n result = value();\n white();\n if (ch) {\n error('Syntax error');\n }\n\n return result;\n };\n})();\n\n_.base64Encode = function(data) {\n var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n var o1, o2, o3, h1, h2, h3, h4, bits, i = 0,\n ac = 0,\n enc = '',\n tmp_arr = [];\n\n if (!data) {\n return data;\n }\n\n data = _.utf8Encode(data);\n\n do { // pack three octets into four hexets\n o1 = data.charCodeAt(i++);\n o2 = data.charCodeAt(i++);\n o3 = data.charCodeAt(i++);\n\n bits = o1 << 16 | o2 << 8 | o3;\n\n h1 = bits >> 18 & 0x3f;\n h2 = bits >> 12 & 0x3f;\n h3 = bits >> 6 & 0x3f;\n h4 = bits & 0x3f;\n\n // use hexets to index into b64, and append result to encoded string\n tmp_arr[ac++] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4);\n } while (i < data.length);\n\n enc = tmp_arr.join('');\n\n switch (data.length % 3) {\n case 1:\n enc = enc.slice(0, -2) + '==';\n break;\n case 2:\n enc = enc.slice(0, -1) + '=';\n break;\n }\n\n return enc;\n};\n\n_.utf8Encode = function(string) {\n string = (string + '').replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\n\n var utftext = '',\n start,\n end;\n var stringl = 0,\n n;\n\n start = end = 0;\n stringl = string.length;\n\n for (n = 0; n < stringl; n++) {\n var c1 = string.charCodeAt(n);\n var enc = null;\n\n if (c1 < 128) {\n end++;\n } else if ((c1 > 127) && (c1 < 2048)) {\n enc = String.fromCharCode((c1 >> 6) | 192, (c1 & 63) | 128);\n } else {\n enc = String.fromCharCode((c1 >> 12) | 224, ((c1 >> 6) & 63) | 128, (c1 & 63) | 128);\n }\n if (enc !== null) {\n if (end > start) {\n utftext += string.substring(start, end);\n }\n utftext += enc;\n start = end = n + 1;\n }\n }\n\n if (end > start) {\n utftext += string.substring(start, string.length);\n }\n\n return utftext;\n};\n\n_.UUID = (function() {\n\n // Time/ticks information\n // 1*new Date() is a cross browser version of Date.now()\n var T = function() {\n var d = 1 * new Date(),\n i = 0;\n\n // this while loop figures how many browser ticks go by\n // before 1*new Date() returns a new number, ie the amount\n // of ticks that go by per millisecond\n while (d == 1 * new Date()) {\n i++;\n }\n\n return d.toString(16) + i.toString(16);\n };\n\n // Math.Random entropy\n var R = function() {\n return Math.random().toString(16).replace('.', '');\n };\n\n // User agent entropy\n // This function takes the user agent string, and then xors\n // together each sequence of 8 bytes. This produces a final\n // sequence of 8 bytes which it returns as hex.\n var UA = function() {\n var ua = userAgent,\n i, ch, buffer = [],\n ret = 0;\n\n function xor(result, byte_array) {\n var j, tmp = 0;\n for (j = 0; j < byte_array.length; j++) {\n tmp |= (buffer[j] << j * 8);\n }\n return result ^ tmp;\n }\n\n for (i = 0; i < ua.length; i++) {\n ch = ua.charCodeAt(i);\n buffer.unshift(ch & 0xFF);\n if (buffer.length >= 4) {\n ret = xor(ret, buffer);\n buffer = [];\n }\n }\n\n if (buffer.length > 0) {\n ret = xor(ret, buffer);\n }\n\n return ret.toString(16);\n };\n\n return function() {\n var se = (screen.height * screen.width).toString(16);\n return (T() + '-' + R() + '-' + UA() + '-' + se + '-' + T());\n };\n})();\n\n// _.isBlockedUA()\n// This is to block various web spiders from executing our JS and\n// sending false tracking data\nvar BLOCKED_UA_STRS = [\n 'ahrefsbot',\n 'baiduspider',\n 'bingbot',\n 'bingpreview',\n 'facebookexternal',\n 'petalbot',\n 'pinterest',\n 'screaming frog',\n 'yahoo! slurp',\n 'yandexbot',\n\n // a whole bunch of goog-specific crawlers\n // https://developers.google.com/search/docs/advanced/crawling/overview-google-crawlers\n 'adsbot-google',\n 'apis-google',\n 'duplexweb-google',\n 'feedfetcher-google',\n 'google favicon',\n 'google web preview',\n 'google-read-aloud',\n 'googlebot',\n 'googleweblight',\n 'mediapartners-google',\n 'storebot-google'\n];\n_.isBlockedUA = function(ua) {\n var i;\n ua = ua.toLowerCase();\n for (i = 0; i < BLOCKED_UA_STRS.length; i++) {\n if (ua.indexOf(BLOCKED_UA_STRS[i]) !== -1) {\n return true;\n }\n }\n return false;\n};\n\n/**\n * @param {Object=} formdata\n * @param {string=} arg_separator\n */\n_.HTTPBuildQuery = function(formdata, arg_separator) {\n var use_val, use_key, tmp_arr = [];\n\n if (_.isUndefined(arg_separator)) {\n arg_separator = '&';\n }\n\n _.each(formdata, function(val, key) {\n use_val = encodeURIComponent(val.toString());\n use_key = encodeURIComponent(key);\n tmp_arr[tmp_arr.length] = use_key + '=' + use_val;\n });\n\n return tmp_arr.join(arg_separator);\n};\n\n_.getQueryParam = function(url, param) {\n // Expects a raw URL\n\n param = param.replace(/[[]/, '\\\\[').replace(/[\\]]/, '\\\\]');\n var regexS = '[\\\\?&]' + param + '=([^&#]*)',\n regex = new RegExp(regexS),\n results = regex.exec(url);\n if (results === null || (results && typeof(results[1]) !== 'string' && results[1].length)) {\n return '';\n } else {\n var result = results[1];\n try {\n result = decodeURIComponent(result);\n } catch(err) {\n console.error('Skipping decoding for malformed query param: ' + result);\n }\n return result.replace(/\\+/g, ' ');\n }\n};\n\n\n// _.cookie\n// Methods partially borrowed from quirksmode.org/js/cookies.html\n_.cookie = {\n get: function(name) {\n var nameEQ = name + '=';\n var ca = document$1.cookie.split(';');\n for (var i = 0; i < ca.length; i++) {\n var c = ca[i];\n while (c.charAt(0) == ' ') {\n c = c.substring(1, c.length);\n }\n if (c.indexOf(nameEQ) === 0) {\n return decodeURIComponent(c.substring(nameEQ.length, c.length));\n }\n }\n return null;\n },\n\n parse: function(name) {\n var cookie;\n try {\n cookie = _.JSONDecode(_.cookie.get(name)) || {};\n } catch (err) {\n // noop\n }\n return cookie;\n },\n\n set_seconds: function(name, value, seconds, is_cross_subdomain, is_secure, is_cross_site, domain_override) {\n var cdomain = '',\n expires = '',\n secure = '';\n\n if (domain_override) {\n cdomain = '; domain=' + domain_override;\n } else if (is_cross_subdomain) {\n var domain = extract_domain(document$1.location.hostname);\n cdomain = domain ? '; domain=.' + domain : '';\n }\n\n if (seconds) {\n var date = new Date();\n date.setTime(date.getTime() + (seconds * 1000));\n expires = '; expires=' + date.toGMTString();\n }\n\n if (is_cross_site) {\n is_secure = true;\n secure = '; SameSite=None';\n }\n if (is_secure) {\n secure += '; secure';\n }\n\n document$1.cookie = name + '=' + encodeURIComponent(value) + expires + '; path=/' + cdomain + secure;\n },\n\n set: function(name, value, days, is_cross_subdomain, is_secure, is_cross_site, domain_override) {\n var cdomain = '', expires = '', secure = '';\n\n if (domain_override) {\n cdomain = '; domain=' + domain_override;\n } else if (is_cross_subdomain) {\n var domain = extract_domain(document$1.location.hostname);\n cdomain = domain ? '; domain=.' + domain : '';\n }\n\n if (days) {\n var date = new Date();\n date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));\n expires = '; expires=' + date.toGMTString();\n }\n\n if (is_cross_site) {\n is_secure = true;\n secure = '; SameSite=None';\n }\n if (is_secure) {\n secure += '; secure';\n }\n\n var new_cookie_val = name + '=' + encodeURIComponent(value) + expires + '; path=/' + cdomain + secure;\n document$1.cookie = new_cookie_val;\n return new_cookie_val;\n },\n\n remove: function(name, is_cross_subdomain, domain_override) {\n _.cookie.set(name, '', -1, is_cross_subdomain, false, false, domain_override);\n }\n};\n\nvar _localStorageSupported = null;\nvar localStorageSupported = function(storage, forceCheck) {\n if (_localStorageSupported !== null && !forceCheck) {\n return _localStorageSupported;\n }\n\n var supported = true;\n try {\n storage = storage || window.localStorage;\n var key = '__mplss_' + cheap_guid(8),\n val = 'xyz';\n storage.setItem(key, val);\n if (storage.getItem(key) !== val) {\n supported = false;\n }\n storage.removeItem(key);\n } catch (err) {\n supported = false;\n }\n\n _localStorageSupported = supported;\n return supported;\n};\n\n// _.localStorage\n_.localStorage = {\n is_supported: function(force_check) {\n var supported = localStorageSupported(null, force_check);\n if (!supported) {\n console.error('localStorage unsupported; falling back to cookie store');\n }\n return supported;\n },\n\n error: function(msg) {\n console.error('localStorage error: ' + msg);\n },\n\n get: function(name) {\n try {\n return window.localStorage.getItem(name);\n } catch (err) {\n _.localStorage.error(err);\n }\n return null;\n },\n\n parse: function(name) {\n try {\n return _.JSONDecode(_.localStorage.get(name)) || {};\n } catch (err) {\n // noop\n }\n return null;\n },\n\n set: function(name, value) {\n try {\n window.localStorage.setItem(name, value);\n } catch (err) {\n _.localStorage.error(err);\n }\n },\n\n remove: function(name) {\n try {\n window.localStorage.removeItem(name);\n } catch (err) {\n _.localStorage.error(err);\n }\n }\n};\n\n_.register_event = (function() {\n // written by Dean Edwards, 2005\n // with input from Tino Zijdel - crisp@xs4all.nl\n // with input from Carl Sverre - mail@carlsverre.com\n // with input from Mixpanel\n // http://dean.edwards.name/weblog/2005/10/add-event/\n // https://gist.github.com/1930440\n\n /**\n * @param {Object} element\n * @param {string} type\n * @param {function(...*)} handler\n * @param {boolean=} oldSchool\n * @param {boolean=} useCapture\n */\n var register_event = function(element, type, handler, oldSchool, useCapture) {\n if (!element) {\n console.error('No valid element provided to register_event');\n return;\n }\n\n if (element.addEventListener && !oldSchool) {\n element.addEventListener(type, handler, !!useCapture);\n } else {\n var ontype = 'on' + type;\n var old_handler = element[ontype]; // can be undefined\n element[ontype] = makeHandler(element, handler, old_handler);\n }\n };\n\n function makeHandler(element, new_handler, old_handlers) {\n var handler = function(event) {\n event = event || fixEvent(window.event);\n\n // this basically happens in firefox whenever another script\n // overwrites the onload callback and doesn't pass the event\n // object to previously defined callbacks. All the browsers\n // that don't define window.event implement addEventListener\n // so the dom_loaded handler will still be fired as usual.\n if (!event) {\n return undefined;\n }\n\n var ret = true;\n var old_result, new_result;\n\n if (_.isFunction(old_handlers)) {\n old_result = old_handlers(event);\n }\n new_result = new_handler.call(element, event);\n\n if ((false === old_result) || (false === new_result)) {\n ret = false;\n }\n\n return ret;\n };\n\n return handler;\n }\n\n function fixEvent(event) {\n if (event) {\n event.preventDefault = fixEvent.preventDefault;\n event.stopPropagation = fixEvent.stopPropagation;\n }\n return event;\n }\n fixEvent.preventDefault = function() {\n this.returnValue = false;\n };\n fixEvent.stopPropagation = function() {\n this.cancelBubble = true;\n };\n\n return register_event;\n})();\n\n\nvar TOKEN_MATCH_REGEX = new RegExp('^(\\\\w*)\\\\[(\\\\w+)([=~\\\\|\\\\^\\\\$\\\\*]?)=?\"?([^\\\\]\"]*)\"?\\\\]$');\n\n_.dom_query = (function() {\n /* document.getElementsBySelector(selector)\n - returns an array of element objects from the current document\n matching the CSS selector. Selectors can contain element names,\n class names and ids and can be nested. For example:\n\n elements = document.getElementsBySelector('div#main p a.external')\n\n Will return an array of all 'a' elements with 'external' in their\n class attribute that are contained inside 'p' elements that are\n contained inside the 'div' element which has id=\"main\"\n\n New in version 0.4: Support for CSS2 and CSS3 attribute selectors:\n See http://www.w3.org/TR/css3-selectors/#attribute-selectors\n\n Version 0.4 - Simon Willison, March 25th 2003\n -- Works in Phoenix 0.5, Mozilla 1.3, Opera 7, Internet Explorer 6, Internet Explorer 5 on Windows\n -- Opera 7 fails\n\n Version 0.5 - Carl Sverre, Jan 7th 2013\n -- Now uses jQuery-esque `hasClass` for testing class name\n equality. This fixes a bug related to '-' characters being\n considered not part of a 'word' in regex.\n */\n\n function getAllChildren(e) {\n // Returns all children of element. Workaround required for IE5/Windows. Ugh.\n return e.all ? e.all : e.getElementsByTagName('*');\n }\n\n var bad_whitespace = /[\\t\\r\\n]/g;\n\n function hasClass(elem, selector) {\n var className = ' ' + selector + ' ';\n return ((' ' + elem.className + ' ').replace(bad_whitespace, ' ').indexOf(className) >= 0);\n }\n\n function getElementsBySelector(selector) {\n // Attempt to fail gracefully in lesser browsers\n if (!document$1.getElementsByTagName) {\n return [];\n }\n // Split selector in to tokens\n var tokens = selector.split(' ');\n var token, bits, tagName, found, foundCount, i, j, k, elements, currentContextIndex;\n var currentContext = [document$1];\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i].replace(/^\\s+/, '').replace(/\\s+$/, '');\n if (token.indexOf('#') > -1) {\n // Token is an ID selector\n bits = token.split('#');\n tagName = bits[0];\n var id = bits[1];\n var element = document$1.getElementById(id);\n if (!element || (tagName && element.nodeName.toLowerCase() != tagName)) {\n // element not found or tag with that ID not found, return false\n return [];\n }\n // Set currentContext to contain just this element\n currentContext = [element];\n continue; // Skip to next token\n }\n if (token.indexOf('.') > -1) {\n // Token contains a class selector\n bits = token.split('.');\n tagName = bits[0];\n var className = bits[1];\n if (!tagName) {\n tagName = '*';\n }\n // Get elements matching tag, filter them for class selector\n found = [];\n foundCount = 0;\n for (j = 0; j < currentContext.length; j++) {\n if (tagName == '*') {\n elements = getAllChildren(currentContext[j]);\n } else {\n elements = currentContext[j].getElementsByTagName(tagName);\n }\n for (k = 0; k < elements.length; k++) {\n found[foundCount++] = elements[k];\n }\n }\n currentContext = [];\n currentContextIndex = 0;\n for (j = 0; j < found.length; j++) {\n if (found[j].className &&\n _.isString(found[j].className) && // some SVG elements have classNames which are not strings\n hasClass(found[j], className)\n ) {\n currentContext[currentContextIndex++] = found[j];\n }\n }\n continue; // Skip to next token\n }\n // Code to deal with attribute selectors\n var token_match = token.match(TOKEN_MATCH_REGEX);\n if (token_match) {\n tagName = token_match[1];\n var attrName = token_match[2];\n var attrOperator = token_match[3];\n var attrValue = token_match[4];\n if (!tagName) {\n tagName = '*';\n }\n // Grab all of the tagName elements within current context\n found = [];\n foundCount = 0;\n for (j = 0; j < currentContext.length; j++) {\n if (tagName == '*') {\n elements = getAllChildren(currentContext[j]);\n } else {\n elements = currentContext[j].getElementsByTagName(tagName);\n }\n for (k = 0; k < elements.length; k++) {\n found[foundCount++] = elements[k];\n }\n }\n currentContext = [];\n currentContextIndex = 0;\n var checkFunction; // This function will be used to filter the elements\n switch (attrOperator) {\n case '=': // Equality\n checkFunction = function(e) {\n return (e.getAttribute(attrName) == attrValue);\n };\n break;\n case '~': // Match one of space seperated words\n checkFunction = function(e) {\n return (e.getAttribute(attrName).match(new RegExp('\\\\b' + attrValue + '\\\\b')));\n };\n break;\n case '|': // Match start with value followed by optional hyphen\n checkFunction = function(e) {\n return (e.getAttribute(attrName).match(new RegExp('^' + attrValue + '-?')));\n };\n break;\n case '^': // Match starts with value\n checkFunction = function(e) {\n return (e.getAttribute(attrName).indexOf(attrValue) === 0);\n };\n break;\n case '$': // Match ends with value - fails with \"Warning\" in Opera 7\n checkFunction = function(e) {\n return (e.getAttribute(attrName).lastIndexOf(attrValue) == e.getAttribute(attrName).length - attrValue.length);\n };\n break;\n case '*': // Match ends with value\n checkFunction = function(e) {\n return (e.getAttribute(attrName).indexOf(attrValue) > -1);\n };\n break;\n default:\n // Just test for existence of attribute\n checkFunction = function(e) {\n return e.getAttribute(attrName);\n };\n }\n currentContext = [];\n currentContextIndex = 0;\n for (j = 0; j < found.length; j++) {\n if (checkFunction(found[j])) {\n currentContext[currentContextIndex++] = found[j];\n }\n }\n // alert('Attribute Selector: '+tagName+' '+attrName+' '+attrOperator+' '+attrValue);\n continue; // Skip to next token\n }\n // If we get here, token is JUST an element (not a class or ID selector)\n tagName = token;\n found = [];\n foundCount = 0;\n for (j = 0; j < currentContext.length; j++) {\n elements = currentContext[j].getElementsByTagName(tagName);\n for (k = 0; k < elements.length; k++) {\n found[foundCount++] = elements[k];\n }\n }\n currentContext = found;\n }\n return currentContext;\n }\n\n return function(query) {\n if (_.isElement(query)) {\n return [query];\n } else if (_.isObject(query) && !_.isUndefined(query.length)) {\n return query;\n } else {\n return getElementsBySelector.call(this, query);\n }\n };\n})();\n\n_.info = {\n campaignParams: function() {\n var campaign_keywords = 'utm_source utm_medium utm_campaign utm_content utm_term'.split(' '),\n kw = '',\n params = {};\n _.each(campaign_keywords, function(kwkey) {\n kw = _.getQueryParam(document$1.URL, kwkey);\n if (kw.length) {\n params[kwkey] = kw;\n }\n });\n\n return params;\n },\n\n searchEngine: function(referrer) {\n if (referrer.search('https?://(.*)google.([^/?]*)') === 0) {\n return 'google';\n } else if (referrer.search('https?://(.*)bing.com') === 0) {\n return 'bing';\n } else if (referrer.search('https?://(.*)yahoo.com') === 0) {\n return 'yahoo';\n } else if (referrer.search('https?://(.*)duckduckgo.com') === 0) {\n return 'duckduckgo';\n } else {\n return null;\n }\n },\n\n searchInfo: function(referrer) {\n var search = _.info.searchEngine(referrer),\n param = (search != 'yahoo') ? 'q' : 'p',\n ret = {};\n\n if (search !== null) {\n ret['$search_engine'] = search;\n\n var keyword = _.getQueryParam(referrer, param);\n if (keyword.length) {\n ret['mp_keyword'] = keyword;\n }\n }\n\n return ret;\n },\n\n /**\n * This function detects which browser is running this script.\n * The order of the checks are important since many user agents\n * include key words used in later checks.\n */\n browser: function(user_agent, vendor, opera) {\n vendor = vendor || ''; // vendor is undefined for at least IE9\n if (opera || _.includes(user_agent, ' OPR/')) {\n if (_.includes(user_agent, 'Mini')) {\n return 'Opera Mini';\n }\n return 'Opera';\n } else if (/(BlackBerry|PlayBook|BB10)/i.test(user_agent)) {\n return 'BlackBerry';\n } else if (_.includes(user_agent, 'IEMobile') || _.includes(user_agent, 'WPDesktop')) {\n return 'Internet Explorer Mobile';\n } else if (_.includes(user_agent, 'SamsungBrowser/')) {\n // https://developer.samsung.com/internet/user-agent-string-format\n return 'Samsung Internet';\n } else if (_.includes(user_agent, 'Edge') || _.includes(user_agent, 'Edg/')) {\n return 'Microsoft Edge';\n } else if (_.includes(user_agent, 'FBIOS')) {\n return 'Facebook Mobile';\n } else if (_.includes(user_agent, 'Chrome')) {\n return 'Chrome';\n } else if (_.includes(user_agent, 'CriOS')) {\n return 'Chrome iOS';\n } else if (_.includes(user_agent, 'UCWEB') || _.includes(user_agent, 'UCBrowser')) {\n return 'UC Browser';\n } else if (_.includes(user_agent, 'FxiOS')) {\n return 'Firefox iOS';\n } else if (_.includes(vendor, 'Apple')) {\n if (_.includes(user_agent, 'Mobile')) {\n return 'Mobile Safari';\n }\n return 'Safari';\n } else if (_.includes(user_agent, 'Android')) {\n return 'Android Mobile';\n } else if (_.includes(user_agent, 'Konqueror')) {\n return 'Konqueror';\n } else if (_.includes(user_agent, 'Firefox')) {\n return 'Firefox';\n } else if (_.includes(user_agent, 'MSIE') || _.includes(user_agent, 'Trident/')) {\n return 'Internet Explorer';\n } else if (_.includes(user_agent, 'Gecko')) {\n return 'Mozilla';\n } else {\n return '';\n }\n },\n\n /**\n * This function detects which browser version is running this script,\n * parsing major and minor version (e.g., 42.1). User agent strings from:\n * http://www.useragentstring.com/pages/useragentstring.php\n */\n browserVersion: function(userAgent, vendor, opera) {\n var browser = _.info.browser(userAgent, vendor, opera);\n var versionRegexs = {\n 'Internet Explorer Mobile': /rv:(\\d+(\\.\\d+)?)/,\n 'Microsoft Edge': /Edge?\\/(\\d+(\\.\\d+)?)/,\n 'Chrome': /Chrome\\/(\\d+(\\.\\d+)?)/,\n 'Chrome iOS': /CriOS\\/(\\d+(\\.\\d+)?)/,\n 'UC Browser' : /(UCBrowser|UCWEB)\\/(\\d+(\\.\\d+)?)/,\n 'Safari': /Version\\/(\\d+(\\.\\d+)?)/,\n 'Mobile Safari': /Version\\/(\\d+(\\.\\d+)?)/,\n 'Opera': /(Opera|OPR)\\/(\\d+(\\.\\d+)?)/,\n 'Firefox': /Firefox\\/(\\d+(\\.\\d+)?)/,\n 'Firefox iOS': /FxiOS\\/(\\d+(\\.\\d+)?)/,\n 'Konqueror': /Konqueror:(\\d+(\\.\\d+)?)/,\n 'BlackBerry': /BlackBerry (\\d+(\\.\\d+)?)/,\n 'Android Mobile': /android\\s(\\d+(\\.\\d+)?)/,\n 'Samsung Internet': /SamsungBrowser\\/(\\d+(\\.\\d+)?)/,\n 'Internet Explorer': /(rv:|MSIE )(\\d+(\\.\\d+)?)/,\n 'Mozilla': /rv:(\\d+(\\.\\d+)?)/\n };\n var regex = versionRegexs[browser];\n if (regex === undefined) {\n return null;\n }\n var matches = userAgent.match(regex);\n if (!matches) {\n return null;\n }\n return parseFloat(matches[matches.length - 2]);\n },\n\n os: function() {\n var a = userAgent;\n if (/Windows/i.test(a)) {\n if (/Phone/.test(a) || /WPDesktop/.test(a)) {\n return 'Windows Phone';\n }\n return 'Windows';\n } else if (/(iPhone|iPad|iPod)/.test(a)) {\n return 'iOS';\n } else if (/Android/.test(a)) {\n return 'Android';\n } else if (/(BlackBerry|PlayBook|BB10)/i.test(a)) {\n return 'BlackBerry';\n } else if (/Mac/i.test(a)) {\n return 'Mac OS X';\n } else if (/Linux/.test(a)) {\n return 'Linux';\n } else if (/CrOS/.test(a)) {\n return 'Chrome OS';\n } else {\n return '';\n }\n },\n\n device: function(user_agent) {\n if (/Windows Phone/i.test(user_agent) || /WPDesktop/.test(user_agent)) {\n return 'Windows Phone';\n } else if (/iPad/.test(user_agent)) {\n return 'iPad';\n } else if (/iPod/.test(user_agent)) {\n return 'iPod Touch';\n } else if (/iPhone/.test(user_agent)) {\n return 'iPhone';\n } else if (/(BlackBerry|PlayBook|BB10)/i.test(user_agent)) {\n return 'BlackBerry';\n } else if (/Android/.test(user_agent)) {\n return 'Android';\n } else {\n return '';\n }\n },\n\n referringDomain: function(referrer) {\n var split = referrer.split('/');\n if (split.length >= 3) {\n return split[2];\n }\n return '';\n },\n\n properties: function() {\n return _.extend(_.strip_empty_properties({\n '$os': _.info.os(),\n '$browser': _.info.browser(userAgent, navigator.vendor, windowOpera),\n '$referrer': document$1.referrer,\n '$referring_domain': _.info.referringDomain(document$1.referrer),\n '$device': _.info.device(userAgent)\n }), {\n '$current_url': window$1.location.href,\n '$browser_version': _.info.browserVersion(userAgent, navigator.vendor, windowOpera),\n '$screen_height': screen.height,\n '$screen_width': screen.width,\n 'mp_lib': 'web',\n '$lib_version': Config.LIB_VERSION,\n '$insert_id': cheap_guid(),\n 'time': _.timestamp() / 1000 // epoch time in seconds\n });\n },\n\n people_properties: function() {\n return _.extend(_.strip_empty_properties({\n '$os': _.info.os(),\n '$browser': _.info.browser(userAgent, navigator.vendor, windowOpera)\n }), {\n '$browser_version': _.info.browserVersion(userAgent, navigator.vendor, windowOpera)\n });\n },\n\n pageviewInfo: function(page) {\n return _.strip_empty_properties({\n 'mp_page': page,\n 'mp_referrer': document$1.referrer,\n 'mp_browser': _.info.browser(userAgent, navigator.vendor, windowOpera),\n 'mp_platform': _.info.os()\n });\n }\n};\n\nvar cheap_guid = function(maxlen) {\n var guid = Math.random().toString(36).substring(2, 10) + Math.random().toString(36).substring(2, 10);\n return maxlen ? guid.substring(0, maxlen) : guid;\n};\n\n// naive way to extract domain name (example.com) from full hostname (my.sub.example.com)\nvar SIMPLE_DOMAIN_MATCH_REGEX = /[a-z0-9][a-z0-9-]*\\.[a-z]+$/i;\n// this next one attempts to account for some ccSLDs, e.g. extracting oxford.ac.uk from www.oxford.ac.uk\nvar DOMAIN_MATCH_REGEX = /[a-z0-9][a-z0-9-]+\\.[a-z.]{2,6}$/i;\n/**\n * Attempts to extract main domain name from full hostname, using a few blunt heuristics. For\n * common TLDs like .com/.org that always have a simple SLD.TLD structure (example.com), we\n * simply extract the last two .-separated parts of the hostname (SIMPLE_DOMAIN_MATCH_REGEX).\n * For others, we attempt to account for short ccSLD+TLD combos (.ac.uk) with the legacy\n * DOMAIN_MATCH_REGEX (kept to maintain backwards compatibility with existing Mixpanel\n * integrations). The only _reliable_ way to extract domain from hostname is with an up-to-date\n * list like at https://publicsuffix.org/ so for cases that this helper fails at, the SDK\n * offers the 'cookie_domain' config option to set it explicitly.\n * @example\n * extract_domain('my.sub.example.com')\n * // 'example.com'\n */\nvar extract_domain = function(hostname) {\n var domain_regex = DOMAIN_MATCH_REGEX;\n var parts = hostname.split('.');\n var tld = parts[parts.length - 1];\n if (tld.length > 4 || tld === 'com' || tld === 'org') {\n domain_regex = SIMPLE_DOMAIN_MATCH_REGEX;\n }\n var matches = hostname.match(domain_regex);\n return matches ? matches[0] : '';\n};\n\nvar JSONStringify = null;\nvar JSONParse = null;\nif (typeof JSON !== 'undefined') {\n JSONStringify = JSON.stringify;\n JSONParse = JSON.parse;\n}\nJSONStringify = JSONStringify || _.JSONEncode;\nJSONParse = JSONParse || _.JSONDecode;\n\n// EXPORTS (for closure compiler)\n_['toArray'] = _.toArray;\n_['isObject'] = _.isObject;\n_['JSONEncode'] = _.JSONEncode;\n_['JSONDecode'] = _.JSONDecode;\n_['isBlockedUA'] = _.isBlockedUA;\n_['isEmptyObject'] = _.isEmptyObject;\n_['info'] = _.info;\n_['info']['device'] = _.info.device;\n_['info']['browser'] = _.info.browser;\n_['info']['browserVersion'] = _.info.browserVersion;\n_['info']['properties'] = _.info.properties;\n\n/**\n * DomTracker Object\n * @constructor\n */\nvar DomTracker = function() {};\n\n\n// interface\nDomTracker.prototype.create_properties = function() {};\nDomTracker.prototype.event_handler = function() {};\nDomTracker.prototype.after_track_handler = function() {};\n\nDomTracker.prototype.init = function(mixpanel_instance) {\n this.mp = mixpanel_instance;\n return this;\n};\n\n/**\n * @param {Object|string} query\n * @param {string} event_name\n * @param {Object=} properties\n * @param {function=} user_callback\n */\nDomTracker.prototype.track = function(query, event_name, properties, user_callback) {\n var that = this;\n var elements = _.dom_query(query);\n\n if (elements.length === 0) {\n console.error('The DOM query (' + query + ') returned 0 elements');\n return;\n }\n\n _.each(elements, function(element) {\n _.register_event(element, this.override_event, function(e) {\n var options = {};\n var props = that.create_properties(properties, this);\n var timeout = that.mp.get_config('track_links_timeout');\n\n that.event_handler(e, this, options);\n\n // in case the mixpanel servers don't get back to us in time\n window.setTimeout(that.track_callback(user_callback, props, options, true), timeout);\n\n // fire the tracking event\n that.mp.track(event_name, props, that.track_callback(user_callback, props, options));\n });\n }, this);\n\n return true;\n};\n\n/**\n * @param {function} user_callback\n * @param {Object} props\n * @param {boolean=} timeout_occured\n */\nDomTracker.prototype.track_callback = function(user_callback, props, options, timeout_occured) {\n timeout_occured = timeout_occured || false;\n var that = this;\n\n return function() {\n // options is referenced from both callbacks, so we can have\n // a 'lock' of sorts to ensure only one fires\n if (options.callback_fired) { return; }\n options.callback_fired = true;\n\n if (user_callback && user_callback(timeout_occured, props) === false) {\n // user can prevent the default functionality by\n // returning false from their callback\n return;\n }\n\n that.after_track_handler(props, options, timeout_occured);\n };\n};\n\nDomTracker.prototype.create_properties = function(properties, element) {\n var props;\n\n if (typeof(properties) === 'function') {\n props = properties(element);\n } else {\n props = _.extend({}, properties);\n }\n\n return props;\n};\n\n/**\n * LinkTracker Object\n * @constructor\n * @extends DomTracker\n */\nvar LinkTracker = function() {\n this.override_event = 'click';\n};\n_.inherit(LinkTracker, DomTracker);\n\nLinkTracker.prototype.create_properties = function(properties, element) {\n var props = LinkTracker.superclass.create_properties.apply(this, arguments);\n\n if (element.href) { props['url'] = element.href; }\n\n return props;\n};\n\nLinkTracker.prototype.event_handler = function(evt, element, options) {\n options.new_tab = (\n evt.which === 2 ||\n evt.metaKey ||\n evt.ctrlKey ||\n element.target === '_blank'\n );\n options.href = element.href;\n\n if (!options.new_tab) {\n evt.preventDefault();\n }\n};\n\nLinkTracker.prototype.after_track_handler = function(props, options) {\n if (options.new_tab) { return; }\n\n setTimeout(function() {\n window.location = options.href;\n }, 0);\n};\n\n/**\n * FormTracker Object\n * @constructor\n * @extends DomTracker\n */\nvar FormTracker = function() {\n this.override_event = 'submit';\n};\n_.inherit(FormTracker, DomTracker);\n\nFormTracker.prototype.event_handler = function(evt, element, options) {\n options.element = element;\n evt.preventDefault();\n};\n\nFormTracker.prototype.after_track_handler = function(props, options) {\n setTimeout(function() {\n options.element.submit();\n }, 0);\n};\n\n// eslint-disable-line camelcase\n\nvar logger$2 = console_with_prefix('lock');\n\n/**\n * SharedLock: a mutex built on HTML5 localStorage, to ensure that only one browser\n * window/tab at a time will be able to access shared resources.\n *\n * Based on the Alur and Taubenfeld fast lock\n * (http://www.cs.rochester.edu/research/synchronization/pseudocode/fastlock.html)\n * with an added timeout to ensure there will be eventual progress in the event\n * that a window is closed in the middle of the callback.\n *\n * Implementation based on the original version by David Wolever (https://github.com/wolever)\n * at https://gist.github.com/wolever/5fd7573d1ef6166e8f8c4af286a69432.\n *\n * @example\n * const myLock = new SharedLock('some-key');\n * myLock.withLock(function() {\n * console.log('I hold the mutex!');\n * });\n *\n * @constructor\n */\nvar SharedLock = function(key, options) {\n options = options || {};\n\n this.storageKey = key;\n this.storage = options.storage || window.localStorage;\n this.pollIntervalMS = options.pollIntervalMS || 100;\n this.timeoutMS = options.timeoutMS || 2000;\n};\n\n// pass in a specific pid to test contention scenarios; otherwise\n// it is chosen randomly for each acquisition attempt\nSharedLock.prototype.withLock = function(lockedCB, errorCB, pid) {\n if (!pid && typeof errorCB !== 'function') {\n pid = errorCB;\n errorCB = null;\n }\n\n var i = pid || (new Date().getTime() + '|' + Math.random());\n var startTime = new Date().getTime();\n\n var key = this.storageKey;\n var pollIntervalMS = this.pollIntervalMS;\n var timeoutMS = this.timeoutMS;\n var storage = this.storage;\n\n var keyX = key + ':X';\n var keyY = key + ':Y';\n var keyZ = key + ':Z';\n\n var reportError = function(err) {\n errorCB && errorCB(err);\n };\n\n var delay = function(cb) {\n if (new Date().getTime() - startTime > timeoutMS) {\n logger$2.error('Timeout waiting for mutex on ' + key + '; clearing lock. [' + i + ']');\n storage.removeItem(keyZ);\n storage.removeItem(keyY);\n loop();\n return;\n }\n setTimeout(function() {\n try {\n cb();\n } catch(err) {\n reportError(err);\n }\n }, pollIntervalMS * (Math.random() + 0.1));\n };\n\n var waitFor = function(predicate, cb) {\n if (predicate()) {\n cb();\n } else {\n delay(function() {\n waitFor(predicate, cb);\n });\n }\n };\n\n var getSetY = function() {\n var valY = storage.getItem(keyY);\n if (valY && valY !== i) { // if Y == i then this process already has the lock (useful for test cases)\n return false;\n } else {\n storage.setItem(keyY, i);\n if (storage.getItem(keyY) === i) {\n return true;\n } else {\n if (!localStorageSupported(storage, true)) {\n throw new Error('localStorage support dropped while acquiring lock');\n }\n return false;\n }\n }\n };\n\n var loop = function() {\n storage.setItem(keyX, i);\n\n waitFor(getSetY, function() {\n if (storage.getItem(keyX) === i) {\n criticalSection();\n return;\n }\n\n delay(function() {\n if (storage.getItem(keyY) !== i) {\n loop();\n return;\n }\n waitFor(function() {\n return !storage.getItem(keyZ);\n }, criticalSection);\n });\n });\n };\n\n var criticalSection = function() {\n storage.setItem(keyZ, '1');\n try {\n lockedCB();\n } finally {\n storage.removeItem(keyZ);\n if (storage.getItem(keyY) === i) {\n storage.removeItem(keyY);\n }\n if (storage.getItem(keyX) === i) {\n storage.removeItem(keyX);\n }\n }\n };\n\n try {\n if (localStorageSupported(storage, true)) {\n loop();\n } else {\n throw new Error('localStorage support check failed');\n }\n } catch(err) {\n reportError(err);\n }\n};\n\n// eslint-disable-line camelcase\n\nvar logger$1 = console_with_prefix('batch');\n\n/**\n * RequestQueue: queue for batching API requests with localStorage backup for retries.\n * Maintains an in-memory queue which represents the source of truth for the current\n * page, but also writes all items out to a copy in the browser's localStorage, which\n * can be read on subsequent pageloads and retried. For batchability, all the request\n * items in the queue should be of the same type (events, people updates, group updates)\n * so they can be sent in a single request to the same API endpoint.\n *\n * LocalStorage keying and locking: In order for reloads and subsequent pageloads of\n * the same site to access the same persisted data, they must share the same localStorage\n * key (for instance based on project token and queue type). Therefore access to the\n * localStorage entry is guarded by an asynchronous mutex (SharedLock) to prevent\n * simultaneously open windows/tabs from overwriting each other's data (which would lead\n * to data loss in some situations).\n * @constructor\n */\nvar RequestQueue = function(storageKey, options) {\n options = options || {};\n this.storageKey = storageKey;\n this.storage = options.storage || window.localStorage;\n this.reportError = options.errorReporter || _.bind(logger$1.error, logger$1);\n this.lock = new SharedLock(storageKey, {storage: this.storage});\n\n this.pid = options.pid || null; // pass pid to test out storage lock contention scenarios\n\n this.memQueue = [];\n};\n\n/**\n * Add one item to queues (memory and localStorage). The queued entry includes\n * the given item along with an auto-generated ID and a \"flush-after\" timestamp.\n * It is expected that the item will be sent over the network and dequeued\n * before the flush-after time; if this doesn't happen it is considered orphaned\n * (e.g., the original tab where it was enqueued got closed before it could be\n * sent) and the item can be sent by any tab that finds it in localStorage.\n *\n * The final callback param is called with a param indicating success or\n * failure of the enqueue operation; it is asynchronous because the localStorage\n * lock is asynchronous.\n */\nRequestQueue.prototype.enqueue = function(item, flushInterval, cb) {\n var queueEntry = {\n 'id': cheap_guid(),\n 'flushAfter': new Date().getTime() + flushInterval * 2,\n 'payload': item\n };\n\n this.lock.withLock(_.bind(function lockAcquired() {\n var succeeded;\n try {\n var storedQueue = this.readFromStorage();\n storedQueue.push(queueEntry);\n succeeded = this.saveToStorage(storedQueue);\n if (succeeded) {\n // only add to in-memory queue when storage succeeds\n this.memQueue.push(queueEntry);\n }\n } catch(err) {\n this.reportError('Error enqueueing item', item);\n succeeded = false;\n }\n if (cb) {\n cb(succeeded);\n }\n }, this), _.bind(function lockFailure(err) {\n this.reportError('Error acquiring storage lock', err);\n if (cb) {\n cb(false);\n }\n }, this), this.pid);\n};\n\n/**\n * Read out the given number of queue entries. If this.memQueue\n * has fewer than batchSize items, then look for \"orphaned\" items\n * in the persisted queue (items where the 'flushAfter' time has\n * already passed).\n */\nRequestQueue.prototype.fillBatch = function(batchSize) {\n var batch = this.memQueue.slice(0, batchSize);\n if (batch.length < batchSize) {\n // don't need lock just to read events; localStorage is thread-safe\n // and the worst that could happen is a duplicate send of some\n // orphaned events, which will be deduplicated on the server side\n var storedQueue = this.readFromStorage();\n if (storedQueue.length) {\n // item IDs already in batch; don't duplicate out of storage\n var idsInBatch = {}; // poor man's Set\n _.each(batch, function(item) { idsInBatch[item['id']] = true; });\n\n for (var i = 0; i < storedQueue.length; i++) {\n var item = storedQueue[i];\n if (new Date().getTime() > item['flushAfter'] && !idsInBatch[item['id']]) {\n item.orphaned = true;\n batch.push(item);\n if (batch.length >= batchSize) {\n break;\n }\n }\n }\n }\n }\n return batch;\n};\n\n/**\n * Remove items with matching 'id' from array (immutably)\n * also remove any item without a valid id (e.g., malformed\n * storage entries).\n */\nvar filterOutIDsAndInvalid = function(items, idSet) {\n var filteredItems = [];\n _.each(items, function(item) {\n if (item['id'] && !idSet[item['id']]) {\n filteredItems.push(item);\n }\n });\n return filteredItems;\n};\n\n/**\n * Remove items with matching IDs from both in-memory queue\n * and persisted queue\n */\nRequestQueue.prototype.removeItemsByID = function(ids, cb) {\n var idSet = {}; // poor man's Set\n _.each(ids, function(id) { idSet[id] = true; });\n\n this.memQueue = filterOutIDsAndInvalid(this.memQueue, idSet);\n\n var removeFromStorage = _.bind(function() {\n var succeeded;\n try {\n var storedQueue = this.readFromStorage();\n storedQueue = filterOutIDsAndInvalid(storedQueue, idSet);\n succeeded = this.saveToStorage(storedQueue);\n\n // an extra check: did storage report success but somehow\n // the items are still there?\n if (succeeded) {\n storedQueue = this.readFromStorage();\n for (var i = 0; i < storedQueue.length; i++) {\n var item = storedQueue[i];\n if (item['id'] && !!idSet[item['id']]) {\n this.reportError('Item not removed from storage');\n return false;\n }\n }\n }\n } catch(err) {\n this.reportError('Error removing items', ids);\n succeeded = false;\n }\n return succeeded;\n }, this);\n\n this.lock.withLock(function lockAcquired() {\n var succeeded = removeFromStorage();\n if (cb) {\n cb(succeeded);\n }\n }, _.bind(function lockFailure(err) {\n var succeeded = false;\n this.reportError('Error acquiring storage lock', err);\n if (!localStorageSupported(this.storage, true)) {\n // Looks like localStorage writes have stopped working sometime after\n // initialization (probably full), and so nobody can acquire locks\n // anymore. Consider it temporarily safe to remove items without the\n // lock, since nobody's writing successfully anyway.\n succeeded = removeFromStorage();\n if (!succeeded) {\n // OK, we couldn't even write out the smaller queue. Try clearing it\n // entirely.\n try {\n this.storage.removeItem(this.storageKey);\n } catch(err) {\n this.reportError('Error clearing queue', err);\n }\n }\n }\n if (cb) {\n cb(succeeded);\n }\n }, this), this.pid);\n};\n\n// internal helper for RequestQueue.updatePayloads\nvar updatePayloads = function(existingItems, itemsToUpdate) {\n var newItems = [];\n _.each(existingItems, function(item) {\n var id = item['id'];\n if (id in itemsToUpdate) {\n var newPayload = itemsToUpdate[id];\n if (newPayload !== null) {\n item['payload'] = newPayload;\n newItems.push(item);\n }\n } else {\n // no update\n newItems.push(item);\n }\n });\n return newItems;\n};\n\n/**\n * Update payloads of given items in both in-memory queue and\n * persisted queue. Items set to null are removed from queues.\n */\nRequestQueue.prototype.updatePayloads = function(itemsToUpdate, cb) {\n this.memQueue = updatePayloads(this.memQueue, itemsToUpdate);\n this.lock.withLock(_.bind(function lockAcquired() {\n var succeeded;\n try {\n var storedQueue = this.readFromStorage();\n storedQueue = updatePayloads(storedQueue, itemsToUpdate);\n succeeded = this.saveToStorage(storedQueue);\n } catch(err) {\n this.reportError('Error updating items', itemsToUpdate);\n succeeded = false;\n }\n if (cb) {\n cb(succeeded);\n }\n }, this), _.bind(function lockFailure(err) {\n this.reportError('Error acquiring storage lock', err);\n if (cb) {\n cb(false);\n }\n }, this), this.pid);\n};\n\n/**\n * Read and parse items array from localStorage entry, handling\n * malformed/missing data if necessary.\n */\nRequestQueue.prototype.readFromStorage = function() {\n var storageEntry;\n try {\n storageEntry = this.storage.getItem(this.storageKey);\n if (storageEntry) {\n storageEntry = JSONParse(storageEntry);\n if (!_.isArray(storageEntry)) {\n this.reportError('Invalid storage entry:', storageEntry);\n storageEntry = null;\n }\n }\n } catch (err) {\n this.reportError('Error retrieving queue', err);\n storageEntry = null;\n }\n return storageEntry || [];\n};\n\n/**\n * Serialize the given items array to localStorage.\n */\nRequestQueue.prototype.saveToStorage = function(queue) {\n try {\n this.storage.setItem(this.storageKey, JSONStringify(queue));\n return true;\n } catch (err) {\n this.reportError('Error saving queue', err);\n return false;\n }\n};\n\n/**\n * Clear out queues (memory and localStorage).\n */\nRequestQueue.prototype.clear = function() {\n this.memQueue = [];\n this.storage.removeItem(this.storageKey);\n};\n\n// eslint-disable-line camelcase\n\n// maximum interval between request retries after exponential backoff\nvar MAX_RETRY_INTERVAL_MS = 10 * 60 * 1000; // 10 minutes\n\nvar logger = console_with_prefix('batch');\n\n/**\n * RequestBatcher: manages the queueing, flushing, retry etc of requests of one\n * type (events, people, groups).\n * Uses RequestQueue to manage the backing store.\n * @constructor\n */\nvar RequestBatcher = function(storageKey, options) {\n this.errorReporter = options.errorReporter;\n this.queue = new RequestQueue(storageKey, {\n errorReporter: _.bind(this.reportError, this),\n storage: options.storage\n });\n\n this.libConfig = options.libConfig;\n this.sendRequest = options.sendRequestFunc;\n this.beforeSendHook = options.beforeSendHook;\n this.stopAllBatching = options.stopAllBatchingFunc;\n\n // seed variable batch size + flush interval with configured values\n this.batchSize = this.libConfig['batch_size'];\n this.flushInterval = this.libConfig['batch_flush_interval_ms'];\n\n this.stopped = !this.libConfig['batch_autostart'];\n this.consecutiveRemovalFailures = 0;\n};\n\n/**\n * Add one item to queue.\n */\nRequestBatcher.prototype.enqueue = function(item, cb) {\n this.queue.enqueue(item, this.flushInterval, cb);\n};\n\n/**\n * Start flushing batches at the configured time interval. Must call\n * this method upon SDK init in order to send anything over the network.\n */\nRequestBatcher.prototype.start = function() {\n this.stopped = false;\n this.consecutiveRemovalFailures = 0;\n this.flush();\n};\n\n/**\n * Stop flushing batches. Can be restarted by calling start().\n */\nRequestBatcher.prototype.stop = function() {\n this.stopped = true;\n if (this.timeoutID) {\n clearTimeout(this.timeoutID);\n this.timeoutID = null;\n }\n};\n\n/**\n * Clear out queue.\n */\nRequestBatcher.prototype.clear = function() {\n this.queue.clear();\n};\n\n/**\n * Restore batch size configuration to whatever is set in the main SDK.\n */\nRequestBatcher.prototype.resetBatchSize = function() {\n this.batchSize = this.libConfig['batch_size'];\n};\n\n/**\n * Restore flush interval time configuration to whatever is set in the main SDK.\n */\nRequestBatcher.prototype.resetFlush = function() {\n this.scheduleFlush(this.libConfig['batch_flush_interval_ms']);\n};\n\n/**\n * Schedule the next flush in the given number of milliseconds.\n */\nRequestBatcher.prototype.scheduleFlush = function(flushMS) {\n this.flushInterval = flushMS;\n if (!this.stopped) { // don't schedule anymore if batching has been stopped\n this.timeoutID = setTimeout(_.bind(this.flush, this), this.flushInterval);\n }\n};\n\n/**\n * Flush one batch to network. Depending on success/failure modes, it will either\n * remove the batch from the queue or leave it in for retry, and schedule the next\n * flush. In cases of most network or API failures, it will back off exponentially\n * when retrying.\n * @param {Object} [options]\n * @param {boolean} [options.sendBeacon] - whether to send batch with\n * navigator.sendBeacon (only useful for sending batches before page unloads, as\n * sendBeacon offers no callbacks or status indications)\n */\nRequestBatcher.prototype.flush = function(options) {\n try {\n\n if (this.requestInProgress) {\n logger.log('Flush: Request already in progress');\n return;\n }\n\n options = options || {};\n var timeoutMS = this.libConfig['batch_request_timeout_ms'];\n var startTime = new Date().getTime();\n var currentBatchSize = this.batchSize;\n var batch = this.queue.fillBatch(currentBatchSize);\n var dataForRequest = [];\n var transformedItems = {};\n _.each(batch, function(item) {\n var payload = item['payload'];\n if (this.beforeSendHook && !item.orphaned) {\n payload = this.beforeSendHook(payload);\n }\n if (payload) {\n dataForRequest.push(payload);\n }\n transformedItems[item['id']] = payload;\n }, this);\n if (dataForRequest.length < 1) {\n this.resetFlush();\n return; // nothing to do\n }\n\n this.requestInProgress = true;\n\n var batchSendCallback = _.bind(function(res) {\n this.requestInProgress = false;\n\n try {\n\n // handle API response in a try-catch to make sure we can reset the\n // flush operation if something goes wrong\n\n var removeItemsFromQueue = false;\n if (options.unloading) {\n // update persisted data to include hook transformations\n this.queue.updatePayloads(transformedItems);\n } else if (\n _.isObject(res) &&\n res.error === 'timeout' &&\n new Date().getTime() - startTime >= timeoutMS\n ) {\n this.reportError('Network timeout; retrying');\n this.flush();\n } else if (\n _.isObject(res) &&\n res.xhr_req &&\n (res.xhr_req['status'] >= 500 || res.xhr_req['status'] === 429 || res.error === 'timeout')\n ) {\n // network or API error, or 429 Too Many Requests, retry\n var retryMS = this.flushInterval * 2;\n var headers = res.xhr_req['responseHeaders'];\n if (headers) {\n var retryAfter = headers['Retry-After'];\n if (retryAfter) {\n retryMS = (parseInt(retryAfter, 10) * 1000) || retryMS;\n }\n }\n retryMS = Math.min(MAX_RETRY_INTERVAL_MS, retryMS);\n this.reportError('Error; retry in ' + retryMS + ' ms');\n this.scheduleFlush(retryMS);\n } else if (_.isObject(res) && res.xhr_req && res.xhr_req['status'] === 413) {\n // 413 Payload Too Large\n if (batch.length > 1) {\n var halvedBatchSize = Math.max(1, Math.floor(currentBatchSize / 2));\n this.batchSize = Math.min(this.batchSize, halvedBatchSize, batch.length - 1);\n this.reportError('413 response; reducing batch size to ' + this.batchSize);\n this.resetFlush();\n } else {\n this.reportError('Single-event request too large; dropping', batch);\n this.resetBatchSize();\n removeItemsFromQueue = true;\n }\n } else {\n // successful network request+response; remove each item in batch from queue\n // (even if it was e.g. a 400, in which case retrying won't help)\n removeItemsFromQueue = true;\n }\n\n if (removeItemsFromQueue) {\n this.queue.removeItemsByID(\n _.map(batch, function(item) { return item['id']; }),\n _.bind(function(succeeded) {\n if (succeeded) {\n this.consecutiveRemovalFailures = 0;\n this.flush(); // handle next batch if the queue isn't empty\n } else {\n this.reportError('Failed to remove items from queue');\n if (++this.consecutiveRemovalFailures > 5) {\n this.reportError('Too many queue failures; disabling batching system.');\n this.stopAllBatching();\n } else {\n this.resetFlush();\n }\n }\n }, this)\n );\n }\n\n } catch(err) {\n this.reportError('Error handling API response', err);\n this.resetFlush();\n }\n }, this);\n var requestOptions = {\n method: 'POST',\n verbose: true,\n ignore_json_errors: true, // eslint-disable-line camelcase\n timeout_ms: timeoutMS // eslint-disable-line camelcase\n };\n if (options.unloading) {\n requestOptions.transport = 'sendBeacon';\n }\n logger.log('MIXPANEL REQUEST:', dataForRequest);\n this.sendRequest(dataForRequest, requestOptions, batchSendCallback);\n\n } catch(err) {\n this.reportError('Error flushing request queue', err);\n this.resetFlush();\n }\n};\n\n/**\n * Log error to global logger and optional user-defined logger.\n */\nRequestBatcher.prototype.reportError = function(msg, err) {\n logger.error.apply(logger.error, arguments);\n if (this.errorReporter) {\n try {\n if (!(err instanceof Error)) {\n err = new Error(msg);\n }\n this.errorReporter(msg, err);\n } catch(err) {\n logger.error(err);\n }\n }\n};\n\n/**\n * A function used to track a Mixpanel event (e.g. MixpanelLib.track)\n * @callback trackFunction\n * @param {String} event_name The name of the event. This can be anything the user does - 'Button Click', 'Sign Up', 'Item Purchased', etc.\n * @param {Object} [properties] A set of properties to include with the event you're sending. These describe the user who did the event or details about the event itself.\n * @param {Function} [callback] If provided, the callback function will be called after tracking the event.\n */\n\n/** Public **/\n\nvar GDPR_DEFAULT_PERSISTENCE_PREFIX = '__mp_opt_in_out_';\n\n/**\n * Opt the user in to data tracking and cookies/localstorage for the given token\n * @param {string} token - Mixpanel project tracking token\n * @param {Object} [options]\n * @param {trackFunction} [options.track] - function used for tracking a Mixpanel event to record the opt-in action\n * @param {string} [options.trackEventName] - event name to be used for tracking the opt-in action\n * @param {Object} [options.trackProperties] - set of properties to be tracked along with the opt-in action\n * @param {string} [options.persistenceType] Persistence mechanism used - cookie or localStorage\n * @param {string} [options.persistencePrefix=__mp_opt_in_out] - custom prefix to be used in the cookie/localstorage name\n * @param {Number} [options.cookieExpiration] - number of days until the opt-in cookie expires\n * @param {string} [options.cookieDomain] - custom cookie domain\n * @param {boolean} [options.crossSiteCookie] - whether the opt-in cookie is set as cross-site-enabled\n * @param {boolean} [options.crossSubdomainCookie] - whether the opt-in cookie is set as cross-subdomain or not\n * @param {boolean} [options.secureCookie] - whether the opt-in cookie is set as secure or not\n */\nfunction optIn(token, options) {\n _optInOut(true, token, options);\n}\n\n/**\n * Opt the user out of data tracking and cookies/localstorage for the given token\n * @param {string} token - Mixpanel project tracking token\n * @param {Object} [options]\n * @param {string} [options.persistenceType] Persistence mechanism used - cookie or localStorage\n * @param {string} [options.persistencePrefix=__mp_opt_in_out] - custom prefix to be used in the cookie/localstorage name\n * @param {Number} [options.cookieExpiration] - number of days until the opt-out cookie expires\n * @param {string} [options.cookieDomain] - custom cookie domain\n * @param {boolean} [options.crossSiteCookie] - whether the opt-in cookie is set as cross-site-enabled\n * @param {boolean} [options.crossSubdomainCookie] - whether the opt-out cookie is set as cross-subdomain or not\n * @param {boolean} [options.secureCookie] - whether the opt-out cookie is set as secure or not\n */\nfunction optOut(token, options) {\n _optInOut(false, token, options);\n}\n\n/**\n * Check whether the user has opted in to data tracking and cookies/localstorage for the given token\n * @param {string} token - Mixpanel project tracking token\n * @param {Object} [options]\n * @param {string} [options.persistenceType] Persistence mechanism used - cookie or localStorage\n * @param {string} [options.persistencePrefix=__mp_opt_in_out] - custom prefix to be used in the cookie/localstorage name\n * @returns {boolean} whether the user has opted in to the given opt type\n */\nfunction hasOptedIn(token, options) {\n return _getStorageValue(token, options) === '1';\n}\n\n/**\n * Check whether the user has opted out of data tracking and cookies/localstorage for the given token\n * @param {string} token - Mixpanel project tracking token\n * @param {Object} [options]\n * @param {string} [options.persistenceType] Persistence mechanism used - cookie or localStorage\n * @param {string} [options.persistencePrefix=__mp_opt_in_out] - custom prefix to be used in the cookie/localstorage name\n * @param {boolean} [options.ignoreDnt] - flag to ignore browser DNT settings and always return false\n * @returns {boolean} whether the user has opted out of the given opt type\n */\nfunction hasOptedOut(token, options) {\n if (_hasDoNotTrackFlagOn(options)) {\n console.warn('This browser has \"Do Not Track\" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the \"Do Not Track\" browser setting, initialize the Mixpanel instance with the config \"ignore_dnt: true\"');\n return true;\n }\n var optedOut = _getStorageValue(token, options) === '0';\n if (optedOut) {\n console.warn('You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data.');\n }\n return optedOut;\n}\n\n/**\n * Wrap a MixpanelLib method with a check for whether the user is opted out of data tracking and cookies/localstorage for the given token\n * If the user has opted out, return early instead of executing the method.\n * If a callback argument was provided, execute it passing the 0 error code.\n * @param {function} method - wrapped method to be executed if the user has not opted out\n * @returns {*} the result of executing method OR undefined if the user has opted out\n */\nfunction addOptOutCheckMixpanelLib(method) {\n return _addOptOutCheck(method, function(name) {\n return this.get_config(name);\n });\n}\n\n/**\n * Wrap a MixpanelPeople method with a check for whether the user is opted out of data tracking and cookies/localstorage for the given token\n * If the user has opted out, return early instead of executing the method.\n * If a callback argument was provided, execute it passing the 0 error code.\n * @param {function} method - wrapped method to be executed if the user has not opted out\n * @returns {*} the result of executing method OR undefined if the user has opted out\n */\nfunction addOptOutCheckMixpanelPeople(method) {\n return _addOptOutCheck(method, function(name) {\n return this._get_config(name);\n });\n}\n\n/**\n * Wrap a MixpanelGroup method with a check for whether the user is opted out of data tracking and cookies/localstorage for the given token\n * If the user has opted out, return early instead of executing the method.\n * If a callback argument was provided, execute it passing the 0 error code.\n * @param {function} method - wrapped method to be executed if the user has not opted out\n * @returns {*} the result of executing method OR undefined if the user has opted out\n */\nfunction addOptOutCheckMixpanelGroup(method) {\n return _addOptOutCheck(method, function(name) {\n return this._get_config(name);\n });\n}\n\n/**\n * Clear the user's opt in/out status of data tracking and cookies/localstorage for the given token\n * @param {string} token - Mixpanel project tracking token\n * @param {Object} [options]\n * @param {string} [options.persistenceType] Persistence mechanism used - cookie or localStorage\n * @param {string} [options.persistencePrefix=__mp_opt_in_out] - custom prefix to be used in the cookie/localstorage name\n * @param {Number} [options.cookieExpiration] - number of days until the opt-in cookie expires\n * @param {string} [options.cookieDomain] - custom cookie domain\n * @param {boolean} [options.crossSiteCookie] - whether the opt-in cookie is set as cross-site-enabled\n * @param {boolean} [options.crossSubdomainCookie] - whether the opt-in cookie is set as cross-subdomain or not\n * @param {boolean} [options.secureCookie] - whether the opt-in cookie is set as secure or not\n */\nfunction clearOptInOut(token, options) {\n options = options || {};\n _getStorage(options).remove(\n _getStorageKey(token, options), !!options.crossSubdomainCookie, options.cookieDomain\n );\n}\n\n/** Private **/\n\n/**\n * Get storage util\n * @param {Object} [options]\n * @param {string} [options.persistenceType]\n * @returns {object} either _.cookie or _.localstorage\n */\nfunction _getStorage(options) {\n options = options || {};\n return options.persistenceType === 'localStorage' ? _.localStorage : _.cookie;\n}\n\n/**\n * Get the name of the cookie that is used for the given opt type (tracking, cookie, etc.)\n * @param {string} token - Mixpanel project tracking token\n * @param {Object} [options]\n * @param {string} [options.persistencePrefix=__mp_opt_in_out] - custom prefix to be used in the cookie/localstorage name\n * @returns {string} the name of the cookie for the given opt type\n */\nfunction _getStorageKey(token, options) {\n options = options || {};\n return (options.persistencePrefix || GDPR_DEFAULT_PERSISTENCE_PREFIX) + token;\n}\n\n/**\n * Get the value of the cookie that is used for the given opt type (tracking, cookie, etc.)\n * @param {string} token - Mixpanel project tracking token\n * @param {Object} [options]\n * @param {string} [options.persistencePrefix=__mp_opt_in_out] - custom prefix to be used in the cookie/localstorage name\n * @returns {string} the value of the cookie for the given opt type\n */\nfunction _getStorageValue(token, options) {\n return _getStorage(options).get(_getStorageKey(token, options));\n}\n\n/**\n * Check whether the user has set the DNT/doNotTrack setting to true in their browser\n * @param {Object} [options]\n * @param {string} [options.window] - alternate window object to check; used to force various DNT settings in browser tests\n * @param {boolean} [options.ignoreDnt] - flag to ignore browser DNT settings and always return false\n * @returns {boolean} whether the DNT setting is true\n */\nfunction _hasDoNotTrackFlagOn(options) {\n if (options && options.ignoreDnt) {\n return false;\n }\n var win = (options && options.window) || window$1;\n var nav = win['navigator'] || {};\n var hasDntOn = false;\n\n _.each([\n nav['doNotTrack'], // standard\n nav['msDoNotTrack'],\n win['doNotTrack']\n ], function(dntValue) {\n if (_.includes([true, 1, '1', 'yes'], dntValue)) {\n hasDntOn = true;\n }\n });\n\n return hasDntOn;\n}\n\n/**\n * Set cookie/localstorage for the user indicating that they are opted in or out for the given opt type\n * @param {boolean} optValue - whether to opt the user in or out for the given opt type\n * @param {string} token - Mixpanel project tracking token\n * @param {Object} [options]\n * @param {trackFunction} [options.track] - function used for tracking a Mixpanel event to record the opt-in action\n * @param {string} [options.trackEventName] - event name to be used for tracking the opt-in action\n * @param {Object} [options.trackProperties] - set of properties to be tracked along with the opt-in action\n * @param {string} [options.persistencePrefix=__mp_opt_in_out] - custom prefix to be used in the cookie/localstorage name\n * @param {Number} [options.cookieExpiration] - number of days until the opt-in cookie expires\n * @param {string} [options.cookieDomain] - custom cookie domain\n * @param {boolean} [options.crossSiteCookie] - whether the opt-in cookie is set as cross-site-enabled\n * @param {boolean} [options.crossSubdomainCookie] - whether the opt-in cookie is set as cross-subdomain or not\n * @param {boolean} [options.secureCookie] - whether the opt-in cookie is set as secure or not\n */\nfunction _optInOut(optValue, token, options) {\n if (!_.isString(token) || !token.length) {\n console.error('gdpr.' + (optValue ? 'optIn' : 'optOut') + ' called with an invalid token');\n return;\n }\n\n options = options || {};\n\n _getStorage(options).set(\n _getStorageKey(token, options),\n optValue ? 1 : 0,\n _.isNumber(options.cookieExpiration) ? options.cookieExpiration : null,\n !!options.crossSubdomainCookie,\n !!options.secureCookie,\n !!options.crossSiteCookie,\n options.cookieDomain\n );\n\n if (options.track && optValue) { // only track event if opting in (optValue=true)\n options.track(options.trackEventName || '$opt_in', options.trackProperties, {\n 'send_immediately': true\n });\n }\n}\n\n/**\n * Wrap a method with a check for whether the user is opted out of data tracking and cookies/localstorage for the given token\n * If the user has opted out, return early instead of executing the method.\n * If a callback argument was provided, execute it passing the 0 error code.\n * @param {function} method - wrapped method to be executed if the user has not opted out\n * @param {function} getConfigValue - getter function for the Mixpanel API token and other options to be used with opt-out check\n * @returns {*} the result of executing method OR undefined if the user has opted out\n */\nfunction _addOptOutCheck(method, getConfigValue) {\n return function() {\n var optedOut = false;\n\n try {\n var token = getConfigValue.call(this, 'token');\n var ignoreDnt = getConfigValue.call(this, 'ignore_dnt');\n var persistenceType = getConfigValue.call(this, 'opt_out_tracking_persistence_type');\n var persistencePrefix = getConfigValue.call(this, 'opt_out_tracking_cookie_prefix');\n var win = getConfigValue.call(this, 'window'); // used to override window during browser tests\n\n if (token) { // if there was an issue getting the token, continue method execution as normal\n optedOut = hasOptedOut(token, {\n ignoreDnt: ignoreDnt,\n persistenceType: persistenceType,\n persistencePrefix: persistencePrefix,\n window: win\n });\n }\n } catch(err) {\n console.error('Unexpected error when checking tracking opt-out status: ' + err);\n }\n\n if (!optedOut) {\n return method.apply(this, arguments);\n }\n\n var callback = arguments[arguments.length - 1];\n if (typeof(callback) === 'function') {\n callback(0);\n }\n\n return;\n };\n}\n\n/** @const */ var SET_ACTION = '$set';\n/** @const */ var SET_ONCE_ACTION = '$set_once';\n/** @const */ var UNSET_ACTION = '$unset';\n/** @const */ var ADD_ACTION = '$add';\n/** @const */ var APPEND_ACTION = '$append';\n/** @const */ var UNION_ACTION = '$union';\n/** @const */ var REMOVE_ACTION = '$remove';\n/** @const */ var DELETE_ACTION = '$delete';\n\n// Common internal methods for mixpanel.people and mixpanel.group APIs.\n// These methods shouldn't involve network I/O.\nvar apiActions = {\n set_action: function(prop, to) {\n var data = {};\n var $set = {};\n if (_.isObject(prop)) {\n _.each(prop, function(v, k) {\n if (!this._is_reserved_property(k)) {\n $set[k] = v;\n }\n }, this);\n } else {\n $set[prop] = to;\n }\n\n data[SET_ACTION] = $set;\n return data;\n },\n\n unset_action: function(prop) {\n var data = {};\n var $unset = [];\n if (!_.isArray(prop)) {\n prop = [prop];\n }\n\n _.each(prop, function(k) {\n if (!this._is_reserved_property(k)) {\n $unset.push(k);\n }\n }, this);\n\n data[UNSET_ACTION] = $unset;\n return data;\n },\n\n set_once_action: function(prop, to) {\n var data = {};\n var $set_once = {};\n if (_.isObject(prop)) {\n _.each(prop, function(v, k) {\n if (!this._is_reserved_property(k)) {\n $set_once[k] = v;\n }\n }, this);\n } else {\n $set_once[prop] = to;\n }\n data[SET_ONCE_ACTION] = $set_once;\n return data;\n },\n\n union_action: function(list_name, values) {\n var data = {};\n var $union = {};\n if (_.isObject(list_name)) {\n _.each(list_name, function(v, k) {\n if (!this._is_reserved_property(k)) {\n $union[k] = _.isArray(v) ? v : [v];\n }\n }, this);\n } else {\n $union[list_name] = _.isArray(values) ? values : [values];\n }\n data[UNION_ACTION] = $union;\n return data;\n },\n\n append_action: function(list_name, value) {\n var data = {};\n var $append = {};\n if (_.isObject(list_name)) {\n _.each(list_name, function(v, k) {\n if (!this._is_reserved_property(k)) {\n $append[k] = v;\n }\n }, this);\n } else {\n $append[list_name] = value;\n }\n data[APPEND_ACTION] = $append;\n return data;\n },\n\n remove_action: function(list_name, value) {\n var data = {};\n var $remove = {};\n if (_.isObject(list_name)) {\n _.each(list_name, function(v, k) {\n if (!this._is_reserved_property(k)) {\n $remove[k] = v;\n }\n }, this);\n } else {\n $remove[list_name] = value;\n }\n data[REMOVE_ACTION] = $remove;\n return data;\n },\n\n delete_action: function() {\n var data = {};\n data[DELETE_ACTION] = '';\n return data;\n }\n};\n\n/**\n * Mixpanel Group Object\n * @constructor\n */\nvar MixpanelGroup = function() {};\n\n_.extend(MixpanelGroup.prototype, apiActions);\n\nMixpanelGroup.prototype._init = function(mixpanel_instance, group_key, group_id) {\n this._mixpanel = mixpanel_instance;\n this._group_key = group_key;\n this._group_id = group_id;\n};\n\n/**\n * Set properties on a group.\n *\n * ### Usage:\n *\n * mixpanel.get_group('company', 'mixpanel').set('Location', '405 Howard');\n *\n * // or set multiple properties at once\n * mixpanel.get_group('company', 'mixpanel').set({\n * 'Location': '405 Howard',\n * 'Founded' : 2009,\n * });\n * // properties can be strings, integers, dates, or lists\n *\n * @param {Object|String} prop If a string, this is the name of the property. If an object, this is an associative array of names and values.\n * @param {*} [to] A value to set on the given property name\n * @param {Function} [callback] If provided, the callback will be called after the tracking event\n */\nMixpanelGroup.prototype.set = addOptOutCheckMixpanelGroup(function(prop, to, callback) {\n var data = this.set_action(prop, to);\n if (_.isObject(prop)) {\n callback = to;\n }\n return this._send_request(data, callback);\n});\n\n/**\n * Set properties on a group, only if they do not yet exist.\n * This will not overwrite previous group property values, unlike\n * group.set().\n *\n * ### Usage:\n *\n * mixpanel.get_group('company', 'mixpanel').set_once('Location', '405 Howard');\n *\n * // or set multiple properties at once\n * mixpanel.get_group('company', 'mixpanel').set_once({\n * 'Location': '405 Howard',\n * 'Founded' : 2009,\n * });\n * // properties can be strings, integers, lists or dates\n *\n * @param {Object|String} prop If a string, this is the name of the property. If an object, this is an associative array of names and values.\n * @param {*} [to] A value to set on the given property name\n * @param {Function} [callback] If provided, the callback will be called after the tracking event\n */\nMixpanelGroup.prototype.set_once = addOptOutCheckMixpanelGroup(function(prop, to, callback) {\n var data = this.set_once_action(prop, to);\n if (_.isObject(prop)) {\n callback = to;\n }\n return this._send_request(data, callback);\n});\n\n/**\n * Unset properties on a group permanently.\n *\n * ### Usage:\n *\n * mixpanel.get_group('company', 'mixpanel').unset('Founded');\n *\n * @param {String} prop The name of the property.\n * @param {Function} [callback] If provided, the callback will be called after the tracking event\n */\nMixpanelGroup.prototype.unset = addOptOutCheckMixpanelGroup(function(prop, callback) {\n var data = this.unset_action(prop);\n return this._send_request(data, callback);\n});\n\n/**\n * Merge a given list with a list-valued group property, excluding duplicate values.\n *\n * ### Usage:\n *\n * // merge a value to a list, creating it if needed\n * mixpanel.get_group('company', 'mixpanel').union('Location', ['San Francisco', 'London']);\n *\n * @param {String} list_name Name of the property.\n * @param {Array} values Values to merge with the given property\n * @param {Function} [callback] If provided, the callback will be called after the tracking event\n */\nMixpanelGroup.prototype.union = addOptOutCheckMixpanelGroup(function(list_name, values, callback) {\n if (_.isObject(list_name)) {\n callback = values;\n }\n var data = this.union_action(list_name, values);\n return this._send_request(data, callback);\n});\n\n/**\n * Permanently delete a group.\n *\n * ### Usage:\n *\n * mixpanel.get_group('company', 'mixpanel').delete();\n *\n * @param {Function} [callback] If provided, the callback will be called after the tracking event\n */\nMixpanelGroup.prototype['delete'] = addOptOutCheckMixpanelGroup(function(callback) {\n // bracket notation above prevents a minification error related to reserved words\n var data = this.delete_action();\n return this._send_request(data, callback);\n});\n\n/**\n * Remove a property from a group. The value will be ignored if doesn't exist.\n *\n * ### Usage:\n *\n * mixpanel.get_group('company', 'mixpanel').remove('Location', 'London');\n *\n * @param {String} list_name Name of the property.\n * @param {Object} value Value to remove from the given group property\n * @param {Function} [callback] If provided, the callback will be called after the tracking event\n */\nMixpanelGroup.prototype.remove = addOptOutCheckMixpanelGroup(function(list_name, value, callback) {\n var data = this.remove_action(list_name, value);\n return this._send_request(data, callback);\n});\n\nMixpanelGroup.prototype._send_request = function(data, callback) {\n data['$group_key'] = this._group_key;\n data['$group_id'] = this._group_id;\n data['$token'] = this._get_config('token');\n\n var date_encoded_data = _.encodeDates(data);\n return this._mixpanel._track_or_batch({\n type: 'groups',\n data: date_encoded_data,\n endpoint: this._get_config('api_host') + '/groups/',\n batcher: this._mixpanel.request_batchers.groups\n }, callback);\n};\n\nMixpanelGroup.prototype._is_reserved_property = function(prop) {\n return prop === '$group_key' || prop === '$group_id';\n};\n\nMixpanelGroup.prototype._get_config = function(conf) {\n return this._mixpanel.get_config(conf);\n};\n\nMixpanelGroup.prototype.toString = function() {\n return this._mixpanel.toString() + '.group.' + this._group_key + '.' + this._group_id;\n};\n\n// MixpanelGroup Exports\nMixpanelGroup.prototype['remove'] = MixpanelGroup.prototype.remove;\nMixpanelGroup.prototype['set'] = MixpanelGroup.prototype.set;\nMixpanelGroup.prototype['set_once'] = MixpanelGroup.prototype.set_once;\nMixpanelGroup.prototype['union'] = MixpanelGroup.prototype.union;\nMixpanelGroup.prototype['unset'] = MixpanelGroup.prototype.unset;\nMixpanelGroup.prototype['toString'] = MixpanelGroup.prototype.toString;\n\n/**\n * Mixpanel People Object\n * @constructor\n */\nvar MixpanelPeople = function() {};\n\n_.extend(MixpanelPeople.prototype, apiActions);\n\nMixpanelPeople.prototype._init = function(mixpanel_instance) {\n this._mixpanel = mixpanel_instance;\n};\n\n/*\n* Set properties on a user record.\n*\n* ### Usage:\n*\n* mixpanel.people.set('gender', 'm');\n*\n* // or set multiple properties at once\n* mixpanel.people.set({\n* 'Company': 'Acme',\n* 'Plan': 'Premium',\n* 'Upgrade date': new Date()\n* });\n* // properties can be strings, integers, dates, or lists\n*\n* @param {Object|String} prop If a string, this is the name of the property. If an object, this is an associative array of names and values.\n* @param {*} [to] A value to set on the given property name\n* @param {Function} [callback] If provided, the callback will be called after tracking the event.\n*/\nMixpanelPeople.prototype.set = addOptOutCheckMixpanelPeople(function(prop, to, callback) {\n var data = this.set_action(prop, to);\n if (_.isObject(prop)) {\n callback = to;\n }\n // make sure that the referrer info has been updated and saved\n if (this._get_config('save_referrer')) {\n this._mixpanel['persistence'].update_referrer_info(document.referrer);\n }\n\n // update $set object with default people properties\n data[SET_ACTION] = _.extend(\n {},\n _.info.people_properties(),\n this._mixpanel['persistence'].get_referrer_info(),\n data[SET_ACTION]\n );\n return this._send_request(data, callback);\n});\n\n/*\n* Set properties on a user record, only if they do not yet exist.\n* This will not overwrite previous people property values, unlike\n* people.set().\n*\n* ### Usage:\n*\n* mixpanel.people.set_once('First Login Date', new Date());\n*\n* // or set multiple properties at once\n* mixpanel.people.set_once({\n* 'First Login Date': new Date(),\n* 'Starting Plan': 'Premium'\n* });\n*\n* // properties can be strings, integers or dates\n*\n* @param {Object|String} prop If a string, this is the name of the property. If an object, this is an associative array of names and values.\n* @param {*} [to] A value to set on the given property name\n* @param {Function} [callback] If provided, the callback will be called after tracking the event.\n*/\nMixpanelPeople.prototype.set_once = addOptOutCheckMixpanelPeople(function(prop, to, callback) {\n var data = this.set_once_action(prop, to);\n if (_.isObject(prop)) {\n callback = to;\n }\n return this._send_request(data, callback);\n});\n\n/*\n* Unset properties on a user record (permanently removes the properties and their values from a profile).\n*\n* ### Usage:\n*\n* mixpanel.people.unset('gender');\n*\n* // or unset multiple properties at once\n* mixpanel.people.unset(['gender', 'Company']);\n*\n* @param {Array|String} prop If a string, this is the name of the property. If an array, this is a list of property names.\n* @param {Function} [callback] If provided, the callback will be called after tracking the event.\n*/\nMixpanelPeople.prototype.unset = addOptOutCheckMixpanelPeople(function(prop, callback) {\n var data = this.unset_action(prop);\n return this._send_request(data, callback);\n});\n\n/*\n* Increment/decrement numeric people analytics properties.\n*\n* ### Usage:\n*\n* mixpanel.people.increment('page_views', 1);\n*\n* // or, for convenience, if you're just incrementing a counter by\n* // 1, you can simply do\n* mixpanel.people.increment('page_views');\n*\n* // to decrement a counter, pass a negative number\n* mixpanel.people.increment('credits_left', -1);\n*\n* // like mixpanel.people.set(), you can increment multiple\n* // properties at once:\n* mixpanel.people.increment({\n* counter1: 1,\n* counter2: 6\n* });\n*\n* @param {Object|String} prop If a string, this is the name of the property. If an object, this is an associative array of names and numeric values.\n* @param {Number} [by] An amount to increment the given property\n* @param {Function} [callback] If provided, the callback will be called after tracking the event.\n*/\nMixpanelPeople.prototype.increment = addOptOutCheckMixpanelPeople(function(prop, by, callback) {\n var data = {};\n var $add = {};\n if (_.isObject(prop)) {\n _.each(prop, function(v, k) {\n if (!this._is_reserved_property(k)) {\n if (isNaN(parseFloat(v))) {\n console.error('Invalid increment value passed to mixpanel.people.increment - must be a number');\n return;\n } else {\n $add[k] = v;\n }\n }\n }, this);\n callback = by;\n } else {\n // convenience: mixpanel.people.increment('property'); will\n // increment 'property' by 1\n if (_.isUndefined(by)) {\n by = 1;\n }\n $add[prop] = by;\n }\n data[ADD_ACTION] = $add;\n\n return this._send_request(data, callback);\n});\n\n/*\n* Append a value to a list-valued people analytics property.\n*\n* ### Usage:\n*\n* // append a value to a list, creating it if needed\n* mixpanel.people.append('pages_visited', 'homepage');\n*\n* // like mixpanel.people.set(), you can append multiple\n* // properties at once:\n* mixpanel.people.append({\n* list1: 'bob',\n* list2: 123\n* });\n*\n* @param {Object|String} list_name If a string, this is the name of the property. If an object, this is an associative array of names and values.\n* @param {*} [value] value An item to append to the list\n* @param {Function} [callback] If provided, the callback will be called after tracking the event.\n*/\nMixpanelPeople.prototype.append = addOptOutCheckMixpanelPeople(function(list_name, value, callback) {\n if (_.isObject(list_name)) {\n callback = value;\n }\n var data = this.append_action(list_name, value);\n return this._send_request(data, callback);\n});\n\n/*\n* Remove a value from a list-valued people analytics property.\n*\n* ### Usage:\n*\n* mixpanel.people.remove('School', 'UCB');\n*\n* @param {Object|String} list_name If a string, this is the name of the property. If an object, this is an associative array of names and values.\n* @param {*} [value] value Item to remove from the list\n* @param {Function} [callback] If provided, the callback will be called after tracking the event.\n*/\nMixpanelPeople.prototype.remove = addOptOutCheckMixpanelPeople(function(list_name, value, callback) {\n if (_.isObject(list_name)) {\n callback = value;\n }\n var data = this.remove_action(list_name, value);\n return this._send_request(data, callback);\n});\n\n/*\n* Merge a given list with a list-valued people analytics property,\n* excluding duplicate values.\n*\n* ### Usage:\n*\n* // merge a value to a list, creating it if needed\n* mixpanel.people.union('pages_visited', 'homepage');\n*\n* // like mixpanel.people.set(), you can append multiple\n* // properties at once:\n* mixpanel.people.union({\n* list1: 'bob',\n* list2: 123\n* });\n*\n* // like mixpanel.people.append(), you can append multiple\n* // values to the same list:\n* mixpanel.people.union({\n* list1: ['bob', 'billy']\n* });\n*\n* @param {Object|String} list_name If a string, this is the name of the property. If an object, this is an associative array of names and values.\n* @param {*} [value] Value / values to merge with the given property\n* @param {Function} [callback] If provided, the callback will be called after tracking the event.\n*/\nMixpanelPeople.prototype.union = addOptOutCheckMixpanelPeople(function(list_name, values, callback) {\n if (_.isObject(list_name)) {\n callback = values;\n }\n var data = this.union_action(list_name, values);\n return this._send_request(data, callback);\n});\n\n/*\n* Record that you have charged the current user a certain amount\n* of money. Charges recorded with track_charge() will appear in the\n* Mixpanel revenue report.\n*\n* ### Usage:\n*\n* // charge a user $50\n* mixpanel.people.track_charge(50);\n*\n* // charge a user $30.50 on the 2nd of january\n* mixpanel.people.track_charge(30.50, {\n* '$time': new Date('jan 1 2012')\n* });\n*\n* @param {Number} amount The amount of money charged to the current user\n* @param {Object} [properties] An associative array of properties associated with the charge\n* @param {Function} [callback] If provided, the callback will be called when the server responds\n*/\nMixpanelPeople.prototype.track_charge = addOptOutCheckMixpanelPeople(function(amount, properties, callback) {\n if (!_.isNumber(amount)) {\n amount = parseFloat(amount);\n if (isNaN(amount)) {\n console.error('Invalid value passed to mixpanel.people.track_charge - must be a number');\n return;\n }\n }\n\n return this.append('$transactions', _.extend({\n '$amount': amount\n }, properties), callback);\n});\n\n/*\n* Permanently clear all revenue report transactions from the\n* current user's people analytics profile.\n*\n* ### Usage:\n*\n* mixpanel.people.clear_charges();\n*\n* @param {Function} [callback] If provided, the callback will be called after tracking the event.\n*/\nMixpanelPeople.prototype.clear_charges = function(callback) {\n return this.set('$transactions', [], callback);\n};\n\n/*\n* Permanently deletes the current people analytics profile from\n* Mixpanel (using the current distinct_id).\n*\n* ### Usage:\n*\n* // remove the all data you have stored about the current user\n* mixpanel.people.delete_user();\n*\n*/\nMixpanelPeople.prototype.delete_user = function() {\n if (!this._identify_called()) {\n console.error('mixpanel.people.delete_user() requires you to call identify() first');\n return;\n }\n var data = {'$delete': this._mixpanel.get_distinct_id()};\n return this._send_request(data);\n};\n\nMixpanelPeople.prototype.toString = function() {\n return this._mixpanel.toString() + '.people';\n};\n\nMixpanelPeople.prototype._send_request = function(data, callback) {\n data['$token'] = this._get_config('token');\n data['$distinct_id'] = this._mixpanel.get_distinct_id();\n var device_id = this._mixpanel.get_property('$device_id');\n var user_id = this._mixpanel.get_property('$user_id');\n var had_persisted_distinct_id = this._mixpanel.get_property('$had_persisted_distinct_id');\n if (device_id) {\n data['$device_id'] = device_id;\n }\n if (user_id) {\n data['$user_id'] = user_id;\n }\n if (had_persisted_distinct_id) {\n data['$had_persisted_distinct_id'] = had_persisted_distinct_id;\n }\n\n var date_encoded_data = _.encodeDates(data);\n\n if (!this._identify_called()) {\n this._enqueue(data);\n if (!_.isUndefined(callback)) {\n if (this._get_config('verbose')) {\n callback({status: -1, error: null});\n } else {\n callback(-1);\n }\n }\n return _.truncate(date_encoded_data, 255);\n }\n\n return this._mixpanel._track_or_batch({\n type: 'people',\n data: date_encoded_data,\n endpoint: this._get_config('api_host') + '/engage/',\n batcher: this._mixpanel.request_batchers.people\n }, callback);\n};\n\nMixpanelPeople.prototype._get_config = function(conf_var) {\n return this._mixpanel.get_config(conf_var);\n};\n\nMixpanelPeople.prototype._identify_called = function() {\n return this._mixpanel._flags.identify_called === true;\n};\n\n// Queue up engage operations if identify hasn't been called yet.\nMixpanelPeople.prototype._enqueue = function(data) {\n if (SET_ACTION in data) {\n this._mixpanel['persistence']._add_to_people_queue(SET_ACTION, data);\n } else if (SET_ONCE_ACTION in data) {\n this._mixpanel['persistence']._add_to_people_queue(SET_ONCE_ACTION, data);\n } else if (UNSET_ACTION in data) {\n this._mixpanel['persistence']._add_to_people_queue(UNSET_ACTION, data);\n } else if (ADD_ACTION in data) {\n this._mixpanel['persistence']._add_to_people_queue(ADD_ACTION, data);\n } else if (APPEND_ACTION in data) {\n this._mixpanel['persistence']._add_to_people_queue(APPEND_ACTION, data);\n } else if (REMOVE_ACTION in data) {\n this._mixpanel['persistence']._add_to_people_queue(REMOVE_ACTION, data);\n } else if (UNION_ACTION in data) {\n this._mixpanel['persistence']._add_to_people_queue(UNION_ACTION, data);\n } else {\n console.error('Invalid call to _enqueue():', data);\n }\n};\n\nMixpanelPeople.prototype._flush_one_queue = function(action, action_method, callback, queue_to_params_fn) {\n var _this = this;\n var queued_data = _.extend({}, this._mixpanel['persistence']._get_queue(action));\n var action_params = queued_data;\n\n if (!_.isUndefined(queued_data) && _.isObject(queued_data) && !_.isEmptyObject(queued_data)) {\n _this._mixpanel['persistence']._pop_from_people_queue(action, queued_data);\n if (queue_to_params_fn) {\n action_params = queue_to_params_fn(queued_data);\n }\n action_method.call(_this, action_params, function(response, data) {\n // on bad response, we want to add it back to the queue\n if (response === 0) {\n _this._mixpanel['persistence']._add_to_people_queue(action, queued_data);\n }\n if (!_.isUndefined(callback)) {\n callback(response, data);\n }\n });\n }\n};\n\n// Flush queued engage operations - order does not matter,\n// and there are network level race conditions anyway\nMixpanelPeople.prototype._flush = function(\n _set_callback, _add_callback, _append_callback, _set_once_callback, _union_callback, _unset_callback, _remove_callback\n) {\n var _this = this;\n var $append_queue = this._mixpanel['persistence']._get_queue(APPEND_ACTION);\n var $remove_queue = this._mixpanel['persistence']._get_queue(REMOVE_ACTION);\n\n this._flush_one_queue(SET_ACTION, this.set, _set_callback);\n this._flush_one_queue(SET_ONCE_ACTION, this.set_once, _set_once_callback);\n this._flush_one_queue(UNSET_ACTION, this.unset, _unset_callback, function(queue) { return _.keys(queue); });\n this._flush_one_queue(ADD_ACTION, this.increment, _add_callback);\n this._flush_one_queue(UNION_ACTION, this.union, _union_callback);\n\n // we have to fire off each $append individually since there is\n // no concat method server side\n if (!_.isUndefined($append_queue) && _.isArray($append_queue) && $append_queue.length) {\n var $append_item;\n var append_callback = function(response, data) {\n if (response === 0) {\n _this._mixpanel['persistence']._add_to_people_queue(APPEND_ACTION, $append_item);\n }\n if (!_.isUndefined(_append_callback)) {\n _append_callback(response, data);\n }\n };\n for (var i = $append_queue.length - 1; i >= 0; i--) {\n $append_item = $append_queue.pop();\n if (!_.isEmptyObject($append_item)) {\n _this.append($append_item, append_callback);\n }\n }\n // Save the shortened append queue\n _this._mixpanel['persistence'].save();\n }\n\n // same for $remove\n if (!_.isUndefined($remove_queue) && _.isArray($remove_queue) && $remove_queue.length) {\n var $remove_item;\n var remove_callback = function(response, data) {\n if (response === 0) {\n _this._mixpanel['persistence']._add_to_people_queue(REMOVE_ACTION, $remove_item);\n }\n if (!_.isUndefined(_remove_callback)) {\n _remove_callback(response, data);\n }\n };\n for (var j = $remove_queue.length - 1; j >= 0; j--) {\n $remove_item = $remove_queue.pop();\n if (!_.isEmptyObject($remove_item)) {\n _this.remove($remove_item, remove_callback);\n }\n }\n _this._mixpanel['persistence'].save();\n }\n};\n\nMixpanelPeople.prototype._is_reserved_property = function(prop) {\n return prop === '$distinct_id' || prop === '$token' || prop === '$device_id' || prop === '$user_id' || prop === '$had_persisted_distinct_id';\n};\n\n// MixpanelPeople Exports\nMixpanelPeople.prototype['set'] = MixpanelPeople.prototype.set;\nMixpanelPeople.prototype['set_once'] = MixpanelPeople.prototype.set_once;\nMixpanelPeople.prototype['unset'] = MixpanelPeople.prototype.unset;\nMixpanelPeople.prototype['increment'] = MixpanelPeople.prototype.increment;\nMixpanelPeople.prototype['append'] = MixpanelPeople.prototype.append;\nMixpanelPeople.prototype['remove'] = MixpanelPeople.prototype.remove;\nMixpanelPeople.prototype['union'] = MixpanelPeople.prototype.union;\nMixpanelPeople.prototype['track_charge'] = MixpanelPeople.prototype.track_charge;\nMixpanelPeople.prototype['clear_charges'] = MixpanelPeople.prototype.clear_charges;\nMixpanelPeople.prototype['delete_user'] = MixpanelPeople.prototype.delete_user;\nMixpanelPeople.prototype['toString'] = MixpanelPeople.prototype.toString;\n\n/*\n * Constants\n */\n/** @const */ var SET_QUEUE_KEY = '__mps';\n/** @const */ var SET_ONCE_QUEUE_KEY = '__mpso';\n/** @const */ var UNSET_QUEUE_KEY = '__mpus';\n/** @const */ var ADD_QUEUE_KEY = '__mpa';\n/** @const */ var APPEND_QUEUE_KEY = '__mpap';\n/** @const */ var REMOVE_QUEUE_KEY = '__mpr';\n/** @const */ var UNION_QUEUE_KEY = '__mpu';\n// This key is deprecated, but we want to check for it to see whether aliasing is allowed.\n/** @const */ var PEOPLE_DISTINCT_ID_KEY = '$people_distinct_id';\n/** @const */ var ALIAS_ID_KEY = '__alias';\n/** @const */ var EVENT_TIMERS_KEY = '__timers';\n/** @const */ var RESERVED_PROPERTIES = [\n SET_QUEUE_KEY,\n SET_ONCE_QUEUE_KEY,\n UNSET_QUEUE_KEY,\n ADD_QUEUE_KEY,\n APPEND_QUEUE_KEY,\n REMOVE_QUEUE_KEY,\n UNION_QUEUE_KEY,\n PEOPLE_DISTINCT_ID_KEY,\n ALIAS_ID_KEY,\n EVENT_TIMERS_KEY\n];\n\n/**\n * Mixpanel Persistence Object\n * @constructor\n */\nvar MixpanelPersistence = function(config) {\n this['props'] = {};\n this.campaign_params_saved = false;\n\n if (config['persistence_name']) {\n this.name = 'mp_' + config['persistence_name'];\n } else {\n this.name = 'mp_' + config['token'] + '_mixpanel';\n }\n\n var storage_type = config['persistence'];\n if (storage_type !== 'cookie' && storage_type !== 'localStorage') {\n console.critical('Unknown persistence type ' + storage_type + '; falling back to cookie');\n storage_type = config['persistence'] = 'cookie';\n }\n\n if (storage_type === 'localStorage' && _.localStorage.is_supported()) {\n this.storage = _.localStorage;\n } else {\n this.storage = _.cookie;\n }\n\n this.load();\n this.update_config(config);\n this.upgrade(config);\n this.save();\n};\n\nMixpanelPersistence.prototype.properties = function() {\n var p = {};\n // Filter out reserved properties\n _.each(this['props'], function(v, k) {\n if (!_.include(RESERVED_PROPERTIES, k)) {\n p[k] = v;\n }\n });\n return p;\n};\n\nMixpanelPersistence.prototype.load = function() {\n if (this.disabled) { return; }\n\n var entry = this.storage.parse(this.name);\n\n if (entry) {\n this['props'] = _.extend({}, entry);\n }\n};\n\nMixpanelPersistence.prototype.upgrade = function(config) {\n var upgrade_from_old_lib = config['upgrade'],\n old_cookie_name,\n old_cookie;\n\n if (upgrade_from_old_lib) {\n old_cookie_name = 'mp_super_properties';\n // Case where they had a custom cookie name before.\n if (typeof(upgrade_from_old_lib) === 'string') {\n old_cookie_name = upgrade_from_old_lib;\n }\n\n old_cookie = this.storage.parse(old_cookie_name);\n\n // remove the cookie\n this.storage.remove(old_cookie_name);\n this.storage.remove(old_cookie_name, true);\n\n if (old_cookie) {\n this['props'] = _.extend(\n this['props'],\n old_cookie['all'],\n old_cookie['events']\n );\n }\n }\n\n if (!config['cookie_name'] && config['name'] !== 'mixpanel') {\n // special case to handle people with cookies of the form\n // mp_TOKEN_INSTANCENAME from the first release of this library\n old_cookie_name = 'mp_' + config['token'] + '_' + config['name'];\n old_cookie = this.storage.parse(old_cookie_name);\n\n if (old_cookie) {\n this.storage.remove(old_cookie_name);\n this.storage.remove(old_cookie_name, true);\n\n // Save the prop values that were in the cookie from before -\n // this should only happen once as we delete the old one.\n this.register_once(old_cookie);\n }\n }\n\n if (this.storage === _.localStorage) {\n old_cookie = _.cookie.parse(this.name);\n\n _.cookie.remove(this.name);\n _.cookie.remove(this.name, true);\n\n if (old_cookie) {\n this.register_once(old_cookie);\n }\n }\n};\n\nMixpanelPersistence.prototype.save = function() {\n if (this.disabled) { return; }\n this.storage.set(\n this.name,\n _.JSONEncode(this['props']),\n this.expire_days,\n this.cross_subdomain,\n this.secure,\n this.cross_site,\n this.cookie_domain\n );\n};\n\nMixpanelPersistence.prototype.remove = function() {\n // remove both domain and subdomain cookies\n this.storage.remove(this.name, false, this.cookie_domain);\n this.storage.remove(this.name, true, this.cookie_domain);\n};\n\n// removes the storage entry and deletes all loaded data\n// forced name for tests\nMixpanelPersistence.prototype.clear = function() {\n this.remove();\n this['props'] = {};\n};\n\n/**\n* @param {Object} props\n* @param {*=} default_value\n* @param {number=} days\n*/\nMixpanelPersistence.prototype.register_once = function(props, default_value, days) {\n if (_.isObject(props)) {\n if (typeof(default_value) === 'undefined') { default_value = 'None'; }\n this.expire_days = (typeof(days) === 'undefined') ? this.default_expiry : days;\n\n _.each(props, function(val, prop) {\n if (!this['props'].hasOwnProperty(prop) || this['props'][prop] === default_value) {\n this['props'][prop] = val;\n }\n }, this);\n\n this.save();\n\n return true;\n }\n return false;\n};\n\n/**\n* @param {Object} props\n* @param {number=} days\n*/\nMixpanelPersistence.prototype.register = function(props, days) {\n if (_.isObject(props)) {\n this.expire_days = (typeof(days) === 'undefined') ? this.default_expiry : days;\n\n _.extend(this['props'], props);\n\n this.save();\n\n return true;\n }\n return false;\n};\n\nMixpanelPersistence.prototype.unregister = function(prop) {\n if (prop in this['props']) {\n delete this['props'][prop];\n this.save();\n }\n};\n\nMixpanelPersistence.prototype.update_campaign_params = function() {\n if (!this.campaign_params_saved) {\n this.register_once(_.info.campaignParams());\n this.campaign_params_saved = true;\n }\n};\n\nMixpanelPersistence.prototype.update_search_keyword = function(referrer) {\n this.register(_.info.searchInfo(referrer));\n};\n\n// EXPORTED METHOD, we test this directly.\nMixpanelPersistence.prototype.update_referrer_info = function(referrer) {\n // If referrer doesn't exist, we want to note the fact that it was type-in traffic.\n this.register_once({\n '$initial_referrer': referrer || '$direct',\n '$initial_referring_domain': _.info.referringDomain(referrer) || '$direct'\n }, '');\n};\n\nMixpanelPersistence.prototype.get_referrer_info = function() {\n return _.strip_empty_properties({\n '$initial_referrer': this['props']['$initial_referrer'],\n '$initial_referring_domain': this['props']['$initial_referring_domain']\n });\n};\n\n// safely fills the passed in object with stored properties,\n// does not override any properties defined in both\n// returns the passed in object\nMixpanelPersistence.prototype.safe_merge = function(props) {\n _.each(this['props'], function(val, prop) {\n if (!(prop in props)) {\n props[prop] = val;\n }\n });\n\n return props;\n};\n\nMixpanelPersistence.prototype.update_config = function(config) {\n this.default_expiry = this.expire_days = config['cookie_expiration'];\n this.set_disabled(config['disable_persistence']);\n this.set_cookie_domain(config['cookie_domain']);\n this.set_cross_site(config['cross_site_cookie']);\n this.set_cross_subdomain(config['cross_subdomain_cookie']);\n this.set_secure(config['secure_cookie']);\n};\n\nMixpanelPersistence.prototype.set_disabled = function(disabled) {\n this.disabled = disabled;\n if (this.disabled) {\n this.remove();\n } else {\n this.save();\n }\n};\n\nMixpanelPersistence.prototype.set_cookie_domain = function(cookie_domain) {\n if (cookie_domain !== this.cookie_domain) {\n this.remove();\n this.cookie_domain = cookie_domain;\n this.save();\n }\n};\n\nMixpanelPersistence.prototype.set_cross_site = function(cross_site) {\n if (cross_site !== this.cross_site) {\n this.cross_site = cross_site;\n this.remove();\n this.save();\n }\n};\n\nMixpanelPersistence.prototype.set_cross_subdomain = function(cross_subdomain) {\n if (cross_subdomain !== this.cross_subdomain) {\n this.cross_subdomain = cross_subdomain;\n this.remove();\n this.save();\n }\n};\n\nMixpanelPersistence.prototype.get_cross_subdomain = function() {\n return this.cross_subdomain;\n};\n\nMixpanelPersistence.prototype.set_secure = function(secure) {\n if (secure !== this.secure) {\n this.secure = secure ? true : false;\n this.remove();\n this.save();\n }\n};\n\nMixpanelPersistence.prototype._add_to_people_queue = function(queue, data) {\n var q_key = this._get_queue_key(queue),\n q_data = data[queue],\n set_q = this._get_or_create_queue(SET_ACTION),\n set_once_q = this._get_or_create_queue(SET_ONCE_ACTION),\n unset_q = this._get_or_create_queue(UNSET_ACTION),\n add_q = this._get_or_create_queue(ADD_ACTION),\n union_q = this._get_or_create_queue(UNION_ACTION),\n remove_q = this._get_or_create_queue(REMOVE_ACTION, []),\n append_q = this._get_or_create_queue(APPEND_ACTION, []);\n\n if (q_key === SET_QUEUE_KEY) {\n // Update the set queue - we can override any existing values\n _.extend(set_q, q_data);\n // if there was a pending increment, override it\n // with the set.\n this._pop_from_people_queue(ADD_ACTION, q_data);\n // if there was a pending union, override it\n // with the set.\n this._pop_from_people_queue(UNION_ACTION, q_data);\n this._pop_from_people_queue(UNSET_ACTION, q_data);\n } else if (q_key === SET_ONCE_QUEUE_KEY) {\n // only queue the data if there is not already a set_once call for it.\n _.each(q_data, function(v, k) {\n if (!(k in set_once_q)) {\n set_once_q[k] = v;\n }\n });\n this._pop_from_people_queue(UNSET_ACTION, q_data);\n } else if (q_key === UNSET_QUEUE_KEY) {\n _.each(q_data, function(prop) {\n\n // undo previously-queued actions on this key\n _.each([set_q, set_once_q, add_q, union_q], function(enqueued_obj) {\n if (prop in enqueued_obj) {\n delete enqueued_obj[prop];\n }\n });\n _.each(append_q, function(append_obj) {\n if (prop in append_obj) {\n delete append_obj[prop];\n }\n });\n\n unset_q[prop] = true;\n\n });\n } else if (q_key === ADD_QUEUE_KEY) {\n _.each(q_data, function(v, k) {\n // If it exists in the set queue, increment\n // the value\n if (k in set_q) {\n set_q[k] += v;\n } else {\n // If it doesn't exist, update the add\n // queue\n if (!(k in add_q)) {\n add_q[k] = 0;\n }\n add_q[k] += v;\n }\n }, this);\n this._pop_from_people_queue(UNSET_ACTION, q_data);\n } else if (q_key === UNION_QUEUE_KEY) {\n _.each(q_data, function(v, k) {\n if (_.isArray(v)) {\n if (!(k in union_q)) {\n union_q[k] = [];\n }\n // We may send duplicates, the server will dedup them.\n union_q[k] = union_q[k].concat(v);\n }\n });\n this._pop_from_people_queue(UNSET_ACTION, q_data);\n } else if (q_key === REMOVE_QUEUE_KEY) {\n remove_q.push(q_data);\n this._pop_from_people_queue(APPEND_ACTION, q_data);\n } else if (q_key === APPEND_QUEUE_KEY) {\n append_q.push(q_data);\n this._pop_from_people_queue(UNSET_ACTION, q_data);\n }\n\n console.log('MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):');\n console.log(data);\n\n this.save();\n};\n\nMixpanelPersistence.prototype._pop_from_people_queue = function(queue, data) {\n var q = this._get_queue(queue);\n if (!_.isUndefined(q)) {\n _.each(data, function(v, k) {\n if (queue === APPEND_ACTION || queue === REMOVE_ACTION) {\n // list actions: only remove if both k+v match\n // e.g. remove should not override append in a case like\n // append({foo: 'bar'}); remove({foo: 'qux'})\n _.each(q, function(queued_action) {\n if (queued_action[k] === v) {\n delete queued_action[k];\n }\n });\n } else {\n delete q[k];\n }\n }, this);\n\n this.save();\n }\n};\n\nMixpanelPersistence.prototype._get_queue_key = function(queue) {\n if (queue === SET_ACTION) {\n return SET_QUEUE_KEY;\n } else if (queue === SET_ONCE_ACTION) {\n return SET_ONCE_QUEUE_KEY;\n } else if (queue === UNSET_ACTION) {\n return UNSET_QUEUE_KEY;\n } else if (queue === ADD_ACTION) {\n return ADD_QUEUE_KEY;\n } else if (queue === APPEND_ACTION) {\n return APPEND_QUEUE_KEY;\n } else if (queue === REMOVE_ACTION) {\n return REMOVE_QUEUE_KEY;\n } else if (queue === UNION_ACTION) {\n return UNION_QUEUE_KEY;\n } else {\n console.error('Invalid queue:', queue);\n }\n};\n\nMixpanelPersistence.prototype._get_queue = function(queue) {\n return this['props'][this._get_queue_key(queue)];\n};\nMixpanelPersistence.prototype._get_or_create_queue = function(queue, default_val) {\n var key = this._get_queue_key(queue);\n default_val = _.isUndefined(default_val) ? {} : default_val;\n\n return this['props'][key] || (this['props'][key] = default_val);\n};\n\nMixpanelPersistence.prototype.set_event_timer = function(event_name, timestamp) {\n var timers = this['props'][EVENT_TIMERS_KEY] || {};\n timers[event_name] = timestamp;\n this['props'][EVENT_TIMERS_KEY] = timers;\n this.save();\n};\n\nMixpanelPersistence.prototype.remove_event_timer = function(event_name) {\n var timers = this['props'][EVENT_TIMERS_KEY] || {};\n var timestamp = timers[event_name];\n if (!_.isUndefined(timestamp)) {\n delete this['props'][EVENT_TIMERS_KEY][event_name];\n this.save();\n }\n return timestamp;\n};\n\n/*\n * Mixpanel JS Library\n *\n * Copyright 2012, Mixpanel, Inc. All Rights Reserved\n * http://mixpanel.com/\n *\n * Includes portions of Underscore.js\n * http://documentcloud.github.com/underscore/\n * (c) 2011 Jeremy Ashkenas, DocumentCloud Inc.\n * Released under the MIT License.\n */\n\n// ==ClosureCompiler==\n// @compilation_level ADVANCED_OPTIMIZATIONS\n// @output_file_name mixpanel-2.8.min.js\n// ==/ClosureCompiler==\n\n/*\nSIMPLE STYLE GUIDE:\n\nthis.x === public function\nthis._x === internal - only use within this file\nthis.__x === private - only use within the class\n\nGlobals should be all caps\n*/\n\nvar init_type; // MODULE or SNIPPET loader\nvar mixpanel_master; // main mixpanel instance / object\nvar INIT_MODULE = 0;\nvar INIT_SNIPPET = 1;\n\nvar IDENTITY_FUNC = function(x) {return x;};\nvar NOOP_FUNC = function() {};\n\n/** @const */ var PRIMARY_INSTANCE_NAME = 'mixpanel';\n/** @const */ var PAYLOAD_TYPE_BASE64 = 'base64';\n/** @const */ var PAYLOAD_TYPE_JSON = 'json';\n\n\n/*\n * Dynamic... constants? Is that an oxymoron?\n */\n// http://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/\n// https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#withCredentials\nvar USE_XHR = (window$1.XMLHttpRequest && 'withCredentials' in new XMLHttpRequest());\n\n// IE<10 does not support cross-origin XHR's but script tags\n// with defer won't block window.onload; ENQUEUE_REQUESTS\n// should only be true for Opera<12\nvar ENQUEUE_REQUESTS = !USE_XHR && (userAgent.indexOf('MSIE') === -1) && (userAgent.indexOf('Mozilla') === -1);\n\n// save reference to navigator.sendBeacon so it can be minified\nvar sendBeacon = null;\nif (navigator['sendBeacon']) {\n sendBeacon = function() {\n // late reference to navigator.sendBeacon to allow patching/spying\n return navigator['sendBeacon'].apply(navigator, arguments);\n };\n}\n\n/*\n * Module-level globals\n */\nvar DEFAULT_CONFIG = {\n 'api_host': 'https://api-js.mixpanel.com',\n 'api_method': 'POST',\n 'api_transport': 'XHR',\n 'api_payload_format': PAYLOAD_TYPE_BASE64,\n 'app_host': 'https://mixpanel.com',\n 'cdn': 'https://cdn.mxpnl.com',\n 'cross_site_cookie': false,\n 'cross_subdomain_cookie': true,\n 'error_reporter': NOOP_FUNC,\n 'persistence': 'cookie',\n 'persistence_name': '',\n 'cookie_domain': '',\n 'cookie_name': '',\n 'loaded': NOOP_FUNC,\n 'store_google': true,\n 'save_referrer': true,\n 'test': false,\n 'verbose': false,\n 'img': false,\n 'debug': false,\n 'track_links_timeout': 300,\n 'cookie_expiration': 365,\n 'upgrade': false,\n 'disable_persistence': false,\n 'disable_cookie': false,\n 'secure_cookie': false,\n 'ip': true,\n 'opt_out_tracking_by_default': false,\n 'opt_out_persistence_by_default': false,\n 'opt_out_tracking_persistence_type': 'localStorage',\n 'opt_out_tracking_cookie_prefix': null,\n 'property_blacklist': [],\n 'xhr_headers': {}, // { header: value, header2: value }\n 'ignore_dnt': false,\n 'batch_requests': true,\n 'batch_size': 50,\n 'batch_flush_interval_ms': 5000,\n 'batch_request_timeout_ms': 90000,\n 'batch_autostart': true,\n 'hooks': {}\n};\n\nvar DOM_LOADED = false;\n\n/**\n * Mixpanel Library Object\n * @constructor\n */\nvar MixpanelLib = function() {};\n\n\n/**\n * create_mplib(token:string, config:object, name:string)\n *\n * This function is used by the init method of MixpanelLib objects\n * as well as the main initializer at the end of the JSLib (that\n * initializes document.mixpanel as well as any additional instances\n * declared before this file has loaded).\n */\nvar create_mplib = function(token, config, name) {\n var instance,\n target = (name === PRIMARY_INSTANCE_NAME) ? mixpanel_master : mixpanel_master[name];\n\n if (target && init_type === INIT_MODULE) {\n instance = target;\n } else {\n if (target && !_.isArray(target)) {\n console.error('You have already initialized ' + name);\n return;\n }\n instance = new MixpanelLib();\n }\n\n instance._cached_groups = {}; // cache groups in a pool\n\n instance._init(token, config, name);\n\n instance['people'] = new MixpanelPeople();\n instance['people']._init(instance);\n\n // if any instance on the page has debug = true, we set the\n // global debug to be true\n Config.DEBUG = Config.DEBUG || instance.get_config('debug');\n\n // if target is not defined, we called init after the lib already\n // loaded, so there won't be an array of things to execute\n if (!_.isUndefined(target) && _.isArray(target)) {\n // Crunch through the people queue first - we queue this data up &\n // flush on identify, so it's better to do all these operations first\n instance._execute_array.call(instance['people'], target['people']);\n instance._execute_array(target);\n }\n\n return instance;\n};\n\n// Initialization methods\n\n/**\n * This function initializes a new instance of the Mixpanel tracking object.\n * All new instances are added to the main mixpanel object as sub properties (such as\n * mixpanel.library_name) and also returned by this function. To define a\n * second instance on the page, you would call:\n *\n * mixpanel.init('new token', { your: 'config' }, 'library_name');\n *\n * and use it like so:\n *\n * mixpanel.library_name.track(...);\n *\n * @param {String} token Your Mixpanel API token\n * @param {Object} [config] A dictionary of config options to override. <a href=\"https://github.com/mixpanel/mixpanel-js/blob/8b2e1f7b/src/mixpanel-core.js#L87-L110\">See a list of default config options</a>.\n * @param {String} [name] The name for the new mixpanel instance that you want created\n */\nMixpanelLib.prototype.init = function (token, config, name) {\n if (_.isUndefined(name)) {\n this.report_error('You must name your new library: init(token, config, name)');\n return;\n }\n if (name === PRIMARY_INSTANCE_NAME) {\n this.report_error('You must initialize the main mixpanel object right after you include the Mixpanel js snippet');\n return;\n }\n\n var instance = create_mplib(token, config, name);\n mixpanel_master[name] = instance;\n instance._loaded();\n\n return instance;\n};\n\n// mixpanel._init(token:string, config:object, name:string)\n//\n// This function sets up the current instance of the mixpanel\n// library. The difference between this method and the init(...)\n// method is this one initializes the actual instance, whereas the\n// init(...) method sets up a new library and calls _init on it.\n//\nMixpanelLib.prototype._init = function(token, config, name) {\n config = config || {};\n\n this['__loaded'] = true;\n this['config'] = {};\n\n var variable_features = {};\n\n // default to JSON payload for standard mixpanel.com API hosts\n if (!('api_payload_format' in config)) {\n var api_host = config['api_host'] || DEFAULT_CONFIG['api_host'];\n if (api_host.match(/\\.mixpanel\\.com$/)) {\n variable_features['api_payload_format'] = PAYLOAD_TYPE_JSON;\n }\n }\n\n this.set_config(_.extend({}, DEFAULT_CONFIG, variable_features, config, {\n 'name': name,\n 'token': token,\n 'callback_fn': ((name === PRIMARY_INSTANCE_NAME) ? name : PRIMARY_INSTANCE_NAME + '.' + name) + '._jsc'\n }));\n\n this['_jsc'] = NOOP_FUNC;\n\n this.__dom_loaded_queue = [];\n this.__request_queue = [];\n this.__disabled_events = [];\n this._flags = {\n 'disable_all_events': false,\n 'identify_called': false\n };\n\n // set up request queueing/batching\n this.request_batchers = {};\n this._batch_requests = this.get_config('batch_requests');\n if (this._batch_requests) {\n if (!_.localStorage.is_supported(true) || !USE_XHR) {\n this._batch_requests = false;\n console.log('Turning off Mixpanel request-queueing; needs XHR and localStorage support');\n } else {\n this.init_batchers();\n if (sendBeacon && window$1.addEventListener) {\n // Before page closes or hides (user tabs away etc), attempt to flush any events\n // queued up via navigator.sendBeacon. Since sendBeacon doesn't report success/failure,\n // events will not be removed from the persistent store; if the site is loaded again,\n // the events will be flushed again on startup and deduplicated on the Mixpanel server\n // side.\n // There is no reliable way to capture only page close events, so we lean on the\n // visibilitychange and pagehide events as recommended at\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/unload_event#usage_notes.\n // These events fire when the user clicks away from the current page/tab, so will occur\n // more frequently than page unload, but are the only mechanism currently for capturing\n // this scenario somewhat reliably.\n var flush_on_unload = _.bind(function() {\n if (!this.request_batchers.events.stopped) {\n this.request_batchers.events.flush({unloading: true});\n }\n }, this);\n window$1.addEventListener('pagehide', function(ev) {\n if (ev['persisted']) {\n flush_on_unload();\n }\n });\n window$1.addEventListener('visibilitychange', function() {\n if (document$1['visibilityState'] === 'hidden') {\n flush_on_unload();\n }\n });\n }\n }\n }\n\n this['persistence'] = this['cookie'] = new MixpanelPersistence(this['config']);\n this.unpersisted_superprops = {};\n this._gdpr_init();\n\n var uuid = _.UUID();\n if (!this.get_distinct_id()) {\n // There is no need to set the distinct id\n // or the device id if something was already stored\n // in the persitence\n this.register_once({\n 'distinct_id': uuid,\n '$device_id': uuid\n }, '');\n }\n};\n\n// Private methods\n\nMixpanelLib.prototype._loaded = function() {\n this.get_config('loaded')(this);\n this._set_default_superprops();\n};\n\n// update persistence with info on referrer, UTM params, etc\nMixpanelLib.prototype._set_default_superprops = function() {\n this['persistence'].update_search_keyword(document$1.referrer);\n if (this.get_config('store_google')) {\n this['persistence'].update_campaign_params();\n }\n if (this.get_config('save_referrer')) {\n this['persistence'].update_referrer_info(document$1.referrer);\n }\n};\n\nMixpanelLib.prototype._dom_loaded = function() {\n _.each(this.__dom_loaded_queue, function(item) {\n this._track_dom.apply(this, item);\n }, this);\n\n if (!this.has_opted_out_tracking()) {\n _.each(this.__request_queue, function(item) {\n this._send_request.apply(this, item);\n }, this);\n }\n\n delete this.__dom_loaded_queue;\n delete this.__request_queue;\n};\n\nMixpanelLib.prototype._track_dom = function(DomClass, args) {\n if (this.get_config('img')) {\n this.report_error('You can\\'t use DOM tracking functions with img = true.');\n return false;\n }\n\n if (!DOM_LOADED) {\n this.__dom_loaded_queue.push([DomClass, args]);\n return false;\n }\n\n var dt = new DomClass().init(this);\n return dt.track.apply(dt, args);\n};\n\n/**\n * _prepare_callback() should be called by callers of _send_request for use\n * as the callback argument.\n *\n * If there is no callback, this returns null.\n * If we are going to make XHR/XDR requests, this returns a function.\n * If we are going to use script tags, this returns a string to use as the\n * callback GET param.\n */\nMixpanelLib.prototype._prepare_callback = function(callback, data) {\n if (_.isUndefined(callback)) {\n return null;\n }\n\n if (USE_XHR) {\n var callback_function = function(response) {\n callback(response, data);\n };\n return callback_function;\n } else {\n // if the user gives us a callback, we store as a random\n // property on this instances jsc function and update our\n // callback string to reflect that.\n var jsc = this['_jsc'];\n var randomized_cb = '' + Math.floor(Math.random() * 100000000);\n var callback_string = this.get_config('callback_fn') + '[' + randomized_cb + ']';\n jsc[randomized_cb] = function(response) {\n delete jsc[randomized_cb];\n callback(response, data);\n };\n return callback_string;\n }\n};\n\nMixpanelLib.prototype._send_request = function(url, data, options, callback) {\n var succeeded = true;\n\n if (ENQUEUE_REQUESTS) {\n this.__request_queue.push(arguments);\n return succeeded;\n }\n\n var DEFAULT_OPTIONS = {\n method: this.get_config('api_method'),\n transport: this.get_config('api_transport'),\n verbose: this.get_config('verbose')\n };\n var body_data = null;\n\n if (!callback && (_.isFunction(options) || typeof options === 'string')) {\n callback = options;\n options = null;\n }\n options = _.extend(DEFAULT_OPTIONS, options || {});\n if (!USE_XHR) {\n options.method = 'GET';\n }\n var use_post = options.method === 'POST';\n var use_sendBeacon = sendBeacon && use_post && options.transport.toLowerCase() === 'sendbeacon';\n\n // needed to correctly format responses\n var verbose_mode = options.verbose;\n if (data['verbose']) { verbose_mode = true; }\n\n if (this.get_config('test')) { data['test'] = 1; }\n if (verbose_mode) { data['verbose'] = 1; }\n if (this.get_config('img')) { data['img'] = 1; }\n if (!USE_XHR) {\n if (callback) {\n data['callback'] = callback;\n } else if (verbose_mode || this.get_config('test')) {\n // Verbose output (from verbose mode, or an error in test mode) is a json blob,\n // which by itself is not valid javascript. Without a callback, this verbose output will\n // cause an error when returned via jsonp, so we force a no-op callback param.\n // See the ECMA script spec: http://www.ecma-international.org/ecma-262/5.1/#sec-12.4\n data['callback'] = '(function(){})';\n }\n }\n\n data['ip'] = this.get_config('ip')?1:0;\n data['_'] = new Date().getTime().toString();\n\n if (use_post) {\n body_data = 'data=' + encodeURIComponent(data['data']);\n delete data['data'];\n }\n\n url += '?' + _.HTTPBuildQuery(data);\n\n var lib = this;\n if ('img' in data) {\n var img = document$1.createElement('img');\n img.src = url;\n document$1.body.appendChild(img);\n } else if (use_sendBeacon) {\n try {\n succeeded = sendBeacon(url, body_data);\n } catch (e) {\n lib.report_error(e);\n succeeded = false;\n }\n try {\n if (callback) {\n callback(succeeded ? 1 : 0);\n }\n } catch (e) {\n lib.report_error(e);\n }\n } else if (USE_XHR) {\n try {\n var req = new XMLHttpRequest();\n req.open(options.method, url, true);\n\n var headers = this.get_config('xhr_headers');\n if (use_post) {\n headers['Content-Type'] = 'application/x-www-form-urlencoded';\n }\n _.each(headers, function(headerValue, headerName) {\n req.setRequestHeader(headerName, headerValue);\n });\n\n if (options.timeout_ms && typeof req.timeout !== 'undefined') {\n req.timeout = options.timeout_ms;\n var start_time = new Date().getTime();\n }\n\n // send the mp_optout cookie\n // withCredentials cannot be modified until after calling .open on Android and Mobile Safari\n req.withCredentials = true;\n req.onreadystatechange = function () {\n if (req.readyState === 4) { // XMLHttpRequest.DONE == 4, except in safari 4\n if (req.status === 200) {\n if (callback) {\n if (verbose_mode) {\n var response;\n try {\n response = _.JSONDecode(req.responseText);\n } catch (e) {\n lib.report_error(e);\n if (options.ignore_json_errors) {\n response = req.responseText;\n } else {\n return;\n }\n }\n callback(response);\n } else {\n callback(Number(req.responseText));\n }\n }\n } else {\n var error;\n if (\n req.timeout &&\n !req.status &&\n new Date().getTime() - start_time >= req.timeout\n ) {\n error = 'timeout';\n } else {\n error = 'Bad HTTP status: ' + req.status + ' ' + req.statusText;\n }\n lib.report_error(error);\n if (callback) {\n if (verbose_mode) {\n callback({status: 0, error: error, xhr_req: req});\n } else {\n callback(0);\n }\n }\n }\n }\n };\n req.send(body_data);\n } catch (e) {\n lib.report_error(e);\n succeeded = false;\n }\n } else {\n var script = document$1.createElement('script');\n script.type = 'text/javascript';\n script.async = true;\n script.defer = true;\n script.src = url;\n var s = document$1.getElementsByTagName('script')[0];\n s.parentNode.insertBefore(script, s);\n }\n\n return succeeded;\n};\n\n/**\n * _execute_array() deals with processing any mixpanel function\n * calls that were called before the Mixpanel library were loaded\n * (and are thus stored in an array so they can be called later)\n *\n * Note: we fire off all the mixpanel function calls && user defined\n * functions BEFORE we fire off mixpanel tracking calls. This is so\n * identify/register/set_config calls can properly modify early\n * tracking calls.\n *\n * @param {Array} array\n */\nMixpanelLib.prototype._execute_array = function(array) {\n var fn_name, alias_calls = [], other_calls = [], tracking_calls = [];\n _.each(array, function(item) {\n if (item) {\n fn_name = item[0];\n if (_.isArray(fn_name)) {\n tracking_calls.push(item); // chained call e.g. mixpanel.get_group().set()\n } else if (typeof(item) === 'function') {\n item.call(this);\n } else if (_.isArray(item) && fn_name === 'alias') {\n alias_calls.push(item);\n } else if (_.isArray(item) && fn_name.indexOf('track') !== -1 && typeof(this[fn_name]) === 'function') {\n tracking_calls.push(item);\n } else {\n other_calls.push(item);\n }\n }\n }, this);\n\n var execute = function(calls, context) {\n _.each(calls, function(item) {\n if (_.isArray(item[0])) {\n // chained call\n var caller = context;\n _.each(item, function(call) {\n caller = caller[call[0]].apply(caller, call.slice(1));\n });\n } else {\n this[item[0]].apply(this, item.slice(1));\n }\n }, context);\n };\n\n execute(alias_calls, this);\n execute(other_calls, this);\n execute(tracking_calls, this);\n};\n\n// request queueing utils\n\nMixpanelLib.prototype.are_batchers_initialized = function() {\n return !!this.request_batchers.events;\n};\n\nMixpanelLib.prototype.init_batchers = function() {\n var token = this.get_config('token');\n if (!this.are_batchers_initialized()) {\n var batcher_for = _.bind(function(attrs) {\n return new RequestBatcher(\n '__mpq_' + token + attrs.queue_suffix,\n {\n libConfig: this['config'],\n sendRequestFunc: _.bind(function(data, options, cb) {\n this._send_request(\n this.get_config('api_host') + attrs.endpoint,\n this._encode_data_for_request(data),\n options,\n this._prepare_callback(cb, data)\n );\n }, this),\n beforeSendHook: _.bind(function(item) {\n return this._run_hook('before_send_' + attrs.type, item);\n }, this),\n errorReporter: this.get_config('error_reporter'),\n stopAllBatchingFunc: _.bind(this.stop_batch_senders, this)\n }\n );\n }, this);\n this.request_batchers = {\n events: batcher_for({type: 'events', endpoint: '/track/', queue_suffix: '_ev'}),\n people: batcher_for({type: 'people', endpoint: '/engage/', queue_suffix: '_pp'}),\n groups: batcher_for({type: 'groups', endpoint: '/groups/', queue_suffix: '_gr'})\n };\n }\n if (this.get_config('batch_autostart')) {\n this.start_batch_senders();\n }\n};\n\nMixpanelLib.prototype.start_batch_senders = function() {\n if (this.are_batchers_initialized()) {\n this._batch_requests = true;\n _.each(this.request_batchers, function(batcher) {\n batcher.start();\n });\n }\n};\n\nMixpanelLib.prototype.stop_batch_senders = function() {\n this._batch_requests = false;\n _.each(this.request_batchers, function(batcher) {\n batcher.stop();\n batcher.clear();\n });\n};\n\n/**\n * push() keeps the standard async-array-push\n * behavior around after the lib is loaded.\n * This is only useful for external integrations that\n * do not wish to rely on our convenience methods\n * (created in the snippet).\n *\n * ### Usage:\n * mixpanel.push(['register', { a: 'b' }]);\n *\n * @param {Array} item A [function_name, args...] array to be executed\n */\nMixpanelLib.prototype.push = function(item) {\n this._execute_array([item]);\n};\n\n/**\n * Disable events on the Mixpanel object. If passed no arguments,\n * this function disables tracking of any event. If passed an\n * array of event names, those events will be disabled, but other\n * events will continue to be tracked.\n *\n * Note: this function does not stop other mixpanel functions from\n * firing, such as register() or people.set().\n *\n * @param {Array} [events] An array of event names to disable\n */\nMixpanelLib.prototype.disable = function(events) {\n if (typeof(events) === 'undefined') {\n this._flags.disable_all_events = true;\n } else {\n this.__disabled_events = this.__disabled_events.concat(events);\n }\n};\n\nMixpanelLib.prototype._encode_data_for_request = function(data) {\n var encoded_data = _.JSONEncode(data);\n if (this.get_config('api_payload_format') === PAYLOAD_TYPE_BASE64) {\n encoded_data = _.base64Encode(encoded_data);\n }\n return {'data': encoded_data};\n};\n\n// internal method for handling track vs batch-enqueue logic\nMixpanelLib.prototype._track_or_batch = function(options, callback) {\n var truncated_data = _.truncate(options.data, 255);\n var endpoint = options.endpoint;\n var batcher = options.batcher;\n var should_send_immediately = options.should_send_immediately;\n var send_request_options = options.send_request_options || {};\n callback = callback || NOOP_FUNC;\n\n var request_enqueued_or_initiated = true;\n var send_request_immediately = _.bind(function() {\n if (!send_request_options.skip_hooks) {\n truncated_data = this._run_hook('before_send_' + options.type, truncated_data);\n }\n if (truncated_data) {\n console.log('MIXPANEL REQUEST:');\n console.log(truncated_data);\n return this._send_request(\n endpoint,\n this._encode_data_for_request(truncated_data),\n send_request_options,\n this._prepare_callback(callback, truncated_data)\n );\n } else {\n return null;\n }\n }, this);\n\n if (this._batch_requests && !should_send_immediately) {\n batcher.enqueue(truncated_data, function(succeeded) {\n if (succeeded) {\n callback(1, truncated_data);\n } else {\n send_request_immediately();\n }\n });\n } else {\n request_enqueued_or_initiated = send_request_immediately();\n }\n\n return request_enqueued_or_initiated && truncated_data;\n};\n\n/**\n * Track an event. This is the most important and\n * frequently used Mixpanel function.\n *\n * ### Usage:\n *\n * // track an event named 'Registered'\n * mixpanel.track('Registered', {'Gender': 'Male', 'Age': 21});\n *\n * // track an event using navigator.sendBeacon\n * mixpanel.track('Left page', {'duration_seconds': 35}, {transport: 'sendBeacon'});\n *\n * To track link clicks or form submissions, see track_links() or track_forms().\n *\n * @param {String} event_name The name of the event. This can be anything the user does - 'Button Click', 'Sign Up', 'Item Purchased', etc.\n * @param {Object} [properties] A set of properties to include with the event you're sending. These describe the user who did the event or details about the event itself.\n * @param {Object} [options] Optional configuration for this track request.\n * @param {String} [options.transport] Transport method for network request ('xhr' or 'sendBeacon').\n * @param {Boolean} [options.send_immediately] Whether to bypass batching/queueing and send track request immediately.\n * @param {Function} [callback] If provided, the callback function will be called after tracking the event.\n * @returns {Boolean|Object} If the tracking request was successfully initiated/queued, an object\n * with the tracking payload sent to the API server is returned; otherwise false.\n */\nMixpanelLib.prototype.track = addOptOutCheckMixpanelLib(function(event_name, properties, options, callback) {\n if (!callback && typeof options === 'function') {\n callback = options;\n options = null;\n }\n options = options || {};\n var transport = options['transport']; // external API, don't minify 'transport' prop\n if (transport) {\n options.transport = transport; // 'transport' prop name can be minified internally\n }\n var should_send_immediately = options['send_immediately'];\n if (typeof callback !== 'function') {\n callback = NOOP_FUNC;\n }\n\n if (_.isUndefined(event_name)) {\n this.report_error('No event name provided to mixpanel.track');\n return;\n }\n\n if (this._event_is_disabled(event_name)) {\n callback(0);\n return;\n }\n\n // set defaults\n properties = properties || {};\n properties['token'] = this.get_config('token');\n\n // set $duration if time_event was previously called for this event\n var start_timestamp = this['persistence'].remove_event_timer(event_name);\n if (!_.isUndefined(start_timestamp)) {\n var duration_in_ms = new Date().getTime() - start_timestamp;\n properties['$duration'] = parseFloat((duration_in_ms / 1000).toFixed(3));\n }\n\n this._set_default_superprops();\n\n // note: extend writes to the first object, so lets make sure we\n // don't write to the persistence properties object and info\n // properties object by passing in a new object\n\n // update properties with pageview info and super-properties\n properties = _.extend(\n {},\n _.info.properties(),\n this['persistence'].properties(),\n this.unpersisted_superprops,\n properties\n );\n\n var property_blacklist = this.get_config('property_blacklist');\n if (_.isArray(property_blacklist)) {\n _.each(property_blacklist, function(blacklisted_prop) {\n delete properties[blacklisted_prop];\n });\n } else {\n this.report_error('Invalid value for property_blacklist config: ' + property_blacklist);\n }\n\n var data = {\n 'event': event_name,\n 'properties': properties\n };\n var ret = this._track_or_batch({\n type: 'events',\n data: data,\n endpoint: this.get_config('api_host') + '/track/',\n batcher: this.request_batchers.events,\n should_send_immediately: should_send_immediately,\n send_request_options: options\n }, callback);\n\n return ret;\n});\n\n/**\n * Register the current user into one/many groups.\n *\n * ### Usage:\n *\n * mixpanel.set_group('company', ['mixpanel', 'google']) // an array of IDs\n * mixpanel.set_group('company', 'mixpanel')\n * mixpanel.set_group('company', 128746312)\n *\n * @param {String} group_key Group key\n * @param {Array|String|Number} group_ids An array of group IDs, or a singular group ID\n * @param {Function} [callback] If provided, the callback will be called after tracking the event.\n *\n */\nMixpanelLib.prototype.set_group = addOptOutCheckMixpanelLib(function(group_key, group_ids, callback) {\n if (!_.isArray(group_ids)) {\n group_ids = [group_ids];\n }\n var prop = {};\n prop[group_key] = group_ids;\n this.register(prop);\n return this['people'].set(group_key, group_ids, callback);\n});\n\n/**\n * Add a new group for this user.\n *\n * ### Usage:\n *\n * mixpanel.add_group('company', 'mixpanel')\n *\n * @param {String} group_key Group key\n * @param {*} group_id A valid Mixpanel property type\n * @param {Function} [callback] If provided, the callback will be called after tracking the event.\n */\nMixpanelLib.prototype.add_group = addOptOutCheckMixpanelLib(function(group_key, group_id, callback) {\n var old_values = this.get_property(group_key);\n if (old_values === undefined) {\n var prop = {};\n prop[group_key] = [group_id];\n this.register(prop);\n } else {\n if (old_values.indexOf(group_id) === -1) {\n old_values.push(group_id);\n this.register(prop);\n }\n }\n return this['people'].union(group_key, group_id, callback);\n});\n\n/**\n * Remove a group from this user.\n *\n * ### Usage:\n *\n * mixpanel.remove_group('company', 'mixpanel')\n *\n * @param {String} group_key Group key\n * @param {*} group_id A valid Mixpanel property type\n * @param {Function} [callback] If provided, the callback will be called after tracking the event.\n */\nMixpanelLib.prototype.remove_group = addOptOutCheckMixpanelLib(function(group_key, group_id, callback) {\n var old_value = this.get_property(group_key);\n // if the value doesn't exist, the persistent store is unchanged\n if (old_value !== undefined) {\n var idx = old_value.indexOf(group_id);\n if (idx > -1) {\n old_value.splice(idx, 1);\n this.register({group_key: old_value});\n }\n if (old_value.length === 0) {\n this.unregister(group_key);\n }\n }\n return this['people'].remove(group_key, group_id, callback);\n});\n\n/**\n * Track an event with specific groups.\n *\n * ### Usage:\n *\n * mixpanel.track_with_groups('purchase', {'product': 'iphone'}, {'University': ['UCB', 'UCLA']})\n *\n * @param {String} event_name The name of the event (see `mixpanel.track()`)\n * @param {Object=} properties A set of properties to include with the event you're sending (see `mixpanel.track()`)\n * @param {Object=} groups An object mapping group name keys to one or more values\n * @param {Function} [callback] If provided, the callback will be called after tracking the event.\n */\nMixpanelLib.prototype.track_with_groups = addOptOutCheckMixpanelLib(function(event_name, properties, groups, callback) {\n var tracking_props = _.extend({}, properties || {});\n _.each(groups, function(v, k) {\n if (v !== null && v !== undefined) {\n tracking_props[k] = v;\n }\n });\n return this.track(event_name, tracking_props, callback);\n});\n\nMixpanelLib.prototype._create_map_key = function (group_key, group_id) {\n return group_key + '_' + JSON.stringify(group_id);\n};\n\nMixpanelLib.prototype._remove_group_from_cache = function (group_key, group_id) {\n delete this._cached_groups[this._create_map_key(group_key, group_id)];\n};\n\n/**\n * Look up reference to a Mixpanel group\n *\n * ### Usage:\n *\n * mixpanel.get_group(group_key, group_id)\n *\n * @param {String} group_key Group key\n * @param {Object} group_id A valid Mixpanel property type\n * @returns {Object} A MixpanelGroup identifier\n */\nMixpanelLib.prototype.get_group = function (group_key, group_id) {\n var map_key = this._create_map_key(group_key, group_id);\n var group = this._cached_groups[map_key];\n if (group === undefined || group._group_key !== group_key || group._group_id !== group_id) {\n group = new MixpanelGroup();\n group._init(this, group_key, group_id);\n this._cached_groups[map_key] = group;\n }\n return group;\n};\n\n/**\n * Track mp_page_view event. This is now ignored by the server.\n *\n * @param {String} [page] The url of the page to record. If you don't include this, it defaults to the current url.\n * @deprecated\n */\nMixpanelLib.prototype.track_pageview = function(page) {\n if (_.isUndefined(page)) {\n page = document$1.location.href;\n }\n this.track('mp_page_view', _.info.pageviewInfo(page));\n};\n\n/**\n * Track clicks on a set of document elements. Selector must be a\n * valid query. Elements must exist on the page at the time track_links is called.\n *\n * ### Usage:\n *\n * // track click for link id #nav\n * mixpanel.track_links('#nav', 'Clicked Nav Link');\n *\n * ### Notes:\n *\n * This function will wait up to 300 ms for the Mixpanel\n * servers to respond. If they have not responded by that time\n * it will head to the link without ensuring that your event\n * has been tracked. To configure this timeout please see the\n * set_config() documentation below.\n *\n * If you pass a function in as the properties argument, the\n * function will receive the DOMElement that triggered the\n * event as an argument. You are expected to return an object\n * from the function; any properties defined on this object\n * will be sent to mixpanel as event properties.\n *\n * @type {Function}\n * @param {Object|String} query A valid DOM query, element or jQuery-esque list\n * @param {String} event_name The name of the event to track\n * @param {Object|Function} [properties] A properties object or function that returns a dictionary of properties when passed a DOMElement\n */\nMixpanelLib.prototype.track_links = function() {\n return this._track_dom.call(this, LinkTracker, arguments);\n};\n\n/**\n * Track form submissions. Selector must be a valid query.\n *\n * ### Usage:\n *\n * // track submission for form id 'register'\n * mixpanel.track_forms('#register', 'Created Account');\n *\n * ### Notes:\n *\n * This function will wait up to 300 ms for the mixpanel\n * servers to respond, if they have not responded by that time\n * it will head to the link without ensuring that your event\n * has been tracked. To configure this timeout please see the\n * set_config() documentation below.\n *\n * If you pass a function in as the properties argument, the\n * function will receive the DOMElement that triggered the\n * event as an argument. You are expected to return an object\n * from the function; any properties defined on this object\n * will be sent to mixpanel as event properties.\n *\n * @type {Function}\n * @param {Object|String} query A valid DOM query, element or jQuery-esque list\n * @param {String} event_name The name of the event to track\n * @param {Object|Function} [properties] This can be a set of properties, or a function that returns a set of properties after being passed a DOMElement\n */\nMixpanelLib.prototype.track_forms = function() {\n return this._track_dom.call(this, FormTracker, arguments);\n};\n\n/**\n * Time an event by including the time between this call and a\n * later 'track' call for the same event in the properties sent\n * with the event.\n *\n * ### Usage:\n *\n * // time an event named 'Registered'\n * mixpanel.time_event('Registered');\n * mixpanel.track('Registered', {'Gender': 'Male', 'Age': 21});\n *\n * When called for a particular event name, the next track call for that event\n * name will include the elapsed time between the 'time_event' and 'track'\n * calls. This value is stored as seconds in the '$duration' property.\n *\n * @param {String} event_name The name of the event.\n */\nMixpanelLib.prototype.time_event = function(event_name) {\n if (_.isUndefined(event_name)) {\n this.report_error('No event name provided to mixpanel.time_event');\n return;\n }\n\n if (this._event_is_disabled(event_name)) {\n return;\n }\n\n this['persistence'].set_event_timer(event_name, new Date().getTime());\n};\n\nvar REGISTER_DEFAULTS = {\n 'persistent': true\n};\n/**\n * Helper to parse options param for register methods, maintaining\n * legacy support for plain \"days\" param instead of options object\n * @param {Number|Object} [days_or_options] 'days' option (Number), or Options object for register methods\n * @returns {Object} options object\n */\nvar options_for_register = function(days_or_options) {\n var options;\n if (_.isObject(days_or_options)) {\n options = days_or_options;\n } else if (!_.isUndefined(days_or_options)) {\n options = {'days': days_or_options};\n } else {\n options = {};\n }\n return _.extend({}, REGISTER_DEFAULTS, options);\n};\n\n/**\n * Register a set of super properties, which are included with all\n * events. This will overwrite previous super property values.\n *\n * ### Usage:\n *\n * // register 'Gender' as a super property\n * mixpanel.register({'Gender': 'Female'});\n *\n * // register several super properties when a user signs up\n * mixpanel.register({\n * 'Email': 'jdoe@example.com',\n * 'Account Type': 'Free'\n * });\n *\n * // register only for the current pageload\n * mixpanel.register({'Name': 'Pat'}, {persistent: false});\n *\n * @param {Object} properties An associative array of properties to store about the user\n * @param {Number|Object} [days_or_options] Options object or number of days since the user's last visit to store the super properties (only valid for persisted props)\n * @param {boolean} [days_or_options.days] - number of days since the user's last visit to store the super properties (only valid for persisted props)\n * @param {boolean} [days_or_options.persistent=true] - whether to put in persistent storage (cookie/localStorage)\n */\nMixpanelLib.prototype.register = function(props, days_or_options) {\n var options = options_for_register(days_or_options);\n if (options['persistent']) {\n this['persistence'].register(props, options['days']);\n } else {\n _.extend(this.unpersisted_superprops, props);\n }\n};\n\n/**\n * Register a set of super properties only once. This will not\n * overwrite previous super property values, unlike register().\n *\n * ### Usage:\n *\n * // register a super property for the first time only\n * mixpanel.register_once({\n * 'First Login Date': new Date().toISOString()\n * });\n *\n * // register once, only for the current pageload\n * mixpanel.register_once({\n * 'First interaction time': new Date().toISOString()\n * }, 'None', {persistent: false});\n *\n * ### Notes:\n *\n * If default_value is specified, current super properties\n * with that value will be overwritten.\n *\n * @param {Object} properties An associative array of properties to store about the user\n * @param {*} [default_value] Value to override if already set in super properties (ex: 'False') Default: 'None'\n * @param {Number|Object} [days_or_options] Options object or number of days since the user's last visit to store the super properties (only valid for persisted props)\n * @param {boolean} [days_or_options.days] - number of days since the user's last visit to store the super properties (only valid for persisted props)\n * @param {boolean} [days_or_options.persistent=true] - whether to put in persistent storage (cookie/localStorage)\n */\nMixpanelLib.prototype.register_once = function(props, default_value, days_or_options) {\n var options = options_for_register(days_or_options);\n if (options['persistent']) {\n this['persistence'].register_once(props, default_value, options['days']);\n } else {\n if (typeof(default_value) === 'undefined') {\n default_value = 'None';\n }\n _.each(props, function(val, prop) {\n if (!this.unpersisted_superprops.hasOwnProperty(prop) || this.unpersisted_superprops[prop] === default_value) {\n this.unpersisted_superprops[prop] = val;\n }\n }, this);\n }\n};\n\n/**\n * Delete a super property stored with the current user.\n *\n * @param {String} property The name of the super property to remove\n * @param {Object} [options]\n * @param {boolean} [options.persistent=true] - whether to look in persistent storage (cookie/localStorage)\n */\nMixpanelLib.prototype.unregister = function(property, options) {\n options = options_for_register(options);\n if (options['persistent']) {\n this['persistence'].unregister(property);\n } else {\n delete this.unpersisted_superprops[property];\n }\n};\n\nMixpanelLib.prototype._register_single = function(prop, value) {\n var props = {};\n props[prop] = value;\n this.register(props);\n};\n\n/**\n * Identify a user with a unique ID to track user activity across\n * devices, tie a user to their events, and create a user profile.\n * If you never call this method, unique visitors are tracked using\n * a UUID generated the first time they visit the site.\n *\n * Call identify when you know the identity of the current user,\n * typically after login or signup. We recommend against using\n * identify for anonymous visitors to your site.\n *\n * ### Notes:\n * If your project has\n * <a href=\"https://help.mixpanel.com/hc/en-us/articles/360039133851\">ID Merge</a>\n * enabled, the identify method will connect pre- and\n * post-authentication events when appropriate.\n *\n * If your project does not have ID Merge enabled, identify will\n * change the user's local distinct_id to the unique ID you pass.\n * Events tracked prior to authentication will not be connected\n * to the same user identity. If ID Merge is disabled, alias can\n * be used to connect pre- and post-registration events.\n *\n * @param {String} [unique_id] A string that uniquely identifies a user. If not provided, the distinct_id currently in the persistent store (cookie or localStorage) will be used.\n */\nMixpanelLib.prototype.identify = function(\n new_distinct_id, _set_callback, _add_callback, _append_callback, _set_once_callback, _union_callback, _unset_callback, _remove_callback\n) {\n // Optional Parameters\n // _set_callback:function A callback to be run if and when the People set queue is flushed\n // _add_callback:function A callback to be run if and when the People add queue is flushed\n // _append_callback:function A callback to be run if and when the People append queue is flushed\n // _set_once_callback:function A callback to be run if and when the People set_once queue is flushed\n // _union_callback:function A callback to be run if and when the People union queue is flushed\n // _unset_callback:function A callback to be run if and when the People unset queue is flushed\n\n var previous_distinct_id = this.get_distinct_id();\n this.register({'$user_id': new_distinct_id});\n\n if (!this.get_property('$device_id')) {\n // The persisted distinct id might not actually be a device id at all\n // it might be a distinct id of the user from before\n var device_id = previous_distinct_id;\n this.register_once({\n '$had_persisted_distinct_id': true,\n '$device_id': device_id\n }, '');\n }\n\n // identify only changes the distinct id if it doesn't match either the existing or the alias;\n // if it's new, blow away the alias as well.\n if (new_distinct_id !== previous_distinct_id && new_distinct_id !== this.get_property(ALIAS_ID_KEY)) {\n this.unregister(ALIAS_ID_KEY);\n this.register({'distinct_id': new_distinct_id});\n }\n this._flags.identify_called = true;\n // Flush any queued up people requests\n this['people']._flush(_set_callback, _add_callback, _append_callback, _set_once_callback, _union_callback, _unset_callback, _remove_callback);\n\n // send an $identify event any time the distinct_id is changing - logic on the server\n // will determine whether or not to do anything with it.\n if (new_distinct_id !== previous_distinct_id) {\n this.track('$identify', {\n 'distinct_id': new_distinct_id,\n '$anon_distinct_id': previous_distinct_id\n }, {skip_hooks: true});\n }\n};\n\n/**\n * Clears super properties and generates a new random distinct_id for this instance.\n * Useful for clearing data when a user logs out.\n */\nMixpanelLib.prototype.reset = function() {\n this['persistence'].clear();\n this._flags.identify_called = false;\n var uuid = _.UUID();\n this.register_once({\n 'distinct_id': uuid,\n '$device_id': uuid\n }, '');\n};\n\n/**\n * Returns the current distinct id of the user. This is either the id automatically\n * generated by the library or the id that has been passed by a call to identify().\n *\n * ### Notes:\n *\n * get_distinct_id() can only be called after the Mixpanel library has finished loading.\n * init() has a loaded function available to handle this automatically. For example:\n *\n * // set distinct_id after the mixpanel library has loaded\n * mixpanel.init('YOUR PROJECT TOKEN', {\n * loaded: function(mixpanel) {\n * distinct_id = mixpanel.get_distinct_id();\n * }\n * });\n */\nMixpanelLib.prototype.get_distinct_id = function() {\n return this.get_property('distinct_id');\n};\n\n/**\n * The alias method creates an alias which Mixpanel will use to\n * remap one id to another. Multiple aliases can point to the\n * same identifier.\n *\n * The following is a valid use of alias:\n *\n * mixpanel.alias('new_id', 'existing_id');\n * // You can add multiple id aliases to the existing ID\n * mixpanel.alias('newer_id', 'existing_id');\n *\n * Aliases can also be chained - the following is a valid example:\n *\n * mixpanel.alias('new_id', 'existing_id');\n * // chain newer_id - new_id - existing_id\n * mixpanel.alias('newer_id', 'new_id');\n *\n * Aliases cannot point to multiple identifiers - the following\n * example will not work:\n *\n * mixpanel.alias('new_id', 'existing_id');\n * // this is invalid as 'new_id' already points to 'existing_id'\n * mixpanel.alias('new_id', 'newer_id');\n *\n * ### Notes:\n *\n * If your project does not have\n * <a href=\"https://help.mixpanel.com/hc/en-us/articles/360039133851\">ID Merge</a>\n * enabled, the best practice is to call alias once when a unique\n * ID is first created for a user (e.g., when a user first registers\n * for an account). Do not use alias multiple times for a single\n * user without ID Merge enabled.\n *\n * @param {String} alias A unique identifier that you want to use for this user in the future.\n * @param {String} [original] The current identifier being used for this user.\n */\nMixpanelLib.prototype.alias = function(alias, original) {\n // If the $people_distinct_id key exists in persistence, there has been a previous\n // mixpanel.people.identify() call made for this user. It is VERY BAD to make an alias with\n // this ID, as it will duplicate users.\n if (alias === this.get_property(PEOPLE_DISTINCT_ID_KEY)) {\n this.report_error('Attempting to create alias for existing People user - aborting.');\n return -2;\n }\n\n var _this = this;\n if (_.isUndefined(original)) {\n original = this.get_distinct_id();\n }\n if (alias !== original) {\n this._register_single(ALIAS_ID_KEY, alias);\n return this.track('$create_alias', {\n 'alias': alias,\n 'distinct_id': original\n }, {\n skip_hooks: true\n }, function() {\n // Flush the people queue\n _this.identify(alias);\n });\n } else {\n this.report_error('alias matches current distinct_id - skipping api call.');\n this.identify(alias);\n return -1;\n }\n};\n\n/**\n * Provide a string to recognize the user by. The string passed to\n * this method will appear in the Mixpanel Streams product rather\n * than an automatically generated name. Name tags do not have to\n * be unique.\n *\n * This value will only be included in Streams data.\n *\n * @param {String} name_tag A human readable name for the user\n * @deprecated\n */\nMixpanelLib.prototype.name_tag = function(name_tag) {\n this._register_single('mp_name_tag', name_tag);\n};\n\n/**\n * Update the configuration of a mixpanel library instance.\n *\n * The default config is:\n *\n * {\n * // HTTP method for tracking requests\n * api_method: 'POST'\n *\n * // transport for sending requests ('XHR' or 'sendBeacon')\n * // NB: sendBeacon should only be used for scenarios such as\n * // page unload where a \"best-effort\" attempt to send is\n * // acceptable; the sendBeacon API does not support callbacks\n * // or any way to know the result of the request. Mixpanel\n * // tracking via sendBeacon will not support any event-\n * // batching or retry mechanisms.\n * api_transport: 'XHR'\n *\n * // turn on request-batching/queueing/retry\n * batch_requests: false,\n *\n * // maximum number of events/updates to send in a single\n * // network request\n * batch_size: 50,\n *\n * // milliseconds to wait between sending batch requests\n * batch_flush_interval_ms: 5000,\n *\n * // milliseconds to wait for network responses to batch requests\n * // before they are considered timed-out and retried\n * batch_request_timeout_ms: 90000,\n *\n * // override value for cookie domain, only useful for ensuring\n * // correct cross-subdomain cookies on unusual domains like\n * // subdomain.mainsite.avocat.fr; NB this cannot be used to\n * // set cookies on a different domain than the current origin\n * cookie_domain: ''\n *\n * // super properties cookie expiration (in days)\n * cookie_expiration: 365\n *\n * // if true, cookie will be set with SameSite=None; Secure\n * // this is only useful in special situations, like embedded\n * // 3rd-party iframes that set up a Mixpanel instance\n * cross_site_cookie: false\n *\n * // super properties span subdomains\n * cross_subdomain_cookie: true\n *\n * // debug mode\n * debug: false\n *\n * // if this is true, the mixpanel cookie or localStorage entry\n * // will be deleted, and no user persistence will take place\n * disable_persistence: false\n *\n * // if this is true, Mixpanel will automatically determine\n * // City, Region and Country data using the IP address of\n * //the client\n * ip: true\n *\n * // opt users out of tracking by this Mixpanel instance by default\n * opt_out_tracking_by_default: false\n *\n * // opt users out of browser data storage by this Mixpanel instance by default\n * opt_out_persistence_by_default: false\n *\n * // persistence mechanism used by opt-in/opt-out methods - cookie\n * // or localStorage - falls back to cookie if localStorage is unavailable\n * opt_out_tracking_persistence_type: 'localStorage'\n *\n * // customize the name of cookie/localStorage set by opt-in/opt-out methods\n * opt_out_tracking_cookie_prefix: null\n *\n * // type of persistent store for super properties (cookie/\n * // localStorage) if set to 'localStorage', any existing\n * // mixpanel cookie value with the same persistence_name\n * // will be transferred to localStorage and deleted\n * persistence: 'cookie'\n *\n * // name for super properties persistent store\n * persistence_name: ''\n *\n * // names of properties/superproperties which should never\n * // be sent with track() calls\n * property_blacklist: []\n *\n * // if this is true, mixpanel cookies will be marked as\n * // secure, meaning they will only be transmitted over https\n * secure_cookie: false\n *\n * // the amount of time track_links will\n * // wait for Mixpanel's servers to respond\n * track_links_timeout: 300\n *\n * // if you set upgrade to be true, the library will check for\n * // a cookie from our old js library and import super\n * // properties from it, then the old cookie is deleted\n * // The upgrade config option only works in the initialization,\n * // so make sure you set it when you create the library.\n * upgrade: false\n *\n * // extra HTTP request headers to set for each API request, in\n * // the format {'Header-Name': value}\n * xhr_headers: {}\n *\n * // whether to ignore or respect the web browser's Do Not Track setting\n * ignore_dnt: false\n * }\n *\n *\n * @param {Object} config A dictionary of new configuration values to update\n */\nMixpanelLib.prototype.set_config = function(config) {\n if (_.isObject(config)) {\n _.extend(this['config'], config);\n\n var new_batch_size = config['batch_size'];\n if (new_batch_size) {\n _.each(this.request_batchers, function(batcher) {\n batcher.resetBatchSize();\n });\n }\n\n if (!this.get_config('persistence_name')) {\n this['config']['persistence_name'] = this['config']['cookie_name'];\n }\n if (!this.get_config('disable_persistence')) {\n this['config']['disable_persistence'] = this['config']['disable_cookie'];\n }\n\n if (this['persistence']) {\n this['persistence'].update_config(this['config']);\n }\n Config.DEBUG = Config.DEBUG || this.get_config('debug');\n }\n};\n\n/**\n * returns the current config object for the library.\n */\nMixpanelLib.prototype.get_config = function(prop_name) {\n return this['config'][prop_name];\n};\n\n/**\n * Fetch a hook function from config, with safe default, and run it\n * against the given arguments\n * @param {string} hook_name which hook to retrieve\n * @returns {any|null} return value of user-provided hook, or null if nothing was returned\n */\nMixpanelLib.prototype._run_hook = function(hook_name) {\n var ret = (this['config']['hooks'][hook_name] || IDENTITY_FUNC).apply(this, slice.call(arguments, 1));\n if (typeof ret === 'undefined') {\n this.report_error(hook_name + ' hook did not return a value');\n ret = null;\n }\n return ret;\n};\n\n/**\n * Returns the value of the super property named property_name. If no such\n * property is set, get_property() will return the undefined value.\n *\n * ### Notes:\n *\n * get_property() can only be called after the Mixpanel library has finished loading.\n * init() has a loaded function available to handle this automatically. For example:\n *\n * // grab value for 'user_id' after the mixpanel library has loaded\n * mixpanel.init('YOUR PROJECT TOKEN', {\n * loaded: function(mixpanel) {\n * user_id = mixpanel.get_property('user_id');\n * }\n * });\n *\n * @param {String} property_name The name of the super property you want to retrieve\n */\nMixpanelLib.prototype.get_property = function(property_name) {\n return this['persistence']['props'][property_name];\n};\n\nMixpanelLib.prototype.toString = function() {\n var name = this.get_config('name');\n if (name !== PRIMARY_INSTANCE_NAME) {\n name = PRIMARY_INSTANCE_NAME + '.' + name;\n }\n return name;\n};\n\nMixpanelLib.prototype._event_is_disabled = function(event_name) {\n return _.isBlockedUA(userAgent) ||\n this._flags.disable_all_events ||\n _.include(this.__disabled_events, event_name);\n};\n\n// perform some housekeeping around GDPR opt-in/out state\nMixpanelLib.prototype._gdpr_init = function() {\n var is_localStorage_requested = this.get_config('opt_out_tracking_persistence_type') === 'localStorage';\n\n // try to convert opt-in/out cookies to localStorage if possible\n if (is_localStorage_requested && _.localStorage.is_supported()) {\n if (!this.has_opted_in_tracking() && this.has_opted_in_tracking({'persistence_type': 'cookie'})) {\n this.opt_in_tracking({'enable_persistence': false});\n }\n if (!this.has_opted_out_tracking() && this.has_opted_out_tracking({'persistence_type': 'cookie'})) {\n this.opt_out_tracking({'clear_persistence': false});\n }\n this.clear_opt_in_out_tracking({\n 'persistence_type': 'cookie',\n 'enable_persistence': false\n });\n }\n\n // check whether the user has already opted out - if so, clear & disable persistence\n if (this.has_opted_out_tracking()) {\n this._gdpr_update_persistence({'clear_persistence': true});\n\n // check whether we should opt out by default\n // note: we don't clear persistence here by default since opt-out default state is often\n // used as an initial state while GDPR information is being collected\n } else if (!this.has_opted_in_tracking() && (\n this.get_config('opt_out_tracking_by_default') || _.cookie.get('mp_optout')\n )) {\n _.cookie.remove('mp_optout');\n this.opt_out_tracking({\n 'clear_persistence': this.get_config('opt_out_persistence_by_default')\n });\n }\n};\n\n/**\n * Enable or disable persistence based on options\n * only enable/disable if persistence is not already in this state\n * @param {boolean} [options.clear_persistence] If true, will delete all data stored by the sdk in persistence and disable it\n * @param {boolean} [options.enable_persistence] If true, will re-enable sdk persistence\n */\nMixpanelLib.prototype._gdpr_update_persistence = function(options) {\n var disabled;\n if (options && options['clear_persistence']) {\n disabled = true;\n } else if (options && options['enable_persistence']) {\n disabled = false;\n } else {\n return;\n }\n\n if (!this.get_config('disable_persistence') && this['persistence'].disabled !== disabled) {\n this['persistence'].set_disabled(disabled);\n }\n\n if (disabled) {\n _.each(this.request_batchers, function(batcher) {\n batcher.clear();\n });\n }\n};\n\n// call a base gdpr function after constructing the appropriate token and options args\nMixpanelLib.prototype._gdpr_call_func = function(func, options) {\n options = _.extend({\n 'track': _.bind(this.track, this),\n 'persistence_type': this.get_config('opt_out_tracking_persistence_type'),\n 'cookie_prefix': this.get_config('opt_out_tracking_cookie_prefix'),\n 'cookie_expiration': this.get_config('cookie_expiration'),\n 'cross_site_cookie': this.get_config('cross_site_cookie'),\n 'cross_subdomain_cookie': this.get_config('cross_subdomain_cookie'),\n 'cookie_domain': this.get_config('cookie_domain'),\n 'secure_cookie': this.get_config('secure_cookie'),\n 'ignore_dnt': this.get_config('ignore_dnt')\n }, options);\n\n // check if localStorage can be used for recording opt out status, fall back to cookie if not\n if (!_.localStorage.is_supported()) {\n options['persistence_type'] = 'cookie';\n }\n\n return func(this.get_config('token'), {\n track: options['track'],\n trackEventName: options['track_event_name'],\n trackProperties: options['track_properties'],\n persistenceType: options['persistence_type'],\n persistencePrefix: options['cookie_prefix'],\n cookieDomain: options['cookie_domain'],\n cookieExpiration: options['cookie_expiration'],\n crossSiteCookie: options['cross_site_cookie'],\n crossSubdomainCookie: options['cross_subdomain_cookie'],\n secureCookie: options['secure_cookie'],\n ignoreDnt: options['ignore_dnt']\n });\n};\n\n/**\n * Opt the user in to data tracking and cookies/localstorage for this Mixpanel instance\n *\n * ### Usage\n *\n * // opt user in\n * mixpanel.opt_in_tracking();\n *\n * // opt user in with specific event name, properties, cookie configuration\n * mixpanel.opt_in_tracking({\n * track_event_name: 'User opted in',\n * track_event_properties: {\n * 'Email': 'jdoe@example.com'\n * },\n * cookie_expiration: 30,\n * secure_cookie: true\n * });\n *\n * @param {Object} [options] A dictionary of config options to override\n * @param {function} [options.track] Function used for tracking a Mixpanel event to record the opt-in action (default is this Mixpanel instance's track method)\n * @param {string} [options.track_event_name=$opt_in] Event name to be used for tracking the opt-in action\n * @param {Object} [options.track_properties] Set of properties to be tracked along with the opt-in action\n * @param {boolean} [options.enable_persistence=true] If true, will re-enable sdk persistence\n * @param {string} [options.persistence_type=localStorage] Persistence mechanism used - cookie or localStorage - falls back to cookie if localStorage is unavailable\n * @param {string} [options.cookie_prefix=__mp_opt_in_out] Custom prefix to be used in the cookie/localstorage name\n * @param {Number} [options.cookie_expiration] Number of days until the opt-in cookie expires (overrides value specified in this Mixpanel instance's config)\n * @param {string} [options.cookie_domain] Custom cookie domain (overrides value specified in this Mixpanel instance's config)\n * @param {boolean} [options.cross_site_cookie] Whether the opt-in cookie is set as cross-site-enabled (overrides value specified in this Mixpanel instance's config)\n * @param {boolean} [options.cross_subdomain_cookie] Whether the opt-in cookie is set as cross-subdomain or not (overrides value specified in this Mixpanel instance's config)\n * @param {boolean} [options.secure_cookie] Whether the opt-in cookie is set as secure or not (overrides value specified in this Mixpanel instance's config)\n */\nMixpanelLib.prototype.opt_in_tracking = function(options) {\n options = _.extend({\n 'enable_persistence': true\n }, options);\n\n this._gdpr_call_func(optIn, options);\n this._gdpr_update_persistence(options);\n};\n\n/**\n * Opt the user out of data tracking and cookies/localstorage for this Mixpanel instance\n *\n * ### Usage\n *\n * // opt user out\n * mixpanel.opt_out_tracking();\n *\n * // opt user out with different cookie configuration from Mixpanel instance\n * mixpanel.opt_out_tracking({\n * cookie_expiration: 30,\n * secure_cookie: true\n * });\n *\n * @param {Object} [options] A dictionary of config options to override\n * @param {boolean} [options.delete_user=true] If true, will delete the currently identified user's profile and clear all charges after opting the user out\n * @param {boolean} [options.clear_persistence=true] If true, will delete all data stored by the sdk in persistence\n * @param {string} [options.persistence_type=localStorage] Persistence mechanism used - cookie or localStorage - falls back to cookie if localStorage is unavailable\n * @param {string} [options.cookie_prefix=__mp_opt_in_out] Custom prefix to be used in the cookie/localstorage name\n * @param {Number} [options.cookie_expiration] Number of days until the opt-in cookie expires (overrides value specified in this Mixpanel instance's config)\n * @param {string} [options.cookie_domain] Custom cookie domain (overrides value specified in this Mixpanel instance's config)\n * @param {boolean} [options.cross_site_cookie] Whether the opt-in cookie is set as cross-site-enabled (overrides value specified in this Mixpanel instance's config)\n * @param {boolean} [options.cross_subdomain_cookie] Whether the opt-in cookie is set as cross-subdomain or not (overrides value specified in this Mixpanel instance's config)\n * @param {boolean} [options.secure_cookie] Whether the opt-in cookie is set as secure or not (overrides value specified in this Mixpanel instance's config)\n */\nMixpanelLib.prototype.opt_out_tracking = function(options) {\n options = _.extend({\n 'clear_persistence': true,\n 'delete_user': true\n }, options);\n\n // delete user and clear charges since these methods may be disabled by opt-out\n if (options['delete_user'] && this['people'] && this['people']._identify_called()) {\n this['people'].delete_user();\n this['people'].clear_charges();\n }\n\n this._gdpr_call_func(optOut, options);\n this._gdpr_update_persistence(options);\n};\n\n/**\n * Check whether the user has opted in to data tracking and cookies/localstorage for this Mixpanel instance\n *\n * ### Usage\n *\n * var has_opted_in = mixpanel.has_opted_in_tracking();\n * // use has_opted_in value\n *\n * @param {Object} [options] A dictionary of config options to override\n * @param {string} [options.persistence_type=localStorage] Persistence mechanism used - cookie or localStorage - falls back to cookie if localStorage is unavailable\n * @param {string} [options.cookie_prefix=__mp_opt_in_out] Custom prefix to be used in the cookie/localstorage name\n * @returns {boolean} current opt-in status\n */\nMixpanelLib.prototype.has_opted_in_tracking = function(options) {\n return this._gdpr_call_func(hasOptedIn, options);\n};\n\n/**\n * Check whether the user has opted out of data tracking and cookies/localstorage for this Mixpanel instance\n *\n * ### Usage\n *\n * var has_opted_out = mixpanel.has_opted_out_tracking();\n * // use has_opted_out value\n *\n * @param {Object} [options] A dictionary of config options to override\n * @param {string} [options.persistence_type=localStorage] Persistence mechanism used - cookie or localStorage - falls back to cookie if localStorage is unavailable\n * @param {string} [options.cookie_prefix=__mp_opt_in_out] Custom prefix to be used in the cookie/localstorage name\n * @returns {boolean} current opt-out status\n */\nMixpanelLib.prototype.has_opted_out_tracking = function(options) {\n return this._gdpr_call_func(hasOptedOut, options);\n};\n\n/**\n * Clear the user's opt in/out status of data tracking and cookies/localstorage for this Mixpanel instance\n *\n * ### Usage\n *\n * // clear user's opt-in/out status\n * mixpanel.clear_opt_in_out_tracking();\n *\n * // clear user's opt-in/out status with specific cookie configuration - should match\n * // configuration used when opt_in_tracking/opt_out_tracking methods were called.\n * mixpanel.clear_opt_in_out_tracking({\n * cookie_expiration: 30,\n * secure_cookie: true\n * });\n *\n * @param {Object} [options] A dictionary of config options to override\n * @param {boolean} [options.enable_persistence=true] If true, will re-enable sdk persistence\n * @param {string} [options.persistence_type=localStorage] Persistence mechanism used - cookie or localStorage - falls back to cookie if localStorage is unavailable\n * @param {string} [options.cookie_prefix=__mp_opt_in_out] Custom prefix to be used in the cookie/localstorage name\n * @param {Number} [options.cookie_expiration] Number of days until the opt-in cookie expires (overrides value specified in this Mixpanel instance's config)\n * @param {string} [options.cookie_domain] Custom cookie domain (overrides value specified in this Mixpanel instance's config)\n * @param {boolean} [options.cross_site_cookie] Whether the opt-in cookie is set as cross-site-enabled (overrides value specified in this Mixpanel instance's config)\n * @param {boolean} [options.cross_subdomain_cookie] Whether the opt-in cookie is set as cross-subdomain or not (overrides value specified in this Mixpanel instance's config)\n * @param {boolean} [options.secure_cookie] Whether the opt-in cookie is set as secure or not (overrides value specified in this Mixpanel instance's config)\n */\nMixpanelLib.prototype.clear_opt_in_out_tracking = function(options) {\n options = _.extend({\n 'enable_persistence': true\n }, options);\n\n this._gdpr_call_func(clearOptInOut, options);\n this._gdpr_update_persistence(options);\n};\n\nMixpanelLib.prototype.report_error = function(msg, err) {\n console.error.apply(console.error, arguments);\n try {\n if (!err && !(msg instanceof Error)) {\n msg = new Error(msg);\n }\n this.get_config('error_reporter')(msg, err);\n } catch(err) {\n console.error(err);\n }\n};\n\n// EXPORTS (for closure compiler)\n\n// MixpanelLib Exports\nMixpanelLib.prototype['init'] = MixpanelLib.prototype.init;\nMixpanelLib.prototype['reset'] = MixpanelLib.prototype.reset;\nMixpanelLib.prototype['disable'] = MixpanelLib.prototype.disable;\nMixpanelLib.prototype['time_event'] = MixpanelLib.prototype.time_event;\nMixpanelLib.prototype['track'] = MixpanelLib.prototype.track;\nMixpanelLib.prototype['track_links'] = MixpanelLib.prototype.track_links;\nMixpanelLib.prototype['track_forms'] = MixpanelLib.prototype.track_forms;\nMixpanelLib.prototype['track_pageview'] = MixpanelLib.prototype.track_pageview;\nMixpanelLib.prototype['register'] = MixpanelLib.prototype.register;\nMixpanelLib.prototype['register_once'] = MixpanelLib.prototype.register_once;\nMixpanelLib.prototype['unregister'] = MixpanelLib.prototype.unregister;\nMixpanelLib.prototype['identify'] = MixpanelLib.prototype.identify;\nMixpanelLib.prototype['alias'] = MixpanelLib.prototype.alias;\nMixpanelLib.prototype['name_tag'] = MixpanelLib.prototype.name_tag;\nMixpanelLib.prototype['set_config'] = MixpanelLib.prototype.set_config;\nMixpanelLib.prototype['get_config'] = MixpanelLib.prototype.get_config;\nMixpanelLib.prototype['get_property'] = MixpanelLib.prototype.get_property;\nMixpanelLib.prototype['get_distinct_id'] = MixpanelLib.prototype.get_distinct_id;\nMixpanelLib.prototype['toString'] = MixpanelLib.prototype.toString;\nMixpanelLib.prototype['opt_out_tracking'] = MixpanelLib.prototype.opt_out_tracking;\nMixpanelLib.prototype['opt_in_tracking'] = MixpanelLib.prototype.opt_in_tracking;\nMixpanelLib.prototype['has_opted_out_tracking'] = MixpanelLib.prototype.has_opted_out_tracking;\nMixpanelLib.prototype['has_opted_in_tracking'] = MixpanelLib.prototype.has_opted_in_tracking;\nMixpanelLib.prototype['clear_opt_in_out_tracking'] = MixpanelLib.prototype.clear_opt_in_out_tracking;\nMixpanelLib.prototype['get_group'] = MixpanelLib.prototype.get_group;\nMixpanelLib.prototype['set_group'] = MixpanelLib.prototype.set_group;\nMixpanelLib.prototype['add_group'] = MixpanelLib.prototype.add_group;\nMixpanelLib.prototype['remove_group'] = MixpanelLib.prototype.remove_group;\nMixpanelLib.prototype['track_with_groups'] = MixpanelLib.prototype.track_with_groups;\nMixpanelLib.prototype['start_batch_senders'] = MixpanelLib.prototype.start_batch_senders;\nMixpanelLib.prototype['stop_batch_senders'] = MixpanelLib.prototype.stop_batch_senders;\n\n// MixpanelPersistence Exports\nMixpanelPersistence.prototype['properties'] = MixpanelPersistence.prototype.properties;\nMixpanelPersistence.prototype['update_search_keyword'] = MixpanelPersistence.prototype.update_search_keyword;\nMixpanelPersistence.prototype['update_referrer_info'] = MixpanelPersistence.prototype.update_referrer_info;\nMixpanelPersistence.prototype['get_cross_subdomain'] = MixpanelPersistence.prototype.get_cross_subdomain;\nMixpanelPersistence.prototype['clear'] = MixpanelPersistence.prototype.clear;\n\n\nvar instances = {};\nvar extend_mp = function() {\n // add all the sub mixpanel instances\n _.each(instances, function(instance, name) {\n if (name !== PRIMARY_INSTANCE_NAME) { mixpanel_master[name] = instance; }\n });\n\n // add private functions as _\n mixpanel_master['_'] = _;\n};\n\nvar override_mp_init_func = function() {\n // we override the snippets init function to handle the case where a\n // user initializes the mixpanel library after the script loads & runs\n mixpanel_master['init'] = function(token, config, name) {\n if (name) {\n // initialize a sub library\n if (!mixpanel_master[name]) {\n mixpanel_master[name] = instances[name] = create_mplib(token, config, name);\n mixpanel_master[name]._loaded();\n }\n return mixpanel_master[name];\n } else {\n var instance = mixpanel_master;\n\n if (instances[PRIMARY_INSTANCE_NAME]) {\n // main mixpanel lib already initialized\n instance = instances[PRIMARY_INSTANCE_NAME];\n } else if (token) {\n // intialize the main mixpanel lib\n instance = create_mplib(token, config, PRIMARY_INSTANCE_NAME);\n instance._loaded();\n instances[PRIMARY_INSTANCE_NAME] = instance;\n }\n\n mixpanel_master = instance;\n if (init_type === INIT_SNIPPET) {\n window$1[PRIMARY_INSTANCE_NAME] = mixpanel_master;\n }\n extend_mp();\n }\n };\n};\n\nvar add_dom_loaded_handler = function() {\n // Cross browser DOM Loaded support\n function dom_loaded_handler() {\n // function flag since we only want to execute this once\n if (dom_loaded_handler.done) { return; }\n dom_loaded_handler.done = true;\n\n DOM_LOADED = true;\n ENQUEUE_REQUESTS = false;\n\n _.each(instances, function(inst) {\n inst._dom_loaded();\n });\n }\n\n function do_scroll_check() {\n try {\n document$1.documentElement.doScroll('left');\n } catch(e) {\n setTimeout(do_scroll_check, 1);\n return;\n }\n\n dom_loaded_handler();\n }\n\n if (document$1.addEventListener) {\n if (document$1.readyState === 'complete') {\n // safari 4 can fire the DOMContentLoaded event before loading all\n // external JS (including this file). you will see some copypasta\n // on the internet that checks for 'complete' and 'loaded', but\n // 'loaded' is an IE thing\n dom_loaded_handler();\n } else {\n document$1.addEventListener('DOMContentLoaded', dom_loaded_handler, false);\n }\n } else if (document$1.attachEvent) {\n // IE\n document$1.attachEvent('onreadystatechange', dom_loaded_handler);\n\n // check to make sure we arn't in a frame\n var toplevel = false;\n try {\n toplevel = window$1.frameElement === null;\n } catch(e) {\n // noop\n }\n\n if (document$1.documentElement.doScroll && toplevel) {\n do_scroll_check();\n }\n }\n\n // fallback handler, always will work\n _.register_event(window$1, 'load', dom_loaded_handler, true);\n};\n\nfunction init_as_module() {\n init_type = INIT_MODULE;\n mixpanel_master = new MixpanelLib();\n\n override_mp_init_func();\n mixpanel_master['init']();\n add_dom_loaded_handler();\n\n return mixpanel_master;\n}\n\nvar mixpanel = init_as_module();\n\nmodule.exports = mixpanel;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","import '../scss/app.scss';\n\n/**\n * Various scripts for modules.\n */\nrequire( './modules/admin-main.js' );\nrequire( './modules/admin-performance.js' );\nrequire( './modules/admin-caching.js' );\nrequire( './modules/admin-minification.js' );\nrequire( './modules/admin-dashboard.js' );\nrequire( './modules/admin-uptime.js' );\nrequire( './modules/admin-cloudflare.js' );\nrequire( './modules/admin-advanced.js' );\nrequire( './modules/admin-settings.js' );\nrequire( './modules/admin-notifications.js' );\nrequire( './mixpanel.js' );\n\njQuery( document ).ready( function() {\n\twindow.WPHB_Admin.init();\n\twindow.WPHB_Admin.notices.init();\n\twindow.wphbMixPanel.init();\n} );\n"],"names":["MixPanel","require","window","wphbMixPanel","init","wphb","mixpanel","enabled","opt_out_tracking_by_default","ip","register","plugin","plugin_type","plugin_version","wp_version","wp_type","locale","active_theme","php_version","mysql_version","server_type","optIn","this","opt_in_tracking","optOut","opt_out_tracking","deactivate","reason","feedback","track","enableFeature","feature","disableFeature","event","data","has_opted_out_tracking","$","OrphanedScanner","remainingSteps","currentStep","Fetcher","then","response","timeout","highCPU","document","getElementById","classList","remove","add","setTimeout","updateProgressBar","getProgress","step","totalSteps","onFinish","Promise","resolve","SUI","closeModal","innerHTML","WPHB_Admin","notices","show","getString","Scanner","jQuery","advanced","module","self","systemInfoDropdown","hash","location","on","e","preventDefault","showModal","target","dataset","entries","type","button","find","addClass","serialize","id","removeClass","success","system","replace","val","trigger","urlStrings","attr","fragmentsToggle","addEventListener","toggle","alignOptions","querySelectorAll","marginLeft","marginRight","i","value","checked","setAttribute","removeAttribute","length","search","includes","createPickers","purgeBtn","purgeDb","purgeAObtn","purgeModalBtn","count","steps","Math","ceil","parseInt","start","items","dialog","modal","btn","html","openModal","confirmDelete","row","footer","allBtn","prop","left","leftString","itemRow","message","catch","error","$suiPickerInputs","wpColorPicker","change","ui","$this","color","toCSS","hasClass","each","$suiPickerInput","$suiPicker","closest","$suiPickerColor","$suiPickerValue","$wpPicker","$wpPickerButton","css","click","stopPropagation","str","charAt","toUpperCase","slice","CacheScanner","offset","reload","caching","pageCachingForm","rssForm","gravatarDiv","settingsForm","scanner","animate","scrollTop","top","saveSettings","clearCache","intervalToggle","cancelPreload","preloadToggle","rssExpiryTime","abs","redisForm","host","port","pass","db","connected","notice","parentNode","objectCache","objectCachePurge","redisCacheDisable","redisDisable","detection","slideUp","form","clearNetworkCache","slideModal","cloudflare","is","purgeCache","apply","bind","bindActions","cfModal","connect","reChkBtn","recheck","saveBtn","keyHelpLnk","toggleHelp","topHelpLnk","hideHelp","switchLabel","disabled","reject","responseText","removeAttr","apiKeyField","apiKeyError","style","display","email","key","token","zone","text","zones","populateSelectWithZones","code","finally","select","SUIselect2","forEach","option","Option","label","append","minimumResultsForSearch","icon","querySelector","contains","strings","dashboard","url","href","clearCacheModalButton","checkboxes","modules","push","hideUpgradeSummary","URL","searchParams","set","score_mobile_previous","score_desktop_previous","initModule","hasOwnProperty","getModule","cfNotice","onclick","dismissCloudflareNotice","http2Notice","dismiss","options","tooltip","openNotice","el","noticeId","getAttribute","closeNotice","cloudFlareDashNotice","parent","_element","_filter","_filterSec","_filterType","$el","filter","toLowerCase","filterSecondary","filterType","$selectCheckbox","selected","visible","hide","getElement","getId","getFilter","matchFilter","matchSecondaryFilter","matchTypeFilter","isVisible","isSelected","isType","unSelect","what","toString","toggleClass","next","currentFilter","currentSecondaryFilter","currentTypeFilter","getItems","getItem","getItemById","getItemsByDataType","getVisibleItems","getSelectedItems","addFilter","clearFilters","applyFilters","MinifyScanner","getLink","assets_msg","minification","$checkFilesResultsContainer","checkURLSList","checkedURLS","get","currentScanStep","rowStatus","changed","js","confirm","cdnValue","spinner","textField","onchange","divs","name","getMultiSelectValues","JSON","stringify","modeToggles","current","showSwitchModal","switchView","expandButtonManual","collapseButtonManual","expandButtonAuto","collapseButtonAuto","autoTrigger","replaceModal","manualTrigger","rowsCollection","RowsCollection","index","_row","Row","filterInput","keyCode","clFilters","element","innerWidth","minificationResizeRows","_","debounce","mode","trackBox","goToSettings","scripts","styles","skipUpgrade","doUpgrade","processBulkUpdateSelections","selectedFiles","action","sel","purgeOrphanedData","notifications","exclude","edit","settings","view","schedule","frequency","time","weekDay","monthDay","threshold","recipients","performance","device","metrics","audits","fieldData","uptime","showPing","database","revisions","drafts","trash","spam","trashComment","expiredTransients","transients","moduleData","disable","renderTemplate","maybeOpenModal","substring","split","currentTarget","reduce","o","r","loadUsers","content","template","initSUI","mapActions","addSelections","toggleUserNotice","HBFetcher","user","addToUsersList","fixRecipientCSS","console","log","processScheduleSettings","processAdditionalSettings","update","processSettings","history","pushState","title","pathname","activate","moduleName","getModuleName","initUserSelects","toggleAddButton","handleAddButtonClick","handleFrequencySelect","initIcon","initColor","initSearch","modalDialog","tabs","sideTabs","freq","scheduleBox","weekDiv","monthDiv","inputs","empty","err","avatar","parents","role","confirmSubscription","undefined","is_pending","pending","is_subscribed","subscribed","is_can_resend_confirmation","canResend","addUser","userSelect","minimumInputLength","maximumSelectionLength","ajax","ajaxurl","method","dataType","delay","params","nonce","nonces","HBFetchNonce","query","term","processResults","results","map","item","resendInvite","findIndex","recipientList","subClass","img","confirmBtn","confirmTooltip","resendTooltip","toggleRecipientList","first","tooltipClass","removeUser","indexOf","splice","returnToList","onClickFunction","list","children","userNotice","hasItems","trim","recipientExists","continueButton","memoize","compiled","evaluate","interpolate","escape","variable","templateSettings","PerfScanner","finished","progress","timer","setInterval","progressStatus","clearInterval","width","loader","score_mobile","mobileScore","score_desktop","desktopScore","iteration","pressedKeys","key_timer","wphbSetInterval","onkeyup","startPerformanceScan","formData","google","wphbHistoricFieldData","charts","load","packages","setOnLoadCallback","drawChart","fcp","resize","fid","otherClass","mouseenter","mouseleave","blur","Object","audit","chartID","visualization","arrayToDataTable","p","fast","generateTooltip","fast_desc","average","average_desc","slow","slow_desc","BarChart","draw","isHtml","colors","chartArea","hAxis","baselineColor","gridlines","textPosition","isStacked","height","legend","body","wrap","form_data","contrastDiv","tracking","elm","files","file","removeFileBtn","fileEl","FormData","confirmReset","$dataRangeSelector","chartData","downtimeChartData","$spinner","dataRange","dateFormat","$disableUptime","getUrlParameter","clearTimeout","drawResponseTimeChart","drawDowntimeChart","DataTable","addColumn","chartArray","parse","Date","round","createUptimeTooltip","addRows","curveType","position","vAxis","format","minorGridlines","viewWindow","min","series","axis","axes","y","Resp","chart","AreaChart","container","Timeline","dataTable","colorMap","Down","Unknown","Up","getNumberOfRows","getValue","timeline","showBarLabels","showRowLabels","barLabelStyle","fontSize","avoidOverlappingGridLines","origColors","events","addListener","bars","getElementsByTagName","Array","prototype","call","bar","parseFloat","date","responseTime","formatTooltipDate","day","getDate","monthIndex","getMonth","hh","getHours","h","minutes","getMinutes","dd","sParam","sParameterName","sURLVariables","decodeURIComponent","fetchUrl","fetchNonce","actionPrefix","request","args","cache","contentType","processData","done","fail","checkStatus","methods","clearCacheForPost","postId","redisSaveSettings","password","redisObjectCache","clearCacheBatch","sites","toggleCDN","toggleLog","toggleView","startCheck","checkStep","finishCheck","cancelScan","saveCriticalCss","updateAssetPath","resetAsset","saveNetworkSettings","updateExcludeList","savePerformanceTestSettings","deleteSelectedData","clearOrphanedBatch","rows","importSettings","exportSettings","common","dismissNotice","clearLogs","endpoint","clearCaches","resendConfirmationEmail","actionPrefixPro","sendConfirmationEmail","enable","getAvatar","getUsers","assign","Error","screen","links","cancelling","onStart","cancel","exports","entryUnbind","isCallable","tryToString","$TypeError","TypeError","argument","wellKnownSymbol","create","defineProperty","UNSCOPABLES","ArrayPrototype","configurable","isObject","$String","String","toIndexedObject","toAbsoluteIndex","lengthOfArrayLike","createMethod","IS_INCLUDES","fromIndex","O","uncurryThis","IndexedObject","toObject","arraySpeciesCreate","TYPE","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","IS_FILTER_REJECT","NO_HOLES","callbackfn","that","specificCreate","result","boundFunction","some","every","filterReject","isArray","isConstructor","SPECIES","$Array","originalArray","C","constructor","arraySpeciesConstructor","stringSlice","it","TO_STRING_TAG_SUPPORT","classofRaw","TO_STRING_TAG","$Object","CORRECT_ARGUMENTS","arguments","tag","tryGet","callee","hasOwn","ownKeys","getOwnPropertyDescriptorModule","definePropertyModule","source","exceptions","keys","f","getOwnPropertyDescriptor","DESCRIPTORS","createPropertyDescriptor","object","bitmap","enumerable","writable","makeBuiltIn","defineGlobalProperty","simple","global","unsafe","nonConfigurable","nonWritable","fails","EXISTS","createElement","getBuiltIn","match","version","userAgent","process","Deno","versions","v8","CONSTRUCTOR","METHOD","createNonEnumerableProperty","defineBuiltIn","copyConstructorProperties","isForced","targetProperty","sourceProperty","descriptor","TARGET","GLOBAL","STATIC","stat","dontCallGetSet","forced","sham","exec","aCallable","NATIVE_BIND","fn","test","Function","FunctionPrototype","getDescriptor","PROPER","CONFIGURABLE","aFunction","namespace","V","P","func","check","globalThis","g","a","classof","propertyIsEnumerable","store","functionToString","inspectSource","has","NATIVE_WEAK_MAP","shared","sharedKey","hiddenKeys","OBJECT_ALREADY_INITIALIZED","WeakMap","state","wmget","wmhas","wmset","metadata","facade","STATE","enforce","getterFor","noop","construct","constructorRegExp","INCORRECT_TO_STRING","isConstructorModern","isConstructorLegacy","called","replacement","normalize","POLYFILL","NATIVE","string","isPrototypeOf","USE_SYMBOL_AS_UID","$Symbol","toLength","obj","CONFIGURABLE_FUNCTION_NAME","InternalStateModule","enforceInternalState","getInternalState","CONFIGURABLE_LENGTH","TEMPLATE","getter","setter","arity","join","floor","trunc","x","n","V8_VERSION","getOwnPropertySymbols","symbol","Symbol","activeXDocument","anObject","definePropertiesModule","enumBugKeys","documentCreateElement","IE_PROTO","EmptyConstructor","scriptTag","LT","NullProtoObjectViaActiveX","write","close","temp","parentWindow","NullProtoObject","ActiveXObject","iframeDocument","iframe","domain","appendChild","src","contentWindow","open","F","Properties","V8_PROTOTYPE_DEFINE_BUG","objectKeys","defineProperties","props","IE8_DOM_DEFINE","toPropertyKey","$defineProperty","$getOwnPropertyDescriptor","ENUMERABLE","WRITABLE","Attributes","propertyIsEnumerableModule","internalObjectKeys","concat","getOwnPropertyNames","names","$propertyIsEnumerable","NASHORN_BUG","input","pref","valueOf","getOwnPropertyNamesModule","getOwnPropertySymbolsModule","uid","SHARED","IS_PURE","copyright","license","toIntegerOrInfinity","max","integer","requireObjectCoercible","number","isSymbol","getMethod","ordinaryToPrimitive","TO_PRIMITIVE","exoticToPrim","toPrimitive","postfix","random","NATIVE_SYMBOL","iterator","WellKnownSymbolsStore","symbolFor","createWellKnownSymbol","withoutSetter","description","$findIndex","addToUnscopables","FIND_INDEX","SKIPS_HOLES","proto","objectOrFunction","isFunction","len","vertxNext","customSchedulerFn","asap","callback","arg","queue","flush","scheduleFlush","setScheduler","scheduleFn","setAsap","asapFn","browserWindow","browserGlobal","BrowserMutationObserver","MutationObserver","WebKitMutationObserver","isNode","isWorker","Uint8ClampedArray","importScripts","MessageChannel","useNextTick","nextTick","useVertxTimer","useSetTimeout","useMutationObserver","iterations","observer","node","createTextNode","observe","characterData","useMessageChannel","channel","port1","onmessage","port2","postMessage","globalSetTimeout","attemptVertx","vertx","runOnLoop","runOnContext","onFulfillment","onRejection","child","PROMISE_ID","makePromise","_state","invokeCallback","_result","subscribe","resolve$1","Constructor","promise","PENDING","FULFILLED","REJECTED","selfFulfillment","cannotReturnOwn","tryThen","then$$1","fulfillmentHandler","rejectionHandler","handleForeignThenable","thenable","sealed","fulfill","_label","handleOwnThenable","handleMaybeThenable","maybeThenable","publishRejection","_onerror","publish","_subscribers","subscribers","settled","detail","hasCallback","succeeded","initializePromise","resolver","nextId","validationError","Enumerator","_instanceConstructor","_remaining","_enumerate","_eachEntry","entry","c","resolve$$1","_then","didError","_settledAt","Promise$1","_willSettleAt","enumerator","all","race","reject$1","needsResolver","needsNew","polyfill","local","promiseToString","cast","_setScheduler","_setAsap","_asap","factory","thisArg","baseTimes","isArguments","isBuffer","isIndex","isTypedArray","inherited","isArr","isArg","isBuff","skipIndexes","baseAssignValue","eq","objValue","getRawTag","objectToString","symToStringTag","toStringTag","baseGetTag","isObjectLike","isMasked","toSource","reIsHostCtor","funcProto","objectProto","funcToString","reIsNative","RegExp","isLength","typedArrayTags","isPrototype","nativeKeys","identity","overRest","setToString","constant","baseSetToString","iteratee","assignValue","customizer","isNew","newValue","coreJsData","baseRest","isIterateeCall","assigner","sources","guard","getNative","freeGlobal","baseIsNative","nativeObjectToString","isOwn","unmasked","reIsUint","isArrayLike","maskSrcKey","Ctor","overArg","freeExports","nodeType","freeModule","freeProcess","nodeUtil","types","binding","transform","nativeMax","array","otherArgs","freeSelf","root","shortOut","nativeNow","now","lastCalled","stamp","remaining","copyObject","createAssigner","other","baseIsArguments","stubFalse","Buffer","baseIsTypedArray","baseUnary","nodeIsTypedArray","arrayLikeKeys","baseKeys","window$1","Config","DEBUG","LIB_VERSION","loc","hostname","navigator","referrer","at","ch","escapee","white","T","ArrayProto","FuncProto","ObjProto","windowConsole","document$1","windowOpera","opera","nativeBind","nativeForEach","nativeIndexOf","nativeMap","nativeIsArray","breaker","isUndefined","warn","toArray","critical","log_func_with_prefix","prefix","console_with_prefix","context","bound","ctor","l","extend","iterable","values","arr","include","found","needle","inherit","subclass","superclass","isEmptyObject","isString","isDate","isNumber","isElement","encodeDates","v","k","formatDate","timestamp","d","pad","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","strip_empty_properties","ret","truncate","JSONEncode","mixed_val","quote","escapable","meta","lastIndex","charCodeAt","holder","gap","mind","partial","toJSON","isFinite","JSONDecode","m","SyntaxError","hex","uffff","fromCharCode","word","base64Encode","h1","h2","h3","h4","bits","b64","ac","enc","tmp_arr","utf8Encode","end","stringl","utftext","c1","UUID","se","ua","buffer","xor","byte_array","j","tmp","unshift","UA","BLOCKED_UA_STRS","isBlockedUA","HTTPBuildQuery","formdata","arg_separator","use_val","use_key","encodeURIComponent","getQueryParam","param","cookie","nameEQ","ca","set_seconds","seconds","is_cross_subdomain","is_secure","is_cross_site","domain_override","cdomain","expires","secure","extract_domain","setTime","getTime","toGMTString","days","new_cookie_val","_localStorageSupported","localStorageSupported","storage","forceCheck","supported","localStorage","cheap_guid","setItem","removeItem","is_supported","force_check","msg","register_event","fixEvent","returnValue","cancelBubble","handler","oldSchool","useCapture","ontype","old_handler","new_handler","old_handlers","old_result","new_result","makeHandler","TOKEN_MATCH_REGEX","dom_query","getAllChildren","bad_whitespace","elem","selector","className","getElementsBySelector","tagName","foundCount","elements","currentContextIndex","tokens","currentContext","nodeName","token_match","checkFunction","attrName","attrOperator","attrValue","lastIndexOf","info","campaignParams","campaign_keywords","kw","kwkey","searchEngine","searchInfo","keyword","browser","user_agent","vendor","browserVersion","regex","matches","os","referringDomain","properties","people_properties","pageviewInfo","page","maxlen","guid","SIMPLE_DOMAIN_MATCH_REGEX","DOMAIN_MATCH_REGEX","domain_regex","parts","tld","JSONStringify","JSONParse","DomTracker","create_properties","event_handler","after_track_handler","mixpanel_instance","mp","event_name","user_callback","override_event","get_config","track_callback","timeout_occured","callback_fired","LinkTracker","evt","new_tab","which","metaKey","ctrlKey","FormTracker","submit","logger$2","SharedLock","storageKey","pollIntervalMS","timeoutMS","withLock","lockedCB","errorCB","pid","startTime","keyX","keyY","keyZ","reportError","cb","loop","waitFor","predicate","getSetY","valY","criticalSection","logger$1","RequestQueue","errorReporter","lock","memQueue","enqueue","flushInterval","queueEntry","storedQueue","readFromStorage","saveToStorage","fillBatch","batchSize","batch","idsInBatch","orphaned","filterOutIDsAndInvalid","idSet","filteredItems","removeItemsByID","ids","removeFromStorage","updatePayloads","existingItems","itemsToUpdate","newItems","newPayload","storageEntry","clear","logger","RequestBatcher","libConfig","sendRequest","sendRequestFunc","beforeSendHook","stopAllBatching","stopAllBatchingFunc","stopped","consecutiveRemovalFailures","stop","timeoutID","resetBatchSize","resetFlush","flushMS","requestInProgress","currentBatchSize","dataForRequest","transformedItems","payload","batchSendCallback","res","removeItemsFromQueue","unloading","xhr_req","retryMS","headers","retryAfter","halvedBatchSize","requestOptions","verbose","ignore_json_errors","timeout_ms","transport","_optInOut","hasOptedIn","_getStorageValue","hasOptedOut","ignoreDnt","win","nav","hasDntOn","dntValue","_hasDoNotTrackFlagOn","optedOut","addOptOutCheckMixpanelLib","_addOptOutCheck","addOptOutCheckMixpanelPeople","_get_config","addOptOutCheckMixpanelGroup","clearOptInOut","_getStorage","_getStorageKey","crossSubdomainCookie","cookieDomain","persistenceType","persistencePrefix","optValue","cookieExpiration","secureCookie","crossSiteCookie","trackEventName","trackProperties","getConfigValue","SET_ACTION","SET_ONCE_ACTION","UNSET_ACTION","ADD_ACTION","APPEND_ACTION","UNION_ACTION","REMOVE_ACTION","apiActions","set_action","to","$set","_is_reserved_property","unset_action","$unset","set_once_action","$set_once","union_action","list_name","$union","append_action","$append","remove_action","$remove","delete_action","MixpanelGroup","_init","group_key","group_id","_mixpanel","_group_key","_group_id","_send_request","set_once","unset","union","date_encoded_data","_track_or_batch","batcher","request_batchers","groups","conf","MixpanelPeople","update_referrer_info","get_referrer_info","increment","by","$add","isNaN","track_charge","amount","clear_charges","delete_user","_identify_called","get_distinct_id","device_id","get_property","user_id","had_persisted_distinct_id","people","_enqueue","status","conf_var","_flags","identify_called","_add_to_people_queue","_flush_one_queue","action_method","queue_to_params_fn","_this","queued_data","_get_queue","action_params","_pop_from_people_queue","_flush","_set_callback","_add_callback","_append_callback","_set_once_callback","_union_callback","_unset_callback","_remove_callback","$append_queue","$remove_queue","$append_item","append_callback","pop","save","$remove_item","remove_callback","init_type","mixpanel_master","SET_QUEUE_KEY","SET_ONCE_QUEUE_KEY","UNSET_QUEUE_KEY","ADD_QUEUE_KEY","APPEND_QUEUE_KEY","REMOVE_QUEUE_KEY","UNION_QUEUE_KEY","PEOPLE_DISTINCT_ID_KEY","ALIAS_ID_KEY","EVENT_TIMERS_KEY","RESERVED_PROPERTIES","MixpanelPersistence","config","campaign_params_saved","storage_type","update_config","upgrade","old_cookie_name","old_cookie","upgrade_from_old_lib
|
|