Version Description
(2019.06.26) = - Fix wrong escape
Download this release
Release Info
Developer | leadin |
Plugin | HubSpot – Free Marketing Plugin for WordPress |
Version | 7.5.4 |
Comparing to | |
See all releases |
Code changes from version 7.5.2 to 7.5.4
- .phpcs.xml.dist +0 -49
- admin/class-leadinadmin.php +274 -0
- admin/leadin-admin.php +0 -278
- changelog.txt +10 -0
- inc/class-leadin.php +127 -113
- inc/leadin-constants.php +4 -4
- inc/leadin-disconnect.php +18 -19
- inc/leadin-functions.php +122 -96
- inc/leadin-mark-outdated.php +8 -5
- inc/leadin-registration.php +30 -29
- inc/leadin-wp-get.php +13 -7
- js/app.js +2 -2
- js/chatflows.js +0 -15
- js/constants/themes.js +4 -4
- js/menu.js +15 -0
- languages/leadin-de_AT.mo +0 -0
- languages/leadin-de_CH.mo +0 -0
- languages/leadin-de_CH_informal.mo +0 -0
- languages/leadin-de_DE.mo +0 -0
- languages/leadin-de_DE_formal.mo +0 -0
- languages/leadin-en.mo +0 -0
- languages/leadin-en_AU.mo +0 -0
- languages/leadin-en_CA.mo +0 -0
- languages/leadin-en_GB.mo +0 -0
- languages/leadin-en_NZ.mo +0 -0
- languages/leadin-en_US.mo +0 -0
- languages/leadin-en_ZA.mo +0 -0
- languages/leadin-es_AR.mo +0 -0
- languages/leadin-es_CL.mo +0 -0
- languages/leadin-es_CO.mo +0 -0
- languages/leadin-es_CR.mo +0 -0
- languages/leadin-es_ES.mo +0 -0
- languages/leadin-es_GT.mo +0 -0
- languages/leadin-es_MX.mo +0 -0
- languages/leadin-es_PE.mo +0 -0
- languages/leadin-es_PR.mo +0 -0
- languages/leadin-es_VE.mo +0 -0
- languages/leadin-fr_BE.mo +0 -0
- languages/leadin-fr_CA.mo +0 -0
- languages/leadin-fr_FR.mo +0 -0
- languages/leadin-ja.mo +0 -0
- languages/leadin-pt_AO.mo +0 -0
- languages/leadin-pt_BR.mo +0 -0
- languages/leadin-pt_PT.mo +0 -0
- languages/leadin-pt_PT_ao90.mo +0 -0
- leadin.php +200 -188
- readme.txt +27 -25
- scripts/leadin.js +1 -1
- scripts/leadin.js.map +1 -1
- tests/inc/test-leadin-mark-outdated.php +7 -5
.phpcs.xml.dist
DELETED
@@ -1,49 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<ruleset name="WordPress Coding Standards based custom ruleset for your plugin">
|
3 |
-
<description>Generally-applicable sniffs for WordPress plugins.</description>
|
4 |
-
|
5 |
-
<!-- What to scan -->
|
6 |
-
<file>.</file>
|
7 |
-
<exclude-pattern>/vendor/</exclude-pattern>
|
8 |
-
<exclude-pattern>/node_modules/</exclude-pattern>
|
9 |
-
|
10 |
-
<!-- How to scan -->
|
11 |
-
<!-- Usage instructions: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage -->
|
12 |
-
<!-- Annotated ruleset: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
|
13 |
-
<arg value="sp"/> <!-- Show sniff and progress -->
|
14 |
-
<arg name="basepath" value="./"/><!-- Strip the file paths down to the relevant bit -->
|
15 |
-
<arg name="colors"/>
|
16 |
-
<arg name="extensions" value="php"/>
|
17 |
-
<arg name="parallel" value="8"/><!-- Enables parallel processing when available for faster results. -->
|
18 |
-
|
19 |
-
<!-- Rules: Check PHP version compatibility -->
|
20 |
-
<!-- https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions -->
|
21 |
-
<config name="testVersion" value="5.3-"/>
|
22 |
-
<!-- https://github.com/PHPCompatibility/PHPCompatibilityWP -->
|
23 |
-
<rule ref="PHPCompatibilityWP"/>
|
24 |
-
|
25 |
-
<!-- Rules: WordPress Coding Standards -->
|
26 |
-
<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards -->
|
27 |
-
<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties -->
|
28 |
-
<config name="minimum_supported_wp_version" value="4.6"/>
|
29 |
-
<rule ref="WordPress">
|
30 |
-
<exclude name="WordPress.VIP"/>
|
31 |
-
</rule>
|
32 |
-
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
|
33 |
-
<properties>
|
34 |
-
<!-- Value: replace the function, class, and variable prefixes used. Separate multiple prefixes with a comma. -->
|
35 |
-
<property name="prefixes" type="array" value="my-plugin"/>
|
36 |
-
</properties>
|
37 |
-
</rule>
|
38 |
-
<rule ref="WordPress.WP.I18n">
|
39 |
-
<properties>
|
40 |
-
<!-- Value: replace the text domain used. -->
|
41 |
-
<property name="text_domain" type="array" value="my-plugin"/>
|
42 |
-
</properties>
|
43 |
-
</rule>
|
44 |
-
<rule ref="WordPress.WhiteSpace.ControlStructureSpacing">
|
45 |
-
<properties>
|
46 |
-
<property name="blank_line_check" value="true"/>
|
47 |
-
</properties>
|
48 |
-
</rule>
|
49 |
-
</ruleset>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/class-leadinadmin.php
ADDED
@@ -0,0 +1,274 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'LEADIN_PLUGIN_VERSION' ) ) {
|
4 |
+
wp_die( '', '', 403 );
|
5 |
+
}
|
6 |
+
|
7 |
+
// =============================================
|
8 |
+
// Define Constants
|
9 |
+
// =============================================
|
10 |
+
if ( ! defined( 'LEADIN_ADMIN_PATH' ) ) {
|
11 |
+
define( 'LEADIN_ADMIN_PATH', untrailingslashit( __FILE__ ) );
|
12 |
+
}
|
13 |
+
|
14 |
+
// =============================================
|
15 |
+
// Include Needed Files
|
16 |
+
// =============================================
|
17 |
+
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Print notice at the top of every page of the admin panel
|
21 |
+
*
|
22 |
+
* @param string $text translated text to show inside the notice.
|
23 |
+
*/
|
24 |
+
function leadin_print_notice( $text ) {
|
25 |
+
?>
|
26 |
+
<div class="notice notice-warning is-dismissible">
|
27 |
+
<p>
|
28 |
+
<img src="<?php echo esc_attr( LEADIN_PATH . '/images/sprocket.svg' ); ?>" height="16" style="margin-bottom: -3px" />
|
29 |
+
|
30 |
+
<?php echo $text; ?>
|
31 |
+
</p>
|
32 |
+
</div>
|
33 |
+
<?php
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Find what notice (if any) needs to be rendered
|
38 |
+
*/
|
39 |
+
function leadin_action_required_notice() {
|
40 |
+
$current_screen = get_current_screen();
|
41 |
+
if ( 'leadin' !== $current_screen->parent_base ) {
|
42 |
+
$leadin_icon = LEADIN_PATH . '/images/sprocket.svg';
|
43 |
+
if ( get_option( 'leadin_outdated_version' ) ) {
|
44 |
+
leadin_print_notice( sprintf( __( 'Your current version of the HubSpot plugin is outdated, and errors may occur. <a class="thickbox open-plugin-details-modal" href="%1$splugin-install.php?tab=plugin-information&plugin=leadin&section=changelog&TB_iframe=true&width=616&height=1046">Please update now.</a>', 'leadin' ), admin_url() ) );
|
45 |
+
} elseif ( ! get_option( 'leadin_portalId' ) ) {
|
46 |
+
leadin_print_notice( __( 'The HubSpot plugin isn’t connected right now. To use HubSpot tools on your WordPress site, <a href="admin.php?page=leadin">connect the plugin now</a>.', 'leadin' ) );
|
47 |
+
}
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* LeadinAdmin Class
|
53 |
+
*/
|
54 |
+
class LeadinAdmin {
|
55 |
+
/**
|
56 |
+
* Class constructor
|
57 |
+
*/
|
58 |
+
public function __construct() {
|
59 |
+
// =============================================
|
60 |
+
// Hooks & Filters
|
61 |
+
// =============================================
|
62 |
+
$plugin_version = get_option( 'leadin_pluginVersion' );
|
63 |
+
|
64 |
+
// If the plugin version matches the latest version escape the update function.
|
65 |
+
if ( LEADIN_PLUGIN_VERSION !== $plugin_version ) {
|
66 |
+
self::leadin_update_check();
|
67 |
+
}
|
68 |
+
|
69 |
+
add_action( 'admin_menu', array( &$this, 'leadin_add_menu_items' ) );
|
70 |
+
add_action( 'admin_enqueue_scripts', array( &$this, 'add_leadin_admin_scripts' ) );
|
71 |
+
add_filter( 'plugin_action_links_leadin/leadin.php', array( $this, 'leadin_plugin_settings_link' ) );
|
72 |
+
add_action( 'admin_notices', array( &$this, 'leadin_add_background_iframe' ) );
|
73 |
+
add_action( 'admin_notices', 'leadin_action_required_notice' );
|
74 |
+
|
75 |
+
$affiliate = $this->get_affiliate_code();
|
76 |
+
if ( $affiliate ) {
|
77 |
+
add_option( 'hubspot_affiliate_code', $affiliate );
|
78 |
+
}
|
79 |
+
$this->hydrate_acquisition_attribution();
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Return affiliate code from either file or option
|
84 |
+
*/
|
85 |
+
private function get_affiliate_code() {
|
86 |
+
$affiliate = get_option( 'hubspot_affiliate_code' );
|
87 |
+
if ( ! $affiliate && file_exists( LEADIN_PLUGIN_DIR . '/hs_affiliate.txt' ) ) {
|
88 |
+
$affiliate = trim( preg_replace( '/\s\s+/', ' ', file_get_contents( LEADIN_PLUGIN_DIR . '/hs_affiliate.txt' ) ) );
|
89 |
+
}
|
90 |
+
if ( $affiliate ) {
|
91 |
+
return $affiliate;
|
92 |
+
}
|
93 |
+
return false;
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Get hubspot_acquisition_attribution option
|
98 |
+
*/
|
99 |
+
private function get_acquisition_attribution_option() {
|
100 |
+
return get_option( 'hubspot_acquisition_attribution' );
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* Return attribution string from wither file or option
|
105 |
+
*/
|
106 |
+
private function hydrate_acquisition_attribution() {
|
107 |
+
if ( $this->get_acquisition_attribution_option() ) {
|
108 |
+
return;
|
109 |
+
}
|
110 |
+
|
111 |
+
if ( file_exists( LEADIN_PLUGIN_DIR . '/hs_attribution.txt' ) ) {
|
112 |
+
$acquisition_attribution = trim( file_get_contents( LEADIN_PLUGIN_DIR . '/hs_attribution.txt' ) );
|
113 |
+
add_option( 'hubspot_acquisition_attribution', $acquisition_attribution );
|
114 |
+
}
|
115 |
+
}
|
116 |
+
|
117 |
+
/**
|
118 |
+
* Store current version in option
|
119 |
+
*/
|
120 |
+
private function leadin_update_check() {
|
121 |
+
update_option( 'leadin_pluginVersion', LEADIN_PLUGIN_VERSION );
|
122 |
+
}
|
123 |
+
|
124 |
+
// =============================================
|
125 |
+
// Menus
|
126 |
+
// =============================================
|
127 |
+
/**
|
128 |
+
* Adds Leadin menu to /wp-admin sidebar
|
129 |
+
*/
|
130 |
+
public function leadin_add_menu_items() {
|
131 |
+
$options = get_option( 'leadin_options' );
|
132 |
+
|
133 |
+
global $submenu;
|
134 |
+
global $wp_version;
|
135 |
+
|
136 |
+
// Block non-sanctioned users from accessing Leadin.
|
137 |
+
$capability = 'activate_plugins';
|
138 |
+
if ( ! current_user_can( 'activate_plugins' ) ) {
|
139 |
+
if ( ! array_key_exists( 'li_grant_access_to_' . leadin_get_user_role(), $options ) ) {
|
140 |
+
return false;
|
141 |
+
} else {
|
142 |
+
if ( current_user_can( 'manage_network' ) ) { // super admin.
|
143 |
+
$capability = 'manage_network';
|
144 |
+
} elseif ( current_user_can( 'edit_pages' ) ) { // editor.
|
145 |
+
$capability = 'edit_pages';
|
146 |
+
} elseif ( current_user_can( 'publish_posts' ) ) { // author.
|
147 |
+
$capability = 'publish_posts';
|
148 |
+
} elseif ( current_user_can( 'edit_posts' ) ) { // contributor.
|
149 |
+
$capability = 'edit_posts';
|
150 |
+
} elseif ( current_user_can( 'read' ) ) { // subscriber.
|
151 |
+
$capability = 'read';
|
152 |
+
}
|
153 |
+
}
|
154 |
+
}
|
155 |
+
|
156 |
+
$notification_icon = '';
|
157 |
+
if ( ! get_option( 'leadin_portalId' ) ) {
|
158 |
+
$notification_icon = ' <span class="update-plugins count-1"><span class="plugin-count">!</span></span>';
|
159 |
+
}
|
160 |
+
|
161 |
+
add_menu_page( __( 'HubSpot', 'leadin' ), __( 'HubSpot', 'leadin' ) . $notification_icon, $capability, 'leadin', array( $this, 'leadin_build_app' ), 'dashicons-sprocket', '25.100713' );
|
162 |
+
|
163 |
+
$portal_id = get_option( 'leadin_portalId' );
|
164 |
+
if ( ! empty( $portal_id ) ) {
|
165 |
+
add_submenu_page( 'leadin', __( 'Forms', 'leadin' ), __( 'Forms', 'leadin' ), 'activate_plugins', 'leadin_forms', array( $this, 'leadin_build_app' ) );
|
166 |
+
add_submenu_page( 'leadin', __( 'Settings', 'leadin' ), __( 'Settings', 'leadin' ), 'activate_plugins', 'leadin_settings', array( $this, 'leadin_build_app' ) );
|
167 |
+
remove_submenu_page( 'leadin', 'leadin' );
|
168 |
+
}
|
169 |
+
}
|
170 |
+
|
171 |
+
// =============================================
|
172 |
+
// Settings Page
|
173 |
+
// =============================================
|
174 |
+
/**
|
175 |
+
* Adds setting link for Leadin to plugins management page
|
176 |
+
*
|
177 |
+
* @param array $links Return the links for the settings page.
|
178 |
+
* @return array
|
179 |
+
*/
|
180 |
+
public function leadin_plugin_settings_link( $links ) {
|
181 |
+
$portal_id = get_option( 'leadin_portalId' );
|
182 |
+
if ( ! empty( $portal_id ) ) {
|
183 |
+
$page = 'leadin_settings';
|
184 |
+
} else {
|
185 |
+
$page = 'leadin';
|
186 |
+
}
|
187 |
+
$url = get_admin_url( get_current_blog_id(), "admin.php?page=$page" );
|
188 |
+
$settings_link = '<a href="' . $url . '">' . __( 'Settings', 'leadin' ) . '</a>';
|
189 |
+
array_unshift( $links, $settings_link );
|
190 |
+
return $links;
|
191 |
+
}
|
192 |
+
|
193 |
+
/**
|
194 |
+
* Creates leadin app
|
195 |
+
*/
|
196 |
+
public function leadin_build_app() {
|
197 |
+
global $wp_version;
|
198 |
+
|
199 |
+
wp_enqueue_style( 'leadin-bridge-css' );
|
200 |
+
|
201 |
+
$error_message = '';
|
202 |
+
|
203 |
+
if ( version_compare( phpversion(), LEADIN_REQUIRED_PHP_VERSION, '<' ) ) {
|
204 |
+
$error_message = sprintf(
|
205 |
+
__( 'HubSpot All-In-One Marketing %1$s requires PHP %2$s or higher. Please upgrade WordPress first.', 'leadin' ),
|
206 |
+
LEADIN_PLUGIN_VERSION,
|
207 |
+
LEADIN_REQUIRED_PHP_VERSION
|
208 |
+
);
|
209 |
+
} elseif ( version_compare( $wp_version, LEADIN_REQUIRED_WP_VERSION, '<' ) ) {
|
210 |
+
$error_message = sprintf(
|
211 |
+
__( 'HubSpot All-In-One Marketing %1$s requires PHP %2$s or higher. Please upgrade WordPress first.', 'leadin' ),
|
212 |
+
LEADIN_PLUGIN_VERSION,
|
213 |
+
LEADIN_REQUIRED_WP_VERSION
|
214 |
+
);
|
215 |
+
}
|
216 |
+
|
217 |
+
if ( $error_message ) {
|
218 |
+
echo "<div class='notice notice-warning'><p>$error_message</p></div>";
|
219 |
+
} else {
|
220 |
+
$iframe_url = leadin_get_iframe_src();
|
221 |
+
?>
|
222 |
+
<iframe id="leadin-iframe" src="<?php echo esc_attr( $iframe_url ); ?>"></iframe>
|
223 |
+
<?php
|
224 |
+
}
|
225 |
+
}
|
226 |
+
|
227 |
+
/**
|
228 |
+
* Render background iframe
|
229 |
+
*/
|
230 |
+
public function leadin_add_background_iframe() {
|
231 |
+
$screen = get_current_screen();
|
232 |
+
if ( 'dashboard' === $screen->id ) {
|
233 |
+
$background_iframe_url = leadin_get_background_iframe_src();
|
234 |
+
?>
|
235 |
+
<iframe class="leadin-background-iframe" style="display: none" id="leadin-iframe" src="<?php echo esc_attr( $background_iframe_url ); ?>"></iframe>
|
236 |
+
<?php
|
237 |
+
}
|
238 |
+
}
|
239 |
+
|
240 |
+
// =============================================
|
241 |
+
// Admin Styles & Scripts
|
242 |
+
// =============================================
|
243 |
+
/**
|
244 |
+
* Adds admin javascript
|
245 |
+
*/
|
246 |
+
public function add_leadin_admin_scripts() {
|
247 |
+
global $wp_version;
|
248 |
+
|
249 |
+
$leadin_config = array(
|
250 |
+
'adminUrl' => admin_url(),
|
251 |
+
'ajaxUrl' => leadin_get_ajax_url(),
|
252 |
+
'env' => constant( 'LEADIN_ENV' ),
|
253 |
+
'hubspotBaseUrl' => constant( 'LEADIN_BASE_URL' ),
|
254 |
+
'leadinPluginVersion' => constant( 'LEADIN_PLUGIN_VERSION' ),
|
255 |
+
'locale' => get_locale(),
|
256 |
+
'phpVersion' => leadin_parse_version( phpversion() ),
|
257 |
+
'plugins' => get_plugins(),
|
258 |
+
'portalId' => get_option( 'leadin_portalId' ),
|
259 |
+
'theme' => get_option( 'stylesheet' ),
|
260 |
+
'wpVersion' => leadin_parse_version( $wp_version ),
|
261 |
+
);
|
262 |
+
|
263 |
+
$leadin_i18n = array(
|
264 |
+
'chatflows' => __( 'Live Chat', 'leadin' ),
|
265 |
+
'email' => __( 'Email', 'leadin' ),
|
266 |
+
);
|
267 |
+
|
268 |
+
wp_register_style( 'leadin-bridge-css', LEADIN_PATH . '/style/leadin-bridge.css?', array(), LEADIN_PLUGIN_VERSION );
|
269 |
+
wp_register_script( 'leadin-js', LEADIN_PATH . '/scripts/leadin.js', false, true, true );
|
270 |
+
wp_localize_script( 'leadin-js', 'leadinConfig', $leadin_config );
|
271 |
+
wp_localize_script( 'leadin-js', 'leadinI18n', $leadin_i18n );
|
272 |
+
wp_enqueue_script( 'leadin-js' );
|
273 |
+
}
|
274 |
+
}
|
admin/leadin-admin.php
DELETED
@@ -1,278 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if ( ! defined( 'LEADIN_PLUGIN_VERSION' ) ) {
|
4 |
-
wp_die( '', '', 403 );
|
5 |
-
}
|
6 |
-
|
7 |
-
// =============================================
|
8 |
-
// Define Constants
|
9 |
-
// =============================================
|
10 |
-
if ( ! defined( 'LEADIN_ADMIN_PATH' ) ) {
|
11 |
-
define( 'LEADIN_ADMIN_PATH', untrailingslashit( __FILE__ ) );
|
12 |
-
}
|
13 |
-
|
14 |
-
// =============================================
|
15 |
-
// Include Needed Files
|
16 |
-
// =============================================
|
17 |
-
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
18 |
-
|
19 |
-
function leadin_print_notice( $text ) {
|
20 |
-
?>
|
21 |
-
<div class="notice notice-warning is-dismissible">
|
22 |
-
<p>
|
23 |
-
<img src="<?= LEADIN_PATH . '/images/sprocket.svg' ?>" height="16" style="margin-bottom: -3px" />
|
24 |
-
|
25 |
-
<?= $text ?>
|
26 |
-
</p>
|
27 |
-
</div>
|
28 |
-
<?php
|
29 |
-
}
|
30 |
-
|
31 |
-
function action_required_notice(){
|
32 |
-
$current_screen = get_current_screen();
|
33 |
-
if ( $current_screen->parent_base !== 'leadin' ) {
|
34 |
-
$leadin_icon = LEADIN_PATH . '/images/sprocket.svg';
|
35 |
-
if ( get_option( 'leadin_outdated_version' ) ) {
|
36 |
-
leadin_print_notice( sprintf( __('Your current version of the HubSpot plugin is outdated, and errors may occur. <a class="thickbox open-plugin-details-modal" href="%1$splugin-install.php?tab=plugin-information&plugin=leadin&section=changelog&TB_iframe=true&width=616&height=1046">Please update now.</a>', 'leadin'), admin_url() ) );
|
37 |
-
} else if ( ! get_option( 'leadin_portalId' ) ) {
|
38 |
-
leadin_print_notice( __('The HubSpot plugin isn’t connected right now. To use HubSpot tools on your WordPress site, <a href="admin.php?page=leadin">connect the plugin now</a>.', 'leadin') );
|
39 |
-
}
|
40 |
-
}
|
41 |
-
}
|
42 |
-
|
43 |
-
// =============================================
|
44 |
-
// WPLeadInAdmin Class
|
45 |
-
// =============================================
|
46 |
-
class WPLeadInAdmin {
|
47 |
-
|
48 |
-
|
49 |
-
var $li_viewers;
|
50 |
-
var $stats_dashboard;
|
51 |
-
var $action;
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Class constructor
|
55 |
-
*/
|
56 |
-
function __construct() {
|
57 |
-
// =============================================
|
58 |
-
// Hooks & Filters
|
59 |
-
// =============================================
|
60 |
-
$plugin_version = get_option( 'leadin_pluginVersion' );
|
61 |
-
|
62 |
-
$this->action = $this->leadin_current_action();
|
63 |
-
|
64 |
-
// If the plugin version matches the latest version escape the update function
|
65 |
-
if ( $plugin_version != LEADIN_PLUGIN_VERSION ) {
|
66 |
-
self::leadin_update_check();
|
67 |
-
}
|
68 |
-
|
69 |
-
add_action( 'admin_menu', array( &$this, 'leadin_add_menu_items' ) );
|
70 |
-
add_action( 'admin_enqueue_scripts', array( &$this, 'add_leadin_admin_scripts' ) );
|
71 |
-
add_filter( 'plugin_action_links_' . 'leadin/leadin.php', array( $this, 'leadin_plugin_settings_link' ) );
|
72 |
-
add_action( 'admin_notices', array( &$this, 'leadin_add_background_iframe' ) );
|
73 |
-
add_action( 'admin_notices', 'action_required_notice' );
|
74 |
-
|
75 |
-
if ($affiliate = $this->get_affiliate_code()) {
|
76 |
-
add_option( 'hubspot_affiliate_code', $affiliate );
|
77 |
-
}
|
78 |
-
$this->hydrate_acquisition_attribution();
|
79 |
-
}
|
80 |
-
|
81 |
-
function get_affiliate_code() {
|
82 |
-
$affiliate = get_option( 'hubspot_affiliate_code');
|
83 |
-
if (!$affiliate && file_exists(LEADIN_PLUGIN_DIR . '/hs_affiliate.txt' )) {
|
84 |
-
$affiliate = trim(preg_replace('/\s\s+/', ' ', file_get_contents(LEADIN_PLUGIN_DIR . '/hs_affiliate.txt')));
|
85 |
-
}
|
86 |
-
if ($affiliate) {
|
87 |
-
return $affiliate;
|
88 |
-
}
|
89 |
-
return false;
|
90 |
-
}
|
91 |
-
|
92 |
-
function get_acquisition_attribution_option() {
|
93 |
-
return get_option('hubspot_acquisition_attribution');
|
94 |
-
}
|
95 |
-
|
96 |
-
function hydrate_acquisition_attribution() {
|
97 |
-
if ($this->get_acquisition_attribution_option()) {
|
98 |
-
return;
|
99 |
-
}
|
100 |
-
|
101 |
-
if (file_exists(LEADIN_PLUGIN_DIR . '/hs_attribution.txt' )) {
|
102 |
-
$acquisition_attribution = trim(file_get_contents(LEADIN_PLUGIN_DIR . '/hs_attribution.txt'));
|
103 |
-
add_option('hubspot_acquisition_attribution', $acquisition_attribution);
|
104 |
-
}
|
105 |
-
}
|
106 |
-
|
107 |
-
function leadin_update_check() {
|
108 |
-
update_option( 'leadin_pluginVersion', LEADIN_PLUGIN_VERSION );
|
109 |
-
}
|
110 |
-
|
111 |
-
// =============================================
|
112 |
-
// Menus
|
113 |
-
// =============================================
|
114 |
-
/**
|
115 |
-
* Adds Leadin menu to /wp-admin sidebar
|
116 |
-
*/
|
117 |
-
function leadin_add_menu_items() {
|
118 |
-
$options = get_option( 'leadin_options' );
|
119 |
-
|
120 |
-
global $submenu;
|
121 |
-
global $wp_version;
|
122 |
-
|
123 |
-
// Block non-sanctioned users from accessing Leadin
|
124 |
-
$capability = 'activate_plugins';
|
125 |
-
if ( ! current_user_can( 'activate_plugins' ) ) {
|
126 |
-
if ( ! array_key_exists( 'li_grant_access_to_' . leadin_get_user_role(), $options ) ) {
|
127 |
-
return false;
|
128 |
-
} else {
|
129 |
-
if ( current_user_can( 'manage_network' ) ) { // super admin
|
130 |
-
$capability = 'manage_network';
|
131 |
-
} elseif ( current_user_can( 'edit_pages' ) ) { // editor
|
132 |
-
$capability = 'edit_pages';
|
133 |
-
} elseif ( current_user_can( 'publish_posts' ) ) { // author
|
134 |
-
$capability = 'publish_posts';
|
135 |
-
} elseif ( current_user_can( 'edit_posts' ) ) { // contributor
|
136 |
-
$capability = 'edit_posts';
|
137 |
-
} elseif ( current_user_can( 'read' ) ) { // subscriber
|
138 |
-
$capability = 'read';
|
139 |
-
}
|
140 |
-
}
|
141 |
-
}
|
142 |
-
|
143 |
-
$notificationIcon = '';
|
144 |
-
if ( ! get_option( 'leadin_portalId' ) ) {
|
145 |
-
$notificationIcon = ' <span class="update-plugins count-1"><span class="plugin-count">!</span></span>';
|
146 |
-
}
|
147 |
-
|
148 |
-
add_menu_page( __('HubSpot', 'leadin'), __('HubSpot', 'leadin').$notificationIcon, $capability, 'leadin', array( $this, 'leadin_build_app' ), 'dashicons-sprocket', '25.100713' );
|
149 |
-
|
150 |
-
$portal_id = get_option('leadin_portalId');
|
151 |
-
if ( !empty( $portal_id ) ) {
|
152 |
-
add_submenu_page('leadin', __('Forms', 'leadin'), __('Forms', 'leadin'), 'activate_plugins', 'leadin_forms', array($this, 'leadin_build_app'));
|
153 |
-
add_submenu_page('leadin', __('Settings', 'leadin'), __('Settings', 'leadin'), 'activate_plugins', 'leadin_settings', array($this, 'leadin_build_app'));
|
154 |
-
remove_submenu_page('leadin','leadin');
|
155 |
-
}
|
156 |
-
}
|
157 |
-
|
158 |
-
// =============================================
|
159 |
-
// Settings Page
|
160 |
-
// =============================================
|
161 |
-
/**
|
162 |
-
* Adds setting link for Leadin to plugins management page
|
163 |
-
*
|
164 |
-
* @param array $links
|
165 |
-
* @return array
|
166 |
-
*/
|
167 |
-
function leadin_plugin_settings_link( $links ) {
|
168 |
-
$portal_id = get_option('leadin_portalId');
|
169 |
-
if ( !empty( $portal_id ) ) {
|
170 |
-
$page = "leadin_settings";
|
171 |
-
} else {
|
172 |
-
$page = "leadin";
|
173 |
-
}
|
174 |
-
$url = get_admin_url( get_current_blog_id(), "admin.php?page=$page" );
|
175 |
-
$settings_link = '<a href="' . $url . '">' . __( 'Settings', 'leadin' ) . '</a>';
|
176 |
-
array_unshift( $links, $settings_link );
|
177 |
-
return $links;
|
178 |
-
}
|
179 |
-
|
180 |
-
/**
|
181 |
-
* Creates leadin app
|
182 |
-
*/
|
183 |
-
function leadin_build_app() {
|
184 |
-
global $wp_version;
|
185 |
-
|
186 |
-
wp_enqueue_style( 'leadin-bridge-css' );
|
187 |
-
|
188 |
-
$error_message = "";
|
189 |
-
|
190 |
-
if ( version_compare( phpversion(), LEADIN_REQUIRED_PHP_VERSION, '<' ) ) {
|
191 |
-
$error_message = sprintf(
|
192 |
-
__( 'HubSpot All-In-One Marketing %1$s requires PHP %2$s or higher. Please upgrade WordPress first.', 'leadin' ),
|
193 |
-
LEADIN_PLUGIN_VERSION,
|
194 |
-
LEADIN_REQUIRED_PHP_VERSION
|
195 |
-
);
|
196 |
-
|
197 |
-
} else if ( version_compare( $wp_version, LEADIN_REQUIRED_WP_VERSION, '<' ) ) {
|
198 |
-
$error_message = sprintf(
|
199 |
-
__( 'HubSpot All-In-One Marketing %1$s requires PHP %2$s or higher. Please upgrade WordPress first.', 'leadin' ),
|
200 |
-
LEADIN_PLUGIN_VERSION,
|
201 |
-
LEADIN_REQUIRED_WP_VERSION
|
202 |
-
);
|
203 |
-
}
|
204 |
-
|
205 |
-
if ($error_message) {
|
206 |
-
echo "<div class='notice notice-warning'><p>$error_message</p></div>";
|
207 |
-
} else {
|
208 |
-
$iframe_url = leadin_get_iframe_src();
|
209 |
-
?>
|
210 |
-
<iframe id="leadin-iframe" src="<?= $iframe_url ?>"></iframe>
|
211 |
-
<?php
|
212 |
-
}
|
213 |
-
}
|
214 |
-
|
215 |
-
function leadin_add_background_iframe() {
|
216 |
-
$screen = get_current_screen();
|
217 |
-
if ( $screen->id === 'dashboard' ) {
|
218 |
-
$background_iframe_url = leadin_get_background_iframe_src();
|
219 |
-
?>
|
220 |
-
<iframe class="leadin-background-iframe" style="display: none" id="leadin-iframe" src="<?= $background_iframe_url ?>"></iframe>
|
221 |
-
<?php
|
222 |
-
}
|
223 |
-
}
|
224 |
-
|
225 |
-
// =============================================
|
226 |
-
// Admin Styles & Scripts
|
227 |
-
// =============================================
|
228 |
-
/**
|
229 |
-
* Adds admin javascript
|
230 |
-
*/
|
231 |
-
function add_leadin_admin_scripts() {
|
232 |
-
global $wp_version;
|
233 |
-
|
234 |
-
$leadin_config = array(
|
235 |
-
'adminUrl' => admin_url(),
|
236 |
-
'ajaxUrl' => leadin_get_ajax_url(),
|
237 |
-
'env' => constant( 'LEADIN_ENV' ),
|
238 |
-
'hubspotBaseUrl' => constant( 'LEADIN_BASE_URL' ),
|
239 |
-
'leadinPluginVersion' => constant( 'LEADIN_PLUGIN_VERSION' ),
|
240 |
-
'locale' => get_locale(),
|
241 |
-
'phpVersion' => leadin_parse_version( phpversion() ),
|
242 |
-
'plugins' => get_plugins(),
|
243 |
-
'portalId' => get_option( 'leadin_portalId' ),
|
244 |
-
'theme' => get_option('stylesheet'),
|
245 |
-
'wpVersion' => leadin_parse_version( $wp_version ),
|
246 |
-
);
|
247 |
-
|
248 |
-
$leadin_i18n = array(
|
249 |
-
'chatflows' => __( 'Chatflows', 'leadin' ),
|
250 |
-
);
|
251 |
-
|
252 |
-
wp_register_style( 'leadin-bridge-css', LEADIN_PATH.'/style/leadin-bridge.css' );
|
253 |
-
wp_register_script( 'leadin-js', LEADIN_PATH.'/scripts/leadin.js', false, true );
|
254 |
-
wp_localize_script( 'leadin-js', 'leadinConfig', $leadin_config );
|
255 |
-
wp_localize_script( 'leadin-js', 'leadinI18n', $leadin_i18n );
|
256 |
-
wp_enqueue_script( 'leadin-js' );
|
257 |
-
}
|
258 |
-
|
259 |
-
/**
|
260 |
-
* GET and set url actions into readable strings
|
261 |
-
*
|
262 |
-
* @return string if actions are set, bool if no actions set
|
263 |
-
*/
|
264 |
-
function leadin_current_action() {
|
265 |
-
if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] ) { // WPCS: CSRF ok.
|
266 |
-
return $_REQUEST['action']; // WPCS: CSRF ok.
|
267 |
-
}
|
268 |
-
|
269 |
-
if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] ) { // WPCS: CSRF ok.
|
270 |
-
return $_REQUEST['action2']; // WPCS: CSRF ok.
|
271 |
-
}
|
272 |
-
|
273 |
-
return false;
|
274 |
-
}
|
275 |
-
|
276 |
-
}
|
277 |
-
|
278 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
changelog.txt
CHANGED
@@ -1,3 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
= 7.5.2 (2019.06.14) =
|
2 |
- Add webpack and use ES6
|
3 |
- Show "complete your signup" banner for WPEngine themes
|
1 |
+
= 7.5.4 (2019.06.26) =
|
2 |
+
- Hotfix
|
3 |
+
|
4 |
+
= 7.5.3 (2019.06.26) =
|
5 |
+
- Rename "chatflow" to "live chat"
|
6 |
+
- Update readme.txt
|
7 |
+
- Update banners
|
8 |
+
- Fix themes colors
|
9 |
+
- Refactor code style
|
10 |
+
|
11 |
= 7.5.2 (2019.06.14) =
|
12 |
- Add webpack and use ES6
|
13 |
- Show "complete your signup" banner for WPEngine themes
|
inc/class-leadin.php
CHANGED
@@ -1,118 +1,132 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
class
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
}
|
117 |
|
118 |
// =============================================
|
1 |
<?php
|
2 |
|
3 |
+
/**
|
4 |
+
* Leadin Class
|
5 |
+
*/
|
6 |
+
class Leadin {
|
7 |
+
|
8 |
+
/**
|
9 |
+
* Class constructor
|
10 |
+
*/
|
11 |
+
public function __construct() {
|
12 |
+
global $pagenow;
|
13 |
+
|
14 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'add_common_frontend_scripts' ) );
|
15 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'add_common_frontend_scripts' ) );
|
16 |
+
|
17 |
+
if ( is_admin() ) {
|
18 |
+
if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) {
|
19 |
+
$li_wp_admin = new LeadinAdmin();
|
20 |
+
}
|
21 |
+
} else {
|
22 |
+
// Adds the leadin-tracking script to wp-login.php page which doesnt hook into the enqueue logic.
|
23 |
+
if ( $this->leadin_is_login_or_register_page() ) {
|
24 |
+
add_action( 'login_enqueue_scripts', array( $this, 'add_leadin_frontend_scripts' ) );
|
25 |
+
} else {
|
26 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'add_leadin_frontend_scripts' ) );
|
27 |
+
}
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
// =============================================
|
32 |
+
// Scripts & Styles
|
33 |
+
// =============================================
|
34 |
+
/**
|
35 |
+
* Adds front end javascript + initializes ajax object
|
36 |
+
*/
|
37 |
+
public function add_leadin_frontend_scripts() {
|
38 |
+
add_filter( 'script_loader_tag', array( $this, 'leadin_add_embed_script_attributes' ), 10, 2 );
|
39 |
+
|
40 |
+
$embed_domain = constant( 'LEADIN_SCRIPT_LOADER_DOMAIN' );
|
41 |
+
$portal_id = get_option( 'leadin_portalId' );
|
42 |
+
|
43 |
+
if ( empty( $portal_id ) ) {
|
44 |
+
echo '<!-- HubSpot WordPress Plugin v' . LEADIN_PLUGIN_VERSION . ': embed JS disabled as a portalId has not yet been configured -->';
|
45 |
+
return;
|
46 |
+
}
|
47 |
+
|
48 |
+
$embed_url = "//$embed_domain/$portal_id.js?integration=wordpress";
|
49 |
+
$embed_id = 'leadin-scriptloader-js';
|
50 |
+
|
51 |
+
if ( is_single() ) {
|
52 |
+
$page_type = 'post';
|
53 |
+
} elseif ( is_front_page() ) {
|
54 |
+
$page_type = 'home';
|
55 |
+
} elseif ( is_archive() ) {
|
56 |
+
$page_type = 'archive';
|
57 |
+
} elseif ( $this->leadin_is_login_or_register_page() ) {
|
58 |
+
$page_type = 'login';
|
59 |
+
} elseif ( is_page() ) {
|
60 |
+
$page_type = 'page';
|
61 |
+
} else {
|
62 |
+
$page_type = 'other';
|
63 |
+
}
|
64 |
+
|
65 |
+
$leadin_wordpress_info = array(
|
66 |
+
'userRole' => ( is_user_logged_in() ) ? leadin_get_user_role() : 'visitor',
|
67 |
+
'pageType' => $page_type,
|
68 |
+
'leadinPluginVersion' => LEADIN_PLUGIN_VERSION,
|
69 |
+
);
|
70 |
+
|
71 |
+
wp_register_script( $embed_id, $embed_url, array( 'jquery' ), LEADIN_PLUGIN_VERSION, true );
|
72 |
+
wp_localize_script( $embed_id, 'leadin_wordpress', $leadin_wordpress_info );
|
73 |
+
wp_enqueue_script( $embed_id );
|
74 |
+
$this->add_page_analytics();
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Add leadin.css
|
79 |
+
*/
|
80 |
+
public function add_common_frontend_scripts() {
|
81 |
+
if ( is_user_logged_in() ) {
|
82 |
+
wp_register_style( 'leadin-css', LEADIN_PATH . '/style/leadin.css', array(), LEADIN_PLUGIN_VERSION );
|
83 |
+
wp_enqueue_style( 'leadin-css' );
|
84 |
+
}
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Add tracking code
|
89 |
+
*/
|
90 |
+
private function add_page_analytics() {
|
91 |
+
?>
|
92 |
+
<!-- DO NOT COPY THIS SNIPPET! Start of Page Analytics Tracking for HubSpot WordPress plugin v'.LEADIN_PLUGIN_VERSION.' -->
|
93 |
+
<script type="text/javascript">
|
94 |
+
var _hsq = _hsq || [];
|
95 |
+
<?php
|
96 |
+
// Pass along the correct content-type.
|
97 |
+
if ( is_single() ) {
|
98 |
+
echo '_hsq.push(["setContentType", "blog-post"]);' . "\n";
|
99 |
+
} elseif ( is_archive() || is_search() ) {
|
100 |
+
echo '_hsq.push(["setContentType", "listing-page"]);' . "\n";
|
101 |
+
} else {
|
102 |
+
echo '_hsq.push(["setContentType", "standard-page"]);' . "\n";
|
103 |
+
}
|
104 |
+
?>
|
105 |
+
</script>
|
106 |
+
<!-- DO NOT COPY THIS SNIPPET! End of Page Analytics Tracking for HubSpot WordPress plugin -->
|
107 |
+
<?php
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Action script-loader-tag
|
112 |
+
*
|
113 |
+
* @param string $tag tag name.
|
114 |
+
* @param string $handle handle.
|
115 |
+
*/
|
116 |
+
public function leadin_add_embed_script_attributes( $tag, $handle ) {
|
117 |
+
if ( 'leadin-scriptloader-js' === $handle ) {
|
118 |
+
return str_replace( ' src', ' async defer src', $tag );
|
119 |
+
} else {
|
120 |
+
return $tag;
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Return true if the current page is login or register
|
126 |
+
*/
|
127 |
+
public static function leadin_is_login_or_register_page() {
|
128 |
+
return in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-register.php' ), true );
|
129 |
+
}
|
130 |
}
|
131 |
|
132 |
// =============================================
|
inc/leadin-constants.php
CHANGED
@@ -1,17 +1,17 @@
|
|
1 |
<?php
|
2 |
|
3 |
if ( ! defined( 'LEADIN_UTM_SOURCE' ) ) {
|
4 |
-
|
5 |
}
|
6 |
|
7 |
if ( ! defined( 'LEADIN_UTM_MEDIUM' ) ) {
|
8 |
-
|
9 |
}
|
10 |
|
11 |
if ( ! defined( 'LEADIN_UTM_CONTENT' ) ) {
|
12 |
-
|
13 |
}
|
14 |
|
15 |
if ( ! defined( 'LEADIN_UTM_CAMPAIGN' ) ) {
|
16 |
-
|
17 |
}
|
1 |
<?php
|
2 |
|
3 |
if ( ! defined( 'LEADIN_UTM_SOURCE' ) ) {
|
4 |
+
define( 'LEADIN_UTM_SOURCE', 'leadin%20repo%20plugin' );
|
5 |
}
|
6 |
|
7 |
if ( ! defined( 'LEADIN_UTM_MEDIUM' ) ) {
|
8 |
+
define( 'LEADIN_UTM_MEDIUM', 'referral' );
|
9 |
}
|
10 |
|
11 |
if ( ! defined( 'LEADIN_UTM_CONTENT' ) ) {
|
12 |
+
define( 'LEADIN_UTM_CONTENT', 'e10' );
|
13 |
}
|
14 |
|
15 |
if ( ! defined( 'LEADIN_UTM_CAMPAIGN' ) ) {
|
16 |
+
define( 'LEADIN_UTM_CAMPAIGN', 'one%20click%20updater' );
|
17 |
}
|
inc/leadin-disconnect.php
CHANGED
@@ -1,30 +1,29 @@
|
|
1 |
<?php
|
2 |
if ( ! defined( 'LEADIN_PLUGIN_VERSION' ) ) {
|
3 |
-
|
4 |
}
|
5 |
|
6 |
if ( is_admin() ) {
|
7 |
-
|
8 |
}
|
9 |
|
|
|
|
|
|
|
10 |
function leadin_disconnect_ajax() {
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
wp_die( '{"message": "Success!"}' );
|
23 |
-
} else {
|
24 |
-
error_log( 'Disconnect error' );
|
25 |
-
wp_die( '{"error": "No leadin_portalId found, cannot disconnect."}', '', 400 );
|
26 |
-
}
|
27 |
|
|
|
|
|
|
|
|
|
28 |
}
|
29 |
-
|
30 |
-
|
1 |
<?php
|
2 |
if ( ! defined( 'LEADIN_PLUGIN_VERSION' ) ) {
|
3 |
+
wp_die( '', '', 403 );
|
4 |
}
|
5 |
|
6 |
if ( is_admin() ) {
|
7 |
+
add_action( 'wp_ajax_leadin_disconnect_ajax', 'leadin_disconnect_ajax' );
|
8 |
}
|
9 |
|
10 |
+
/**
|
11 |
+
* AJAX handler to disconnect portal id
|
12 |
+
*/
|
13 |
function leadin_disconnect_ajax() {
|
14 |
+
if ( get_option( 'leadin_portalId' ) ) {
|
15 |
+
delete_option( 'leadin_portalId' );
|
16 |
+
delete_option( 'leadin_slumber_mode' );
|
17 |
+
delete_option( 'leadin_hapikey' );
|
18 |
|
19 |
+
delete_option( 'leadin_accessToken' );
|
20 |
+
delete_option( 'leadin_refreshToken' );
|
21 |
+
delete_option( 'leadin_oauth_mode' );
|
22 |
+
delete_option( 'leadin_userId' );
|
23 |
+
delete_option( 'leadin_connectionTimeInMs' );
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
+
wp_die( '{"message": "Success!"}' );
|
26 |
+
} else {
|
27 |
+
wp_die( '{"error": "No leadin_portalId found, cannot disconnect."}', '', 400 );
|
28 |
+
}
|
29 |
}
|
|
|
|
inc/leadin-functions.php
CHANGED
@@ -1,129 +1,147 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
if ( ! defined( 'LEADIN_PLUGIN_VERSION' ) ) {
|
4 |
-
|
5 |
}
|
6 |
|
7 |
if ( ! defined( 'LEADIN_PORTAL_ID' ) ) {
|
8 |
-
|
9 |
}
|
10 |
|
11 |
/**
|
12 |
* Logs a debug statement to /wp-content/debug.log
|
13 |
*
|
14 |
-
* @param
|
15 |
*/
|
16 |
function leadin_log_debug( $message ) {
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
}
|
25 |
|
26 |
/**
|
27 |
* Returns the user role for the current user
|
28 |
*/
|
29 |
function leadin_get_user_role() {
|
30 |
-
|
31 |
|
32 |
-
|
33 |
-
|
34 |
|
35 |
-
|
36 |
}
|
37 |
|
38 |
/**
|
39 |
* Return query string from object
|
|
|
|
|
40 |
*/
|
41 |
-
function leadin_http_build_query($arr) {
|
42 |
-
|
43 |
}
|
44 |
|
45 |
/**
|
46 |
* Return the given version until the patch version
|
47 |
* eg: 6.4.2.1-beta => 6.4.2
|
|
|
|
|
48 |
*/
|
49 |
-
function leadin_parse_version($version) {
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
}
|
56 |
|
|
|
|
|
|
|
57 |
function leadin_get_query_params() {
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
|
|
|
|
67 |
}
|
68 |
|
69 |
/**
|
70 |
* Return the affiliate code
|
71 |
*/
|
72 |
function leadin_get_affiliate_code() {
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
}
|
81 |
|
82 |
/**
|
83 |
* Return the signup url based on the site options
|
84 |
*/
|
85 |
function leadin_get_signup_url() {
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
}
|
123 |
|
|
|
|
|
|
|
124 |
function leadin_get_ajax_url() {
|
125 |
-
|
126 |
-
|
127 |
}
|
128 |
|
129 |
/**
|
@@ -133,34 +151,42 @@ function leadin_get_ajax_url() {
|
|
133 |
* eg: ?page=leadin_forms will point to /hubspot-plugin/{portalId}/forms
|
134 |
*/
|
135 |
function leadin_get_iframe_src() {
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
|
148 |
-
|
149 |
-
|
150 |
}
|
151 |
|
|
|
|
|
|
|
152 |
function leadin_get_background_iframe_src() {
|
153 |
-
|
154 |
-
|
155 |
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
|
160 |
-
|
161 |
}
|
162 |
|
163 |
-
|
164 |
-
|
165 |
-
|
|
|
|
|
|
|
|
|
|
|
166 |
}
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Function file
|
4 |
+
*
|
5 |
+
* @phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_error_log
|
6 |
+
* @phpcs:disable WordPress.PHP.DevelopmentFunctions.error_log_print_r
|
7 |
+
*/
|
8 |
|
9 |
if ( ! defined( 'LEADIN_PLUGIN_VERSION' ) ) {
|
10 |
+
wp_die( '', '', 403 );
|
11 |
}
|
12 |
|
13 |
if ( ! defined( 'LEADIN_PORTAL_ID' ) ) {
|
14 |
+
DEFINE( 'LEADIN_PORTAL_ID', intval( get_option( 'leadin_portalId' ) ) );
|
15 |
}
|
16 |
|
17 |
/**
|
18 |
* Logs a debug statement to /wp-content/debug.log
|
19 |
*
|
20 |
+
* @param string $message message to log.
|
21 |
*/
|
22 |
function leadin_log_debug( $message ) {
|
23 |
+
if ( WP_DEBUG === true ) {
|
24 |
+
if ( is_array( $message ) || is_object( $message ) ) {
|
25 |
+
error_log( print_r( $message, true ) );
|
26 |
+
} else {
|
27 |
+
error_log( $message );
|
28 |
+
}
|
29 |
+
}
|
30 |
}
|
31 |
|
32 |
/**
|
33 |
* Returns the user role for the current user
|
34 |
*/
|
35 |
function leadin_get_user_role() {
|
36 |
+
global $current_user;
|
37 |
|
38 |
+
$user_roles = $current_user->roles;
|
39 |
+
$user_role = array_shift( $user_roles );
|
40 |
|
41 |
+
return $user_role;
|
42 |
}
|
43 |
|
44 |
/**
|
45 |
* Return query string from object
|
46 |
+
*
|
47 |
+
* @param array $arr query parameters to stringify.
|
48 |
*/
|
49 |
+
function leadin_http_build_query( $arr ) {
|
50 |
+
return http_build_query( $arr, null, ini_get( 'arg_separator.output' ), PHP_QUERY_RFC3986 );
|
51 |
}
|
52 |
|
53 |
/**
|
54 |
* Return the given version until the patch version
|
55 |
* eg: 6.4.2.1-beta => 6.4.2
|
56 |
+
*
|
57 |
+
* @param string $version version.
|
58 |
*/
|
59 |
+
function leadin_parse_version( $version ) {
|
60 |
+
preg_match( '/^\d+(\.\d+){0,2}/', $version, $match );
|
61 |
+
if ( empty( $match ) ) {
|
62 |
+
return '';
|
63 |
+
}
|
64 |
+
return $match[0];
|
65 |
}
|
66 |
|
67 |
+
/**
|
68 |
+
* Return array of query parameters to add to the iframe src
|
69 |
+
*/
|
70 |
function leadin_get_query_params() {
|
71 |
+
global $wp_version;
|
72 |
+
|
73 |
+
return leadin_http_build_query(
|
74 |
+
array(
|
75 |
+
'l' => get_locale(),
|
76 |
+
'php' => leadin_parse_version( phpversion() ),
|
77 |
+
'v' => LEADIN_PLUGIN_VERSION,
|
78 |
+
'wp' => leadin_parse_version( $wp_version ),
|
79 |
+
'theme' => get_option( 'stylesheet' ),
|
80 |
+
)
|
81 |
+
);
|
82 |
}
|
83 |
|
84 |
/**
|
85 |
* Return the affiliate code
|
86 |
*/
|
87 |
function leadin_get_affiliate_code() {
|
88 |
+
$affiliate_link = get_option( 'hubspot_affiliate_code' );
|
89 |
+
preg_match( '/(?:(?:hubs\.to)|(?:mbsy\.co))\/([a-zA-Z0-9]+)/', $affiliate_link, $matches );
|
90 |
+
if ( count( $matches ) === 2 ) {
|
91 |
+
return $matches[1];
|
92 |
+
} else {
|
93 |
+
return $affiliate_link;
|
94 |
+
}
|
95 |
}
|
96 |
|
97 |
/**
|
98 |
* Return the signup url based on the site options
|
99 |
*/
|
100 |
function leadin_get_signup_url() {
|
101 |
+
// Get attribution string.
|
102 |
+
$acquisition_option = get_option( 'hubspot_acquisition_attribution', '' );
|
103 |
+
parse_str( $acquisition_option, $signup_params );
|
104 |
+
$signup_params['enableCollectedForms'] = 'true';
|
105 |
+
|
106 |
+
// Get leadin query.
|
107 |
+
$leadin_query = leadin_get_query_params();
|
108 |
+
parse_str( $leadin_query, $leadin_params );
|
109 |
+
|
110 |
+
$signup_params = array_merge( $signup_params, $leadin_params );
|
111 |
+
|
112 |
+
// Add signup pre-fill info.
|
113 |
+
$wp_user = wp_get_current_user();
|
114 |
+
$signup_params['firstName'] = $wp_user->user_firstname;
|
115 |
+
$signup_params['lastName'] = $wp_user->user_lastname;
|
116 |
+
$signup_params['email'] = $wp_user->user_email;
|
117 |
+
$signup_params['company'] = get_bloginfo( 'name' );
|
118 |
+
$signup_params['domain'] = get_site_url();
|
119 |
+
|
120 |
+
$affiliate_code = leadin_get_affiliate_code();
|
121 |
+
$signup_url = LEADIN_SIGNUP_BASE_URL . '/signup/wordpress?';
|
122 |
+
|
123 |
+
if ( LEADIN_SIGNUP_BASE_URL !== LEADIN_BASE_URL ) {
|
124 |
+
$signup_params['redirectBaseUrl'] = LEADIN_BASE_URL;
|
125 |
+
}
|
126 |
+
|
127 |
+
if ( $affiliate_code ) {
|
128 |
+
$signup_url .= leadin_http_build_query( $signup_params );
|
129 |
+
$destination_url = rawurlencode( $signup_url );
|
130 |
+
return "https://mbsy.co/$affiliate_code?url=$destination_url";
|
131 |
+
}
|
132 |
+
|
133 |
+
$signup_params['utm_source'] = 'wordpress-plugin';
|
134 |
+
$signup_params['utm_medium'] = 'marketplaces';
|
135 |
+
|
136 |
+
return $signup_url . leadin_http_build_query( $signup_params );
|
137 |
}
|
138 |
|
139 |
+
/**
|
140 |
+
* Return ajax url
|
141 |
+
*/
|
142 |
function leadin_get_ajax_url() {
|
143 |
+
$ajax_url = get_admin_url( get_current_blog_id(), 'admin-ajax.php' );
|
144 |
+
return parse_url( $ajax_url )['path'];
|
145 |
}
|
146 |
|
147 |
/**
|
151 |
* eg: ?page=leadin_forms will point to /hubspot-plugin/{portalId}/forms
|
152 |
*/
|
153 |
function leadin_get_iframe_src() {
|
154 |
+
$portal_id = get_option( 'leadin_portalId' );
|
155 |
+
$regex = '/^leadin(_|$)/';
|
156 |
+
$page = null;
|
157 |
|
158 |
+
if ( isset( $_GET['page'] ) ) {
|
159 |
+
$page = wp_unslash( $_GET['page'] );
|
160 |
+
}
|
161 |
|
162 |
+
if ( empty( $portal_id ) ) {
|
163 |
+
return leadin_get_signup_url();
|
164 |
+
}
|
165 |
|
166 |
+
$pathname = preg_replace( $regex, '', $page );
|
167 |
+
return LEADIN_BASE_URL . "/hubspot-plugin/$portal_id/$pathname?" . leadin_get_query_params();
|
168 |
}
|
169 |
|
170 |
+
/**
|
171 |
+
* Get background iframe src
|
172 |
+
*/
|
173 |
function leadin_get_background_iframe_src() {
|
174 |
+
$portal_id = get_option( 'leadin_portalId' );
|
175 |
+
$portal_id_url = '';
|
176 |
|
177 |
+
if ( ! empty( $portal_id ) ) {
|
178 |
+
$portal_id_url = "/$portal_id";
|
179 |
+
}
|
180 |
|
181 |
+
return LEADIN_BASE_URL . "/hubspot-plugin$portal_id_url/background?" . leadin_get_query_params();
|
182 |
}
|
183 |
|
184 |
+
/**
|
185 |
+
* Get shortcode for form
|
186 |
+
*
|
187 |
+
* @param string $form_id form's id.
|
188 |
+
*/
|
189 |
+
function leadin_get_form_shortcode( $form_id ) {
|
190 |
+
$portal_id = get_option( 'leadin_portalId' );
|
191 |
+
return "[hubspot type=form portal=$portal_id id=$form_id]";
|
192 |
}
|
inc/leadin-mark-outdated.php
CHANGED
@@ -1,13 +1,16 @@
|
|
1 |
<?php
|
2 |
if ( ! defined( 'LEADIN_PLUGIN_VERSION' ) ) {
|
3 |
-
|
4 |
}
|
5 |
|
6 |
if ( is_admin() ) {
|
7 |
-
|
8 |
}
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
|
|
|
|
|
|
|
13 |
}
|
1 |
<?php
|
2 |
if ( ! defined( 'LEADIN_PLUGIN_VERSION' ) ) {
|
3 |
+
wp_die( '', '', 403 );
|
4 |
}
|
5 |
|
6 |
if ( is_admin() ) {
|
7 |
+
add_action( 'wp_ajax_leadin_mark_outdated', 'leadin_mark_outdated_ajax' );
|
8 |
}
|
9 |
|
10 |
+
/**
|
11 |
+
* AJAX handler to set the current version as outdated
|
12 |
+
*/
|
13 |
+
function leadin_mark_outdated_ajax() {
|
14 |
+
update_option( 'leadin_outdated_version', true );
|
15 |
+
wp_die( '{"message": "Success!"}' );
|
16 |
}
|
inc/leadin-registration.php
CHANGED
@@ -1,46 +1,47 @@
|
|
1 |
<?php
|
2 |
if ( ! defined( 'LEADIN_PLUGIN_VERSION' ) ) {
|
3 |
-
|
4 |
}
|
5 |
|
6 |
if ( is_admin() ) {
|
7 |
-
|
8 |
}
|
9 |
|
|
|
|
|
|
|
10 |
function leadin_registration_ajax() {
|
11 |
-
|
12 |
-
|
13 |
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
|
18 |
-
|
19 |
-
|
20 |
|
21 |
-
|
22 |
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
"request" => $requestBody,
|
29 |
-
);
|
30 |
|
31 |
-
|
32 |
-
|
|
|
|
|
33 |
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
38 |
|
39 |
-
|
40 |
-
add_option( 'leadin_userId', $userId);
|
41 |
-
add_option( 'leadin_accessToken', $accessToken);
|
42 |
-
add_option( 'leadin_refreshToken', $refreshToken);
|
43 |
-
add_option( 'leadin_connectionTimeInMs', $connectionTimeInMs);
|
44 |
-
|
45 |
-
wp_die( '{"message": "Success!"}' );
|
46 |
}
|
1 |
<?php
|
2 |
if ( ! defined( 'LEADIN_PLUGIN_VERSION' ) ) {
|
3 |
+
wp_die( '', '', 403 );
|
4 |
}
|
5 |
|
6 |
if ( is_admin() ) {
|
7 |
+
add_action( 'wp_ajax_leadin_registration_ajax', 'leadin_registration_ajax' );
|
8 |
}
|
9 |
|
10 |
+
/**
|
11 |
+
* AJAX handler to connect portal to wordpress
|
12 |
+
*/
|
13 |
function leadin_registration_ajax() {
|
14 |
+
delete_option( 'leadin_hapikey' );
|
15 |
+
$existing_portal_id = get_option( 'leadin_portalId' );
|
16 |
|
17 |
+
if ( ! empty( $existing_portal_id ) ) {
|
18 |
+
wp_die( '{"error": "Registration is already complete for this portal"}', '', 400 );
|
19 |
+
}
|
20 |
|
21 |
+
$request_body = file_get_contents( 'php://input' );
|
22 |
+
$data = json_decode( $request_body, true );
|
23 |
|
24 |
+
$new_portal_id = $data['portalId'];
|
25 |
|
26 |
+
if ( empty( $new_portal_id ) ) {
|
27 |
+
$error_body = array(
|
28 |
+
'error' => 'Registration missing required fields',
|
29 |
+
'request' => $request_body,
|
30 |
+
);
|
31 |
|
32 |
+
wp_die( json_encode( $error_body ), '', 400 );
|
33 |
+
}
|
|
|
|
|
34 |
|
35 |
+
$user_id = $data['userId'];
|
36 |
+
$access_token = $data['accessToken'];
|
37 |
+
$refresh_token = $data['refreshToken'];
|
38 |
+
$connection_time_in_ms = $data['connectionTimeInMs'];
|
39 |
|
40 |
+
add_option( 'leadin_portalId', $new_portal_id );
|
41 |
+
add_option( 'leadin_userId', $user_id );
|
42 |
+
add_option( 'leadin_accessToken', $access_token );
|
43 |
+
add_option( 'leadin_refreshToken', $refresh_token );
|
44 |
+
add_option( 'leadin_connectionTimeInMs', $connection_time_in_ms );
|
45 |
|
46 |
+
wp_die( '{"message": "Success!"}' );
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
}
|
inc/leadin-wp-get.php
CHANGED
@@ -1,19 +1,25 @@
|
|
1 |
<?php
|
2 |
if ( ! defined( 'LEADIN_PLUGIN_VERSION' ) ) {
|
3 |
-
|
4 |
}
|
5 |
|
6 |
if ( is_admin() ) {
|
7 |
-
|
8 |
-
|
9 |
}
|
10 |
|
|
|
|
|
|
|
11 |
function leadin_get_portal_ajax() {
|
12 |
-
|
13 |
-
|
14 |
}
|
15 |
|
|
|
|
|
|
|
16 |
function leadin_get_domain_ajax() {
|
17 |
-
|
18 |
-
|
19 |
}
|
1 |
<?php
|
2 |
if ( ! defined( 'LEADIN_PLUGIN_VERSION' ) ) {
|
3 |
+
wp_die( '', '', 403 );
|
4 |
}
|
5 |
|
6 |
if ( is_admin() ) {
|
7 |
+
add_action( 'wp_ajax_leadin_get_portal', 'leadin_get_portal_ajax' );
|
8 |
+
add_action( 'wp_ajax_leadin_get_domain', 'leadin_get_domain_ajax' );
|
9 |
}
|
10 |
|
11 |
+
/**
|
12 |
+
* AJAX handler to get the current connected portal id
|
13 |
+
*/
|
14 |
function leadin_get_portal_ajax() {
|
15 |
+
$portal_id = get_option( 'leadin_portalId' );
|
16 |
+
wp_die( json_encode( array( 'portalId' => $portal_id ) ) );
|
17 |
}
|
18 |
|
19 |
+
/**
|
20 |
+
* AJAX handler to get the domain of the WordPress site
|
21 |
+
*/
|
22 |
function leadin_get_domain_ajax() {
|
23 |
+
$domain = get_site_url();
|
24 |
+
wp_die( json_encode( array( 'domain' => $domain ) ) );
|
25 |
}
|
js/app.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import Raven, { configureRaven } from './lib/Raven';
|
2 |
-
import {
|
3 |
import { portalId } from './constants/leadinConfig';
|
4 |
import { initInterframe } from './lib/Interframe';
|
5 |
import { startPortalIdPolling } from './api/wordpressApi';
|
@@ -15,7 +15,7 @@ function main() {
|
|
15 |
}
|
16 |
}
|
17 |
|
18 |
-
jQuery(document).ready(
|
19 |
}
|
20 |
|
21 |
configureRaven();
|
1 |
import Raven, { configureRaven } from './lib/Raven';
|
2 |
+
import { addExternalLinks } from './menu';
|
3 |
import { portalId } from './constants/leadinConfig';
|
4 |
import { initInterframe } from './lib/Interframe';
|
5 |
import { startPortalIdPolling } from './api/wordpressApi';
|
15 |
}
|
16 |
}
|
17 |
|
18 |
+
jQuery(document).ready(addExternalLinks);
|
19 |
}
|
20 |
|
21 |
configureRaven();
|
js/chatflows.js
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
import { hubspotBaseUrl, portalId, i18n } from './constants/leadinConfig';
|
2 |
-
|
3 |
-
export function initChatflows() {
|
4 |
-
const leadinMenu = document.getElementById('toplevel_page_leadin');
|
5 |
-
const firstSubMenu = leadinMenu && leadinMenu.querySelector('.wp-first-item');
|
6 |
-
const chatflowsUrl = `${hubspotBaseUrl}/chatflows/${portalId}`;
|
7 |
-
|
8 |
-
const chatflowsHtml = `<li><a href="${chatflowsUrl}" target="_blank">${
|
9 |
-
i18n.chatflows
|
10 |
-
}</a></li>`;
|
11 |
-
|
12 |
-
if (firstSubMenu) {
|
13 |
-
firstSubMenu.insertAdjacentHTML('afterend', chatflowsHtml);
|
14 |
-
}
|
15 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/constants/themes.js
CHANGED
@@ -491,16 +491,16 @@ export default {
|
|
491 |
labelTextColor: '#000000',
|
492 |
labelTextSize: '18px',
|
493 |
submitFontColor: '#ffffff',
|
494 |
-
submitColor: '#
|
495 |
},
|
496 |
chatStyle: {
|
497 |
-
accentColor: '#
|
498 |
},
|
499 |
onScrollLeadFlowStyle: {
|
500 |
-
color: '#
|
501 |
},
|
502 |
onExitLeadFlowStyle: {
|
503 |
-
color: '#
|
504 |
},
|
505 |
},
|
506 |
'news-pro': {
|
491 |
labelTextColor: '#000000',
|
492 |
labelTextSize: '18px',
|
493 |
submitFontColor: '#ffffff',
|
494 |
+
submitColor: '#000000',
|
495 |
},
|
496 |
chatStyle: {
|
497 |
+
accentColor: '#000000',
|
498 |
},
|
499 |
onScrollLeadFlowStyle: {
|
500 |
+
color: '#000000',
|
501 |
},
|
502 |
onExitLeadFlowStyle: {
|
503 |
+
color: '#000000',
|
504 |
},
|
505 |
},
|
506 |
'news-pro': {
|
js/menu.js
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { hubspotBaseUrl, portalId, i18n } from './constants/leadinConfig';
|
2 |
+
|
3 |
+
function addMenuItem(text, href) {
|
4 |
+
jQuery('#toplevel_page_leadin')
|
5 |
+
.find('li')
|
6 |
+
.last()
|
7 |
+
.before(`<li><a href="${href}" target="_blank">${text}</a></li>`);
|
8 |
+
}
|
9 |
+
|
10 |
+
export function addExternalLinks() {
|
11 |
+
const chatflowsUrl = `${hubspotBaseUrl}/chatflows/${portalId}`;
|
12 |
+
const emailUrl = `${hubspotBaseUrl}/email/${portalId}`;
|
13 |
+
addMenuItem(i18n.chatflows, chatflowsUrl);
|
14 |
+
addMenuItem(i18n.email, emailUrl);
|
15 |
+
}
|
languages/leadin-de_AT.mo
CHANGED
Binary file
|
languages/leadin-de_CH.mo
CHANGED
Binary file
|
languages/leadin-de_CH_informal.mo
CHANGED
Binary file
|
languages/leadin-de_DE.mo
CHANGED
Binary file
|
languages/leadin-de_DE_formal.mo
CHANGED
Binary file
|
languages/leadin-en.mo
CHANGED
Binary file
|
languages/leadin-en_AU.mo
CHANGED
Binary file
|
languages/leadin-en_CA.mo
CHANGED
Binary file
|
languages/leadin-en_GB.mo
CHANGED
Binary file
|
languages/leadin-en_NZ.mo
CHANGED
Binary file
|
languages/leadin-en_US.mo
CHANGED
Binary file
|
languages/leadin-en_ZA.mo
CHANGED
Binary file
|
languages/leadin-es_AR.mo
CHANGED
Binary file
|
languages/leadin-es_CL.mo
CHANGED
Binary file
|
languages/leadin-es_CO.mo
CHANGED
Binary file
|
languages/leadin-es_CR.mo
CHANGED
Binary file
|
languages/leadin-es_ES.mo
CHANGED
Binary file
|
languages/leadin-es_GT.mo
CHANGED
Binary file
|
languages/leadin-es_MX.mo
CHANGED
Binary file
|
languages/leadin-es_PE.mo
CHANGED
Binary file
|
languages/leadin-es_PR.mo
CHANGED
Binary file
|
languages/leadin-es_VE.mo
CHANGED
Binary file
|
languages/leadin-fr_BE.mo
CHANGED
Binary file
|
languages/leadin-fr_CA.mo
CHANGED
Binary file
|
languages/leadin-fr_FR.mo
CHANGED
Binary file
|
languages/leadin-ja.mo
CHANGED
Binary file
|
languages/leadin-pt_AO.mo
CHANGED
Binary file
|
languages/leadin-pt_BR.mo
CHANGED
Binary file
|
languages/leadin-pt_PT.mo
CHANGED
Binary file
|
languages/leadin-pt_PT_ao90.mo
CHANGED
Binary file
|
leadin.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: HubSpot All-In-One Marketing - Forms, Popups, Live Chat
|
4 |
* Plugin URI: http://www.hubspot.com/integrations/wordpress
|
5 |
* Description: HubSpot’s official WordPress plugin allows you to add forms, popups, and live chat to your website and integrate with the best WordPress CRM.
|
6 |
-
* Version: 7.5.
|
7 |
* Author: HubSpot
|
8 |
* Author URI: http://www.hubspot.com
|
9 |
* License: GPL v3
|
@@ -28,74 +28,74 @@
|
|
28 |
// Define Constants
|
29 |
// =============================================
|
30 |
if ( ! defined( 'LEADIN_BASE_PATH' ) ) {
|
31 |
-
|
32 |
}
|
33 |
|
34 |
if ( ! defined( 'LEADIN_PATH' ) ) {
|
35 |
-
|
36 |
}
|
37 |
|
38 |
if ( ! defined( 'LEADIN_PLUGIN_DIR' ) ) {
|
39 |
-
|
40 |
}
|
41 |
|
42 |
if ( ! defined( 'LEADIN_PLUGIN_SLUG' ) ) {
|
43 |
-
|
44 |
}
|
45 |
|
46 |
if ( file_exists( LEADIN_PLUGIN_DIR . '/inc/leadin-overrides.php' ) ) {
|
47 |
-
|
48 |
}
|
49 |
|
50 |
if ( ! defined( 'LEADIN_REQUIRED_WP_VERSION' ) ) {
|
51 |
-
|
52 |
}
|
53 |
|
54 |
if ( ! defined( 'LEADIN_REQUIRED_PHP_VERSION' ) ) {
|
55 |
-
|
56 |
}
|
57 |
|
58 |
if ( ! defined( 'LEADIN_DB_VERSION' ) ) {
|
59 |
-
|
60 |
}
|
61 |
|
62 |
if ( ! defined( 'LEADIN_PLUGIN_VERSION' ) ) {
|
63 |
-
|
64 |
}
|
65 |
|
66 |
if ( ! defined( 'LEADIN_SOURCE' ) ) {
|
67 |
-
|
68 |
}
|
69 |
|
70 |
if ( ! defined( 'LEADIN_SCRIPT_LOADER_DOMAIN' ) ) {
|
71 |
-
|
72 |
}
|
73 |
|
74 |
if ( ! defined( 'LEADIN_FORMS_SCRIPT_URL' ) ) {
|
75 |
-
|
76 |
}
|
77 |
|
78 |
if ( ! defined( 'LEADIN_FORMS_PAYLOAD' ) ) {
|
79 |
-
|
80 |
}
|
81 |
|
82 |
if ( ! defined( 'LEADIN_ENV' ) ) {
|
83 |
-
|
84 |
}
|
85 |
|
86 |
if ( ! defined( 'LEADIN_BASE_URL' ) ) {
|
87 |
-
|
88 |
}
|
89 |
|
90 |
if ( ! defined( 'LEADIN_SIGNUP_BASE_URL' ) ) {
|
91 |
-
|
92 |
}
|
93 |
|
94 |
// =============================================
|
95 |
// Include Needed Files
|
96 |
// =============================================
|
97 |
if ( file_exists( LEADIN_PLUGIN_DIR . '/inc/leadin-constants.php' ) ) {
|
98 |
-
|
99 |
}
|
100 |
|
101 |
require_once LEADIN_PLUGIN_DIR . '/inc/leadin-functions.php';
|
@@ -103,7 +103,7 @@ require_once LEADIN_PLUGIN_DIR . '/inc/leadin-registration.php';
|
|
103 |
require_once LEADIN_PLUGIN_DIR . '/inc/leadin-disconnect.php';
|
104 |
require_once LEADIN_PLUGIN_DIR . '/inc/leadin-wp-get.php';
|
105 |
require_once LEADIN_PLUGIN_DIR . '/inc/leadin-mark-outdated.php';
|
106 |
-
require_once LEADIN_PLUGIN_DIR . '/admin/
|
107 |
|
108 |
require_once LEADIN_PLUGIN_DIR . '/inc/class-leadin.php';
|
109 |
|
@@ -113,202 +113,214 @@ require_once LEADIN_PLUGIN_DIR . '/inc/class-leadin.php';
|
|
113 |
// =============================================
|
114 |
/**
|
115 |
* Activate the plugin
|
|
|
|
|
116 |
*/
|
117 |
-
function
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
}
|
146 |
}
|
147 |
|
148 |
/**
|
149 |
* Check Leadin installation and set options
|
150 |
*/
|
151 |
-
function
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
}
|
195 |
-
|
196 |
-
setcookie( 'ignore_social_share', '1', 2592000, '/' );
|
197 |
}
|
198 |
|
199 |
/**
|
200 |
* Deactivate Leadin plugin hook
|
|
|
|
|
201 |
*/
|
202 |
-
function
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
}
|
221 |
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
}
|
232 |
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
|
|
|
|
|
|
|
|
288 |
}
|
289 |
|
290 |
/**
|
291 |
* Checks the stored database version against the current data version + updates if needed
|
292 |
*/
|
293 |
-
function leadin_init()
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
add_shortcode('hubspot', 'addHubspotShortcode');
|
298 |
}
|
299 |
|
300 |
-
|
301 |
add_action( 'plugins_loaded', 'leadin_init', 14 );
|
302 |
|
303 |
if ( is_admin() ) {
|
304 |
-
|
305 |
-
|
306 |
|
307 |
-
|
308 |
-
|
309 |
|
310 |
-
|
311 |
-
|
312 |
}
|
313 |
|
314 |
|
3 |
* Plugin Name: HubSpot All-In-One Marketing - Forms, Popups, Live Chat
|
4 |
* Plugin URI: http://www.hubspot.com/integrations/wordpress
|
5 |
* Description: HubSpot’s official WordPress plugin allows you to add forms, popups, and live chat to your website and integrate with the best WordPress CRM.
|
6 |
+
* Version: 7.5.4
|
7 |
* Author: HubSpot
|
8 |
* Author URI: http://www.hubspot.com
|
9 |
* License: GPL v3
|
28 |
// Define Constants
|
29 |
// =============================================
|
30 |
if ( ! defined( 'LEADIN_BASE_PATH' ) ) {
|
31 |
+
define( 'LEADIN_BASE_PATH', __FILE__ );
|
32 |
}
|
33 |
|
34 |
if ( ! defined( 'LEADIN_PATH' ) ) {
|
35 |
+
define( 'LEADIN_PATH', untrailingslashit( plugins_url( '', LEADIN_BASE_PATH ) ) );
|
36 |
}
|
37 |
|
38 |
if ( ! defined( 'LEADIN_PLUGIN_DIR' ) ) {
|
39 |
+
define( 'LEADIN_PLUGIN_DIR', untrailingslashit( dirname( LEADIN_BASE_PATH ) ) );
|
40 |
}
|
41 |
|
42 |
if ( ! defined( 'LEADIN_PLUGIN_SLUG' ) ) {
|
43 |
+
define( 'LEADIN_PLUGIN_SLUG', basename( dirname( LEADIN_BASE_PATH ) ) );
|
44 |
}
|
45 |
|
46 |
if ( file_exists( LEADIN_PLUGIN_DIR . '/inc/leadin-overrides.php' ) ) {
|
47 |
+
require_once LEADIN_PLUGIN_DIR . '/inc/leadin-overrides.php';
|
48 |
}
|
49 |
|
50 |
if ( ! defined( 'LEADIN_REQUIRED_WP_VERSION' ) ) {
|
51 |
+
define( 'LEADIN_REQUIRED_WP_VERSION', '4.0' );
|
52 |
}
|
53 |
|
54 |
if ( ! defined( 'LEADIN_REQUIRED_PHP_VERSION' ) ) {
|
55 |
+
define( 'LEADIN_REQUIRED_PHP_VERSION', '5.6' );
|
56 |
}
|
57 |
|
58 |
if ( ! defined( 'LEADIN_DB_VERSION' ) ) {
|
59 |
+
define( 'LEADIN_DB_VERSION', '2.2.5' );
|
60 |
}
|
61 |
|
62 |
if ( ! defined( 'LEADIN_PLUGIN_VERSION' ) ) {
|
63 |
+
define( 'LEADIN_PLUGIN_VERSION', '7.5.4' );
|
64 |
}
|
65 |
|
66 |
if ( ! defined( 'LEADIN_SOURCE' ) ) {
|
67 |
+
define( 'LEADIN_SOURCE', 'leadin.com' );
|
68 |
}
|
69 |
|
70 |
if ( ! defined( 'LEADIN_SCRIPT_LOADER_DOMAIN' ) ) {
|
71 |
+
define( 'LEADIN_SCRIPT_LOADER_DOMAIN', 'js.hs-scripts.com' );
|
72 |
}
|
73 |
|
74 |
if ( ! defined( 'LEADIN_FORMS_SCRIPT_URL' ) ) {
|
75 |
+
define( 'LEADIN_FORMS_SCRIPT_URL', '//js.hsforms.net/forms/v2.js' );
|
76 |
}
|
77 |
|
78 |
if ( ! defined( 'LEADIN_FORMS_PAYLOAD' ) ) {
|
79 |
+
define( 'LEADIN_FORMS_PAYLOAD', '' );
|
80 |
}
|
81 |
|
82 |
if ( ! defined( 'LEADIN_ENV' ) ) {
|
83 |
+
define( 'LEADIN_ENV', 'prod' );
|
84 |
}
|
85 |
|
86 |
if ( ! defined( 'LEADIN_BASE_URL' ) ) {
|
87 |
+
define( 'LEADIN_BASE_URL', 'https://app.hubspot.com' );
|
88 |
}
|
89 |
|
90 |
if ( ! defined( 'LEADIN_SIGNUP_BASE_URL' ) ) {
|
91 |
+
define( 'LEADIN_SIGNUP_BASE_URL', LEADIN_BASE_URL );
|
92 |
}
|
93 |
|
94 |
// =============================================
|
95 |
// Include Needed Files
|
96 |
// =============================================
|
97 |
if ( file_exists( LEADIN_PLUGIN_DIR . '/inc/leadin-constants.php' ) ) {
|
98 |
+
require_once LEADIN_PLUGIN_DIR . '/inc/leadin-constants.php';
|
99 |
}
|
100 |
|
101 |
require_once LEADIN_PLUGIN_DIR . '/inc/leadin-functions.php';
|
103 |
require_once LEADIN_PLUGIN_DIR . '/inc/leadin-disconnect.php';
|
104 |
require_once LEADIN_PLUGIN_DIR . '/inc/leadin-wp-get.php';
|
105 |
require_once LEADIN_PLUGIN_DIR . '/inc/leadin-mark-outdated.php';
|
106 |
+
require_once LEADIN_PLUGIN_DIR . '/admin/class-leadinadmin.php';
|
107 |
|
108 |
require_once LEADIN_PLUGIN_DIR . '/inc/class-leadin.php';
|
109 |
|
113 |
// =============================================
|
114 |
/**
|
115 |
* Activate the plugin
|
116 |
+
*
|
117 |
+
* @param bool $network_wide network_wide.
|
118 |
*/
|
119 |
+
function leadin_activate( $network_wide ) {
|
120 |
+
// Check activation on entire network or one blog.
|
121 |
+
if ( is_multisite() && $network_wide ) {
|
122 |
+
global $wpdb;
|
123 |
+
|
124 |
+
// Get this so we can switch back to it later.
|
125 |
+
$current_blog = $wpdb->blogid;
|
126 |
+
// For storing the list of activated blogs.
|
127 |
+
$activated = array();
|
128 |
+
|
129 |
+
// Get all blogs in the network and activate plugin on each one.
|
130 |
+
$blog_ids = $wpdb->get_col(
|
131 |
+
"SELECT blog_id FROM $wpdb->blogs"
|
132 |
+
);
|
133 |
+
foreach ( $blog_ids as $blog_id ) {
|
134 |
+
switch_to_blog( $blog_id );
|
135 |
+
leadin_add_defaults();
|
136 |
+
$activated[] = $blog_id;
|
137 |
+
}
|
138 |
+
|
139 |
+
// Switch back to the current blog.
|
140 |
+
switch_to_blog( $current_blog );
|
141 |
+
|
142 |
+
// Store the array for a later function.
|
143 |
+
update_site_option( 'leadin_activated', $activated );
|
144 |
+
} else {
|
145 |
+
leadin_add_defaults();
|
146 |
+
}
|
|
|
147 |
}
|
148 |
|
149 |
/**
|
150 |
* Check Leadin installation and set options
|
151 |
*/
|
152 |
+
function leadin_add_defaults() {
|
153 |
+
global $wpdb;
|
154 |
+
$options = get_option( 'leadin_options' );
|
155 |
+
|
156 |
+
if ( ( 1 !== $options['li_installed'] ) || ( ! is_array( $options ) ) ) {
|
157 |
+
$opt = array(
|
158 |
+
'li_installed' => 1,
|
159 |
+
'leadin_version' => LEADIN_PLUGIN_VERSION,
|
160 |
+
'li_email' => get_bloginfo( 'admin_email' ),
|
161 |
+
'li_updates_subscription' => 1,
|
162 |
+
'onboarding_step' => 1,
|
163 |
+
'onboarding_complete' => 0,
|
164 |
+
'ignore_settings_popup' => 0,
|
165 |
+
'data_recovered' => 1,
|
166 |
+
'delete_flags_fixed' => 1,
|
167 |
+
'beta_tester' => 0,
|
168 |
+
'converted_to_tags' => 1,
|
169 |
+
'names_added_to_contacts' => 1,
|
170 |
+
'affiliate_code' => '',
|
171 |
+
);
|
172 |
+
|
173 |
+
// Add the Pro flag if this is a pro installation.
|
174 |
+
if ( ( defined( 'LEADIN_UTM_SOURCE' ) && 'leadin%20repo%20plugin' !== LEADIN_UTM_SOURCE ) || ! defined( 'LEADIN_UTM_SOURCE' ) ) {
|
175 |
+
$opt['pro'] = 1;
|
176 |
+
}
|
177 |
+
|
178 |
+
// this is a hack because multisite doesn't recognize local options using either update_option or update_site_option...
|
179 |
+
if ( is_multisite() ) {
|
180 |
+
$multisite_prefix = ( is_multisite() ? $wpdb->prefix : '' );
|
181 |
+
$wpdb->query(
|
182 |
+
$wpdb->prepare(
|
183 |
+
"INSERT INTO %soptions ( option_name, option_value ) VALUES ('leadin_options', %s)",
|
184 |
+
$multisite_prefix,
|
185 |
+
serialize( $opt )
|
186 |
+
)
|
187 |
+
);
|
188 |
+
// TODO: Glob settings for multisite.
|
189 |
+
} else {
|
190 |
+
update_option( 'leadin_options', $opt );
|
191 |
+
}
|
192 |
+
}
|
193 |
+
|
194 |
+
setcookie( 'ignore_social_share', '1', 2592000, '/' );
|
|
|
|
|
|
|
195 |
}
|
196 |
|
197 |
/**
|
198 |
* Deactivate Leadin plugin hook
|
199 |
+
*
|
200 |
+
* @param bool $network_wide network_wide.
|
201 |
*/
|
202 |
+
function leadin_deactivate( $network_wide ) {
|
203 |
+
if ( is_multisite() && $network_wide ) {
|
204 |
+
global $wpdb;
|
205 |
+
|
206 |
+
// Get this so we can switch back to it later.
|
207 |
+
$current_blog = $wpdb->blogid;
|
208 |
+
|
209 |
+
// Get all blogs in the network and activate plugin on each one.
|
210 |
+
$blog_ids = $wpdb->get_col(
|
211 |
+
"SELECT blog_id FROM $wpdb->blogs"
|
212 |
+
);
|
213 |
+
foreach ( $blog_ids as $blog_id ) {
|
214 |
+
switch_to_blog( $blog_id );
|
215 |
+
}
|
216 |
+
|
217 |
+
// Switch back to the current blog.
|
218 |
+
switch_to_blog( $current_blog );
|
219 |
+
}
|
220 |
}
|
221 |
|
222 |
+
/**
|
223 |
+
* Handler for wpmu_new_blog
|
224 |
+
*
|
225 |
+
* @param any $blog_id read wpmu_new_blog doc.
|
226 |
+
* @param any $user_id read wpmu_new_blog doc.
|
227 |
+
* @param any $domain read wpmu_new_blog doc.
|
228 |
+
* @param any $path read wpmu_new_blog doc.
|
229 |
+
* @param any $site_id read wpmu_new_blog doc.
|
230 |
+
* @param any $meta read wpmu_new_blog doc.
|
231 |
+
*/
|
232 |
+
function leadin_activate_on_new_blog( $blog_id, $user_id, $domain, $path, $site_id, $meta ) {
|
233 |
+
global $wpdb;
|
234 |
+
|
235 |
+
if ( is_plugin_active_for_network( 'leadin/leadin.php' ) ) {
|
236 |
+
$current_blog = $wpdb->blogid;
|
237 |
+
switch_to_blog( $blog_id );
|
238 |
+
leadin_add_defaults();
|
239 |
+
switch_to_blog( $current_blog );
|
240 |
+
}
|
241 |
}
|
242 |
|
243 |
+
/**
|
244 |
+
* Parse shortcode
|
245 |
+
*
|
246 |
+
* @param array $attributes Shortcode attributes.
|
247 |
+
*/
|
248 |
+
function leadin_add_hubspot_shortcode( $attributes ) {
|
249 |
+
$parsed_attributes = shortcode_atts(
|
250 |
+
array(
|
251 |
+
'type' => null,
|
252 |
+
'portal' => null,
|
253 |
+
'id' => null,
|
254 |
+
),
|
255 |
+
$attributes
|
256 |
+
);
|
257 |
+
|
258 |
+
if (
|
259 |
+
! isset( $parsed_attributes['type'] ) ||
|
260 |
+
! isset( $parsed_attributes['portal'] ) ||
|
261 |
+
! isset( $parsed_attributes['id'] )
|
262 |
+
) {
|
263 |
+
return;
|
264 |
+
}
|
265 |
+
|
266 |
+
$portal_id = $parsed_attributes['portal'];
|
267 |
+
$id = $parsed_attributes['id'];
|
268 |
+
|
269 |
+
switch ( $parsed_attributes['type'] ) {
|
270 |
+
case 'form':
|
271 |
+
return '
|
272 |
+
<' . 'script charset="utf-8" type="text/javascript" src="' . LEADIN_FORMS_SCRIPT_URL . '"></script>
|
273 |
+
<script>
|
274 |
+
hbspt.forms.create({
|
275 |
+
portalId: ' . $portal_id . ',
|
276 |
+
formId: "' . $id . '",
|
277 |
+
shortcode: "wp",
|
278 |
+
' . LEADIN_FORMS_PAYLOAD . '
|
279 |
+
});
|
280 |
+
</script>
|
281 |
+
';
|
282 |
+
case 'cta':
|
283 |
+
return '
|
284 |
+
<!--HubSpot Call-to-Action Code -->
|
285 |
+
<span class="hs-cta-wrapper" id="hs-cta-wrapper-' . $id . '">
|
286 |
+
<span class="hs-cta-node hs-cta-' . $id . '" id="' . $id . '">
|
287 |
+
<!--[if lte IE 8]>
|
288 |
+
<div id="hs-cta-ie-element"></div>
|
289 |
+
<![endif]-->
|
290 |
+
<a href="https://cta-redirect.hubspot.com/cta/redirect/' . $portal_id . '/' . $id . '" >
|
291 |
+
<img class="hs-cta-img" id="hs-cta-img-' . $id . '" style="border-width:0px;" src="https://no-cache.hubspot.com/cta/default/' . $portal_id . '/' . $id . '.png" alt="New call-to-action"/>
|
292 |
+
</a>
|
293 |
+
</span>
|
294 |
+
<' . 'script charset="utf-8" src="//js.hubspot.com/cta/current.js"></script>
|
295 |
+
<script type="text/javascript">
|
296 |
+
hbspt.cta.load(' . $portal_id . ', \'' . $id . '\', {});
|
297 |
+
</script>
|
298 |
+
</span>
|
299 |
+
<!-- end HubSpot Call-to-Action Code -->
|
300 |
+
';
|
301 |
+
}
|
302 |
}
|
303 |
|
304 |
/**
|
305 |
* Checks the stored database version against the current data version + updates if needed
|
306 |
*/
|
307 |
+
function leadin_init() {
|
308 |
+
load_plugin_textdomain( 'leadin', false, '/leadin/languages' );
|
309 |
+
$leadin_wp = new Leadin();
|
310 |
+
add_shortcode( 'hubspot', 'leadin_add_hubspot_shortcode' );
|
|
|
311 |
}
|
312 |
|
|
|
313 |
add_action( 'plugins_loaded', 'leadin_init', 14 );
|
314 |
|
315 |
if ( is_admin() ) {
|
316 |
+
// Activate + install Leadin.
|
317 |
+
register_activation_hook( __FILE__, 'leadin_activate' );
|
318 |
|
319 |
+
// Deactivate Leadin.
|
320 |
+
register_deactivation_hook( __FILE__, 'leadin_deactivate' );
|
321 |
|
322 |
+
// Activate on newly created wpmu blog.
|
323 |
+
add_action( 'wpmu_new_blog', 'leadin_activate_on_new_blog', 10, 6 );
|
324 |
}
|
325 |
|
326 |
|
readme.txt
CHANGED
@@ -2,19 +2,19 @@
|
|
2 |
Contributors: HubSpotDev, leadin
|
3 |
License: GPLv3
|
4 |
License URI: http://www.gnu.org/licenses/gpl.html
|
5 |
-
Tags: forms, popup, live chat, contact form,
|
6 |
Requires at least: 4.0
|
7 |
Tested up to: 5.2
|
8 |
Requires PHP: 5.6
|
9 |
-
Stable tag: 7.5.
|
10 |
|
11 |
-
HubSpot All-In-One Marketing, is a free all-in-one marketing plugin that allows you to easily use HubSpot forms, popups, and live chat on your WordPress site. If you’re already a HubSpot user, the plugin lets you connect your HubSpot account to your website without any code.
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
*HubSpot All-In-One Marketing is the ultimate free
|
16 |
|
17 |
-
The free plugin includes lead capture tools like forms, popups, live chat, and an integrated free contact database (CRM). All these features work immediately with no developer help needed.
|
18 |
|
19 |
HubSpot All-In-One Marketing automatically captures form submissions from your site and adds them to the fully integrated WordPress CRM, even if they come from a different tool.
|
20 |
|
@@ -35,16 +35,19 @@ If you’re already using a WordPress form tool on your site, HubSpot will autom
|
|
35 |
|
36 |
*Live Chat & Chatbots: Let your site visitors talk to you*
|
37 |
|
38 |
-
HubSpot allows you to embed a <a href="https://www.hubspot.com/products/crm/live-chat?utm_source=wordpress-plugin-listing&utm_campaign=wordpress&utm_medium=marketplaces" target="_blank">free live chat</a> module to your website
|
39 |
|
40 |
-
Support live chat: Answer questions your customers might have about your business through live chat
|
41 |
-
Sales live chat: Help answer questions your potential customers might have through live chat
|
42 |
-
Automated chatbot: Set up an automated chatbot to respond to your website visitors when you aren’t online to respond to live chat messages
|
43 |
|
44 |
-
*
|
|
|
|
|
45 |
|
46 |
-
|
47 |
|
|
|
48 |
|
49 |
*Fully Integrated Customer Relationship Management*
|
50 |
|
@@ -60,12 +63,15 @@ Built-in analytics makes it clear which pages and traffic sources drive the most
|
|
60 |
- Dashboard: A central hub for your marketing analytics. Learn which forms, popups, and live chat modules get the most submissions and pages and traffic sources drive the most conversions.
|
61 |
- <a href="https://www.hubspot.com/products/marketing/lead-flows?utm_source=wordpress-plugin-listing&utm_campaign=wordpress&utm_medium=marketplaces" target="_blank">Popups</a>: Add a user-friendly popup form to your WordPress website with ease using HubSpot’s form builder.
|
62 |
- <a href="https://www.hubspot.com/products/crm/live-chat?utm_source=wordpress-plugin-listing&utm_campaign=wordpress&utm_medium=marketplaces" target="_blank">Live Chat</a>: Add a live chat widget to your WordPress site so visitors can chat with you.
|
|
|
63 |
- Simple Email Automation: Send an automated email whenever someone fills out a form or popup or sends a message on live chat.
|
64 |
- <a href="https://www.hubspot.com/products/crm?utm_source=wordpress-plugin-listing&utm_campaign=wordpress&utm_medium=marketplaces" target="_blank">WordPress CRM</a>: A single simple database for contact management.
|
65 |
- Integrations: Easily connect to MailChimp, Shopify, Magento and more.
|
66 |
|
67 |
*What do people have to say about HubSpot All-In-One Marketing - Forms, Popups, Live Chat?*
|
68 |
|
|
|
|
|
69 |
> “HubSpot educates marketers beyond just the anonymous analytics they get from Google Analytics. Instead, it digs down to individual users.” – Michael Shoup, Founder / CEO, 12South Marketing
|
70 |
|
71 |
> “HubSpot dramatically cuts down the time I spend on marketing. We used to spend tons of time generating very few inbound leads, but those numbers have gone through the roof with minimal effort.” – Brian Ruhlmann, Director of Sales & Marketing, AdmitHub
|
@@ -110,11 +116,11 @@ Having trouble? Check out our <a href="https://knowledge.hubspot.com/articles/kc
|
|
110 |
|
111 |
= What does the plugin do? =
|
112 |
|
113 |
-
HubSpot All-In-One Marketing allows you to use HubSpot forms, popups, and live chat on your WordPress website. This all-in-one marketing plugin gives you all the tools you need to grow your email list.
|
114 |
|
115 |
= What is HubSpot? =
|
116 |
|
117 |
-
<a href="https://hubspot.com?utm_source=wordpress-plugin-listing&utm_campaign=wordpress&utm_medium=marketplaces" target="_blank">HubSpot</a>
|
118 |
|
119 |
= Who should use HubSpot All-In-One Marketing? =
|
120 |
|
@@ -149,6 +155,9 @@ The popup form won’t conflict each other and will wait for their respective tr
|
|
149 |
|
150 |
<a href="https://knowledge.hubspot.com/getting-started-with-the-hubspot-crm-free/lead-flows-and-collected-forms-faq?utm_source=wordpress-plugin-listing&utm_campaign=wordpress&utm_medium=marketplaces" target="_blank">Check out this help article</a> for more details.
|
151 |
|
|
|
|
|
|
|
152 |
= My question is not listed. =
|
153 |
|
154 |
Please <a href="https://community.hubspot.com?utm_source=wordpress-plugin-listing&utm_campaign=wordpress&utm_medium=marketplaces" target="_blank">visit the HubSpot Community</a> for more detailed documentation and support. Thank you!
|
@@ -164,18 +173,11 @@ Please <a href="https://community.hubspot.com?utm_source=wordpress-plugin-listin
|
|
164 |
|
165 |
== Changelog ==
|
166 |
|
167 |
-
- Current version: 7.5.
|
168 |
-
- Current version release: 2019-06-
|
169 |
-
|
170 |
-
= 7.5.
|
171 |
-
-
|
172 |
-
- Show "complete your signup" banner for WPEngine themes
|
173 |
-
- Auto-generate assets and update styles for WPEngine themes
|
174 |
-
- Handle messages timeout errors
|
175 |
-
- Fix navigation in single page app
|
176 |
-
- Enable non-HubSpot forms by default
|
177 |
-
- Add forms tab in settings
|
178 |
-
- Add form builder to WordPress
|
179 |
|
180 |
= 7.5.0 (2019.05.22) =
|
181 |
- Add banner to inform users if the version is outdated
|
2 |
Contributors: HubSpotDev, leadin
|
3 |
License: GPLv3
|
4 |
License URI: http://www.gnu.org/licenses/gpl.html
|
5 |
+
Tags: hubspot, crm, forms, popup, live chat, email, contact form, newsletter, marketing, lead generation, mailchimp, constant contact
|
6 |
Requires at least: 4.0
|
7 |
Tested up to: 5.2
|
8 |
Requires PHP: 5.6
|
9 |
+
Stable tag: 7.5.4
|
10 |
|
11 |
+
HubSpot All-In-One Marketing, is a free all-in-one marketing plugin that allows you to easily use HubSpot forms, popups, and live chat on your WordPress site and create and send email campaigns. If you’re already a HubSpot user, the plugin lets you connect your HubSpot account to your website without any code.
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
*HubSpot All-In-One Marketing is the ultimate free plugin for WordPress if you want to grow your email list, manage your contacts, and send marketing emails all through HubSpot’s free CRM.*
|
16 |
|
17 |
+
The free plugin includes lead capture tools like forms, popups, live chat, and an integrated free contact database (CRM). Once you grow your email list you can also send email campaigns and manage your digital ads through HubSpot. All these features work immediately with no developer help needed.
|
18 |
|
19 |
HubSpot All-In-One Marketing automatically captures form submissions from your site and adds them to the fully integrated WordPress CRM, even if they come from a different tool.
|
20 |
|
35 |
|
36 |
*Live Chat & Chatbots: Let your site visitors talk to you*
|
37 |
|
38 |
+
HubSpot allows you to embed a <a href="https://www.hubspot.com/products/crm/live-chat?utm_source=wordpress-plugin-listing&utm_campaign=wordpress&utm_medium=marketplaces" target="_blank">free live chat</a> module to your website and let site visitors chat with you. Using the plugin, you can set up the following WordPress live chat modules:
|
39 |
|
40 |
+
- Support live chat: Answer questions your customers might have about your business through live chat
|
41 |
+
- Sales live chat: Help answer questions your potential customers might have through live chat
|
42 |
+
- Automated chatbot: Set up an automated chatbot to respond to your website visitors when you aren’t online to respond to live chat messages
|
43 |
|
44 |
+
*Email Marketing*
|
45 |
+
|
46 |
+
Send marketing emails to your contacts. Select an email design from our template library and use our drag and drop email editor to craft and send the perfect email. Then analyze your email performance to see how each contact interacted with your email.
|
47 |
|
48 |
+
*Simple Email Automation*
|
49 |
|
50 |
+
Send an automated email when someone fills out a form, submits a popup form, or sends a message on live chat. Automated emails are helpful for engaging with your subscribers and customers at the time that matters most: when they’re engaging with you. All emails you send including open and click rates, will be automatically logged in the integrated WordPress CRM so you can see exactly who opens and clicks your emails.
|
51 |
|
52 |
*Fully Integrated Customer Relationship Management*
|
53 |
|
63 |
- Dashboard: A central hub for your marketing analytics. Learn which forms, popups, and live chat modules get the most submissions and pages and traffic sources drive the most conversions.
|
64 |
- <a href="https://www.hubspot.com/products/marketing/lead-flows?utm_source=wordpress-plugin-listing&utm_campaign=wordpress&utm_medium=marketplaces" target="_blank">Popups</a>: Add a user-friendly popup form to your WordPress website with ease using HubSpot’s form builder.
|
65 |
- <a href="https://www.hubspot.com/products/crm/live-chat?utm_source=wordpress-plugin-listing&utm_campaign=wordpress&utm_medium=marketplaces" target="_blank">Live Chat</a>: Add a live chat widget to your WordPress site so visitors can chat with you.
|
66 |
+
- <a href="https://www.hubspot.com/products/marketing/email?utm_source=wordpress-plugin-listing&utm_campaign=wordpress&utm_medium=marketplaces" target="_blank">Email Marketing</a>: Use the drag and drop editor to design and send email campaigns.
|
67 |
- Simple Email Automation: Send an automated email whenever someone fills out a form or popup or sends a message on live chat.
|
68 |
- <a href="https://www.hubspot.com/products/crm?utm_source=wordpress-plugin-listing&utm_campaign=wordpress&utm_medium=marketplaces" target="_blank">WordPress CRM</a>: A single simple database for contact management.
|
69 |
- Integrations: Easily connect to MailChimp, Shopify, Magento and more.
|
70 |
|
71 |
*What do people have to say about HubSpot All-In-One Marketing - Forms, Popups, Live Chat?*
|
72 |
|
73 |
+
> "I have been in sales and marketing for over 12 years and literally have NEVER liked one of the contact management tools that I have used... and then HubSpot came along and waved their magic sales wand and made a contact management tool that is actually sales-minded, works great, and integrates seamlessly with WordPress." - Caylin White, Head Marketing Buff, WP Buffs
|
74 |
+
|
75 |
> “HubSpot educates marketers beyond just the anonymous analytics they get from Google Analytics. Instead, it digs down to individual users.” – Michael Shoup, Founder / CEO, 12South Marketing
|
76 |
|
77 |
> “HubSpot dramatically cuts down the time I spend on marketing. We used to spend tons of time generating very few inbound leads, but those numbers have gone through the roof with minimal effort.” – Brian Ruhlmann, Director of Sales & Marketing, AdmitHub
|
116 |
|
117 |
= What does the plugin do? =
|
118 |
|
119 |
+
HubSpot All-In-One Marketing allows you to use HubSpot forms, popups, and live chat on your WordPress website. This all-in-one marketing plugin gives you all the tools you need to grow your email list and send email campaigns.
|
120 |
|
121 |
= What is HubSpot? =
|
122 |
|
123 |
+
<a href="https://hubspot.com?utm_source=wordpress-plugin-listing&utm_campaign=wordpress&utm_medium=marketplaces" target="_blank">HubSpot</a> provides a suite of marketing, sales, customer service, and CRM products to help you grow your business including.
|
124 |
|
125 |
= Who should use HubSpot All-In-One Marketing? =
|
126 |
|
155 |
|
156 |
<a href="https://knowledge.hubspot.com/getting-started-with-the-hubspot-crm-free/lead-flows-and-collected-forms-faq?utm_source=wordpress-plugin-listing&utm_campaign=wordpress&utm_medium=marketplaces" target="_blank">Check out this help article</a> for more details.
|
157 |
|
158 |
+
**What is available in the free email marketing tool?**
|
159 |
+
HubSpot’s free email marketing tool offers 2000 email sends per calendar month, with HubSpot branding.
|
160 |
+
|
161 |
= My question is not listed. =
|
162 |
|
163 |
Please <a href="https://community.hubspot.com?utm_source=wordpress-plugin-listing&utm_campaign=wordpress&utm_medium=marketplaces" target="_blank">visit the HubSpot Community</a> for more detailed documentation and support. Thank you!
|
173 |
|
174 |
== Changelog ==
|
175 |
|
176 |
+
- Current version: 7.5.4
|
177 |
+
- Current version release: 2019-06-26
|
178 |
+
|
179 |
+
= 7.5.4 (2019.06.26) =
|
180 |
+
- Fix wrong escape
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
|
182 |
= 7.5.0 (2019.05.22) =
|
183 |
- Add banner to inform users if the version is outdated
|
scripts/leadin.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
!function(e){var t={};function o(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=t,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=8)}([function(e,t,o){(function(t){var r=o(3),n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},a=n.Raven,l=new r;l.noConflict=function(){return n.Raven=a,l},l.afterLoad(),e.exports=l}).call(this,o(1))},function(e,t){var o;o=function(){return this}();try{o=o||new Function("return this")()}catch(e){"object"==typeof window&&(o=window)}e.exports=o},function(e,t,o){(function(t){var o="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};function r(e){return void 0===e}function n(e){return"[object String]"===Object.prototype.toString.call(e)}function a(){try{return new ErrorEvent(""),!0}catch(e){return!1}}function l(e,t){var o,n;if(r(e.length))for(o in e)i(e,o)&&t.call(null,o,e[o]);else if(n=e.length)for(o=0;o<n;o++)t.call(null,o,e[o])}function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function s(e){var t,o,r,a,l,i=[];if(!e||!e.tagName)return"";if(i.push(e.tagName.toLowerCase()),e.id&&i.push("#"+e.id),(t=e.className)&&n(t))for(o=t.split(/\s+/),l=0;l<o.length;l++)i.push("."+o[l]);var s=["type","name","title","alt"];for(l=0;l<s.length;l++)r=s[l],(a=e.getAttribute(r))&&i.push("["+r+'="'+a+'"]');return i.join("")}function c(e,t){return!!(!!e^!!t)}function u(e,t){if(c(e,t))return!1;var o,r,n=e.frames,a=t.frames;if(n.length!==a.length)return!1;for(var l=0;l<n.length;l++)if(o=n[l],r=a[l],o.filename!==r.filename||o.lineno!==r.lineno||o.colno!==r.colno||o.function!==r.function)return!1;return!0}e.exports={isObject:function(e){return"object"==typeof e&&null!==e},isError:function(e){switch({}.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return e instanceof Error}},isErrorEvent:function(e){return a()&&"[object ErrorEvent]"==={}.toString.call(e)},isUndefined:r,isFunction:function(e){return"function"==typeof e},isString:n,isEmptyObject:function(e){for(var t in e)return!1;return!0},supportsErrorEvent:a,wrappedCallback:function(e){return function(t,o){var r=e(t)||t;return o&&o(r)||r}},each:l,objectMerge:function(e,t){return t?(l(t,function(t,o){e[t]=o}),e):e},truncate:function(e,t){return!t||e.length<=t?e:e.substr(0,t)+"…"},objectFrozen:function(e){return!!Object.isFrozen&&Object.isFrozen(e)},hasKey:i,joinRegExp:function(e){for(var t,o=[],r=0,a=e.length;r<a;r++)n(t=e[r])?o.push(t.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):t&&t.source&&o.push(t.source);return new RegExp(o.join("|"),"i")},urlencode:function(e){var t=[];return l(e,function(e,o){t.push(encodeURIComponent(e)+"="+encodeURIComponent(o))}),t.join("&")},uuid4:function(){var e=o.crypto||o.msCrypto;if(!r(e)&&e.getRandomValues){var t=new Uint16Array(8);e.getRandomValues(t),t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;var n=function(e){for(var t=e.toString(16);t.length<4;)t="0"+t;return t};return n(t[0])+n(t[1])+n(t[2])+n(t[3])+n(t[4])+n(t[5])+n(t[6])+n(t[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},htmlTreeAsString:function(e){for(var t,o=[],r=0,n=0,a=" > ".length;e&&r++<5&&!("html"===(t=s(e))||r>1&&n+o.length*a+t.length>=80);)o.push(t),n+=t.length,e=e.parentNode;return o.reverse().join(" > ")},htmlElementAsString:s,isSameException:function(e,t){return!c(e,t)&&(e=e.values[0],t=t.values[0],e.type===t.type&&e.value===t.value&&u(e.stacktrace,t.stacktrace))},isSameStacktrace:u,parseUrl:function(e){var t=e.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};var o=t[6]||"",r=t[8]||"";return{protocol:t[2],host:t[4],path:t[5],relative:t[5]+o+r}},fill:function(e,t,o,r){var n=e[t];e[t]=o(n),r&&r.push([e,t,n])}}}).call(this,o(1))},function(e,t,o){(function(t){var r=o(4),n=o(5),a=o(6),l=o(2),i=l.isError,s=l.isObject,c=(s=l.isObject,l.isErrorEvent),u=l.isUndefined,f=l.isFunction,p=l.isString,d=l.isEmptyObject,h=l.each,b=l.objectMerge,m=l.truncate,y=l.objectFrozen,g=l.hasKey,v=l.joinRegExp,_=l.urlencode,S=l.uuid4,x=l.htmlTreeAsString,C=l.isSameException,w=l.isSameStacktrace,E=l.parseUrl,F=l.fill,T=o(7).wrapMethod,k="source protocol user pass host port path".split(" "),L=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;function O(){return+new Date}var j="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},R=j.document,I=j.navigator;function B(e,t){return f(t)?function(o){return t(o,e)}:t}function M(){for(var e in this._hasJSON=!("object"!=typeof JSON||!JSON.stringify),this._hasDocument=!u(R),this._hasNavigator=!u(I),this._lastCapturedException=null,this._lastData=null,this._lastEventId=null,this._globalServer=null,this._globalKey=null,this._globalProject=null,this._globalContext={},this._globalOptions={logger:"javascript",ignoreErrors:[],ignoreUrls:[],whitelistUrls:[],includePaths:[],collectWindowErrors:!0,maxMessageLength:0,maxUrlLength:250,stackTraceLimit:50,autoBreadcrumbs:!0,instrument:!0,sampleRate:1},this._ignoreOnError=0,this._isRavenInstalled=!1,this._originalErrorStackTraceLimit=Error.stackTraceLimit,this._originalConsole=j.console||{},this._originalConsoleMethods={},this._plugins=[],this._startTime=O(),this._wrappedBuiltIns=[],this._breadcrumbs=[],this._lastCapturedEvent=null,this._keypressTimeout,this._location=j.location,this._lastHref=this._location&&this._location.href,this._resetBackoff(),this._originalConsole)this._originalConsoleMethods[e]=this._originalConsole[e]}M.prototype={VERSION:"3.19.1",debug:!1,TraceKit:r,config:function(e,t){var o=this;if(o._globalServer)return this._logDebug("error","Error: Raven has already been configured"),o;if(!e)return o;var n=o._globalOptions;t&&h(t,function(e,t){"tags"===e||"extra"===e||"user"===e?o._globalContext[e]=t:n[e]=t}),o.setDSN(e),n.ignoreErrors.push(/^Script error\.?$/),n.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/),n.ignoreErrors=v(n.ignoreErrors),n.ignoreUrls=!!n.ignoreUrls.length&&v(n.ignoreUrls),n.whitelistUrls=!!n.whitelistUrls.length&&v(n.whitelistUrls),n.includePaths=v(n.includePaths),n.maxBreadcrumbs=Math.max(0,Math.min(n.maxBreadcrumbs||100,100));var a={xhr:!0,console:!0,dom:!0,location:!0},l=n.autoBreadcrumbs;"[object Object]"==={}.toString.call(l)?l=b(a,l):!1!==l&&(l=a),n.autoBreadcrumbs=l;var i={tryCatch:!0},s=n.instrument;return"[object Object]"==={}.toString.call(s)?s=b(i,s):!1!==s&&(s=i),n.instrument=s,r.collectWindowErrors=!!n.collectWindowErrors,o},install:function(){var e=this;return e.isSetup()&&!e._isRavenInstalled&&(r.report.subscribe(function(){e._handleOnErrorStackInfo.apply(e,arguments)}),e._globalOptions.instrument&&e._globalOptions.instrument.tryCatch&&e._instrumentTryCatch(),e._globalOptions.autoBreadcrumbs&&e._instrumentBreadcrumbs(),e._drainPlugins(),e._isRavenInstalled=!0),Error.stackTraceLimit=e._globalOptions.stackTraceLimit,this},setDSN:function(e){var t=this._parseDSN(e),o=t.path.lastIndexOf("/"),r=t.path.substr(1,o);this._dsn=e,this._globalKey=t.user,this._globalSecret=t.pass&&t.pass.substr(1),this._globalProject=t.path.substr(o+1),this._globalServer=this._getGlobalServer(t),this._globalEndpoint=this._globalServer+"/"+r+"api/"+this._globalProject+"/store/",this._resetBackoff()},context:function(e,t,o){return f(e)&&(o=t||[],t=e,e=void 0),this.wrap(e,t).apply(this,o)},wrap:function(e,t,o){var r=this;if(u(t)&&!f(e))return e;if(f(e)&&(t=e,e=void 0),!f(t))return t;try{if(t.__raven__)return t;if(t.__raven_wrapper__)return t.__raven_wrapper__}catch(e){return t}function n(){var n=[],a=arguments.length,l=!e||e&&!1!==e.deep;for(o&&f(o)&&o.apply(this,arguments);a--;)n[a]=l?r.wrap(e,arguments[a]):arguments[a];try{return t.apply(this,n)}catch(t){throw r._ignoreNextOnError(),r.captureException(t,e),t}}for(var a in t)g(t,a)&&(n[a]=t[a]);return n.prototype=t.prototype,t.__raven_wrapper__=n,n.__raven__=!0,n.__inner__=t,n},uninstall:function(){return r.report.uninstall(),this._restoreBuiltIns(),Error.stackTraceLimit=this._originalErrorStackTraceLimit,this._isRavenInstalled=!1,this},captureException:function(e,t){var o=!i(e),n=!c(e),a=c(e)&&!e.error;if(o&&n||a)return this.captureMessage(e,b({trimHeadFrames:1,stacktrace:!0},t));c(e)&&(e=e.error),this._lastCapturedException=e;try{var l=r.computeStackTrace(e);this._handleStackInfo(l,t)}catch(t){if(e!==t)throw t}return this},captureMessage:function(e,t){if(!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(e)){var o,n=b({message:e+""},t=t||{});try{throw new Error(e)}catch(e){o=e}o.name=null;var a=r.computeStackTrace(o),l=a.stack[1],i=l&&l.url||"";if((!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(i))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(i))){if(this._globalOptions.stacktrace||t&&t.stacktrace){t=b({fingerprint:e,trimHeadFrames:(t.trimHeadFrames||0)+1},t);var s=this._prepareFrames(a,t);n.stacktrace={frames:s.reverse()}}return this._send(n),this}}},captureBreadcrumb:function(e){var t=b({timestamp:O()/1e3},e);if(f(this._globalOptions.breadcrumbCallback)){var o=this._globalOptions.breadcrumbCallback(t);if(s(o)&&!d(o))t=o;else if(!1===o)return this}return this._breadcrumbs.push(t),this._breadcrumbs.length>this._globalOptions.maxBreadcrumbs&&this._breadcrumbs.shift(),this},addPlugin:function(e){var t=[].slice.call(arguments,1);return this._plugins.push([e,t]),this._isRavenInstalled&&this._drainPlugins(),this},setUserContext:function(e){return this._globalContext.user=e,this},setExtraContext:function(e){return this._mergeContext("extra",e),this},setTagsContext:function(e){return this._mergeContext("tags",e),this},clearContext:function(){return this._globalContext={},this},getContext:function(){return JSON.parse(n(this._globalContext))},setEnvironment:function(e){return this._globalOptions.environment=e,this},setRelease:function(e){return this._globalOptions.release=e,this},setDataCallback:function(e){var t=this._globalOptions.dataCallback;return this._globalOptions.dataCallback=B(t,e),this},setBreadcrumbCallback:function(e){var t=this._globalOptions.breadcrumbCallback;return this._globalOptions.breadcrumbCallback=B(t,e),this},setShouldSendCallback:function(e){var t=this._globalOptions.shouldSendCallback;return this._globalOptions.shouldSendCallback=B(t,e),this},setTransport:function(e){return this._globalOptions.transport=e,this},lastException:function(){return this._lastCapturedException},lastEventId:function(){return this._lastEventId},isSetup:function(){return!!this._hasJSON&&(!!this._globalServer||(this.ravenNotConfiguredError||(this.ravenNotConfiguredError=!0,this._logDebug("error","Error: Raven has not been configured.")),!1))},afterLoad:function(){var e=j.RavenConfig;e&&this.config(e.dsn,e.config).install()},showReportDialog:function(e){if(R){var t=(e=e||{}).eventId||this.lastEventId();if(!t)throw new a("Missing eventId");var o=e.dsn||this._dsn;if(!o)throw new a("Missing DSN");var r=encodeURIComponent,n="";n+="?eventId="+r(t),n+="&dsn="+r(o);var l=e.user||this._globalContext.user;l&&(l.name&&(n+="&name="+r(l.name)),l.email&&(n+="&email="+r(l.email)));var i=this._getGlobalServer(this._parseDSN(o)),s=R.createElement("script");s.async=!0,s.src=i+"/api/embed/error-page/"+n,(R.head||R.body).appendChild(s)}},_ignoreNextOnError:function(){var e=this;this._ignoreOnError+=1,setTimeout(function(){e._ignoreOnError-=1})},_triggerEvent:function(e,t){var o,r;if(this._hasDocument){for(r in t=t||{},e="raven"+e.substr(0,1).toUpperCase()+e.substr(1),R.createEvent?(o=R.createEvent("HTMLEvents")).initEvent(e,!0,!0):(o=R.createEventObject()).eventType=e,t)g(t,r)&&(o[r]=t[r]);if(R.createEvent)R.dispatchEvent(o);else try{R.fireEvent("on"+o.eventType.toLowerCase(),o)}catch(e){}}},_breadcrumbEventHandler:function(e){var t=this;return function(o){if(t._keypressTimeout=null,t._lastCapturedEvent!==o){var r;t._lastCapturedEvent=o;try{r=x(o.target)}catch(e){r="<unknown>"}t.captureBreadcrumb({category:"ui."+e,message:r})}}},_keypressEventHandler:function(){var e=this;return function(t){var o;try{o=t.target}catch(e){return}var r=o&&o.tagName;if(r&&("INPUT"===r||"TEXTAREA"===r||o.isContentEditable)){var n=e._keypressTimeout;n||e._breadcrumbEventHandler("input")(t),clearTimeout(n),e._keypressTimeout=setTimeout(function(){e._keypressTimeout=null},1e3)}}},_captureUrlChange:function(e,t){var o=E(this._location.href),r=E(t),n=E(e);this._lastHref=t,o.protocol===r.protocol&&o.host===r.host&&(t=r.relative),o.protocol===n.protocol&&o.host===n.host&&(e=n.relative),this.captureBreadcrumb({category:"navigation",data:{to:t,from:e}})},_instrumentTryCatch:function(){var e=this,t=e._wrappedBuiltIns;function o(t){return function(o,r){for(var n=new Array(arguments.length),a=0;a<n.length;++a)n[a]=arguments[a];var l=n[0];return f(l)&&(n[0]=e.wrap(l)),t.apply?t.apply(this,n):t(n[0],n[1])}}var r=this._globalOptions.autoBreadcrumbs;function n(o){var n=j[o]&&j[o].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(F(n,"addEventListener",function(t){return function(n,a,l,i){try{a&&a.handleEvent&&(a.handleEvent=e.wrap(a.handleEvent))}catch(e){}var s,c,u;return r&&r.dom&&("EventTarget"===o||"Node"===o)&&(c=e._breadcrumbEventHandler("click"),u=e._keypressEventHandler(),s=function(e){if(e){var t;try{t=e.type}catch(e){return}return"click"===t?c(e):"keypress"===t?u(e):void 0}}),t.call(this,n,e.wrap(a,void 0,s),l,i)}},t),F(n,"removeEventListener",function(e){return function(t,o,r,n){try{o=o&&(o.__raven_wrapper__?o.__raven_wrapper__:o)}catch(e){}return e.call(this,t,o,r,n)}},t))}F(j,"setTimeout",o,t),F(j,"setInterval",o,t),j.requestAnimationFrame&&F(j,"requestAnimationFrame",function(t){return function(o){return t(e.wrap(o))}},t);for(var a=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],l=0;l<a.length;l++)n(a[l])},_instrumentBreadcrumbs:function(){var e=this,t=this._globalOptions.autoBreadcrumbs,o=e._wrappedBuiltIns;function r(t,o){t in o&&f(o[t])&&F(o,t,function(t){return e.wrap(t)})}if(t.xhr&&"XMLHttpRequest"in j){var n=XMLHttpRequest.prototype;F(n,"open",function(t){return function(o,r){return p(r)&&-1===r.indexOf(e._globalKey)&&(this.__raven_xhr={method:o,url:r,status_code:null}),t.apply(this,arguments)}},o),F(n,"send",function(t){return function(o){var n=this;function a(){if(n.__raven_xhr&&4===n.readyState){try{n.__raven_xhr.status_code=n.status}catch(e){}e.captureBreadcrumb({type:"http",category:"xhr",data:n.__raven_xhr})}}for(var l=["onload","onerror","onprogress"],i=0;i<l.length;i++)r(l[i],n);return"onreadystatechange"in n&&f(n.onreadystatechange)?F(n,"onreadystatechange",function(t){return e.wrap(t,void 0,a)}):n.onreadystatechange=a,t.apply(this,arguments)}},o)}t.xhr&&"fetch"in j&&F(j,"fetch",function(t){return function(o,r){for(var n=new Array(arguments.length),a=0;a<n.length;++a)n[a]=arguments[a];var l,i=n[0],s="GET";"string"==typeof i?l=i:"Request"in j&&i instanceof j.Request?(l=i.url,i.method&&(s=i.method)):l=""+i,n[1]&&n[1].method&&(s=n[1].method);var c={method:s,url:l,status_code:null};return e.captureBreadcrumb({type:"http",category:"fetch",data:c}),t.apply(this,n).then(function(e){return c.status_code=e.status,e})}},o),t.dom&&this._hasDocument&&(R.addEventListener?(R.addEventListener("click",e._breadcrumbEventHandler("click"),!1),R.addEventListener("keypress",e._keypressEventHandler(),!1)):(R.attachEvent("onclick",e._breadcrumbEventHandler("click")),R.attachEvent("onkeypress",e._keypressEventHandler())));var a=j.chrome,l=!(a&&a.app&&a.app.runtime)&&j.history&&history.pushState&&history.replaceState;if(t.location&&l){var i=j.onpopstate;j.onpopstate=function(){var t=e._location.href;if(e._captureUrlChange(e._lastHref,t),i)return i.apply(this,arguments)};var s=function(t){return function(){var o=arguments.length>2?arguments[2]:void 0;return o&&e._captureUrlChange(e._lastHref,o+""),t.apply(this,arguments)}};F(history,"pushState",s,o),F(history,"replaceState",s,o)}if(t.console&&"console"in j&&console.log){var c=function(t,o){e.captureBreadcrumb({message:t,level:o.level,category:"console"})};h(["debug","info","warn","error","log"],function(e,t){T(console,t,c)})}},_restoreBuiltIns:function(){for(var e;this._wrappedBuiltIns.length;){var t=(e=this._wrappedBuiltIns.shift())[0],o=e[1],r=e[2];t[o]=r}},_drainPlugins:function(){var e=this;h(this._plugins,function(t,o){var r=o[0],n=o[1];r.apply(e,[e].concat(n))})},_parseDSN:function(e){var t=L.exec(e),o={},r=7;try{for(;r--;)o[k[r]]=t[r]||""}catch(t){throw new a("Invalid DSN: "+e)}if(o.pass&&!this._globalOptions.allowSecretKey)throw new a("Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key");return o},_getGlobalServer:function(e){var t="//"+e.host+(e.port?":"+e.port:"");return e.protocol&&(t=e.protocol+":"+t),t},_handleOnErrorStackInfo:function(){this._ignoreOnError||this._handleStackInfo.apply(this,arguments)},_handleStackInfo:function(e,t){var o=this._prepareFrames(e,t);this._triggerEvent("handle",{stackInfo:e,options:t}),this._processException(e.name,e.message,e.url,e.lineno,o,t)},_prepareFrames:function(e,t){var o=this,r=[];if(e.stack&&e.stack.length&&(h(e.stack,function(t,n){var a=o._normalizeFrame(n,e.url);a&&r.push(a)}),t&&t.trimHeadFrames))for(var n=0;n<t.trimHeadFrames&&n<r.length;n++)r[n].in_app=!1;return r=r.slice(0,this._globalOptions.stackTraceLimit)},_normalizeFrame:function(e,t){var o={filename:e.url,lineno:e.line,colno:e.column,function:e.func||"?"};return e.url||(o.filename=t),o.in_app=!(this._globalOptions.includePaths.test&&!this._globalOptions.includePaths.test(o.filename)||/(Raven|TraceKit)\./.test(o.function)||/raven\.(min\.)?js$/.test(o.filename)),o},_processException:function(e,t,o,r,n,a){var l,i=(e?e+": ":"")+(t||"");if((!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(t)&&!this._globalOptions.ignoreErrors.test(i))&&(n&&n.length?(o=n[0].filename||o,n.reverse(),l={frames:n}):o&&(l={frames:[{filename:o,lineno:r,in_app:!0}]}),(!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(o))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(o)))){var s=b({exception:{values:[{type:e,value:t,stacktrace:l}]},culprit:o},a);this._send(s)}},_trimPacket:function(e){var t=this._globalOptions.maxMessageLength;if(e.message&&(e.message=m(e.message,t)),e.exception){var o=e.exception.values[0];o.value=m(o.value,t)}var r=e.request;return r&&(r.url&&(r.url=m(r.url,this._globalOptions.maxUrlLength)),r.Referer&&(r.Referer=m(r.Referer,this._globalOptions.maxUrlLength))),e.breadcrumbs&&e.breadcrumbs.values&&this._trimBreadcrumbs(e.breadcrumbs),e},_trimBreadcrumbs:function(e){for(var t,o,r,n=["to","from","url"],a=0;a<e.values.length;++a)if((o=e.values[a]).hasOwnProperty("data")&&s(o.data)&&!y(o.data)){r=b({},o.data);for(var l=0;l<n.length;++l)t=n[l],r.hasOwnProperty(t)&&r[t]&&(r[t]=m(r[t],this._globalOptions.maxUrlLength));e.values[a].data=r}},_getHttpData:function(){if(this._hasNavigator||this._hasDocument){var e={};return this._hasNavigator&&I.userAgent&&(e.headers={"User-Agent":navigator.userAgent}),this._hasDocument&&(R.location&&R.location.href&&(e.url=R.location.href),R.referrer&&(e.headers||(e.headers={}),e.headers.Referer=R.referrer)),e}},_resetBackoff:function(){this._backoffDuration=0,this._backoffStart=null},_shouldBackoff:function(){return this._backoffDuration&&O()-this._backoffStart<this._backoffDuration},_isRepeatData:function(e){var t=this._lastData;return!(!t||e.message!==t.message||e.culprit!==t.culprit)&&(e.stacktrace||t.stacktrace?w(e.stacktrace,t.stacktrace):!e.exception&&!t.exception||C(e.exception,t.exception))},_setBackoffState:function(e){if(!this._shouldBackoff()){var t=e.status;if(400===t||401===t||429===t){var o;try{o=e.getResponseHeader("Retry-After"),o=1e3*parseInt(o,10)}catch(e){}this._backoffDuration=o||(2*this._backoffDuration||1e3),this._backoffStart=O()}}},_send:function(e){var t=this._globalOptions,o={project:this._globalProject,logger:t.logger,platform:"javascript"},r=this._getHttpData();r&&(o.request=r),e.trimHeadFrames&&delete e.trimHeadFrames,(e=b(o,e)).tags=b(b({},this._globalContext.tags),e.tags),e.extra=b(b({},this._globalContext.extra),e.extra),e.extra["session:duration"]=O()-this._startTime,this._breadcrumbs&&this._breadcrumbs.length>0&&(e.breadcrumbs={values:[].slice.call(this._breadcrumbs,0)}),d(e.tags)&&delete e.tags,this._globalContext.user&&(e.user=this._globalContext.user),t.environment&&(e.environment=t.environment),t.release&&(e.release=t.release),t.serverName&&(e.server_name=t.serverName),f(t.dataCallback)&&(e=t.dataCallback(e)||e),e&&!d(e)&&(f(t.shouldSendCallback)&&!t.shouldSendCallback(e)||(this._shouldBackoff()?this._logDebug("warn","Raven dropped error due to backoff: ",e):"number"==typeof t.sampleRate?Math.random()<t.sampleRate&&this._sendProcessedPayload(e):this._sendProcessedPayload(e)))},_getUuid:function(){return S()},_sendProcessedPayload:function(e,t){var o=this,r=this._globalOptions;if(this.isSetup())if(e=this._trimPacket(e),this._globalOptions.allowDuplicates||!this._isRepeatData(e)){this._lastEventId=e.event_id||(e.event_id=this._getUuid()),this._lastData=e,this._logDebug("debug","Raven about to send:",e);var n={sentry_version:"7",sentry_client:"raven-js/"+this.VERSION,sentry_key:this._globalKey};this._globalSecret&&(n.sentry_secret=this._globalSecret);var a=e.exception&&e.exception.values[0];this.captureBreadcrumb({category:"sentry",message:a?(a.type?a.type+": ":"")+a.value:e.message,event_id:e.event_id,level:e.level||"error"});var l=this._globalEndpoint;(r.transport||this._makeRequest).call(this,{url:l,auth:n,data:e,options:r,onSuccess:function(){o._resetBackoff(),o._triggerEvent("success",{data:e,src:l}),t&&t()},onError:function(r){o._logDebug("error","Raven transport failed to send: ",r),r.request&&o._setBackoffState(r.request),o._triggerEvent("failure",{data:e,src:l}),r=r||new Error("Raven send failed (no additional details provided)"),t&&t(r)}})}else this._logDebug("warn","Raven dropped repeat event: ",e)},_makeRequest:function(e){var t=j.XMLHttpRequest&&new j.XMLHttpRequest;if(t&&("withCredentials"in t||"undefined"!=typeof XDomainRequest)){var o=e.url;"withCredentials"in t?t.onreadystatechange=function(){if(4===t.readyState)if(200===t.status)e.onSuccess&&e.onSuccess();else if(e.onError){var o=new Error("Sentry error code: "+t.status);o.request=t,e.onError(o)}}:(t=new XDomainRequest,o=o.replace(/^https?:/,""),e.onSuccess&&(t.onload=e.onSuccess),e.onError&&(t.onerror=function(){var o=new Error("Sentry error code: XDomainRequest");o.request=t,e.onError(o)})),t.open("POST",o+"?"+_(e.auth)),t.send(n(e.data))}},_logDebug:function(e){this._originalConsoleMethods[e]&&this.debug&&Function.prototype.apply.call(this._originalConsoleMethods[e],this._originalConsole,[].slice.call(arguments,1))},_mergeContext:function(e,t){u(t)?delete this._globalContext[e]:this._globalContext[e]=b(this._globalContext[e]||{},t)}},M.prototype.setUser=M.prototype.setUserContext,M.prototype.setReleaseContext=M.prototype.setRelease,e.exports=M}).call(this,o(1))},function(e,t,o){(function(t){var r=o(2),n={collectWindowErrors:!0,debug:!1},a="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},l=[].slice,i="?",s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function c(){return"undefined"==typeof document||null==document.location?"":document.location.href}n.report=function(){var e,t,o=[],u=null,f=null,p=null;function d(e,t){var r=null;if(!t||n.collectWindowErrors){for(var a in o)if(o.hasOwnProperty(a))try{o[a].apply(null,[e].concat(l.call(arguments,2)))}catch(e){r=e}if(r)throw r}}function h(t,o,a,l,u){if(p)n.computeStackTrace.augmentStackTraceWithInitialElement(p,o,a,t),b();else if(u&&r.isError(u))d(n.computeStackTrace(u),!0);else{var f,h={url:o,line:a,column:l},m=void 0,y=t;if("[object String]"==={}.toString.call(t))(f=t.match(s))&&(m=f[1],y=f[2]);h.func=i,d({name:m,message:y,url:c(),stack:[h]},!0)}return!!e&&e.apply(this,arguments)}function b(){var e=p,t=u;u=null,p=null,f=null,d.apply(null,[e,!1].concat(t))}function m(e,t){var o=l.call(arguments,1);if(p){if(f===e)return;b()}var r=n.computeStackTrace(e);if(p=r,f=e,u=o,setTimeout(function(){f===e&&b()},r.incomplete?2e3:0),!1!==t)throw e}return m.subscribe=function(r){t||(e=a.onerror,a.onerror=h,t=!0),o.push(r)},m.unsubscribe=function(e){for(var t=o.length-1;t>=0;--t)o[t]===e&&o.splice(t,1)},m.uninstall=function(){t&&(a.onerror=e,t=!1,e=void 0),o=[]},m}(),n.computeStackTrace=function(){function e(e){if(void 0!==e.stack&&e.stack){for(var t,o,r,n=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,a=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,l=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,s=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,u=/\((\S*)(?::(\d+))(?::(\d+))\)/,f=e.stack.split("\n"),p=[],d=(/^(.*) is undefined$/.exec(e.message),0),h=f.length;d<h;++d){if(o=n.exec(f[d])){var b=o[2]&&0===o[2].indexOf("native");o[2]&&0===o[2].indexOf("eval")&&(t=u.exec(o[2]))&&(o[2]=t[1],o[3]=t[2],o[4]=t[3]),r={url:b?null:o[2],func:o[1]||i,args:b?[o[2]]:[],line:o[3]?+o[3]:null,column:o[4]?+o[4]:null}}else if(o=l.exec(f[d]))r={url:o[2],func:o[1]||i,args:[],line:+o[3],column:o[4]?+o[4]:null};else{if(!(o=a.exec(f[d])))continue;o[3]&&o[3].indexOf(" > eval")>-1&&(t=s.exec(o[3]))?(o[3]=t[1],o[4]=t[2],o[5]=null):0!==d||o[5]||void 0===e.columnNumber||(p[0].column=e.columnNumber+1),r={url:o[3],func:o[1]||i,args:o[2]?o[2].split(","):[],line:o[4]?+o[4]:null,column:o[5]?+o[5]:null}}!r.func&&r.line&&(r.func=i),p.push(r)}return p.length?{name:e.name,message:e.message,url:c(),stack:p}:null}}function t(e,t,o,r){var n={url:t,line:o};if(n.url&&n.line){if(e.incomplete=!1,n.func||(n.func=i),e.stack.length>0&&e.stack[0].url===n.url){if(e.stack[0].line===n.line)return!1;if(!e.stack[0].line&&e.stack[0].func===n.func)return e.stack[0].line=n.line,!1}return e.stack.unshift(n),e.partial=!0,!0}return e.incomplete=!0,!1}function o(e,a){for(var l,s,u=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,f=[],p={},d=!1,h=o.caller;h&&!d;h=h.caller)if(h!==r&&h!==n.report){if(s={url:null,func:i,line:null,column:null},h.name?s.func=h.name:(l=u.exec(h.toString()))&&(s.func=l[1]),void 0===s.func)try{s.func=l.input.substring(0,l.input.indexOf("{"))}catch(e){}p[""+h]?d=!0:p[""+h]=!0,f.push(s)}a&&f.splice(0,a);var b={name:e.name,message:e.message,url:c(),stack:f};return t(b,e.sourceURL||e.fileName,e.line||e.lineNumber,e.message||e.description),b}function r(t,r){var a=null;r=null==r?0:+r;try{if(a=e(t))return a}catch(e){if(n.debug)throw e}try{if(a=o(t,r+1))return a}catch(e){if(n.debug)throw e}return{name:t.name,message:t.message,url:c()}}return r.augmentStackTraceWithInitialElement=t,r.computeStackTraceFromStackProp=e,r}(),e.exports=n}).call(this,o(1))},function(e,t){function o(e,t){for(var o=0;o<e.length;++o)if(e[o]===t)return o;return-1}function r(e,t){var r=[],n=[];return null==t&&(t=function(e,t){return r[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,o(r,t)).join(".")+"]"}),function(a,l){if(r.length>0){var i=o(r,this);~i?r.splice(i+1):r.push(this),~i?n.splice(i,1/0,a):n.push(a),~o(r,l)&&(l=t.call(this,a,l))}else r.push(l);return null==e?l instanceof Error?function(e){var t={stack:e.stack,message:e.message,name:e.name};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}(l):l:e.call(this,a,l)}}(e.exports=function(e,t,o,n){return JSON.stringify(e,r(t,n),o)}).getSerialize=r},function(e,t){function o(e){this.name="RavenConfigError",this.message=e}o.prototype=new Error,o.prototype.constructor=o,e.exports=o},function(e,t){e.exports={wrapMethod:function(e,t,o){var r=e[t],n=e;if(t in e){var a="warn"===t?"warning":t;e[t]=function(){var e=[].slice.call(arguments),l=""+e.join(" "),i={level:a,logger:"console",extra:{arguments:e}};"assert"===t?!1===e[0]&&(l="Assertion failed: "+(e.slice(1).join(" ")||"console.assert"),i.extra.arguments=e.slice(1),o&&o(l,i)):o&&o(l,i),r&&Function.prototype.apply.call(r,n,e)}}}}},function(e,t,o){"use strict";o.r(t);var r=o(0),n=o.n(r),a=window.leadinConfig,l=a.adminUrl,i=a.ajaxUrl,s=a.env,c=a.hubspotBaseUrl,u=a.leadinPluginVersion,f=a.plugins,p=a.phpVersion,d=a.portalId,h=a.theme,b=a.wpVersion,m=window.leadinI18n;var y=n.a;function g(){var e=document.getElementById("toplevel_page_leadin"),t=e&&e.querySelector(".wp-first-item"),o="".concat(c,"/chatflows/").concat(d),r='<li><a href="'.concat(o,'" target="_blank">').concat(m.chatflows,"</a></li>");t&&t.insertAdjacentHTML("afterend",r)}function v(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _(){try{if(window.localStorage.LEADIN_DEBUG){for(var e,t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];o.unshift("[Leadin]"),(e=console).log.apply(e,o)}}catch(e){}}var S={iframe:"#leadin-iframe",allMenuButtons:".toplevel_page_leadin > a, .toplevel_page_leadin > ul > li > a",subMenuButtons:".toplevel_page_leadin > ul > li"},x=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bus=jQuery({})}var t,o,r;return t=e,(o=[{key:"trigger",value:function(){var e;(e=this.bus).trigger.apply(e,arguments)}},{key:"on",value:function(e,t){this.bus.on(e,y.wrap(t))}}])&&v(t.prototype,o),r&&v(t,r),e}()),C=[];function w(e){_("Posting message"),_(JSON.stringify(e)),jQuery(S.iframe)[0].contentWindow.postMessage(JSON.stringify(e),c)}function E(e,t){t||(t="Message Received");var o=Object.assign({},e);o.response=t,w(o)}function F(e){_("Received message"),_(JSON.stringify(e)),e.response&&e._callbackId?function(e){C[e._callbackId-1](e.response)}(e):Object.keys(e).forEach(function(t){x.trigger(t,[e[t],E.bind(null,e)])})}function T(e){if(e.origin===c)try{F(JSON.parse(e.data))}catch(e){}}function k(e,t,o,r,n){var a={url:"".concat(i,"?action=").concat(e),method:t,contentType:"application/json",success:"function"==typeof r?y.wrap(function(e){return r(JSON.parse(e))}):void 0,error:y.wrap(function(e){var t;try{t=JSON.parse(e.responseText).error}catch(o){t=e.responseText}y.captureMessage("AJAX request failed with code ".concat(e.status,": ").concat(t)),"function"==typeof n&&n()})};o&&(a.data=JSON.stringify(o)),jQuery.ajax(a)}function L(e,t,o,r){return k(e,"POST",t,o,r)}function O(e,t,o){return k(e,"GET",null,t,o)}var j,R=function(){return O("leadin_get_portal")},I=!1;function B(){j=setTimeout(function(){R(function(e){e.portalId?location.reload(!0):I||B()},B)},5e3)}var M=L.bind(null,"leadin_disconnect_ajax",{}),N=O.bind(null,"leadin_get_domain"),z=O.bind(null,"leadin_mark_outdated");function D(e){return function(e,t){x.on(e,function(){for(var e=arguments.length,o=new Array(e),r=0;r<e;r++)o[r]=arguments[r];t.apply(null,o.slice(1))})}.bind(null,e)}var U=D("leadin_clear_query_param"),P=D("leadin_connect_portal"),H=D("leadin_disable_navigation"),A=D("leadin_disconnect_portal"),q=D("leadin_enter_fullscreen"),J=D("leadin_exit_fullscreen"),W=D("leadin_get_assets_payload"),K=D("leadin_get_wp_domain"),$=D("leadin_init_navigation"),X=D("leadin_interframe_ready"),Q=D("leadin_mark_outdated"),G=D("leadin_page_reload"),V=D("leadin_upgrade");function Z(e){!function(e,t,o,r,n){n||(n=500);var a=setTimeout(y.wrap(function(){y.captureMessage("LeadinWordpressPlugin postMessage response timeout on message key: ".concat(e)),r()}),n),l={};l[e]=t,l._callbackId=C.push(function(){clearTimeout(a),o.apply(void 0,arguments)}),w(l)}("leadin_change_route",e,null,function(){return location.reload(!0)})}function Y(){function e(){Z(window.location.search.match(/page=leadin_?(\w*)/)[1]),function(){jQuery(S.subMenuButtons).removeClass("current");var e=window.location.search.match(/\?page=leadin_?\w*/)[0];jQuery('a[href="admin.php'.concat(e,'"]')).parent().addClass("current")}()}window.addEventListener("popstate",e),jQuery(S.allMenuButtons).click(function(){event.metaKey||event.altKey||event.shiftKey||(window.history.pushState(null,null,jQuery(this).attr("href")),e(),event.preventDefault())})}var ee={"genesis-sample":{formsStyle:{fontFamily:"Source Sans Pro",labelTextColor:"#333333",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#0073e5"},chatStyle:{accentColor:"#0073e5"},onScrollLeadFlowStyle:{color:"#0073e5"},onExitLeadFlowStyle:{color:"#0073e5"}},"academy-pro":{formsStyle:{fontFamily:"PT Sans",labelTextColor:"#222222",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#e22c2f"},chatStyle:{accentColor:"#e22c2f"},onScrollLeadFlowStyle:{color:"#e22c2f"},onExitLeadFlowStyle:{color:"#e22c2f"}},"agency-pro":{formsStyle:{fontFamily:"EB Garamond",labelTextColor:"#666666",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#d7c603"},chatStyle:{accentColor:"#d7c603"},onScrollLeadFlowStyle:{color:"#d7c603"},onExitLeadFlowStyle:{color:"#d7c603"}},"agentpress-pro":{formsStyle:{fontFamily:"Roboto",labelTextColor:"#1a212b",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#d23836"},chatStyle:{accentColor:"#d23836"},onScrollLeadFlowStyle:{color:"#d23836"},onExitLeadFlowStyle:{color:"#d23836"}},"altitude-pro":{formsStyle:{fontFamily:"Ek Mukta",labelTextColor:"#000000",labelTextSize:"20px",submitFontColor:"#ffffff",submitColor:"#079bc4"},chatStyle:{accentColor:"#079bc4"},onScrollLeadFlowStyle:{color:"#079bc4"},onExitLeadFlowStyle:{color:"#079bc4"}},"ambiance-pro":{formsStyle:{fontFamily:"Merriweather",labelTextColor:"#333333",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#e12727"},chatStyle:{accentColor:"#e12727"},onScrollLeadFlowStyle:{color:"#e12727"},onExitLeadFlowStyle:{color:"#e12727"}},"atmosphere-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#333333",labelTextSize:"20px",submitFontColor:"#ffffff",submitColor:"#333333"},chatStyle:{accentColor:"#333333"},onScrollLeadFlowStyle:{color:"#333333"},onExitLeadFlowStyle:{color:"#333333"}},"author-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#000000",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#000000"},chatStyle:{accentColor:"#000000"},onScrollLeadFlowStyle:{color:"#000000"},onExitLeadFlowStyle:{color:"#000000"}},"authority-pro":{formsStyle:{fontFamily:"Libre Baskerville",labelTextColor:"#333333",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#000cff"},chatStyle:{accentColor:"#000cff"},onScrollLeadFlowStyle:{color:"#000cff"},onExitLeadFlowStyle:{color:"#000cff"}},"beautiful-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#666666",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#e5554e"},chatStyle:{accentColor:"#e5554e"},onScrollLeadFlowStyle:{color:"#e5554e"},onExitLeadFlowStyle:{color:"#e5554e"}},"breakthrough-pro":{formsStyle:{fontFamily:"Alegreya Sans",labelTextColor:"#4e4756",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#4a4f9b"},chatStyle:{accentColor:"#4a4f9b"},onScrollLeadFlowStyle:{color:"#4a4f9b"},onExitLeadFlowStyle:{color:"#4a4f9b"}},"cafe-pro":{formsStyle:{fontFamily:"Crimson Text",labelTextColor:"#000000",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#000000"},chatStyle:{accentColor:"#000000"},onScrollLeadFlowStyle:{color:"#000000"},onExitLeadFlowStyle:{color:"#000000"}},"daily-dish-pro":{formsStyle:{fontFamily:"Cormorant",labelTextColor:"#000000",labelTextSize:"20px",submitFontColor:"#ffffff",submitColor:"#d9037f"},chatStyle:{accentColor:"#d9037f"},onScrollLeadFlowStyle:{color:"#d9037f"},onExitLeadFlowStyle:{color:"#d9037f"}},"digital-pro":{formsStyle:{fontFamily:"Lora",labelTextColor:"#5b5e5e",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#e85555"},chatStyle:{accentColor:"#e85555"},onScrollLeadFlowStyle:{color:"#e85555"},onExitLeadFlowStyle:{color:"#e85555"}},"education-pro":{formsStyle:{fontFamily:"Roboto Condensed",labelTextColor:"#444444",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#78a7c8"},chatStyle:{accentColor:"#78a7c8"},onScrollLeadFlowStyle:{color:"#78a7c8"},onExitLeadFlowStyle:{color:"#78a7c8"}},"eleven40-pro":{formsStyle:{fontFamily:"Lora",labelTextColor:"#000000",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#ed702b"},chatStyle:{accentColor:"#ed702b"},onScrollLeadFlowStyle:{color:"#ed702b"},onExitLeadFlowStyle:{color:"#ed702b"}},"enterprise-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#777777",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#31b2ed"},chatStyle:{accentColor:"#31b2ed"},onScrollLeadFlowStyle:{color:"#31b2ed"},onExitLeadFlowStyle:{color:"#31b2ed"}},"essence-pro":{formsStyle:{fontFamily:"Alegreya Sans",labelTextColor:"#333333",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#be8100"},chatStyle:{accentColor:"#be8100"},onScrollLeadFlowStyle:{color:"#be8100"},onExitLeadFlowStyle:{color:"#be8100"}},"executive-pro":{formsStyle:{fontFamily:"Open Sans",labelTextColor:"#222222",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#64c9ea"},chatStyle:{accentColor:"#64c9ea"},onScrollLeadFlowStyle:{color:"#64c9ea"},onExitLeadFlowStyle:{color:"#64c9ea"}},"generate-pro":{formsStyle:{fontFamily:"Source Sans Pro",labelTextColor:"#222222",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#eb232f"},chatStyle:{accentColor:"#eb232f"},onScrollLeadFlowStyle:{color:"#eb232f"},onExitLeadFlowStyle:{color:"#eb232f"}},"infinity-pro":{formsStyle:{fontFamily:"Cormorant Garamond",labelTextColor:"#000000",labelTextSize:"22px",submitFontColor:"#ffffff",submitColor:"#d43c67"},chatStyle:{accentColor:"#d43c67"},onScrollLeadFlowStyle:{color:"#d43c67"},onExitLeadFlowStyle:{color:"#d43c67"}},"interior-pro":{formsStyle:{fontFamily:"Lora",labelTextColor:"#777777",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#009092"},chatStyle:{accentColor:"#009092"},onScrollLeadFlowStyle:{color:"#009092"},onExitLeadFlowStyle:{color:"#009092"}},"lifestyle-pro":{formsStyle:{fontFamily:"Droid Sans",labelTextColor:"#767673",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#27968b"},chatStyle:{accentColor:"#27968b"},onScrollLeadFlowStyle:{color:"#27968b"},onExitLeadFlowStyle:{color:"#27968b"}},"magazine-pro":{formsStyle:{fontFamily:"Roboto",labelTextColor:"#222222",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#008285"},chatStyle:{accentColor:"#008285"},onScrollLeadFlowStyle:{color:"#008285"},onExitLeadFlowStyle:{color:"#008285"}},"metro-pro":{formsStyle:{fontFamily:"Helvetica Neue",labelTextColor:"#222222",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#f96e5b"},chatStyle:{accentColor:"#f96e5b"},onScrollLeadFlowStyle:{color:"#f96e5b"},onExitLeadFlowStyle:{color:"#f96e5b"}},"minimum-pro":{formsStyle:{fontFamily:"Roboto Slab",labelTextColor:"#333333",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#0ebfe9"},chatStyle:{accentColor:"#0ebfe9"},onScrollLeadFlowStyle:{color:"#0ebfe9"},onExitLeadFlowStyle:{color:"#0ebfe9"}},"modern-studio-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#000000",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#000000"},chatStyle:{accentColor:"#000000"},onScrollLeadFlowStyle:{color:"#000000"},onExitLeadFlowStyle:{color:"#000000"}},"monochrome-pro":{formsStyle:{fontFamily:"Muli",labelTextColor:"#000000",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#0066cc"},chatStyle:{accentColor:"#0066cc"},onScrollLeadFlowStyle:{color:"#0066cc"},onExitLeadFlowStyle:{color:"#0066cc"}},"news-pro":{formsStyle:{fontFamily:"Raleway",labelTextColor:"#666666",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#ff0000"},chatStyle:{accentColor:"#ff0000"},onScrollLeadFlowStyle:{color:"#ff0000"},onExitLeadFlowStyle:{color:"#ff0000"}},"no-sidebar-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#333333",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#333333"},chatStyle:{accentColor:"#333333"},onScrollLeadFlowStyle:{color:"#333333"},onExitLeadFlowStyle:{color:"#333333"}},"outfitter-pro":{formsStyle:{fontFamily:"Noto Sans",labelTextColor:"#546e7a",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#000000"},chatStyle:{accentColor:"#000000"},onScrollLeadFlowStyle:{color:"#000000"},onExitLeadFlowStyle:{color:"#000000"}},"outreach-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#333333",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#6ab446"},chatStyle:{accentColor:"#6ab446"},onScrollLeadFlowStyle:{color:"#6ab446"},onExitLeadFlowStyle:{color:"#6ab446"}},"parallax-pro":{formsStyle:{fontFamily:"Cormorant Garamond",labelTextColor:"#000000",labelTextSize:"22px",submitFontColor:"#ffffff",submitColor:"#00a0af"},chatStyle:{accentColor:"#00a0af"},onScrollLeadFlowStyle:{color:"#00a0af"},onExitLeadFlowStyle:{color:"#00a0af"}},"revolution-pro":{formsStyle:{fontFamily:"Noto Serif SC",labelTextColor:"#000000",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#008080"},chatStyle:{accentColor:"#008080"},onScrollLeadFlowStyle:{color:"#008080"},onExitLeadFlowStyle:{color:"#008080"}},"sixteen-nine-pro":{formsStyle:{fontFamily:"Roboto",labelTextColor:"#000000",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#1dbec0"},chatStyle:{accentColor:"#1dbec0"},onScrollLeadFlowStyle:{color:"#1dbec0"},onExitLeadFlowStyle:{color:"#1dbec0"}},"smart-passive-income-pro":{formsStyle:{fontFamily:"Roboto",labelTextColor:"#333333",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#0e763c"},chatStyle:{accentColor:"#0e763c"},onScrollLeadFlowStyle:{color:"#0e763c"},onExitLeadFlowStyle:{color:"#0e763c"}},"wellness-pro":{formsStyle:{fontFamily:"Open Sans",labelTextColor:"#000000",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#5da44f"},chatStyle:{accentColor:"#5da44f"},onScrollLeadFlowStyle:{color:"#5da44f"},onExitLeadFlowStyle:{color:"#5da44f"}},"workstation-pro":{formsStyle:{fontFamily:"Baskerville",labelTextColor:"#222222",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#ff4800"},chatStyle:{accentColor:"#ff4800"},onScrollLeadFlowStyle:{color:"#ff4800"},onExitLeadFlowStyle:{color:"#ff4800"}}};X(function(e,t){t("Interframe Ready")}),P(function(e,t){!function(e,t,o){L("leadin_registration_ajax",{portalId:e},t,o)}(e,function(){clearTimeout(j),I=!0,t({success:!0})},t.bind(null,{success:!1}))}),A(function(e,t){M(t.bind(null,{success:!0}),t.bind(null,{success:!1}))}),Q(function(e,t){z(t)}),V(function(e,t){t(),location.href="".concat(l,"plugins.php")}),G(function(e,t){t(),window.location.reload(!0)}),$(function(e,t){t(),Y()}),H(function(e,t){t(),jQuery(S.allMenuButtons).off("click")}),U(function(e,t){t();var o=window.location.toString();o.indexOf("?")>0&&(o=o.substring(0,o.indexOf("?")));var r="".concat(o,"?page=leadin");window.history.pushState({},"",r)}),K(function(e,t){N(function(e){e.domain&&t(e.domain)})}),W(function(e,t){t({payload:ee[h]})}),q(function(e,t){t(),jQuery(S.iframe).addClass("leadin-iframe-fullscreen")}),J(function(e,t){t(),jQuery(S.iframe).removeClass("leadin-iframe-fullscreen")}),"prod"===s&&(n.a.config("https://e9b8f382cdd130c0d415cd977d2be56f@exceptions.hubspot.com/1",{instrument:{tryCatch:!1}}).install(),n.a.setTagsContext({leadin:u,php:p,wordpress:b}),n.a.setUserContext({hub:d,plugins:Object.keys(f).map(function(e){return"".concat(e,"#").concat(f[e].Version)}).join(",")})),y.context(function(){window.addEventListener("message",T),-1!==window.location.search.indexOf("page=leadin")&&(d||B()),jQuery(document).ready(g)})}]);
|
2 |
//# sourceMappingURL=leadin.js.map
|
1 |
+
!function(e){var t={};function o(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=t,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=8)}([function(e,t,o){(function(t){var r=o(3),n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},a=n.Raven,l=new r;l.noConflict=function(){return n.Raven=a,l},l.afterLoad(),e.exports=l}).call(this,o(1))},function(e,t){var o;o=function(){return this}();try{o=o||new Function("return this")()}catch(e){"object"==typeof window&&(o=window)}e.exports=o},function(e,t,o){(function(t){var o="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};function r(e){return void 0===e}function n(e){return"[object String]"===Object.prototype.toString.call(e)}function a(){try{return new ErrorEvent(""),!0}catch(e){return!1}}function l(e,t){var o,n;if(r(e.length))for(o in e)i(e,o)&&t.call(null,o,e[o]);else if(n=e.length)for(o=0;o<n;o++)t.call(null,o,e[o])}function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function s(e){var t,o,r,a,l,i=[];if(!e||!e.tagName)return"";if(i.push(e.tagName.toLowerCase()),e.id&&i.push("#"+e.id),(t=e.className)&&n(t))for(o=t.split(/\s+/),l=0;l<o.length;l++)i.push("."+o[l]);var s=["type","name","title","alt"];for(l=0;l<s.length;l++)r=s[l],(a=e.getAttribute(r))&&i.push("["+r+'="'+a+'"]');return i.join("")}function c(e,t){return!!(!!e^!!t)}function u(e,t){if(c(e,t))return!1;var o,r,n=e.frames,a=t.frames;if(n.length!==a.length)return!1;for(var l=0;l<n.length;l++)if(o=n[l],r=a[l],o.filename!==r.filename||o.lineno!==r.lineno||o.colno!==r.colno||o.function!==r.function)return!1;return!0}e.exports={isObject:function(e){return"object"==typeof e&&null!==e},isError:function(e){switch({}.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return e instanceof Error}},isErrorEvent:function(e){return a()&&"[object ErrorEvent]"==={}.toString.call(e)},isUndefined:r,isFunction:function(e){return"function"==typeof e},isString:n,isEmptyObject:function(e){for(var t in e)return!1;return!0},supportsErrorEvent:a,wrappedCallback:function(e){return function(t,o){var r=e(t)||t;return o&&o(r)||r}},each:l,objectMerge:function(e,t){return t?(l(t,function(t,o){e[t]=o}),e):e},truncate:function(e,t){return!t||e.length<=t?e:e.substr(0,t)+"…"},objectFrozen:function(e){return!!Object.isFrozen&&Object.isFrozen(e)},hasKey:i,joinRegExp:function(e){for(var t,o=[],r=0,a=e.length;r<a;r++)n(t=e[r])?o.push(t.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):t&&t.source&&o.push(t.source);return new RegExp(o.join("|"),"i")},urlencode:function(e){var t=[];return l(e,function(e,o){t.push(encodeURIComponent(e)+"="+encodeURIComponent(o))}),t.join("&")},uuid4:function(){var e=o.crypto||o.msCrypto;if(!r(e)&&e.getRandomValues){var t=new Uint16Array(8);e.getRandomValues(t),t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;var n=function(e){for(var t=e.toString(16);t.length<4;)t="0"+t;return t};return n(t[0])+n(t[1])+n(t[2])+n(t[3])+n(t[4])+n(t[5])+n(t[6])+n(t[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},htmlTreeAsString:function(e){for(var t,o=[],r=0,n=0,a=" > ".length;e&&r++<5&&!("html"===(t=s(e))||r>1&&n+o.length*a+t.length>=80);)o.push(t),n+=t.length,e=e.parentNode;return o.reverse().join(" > ")},htmlElementAsString:s,isSameException:function(e,t){return!c(e,t)&&(e=e.values[0],t=t.values[0],e.type===t.type&&e.value===t.value&&u(e.stacktrace,t.stacktrace))},isSameStacktrace:u,parseUrl:function(e){var t=e.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};var o=t[6]||"",r=t[8]||"";return{protocol:t[2],host:t[4],path:t[5],relative:t[5]+o+r}},fill:function(e,t,o,r){var n=e[t];e[t]=o(n),r&&r.push([e,t,n])}}}).call(this,o(1))},function(e,t,o){(function(t){var r=o(4),n=o(5),a=o(6),l=o(2),i=l.isError,s=l.isObject,c=(s=l.isObject,l.isErrorEvent),u=l.isUndefined,f=l.isFunction,p=l.isString,d=l.isEmptyObject,h=l.each,b=l.objectMerge,m=l.truncate,y=l.objectFrozen,g=l.hasKey,v=l.joinRegExp,_=l.urlencode,S=l.uuid4,x=l.htmlTreeAsString,C=l.isSameException,w=l.isSameStacktrace,E=l.parseUrl,F=l.fill,T=o(7).wrapMethod,k="source protocol user pass host port path".split(" "),L=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;function O(){return+new Date}var j="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},R=j.document,I=j.navigator;function B(e,t){return f(t)?function(o){return t(o,e)}:t}function N(){for(var e in this._hasJSON=!("object"!=typeof JSON||!JSON.stringify),this._hasDocument=!u(R),this._hasNavigator=!u(I),this._lastCapturedException=null,this._lastData=null,this._lastEventId=null,this._globalServer=null,this._globalKey=null,this._globalProject=null,this._globalContext={},this._globalOptions={logger:"javascript",ignoreErrors:[],ignoreUrls:[],whitelistUrls:[],includePaths:[],collectWindowErrors:!0,maxMessageLength:0,maxUrlLength:250,stackTraceLimit:50,autoBreadcrumbs:!0,instrument:!0,sampleRate:1},this._ignoreOnError=0,this._isRavenInstalled=!1,this._originalErrorStackTraceLimit=Error.stackTraceLimit,this._originalConsole=j.console||{},this._originalConsoleMethods={},this._plugins=[],this._startTime=O(),this._wrappedBuiltIns=[],this._breadcrumbs=[],this._lastCapturedEvent=null,this._keypressTimeout,this._location=j.location,this._lastHref=this._location&&this._location.href,this._resetBackoff(),this._originalConsole)this._originalConsoleMethods[e]=this._originalConsole[e]}N.prototype={VERSION:"3.19.1",debug:!1,TraceKit:r,config:function(e,t){var o=this;if(o._globalServer)return this._logDebug("error","Error: Raven has already been configured"),o;if(!e)return o;var n=o._globalOptions;t&&h(t,function(e,t){"tags"===e||"extra"===e||"user"===e?o._globalContext[e]=t:n[e]=t}),o.setDSN(e),n.ignoreErrors.push(/^Script error\.?$/),n.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/),n.ignoreErrors=v(n.ignoreErrors),n.ignoreUrls=!!n.ignoreUrls.length&&v(n.ignoreUrls),n.whitelistUrls=!!n.whitelistUrls.length&&v(n.whitelistUrls),n.includePaths=v(n.includePaths),n.maxBreadcrumbs=Math.max(0,Math.min(n.maxBreadcrumbs||100,100));var a={xhr:!0,console:!0,dom:!0,location:!0},l=n.autoBreadcrumbs;"[object Object]"==={}.toString.call(l)?l=b(a,l):!1!==l&&(l=a),n.autoBreadcrumbs=l;var i={tryCatch:!0},s=n.instrument;return"[object Object]"==={}.toString.call(s)?s=b(i,s):!1!==s&&(s=i),n.instrument=s,r.collectWindowErrors=!!n.collectWindowErrors,o},install:function(){var e=this;return e.isSetup()&&!e._isRavenInstalled&&(r.report.subscribe(function(){e._handleOnErrorStackInfo.apply(e,arguments)}),e._globalOptions.instrument&&e._globalOptions.instrument.tryCatch&&e._instrumentTryCatch(),e._globalOptions.autoBreadcrumbs&&e._instrumentBreadcrumbs(),e._drainPlugins(),e._isRavenInstalled=!0),Error.stackTraceLimit=e._globalOptions.stackTraceLimit,this},setDSN:function(e){var t=this._parseDSN(e),o=t.path.lastIndexOf("/"),r=t.path.substr(1,o);this._dsn=e,this._globalKey=t.user,this._globalSecret=t.pass&&t.pass.substr(1),this._globalProject=t.path.substr(o+1),this._globalServer=this._getGlobalServer(t),this._globalEndpoint=this._globalServer+"/"+r+"api/"+this._globalProject+"/store/",this._resetBackoff()},context:function(e,t,o){return f(e)&&(o=t||[],t=e,e=void 0),this.wrap(e,t).apply(this,o)},wrap:function(e,t,o){var r=this;if(u(t)&&!f(e))return e;if(f(e)&&(t=e,e=void 0),!f(t))return t;try{if(t.__raven__)return t;if(t.__raven_wrapper__)return t.__raven_wrapper__}catch(e){return t}function n(){var n=[],a=arguments.length,l=!e||e&&!1!==e.deep;for(o&&f(o)&&o.apply(this,arguments);a--;)n[a]=l?r.wrap(e,arguments[a]):arguments[a];try{return t.apply(this,n)}catch(t){throw r._ignoreNextOnError(),r.captureException(t,e),t}}for(var a in t)g(t,a)&&(n[a]=t[a]);return n.prototype=t.prototype,t.__raven_wrapper__=n,n.__raven__=!0,n.__inner__=t,n},uninstall:function(){return r.report.uninstall(),this._restoreBuiltIns(),Error.stackTraceLimit=this._originalErrorStackTraceLimit,this._isRavenInstalled=!1,this},captureException:function(e,t){var o=!i(e),n=!c(e),a=c(e)&&!e.error;if(o&&n||a)return this.captureMessage(e,b({trimHeadFrames:1,stacktrace:!0},t));c(e)&&(e=e.error),this._lastCapturedException=e;try{var l=r.computeStackTrace(e);this._handleStackInfo(l,t)}catch(t){if(e!==t)throw t}return this},captureMessage:function(e,t){if(!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(e)){var o,n=b({message:e+""},t=t||{});try{throw new Error(e)}catch(e){o=e}o.name=null;var a=r.computeStackTrace(o),l=a.stack[1],i=l&&l.url||"";if((!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(i))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(i))){if(this._globalOptions.stacktrace||t&&t.stacktrace){t=b({fingerprint:e,trimHeadFrames:(t.trimHeadFrames||0)+1},t);var s=this._prepareFrames(a,t);n.stacktrace={frames:s.reverse()}}return this._send(n),this}}},captureBreadcrumb:function(e){var t=b({timestamp:O()/1e3},e);if(f(this._globalOptions.breadcrumbCallback)){var o=this._globalOptions.breadcrumbCallback(t);if(s(o)&&!d(o))t=o;else if(!1===o)return this}return this._breadcrumbs.push(t),this._breadcrumbs.length>this._globalOptions.maxBreadcrumbs&&this._breadcrumbs.shift(),this},addPlugin:function(e){var t=[].slice.call(arguments,1);return this._plugins.push([e,t]),this._isRavenInstalled&&this._drainPlugins(),this},setUserContext:function(e){return this._globalContext.user=e,this},setExtraContext:function(e){return this._mergeContext("extra",e),this},setTagsContext:function(e){return this._mergeContext("tags",e),this},clearContext:function(){return this._globalContext={},this},getContext:function(){return JSON.parse(n(this._globalContext))},setEnvironment:function(e){return this._globalOptions.environment=e,this},setRelease:function(e){return this._globalOptions.release=e,this},setDataCallback:function(e){var t=this._globalOptions.dataCallback;return this._globalOptions.dataCallback=B(t,e),this},setBreadcrumbCallback:function(e){var t=this._globalOptions.breadcrumbCallback;return this._globalOptions.breadcrumbCallback=B(t,e),this},setShouldSendCallback:function(e){var t=this._globalOptions.shouldSendCallback;return this._globalOptions.shouldSendCallback=B(t,e),this},setTransport:function(e){return this._globalOptions.transport=e,this},lastException:function(){return this._lastCapturedException},lastEventId:function(){return this._lastEventId},isSetup:function(){return!!this._hasJSON&&(!!this._globalServer||(this.ravenNotConfiguredError||(this.ravenNotConfiguredError=!0,this._logDebug("error","Error: Raven has not been configured.")),!1))},afterLoad:function(){var e=j.RavenConfig;e&&this.config(e.dsn,e.config).install()},showReportDialog:function(e){if(R){var t=(e=e||{}).eventId||this.lastEventId();if(!t)throw new a("Missing eventId");var o=e.dsn||this._dsn;if(!o)throw new a("Missing DSN");var r=encodeURIComponent,n="";n+="?eventId="+r(t),n+="&dsn="+r(o);var l=e.user||this._globalContext.user;l&&(l.name&&(n+="&name="+r(l.name)),l.email&&(n+="&email="+r(l.email)));var i=this._getGlobalServer(this._parseDSN(o)),s=R.createElement("script");s.async=!0,s.src=i+"/api/embed/error-page/"+n,(R.head||R.body).appendChild(s)}},_ignoreNextOnError:function(){var e=this;this._ignoreOnError+=1,setTimeout(function(){e._ignoreOnError-=1})},_triggerEvent:function(e,t){var o,r;if(this._hasDocument){for(r in t=t||{},e="raven"+e.substr(0,1).toUpperCase()+e.substr(1),R.createEvent?(o=R.createEvent("HTMLEvents")).initEvent(e,!0,!0):(o=R.createEventObject()).eventType=e,t)g(t,r)&&(o[r]=t[r]);if(R.createEvent)R.dispatchEvent(o);else try{R.fireEvent("on"+o.eventType.toLowerCase(),o)}catch(e){}}},_breadcrumbEventHandler:function(e){var t=this;return function(o){if(t._keypressTimeout=null,t._lastCapturedEvent!==o){var r;t._lastCapturedEvent=o;try{r=x(o.target)}catch(e){r="<unknown>"}t.captureBreadcrumb({category:"ui."+e,message:r})}}},_keypressEventHandler:function(){var e=this;return function(t){var o;try{o=t.target}catch(e){return}var r=o&&o.tagName;if(r&&("INPUT"===r||"TEXTAREA"===r||o.isContentEditable)){var n=e._keypressTimeout;n||e._breadcrumbEventHandler("input")(t),clearTimeout(n),e._keypressTimeout=setTimeout(function(){e._keypressTimeout=null},1e3)}}},_captureUrlChange:function(e,t){var o=E(this._location.href),r=E(t),n=E(e);this._lastHref=t,o.protocol===r.protocol&&o.host===r.host&&(t=r.relative),o.protocol===n.protocol&&o.host===n.host&&(e=n.relative),this.captureBreadcrumb({category:"navigation",data:{to:t,from:e}})},_instrumentTryCatch:function(){var e=this,t=e._wrappedBuiltIns;function o(t){return function(o,r){for(var n=new Array(arguments.length),a=0;a<n.length;++a)n[a]=arguments[a];var l=n[0];return f(l)&&(n[0]=e.wrap(l)),t.apply?t.apply(this,n):t(n[0],n[1])}}var r=this._globalOptions.autoBreadcrumbs;function n(o){var n=j[o]&&j[o].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(F(n,"addEventListener",function(t){return function(n,a,l,i){try{a&&a.handleEvent&&(a.handleEvent=e.wrap(a.handleEvent))}catch(e){}var s,c,u;return r&&r.dom&&("EventTarget"===o||"Node"===o)&&(c=e._breadcrumbEventHandler("click"),u=e._keypressEventHandler(),s=function(e){if(e){var t;try{t=e.type}catch(e){return}return"click"===t?c(e):"keypress"===t?u(e):void 0}}),t.call(this,n,e.wrap(a,void 0,s),l,i)}},t),F(n,"removeEventListener",function(e){return function(t,o,r,n){try{o=o&&(o.__raven_wrapper__?o.__raven_wrapper__:o)}catch(e){}return e.call(this,t,o,r,n)}},t))}F(j,"setTimeout",o,t),F(j,"setInterval",o,t),j.requestAnimationFrame&&F(j,"requestAnimationFrame",function(t){return function(o){return t(e.wrap(o))}},t);for(var a=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],l=0;l<a.length;l++)n(a[l])},_instrumentBreadcrumbs:function(){var e=this,t=this._globalOptions.autoBreadcrumbs,o=e._wrappedBuiltIns;function r(t,o){t in o&&f(o[t])&&F(o,t,function(t){return e.wrap(t)})}if(t.xhr&&"XMLHttpRequest"in j){var n=XMLHttpRequest.prototype;F(n,"open",function(t){return function(o,r){return p(r)&&-1===r.indexOf(e._globalKey)&&(this.__raven_xhr={method:o,url:r,status_code:null}),t.apply(this,arguments)}},o),F(n,"send",function(t){return function(o){var n=this;function a(){if(n.__raven_xhr&&4===n.readyState){try{n.__raven_xhr.status_code=n.status}catch(e){}e.captureBreadcrumb({type:"http",category:"xhr",data:n.__raven_xhr})}}for(var l=["onload","onerror","onprogress"],i=0;i<l.length;i++)r(l[i],n);return"onreadystatechange"in n&&f(n.onreadystatechange)?F(n,"onreadystatechange",function(t){return e.wrap(t,void 0,a)}):n.onreadystatechange=a,t.apply(this,arguments)}},o)}t.xhr&&"fetch"in j&&F(j,"fetch",function(t){return function(o,r){for(var n=new Array(arguments.length),a=0;a<n.length;++a)n[a]=arguments[a];var l,i=n[0],s="GET";"string"==typeof i?l=i:"Request"in j&&i instanceof j.Request?(l=i.url,i.method&&(s=i.method)):l=""+i,n[1]&&n[1].method&&(s=n[1].method);var c={method:s,url:l,status_code:null};return e.captureBreadcrumb({type:"http",category:"fetch",data:c}),t.apply(this,n).then(function(e){return c.status_code=e.status,e})}},o),t.dom&&this._hasDocument&&(R.addEventListener?(R.addEventListener("click",e._breadcrumbEventHandler("click"),!1),R.addEventListener("keypress",e._keypressEventHandler(),!1)):(R.attachEvent("onclick",e._breadcrumbEventHandler("click")),R.attachEvent("onkeypress",e._keypressEventHandler())));var a=j.chrome,l=!(a&&a.app&&a.app.runtime)&&j.history&&history.pushState&&history.replaceState;if(t.location&&l){var i=j.onpopstate;j.onpopstate=function(){var t=e._location.href;if(e._captureUrlChange(e._lastHref,t),i)return i.apply(this,arguments)};var s=function(t){return function(){var o=arguments.length>2?arguments[2]:void 0;return o&&e._captureUrlChange(e._lastHref,o+""),t.apply(this,arguments)}};F(history,"pushState",s,o),F(history,"replaceState",s,o)}if(t.console&&"console"in j&&console.log){var c=function(t,o){e.captureBreadcrumb({message:t,level:o.level,category:"console"})};h(["debug","info","warn","error","log"],function(e,t){T(console,t,c)})}},_restoreBuiltIns:function(){for(var e;this._wrappedBuiltIns.length;){var t=(e=this._wrappedBuiltIns.shift())[0],o=e[1],r=e[2];t[o]=r}},_drainPlugins:function(){var e=this;h(this._plugins,function(t,o){var r=o[0],n=o[1];r.apply(e,[e].concat(n))})},_parseDSN:function(e){var t=L.exec(e),o={},r=7;try{for(;r--;)o[k[r]]=t[r]||""}catch(t){throw new a("Invalid DSN: "+e)}if(o.pass&&!this._globalOptions.allowSecretKey)throw new a("Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key");return o},_getGlobalServer:function(e){var t="//"+e.host+(e.port?":"+e.port:"");return e.protocol&&(t=e.protocol+":"+t),t},_handleOnErrorStackInfo:function(){this._ignoreOnError||this._handleStackInfo.apply(this,arguments)},_handleStackInfo:function(e,t){var o=this._prepareFrames(e,t);this._triggerEvent("handle",{stackInfo:e,options:t}),this._processException(e.name,e.message,e.url,e.lineno,o,t)},_prepareFrames:function(e,t){var o=this,r=[];if(e.stack&&e.stack.length&&(h(e.stack,function(t,n){var a=o._normalizeFrame(n,e.url);a&&r.push(a)}),t&&t.trimHeadFrames))for(var n=0;n<t.trimHeadFrames&&n<r.length;n++)r[n].in_app=!1;return r=r.slice(0,this._globalOptions.stackTraceLimit)},_normalizeFrame:function(e,t){var o={filename:e.url,lineno:e.line,colno:e.column,function:e.func||"?"};return e.url||(o.filename=t),o.in_app=!(this._globalOptions.includePaths.test&&!this._globalOptions.includePaths.test(o.filename)||/(Raven|TraceKit)\./.test(o.function)||/raven\.(min\.)?js$/.test(o.filename)),o},_processException:function(e,t,o,r,n,a){var l,i=(e?e+": ":"")+(t||"");if((!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(t)&&!this._globalOptions.ignoreErrors.test(i))&&(n&&n.length?(o=n[0].filename||o,n.reverse(),l={frames:n}):o&&(l={frames:[{filename:o,lineno:r,in_app:!0}]}),(!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(o))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(o)))){var s=b({exception:{values:[{type:e,value:t,stacktrace:l}]},culprit:o},a);this._send(s)}},_trimPacket:function(e){var t=this._globalOptions.maxMessageLength;if(e.message&&(e.message=m(e.message,t)),e.exception){var o=e.exception.values[0];o.value=m(o.value,t)}var r=e.request;return r&&(r.url&&(r.url=m(r.url,this._globalOptions.maxUrlLength)),r.Referer&&(r.Referer=m(r.Referer,this._globalOptions.maxUrlLength))),e.breadcrumbs&&e.breadcrumbs.values&&this._trimBreadcrumbs(e.breadcrumbs),e},_trimBreadcrumbs:function(e){for(var t,o,r,n=["to","from","url"],a=0;a<e.values.length;++a)if((o=e.values[a]).hasOwnProperty("data")&&s(o.data)&&!y(o.data)){r=b({},o.data);for(var l=0;l<n.length;++l)t=n[l],r.hasOwnProperty(t)&&r[t]&&(r[t]=m(r[t],this._globalOptions.maxUrlLength));e.values[a].data=r}},_getHttpData:function(){if(this._hasNavigator||this._hasDocument){var e={};return this._hasNavigator&&I.userAgent&&(e.headers={"User-Agent":navigator.userAgent}),this._hasDocument&&(R.location&&R.location.href&&(e.url=R.location.href),R.referrer&&(e.headers||(e.headers={}),e.headers.Referer=R.referrer)),e}},_resetBackoff:function(){this._backoffDuration=0,this._backoffStart=null},_shouldBackoff:function(){return this._backoffDuration&&O()-this._backoffStart<this._backoffDuration},_isRepeatData:function(e){var t=this._lastData;return!(!t||e.message!==t.message||e.culprit!==t.culprit)&&(e.stacktrace||t.stacktrace?w(e.stacktrace,t.stacktrace):!e.exception&&!t.exception||C(e.exception,t.exception))},_setBackoffState:function(e){if(!this._shouldBackoff()){var t=e.status;if(400===t||401===t||429===t){var o;try{o=e.getResponseHeader("Retry-After"),o=1e3*parseInt(o,10)}catch(e){}this._backoffDuration=o||(2*this._backoffDuration||1e3),this._backoffStart=O()}}},_send:function(e){var t=this._globalOptions,o={project:this._globalProject,logger:t.logger,platform:"javascript"},r=this._getHttpData();r&&(o.request=r),e.trimHeadFrames&&delete e.trimHeadFrames,(e=b(o,e)).tags=b(b({},this._globalContext.tags),e.tags),e.extra=b(b({},this._globalContext.extra),e.extra),e.extra["session:duration"]=O()-this._startTime,this._breadcrumbs&&this._breadcrumbs.length>0&&(e.breadcrumbs={values:[].slice.call(this._breadcrumbs,0)}),d(e.tags)&&delete e.tags,this._globalContext.user&&(e.user=this._globalContext.user),t.environment&&(e.environment=t.environment),t.release&&(e.release=t.release),t.serverName&&(e.server_name=t.serverName),f(t.dataCallback)&&(e=t.dataCallback(e)||e),e&&!d(e)&&(f(t.shouldSendCallback)&&!t.shouldSendCallback(e)||(this._shouldBackoff()?this._logDebug("warn","Raven dropped error due to backoff: ",e):"number"==typeof t.sampleRate?Math.random()<t.sampleRate&&this._sendProcessedPayload(e):this._sendProcessedPayload(e)))},_getUuid:function(){return S()},_sendProcessedPayload:function(e,t){var o=this,r=this._globalOptions;if(this.isSetup())if(e=this._trimPacket(e),this._globalOptions.allowDuplicates||!this._isRepeatData(e)){this._lastEventId=e.event_id||(e.event_id=this._getUuid()),this._lastData=e,this._logDebug("debug","Raven about to send:",e);var n={sentry_version:"7",sentry_client:"raven-js/"+this.VERSION,sentry_key:this._globalKey};this._globalSecret&&(n.sentry_secret=this._globalSecret);var a=e.exception&&e.exception.values[0];this.captureBreadcrumb({category:"sentry",message:a?(a.type?a.type+": ":"")+a.value:e.message,event_id:e.event_id,level:e.level||"error"});var l=this._globalEndpoint;(r.transport||this._makeRequest).call(this,{url:l,auth:n,data:e,options:r,onSuccess:function(){o._resetBackoff(),o._triggerEvent("success",{data:e,src:l}),t&&t()},onError:function(r){o._logDebug("error","Raven transport failed to send: ",r),r.request&&o._setBackoffState(r.request),o._triggerEvent("failure",{data:e,src:l}),r=r||new Error("Raven send failed (no additional details provided)"),t&&t(r)}})}else this._logDebug("warn","Raven dropped repeat event: ",e)},_makeRequest:function(e){var t=j.XMLHttpRequest&&new j.XMLHttpRequest;if(t&&("withCredentials"in t||"undefined"!=typeof XDomainRequest)){var o=e.url;"withCredentials"in t?t.onreadystatechange=function(){if(4===t.readyState)if(200===t.status)e.onSuccess&&e.onSuccess();else if(e.onError){var o=new Error("Sentry error code: "+t.status);o.request=t,e.onError(o)}}:(t=new XDomainRequest,o=o.replace(/^https?:/,""),e.onSuccess&&(t.onload=e.onSuccess),e.onError&&(t.onerror=function(){var o=new Error("Sentry error code: XDomainRequest");o.request=t,e.onError(o)})),t.open("POST",o+"?"+_(e.auth)),t.send(n(e.data))}},_logDebug:function(e){this._originalConsoleMethods[e]&&this.debug&&Function.prototype.apply.call(this._originalConsoleMethods[e],this._originalConsole,[].slice.call(arguments,1))},_mergeContext:function(e,t){u(t)?delete this._globalContext[e]:this._globalContext[e]=b(this._globalContext[e]||{},t)}},N.prototype.setUser=N.prototype.setUserContext,N.prototype.setReleaseContext=N.prototype.setRelease,e.exports=N}).call(this,o(1))},function(e,t,o){(function(t){var r=o(2),n={collectWindowErrors:!0,debug:!1},a="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},l=[].slice,i="?",s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function c(){return"undefined"==typeof document||null==document.location?"":document.location.href}n.report=function(){var e,t,o=[],u=null,f=null,p=null;function d(e,t){var r=null;if(!t||n.collectWindowErrors){for(var a in o)if(o.hasOwnProperty(a))try{o[a].apply(null,[e].concat(l.call(arguments,2)))}catch(e){r=e}if(r)throw r}}function h(t,o,a,l,u){if(p)n.computeStackTrace.augmentStackTraceWithInitialElement(p,o,a,t),b();else if(u&&r.isError(u))d(n.computeStackTrace(u),!0);else{var f,h={url:o,line:a,column:l},m=void 0,y=t;if("[object String]"==={}.toString.call(t))(f=t.match(s))&&(m=f[1],y=f[2]);h.func=i,d({name:m,message:y,url:c(),stack:[h]},!0)}return!!e&&e.apply(this,arguments)}function b(){var e=p,t=u;u=null,p=null,f=null,d.apply(null,[e,!1].concat(t))}function m(e,t){var o=l.call(arguments,1);if(p){if(f===e)return;b()}var r=n.computeStackTrace(e);if(p=r,f=e,u=o,setTimeout(function(){f===e&&b()},r.incomplete?2e3:0),!1!==t)throw e}return m.subscribe=function(r){t||(e=a.onerror,a.onerror=h,t=!0),o.push(r)},m.unsubscribe=function(e){for(var t=o.length-1;t>=0;--t)o[t]===e&&o.splice(t,1)},m.uninstall=function(){t&&(a.onerror=e,t=!1,e=void 0),o=[]},m}(),n.computeStackTrace=function(){function e(e){if(void 0!==e.stack&&e.stack){for(var t,o,r,n=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,a=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,l=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,s=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,u=/\((\S*)(?::(\d+))(?::(\d+))\)/,f=e.stack.split("\n"),p=[],d=(/^(.*) is undefined$/.exec(e.message),0),h=f.length;d<h;++d){if(o=n.exec(f[d])){var b=o[2]&&0===o[2].indexOf("native");o[2]&&0===o[2].indexOf("eval")&&(t=u.exec(o[2]))&&(o[2]=t[1],o[3]=t[2],o[4]=t[3]),r={url:b?null:o[2],func:o[1]||i,args:b?[o[2]]:[],line:o[3]?+o[3]:null,column:o[4]?+o[4]:null}}else if(o=l.exec(f[d]))r={url:o[2],func:o[1]||i,args:[],line:+o[3],column:o[4]?+o[4]:null};else{if(!(o=a.exec(f[d])))continue;o[3]&&o[3].indexOf(" > eval")>-1&&(t=s.exec(o[3]))?(o[3]=t[1],o[4]=t[2],o[5]=null):0!==d||o[5]||void 0===e.columnNumber||(p[0].column=e.columnNumber+1),r={url:o[3],func:o[1]||i,args:o[2]?o[2].split(","):[],line:o[4]?+o[4]:null,column:o[5]?+o[5]:null}}!r.func&&r.line&&(r.func=i),p.push(r)}return p.length?{name:e.name,message:e.message,url:c(),stack:p}:null}}function t(e,t,o,r){var n={url:t,line:o};if(n.url&&n.line){if(e.incomplete=!1,n.func||(n.func=i),e.stack.length>0&&e.stack[0].url===n.url){if(e.stack[0].line===n.line)return!1;if(!e.stack[0].line&&e.stack[0].func===n.func)return e.stack[0].line=n.line,!1}return e.stack.unshift(n),e.partial=!0,!0}return e.incomplete=!0,!1}function o(e,a){for(var l,s,u=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,f=[],p={},d=!1,h=o.caller;h&&!d;h=h.caller)if(h!==r&&h!==n.report){if(s={url:null,func:i,line:null,column:null},h.name?s.func=h.name:(l=u.exec(h.toString()))&&(s.func=l[1]),void 0===s.func)try{s.func=l.input.substring(0,l.input.indexOf("{"))}catch(e){}p[""+h]?d=!0:p[""+h]=!0,f.push(s)}a&&f.splice(0,a);var b={name:e.name,message:e.message,url:c(),stack:f};return t(b,e.sourceURL||e.fileName,e.line||e.lineNumber,e.message||e.description),b}function r(t,r){var a=null;r=null==r?0:+r;try{if(a=e(t))return a}catch(e){if(n.debug)throw e}try{if(a=o(t,r+1))return a}catch(e){if(n.debug)throw e}return{name:t.name,message:t.message,url:c()}}return r.augmentStackTraceWithInitialElement=t,r.computeStackTraceFromStackProp=e,r}(),e.exports=n}).call(this,o(1))},function(e,t){function o(e,t){for(var o=0;o<e.length;++o)if(e[o]===t)return o;return-1}function r(e,t){var r=[],n=[];return null==t&&(t=function(e,t){return r[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,o(r,t)).join(".")+"]"}),function(a,l){if(r.length>0){var i=o(r,this);~i?r.splice(i+1):r.push(this),~i?n.splice(i,1/0,a):n.push(a),~o(r,l)&&(l=t.call(this,a,l))}else r.push(l);return null==e?l instanceof Error?function(e){var t={stack:e.stack,message:e.message,name:e.name};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}(l):l:e.call(this,a,l)}}(e.exports=function(e,t,o,n){return JSON.stringify(e,r(t,n),o)}).getSerialize=r},function(e,t){function o(e){this.name="RavenConfigError",this.message=e}o.prototype=new Error,o.prototype.constructor=o,e.exports=o},function(e,t){e.exports={wrapMethod:function(e,t,o){var r=e[t],n=e;if(t in e){var a="warn"===t?"warning":t;e[t]=function(){var e=[].slice.call(arguments),l=""+e.join(" "),i={level:a,logger:"console",extra:{arguments:e}};"assert"===t?!1===e[0]&&(l="Assertion failed: "+(e.slice(1).join(" ")||"console.assert"),i.extra.arguments=e.slice(1),o&&o(l,i)):o&&o(l,i),r&&Function.prototype.apply.call(r,n,e)}}}}},function(e,t,o){"use strict";o.r(t);var r=o(0),n=o.n(r),a=window.leadinConfig,l=a.adminUrl,i=a.ajaxUrl,s=a.env,c=a.hubspotBaseUrl,u=a.leadinPluginVersion,f=a.plugins,p=a.phpVersion,d=a.portalId,h=a.theme,b=a.wpVersion,m=window.leadinI18n;var y=n.a;function g(e,t){jQuery("#toplevel_page_leadin").find("li").last().before('<li><a href="'.concat(t,'" target="_blank">').concat(e,"</a></li>"))}function v(){var e="".concat(c,"/chatflows/").concat(d),t="".concat(c,"/email/").concat(d);g(m.chatflows,e),g(m.email,t)}function _(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function S(){try{if(window.localStorage.LEADIN_DEBUG){for(var e,t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];o.unshift("[Leadin]"),(e=console).log.apply(e,o)}}catch(e){}}var x={iframe:"#leadin-iframe",allMenuButtons:".toplevel_page_leadin > a, .toplevel_page_leadin > ul > li > a",subMenuButtons:".toplevel_page_leadin > ul > li"},C=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bus=jQuery({})}var t,o,r;return t=e,(o=[{key:"trigger",value:function(){var e;(e=this.bus).trigger.apply(e,arguments)}},{key:"on",value:function(e,t){this.bus.on(e,y.wrap(t))}}])&&_(t.prototype,o),r&&_(t,r),e}()),w=[];function E(e){S("Posting message"),S(JSON.stringify(e)),jQuery(x.iframe)[0].contentWindow.postMessage(JSON.stringify(e),c)}function F(e,t){t||(t="Message Received");var o=Object.assign({},e);o.response=t,E(o)}function T(e){S("Received message"),S(JSON.stringify(e)),e.response&&e._callbackId?function(e){w[e._callbackId-1](e.response)}(e):Object.keys(e).forEach(function(t){C.trigger(t,[e[t],F.bind(null,e)])})}function k(e){if(e.origin===c)try{T(JSON.parse(e.data))}catch(e){}}function L(e,t,o,r,n){var a={url:"".concat(i,"?action=").concat(e),method:t,contentType:"application/json",success:"function"==typeof r?y.wrap(function(e){return r(JSON.parse(e))}):void 0,error:y.wrap(function(e){var t;try{t=JSON.parse(e.responseText).error}catch(o){t=e.responseText}y.captureMessage("AJAX request failed with code ".concat(e.status,": ").concat(t)),"function"==typeof n&&n()})};o&&(a.data=JSON.stringify(o)),jQuery.ajax(a)}function O(e,t,o,r){return L(e,"POST",t,o,r)}function j(e,t,o){return L(e,"GET",null,t,o)}var R,I=function(){return j("leadin_get_portal")},B=!1;function N(){R=setTimeout(function(){I(function(e){e.portalId?location.reload(!0):B||N()},N)},5e3)}var z=O.bind(null,"leadin_disconnect_ajax",{}),D=j.bind(null,"leadin_get_domain"),M=j.bind(null,"leadin_mark_outdated");function U(e){return function(e,t){C.on(e,function(){for(var e=arguments.length,o=new Array(e),r=0;r<e;r++)o[r]=arguments[r];t.apply(null,o.slice(1))})}.bind(null,e)}var P=U("leadin_clear_query_param"),H=U("leadin_connect_portal"),A=U("leadin_disable_navigation"),q=U("leadin_disconnect_portal"),J=U("leadin_enter_fullscreen"),W=U("leadin_exit_fullscreen"),K=U("leadin_get_assets_payload"),$=U("leadin_get_wp_domain"),Q=U("leadin_init_navigation"),X=U("leadin_interframe_ready"),G=U("leadin_mark_outdated"),V=U("leadin_page_reload"),Z=U("leadin_upgrade");function Y(e){!function(e,t,o,r,n){n||(n=500);var a=setTimeout(y.wrap(function(){y.captureMessage("LeadinWordpressPlugin postMessage response timeout on message key: ".concat(e)),r()}),n),l={};l[e]=t,l._callbackId=w.push(function(){clearTimeout(a),o.apply(void 0,arguments)}),E(l)}("leadin_change_route",e,null,function(){return location.reload(!0)})}function ee(){function e(){Y(window.location.search.match(/page=leadin_?(\w*)/)[1]),function(){jQuery(x.subMenuButtons).removeClass("current");var e=window.location.search.match(/\?page=leadin_?\w*/)[0];jQuery('a[href="admin.php'.concat(e,'"]')).parent().addClass("current")}()}window.addEventListener("popstate",e),jQuery(x.allMenuButtons).click(function(){event.metaKey||event.altKey||event.shiftKey||(window.history.pushState(null,null,jQuery(this).attr("href")),e(),event.preventDefault())})}var te={"genesis-sample":{formsStyle:{fontFamily:"Source Sans Pro",labelTextColor:"#333333",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#0073e5"},chatStyle:{accentColor:"#0073e5"},onScrollLeadFlowStyle:{color:"#0073e5"},onExitLeadFlowStyle:{color:"#0073e5"}},"academy-pro":{formsStyle:{fontFamily:"PT Sans",labelTextColor:"#222222",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#e22c2f"},chatStyle:{accentColor:"#e22c2f"},onScrollLeadFlowStyle:{color:"#e22c2f"},onExitLeadFlowStyle:{color:"#e22c2f"}},"agency-pro":{formsStyle:{fontFamily:"EB Garamond",labelTextColor:"#666666",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#d7c603"},chatStyle:{accentColor:"#d7c603"},onScrollLeadFlowStyle:{color:"#d7c603"},onExitLeadFlowStyle:{color:"#d7c603"}},"agentpress-pro":{formsStyle:{fontFamily:"Roboto",labelTextColor:"#1a212b",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#d23836"},chatStyle:{accentColor:"#d23836"},onScrollLeadFlowStyle:{color:"#d23836"},onExitLeadFlowStyle:{color:"#d23836"}},"altitude-pro":{formsStyle:{fontFamily:"Ek Mukta",labelTextColor:"#000000",labelTextSize:"20px",submitFontColor:"#ffffff",submitColor:"#079bc4"},chatStyle:{accentColor:"#079bc4"},onScrollLeadFlowStyle:{color:"#079bc4"},onExitLeadFlowStyle:{color:"#079bc4"}},"ambiance-pro":{formsStyle:{fontFamily:"Merriweather",labelTextColor:"#333333",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#e12727"},chatStyle:{accentColor:"#e12727"},onScrollLeadFlowStyle:{color:"#e12727"},onExitLeadFlowStyle:{color:"#e12727"}},"atmosphere-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#333333",labelTextSize:"20px",submitFontColor:"#ffffff",submitColor:"#333333"},chatStyle:{accentColor:"#333333"},onScrollLeadFlowStyle:{color:"#333333"},onExitLeadFlowStyle:{color:"#333333"}},"author-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#000000",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#000000"},chatStyle:{accentColor:"#000000"},onScrollLeadFlowStyle:{color:"#000000"},onExitLeadFlowStyle:{color:"#000000"}},"authority-pro":{formsStyle:{fontFamily:"Libre Baskerville",labelTextColor:"#333333",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#000cff"},chatStyle:{accentColor:"#000cff"},onScrollLeadFlowStyle:{color:"#000cff"},onExitLeadFlowStyle:{color:"#000cff"}},"beautiful-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#666666",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#e5554e"},chatStyle:{accentColor:"#e5554e"},onScrollLeadFlowStyle:{color:"#e5554e"},onExitLeadFlowStyle:{color:"#e5554e"}},"breakthrough-pro":{formsStyle:{fontFamily:"Alegreya Sans",labelTextColor:"#4e4756",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#4a4f9b"},chatStyle:{accentColor:"#4a4f9b"},onScrollLeadFlowStyle:{color:"#4a4f9b"},onExitLeadFlowStyle:{color:"#4a4f9b"}},"cafe-pro":{formsStyle:{fontFamily:"Crimson Text",labelTextColor:"#000000",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#000000"},chatStyle:{accentColor:"#000000"},onScrollLeadFlowStyle:{color:"#000000"},onExitLeadFlowStyle:{color:"#000000"}},"daily-dish-pro":{formsStyle:{fontFamily:"Cormorant",labelTextColor:"#000000",labelTextSize:"20px",submitFontColor:"#ffffff",submitColor:"#d9037f"},chatStyle:{accentColor:"#d9037f"},onScrollLeadFlowStyle:{color:"#d9037f"},onExitLeadFlowStyle:{color:"#d9037f"}},"digital-pro":{formsStyle:{fontFamily:"Lora",labelTextColor:"#5b5e5e",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#e85555"},chatStyle:{accentColor:"#e85555"},onScrollLeadFlowStyle:{color:"#e85555"},onExitLeadFlowStyle:{color:"#e85555"}},"education-pro":{formsStyle:{fontFamily:"Roboto Condensed",labelTextColor:"#444444",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#78a7c8"},chatStyle:{accentColor:"#78a7c8"},onScrollLeadFlowStyle:{color:"#78a7c8"},onExitLeadFlowStyle:{color:"#78a7c8"}},"eleven40-pro":{formsStyle:{fontFamily:"Lora",labelTextColor:"#000000",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#ed702b"},chatStyle:{accentColor:"#ed702b"},onScrollLeadFlowStyle:{color:"#ed702b"},onExitLeadFlowStyle:{color:"#ed702b"}},"enterprise-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#777777",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#31b2ed"},chatStyle:{accentColor:"#31b2ed"},onScrollLeadFlowStyle:{color:"#31b2ed"},onExitLeadFlowStyle:{color:"#31b2ed"}},"essence-pro":{formsStyle:{fontFamily:"Alegreya Sans",labelTextColor:"#333333",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#be8100"},chatStyle:{accentColor:"#be8100"},onScrollLeadFlowStyle:{color:"#be8100"},onExitLeadFlowStyle:{color:"#be8100"}},"executive-pro":{formsStyle:{fontFamily:"Open Sans",labelTextColor:"#222222",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#64c9ea"},chatStyle:{accentColor:"#64c9ea"},onScrollLeadFlowStyle:{color:"#64c9ea"},onExitLeadFlowStyle:{color:"#64c9ea"}},"generate-pro":{formsStyle:{fontFamily:"Source Sans Pro",labelTextColor:"#222222",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#eb232f"},chatStyle:{accentColor:"#eb232f"},onScrollLeadFlowStyle:{color:"#eb232f"},onExitLeadFlowStyle:{color:"#eb232f"}},"infinity-pro":{formsStyle:{fontFamily:"Cormorant Garamond",labelTextColor:"#000000",labelTextSize:"22px",submitFontColor:"#ffffff",submitColor:"#d43c67"},chatStyle:{accentColor:"#d43c67"},onScrollLeadFlowStyle:{color:"#d43c67"},onExitLeadFlowStyle:{color:"#d43c67"}},"interior-pro":{formsStyle:{fontFamily:"Lora",labelTextColor:"#777777",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#009092"},chatStyle:{accentColor:"#009092"},onScrollLeadFlowStyle:{color:"#009092"},onExitLeadFlowStyle:{color:"#009092"}},"lifestyle-pro":{formsStyle:{fontFamily:"Droid Sans",labelTextColor:"#767673",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#27968b"},chatStyle:{accentColor:"#27968b"},onScrollLeadFlowStyle:{color:"#27968b"},onExitLeadFlowStyle:{color:"#27968b"}},"magazine-pro":{formsStyle:{fontFamily:"Roboto",labelTextColor:"#222222",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#008285"},chatStyle:{accentColor:"#008285"},onScrollLeadFlowStyle:{color:"#008285"},onExitLeadFlowStyle:{color:"#008285"}},"metro-pro":{formsStyle:{fontFamily:"Helvetica Neue",labelTextColor:"#222222",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#f96e5b"},chatStyle:{accentColor:"#f96e5b"},onScrollLeadFlowStyle:{color:"#f96e5b"},onExitLeadFlowStyle:{color:"#f96e5b"}},"minimum-pro":{formsStyle:{fontFamily:"Roboto Slab",labelTextColor:"#333333",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#0ebfe9"},chatStyle:{accentColor:"#0ebfe9"},onScrollLeadFlowStyle:{color:"#0ebfe9"},onExitLeadFlowStyle:{color:"#0ebfe9"}},"modern-studio-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#000000",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#000000"},chatStyle:{accentColor:"#000000"},onScrollLeadFlowStyle:{color:"#000000"},onExitLeadFlowStyle:{color:"#000000"}},"monochrome-pro":{formsStyle:{fontFamily:"Muli",labelTextColor:"#000000",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#000000"},chatStyle:{accentColor:"#000000"},onScrollLeadFlowStyle:{color:"#000000"},onExitLeadFlowStyle:{color:"#000000"}},"news-pro":{formsStyle:{fontFamily:"Raleway",labelTextColor:"#666666",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#ff0000"},chatStyle:{accentColor:"#ff0000"},onScrollLeadFlowStyle:{color:"#ff0000"},onExitLeadFlowStyle:{color:"#ff0000"}},"no-sidebar-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#333333",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#333333"},chatStyle:{accentColor:"#333333"},onScrollLeadFlowStyle:{color:"#333333"},onExitLeadFlowStyle:{color:"#333333"}},"outfitter-pro":{formsStyle:{fontFamily:"Noto Sans",labelTextColor:"#546e7a",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#000000"},chatStyle:{accentColor:"#000000"},onScrollLeadFlowStyle:{color:"#000000"},onExitLeadFlowStyle:{color:"#000000"}},"outreach-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#333333",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#6ab446"},chatStyle:{accentColor:"#6ab446"},onScrollLeadFlowStyle:{color:"#6ab446"},onExitLeadFlowStyle:{color:"#6ab446"}},"parallax-pro":{formsStyle:{fontFamily:"Cormorant Garamond",labelTextColor:"#000000",labelTextSize:"22px",submitFontColor:"#ffffff",submitColor:"#00a0af"},chatStyle:{accentColor:"#00a0af"},onScrollLeadFlowStyle:{color:"#00a0af"},onExitLeadFlowStyle:{color:"#00a0af"}},"revolution-pro":{formsStyle:{fontFamily:"Noto Serif SC",labelTextColor:"#000000",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#008080"},chatStyle:{accentColor:"#008080"},onScrollLeadFlowStyle:{color:"#008080"},onExitLeadFlowStyle:{color:"#008080"}},"sixteen-nine-pro":{formsStyle:{fontFamily:"Roboto",labelTextColor:"#000000",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#1dbec0"},chatStyle:{accentColor:"#1dbec0"},onScrollLeadFlowStyle:{color:"#1dbec0"},onExitLeadFlowStyle:{color:"#1dbec0"}},"smart-passive-income-pro":{formsStyle:{fontFamily:"Roboto",labelTextColor:"#333333",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#0e763c"},chatStyle:{accentColor:"#0e763c"},onScrollLeadFlowStyle:{color:"#0e763c"},onExitLeadFlowStyle:{color:"#0e763c"}},"wellness-pro":{formsStyle:{fontFamily:"Open Sans",labelTextColor:"#000000",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#5da44f"},chatStyle:{accentColor:"#5da44f"},onScrollLeadFlowStyle:{color:"#5da44f"},onExitLeadFlowStyle:{color:"#5da44f"}},"workstation-pro":{formsStyle:{fontFamily:"Baskerville",labelTextColor:"#222222",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#ff4800"},chatStyle:{accentColor:"#ff4800"},onScrollLeadFlowStyle:{color:"#ff4800"},onExitLeadFlowStyle:{color:"#ff4800"}}};X(function(e,t){t("Interframe Ready")}),H(function(e,t){!function(e,t,o){O("leadin_registration_ajax",{portalId:e},t,o)}(e,function(){clearTimeout(R),B=!0,t({success:!0})},t.bind(null,{success:!1}))}),q(function(e,t){z(t.bind(null,{success:!0}),t.bind(null,{success:!1}))}),G(function(e,t){M(t)}),Z(function(e,t){t(),location.href="".concat(l,"plugins.php")}),V(function(e,t){t(),window.location.reload(!0)}),Q(function(e,t){t(),ee()}),A(function(e,t){t(),jQuery(x.allMenuButtons).off("click")}),P(function(e,t){t();var o=window.location.toString();o.indexOf("?")>0&&(o=o.substring(0,o.indexOf("?")));var r="".concat(o,"?page=leadin");window.history.pushState({},"",r)}),$(function(e,t){D(function(e){e.domain&&t(e.domain)})}),K(function(e,t){t({payload:te[h]})}),J(function(e,t){t(),jQuery(x.iframe).addClass("leadin-iframe-fullscreen")}),W(function(e,t){t(),jQuery(x.iframe).removeClass("leadin-iframe-fullscreen")}),"prod"===s&&(n.a.config("https://e9b8f382cdd130c0d415cd977d2be56f@exceptions.hubspot.com/1",{instrument:{tryCatch:!1}}).install(),n.a.setTagsContext({leadin:u,php:p,wordpress:b}),n.a.setUserContext({hub:d,plugins:Object.keys(f).map(function(e){return"".concat(e,"#").concat(f[e].Version)}).join(",")})),y.context(function(){window.addEventListener("message",k),-1!==window.location.search.indexOf("page=leadin")&&(d||N()),jQuery(document).ready(v)})}]);
|
2 |
//# sourceMappingURL=leadin.js.map
|
scripts/leadin.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/raven-js/src/singleton.js","webpack:///(webpack)/buildin/global.js","webpack:///./node_modules/raven-js/src/utils.js","webpack:///./node_modules/raven-js/src/raven.js","webpack:///./node_modules/raven-js/vendor/TraceKit/tracekit.js","webpack:///./node_modules/raven-js/vendor/json-stringify-safe/stringify.js","webpack:///./node_modules/raven-js/src/configError.js","webpack:///./node_modules/raven-js/src/console.js","webpack:///./js/constants/leadinConfig.js","webpack:///./js/lib/Raven.js","webpack:///./js/chatflows.js","webpack:///./js/utils.js","webpack:///./js/constants/selectors.js","webpack:///./js/lib/Interframe.js","webpack:///./js/lib/EventBus.js","webpack:///./js/api/wordpressApi.js","webpack:///./js/api/hubspotPluginApi.js","webpack:///./js/navigation.js","webpack:///./js/constants/themes.js","webpack:///./js/handlers.js","webpack:///./js/fullscreen.js","webpack:///./js/app.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","global","RavenConstructor","_window","window","self","_Raven","Raven","noConflict","afterLoad","g","this","Function","e","isUndefined","what","isString","toString","supportsErrorEvent","ErrorEvent","each","obj","callback","j","length","hasKey","htmlElementAsString","elem","className","classes","attr","out","tagName","push","toLowerCase","id","split","attrWhitelist","getAttribute","join","isOnlyOneTruthy","a","b","isSameStacktrace","stack1","stack2","frames1","frames","frames2","filename","lineno","colno","isObject","isError","Error","isErrorEvent","isFunction","isEmptyObject","_","wrappedCallback","data","original","normalizedData","objectMerge","obj1","obj2","truncate","str","max","substr","objectFrozen","isFrozen","joinRegExp","patterns","pattern","sources","len","replace","source","RegExp","urlencode","pairs","encodeURIComponent","uuid4","crypto","msCrypto","getRandomValues","arr","Uint16Array","pad","num","v","Math","random","htmlTreeAsString","nextStr","height","sepLength","parentNode","reverse","isSameException","ex1","ex2","values","type","stacktrace","parseUrl","url","match","query","fragment","protocol","host","path","relative","fill","replacement","track","orig","TraceKit","stringify","RavenConfigError","utils","wrapConsoleMethod","wrapMethod","dsnKeys","dsnPattern","now","Date","_document","document","_navigator","navigator","keepOriginalCallback","method","_hasJSON","JSON","_hasDocument","_hasNavigator","_lastCapturedException","_lastData","_lastEventId","_globalServer","_globalKey","_globalProject","_globalContext","_globalOptions","logger","ignoreErrors","ignoreUrls","whitelistUrls","includePaths","collectWindowErrors","maxMessageLength","maxUrlLength","stackTraceLimit","autoBreadcrumbs","instrument","sampleRate","_ignoreOnError","_isRavenInstalled","_originalErrorStackTraceLimit","_originalConsole","console","_originalConsoleMethods","_plugins","_startTime","_wrappedBuiltIns","_breadcrumbs","_lastCapturedEvent","_keypressTimeout","_location","location","_lastHref","href","_resetBackoff","VERSION","debug","config","dsn","options","_logDebug","globalOptions","setDSN","maxBreadcrumbs","min","autoBreadcrumbDefaults","xhr","dom","instrumentDefaults","tryCatch","install","isSetup","report","subscribe","_handleOnErrorStackInfo","apply","arguments","_instrumentTryCatch","_instrumentBreadcrumbs","_drainPlugins","uri","_parseDSN","lastSlash","lastIndexOf","_dsn","user","_globalSecret","pass","_getGlobalServer","_globalEndpoint","context","func","args","undefined","wrap","_before","__raven__","__raven_wrapper__","wrapped","deep","_ignoreNextOnError","captureException","__inner__","uninstall","_restoreBuiltIns","ex","isNotError","isNotErrorEvent","isErrorEventWithoutError","error","captureMessage","trimHeadFrames","stack","computeStackTrace","_handleStackInfo","msg","test","message","initialCall","fileurl","fingerprint","_prepareFrames","_send","captureBreadcrumb","crumb","timestamp","breadcrumbCallback","result","shift","addPlugin","plugin","pluginArgs","slice","setUserContext","setExtraContext","extra","_mergeContext","setTagsContext","tags","clearContext","getContext","parse","setEnvironment","environment","setRelease","release","setDataCallback","dataCallback","setBreadcrumbCallback","setShouldSendCallback","shouldSendCallback","setTransport","transport","lastException","lastEventId","ravenNotConfiguredError","RavenConfig","showReportDialog","eventId","encode","qs","email","globalServer","script","createElement","async","src","head","body","appendChild","setTimeout","_triggerEvent","eventType","evt","toUpperCase","createEvent","initEvent","createEventObject","dispatchEvent","fireEvent","_breadcrumbEventHandler","evtName","target","category","_keypressEventHandler","isContentEditable","timeout","clearTimeout","_captureUrlChange","from","to","parsedLoc","parsedTo","parsedFrom","wrappedBuiltIns","wrapTimeFn","fn","Array","originalCallback","wrapEventTarget","proto","capture","secure","handleEvent","err","before","clickHandler","keypressHandler","requestAnimationFrame","cb","eventTargets","wrapProp","prop","xhrproto","XMLHttpRequest","origOpen","indexOf","__raven_xhr","status_code","origSend","onreadystatechangeHandler","readyState","status","props","onreadystatechange","origFetch","fetchInput","Request","fetchData","then","response","addEventListener","attachEvent","chrome","hasPushAndReplaceState","app","runtime","history","pushState","replaceState","oldOnPopState","onpopstate","currentHref","historyReplacementFunction","origHistFunction","log","consoleMethodCallback","level","builtin","installer","concat","exec","allowSecretKey","port","stackInfo","_processException","frame","_normalizeFrame","in_app","stackInfoUrl","normalized","line","column","function","prefixedMessage","exception","culprit","_trimPacket","request","Referer","breadcrumbs","_trimBreadcrumbs","urlProp","urlProps","_getHttpData","httpData","userAgent","headers","User-Agent","referrer","_backoffDuration","_backoffStart","_shouldBackoff","_isRepeatData","current","last","_setBackoffState","retry","getResponseHeader","parseInt","baseData","project","platform","serverName","server_name","_sendProcessedPayload","_getUuid","allowDuplicates","event_id","auth","sentry_version","sentry_client","sentry_key","sentry_secret","_makeRequest","onSuccess","onError","opts","XDomainRequest","onload","onerror","open","send","setUser","setReleaseContext","_slice","UNKNOWN_FUNCTION","ERROR_TYPES_RE","getLocationHref","_oldOnerrorHandler","_onErrorHandlerInstalled","handlers","lastArgs","lastExceptionStack","notifyHandlers","isWindowError","inner","traceKitWindowOnError","lineNo","colNo","augmentStackTraceWithInitialElement","processLastException","groups","_lastExceptionStack","_lastArgs","rethrow","incomplete","handler","unsubscribe","splice","computeStackTraceFromStackProp","submatch","parts","element","gecko","winjs","geckoEval","chromeEval","lines","isNative","columnNumber","initial","unshift","partial","computeStackTraceByWalkingCallerChain","depth","item","functionName","funcs","recursion","curr","caller","input","substring","sourceURL","fileName","lineNumber","description","haystack","needle","serializer","replacer","cycleReplacer","keys","thisPos","Infinity","stringifyError","spaces","getSerialize","constructor","originalConsoleLevel","originalConsole","sentryLevel","leadinConfig","adminUrl","ajaxUrl","env","hubspotBaseUrl","leadinPluginVersion","plugins","phpVersion","portalId","theme","wpVersion","i18n","leadinI18n","initChatflows","leadinMenu","getElementById","firstSubMenu","querySelector","chatflowsUrl","chatflowsHtml","chatflows","insertAdjacentHTML","localStorage","LEADIN_DEBUG","_console","_len","_key","domElements","iframe","allMenuButtons","subMenuButtons","eventBus","EventBus","_classCallCheck","bus","jQuery","_this$bus","trigger","event","on","callbacks","postMessageObject","contentWindow","postMessage","reply","newMessage","assign","handleMessage","_callbackId","handleResponse","forEach","handleMessageEvent","origin","makeRequest","action","payload","success","ajaxPayload","contentType","jqXHR","responseText","ajax","post","portalPollingTimeout","getPortal","stopPortalPolling","startPortalIdPolling","reload","disconnect","getDomain","markAsOutdated","createHandler","onClearQueryParam","onConnect","onDisableNavigation","onDisconnect","onEnterFullScreen","onExitFullScreen","onGetAssetsPayload","onGetDomain","onInitNavigation","onInterframeReady","onMarkAsOutdated","onPageReload","onUpgrade","changeRoute","route","onResponse","onTimeout","timeoutId","initNavigation","handleNavigation","search","removeClass","pageParam","parent","addClass","setSelectedMenuItem","click","metaKey","altKey","shiftKey","preventDefault","themes","genesis-sample","formsStyle","fontFamily","labelTextColor","labelTextSize","submitFontColor","submitColor","chatStyle","accentColor","onScrollLeadFlowStyle","color","onExitLeadFlowStyle","academy-pro","agency-pro","agentpress-pro","altitude-pro","ambiance-pro","atmosphere-pro","author-pro","authority-pro","beautiful-pro","breakthrough-pro","cafe-pro","daily-dish-pro","digital-pro","education-pro","eleven40-pro","enterprise-pro","essence-pro","executive-pro","generate-pro","infinity-pro","interior-pro","lifestyle-pro","magazine-pro","metro-pro","minimum-pro","modern-studio-pro","monochrome-pro","news-pro","no-sidebar-pro","outfitter-pro","outreach-pro","parallax-pro","revolution-pro","sixteen-nine-pro","smart-passive-income-pro","wellness-pro","workstation-pro","connect","off","currentWindowLocation","newWindowLocation","domain","leadin","php","wordpress","hub","map","Version","ready"],"mappings":"aACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,YAAA,CAAwDC,MAAA,WAExDP,OAAAC,eAAAb,EAAA,cAAiDmB,OAAA,KAQjDrB,EAAAsB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAArB,EAAAqB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,iBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFA1B,EAAAkB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,WAAyCT,YAAA,EAAAK,UACzC,EAAAE,GAAA,iBAAAF,EAAA,QAAAM,KAAAN,EAAArB,EAAAU,EAAAe,EAAAE,EAAA,SAAAA,GAAgH,OAAAN,EAAAM,IAAqBC,KAAA,KAAAD,IACrI,OAAAF,GAIAzB,EAAA6B,EAAA,SAAA1B,GACA,IAAAS,EAAAT,KA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,UAAW2M,IQ1EoB,IAAnDviB,OAAOwK,SAASwa,OAAOnQ,QAAQ,iBAC5B+K,GACH0D,KAIJ/B,OAAOzZ,UAAU0hB,MAAMvJ","file":"leadin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 8);\n","/**\n * Enforces a single instance of the Raven client, and the\n * main entry point for Raven. If you are a consumer of the\n * Raven library, you SHOULD load this file (vs raven.js).\n **/\n\nvar RavenConstructor = require('./raven');\n\n// This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)\nvar _window =\n typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\nvar _Raven = _window.Raven;\n\nvar Raven = new RavenConstructor();\n\n/*\n * Allow multiple versions of Raven to be installed.\n * Strip Raven from the global context and returns the instance.\n *\n * @return {Raven}\n */\nRaven.noConflict = function() {\n _window.Raven = _Raven;\n return Raven;\n};\n\nRaven.afterLoad();\n\nmodule.exports = Raven;\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","var _window =\n typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction isObject(what) {\n return typeof what === 'object' && what !== null;\n}\n\n// Yanked from https://git.io/vS8DV re-used under CC0\n// with some tiny modifications\nfunction isError(value) {\n switch ({}.toString.call(value)) {\n case '[object Error]':\n return true;\n case '[object Exception]':\n return true;\n case '[object DOMException]':\n return true;\n default:\n return value instanceof Error;\n }\n}\n\nfunction isErrorEvent(value) {\n return supportsErrorEvent() && {}.toString.call(value) === '[object ErrorEvent]';\n}\n\nfunction isUndefined(what) {\n return what === void 0;\n}\n\nfunction isFunction(what) {\n return typeof what === 'function';\n}\n\nfunction isString(what) {\n return Object.prototype.toString.call(what) === '[object String]';\n}\n\nfunction isEmptyObject(what) {\n for (var _ in what) return false; // eslint-disable-line guard-for-in, no-unused-vars\n return true;\n}\n\nfunction supportsErrorEvent() {\n try {\n new ErrorEvent(''); // eslint-disable-line no-new\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction wrappedCallback(callback) {\n function dataCallback(data, original) {\n var normalizedData = callback(data) || data;\n if (original) {\n return original(normalizedData) || normalizedData;\n }\n return normalizedData;\n }\n\n return dataCallback;\n}\n\nfunction each(obj, callback) {\n var i, j;\n\n if (isUndefined(obj.length)) {\n for (i in obj) {\n if (hasKey(obj, i)) {\n callback.call(null, i, obj[i]);\n }\n }\n } else {\n j = obj.length;\n if (j) {\n for (i = 0; i < j; i++) {\n callback.call(null, i, obj[i]);\n }\n }\n }\n}\n\nfunction objectMerge(obj1, obj2) {\n if (!obj2) {\n return obj1;\n }\n each(obj2, function(key, value) {\n obj1[key] = value;\n });\n return obj1;\n}\n\n/**\n * This function is only used for react-native.\n * react-native freezes object that have already been sent over the\n * js bridge. We need this function in order to check if the object is frozen.\n * So it's ok that objectFrozen returns false if Object.isFrozen is not\n * supported because it's not relevant for other \"platforms\". See related issue:\n * https://github.com/getsentry/react-native-sentry/issues/57\n */\nfunction objectFrozen(obj) {\n if (!Object.isFrozen) {\n return false;\n }\n return Object.isFrozen(obj);\n}\n\nfunction truncate(str, max) {\n return !max || str.length <= max ? str : str.substr(0, max) + '\\u2026';\n}\n\n/**\n * hasKey, a better form of hasOwnProperty\n * Example: hasKey(MainHostObject, property) === true/false\n *\n * @param {Object} host object to check property\n * @param {string} key to check\n */\nfunction hasKey(object, key) {\n return Object.prototype.hasOwnProperty.call(object, key);\n}\n\nfunction joinRegExp(patterns) {\n // Combine an array of regular expressions and strings into one large regexp\n // Be mad.\n var sources = [],\n i = 0,\n len = patterns.length,\n pattern;\n\n for (; i < len; i++) {\n pattern = patterns[i];\n if (isString(pattern)) {\n // If it's a string, we need to escape it\n // Taken from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions\n sources.push(pattern.replace(/([.*+?^=!:${}()|\\[\\]\\/\\\\])/g, '\\\\$1'));\n } else if (pattern && pattern.source) {\n // If it's a regexp already, we want to extract the source\n sources.push(pattern.source);\n }\n // Intentionally skip other cases\n }\n return new RegExp(sources.join('|'), 'i');\n}\n\nfunction urlencode(o) {\n var pairs = [];\n each(o, function(key, value) {\n pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));\n });\n return pairs.join('&');\n}\n\n// borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n// intentionally using regex and not <a/> href parsing trick because React Native and other\n// environments where DOM might not be available\nfunction parseUrl(url) {\n var match = url.match(/^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n if (!match) return {};\n\n // coerce to undefined values to empty string so we don't get 'undefined'\n var query = match[6] || '';\n var fragment = match[8] || '';\n return {\n protocol: match[2],\n host: match[4],\n path: match[5],\n relative: match[5] + query + fragment // everything minus origin\n };\n}\nfunction uuid4() {\n var crypto = _window.crypto || _window.msCrypto;\n\n if (!isUndefined(crypto) && crypto.getRandomValues) {\n // Use window.crypto API if available\n // eslint-disable-next-line no-undef\n var arr = new Uint16Array(8);\n crypto.getRandomValues(arr);\n\n // set 4 in byte 7\n arr[3] = (arr[3] & 0xfff) | 0x4000;\n // set 2 most significant bits of byte 9 to '10'\n arr[4] = (arr[4] & 0x3fff) | 0x8000;\n\n var pad = function(num) {\n var v = num.toString(16);\n while (v.length < 4) {\n v = '0' + v;\n }\n return v;\n };\n\n return (\n pad(arr[0]) +\n pad(arr[1]) +\n pad(arr[2]) +\n pad(arr[3]) +\n pad(arr[4]) +\n pad(arr[5]) +\n pad(arr[6]) +\n pad(arr[7])\n );\n } else {\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (Math.random() * 16) | 0,\n v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n }\n}\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @param elem\n * @returns {string}\n */\nfunction htmlTreeAsString(elem) {\n /* eslint no-extra-parens:0*/\n var MAX_TRAVERSE_HEIGHT = 5,\n MAX_OUTPUT_LEN = 80,\n out = [],\n height = 0,\n len = 0,\n separator = ' > ',\n sepLength = separator.length,\n nextStr;\n\n while (elem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = htmlElementAsString(elem);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds MAX_OUTPUT_LEN\n // (ignore this limit if we are on the first iteration)\n if (\n nextStr === 'html' ||\n (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)\n ) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n elem = elem.parentNode;\n }\n\n return out.reverse().join(separator);\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @param HTMLElement\n * @returns {string}\n */\nfunction htmlElementAsString(elem) {\n var out = [],\n className,\n classes,\n key,\n attr,\n i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n out.push(elem.tagName.toLowerCase());\n if (elem.id) {\n out.push('#' + elem.id);\n }\n\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push('.' + classes[i]);\n }\n }\n var attrWhitelist = ['type', 'name', 'title', 'alt'];\n for (i = 0; i < attrWhitelist.length; i++) {\n key = attrWhitelist[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push('[' + key + '=\"' + attr + '\"]');\n }\n }\n return out.join('');\n}\n\n/**\n * Returns true if either a OR b is truthy, but not both\n */\nfunction isOnlyOneTruthy(a, b) {\n return !!(!!a ^ !!b);\n}\n\n/**\n * Returns true if the two input exception interfaces have the same content\n */\nfunction isSameException(ex1, ex2) {\n if (isOnlyOneTruthy(ex1, ex2)) return false;\n\n ex1 = ex1.values[0];\n ex2 = ex2.values[0];\n\n if (ex1.type !== ex2.type || ex1.value !== ex2.value) return false;\n\n return isSameStacktrace(ex1.stacktrace, ex2.stacktrace);\n}\n\n/**\n * Returns true if the two input stack trace interfaces have the same content\n */\nfunction isSameStacktrace(stack1, stack2) {\n if (isOnlyOneTruthy(stack1, stack2)) return false;\n\n var frames1 = stack1.frames;\n var frames2 = stack2.frames;\n\n // Exit early if frame count differs\n if (frames1.length !== frames2.length) return false;\n\n // Iterate through every frame; bail out if anything differs\n var a, b;\n for (var i = 0; i < frames1.length; i++) {\n a = frames1[i];\n b = frames2[i];\n if (\n a.filename !== b.filename ||\n a.lineno !== b.lineno ||\n a.colno !== b.colno ||\n a['function'] !== b['function']\n )\n return false;\n }\n return true;\n}\n\n/**\n * Polyfill a method\n * @param obj object e.g. `document`\n * @param name method name present on object e.g. `addEventListener`\n * @param replacement replacement function\n * @param track {optional} record instrumentation to an array\n */\nfunction fill(obj, name, replacement, track) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (track) {\n track.push([obj, name, orig]);\n }\n}\n\nmodule.exports = {\n isObject: isObject,\n isError: isError,\n isErrorEvent: isErrorEvent,\n isUndefined: isUndefined,\n isFunction: isFunction,\n isString: isString,\n isEmptyObject: isEmptyObject,\n supportsErrorEvent: supportsErrorEvent,\n wrappedCallback: wrappedCallback,\n each: each,\n objectMerge: objectMerge,\n truncate: truncate,\n objectFrozen: objectFrozen,\n hasKey: hasKey,\n joinRegExp: joinRegExp,\n urlencode: urlencode,\n uuid4: uuid4,\n htmlTreeAsString: htmlTreeAsString,\n htmlElementAsString: htmlElementAsString,\n isSameException: isSameException,\n isSameStacktrace: isSameStacktrace,\n parseUrl: parseUrl,\n fill: fill\n};\n","/*global XDomainRequest:false */\n\nvar TraceKit = require('../vendor/TraceKit/tracekit');\nvar stringify = require('../vendor/json-stringify-safe/stringify');\nvar RavenConfigError = require('./configError');\n\nvar utils = require('./utils');\nvar isError = utils.isError;\nvar isObject = utils.isObject;\nvar isObject = utils.isObject;\nvar isErrorEvent = utils.isErrorEvent;\nvar isUndefined = utils.isUndefined;\nvar isFunction = utils.isFunction;\nvar isString = utils.isString;\nvar isEmptyObject = utils.isEmptyObject;\nvar each = utils.each;\nvar objectMerge = utils.objectMerge;\nvar truncate = utils.truncate;\nvar objectFrozen = utils.objectFrozen;\nvar hasKey = utils.hasKey;\nvar joinRegExp = utils.joinRegExp;\nvar urlencode = utils.urlencode;\nvar uuid4 = utils.uuid4;\nvar htmlTreeAsString = utils.htmlTreeAsString;\nvar isSameException = utils.isSameException;\nvar isSameStacktrace = utils.isSameStacktrace;\nvar parseUrl = utils.parseUrl;\nvar fill = utils.fill;\n\nvar wrapConsoleMethod = require('./console').wrapMethod;\n\nvar dsnKeys = 'source protocol user pass host port path'.split(' '),\n dsnPattern = /^(?:(\\w+):)?\\/\\/(?:(\\w+)(:\\w+)?@)?([\\w\\.-]+)(?::(\\d+))?(\\/.*)/;\n\nfunction now() {\n return +new Date();\n}\n\n// This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)\nvar _window =\n typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\nvar _document = _window.document;\nvar _navigator = _window.navigator;\n\nfunction keepOriginalCallback(original, callback) {\n return isFunction(callback)\n ? function(data) {\n return callback(data, original);\n }\n : callback;\n}\n\n// First, check for JSON support\n// If there is no JSON, we no-op the core features of Raven\n// since JSON is required to encode the payload\nfunction Raven() {\n this._hasJSON = !!(typeof JSON === 'object' && JSON.stringify);\n // Raven can run in contexts where there's no document (react-native)\n this._hasDocument = !isUndefined(_document);\n this._hasNavigator = !isUndefined(_navigator);\n this._lastCapturedException = null;\n this._lastData = null;\n this._lastEventId = null;\n this._globalServer = null;\n this._globalKey = null;\n this._globalProject = null;\n this._globalContext = {};\n this._globalOptions = {\n logger: 'javascript',\n ignoreErrors: [],\n ignoreUrls: [],\n whitelistUrls: [],\n includePaths: [],\n collectWindowErrors: true,\n maxMessageLength: 0,\n\n // By default, truncates URL values to 250 chars\n maxUrlLength: 250,\n stackTraceLimit: 50,\n autoBreadcrumbs: true,\n instrument: true,\n sampleRate: 1\n };\n this._ignoreOnError = 0;\n this._isRavenInstalled = false;\n this._originalErrorStackTraceLimit = Error.stackTraceLimit;\n // capture references to window.console *and* all its methods first\n // before the console plugin has a chance to monkey patch\n this._originalConsole = _window.console || {};\n this._originalConsoleMethods = {};\n this._plugins = [];\n this._startTime = now();\n this._wrappedBuiltIns = [];\n this._breadcrumbs = [];\n this._lastCapturedEvent = null;\n this._keypressTimeout;\n this._location = _window.location;\n this._lastHref = this._location && this._location.href;\n this._resetBackoff();\n\n // eslint-disable-next-line guard-for-in\n for (var method in this._originalConsole) {\n this._originalConsoleMethods[method] = this._originalConsole[method];\n }\n}\n\n/*\n * The core Raven singleton\n *\n * @this {Raven}\n */\n\nRaven.prototype = {\n // Hardcode version string so that raven source can be loaded directly via\n // webpack (using a build step causes webpack #1617). Grunt verifies that\n // this value matches package.json during build.\n // See: https://github.com/getsentry/raven-js/issues/465\n VERSION: '3.19.1',\n\n debug: false,\n\n TraceKit: TraceKit, // alias to TraceKit\n\n /*\n * Configure Raven with a DSN and extra options\n *\n * @param {string} dsn The public Sentry DSN\n * @param {object} options Set of global options [optional]\n * @return {Raven}\n */\n config: function(dsn, options) {\n var self = this;\n\n if (self._globalServer) {\n this._logDebug('error', 'Error: Raven has already been configured');\n return self;\n }\n if (!dsn) return self;\n\n var globalOptions = self._globalOptions;\n\n // merge in options\n if (options) {\n each(options, function(key, value) {\n // tags and extra are special and need to be put into context\n if (key === 'tags' || key === 'extra' || key === 'user') {\n self._globalContext[key] = value;\n } else {\n globalOptions[key] = value;\n }\n });\n }\n\n self.setDSN(dsn);\n\n // \"Script error.\" is hard coded into browsers for errors that it can't read.\n // this is the result of a script being pulled in from an external domain and CORS.\n globalOptions.ignoreErrors.push(/^Script error\\.?$/);\n globalOptions.ignoreErrors.push(/^Javascript error: Script error\\.? on line 0$/);\n\n // join regexp rules into one big rule\n globalOptions.ignoreErrors = joinRegExp(globalOptions.ignoreErrors);\n globalOptions.ignoreUrls = globalOptions.ignoreUrls.length\n ? joinRegExp(globalOptions.ignoreUrls)\n : false;\n globalOptions.whitelistUrls = globalOptions.whitelistUrls.length\n ? joinRegExp(globalOptions.whitelistUrls)\n : false;\n globalOptions.includePaths = joinRegExp(globalOptions.includePaths);\n globalOptions.maxBreadcrumbs = Math.max(\n 0,\n Math.min(globalOptions.maxBreadcrumbs || 100, 100)\n ); // default and hard limit is 100\n\n var autoBreadcrumbDefaults = {\n xhr: true,\n console: true,\n dom: true,\n location: true\n };\n\n var autoBreadcrumbs = globalOptions.autoBreadcrumbs;\n if ({}.toString.call(autoBreadcrumbs) === '[object Object]') {\n autoBreadcrumbs = objectMerge(autoBreadcrumbDefaults, autoBreadcrumbs);\n } else if (autoBreadcrumbs !== false) {\n autoBreadcrumbs = autoBreadcrumbDefaults;\n }\n globalOptions.autoBreadcrumbs = autoBreadcrumbs;\n\n var instrumentDefaults = {\n tryCatch: true\n };\n\n var instrument = globalOptions.instrument;\n if ({}.toString.call(instrument) === '[object Object]') {\n instrument = objectMerge(instrumentDefaults, instrument);\n } else if (instrument !== false) {\n instrument = instrumentDefaults;\n }\n globalOptions.instrument = instrument;\n\n TraceKit.collectWindowErrors = !!globalOptions.collectWindowErrors;\n\n // return for chaining\n return self;\n },\n\n /*\n * Installs a global window.onerror error handler\n * to capture and report uncaught exceptions.\n * At this point, install() is required to be called due\n * to the way TraceKit is set up.\n *\n * @return {Raven}\n */\n install: function() {\n var self = this;\n if (self.isSetup() && !self._isRavenInstalled) {\n TraceKit.report.subscribe(function() {\n self._handleOnErrorStackInfo.apply(self, arguments);\n });\n if (self._globalOptions.instrument && self._globalOptions.instrument.tryCatch) {\n self._instrumentTryCatch();\n }\n\n if (self._globalOptions.autoBreadcrumbs) self._instrumentBreadcrumbs();\n\n // Install all of the plugins\n self._drainPlugins();\n\n self._isRavenInstalled = true;\n }\n\n Error.stackTraceLimit = self._globalOptions.stackTraceLimit;\n return this;\n },\n\n /*\n * Set the DSN (can be called multiple time unlike config)\n *\n * @param {string} dsn The public Sentry DSN\n */\n setDSN: function(dsn) {\n var self = this,\n uri = self._parseDSN(dsn),\n lastSlash = uri.path.lastIndexOf('/'),\n path = uri.path.substr(1, lastSlash);\n\n self._dsn = dsn;\n self._globalKey = uri.user;\n self._globalSecret = uri.pass && uri.pass.substr(1);\n self._globalProject = uri.path.substr(lastSlash + 1);\n\n self._globalServer = self._getGlobalServer(uri);\n\n self._globalEndpoint =\n self._globalServer + '/' + path + 'api/' + self._globalProject + '/store/';\n\n // Reset backoff state since we may be pointing at a\n // new project/server\n this._resetBackoff();\n },\n\n /*\n * Wrap code within a context so Raven can capture errors\n * reliably across domains that is executed immediately.\n *\n * @param {object} options A specific set of options for this context [optional]\n * @param {function} func The callback to be immediately executed within the context\n * @param {array} args An array of arguments to be called with the callback [optional]\n */\n context: function(options, func, args) {\n if (isFunction(options)) {\n args = func || [];\n func = options;\n options = undefined;\n }\n\n return this.wrap(options, func).apply(this, args);\n },\n\n /*\n * Wrap code within a context and returns back a new function to be executed\n *\n * @param {object} options A specific set of options for this context [optional]\n * @param {function} func The function to be wrapped in a new context\n * @param {function} func A function to call before the try/catch wrapper [optional, private]\n * @return {function} The newly wrapped functions with a context\n */\n wrap: function(options, func, _before) {\n var self = this;\n // 1 argument has been passed, and it's not a function\n // so just return it\n if (isUndefined(func) && !isFunction(options)) {\n return options;\n }\n\n // options is optional\n if (isFunction(options)) {\n func = options;\n options = undefined;\n }\n\n // At this point, we've passed along 2 arguments, and the second one\n // is not a function either, so we'll just return the second argument.\n if (!isFunction(func)) {\n return func;\n }\n\n // We don't wanna wrap it twice!\n try {\n if (func.__raven__) {\n return func;\n }\n\n // If this has already been wrapped in the past, return that\n if (func.__raven_wrapper__) {\n return func.__raven_wrapper__;\n }\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return func;\n }\n\n function wrapped() {\n var args = [],\n i = arguments.length,\n deep = !options || (options && options.deep !== false);\n\n if (_before && isFunction(_before)) {\n _before.apply(this, arguments);\n }\n\n // Recursively wrap all of a function's arguments that are\n // functions themselves.\n while (i--) args[i] = deep ? self.wrap(options, arguments[i]) : arguments[i];\n\n try {\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means Raven caught an error invoking your application code. This is\n // expected behavior and NOT indicative of a bug with Raven.js.\n return func.apply(this, args);\n } catch (e) {\n self._ignoreNextOnError();\n self.captureException(e, options);\n throw e;\n }\n }\n\n // copy over properties of the old function\n for (var property in func) {\n if (hasKey(func, property)) {\n wrapped[property] = func[property];\n }\n }\n wrapped.prototype = func.prototype;\n\n func.__raven_wrapper__ = wrapped;\n // Signal that this function has been wrapped already\n // for both debugging and to prevent it to being wrapped twice\n wrapped.__raven__ = true;\n wrapped.__inner__ = func;\n\n return wrapped;\n },\n\n /*\n * Uninstalls the global error handler.\n *\n * @return {Raven}\n */\n uninstall: function() {\n TraceKit.report.uninstall();\n\n this._restoreBuiltIns();\n\n Error.stackTraceLimit = this._originalErrorStackTraceLimit;\n this._isRavenInstalled = false;\n\n return this;\n },\n\n /*\n * Manually capture an exception and send it over to Sentry\n *\n * @param {error} ex An exception to be logged\n * @param {object} options A specific set of options for this error [optional]\n * @return {Raven}\n */\n captureException: function(ex, options) {\n // Cases for sending ex as a message, rather than an exception\n var isNotError = !isError(ex);\n var isNotErrorEvent = !isErrorEvent(ex);\n var isErrorEventWithoutError = isErrorEvent(ex) && !ex.error;\n\n if ((isNotError && isNotErrorEvent) || isErrorEventWithoutError) {\n return this.captureMessage(\n ex,\n objectMerge(\n {\n trimHeadFrames: 1,\n stacktrace: true // if we fall back to captureMessage, default to attempting a new trace\n },\n options\n )\n );\n }\n\n // Get actual Error from ErrorEvent\n if (isErrorEvent(ex)) ex = ex.error;\n\n // Store the raw exception object for potential debugging and introspection\n this._lastCapturedException = ex;\n\n // TraceKit.report will re-raise any exception passed to it,\n // which means you have to wrap it in try/catch. Instead, we\n // can wrap it here and only re-raise if TraceKit.report\n // raises an exception different from the one we asked to\n // report on.\n try {\n var stack = TraceKit.computeStackTrace(ex);\n this._handleStackInfo(stack, options);\n } catch (ex1) {\n if (ex !== ex1) {\n throw ex1;\n }\n }\n\n return this;\n },\n\n /*\n * Manually send a message to Sentry\n *\n * @param {string} msg A plain message to be captured in Sentry\n * @param {object} options A specific set of options for this message [optional]\n * @return {Raven}\n */\n captureMessage: function(msg, options) {\n // config() automagically converts ignoreErrors from a list to a RegExp so we need to test for an\n // early call; we'll error on the side of logging anything called before configuration since it's\n // probably something you should see:\n if (\n !!this._globalOptions.ignoreErrors.test &&\n this._globalOptions.ignoreErrors.test(msg)\n ) {\n return;\n }\n\n options = options || {};\n\n var data = objectMerge(\n {\n message: msg + '' // Make sure it's actually a string\n },\n options\n );\n\n var ex;\n // Generate a \"synthetic\" stack trace from this point.\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it is NOT indicative\n // of a bug with Raven.js. Sentry generates synthetic traces either by configuration,\n // or if it catches a thrown object without a \"stack\" property.\n try {\n throw new Error(msg);\n } catch (ex1) {\n ex = ex1;\n }\n\n // null exception name so `Error` isn't prefixed to msg\n ex.name = null;\n var stack = TraceKit.computeStackTrace(ex);\n\n // stack[0] is `throw new Error(msg)` call itself, we are interested in the frame that was just before that, stack[1]\n var initialCall = stack.stack[1];\n\n var fileurl = (initialCall && initialCall.url) || '';\n\n if (\n !!this._globalOptions.ignoreUrls.test &&\n this._globalOptions.ignoreUrls.test(fileurl)\n ) {\n return;\n }\n\n if (\n !!this._globalOptions.whitelistUrls.test &&\n !this._globalOptions.whitelistUrls.test(fileurl)\n ) {\n return;\n }\n\n if (this._globalOptions.stacktrace || (options && options.stacktrace)) {\n options = objectMerge(\n {\n // fingerprint on msg, not stack trace (legacy behavior, could be\n // revisited)\n fingerprint: msg,\n // since we know this is a synthetic trace, the top N-most frames\n // MUST be from Raven.js, so mark them as in_app later by setting\n // trimHeadFrames\n trimHeadFrames: (options.trimHeadFrames || 0) + 1\n },\n options\n );\n\n var frames = this._prepareFrames(stack, options);\n data.stacktrace = {\n // Sentry expects frames oldest to newest\n frames: frames.reverse()\n };\n }\n\n // Fire away!\n this._send(data);\n\n return this;\n },\n\n captureBreadcrumb: function(obj) {\n var crumb = objectMerge(\n {\n timestamp: now() / 1000\n },\n obj\n );\n\n if (isFunction(this._globalOptions.breadcrumbCallback)) {\n var result = this._globalOptions.breadcrumbCallback(crumb);\n\n if (isObject(result) && !isEmptyObject(result)) {\n crumb = result;\n } else if (result === false) {\n return this;\n }\n }\n\n this._breadcrumbs.push(crumb);\n if (this._breadcrumbs.length > this._globalOptions.maxBreadcrumbs) {\n this._breadcrumbs.shift();\n }\n return this;\n },\n\n addPlugin: function(plugin /*arg1, arg2, ... argN*/) {\n var pluginArgs = [].slice.call(arguments, 1);\n\n this._plugins.push([plugin, pluginArgs]);\n if (this._isRavenInstalled) {\n this._drainPlugins();\n }\n\n return this;\n },\n\n /*\n * Set/clear a user to be sent along with the payload.\n *\n * @param {object} user An object representing user data [optional]\n * @return {Raven}\n */\n setUserContext: function(user) {\n // Intentionally do not merge here since that's an unexpected behavior.\n this._globalContext.user = user;\n\n return this;\n },\n\n /*\n * Merge extra attributes to be sent along with the payload.\n *\n * @param {object} extra An object representing extra data [optional]\n * @return {Raven}\n */\n setExtraContext: function(extra) {\n this._mergeContext('extra', extra);\n\n return this;\n },\n\n /*\n * Merge tags to be sent along with the payload.\n *\n * @param {object} tags An object representing tags [optional]\n * @return {Raven}\n */\n setTagsContext: function(tags) {\n this._mergeContext('tags', tags);\n\n return this;\n },\n\n /*\n * Clear all of the context.\n *\n * @return {Raven}\n */\n clearContext: function() {\n this._globalContext = {};\n\n return this;\n },\n\n /*\n * Get a copy of the current context. This cannot be mutated.\n *\n * @return {object} copy of context\n */\n getContext: function() {\n // lol javascript\n return JSON.parse(stringify(this._globalContext));\n },\n\n /*\n * Set environment of application\n *\n * @param {string} environment Typically something like 'production'.\n * @return {Raven}\n */\n setEnvironment: function(environment) {\n this._globalOptions.environment = environment;\n\n return this;\n },\n\n /*\n * Set release version of application\n *\n * @param {string} release Typically something like a git SHA to identify version\n * @return {Raven}\n */\n setRelease: function(release) {\n this._globalOptions.release = release;\n\n return this;\n },\n\n /*\n * Set the dataCallback option\n *\n * @param {function} callback The callback to run which allows the\n * data blob to be mutated before sending\n * @return {Raven}\n */\n setDataCallback: function(callback) {\n var original = this._globalOptions.dataCallback;\n this._globalOptions.dataCallback = keepOriginalCallback(original, callback);\n return this;\n },\n\n /*\n * Set the breadcrumbCallback option\n *\n * @param {function} callback The callback to run which allows filtering\n * or mutating breadcrumbs\n * @return {Raven}\n */\n setBreadcrumbCallback: function(callback) {\n var original = this._globalOptions.breadcrumbCallback;\n this._globalOptions.breadcrumbCallback = keepOriginalCallback(original, callback);\n return this;\n },\n\n /*\n * Set the shouldSendCallback option\n *\n * @param {function} callback The callback to run which allows\n * introspecting the blob before sending\n * @return {Raven}\n */\n setShouldSendCallback: function(callback) {\n var original = this._globalOptions.shouldSendCallback;\n this._globalOptions.shouldSendCallback = keepOriginalCallback(original, callback);\n return this;\n },\n\n /**\n * Override the default HTTP transport mechanism that transmits data\n * to the Sentry server.\n *\n * @param {function} transport Function invoked instead of the default\n * `makeRequest` handler.\n *\n * @return {Raven}\n */\n setTransport: function(transport) {\n this._globalOptions.transport = transport;\n\n return this;\n },\n\n /*\n * Get the latest raw exception that was captured by Raven.\n *\n * @return {error}\n */\n lastException: function() {\n return this._lastCapturedException;\n },\n\n /*\n * Get the last event id\n *\n * @return {string}\n */\n lastEventId: function() {\n return this._lastEventId;\n },\n\n /*\n * Determine if Raven is setup and ready to go.\n *\n * @return {boolean}\n */\n isSetup: function() {\n if (!this._hasJSON) return false; // needs JSON support\n if (!this._globalServer) {\n if (!this.ravenNotConfiguredError) {\n this.ravenNotConfiguredError = true;\n this._logDebug('error', 'Error: Raven has not been configured.');\n }\n return false;\n }\n return true;\n },\n\n afterLoad: function() {\n // TODO: remove window dependence?\n\n // Attempt to initialize Raven on load\n var RavenConfig = _window.RavenConfig;\n if (RavenConfig) {\n this.config(RavenConfig.dsn, RavenConfig.config).install();\n }\n },\n\n showReportDialog: function(options) {\n if (\n !_document // doesn't work without a document (React native)\n )\n return;\n\n options = options || {};\n\n var lastEventId = options.eventId || this.lastEventId();\n if (!lastEventId) {\n throw new RavenConfigError('Missing eventId');\n }\n\n var dsn = options.dsn || this._dsn;\n if (!dsn) {\n throw new RavenConfigError('Missing DSN');\n }\n\n var encode = encodeURIComponent;\n var qs = '';\n qs += '?eventId=' + encode(lastEventId);\n qs += '&dsn=' + encode(dsn);\n\n var user = options.user || this._globalContext.user;\n if (user) {\n if (user.name) qs += '&name=' + encode(user.name);\n if (user.email) qs += '&email=' + encode(user.email);\n }\n\n var globalServer = this._getGlobalServer(this._parseDSN(dsn));\n\n var script = _document.createElement('script');\n script.async = true;\n script.src = globalServer + '/api/embed/error-page/' + qs;\n (_document.head || _document.body).appendChild(script);\n },\n\n /**** Private functions ****/\n _ignoreNextOnError: function() {\n var self = this;\n this._ignoreOnError += 1;\n setTimeout(function() {\n // onerror should trigger before setTimeout\n self._ignoreOnError -= 1;\n });\n },\n\n _triggerEvent: function(eventType, options) {\n // NOTE: `event` is a native browser thing, so let's avoid conflicting wiht it\n var evt, key;\n\n if (!this._hasDocument) return;\n\n options = options || {};\n\n eventType = 'raven' + eventType.substr(0, 1).toUpperCase() + eventType.substr(1);\n\n if (_document.createEvent) {\n evt = _document.createEvent('HTMLEvents');\n evt.initEvent(eventType, true, true);\n } else {\n evt = _document.createEventObject();\n evt.eventType = eventType;\n }\n\n for (key in options)\n if (hasKey(options, key)) {\n evt[key] = options[key];\n }\n\n if (_document.createEvent) {\n // IE9 if standards\n _document.dispatchEvent(evt);\n } else {\n // IE8 regardless of Quirks or Standards\n // IE9 if quirks\n try {\n _document.fireEvent('on' + evt.eventType.toLowerCase(), evt);\n } catch (e) {\n // Do nothing\n }\n }\n },\n\n /**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param evtName the event name (e.g. \"click\")\n * @returns {Function}\n * @private\n */\n _breadcrumbEventHandler: function(evtName) {\n var self = this;\n return function(evt) {\n // reset keypress timeout; e.g. triggering a 'click' after\n // a 'keypress' will reset the keypress debounce so that a new\n // set of keypresses can be recorded\n self._keypressTimeout = null;\n\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors). Ignore if we've\n // already captured the event.\n if (self._lastCapturedEvent === evt) return;\n\n self._lastCapturedEvent = evt;\n\n // try/catch both:\n // - accessing evt.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // can throw an exception in some circumstances.\n var target;\n try {\n target = htmlTreeAsString(evt.target);\n } catch (e) {\n target = '<unknown>';\n }\n\n self.captureBreadcrumb({\n category: 'ui.' + evtName, // e.g. ui.click, ui.input\n message: target\n });\n };\n },\n\n /**\n * Wraps addEventListener to capture keypress UI events\n * @returns {Function}\n * @private\n */\n _keypressEventHandler: function() {\n var self = this,\n debounceDuration = 1000; // milliseconds\n\n // TODO: if somehow user switches keypress target before\n // debounce timeout is triggered, we will only capture\n // a single breadcrumb from the FIRST target (acceptable?)\n return function(evt) {\n var target;\n try {\n target = evt.target;\n } catch (e) {\n // just accessing event properties can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/raven-js/issues/838\n return;\n }\n var tagName = target && target.tagName;\n\n // only consider keypress events on actual input elements\n // this will disregard keypresses targeting body (e.g. tabbing\n // through elements, hotkeys, etc)\n if (\n !tagName ||\n (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !target.isContentEditable)\n )\n return;\n\n // record first keypress in a series, but ignore subsequent\n // keypresses until debounce clears\n var timeout = self._keypressTimeout;\n if (!timeout) {\n self._breadcrumbEventHandler('input')(evt);\n }\n clearTimeout(timeout);\n self._keypressTimeout = setTimeout(function() {\n self._keypressTimeout = null;\n }, debounceDuration);\n };\n },\n\n /**\n * Captures a breadcrumb of type \"navigation\", normalizing input URLs\n * @param to the originating URL\n * @param from the target URL\n * @private\n */\n _captureUrlChange: function(from, to) {\n var parsedLoc = parseUrl(this._location.href);\n var parsedTo = parseUrl(to);\n var parsedFrom = parseUrl(from);\n\n // because onpopstate only tells you the \"new\" (to) value of location.href, and\n // not the previous (from) value, we need to track the value of the current URL\n // state ourselves\n this._lastHref = to;\n\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host)\n to = parsedTo.relative;\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host)\n from = parsedFrom.relative;\n\n this.captureBreadcrumb({\n category: 'navigation',\n data: {\n to: to,\n from: from\n }\n });\n },\n\n /**\n * Wrap timer functions and event targets to catch errors and provide\n * better metadata.\n */\n _instrumentTryCatch: function() {\n var self = this;\n\n var wrappedBuiltIns = self._wrappedBuiltIns;\n\n function wrapTimeFn(orig) {\n return function(fn, t) {\n // preserve arity\n // Make a copy of the arguments to prevent deoptimization\n // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; ++i) {\n args[i] = arguments[i];\n }\n var originalCallback = args[0];\n if (isFunction(originalCallback)) {\n args[0] = self.wrap(originalCallback);\n }\n\n // IE < 9 doesn't support .call/.apply on setInterval/setTimeout, but it\n // also supports only two arguments and doesn't care what this is, so we\n // can just call the original function directly.\n if (orig.apply) {\n return orig.apply(this, args);\n } else {\n return orig(args[0], args[1]);\n }\n };\n }\n\n var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;\n\n function wrapEventTarget(global) {\n var proto = _window[global] && _window[global].prototype;\n if (proto && proto.hasOwnProperty && proto.hasOwnProperty('addEventListener')) {\n fill(\n proto,\n 'addEventListener',\n function(orig) {\n return function(evtName, fn, capture, secure) {\n // preserve arity\n try {\n if (fn && fn.handleEvent) {\n fn.handleEvent = self.wrap(fn.handleEvent);\n }\n } catch (err) {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n\n // More breadcrumb DOM capture ... done here and not in `_instrumentBreadcrumbs`\n // so that we don't have more than one wrapper function\n var before, clickHandler, keypressHandler;\n\n if (\n autoBreadcrumbs &&\n autoBreadcrumbs.dom &&\n (global === 'EventTarget' || global === 'Node')\n ) {\n // NOTE: generating multiple handlers per addEventListener invocation, should\n // revisit and verify we can just use one (almost certainly)\n clickHandler = self._breadcrumbEventHandler('click');\n keypressHandler = self._keypressEventHandler();\n before = function(evt) {\n // need to intercept every DOM event in `before` argument, in case that\n // same wrapped method is re-used for different events (e.g. mousemove THEN click)\n // see #724\n if (!evt) return;\n\n var eventType;\n try {\n eventType = evt.type;\n } catch (e) {\n // just accessing event properties can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/raven-js/issues/838\n return;\n }\n if (eventType === 'click') return clickHandler(evt);\n else if (eventType === 'keypress') return keypressHandler(evt);\n };\n }\n return orig.call(\n this,\n evtName,\n self.wrap(fn, undefined, before),\n capture,\n secure\n );\n };\n },\n wrappedBuiltIns\n );\n fill(\n proto,\n 'removeEventListener',\n function(orig) {\n return function(evt, fn, capture, secure) {\n try {\n fn = fn && (fn.__raven_wrapper__ ? fn.__raven_wrapper__ : fn);\n } catch (e) {\n // ignore, accessing __raven_wrapper__ will throw in some Selenium environments\n }\n return orig.call(this, evt, fn, capture, secure);\n };\n },\n wrappedBuiltIns\n );\n }\n }\n\n fill(_window, 'setTimeout', wrapTimeFn, wrappedBuiltIns);\n fill(_window, 'setInterval', wrapTimeFn, wrappedBuiltIns);\n if (_window.requestAnimationFrame) {\n fill(\n _window,\n 'requestAnimationFrame',\n function(orig) {\n return function(cb) {\n return orig(self.wrap(cb));\n };\n },\n wrappedBuiltIns\n );\n }\n\n // event targets borrowed from bugsnag-js:\n // https://github.com/bugsnag/bugsnag-js/blob/master/src/bugsnag.js#L666\n var eventTargets = [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload'\n ];\n for (var i = 0; i < eventTargets.length; i++) {\n wrapEventTarget(eventTargets[i]);\n }\n },\n\n /**\n * Instrument browser built-ins w/ breadcrumb capturing\n * - XMLHttpRequests\n * - DOM interactions (click/typing)\n * - window.location changes\n * - console\n *\n * Can be disabled or individually configured via the `autoBreadcrumbs` config option\n */\n _instrumentBreadcrumbs: function() {\n var self = this;\n var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;\n\n var wrappedBuiltIns = self._wrappedBuiltIns;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && isFunction(xhr[prop])) {\n fill(xhr, prop, function(orig) {\n return self.wrap(orig);\n }); // intentionally don't track filled methods on XHR instances\n }\n }\n\n if (autoBreadcrumbs.xhr && 'XMLHttpRequest' in _window) {\n var xhrproto = XMLHttpRequest.prototype;\n fill(\n xhrproto,\n 'open',\n function(origOpen) {\n return function(method, url) {\n // preserve arity\n\n // if Sentry key appears in URL, don't capture\n if (isString(url) && url.indexOf(self._globalKey) === -1) {\n this.__raven_xhr = {\n method: method,\n url: url,\n status_code: null\n };\n }\n\n return origOpen.apply(this, arguments);\n };\n },\n wrappedBuiltIns\n );\n\n fill(\n xhrproto,\n 'send',\n function(origSend) {\n return function(data) {\n // preserve arity\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__raven_xhr && xhr.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n xhr.__raven_xhr.status_code = xhr.status;\n } catch (e) {\n /* do nothing */\n }\n\n self.captureBreadcrumb({\n type: 'http',\n category: 'xhr',\n data: xhr.__raven_xhr\n });\n }\n }\n\n var props = ['onload', 'onerror', 'onprogress'];\n for (var j = 0; j < props.length; j++) {\n wrapProp(props[j], xhr);\n }\n\n if ('onreadystatechange' in xhr && isFunction(xhr.onreadystatechange)) {\n fill(\n xhr,\n 'onreadystatechange',\n function(orig) {\n return self.wrap(orig, undefined, onreadystatechangeHandler);\n } /* intentionally don't track this instrumentation */\n );\n } else {\n // if onreadystatechange wasn't actually set by the page on this xhr, we\n // are free to set our own and capture the breadcrumb\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n\n return origSend.apply(this, arguments);\n };\n },\n wrappedBuiltIns\n );\n }\n\n if (autoBreadcrumbs.xhr && 'fetch' in _window) {\n fill(\n _window,\n 'fetch',\n function(origFetch) {\n return function(fn, t) {\n // preserve arity\n // Make a copy of the arguments to prevent deoptimization\n // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; ++i) {\n args[i] = arguments[i];\n }\n\n var fetchInput = args[0];\n var method = 'GET';\n var url;\n\n if (typeof fetchInput === 'string') {\n url = fetchInput;\n } else if ('Request' in _window && fetchInput instanceof _window.Request) {\n url = fetchInput.url;\n if (fetchInput.method) {\n method = fetchInput.method;\n }\n } else {\n url = '' + fetchInput;\n }\n\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n\n var fetchData = {\n method: method,\n url: url,\n status_code: null\n };\n\n self.captureBreadcrumb({\n type: 'http',\n category: 'fetch',\n data: fetchData\n });\n\n return origFetch.apply(this, args).then(function(response) {\n fetchData.status_code = response.status;\n\n return response;\n });\n };\n },\n wrappedBuiltIns\n );\n }\n\n // Capture breadcrumbs from any click that is unhandled / bubbled up all the way\n // to the document. Do this before we instrument addEventListener.\n if (autoBreadcrumbs.dom && this._hasDocument) {\n if (_document.addEventListener) {\n _document.addEventListener('click', self._breadcrumbEventHandler('click'), false);\n _document.addEventListener('keypress', self._keypressEventHandler(), false);\n } else {\n // IE8 Compatibility\n _document.attachEvent('onclick', self._breadcrumbEventHandler('click'));\n _document.attachEvent('onkeypress', self._keypressEventHandler());\n }\n }\n\n // record navigation (URL) changes\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n var chrome = _window.chrome;\n var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n var hasPushAndReplaceState =\n !isChromePackagedApp &&\n _window.history &&\n history.pushState &&\n history.replaceState;\n if (autoBreadcrumbs.location && hasPushAndReplaceState) {\n // TODO: remove onpopstate handler on uninstall()\n var oldOnPopState = _window.onpopstate;\n _window.onpopstate = function() {\n var currentHref = self._location.href;\n self._captureUrlChange(self._lastHref, currentHref);\n\n if (oldOnPopState) {\n return oldOnPopState.apply(this, arguments);\n }\n };\n\n var historyReplacementFunction = function(origHistFunction) {\n // note history.pushState.length is 0; intentionally not declaring\n // params to preserve 0 arity\n return function(/* state, title, url */) {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n\n // url argument is optional\n if (url) {\n // coerce to string (this is what pushState does)\n self._captureUrlChange(self._lastHref, url + '');\n }\n\n return origHistFunction.apply(this, arguments);\n };\n };\n\n fill(history, 'pushState', historyReplacementFunction, wrappedBuiltIns);\n fill(history, 'replaceState', historyReplacementFunction, wrappedBuiltIns);\n }\n\n if (autoBreadcrumbs.console && 'console' in _window && console.log) {\n // console\n var consoleMethodCallback = function(msg, data) {\n self.captureBreadcrumb({\n message: msg,\n level: data.level,\n category: 'console'\n });\n };\n\n each(['debug', 'info', 'warn', 'error', 'log'], function(_, level) {\n wrapConsoleMethod(console, level, consoleMethodCallback);\n });\n }\n },\n\n _restoreBuiltIns: function() {\n // restore any wrapped builtins\n var builtin;\n while (this._wrappedBuiltIns.length) {\n builtin = this._wrappedBuiltIns.shift();\n\n var obj = builtin[0],\n name = builtin[1],\n orig = builtin[2];\n\n obj[name] = orig;\n }\n },\n\n _drainPlugins: function() {\n var self = this;\n\n // FIX ME TODO\n each(this._plugins, function(_, plugin) {\n var installer = plugin[0];\n var args = plugin[1];\n installer.apply(self, [self].concat(args));\n });\n },\n\n _parseDSN: function(str) {\n var m = dsnPattern.exec(str),\n dsn = {},\n i = 7;\n\n try {\n while (i--) dsn[dsnKeys[i]] = m[i] || '';\n } catch (e) {\n throw new RavenConfigError('Invalid DSN: ' + str);\n }\n\n if (dsn.pass && !this._globalOptions.allowSecretKey) {\n throw new RavenConfigError(\n 'Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key'\n );\n }\n\n return dsn;\n },\n\n _getGlobalServer: function(uri) {\n // assemble the endpoint from the uri pieces\n var globalServer = '//' + uri.host + (uri.port ? ':' + uri.port : '');\n\n if (uri.protocol) {\n globalServer = uri.protocol + ':' + globalServer;\n }\n return globalServer;\n },\n\n _handleOnErrorStackInfo: function() {\n // if we are intentionally ignoring errors via onerror, bail out\n if (!this._ignoreOnError) {\n this._handleStackInfo.apply(this, arguments);\n }\n },\n\n _handleStackInfo: function(stackInfo, options) {\n var frames = this._prepareFrames(stackInfo, options);\n\n this._triggerEvent('handle', {\n stackInfo: stackInfo,\n options: options\n });\n\n this._processException(\n stackInfo.name,\n stackInfo.message,\n stackInfo.url,\n stackInfo.lineno,\n frames,\n options\n );\n },\n\n _prepareFrames: function(stackInfo, options) {\n var self = this;\n var frames = [];\n if (stackInfo.stack && stackInfo.stack.length) {\n each(stackInfo.stack, function(i, stack) {\n var frame = self._normalizeFrame(stack, stackInfo.url);\n if (frame) {\n frames.push(frame);\n }\n });\n\n // e.g. frames captured via captureMessage throw\n if (options && options.trimHeadFrames) {\n for (var j = 0; j < options.trimHeadFrames && j < frames.length; j++) {\n frames[j].in_app = false;\n }\n }\n }\n frames = frames.slice(0, this._globalOptions.stackTraceLimit);\n return frames;\n },\n\n _normalizeFrame: function(frame, stackInfoUrl) {\n // normalize the frames data\n var normalized = {\n filename: frame.url,\n lineno: frame.line,\n colno: frame.column,\n function: frame.func || '?'\n };\n\n // Case when we don't have any information about the error\n // E.g. throwing a string or raw object, instead of an `Error` in Firefox\n // Generating synthetic error doesn't add any value here\n //\n // We should probably somehow let a user know that they should fix their code\n if (!frame.url) {\n normalized.filename = stackInfoUrl; // fallback to whole stacks url from onerror handler\n }\n\n normalized.in_app = !// determine if an exception came from outside of our app\n // first we check the global includePaths list.\n (\n (!!this._globalOptions.includePaths.test &&\n !this._globalOptions.includePaths.test(normalized.filename)) ||\n // Now we check for fun, if the function name is Raven or TraceKit\n /(Raven|TraceKit)\\./.test(normalized['function']) ||\n // finally, we do a last ditch effort and check for raven.min.js\n /raven\\.(min\\.)?js$/.test(normalized.filename)\n );\n\n return normalized;\n },\n\n _processException: function(type, message, fileurl, lineno, frames, options) {\n var prefixedMessage = (type ? type + ': ' : '') + (message || '');\n if (\n !!this._globalOptions.ignoreErrors.test &&\n (this._globalOptions.ignoreErrors.test(message) ||\n this._globalOptions.ignoreErrors.test(prefixedMessage))\n ) {\n return;\n }\n\n var stacktrace;\n\n if (frames && frames.length) {\n fileurl = frames[0].filename || fileurl;\n // Sentry expects frames oldest to newest\n // and JS sends them as newest to oldest\n frames.reverse();\n stacktrace = {frames: frames};\n } else if (fileurl) {\n stacktrace = {\n frames: [\n {\n filename: fileurl,\n lineno: lineno,\n in_app: true\n }\n ]\n };\n }\n\n if (\n !!this._globalOptions.ignoreUrls.test &&\n this._globalOptions.ignoreUrls.test(fileurl)\n ) {\n return;\n }\n\n if (\n !!this._globalOptions.whitelistUrls.test &&\n !this._globalOptions.whitelistUrls.test(fileurl)\n ) {\n return;\n }\n\n var data = objectMerge(\n {\n // sentry.interfaces.Exception\n exception: {\n values: [\n {\n type: type,\n value: message,\n stacktrace: stacktrace\n }\n ]\n },\n culprit: fileurl\n },\n options\n );\n\n // Fire away!\n this._send(data);\n },\n\n _trimPacket: function(data) {\n // For now, we only want to truncate the two different messages\n // but this could/should be expanded to just trim everything\n var max = this._globalOptions.maxMessageLength;\n if (data.message) {\n data.message = truncate(data.message, max);\n }\n if (data.exception) {\n var exception = data.exception.values[0];\n exception.value = truncate(exception.value, max);\n }\n\n var request = data.request;\n if (request) {\n if (request.url) {\n request.url = truncate(request.url, this._globalOptions.maxUrlLength);\n }\n if (request.Referer) {\n request.Referer = truncate(request.Referer, this._globalOptions.maxUrlLength);\n }\n }\n\n if (data.breadcrumbs && data.breadcrumbs.values)\n this._trimBreadcrumbs(data.breadcrumbs);\n\n return data;\n },\n\n /**\n * Truncate breadcrumb values (right now just URLs)\n */\n _trimBreadcrumbs: function(breadcrumbs) {\n // known breadcrumb properties with urls\n // TODO: also consider arbitrary prop values that start with (https?)?://\n var urlProps = ['to', 'from', 'url'],\n urlProp,\n crumb,\n data;\n\n for (var i = 0; i < breadcrumbs.values.length; ++i) {\n crumb = breadcrumbs.values[i];\n if (\n !crumb.hasOwnProperty('data') ||\n !isObject(crumb.data) ||\n objectFrozen(crumb.data)\n )\n continue;\n\n data = objectMerge({}, crumb.data);\n for (var j = 0; j < urlProps.length; ++j) {\n urlProp = urlProps[j];\n if (data.hasOwnProperty(urlProp) && data[urlProp]) {\n data[urlProp] = truncate(data[urlProp], this._globalOptions.maxUrlLength);\n }\n }\n breadcrumbs.values[i].data = data;\n }\n },\n\n _getHttpData: function() {\n if (!this._hasNavigator && !this._hasDocument) return;\n var httpData = {};\n\n if (this._hasNavigator && _navigator.userAgent) {\n httpData.headers = {\n 'User-Agent': navigator.userAgent\n };\n }\n\n if (this._hasDocument) {\n if (_document.location && _document.location.href) {\n httpData.url = _document.location.href;\n }\n if (_document.referrer) {\n if (!httpData.headers) httpData.headers = {};\n httpData.headers.Referer = _document.referrer;\n }\n }\n\n return httpData;\n },\n\n _resetBackoff: function() {\n this._backoffDuration = 0;\n this._backoffStart = null;\n },\n\n _shouldBackoff: function() {\n return this._backoffDuration && now() - this._backoffStart < this._backoffDuration;\n },\n\n /**\n * Returns true if the in-process data payload matches the signature\n * of the previously-sent data\n *\n * NOTE: This has to be done at this level because TraceKit can generate\n * data from window.onerror WITHOUT an exception object (IE8, IE9,\n * other old browsers). This can take the form of an \"exception\"\n * data object with a single frame (derived from the onerror args).\n */\n _isRepeatData: function(current) {\n var last = this._lastData;\n\n if (\n !last ||\n current.message !== last.message || // defined for captureMessage\n current.culprit !== last.culprit // defined for captureException/onerror\n )\n return false;\n\n // Stacktrace interface (i.e. from captureMessage)\n if (current.stacktrace || last.stacktrace) {\n return isSameStacktrace(current.stacktrace, last.stacktrace);\n } else if (current.exception || last.exception) {\n // Exception interface (i.e. from captureException/onerror)\n return isSameException(current.exception, last.exception);\n }\n\n return true;\n },\n\n _setBackoffState: function(request) {\n // If we are already in a backoff state, don't change anything\n if (this._shouldBackoff()) {\n return;\n }\n\n var status = request.status;\n\n // 400 - project_id doesn't exist or some other fatal\n // 401 - invalid/revoked dsn\n // 429 - too many requests\n if (!(status === 400 || status === 401 || status === 429)) return;\n\n var retry;\n try {\n // If Retry-After is not in Access-Control-Expose-Headers, most\n // browsers will throw an exception trying to access it\n retry = request.getResponseHeader('Retry-After');\n retry = parseInt(retry, 10) * 1000; // Retry-After is returned in seconds\n } catch (e) {\n /* eslint no-empty:0 */\n }\n\n this._backoffDuration = retry\n ? // If Sentry server returned a Retry-After value, use it\n retry\n : // Otherwise, double the last backoff duration (starts at 1 sec)\n this._backoffDuration * 2 || 1000;\n\n this._backoffStart = now();\n },\n\n _send: function(data) {\n var globalOptions = this._globalOptions;\n\n var baseData = {\n project: this._globalProject,\n logger: globalOptions.logger,\n platform: 'javascript'\n },\n httpData = this._getHttpData();\n\n if (httpData) {\n baseData.request = httpData;\n }\n\n // HACK: delete `trimHeadFrames` to prevent from appearing in outbound payload\n if (data.trimHeadFrames) delete data.trimHeadFrames;\n\n data = objectMerge(baseData, data);\n\n // Merge in the tags and extra separately since objectMerge doesn't handle a deep merge\n data.tags = objectMerge(objectMerge({}, this._globalContext.tags), data.tags);\n data.extra = objectMerge(objectMerge({}, this._globalContext.extra), data.extra);\n\n // Send along our own collected metadata with extra\n data.extra['session:duration'] = now() - this._startTime;\n\n if (this._breadcrumbs && this._breadcrumbs.length > 0) {\n // intentionally make shallow copy so that additions\n // to breadcrumbs aren't accidentally sent in this request\n data.breadcrumbs = {\n values: [].slice.call(this._breadcrumbs, 0)\n };\n }\n\n // If there are no tags/extra, strip the key from the payload alltogther.\n if (isEmptyObject(data.tags)) delete data.tags;\n\n if (this._globalContext.user) {\n // sentry.interfaces.User\n data.user = this._globalContext.user;\n }\n\n // Include the environment if it's defined in globalOptions\n if (globalOptions.environment) data.environment = globalOptions.environment;\n\n // Include the release if it's defined in globalOptions\n if (globalOptions.release) data.release = globalOptions.release;\n\n // Include server_name if it's defined in globalOptions\n if (globalOptions.serverName) data.server_name = globalOptions.serverName;\n\n if (isFunction(globalOptions.dataCallback)) {\n data = globalOptions.dataCallback(data) || data;\n }\n\n // Why??????????\n if (!data || isEmptyObject(data)) {\n return;\n }\n\n // Check if the request should be filtered or not\n if (\n isFunction(globalOptions.shouldSendCallback) &&\n !globalOptions.shouldSendCallback(data)\n ) {\n return;\n }\n\n // Backoff state: Sentry server previously responded w/ an error (e.g. 429 - too many requests),\n // so drop requests until \"cool-off\" period has elapsed.\n if (this._shouldBackoff()) {\n this._logDebug('warn', 'Raven dropped error due to backoff: ', data);\n return;\n }\n\n if (typeof globalOptions.sampleRate === 'number') {\n if (Math.random() < globalOptions.sampleRate) {\n this._sendProcessedPayload(data);\n }\n } else {\n this._sendProcessedPayload(data);\n }\n },\n\n _getUuid: function() {\n return uuid4();\n },\n\n _sendProcessedPayload: function(data, callback) {\n var self = this;\n var globalOptions = this._globalOptions;\n\n if (!this.isSetup()) return;\n\n // Try and clean up the packet before sending by truncating long values\n data = this._trimPacket(data);\n\n // ideally duplicate error testing should occur *before* dataCallback/shouldSendCallback,\n // but this would require copying an un-truncated copy of the data packet, which can be\n // arbitrarily deep (extra_data) -- could be worthwhile? will revisit\n if (!this._globalOptions.allowDuplicates && this._isRepeatData(data)) {\n this._logDebug('warn', 'Raven dropped repeat event: ', data);\n return;\n }\n\n // Send along an event_id if not explicitly passed.\n // This event_id can be used to reference the error within Sentry itself.\n // Set lastEventId after we know the error should actually be sent\n this._lastEventId = data.event_id || (data.event_id = this._getUuid());\n\n // Store outbound payload after trim\n this._lastData = data;\n\n this._logDebug('debug', 'Raven about to send:', data);\n\n var auth = {\n sentry_version: '7',\n sentry_client: 'raven-js/' + this.VERSION,\n sentry_key: this._globalKey\n };\n\n if (this._globalSecret) {\n auth.sentry_secret = this._globalSecret;\n }\n\n var exception = data.exception && data.exception.values[0];\n this.captureBreadcrumb({\n category: 'sentry',\n message: exception\n ? (exception.type ? exception.type + ': ' : '') + exception.value\n : data.message,\n event_id: data.event_id,\n level: data.level || 'error' // presume error unless specified\n });\n\n var url = this._globalEndpoint;\n (globalOptions.transport || this._makeRequest).call(this, {\n url: url,\n auth: auth,\n data: data,\n options: globalOptions,\n onSuccess: function success() {\n self._resetBackoff();\n\n self._triggerEvent('success', {\n data: data,\n src: url\n });\n callback && callback();\n },\n onError: function failure(error) {\n self._logDebug('error', 'Raven transport failed to send: ', error);\n\n if (error.request) {\n self._setBackoffState(error.request);\n }\n\n self._triggerEvent('failure', {\n data: data,\n src: url\n });\n error = error || new Error('Raven send failed (no additional details provided)');\n callback && callback(error);\n }\n });\n },\n\n _makeRequest: function(opts) {\n var request = _window.XMLHttpRequest && new _window.XMLHttpRequest();\n if (!request) return;\n\n // if browser doesn't support CORS (e.g. IE7), we are out of luck\n var hasCORS = 'withCredentials' in request || typeof XDomainRequest !== 'undefined';\n\n if (!hasCORS) return;\n\n var url = opts.url;\n\n if ('withCredentials' in request) {\n request.onreadystatechange = function() {\n if (request.readyState !== 4) {\n return;\n } else if (request.status === 200) {\n opts.onSuccess && opts.onSuccess();\n } else if (opts.onError) {\n var err = new Error('Sentry error code: ' + request.status);\n err.request = request;\n opts.onError(err);\n }\n };\n } else {\n request = new XDomainRequest();\n // xdomainrequest cannot go http -> https (or vice versa),\n // so always use protocol relative\n url = url.replace(/^https?:/, '');\n\n // onreadystatechange not supported by XDomainRequest\n if (opts.onSuccess) {\n request.onload = opts.onSuccess;\n }\n if (opts.onError) {\n request.onerror = function() {\n var err = new Error('Sentry error code: XDomainRequest');\n err.request = request;\n opts.onError(err);\n };\n }\n }\n\n // NOTE: auth is intentionally sent as part of query string (NOT as custom\n // HTTP header) so as to avoid preflight CORS requests\n request.open('POST', url + '?' + urlencode(opts.auth));\n request.send(stringify(opts.data));\n },\n\n _logDebug: function(level) {\n if (this._originalConsoleMethods[level] && this.debug) {\n // In IE<10 console methods do not have their own 'apply' method\n Function.prototype.apply.call(\n this._originalConsoleMethods[level],\n this._originalConsole,\n [].slice.call(arguments, 1)\n );\n }\n },\n\n _mergeContext: function(key, context) {\n if (isUndefined(context)) {\n delete this._globalContext[key];\n } else {\n this._globalContext[key] = objectMerge(this._globalContext[key] || {}, context);\n }\n }\n};\n\n// Deprecations\nRaven.prototype.setUser = Raven.prototype.setUserContext;\nRaven.prototype.setReleaseContext = Raven.prototype.setRelease;\n\nmodule.exports = Raven;\n","var utils = require('../../src/utils');\n\n/*\n TraceKit - Cross brower stack traces\n\n This was originally forked from github.com/occ/TraceKit, but has since been\n largely re-written and is now maintained as part of raven-js. Tests for\n this are in test/vendor.\n\n MIT license\n*/\n\nvar TraceKit = {\n collectWindowErrors: true,\n debug: false\n};\n\n// This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)\nvar _window =\n typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\n// global reference to slice\nvar _slice = [].slice;\nvar UNKNOWN_FUNCTION = '?';\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Error_types\nvar ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;\n\nfunction getLocationHref() {\n if (typeof document === 'undefined' || document.location == null) return '';\n\n return document.location.href;\n}\n\n/**\n * TraceKit.report: cross-browser processing of unhandled exceptions\n *\n * Syntax:\n * TraceKit.report.subscribe(function(stackInfo) { ... })\n * TraceKit.report.unsubscribe(function(stackInfo) { ... })\n * TraceKit.report(exception)\n * try { ...code... } catch(ex) { TraceKit.report(ex); }\n *\n * Supports:\n * - Firefox: full stack trace with line numbers, plus column number\n * on top frame; column number is not guaranteed\n * - Opera: full stack trace with line and column numbers\n * - Chrome: full stack trace with line and column numbers\n * - Safari: line and column number for the top frame only; some frames\n * may be missing, and column number is not guaranteed\n * - IE: line and column number for the top frame only; some frames\n * may be missing, and column number is not guaranteed\n *\n * In theory, TraceKit should work on all of the following versions:\n * - IE5.5+ (only 8.0 tested)\n * - Firefox 0.9+ (only 3.5+ tested)\n * - Opera 7+ (only 10.50 tested; versions 9 and earlier may require\n * Exceptions Have Stacktrace to be enabled in opera:config)\n * - Safari 3+ (only 4+ tested)\n * - Chrome 1+ (only 5+ tested)\n * - Konqueror 3.5+ (untested)\n *\n * Requires TraceKit.computeStackTrace.\n *\n * Tries to catch all unhandled exceptions and report them to the\n * subscribed handlers. Please note that TraceKit.report will rethrow the\n * exception. This is REQUIRED in order to get a useful stack trace in IE.\n * If the exception does not reach the top of the browser, you will only\n * get a stack trace from the point where TraceKit.report was called.\n *\n * Handlers receive a stackInfo object as described in the\n * TraceKit.computeStackTrace docs.\n */\nTraceKit.report = (function reportModuleWrapper() {\n var handlers = [],\n lastArgs = null,\n lastException = null,\n lastExceptionStack = null;\n\n /**\n * Add a crash handler.\n * @param {Function} handler\n */\n function subscribe(handler) {\n installGlobalHandler();\n handlers.push(handler);\n }\n\n /**\n * Remove a crash handler.\n * @param {Function} handler\n */\n function unsubscribe(handler) {\n for (var i = handlers.length - 1; i >= 0; --i) {\n if (handlers[i] === handler) {\n handlers.splice(i, 1);\n }\n }\n }\n\n /**\n * Remove all crash handlers.\n */\n function unsubscribeAll() {\n uninstallGlobalHandler();\n handlers = [];\n }\n\n /**\n * Dispatch stack information to all handlers.\n * @param {Object.<string, *>} stack\n */\n function notifyHandlers(stack, isWindowError) {\n var exception = null;\n if (isWindowError && !TraceKit.collectWindowErrors) {\n return;\n }\n for (var i in handlers) {\n if (handlers.hasOwnProperty(i)) {\n try {\n handlers[i].apply(null, [stack].concat(_slice.call(arguments, 2)));\n } catch (inner) {\n exception = inner;\n }\n }\n }\n\n if (exception) {\n throw exception;\n }\n }\n\n var _oldOnerrorHandler, _onErrorHandlerInstalled;\n\n /**\n * Ensures all global unhandled exceptions are recorded.\n * Supported by Gecko and IE.\n * @param {string} message Error message.\n * @param {string} url URL of script that generated the exception.\n * @param {(number|string)} lineNo The line number at which the error\n * occurred.\n * @param {?(number|string)} colNo The column number at which the error\n * occurred.\n * @param {?Error} ex The actual Error object.\n */\n function traceKitWindowOnError(message, url, lineNo, colNo, ex) {\n var stack = null;\n\n if (lastExceptionStack) {\n TraceKit.computeStackTrace.augmentStackTraceWithInitialElement(\n lastExceptionStack,\n url,\n lineNo,\n message\n );\n processLastException();\n } else if (ex && utils.isError(ex)) {\n // non-string `ex` arg; attempt to extract stack trace\n\n // New chrome and blink send along a real error object\n // Let's just report that like a normal error.\n // See: https://mikewest.org/2013/08/debugging-runtime-errors-with-window-onerror\n stack = TraceKit.computeStackTrace(ex);\n notifyHandlers(stack, true);\n } else {\n var location = {\n url: url,\n line: lineNo,\n column: colNo\n };\n\n var name = undefined;\n var msg = message; // must be new var or will modify original `arguments`\n var groups;\n if ({}.toString.call(message) === '[object String]') {\n var groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n msg = groups[2];\n }\n }\n\n location.func = UNKNOWN_FUNCTION;\n\n stack = {\n name: name,\n message: msg,\n url: getLocationHref(),\n stack: [location]\n };\n notifyHandlers(stack, true);\n }\n\n if (_oldOnerrorHandler) {\n return _oldOnerrorHandler.apply(this, arguments);\n }\n\n return false;\n }\n\n function installGlobalHandler() {\n if (_onErrorHandlerInstalled) {\n return;\n }\n _oldOnerrorHandler = _window.onerror;\n _window.onerror = traceKitWindowOnError;\n _onErrorHandlerInstalled = true;\n }\n\n function uninstallGlobalHandler() {\n if (!_onErrorHandlerInstalled) {\n return;\n }\n _window.onerror = _oldOnerrorHandler;\n _onErrorHandlerInstalled = false;\n _oldOnerrorHandler = undefined;\n }\n\n function processLastException() {\n var _lastExceptionStack = lastExceptionStack,\n _lastArgs = lastArgs;\n lastArgs = null;\n lastExceptionStack = null;\n lastException = null;\n notifyHandlers.apply(null, [_lastExceptionStack, false].concat(_lastArgs));\n }\n\n /**\n * Reports an unhandled Error to TraceKit.\n * @param {Error} ex\n * @param {?boolean} rethrow If false, do not re-throw the exception.\n * Only used for window.onerror to not cause an infinite loop of\n * rethrowing.\n */\n function report(ex, rethrow) {\n var args = _slice.call(arguments, 1);\n if (lastExceptionStack) {\n if (lastException === ex) {\n return; // already caught by an inner catch block, ignore\n } else {\n processLastException();\n }\n }\n\n var stack = TraceKit.computeStackTrace(ex);\n lastExceptionStack = stack;\n lastException = ex;\n lastArgs = args;\n\n // If the stack trace is incomplete, wait for 2 seconds for\n // slow slow IE to see if onerror occurs or not before reporting\n // this exception; otherwise, we will end up with an incomplete\n // stack trace\n setTimeout(function() {\n if (lastException === ex) {\n processLastException();\n }\n }, stack.incomplete ? 2000 : 0);\n\n if (rethrow !== false) {\n throw ex; // re-throw to propagate to the top level (and cause window.onerror)\n }\n }\n\n report.subscribe = subscribe;\n report.unsubscribe = unsubscribe;\n report.uninstall = unsubscribeAll;\n return report;\n})();\n\n/**\n * TraceKit.computeStackTrace: cross-browser stack traces in JavaScript\n *\n * Syntax:\n * s = TraceKit.computeStackTrace(exception) // consider using TraceKit.report instead (see below)\n * Returns:\n * s.name - exception name\n * s.message - exception message\n * s.stack[i].url - JavaScript or HTML file URL\n * s.stack[i].func - function name, or empty for anonymous functions (if guessing did not work)\n * s.stack[i].args - arguments passed to the function, if known\n * s.stack[i].line - line number, if known\n * s.stack[i].column - column number, if known\n *\n * Supports:\n * - Firefox: full stack trace with line numbers and unreliable column\n * number on top frame\n * - Opera 10: full stack trace with line and column numbers\n * - Opera 9-: full stack trace with line numbers\n * - Chrome: full stack trace with line and column numbers\n * - Safari: line and column number for the topmost stacktrace element\n * only\n * - IE: no line numbers whatsoever\n *\n * Tries to guess names of anonymous functions by looking for assignments\n * in the source code. In IE and Safari, we have to guess source file names\n * by searching for function bodies inside all page scripts. This will not\n * work for scripts that are loaded cross-domain.\n * Here be dragons: some function names may be guessed incorrectly, and\n * duplicate functions may be mismatched.\n *\n * TraceKit.computeStackTrace should only be used for tracing purposes.\n * Logging of unhandled exceptions should be done with TraceKit.report,\n * which builds on top of TraceKit.computeStackTrace and provides better\n * IE support by utilizing the window.onerror event to retrieve information\n * about the top of the stack.\n *\n * Note: In IE and Safari, no stack trace is recorded on the Error object,\n * so computeStackTrace instead walks its *own* chain of callers.\n * This means that:\n * * in Safari, some methods may be missing from the stack trace;\n * * in IE, the topmost function in the stack trace will always be the\n * caller of computeStackTrace.\n *\n * This is okay for tracing (because you are likely to be calling\n * computeStackTrace from the function you want to be the topmost element\n * of the stack trace anyway), but not okay for logging unhandled\n * exceptions (because your catch block will likely be far away from the\n * inner function that actually caused the exception).\n *\n */\nTraceKit.computeStackTrace = (function computeStackTraceWrapper() {\n // Contents of Exception in various browsers.\n //\n // SAFARI:\n // ex.message = Can't find variable: qq\n // ex.line = 59\n // ex.sourceId = 580238192\n // ex.sourceURL = http://...\n // ex.expressionBeginOffset = 96\n // ex.expressionCaretOffset = 98\n // ex.expressionEndOffset = 98\n // ex.name = ReferenceError\n //\n // FIREFOX:\n // ex.message = qq is not defined\n // ex.fileName = http://...\n // ex.lineNumber = 59\n // ex.columnNumber = 69\n // ex.stack = ...stack trace... (see the example below)\n // ex.name = ReferenceError\n //\n // CHROME:\n // ex.message = qq is not defined\n // ex.name = ReferenceError\n // ex.type = not_defined\n // ex.arguments = ['aa']\n // ex.stack = ...stack trace...\n //\n // INTERNET EXPLORER:\n // ex.message = ...\n // ex.name = ReferenceError\n //\n // OPERA:\n // ex.message = ...message... (see the example below)\n // ex.name = ReferenceError\n // ex.opera#sourceloc = 11 (pretty much useless, duplicates the info in ex.message)\n // ex.stacktrace = n/a; see 'opera:config#UserPrefs|Exceptions Have Stacktrace'\n\n /**\n * Computes stack trace information from the stack property.\n * Chrome and Gecko use this property.\n * @param {Error} ex\n * @return {?Object.<string, *>} Stack trace information.\n */\n function computeStackTraceFromStackProp(ex) {\n if (typeof ex.stack === 'undefined' || !ex.stack) return;\n\n var chrome = /^\\s*at (.*?) ?\\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\\/).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i,\n gecko = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\\[native).*?|[^@]*bundle)(?::(\\d+))?(?::(\\d+))?\\s*$/i,\n winjs = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i,\n // Used to additionally parse URL/line/column from eval frames\n geckoEval = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i,\n chromeEval = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/,\n lines = ex.stack.split('\\n'),\n stack = [],\n submatch,\n parts,\n element,\n reference = /^(.*) is undefined$/.exec(ex.message);\n\n for (var i = 0, j = lines.length; i < j; ++i) {\n if ((parts = chrome.exec(lines[i]))) {\n var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line\n var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n if (isEval && (submatch = chromeEval.exec(parts[2]))) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = submatch[1]; // url\n parts[3] = submatch[2]; // line\n parts[4] = submatch[3]; // column\n }\n element = {\n url: !isNative ? parts[2] : null,\n func: parts[1] || UNKNOWN_FUNCTION,\n args: isNative ? [parts[2]] : [],\n line: parts[3] ? +parts[3] : null,\n column: parts[4] ? +parts[4] : null\n };\n } else if ((parts = winjs.exec(lines[i]))) {\n element = {\n url: parts[2],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: [],\n line: +parts[3],\n column: parts[4] ? +parts[4] : null\n };\n } else if ((parts = gecko.exec(lines[i]))) {\n var isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval && (submatch = geckoEval.exec(parts[3]))) {\n // throw out eval line/column and use top-most line number\n parts[3] = submatch[1];\n parts[4] = submatch[2];\n parts[5] = null; // no column when eval\n } else if (i === 0 && !parts[5] && typeof ex.columnNumber !== 'undefined') {\n // FireFox uses this awesome columnNumber property for its top frame\n // Also note, Firefox's column number is 0-based and everything else expects 1-based,\n // so adding 1\n // NOTE: this hack doesn't work if top-most frame is eval\n stack[0].column = ex.columnNumber + 1;\n }\n element = {\n url: parts[3],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: parts[2] ? parts[2].split(',') : [],\n line: parts[4] ? +parts[4] : null,\n column: parts[5] ? +parts[5] : null\n };\n } else {\n continue;\n }\n\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n\n stack.push(element);\n }\n\n if (!stack.length) {\n return null;\n }\n\n return {\n name: ex.name,\n message: ex.message,\n url: getLocationHref(),\n stack: stack\n };\n }\n\n /**\n * Adds information about the first frame to incomplete stack traces.\n * Safari and IE require this to get complete data on the first frame.\n * @param {Object.<string, *>} stackInfo Stack trace information from\n * one of the compute* methods.\n * @param {string} url The URL of the script that caused an error.\n * @param {(number|string)} lineNo The line number of the script that\n * caused an error.\n * @param {string=} message The error generated by the browser, which\n * hopefully contains the name of the object that caused the error.\n * @return {boolean} Whether or not the stack information was\n * augmented.\n */\n function augmentStackTraceWithInitialElement(stackInfo, url, lineNo, message) {\n var initial = {\n url: url,\n line: lineNo\n };\n\n if (initial.url && initial.line) {\n stackInfo.incomplete = false;\n\n if (!initial.func) {\n initial.func = UNKNOWN_FUNCTION;\n }\n\n if (stackInfo.stack.length > 0) {\n if (stackInfo.stack[0].url === initial.url) {\n if (stackInfo.stack[0].line === initial.line) {\n return false; // already in stack trace\n } else if (\n !stackInfo.stack[0].line &&\n stackInfo.stack[0].func === initial.func\n ) {\n stackInfo.stack[0].line = initial.line;\n return false;\n }\n }\n }\n\n stackInfo.stack.unshift(initial);\n stackInfo.partial = true;\n return true;\n } else {\n stackInfo.incomplete = true;\n }\n\n return false;\n }\n\n /**\n * Computes stack trace information by walking the arguments.caller\n * chain at the time the exception occurred. This will cause earlier\n * frames to be missed but is the only way to get any stack trace in\n * Safari and IE. The top frame is restored by\n * {@link augmentStackTraceWithInitialElement}.\n * @param {Error} ex\n * @return {?Object.<string, *>} Stack trace information.\n */\n function computeStackTraceByWalkingCallerChain(ex, depth) {\n var functionName = /function\\s+([_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*)?\\s*\\(/i,\n stack = [],\n funcs = {},\n recursion = false,\n parts,\n item,\n source;\n\n for (\n var curr = computeStackTraceByWalkingCallerChain.caller;\n curr && !recursion;\n curr = curr.caller\n ) {\n if (curr === computeStackTrace || curr === TraceKit.report) {\n // console.log('skipping internal function');\n continue;\n }\n\n item = {\n url: null,\n func: UNKNOWN_FUNCTION,\n line: null,\n column: null\n };\n\n if (curr.name) {\n item.func = curr.name;\n } else if ((parts = functionName.exec(curr.toString()))) {\n item.func = parts[1];\n }\n\n if (typeof item.func === 'undefined') {\n try {\n item.func = parts.input.substring(0, parts.input.indexOf('{'));\n } catch (e) {}\n }\n\n if (funcs['' + curr]) {\n recursion = true;\n } else {\n funcs['' + curr] = true;\n }\n\n stack.push(item);\n }\n\n if (depth) {\n // console.log('depth is ' + depth);\n // console.log('stack is ' + stack.length);\n stack.splice(0, depth);\n }\n\n var result = {\n name: ex.name,\n message: ex.message,\n url: getLocationHref(),\n stack: stack\n };\n augmentStackTraceWithInitialElement(\n result,\n ex.sourceURL || ex.fileName,\n ex.line || ex.lineNumber,\n ex.message || ex.description\n );\n return result;\n }\n\n /**\n * Computes a stack trace for an exception.\n * @param {Error} ex\n * @param {(string|number)=} depth\n */\n function computeStackTrace(ex, depth) {\n var stack = null;\n depth = depth == null ? 0 : +depth;\n\n try {\n stack = computeStackTraceFromStackProp(ex);\n if (stack) {\n return stack;\n }\n } catch (e) {\n if (TraceKit.debug) {\n throw e;\n }\n }\n\n try {\n stack = computeStackTraceByWalkingCallerChain(ex, depth + 1);\n if (stack) {\n return stack;\n }\n } catch (e) {\n if (TraceKit.debug) {\n throw e;\n }\n }\n return {\n name: ex.name,\n message: ex.message,\n url: getLocationHref()\n };\n }\n\n computeStackTrace.augmentStackTraceWithInitialElement = augmentStackTraceWithInitialElement;\n computeStackTrace.computeStackTraceFromStackProp = computeStackTraceFromStackProp;\n\n return computeStackTrace;\n})();\n\nmodule.exports = TraceKit;\n","/*\n json-stringify-safe\n Like JSON.stringify, but doesn't throw on circular references.\n\n Originally forked from https://github.com/isaacs/json-stringify-safe\n version 5.0.1 on 3/8/2017 and modified to handle Errors serialization\n and IE8 compatibility. Tests for this are in test/vendor.\n\n ISC license: https://github.com/isaacs/json-stringify-safe/blob/master/LICENSE\n*/\n\nexports = module.exports = stringify;\nexports.getSerialize = serializer;\n\nfunction indexOf(haystack, needle) {\n for (var i = 0; i < haystack.length; ++i) {\n if (haystack[i] === needle) return i;\n }\n return -1;\n}\n\nfunction stringify(obj, replacer, spaces, cycleReplacer) {\n return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces);\n}\n\n// https://github.com/ftlabs/js-abbreviate/blob/fa709e5f139e7770a71827b1893f22418097fbda/index.js#L95-L106\nfunction stringifyError(value) {\n var err = {\n // These properties are implemented as magical getters and don't show up in for in\n stack: value.stack,\n message: value.message,\n name: value.name\n };\n\n for (var i in value) {\n if (Object.prototype.hasOwnProperty.call(value, i)) {\n err[i] = value[i];\n }\n }\n\n return err;\n}\n\nfunction serializer(replacer, cycleReplacer) {\n var stack = [];\n var keys = [];\n\n if (cycleReplacer == null) {\n cycleReplacer = function(key, value) {\n if (stack[0] === value) {\n return '[Circular ~]';\n }\n return '[Circular ~.' + keys.slice(0, indexOf(stack, value)).join('.') + ']';\n };\n }\n\n return function(key, value) {\n if (stack.length > 0) {\n var thisPos = indexOf(stack, this);\n ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);\n ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);\n\n if (~indexOf(stack, value)) {\n value = cycleReplacer.call(this, key, value);\n }\n } else {\n stack.push(value);\n }\n\n return replacer == null\n ? value instanceof Error ? stringifyError(value) : value\n : replacer.call(this, key, value);\n };\n}\n","function RavenConfigError(message) {\n this.name = 'RavenConfigError';\n this.message = message;\n}\nRavenConfigError.prototype = new Error();\nRavenConfigError.prototype.constructor = RavenConfigError;\n\nmodule.exports = RavenConfigError;\n","var wrapMethod = function(console, level, callback) {\n var originalConsoleLevel = console[level];\n var originalConsole = console;\n\n if (!(level in console)) {\n return;\n }\n\n var sentryLevel = level === 'warn' ? 'warning' : level;\n\n console[level] = function() {\n var args = [].slice.call(arguments);\n\n var msg = '' + args.join(' ');\n var data = {level: sentryLevel, logger: 'console', extra: {arguments: args}};\n\n if (level === 'assert') {\n if (args[0] === false) {\n // Default browsers message\n msg = 'Assertion failed: ' + (args.slice(1).join(' ') || 'console.assert');\n data.extra.arguments = args.slice(1);\n callback && callback(msg, data);\n }\n } else {\n callback && callback(msg, data);\n }\n\n // this fails for some browsers. :(\n if (originalConsoleLevel) {\n // IE9 doesn't allow calling apply on console functions directly\n // See: https://stackoverflow.com/questions/5472938/does-ie9-support-console-log-and-is-it-a-real-function#answer-5473193\n Function.prototype.apply.call(originalConsoleLevel, originalConsole, args);\n }\n };\n};\n\nmodule.exports = {\n wrapMethod: wrapMethod\n};\n","const {\n adminUrl,\n ajaxUrl,\n env,\n hubspotBaseUrl,\n leadinPluginVersion,\n plugins,\n phpVersion,\n portalId,\n theme,\n wpVersion,\n} = window.leadinConfig;\n\nconst i18n = window.leadinI18n;\n\nexport {\n adminUrl,\n ajaxUrl,\n env,\n hubspotBaseUrl,\n i18n,\n leadinPluginVersion,\n plugins,\n phpVersion,\n portalId,\n theme,\n wpVersion,\n};\n","import Raven from 'raven-js';\nimport {\n env,\n phpVersion,\n wpVersion,\n leadinPluginVersion,\n portalId,\n plugins,\n} from '../constants/leadinConfig';\n\nexport function configureRaven() {\n if (env !== 'prod') {\n return;\n }\n\n Raven.config(\n 'https://e9b8f382cdd130c0d415cd977d2be56f@exceptions.hubspot.com/1',\n {\n instrument: {\n tryCatch: false,\n },\n }\n ).install();\n\n Raven.setTagsContext({\n leadin: leadinPluginVersion,\n php: phpVersion,\n wordpress: wpVersion,\n });\n\n Raven.setUserContext({\n hub: portalId,\n plugins: Object.keys(plugins)\n .map(name => `${name}#${plugins[name].Version}`)\n .join(','),\n });\n}\n\nexport default Raven;\n","import { hubspotBaseUrl, portalId, i18n } from './constants/leadinConfig';\n\nexport function initChatflows() {\n const leadinMenu = document.getElementById('toplevel_page_leadin');\n const firstSubMenu = leadinMenu && leadinMenu.querySelector('.wp-first-item');\n const chatflowsUrl = `${hubspotBaseUrl}/chatflows/${portalId}`;\n\n const chatflowsHtml = `<li><a href=\"${chatflowsUrl}\" target=\"_blank\">${\n i18n.chatflows\n }</a></li>`;\n\n if (firstSubMenu) {\n firstSubMenu.insertAdjacentHTML('afterend', chatflowsHtml);\n }\n}\n","export function log(...args) {\n try {\n if (window.localStorage.LEADIN_DEBUG) {\n args.unshift('[Leadin]');\n console.log(...args);\n }\n } catch (e) {\n //\n }\n}\n","export const domElements = {\n iframe: '#leadin-iframe',\n allMenuButtons:\n '.toplevel_page_leadin > a, .toplevel_page_leadin > ul > li > a',\n subMenuButtons: '.toplevel_page_leadin > ul > li',\n};\n","import EventBus from './EventBus';\nimport { log } from '../utils';\nimport { domElements } from '../constants/selectors';\nimport { hubspotBaseUrl } from '../constants/leadinConfig';\nimport Raven from './Raven';\n\nconst eventBus = new EventBus();\nconst callbacks = [];\n\nfunction postMessageObject(message) {\n log('Posting message');\n log(JSON.stringify(message));\n jQuery(domElements.iframe)[0].contentWindow.postMessage(\n JSON.stringify(message),\n hubspotBaseUrl\n );\n}\n\nfunction reply(message, response) {\n if (!response) {\n response = 'Message Received';\n }\n const newMessage = Object.assign({}, message);\n newMessage.response = response;\n postMessageObject(newMessage);\n}\n\nfunction handleResponse(message) {\n callbacks[message._callbackId - 1](message.response);\n}\n\nfunction handleMessage(message) {\n log('Received message');\n log(JSON.stringify(message));\n\n if (message.response && message._callbackId) {\n handleResponse(message);\n } else {\n Object.keys(message).forEach(key => {\n eventBus.trigger(key, [message[key], reply.bind(null, message)]);\n });\n }\n}\n\nfunction handleMessageEvent(event) {\n if (event.origin === hubspotBaseUrl) {\n try {\n const data = JSON.parse(event.data);\n handleMessage(data);\n } catch (e) {\n // Error in parsing message\n }\n }\n}\n\nexport function postMessage(key, payload, onResponse, onTimeout, timeout) {\n if (!timeout) {\n timeout = 500;\n }\n\n const timeoutCallback = function() {\n Raven.captureMessage(\n `LeadinWordpressPlugin postMessage response timeout on message key: ${key}`\n );\n onTimeout();\n };\n\n const timeoutId = setTimeout(Raven.wrap(timeoutCallback), timeout);\n\n const message = {};\n message[key] = payload;\n message._callbackId = callbacks.push((...args) => {\n clearTimeout(timeoutId);\n onResponse(...args);\n });\n postMessageObject(message);\n}\n\nexport function onMessage(key, callback) {\n eventBus.on(key, (...args) => {\n callback.apply(null, args.slice(1));\n });\n}\n\nexport function initInterframe() {\n window.addEventListener('message', handleMessageEvent);\n}\n","import Raven from './Raven';\n\nexport default class EventBus {\n constructor() {\n this.bus = jQuery({});\n }\n\n trigger(...args) {\n this.bus.trigger(...args);\n }\n\n on(event, callback) {\n this.bus.on(event, Raven.wrap(callback));\n }\n}\n","import Raven from '../lib/Raven';\nimport { ajaxUrl } from '../constants/leadinConfig';\n\nfunction makeRequest(action, method, payload, success, error) {\n const url = `${ajaxUrl}?action=${action}`;\n const ajaxPayload = {\n url,\n method,\n contentType: 'application/json',\n success:\n typeof success === 'function'\n ? Raven.wrap(data => success(JSON.parse(data)))\n : undefined,\n error: Raven.wrap(jqXHR => {\n let message;\n try {\n message = JSON.parse(jqXHR.responseText).error;\n } catch (e) {\n message = jqXHR.responseText;\n }\n\n Raven.captureMessage(\n `AJAX request failed with code ${jqXHR.status}: ${message}`\n );\n\n if (typeof error === 'function') {\n error();\n }\n }),\n };\n\n if (payload) {\n ajaxPayload.data = JSON.stringify(payload);\n }\n\n jQuery.ajax(ajaxPayload);\n}\n\nfunction post(action, payload, success, error) {\n return makeRequest(action, 'POST', payload, success, error);\n}\n\nfunction get(action, success, error) {\n return makeRequest(action, 'GET', null, success, error);\n}\n\nconst getPortal = () => get('leadin_get_portal');\nlet portalPollingTimeout;\nlet stopPortalPolling = false;\n\nexport function startPortalIdPolling() {\n portalPollingTimeout = setTimeout(() => {\n getPortal(data => {\n if (data.portalId) {\n location.reload(true);\n } else if (!stopPortalPolling) {\n startPortalIdPolling();\n }\n }, startPortalIdPolling);\n }, 5000);\n}\n\nexport function clearPortalIdPolling() {\n clearTimeout(portalPollingTimeout);\n stopPortalPolling = true;\n}\n\nexport const connect = (portalId, success, error) =>\n post('leadin_registration_ajax', { portalId }, success, error);\n\nexport const disconnect = post.bind(null, 'leadin_disconnect_ajax', {});\nexport const getDomain = get.bind(null, 'leadin_get_domain');\nexport const markAsOutdated = get.bind(null, 'leadin_mark_outdated');\n","import { onMessage, postMessage } from '../lib/Interframe';\n\nfunction createHandler(key) {\n return onMessage.bind(null, key);\n}\n\nexport const onClearQueryParam = createHandler('leadin_clear_query_param');\nexport const onConnect = createHandler('leadin_connect_portal');\nexport const onDisableNavigation = createHandler('leadin_disable_navigation');\nexport const onDisconnect = createHandler('leadin_disconnect_portal');\nexport const onEnterFullScreen = createHandler('leadin_enter_fullscreen');\nexport const onExitFullScreen = createHandler('leadin_exit_fullscreen');\nexport const onGetAssetsPayload = createHandler('leadin_get_assets_payload');\nexport const onGetDomain = createHandler('leadin_get_wp_domain');\nexport const onInitNavigation = createHandler('leadin_init_navigation');\nexport const onInterframeReady = createHandler('leadin_interframe_ready');\nexport const onMarkAsOutdated = createHandler('leadin_mark_outdated');\nexport const onPageReload = createHandler('leadin_page_reload');\nexport const onUpgrade = createHandler('leadin_upgrade');\n\nexport function changeRoute(route) {\n postMessage('leadin_change_route', route, null, () => location.reload(true));\n}\n","import { domElements } from './constants/selectors';\nimport { changeRoute } from './api/hubspotPluginApi';\n\nexport function initNavigation() {\n function setSelectedMenuItem() {\n jQuery(domElements.subMenuButtons).removeClass('current');\n const pageParam = window.location.search.match(/\\?page=leadin_?\\w*/)[0]; // filter page query param\n const selectedElement = jQuery(`a[href=\"admin.php${pageParam}\"]`);\n selectedElement.parent().addClass('current');\n }\n\n function handleNavigation() {\n const appRoute = window.location.search.match(/page=leadin_?(\\w*)/)[1];\n changeRoute(appRoute);\n setSelectedMenuItem();\n }\n\n function handleClick() {\n // Don't interrupt modifier keys\n if (event.metaKey || event.altKey || event.shiftKey) {\n return;\n }\n window.history.pushState(null, null, jQuery(this).attr('href'));\n handleNavigation();\n event.preventDefault();\n }\n\n // Browser back and forward events navigation\n window.addEventListener('popstate', handleNavigation);\n\n // Menu Navigation\n jQuery(domElements.allMenuButtons).click(handleClick);\n}\n\nexport function disableNavigation() {\n jQuery(domElements.allMenuButtons).off('click');\n}\n","export default {\n 'genesis-sample': {\n formsStyle: {\n fontFamily: 'Source Sans Pro',\n labelTextColor: '#333333',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#0073e5',\n },\n chatStyle: {\n accentColor: '#0073e5',\n },\n onScrollLeadFlowStyle: {\n color: '#0073e5',\n },\n onExitLeadFlowStyle: {\n color: '#0073e5',\n },\n },\n 'academy-pro': {\n formsStyle: {\n fontFamily: 'PT Sans',\n labelTextColor: '#222222',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#e22c2f',\n },\n chatStyle: {\n accentColor: '#e22c2f',\n },\n onScrollLeadFlowStyle: {\n color: '#e22c2f',\n },\n onExitLeadFlowStyle: {\n color: '#e22c2f',\n },\n },\n 'agency-pro': {\n formsStyle: {\n fontFamily: 'EB Garamond',\n labelTextColor: '#666666',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#d7c603',\n },\n chatStyle: {\n accentColor: '#d7c603',\n },\n onScrollLeadFlowStyle: {\n color: '#d7c603',\n },\n onExitLeadFlowStyle: {\n color: '#d7c603',\n },\n },\n 'agentpress-pro': {\n formsStyle: {\n fontFamily: 'Roboto',\n labelTextColor: '#1a212b',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#d23836',\n },\n chatStyle: {\n accentColor: '#d23836',\n },\n onScrollLeadFlowStyle: {\n color: '#d23836',\n },\n onExitLeadFlowStyle: {\n color: '#d23836',\n },\n },\n 'altitude-pro': {\n formsStyle: {\n fontFamily: 'Ek Mukta',\n labelTextColor: '#000000',\n labelTextSize: '20px',\n submitFontColor: '#ffffff',\n submitColor: '#079bc4',\n },\n chatStyle: {\n accentColor: '#079bc4',\n },\n onScrollLeadFlowStyle: {\n color: '#079bc4',\n },\n onExitLeadFlowStyle: {\n color: '#079bc4',\n },\n },\n 'ambiance-pro': {\n formsStyle: {\n fontFamily: 'Merriweather',\n labelTextColor: '#333333',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#e12727',\n },\n chatStyle: {\n accentColor: '#e12727',\n },\n onScrollLeadFlowStyle: {\n color: '#e12727',\n },\n onExitLeadFlowStyle: {\n color: '#e12727',\n },\n },\n 'atmosphere-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#333333',\n labelTextSize: '20px',\n submitFontColor: '#ffffff',\n submitColor: '#333333',\n },\n chatStyle: {\n accentColor: '#333333',\n },\n onScrollLeadFlowStyle: {\n color: '#333333',\n },\n onExitLeadFlowStyle: {\n color: '#333333',\n },\n },\n 'author-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#000000',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#000000',\n },\n chatStyle: {\n accentColor: '#000000',\n },\n onScrollLeadFlowStyle: {\n color: '#000000',\n },\n onExitLeadFlowStyle: {\n color: '#000000',\n },\n },\n 'authority-pro': {\n formsStyle: {\n fontFamily: 'Libre Baskerville',\n labelTextColor: '#333333',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#000cff',\n },\n chatStyle: {\n accentColor: '#000cff',\n },\n onScrollLeadFlowStyle: {\n color: '#000cff',\n },\n onExitLeadFlowStyle: {\n color: '#000cff',\n },\n },\n 'beautiful-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#666666',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#e5554e',\n },\n chatStyle: {\n accentColor: '#e5554e',\n },\n onScrollLeadFlowStyle: {\n color: '#e5554e',\n },\n onExitLeadFlowStyle: {\n color: '#e5554e',\n },\n },\n 'breakthrough-pro': {\n formsStyle: {\n fontFamily: 'Alegreya Sans',\n labelTextColor: '#4e4756',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#4a4f9b',\n },\n chatStyle: {\n accentColor: '#4a4f9b',\n },\n onScrollLeadFlowStyle: {\n color: '#4a4f9b',\n },\n onExitLeadFlowStyle: {\n color: '#4a4f9b',\n },\n },\n 'cafe-pro': {\n formsStyle: {\n fontFamily: 'Crimson Text',\n labelTextColor: '#000000',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#000000',\n },\n chatStyle: {\n accentColor: '#000000',\n },\n onScrollLeadFlowStyle: {\n color: '#000000',\n },\n onExitLeadFlowStyle: {\n color: '#000000',\n },\n },\n 'daily-dish-pro': {\n formsStyle: {\n fontFamily: 'Cormorant',\n labelTextColor: '#000000',\n labelTextSize: '20px',\n submitFontColor: '#ffffff',\n submitColor: '#d9037f',\n },\n chatStyle: {\n accentColor: '#d9037f',\n },\n onScrollLeadFlowStyle: {\n color: '#d9037f',\n },\n onExitLeadFlowStyle: {\n color: '#d9037f',\n },\n },\n 'digital-pro': {\n formsStyle: {\n fontFamily: 'Lora',\n labelTextColor: '#5b5e5e',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#e85555',\n },\n chatStyle: {\n accentColor: '#e85555',\n },\n onScrollLeadFlowStyle: {\n color: '#e85555',\n },\n onExitLeadFlowStyle: {\n color: '#e85555',\n },\n },\n 'education-pro': {\n formsStyle: {\n fontFamily: 'Roboto Condensed',\n labelTextColor: '#444444',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#78a7c8',\n },\n chatStyle: {\n accentColor: '#78a7c8',\n },\n onScrollLeadFlowStyle: {\n color: '#78a7c8',\n },\n onExitLeadFlowStyle: {\n color: '#78a7c8',\n },\n },\n 'eleven40-pro': {\n formsStyle: {\n fontFamily: 'Lora',\n labelTextColor: '#000000',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#ed702b',\n },\n chatStyle: {\n accentColor: '#ed702b',\n },\n onScrollLeadFlowStyle: {\n color: '#ed702b',\n },\n onExitLeadFlowStyle: {\n color: '#ed702b',\n },\n },\n 'enterprise-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#777777',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#31b2ed',\n },\n chatStyle: {\n accentColor: '#31b2ed',\n },\n onScrollLeadFlowStyle: {\n color: '#31b2ed',\n },\n onExitLeadFlowStyle: {\n color: '#31b2ed',\n },\n },\n 'essence-pro': {\n formsStyle: {\n fontFamily: 'Alegreya Sans',\n labelTextColor: '#333333',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#be8100',\n },\n chatStyle: {\n accentColor: '#be8100',\n },\n onScrollLeadFlowStyle: {\n color: '#be8100',\n },\n onExitLeadFlowStyle: {\n color: '#be8100',\n },\n },\n 'executive-pro': {\n formsStyle: {\n fontFamily: 'Open Sans',\n labelTextColor: '#222222',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#64c9ea',\n },\n chatStyle: {\n accentColor: '#64c9ea',\n },\n onScrollLeadFlowStyle: {\n color: '#64c9ea',\n },\n onExitLeadFlowStyle: {\n color: '#64c9ea',\n },\n },\n 'generate-pro': {\n formsStyle: {\n fontFamily: 'Source Sans Pro',\n labelTextColor: '#222222',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#eb232f',\n },\n chatStyle: {\n accentColor: '#eb232f',\n },\n onScrollLeadFlowStyle: {\n color: '#eb232f',\n },\n onExitLeadFlowStyle: {\n color: '#eb232f',\n },\n },\n 'infinity-pro': {\n formsStyle: {\n fontFamily: 'Cormorant Garamond',\n labelTextColor: '#000000',\n labelTextSize: '22px',\n submitFontColor: '#ffffff',\n submitColor: '#d43c67',\n },\n chatStyle: {\n accentColor: '#d43c67',\n },\n onScrollLeadFlowStyle: {\n color: '#d43c67',\n },\n onExitLeadFlowStyle: {\n color: '#d43c67',\n },\n },\n 'interior-pro': {\n formsStyle: {\n fontFamily: 'Lora',\n labelTextColor: '#777777',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#009092',\n },\n chatStyle: {\n accentColor: '#009092',\n },\n onScrollLeadFlowStyle: {\n color: '#009092',\n },\n onExitLeadFlowStyle: {\n color: '#009092',\n },\n },\n 'lifestyle-pro': {\n formsStyle: {\n fontFamily: 'Droid Sans',\n labelTextColor: '#767673',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#27968b',\n },\n chatStyle: {\n accentColor: '#27968b',\n },\n onScrollLeadFlowStyle: {\n color: '#27968b',\n },\n onExitLeadFlowStyle: {\n color: '#27968b',\n },\n },\n 'magazine-pro': {\n formsStyle: {\n fontFamily: 'Roboto',\n labelTextColor: '#222222',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#008285',\n },\n chatStyle: {\n accentColor: '#008285',\n },\n onScrollLeadFlowStyle: {\n color: '#008285',\n },\n onExitLeadFlowStyle: {\n color: '#008285',\n },\n },\n 'metro-pro': {\n formsStyle: {\n fontFamily: 'Helvetica Neue',\n labelTextColor: '#222222',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#f96e5b',\n },\n chatStyle: {\n accentColor: '#f96e5b',\n },\n onScrollLeadFlowStyle: {\n color: '#f96e5b',\n },\n onExitLeadFlowStyle: {\n color: '#f96e5b',\n },\n },\n 'minimum-pro': {\n formsStyle: {\n fontFamily: 'Roboto Slab',\n labelTextColor: '#333333',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#0ebfe9',\n },\n chatStyle: {\n accentColor: '#0ebfe9',\n },\n onScrollLeadFlowStyle: {\n color: '#0ebfe9',\n },\n onExitLeadFlowStyle: {\n color: '#0ebfe9',\n },\n },\n 'modern-studio-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#000000',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#000000',\n },\n chatStyle: {\n accentColor: '#000000',\n },\n onScrollLeadFlowStyle: {\n color: '#000000',\n },\n onExitLeadFlowStyle: {\n color: '#000000',\n },\n },\n 'monochrome-pro': {\n formsStyle: {\n fontFamily: 'Muli',\n labelTextColor: '#000000',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#0066cc',\n },\n chatStyle: {\n accentColor: '#0066cc',\n },\n onScrollLeadFlowStyle: {\n color: '#0066cc',\n },\n onExitLeadFlowStyle: {\n color: '#0066cc',\n },\n },\n 'news-pro': {\n formsStyle: {\n fontFamily: 'Raleway',\n labelTextColor: '#666666',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#ff0000',\n },\n chatStyle: {\n accentColor: '#ff0000',\n },\n onScrollLeadFlowStyle: {\n color: '#ff0000',\n },\n onExitLeadFlowStyle: {\n color: '#ff0000',\n },\n },\n 'no-sidebar-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#333333',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#333333',\n },\n chatStyle: {\n accentColor: '#333333',\n },\n onScrollLeadFlowStyle: {\n color: '#333333',\n },\n onExitLeadFlowStyle: {\n color: '#333333',\n },\n },\n 'outfitter-pro': {\n formsStyle: {\n fontFamily: 'Noto Sans',\n labelTextColor: '#546e7a',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#000000',\n },\n chatStyle: {\n accentColor: '#000000',\n },\n onScrollLeadFlowStyle: {\n color: '#000000',\n },\n onExitLeadFlowStyle: {\n color: '#000000',\n },\n },\n 'outreach-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#333333',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#6ab446',\n },\n chatStyle: {\n accentColor: '#6ab446',\n },\n onScrollLeadFlowStyle: {\n color: '#6ab446',\n },\n onExitLeadFlowStyle: {\n color: '#6ab446',\n },\n },\n 'parallax-pro': {\n formsStyle: {\n fontFamily: 'Cormorant Garamond',\n labelTextColor: '#000000',\n labelTextSize: '22px',\n submitFontColor: '#ffffff',\n submitColor: '#00a0af',\n },\n chatStyle: {\n accentColor: '#00a0af',\n },\n onScrollLeadFlowStyle: {\n color: '#00a0af',\n },\n onExitLeadFlowStyle: {\n color: '#00a0af',\n },\n },\n 'revolution-pro': {\n formsStyle: {\n fontFamily: 'Noto Serif SC',\n labelTextColor: '#000000',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#008080',\n },\n chatStyle: {\n accentColor: '#008080',\n },\n onScrollLeadFlowStyle: {\n color: '#008080',\n },\n onExitLeadFlowStyle: {\n color: '#008080',\n },\n },\n 'sixteen-nine-pro': {\n formsStyle: {\n fontFamily: 'Roboto',\n labelTextColor: '#000000',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#1dbec0',\n },\n chatStyle: {\n accentColor: '#1dbec0',\n },\n onScrollLeadFlowStyle: {\n color: '#1dbec0',\n },\n onExitLeadFlowStyle: {\n color: '#1dbec0',\n },\n },\n 'smart-passive-income-pro': {\n formsStyle: {\n fontFamily: 'Roboto',\n labelTextColor: '#333333',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#0e763c',\n },\n chatStyle: {\n accentColor: '#0e763c',\n },\n onScrollLeadFlowStyle: {\n color: '#0e763c',\n },\n onExitLeadFlowStyle: {\n color: '#0e763c',\n },\n },\n 'wellness-pro': {\n formsStyle: {\n fontFamily: 'Open Sans',\n labelTextColor: '#000000',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#5da44f',\n },\n chatStyle: {\n accentColor: '#5da44f',\n },\n onScrollLeadFlowStyle: {\n color: '#5da44f',\n },\n onExitLeadFlowStyle: {\n color: '#5da44f',\n },\n },\n 'workstation-pro': {\n formsStyle: {\n fontFamily: 'Baskerville',\n labelTextColor: '#222222',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#ff4800',\n },\n chatStyle: {\n accentColor: '#ff4800',\n },\n onScrollLeadFlowStyle: {\n color: '#ff4800',\n },\n onExitLeadFlowStyle: {\n color: '#ff4800',\n },\n },\n};\n","import {\n onInterframeReady,\n onConnect,\n onDisconnect,\n onMarkAsOutdated,\n onUpgrade,\n onPageReload,\n onInitNavigation,\n onDisableNavigation,\n onClearQueryParam,\n onGetDomain,\n onGetAssetsPayload,\n onEnterFullScreen,\n onExitFullScreen,\n} from './api/hubspotPluginApi';\nimport {\n connect,\n disconnect,\n markAsOutdated,\n getDomain,\n clearPortalIdPolling,\n} from './api/wordpressApi';\nimport { adminUrl, theme } from './constants/leadinConfig';\nimport { initNavigation, disableNavigation } from './navigation';\nimport enterFullScreen, { exitFullScreen } from './fullscreen';\nimport themes from './constants/themes';\n\nonInterframeReady((message, reply) => {\n reply('Interframe Ready');\n});\n\nonConnect((portalId, reply) => {\n connect(\n portalId,\n () => {\n clearPortalIdPolling();\n reply({ success: true });\n },\n reply.bind(null, { success: false })\n );\n});\n\nonDisconnect((message, reply) => {\n disconnect(\n reply.bind(null, { success: true }),\n reply.bind(null, { success: false })\n );\n});\n\nonMarkAsOutdated((message, reply) => {\n markAsOutdated(reply);\n});\n\nonUpgrade((message, reply) => {\n reply();\n location.href = `${adminUrl}plugins.php`;\n});\n\nonPageReload((message, reply) => {\n reply();\n window.location.reload(true);\n});\n\nonInitNavigation((message, reply) => {\n reply();\n initNavigation();\n});\n\nonDisableNavigation((message, reply) => {\n reply();\n disableNavigation();\n});\n\nonClearQueryParam((message, reply) => {\n reply();\n let currentWindowLocation = window.location.toString();\n if (currentWindowLocation.indexOf('?') > 0) {\n currentWindowLocation = currentWindowLocation.substring(\n 0,\n currentWindowLocation.indexOf('?')\n );\n }\n const newWindowLocation = `${currentWindowLocation}?page=leadin`;\n window.history.pushState({}, '', newWindowLocation);\n});\n\nonGetDomain((message, reply) => {\n getDomain(data => {\n if (data.domain) {\n reply(data.domain);\n }\n });\n});\n\nonGetAssetsPayload((message, reply) => {\n reply({ payload: themes[theme] });\n});\n\nonEnterFullScreen((message, reply) => {\n reply();\n enterFullScreen();\n});\n\nonExitFullScreen((message, reply) => {\n reply();\n exitFullScreen();\n});\n","import { domElements } from './constants/selectors';\n\nexport default function enterFullScreen() {\n jQuery(domElements.iframe).addClass('leadin-iframe-fullscreen');\n}\n\nexport function exitFullScreen() {\n jQuery(domElements.iframe).removeClass('leadin-iframe-fullscreen');\n}\n","import Raven, { configureRaven } from './lib/Raven';\nimport { initChatflows } from './chatflows';\nimport { portalId } from './constants/leadinConfig';\nimport { initInterframe } from './lib/Interframe';\nimport { startPortalIdPolling } from './api/wordpressApi';\nimport './handlers';\n\nfunction main() {\n initInterframe();\n\n // Enable App Navigation only when viewing the plugin\n if (window.location.search.indexOf('page=leadin') !== -1) {\n if (!portalId) {\n startPortalIdPolling();\n }\n }\n\n jQuery(document).ready(initChatflows);\n}\n\nconfigureRaven();\nRaven.context(main);\n"],"sourceRoot":""}
|
1 |
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/raven-js/src/singleton.js","webpack:///(webpack)/buildin/global.js","webpack:///./node_modules/raven-js/src/utils.js","webpack:///./node_modules/raven-js/src/raven.js","webpack:///./node_modules/raven-js/vendor/TraceKit/tracekit.js","webpack:///./node_modules/raven-js/vendor/json-stringify-safe/stringify.js","webpack:///./node_modules/raven-js/src/configError.js","webpack:///./node_modules/raven-js/src/console.js","webpack:///./js/constants/leadinConfig.js","webpack:///./js/lib/Raven.js","webpack:///./js/menu.js","webpack:///./js/utils.js","webpack:///./js/constants/selectors.js","webpack:///./js/lib/Interframe.js","webpack:///./js/lib/EventBus.js","webpack:///./js/api/wordpressApi.js","webpack:///./js/api/hubspotPluginApi.js","webpack:///./js/navigation.js","webpack:///./js/constants/themes.js","webpack:///./js/handlers.js","webpack:///./js/fullscreen.js","webpack:///./js/app.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","global","RavenConstructor","_window","window","self","_Raven","Raven","noConflict","afterLoad","g","this","Function","e","isUndefined","what","isString","toString","supportsErrorEvent","ErrorEvent","each","obj","callback","j","length","hasKey","htmlElementAsString","elem","className","classes","attr","out","tagName","push","toLowerCase","id","split","attrWhitelist","getAttribute","join","isOnlyOneTruthy","a","b","isSameStacktrace","stack1","stack2","frames1","frames","frames2","filename","lineno","colno","isObject","isError","Error","isErrorEvent","isFunction","isEmptyObject","_","wrappedCallback","data","original","normalizedData","objectMerge","obj1","obj2","truncate","str","max","substr","objectFrozen","isFrozen","joinRegExp","patterns","pattern","sources","len","replace","source","RegExp","urlencode","pairs","encodeURIComponent","uuid4","crypto","msCrypto","getRandomValues","arr","Uint16Array","pad","num","v","Math","random","htmlTreeAsString","nextStr","height","sepLength","parentNode","reverse","isSameException","ex1","ex2","values","type","stacktrace","parseUrl","url","match","query","fragment","protocol","host","path","relative","fill","replacement","track","orig","TraceKit","stringify","RavenConfigError","utils","wrapConsoleMethod","wrapMethod","dsnKeys","dsnPattern","now","Date","_document","document","_navigator","navigator","keepOriginalCallback","method","_hasJSON","JSON","_hasDocument","_hasNavigator","_lastCapturedException","_lastData","_lastEventId","_globalServer","_globalKey","_globalProject","_globalContext","_globalOptions","logger","ignoreErrors","ignoreUrls","whitelistUrls","includePaths","collectWindowErrors","maxMessageLength","maxUrlLength","stackTraceLimit","autoBreadcrumbs","instrument","sampleRate","_ignoreOnError","_isRavenInstalled","_originalErrorStackTraceLimit","_originalConsole","console","_originalConsoleMethods","_plugins","_startTime","_wrappedBuiltIns","_breadcrumbs","_lastCapturedEvent","_keypressTimeout","_location","location","_lastHref","href","_resetBackoff","VERSION","debug","config","dsn","options","_logDebug","globalOptions","setDSN","maxBreadcrumbs","min","autoBreadcrumbDefaults","xhr","dom","instrumentDefaults","tryCatch","install","isSetup","report","subscribe","_handleOnErrorStackInfo","apply","arguments","_instrumentTryCatch","_instrumentBreadcrumbs","_drainPlugins","uri","_parseDSN","lastSlash","lastIndexOf","_dsn","user","_globalSecret","pass","_getGlobalServer","_globalEndpoint","context","func","args","undefined","wrap","_before","__raven__","__raven_wrapper__","wrapped","deep","_ignoreNextOnError","captureException","__inner__","uninstall","_restoreBuiltIns","ex","isNotError","isNotErrorEvent","isErrorEventWithoutError","error","captureMessage","trimHeadFrames","stack","computeStackTrace","_handleStackInfo","msg","test","message","initialCall","fileurl","fingerprint","_prepareFrames","_send","captureBreadcrumb","crumb","timestamp","breadcrumbCallback","result","shift","addPlugin","plugin","pluginArgs","slice","setUserContext","setExtraContext","extra","_mergeContext","setTagsContext","tags","clearContext","getContext","parse","setEnvironment","environment","setRelease","release","setDataCallback","dataCallback","setBreadcrumbCallback","setShouldSendCallback","shouldSendCallback","setTransport","transport","lastException","lastEventId","ravenNotConfiguredError","RavenConfig","showReportDialog","eventId","encode","qs","email","globalServer","script","createElement","async","src","head","body","appendChild","setTimeout","_triggerEvent","eventType","evt","toUpperCase","createEvent","initEvent","createEventObject","dispatchEvent","fireEvent","_breadcrumbEventHandler","evtName","target","category","_keypressEventHandler","isContentEditable","timeout","clearTimeout","_captureUrlChange","from","to","parsedLoc","parsedTo","parsedFrom","wrappedBuiltIns","wrapTimeFn","fn","Array","originalCallback","wrapEventTarget","proto","capture","secure","handleEvent","err","before","clickHandler","keypressHandler","requestAnimationFrame","cb","eventTargets","wrapProp","prop","xhrproto","XMLHttpRequest","origOpen","indexOf","__raven_xhr","status_code","origSend","onreadystatechangeHandler","readyState","status","props","onreadystatechange","origFetch","fetchInput","Request","fetchData","then","response","addEventListener","attachEvent","chrome","hasPushAndReplaceState","app","runtime","history","pushState","replaceState","oldOnPopState","onpopstate","currentHref","historyReplacementFunction","origHistFunction","log","consoleMethodCallback","level","builtin","installer","concat","exec","allowSecretKey","port","stackInfo","_processException","frame","_normalizeFrame","in_app","stackInfoUrl","normalized","line","column","function","prefixedMessage","exception","culprit","_trimPacket","request","Referer","breadcrumbs","_trimBreadcrumbs","urlProp","urlProps","_getHttpData","httpData","userAgent","headers","User-Agent","referrer","_backoffDuration","_backoffStart","_shouldBackoff","_isRepeatData","current","last","_setBackoffState","retry","getResponseHeader","parseInt","baseData","project","platform","serverName","server_name","_sendProcessedPayload","_getUuid","allowDuplicates","event_id","auth","sentry_version","sentry_client","sentry_key","sentry_secret","_makeRequest","onSuccess","onError","opts","XDomainRequest","onload","onerror","open","send","setUser","setReleaseContext","_slice","UNKNOWN_FUNCTION","ERROR_TYPES_RE","getLocationHref","_oldOnerrorHandler","_onErrorHandlerInstalled","handlers","lastArgs","lastExceptionStack","notifyHandlers","isWindowError","inner","traceKitWindowOnError","lineNo","colNo","augmentStackTraceWithInitialElement","processLastException","groups","_lastExceptionStack","_lastArgs","rethrow","incomplete","handler","unsubscribe","splice","computeStackTraceFromStackProp","submatch","parts","element","gecko","winjs","geckoEval","chromeEval","lines","isNative","columnNumber","initial","unshift","partial","computeStackTraceByWalkingCallerChain","depth","item","functionName","funcs","recursion","curr","caller","input","substring","sourceURL","fileName","lineNumber","description","haystack","needle","serializer","replacer","cycleReplacer","keys","thisPos","Infinity","stringifyError","spaces","getSerialize","constructor","originalConsoleLevel","originalConsole","sentryLevel","leadinConfig","adminUrl","ajaxUrl","env","hubspotBaseUrl","leadinPluginVersion","plugins","phpVersion","portalId","theme","wpVersion","i18n","leadinI18n","addMenuItem","text","jQuery","find","addExternalLinks","chatflowsUrl","emailUrl","chatflows","localStorage","LEADIN_DEBUG","_console","_len","_key","domElements","iframe","allMenuButtons","subMenuButtons","eventBus","EventBus","_classCallCheck","bus","_this$bus","trigger","event","on","callbacks","postMessageObject","contentWindow","postMessage","reply","newMessage","assign","handleMessage","_callbackId","handleResponse","forEach","handleMessageEvent","origin","makeRequest","action","payload","success","ajaxPayload","contentType","jqXHR","responseText","ajax","post","portalPollingTimeout","getPortal","stopPortalPolling","startPortalIdPolling","reload","disconnect","getDomain","markAsOutdated","createHandler","onClearQueryParam","onConnect","onDisableNavigation","onDisconnect","onEnterFullScreen","onExitFullScreen","onGetAssetsPayload","onGetDomain","onInitNavigation","onInterframeReady","onMarkAsOutdated","onPageReload","onUpgrade","changeRoute","route","onResponse","onTimeout","timeoutId","initNavigation","handleNavigation","search","removeClass","pageParam","parent","addClass","setSelectedMenuItem","click","metaKey","altKey","shiftKey","preventDefault","themes","genesis-sample","formsStyle","fontFamily","labelTextColor","labelTextSize","submitFontColor","submitColor","chatStyle","accentColor","onScrollLeadFlowStyle","color","onExitLeadFlowStyle","academy-pro","agency-pro","agentpress-pro","altitude-pro","ambiance-pro","atmosphere-pro","author-pro","authority-pro","beautiful-pro","breakthrough-pro","cafe-pro","daily-dish-pro","digital-pro","education-pro","eleven40-pro","enterprise-pro","essence-pro","executive-pro","generate-pro","infinity-pro","interior-pro","lifestyle-pro","magazine-pro","metro-pro","minimum-pro","modern-studio-pro","monochrome-pro","news-pro","no-sidebar-pro","outfitter-pro","outreach-pro","parallax-pro","revolution-pro","sixteen-nine-pro","smart-passive-income-pro","wellness-pro","workstation-pro","connect","off","currentWindowLocation","newWindowLocation","domain","leadin","php","wordpress","hub","map","Version","ready"],"mappings":"aACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa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BACvB7oB,OAAOkW,QAAQC,UAAU,GAAI,GAAI2S,KAGnC7E,EAAY,SAACvV,EAASoT,GACpByB,EAAU,SAAA/f,GACJA,EAAKulB,QACPjH,EAAMte,EAAKulB,YAKjB/E,EAAmB,SAACtV,EAASoT,GAC3BA,EAAM,CAAEW,QAASgD,GAAO5F,OAG1BiE,EAAkB,SAACpV,EAASoT,GAC1BA,IChGA3B,OAAOW,EAAYC,QAAQmE,SAAS,8BDoGtCnB,EAAiB,SAACrV,EAASoT,GACzBA,ICjGA3B,OAAOW,EAAYC,QAAQgE,YAAY,8BXI3B,SAARxF,IAIJpf,IAAM2K,OACJ,oEACA,CACErB,WAAY,CACViC,UAAU,KAGdC,UAEFxL,IAAM2P,eAAe,CACnBkZ,OAAQvJ,EACRwJ,IAAKtJ,EACLuJ,UAAWpJ,IAGb3f,IAAMuP,eAAe,CACnByZ,IAAKvJ,EACLF,QAASnhB,OAAOmgB,KAAKgB,GAClB0J,IAAI,SAAAhrB,GAAI,SAAA2Y,OAAO3Y,EAAP,KAAA2Y,OAAe2I,EAAQthB,GAAMirB,WACrClnB,KAAK,QYbZhC,EAAM4M,QAdN,WR8EE/M,OAAO4V,iBAAiB,UAAWyM,IQ1EoB,IAAnDriB,OAAOwK,SAASsa,OAAOjQ,QAAQ,iBAC5B+K,GACHwD,KAIJjD,OAAOrY,UAAUwhB,MAAMjJ","file":"leadin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 8);\n","/**\n * Enforces a single instance of the Raven client, and the\n * main entry point for Raven. If you are a consumer of the\n * Raven library, you SHOULD load this file (vs raven.js).\n **/\n\nvar RavenConstructor = require('./raven');\n\n// This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)\nvar _window =\n typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\nvar _Raven = _window.Raven;\n\nvar Raven = new RavenConstructor();\n\n/*\n * Allow multiple versions of Raven to be installed.\n * Strip Raven from the global context and returns the instance.\n *\n * @return {Raven}\n */\nRaven.noConflict = function() {\n _window.Raven = _Raven;\n return Raven;\n};\n\nRaven.afterLoad();\n\nmodule.exports = Raven;\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","var _window =\n typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction isObject(what) {\n return typeof what === 'object' && what !== null;\n}\n\n// Yanked from https://git.io/vS8DV re-used under CC0\n// with some tiny modifications\nfunction isError(value) {\n switch ({}.toString.call(value)) {\n case '[object Error]':\n return true;\n case '[object Exception]':\n return true;\n case '[object DOMException]':\n return true;\n default:\n return value instanceof Error;\n }\n}\n\nfunction isErrorEvent(value) {\n return supportsErrorEvent() && {}.toString.call(value) === '[object ErrorEvent]';\n}\n\nfunction isUndefined(what) {\n return what === void 0;\n}\n\nfunction isFunction(what) {\n return typeof what === 'function';\n}\n\nfunction isString(what) {\n return Object.prototype.toString.call(what) === '[object String]';\n}\n\nfunction isEmptyObject(what) {\n for (var _ in what) return false; // eslint-disable-line guard-for-in, no-unused-vars\n return true;\n}\n\nfunction supportsErrorEvent() {\n try {\n new ErrorEvent(''); // eslint-disable-line no-new\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction wrappedCallback(callback) {\n function dataCallback(data, original) {\n var normalizedData = callback(data) || data;\n if (original) {\n return original(normalizedData) || normalizedData;\n }\n return normalizedData;\n }\n\n return dataCallback;\n}\n\nfunction each(obj, callback) {\n var i, j;\n\n if (isUndefined(obj.length)) {\n for (i in obj) {\n if (hasKey(obj, i)) {\n callback.call(null, i, obj[i]);\n }\n }\n } else {\n j = obj.length;\n if (j) {\n for (i = 0; i < j; i++) {\n callback.call(null, i, obj[i]);\n }\n }\n }\n}\n\nfunction objectMerge(obj1, obj2) {\n if (!obj2) {\n return obj1;\n }\n each(obj2, function(key, value) {\n obj1[key] = value;\n });\n return obj1;\n}\n\n/**\n * This function is only used for react-native.\n * react-native freezes object that have already been sent over the\n * js bridge. We need this function in order to check if the object is frozen.\n * So it's ok that objectFrozen returns false if Object.isFrozen is not\n * supported because it's not relevant for other \"platforms\". See related issue:\n * https://github.com/getsentry/react-native-sentry/issues/57\n */\nfunction objectFrozen(obj) {\n if (!Object.isFrozen) {\n return false;\n }\n return Object.isFrozen(obj);\n}\n\nfunction truncate(str, max) {\n return !max || str.length <= max ? str : str.substr(0, max) + '\\u2026';\n}\n\n/**\n * hasKey, a better form of hasOwnProperty\n * Example: hasKey(MainHostObject, property) === true/false\n *\n * @param {Object} host object to check property\n * @param {string} key to check\n */\nfunction hasKey(object, key) {\n return Object.prototype.hasOwnProperty.call(object, key);\n}\n\nfunction joinRegExp(patterns) {\n // Combine an array of regular expressions and strings into one large regexp\n // Be mad.\n var sources = [],\n i = 0,\n len = patterns.length,\n pattern;\n\n for (; i < len; i++) {\n pattern = patterns[i];\n if (isString(pattern)) {\n // If it's a string, we need to escape it\n // Taken from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions\n sources.push(pattern.replace(/([.*+?^=!:${}()|\\[\\]\\/\\\\])/g, '\\\\$1'));\n } else if (pattern && pattern.source) {\n // If it's a regexp already, we want to extract the source\n sources.push(pattern.source);\n }\n // Intentionally skip other cases\n }\n return new RegExp(sources.join('|'), 'i');\n}\n\nfunction urlencode(o) {\n var pairs = [];\n each(o, function(key, value) {\n pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));\n });\n return pairs.join('&');\n}\n\n// borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n// intentionally using regex and not <a/> href parsing trick because React Native and other\n// environments where DOM might not be available\nfunction parseUrl(url) {\n var match = url.match(/^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n if (!match) return {};\n\n // coerce to undefined values to empty string so we don't get 'undefined'\n var query = match[6] || '';\n var fragment = match[8] || '';\n return {\n protocol: match[2],\n host: match[4],\n path: match[5],\n relative: match[5] + query + fragment // everything minus origin\n };\n}\nfunction uuid4() {\n var crypto = _window.crypto || _window.msCrypto;\n\n if (!isUndefined(crypto) && crypto.getRandomValues) {\n // Use window.crypto API if available\n // eslint-disable-next-line no-undef\n var arr = new Uint16Array(8);\n crypto.getRandomValues(arr);\n\n // set 4 in byte 7\n arr[3] = (arr[3] & 0xfff) | 0x4000;\n // set 2 most significant bits of byte 9 to '10'\n arr[4] = (arr[4] & 0x3fff) | 0x8000;\n\n var pad = function(num) {\n var v = num.toString(16);\n while (v.length < 4) {\n v = '0' + v;\n }\n return v;\n };\n\n return (\n pad(arr[0]) +\n pad(arr[1]) +\n pad(arr[2]) +\n pad(arr[3]) +\n pad(arr[4]) +\n pad(arr[5]) +\n pad(arr[6]) +\n pad(arr[7])\n );\n } else {\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (Math.random() * 16) | 0,\n v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n }\n}\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @param elem\n * @returns {string}\n */\nfunction htmlTreeAsString(elem) {\n /* eslint no-extra-parens:0*/\n var MAX_TRAVERSE_HEIGHT = 5,\n MAX_OUTPUT_LEN = 80,\n out = [],\n height = 0,\n len = 0,\n separator = ' > ',\n sepLength = separator.length,\n nextStr;\n\n while (elem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = htmlElementAsString(elem);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds MAX_OUTPUT_LEN\n // (ignore this limit if we are on the first iteration)\n if (\n nextStr === 'html' ||\n (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)\n ) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n elem = elem.parentNode;\n }\n\n return out.reverse().join(separator);\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @param HTMLElement\n * @returns {string}\n */\nfunction htmlElementAsString(elem) {\n var out = [],\n className,\n classes,\n key,\n attr,\n i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n out.push(elem.tagName.toLowerCase());\n if (elem.id) {\n out.push('#' + elem.id);\n }\n\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push('.' + classes[i]);\n }\n }\n var attrWhitelist = ['type', 'name', 'title', 'alt'];\n for (i = 0; i < attrWhitelist.length; i++) {\n key = attrWhitelist[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push('[' + key + '=\"' + attr + '\"]');\n }\n }\n return out.join('');\n}\n\n/**\n * Returns true if either a OR b is truthy, but not both\n */\nfunction isOnlyOneTruthy(a, b) {\n return !!(!!a ^ !!b);\n}\n\n/**\n * Returns true if the two input exception interfaces have the same content\n */\nfunction isSameException(ex1, ex2) {\n if (isOnlyOneTruthy(ex1, ex2)) return false;\n\n ex1 = ex1.values[0];\n ex2 = ex2.values[0];\n\n if (ex1.type !== ex2.type || ex1.value !== ex2.value) return false;\n\n return isSameStacktrace(ex1.stacktrace, ex2.stacktrace);\n}\n\n/**\n * Returns true if the two input stack trace interfaces have the same content\n */\nfunction isSameStacktrace(stack1, stack2) {\n if (isOnlyOneTruthy(stack1, stack2)) return false;\n\n var frames1 = stack1.frames;\n var frames2 = stack2.frames;\n\n // Exit early if frame count differs\n if (frames1.length !== frames2.length) return false;\n\n // Iterate through every frame; bail out if anything differs\n var a, b;\n for (var i = 0; i < frames1.length; i++) {\n a = frames1[i];\n b = frames2[i];\n if (\n a.filename !== b.filename ||\n a.lineno !== b.lineno ||\n a.colno !== b.colno ||\n a['function'] !== b['function']\n )\n return false;\n }\n return true;\n}\n\n/**\n * Polyfill a method\n * @param obj object e.g. `document`\n * @param name method name present on object e.g. `addEventListener`\n * @param replacement replacement function\n * @param track {optional} record instrumentation to an array\n */\nfunction fill(obj, name, replacement, track) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (track) {\n track.push([obj, name, orig]);\n }\n}\n\nmodule.exports = {\n isObject: isObject,\n isError: isError,\n isErrorEvent: isErrorEvent,\n isUndefined: isUndefined,\n isFunction: isFunction,\n isString: isString,\n isEmptyObject: isEmptyObject,\n supportsErrorEvent: supportsErrorEvent,\n wrappedCallback: wrappedCallback,\n each: each,\n objectMerge: objectMerge,\n truncate: truncate,\n objectFrozen: objectFrozen,\n hasKey: hasKey,\n joinRegExp: joinRegExp,\n urlencode: urlencode,\n uuid4: uuid4,\n htmlTreeAsString: htmlTreeAsString,\n htmlElementAsString: htmlElementAsString,\n isSameException: isSameException,\n isSameStacktrace: isSameStacktrace,\n parseUrl: parseUrl,\n fill: fill\n};\n","/*global XDomainRequest:false */\n\nvar TraceKit = require('../vendor/TraceKit/tracekit');\nvar stringify = require('../vendor/json-stringify-safe/stringify');\nvar RavenConfigError = require('./configError');\n\nvar utils = require('./utils');\nvar isError = utils.isError;\nvar isObject = utils.isObject;\nvar isObject = utils.isObject;\nvar isErrorEvent = utils.isErrorEvent;\nvar isUndefined = utils.isUndefined;\nvar isFunction = utils.isFunction;\nvar isString = utils.isString;\nvar isEmptyObject = utils.isEmptyObject;\nvar each = utils.each;\nvar objectMerge = utils.objectMerge;\nvar truncate = utils.truncate;\nvar objectFrozen = utils.objectFrozen;\nvar hasKey = utils.hasKey;\nvar joinRegExp = utils.joinRegExp;\nvar urlencode = utils.urlencode;\nvar uuid4 = utils.uuid4;\nvar htmlTreeAsString = utils.htmlTreeAsString;\nvar isSameException = utils.isSameException;\nvar isSameStacktrace = utils.isSameStacktrace;\nvar parseUrl = utils.parseUrl;\nvar fill = utils.fill;\n\nvar wrapConsoleMethod = require('./console').wrapMethod;\n\nvar dsnKeys = 'source protocol user pass host port path'.split(' '),\n dsnPattern = /^(?:(\\w+):)?\\/\\/(?:(\\w+)(:\\w+)?@)?([\\w\\.-]+)(?::(\\d+))?(\\/.*)/;\n\nfunction now() {\n return +new Date();\n}\n\n// This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)\nvar _window =\n typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\nvar _document = _window.document;\nvar _navigator = _window.navigator;\n\nfunction keepOriginalCallback(original, callback) {\n return isFunction(callback)\n ? function(data) {\n return callback(data, original);\n }\n : callback;\n}\n\n// First, check for JSON support\n// If there is no JSON, we no-op the core features of Raven\n// since JSON is required to encode the payload\nfunction Raven() {\n this._hasJSON = !!(typeof JSON === 'object' && JSON.stringify);\n // Raven can run in contexts where there's no document (react-native)\n this._hasDocument = !isUndefined(_document);\n this._hasNavigator = !isUndefined(_navigator);\n this._lastCapturedException = null;\n this._lastData = null;\n this._lastEventId = null;\n this._globalServer = null;\n this._globalKey = null;\n this._globalProject = null;\n this._globalContext = {};\n this._globalOptions = {\n logger: 'javascript',\n ignoreErrors: [],\n ignoreUrls: [],\n whitelistUrls: [],\n includePaths: [],\n collectWindowErrors: true,\n maxMessageLength: 0,\n\n // By default, truncates URL values to 250 chars\n maxUrlLength: 250,\n stackTraceLimit: 50,\n autoBreadcrumbs: true,\n instrument: true,\n sampleRate: 1\n };\n this._ignoreOnError = 0;\n this._isRavenInstalled = false;\n this._originalErrorStackTraceLimit = Error.stackTraceLimit;\n // capture references to window.console *and* all its methods first\n // before the console plugin has a chance to monkey patch\n this._originalConsole = _window.console || {};\n this._originalConsoleMethods = {};\n this._plugins = [];\n this._startTime = now();\n this._wrappedBuiltIns = [];\n this._breadcrumbs = [];\n this._lastCapturedEvent = null;\n this._keypressTimeout;\n this._location = _window.location;\n this._lastHref = this._location && this._location.href;\n this._resetBackoff();\n\n // eslint-disable-next-line guard-for-in\n for (var method in this._originalConsole) {\n this._originalConsoleMethods[method] = this._originalConsole[method];\n }\n}\n\n/*\n * The core Raven singleton\n *\n * @this {Raven}\n */\n\nRaven.prototype = {\n // Hardcode version string so that raven source can be loaded directly via\n // webpack (using a build step causes webpack #1617). Grunt verifies that\n // this value matches package.json during build.\n // See: https://github.com/getsentry/raven-js/issues/465\n VERSION: '3.19.1',\n\n debug: false,\n\n TraceKit: TraceKit, // alias to TraceKit\n\n /*\n * Configure Raven with a DSN and extra options\n *\n * @param {string} dsn The public Sentry DSN\n * @param {object} options Set of global options [optional]\n * @return {Raven}\n */\n config: function(dsn, options) {\n var self = this;\n\n if (self._globalServer) {\n this._logDebug('error', 'Error: Raven has already been configured');\n return self;\n }\n if (!dsn) return self;\n\n var globalOptions = self._globalOptions;\n\n // merge in options\n if (options) {\n each(options, function(key, value) {\n // tags and extra are special and need to be put into context\n if (key === 'tags' || key === 'extra' || key === 'user') {\n self._globalContext[key] = value;\n } else {\n globalOptions[key] = value;\n }\n });\n }\n\n self.setDSN(dsn);\n\n // \"Script error.\" is hard coded into browsers for errors that it can't read.\n // this is the result of a script being pulled in from an external domain and CORS.\n globalOptions.ignoreErrors.push(/^Script error\\.?$/);\n globalOptions.ignoreErrors.push(/^Javascript error: Script error\\.? on line 0$/);\n\n // join regexp rules into one big rule\n globalOptions.ignoreErrors = joinRegExp(globalOptions.ignoreErrors);\n globalOptions.ignoreUrls = globalOptions.ignoreUrls.length\n ? joinRegExp(globalOptions.ignoreUrls)\n : false;\n globalOptions.whitelistUrls = globalOptions.whitelistUrls.length\n ? joinRegExp(globalOptions.whitelistUrls)\n : false;\n globalOptions.includePaths = joinRegExp(globalOptions.includePaths);\n globalOptions.maxBreadcrumbs = Math.max(\n 0,\n Math.min(globalOptions.maxBreadcrumbs || 100, 100)\n ); // default and hard limit is 100\n\n var autoBreadcrumbDefaults = {\n xhr: true,\n console: true,\n dom: true,\n location: true\n };\n\n var autoBreadcrumbs = globalOptions.autoBreadcrumbs;\n if ({}.toString.call(autoBreadcrumbs) === '[object Object]') {\n autoBreadcrumbs = objectMerge(autoBreadcrumbDefaults, autoBreadcrumbs);\n } else if (autoBreadcrumbs !== false) {\n autoBreadcrumbs = autoBreadcrumbDefaults;\n }\n globalOptions.autoBreadcrumbs = autoBreadcrumbs;\n\n var instrumentDefaults = {\n tryCatch: true\n };\n\n var instrument = globalOptions.instrument;\n if ({}.toString.call(instrument) === '[object Object]') {\n instrument = objectMerge(instrumentDefaults, instrument);\n } else if (instrument !== false) {\n instrument = instrumentDefaults;\n }\n globalOptions.instrument = instrument;\n\n TraceKit.collectWindowErrors = !!globalOptions.collectWindowErrors;\n\n // return for chaining\n return self;\n },\n\n /*\n * Installs a global window.onerror error handler\n * to capture and report uncaught exceptions.\n * At this point, install() is required to be called due\n * to the way TraceKit is set up.\n *\n * @return {Raven}\n */\n install: function() {\n var self = this;\n if (self.isSetup() && !self._isRavenInstalled) {\n TraceKit.report.subscribe(function() {\n self._handleOnErrorStackInfo.apply(self, arguments);\n });\n if (self._globalOptions.instrument && self._globalOptions.instrument.tryCatch) {\n self._instrumentTryCatch();\n }\n\n if (self._globalOptions.autoBreadcrumbs) self._instrumentBreadcrumbs();\n\n // Install all of the plugins\n self._drainPlugins();\n\n self._isRavenInstalled = true;\n }\n\n Error.stackTraceLimit = self._globalOptions.stackTraceLimit;\n return this;\n },\n\n /*\n * Set the DSN (can be called multiple time unlike config)\n *\n * @param {string} dsn The public Sentry DSN\n */\n setDSN: function(dsn) {\n var self = this,\n uri = self._parseDSN(dsn),\n lastSlash = uri.path.lastIndexOf('/'),\n path = uri.path.substr(1, lastSlash);\n\n self._dsn = dsn;\n self._globalKey = uri.user;\n self._globalSecret = uri.pass && uri.pass.substr(1);\n self._globalProject = uri.path.substr(lastSlash + 1);\n\n self._globalServer = self._getGlobalServer(uri);\n\n self._globalEndpoint =\n self._globalServer + '/' + path + 'api/' + self._globalProject + '/store/';\n\n // Reset backoff state since we may be pointing at a\n // new project/server\n this._resetBackoff();\n },\n\n /*\n * Wrap code within a context so Raven can capture errors\n * reliably across domains that is executed immediately.\n *\n * @param {object} options A specific set of options for this context [optional]\n * @param {function} func The callback to be immediately executed within the context\n * @param {array} args An array of arguments to be called with the callback [optional]\n */\n context: function(options, func, args) {\n if (isFunction(options)) {\n args = func || [];\n func = options;\n options = undefined;\n }\n\n return this.wrap(options, func).apply(this, args);\n },\n\n /*\n * Wrap code within a context and returns back a new function to be executed\n *\n * @param {object} options A specific set of options for this context [optional]\n * @param {function} func The function to be wrapped in a new context\n * @param {function} func A function to call before the try/catch wrapper [optional, private]\n * @return {function} The newly wrapped functions with a context\n */\n wrap: function(options, func, _before) {\n var self = this;\n // 1 argument has been passed, and it's not a function\n // so just return it\n if (isUndefined(func) && !isFunction(options)) {\n return options;\n }\n\n // options is optional\n if (isFunction(options)) {\n func = options;\n options = undefined;\n }\n\n // At this point, we've passed along 2 arguments, and the second one\n // is not a function either, so we'll just return the second argument.\n if (!isFunction(func)) {\n return func;\n }\n\n // We don't wanna wrap it twice!\n try {\n if (func.__raven__) {\n return func;\n }\n\n // If this has already been wrapped in the past, return that\n if (func.__raven_wrapper__) {\n return func.__raven_wrapper__;\n }\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return func;\n }\n\n function wrapped() {\n var args = [],\n i = arguments.length,\n deep = !options || (options && options.deep !== false);\n\n if (_before && isFunction(_before)) {\n _before.apply(this, arguments);\n }\n\n // Recursively wrap all of a function's arguments that are\n // functions themselves.\n while (i--) args[i] = deep ? self.wrap(options, arguments[i]) : arguments[i];\n\n try {\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means Raven caught an error invoking your application code. This is\n // expected behavior and NOT indicative of a bug with Raven.js.\n return func.apply(this, args);\n } catch (e) {\n self._ignoreNextOnError();\n self.captureException(e, options);\n throw e;\n }\n }\n\n // copy over properties of the old function\n for (var property in func) {\n if (hasKey(func, property)) {\n wrapped[property] = func[property];\n }\n }\n wrapped.prototype = func.prototype;\n\n func.__raven_wrapper__ = wrapped;\n // Signal that this function has been wrapped already\n // for both debugging and to prevent it to being wrapped twice\n wrapped.__raven__ = true;\n wrapped.__inner__ = func;\n\n return wrapped;\n },\n\n /*\n * Uninstalls the global error handler.\n *\n * @return {Raven}\n */\n uninstall: function() {\n TraceKit.report.uninstall();\n\n this._restoreBuiltIns();\n\n Error.stackTraceLimit = this._originalErrorStackTraceLimit;\n this._isRavenInstalled = false;\n\n return this;\n },\n\n /*\n * Manually capture an exception and send it over to Sentry\n *\n * @param {error} ex An exception to be logged\n * @param {object} options A specific set of options for this error [optional]\n * @return {Raven}\n */\n captureException: function(ex, options) {\n // Cases for sending ex as a message, rather than an exception\n var isNotError = !isError(ex);\n var isNotErrorEvent = !isErrorEvent(ex);\n var isErrorEventWithoutError = isErrorEvent(ex) && !ex.error;\n\n if ((isNotError && isNotErrorEvent) || isErrorEventWithoutError) {\n return this.captureMessage(\n ex,\n objectMerge(\n {\n trimHeadFrames: 1,\n stacktrace: true // if we fall back to captureMessage, default to attempting a new trace\n },\n options\n )\n );\n }\n\n // Get actual Error from ErrorEvent\n if (isErrorEvent(ex)) ex = ex.error;\n\n // Store the raw exception object for potential debugging and introspection\n this._lastCapturedException = ex;\n\n // TraceKit.report will re-raise any exception passed to it,\n // which means you have to wrap it in try/catch. Instead, we\n // can wrap it here and only re-raise if TraceKit.report\n // raises an exception different from the one we asked to\n // report on.\n try {\n var stack = TraceKit.computeStackTrace(ex);\n this._handleStackInfo(stack, options);\n } catch (ex1) {\n if (ex !== ex1) {\n throw ex1;\n }\n }\n\n return this;\n },\n\n /*\n * Manually send a message to Sentry\n *\n * @param {string} msg A plain message to be captured in Sentry\n * @param {object} options A specific set of options for this message [optional]\n * @return {Raven}\n */\n captureMessage: function(msg, options) {\n // config() automagically converts ignoreErrors from a list to a RegExp so we need to test for an\n // early call; we'll error on the side of logging anything called before configuration since it's\n // probably something you should see:\n if (\n !!this._globalOptions.ignoreErrors.test &&\n this._globalOptions.ignoreErrors.test(msg)\n ) {\n return;\n }\n\n options = options || {};\n\n var data = objectMerge(\n {\n message: msg + '' // Make sure it's actually a string\n },\n options\n );\n\n var ex;\n // Generate a \"synthetic\" stack trace from this point.\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it is NOT indicative\n // of a bug with Raven.js. Sentry generates synthetic traces either by configuration,\n // or if it catches a thrown object without a \"stack\" property.\n try {\n throw new Error(msg);\n } catch (ex1) {\n ex = ex1;\n }\n\n // null exception name so `Error` isn't prefixed to msg\n ex.name = null;\n var stack = TraceKit.computeStackTrace(ex);\n\n // stack[0] is `throw new Error(msg)` call itself, we are interested in the frame that was just before that, stack[1]\n var initialCall = stack.stack[1];\n\n var fileurl = (initialCall && initialCall.url) || '';\n\n if (\n !!this._globalOptions.ignoreUrls.test &&\n this._globalOptions.ignoreUrls.test(fileurl)\n ) {\n return;\n }\n\n if (\n !!this._globalOptions.whitelistUrls.test &&\n !this._globalOptions.whitelistUrls.test(fileurl)\n ) {\n return;\n }\n\n if (this._globalOptions.stacktrace || (options && options.stacktrace)) {\n options = objectMerge(\n {\n // fingerprint on msg, not stack trace (legacy behavior, could be\n // revisited)\n fingerprint: msg,\n // since we know this is a synthetic trace, the top N-most frames\n // MUST be from Raven.js, so mark them as in_app later by setting\n // trimHeadFrames\n trimHeadFrames: (options.trimHeadFrames || 0) + 1\n },\n options\n );\n\n var frames = this._prepareFrames(stack, options);\n data.stacktrace = {\n // Sentry expects frames oldest to newest\n frames: frames.reverse()\n };\n }\n\n // Fire away!\n this._send(data);\n\n return this;\n },\n\n captureBreadcrumb: function(obj) {\n var crumb = objectMerge(\n {\n timestamp: now() / 1000\n },\n obj\n );\n\n if (isFunction(this._globalOptions.breadcrumbCallback)) {\n var result = this._globalOptions.breadcrumbCallback(crumb);\n\n if (isObject(result) && !isEmptyObject(result)) {\n crumb = result;\n } else if (result === false) {\n return this;\n }\n }\n\n this._breadcrumbs.push(crumb);\n if (this._breadcrumbs.length > this._globalOptions.maxBreadcrumbs) {\n this._breadcrumbs.shift();\n }\n return this;\n },\n\n addPlugin: function(plugin /*arg1, arg2, ... argN*/) {\n var pluginArgs = [].slice.call(arguments, 1);\n\n this._plugins.push([plugin, pluginArgs]);\n if (this._isRavenInstalled) {\n this._drainPlugins();\n }\n\n return this;\n },\n\n /*\n * Set/clear a user to be sent along with the payload.\n *\n * @param {object} user An object representing user data [optional]\n * @return {Raven}\n */\n setUserContext: function(user) {\n // Intentionally do not merge here since that's an unexpected behavior.\n this._globalContext.user = user;\n\n return this;\n },\n\n /*\n * Merge extra attributes to be sent along with the payload.\n *\n * @param {object} extra An object representing extra data [optional]\n * @return {Raven}\n */\n setExtraContext: function(extra) {\n this._mergeContext('extra', extra);\n\n return this;\n },\n\n /*\n * Merge tags to be sent along with the payload.\n *\n * @param {object} tags An object representing tags [optional]\n * @return {Raven}\n */\n setTagsContext: function(tags) {\n this._mergeContext('tags', tags);\n\n return this;\n },\n\n /*\n * Clear all of the context.\n *\n * @return {Raven}\n */\n clearContext: function() {\n this._globalContext = {};\n\n return this;\n },\n\n /*\n * Get a copy of the current context. This cannot be mutated.\n *\n * @return {object} copy of context\n */\n getContext: function() {\n // lol javascript\n return JSON.parse(stringify(this._globalContext));\n },\n\n /*\n * Set environment of application\n *\n * @param {string} environment Typically something like 'production'.\n * @return {Raven}\n */\n setEnvironment: function(environment) {\n this._globalOptions.environment = environment;\n\n return this;\n },\n\n /*\n * Set release version of application\n *\n * @param {string} release Typically something like a git SHA to identify version\n * @return {Raven}\n */\n setRelease: function(release) {\n this._globalOptions.release = release;\n\n return this;\n },\n\n /*\n * Set the dataCallback option\n *\n * @param {function} callback The callback to run which allows the\n * data blob to be mutated before sending\n * @return {Raven}\n */\n setDataCallback: function(callback) {\n var original = this._globalOptions.dataCallback;\n this._globalOptions.dataCallback = keepOriginalCallback(original, callback);\n return this;\n },\n\n /*\n * Set the breadcrumbCallback option\n *\n * @param {function} callback The callback to run which allows filtering\n * or mutating breadcrumbs\n * @return {Raven}\n */\n setBreadcrumbCallback: function(callback) {\n var original = this._globalOptions.breadcrumbCallback;\n this._globalOptions.breadcrumbCallback = keepOriginalCallback(original, callback);\n return this;\n },\n\n /*\n * Set the shouldSendCallback option\n *\n * @param {function} callback The callback to run which allows\n * introspecting the blob before sending\n * @return {Raven}\n */\n setShouldSendCallback: function(callback) {\n var original = this._globalOptions.shouldSendCallback;\n this._globalOptions.shouldSendCallback = keepOriginalCallback(original, callback);\n return this;\n },\n\n /**\n * Override the default HTTP transport mechanism that transmits data\n * to the Sentry server.\n *\n * @param {function} transport Function invoked instead of the default\n * `makeRequest` handler.\n *\n * @return {Raven}\n */\n setTransport: function(transport) {\n this._globalOptions.transport = transport;\n\n return this;\n },\n\n /*\n * Get the latest raw exception that was captured by Raven.\n *\n * @return {error}\n */\n lastException: function() {\n return this._lastCapturedException;\n },\n\n /*\n * Get the last event id\n *\n * @return {string}\n */\n lastEventId: function() {\n return this._lastEventId;\n },\n\n /*\n * Determine if Raven is setup and ready to go.\n *\n * @return {boolean}\n */\n isSetup: function() {\n if (!this._hasJSON) return false; // needs JSON support\n if (!this._globalServer) {\n if (!this.ravenNotConfiguredError) {\n this.ravenNotConfiguredError = true;\n this._logDebug('error', 'Error: Raven has not been configured.');\n }\n return false;\n }\n return true;\n },\n\n afterLoad: function() {\n // TODO: remove window dependence?\n\n // Attempt to initialize Raven on load\n var RavenConfig = _window.RavenConfig;\n if (RavenConfig) {\n this.config(RavenConfig.dsn, RavenConfig.config).install();\n }\n },\n\n showReportDialog: function(options) {\n if (\n !_document // doesn't work without a document (React native)\n )\n return;\n\n options = options || {};\n\n var lastEventId = options.eventId || this.lastEventId();\n if (!lastEventId) {\n throw new RavenConfigError('Missing eventId');\n }\n\n var dsn = options.dsn || this._dsn;\n if (!dsn) {\n throw new RavenConfigError('Missing DSN');\n }\n\n var encode = encodeURIComponent;\n var qs = '';\n qs += '?eventId=' + encode(lastEventId);\n qs += '&dsn=' + encode(dsn);\n\n var user = options.user || this._globalContext.user;\n if (user) {\n if (user.name) qs += '&name=' + encode(user.name);\n if (user.email) qs += '&email=' + encode(user.email);\n }\n\n var globalServer = this._getGlobalServer(this._parseDSN(dsn));\n\n var script = _document.createElement('script');\n script.async = true;\n script.src = globalServer + '/api/embed/error-page/' + qs;\n (_document.head || _document.body).appendChild(script);\n },\n\n /**** Private functions ****/\n _ignoreNextOnError: function() {\n var self = this;\n this._ignoreOnError += 1;\n setTimeout(function() {\n // onerror should trigger before setTimeout\n self._ignoreOnError -= 1;\n });\n },\n\n _triggerEvent: function(eventType, options) {\n // NOTE: `event` is a native browser thing, so let's avoid conflicting wiht it\n var evt, key;\n\n if (!this._hasDocument) return;\n\n options = options || {};\n\n eventType = 'raven' + eventType.substr(0, 1).toUpperCase() + eventType.substr(1);\n\n if (_document.createEvent) {\n evt = _document.createEvent('HTMLEvents');\n evt.initEvent(eventType, true, true);\n } else {\n evt = _document.createEventObject();\n evt.eventType = eventType;\n }\n\n for (key in options)\n if (hasKey(options, key)) {\n evt[key] = options[key];\n }\n\n if (_document.createEvent) {\n // IE9 if standards\n _document.dispatchEvent(evt);\n } else {\n // IE8 regardless of Quirks or Standards\n // IE9 if quirks\n try {\n _document.fireEvent('on' + evt.eventType.toLowerCase(), evt);\n } catch (e) {\n // Do nothing\n }\n }\n },\n\n /**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param evtName the event name (e.g. \"click\")\n * @returns {Function}\n * @private\n */\n _breadcrumbEventHandler: function(evtName) {\n var self = this;\n return function(evt) {\n // reset keypress timeout; e.g. triggering a 'click' after\n // a 'keypress' will reset the keypress debounce so that a new\n // set of keypresses can be recorded\n self._keypressTimeout = null;\n\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors). Ignore if we've\n // already captured the event.\n if (self._lastCapturedEvent === evt) return;\n\n self._lastCapturedEvent = evt;\n\n // try/catch both:\n // - accessing evt.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // can throw an exception in some circumstances.\n var target;\n try {\n target = htmlTreeAsString(evt.target);\n } catch (e) {\n target = '<unknown>';\n }\n\n self.captureBreadcrumb({\n category: 'ui.' + evtName, // e.g. ui.click, ui.input\n message: target\n });\n };\n },\n\n /**\n * Wraps addEventListener to capture keypress UI events\n * @returns {Function}\n * @private\n */\n _keypressEventHandler: function() {\n var self = this,\n debounceDuration = 1000; // milliseconds\n\n // TODO: if somehow user switches keypress target before\n // debounce timeout is triggered, we will only capture\n // a single breadcrumb from the FIRST target (acceptable?)\n return function(evt) {\n var target;\n try {\n target = evt.target;\n } catch (e) {\n // just accessing event properties can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/raven-js/issues/838\n return;\n }\n var tagName = target && target.tagName;\n\n // only consider keypress events on actual input elements\n // this will disregard keypresses targeting body (e.g. tabbing\n // through elements, hotkeys, etc)\n if (\n !tagName ||\n (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !target.isContentEditable)\n )\n return;\n\n // record first keypress in a series, but ignore subsequent\n // keypresses until debounce clears\n var timeout = self._keypressTimeout;\n if (!timeout) {\n self._breadcrumbEventHandler('input')(evt);\n }\n clearTimeout(timeout);\n self._keypressTimeout = setTimeout(function() {\n self._keypressTimeout = null;\n }, debounceDuration);\n };\n },\n\n /**\n * Captures a breadcrumb of type \"navigation\", normalizing input URLs\n * @param to the originating URL\n * @param from the target URL\n * @private\n */\n _captureUrlChange: function(from, to) {\n var parsedLoc = parseUrl(this._location.href);\n var parsedTo = parseUrl(to);\n var parsedFrom = parseUrl(from);\n\n // because onpopstate only tells you the \"new\" (to) value of location.href, and\n // not the previous (from) value, we need to track the value of the current URL\n // state ourselves\n this._lastHref = to;\n\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host)\n to = parsedTo.relative;\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host)\n from = parsedFrom.relative;\n\n this.captureBreadcrumb({\n category: 'navigation',\n data: {\n to: to,\n from: from\n }\n });\n },\n\n /**\n * Wrap timer functions and event targets to catch errors and provide\n * better metadata.\n */\n _instrumentTryCatch: function() {\n var self = this;\n\n var wrappedBuiltIns = self._wrappedBuiltIns;\n\n function wrapTimeFn(orig) {\n return function(fn, t) {\n // preserve arity\n // Make a copy of the arguments to prevent deoptimization\n // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; ++i) {\n args[i] = arguments[i];\n }\n var originalCallback = args[0];\n if (isFunction(originalCallback)) {\n args[0] = self.wrap(originalCallback);\n }\n\n // IE < 9 doesn't support .call/.apply on setInterval/setTimeout, but it\n // also supports only two arguments and doesn't care what this is, so we\n // can just call the original function directly.\n if (orig.apply) {\n return orig.apply(this, args);\n } else {\n return orig(args[0], args[1]);\n }\n };\n }\n\n var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;\n\n function wrapEventTarget(global) {\n var proto = _window[global] && _window[global].prototype;\n if (proto && proto.hasOwnProperty && proto.hasOwnProperty('addEventListener')) {\n fill(\n proto,\n 'addEventListener',\n function(orig) {\n return function(evtName, fn, capture, secure) {\n // preserve arity\n try {\n if (fn && fn.handleEvent) {\n fn.handleEvent = self.wrap(fn.handleEvent);\n }\n } catch (err) {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n\n // More breadcrumb DOM capture ... done here and not in `_instrumentBreadcrumbs`\n // so that we don't have more than one wrapper function\n var before, clickHandler, keypressHandler;\n\n if (\n autoBreadcrumbs &&\n autoBreadcrumbs.dom &&\n (global === 'EventTarget' || global === 'Node')\n ) {\n // NOTE: generating multiple handlers per addEventListener invocation, should\n // revisit and verify we can just use one (almost certainly)\n clickHandler = self._breadcrumbEventHandler('click');\n keypressHandler = self._keypressEventHandler();\n before = function(evt) {\n // need to intercept every DOM event in `before` argument, in case that\n // same wrapped method is re-used for different events (e.g. mousemove THEN click)\n // see #724\n if (!evt) return;\n\n var eventType;\n try {\n eventType = evt.type;\n } catch (e) {\n // just accessing event properties can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/raven-js/issues/838\n return;\n }\n if (eventType === 'click') return clickHandler(evt);\n else if (eventType === 'keypress') return keypressHandler(evt);\n };\n }\n return orig.call(\n this,\n evtName,\n self.wrap(fn, undefined, before),\n capture,\n secure\n );\n };\n },\n wrappedBuiltIns\n );\n fill(\n proto,\n 'removeEventListener',\n function(orig) {\n return function(evt, fn, capture, secure) {\n try {\n fn = fn && (fn.__raven_wrapper__ ? fn.__raven_wrapper__ : fn);\n } catch (e) {\n // ignore, accessing __raven_wrapper__ will throw in some Selenium environments\n }\n return orig.call(this, evt, fn, capture, secure);\n };\n },\n wrappedBuiltIns\n );\n }\n }\n\n fill(_window, 'setTimeout', wrapTimeFn, wrappedBuiltIns);\n fill(_window, 'setInterval', wrapTimeFn, wrappedBuiltIns);\n if (_window.requestAnimationFrame) {\n fill(\n _window,\n 'requestAnimationFrame',\n function(orig) {\n return function(cb) {\n return orig(self.wrap(cb));\n };\n },\n wrappedBuiltIns\n );\n }\n\n // event targets borrowed from bugsnag-js:\n // https://github.com/bugsnag/bugsnag-js/blob/master/src/bugsnag.js#L666\n var eventTargets = [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload'\n ];\n for (var i = 0; i < eventTargets.length; i++) {\n wrapEventTarget(eventTargets[i]);\n }\n },\n\n /**\n * Instrument browser built-ins w/ breadcrumb capturing\n * - XMLHttpRequests\n * - DOM interactions (click/typing)\n * - window.location changes\n * - console\n *\n * Can be disabled or individually configured via the `autoBreadcrumbs` config option\n */\n _instrumentBreadcrumbs: function() {\n var self = this;\n var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;\n\n var wrappedBuiltIns = self._wrappedBuiltIns;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && isFunction(xhr[prop])) {\n fill(xhr, prop, function(orig) {\n return self.wrap(orig);\n }); // intentionally don't track filled methods on XHR instances\n }\n }\n\n if (autoBreadcrumbs.xhr && 'XMLHttpRequest' in _window) {\n var xhrproto = XMLHttpRequest.prototype;\n fill(\n xhrproto,\n 'open',\n function(origOpen) {\n return function(method, url) {\n // preserve arity\n\n // if Sentry key appears in URL, don't capture\n if (isString(url) && url.indexOf(self._globalKey) === -1) {\n this.__raven_xhr = {\n method: method,\n url: url,\n status_code: null\n };\n }\n\n return origOpen.apply(this, arguments);\n };\n },\n wrappedBuiltIns\n );\n\n fill(\n xhrproto,\n 'send',\n function(origSend) {\n return function(data) {\n // preserve arity\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__raven_xhr && xhr.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n xhr.__raven_xhr.status_code = xhr.status;\n } catch (e) {\n /* do nothing */\n }\n\n self.captureBreadcrumb({\n type: 'http',\n category: 'xhr',\n data: xhr.__raven_xhr\n });\n }\n }\n\n var props = ['onload', 'onerror', 'onprogress'];\n for (var j = 0; j < props.length; j++) {\n wrapProp(props[j], xhr);\n }\n\n if ('onreadystatechange' in xhr && isFunction(xhr.onreadystatechange)) {\n fill(\n xhr,\n 'onreadystatechange',\n function(orig) {\n return self.wrap(orig, undefined, onreadystatechangeHandler);\n } /* intentionally don't track this instrumentation */\n );\n } else {\n // if onreadystatechange wasn't actually set by the page on this xhr, we\n // are free to set our own and capture the breadcrumb\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n\n return origSend.apply(this, arguments);\n };\n },\n wrappedBuiltIns\n );\n }\n\n if (autoBreadcrumbs.xhr && 'fetch' in _window) {\n fill(\n _window,\n 'fetch',\n function(origFetch) {\n return function(fn, t) {\n // preserve arity\n // Make a copy of the arguments to prevent deoptimization\n // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; ++i) {\n args[i] = arguments[i];\n }\n\n var fetchInput = args[0];\n var method = 'GET';\n var url;\n\n if (typeof fetchInput === 'string') {\n url = fetchInput;\n } else if ('Request' in _window && fetchInput instanceof _window.Request) {\n url = fetchInput.url;\n if (fetchInput.method) {\n method = fetchInput.method;\n }\n } else {\n url = '' + fetchInput;\n }\n\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n\n var fetchData = {\n method: method,\n url: url,\n status_code: null\n };\n\n self.captureBreadcrumb({\n type: 'http',\n category: 'fetch',\n data: fetchData\n });\n\n return origFetch.apply(this, args).then(function(response) {\n fetchData.status_code = response.status;\n\n return response;\n });\n };\n },\n wrappedBuiltIns\n );\n }\n\n // Capture breadcrumbs from any click that is unhandled / bubbled up all the way\n // to the document. Do this before we instrument addEventListener.\n if (autoBreadcrumbs.dom && this._hasDocument) {\n if (_document.addEventListener) {\n _document.addEventListener('click', self._breadcrumbEventHandler('click'), false);\n _document.addEventListener('keypress', self._keypressEventHandler(), false);\n } else {\n // IE8 Compatibility\n _document.attachEvent('onclick', self._breadcrumbEventHandler('click'));\n _document.attachEvent('onkeypress', self._keypressEventHandler());\n }\n }\n\n // record navigation (URL) changes\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n var chrome = _window.chrome;\n var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n var hasPushAndReplaceState =\n !isChromePackagedApp &&\n _window.history &&\n history.pushState &&\n history.replaceState;\n if (autoBreadcrumbs.location && hasPushAndReplaceState) {\n // TODO: remove onpopstate handler on uninstall()\n var oldOnPopState = _window.onpopstate;\n _window.onpopstate = function() {\n var currentHref = self._location.href;\n self._captureUrlChange(self._lastHref, currentHref);\n\n if (oldOnPopState) {\n return oldOnPopState.apply(this, arguments);\n }\n };\n\n var historyReplacementFunction = function(origHistFunction) {\n // note history.pushState.length is 0; intentionally not declaring\n // params to preserve 0 arity\n return function(/* state, title, url */) {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n\n // url argument is optional\n if (url) {\n // coerce to string (this is what pushState does)\n self._captureUrlChange(self._lastHref, url + '');\n }\n\n return origHistFunction.apply(this, arguments);\n };\n };\n\n fill(history, 'pushState', historyReplacementFunction, wrappedBuiltIns);\n fill(history, 'replaceState', historyReplacementFunction, wrappedBuiltIns);\n }\n\n if (autoBreadcrumbs.console && 'console' in _window && console.log) {\n // console\n var consoleMethodCallback = function(msg, data) {\n self.captureBreadcrumb({\n message: msg,\n level: data.level,\n category: 'console'\n });\n };\n\n each(['debug', 'info', 'warn', 'error', 'log'], function(_, level) {\n wrapConsoleMethod(console, level, consoleMethodCallback);\n });\n }\n },\n\n _restoreBuiltIns: function() {\n // restore any wrapped builtins\n var builtin;\n while (this._wrappedBuiltIns.length) {\n builtin = this._wrappedBuiltIns.shift();\n\n var obj = builtin[0],\n name = builtin[1],\n orig = builtin[2];\n\n obj[name] = orig;\n }\n },\n\n _drainPlugins: function() {\n var self = this;\n\n // FIX ME TODO\n each(this._plugins, function(_, plugin) {\n var installer = plugin[0];\n var args = plugin[1];\n installer.apply(self, [self].concat(args));\n });\n },\n\n _parseDSN: function(str) {\n var m = dsnPattern.exec(str),\n dsn = {},\n i = 7;\n\n try {\n while (i--) dsn[dsnKeys[i]] = m[i] || '';\n } catch (e) {\n throw new RavenConfigError('Invalid DSN: ' + str);\n }\n\n if (dsn.pass && !this._globalOptions.allowSecretKey) {\n throw new RavenConfigError(\n 'Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key'\n );\n }\n\n return dsn;\n },\n\n _getGlobalServer: function(uri) {\n // assemble the endpoint from the uri pieces\n var globalServer = '//' + uri.host + (uri.port ? ':' + uri.port : '');\n\n if (uri.protocol) {\n globalServer = uri.protocol + ':' + globalServer;\n }\n return globalServer;\n },\n\n _handleOnErrorStackInfo: function() {\n // if we are intentionally ignoring errors via onerror, bail out\n if (!this._ignoreOnError) {\n this._handleStackInfo.apply(this, arguments);\n }\n },\n\n _handleStackInfo: function(stackInfo, options) {\n var frames = this._prepareFrames(stackInfo, options);\n\n this._triggerEvent('handle', {\n stackInfo: stackInfo,\n options: options\n });\n\n this._processException(\n stackInfo.name,\n stackInfo.message,\n stackInfo.url,\n stackInfo.lineno,\n frames,\n options\n );\n },\n\n _prepareFrames: function(stackInfo, options) {\n var self = this;\n var frames = [];\n if (stackInfo.stack && stackInfo.stack.length) {\n each(stackInfo.stack, function(i, stack) {\n var frame = self._normalizeFrame(stack, stackInfo.url);\n if (frame) {\n frames.push(frame);\n }\n });\n\n // e.g. frames captured via captureMessage throw\n if (options && options.trimHeadFrames) {\n for (var j = 0; j < options.trimHeadFrames && j < frames.length; j++) {\n frames[j].in_app = false;\n }\n }\n }\n frames = frames.slice(0, this._globalOptions.stackTraceLimit);\n return frames;\n },\n\n _normalizeFrame: function(frame, stackInfoUrl) {\n // normalize the frames data\n var normalized = {\n filename: frame.url,\n lineno: frame.line,\n colno: frame.column,\n function: frame.func || '?'\n };\n\n // Case when we don't have any information about the error\n // E.g. throwing a string or raw object, instead of an `Error` in Firefox\n // Generating synthetic error doesn't add any value here\n //\n // We should probably somehow let a user know that they should fix their code\n if (!frame.url) {\n normalized.filename = stackInfoUrl; // fallback to whole stacks url from onerror handler\n }\n\n normalized.in_app = !// determine if an exception came from outside of our app\n // first we check the global includePaths list.\n (\n (!!this._globalOptions.includePaths.test &&\n !this._globalOptions.includePaths.test(normalized.filename)) ||\n // Now we check for fun, if the function name is Raven or TraceKit\n /(Raven|TraceKit)\\./.test(normalized['function']) ||\n // finally, we do a last ditch effort and check for raven.min.js\n /raven\\.(min\\.)?js$/.test(normalized.filename)\n );\n\n return normalized;\n },\n\n _processException: function(type, message, fileurl, lineno, frames, options) {\n var prefixedMessage = (type ? type + ': ' : '') + (message || '');\n if (\n !!this._globalOptions.ignoreErrors.test &&\n (this._globalOptions.ignoreErrors.test(message) ||\n this._globalOptions.ignoreErrors.test(prefixedMessage))\n ) {\n return;\n }\n\n var stacktrace;\n\n if (frames && frames.length) {\n fileurl = frames[0].filename || fileurl;\n // Sentry expects frames oldest to newest\n // and JS sends them as newest to oldest\n frames.reverse();\n stacktrace = {frames: frames};\n } else if (fileurl) {\n stacktrace = {\n frames: [\n {\n filename: fileurl,\n lineno: lineno,\n in_app: true\n }\n ]\n };\n }\n\n if (\n !!this._globalOptions.ignoreUrls.test &&\n this._globalOptions.ignoreUrls.test(fileurl)\n ) {\n return;\n }\n\n if (\n !!this._globalOptions.whitelistUrls.test &&\n !this._globalOptions.whitelistUrls.test(fileurl)\n ) {\n return;\n }\n\n var data = objectMerge(\n {\n // sentry.interfaces.Exception\n exception: {\n values: [\n {\n type: type,\n value: message,\n stacktrace: stacktrace\n }\n ]\n },\n culprit: fileurl\n },\n options\n );\n\n // Fire away!\n this._send(data);\n },\n\n _trimPacket: function(data) {\n // For now, we only want to truncate the two different messages\n // but this could/should be expanded to just trim everything\n var max = this._globalOptions.maxMessageLength;\n if (data.message) {\n data.message = truncate(data.message, max);\n }\n if (data.exception) {\n var exception = data.exception.values[0];\n exception.value = truncate(exception.value, max);\n }\n\n var request = data.request;\n if (request) {\n if (request.url) {\n request.url = truncate(request.url, this._globalOptions.maxUrlLength);\n }\n if (request.Referer) {\n request.Referer = truncate(request.Referer, this._globalOptions.maxUrlLength);\n }\n }\n\n if (data.breadcrumbs && data.breadcrumbs.values)\n this._trimBreadcrumbs(data.breadcrumbs);\n\n return data;\n },\n\n /**\n * Truncate breadcrumb values (right now just URLs)\n */\n _trimBreadcrumbs: function(breadcrumbs) {\n // known breadcrumb properties with urls\n // TODO: also consider arbitrary prop values that start with (https?)?://\n var urlProps = ['to', 'from', 'url'],\n urlProp,\n crumb,\n data;\n\n for (var i = 0; i < breadcrumbs.values.length; ++i) {\n crumb = breadcrumbs.values[i];\n if (\n !crumb.hasOwnProperty('data') ||\n !isObject(crumb.data) ||\n objectFrozen(crumb.data)\n )\n continue;\n\n data = objectMerge({}, crumb.data);\n for (var j = 0; j < urlProps.length; ++j) {\n urlProp = urlProps[j];\n if (data.hasOwnProperty(urlProp) && data[urlProp]) {\n data[urlProp] = truncate(data[urlProp], this._globalOptions.maxUrlLength);\n }\n }\n breadcrumbs.values[i].data = data;\n }\n },\n\n _getHttpData: function() {\n if (!this._hasNavigator && !this._hasDocument) return;\n var httpData = {};\n\n if (this._hasNavigator && _navigator.userAgent) {\n httpData.headers = {\n 'User-Agent': navigator.userAgent\n };\n }\n\n if (this._hasDocument) {\n if (_document.location && _document.location.href) {\n httpData.url = _document.location.href;\n }\n if (_document.referrer) {\n if (!httpData.headers) httpData.headers = {};\n httpData.headers.Referer = _document.referrer;\n }\n }\n\n return httpData;\n },\n\n _resetBackoff: function() {\n this._backoffDuration = 0;\n this._backoffStart = null;\n },\n\n _shouldBackoff: function() {\n return this._backoffDuration && now() - this._backoffStart < this._backoffDuration;\n },\n\n /**\n * Returns true if the in-process data payload matches the signature\n * of the previously-sent data\n *\n * NOTE: This has to be done at this level because TraceKit can generate\n * data from window.onerror WITHOUT an exception object (IE8, IE9,\n * other old browsers). This can take the form of an \"exception\"\n * data object with a single frame (derived from the onerror args).\n */\n _isRepeatData: function(current) {\n var last = this._lastData;\n\n if (\n !last ||\n current.message !== last.message || // defined for captureMessage\n current.culprit !== last.culprit // defined for captureException/onerror\n )\n return false;\n\n // Stacktrace interface (i.e. from captureMessage)\n if (current.stacktrace || last.stacktrace) {\n return isSameStacktrace(current.stacktrace, last.stacktrace);\n } else if (current.exception || last.exception) {\n // Exception interface (i.e. from captureException/onerror)\n return isSameException(current.exception, last.exception);\n }\n\n return true;\n },\n\n _setBackoffState: function(request) {\n // If we are already in a backoff state, don't change anything\n if (this._shouldBackoff()) {\n return;\n }\n\n var status = request.status;\n\n // 400 - project_id doesn't exist or some other fatal\n // 401 - invalid/revoked dsn\n // 429 - too many requests\n if (!(status === 400 || status === 401 || status === 429)) return;\n\n var retry;\n try {\n // If Retry-After is not in Access-Control-Expose-Headers, most\n // browsers will throw an exception trying to access it\n retry = request.getResponseHeader('Retry-After');\n retry = parseInt(retry, 10) * 1000; // Retry-After is returned in seconds\n } catch (e) {\n /* eslint no-empty:0 */\n }\n\n this._backoffDuration = retry\n ? // If Sentry server returned a Retry-After value, use it\n retry\n : // Otherwise, double the last backoff duration (starts at 1 sec)\n this._backoffDuration * 2 || 1000;\n\n this._backoffStart = now();\n },\n\n _send: function(data) {\n var globalOptions = this._globalOptions;\n\n var baseData = {\n project: this._globalProject,\n logger: globalOptions.logger,\n platform: 'javascript'\n },\n httpData = this._getHttpData();\n\n if (httpData) {\n baseData.request = httpData;\n }\n\n // HACK: delete `trimHeadFrames` to prevent from appearing in outbound payload\n if (data.trimHeadFrames) delete data.trimHeadFrames;\n\n data = objectMerge(baseData, data);\n\n // Merge in the tags and extra separately since objectMerge doesn't handle a deep merge\n data.tags = objectMerge(objectMerge({}, this._globalContext.tags), data.tags);\n data.extra = objectMerge(objectMerge({}, this._globalContext.extra), data.extra);\n\n // Send along our own collected metadata with extra\n data.extra['session:duration'] = now() - this._startTime;\n\n if (this._breadcrumbs && this._breadcrumbs.length > 0) {\n // intentionally make shallow copy so that additions\n // to breadcrumbs aren't accidentally sent in this request\n data.breadcrumbs = {\n values: [].slice.call(this._breadcrumbs, 0)\n };\n }\n\n // If there are no tags/extra, strip the key from the payload alltogther.\n if (isEmptyObject(data.tags)) delete data.tags;\n\n if (this._globalContext.user) {\n // sentry.interfaces.User\n data.user = this._globalContext.user;\n }\n\n // Include the environment if it's defined in globalOptions\n if (globalOptions.environment) data.environment = globalOptions.environment;\n\n // Include the release if it's defined in globalOptions\n if (globalOptions.release) data.release = globalOptions.release;\n\n // Include server_name if it's defined in globalOptions\n if (globalOptions.serverName) data.server_name = globalOptions.serverName;\n\n if (isFunction(globalOptions.dataCallback)) {\n data = globalOptions.dataCallback(data) || data;\n }\n\n // Why??????????\n if (!data || isEmptyObject(data)) {\n return;\n }\n\n // Check if the request should be filtered or not\n if (\n isFunction(globalOptions.shouldSendCallback) &&\n !globalOptions.shouldSendCallback(data)\n ) {\n return;\n }\n\n // Backoff state: Sentry server previously responded w/ an error (e.g. 429 - too many requests),\n // so drop requests until \"cool-off\" period has elapsed.\n if (this._shouldBackoff()) {\n this._logDebug('warn', 'Raven dropped error due to backoff: ', data);\n return;\n }\n\n if (typeof globalOptions.sampleRate === 'number') {\n if (Math.random() < globalOptions.sampleRate) {\n this._sendProcessedPayload(data);\n }\n } else {\n this._sendProcessedPayload(data);\n }\n },\n\n _getUuid: function() {\n return uuid4();\n },\n\n _sendProcessedPayload: function(data, callback) {\n var self = this;\n var globalOptions = this._globalOptions;\n\n if (!this.isSetup()) return;\n\n // Try and clean up the packet before sending by truncating long values\n data = this._trimPacket(data);\n\n // ideally duplicate error testing should occur *before* dataCallback/shouldSendCallback,\n // but this would require copying an un-truncated copy of the data packet, which can be\n // arbitrarily deep (extra_data) -- could be worthwhile? will revisit\n if (!this._globalOptions.allowDuplicates && this._isRepeatData(data)) {\n this._logDebug('warn', 'Raven dropped repeat event: ', data);\n return;\n }\n\n // Send along an event_id if not explicitly passed.\n // This event_id can be used to reference the error within Sentry itself.\n // Set lastEventId after we know the error should actually be sent\n this._lastEventId = data.event_id || (data.event_id = this._getUuid());\n\n // Store outbound payload after trim\n this._lastData = data;\n\n this._logDebug('debug', 'Raven about to send:', data);\n\n var auth = {\n sentry_version: '7',\n sentry_client: 'raven-js/' + this.VERSION,\n sentry_key: this._globalKey\n };\n\n if (this._globalSecret) {\n auth.sentry_secret = this._globalSecret;\n }\n\n var exception = data.exception && data.exception.values[0];\n this.captureBreadcrumb({\n category: 'sentry',\n message: exception\n ? (exception.type ? exception.type + ': ' : '') + exception.value\n : data.message,\n event_id: data.event_id,\n level: data.level || 'error' // presume error unless specified\n });\n\n var url = this._globalEndpoint;\n (globalOptions.transport || this._makeRequest).call(this, {\n url: url,\n auth: auth,\n data: data,\n options: globalOptions,\n onSuccess: function success() {\n self._resetBackoff();\n\n self._triggerEvent('success', {\n data: data,\n src: url\n });\n callback && callback();\n },\n onError: function failure(error) {\n self._logDebug('error', 'Raven transport failed to send: ', error);\n\n if (error.request) {\n self._setBackoffState(error.request);\n }\n\n self._triggerEvent('failure', {\n data: data,\n src: url\n });\n error = error || new Error('Raven send failed (no additional details provided)');\n callback && callback(error);\n }\n });\n },\n\n _makeRequest: function(opts) {\n var request = _window.XMLHttpRequest && new _window.XMLHttpRequest();\n if (!request) return;\n\n // if browser doesn't support CORS (e.g. IE7), we are out of luck\n var hasCORS = 'withCredentials' in request || typeof XDomainRequest !== 'undefined';\n\n if (!hasCORS) return;\n\n var url = opts.url;\n\n if ('withCredentials' in request) {\n request.onreadystatechange = function() {\n if (request.readyState !== 4) {\n return;\n } else if (request.status === 200) {\n opts.onSuccess && opts.onSuccess();\n } else if (opts.onError) {\n var err = new Error('Sentry error code: ' + request.status);\n err.request = request;\n opts.onError(err);\n }\n };\n } else {\n request = new XDomainRequest();\n // xdomainrequest cannot go http -> https (or vice versa),\n // so always use protocol relative\n url = url.replace(/^https?:/, '');\n\n // onreadystatechange not supported by XDomainRequest\n if (opts.onSuccess) {\n request.onload = opts.onSuccess;\n }\n if (opts.onError) {\n request.onerror = function() {\n var err = new Error('Sentry error code: XDomainRequest');\n err.request = request;\n opts.onError(err);\n };\n }\n }\n\n // NOTE: auth is intentionally sent as part of query string (NOT as custom\n // HTTP header) so as to avoid preflight CORS requests\n request.open('POST', url + '?' + urlencode(opts.auth));\n request.send(stringify(opts.data));\n },\n\n _logDebug: function(level) {\n if (this._originalConsoleMethods[level] && this.debug) {\n // In IE<10 console methods do not have their own 'apply' method\n Function.prototype.apply.call(\n this._originalConsoleMethods[level],\n this._originalConsole,\n [].slice.call(arguments, 1)\n );\n }\n },\n\n _mergeContext: function(key, context) {\n if (isUndefined(context)) {\n delete this._globalContext[key];\n } else {\n this._globalContext[key] = objectMerge(this._globalContext[key] || {}, context);\n }\n }\n};\n\n// Deprecations\nRaven.prototype.setUser = Raven.prototype.setUserContext;\nRaven.prototype.setReleaseContext = Raven.prototype.setRelease;\n\nmodule.exports = Raven;\n","var utils = require('../../src/utils');\n\n/*\n TraceKit - Cross brower stack traces\n\n This was originally forked from github.com/occ/TraceKit, but has since been\n largely re-written and is now maintained as part of raven-js. Tests for\n this are in test/vendor.\n\n MIT license\n*/\n\nvar TraceKit = {\n collectWindowErrors: true,\n debug: false\n};\n\n// This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)\nvar _window =\n typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\n// global reference to slice\nvar _slice = [].slice;\nvar UNKNOWN_FUNCTION = '?';\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Error_types\nvar ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;\n\nfunction getLocationHref() {\n if (typeof document === 'undefined' || document.location == null) return '';\n\n return document.location.href;\n}\n\n/**\n * TraceKit.report: cross-browser processing of unhandled exceptions\n *\n * Syntax:\n * TraceKit.report.subscribe(function(stackInfo) { ... })\n * TraceKit.report.unsubscribe(function(stackInfo) { ... })\n * TraceKit.report(exception)\n * try { ...code... } catch(ex) { TraceKit.report(ex); }\n *\n * Supports:\n * - Firefox: full stack trace with line numbers, plus column number\n * on top frame; column number is not guaranteed\n * - Opera: full stack trace with line and column numbers\n * - Chrome: full stack trace with line and column numbers\n * - Safari: line and column number for the top frame only; some frames\n * may be missing, and column number is not guaranteed\n * - IE: line and column number for the top frame only; some frames\n * may be missing, and column number is not guaranteed\n *\n * In theory, TraceKit should work on all of the following versions:\n * - IE5.5+ (only 8.0 tested)\n * - Firefox 0.9+ (only 3.5+ tested)\n * - Opera 7+ (only 10.50 tested; versions 9 and earlier may require\n * Exceptions Have Stacktrace to be enabled in opera:config)\n * - Safari 3+ (only 4+ tested)\n * - Chrome 1+ (only 5+ tested)\n * - Konqueror 3.5+ (untested)\n *\n * Requires TraceKit.computeStackTrace.\n *\n * Tries to catch all unhandled exceptions and report them to the\n * subscribed handlers. Please note that TraceKit.report will rethrow the\n * exception. This is REQUIRED in order to get a useful stack trace in IE.\n * If the exception does not reach the top of the browser, you will only\n * get a stack trace from the point where TraceKit.report was called.\n *\n * Handlers receive a stackInfo object as described in the\n * TraceKit.computeStackTrace docs.\n */\nTraceKit.report = (function reportModuleWrapper() {\n var handlers = [],\n lastArgs = null,\n lastException = null,\n lastExceptionStack = null;\n\n /**\n * Add a crash handler.\n * @param {Function} handler\n */\n function subscribe(handler) {\n installGlobalHandler();\n handlers.push(handler);\n }\n\n /**\n * Remove a crash handler.\n * @param {Function} handler\n */\n function unsubscribe(handler) {\n for (var i = handlers.length - 1; i >= 0; --i) {\n if (handlers[i] === handler) {\n handlers.splice(i, 1);\n }\n }\n }\n\n /**\n * Remove all crash handlers.\n */\n function unsubscribeAll() {\n uninstallGlobalHandler();\n handlers = [];\n }\n\n /**\n * Dispatch stack information to all handlers.\n * @param {Object.<string, *>} stack\n */\n function notifyHandlers(stack, isWindowError) {\n var exception = null;\n if (isWindowError && !TraceKit.collectWindowErrors) {\n return;\n }\n for (var i in handlers) {\n if (handlers.hasOwnProperty(i)) {\n try {\n handlers[i].apply(null, [stack].concat(_slice.call(arguments, 2)));\n } catch (inner) {\n exception = inner;\n }\n }\n }\n\n if (exception) {\n throw exception;\n }\n }\n\n var _oldOnerrorHandler, _onErrorHandlerInstalled;\n\n /**\n * Ensures all global unhandled exceptions are recorded.\n * Supported by Gecko and IE.\n * @param {string} message Error message.\n * @param {string} url URL of script that generated the exception.\n * @param {(number|string)} lineNo The line number at which the error\n * occurred.\n * @param {?(number|string)} colNo The column number at which the error\n * occurred.\n * @param {?Error} ex The actual Error object.\n */\n function traceKitWindowOnError(message, url, lineNo, colNo, ex) {\n var stack = null;\n\n if (lastExceptionStack) {\n TraceKit.computeStackTrace.augmentStackTraceWithInitialElement(\n lastExceptionStack,\n url,\n lineNo,\n message\n );\n processLastException();\n } else if (ex && utils.isError(ex)) {\n // non-string `ex` arg; attempt to extract stack trace\n\n // New chrome and blink send along a real error object\n // Let's just report that like a normal error.\n // See: https://mikewest.org/2013/08/debugging-runtime-errors-with-window-onerror\n stack = TraceKit.computeStackTrace(ex);\n notifyHandlers(stack, true);\n } else {\n var location = {\n url: url,\n line: lineNo,\n column: colNo\n };\n\n var name = undefined;\n var msg = message; // must be new var or will modify original `arguments`\n var groups;\n if ({}.toString.call(message) === '[object String]') {\n var groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n msg = groups[2];\n }\n }\n\n location.func = UNKNOWN_FUNCTION;\n\n stack = {\n name: name,\n message: msg,\n url: getLocationHref(),\n stack: [location]\n };\n notifyHandlers(stack, true);\n }\n\n if (_oldOnerrorHandler) {\n return _oldOnerrorHandler.apply(this, arguments);\n }\n\n return false;\n }\n\n function installGlobalHandler() {\n if (_onErrorHandlerInstalled) {\n return;\n }\n _oldOnerrorHandler = _window.onerror;\n _window.onerror = traceKitWindowOnError;\n _onErrorHandlerInstalled = true;\n }\n\n function uninstallGlobalHandler() {\n if (!_onErrorHandlerInstalled) {\n return;\n }\n _window.onerror = _oldOnerrorHandler;\n _onErrorHandlerInstalled = false;\n _oldOnerrorHandler = undefined;\n }\n\n function processLastException() {\n var _lastExceptionStack = lastExceptionStack,\n _lastArgs = lastArgs;\n lastArgs = null;\n lastExceptionStack = null;\n lastException = null;\n notifyHandlers.apply(null, [_lastExceptionStack, false].concat(_lastArgs));\n }\n\n /**\n * Reports an unhandled Error to TraceKit.\n * @param {Error} ex\n * @param {?boolean} rethrow If false, do not re-throw the exception.\n * Only used for window.onerror to not cause an infinite loop of\n * rethrowing.\n */\n function report(ex, rethrow) {\n var args = _slice.call(arguments, 1);\n if (lastExceptionStack) {\n if (lastException === ex) {\n return; // already caught by an inner catch block, ignore\n } else {\n processLastException();\n }\n }\n\n var stack = TraceKit.computeStackTrace(ex);\n lastExceptionStack = stack;\n lastException = ex;\n lastArgs = args;\n\n // If the stack trace is incomplete, wait for 2 seconds for\n // slow slow IE to see if onerror occurs or not before reporting\n // this exception; otherwise, we will end up with an incomplete\n // stack trace\n setTimeout(function() {\n if (lastException === ex) {\n processLastException();\n }\n }, stack.incomplete ? 2000 : 0);\n\n if (rethrow !== false) {\n throw ex; // re-throw to propagate to the top level (and cause window.onerror)\n }\n }\n\n report.subscribe = subscribe;\n report.unsubscribe = unsubscribe;\n report.uninstall = unsubscribeAll;\n return report;\n})();\n\n/**\n * TraceKit.computeStackTrace: cross-browser stack traces in JavaScript\n *\n * Syntax:\n * s = TraceKit.computeStackTrace(exception) // consider using TraceKit.report instead (see below)\n * Returns:\n * s.name - exception name\n * s.message - exception message\n * s.stack[i].url - JavaScript or HTML file URL\n * s.stack[i].func - function name, or empty for anonymous functions (if guessing did not work)\n * s.stack[i].args - arguments passed to the function, if known\n * s.stack[i].line - line number, if known\n * s.stack[i].column - column number, if known\n *\n * Supports:\n * - Firefox: full stack trace with line numbers and unreliable column\n * number on top frame\n * - Opera 10: full stack trace with line and column numbers\n * - Opera 9-: full stack trace with line numbers\n * - Chrome: full stack trace with line and column numbers\n * - Safari: line and column number for the topmost stacktrace element\n * only\n * - IE: no line numbers whatsoever\n *\n * Tries to guess names of anonymous functions by looking for assignments\n * in the source code. In IE and Safari, we have to guess source file names\n * by searching for function bodies inside all page scripts. This will not\n * work for scripts that are loaded cross-domain.\n * Here be dragons: some function names may be guessed incorrectly, and\n * duplicate functions may be mismatched.\n *\n * TraceKit.computeStackTrace should only be used for tracing purposes.\n * Logging of unhandled exceptions should be done with TraceKit.report,\n * which builds on top of TraceKit.computeStackTrace and provides better\n * IE support by utilizing the window.onerror event to retrieve information\n * about the top of the stack.\n *\n * Note: In IE and Safari, no stack trace is recorded on the Error object,\n * so computeStackTrace instead walks its *own* chain of callers.\n * This means that:\n * * in Safari, some methods may be missing from the stack trace;\n * * in IE, the topmost function in the stack trace will always be the\n * caller of computeStackTrace.\n *\n * This is okay for tracing (because you are likely to be calling\n * computeStackTrace from the function you want to be the topmost element\n * of the stack trace anyway), but not okay for logging unhandled\n * exceptions (because your catch block will likely be far away from the\n * inner function that actually caused the exception).\n *\n */\nTraceKit.computeStackTrace = (function computeStackTraceWrapper() {\n // Contents of Exception in various browsers.\n //\n // SAFARI:\n // ex.message = Can't find variable: qq\n // ex.line = 59\n // ex.sourceId = 580238192\n // ex.sourceURL = http://...\n // ex.expressionBeginOffset = 96\n // ex.expressionCaretOffset = 98\n // ex.expressionEndOffset = 98\n // ex.name = ReferenceError\n //\n // FIREFOX:\n // ex.message = qq is not defined\n // ex.fileName = http://...\n // ex.lineNumber = 59\n // ex.columnNumber = 69\n // ex.stack = ...stack trace... (see the example below)\n // ex.name = ReferenceError\n //\n // CHROME:\n // ex.message = qq is not defined\n // ex.name = ReferenceError\n // ex.type = not_defined\n // ex.arguments = ['aa']\n // ex.stack = ...stack trace...\n //\n // INTERNET EXPLORER:\n // ex.message = ...\n // ex.name = ReferenceError\n //\n // OPERA:\n // ex.message = ...message... (see the example below)\n // ex.name = ReferenceError\n // ex.opera#sourceloc = 11 (pretty much useless, duplicates the info in ex.message)\n // ex.stacktrace = n/a; see 'opera:config#UserPrefs|Exceptions Have Stacktrace'\n\n /**\n * Computes stack trace information from the stack property.\n * Chrome and Gecko use this property.\n * @param {Error} ex\n * @return {?Object.<string, *>} Stack trace information.\n */\n function computeStackTraceFromStackProp(ex) {\n if (typeof ex.stack === 'undefined' || !ex.stack) return;\n\n var chrome = /^\\s*at (.*?) ?\\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\\/).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i,\n gecko = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\\[native).*?|[^@]*bundle)(?::(\\d+))?(?::(\\d+))?\\s*$/i,\n winjs = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i,\n // Used to additionally parse URL/line/column from eval frames\n geckoEval = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i,\n chromeEval = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/,\n lines = ex.stack.split('\\n'),\n stack = [],\n submatch,\n parts,\n element,\n reference = /^(.*) is undefined$/.exec(ex.message);\n\n for (var i = 0, j = lines.length; i < j; ++i) {\n if ((parts = chrome.exec(lines[i]))) {\n var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line\n var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n if (isEval && (submatch = chromeEval.exec(parts[2]))) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = submatch[1]; // url\n parts[3] = submatch[2]; // line\n parts[4] = submatch[3]; // column\n }\n element = {\n url: !isNative ? parts[2] : null,\n func: parts[1] || UNKNOWN_FUNCTION,\n args: isNative ? [parts[2]] : [],\n line: parts[3] ? +parts[3] : null,\n column: parts[4] ? +parts[4] : null\n };\n } else if ((parts = winjs.exec(lines[i]))) {\n element = {\n url: parts[2],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: [],\n line: +parts[3],\n column: parts[4] ? +parts[4] : null\n };\n } else if ((parts = gecko.exec(lines[i]))) {\n var isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval && (submatch = geckoEval.exec(parts[3]))) {\n // throw out eval line/column and use top-most line number\n parts[3] = submatch[1];\n parts[4] = submatch[2];\n parts[5] = null; // no column when eval\n } else if (i === 0 && !parts[5] && typeof ex.columnNumber !== 'undefined') {\n // FireFox uses this awesome columnNumber property for its top frame\n // Also note, Firefox's column number is 0-based and everything else expects 1-based,\n // so adding 1\n // NOTE: this hack doesn't work if top-most frame is eval\n stack[0].column = ex.columnNumber + 1;\n }\n element = {\n url: parts[3],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: parts[2] ? parts[2].split(',') : [],\n line: parts[4] ? +parts[4] : null,\n column: parts[5] ? +parts[5] : null\n };\n } else {\n continue;\n }\n\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n\n stack.push(element);\n }\n\n if (!stack.length) {\n return null;\n }\n\n return {\n name: ex.name,\n message: ex.message,\n url: getLocationHref(),\n stack: stack\n };\n }\n\n /**\n * Adds information about the first frame to incomplete stack traces.\n * Safari and IE require this to get complete data on the first frame.\n * @param {Object.<string, *>} stackInfo Stack trace information from\n * one of the compute* methods.\n * @param {string} url The URL of the script that caused an error.\n * @param {(number|string)} lineNo The line number of the script that\n * caused an error.\n * @param {string=} message The error generated by the browser, which\n * hopefully contains the name of the object that caused the error.\n * @return {boolean} Whether or not the stack information was\n * augmented.\n */\n function augmentStackTraceWithInitialElement(stackInfo, url, lineNo, message) {\n var initial = {\n url: url,\n line: lineNo\n };\n\n if (initial.url && initial.line) {\n stackInfo.incomplete = false;\n\n if (!initial.func) {\n initial.func = UNKNOWN_FUNCTION;\n }\n\n if (stackInfo.stack.length > 0) {\n if (stackInfo.stack[0].url === initial.url) {\n if (stackInfo.stack[0].line === initial.line) {\n return false; // already in stack trace\n } else if (\n !stackInfo.stack[0].line &&\n stackInfo.stack[0].func === initial.func\n ) {\n stackInfo.stack[0].line = initial.line;\n return false;\n }\n }\n }\n\n stackInfo.stack.unshift(initial);\n stackInfo.partial = true;\n return true;\n } else {\n stackInfo.incomplete = true;\n }\n\n return false;\n }\n\n /**\n * Computes stack trace information by walking the arguments.caller\n * chain at the time the exception occurred. This will cause earlier\n * frames to be missed but is the only way to get any stack trace in\n * Safari and IE. The top frame is restored by\n * {@link augmentStackTraceWithInitialElement}.\n * @param {Error} ex\n * @return {?Object.<string, *>} Stack trace information.\n */\n function computeStackTraceByWalkingCallerChain(ex, depth) {\n var functionName = /function\\s+([_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*)?\\s*\\(/i,\n stack = [],\n funcs = {},\n recursion = false,\n parts,\n item,\n source;\n\n for (\n var curr = computeStackTraceByWalkingCallerChain.caller;\n curr && !recursion;\n curr = curr.caller\n ) {\n if (curr === computeStackTrace || curr === TraceKit.report) {\n // console.log('skipping internal function');\n continue;\n }\n\n item = {\n url: null,\n func: UNKNOWN_FUNCTION,\n line: null,\n column: null\n };\n\n if (curr.name) {\n item.func = curr.name;\n } else if ((parts = functionName.exec(curr.toString()))) {\n item.func = parts[1];\n }\n\n if (typeof item.func === 'undefined') {\n try {\n item.func = parts.input.substring(0, parts.input.indexOf('{'));\n } catch (e) {}\n }\n\n if (funcs['' + curr]) {\n recursion = true;\n } else {\n funcs['' + curr] = true;\n }\n\n stack.push(item);\n }\n\n if (depth) {\n // console.log('depth is ' + depth);\n // console.log('stack is ' + stack.length);\n stack.splice(0, depth);\n }\n\n var result = {\n name: ex.name,\n message: ex.message,\n url: getLocationHref(),\n stack: stack\n };\n augmentStackTraceWithInitialElement(\n result,\n ex.sourceURL || ex.fileName,\n ex.line || ex.lineNumber,\n ex.message || ex.description\n );\n return result;\n }\n\n /**\n * Computes a stack trace for an exception.\n * @param {Error} ex\n * @param {(string|number)=} depth\n */\n function computeStackTrace(ex, depth) {\n var stack = null;\n depth = depth == null ? 0 : +depth;\n\n try {\n stack = computeStackTraceFromStackProp(ex);\n if (stack) {\n return stack;\n }\n } catch (e) {\n if (TraceKit.debug) {\n throw e;\n }\n }\n\n try {\n stack = computeStackTraceByWalkingCallerChain(ex, depth + 1);\n if (stack) {\n return stack;\n }\n } catch (e) {\n if (TraceKit.debug) {\n throw e;\n }\n }\n return {\n name: ex.name,\n message: ex.message,\n url: getLocationHref()\n };\n }\n\n computeStackTrace.augmentStackTraceWithInitialElement = augmentStackTraceWithInitialElement;\n computeStackTrace.computeStackTraceFromStackProp = computeStackTraceFromStackProp;\n\n return computeStackTrace;\n})();\n\nmodule.exports = TraceKit;\n","/*\n json-stringify-safe\n Like JSON.stringify, but doesn't throw on circular references.\n\n Originally forked from https://github.com/isaacs/json-stringify-safe\n version 5.0.1 on 3/8/2017 and modified to handle Errors serialization\n and IE8 compatibility. Tests for this are in test/vendor.\n\n ISC license: https://github.com/isaacs/json-stringify-safe/blob/master/LICENSE\n*/\n\nexports = module.exports = stringify;\nexports.getSerialize = serializer;\n\nfunction indexOf(haystack, needle) {\n for (var i = 0; i < haystack.length; ++i) {\n if (haystack[i] === needle) return i;\n }\n return -1;\n}\n\nfunction stringify(obj, replacer, spaces, cycleReplacer) {\n return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces);\n}\n\n// https://github.com/ftlabs/js-abbreviate/blob/fa709e5f139e7770a71827b1893f22418097fbda/index.js#L95-L106\nfunction stringifyError(value) {\n var err = {\n // These properties are implemented as magical getters and don't show up in for in\n stack: value.stack,\n message: value.message,\n name: value.name\n };\n\n for (var i in value) {\n if (Object.prototype.hasOwnProperty.call(value, i)) {\n err[i] = value[i];\n }\n }\n\n return err;\n}\n\nfunction serializer(replacer, cycleReplacer) {\n var stack = [];\n var keys = [];\n\n if (cycleReplacer == null) {\n cycleReplacer = function(key, value) {\n if (stack[0] === value) {\n return '[Circular ~]';\n }\n return '[Circular ~.' + keys.slice(0, indexOf(stack, value)).join('.') + ']';\n };\n }\n\n return function(key, value) {\n if (stack.length > 0) {\n var thisPos = indexOf(stack, this);\n ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);\n ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);\n\n if (~indexOf(stack, value)) {\n value = cycleReplacer.call(this, key, value);\n }\n } else {\n stack.push(value);\n }\n\n return replacer == null\n ? value instanceof Error ? stringifyError(value) : value\n : replacer.call(this, key, value);\n };\n}\n","function RavenConfigError(message) {\n this.name = 'RavenConfigError';\n this.message = message;\n}\nRavenConfigError.prototype = new Error();\nRavenConfigError.prototype.constructor = RavenConfigError;\n\nmodule.exports = RavenConfigError;\n","var wrapMethod = function(console, level, callback) {\n var originalConsoleLevel = console[level];\n var originalConsole = console;\n\n if (!(level in console)) {\n return;\n }\n\n var sentryLevel = level === 'warn' ? 'warning' : level;\n\n console[level] = function() {\n var args = [].slice.call(arguments);\n\n var msg = '' + args.join(' ');\n var data = {level: sentryLevel, logger: 'console', extra: {arguments: args}};\n\n if (level === 'assert') {\n if (args[0] === false) {\n // Default browsers message\n msg = 'Assertion failed: ' + (args.slice(1).join(' ') || 'console.assert');\n data.extra.arguments = args.slice(1);\n callback && callback(msg, data);\n }\n } else {\n callback && callback(msg, data);\n }\n\n // this fails for some browsers. :(\n if (originalConsoleLevel) {\n // IE9 doesn't allow calling apply on console functions directly\n // See: https://stackoverflow.com/questions/5472938/does-ie9-support-console-log-and-is-it-a-real-function#answer-5473193\n Function.prototype.apply.call(originalConsoleLevel, originalConsole, args);\n }\n };\n};\n\nmodule.exports = {\n wrapMethod: wrapMethod\n};\n","const {\n adminUrl,\n ajaxUrl,\n env,\n hubspotBaseUrl,\n leadinPluginVersion,\n plugins,\n phpVersion,\n portalId,\n theme,\n wpVersion,\n} = window.leadinConfig;\n\nconst i18n = window.leadinI18n;\n\nexport {\n adminUrl,\n ajaxUrl,\n env,\n hubspotBaseUrl,\n i18n,\n leadinPluginVersion,\n plugins,\n phpVersion,\n portalId,\n theme,\n wpVersion,\n};\n","import Raven from 'raven-js';\nimport {\n env,\n phpVersion,\n wpVersion,\n leadinPluginVersion,\n portalId,\n plugins,\n} from '../constants/leadinConfig';\n\nexport function configureRaven() {\n if (env !== 'prod') {\n return;\n }\n\n Raven.config(\n 'https://e9b8f382cdd130c0d415cd977d2be56f@exceptions.hubspot.com/1',\n {\n instrument: {\n tryCatch: false,\n },\n }\n ).install();\n\n Raven.setTagsContext({\n leadin: leadinPluginVersion,\n php: phpVersion,\n wordpress: wpVersion,\n });\n\n Raven.setUserContext({\n hub: portalId,\n plugins: Object.keys(plugins)\n .map(name => `${name}#${plugins[name].Version}`)\n .join(','),\n });\n}\n\nexport default Raven;\n","import { hubspotBaseUrl, portalId, i18n } from './constants/leadinConfig';\n\nfunction addMenuItem(text, href) {\n jQuery('#toplevel_page_leadin')\n .find('li')\n .last()\n .before(`<li><a href=\"${href}\" target=\"_blank\">${text}</a></li>`);\n}\n\nexport function addExternalLinks() {\n const chatflowsUrl = `${hubspotBaseUrl}/chatflows/${portalId}`;\n const emailUrl = `${hubspotBaseUrl}/email/${portalId}`;\n addMenuItem(i18n.chatflows, chatflowsUrl);\n addMenuItem(i18n.email, emailUrl);\n}\n","export function log(...args) {\n try {\n if (window.localStorage.LEADIN_DEBUG) {\n args.unshift('[Leadin]');\n console.log(...args);\n }\n } catch (e) {\n //\n }\n}\n","export const domElements = {\n iframe: '#leadin-iframe',\n allMenuButtons:\n '.toplevel_page_leadin > a, .toplevel_page_leadin > ul > li > a',\n subMenuButtons: '.toplevel_page_leadin > ul > li',\n};\n","import EventBus from './EventBus';\nimport { log } from '../utils';\nimport { domElements } from '../constants/selectors';\nimport { hubspotBaseUrl } from '../constants/leadinConfig';\nimport Raven from './Raven';\n\nconst eventBus = new EventBus();\nconst callbacks = [];\n\nfunction postMessageObject(message) {\n log('Posting message');\n log(JSON.stringify(message));\n jQuery(domElements.iframe)[0].contentWindow.postMessage(\n JSON.stringify(message),\n hubspotBaseUrl\n );\n}\n\nfunction reply(message, response) {\n if (!response) {\n response = 'Message Received';\n }\n const newMessage = Object.assign({}, message);\n newMessage.response = response;\n postMessageObject(newMessage);\n}\n\nfunction handleResponse(message) {\n callbacks[message._callbackId - 1](message.response);\n}\n\nfunction handleMessage(message) {\n log('Received message');\n log(JSON.stringify(message));\n\n if (message.response && message._callbackId) {\n handleResponse(message);\n } else {\n Object.keys(message).forEach(key => {\n eventBus.trigger(key, [message[key], reply.bind(null, message)]);\n });\n }\n}\n\nfunction handleMessageEvent(event) {\n if (event.origin === hubspotBaseUrl) {\n try {\n const data = JSON.parse(event.data);\n handleMessage(data);\n } catch (e) {\n // Error in parsing message\n }\n }\n}\n\nexport function postMessage(key, payload, onResponse, onTimeout, timeout) {\n if (!timeout) {\n timeout = 500;\n }\n\n const timeoutCallback = function() {\n Raven.captureMessage(\n `LeadinWordpressPlugin postMessage response timeout on message key: ${key}`\n );\n onTimeout();\n };\n\n const timeoutId = setTimeout(Raven.wrap(timeoutCallback), timeout);\n\n const message = {};\n message[key] = payload;\n message._callbackId = callbacks.push((...args) => {\n clearTimeout(timeoutId);\n onResponse(...args);\n });\n postMessageObject(message);\n}\n\nexport function onMessage(key, callback) {\n eventBus.on(key, (...args) => {\n callback.apply(null, args.slice(1));\n });\n}\n\nexport function initInterframe() {\n window.addEventListener('message', handleMessageEvent);\n}\n","import Raven from './Raven';\n\nexport default class EventBus {\n constructor() {\n this.bus = jQuery({});\n }\n\n trigger(...args) {\n this.bus.trigger(...args);\n }\n\n on(event, callback) {\n this.bus.on(event, Raven.wrap(callback));\n }\n}\n","import Raven from '../lib/Raven';\nimport { ajaxUrl } from '../constants/leadinConfig';\n\nfunction makeRequest(action, method, payload, success, error) {\n const url = `${ajaxUrl}?action=${action}`;\n const ajaxPayload = {\n url,\n method,\n contentType: 'application/json',\n success:\n typeof success === 'function'\n ? Raven.wrap(data => success(JSON.parse(data)))\n : undefined,\n error: Raven.wrap(jqXHR => {\n let message;\n try {\n message = JSON.parse(jqXHR.responseText).error;\n } catch (e) {\n message = jqXHR.responseText;\n }\n\n Raven.captureMessage(\n `AJAX request failed with code ${jqXHR.status}: ${message}`\n );\n\n if (typeof error === 'function') {\n error();\n }\n }),\n };\n\n if (payload) {\n ajaxPayload.data = JSON.stringify(payload);\n }\n\n jQuery.ajax(ajaxPayload);\n}\n\nfunction post(action, payload, success, error) {\n return makeRequest(action, 'POST', payload, success, error);\n}\n\nfunction get(action, success, error) {\n return makeRequest(action, 'GET', null, success, error);\n}\n\nconst getPortal = () => get('leadin_get_portal');\nlet portalPollingTimeout;\nlet stopPortalPolling = false;\n\nexport function startPortalIdPolling() {\n portalPollingTimeout = setTimeout(() => {\n getPortal(data => {\n if (data.portalId) {\n location.reload(true);\n } else if (!stopPortalPolling) {\n startPortalIdPolling();\n }\n }, startPortalIdPolling);\n }, 5000);\n}\n\nexport function clearPortalIdPolling() {\n clearTimeout(portalPollingTimeout);\n stopPortalPolling = true;\n}\n\nexport const connect = (portalId, success, error) =>\n post('leadin_registration_ajax', { portalId }, success, error);\n\nexport const disconnect = post.bind(null, 'leadin_disconnect_ajax', {});\nexport const getDomain = get.bind(null, 'leadin_get_domain');\nexport const markAsOutdated = get.bind(null, 'leadin_mark_outdated');\n","import { onMessage, postMessage } from '../lib/Interframe';\n\nfunction createHandler(key) {\n return onMessage.bind(null, key);\n}\n\nexport const onClearQueryParam = createHandler('leadin_clear_query_param');\nexport const onConnect = createHandler('leadin_connect_portal');\nexport const onDisableNavigation = createHandler('leadin_disable_navigation');\nexport const onDisconnect = createHandler('leadin_disconnect_portal');\nexport const onEnterFullScreen = createHandler('leadin_enter_fullscreen');\nexport const onExitFullScreen = createHandler('leadin_exit_fullscreen');\nexport const onGetAssetsPayload = createHandler('leadin_get_assets_payload');\nexport const onGetDomain = createHandler('leadin_get_wp_domain');\nexport const onInitNavigation = createHandler('leadin_init_navigation');\nexport const onInterframeReady = createHandler('leadin_interframe_ready');\nexport const onMarkAsOutdated = createHandler('leadin_mark_outdated');\nexport const onPageReload = createHandler('leadin_page_reload');\nexport const onUpgrade = createHandler('leadin_upgrade');\n\nexport function changeRoute(route) {\n postMessage('leadin_change_route', route, null, () => location.reload(true));\n}\n","import { domElements } from './constants/selectors';\nimport { changeRoute } from './api/hubspotPluginApi';\n\nexport function initNavigation() {\n function setSelectedMenuItem() {\n jQuery(domElements.subMenuButtons).removeClass('current');\n const pageParam = window.location.search.match(/\\?page=leadin_?\\w*/)[0]; // filter page query param\n const selectedElement = jQuery(`a[href=\"admin.php${pageParam}\"]`);\n selectedElement.parent().addClass('current');\n }\n\n function handleNavigation() {\n const appRoute = window.location.search.match(/page=leadin_?(\\w*)/)[1];\n changeRoute(appRoute);\n setSelectedMenuItem();\n }\n\n function handleClick() {\n // Don't interrupt modifier keys\n if (event.metaKey || event.altKey || event.shiftKey) {\n return;\n }\n window.history.pushState(null, null, jQuery(this).attr('href'));\n handleNavigation();\n event.preventDefault();\n }\n\n // Browser back and forward events navigation\n window.addEventListener('popstate', handleNavigation);\n\n // Menu Navigation\n jQuery(domElements.allMenuButtons).click(handleClick);\n}\n\nexport function disableNavigation() {\n jQuery(domElements.allMenuButtons).off('click');\n}\n","export default {\n 'genesis-sample': {\n formsStyle: {\n fontFamily: 'Source Sans Pro',\n labelTextColor: '#333333',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#0073e5',\n },\n chatStyle: {\n accentColor: '#0073e5',\n },\n onScrollLeadFlowStyle: {\n color: '#0073e5',\n },\n onExitLeadFlowStyle: {\n color: '#0073e5',\n },\n },\n 'academy-pro': {\n formsStyle: {\n fontFamily: 'PT Sans',\n labelTextColor: '#222222',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#e22c2f',\n },\n chatStyle: {\n accentColor: '#e22c2f',\n },\n onScrollLeadFlowStyle: {\n color: '#e22c2f',\n },\n onExitLeadFlowStyle: {\n color: '#e22c2f',\n },\n },\n 'agency-pro': {\n formsStyle: {\n fontFamily: 'EB Garamond',\n labelTextColor: '#666666',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#d7c603',\n },\n chatStyle: {\n accentColor: '#d7c603',\n },\n onScrollLeadFlowStyle: {\n color: '#d7c603',\n },\n onExitLeadFlowStyle: {\n color: '#d7c603',\n },\n },\n 'agentpress-pro': {\n formsStyle: {\n fontFamily: 'Roboto',\n labelTextColor: '#1a212b',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#d23836',\n },\n chatStyle: {\n accentColor: '#d23836',\n },\n onScrollLeadFlowStyle: {\n color: '#d23836',\n },\n onExitLeadFlowStyle: {\n color: '#d23836',\n },\n },\n 'altitude-pro': {\n formsStyle: {\n fontFamily: 'Ek Mukta',\n labelTextColor: '#000000',\n labelTextSize: '20px',\n submitFontColor: '#ffffff',\n submitColor: '#079bc4',\n },\n chatStyle: {\n accentColor: '#079bc4',\n },\n onScrollLeadFlowStyle: {\n color: '#079bc4',\n },\n onExitLeadFlowStyle: {\n color: '#079bc4',\n },\n },\n 'ambiance-pro': {\n formsStyle: {\n fontFamily: 'Merriweather',\n labelTextColor: '#333333',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#e12727',\n },\n chatStyle: {\n accentColor: '#e12727',\n },\n onScrollLeadFlowStyle: {\n color: '#e12727',\n },\n onExitLeadFlowStyle: {\n color: '#e12727',\n },\n },\n 'atmosphere-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#333333',\n labelTextSize: '20px',\n submitFontColor: '#ffffff',\n submitColor: '#333333',\n },\n chatStyle: {\n accentColor: '#333333',\n },\n onScrollLeadFlowStyle: {\n color: '#333333',\n },\n onExitLeadFlowStyle: {\n color: '#333333',\n },\n },\n 'author-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#000000',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#000000',\n },\n chatStyle: {\n accentColor: '#000000',\n },\n onScrollLeadFlowStyle: {\n color: '#000000',\n },\n onExitLeadFlowStyle: {\n color: '#000000',\n },\n },\n 'authority-pro': {\n formsStyle: {\n fontFamily: 'Libre Baskerville',\n labelTextColor: '#333333',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#000cff',\n },\n chatStyle: {\n accentColor: '#000cff',\n },\n onScrollLeadFlowStyle: {\n color: '#000cff',\n },\n onExitLeadFlowStyle: {\n color: '#000cff',\n },\n },\n 'beautiful-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#666666',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#e5554e',\n },\n chatStyle: {\n accentColor: '#e5554e',\n },\n onScrollLeadFlowStyle: {\n color: '#e5554e',\n },\n onExitLeadFlowStyle: {\n color: '#e5554e',\n },\n },\n 'breakthrough-pro': {\n formsStyle: {\n fontFamily: 'Alegreya Sans',\n labelTextColor: '#4e4756',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#4a4f9b',\n },\n chatStyle: {\n accentColor: '#4a4f9b',\n },\n onScrollLeadFlowStyle: {\n color: '#4a4f9b',\n },\n onExitLeadFlowStyle: {\n color: '#4a4f9b',\n },\n },\n 'cafe-pro': {\n formsStyle: {\n fontFamily: 'Crimson Text',\n labelTextColor: '#000000',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#000000',\n },\n chatStyle: {\n accentColor: '#000000',\n },\n onScrollLeadFlowStyle: {\n color: '#000000',\n },\n onExitLeadFlowStyle: {\n color: '#000000',\n },\n },\n 'daily-dish-pro': {\n formsStyle: {\n fontFamily: 'Cormorant',\n labelTextColor: '#000000',\n labelTextSize: '20px',\n submitFontColor: '#ffffff',\n submitColor: '#d9037f',\n },\n chatStyle: {\n accentColor: '#d9037f',\n },\n onScrollLeadFlowStyle: {\n color: '#d9037f',\n },\n onExitLeadFlowStyle: {\n color: '#d9037f',\n },\n },\n 'digital-pro': {\n formsStyle: {\n fontFamily: 'Lora',\n labelTextColor: '#5b5e5e',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#e85555',\n },\n chatStyle: {\n accentColor: '#e85555',\n },\n onScrollLeadFlowStyle: {\n color: '#e85555',\n },\n onExitLeadFlowStyle: {\n color: '#e85555',\n },\n },\n 'education-pro': {\n formsStyle: {\n fontFamily: 'Roboto Condensed',\n labelTextColor: '#444444',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#78a7c8',\n },\n chatStyle: {\n accentColor: '#78a7c8',\n },\n onScrollLeadFlowStyle: {\n color: '#78a7c8',\n },\n onExitLeadFlowStyle: {\n color: '#78a7c8',\n },\n },\n 'eleven40-pro': {\n formsStyle: {\n fontFamily: 'Lora',\n labelTextColor: '#000000',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#ed702b',\n },\n chatStyle: {\n accentColor: '#ed702b',\n },\n onScrollLeadFlowStyle: {\n color: '#ed702b',\n },\n onExitLeadFlowStyle: {\n color: '#ed702b',\n },\n },\n 'enterprise-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#777777',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#31b2ed',\n },\n chatStyle: {\n accentColor: '#31b2ed',\n },\n onScrollLeadFlowStyle: {\n color: '#31b2ed',\n },\n onExitLeadFlowStyle: {\n color: '#31b2ed',\n },\n },\n 'essence-pro': {\n formsStyle: {\n fontFamily: 'Alegreya Sans',\n labelTextColor: '#333333',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#be8100',\n },\n chatStyle: {\n accentColor: '#be8100',\n },\n onScrollLeadFlowStyle: {\n color: '#be8100',\n },\n onExitLeadFlowStyle: {\n color: '#be8100',\n },\n },\n 'executive-pro': {\n formsStyle: {\n fontFamily: 'Open Sans',\n labelTextColor: '#222222',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#64c9ea',\n },\n chatStyle: {\n accentColor: '#64c9ea',\n },\n onScrollLeadFlowStyle: {\n color: '#64c9ea',\n },\n onExitLeadFlowStyle: {\n color: '#64c9ea',\n },\n },\n 'generate-pro': {\n formsStyle: {\n fontFamily: 'Source Sans Pro',\n labelTextColor: '#222222',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#eb232f',\n },\n chatStyle: {\n accentColor: '#eb232f',\n },\n onScrollLeadFlowStyle: {\n color: '#eb232f',\n },\n onExitLeadFlowStyle: {\n color: '#eb232f',\n },\n },\n 'infinity-pro': {\n formsStyle: {\n fontFamily: 'Cormorant Garamond',\n labelTextColor: '#000000',\n labelTextSize: '22px',\n submitFontColor: '#ffffff',\n submitColor: '#d43c67',\n },\n chatStyle: {\n accentColor: '#d43c67',\n },\n onScrollLeadFlowStyle: {\n color: '#d43c67',\n },\n onExitLeadFlowStyle: {\n color: '#d43c67',\n },\n },\n 'interior-pro': {\n formsStyle: {\n fontFamily: 'Lora',\n labelTextColor: '#777777',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#009092',\n },\n chatStyle: {\n accentColor: '#009092',\n },\n onScrollLeadFlowStyle: {\n color: '#009092',\n },\n onExitLeadFlowStyle: {\n color: '#009092',\n },\n },\n 'lifestyle-pro': {\n formsStyle: {\n fontFamily: 'Droid Sans',\n labelTextColor: '#767673',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#27968b',\n },\n chatStyle: {\n accentColor: '#27968b',\n },\n onScrollLeadFlowStyle: {\n color: '#27968b',\n },\n onExitLeadFlowStyle: {\n color: '#27968b',\n },\n },\n 'magazine-pro': {\n formsStyle: {\n fontFamily: 'Roboto',\n labelTextColor: '#222222',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#008285',\n },\n chatStyle: {\n accentColor: '#008285',\n },\n onScrollLeadFlowStyle: {\n color: '#008285',\n },\n onExitLeadFlowStyle: {\n color: '#008285',\n },\n },\n 'metro-pro': {\n formsStyle: {\n fontFamily: 'Helvetica Neue',\n labelTextColor: '#222222',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#f96e5b',\n },\n chatStyle: {\n accentColor: '#f96e5b',\n },\n onScrollLeadFlowStyle: {\n color: '#f96e5b',\n },\n onExitLeadFlowStyle: {\n color: '#f96e5b',\n },\n },\n 'minimum-pro': {\n formsStyle: {\n fontFamily: 'Roboto Slab',\n labelTextColor: '#333333',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#0ebfe9',\n },\n chatStyle: {\n accentColor: '#0ebfe9',\n },\n onScrollLeadFlowStyle: {\n color: '#0ebfe9',\n },\n onExitLeadFlowStyle: {\n color: '#0ebfe9',\n },\n },\n 'modern-studio-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#000000',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#000000',\n },\n chatStyle: {\n accentColor: '#000000',\n },\n onScrollLeadFlowStyle: {\n color: '#000000',\n },\n onExitLeadFlowStyle: {\n color: '#000000',\n },\n },\n 'monochrome-pro': {\n formsStyle: {\n fontFamily: 'Muli',\n labelTextColor: '#000000',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#000000',\n },\n chatStyle: {\n accentColor: '#000000',\n },\n onScrollLeadFlowStyle: {\n color: '#000000',\n },\n onExitLeadFlowStyle: {\n color: '#000000',\n },\n },\n 'news-pro': {\n formsStyle: {\n fontFamily: 'Raleway',\n labelTextColor: '#666666',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#ff0000',\n },\n chatStyle: {\n accentColor: '#ff0000',\n },\n onScrollLeadFlowStyle: {\n color: '#ff0000',\n },\n onExitLeadFlowStyle: {\n color: '#ff0000',\n },\n },\n 'no-sidebar-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#333333',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#333333',\n },\n chatStyle: {\n accentColor: '#333333',\n },\n onScrollLeadFlowStyle: {\n color: '#333333',\n },\n onExitLeadFlowStyle: {\n color: '#333333',\n },\n },\n 'outfitter-pro': {\n formsStyle: {\n fontFamily: 'Noto Sans',\n labelTextColor: '#546e7a',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#000000',\n },\n chatStyle: {\n accentColor: '#000000',\n },\n onScrollLeadFlowStyle: {\n color: '#000000',\n },\n onExitLeadFlowStyle: {\n color: '#000000',\n },\n },\n 'outreach-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#333333',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#6ab446',\n },\n chatStyle: {\n accentColor: '#6ab446',\n },\n onScrollLeadFlowStyle: {\n color: '#6ab446',\n },\n onExitLeadFlowStyle: {\n color: '#6ab446',\n },\n },\n 'parallax-pro': {\n formsStyle: {\n fontFamily: 'Cormorant Garamond',\n labelTextColor: '#000000',\n labelTextSize: '22px',\n submitFontColor: '#ffffff',\n submitColor: '#00a0af',\n },\n chatStyle: {\n accentColor: '#00a0af',\n },\n onScrollLeadFlowStyle: {\n color: '#00a0af',\n },\n onExitLeadFlowStyle: {\n color: '#00a0af',\n },\n },\n 'revolution-pro': {\n formsStyle: {\n fontFamily: 'Noto Serif SC',\n labelTextColor: '#000000',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#008080',\n },\n chatStyle: {\n accentColor: '#008080',\n },\n onScrollLeadFlowStyle: {\n color: '#008080',\n },\n onExitLeadFlowStyle: {\n color: '#008080',\n },\n },\n 'sixteen-nine-pro': {\n formsStyle: {\n fontFamily: 'Roboto',\n labelTextColor: '#000000',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#1dbec0',\n },\n chatStyle: {\n accentColor: '#1dbec0',\n },\n onScrollLeadFlowStyle: {\n color: '#1dbec0',\n },\n onExitLeadFlowStyle: {\n color: '#1dbec0',\n },\n },\n 'smart-passive-income-pro': {\n formsStyle: {\n fontFamily: 'Roboto',\n labelTextColor: '#333333',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#0e763c',\n },\n chatStyle: {\n accentColor: '#0e763c',\n },\n onScrollLeadFlowStyle: {\n color: '#0e763c',\n },\n onExitLeadFlowStyle: {\n color: '#0e763c',\n },\n },\n 'wellness-pro': {\n formsStyle: {\n fontFamily: 'Open Sans',\n labelTextColor: '#000000',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#5da44f',\n },\n chatStyle: {\n accentColor: '#5da44f',\n },\n onScrollLeadFlowStyle: {\n color: '#5da44f',\n },\n onExitLeadFlowStyle: {\n color: '#5da44f',\n },\n },\n 'workstation-pro': {\n formsStyle: {\n fontFamily: 'Baskerville',\n labelTextColor: '#222222',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#ff4800',\n },\n chatStyle: {\n accentColor: '#ff4800',\n },\n onScrollLeadFlowStyle: {\n color: '#ff4800',\n },\n onExitLeadFlowStyle: {\n color: '#ff4800',\n },\n },\n};\n","import {\n onInterframeReady,\n onConnect,\n onDisconnect,\n onMarkAsOutdated,\n onUpgrade,\n onPageReload,\n onInitNavigation,\n onDisableNavigation,\n onClearQueryParam,\n onGetDomain,\n onGetAssetsPayload,\n onEnterFullScreen,\n onExitFullScreen,\n} from './api/hubspotPluginApi';\nimport {\n connect,\n disconnect,\n markAsOutdated,\n getDomain,\n clearPortalIdPolling,\n} from './api/wordpressApi';\nimport { adminUrl, theme } from './constants/leadinConfig';\nimport { initNavigation, disableNavigation } from './navigation';\nimport enterFullScreen, { exitFullScreen } from './fullscreen';\nimport themes from './constants/themes';\n\nonInterframeReady((message, reply) => {\n reply('Interframe Ready');\n});\n\nonConnect((portalId, reply) => {\n connect(\n portalId,\n () => {\n clearPortalIdPolling();\n reply({ success: true });\n },\n reply.bind(null, { success: false })\n );\n});\n\nonDisconnect((message, reply) => {\n disconnect(\n reply.bind(null, { success: true }),\n reply.bind(null, { success: false })\n );\n});\n\nonMarkAsOutdated((message, reply) => {\n markAsOutdated(reply);\n});\n\nonUpgrade((message, reply) => {\n reply();\n location.href = `${adminUrl}plugins.php`;\n});\n\nonPageReload((message, reply) => {\n reply();\n window.location.reload(true);\n});\n\nonInitNavigation((message, reply) => {\n reply();\n initNavigation();\n});\n\nonDisableNavigation((message, reply) => {\n reply();\n disableNavigation();\n});\n\nonClearQueryParam((message, reply) => {\n reply();\n let currentWindowLocation = window.location.toString();\n if (currentWindowLocation.indexOf('?') > 0) {\n currentWindowLocation = currentWindowLocation.substring(\n 0,\n currentWindowLocation.indexOf('?')\n );\n }\n const newWindowLocation = `${currentWindowLocation}?page=leadin`;\n window.history.pushState({}, '', newWindowLocation);\n});\n\nonGetDomain((message, reply) => {\n getDomain(data => {\n if (data.domain) {\n reply(data.domain);\n }\n });\n});\n\nonGetAssetsPayload((message, reply) => {\n reply({ payload: themes[theme] });\n});\n\nonEnterFullScreen((message, reply) => {\n reply();\n enterFullScreen();\n});\n\nonExitFullScreen((message, reply) => {\n reply();\n exitFullScreen();\n});\n","import { domElements } from './constants/selectors';\n\nexport default function enterFullScreen() {\n jQuery(domElements.iframe).addClass('leadin-iframe-fullscreen');\n}\n\nexport function exitFullScreen() {\n jQuery(domElements.iframe).removeClass('leadin-iframe-fullscreen');\n}\n","import Raven, { configureRaven } from './lib/Raven';\nimport { addExternalLinks } from './menu';\nimport { portalId } from './constants/leadinConfig';\nimport { initInterframe } from './lib/Interframe';\nimport { startPortalIdPolling } from './api/wordpressApi';\nimport './handlers';\n\nfunction main() {\n initInterframe();\n\n // Enable App Navigation only when viewing the plugin\n if (window.location.search.indexOf('page=leadin') !== -1) {\n if (!portalId) {\n startPortalIdPolling();\n }\n }\n\n jQuery(document).ready(addExternalLinks);\n}\n\nconfigureRaven();\nRaven.context(main);\n"],"sourceRoot":""}
|
tests/inc/test-leadin-mark-outdated.php
CHANGED
@@ -14,15 +14,17 @@ class LeadinMarkOutdatedTest extends WP_UnitTestCase {
|
|
14 |
* Test function leadin_get_affiliate_code
|
15 |
*/
|
16 |
public function test_mark_outdated_ajax() {
|
17 |
-
|
18 |
$this->assertFalse( get_option( 'leadin_outdated_version', false ) );
|
|
|
19 |
|
20 |
try {
|
21 |
-
|
22 |
-
} catch ( WPDieException $e ) {
|
|
|
|
|
23 |
|
24 |
-
$this->assertTrue( isset( $
|
25 |
-
$array = json_decode( $
|
26 |
$this->assertTrue( isset( $array ) );
|
27 |
$this->assertTrue( get_option( 'leadin_outdated_version', false ) );
|
28 |
delete_option( 'leadin_outdated_version' );
|
14 |
* Test function leadin_get_affiliate_code
|
15 |
*/
|
16 |
public function test_mark_outdated_ajax() {
|
|
|
17 |
$this->assertFalse( get_option( 'leadin_outdated_version', false ) );
|
18 |
+
$response;
|
19 |
|
20 |
try {
|
21 |
+
leadin_mark_outdated_ajax();
|
22 |
+
} catch ( WPDieException $e ) {
|
23 |
+
$response = $e;
|
24 |
+
}
|
25 |
|
26 |
+
$this->assertTrue( isset( $response ) );
|
27 |
+
$array = json_decode( $response->getMessage() );
|
28 |
$this->assertTrue( isset( $array ) );
|
29 |
$this->assertTrue( get_option( 'leadin_outdated_version', false ) );
|
30 |
delete_option( 'leadin_outdated_version' );
|