HubSpot – Free Marketing Plugin for WordPress - Version 3.1.6

Version Description

(2015.03.31) =

Download this release

Release Info

Developer AndyGCook
Plugin Icon 128x128 HubSpot – Free Marketing Plugin for WordPress
Version 3.1.6
Comparing to
See all releases

Code changes from version 3.1.5 to 3.1.6

admin/inc/class-leadin-contact.php CHANGED
@@ -56,12 +56,6 @@ class LI_Contact {
56
  $submissions = $this->get_contact_submissions($this->hashkey, 'ARRAY_A');
57
  $tags = $this->get_contact_tags($this->hashkey);
58
 
59
- if ( WPLeadIn::is_power_up_active('lookups') )
60
- {
61
- $lead->social_data = $this->get_social_details($lead);
62
- $lead->company_data = $this->get_company_details($lead);
63
- }
64
-
65
  // Merge the page views array and submissions array and reorder by date
66
  $events_array = array_merge($pageviews, $submissions);
67
  usort($events_array, array('LI_Contact','sort_by_event_date'));
@@ -184,6 +178,15 @@ class LI_Contact {
184
  $count++;
185
  }
186
 
 
 
 
 
 
 
 
 
 
187
  $lead->total_visits = $total_visits;
188
  $lead->total_pageviews = $total_pageviews;
189
  $lead->total_submissions = $total_submissions;
@@ -290,97 +293,108 @@ class LI_Contact {
290
  }
291
 
292
  /**
293
- * Sets the social_data on a contact
294
  *
295
  * @param object
296
  * @return object
297
  */
298
  function get_social_details ( $lead )
299
  {
300
- $site_url = site_url();
301
- $social_data = '';
302
-
303
- if ( ! $lead->social_data )
 
 
 
 
 
 
 
 
 
 
304
  {
305
- // Grab the social intel lookup
306
- $social_data = json_decode($this->query_social_lookup_endpoint(strtolower($lead->lead_email), $site_url));
307
-
308
- if ( ! isset($social_data->status) )
309
- {
310
- $this->update_social_lookup_data($this->hashkey, serialize($social_data));
 
 
311
 
312
- // Update the first and last names if one of them isn't set, and the respected name part is present or the full name is present the full name is present or the correspond
313
- $first_name = '';
314
- $last_name = '';
315
- $update_name = FALSE;
316
 
317
- if ( ! $lead->lead_first_name )
 
 
 
318
  {
319
- if ( isset($social_data->fullcontactDetails->contactinfo->givenname) )
320
- {
321
- $first_name = $social_data->fullcontactDetails->contactinfo->givenname;
322
- $update_name = TRUE;
323
- }
324
- else if ( isset($social_data->fullcontactDetails->contactinfo->fullname) )
325
- {
326
- $first_name = reset(explode(' ', $social_data->fullcontactDetails->contactinfo->fullname));
327
- $update_name = TRUE;
328
- }
329
  }
330
- else
331
- $first_name = $lead->lead_first_name;
332
-
333
- if ( ! $lead->lead_last_name )
334
  {
335
- if ( isset($social_data->fullcontactDetails->contactinfo->familyname) )
336
- {
337
- $last_name = $social_data->fullcontactDetails->contactinfo->familyname;
338
- $update_name = TRUE;
339
- }
340
- else if ( isset($social_data->fullcontactDetails->contactinfo->fullname) )
341
- {
342
- $last_name = end(explode(' ', $social_data->fullcontactDetails->contactinfo->fullname));
343
- $update_name = TRUE;
344
- }
345
  }
346
- else
347
- $last_name = $lead->lead_first_name;
348
-
349
- if ( $update_name )
350
- $this->update_contact_full_name($this->hashkey, $first_name, $last_name);
351
-
352
  }
353
- else if ( isset($social_data->status) && $social_data->status == 'error' )
 
 
354
  {
355
- $social_data = '';
 
 
 
 
 
 
 
 
 
 
356
  }
 
 
 
357
  }
358
- else
359
- $social_data = unserialize($lead->social_data);
360
 
361
- if ( isset($social_data->fullcontactDetails) )
 
362
  {
363
- $fullcontactDetails = $social_data->fullcontactDetails;
364
 
365
- if ( count($fullcontactDetails->organizations) )
366
  {
367
- foreach ( $fullcontactDetails->organizations as $org )
368
- {
369
- if ( isset($org->isprimary) )
370
- {
371
- $social_data->properties->primary->company_name = ( isset($org->name) ? $org->name : '' );
372
- $social_data->properties->primary->title = ( isset($org->title) ? $org->title : '' );
373
- break;
374
- }
375
- }
376
- }
377
-
378
- if ( isset($social_data->twitterDetails->description) )
 
 
 
 
 
379
  {
380
- if ( $social_data->twitterDetails->description )
381
- $social_data->properties->description = $social_data->twitterDetails->description;
 
 
 
382
  }
383
 
 
384
  if ( count($fullcontactDetails->socialprofiles) )
385
  {
386
  $social_profiles = array();
@@ -395,20 +409,33 @@ class LI_Contact {
395
  $social_profile->url = leadin_safe_social_profile_url($profile->url);
396
  $social_profile->typeid = $profile->typeid;
397
  $social_profile->username = $profile->username;
 
 
 
398
 
399
- $social_profiles[] = $social_profile;
 
 
 
 
 
 
 
400
  }
401
  }
402
 
403
  if ( count($social_profiles) )
404
  {
405
- if ( isset($social_data->properties->social_profiles) )
406
- $social_data->properties->social_profiles = $social_profiles;
407
  }
408
  }
409
  }
410
 
411
- return $social_data;
 
 
 
412
  }
413
 
414
  /**
@@ -425,7 +452,7 @@ class LI_Contact {
425
  $site_url = site_url();
426
  $email_domain = end(explode('@', $lead->lead_email));
427
  $leadin_user = leadin_get_current_user();
428
- $company_data = '';
429
 
430
  if ( strstr($leadin_user['email'], ',') )
431
  $leadin_user_email = reset(explode(',', $leadin_user['email']));
@@ -434,26 +461,120 @@ class LI_Contact {
434
 
435
  if ( ! in_array($email_domain, $blacklist_nonmail_domains) && ! in_array($email_domain, $blacklist_freemail_domains) )
436
  {
437
- if ( ! $lead->company_data )
 
 
 
438
  {
439
- // Grab the company intel lookup
440
- $company_data = json_decode($this->query_company_lookup_endpoint($email_domain, $leadin_user_email, $site_url));
441
-
442
- if ( isset($company_data->status) && $company_data->status != 'error' )
 
 
 
 
 
 
 
 
443
  {
444
- $this->update_company_lookup_data($this->hashkey, serialize($company_data));
 
445
  }
446
  else
 
 
 
447
  {
 
 
448
  }
449
- }
450
- else
451
- {
452
- $company_data = unserialize($lead->company_data);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
453
  }
454
  }
455
-
456
- return $company_data;
457
  }
458
 
459
  /**
@@ -625,6 +746,9 @@ class LI_Contact {
625
  */
626
  function query_social_lookup_endpoint ( $lookup_email, $caller_domain )
627
  {
 
 
 
628
  $api_endpoint = 'http://leadin.com/enrichment/v1/profile/email/email_lookup.php';
629
  $params = '?lookup_email=' . $lookup_email . '&caller_domain=' . $caller_domain;
630
 
@@ -650,6 +774,9 @@ class LI_Contact {
650
  */
651
  function query_company_lookup_endpoint ( $lookup_company_url, $caller_email, $caller_domain )
652
  {
 
 
 
653
  $caller_domain = str_replace(array('http://', 'https://'), '', $caller_domain);
654
  $caller_domain = 'leadin.com';
655
 
@@ -683,42 +810,6 @@ class LI_Contact {
683
  return $result;
684
  }
685
 
686
- /**
687
- * Cache the social lookup data in the database
688
- *
689
- * @param string
690
- * @param string serialized array
691
- * @param string
692
- * @return bool
693
- */
694
- function update_social_lookup_data ( $hashkey, $social_data )
695
- {
696
- global $wpdb;
697
-
698
- $q = $wpdb->prepare("UPDATE $wpdb->li_leads SET social_data = %s WHERE hashkey = %s", $social_data, $hashkey);
699
- $result = $wpdb->query($q);
700
-
701
- return $result;
702
- }
703
-
704
- /**
705
- * Cache the company lookup data in the database
706
- *
707
- * @param string
708
- * @param string serialized array
709
- * @param string
710
- * @return bool
711
- */
712
- function update_company_lookup_data ( $hashkey, $company_data )
713
- {
714
- global $wpdb;
715
-
716
- $q = $wpdb->prepare("UPDATE $wpdb->li_leads SET company_data = %s WHERE hashkey = %s", $company_data, $hashkey);
717
- $result = $wpdb->query($q);
718
-
719
- return $result;
720
- }
721
-
722
  /**
723
  * Update the first + last name on a contact row in li_leads
724
  *
56
  $submissions = $this->get_contact_submissions($this->hashkey, 'ARRAY_A');
57
  $tags = $this->get_contact_tags($this->hashkey);
58
 
 
 
 
 
 
 
59
  // Merge the page views array and submissions array and reorder by date
60
  $events_array = array_merge($pageviews, $submissions);
61
  usort($events_array, array('LI_Contact','sort_by_event_date'));
178
  $count++;
179
  }
180
 
181
+ $lead->social_data = '';
182
+ $lead->company_data = '';
183
+
184
+ if ( WPLeadIn::is_power_up_active('lookups') )
185
+ {
186
+ $lead->social_data = $this->get_social_details($lead);
187
+ $lead->company_data = $this->get_company_details($lead);
188
+ }
189
+
190
  $lead->total_visits = $total_visits;
191
  $lead->total_pageviews = $total_pageviews;
192
  $lead->total_submissions = $total_submissions;
293
  }
294
 
295
  /**
296
+ * Sets the social_data on a contact object
297
  *
298
  * @param object
299
  * @return object
300
  */
301
  function get_social_details ( $lead )
302
  {
303
+ // Grab the social intel lookup
304
+ $response = json_decode($this->query_social_lookup_endpoint(strtolower($lead->lead_email), site_url()));
305
+ $social_data = (Object)NULL;
306
+ $social_data_exists = FALSE;
307
+
308
+ /*
309
+ - Create a null object
310
+ - If no response, return false
311
+ - If response, set all defaults
312
+ - Overwrite defaults
313
+ - Loop through response, if no values set, then return false
314
+ */
315
+
316
+ if ( isset($response->status) && $response->status == 'error' )
317
  {
318
+ return FALSE;
319
+ }
320
+ else if ( ! isset($response->status) )
321
+ {
322
+ $social_data->company_name = '';
323
+ $social_data->title = '';
324
+ $social_data->description = '';
325
+ $social_data->social_profiles = '';
326
 
327
+ $update_name = FALSE;
 
 
 
328
 
329
+ // Updates the contact first name with the API value if it isn't set yet on the contact row
330
+ if ( ! $lead->lead_first_name )
331
+ {
332
+ if ( isset($response->fullcontactDetails->contactinfo->givenname) )
333
  {
334
+ $first_name = $response->fullcontactDetails->contactinfo->givenname;
335
+ $update_name = TRUE;
 
 
 
 
 
 
 
 
336
  }
337
+ else if ( isset($response->fullcontactDetails->contactinfo->fullname) )
 
 
 
338
  {
339
+ // Grab the first section of the full name
340
+ $first_name = reset(explode(' ', $response->fullcontactDetails->contactinfo->fullname));
341
+ $update_name = TRUE;
 
 
 
 
 
 
 
342
  }
 
 
 
 
 
 
343
  }
344
+
345
+ // Updates the contact last name with the API value if it isn't set yet on the contact row
346
+ if ( ! $lead->lead_last_name )
347
  {
348
+ if ( isset($response->fullcontactDetails->contactinfo->familyname) )
349
+ {
350
+ $last_name = $response->fullcontactDetails->contactinfo->familyname;
351
+ $update_name = TRUE;
352
+ }
353
+ else if ( isset($response->fullcontactDetails->contactinfo->fullname) )
354
+ {
355
+ // Grab the last section of the full name
356
+ $last_name = end(explode(' ', $response->fullcontactDetails->contactinfo->fullname));
357
+ $update_name = TRUE;
358
+ }
359
  }
360
+
361
+ if ( $update_name )
362
+ $this->update_contact_full_name($this->hashkey, $first_name, $last_name);
363
  }
 
 
364
 
365
+ // Figure out the job title and company name
366
+ if ( isset($response->fullcontactDetails) )
367
  {
368
+ $fullcontactDetails = $response->fullcontactDetails;
369
 
370
+ if ( isset($fullcontactDetails->organizations) )
371
  {
372
+ if ( count($fullcontactDetails->organizations) )
373
+ {
374
+ foreach ( $fullcontactDetails->organizations as $org )
375
+ {
376
+ if ( isset($org->isprimary) && $org->isprimary )
377
+ {
378
+ $social_data->company_name = ( isset($org->name) ? $org->name : '' );
379
+ $social_data->title = ( isset($org->title) ? $org->title : '' );
380
+ $social_data_exists = TRUE;
381
+ break;
382
+ }
383
+ }
384
+ }
385
+ }
386
+
387
+ // Set the description
388
+ if ( isset($response->twitterDetails->description) )
389
  {
390
+ if ( $response->twitterDetails->description )
391
+ {
392
+ $social_data->description = $response->twitterDetails->description;
393
+ $social_data_exists = TRUE;
394
+ }
395
  }
396
 
397
+ // Set social profiles
398
  if ( count($fullcontactDetails->socialprofiles) )
399
  {
400
  $social_profiles = array();
409
  $social_profile->url = leadin_safe_social_profile_url($profile->url);
410
  $social_profile->typeid = $profile->typeid;
411
  $social_profile->username = $profile->username;
412
+
413
+ $social_profiles[] = $social_profile;
414
+ }
415
 
416
+ // Default Twitter bio fallback if twitterDetails in API response
417
+ if ( $profile->typeid == 'twitter' && ! isset($social_data->description) )
418
+ {
419
+ if ( isset($profile->bio) )
420
+ {
421
+ $social_data->description = $profile->bio;
422
+ $social_data_exists = TRUE;
423
+ }
424
  }
425
  }
426
 
427
  if ( count($social_profiles) )
428
  {
429
+ $social_data->social_profiles = $social_profiles;
430
+ $social_data_exists = TRUE;
431
  }
432
  }
433
  }
434
 
435
+ if ( $social_data_exists )
436
+ return $social_data;
437
+ else
438
+ return FALSE;
439
  }
440
 
441
  /**
452
  $site_url = site_url();
453
  $email_domain = end(explode('@', $lead->lead_email));
454
  $leadin_user = leadin_get_current_user();
455
+ $company_data = (Object)NULL;
456
 
457
  if ( strstr($leadin_user['email'], ',') )
458
  $leadin_user_email = reset(explode(',', $leadin_user['email']));
461
 
462
  if ( ! in_array($email_domain, $blacklist_nonmail_domains) && ! in_array($email_domain, $blacklist_freemail_domains) )
463
  {
464
+ // Grab the company intel lookup
465
+ $response = json_decode($this->query_company_lookup_endpoint($email_domain, $leadin_user_email, $site_url));
466
+
467
+ if ( isset($response->status) && $response->status == 'error' )
468
  {
469
+ return FALSE;
470
+ }
471
+ else if ( ! isset($response->status) )
472
+ {
473
+ $company_data_exists = FALSE;
474
+
475
+ if ( isset($response->properties->name) )
476
+ $company_data->name = $response->properties->name;
477
+ else
478
+ $company_data->name = '';
479
+
480
+ if ( isset($response->properties->overview) )
481
  {
482
+ $company_data->overview = $response->properties->overview;
483
+ $company_data_exists = TRUE;
484
  }
485
  else
486
+ $company_data->overview = '';
487
+
488
+ if ( isset($response->properties->employees) )
489
  {
490
+ $company_data->employees = $response->properties->employees;
491
+ $company_data_exists = TRUE;
492
  }
493
+ else
494
+ $company_data->employees = '';
495
+
496
+ if ( isset($response->properties->revenue) )
497
+ {
498
+ $company_data->revenue = $response->properties->revenue;
499
+ $company_data_exists = TRUE;
500
+ }
501
+ else
502
+ $company_data->revenue = '';
503
+
504
+
505
+ if ( isset($response->properties->country) )
506
+ {
507
+ $company_data->country = $response->properties->country;
508
+ $company_data_exists = TRUE;
509
+ }
510
+ else
511
+ $company_data->country = '';
512
+
513
+ if ( isset($response->properties->state) )
514
+ {
515
+ $company_data->state = $response->properties->state;
516
+ $company_data_exists = TRUE;
517
+ }
518
+ else
519
+ $company_data->state = '';
520
+
521
+ if ( isset($response->properties->founded) )
522
+ {
523
+ $company_data->founded = $response->properties->founded;
524
+ $company_data_exists = TRUE;
525
+ }
526
+ else
527
+ $company_data->founded = '';
528
+
529
+ if ( isset($response->properties->facebookpageurl) )
530
+ {
531
+ $company_data->facebookpageurl = $response->properties->facebookpageurl;
532
+ $company_data_exists = TRUE;
533
+ }
534
+ else
535
+ $company_data->facebookpageurl = '';
536
+
537
+ if ( isset($response->properties->twitterusername) )
538
+ {
539
+ $company_data->twitterusername = $response->properties->twitterusername;
540
+ $company_data_exists = TRUE;
541
+ }
542
+ else
543
+ $company_data->twitterusername = '';
544
+
545
+ if ( isset($response->properties->twitterurl) )
546
+ {
547
+ $company_data->twitterurl = $response->properties->twitterurl;
548
+ $company_data_exists = TRUE;
549
+ }
550
+ else
551
+ $company_data->twitterurl = '';
552
+
553
+ if ( isset($response->properties->linkedinurl) )
554
+ {
555
+ $company_data->linkedinurl = $response->properties->linkedinurl;
556
+ $company_data_exists = TRUE;
557
+ }
558
+ else
559
+ $company_data->linkedinurl = '';
560
+
561
+ if ( isset($response->properties->address) )
562
+ {
563
+ $company_data->address = $response->properties->address;
564
+ $company_data_exists = TRUE;
565
+ }
566
+ else
567
+ $company_data->address = '';
568
+
569
+ if ( $company_data_exists )
570
+ return $company_data;
571
+ else
572
+ return FALSE;
573
+
574
  }
575
  }
576
+ else
577
+ return FALSE;
578
  }
579
 
580
  /**
746
  */
747
  function query_social_lookup_endpoint ( $lookup_email, $caller_domain )
748
  {
749
+ if ( ! function_exists('curl_init') )
750
+ return FALSE;
751
+
752
  $api_endpoint = 'http://leadin.com/enrichment/v1/profile/email/email_lookup.php';
753
  $params = '?lookup_email=' . $lookup_email . '&caller_domain=' . $caller_domain;
754
 
774
  */
775
  function query_company_lookup_endpoint ( $lookup_company_url, $caller_email, $caller_domain )
776
  {
777
+ if ( ! function_exists('curl_init') )
778
+ return FALSE;
779
+
780
  $caller_domain = str_replace(array('http://', 'https://'), '', $caller_domain);
781
  $caller_domain = 'leadin.com';
782
 
810
  return $result;
811
  }
812
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
813
  /**
814
  * Update the first + last name on a contact row in li_leads
815
  *
admin/leadin-admin.php CHANGED
@@ -264,7 +264,14 @@ class WPLeadInAdmin {
264
 
265
  self::check_admin_action();
266
 
267
- $leadin_icon = ($wp_version < 3.8 && !is_plugin_active('mp6/mp6.php') ? LEADIN_PATH . '/images/leadin-icon-32x32.png' : 'data:image/svg+xml;base64,' . base64_encode(file_get_contents(LEADIN_PATH . '/images/leadin-svg-icon.svg')));
 
 
 
 
 
 
 
268
  add_menu_page('Leadin', 'Leadin', $capability, 'leadin_stats', array($this, 'leadin_build_stats_page'), $leadin_icon , '25.100713');
269
 
270
  foreach ( $this->admin_power_ups as $power_up )
@@ -314,14 +321,17 @@ class WPLeadInAdmin {
314
  </div>
315
  <div class="content">
316
  <ul class="features">
317
- <li>Contacts Tracking</li>
318
- <p>Learn more about your visitors.</p>
319
- <li>Contacts Analytics</li>
320
- <p>Find out what content and traffic sources convert the best.</p>
321
- <li>Popup Form</li>
322
- <p>Convert more visitors to contacts, faster.</p>
323
- <li>Email Connectors</li>
324
- <p>Push contacts to MailChimp, Constant Contact, Campaign Monitor, GetResponse and AWeber without replacing any of your forms.</p>
 
 
 
325
  </ul>
326
  </div>
327
  </div>
@@ -331,18 +341,24 @@ class WPLeadInAdmin {
331
  </div>
332
  <div class="content">
333
  <p>All the features you're enjoying now, plus:</p>
334
- <ul class="features plus">
335
- <li>Contact Enrichment</li>
336
- <p>In addition to seeing the pages your contacts have visited, you'll now be able to see publicly available information about your contacts and their businesses. Info like social accounts, job role, and company location all in your contact reports. </p>
 
 
 
337
  </ul>
338
- <?php
339
- echo '<p id="agree-pp-error" style="display: none; border-left: 4px solid #dd3d36; padding-left: 12px; margin-bottom: 25px;">Before you can unlock the awesomeness of Leadin Pro, we need you to agree to our Privacy Policy, because lawyers.</p>';
340
- echo '<label for="agree-pp">';
341
- echo '<input type="checkbox" id="agree-pp" name="agree-pp"/>';
342
- echo 'I agree to Leadin\'s <a href="http://leadin.com/legal/privacy-policy" target="_blank">Privacy Policy</a></label>';
343
 
344
- echo '<a id="pro-upgrade-button" class="big-button--orange">Upgrade to Leadin Pro</a>';
345
- ?>
 
 
 
 
346
  </div>
347
  </div>
348
 
@@ -902,42 +918,42 @@ class WPLeadInAdmin {
902
  $sources_postbox .= '</tr>';
903
  $sources_postbox .= '<tr>';
904
  $sources_postbox .= '<td class="">Direct Traffic</td>';
905
- $sources_postbox .= '<td class="">' . $this->stats_dashboard->direct_count . '</td>';
906
  $sources_postbox .= '<td>';
907
  $sources_postbox .= '<div style="background: #f0f0f0; padding: 0px; height: 20px !important;"><div style="background: #f16b18; height: 100%; width: ' . ( $this->stats_dashboard->max_source ? (($this->stats_dashboard->direct_count/$this->stats_dashboard->max_source)*100) : '0' ) . '%;">&nbsp;</div></div>';
908
  $sources_postbox .= '</td>';
909
  $sources_postbox .= '</tr>';
910
  $sources_postbox .= '<tr>';
911
  $sources_postbox .= '<td class="">Organic Search</td>';
912
- $sources_postbox .= '<td class="">' . $this->stats_dashboard->organic_count . '</td>';
913
  $sources_postbox .= '<td>';
914
  $sources_postbox .= '<div style="background: #f0f0f0; padding: 0px; height: 20px !important;"><div style="background: #f16b18; height: 100%; width: ' . ( $this->stats_dashboard->max_source ? (($this->stats_dashboard->organic_count/$this->stats_dashboard->max_source)*100) : '0' ) . '%;">&nbsp;</div></div>';
915
  $sources_postbox .= '</td>';
916
  $sources_postbox .= '</tr>';
917
  $sources_postbox .= '<tr>';
918
  $sources_postbox .= '<td class="">Referrals</td>';
919
- $sources_postbox .= '<td class="">' . $this->stats_dashboard->referral_count . '</td>';
920
  $sources_postbox .= '<td>';
921
  $sources_postbox .= '<div style="background: #f0f0f0; padding: 0px; height: 20px !important;"><div style="background: #f16b18; height: 100%; width: ' . ( $this->stats_dashboard->max_source ? (($this->stats_dashboard->referral_count/$this->stats_dashboard->max_source)*100) : '0' ) . '%;">&nbsp;</div></div>';
922
  $sources_postbox .= '</td>';
923
  $sources_postbox .= '</tr>';
924
  $sources_postbox .= '<tr>';
925
  $sources_postbox .= '<td class="">Social Media</td>';
926
- $sources_postbox .= '<td class="">' . $this->stats_dashboard->social_count . '</td>';
927
  $sources_postbox .= '<td>';
928
  $sources_postbox .= '<div style="background: #f0f0f0; padding: 0px; height: 20px !important;"><div style="background: #f16b18; height: 100%; width: ' . ( $this->stats_dashboard->max_source ? (($this->stats_dashboard->social_count/$this->stats_dashboard->max_source)*100) : '0' ). '%;">&nbsp;</div></div>';
929
  $sources_postbox .= '</td>';
930
  $sources_postbox .= '</tr>';
931
  $sources_postbox .= '<tr>';
932
  $sources_postbox .= '<td class="">Email Marketing</td>';
933
- $sources_postbox .= '<td class="">' . $this->stats_dashboard->email_count . '</td>';
934
  $sources_postbox .= '<td>';
935
  $sources_postbox .= '<div style="background: #f0f0f0; padding: 0px; height: 20px !important;"><div style="background: #f16b18; height: 100%; width: ' . ( $this->stats_dashboard->max_source ? (($this->stats_dashboard->email_count/$this->stats_dashboard->max_source)*100) : '0' ) . '%;">&nbsp;</div></div>';
936
  $sources_postbox .= '</td>';
937
  $sources_postbox .= '</tr>';
938
  $sources_postbox .= '<tr>';
939
  $sources_postbox .= '<td class="">Paid Search</td>';
940
- $sources_postbox .= '<td class="">' . $this->stats_dashboard->paid_count . '</td>';
941
  $sources_postbox .= '<td>';
942
  $sources_postbox .= '<div style="background: #f0f0f0; padding: 0px; height: 20px !important;"><div style="background: #f16b18; height: 100%; width: ' . ( $this->stats_dashboard->max_source ? (($this->stats_dashboard->paid_count/$this->stats_dashboard->max_source)*100) : '0' ) . '%;">&nbsp;</div></div>';
943
  $sources_postbox .= '</td>';
@@ -1702,7 +1718,7 @@ class WPLeadInAdmin {
1702
  "createdAt" : "<?php echo date('Y-m-d H:i:s'); ?>",
1703
  "website" : "<?php echo $leadin_user['wp_url']; ?>",
1704
  "company" : "<?php echo $leadin_user['wp_url']; ?>",
1705
- "contacts" : "<?php echo $leadin_user['total_contacts']; ?>",
1706
  "utm_source" : "<?php echo $leadin_user['utm_source']; ?>",
1707
  "utm_medium" : "<?php echo $leadin_user['utm_medium']; ?>",
1708
  "utm_term" : "<?php echo $leadin_user['utm_term']; ?>",
@@ -1714,9 +1730,13 @@ class WPLeadInAdmin {
1714
  jQuery(document).ready( function ( $ ) {
1715
  <?php if ( $event_name == 'Loaded Contact List Page' ) : ?>
1716
  var num_tags = jQuery('.icon-tag').length;
1717
- analytics.track(<?php echo "'$event_name', { num_tags: num_tags }"; ?>);
 
 
 
1718
  <?php else : ?>
1719
  analytics.track(<?php echo "'$event_name'"; ?>);
 
1720
  <?php endif; ?>
1721
  });
1722
  }}();
@@ -1746,7 +1766,7 @@ class WPLeadInAdmin {
1746
  <?php if ( leadin_check_first_pageview_data() ) : ?>
1747
  <div class="dialog-bottom-right">
1748
  <h1>Hey, do you like Leadin?</h1>
1749
- <a href="javscript:void(0);" id="close-share" class="close"></a>
1750
  <p>Looks like you've been using Leadin for at least 30 days. Want to help support us by spreading the word?</p>
1751
  <p>We'd love it if you could tell your friends about us or leave us a review on WordPress.org.</p>
1752
  <a class="big-button--share fb" href="https://www.facebook.com/sharer/sharer.php?u=http://leadin.com/facebook-share" target="_blank"></a>
@@ -1777,12 +1797,14 @@ class WPLeadInAdmin {
1777
  function leadin_footer ()
1778
  {
1779
  $li_options = get_option('leadin_options');
 
 
1780
 
1781
  ?>
1782
  <div id="leadin-footer">
1783
  <p class="support">
1784
  <a href="http://leadin.com">Leadin</a> <?php echo LEADIN_PLUGIN_VERSION; ?>
1785
- <span style="padding: 0px 5px;">|</span><a href="http://support.leadin.com" target="_blank">Support Docs</a>
1786
  <span style="padding: 0px 5px;">|</span><a href="http://leadin.com/dev-updates/">Get product &amp; security updates</a>
1787
  <span style="padding: 0px 5px;">|</span><a href="http://wordpress.org/support/view/plugin-reviews/leadin?rate=5#postform">Leave us a review</a>
1788
  </p>
264
 
265
  self::check_admin_action();
266
 
267
+ if ( ini_get('allow_url_fopen') )
268
+ $leadin_icon = ($wp_version < 3.8 && !is_plugin_active('mp6/mp6.php') ? LEADIN_PATH . '/images/leadin-icon-16x16.png' : 'data:image/svg+xml;base64,' . base64_encode(file_get_contents(LEADIN_PATH . '/images/leadin-svg-icon.svg')));
269
+ else
270
+ {
271
+
272
+ $leadin_icon = LEADIN_PATH . '/images/leadin-icon-16x16.png';
273
+ }
274
+
275
  add_menu_page('Leadin', 'Leadin', $capability, 'leadin_stats', array($this, 'leadin_build_stats_page'), $leadin_icon , '25.100713');
276
 
277
  foreach ( $this->admin_power_ups as $power_up )
321
  </div>
322
  <div class="content">
323
  <ul class="features">
324
+ <li>&#10003; Contacts Tracking</li>
325
+ <p>Learn more about your visitors.</p>
326
+
327
+ <li>&#10003; Contacts Analytics</li>
328
+ <p>Find out what content and traffic sources convert the best.</p>
329
+
330
+ <li>&#10003; Popup Form</li>
331
+ <p>Convert more visitors to contacts, faster.</p>
332
+
333
+ <li>&#10003; Email Connectors</li>
334
+ <p>Push contacts to MailChimp, Constant Contact, Campaign Monitor, GetResponse and AWeber without replacing any of your forms.</p>
335
  </ul>
336
  </div>
337
  </div>
341
  </div>
342
  <div class="content">
343
  <p>All the features you're enjoying now, plus:</p>
344
+ <ul class="features">
345
+ <li><b>+</b> Contact Enrichment</li>
346
+ <p>In addition to seeing the pages your contacts have visited, you'll now be able to see publicly available information about your contacts and their businesses. Info like social accounts, job role, and company location all in your contact reports. </p>
347
+
348
+ <li><b>+</b> Improved Email Delivery</li>
349
+ <p>Instead of using your default mail server, we'll route your contact notifications through our email delivery service, ensuring you'll be more likely to actually receive your new contact notifications in your inbox.</p>
350
  </ul>
351
+
352
+ <p id="agree-pp-error" style="display: none; border-left: 4px solid #dd3d36; padding-left: 12px; margin-bottom: 25px;">
353
+ Before you can unlock the awesomeness of Leadin Pro, we need you to agree to our Privacy Policy, because lawyers.
354
+ </p>
 
355
 
356
+ <label for="agree-pp">
357
+ <input type="checkbox" id="agree-pp" name="agree-pp"/>
358
+ I agree to Leadin's <a href="http://leadin.com/legal/privacy-policy" target="_blank">Privacy Policy</a>
359
+ </label>
360
+
361
+ <a id="pro-upgrade-button" class="big-button--orange">Upgrade to Leadin Pro</a>
362
  </div>
363
  </div>
364
 
918
  $sources_postbox .= '</tr>';
919
  $sources_postbox .= '<tr>';
920
  $sources_postbox .= '<td class="">Direct Traffic</td>';
921
+ $sources_postbox .= '<td class="sources-contacts-num">' . $this->stats_dashboard->direct_count . '</td>';
922
  $sources_postbox .= '<td>';
923
  $sources_postbox .= '<div style="background: #f0f0f0; padding: 0px; height: 20px !important;"><div style="background: #f16b18; height: 100%; width: ' . ( $this->stats_dashboard->max_source ? (($this->stats_dashboard->direct_count/$this->stats_dashboard->max_source)*100) : '0' ) . '%;">&nbsp;</div></div>';
924
  $sources_postbox .= '</td>';
925
  $sources_postbox .= '</tr>';
926
  $sources_postbox .= '<tr>';
927
  $sources_postbox .= '<td class="">Organic Search</td>';
928
+ $sources_postbox .= '<td class="sources-contacts-num">' . $this->stats_dashboard->organic_count . '</td>';
929
  $sources_postbox .= '<td>';
930
  $sources_postbox .= '<div style="background: #f0f0f0; padding: 0px; height: 20px !important;"><div style="background: #f16b18; height: 100%; width: ' . ( $this->stats_dashboard->max_source ? (($this->stats_dashboard->organic_count/$this->stats_dashboard->max_source)*100) : '0' ) . '%;">&nbsp;</div></div>';
931
  $sources_postbox .= '</td>';
932
  $sources_postbox .= '</tr>';
933
  $sources_postbox .= '<tr>';
934
  $sources_postbox .= '<td class="">Referrals</td>';
935
+ $sources_postbox .= '<td class="sources-contacts-num">' . $this->stats_dashboard->referral_count . '</td>';
936
  $sources_postbox .= '<td>';
937
  $sources_postbox .= '<div style="background: #f0f0f0; padding: 0px; height: 20px !important;"><div style="background: #f16b18; height: 100%; width: ' . ( $this->stats_dashboard->max_source ? (($this->stats_dashboard->referral_count/$this->stats_dashboard->max_source)*100) : '0' ) . '%;">&nbsp;</div></div>';
938
  $sources_postbox .= '</td>';
939
  $sources_postbox .= '</tr>';
940
  $sources_postbox .= '<tr>';
941
  $sources_postbox .= '<td class="">Social Media</td>';
942
+ $sources_postbox .= '<td class="sources-contacts-num">' . $this->stats_dashboard->social_count . '</td>';
943
  $sources_postbox .= '<td>';
944
  $sources_postbox .= '<div style="background: #f0f0f0; padding: 0px; height: 20px !important;"><div style="background: #f16b18; height: 100%; width: ' . ( $this->stats_dashboard->max_source ? (($this->stats_dashboard->social_count/$this->stats_dashboard->max_source)*100) : '0' ). '%;">&nbsp;</div></div>';
945
  $sources_postbox .= '</td>';
946
  $sources_postbox .= '</tr>';
947
  $sources_postbox .= '<tr>';
948
  $sources_postbox .= '<td class="">Email Marketing</td>';
949
+ $sources_postbox .= '<td class="sources-contacts-num">' . $this->stats_dashboard->email_count . '</td>';
950
  $sources_postbox .= '<td>';
951
  $sources_postbox .= '<div style="background: #f0f0f0; padding: 0px; height: 20px !important;"><div style="background: #f16b18; height: 100%; width: ' . ( $this->stats_dashboard->max_source ? (($this->stats_dashboard->email_count/$this->stats_dashboard->max_source)*100) : '0' ) . '%;">&nbsp;</div></div>';
952
  $sources_postbox .= '</td>';
953
  $sources_postbox .= '</tr>';
954
  $sources_postbox .= '<tr>';
955
  $sources_postbox .= '<td class="">Paid Search</td>';
956
+ $sources_postbox .= '<td class="sources-contacts-num">' . $this->stats_dashboard->paid_count . '</td>';
957
  $sources_postbox .= '<td>';
958
  $sources_postbox .= '<div style="background: #f0f0f0; padding: 0px; height: 20px !important;"><div style="background: #f16b18; height: 100%; width: ' . ( $this->stats_dashboard->max_source ? (($this->stats_dashboard->paid_count/$this->stats_dashboard->max_source)*100) : '0' ) . '%;">&nbsp;</div></div>';
959
  $sources_postbox .= '</td>';
1718
  "createdAt" : "<?php echo date('Y-m-d H:i:s'); ?>",
1719
  "website" : "<?php echo $leadin_user['wp_url']; ?>",
1720
  "company" : "<?php echo $leadin_user['wp_url']; ?>",
1721
+ "contacts" : <?php echo $leadin_user['total_contacts']; ?>,
1722
  "utm_source" : "<?php echo $leadin_user['utm_source']; ?>",
1723
  "utm_medium" : "<?php echo $leadin_user['utm_medium']; ?>",
1724
  "utm_term" : "<?php echo $leadin_user['utm_term']; ?>",
1730
  jQuery(document).ready( function ( $ ) {
1731
  <?php if ( $event_name == 'Loaded Contact List Page' ) : ?>
1732
  var num_tags = jQuery('.icon-tag').length;
1733
+ analytics.track(<?php echo "'$event_name'"; ?>, {
1734
+ num_tags: num_tags
1735
+ });
1736
+ analytics.page('');
1737
  <?php else : ?>
1738
  analytics.track(<?php echo "'$event_name'"; ?>);
1739
+ analytics.page('');
1740
  <?php endif; ?>
1741
  });
1742
  }}();
1766
  <?php if ( leadin_check_first_pageview_data() ) : ?>
1767
  <div class="dialog-bottom-right">
1768
  <h1>Hey, do you like Leadin?</h1>
1769
+ <a href="javscript:void(0);" id="close-share" class="close">&#10006;</a>
1770
  <p>Looks like you've been using Leadin for at least 30 days. Want to help support us by spreading the word?</p>
1771
  <p>We'd love it if you could tell your friends about us or leave us a review on WordPress.org.</p>
1772
  <a class="big-button--share fb" href="https://www.facebook.com/sharer/sharer.php?u=http://leadin.com/facebook-share" target="_blank"></a>
1797
  function leadin_footer ()
1798
  {
1799
  $li_options = get_option('leadin_options');
1800
+ global $wp_version;
1801
+
1802
 
1803
  ?>
1804
  <div id="leadin-footer">
1805
  <p class="support">
1806
  <a href="http://leadin.com">Leadin</a> <?php echo LEADIN_PLUGIN_VERSION; ?>
1807
+ <span style="padding: 0px 5px;">|</span><a href="<?php echo 'http://support.leadin.com?leadin_version=' . LEADIN_PLUGIN_VERSION . '&wp_version=' . $wp_version ?>" target="_blank">Support Docs</a>
1808
  <span style="padding: 0px 5px;">|</span><a href="http://leadin.com/dev-updates/">Get product &amp; security updates</a>
1809
  <span style="padding: 0px 5px;">|</span><a href="http://wordpress.org/support/view/plugin-reviews/leadin?rate=5#postform">Leave us a review</a>
1810
  </p>
assets/css/build/leadin-admin.css CHANGED
@@ -1 +1 @@
1
- #leadin label{cursor:default}#leadin .col-wrap{padding:0}#leadin .col-left .col-wrap{padding-right:10px}#leadin .metabox-holder{*zoom:1}#leadin .metabox-holder:after{content:"";display:table;clear:both}#wp-admin-bar-leadin-admin-menu img{height:16px;width:16px;opacity:0.6}@media (min-width: 1200px){#leadin{*zoom:1;max-width:1420px;max-width:88.75rem;padding-left:20px;padding-left:1.25rem;padding-right:20px;padding-right:1.25rem;margin-left:auto;margin-right:auto;margin:10px 20px 0 0;padding:0}#leadin:after{content:"";display:table;clear:both}#leadin *{box-sizing:border-box}}#li_analytics-meta .li-analytics-link{float:left}#li_analytics-meta .li-analytics-link .li-analytics__face{height:35px;width:35px;margin-right:5px;margin-bottom:5px}#li_analytics-meta .hidden_face{display:none}#li_analytics-meta .show-all-faces-container{clear:both}.leadin-postbox,.powerup-list .powerup{background-color:#fff;border:1px solid #e5e5e5;-moz-box-shadow:0 1px 1px rgba(0,0,0,0.04);-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.04);box-shadow:0 1px 1px rgba(0,0,0,0.04)}.leadin-postbox__header{margin:0;padding:8px 12px;font-size:14px;border-bottom:1px solid #eee}.leadin-postbox__content{margin:11px 0;padding:0 12px;*zoom:1}.leadin-postbox__content:after{content:"";display:table;clear:both}.leadin-postbox__table{margin:0;width:100%}.leadin-postbox__table th{padding:6px 0;text-align:left;text-transform:uppercase;letter-spacing:0.05em}.leadin-postbox__table td{padding:6px 0}.leadin-postbox__table tr,.leadin-postbox__table td,.leadin-postbox__table th{vertical-align:middle !important}.leadin-dynamic-avatar_0{background-color:#F88E4B}.leadin-dynamic-avatar_1{background-color:#64AADA}.leadin-dynamic-avatar_2{background-color:#64C2B6}.leadin-dynamic-avatar_3{background-color:#CF7BAA}.leadin-dynamic-avatar_4{background-color:#E7C24B}.leadin-dynamic-avatar_5{background-color:#9387DA}.leadin-dynamic-avatar_6{background-color:#D6DD99}.leadin-dynamic-avatar_7{background-color:#FF4C4C}.leadin-dynamic-avatar_8{background-color:#99583D}.leadin-dynamic-avatar_9{background-color:#54CC14}@font-face{font-family:"icomoon";src:url("../../fonts/icomoon.eot?-lejfm6");src:url("../../fonts/icomoon.eot?#iefix-lejfm6") format("embedded-opentype"),url("../../fonts/icomoon.woff?-lejfm6") format("woff"),url("../../fonts/icomoon.ttf?-lejfm6") format("truetype"),url("../../fonts/icomoon.svg?-lejfm6#icomoon") format("svg");font-weight:normal;font-style:normal}.icon,.icon-profile,.icon-tag,.icon-tags,.icon-envelope,.icon-user,.icon-cog,.icon-bars,.icon-lab,.icon-bulb,.icon-mover{font-family:"icomoon";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-profile:before{content:""}.icon-tag:before{content:""}.icon-tags:before{content:""}.icon-envelope:before{content:""}.icon-user:before{content:""}.icon-cog:before{content:""}.icon-bars:before{content:""}.icon-lab:before{content:""}.icon-bulb:before{content:""}.icon-mover:before{content:""}#leadin-footer{*zoom:1;clear:both;margin-top:48px;color:#999;border-top:1px solid #dedede}#leadin-footer:after{content:"";display:table;clear:both}#leadin-footer .support .sharing{height:18px;text-align:left}@media screen and (min-width: 500px){#leadin-footer .support,#leadin-footer .version,#leadin-footer .sharing{width:50%;float:left}#leadin-footer .sharing{text-align:right}}.button-big{padding:6px 36px !important;font-size:14px !important;height:auto !important}.oboarding-steps-names{*zoom:1;margin:0}.oboarding-steps-names:after{content:"";display:table;clear:both}.oboarding-step-name{float:left;margin:0;padding-bottom:24px;list-style:decimal inside none;font-size:18px;color:#bbb}.oboarding-step-name.active{color:#1F7D71;background-image:url(../../../images/triangle.png);background-position:bottom center;background-repeat:no-repeat}.oboarding-step-name.completed{list-style-image:url(../../../images/checkmark.png)}.oboarding-step-name+.oboarding-step-name{margin-left:72px}.oboarding-steps{margin:18px 0}@media (min-width: 1200px){.oboarding-steps{width:66.19718%;float:left;margin-right:1.40845%}}.oboarding-step-content{margin:0 auto;max-width:500px}.oboarding-step-content .description{margin:12px 0;display:block;display:none}.oboarding-step{text-align:center;display:block;padding:36px;background-color:#D3EEEB;border:2px solid #2a9;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;color:#1F7D71}.oboarding-step .form-table th{display:none}.oboarding-step .form-table td{width:auto;display:block}.oboarding-step .form-table input{width:100%;font-size:16px;line-height:1.5;padding:7px 10px;display:block}.oboarding-step .oboarding-step-title,.oboarding-step .oboarding-step-description{color:#1F7D71;padding:0;margin-bottom:36px}.oboarding-step .button-primary{margin-top:36px}.oboarding-step .oboarding-step-description{font-size:16px;text-align:left}.oboarding-step .popup-option{width:31%;float:left;text-align:left;cursor:pointer !important}.oboarding-step .popup-option img{max-width:100%;margin-top:6px;-moz-box-shadow:0 1px 2px rgba(0,0,0,0.15);-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.15);box-shadow:0 1px 2px rgba(0,0,0,0.15);-moz-border-radius:6px;-webkit-border-radius:6px;border-radius:6px}.oboarding-step .popup-option:hover img{-moz-box-shadow:0 2px 4px rgba(0,0,0,0.25);-webkit-box-shadow:0 2px 4px rgba(0,0,0,0.25);box-shadow:0 2px 4px rgba(0,0,0,0.25)}.oboarding-step .popup-option input{margin-right:8px !important}.oboarding-step .popup-option input:checked ~ img{border:2px solid #2ea2cc}.oboarding-step .popup-option+.popup-option{margin-left:3%}.oboarding-step .popup-options{*zoom:1}.oboarding-step .popup-options:after{content:"";display:table;clear:both}.oboarding-steps-help{margin-top:24px;color:#999}@media (min-width: 1200px){.oboarding-steps-help{width:15.49296%;float:left;margin-right:1.40845%;margin-top:60px}}@media (min-width: 1200px){.leadin-settings__content{width:74.64789%;float:left;margin-right:1.40845%}.leadin-settings__sidebar{width:23.94366%;float:right;margin-right:0}}.li-settings h3{border-left:1px solid #e5e5e5;border-right:1px solid #e5e5e5;border-top:1px solid #e5e5e5;border-bottom:1px solid #e5e5e5;margin-bottom:0px;background:#fff;padding:8px 12px;font-size:15px}.li-settings .form-table{margin-top:0px;border-left:1px solid #e5e5e5;border-right:1px solid #e5e5e5;border-bottom:1px solid #e5e5e5;background-color:#fff;-moz-box-shadow:0 1px 1px rgba(0,0,0,0.04);-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.04);box-shadow:0 1px 1px rgba(0,0,0,0.04)}.li-settings .form-table th{padding-left:12px}.li-settings .leadin-section{background-color:#fff;border-left:1px solid #e5e5e5;border-right:1px solid #e5e5e5;font-size:14px;padding:15px 12px 5px 12px}.li-settings .leadin-section p{margin:0;padding:0}.li-settings.pre-mp6 h3{font-family:Georgia}.li-settings.pre-mp6 select,.li-settings.pre-mp6 input{font-family:sans-serif;font-size:12px}.li-settings.pre-mp6 .form-table,.li-settings.pre-mp6 .leadin-section,.li-settings.pre-mp6 h3{background-color:#f9f9f9 !important}.li-settings.pre-mp6 .form-table{-moz-border-radius-bottomleft:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-moz-border-radius-bottomright:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}.li-settings.pre-mp6 h3{background-color:#f9f9f9 !important;-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-topright:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px}.li-settings.pre-mp6 .leadin-section{font-size:12px;padding-left:6px}.li-settings.pre-mp6 h3{padding-left:6px;font-weight:normal;color:#464646;text-shadow:#fff 0px 1px 0px}.li-settings.pre-mp6 label{font-size:12px}.li-settings.pre-mp6 input[type="checkbox"],.li-settings.pre-mp6 input[type="radio"]{margin-right:2px}#icon-leadin{background:url("../../images/leadin-icon-32x32.png") top center no-repeat}.help-notification{background:#d9edf7;border:1px solid #bce8f1;padding:10px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.toplevel_page_leadin_stats .wp-menu-image img{width:16px;height:16px}.leadin-contact-avatar{margin-right:10px;float:left}.power-up-settings-icon{padding-right:10px;float:left;max-height:20px;margin-top:-1px}.dashicons{margin-right:10px;float:left;margin-top:-1px}tr.synced-list-row td.synced-list-cell{padding:3px 0px 10px 0px}tr.synced-list-row td.synced-list-cell .icon-tag{font-size:12px}tr.synced-list-row span.synced-list-arrow{padding:0px 10px}tr.synced-list-row td.synced-list-edit{padding:3px 0px 10px 20px}.leadin-settings__sidebar .pro-upgrade-cta{max-width:100%}.leadin-contacts .button{transition:background-color 0.2s}@media (min-width: 1200px){.leadin-contacts__nav{width:15.49296%;float:left;margin-right:1.40845%;margin-top:30px}.leadin-contacts__content{width:83.09859%;float:right;margin-right:0;margin-bottom:18px;margin-top:30px}.leadin-contacts__export-form{width:83.09859%;float:left;margin-right:1.40845%;padding-left:16.90141%;margin-bottom:18px}}.leadin-contacts__search{float:right;padding:10px 0;padding-bottom:9px}.leadin-contacts__type-picker{margin:0 0 30px;*zoom:1}.leadin-contacts__type-picker:after{content:"";display:table;clear:both}.leadin-contacts__type-picker li{margin:0;padding:0 1em 0 0;float:left}@media (min-width: 1200px){.leadin-contacts__type-picker li{float:none;padding:0}.leadin-contacts__type-picker li+li{padding:18px 0 0}}.leadin-contacts__type-picker li a{display:block;line-height:24px;font-weight:400;font-size:16px;text-decoration:none}.leadin-contacts__type-picker li a.current{font-weight:bold}.leadin-contacts__type-picker li a.current,.leadin-contacts__type-picker li a:hover,.leadin-contacts__type-picker li a:active{color:#F67D42}.leadin-contacts__type-picker li a .icon-tag,.leadin-contacts__type-picker li a .icon-user{padding-right:1em;font-size:0.85em}.leadin-contacts__tags-header{margin:30px 0 18px;font-size:14px;text-transform:uppercase;letter-spacing:0.1em;color:#999}.leadin-contacts__filter-text{margin:0 0 18px}.leadin-contacts__filter-count{color:#F67D42}#clear-filter{font-size:0.8em;margin-left:10px}.leadin-contacts__table table th#source{width:20%}.leadin-contacts__table table th#visits,.leadin-contacts__table table th#submissions{width:8%}.leadin-contacts__table table th#status,.leadin-contacts__table table th#last_visit,.leadin-contacts__table table th#date,.leadin-contacts__table table th#pageviews{width:10%}.leadin-contacts__table table th,.leadin-contacts__table table td{display:none}.leadin-contacts__table table th:nth-child(-n+3),.leadin-contacts__table table td:nth-child(-n+3){display:table-cell}@media (min-width: 1200px){.leadin-contacts__table table th,.leadin-contacts__table table td{display:table-cell}}.leadin-contacts.pre-mp6 .table_search{float:right;padding:12px 0;padding-bottom:11px}.leadin-contacts.pre-mp6 table{background-color:#fff;border-color:#dedede}.leadin-contacts.pre-mp6 table tr.alternate{background-color:#fff}.leadin-contacts.pre-mp6 table th,.leadin-contacts.pre-mp6 table td{border-top:0;padding:12px 6px 11px}.leadin-contacts.pre-mp6 table th a,.leadin-contacts.pre-mp6 table td a{padding:0}.leadin-contacts.pre-mp6 table th[scope="col"]{background:#eee;font-family:sans-serif;font-size:12px;text-shadow:none}.leadin-contacts.pre-mp6 table td{border-color:#dedede;line-height:18px;font-size:14px}.leadin-contacts.pre-mp6 table td .row-actions{float:left}#leadin .contact-header-wrap{*zoom:1;padding:18px 0 24px}#leadin .contact-header-wrap:after{content:"";display:table;clear:both}#leadin .contact-header-wrap .contact-header-avatar,#leadin .contact-header-wrap .contact-header-info{float:left}#leadin .contact-header-info{padding-left:15px}#leadin .contact-name{line-height:30px;padding:0;margin:0}#leadin .contact-tags{margin-top:15px}#leadin .contact-tag{padding:4px 10px;color:#fff;background-color:#F67D42;text-decoration:none;font-weight:600;text-transform:uppercase;letter-spacing:0.1em;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}#leadin .contact-tag:hover{opacity:0.9}#leadin .contact-tag+.contact-tag,#leadin .contact-tag+.contact-edit-tags{margin-left:10px}#leadin .contact-tag .icon-tag{padding-right:10px}#leadin .contact-info h3{margin:0}#leadin .contact-info label{font-weight:bold;line-height:1;cursor:default}#leadin .leadin-meta-section+.leadin-meta-section{margin-top:24px}#leadin .leadin-meta-table{width:100%;text-align:left}#leadin .leadin-meta-table th{color:#666;padding-bottom:6px}#leadin .leain-meta-header,#leadin .contact-history .session-date{margin:0 0 12px;text-transform:uppercase;letter-spacing:0.05em;color:#444}#leadin .leadin-premium-tag:after{content:"Pro";margin-left:10px;font-size:10px;color:#fff;background-color:#93C054;padding:2px 6px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}#leadin .contact-history{margin-left:20px}@media (min-width: 1200px){#leadin .contact-history{padding-left:20px;border-left:2px solid #dedede}}#leadin .contact-history .sessions{margin:0}#leadin .contact-history .session+.session{margin-top:30px}#leadin .contact-history .session-date{position:relative}@media (min-width: 1200px){#leadin .contact-history .session-date:before{content:"•";font-size:32px;line-height:0;height:31px;width:31px;position:absolute;left:-27px;top:9px;color:#dedede}}#leadin .contact-history .session-time-range{color:#999;font-weight:400}#leadin .contact-history .events{background-color:#fff;border:1px solid #dedede;-moz-box-shadow:0 1px 1px rgba(0,0,0,0.04);-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.04);box-shadow:0 1px 1px rgba(0,0,0,0.04)}#leadin .contact-history .event{margin:0;padding:10px 20px;border-bottom:1px solid #dedede;border-left:4px solid;*zoom:1}#leadin .contact-history .event:after{content:"";display:table;clear:both}#leadin .contact-history .event:first-child{border-top:0}#leadin .contact-history .event.pageview{border-left-color:#28c;color:#28c}#leadin .contact-history .event.form-submission{border-left-color:#F67D42;color:#F67D42}#leadin .contact-history .event.source{border-left-color:#99AA1F;color:#99AA1F}#leadin .contact-history .event-title{margin:0;font-size:13px;font-weight:600}#leadin .contact-history .event-time{float:left;font-weight:400;width:75px}#leadin .contact-history .event-content{margin-left:75px}#leadin .contact-history .event-detail{margin-top:20px;color:#444}#leadin .contact-history .event-detail li+li{padding-top:6px;border-top:1px solid #eee}#leadin .contact-history .event-detail.pageview-url{color:#ccc}#leadin .contact-history .visit-source p{margin:0;color:#1F6696}#leadin .contact-history .field-label{text-transform:uppercase;letter-spacing:0.05em;color:#999;margin-bottom:6px;font-size:0.9em}#leadin .contact-history .field-value{margin:0}#leadin.pre-mp6 .events{background-color:#f9f9f9}.powerup-list{margin:0}.powerup-list .powerup{width:20%;min-width:250px;float:left;margin:20px;padding:15px}.powerup-list .powerup h2,.powerup-list .powerup p{margin:0;padding:0;color:#666;margin-bottom:15px}.powerup-list .powerup .img-containter{text-align:center;padding:30px 15px;margin-bottom:15px;background-color:#f1f1f1;color:red}.powerup-list .powerup .img-containter h2{font-size:20px}.powerup-list .powerup.activated h2,.powerup-list .powerup.activated p{color:#1F7D71}.powerup-list .powerup.activated .img-containter{background-color:#D3EEEB}@media (min-width: 1200px){.leadin-stats__top-container,.leadin-stats__chart-container,.leadin-stats__big-numbers-container{width:100%;float:right;margin-right:0}.leadin-stats__postbox_containter{width:49.29577%;float:left;margin-right:1.40845%}.leadin-stats__postbox_containter:nth-child(2n+2){width:49.29577%;float:right;margin-right:0}}h2.leadin-stats__header{margin-bottom:12px}.leadin-stats__postbox_containter .leadin-postbox,.leadin-stats__postbox_containter .powerup-list .powerup,.powerup-list .leadin-stats__postbox_containter .powerup{margin-bottom:12px}.leadin-stats__big-number{text-align:center;width:42%;float:left;padding:4%}@media (min-width: 1200px){.leadin-stats__big-number{width:25%;padding:10px}}.big-number--average .leadin-stats__big-number-top-label,.big-number--average .leadin-stats__big-number-content,.big-number--average .leadin-stats__big-number-bottom-label{color:#4CA6CF}.leadin-stats__top-container,.leadin-stats__big-number-top-label,.leadin-stats__big-number-content,.leadin-stats__big-number-bottom-label{color:#666;margin-bottom:12px}.leadin-stats__big-number-top-label{text-transform:uppercase;letter-spacing:0.05em}.big-button,.big-button--orange,.big-button--share{display:block;text-align:center;color:#fff;text-decoration:none;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:10px;font-size:16px;margin-top:15px}.big-button:hover,.big-button--orange:hover,.big-button--share:hover,.big-button:active,.big-button--orange:active,.big-button--share:active,.big-button:focus,.big-button--orange:focus,.big-button--share:focus,.big-button:visited,.big-button--orange:visited,.big-button--share:visited{color:#fff}.big-button--orange{background-color:#F67D42;border:1px solid #E75913;-webkit-box-shadow:inset 0 1px 0 rgba(255,195,166,0.5),0 1px 0 rgba(0,0,0,0.08);box-shadow:inset 0 1px 0 rgba(255,195,166,0.5),0 1px 0 rgba(0,0,0,0.08)}.big-button--orange:hover{color:#fff;background-color:#f56c2a}.big-button--orange:active{color:#f1f1f1;background-color:#f45c11;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.btn-submitting{background-color:#979797;cursor:not-allowed;border-color:grey;box-shadow:none}.btn-submitting:hover,.btn-submitting:active,.btn-submitting:focus,.btn-submitting:visited{background-color:#979797;color:#fff;box-shadow:none}.compare{width:100%;float:left;margin-right:1.40845%;display:inline;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-color:#fff;position:relative;margin-bottom:20px}.compare:first-of-type{margin-bottom:60px}.compare:first-of-type:after{width:100%;float:left;margin-right:1.40845%;display:inline;content:"";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 48px/1 "dashicons";position:absolute;bottom:-55px;text-align:center}@media (min-width: 1200px){.compare:first-of-type:after{width:7.04225%;float:left;margin-right:1.40845%;content:"";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 48px/1 "dashicons";position:absolute;right:-40px;top:4em}}@media (min-width: 1200px){.compare{width:32.39437%;float:left;margin-right:1.40845%;margin-right:60px}}.compare .title{width:100%;height:72px;background-color:#979797;position:absolute;text-align:center;padding-top:15px;-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-topright:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px}.compare .title h2{color:#fff;font-size:20px}.compare .title.teal{background-color:#6EC8C7}.compare .content{margin-top:50px;padding:30px}.compare .features{text-transform:uppercase;font-weight:bold;font-size:18px;padding-left:15px}.compare .features li{list-style-position:outside;text-indent:-10px}.compare .features li:before{content:"";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 20px/1 "dashicons";vertical-align:top}.compare .features.plus li:before{content:"";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 20px/1.1 "dashicons";vertical-align:top}.compare .features p{margin-left:2px;margin-top:-5px}.compare p{text-transform:none;font-weight:normal;line-height:27px}*{box-sizing:border-box}.big-button--share{display:inline-block;margin-right:2px;width:82px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.5),0 1px 0 rgba(0,0,0,0.08);box-shadow:inset 0 1px 0 rgba(255,255,255,0.5),0 1px 0 rgba(0,0,0,0.08)}@media (min-width: 1200px){.big-button--share{margin-right:7px;width:200px}}.big-button--share.fb{background-color:#3B579D;border:1px solid #344d8a}.big-button--share.fb:after{content:""}@media (min-width: 1200px){.big-button--share.fb:after{content:"Share on Facebook"}}.big-button--share.fb:hover{background-color:#4261b0}.big-button--share.fb:before{content:"";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 20px/1.4 "dashicons";vertical-align:top;margin-right:5px}.big-button--share.tw{background-color:#1DB1EB;border:1px solid #13a3db}.big-button--share.tw:after{content:""}@media (min-width: 1200px){.big-button--share.tw:after{content:"Share on Twitter"}}.big-button--share.tw:hover{background-color:#34b9ed}.big-button--share.tw:before{content:"";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 20px/1.4 "dashicons";vertical-align:top;margin-right:5px}.big-button--share.wp{background-color:#1585B6;border:1px solid #12749f}.big-button--share.wp:after{content:""}@media (min-width: 1200px){.big-button--share.wp:after{content:"Write a Review"}}.big-button--share.wp:hover{background-color:#1896cd}.big-button--share.wp:before{content:"";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 20px/1.4 "dashicons";vertical-align:top;margin-right:5px}.dialog-bottom-right{line-height:28px;background-color:#6EC8C7;color:#fff;position:fixed;z-index:1111;right:0;bottom:-400px;-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;width:300px;padding:20px;-moz-box-shadow:grey -1px 0 7px;-webkit-box-shadow:grey -1px 0 7px;box-shadow:grey -1px 0 7px}@media (min-width: 1200px){.dialog-bottom-right{width:668px}}.dialog-bottom-right h1{color:#1B6F6C;font-size:20px;font-weight:600;margin:0px}.dialog-bottom-right p{color:#fff;font-size:14px}.close:before{content:"";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 24px/1.4 "dashicons";vertical-align:top;float:right;margin-top:-30px;color:grey}
1
+ #leadin label{cursor:default}#leadin .col-wrap{padding:0}#leadin .col-left .col-wrap{padding-right:10px}#leadin .metabox-holder{*zoom:1}#leadin .metabox-holder:after{content:"";display:table;clear:both}#wp-admin-bar-leadin-admin-menu img{height:16px;width:16px;opacity:0.6}@media (min-width: 1200px){#leadin{*zoom:1;max-width:1420px;max-width:88.75rem;padding-left:20px;padding-left:1.25rem;padding-right:20px;padding-right:1.25rem;margin-left:auto;margin-right:auto;margin:10px 20px 0 0;padding:0}#leadin:after{content:"";display:table;clear:both}#leadin *{box-sizing:border-box}}#li_analytics-meta .li-analytics-link{float:left}#li_analytics-meta .li-analytics-link .li-analytics__face{height:35px;width:35px;margin-right:5px;margin-bottom:5px}#li_analytics-meta .hidden_face{display:none}#li_analytics-meta .show-all-faces-container{clear:both}.leadin-postbox,#leadin .leadin-meta-section,.powerup-list .powerup{background-color:#fff;border:1px solid #e5e5e5;-moz-box-shadow:0 1px 1px rgba(0,0,0,0.04);-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.04);box-shadow:0 1px 1px rgba(0,0,0,0.04)}.leadin-postbox__header,#leadin .leain-meta-header{margin:0;padding:18px 18px 0;font-size:13px;text-transform:uppercase;letter-spacing:0.05em;color:#444}.leadin-postbox__content{padding:18px;*zoom:1}.leadin-postbox__content:after{content:"";display:table;clear:both}.leadin-postbox__table{margin:0;width:100%}.leadin-postbox__table th{padding:6px 0;text-align:left;text-transform:uppercase;letter-spacing:0.05em;color:#999;font-weight:400;font-size:12px}.leadin-postbox__table td{padding:6px 0}.leadin-postbox__table td.sources-contacts-num{text-align:right;padding-right:20px}.leadin-postbox__table tr,.leadin-postbox__table td,.leadin-postbox__table th{vertical-align:middle !important}.leadin-dynamic-avatar_0{background-color:#F88E4B}.leadin-dynamic-avatar_1{background-color:#64AADA}.leadin-dynamic-avatar_2{background-color:#64C2B6}.leadin-dynamic-avatar_3{background-color:#CF7BAA}.leadin-dynamic-avatar_4{background-color:#E7C24B}.leadin-dynamic-avatar_5{background-color:#9387DA}.leadin-dynamic-avatar_6{background-color:#D6DD99}.leadin-dynamic-avatar_7{background-color:#FF4C4C}.leadin-dynamic-avatar_8{background-color:#99583D}.leadin-dynamic-avatar_9{background-color:#54CC14}@font-face{font-family:"icomoon";src:url("../../fonts/icomoon.eot?-lejfm6");src:url("../../fonts/icomoon.eot?#iefix-lejfm6") format("embedded-opentype"),url("../../fonts/icomoon.woff?-lejfm6") format("woff"),url("../../fonts/icomoon.ttf?-lejfm6") format("truetype"),url("../../fonts/icomoon.svg?-lejfm6#icomoon") format("svg");font-weight:normal;font-style:normal}.icon,.icon-profile,.icon-tag,.icon-tags,.icon-envelope,.icon-envelope-alt,.icon-email,.icon-user,.icon-cog,.icon-bars,.icon-lab,.icon-bulb,.icon-mover,.icon-leadin-logo,.icon-facebook,.icon-twitter,.icon-wordpress,.icon-linkedin,.icon-google-plus{font-family:"icomoon";speak:none;font-style:normal;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-leadin-logo:before{content:""}.icon-profile:before{content:""}.icon-tag:before{content:""}.icon-email:before{content:""}.icon-user:before{content:""}.icon-cog:before{content:""}.icon-bars:before{content:""}.icon-lab:before{content:""}.icon-bulb:before{content:""}.icon-tags:before{content:""}.icon-mover:before{content:""}.icon-twitter:before{content:""}.icon-linkedin:before{content:""}.icon-facebook:before{content:""}.icon-wordpress:before{content:""}.icon-google-plus:before{content:""}.icon-envelope-alt:before{content:""}.icon-envelope:before{content:""}#leadin-footer{*zoom:1;clear:both;margin-top:48px;color:#999;border-top:1px solid #dedede}#leadin-footer:after{content:"";display:table;clear:both}#leadin-footer .support .sharing{height:18px;text-align:left}@media screen and (min-width: 500px){#leadin-footer .support,#leadin-footer .version,#leadin-footer .sharing{width:50%;float:left}#leadin-footer .sharing{text-align:right}}.button-big{padding:6px 36px !important;font-size:14px !important;height:auto !important}.oboarding-steps-names{*zoom:1;margin:0}.oboarding-steps-names:after{content:"";display:table;clear:both}.oboarding-step-name{float:left;margin:0;padding-bottom:24px;list-style:decimal inside none;font-size:18px;color:#bbb}.oboarding-step-name.active{color:#1F7D71;background-image:url(../../../images/triangle.png);background-position:bottom center;background-repeat:no-repeat}.oboarding-step-name.completed{list-style-image:url(../../../images/checkmark.png)}.oboarding-step-name+.oboarding-step-name{margin-left:72px}.oboarding-steps{margin:18px 0}@media (min-width: 1200px){.oboarding-steps{width:66.19718%;float:left;margin-right:1.40845%}}.oboarding-step-content{margin:0 auto;max-width:500px}.oboarding-step-content .description{margin:12px 0;display:block;display:none}.oboarding-step{text-align:center;display:block;padding:36px;background-color:#D3EEEB;border:2px solid #2a9;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;color:#1F7D71}.oboarding-step .form-table th{display:none}.oboarding-step .form-table td{width:auto;display:block}.oboarding-step .form-table input{width:100%;font-size:16px;line-height:1.5;padding:7px 10px;display:block}.oboarding-step .oboarding-step-title,.oboarding-step .oboarding-step-description{color:#1F7D71;padding:0;margin-bottom:36px}.oboarding-step .button-primary{margin-top:36px}.oboarding-step .oboarding-step-description{font-size:16px;text-align:left}.oboarding-step .popup-option{width:31%;float:left;text-align:left;cursor:pointer !important}.oboarding-step .popup-option img{max-width:100%;margin-top:6px;-moz-box-shadow:0 1px 2px rgba(0,0,0,0.15);-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.15);box-shadow:0 1px 2px rgba(0,0,0,0.15);-moz-border-radius:6px;-webkit-border-radius:6px;border-radius:6px}.oboarding-step .popup-option:hover img{-moz-box-shadow:0 2px 4px rgba(0,0,0,0.25);-webkit-box-shadow:0 2px 4px rgba(0,0,0,0.25);box-shadow:0 2px 4px rgba(0,0,0,0.25)}.oboarding-step .popup-option input{margin-right:8px !important}.oboarding-step .popup-option input:checked ~ img{border:2px solid #2ea2cc}.oboarding-step .popup-option+.popup-option{margin-left:3%}.oboarding-step .popup-options{*zoom:1}.oboarding-step .popup-options:after{content:"";display:table;clear:both}.oboarding-steps-help{margin-top:24px;color:#999}@media (min-width: 1200px){.oboarding-steps-help{width:15.49296%;float:left;margin-right:1.40845%;margin-top:60px}}@media (min-width: 1200px){.leadin-settings__content{width:74.64789%;float:left;margin-right:1.40845%}.leadin-settings__sidebar{width:23.94366%;float:right;margin-right:0}}.li-settings h3{border-left:1px solid #e5e5e5;border-right:1px solid #e5e5e5;border-top:1px solid #e5e5e5;border-bottom:1px solid #e5e5e5;margin-bottom:0px;background:#fff;padding:8px 12px;font-size:15px}.li-settings .form-table{margin-top:0px;border-left:1px solid #e5e5e5;border-right:1px solid #e5e5e5;border-bottom:1px solid #e5e5e5;background-color:#fff;-moz-box-shadow:0 1px 1px rgba(0,0,0,0.04);-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.04);box-shadow:0 1px 1px rgba(0,0,0,0.04)}.li-settings .form-table th{padding-left:12px}.li-settings .leadin-section{background-color:#fff;border-left:1px solid #e5e5e5;border-right:1px solid #e5e5e5;font-size:14px;padding:15px 12px 5px 12px}.li-settings .leadin-section p{margin:0;padding:0}.li-settings .power-up-settings-icon{padding-right:10px;float:left;max-height:20px;margin-top:-1px}.li-settings .dashicons{margin-right:10px;float:left;margin-top:-1px}.li-settings tr.synced-list-row td.synced-list-cell{padding:3px 0px 10px 0px}.li-settings tr.synced-list-row td.synced-list-cell .icon-tag{font-size:12px}.li-settings tr.synced-list-row span.synced-list-arrow{padding:0px 10px}.li-settings tr.synced-list-row td.synced-list-edit{padding:3px 0px 10px 20px}.li-settings.pre-mp6 h3{font-family:Georgia}.li-settings.pre-mp6 select,.li-settings.pre-mp6 input{font-family:sans-serif;font-size:12px}.li-settings.pre-mp6 .form-table,.li-settings.pre-mp6 .leadin-section,.li-settings.pre-mp6 h3{background-color:#f9f9f9 !important}.li-settings.pre-mp6 .form-table{-moz-border-radius-bottomleft:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-moz-border-radius-bottomright:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}.li-settings.pre-mp6 h3{background-color:#f9f9f9 !important;-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-topright:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px}.li-settings.pre-mp6 .leadin-section{font-size:12px;padding-left:6px}.li-settings.pre-mp6 h3{padding-left:6px;font-weight:normal;color:#464646;text-shadow:#fff 0px 1px 0px}.li-settings.pre-mp6 label{font-size:12px}.li-settings.pre-mp6 input[type="checkbox"],.li-settings.pre-mp6 input[type="radio"]{margin-right:2px}.li-settings .color-swatch:before{content:"";height:19px;width:19px;vertical-align:top;margin:0 8px;display:inline-block}.li-settings .color-swatch.blue:before{background-color:#3288e6}.li-settings .color-swatch.red:before{background-color:#E43833}.li-settings .color-swatch.green:before{background-color:#7ED321}.li-settings .color-swatch.yellow:before{background-color:#FFBC00}.li-settings .color-swatch.purple:before{background-color:#BD10E0}.li-settings .color-swatch.orange:before{background-color:#FF8311}#icon-leadin{background:url("../../images/leadin-icon-32x32.png") top center no-repeat}.help-notification{background:#d9edf7;border:1px solid #bce8f1;padding:10px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.leadin-contact-avatar{margin-right:10px;float:left}.power-up-settings-icon{padding-right:10px;float:left;max-height:20px;margin-top:-1px}.dashicons{margin-right:10px;float:left;margin-top:-1px}tr.synced-list-row td.synced-list-cell{padding:3px 0px 10px 0px}tr.synced-list-row td.synced-list-cell .icon-tag{font-size:12px}tr.synced-list-row span.synced-list-arrow{padding:0px 10px}tr.synced-list-row td.synced-list-edit{padding:3px 0px 10px 20px}.leadin-settings__sidebar .pro-upgrade-cta{max-width:100%}.leadin-contacts .button{transition:background-color 0.2s}@media (min-width: 1200px){.leadin-contacts__nav{margin-top:30px;width:15.49296%;float:left;margin-right:1.40845%;margin-top:30px}.leadin-contacts__content{width:83.09859%;float:right;margin-right:0;margin-top:30px;margin-bottom:18px;margin-top:30px}.leadin-contacts__export-form{width:83.09859%;float:left;margin-right:1.40845%;padding-left:16.90141%;margin-bottom:18px}}.leadin-contacts__search{float:right;padding:10px 0;padding-bottom:9px}.leadin-contacts__type-picker{margin:0 0 30px;*zoom:1}.leadin-contacts__type-picker:after{content:"";display:table;clear:both}.leadin-contacts__type-picker li{margin:0;padding:0 1em 0 0;float:left}@media (min-width: 1200px){.leadin-contacts__type-picker li{float:none;padding:0}.leadin-contacts__type-picker li+li{padding:18px 0 0}}.leadin-contacts__type-picker li a{display:block;line-height:24px;font-weight:400;font-size:16px;text-decoration:none}.leadin-contacts__type-picker li a.current{font-weight:bold}.leadin-contacts__type-picker li a.current,.leadin-contacts__type-picker li a:hover,.leadin-contacts__type-picker li a:active{color:#F67D42}.leadin-contacts__type-picker li a .icon-tag,.leadin-contacts__type-picker li a .icon-user{padding-right:1em;font-size:0.85em}.leadin-contacts__tags-header{margin:30px 0 18px;font-size:14px;text-transform:uppercase;letter-spacing:0.1em;color:#999}.leadin-contacts__filter-text{margin:0 0 18px}.leadin-contacts__filter-count{color:#F67D42}#clear-filter{font-size:0.8em;margin-left:10px}.leadin-contacts__table table th#source{width:20%}.leadin-contacts__table table th#visits,.leadin-contacts__table table th#submissions{width:8%}.leadin-contacts__table table th#status,.leadin-contacts__table table th#last_visit,.leadin-contacts__table table th#date,.leadin-contacts__table table th#pageviews{width:10%}.leadin-contacts__table table th,.leadin-contacts__table table td{display:none}.leadin-contacts__table table th:nth-child(-n+3),.leadin-contacts__table table td:nth-child(-n+3){display:table-cell}@media (min-width: 1200px){.leadin-contacts__table table th,.leadin-contacts__table table td{display:table-cell}}.leadin-contacts.pre-mp6 .table_search{float:right;padding:12px 0;padding-bottom:11px}.leadin-contacts.pre-mp6 table{background-color:#fff;border-color:#dedede}.leadin-contacts.pre-mp6 table tr.alternate{background-color:#fff}.leadin-contacts.pre-mp6 table th,.leadin-contacts.pre-mp6 table td{border-top:0;padding:12px 6px 11px}.leadin-contacts.pre-mp6 table th a,.leadin-contacts.pre-mp6 table td a{padding:0}.leadin-contacts.pre-mp6 table th[scope="col"]{background:#eee;font-family:sans-serif;font-size:12px;text-shadow:none}.leadin-contacts.pre-mp6 table td{border-color:#dedede;line-height:18px;font-size:14px}.leadin-contacts.pre-mp6 table td .row-actions{float:left}#leadin .contact-top-navigation,#leadin .contact-deatils-column,#leadin .contact-timeline-column{width:100%;float:right;margin-right:0;*margin-left:-20px;display:inline;margin-bottom:12px}@media (min-width: 1200px){#leadin .contact-deatils-column{width:32.39437%;float:left;margin-right:1.40845%}#leadin .contact-timeline-column{width:66.19718%;float:right;margin-right:0}}#leadin .contact-header-wrap{*zoom:1;padding:18px 0 24px}#leadin .contact-header-wrap:after{content:"";display:table;clear:both}#leadin .contact-header-avatar,#leadin .contact-header-info{float:left}#leadin .contact-header-info{padding-left:15px}#leadin .contact-name{line-height:30px;padding:0;margin:0}#leadin .contact-networks{margin-top:12px}#leadin .contact-networks .icon-linkedin,#leadin .contact-networks .icon-facebook,#leadin .contact-networks .icon-twitter,#leadin .contact-networks .icon-googleplus,#leadin .contact-networks .icon-envelope{height:25px;width:25px;font-size:25px;margin-right:10px;color:#999;text-decoration:none}#leadin .contact-networks .icon-linkedin:hover,#leadin .contact-networks .icon-facebook:hover,#leadin .contact-networks .icon-twitter:hover,#leadin .contact-networks .icon-googleplus:hover,#leadin .contact-networks .icon-envelope:hover{color:#666}#leadin .contact-tag{display:inline-block;padding:3px 10px;color:#999;text-decoration:none;font-weight:600;font-size:13px;border:1px solid #ccc;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}#leadin .contact-tag:hover{opacity:0.75}#leadin .contact-tag+.contact-tag{margin-left:10px}#leadin .contact-edit-tags{margin-left:10px}#leadin .contact-info h3{margin:0}#leadin .contact-info label{font-weight:bold;line-height:1;cursor:default}#leadin .leadin-meta-section{margin-bottom:12px}#leadin .leadin-meta-table{width:100%;text-align:left}#leadin .leadin-meta-table th{color:#666;padding-bottom:6px}#leadin .leadin-premium-tag:after{content:"Pro";margin-left:10px;font-size:10px;color:#fff;background-color:#93C054;padding:2px 6px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}#leadin .contact-history{margin-left:20px}@media (min-width: 1200px){#leadin .contact-history{padding-left:20px;border-left:2px solid #dedede}}#leadin .contact-history .sessions{margin:0}#leadin .contact-history .session+.session{margin-top:24px}#leadin .contact-history .session-date{position:relative}@media (min-width: 1200px){#leadin .contact-history .session-date:before{content:"•";font-size:32px;line-height:0;height:31px;width:31px;position:absolute;left:-27px;top:9px;color:#dedede}}#leadin .contact-history .session-time-range{color:#999;font-weight:400}#leadin .contact-history .events{background-color:#fff;border:1px solid #dedede;-moz-box-shadow:0 1px 1px rgba(0,0,0,0.04);-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.04);box-shadow:0 1px 1px rgba(0,0,0,0.04)}#leadin .contact-history .event{margin:0;padding:10px 20px;border-bottom:1px solid #dedede;border-left:4px solid;*zoom:1}#leadin .contact-history .event:after{content:"";display:table;clear:both}#leadin .contact-history .event:first-child{border-top:0}#leadin .contact-history .event.pageview{border-left-color:#28c;color:#28c}#leadin .contact-history .event.form-submission{border-left-color:#F67D42;color:#F67D42}#leadin .contact-history .event.source{border-left-color:#99AA1F;color:#99AA1F}#leadin .contact-history .event-title{margin:0;font-size:13px;font-weight:600}#leadin .contact-history .event-time{float:left;font-weight:400;width:75px}#leadin .contact-history .event-content{margin-left:75px}#leadin .contact-history .event-detail{margin-top:20px;color:#444}#leadin .contact-history .event-detail li+li{padding-top:6px;border-top:1px solid #eee}#leadin .contact-history .event-detail.pageview-url{color:#ccc}#leadin .contact-history .visit-source p{margin:0;color:#1F6696}#leadin .contact-history .field-label{text-transform:uppercase;letter-spacing:0.05em;color:#999;margin-bottom:6px;font-size:0.9em}#leadin .contact-history .field-value{margin:0}#leadin.pre-mp6 .events{background-color:#f9f9f9}.powerup-list{margin:0}.powerup-list .powerup{width:20%;min-width:250px;float:left;margin:20px;padding:15px}.powerup-list .powerup h2,.powerup-list .powerup p{margin:0;padding:0;color:#666;margin-bottom:15px}.powerup-list .powerup .img-containter{text-align:center;padding:30px 15px;margin-bottom:15px;background-color:#f1f1f1;color:red}.powerup-list .powerup .img-containter h2{font-size:20px}.powerup-list .powerup.activated h2,.powerup-list .powerup.activated p{color:#1F7D71}.powerup-list .powerup.activated .img-containter{background-color:#D3EEEB}@media (min-width: 1200px){.leadin-stats__top-container,.leadin-stats__chart-container,.leadin-stats__big-numbers-container{width:100%;float:right;margin-right:0}.leadin-stats__postbox_containter{width:49.29577%;float:left;margin-right:1.40845%}.leadin-stats__postbox_containter:nth-child(2n+2){width:49.29577%;float:right;margin-right:0}}h2.leadin-stats__header{margin-bottom:12px}.leadin-stats__postbox_containter .leadin-postbox,.leadin-stats__postbox_containter #leadin .leadin-meta-section,#leadin .leadin-stats__postbox_containter .leadin-meta-section,.leadin-stats__postbox_containter .powerup-list .powerup,.powerup-list .leadin-stats__postbox_containter .powerup{margin-bottom:12px}.leadin-stats__big-number{text-align:center;width:42%;float:left;padding:4%}@media (min-width: 1200px){.leadin-stats__big-number{width:25%;padding:10px}}.big-number--average .leadin-stats__big-number-top-label,.big-number--average .leadin-stats__big-number-content,.big-number--average .leadin-stats__big-number-bottom-label{color:#4CA6CF}.leadin-stats__top-container,.leadin-stats__big-number-top-label,.leadin-stats__big-number-content,.leadin-stats__big-number-bottom-label{color:#666;margin-bottom:12px}.leadin-stats__big-number-top-label{text-transform:uppercase;letter-spacing:0.05em}.big-button,.big-button--orange,.big-button--share{display:block;text-align:center;color:#fff;text-decoration:none;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:10px;font-size:16px;margin-top:15px}.big-button:hover,.big-button--orange:hover,.big-button--share:hover,.big-button:active,.big-button--orange:active,.big-button--share:active,.big-button:focus,.big-button--orange:focus,.big-button--share:focus,.big-button:visited,.big-button--orange:visited,.big-button--share:visited{color:#fff;cursor:pointer}.big-button--orange{background-color:#F67D42;border:1px solid #E75913;-webkit-box-shadow:inset 0 1px 0 rgba(255,195,166,0.5),0 1px 0 rgba(0,0,0,0.08);box-shadow:inset 0 1px 0 rgba(255,195,166,0.5),0 1px 0 rgba(0,0,0,0.08)}.big-button--orange:hover{color:#fff;background-color:#f56c2a}.big-button--orange:active{color:#f1f1f1;background-color:#f45c11;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.btn-submitting{background-color:#979797;cursor:not-allowed;border-color:grey;box-shadow:none}.btn-submitting:hover,.btn-submitting:active,.btn-submitting:focus,.btn-submitting:visited{background-color:#979797;color:#fff;box-shadow:none}.compare{width:100%;float:left;margin-right:1.40845%;display:inline;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background-color:#fff;position:relative;margin-bottom:20px}.compare:first-of-type{margin-bottom:60px}.compare:first-of-type:after{width:100%;float:left;margin-right:1.40845%;display:inline;content:"";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 48px/1 "dashicons";position:absolute;bottom:-55px;text-align:center}@media (min-width: 1200px){.compare:first-of-type:after{width:7.04225%;float:left;margin-right:1.40845%;content:"";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 48px/1 "dashicons";position:absolute;right:-40px;top:4em}}@media (min-width: 1200px){.compare{width:32.39437%;float:left;margin-right:1.40845%;margin-right:60px}}.compare .title{width:100%;height:72px;background-color:#979797;position:absolute;text-align:center;padding-top:15px;-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-topright:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px}.compare .title h2{color:#fff;font-size:20px}.compare .title.teal{background-color:#6EC8C7}.compare .content{margin-top:50px;padding:30px}.compare .features{text-transform:uppercase;font-weight:bold;font-size:18px;padding-left:15px}.compare .features li{list-style-position:outside;text-indent:-16px}.compare .features p{margin-left:2px;margin-top:-5px}.compare p{text-transform:none;font-weight:normal;line-height:27px}*{box-sizing:border-box}.big-button--share{display:inline-block;margin-right:2px;width:82px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.5),0 1px 0 rgba(0,0,0,0.08);box-shadow:inset 0 1px 0 rgba(255,255,255,0.5),0 1px 0 rgba(0,0,0,0.08)}@media (min-width: 1200px){.big-button--share{margin-right:7px;width:200px}}.big-button--share.fb{background-color:#3B579D;border:1px solid #344d8a}.big-button--share.fb:after{content:""}@media (min-width: 1200px){.big-button--share.fb:after{content:"Share on Facebook"}}.big-button--share.fb:hover{background-color:#4261b0}.big-button--share.fb:before{content:"";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 20px/1.4 "icomoon";vertical-align:top;margin-right:5px}.big-button--share.tw{background-color:#1DB1EB;border:1px solid #13a3db}.big-button--share.tw:after{content:""}@media (min-width: 1200px){.big-button--share.tw:after{content:"Share on Twitter"}}.big-button--share.tw:hover{background-color:#34b9ed}.big-button--share.tw:before{content:"";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 20px/1.4 "icomoon";vertical-align:top;margin-right:5px}.big-button--share.wp{background-color:#1585B6;border:1px solid #12749f}.big-button--share.wp:after{content:""}@media (min-width: 1200px){.big-button--share.wp:after{content:"Write a Review"}}.big-button--share.wp:hover{background-color:#1896cd}.big-button--share.wp:before{content:"";display:inline-block;-webkit-font-smoothing:antialiased;font:normal 20px/1.4 "icomoon";vertical-align:top;margin-right:5px}.dialog-bottom-right{line-height:28px;background-color:#6EC8C7;color:#fff;position:fixed;z-index:1111;right:0;bottom:-400px;-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;width:300px;padding:20px;-moz-box-shadow:grey -1px 0 7px;-webkit-box-shadow:grey -1px 0 7px;box-shadow:grey -1px 0 7px}@media (min-width: 1200px){.dialog-bottom-right{width:668px}}.dialog-bottom-right h1{color:#1B6F6C;font-size:20px;font-weight:600;margin:0px}.dialog-bottom-right p{color:#fff;font-size:14px}.close{display:inline-block;vertical-align:top;float:right;margin-top:-30px;color:grey;font-size:18px;text-decoration:none}.close:hover{color:grey}
assets/css/build/leadin-subscribe.css CHANGED
@@ -1 +1 @@
1
- @keyframes vex-flyin{0%{opacity:0;transform:translateY(-40px);-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px)}100%{opacity:1;transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}}@-webkit-keyframes vex-flyin{0%{opacity:0;transform:translateY(-40px);-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px)}100%{opacity:1;transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}}@-moz-keyframes vex-flyin{0%{opacity:0;transform:translateY(-40px);-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px)}100%{opacity:1;transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}}@-ms-keyframes vex-flyin{0%{opacity:0;transform:translateY(-40px);-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px)}100%{opacity:1;transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}}@-o-keyframes vex-flyin{0%{opacity:0;transform:translateY(-40px);-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px)}100%{opacity:1;transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}}@keyframes vex-flyout{0%{opacity:1;transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{opacity:0;transform:translateY(-40px);-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px)}}@-webkit-keyframes vex-flyout{0%{opacity:1;transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{opacity:0;transform:translateY(-40px);-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px)}}@-moz-keyframes vex-flyout{0%{opacity:1;transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{opacity:0;transform:translateY(-40px);-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px)}}@-ms-keyframes vex-flyout{0%{opacity:1;transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{opacity:0;transform:translateY(-40px);-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px)}}@-o-keyframes vex-flyout{0%{opacity:1;transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{opacity:0;transform:translateY(-40px);-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px)}}@keyframes vex-pulse{0%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}70%{-moz-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);-webkit-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25)}100%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}}@-webkit-keyframes vex-pulse{0%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}70%{-moz-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);-webkit-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25)}100%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}}@-moz-keyframes vex-pulse{0%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}70%{-moz-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);-webkit-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25)}100%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}}@-ms-keyframes vex-pulse{0%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}70%{-moz-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);-webkit-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25)}100%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}}@-o-keyframes vex-pulse{0%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}70%{-moz-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);-webkit-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25)}100%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}}.vex.vex-theme-default{padding-top:200px}.vex.vex-theme-default.vex-closing .vex-content{animation:vex-flyout 0.5s;-webkit-animation:vex-flyout 0.5s;-moz-animation:vex-flyout 0.5s;-ms-animation:vex-flyout 0.5s;-o-animation:vex-flyout 0.5s;-webkit-backface-visibility:hidden}.vex.vex-theme-default .vex-content{animation:vex-flyin 0.5s;-webkit-animation:vex-flyin 0.5s;-moz-animation:vex-flyin 0.5s;-ms-animation:vex-flyin 0.5s;-o-animation:vex-flyin 0.5s;-webkit-backface-visibility:hidden}.vex.vex-theme-default .vex-content{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.vex-loading-spinner.vex-theme-default{-moz-box-shadow:0 0 0 0.5em #f0f0f0,0 0 1px 0.5em rgba(0,0,0,0.3);-webkit-box-shadow:0 0 0 0.5em #f0f0f0,0 0 1px 0.5em rgba(0,0,0,0.3);box-shadow:0 0 0 0.5em #f0f0f0,0 0 1px 0.5em rgba(0,0,0,0.3);-moz-border-radius:100%;-webkit-border-radius:100%;border-radius:100%;background:#f0f0f0;border:0.2em solid transparent;border-top-color:#bbb;top:-1.1em;bottom:auto}@keyframes vex-slideup{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:0}1%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px);opacity:0}2%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px);opacity:1}100%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:1}}@-webkit-keyframes vex-slideup{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:0}1%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px);opacity:0}2%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px);opacity:1}100%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:1}}@-moz-keyframes vex-slideup{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:0}1%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px);opacity:0}2%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px);opacity:1}100%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:1}}@-ms-keyframes vex-slideup{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:0}1%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px);opacity:0}2%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px);opacity:1}100%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:1}}@-o-keyframes vex-slideup{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:0}1%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px);opacity:0}2%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px);opacity:1}100%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:1}}@keyframes vex-slidedown{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px)}}@-webkit-keyframes vex-slidedown{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px)}}@-moz-keyframes vex-slidedown{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px)}}@-ms-keyframes vex-slidedown{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px)}}@-o-keyframes vex-slidedown{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px)}}@keyframes vex-pulse{0%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}70%{-moz-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);-webkit-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25)}100%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}}@-webkit-keyframes vex-pulse{0%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}70%{-moz-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);-webkit-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25)}100%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}}@-moz-keyframes vex-pulse{0%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}70%{-moz-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);-webkit-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25)}100%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}}@-ms-keyframes vex-pulse{0%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}70%{-moz-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);-webkit-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25)}100%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}}@-o-keyframes vex-pulse{0%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}70%{-moz-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);-webkit-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25)}100%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}}.vex.vex-theme-bottom-right-corner,.vex.vex-theme-bottom-left-corner{top:auto;bottom:0;overflow:visible}.vex.vex-theme-bottom-right-corner .vex-overlay,.vex.vex-theme-bottom-left-corner .vex-overlay{display:none}.vex.vex-theme-bottom-right-corner.vex-closing .vex-content,.vex.vex-theme-bottom-left-corner.vex-closing .vex-content{animation:vex-slidedown 0.5s;-webkit-animation:vex-slidedown 0.5s;-moz-animation:vex-slidedown 0.5s;-ms-animation:vex-slidedown 0.5s;-o-animation:vex-slidedown 0.5s;-webkit-backface-visibility:hidden}.vex.vex-theme-bottom-right-corner .vex-content,.vex.vex-theme-bottom-left-corner .vex-content{animation:vex-slideup 0.5s;-webkit-animation:vex-slideup 0.5s;-moz-animation:vex-slideup 0.5s;-ms-animation:vex-slideup 0.5s;-o-animation:vex-slideup 0.5s;-webkit-backface-visibility:hidden}.vex.vex-theme-bottom-right-corner .vex-content,.vex.vex-theme-bottom-left-corner .vex-content{position:fixed;bottom:0}.vex.vex-theme-bottom-right-corner .vex-content{-moz-border-radius:5px 0 0 0;-webkit-border-radius:5px;border-radius:5px 0 0 0;right:0;left:auto}.vex.vex-theme-bottom-left-corner .vex-content{-moz-border-radius:0 5px 0 0;-webkit-border-radius:0;border-radius:0 5px 0 0;left:0;right:auto}.vex-loading-spinner.vex-theme-bottom-right-corner{-moz-box-shadow:0 0 0 0.5em #f0f0f0,0 0 1px 0.5em rgba(0,0,0,0.3);-webkit-box-shadow:0 0 0 0.5em #f0f0f0,0 0 1px 0.5em rgba(0,0,0,0.3);box-shadow:0 0 0 0.5em #f0f0f0,0 0 1px 0.5em rgba(0,0,0,0.3);-moz-border-radius:100%;-webkit-border-radius:100%;border-radius:100%;background:#f0f0f0;border:0.2em solid transparent;border-top-color:#bbb;top:-1.1em;bottom:auto}@keyframes vex-dropin{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:0}1%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px);opacity:0}2%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px);opacity:1}100%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:1}}@-webkit-keyframes vex-dropin{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:0}1%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px);opacity:0}2%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px);opacity:1}100%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:1}}@-moz-keyframes vex-dropin{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:0}1%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px);opacity:0}2%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px);opacity:1}100%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:1}}@-ms-keyframes vex-dropin{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:0}1%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px);opacity:0}2%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px);opacity:1}100%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:1}}@-o-keyframes vex-dropin{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:0}1%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px);opacity:0}2%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px);opacity:1}100%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:1}}@keyframes vex-dropout{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px)}}@-webkit-keyframes vex-dropout{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px)}}@-moz-keyframes vex-dropout{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px)}}@-ms-keyframes vex-dropout{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px)}}@-o-keyframes vex-dropout{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px)}}@keyframes vex-pulse{0%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}70%{-moz-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);-webkit-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25)}100%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}}@-webkit-keyframes vex-pulse{0%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}70%{-moz-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);-webkit-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25)}100%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}}@-moz-keyframes vex-pulse{0%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}70%{-moz-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);-webkit-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25)}100%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}}@-ms-keyframes vex-pulse{0%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}70%{-moz-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);-webkit-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25)}100%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}}@-o-keyframes vex-pulse{0%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}70%{-moz-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);-webkit-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25)}100%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}}.vex.vex-theme-top{bottom:inherit}.vex.vex-theme-top .vex-overlay{display:none}.vex.vex-theme-top.vex-closing .vex-content{animation:vex-dropout 0.5s;-webkit-animation:vex-dropout 0.5s;-moz-animation:vex-dropout 0.5s;-ms-animation:vex-dropout 0.5s;-o-animation:vex-dropout 0.5s;-webkit-backface-visibility:hidden}.vex.vex-theme-top .vex-content{animation:vex-dropin 0.5s;-webkit-animation:vex-dropin 0.5s;-moz-animation:vex-dropin 0.5s;-ms-animation:vex-dropin 0.5s;-o-animation:vex-dropin 0.5s;-webkit-backface-visibility:hidden;width:100%;padding:0;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.vex.vex-theme-top .vex-dialog-form{background-color:transparent;text-align:center;padding-top:10px;padding-bottom:10px}@media only screen and (max-width: 760px){.vex.vex-theme-top .vex-dialog-form{margin:0 auto}}.vex.vex-theme-top .vex-dialog-form .vex-dialog-message,.vex.vex-theme-top .vex-dialog-form .vex-dialog-input,.vex.vex-theme-top .vex-dialog-form .vex-dialog-buttons{display:inline-block}.vex.vex-theme-top .vex-dialog-form .vex-dialog-message{height:40px;line-height:40px;margin:0}.vex.vex-theme-top .vex-dialog-form .vex-dialog-input{min-width:200px;margin:0 1em}.vex.vex-theme-top .vex-dialog-form .vex-dialog-buttons{*zoom:1;vertical-align:top}.vex.vex-theme-top .vex-dialog-form .vex-dialog-buttons:after{content:"";display:table;clear:both}.vex.vex-theme-top .vex-dialog-form .vex-dialog-buttons input{float:none}.vex.vex-theme-top .vex-dialog-form .vex-dialog-button{padding-top:12px;padding-bottom:12px}.vex.vex-theme-top .leadin-subscribe-powered-by{position:absolute;bottom:0.5em;right:0.5em}.vex-loading-spinner.vex-theme-top{-moz-box-shadow:0 0 0 0.5em #f0f0f0,0 0 1px 0.5em rgba(0,0,0,0.3);-webkit-box-shadow:0 0 0 0.5em #f0f0f0,0 0 1px 0.5em rgba(0,0,0,0.3);box-shadow:0 0 0 0.5em #f0f0f0,0 0 1px 0.5em rgba(0,0,0,0.3);-moz-border-radius:100%;-webkit-border-radius:100%;border-radius:100%;background:#f0f0f0;border:0.2em solid transparent;border-top-color:#bbb;top:-1.1em;bottom:auto}@keyframes vex-fadein{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes vex-fadein{0%{opacity:0}100%{opacity:1}}@-moz-keyframes vex-fadein{0%{opacity:0}100%{opacity:1}}@-ms-keyframes vex-fadein{0%{opacity:0}100%{opacity:1}}@-o-keyframes vex-fadein{0%{opacity:0}100%{opacity:1}}@keyframes vex-fadeout{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes vex-fadeout{0%{opacity:1}100%{opacity:0}}@-moz-keyframes vex-fadeout{0%{opacity:1}100%{opacity:0}}@-ms-keyframes vex-fadeout{0%{opacity:1}100%{opacity:0}}@-o-keyframes vex-fadeout{0%{opacity:1}100%{opacity:0}}@keyframes vex-rotation{0%{transform:rotate(0deg);-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg)}100%{transform:rotate(359deg);-webkit-transform:rotate(359deg);-moz-transform:rotate(359deg);-ms-transform:rotate(359deg);-o-transform:rotate(359deg)}}@-webkit-keyframes vex-rotation{0%{transform:rotate(0deg);-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg)}100%{transform:rotate(359deg);-webkit-transform:rotate(359deg);-moz-transform:rotate(359deg);-ms-transform:rotate(359deg);-o-transform:rotate(359deg)}}@-moz-keyframes vex-rotation{0%{transform:rotate(0deg);-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg)}100%{transform:rotate(359deg);-webkit-transform:rotate(359deg);-moz-transform:rotate(359deg);-ms-transform:rotate(359deg);-o-transform:rotate(359deg)}}@-ms-keyframes vex-rotation{0%{transform:rotate(0deg);-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg)}100%{transform:rotate(359deg);-webkit-transform:rotate(359deg);-moz-transform:rotate(359deg);-ms-transform:rotate(359deg);-o-transform:rotate(359deg)}}@-o-keyframes vex-rotation{0%{transform:rotate(0deg);-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg)}100%{transform:rotate(359deg);-webkit-transform:rotate(359deg);-moz-transform:rotate(359deg);-ms-transform:rotate(359deg);-o-transform:rotate(359deg)}}.vex,.vex *,.vex *:before,.vex *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.vex{position:fixed;overflow:visible;-webkit-overflow-scrolling:touch;z-index:1111;top:0;right:0;bottom:0;left:0}.vex-overlay{background:#000;filter:alpha(opacity=40);-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"}.vex-overlay{animation:vex-fadein 0.5s;-webkit-animation:vex-fadein 0.5s;-moz-animation:vex-fadein 0.5s;-ms-animation:vex-fadein 0.5s;-o-animation:vex-fadein 0.5s;-webkit-backface-visibility:hidden;position:fixed;background-color:rgba(0,0,0,0.4);top:0;right:0;bottom:0;left:0}.vex.vex-closing .vex-overlay{animation:vex-fadeout 0.5s;-webkit-animation:vex-fadeout 0.5s;-moz-animation:vex-fadeout 0.5s;-ms-animation:vex-fadeout 0.5s;-o-animation:vex-fadeout 0.5s;-webkit-backface-visibility:hidden}.vex-content{*zoom:1;animation:vex-fadein 0.5s;-webkit-animation:vex-fadein 0.5s;-moz-animation:vex-fadein 0.5s;-ms-animation:vex-fadein 0.5s;-o-animation:vex-fadein 0.5s;-webkit-backface-visibility:hidden;-moz-box-shadow:0px 0px 5px rgba(0,0,0,0.25);-webkit-box-shadow:0px 0px 5px rgba(0,0,0,0.25);box-shadow:0px 0px 5px rgba(0,0,0,0.25);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;position:relative;padding:15px 20px;margin:0 auto;background:#f0f0f0;font-family:"Helvetica Neue",sans-serif;color:#666;max-width:100%;width:450px;font-size:14px;line-height:1.5}.vex-content:after{content:"";display:table;clear:both}.vex-content h1,.vex-content h2,.vex-content h3,.vex-content h4,.vex-content h5,.vex-content h6,.vex-content p,.vex-content ul,.vex-content li{color:inherit;margin-bottom:10px}.vex-content h1,.vex-content h2,.vex-content h3,.vex-content h4,.vex-content h5,.vex-content h6{font-size:18px;font-weight:bold;color:#444;text-transform:none;letter-spacing:0}.vex-content p{font-size:16px;font-weight:normal;color:#666;text-transform:none;letter-spacing:0}.vex.vex-closing .vex-content{animation:vex-fadeout 0.5s;-webkit-animation:vex-fadeout 0.5s;-moz-animation:vex-fadeout 0.5s;-ms-animation:vex-fadeout 0.5s;-o-animation:vex-fadeout 0.5s;-webkit-backface-visibility:hidden}.vex-content .powered-by{display:block;font-size:11px;color:#888;padding:10px 0 0 0}.vex-content .vex-dialog-message,.vex-content .vex-dialog-input,.vex-content .vex-dialog-buttons{*zoom:1}.vex-content .vex-dialog-message:after,.vex-content .vex-dialog-input:after,.vex-content .vex-dialog-buttons:after{content:"";display:table;clear:both}.vex-content .vex-dialog-input,.vex-content .vex-dialog-buttons{font-size:16px}.vex-content .vex-dialog-message{font-size:18px}.vex-content .leadin-subscribe-powered-by{display:block;text-align:center;font-size:12px;font-weight:bold;color:#999;margin-top:15px}.vex-content .leadin-subscribe-powered-by:hover{text-decoration:underline}.vex-content .vex-close{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;position:absolute;top:15px;right:15px;cursor:pointer}.vex-content .vex-close:before{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;content:"\00D7";font-size:25px;font-weight:normal;line-height:25px;height:25px;width:25px;text-align:center;color:#bbb;background:transparent}.vex-content .vex-close:hover:before,.vex-content .vex-close:active:before{color:#777}.vex-content .vex-dialog-form{-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;margin:0}.vex-content .vex-dialog-form .vex-dialog-message{margin-bottom:10px}.vex-content .vex-dialog-form .vex-dialog-input{margin-bottom:10px}.vex-content .vex-dialog-form .vex-dialog-input textarea,.vex-content .vex-dialog-form .vex-dialog-input input[type="date"],.vex-content .vex-dialog-form .vex-dialog-input input[type="datetime"],.vex-content .vex-dialog-form .vex-dialog-input input[type="datetime-local"],.vex-content .vex-dialog-form .vex-dialog-input input[type="email"],.vex-content .vex-dialog-form .vex-dialog-input input[type="month"],.vex-content .vex-dialog-form .vex-dialog-input input[type="number"],.vex-content .vex-dialog-form .vex-dialog-input input[type="password"],.vex-content .vex-dialog-form .vex-dialog-input input[type="search"],.vex-content .vex-dialog-form .vex-dialog-input input[type="tel"],.vex-content .vex-dialog-form .vex-dialog-input input[type="text"],.vex-content .vex-dialog-form .vex-dialog-input input[type="time"],.vex-content .vex-dialog-form .vex-dialog-input input[type="url"],.vex-content .vex-dialog-form .vex-dialog-input input[type="week"]{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;background:#fff;width:100%;padding:0.25em 0.67em;border:1px solid #ddd;font-family:inherit;font-weight:inherit;font-size:inherit;min-height:2.5em;margin:0}.vex-content .vex-dialog-form .vex-dialog-input textarea:focus,.vex-content .vex-dialog-form .vex-dialog-input input[type="date"]:focus,.vex-content .vex-dialog-form .vex-dialog-input input[type="datetime"]:focus,.vex-content .vex-dialog-form .vex-dialog-input input[type="datetime-local"]:focus,.vex-content .vex-dialog-form .vex-dialog-input input[type="email"]:focus,.vex-content .vex-dialog-form .vex-dialog-input input[type="month"]:focus,.vex-content .vex-dialog-form .vex-dialog-input input[type="number"]:focus,.vex-content .vex-dialog-form .vex-dialog-input input[type="password"]:focus,.vex-content .vex-dialog-form .vex-dialog-input input[type="search"]:focus,.vex-content .vex-dialog-form .vex-dialog-input input[type="tel"]:focus,.vex-content .vex-dialog-form .vex-dialog-input input[type="text"]:focus,.vex-content .vex-dialog-form .vex-dialog-input input[type="time"]:focus,.vex-content .vex-dialog-form .vex-dialog-input input[type="url"]:focus,.vex-content .vex-dialog-form .vex-dialog-input input[type="week"]:focus{-moz-box-shadow:inset 0 0 0 2px #8dbdf1;-webkit-box-shadow:inset 0 0 0 2px #8dbdf1;box-shadow:inset 0 0 0 2px #8dbdf1;outline:none}.vex-content .vex-dialog-form .vex-dialog-input textarea .error,.vex-content .vex-dialog-form .vex-dialog-input input[type="date"] .error,.vex-content .vex-dialog-form .vex-dialog-input input[type="datetime"] .error,.vex-content .vex-dialog-form .vex-dialog-input input[type="datetime-local"] .error,.vex-content .vex-dialog-form .vex-dialog-input input[type="email"] .error,.vex-content .vex-dialog-form .vex-dialog-input input[type="month"] .error,.vex-content .vex-dialog-form .vex-dialog-input input[type="number"] .error,.vex-content .vex-dialog-form .vex-dialog-input input[type="password"] .error,.vex-content .vex-dialog-form .vex-dialog-input input[type="search"] .error,.vex-content .vex-dialog-form .vex-dialog-input input[type="tel"] .error,.vex-content .vex-dialog-form .vex-dialog-input input[type="text"] .error,.vex-content .vex-dialog-form .vex-dialog-input input[type="time"] .error,.vex-content .vex-dialog-form .vex-dialog-input input[type="url"] .error,.vex-content .vex-dialog-form .vex-dialog-input input[type="week"] .error{-moz-box-shadow:inset 0 0 0 2px #f33f33;-webkit-box-shadow:inset 0 0 0 2px #f33f33;box-shadow:inset 0 0 0 2px #f33f33}.vex-content .vex-dialog-form .vex-dialog-input input+input{margin-top:10px !important}.vex-content .vex-dialog-form .vex-dialog-buttons{*zoom:1}.vex-content .vex-dialog-form .vex-dialog-buttons:after{content:"";display:table;clear:both}.vex-content .vex-dialog-button{-webkit-appearance:none;cursor:pointer;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;font-family:inherit;font-size:1em;font-weight:bold;line-height:1;padding:10px 20px}.vex-content .vex-dialog-button.vex-last{margin-left:0}.vex-content .vex-dialog-button:focus,.vex-content .vex-dialog-button:hover{outline:none}.vex-content .vex-dialog-button.vex-dialog-button-primary{-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;border:0;background:#3288e6;color:#fff}.vex-content .vex-dialog-button.vex-dialog-button-primary:hover{background:#5fa2ec}.vex-content .vex-dialog-button.vex-dialog-button-secondary{-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;border:0;background:#e0e0e0;color:#777}.vex-loading-spinner{animation:vex-rotation 0.7s linear infinite;-webkit-animation:vex-rotation 0.7s linear infinite;-moz-animation:vex-rotation 0.7s linear infinite;-ms-animation:vex-rotation 0.7s linear infinite;-o-animation:vex-rotation 0.7s linear infinite;-webkit-backface-visibility:hidden;-moz-box-shadow:0 0 1em rgba(0,0,0,0.1);-webkit-box-shadow:0 0 1em rgba(0,0,0,0.1);box-shadow:0 0 1em rgba(0,0,0,0.1);position:fixed;z-index:1112;margin:auto;top:0;right:0;bottom:0;left:0;height:2em;width:2em;background:#fff}@media only screen and (max-width: 760px){#leadin-subscribe-mobile-check,.leadin-subscribe-powered-by{display:none}}
1
+ @keyframes vex-fadein{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes vex-fadein{0%{opacity:0}100%{opacity:1}}@-moz-keyframes vex-fadein{0%{opacity:0}100%{opacity:1}}@-ms-keyframes vex-fadein{0%{opacity:0}100%{opacity:1}}@-o-keyframes vex-fadein{0%{opacity:0}100%{opacity:1}}@keyframes vex-fadeout{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes vex-fadeout{0%{opacity:1}100%{opacity:0}}@-moz-keyframes vex-fadeout{0%{opacity:1}100%{opacity:0}}@-ms-keyframes vex-fadeout{0%{opacity:1}100%{opacity:0}}@-o-keyframes vex-fadeout{0%{opacity:1}100%{opacity:0}}@keyframes vex-rotation{0%{transform:rotate(0deg);-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg)}100%{transform:rotate(359deg);-webkit-transform:rotate(359deg);-moz-transform:rotate(359deg);-ms-transform:rotate(359deg);-o-transform:rotate(359deg)}}@-webkit-keyframes vex-rotation{0%{transform:rotate(0deg);-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg)}100%{transform:rotate(359deg);-webkit-transform:rotate(359deg);-moz-transform:rotate(359deg);-ms-transform:rotate(359deg);-o-transform:rotate(359deg)}}@-moz-keyframes vex-rotation{0%{transform:rotate(0deg);-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg)}100%{transform:rotate(359deg);-webkit-transform:rotate(359deg);-moz-transform:rotate(359deg);-ms-transform:rotate(359deg);-o-transform:rotate(359deg)}}@-ms-keyframes vex-rotation{0%{transform:rotate(0deg);-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg)}100%{transform:rotate(359deg);-webkit-transform:rotate(359deg);-moz-transform:rotate(359deg);-ms-transform:rotate(359deg);-o-transform:rotate(359deg)}}@-o-keyframes vex-rotation{0%{transform:rotate(0deg);-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg)}100%{transform:rotate(359deg);-webkit-transform:rotate(359deg);-moz-transform:rotate(359deg);-ms-transform:rotate(359deg);-o-transform:rotate(359deg)}}@keyframes vex-slideup{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:0}1%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px);opacity:0}2%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px);opacity:1}100%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:1}}@-webkit-keyframes vex-slideup{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:0}1%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px);opacity:0}2%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px);opacity:1}100%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:1}}@-moz-keyframes vex-slideup{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:0}1%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px);opacity:0}2%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px);opacity:1}100%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:1}}@-ms-keyframes vex-slideup{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:0}1%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px);opacity:0}2%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px);opacity:1}100%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:1}}@-o-keyframes vex-slideup{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:0}1%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px);opacity:0}2%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px);opacity:1}100%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:1}}@keyframes vex-slidedown{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px)}}@-webkit-keyframes vex-slidedown{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px)}}@-moz-keyframes vex-slidedown{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px)}}@-ms-keyframes vex-slidedown{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px)}}@-o-keyframes vex-slidedown{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{transform:translateY(800px);-webkit-transform:translateY(800px);-moz-transform:translateY(800px);-ms-transform:translateY(800px);-o-transform:translateY(800px)}}@keyframes vex-flyin{0%{opacity:0;transform:translateY(-40px);-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px)}100%{opacity:1;transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}}@-webkit-keyframes vex-flyin{0%{opacity:0;transform:translateY(-40px);-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px)}100%{opacity:1;transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}}@-moz-keyframes vex-flyin{0%{opacity:0;transform:translateY(-40px);-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px)}100%{opacity:1;transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}}@-ms-keyframes vex-flyin{0%{opacity:0;transform:translateY(-40px);-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px)}100%{opacity:1;transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}}@-o-keyframes vex-flyin{0%{opacity:0;transform:translateY(-40px);-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px)}100%{opacity:1;transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}}@keyframes vex-flyout{0%{opacity:1;transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{opacity:0;transform:translateY(-40px);-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px)}}@-webkit-keyframes vex-flyout{0%{opacity:1;transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{opacity:0;transform:translateY(-40px);-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px)}}@-moz-keyframes vex-flyout{0%{opacity:1;transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{opacity:0;transform:translateY(-40px);-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px)}}@-ms-keyframes vex-flyout{0%{opacity:1;transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{opacity:0;transform:translateY(-40px);-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px)}}@-o-keyframes vex-flyout{0%{opacity:1;transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{opacity:0;transform:translateY(-40px);-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px)}}@keyframes vex-dropin{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:0}1%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px);opacity:0}2%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px);opacity:1}100%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:1}}@-webkit-keyframes vex-dropin{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:0}1%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px);opacity:0}2%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px);opacity:1}100%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:1}}@-moz-keyframes vex-dropin{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:0}1%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px);opacity:0}2%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px);opacity:1}100%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:1}}@-ms-keyframes vex-dropin{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:0}1%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px);opacity:0}2%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px);opacity:1}100%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:1}}@-o-keyframes vex-dropin{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:0}1%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px);opacity:0}2%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px);opacity:1}100%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0);opacity:1}}@keyframes vex-dropout{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px)}}@-webkit-keyframes vex-dropout{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px)}}@-moz-keyframes vex-dropout{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px)}}@-ms-keyframes vex-dropout{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px)}}@-o-keyframes vex-dropout{0%{transform:translateY(0);-webkit-transform:translateY(0);-moz-transform:translateY(0);-ms-transform:translateY(0);-o-transform:translateY(0)}100%{transform:translateY(-800px);-webkit-transform:translateY(-800px);-moz-transform:translateY(-800px);-ms-transform:translateY(-800px);-o-transform:translateY(-800px)}}@keyframes vex-pulse{0%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}70%{-moz-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);-webkit-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25)}100%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}}@-webkit-keyframes vex-pulse{0%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}70%{-moz-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);-webkit-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25)}100%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}}@-moz-keyframes vex-pulse{0%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}70%{-moz-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);-webkit-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25)}100%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}}@-ms-keyframes vex-pulse{0%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}70%{-moz-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);-webkit-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25)}100%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}}@-o-keyframes vex-pulse{0%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}70%{-moz-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);-webkit-box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25);box-shadow:inset 0 0 0 300px rgba(255,255,255,0.25)}100%{-moz-box-shadow:inset 0 0 0 300px transparent;-webkit-box-shadow:inset 0 0 0 300px transparent;box-shadow:inset 0 0 0 300px transparent}}.vex,.vex *,.vex *:before,.vex *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;border:0;margin:0;padding:0}.vex,.vex-overlay{position:fixed;top:0;right:0;bottom:0;left:0}.vex{overflow:visible;-webkit-overflow-scrolling:touch;z-index:1111;font-size:16px}.vex .vex-overlay{background:#000;filter:alpha(opacity=40);-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"}.vex .vex-closing.vex-overlay{animation:vex-fadeout 0.5s;-webkit-animation:vex-fadeout 0.5s;-moz-animation:vex-fadeout 0.5s;-ms-animation:vex-fadeout 0.5s;-o-animation:vex-fadeout 0.5s;-webkit-backface-visibility:hidden}.vex .vex-overlay{animation:vex-fadein 0.5s;-webkit-animation:vex-fadein 0.5s;-moz-animation:vex-fadein 0.5s;-ms-animation:vex-fadein 0.5s;-o-animation:vex-fadein 0.5s;-webkit-backface-visibility:hidden;background-color:rgba(0,0,0,0.4)}.vex .vex-content{*zoom:1;-moz-box-shadow:0px 0px 5px rgba(0,0,0,0.25);-webkit-box-shadow:0px 0px 5px rgba(0,0,0,0.25);box-shadow:0px 0px 5px rgba(0,0,0,0.25);position:relative;padding:1em 1.5em;margin:0 auto;background:#fff;max-width:100%;width:30em}.vex .vex-content:after{content:"";display:table;clear:both}.vex .vex-content h1,.vex .vex-content h2,.vex .vex-content h3,.vex .vex-content h4,.vex .vex-content h5,.vex .vex-content h6,.vex .vex-content p,.vex .vex-content ul,.vex .vex-content li,.vex .vex-content input{line-height:1.5;text-transform:none;letter-spacing:0;margin:0}.vex .vex-content h1,.vex .vex-content h2,.vex .vex-content h3,.vex .vex-content h4,.vex .vex-content h5,.vex .vex-content h6{color:#444;font-size:1.3em;font-weight:600;margin-bottom:0.6em}.vex .vex-content p,.vex .vex-content ul,.vex .vex-content li,.vex .vex-content input{color:#666;font-size:1em;font-weight:normal;margin-bottom:1em}.vex .vex-dialog-message,.vex .vex-dialog-input,.vex .vex-dialog-buttons{*zoom:1}.vex .vex-dialog-message:after,.vex .vex-dialog-input:after,.vex .vex-dialog-buttons:after{content:"";display:table;clear:both}.vex .leadin-subscribe-powered-by{color:#999;display:block;text-align:center;font-size:0.8em;text-decoration:none}.vex .leadin-subscribe-powered-by:hover{background:none;color:#999;text-decoration:underline;font-weight:normal}.vex .vex-close{-moz-border-radius:0.33em;-webkit-border-radius:0.33em;border-radius:0.33em;position:absolute;top:1em;right:1.5em;cursor:pointer}.vex .vex-close:before{-moz-border-radius:0.33em;-webkit-border-radius:0.33em;border-radius:0.33em;content:"×";font-size:25px;font-weight:normal;line-height:25px;height:25px;width:25px;text-align:center;color:#bbb;background:transparent}.vex .vex-close:hover:before,.vex .vex-close:active:before{color:#777}.vex .vex-dialog-form{margin:0}.vex .vex-dialog-input{margin-bottom:1em}.vex textarea,.vex input[type="date"],.vex input[type="datetime"],.vex input[type="datetime-local"],.vex input[type="email"],.vex input[type="month"],.vex input[type="number"],.vex input[type="password"],.vex input[type="search"],.vex input[type="tel"],.vex input[type="text"],.vex input[type="time"],.vex input[type="url"],.vex input[type="week"]{-moz-border-radius:0.25em;-webkit-border-radius:0.25em;border-radius:0.25em;background:#fff;width:100%;padding:0.5em 0.5em;border:1px solid #ddd;margin:0;height:auto}.vex textarea:hover,.vex input[type="date"]:hover,.vex input[type="datetime"]:hover,.vex input[type="datetime-local"]:hover,.vex input[type="email"]:hover,.vex input[type="month"]:hover,.vex input[type="number"]:hover,.vex input[type="password"]:hover,.vex input[type="search"]:hover,.vex input[type="tel"]:hover,.vex input[type="text"]:hover,.vex input[type="time"]:hover,.vex input[type="url"]:hover,.vex input[type="week"]:hover{border:1px solid #ddd}.vex textarea:focus,.vex input[type="date"]:focus,.vex input[type="datetime"]:focus,.vex input[type="datetime-local"]:focus,.vex input[type="email"]:focus,.vex input[type="month"]:focus,.vex input[type="number"]:focus,.vex input[type="password"]:focus,.vex input[type="search"]:focus,.vex input[type="tel"]:focus,.vex input[type="text"]:focus,.vex input[type="time"]:focus,.vex input[type="url"]:focus,.vex input[type="week"]:focus{border:1px solid #ddd;outline:none}.vex textarea .error,.vex input[type="date"] .error,.vex input[type="datetime"] .error,.vex input[type="datetime-local"] .error,.vex input[type="email"] .error,.vex input[type="month"] .error,.vex input[type="number"] .error,.vex input[type="password"] .error,.vex input[type="search"] .error,.vex input[type="tel"] .error,.vex input[type="text"] .error,.vex input[type="time"] .error,.vex input[type="url"] .error,.vex input[type="week"] .error{-moz-box-shadow:inset 0 0 0 2px #f33f33;-webkit-box-shadow:inset 0 0 0 2px #f33f33;box-shadow:inset 0 0 0 2px #f33f33}.vex input+input{margin-top:0.5em !important}.vex .vex-dialog-button{-moz-border-radius:0.25em;-webkit-border-radius:0.25em;border-radius:0.25em;-webkit-appearance:none;cursor:pointer;font-size:1em;font-weight:bold;line-height:1;padding:1em 1.5em;width:100%}.vex .vex-dialog-button.vex-last{margin-left:0}.vex .vex-dialog-button:focus,.vex .vex-dialog-button:hover{outline:none}.vex .vex-dialog-button.vex-dialog-button-primary{-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;border:0}.vex .vex-loading-spinner{animation:vex-rotation 0.7s linear infinite;-webkit-animation:vex-rotation 0.7s linear infinite;-moz-animation:vex-rotation 0.7s linear infinite;-ms-animation:vex-rotation 0.7s linear infinite;-o-animation:vex-rotation 0.7s linear infinite;-webkit-backface-visibility:hidden;-moz-box-shadow:0 0 0 0.5em #f0f0f0,0 0 1px 0.5em rgba(0,0,0,0.3);-webkit-box-shadow:0 0 0 0.5em #f0f0f0,0 0 1px 0.5em rgba(0,0,0,0.3);box-shadow:0 0 0 0.5em #f0f0f0,0 0 1px 0.5em rgba(0,0,0,0.3);-moz-border-radius:100%;-webkit-border-radius:100%;border-radius:100%;background:#f0f0f0;z-index:1112;margin:auto;height:2em;width:2em;border:0.2em solid transparent;border-top-color:#bbb}.vex.vex-theme-bottom-right-corner .vex-content,.vex.vex-theme-bottom-left-corner .vex-content,.vex.vex-theme-default .vex-content{border-top:5px solid}.vex.vex-theme-bottom-right-corner .vex-overlay,.vex.vex-theme-bottom-left-corner .vex-overlay,.vex.vex-theme-top .vex-overlay{display:none}.vex.vex-theme-bottom-right-corner,.vex.vex-theme-bottom-left-corner{top:auto;bottom:0}.vex.vex-theme-bottom-right-corner .vex-content,.vex.vex-theme-bottom-left-corner .vex-content{animation:vex-slideup 0.5s;-webkit-animation:vex-slideup 0.5s;-moz-animation:vex-slideup 0.5s;-ms-animation:vex-slideup 0.5s;-o-animation:vex-slideup 0.5s;-webkit-backface-visibility:hidden;position:fixed}.vex.vex-theme-bottom-right-corner.vex-closing .vex-content,.vex.vex-theme-bottom-left-corner.vex-closing .vex-content{animation:vex-slidedown 0.5s;-webkit-animation:vex-slidedown 0.5s;-moz-animation:vex-slidedown 0.5s;-ms-animation:vex-slidedown 0.5s;-o-animation:vex-slidedown 0.5s;-webkit-backface-visibility:hidden}.vex.vex-theme-default{padding-top:200px}.vex.vex-theme-default .vex-content{animation:vex-flyin 0.5s;-webkit-animation:vex-flyin 0.5s;-moz-animation:vex-flyin 0.5s;-ms-animation:vex-flyin 0.5s;-o-animation:vex-flyin 0.5s;-webkit-backface-visibility:hidden;-moz-border-radius:0.33em;-webkit-border-radius:0.33em;border-radius:0.33em}.vex.vex-theme-default.vex-closing .vex-content{animation:vex-flyout 0.5s;-webkit-animation:vex-flyout 0.5s;-moz-animation:vex-flyout 0.5s;-ms-animation:vex-flyout 0.5s;-o-animation:vex-flyout 0.5s;-webkit-backface-visibility:hidden}.vex.vex-theme-bottom-right-corner .vex-content{-moz-border-radius:0.33em 0 0 0;-webkit-border-radius:0.33em;border-radius:0.33em 0 0 0;right:0;left:auto;bottom:0}.vex.vex-theme-bottom-left-corner .vex-content{-moz-border-radius:0 0.33em 0 0;-webkit-border-radius:0;border-radius:0 0.33em 0 0;left:0;right:auto;bottom:0}.vex.vex-theme-top{bottom:inherit}.vex.vex-theme-top .vex-content{animation:vex-dropin 0.5s;-webkit-animation:vex-dropin 0.5s;-moz-animation:vex-dropin 0.5s;-ms-animation:vex-dropin 0.5s;-o-animation:vex-dropin 0.5s;-webkit-backface-visibility:hidden;width:100%;border-bottom:5px solid}.vex.vex-theme-top.vex-closing .vex-content{animation:vex-dropout 0.5s;-webkit-animation:vex-dropout 0.5s;-moz-animation:vex-dropout 0.5s;-ms-animation:vex-dropout 0.5s;-o-animation:vex-dropout 0.5s;-webkit-backface-visibility:hidden}.vex.leadin-popup-color-blue .vex-content{border-color:#3288e6}.vex.leadin-popup-color-blue input:focus{-moz-box-shadow:inset 0 0 0 2px #8dbdf1;-webkit-box-shadow:inset 0 0 0 2px #8dbdf1;box-shadow:inset 0 0 0 2px #8dbdf1}.vex.leadin-popup-color-blue .vex-dialog-button-primary{background:#3288e6;color:#fff}.vex.leadin-popup-color-blue .vex-dialog-button-primary:hover{background:#5fa2ec}.vex.leadin-popup-color-red .vex-content{border-color:#E43833}.vex.leadin-popup-color-red input:focus{-moz-box-shadow:inset 0 0 0 2px #f0908d;-webkit-box-shadow:inset 0 0 0 2px #f0908d;box-shadow:inset 0 0 0 2px #f0908d}.vex.leadin-popup-color-red .vex-dialog-button-primary{background:#E43833;color:#fff}.vex.leadin-popup-color-red .vex-dialog-button-primary:hover{background:#ea6460}.vex.leadin-popup-color-green .vex-content{border-color:#7ED321}.vex.leadin-popup-color-green input:focus{-moz-box-shadow:inset 0 0 0 2px #b0e971;-webkit-box-shadow:inset 0 0 0 2px #b0e971;box-shadow:inset 0 0 0 2px #b0e971}.vex.leadin-popup-color-green .vex-dialog-button-primary{background:#7ED321;color:#fff}.vex.leadin-popup-color-green .vex-dialog-button-primary:hover{background:#97e245}.vex.leadin-popup-color-yellow .vex-content{border-color:#FFBC00}.vex.leadin-popup-color-yellow input:focus{-moz-box-shadow:inset 0 0 0 2px #ffd766;-webkit-box-shadow:inset 0 0 0 2px #ffd766;box-shadow:inset 0 0 0 2px #ffd766}.vex.leadin-popup-color-yellow .vex-dialog-button-primary{background:#FFBC00;color:#fff}.vex.leadin-popup-color-yellow .vex-dialog-button-primary:hover{background:#ffc933}.vex.leadin-popup-color-purple .vex-content{border-color:#BD10E0}.vex.leadin-popup-color-purple input:focus{-moz-box-shadow:inset 0 0 0 2px #db62f4;-webkit-box-shadow:inset 0 0 0 2px #db62f4;box-shadow:inset 0 0 0 2px #db62f4}.vex.leadin-popup-color-purple .vex-dialog-button-primary{background:#BD10E0;color:#fff}.vex.leadin-popup-color-purple .vex-dialog-button-primary:hover{background:#d033f0}.vex.leadin-popup-color-orange .vex-content{border-color:#FF8311}.vex.leadin-popup-color-orange input:focus{-moz-box-shadow:inset 0 0 0 2px #ffb877;-webkit-box-shadow:inset 0 0 0 2px #ffb877;box-shadow:inset 0 0 0 2px #ffb877}.vex.leadin-popup-color-orange .vex-dialog-button-primary{background:#FF8311;color:#fff}.vex.leadin-popup-color-orange .vex-dialog-button-primary:hover{background:#ff9e44}@media only screen and (max-width: 760px){.vex.leadin-subscribe-mobile-hide{display:none}}
assets/fonts/icomoon.eot CHANGED
Binary file
assets/fonts/icomoon.svg CHANGED
@@ -3,18 +3,26 @@
3
  <svg xmlns="http://www.w3.org/2000/svg">
4
  <metadata>Generated by IcoMoon</metadata>
5
  <defs>
6
- <font id="icomoon" horiz-adv-x="512">
7
- <font-face units-per-em="512" ascent="480" descent="-32" />
8
- <missing-glyph horiz-adv-x="512" />
9
- <glyph unicode="&#x20;" d="" horiz-adv-x="256" />
10
- <glyph unicode="&#xe600;" d="M432 480h-384c-26.4 0-48-21.6-48-48v-416c0-26.4 21.6-48 48-48h384c26.4 0 48 21.6 48 48v416c0 26.4-21.6 48-48 48zM416 32h-352v384h352v-384zM128 192h224v-32h-224zM128 128h224v-32h-224zM160 336c0 26.51 21.49 48 48 48s48-21.49 48-48c0-26.51-21.49-48-48-48s-48 21.49-48 48zM240 288h-64c-26.4 0-48-14.4-48-32v-32h160v32c0 17.6-21.6 32-48 32z" />
11
- <glyph unicode="&#xe601;" d="M463.906 480h-144.281c-26.453 0-63.398-15.303-82.102-34.007l-223.495-223.495c-18.704-18.704-18.704-49.312 0-68.016l172.455-172.453c18.704-18.705 49.311-18.705 68.015 0l223.495 223.494c18.704 18.705 34.007 55.651 34.007 82.102v144.281c0 26.452-21.643 48.094-48.094 48.094zM400 320c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48z" />
12
- <glyph unicode="&#xe602;" d="M464 416h-416c-26.4 0-48-21.6-48-48v-320c0-26.4 21.6-48 48-48h416c26.4 0 48 21.6 48 48v320c0 26.4-21.6 48-48 48zM199.37 204.814l-135.37-105.446v250.821l135.37-145.375zM88.19 352h335.62l-167.81-126-167.81 126zM204.644 199.151l51.356-55.151 51.355 55.151 105.277-135.151h-313.264l105.276 135.151zM312.63 204.814l135.37 145.375v-250.821l-135.37 105.446z" />
13
- <glyph unicode="&#xe603;" d="M128 320c0 70.692 57.308 128 128 128s128-57.308 128-128c0-70.692-57.308-128-128-128s-128 57.308-128 128zM384 160h-256c-70.692 0-128-57.309-128-128v-32h512v32c0 70.691-57.308 128-128 128z" />
14
- <glyph unicode="&#xe604;" d="M512 175.953v96.094l-73.387 12.231c-2.979 9.066-6.611 17.834-10.847 26.25l43.227 60.517-67.948 67.949-60.413-43.152c-8.455 4.277-17.269 7.944-26.384 10.951l-12.201 73.207h-96.094l-12.201-73.208c-9.115-3.007-17.929-6.674-26.383-10.951l-60.414 43.152-67.949-67.949 43.227-60.518c-4.235-8.415-7.867-17.183-10.846-26.249l-73.387-12.23v-96.094l73.559-12.26c2.98-8.984 6.605-17.674 10.821-26.015l-43.374-60.724 67.949-67.948 60.827 43.447c8.301-4.175 16.945-7.764 25.882-10.717l12.289-73.736h96.094l12.289 73.737c8.937 2.953 17.581 6.542 25.883 10.716l60.826-43.446 67.948 67.948-43.372 60.723c4.216 8.341 7.839 17.031 10.82 26.016l73.559 12.259zM256 160c-35.346 0-64 28.653-64 64s28.654 64 64 64c35.347 0 64-28.654 64-64s-28.653-64-64-64z" />
15
- <glyph unicode="&#xe605;" d="M0 64h512v-64h-512zM64 192h64v-96h-64zM160 320h64v-224h-64zM256 224h64v-128h-64zM352 416h64v-320h-64z" />
16
- <glyph unicode="&#xe606;" d="M478.145 77.759l-158.145 263.512v106.729h16c8.8 0 16 7.2 16 16s-7.2 16-16 16h-160c-8.8 0-16-7.2-16-16s7.2-16 16-16h16v-106.729l-158.144-263.512c-36.221-60.367-8.256-109.759 62.144-109.759h320c70.4 0 98.365 49.392 62.145 109.759zM120.519 160l103.481 172.469v115.531h64v-115.531l103.482-172.469h-270.963z" />
17
- <glyph unicode="&#xe607;" d="M256 480c-97.216 0-176-78.784-176-176 0-64.496 59.008-132.848 80.496-192.88 32.048-89.52 28.496-143.12 95.504-143.12 68 0 63.44 53.344 95.504 142.752 21.552 60.16 80.496 129.248 80.496 193.248 0 97.216-78.816 176-176 176zM297.472 45.184l-79.328-9.904c-2.832 8.192-5.872 17.776-9.568 30.288-0.048 0.16-0.112 0.336-0.144 0.496l99.008 12.368c-1.408-4.72-2.912-9.68-4.224-14.128-2.096-7.184-3.968-13.424-5.744-19.12zM203.776 81.472c-2.912 9.632-6.192 19.776-9.84 30.528h124.256c-1.968-5.744-3.936-11.504-5.632-16.944l-108.784-13.584zM256 0c-16.208 0-23.664 1.872-31.952 20l67.808 8.496c-9.824-26.464-16.976-28.496-35.856-28.496zM330.752 144h-149.328c-7.968 17.28-17.536 34.56-26.976 51.472-20.88 37.36-42.448 76-42.448 108.528 0 79.408 64.592 144 144 144s144-64.592 144-144c0-32.288-21.6-71.136-42.496-108.72-9.344-16.848-18.848-34.096-26.752-51.28zM256 400c4.4 0 8-3.584 8-8s-3.584-8-8-8c-44.112 0-80-35.888-80-80 0-4.416-3.584-8-8-8s-8 3.584-8 8c0 52.944 43.056 96 96 96z" />
18
- <glyph unicode="&#xe608;" d="M496 448h-112c-26.4 0-63.273-15.273-81.941-33.941l-188.118-188.118c-18.667-18.667-18.667-49.214 0-67.882l140.118-140.117c18.667-18.668 49.214-18.668 67.882 0l188.117 188.117c18.669 18.668 33.942 55.541 33.942 81.941v112c0 26.4-21.6 48-48 48zM432 288c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM43.313 180.687l171.189-171.189c-18.132-9.58-41.231-6.769-56.443 8.444l-140.118 140.117c-18.667 18.668-18.667 49.215 0 67.882l188.118 188.118c18.668 18.668 55.541 33.941 81.941 33.941l-244.687-244.686c-6.222-6.223-6.222-16.404 0-22.627z" horiz-adv-x="544" />
19
- <glyph unicode="&#xe609;" d="M287.744 385.264v-129.008h128v64l96.256-96.256-96.256-96.24v65.488h-128v-129.008h64.496l-96.24-96.24-96.256 96.24h64v129.008h-128v-64.992l-95.744 95.744 95.744 95.744v-63.488h128v129.008h-62.496l94.752 94.736 94.752-94.736h-63.008z" />
 
 
 
 
 
 
 
 
20
  </font></defs></svg>
3
  <svg xmlns="http://www.w3.org/2000/svg">
4
  <metadata>Generated by IcoMoon</metadata>
5
  <defs>
6
+ <font id="icomoon" horiz-adv-x="1024">
7
+ <font-face units-per-em="1024" ascent="960" descent="-64" />
8
+ <missing-glyph horiz-adv-x="1024" />
9
+ <glyph unicode="&#x20;" d="" horiz-adv-x="512" />
10
+ <glyph unicode="&#xe600;" d="M1242.414 890.048l-289.937-953.74h295.903c40.846 0 83.256 30.586 94.704 68.244l269.191 885.496c11.458 37.69-12.402 68.244-53.212 68.244h-221.945c-40.846 0-83.256-30.586-94.704-68.244zM686.168 617.6l-207.113-681.292h295.903c40.846 0 83.243 30.542 94.68 68.163l207.113 681.292h-295.903c-40.846 0-83.243-30.542-94.68-68.163zM129.923 345.155l-103.594-340.769c-11.43-37.599 12.452-68.078 53.262-68.078h221.945c40.846 0 83.248 30.559 94.654 68.078l124.29 408.847h-295.903c-40.846 0-83.248-30.559-94.654-68.078z" horiz-adv-x="1638" />
11
+ <glyph unicode="&#xe601;" d="M864 960h-768c-52.8 0-96-43.2-96-96v-832c0-52.8 43.2-96 96-96h768c52.8 0 96 43.2 96 96v832c0 52.8-43.2 96-96 96zM832 64h-704v768h704v-768zM256 384h448v-64h-448zM256 256h448v-64h-448zM320 672c0 53.020 42.98 96 96 96s96-42.98 96-96c0-53.020-42.98-96-96-96s-96 42.98-96 96zM480 576h-128c-52.8 0-96-28.8-96-64v-64h320v64c0 35.2-43.2 64-96 64z" />
12
+ <glyph unicode="&#xe602;" d="M927.812 960h-288.562c-52.906 0-126.796-30.606-164.204-68.014l-446.99-446.99c-37.408-37.408-37.408-98.624 0-136.032l344.91-344.906c37.408-37.41 98.622-37.41 136.030 0l446.99 446.988c37.408 37.41 68.014 111.302 68.014 164.204v288.562c0 52.904-43.286 96.188-96.188 96.188zM800 640c-53.020 0-96 42.98-96 96s42.98 96 96 96 96-42.98 96-96-42.98-96-96-96z" />
13
+ <glyph unicode="&#xe603;" d="M928 832h-832c-52.8 0-96-43.2-96-96v-640c0-52.8 43.2-96 96-96h832c52.8 0 96 43.2 96 96v640c0 52.8-43.2 96-96 96zM398.74 409.628l-270.74-210.892v501.642l270.74-290.75zM176.38 704h671.24l-335.62-252-335.62 252zM409.288 398.302l102.712-110.302 102.71 110.302 210.554-270.302h-626.528l210.552 270.302zM625.26 409.628l270.74 290.75v-501.642l-270.74 210.892z" />
14
+ <glyph unicode="&#xe604;" d="M256 640c0 141.384 114.616 256 256 256s256-114.616 256-256c0-141.384-114.616-256-256-256s-256 114.616-256 256zM768 320h-512c-141.384 0-256-114.618-256-256v-64h1024v64c0 141.382-114.616 256-256 256z" />
15
+ <glyph unicode="&#xe605;" d="M1024 351.906v192.188l-146.774 24.462c-5.958 18.132-13.222 35.668-21.694 52.5l86.454 121.034-135.896 135.898-120.826-86.304c-16.91 8.554-34.538 15.888-52.768 21.902l-24.402 146.414h-192.188l-24.402-146.416c-18.23-6.014-35.858-13.348-52.766-21.902l-120.828 86.304-135.898-135.898 86.454-121.036c-8.47-16.83-15.734-34.366-21.692-52.498l-146.774-24.46v-192.188l147.118-24.52c5.96-17.968 13.21-35.348 21.642-52.030l-86.748-121.448 135.898-135.896 121.654 86.894c16.602-8.35 33.89-15.528 51.764-21.434l24.578-147.472h192.188l24.578 147.474c17.874 5.906 35.162 13.084 51.766 21.432l121.652-86.892 135.896 135.896-86.744 121.446c8.432 16.682 15.678 34.062 21.64 52.032l147.118 24.518zM512 320c-70.692 0-128 57.306-128 128s57.308 128 128 128c70.694 0 128-57.308 128-128s-57.306-128-128-128z" />
16
+ <glyph unicode="&#xe606;" d="M0 128h1024v-128h-1024zM128 384h128v-192h-128zM320 640h128v-448h-128zM512 448h128v-256h-128zM704 832h128v-640h-128z" />
17
+ <glyph unicode="&#xe607;" d="M956.29 155.518l-316.29 527.024v213.458h32c17.6 0 32 14.4 32 32s-14.4 32-32 32h-320c-17.6 0-32-14.4-32-32s14.4-32 32-32h32v-213.458l-316.288-527.024c-72.442-120.734-16.512-219.518 124.288-219.518h640c140.8 0 196.73 98.784 124.29 219.518zM241.038 320l206.962 344.938v231.062h128v-231.062l206.964-344.938h-541.926z" />
18
+ <glyph unicode="&#xe608;" d="M512 960c-194.432 0-352-157.568-352-352 0-128.992 118.016-265.696 160.992-385.76 64.096-179.040 56.992-286.24 191.008-286.24 136 0 126.88 106.688 191.008 285.504 43.104 120.32 160.992 258.496 160.992 386.496 0 194.432-157.632 352-352 352zM594.944 90.368l-158.656-19.808c-5.664 16.384-11.744 35.552-19.136 60.576-0.096 0.32-0.224 0.672-0.288 0.992l198.016 24.736c-2.816-9.44-5.824-19.36-8.448-28.256-4.192-14.368-7.936-26.848-11.488-38.24zM407.552 162.944c-5.824 19.264-12.384 39.552-19.68 61.056h248.512c-3.936-11.488-7.872-23.008-11.264-33.888l-217.568-27.168zM512 0c-32.416 0-47.328 3.744-63.904 40l135.616 16.992c-19.648-52.928-33.952-56.992-71.712-56.992zM661.504 288h-298.656c-15.936 34.56-35.072 69.12-53.952 102.944-41.76 74.72-84.896 152-84.896 217.056 0 158.816 129.184 288 288 288s288-129.184 288-288c0-64.576-43.2-142.272-84.992-217.44-18.688-33.696-37.696-68.192-53.504-102.56zM512 800c8.8 0 16-7.168 16-16s-7.168-16-16-16c-88.224 0-160-71.776-160-160 0-8.832-7.168-16-16-16s-16 7.168-16 16c0 105.888 86.112 192 192 192z" />
19
+ <glyph unicode="&#xe609;" d="M992 896h-224c-52.8 0-126.546-30.546-163.882-67.882l-376.236-376.236c-37.334-37.334-37.334-98.428 0-135.764l280.236-280.234c37.334-37.336 98.428-37.336 135.764 0l376.234 376.234c37.338 37.336 67.884 111.082 67.884 163.882v224c0 52.8-43.2 96-96 96zM864 576c-53.020 0-96 42.98-96 96s42.98 96 96 96 96-42.98 96-96-42.98-96-96-96zM86.626 361.374l342.378-342.378c-36.264-19.16-82.462-13.538-112.886 16.888l-280.236 280.234c-37.334 37.336-37.334 98.43 0 135.764l376.236 376.236c37.336 37.336 111.082 67.882 163.882 67.882l-489.374-489.372c-12.444-12.446-12.444-32.808 0-45.254z" horiz-adv-x="1088" />
20
+ <glyph unicode="&#xe60a;" d="M575.488 770.528v-258.016h256v128l192.512-192.512-192.512-192.48v130.976h-256v-258.016h128.992l-192.48-192.48-192.512 192.48h128v258.016h-256v-129.984l-191.488 191.488 191.488 191.488v-126.976h256v258.016h-124.992l189.504 189.472 189.504-189.472h-126.016z" />
21
+ <glyph unicode="&#xe60b;" d="M950.857 91.428v438.857q-18.286-20.571-39.429-37.714-153.143-117.714-243.429-193.143-29.143-24.571-47.429-38.286t-49.429-27.714-58.571-14h-1.143q-27.429 0-58.571 14t-49.429 27.714-47.429 38.286q-90.286 75.429-243.429 193.143-21.143 17.143-39.429 37.714v-438.857q0-7.429 5.429-12.857t12.857-5.429h841.143q7.429 0 12.857 5.429t5.429 12.857zM950.857 692v14t-0.286 7.429-1.714 7.143-3.143 5.143-5.143 4.286-8 1.429h-841.143q-7.429 0-12.857-5.429t-5.429-12.857q0-96 84-162.286 110.286-86.857 229.143-181.143 3.429-2.857 20-16.857t26.286-21.429 25.429-18 28.857-15.714 24.571-5.143h1.143q11.429 0 24.571 5.143t28.857 15.714 25.429 18 26.286 21.429 20 16.857q118.857 94.286 229.143 181.143 30.857 24.571 57.429 66t26.571 75.143zM1024 713.143v-621.714q0-37.714-26.857-64.571t-64.571-26.857h-841.143q-37.714 0-64.571 26.857t-26.857 64.571v621.714q0 37.714 26.857 64.571t64.571 26.857h841.143q37.714 0 64.571-26.857t26.857-64.571z" />
22
+ <glyph unicode="&#xe60c;" d="M1024 545.143v-453.714q0-37.714-26.857-64.571t-64.571-26.857h-841.143q-37.714 0-64.571 26.857t-26.857 64.571v453.714q25.143-28 57.714-49.714 206.857-140.571 284-197.143 32.571-24 52.857-37.429t54-27.429 62.857-14h1.143q29.143 0 62.857 14t54 27.429 52.857 37.429q97.143 70.286 284.571 197.143 32.571 22.286 57.143 49.714zM1024 713.143q0-45.143-28-86.286t-69.714-70.286q-214.857-149.143-267.429-185.714-5.714-4-24.286-17.429t-30.857-21.714-29.714-18.571-32.857-15.429-28.571-5.143h-1.143q-13.143 0-28.571 5.143t-32.857 15.429-29.714 18.571-30.857 21.714-24.286 17.429q-52 36.571-149.714 104.286t-117.143 81.429q-35.429 24-66.857 66t-31.429 78q0 44.571 23.714 74.286t67.714 29.714h841.143q37.143 0 64.286-26.857t27.143-64.571z" />
23
+ <glyph unicode="&#xe60d;" d="M925.714 717.714q-38.286-56-92.571-95.429 0.571-8 0.571-24 0-74.286-21.714-148.286t-66-142-105.429-120.286-147.429-83.429-184.571-31.143q-154.857 0-283.429 82.857 20-2.286 44.571-2.286 128.571 0 229.143 78.857-60 1.143-107.429 36.857t-65.143 91.143q18.857-2.857 34.857-2.857 24.571 0 48.571 6.286-64 13.143-106 63.714t-42 117.429v2.286q38.857-21.714 83.429-23.429-37.714 25.143-60 65.714t-22.286 88q0 50.286 25.143 93.143 69.143-85.143 168.286-136.286t212.286-56.857q-4.571 21.714-4.571 42.286 0 76.571 54 130.571t130.571 54q80 0 134.857-58.286 62.286 12 117.143 44.571-21.143-65.714-81.143-101.714 53.143 5.714 106.286 28.571z" horiz-adv-x="951" />
24
+ <glyph unicode="&#xe60e;" d="M199.429 593.714v-566.286h-188.571v566.286h188.571zM211.429 768.571q0.571-41.714-28.857-69.714t-77.429-28h-1.143q-46.857 0-75.429 28t-28.571 69.714q0 42.286 29.429 70t76.857 27.714 76-27.714 29.143-70zM877.714 352v-324.571h-188v302.857q0 60-23.143 94t-72.286 34q-36 0-60.286-19.714t-36.286-48.857q-6.286-17.143-6.286-46.286v-316h-188q1.143 228 1.143 369.714t-0.571 169.143l-0.571 27.429h188v-82.286h-1.143q11.429 18.286 23.429 32t32.286 29.714 49.714 24.857 65.429 8.857q97.714 0 157.143-64.857t59.429-190z" />
25
+ <glyph unicode="&#xe60f;" d="M548 944v-150.857h-89.714q-49.143 0-66.286-20.571t-17.143-61.714v-108h167.429l-22.286-169.143h-145.143v-433.714h-174.857v433.714h-145.714v169.143h145.714v124.571q0 106.286 59.429 164.857t158.286 58.571q84 0 130.286-6.857z" horiz-adv-x="585" />
26
+ <glyph unicode="&#xe610;" d="M72.571 438.857q0 93.143 38.286 178.857l209.714-574.286q-112 54.286-180 160.571t-68 234.857zM808.571 461.143q0-10.857-1.429-22t-5.714-28.286-6.571-25.143-10-33.714-10-33.143l-43.429-146.286-158.857 472q26.286 1.714 50.286 4.571 10.857 1.143 14.857 10.571t-1.429 17.714-16.286 7.714l-117.143-5.714q-42.857 0.571-115.429 5.714-6.857 0.571-11.714-2.857t-6.571-8.571-0.857-10.571 5.143-9.429 11.143-4.571l45.714-4.571 68.571-187.429-96-288-160 475.429q26.286 1.714 50.286 4.571 10.857 1.143 14.857 10.571t-1.429 17.714-16.286 7.714l-117.143-5.714q-4 0-13.143 0.286t-14.857 0.286q60 91.429 156.857 144.857t210 53.429q84 0 160.286-30.286t136.286-85.143h-5.714q-31.429 0-52.571-23.143t-21.143-54.571q0-6.857 1.143-13.714t2.286-12.286 4.571-13.143 5.143-12 6.857-12.857 7.143-12 8.286-13.714 8-13.143q36-61.143 36-121.143zM519.429 400.571l135.429-369.714q0.571-3.429 2.857-6.286-72-25.143-145.714-25.143-64 0-124 18.286zM897.143 649.714q54.286-99.429 54.286-210.857 0-119.429-59.429-220.286t-159.429-159.143l134.286 387.429q33.714 96.571 33.714 157.714 0 24-3.429 45.143zM512 950.857q104 0 198.857-40.571t163.429-109.143 109.143-163.429 40.571-198.857-40.571-198.857-109.143-163.429-163.429-109.143-198.857-40.571-198.857 40.571-163.429 109.143-109.143 163.429-40.571 198.857 40.571 198.857 109.143 163.429 163.429 109.143 198.857 40.571zM512-49.714q98.857 0 189.429 38.857t156 104.286 104.286 156 38.857 189.429-38.857 189.429-104.286 156-156 104.286-189.429 38.857-189.429-38.857-156-104.286-104.286-156-38.857-189.429 38.857-189.429 104.286-156 156-104.286 189.429-38.857z" />
27
+ <glyph unicode="&#xe611;" d="M420 496q0-20.571 18.286-40.286t44.286-38.857 51.714-42 44-59.429 18.286-81.143q0-51.429-27.429-98.857-41.143-69.714-120.571-102.571t-170.286-32.857q-75.429 0-140.857 23.714t-98 78.571q-21.143 34.286-21.143 74.857 0 46.286 25.429 85.714t67.714 65.714q74.857 46.857 230.857 57.143-18.286 24-27.143 42.286t-8.857 41.714q0 20.571 12 48.571-26.286-2.286-38.857-2.286-84.571 0-142.571 55.143t-58 139.714q0 46.857 20.571 90.857t56.571 74.857q44 37.714 104.286 56t124.286 18.286h238.857l-78.857-50.286h-74.857q42.286-36 64-76t21.714-91.429q0-41.143-14-74t-33.714-53.143-39.714-37.143-34-35.143-14-37.714zM336.571 550.857q21.714 0 44.571 9.429t37.714 24.857q30.286 32.571 30.286 90.857 0 33.143-9.714 71.429t-27.714 74-48.286 59.143-66.857 23.429q-24 0-47.143-11.143t-37.429-30q-26.857-33.714-26.857-91.429 0-26.286 5.714-55.714t18-58.857 29.714-52.857 42.857-38.286 55.143-14.857zM337.714 52q33.143 0 63.714 7.429t56.571 22.286 41.714 41.714 15.714 62.286q0 14.286-4 28t-8.286 24-15.429 23.714-16.857 20-22 19.714-20.857 16.571-23.714 17.143-20.857 14.857q-9.143 1.143-27.429 1.143-30.286 0-60-4t-61.429-14.286-55.429-26.286-39.143-42.571-15.429-60.286q0-40 20-70.571t52.286-47.429 68-25.143 72.857-8.286zM800.571 552.571h121.714v-61.714h-121.714v-125.143h-60v125.143h-121.143v61.714h121.143v124h60v-124z" horiz-adv-x="951" />
28
  </font></defs></svg>
assets/fonts/icomoon.ttf CHANGED
Binary file
assets/fonts/icomoon.woff CHANGED
Binary file
assets/js/build/leadin-admin.js CHANGED
@@ -546,7 +546,7 @@ jQuery(document).ready( function ( $ ) {
546
  $('#btn-activate-subscribe').attr('href', window.location.href + '&leadin_action=activate&power_up=subscribe_widget&redirect_to=' + encodeURIComponent(window.location.href + '&activate_popup=true&popup_position=' + $("input:radio[name='popup-position']:checked").val()));
547
  });
548
 
549
- $('#li_subscribe_vex_class, #li_subscribe_heading, #li_subscribe_text, #li_subscribe_btn_label, #li_subscribe_name_fields:checkbox, #li_subscribe_phone_field:checkbox').change( function ( e ) {
550
  var preview_link = $('#wp-admin-bar-view-site a.ab-item').attr('href') + '?preview-subscribe=1';
551
 
552
  preview_link += '&lis_heading=' + $('#li_subscribe_heading').val();
@@ -554,6 +554,7 @@ jQuery(document).ready( function ( $ ) {
554
  preview_link += '&lis_show_names=' + ( $('#li_subscribe_name_fields').is(':checked') ? 1 : 0 );
555
  preview_link += '&lis_show_phone=' + ( $('#li_subscribe_phone_field').is(':checked') ? 1 : 0 );
556
  preview_link += '&lis_btn_label=' + $('#li_subscribe_btn_label').val();
 
557
  preview_link += '&lis_vex_class=' + $('#li_subscribe_vex_class option:selected').val();
558
 
559
  $('#preview-popup-link').attr('href', preview_link);
546
  $('#btn-activate-subscribe').attr('href', window.location.href + '&leadin_action=activate&power_up=subscribe_widget&redirect_to=' + encodeURIComponent(window.location.href + '&activate_popup=true&popup_position=' + $("input:radio[name='popup-position']:checked").val()));
547
  });
548
 
549
+ $('#li_subscribe_vex_class, #li_subscribe_heading, #li_subscribe_text, #li_subscribe_btn_label, #li_subscribe_btn_color, #li_subscribe_name_fields:checkbox, #li_subscribe_phone_field:checkbox').change( function ( e ) {
550
  var preview_link = $('#wp-admin-bar-view-site a.ab-item').attr('href') + '?preview-subscribe=1';
551
 
552
  preview_link += '&lis_heading=' + $('#li_subscribe_heading').val();
554
  preview_link += '&lis_show_names=' + ( $('#li_subscribe_name_fields').is(':checked') ? 1 : 0 );
555
  preview_link += '&lis_show_phone=' + ( $('#li_subscribe_phone_field').is(':checked') ? 1 : 0 );
556
  preview_link += '&lis_btn_label=' + $('#li_subscribe_btn_label').val();
557
+ preview_link += '&lis_btn_color=' + $('#li_subscribe_btn_color').val();
558
  preview_link += '&lis_vex_class=' + $('#li_subscribe_vex_class option:selected').val();
559
 
560
  $('#preview-popup-link').attr('href', preview_link);
assets/js/build/leadin-admin.min.js CHANGED
@@ -2,7 +2,7 @@ function leadin_check_social_share_popup(){jQuery.ajax({type:"POST",url:li_admin
2
  },text:function(a,b,c,d){var e=fa||!aa&&this.forExport,f={};return d&&!this.forExport?this.html(a,b,c):(f.x=Math.round(b||0),c&&(f.y=Math.round(c)),(a||0===a)&&(f.text=a),a=this.createElement("text").attr(f),e&&a.css({position:"absolute"}),d||(a.xSetter=function(a,b,c){var e,f,d=c.childNodes;for(f=1;f<d.length;f++)e=d[f],e.getAttribute("x")===c.getAttribute("x")&&e.setAttribute("x",a);c.setAttribute(b,a)}),a)},fontMetrics:function(a){var a=a||this.style.fontSize,a=/px/.test(a)?z(a):/em/.test(a)?12*parseFloat(a):12,a=24>a?a+4:u(1.2*a),b=u(.8*a);return{h:a,b:b}},label:function(a,b,c,d,e,f,g,h,i){function j(){var a,b;a=s.element.style,J=(void 0===Va||void 0===wb||n.styles.textAlign)&&s.textStr&&s.getBBox(),n.width=(Va||J.width||0)+2*x+v,n.height=(wb||J.height||0)+2*x,na=x+o.fontMetrics(a&&a.fontSize).b,z&&(m||(a=u(-L*x),b=h?-na:0,n.box=m=d?o.symbol(d,a,b,n.width,n.height,B):o.rect(a,b,n.width,n.height,0,B[Pb]),m.attr("fill",Q).add(n)),m.isImg||m.attr(q({width:u(n.width),height:u(n.height)},B)),B=null)}function k(){var c,a=n.styles,a=a&&a.textAlign,b=v+x*(1-L);c=h?0:na,r(Va)&&J&&("center"===a||"right"===a)&&(b+={center:.5,right:1}[a]*(Va-J.width)),(b!==s.x||c!==s.y)&&(s.attr("x",b),c!==t&&s.attr("y",c)),s.x=b,s.y=c}function l(a,b){m?m.attr(a,b):B[a]=b}var m,J,Va,wb,xb,yb,na,z,o=this,n=o.g(i),s=o.text("",0,0,g).attr({zIndex:1}),L=0,x=3,v=0,y=0,B={};n.onAdd=function(){s.add(n),n.attr({text:a||"",x:b,y:c}),m&&r(e)&&n.attr({anchorX:e,anchorY:f})},n.widthSetter=function(a){Va=a},n.heightSetter=function(a){wb=a},n.paddingSetter=function(a){r(a)&&a!==x&&(x=a,k())},n.paddingLeftSetter=function(a){r(a)&&a!==v&&(v=a,k())},n.alignSetter=function(a){L={left:0,center:.5,right:1}[a]},n.textSetter=function(a){a!==t&&s.textSetter(a),j(),k()},n["stroke-widthSetter"]=function(a,b){a&&(z=!0),y=a%2/2,l(b,a)},n.strokeSetter=n.fillSetter=n.rSetter=function(a,b){"fill"===b&&a&&(z=!0),l(b,a)},n.anchorXSetter=function(a,b){e=a,l(b,a+y-xb)},n.anchorYSetter=function(a,b){f=a,l(b,a-yb)},n.xSetter=function(a){n.x=a,L&&(a-=L*((Va||J.width)+x)),xb=u(a),n.attr("translateX",xb)},n.ySetter=function(a){yb=n.y=u(a),n.attr("translateY",yb)};var A=n.css;return q(n,{css:function(a){if(a){var b={},a=w(a);p("fontSize,fontWeight,fontFamily,color,lineHeight,width,textDecoration,textShadow".split(","),function(c){a[c]!==t&&(b[c]=a[c],delete a[c])}),s.css(b)}return A.call(n,a)},getBBox:function(){return{width:J.width+2*x,height:J.height+2*x,x:J.x-x,y:J.y-x}},shadow:function(a){return m&&m.shadow(a),n},destroy:function(){W(n.element,"mouseenter"),W(n.element,"mouseleave"),s&&(s=s.destroy()),m&&(m=m.destroy()),P.prototype.destroy.call(n),n=o=j=k=l=null}})}},Za=ta,q(P.prototype,{htmlCss:function(a){var b=this.element;return(b=a&&"SPAN"===b.tagName&&a.width)&&(delete a.width,this.textWidth=b,this.updateTransform()),this.styles=q(this.styles,a),G(this.element,a),this},htmlGetBBox:function(){var a=this.element,b=this.bBox;return b||("text"===a.nodeName&&(a.style.position="absolute"),b=this.bBox={x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}),b},htmlUpdateTransform:function(){if(this.added){var a=this.renderer,b=this.element,c=this.translateX||0,d=this.translateY||0,e=this.x||0,f=this.y||0,g=this.textAlign||"left",h={left:0,center:.5,right:1}[g],i=this.shadows;if(G(b,{marginLeft:c,marginTop:d}),i&&p(i,function(a){G(a,{marginLeft:c+1,marginTop:d+1})}),this.inverted&&p(b.childNodes,function(c){a.invertChild(c,b)}),"SPAN"===b.tagName){var k,j=this.rotation,l=z(this.textWidth),o=[j,g,b.innerHTML,this.textWidth].join(",");o!==this.cTT&&(k=a.fontMetrics(b.style.fontSize).b,r(j)&&this.setSpanRotation(j,h,k),i=m(this.elemWidth,b.offsetWidth),i>l&&/[ \-]/.test(b.textContent||b.innerText)&&(G(b,{width:l+"px",display:"block",whiteSpace:"normal"}),i=l),this.getSpanCorrection(i,k,h,j,g)),G(b,{left:e+(this.xCorr||0)+"px",top:f+(this.yCorr||0)+"px"}),ib&&(k=b.offsetHeight),this.cTT=o}}else this.alignOnAdd=!0},setSpanRotation:function(a,b,c){var d={},e=Aa?"-ms-transform":ib?"-webkit-transform":Ta?"MozTransform":Ib?"-o-transform":"";d[e]=d.transform="rotate("+a+"deg)",d[e+(Ta?"Origin":"-origin")]=d.transformOrigin=100*b+"% "+c+"px",G(this.element,d)},getSpanCorrection:function(a,b,c){this.xCorr=-a*c,this.yCorr=-b}}),q(ta.prototype,{html:function(a,b,c){var d=this.createElement("span"),e=d.element,f=d.renderer;return d.textSetter=function(a){a!==e.innerHTML&&delete this.bBox,e.innerHTML=this.textStr=a},d.xSetter=d.ySetter=d.alignSetter=d.rotationSetter=function(a,b){"align"===b&&(b="textAlign"),d[b]=a,d.htmlUpdateTransform()},d.attr({text:a,x:u(b),y:u(c)}).css({position:"absolute",whiteSpace:"nowrap",fontFamily:this.style.fontFamily,fontSize:this.style.fontSize}),d.css=d.htmlCss,f.isSVG&&(d.add=function(a){var b,c=f.box.parentNode,j=[];if(this.parentGroup=a){if(b=a.div,!b){for(;a;)j.push(a),a=a.parentGroup;p(j.reverse(),function(a){var d;b=a.div=a.div||Y(Ja,{className:H(a.element,"class")},{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY||0)+"px"},b||c),d=b.style,q(a,{translateXSetter:function(b,c){d.left=b+"px",a[c]=b,a.doTransform=!0},translateYSetter:function(b,c){d.top=b+"px",a[c]=b,a.doTransform=!0},visibilitySetter:function(a,b){d[b]=a}})})}}else b=c;return b.appendChild(e),d.added=!0,d.alignOnAdd&&d.htmlUpdateTransform(),d}),d}});var X;if(!aa&&!fa){R.VMLElement=X={init:function(a,b){var c=["<",b,' filled="f" stroked="f"'],d=["position: ","absolute",";"],e=b===Ja;("shape"===b||e)&&d.push("left:0;top:0;width:1px;height:1px;"),d.push("visibility: ",e?"hidden":"visible"),c.push(' style="',d.join(""),'"/>'),b&&(c=e||"span"===b||"img"===b?c.join(""):a.prepVML(c),this.element=Y(c)),this.renderer=a},add:function(a){var b=this.renderer,c=this.element,d=b.box,d=a?a.element||a:d;return a&&a.inverted&&b.invertChild(c,d),d.appendChild(c),this.added=!0,this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform(),this.onAdd&&this.onAdd(),this},updateTransform:P.prototype.htmlUpdateTransform,setSpanRotation:function(){var a=this.rotation,b=Z(a*Ca),c=ea(a*Ca);G(this.element,{filter:a?["progid:DXImageTransform.Microsoft.Matrix(M11=",b,", M12=",-c,", M21=",c,", M22=",b,", sizingMethod='auto expand')"].join(""):Q})},getSpanCorrection:function(a,b,c,d,e){var i,f=d?Z(d*Ca):1,g=d?ea(d*Ca):0,h=m(this.elemHeight,this.element.offsetHeight);this.xCorr=0>f&&-a,this.yCorr=0>g&&-h,i=0>f*g,this.xCorr+=g*b*(i?1-c:c),this.yCorr-=f*b*(d?i?c:1-c:1),e&&"left"!==e&&(this.xCorr-=a*c*(0>f?-1:1),d&&(this.yCorr-=h*c*(0>g?-1:1)),G(this.element,{textAlign:e}))},pathToVML:function(a){for(var b=a.length,c=[];b--;)ha(a[b])?c[b]=u(10*a[b])-5:"Z"===a[b]?c[b]="x":(c[b]=a[b],!a.isArc||"wa"!==a[b]&&"at"!==a[b]||(c[b+5]===c[b+7]&&(c[b+7]+=a[b+7]>a[b+5]?1:-1),c[b+6]===c[b+8]&&(c[b+8]+=a[b+8]>a[b+6]?1:-1)));return c.join(" ")||"x"},clip:function(a){var c,b=this;return a?(c=a.members,ja(c,b),c.push(b),b.destroyClip=function(){ja(c,b)},a=a.getCSS(b)):(b.destroyClip&&b.destroyClip(),a={clip:hb?"inherit":"rect(auto)"}),b.css(a)},css:P.prototype.htmlCss,safeRemoveChild:function(a){a.parentNode&&Pa(a)},destroy:function(){return this.destroyClip&&this.destroyClip(),P.prototype.destroy.apply(this)},on:function(a,b){return this.element["on"+a]=function(){var a=I.event;a.target=a.srcElement,b(a)},this},cutOffPath:function(a,b){var c,a=a.split(/[ ,]/);return c=a.length,(9===c||11===c)&&(a[c-4]=a[c-2]=z(a[c-2])-10*b),a.join(" ")},shadow:function(a,b,c){var e,h,j,l,o,n,s,d=[],f=this.element,g=this.renderer,i=f.style,k=f.path;if(k&&"string"!=typeof k.value&&(k="x"),o=k,a){for(n=m(a.width,3),s=(a.opacity||.15)/n,e=1;3>=e;e++)l=2*n+1-2*e,c&&(o=this.cutOffPath(k.value,l+.5)),j=['<shape isShadow="true" strokeweight="',l,'" filled="false" path="',o,'" coordsize="10 10" style="',f.style.cssText,'" />'],h=Y(g.prepVML(j),null,{left:z(i.left)+m(a.offsetX,1),top:z(i.top)+m(a.offsetY,1)}),c&&(h.cutOff=l+1),j=['<stroke color="',a.color||"black",'" opacity="',s*e,'"/>'],Y(g.prepVML(j),null,null,h),b?b.element.appendChild(h):f.parentNode.insertBefore(h,f),d.push(h);this.shadows=d}return this},updateShadows:sa,setAttr:function(a,b){hb?this.element[a]=b:this.element.setAttribute(a,b)},classSetter:function(a){this.element.className=a},dashstyleSetter:function(a,b,c){(c.getElementsByTagName("stroke")[0]||Y(this.renderer.prepVML(["<stroke/>"]),null,null,c))[b]=a||"solid",this[b]=a},dSetter:function(a,b,c){var d=this.shadows,a=a||[];if(this.d=a.join(" "),c.path=a=this.pathToVML(a),d)for(c=d.length;c--;)d[c].path=d[c].cutOff?this.cutOffPath(a,d[c].cutOff):a;this.setAttr(b,a)},fillSetter:function(a,b,c){var d=c.nodeName;"SPAN"===d?c.style.color=a:"IMG"!==d&&(c.filled=a!==Q,this.setAttr("fillcolor",this.renderer.color(a,c,b,this)))},opacitySetter:sa,rotationSetter:function(a,b,c){c=c.style,this[b]=c[b]=a,c.left=-u(ea(a*Ca)+1)+"px",c.top=u(Z(a*Ca))+"px"},strokeSetter:function(a,b,c){this.setAttr("strokecolor",this.renderer.color(a,c,b))},"stroke-widthSetter":function(a,b,c){c.stroked=!!a,this[b]=a,ha(a)&&(a+="px"),this.setAttr("strokeweight",a)},titleSetter:function(a,b){this.setAttr(b,a)},visibilitySetter:function(a,b,c){"inherit"===a&&(a="visible"),this.shadows&&p(this.shadows,function(c){c.style[b]=a}),"DIV"===c.nodeName&&(a="hidden"===a?"-999em":0,hb||(c.style[b]=a?"visible":"hidden"),b="top"),c.style[b]=a},xSetter:function(a,b,c){this[b]=a,"x"===b?b="left":"y"===b&&(b="top"),this.updateClipping?(this[b]=a,this.updateClipping()):c.style[b]=a},zIndexSetter:function(a,b,c){c.style[b]=a}},X=ka(P,X),X.prototype.ySetter=X.prototype.widthSetter=X.prototype.heightSetter=X.prototype.xSetter;var ga={Element:X,isIE8:wa.indexOf("MSIE 8.0")>-1,init:function(a,b,c,d){var e;if(this.alignedObjects=[],d=this.createElement(Ja).css(q(this.getStyle(d),{position:"relative"})),e=d.element,a.appendChild(d.element),this.isVML=!0,this.box=e,this.boxWrapper=d,this.cache={},this.setSize(b,c,!1),!y.namespaces.hcv){y.namespaces.add("hcv","urn:schemas-microsoft-com:vml");try{y.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}catch(f){y.styleSheets[0].cssText+="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}}},isHidden:function(){return!this.box.offsetWidth},clipRect:function(a,b,c,d){var e=this.createElement(),f=ca(a);return q(e,{members:[],left:(f?a.x:a)+1,top:(f?a.y:b)+1,width:(f?a.width:c)-1,height:(f?a.height:d)-1,getCSS:function(a){var b=a.element,c=b.nodeName,a=a.inverted,d=this.top-("shape"===c?b.offsetTop:0),e=this.left,b=e+this.width,f=d+this.height,d={clip:"rect("+u(a?e:d)+"px,"+u(a?f:b)+"px,"+u(a?b:f)+"px,"+u(a?d:e)+"px)"};return!a&&hb&&"DIV"===c&&q(d,{width:b+"px",height:f+"px"}),d},updateClipping:function(){p(e.members,function(a){a.element&&a.css(e.getCSS(a))})}})},color:function(a,b,c,d){var f,h,i,e=this,g=/^rgba/,j=Q;if(a&&a.linearGradient?i="gradient":a&&a.radialGradient&&(i="pattern"),i){var k,l,n,s,m,J,L,r,o=a.linearGradient||a.radialGradient,x="",a=a.stops,v=[],q=function(){h=['<fill colors="'+v.join(",")+'" opacity="',m,'" o:opacity2="',s,'" type="',i,'" ',x,'focus="100%" method="any" />'],Y(e.prepVML(h),null,null,b)};if(n=a[0],r=a[a.length-1],n[0]>0&&a.unshift([0,n[1]]),r[0]<1&&a.push([1,r[1]]),p(a,function(a,b){g.test(a[1])?(f=ya(a[1]),k=f.get("rgb"),l=f.get("a")):(k=a[1],l=1),v.push(100*a[0]+"% "+k),b?(m=l,J=k):(s=l,L=k)}),"fill"===c)if("gradient"===i)c=o.x1||o[0]||0,a=o.y1||o[1]||0,n=o.x2||o[2]||0,o=o.y2||o[3]||0,x='angle="'+(90-180*U.atan((o-a)/(n-c))/ma)+'"',q();else{var w,j=o.r,t=2*j,u=2*j,y=o.cx,B=o.cy,na=b.radialReference,j=function(){na&&(w=d.getBBox(),y+=(na[0]-w.x)/w.width-.5,B+=(na[1]-w.y)/w.height-.5,t*=na[2]/w.width,u*=na[2]/w.height),x='src="'+E.global.VMLRadialGradientURL+'" size="'+t+","+u+'" origin="0.5,0.5" position="'+y+","+B+'" color2="'+L+'" ',q()};d.added?j():d.onAdd=j,j=J}else j=k}else g.test(a)&&"IMG"!==b.tagName?(f=ya(a),h=["<",c,' opacity="',f.get("a"),'"/>'],Y(this.prepVML(h),null,null,b),j=f.get("rgb")):(j=b.getElementsByTagName(c),j.length&&(j[0].opacity=1,j[0].type="solid"),j=a);return j},prepVML:function(a){var b=this.isIE8,a=a.join("");return b?(a=a.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),a=-1===a.indexOf('style="')?a.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):a.replace('style="','style="display:inline-block;behavior:url(#default#VML);')):a=a.replace("<","<hcv:"),a},text:ta.prototype.html,path:function(a){var b={coordsize:"10 10"};return La(a)?b.d=a:ca(a)&&q(b,a),this.createElement("shape").attr(b)},circle:function(a,b,c){var d=this.symbol("circle");return ca(a)&&(c=a.r,b=a.y,a=a.x),d.isCircle=!0,d.r=c,d.attr({x:a,y:b})},g:function(a){var b;return a&&(b={className:"highcharts-"+a,"class":"highcharts-"+a}),this.createElement(Ja).attr(b)},image:function(a,b,c,d,e){var f=this.createElement("img").attr({src:a});return arguments.length>1&&f.attr({x:b,y:c,width:d,height:e}),f},createElement:function(a){return"rect"===a?this.symbol(a):ta.prototype.createElement.call(this,a)},invertChild:function(a,b){var c=this,d=b.style,e="IMG"===a.tagName&&a.style;G(a,{flip:"x",left:z(d.width)-(e?z(e.top):1),top:z(d.height)-(e?z(e.left):1),rotation:-90}),p(a.childNodes,function(b){c.invertChild(b,a)})},symbols:{arc:function(a,b,c,d,e){var f=e.start,g=e.end,h=e.r||c||d,c=e.innerR,d=Z(f),i=ea(f),j=Z(g),k=ea(g);return g-f===0?["x"]:(f=["wa",a-h,b-h,a+h,b+h,a+h*d,b+h*i,a+h*j,b+h*k],e.open&&!c&&f.push("e","M",a,b),f.push("at",a-c,b-c,a+c,b+c,a+c*j,b+c*k,a+c*d,b+c*i,"x","e"),f.isArc=!0,f)},circle:function(a,b,c,d,e){return e&&(c=d=2*e.r),e&&e.isCircle&&(a-=c/2,b-=d/2),["wa",a,b,a+c,b+d,a+c,b+d/2,a+c,b+d/2,"e"]},rect:function(a,b,c,d,e){return ta.prototype.symbols[r(e)&&e.r?"callout":"square"].call(0,a,b,c,d,e)}}};R.VMLRenderer=X=function(){this.init.apply(this,arguments)},X.prototype=w(ta.prototype,ga),Za=X}ta.prototype.measureSpanWidth=function(a,b){var d,c=y.createElement("span");return d=y.createTextNode(a),c.appendChild(d),G(c,b),this.box.appendChild(c),d=c.offsetWidth,Pa(c),d};var Lb;fa&&(R.CanVGRenderer=X=function(){xa="http://www.w3.org/1999/xhtml"},X.prototype.symbols={},Lb=function(){function a(){var d,a=b.length;for(d=0;a>d;d++)b[d]();b=[]}var b=[];return{push:function(c,d){0===b.length&&Qb(d,a),b.push(c)}}}(),Za=X),Sa.prototype={addLabel:function(){var l,a=this.axis,b=a.options,c=a.chart,d=a.horiz,e=a.categories,f=a.names,g=this.pos,h=b.labels,i=a.tickPositions,d=d&&e&&!h.step&&!h.staggerLines&&!h.rotation&&c.plotWidth/i.length||!d&&(c.margin[3]||.33*c.chartWidth),j=g===i[0],k=g===i[i.length-1],f=e?m(e[g],f[g],g):g,e=this.label,o=i.info;a.isDatetimeAxis&&o&&(l=b.dateTimeLabelFormats[o.higherRanks[g]||o.unitName]),this.isFirst=j,this.isLast=k,b=a.labelFormatter.call({axis:a,chart:c,isFirst:j,isLast:k,dateTimeLabelFormat:l,value:a.isLog?da(ia(f)):f}),g=d&&{width:v(1,u(d-2*(h.padding||10)))+"px"},g=q(g,h.style),r(e)?e&&e.attr({text:b}).css(g):(l={align:a.labelAlign},ha(h.rotation)&&(l.rotation=h.rotation),d&&h.ellipsis&&(l._clipHeight=a.len/i.length),this.label=r(b)&&h.enabled?c.renderer.text(b,0,0,h.useHTML).attr(l).css(g).add(a.labelGroup):null)},getLabelSize:function(){var a=this.label,b=this.axis;return a?a.getBBox()[b.horiz?"height":"width"]:0},getLabelSides:function(){var a=this.label.getBBox(),b=this.axis,c=b.horiz,d=b.options.labels,a=c?a.width:a.height,b=c?d.x-a*{left:0,center:.5,right:1}[b.labelAlign]:0;return[b,c?a+b:a]},handleOverflow:function(a,b){var l,o,n,c=!0,d=this.axis,e=this.isFirst,f=this.isLast,g=d.horiz?b.x:b.y,h=d.reversed,i=d.tickPositions,j=this.getLabelSides(),k=j[0],j=j[1],s=this.label.line||0;if(l=d.labelEdge,o=d.justifyLabels&&(e||f),l[s]===t||g+k>l[s]?l[s]=g+j:o||(c=!1),o){l=(o=d.justifyToPlot)?d.pos:0,o=o?l+d.len:d.chart.chartWidth;do a+=e?1:-1,n=d.ticks[i[a]];while(i[a]&&(!n||n.label.line!==s));d=n&&n.label.xy&&n.label.xy.x+n.getLabelSides()[e?0:1],e&&!h||f&&h?l>g+k&&(g=l-k,n&&g+j>d&&(c=!1)):g+j>o&&(g=o-j,n&&d>g+k&&(c=!1)),b.x=g}return c},getPosition:function(a,b,c,d){var e=this.axis,f=e.chart,g=d&&f.oldChartHeight||f.chartHeight;return{x:a?e.translate(b+c,null,null,d)+e.transB:e.left+e.offset+(e.opposite?(d&&f.oldChartWidth||f.chartWidth)-e.right-e.left:0),y:a?g-e.bottom+e.offset-(e.opposite?e.height:0):g-e.translate(b+c,null,null,d)-e.transB}},getLabelPosition:function(a,b,c,d,e,f,g,h){var i=this.axis,j=i.transA,k=i.reversed,l=i.staggerLines,o=i.chart.renderer.fontMetrics(e.style.fontSize).b,n=e.rotation,a=a+e.x-(f&&d?f*j*(k?-1:1):0),b=b+e.y-(f&&!d?f*j*(k?1:-1):0);return n&&2===i.side&&(b-=o-o*Z(n*Ca)),!r(e.y)&&!n&&(b+=o-c.getBBox().height/2),l&&(c.line=g/(h||1)%l,b+=c.line*(i.labelOffset/l)),{x:a,y:b}},getMarkPath:function(a,b,c,d,e,f){return f.crispLine(["M",a,b,"L",a+(e?0:-c),b+(e?c:0)],d)},render:function(a,b,c){var d=this.axis,e=d.options,f=d.chart.renderer,g=d.horiz,h=this.type,i=this.label,j=this.pos,k=e.labels,l=this.gridLine,o=h?h+"Grid":"grid",n=h?h+"Tick":"tick",s=e[o+"LineWidth"],p=e[o+"LineColor"],J=e[o+"LineDashStyle"],L=e[n+"Length"],o=e[n+"Width"]||0,x=e[n+"Color"],r=e[n+"Position"],n=this.mark,v=k.step,q=!0,u=d.tickmarkOffset,w=this.getPosition(g,j,u,b),y=w.x,w=w.y,B=g&&y===d.pos+d.len||!g&&w===d.pos?-1:1;this.isActive=!0,s&&(j=d.getPlotLinePath(j+u,s*B,b,!0),l===t&&(l={stroke:p,"stroke-width":s},J&&(l.dashstyle=J),h||(l.zIndex=1),b&&(l.opacity=0),this.gridLine=l=s?f.path(j).attr(l).add(d.gridGroup):null),!b&&l&&j&&l[this.isNew?"attr":"animate"]({d:j,opacity:c})),o&&L&&("inside"===r&&(L=-L),d.opposite&&(L=-L),h=this.getMarkPath(y,w,L,o*B,g,f),n?n.animate({d:h,opacity:c}):this.mark=f.path(h).attr({stroke:x,"stroke-width":o,opacity:c}).add(d.axisGroup)),i&&!isNaN(y)&&(i.xy=w=this.getLabelPosition(y,w,i,g,k,u,a,v),this.isFirst&&!this.isLast&&!m(e.showFirstLabel,1)||this.isLast&&!this.isFirst&&!m(e.showLastLabel,1)?q=!1:!d.isRadial&&!k.step&&!k.rotation&&!b&&0!==c&&(q=this.handleOverflow(a,w)),v&&a%v&&(q=!1),q&&!isNaN(w.y)?(w.opacity=c,i[this.isNew?"attr":"animate"](w),this.isNew=!1):i.attr("y",-9999))},destroy:function(){Oa(this,this.axis)}},R.PlotLineOrBand=function(a,b){this.axis=a,b&&(this.options=b,this.id=b.id)},R.PlotLineOrBand.prototype={render:function(){var p,a=this,b=a.axis,c=b.horiz,d=(b.pointRange||0)/2,e=a.options,f=e.label,g=a.label,h=e.width,i=e.to,j=e.from,k=r(j)&&r(i),l=e.value,o=e.dashStyle,n=a.svgElem,s=[],J=e.color,L=e.zIndex,x=e.events,q={},t=b.chart.renderer;if(b.isLog&&(j=za(j),i=za(i),l=za(l)),h)s=b.getPlotLinePath(l,h),q={stroke:J,"stroke-width":h},o&&(q.dashstyle=o);else{if(!k)return;j=v(j,b.min-d),i=C(i,b.max+d),s=b.getPlotBandPath(j,i,e),J&&(q.fill=J),e.borderWidth&&(q.stroke=e.borderColor,q["stroke-width"]=e.borderWidth)}if(r(L)&&(q.zIndex=L),n)s?n.animate({d:s},null,n.onGetPath):(n.hide(),n.onGetPath=function(){n.show()},g&&(a.label=g=g.destroy()));else if(s&&s.length&&(a.svgElem=n=t.path(s).attr(q).add(),x))for(p in d=function(b){n.on(b,function(c){x[b].apply(a,[c])})},x)d(p);return f&&r(f.text)&&s&&s.length&&b.width>0&&b.height>0?(f=w({align:c&&k&&"center",x:c?!k&&4:10,verticalAlign:!c&&k&&"middle",y:c?k?16:10:k?6:-4,rotation:c&&!k&&90},f),g||(q={align:f.textAlign||f.align,rotation:f.rotation},r(L)&&(q.zIndex=L),a.label=g=t.text(f.text,0,0,f.useHTML).attr(q).css(f.style).add()),b=[s[1],s[4],m(s[6],s[1])],s=[s[2],s[5],m(s[7],s[2])],c=Na(b),k=Na(s),g.align(f,!1,{x:c,y:k,width:Ba(b)-c,height:Ba(s)-k}),g.show()):g&&g.hide(),a},destroy:function(){ja(this.axis.plotLinesAndBands,this),delete this.axis,Oa(this)}},la.prototype={defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,gridLineColor:"#C0C0C0",labels:N,lineColor:"#C0D0E0",lineWidth:1,minPadding:.01,maxPadding:.01,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickColor:"#C0D0E0",tickLength:10,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",tickWidth:1,title:{align:"middle",style:{color:"#707070"}},type:"linear"},defaultYAxisOptions:{endOnTick:!0,gridLineWidth:1,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8,y:3},lineWidth:0,maxPadding:.05,minPadding:.05,startOnTick:!0,tickWidth:0,title:{rotation:270,text:"Values"},stackLabels:{enabled:!1,formatter:function(){return Ga(this.total,-1)},style:N.style}},defaultLeftAxisOptions:{labels:{x:-15,y:null},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15,y:null},title:{rotation:90}},defaultBottomAxisOptions:{labels:{x:0,y:20},title:{rotation:0}},defaultTopAxisOptions:{labels:{x:0,y:-15},title:{rotation:0}},init:function(a,b){var c=b.isX;this.horiz=a.inverted?!c:c,this.coll=(this.isXAxis=c)?"xAxis":"yAxis",this.opposite=b.opposite,this.side=b.side||(this.horiz?this.opposite?0:2:this.opposite?1:3),this.setOptions(b);var d=this.options,e=d.type;this.labelFormatter=d.labels.formatter||this.defaultLabelFormatter,this.userOptions=b,this.minPixelPadding=0,this.chart=a,this.reversed=d.reversed,this.zoomEnabled=d.zoomEnabled!==!1,this.categories=d.categories||"category"===e,this.names=[],this.isLog="logarithmic"===e,this.isDatetimeAxis="datetime"===e,this.isLinked=r(d.linkedTo),this.tickmarkOffset=this.categories&&"between"===d.tickmarkPlacement?.5:0,this.ticks={},this.labelEdge=[],this.minorTicks={},this.plotLinesAndBands=[],this.alternateBands={},this.len=0,this.minRange=this.userMinRange=d.minRange||d.maxZoom,this.range=d.range,this.offset=d.offset||0,this.stacks={},this.oldStacks={},this.min=this.max=null,this.crosshair=m(d.crosshair,qa(a.options.tooltip.crosshairs)[c?0:1],!1);var f,d=this.options.events;-1===Da(this,a.axes)&&(c&&!this.isColorAxis?a.axes.splice(a.xAxis.length,0,this):a.axes.push(this),a[this.coll].push(this)),this.series=this.series||[],a.inverted&&c&&this.reversed===t&&(this.reversed=!0),this.removePlotLine=this.removePlotBand=this.removePlotBandOrLine;for(f in d)K(this,f,d[f]);this.isLog&&(this.val2lin=za,this.lin2val=ia)},setOptions:function(a){this.options=w(this.defaultOptions,this.isXAxis?{}:this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],w(E[this.coll],a))},defaultLabelFormatter:function(){var g,a=this.axis,b=this.value,c=a.categories,d=this.dateTimeLabelFormat,e=E.lang.numericSymbols,f=e&&e.length,h=a.options.labels.format,a=a.isLog?b:a.tickInterval;if(h)g=Ia(h,this);else if(c)g=b;else if(d)g=cb(d,b);else if(f&&a>=1e3)for(;f--&&g===t;)c=Math.pow(1e3,f+1),a>=c&&null!==e[f]&&(g=Ga(b/c,-1)+e[f]);return g===t&&(g=M(b)>=1e4?Ga(b,0):Ga(b,-1,t,"")),g},getSeriesExtremes:function(){var a=this,b=a.chart;a.hasVisibleSeries=!1,a.dataMin=a.dataMax=null,a.buildStacks&&a.buildStacks(),p(a.series,function(c){if(c.visible||!b.options.chart.ignoreHiddenSeries){var d;d=c.options.threshold;var e;a.hasVisibleSeries=!0,a.isLog&&0>=d&&(d=null),a.isXAxis?(d=c.xData,d.length&&(a.dataMin=C(m(a.dataMin,d[0]),Na(d)),a.dataMax=v(m(a.dataMax,d[0]),Ba(d)))):(c.getExtremes(),e=c.dataMax,c=c.dataMin,r(c)&&r(e)&&(a.dataMin=C(m(a.dataMin,c),c),a.dataMax=v(m(a.dataMax,e),e)),r(d)&&(a.dataMin>=d?(a.dataMin=d,a.ignoreMinPadding=!0):a.dataMax<d&&(a.dataMax=d,a.ignoreMaxPadding=!0)))}})},translate:function(a,b,c,d,e,f){var g=1,h=0,i=d?this.oldTransA:this.transA,d=d?this.oldMin:this.min,j=this.minPixelPadding,e=(this.options.ordinal||this.isLog&&e)&&this.lin2val;return i||(i=this.transA),c&&(g*=-1,h=this.len),this.reversed&&(g*=-1,h-=g*(this.sector||this.len)),b?(a=a*g+h,a-=j,a=a/i+d,e&&(a=this.lin2val(a))):(e&&(a=this.val2lin(a)),"between"===f&&(f=.5),a=g*(a-d)*i+h+g*j+(ha(f)?i*f*this.pointRange:0)),a},toPixels:function(a,b){return this.translate(a,!1,!this.horiz,null,!0)+(b?0:this.pos)},toValue:function(a,b){return this.translate(a-(b?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(a,b,c,d,e){var i,j,o,f=this.chart,g=this.left,h=this.top,k=c&&f.oldChartHeight||f.chartHeight,l=c&&f.oldChartWidth||f.chartWidth;return i=this.transB,e=m(e,this.translate(a,null,null,c)),a=c=u(e+i),i=j=u(k-e-i),isNaN(e)?o=!0:this.horiz?(i=h,j=k-this.bottom,(g>a||a>g+this.width)&&(o=!0)):(a=g,c=l-this.right,(h>i||i>h+this.height)&&(o=!0)),o&&!d?null:f.renderer.crispLine(["M",a,i,"L",c,j],b||1)},getLinearTickPositions:function(a,b,c){var d,e=da(T(b/a)*a),f=da(Ka(c/a)*a),g=[];if(b===c&&ha(b))return[b];for(b=e;f>=b&&(g.push(b),b=da(b+a),b!==d);)d=b;return g},getMinorTickPositions:function(){var e,a=this.options,b=this.tickPositions,c=this.minorTickInterval,d=[];if(this.isLog)for(e=b.length,a=1;e>a;a++)d=d.concat(this.getLogTickPositions(c,b[a-1],b[a],!0));else if(this.isDatetimeAxis&&"auto"===a.minorTickInterval)d=d.concat(this.getTimeTicks(this.normalizeTimeTickInterval(c),this.min,this.max,a.startOfWeek)),d[0]<this.min&&d.shift();else for(b=this.min+(b[0]-this.min)%c;b<=this.max;b+=c)d.push(b);return d},adjustForMinRange:function(){var d,f,g,h,i,j,a=this.options,b=this.min,c=this.max,e=this.dataMax-this.dataMin>=this.minRange;if(this.isXAxis&&this.minRange===t&&!this.isLog&&(r(a.min)||r(a.max)?this.minRange=null:(p(this.series,function(a){for(i=a.xData,g=j=a.xIncrement?1:i.length-1;g>0;g--)h=i[g]-i[g-1],(f===t||f>h)&&(f=h)}),this.minRange=C(5*f,this.dataMax-this.dataMin))),c-b<this.minRange){var k=this.minRange;d=(k-c+b)/2,d=[b-d,m(a.min,b-d)],e&&(d[2]=this.dataMin),b=Ba(d),c=[b+k,m(a.max,b+k)],e&&(c[2]=this.dataMax),c=Na(c),k>c-b&&(d[0]=c-k,d[1]=m(a.min,c-k),b=Ba(d))}this.min=b,this.max=c},setAxisTranslation:function(a){var e,b=this,c=b.max-b.min,d=b.axisPointRange||0,f=0,g=0,h=b.linkedParent,i=!!b.categories,j=b.transA;(b.isXAxis||i||d)&&(h?(f=h.minPointOffset,g=h.pointRangePadding):p(b.series,function(a){var h=i?1:b.isXAxis?a.pointRange:b.axisPointRange||0,j=a.options.pointPlacement,n=a.closestPointRange;h>c&&(h=0),d=v(d,h),f=v(f,Fa(j)?0:h/2),g=v(g,"on"===j?0:h),!a.noSharedTooltip&&r(n)&&(e=r(e)?C(e,n):n)}),h=b.ordinalSlope&&e?b.ordinalSlope/e:1,b.minPointOffset=f*=h,b.pointRangePadding=g*=h,b.pointRange=C(d,c),b.closestPointRange=e),a&&(b.oldTransA=j),b.translationSlope=b.transA=j=b.len/(c+g||1),b.transB=b.horiz?b.left:b.bottom,b.minPixelPadding=j*f},setTickPositions:function(a){var s,b=this,c=b.chart,d=b.options,e=b.isLog,f=b.isDatetimeAxis,g=b.isXAxis,h=b.isLinked,i=b.options.tickPositioner,j=d.maxPadding,k=d.minPadding,l=d.tickInterval,o=d.minTickInterval,n=d.tickPixelInterval,$=b.categories;h?(b.linkedParent=c[b.coll][d.linkedTo],c=b.linkedParent.getExtremes(),b.min=m(c.min,c.dataMin),b.max=m(c.max,c.dataMax),d.type!==b.linkedParent.options.type&&ra(11,1)):(b.min=m(b.userMin,d.min,b.dataMin),b.max=m(b.userMax,d.max,b.dataMax)),e&&(!a&&C(b.min,m(b.dataMin,b.min))<=0&&ra(10,1),b.min=da(za(b.min)),b.max=da(za(b.max))),b.range&&r(b.max)&&(b.userMin=b.min=v(b.min,b.max-b.range),b.userMax=b.max,b.range=null),b.beforePadding&&b.beforePadding(),b.adjustForMinRange(),$||b.axisPointRange||b.usePercentage||h||!r(b.min)||!r(b.max)||!(c=b.max-b.min)||(r(d.min)||r(b.userMin)||!k||!(b.dataMin<0)&&b.ignoreMinPadding||(b.min-=c*k),r(d.max)||r(b.userMax)||!j||!(b.dataMax>0)&&b.ignoreMaxPadding||(b.max+=c*j)),ha(d.floor)&&(b.min=v(b.min,d.floor)),ha(d.ceiling)&&(b.max=C(b.max,d.ceiling)),b.min===b.max||void 0===b.min||void 0===b.max?b.tickInterval=1:h&&!l&&n===b.linkedParent.options.tickPixelInterval?b.tickInterval=b.linkedParent.tickInterval:(b.tickInterval=m(l,$?1:(b.max-b.min)*n/v(b.len,n)),!r(l)&&b.len<n&&!this.isRadial&&!this.isLog&&!$&&d.startOnTick&&d.endOnTick&&(s=!0,b.tickInterval/=4)),g&&!a&&p(b.series,function(a){a.processData(b.min!==b.oldMin||b.max!==b.oldMax)}),b.setAxisTranslation(!0),b.beforeSetTickPositions&&b.beforeSetTickPositions(),b.postProcessTickInterval&&(b.tickInterval=b.postProcessTickInterval(b.tickInterval)),b.pointRange&&(b.tickInterval=v(b.pointRange,b.tickInterval)),!l&&b.tickInterval<o&&(b.tickInterval=o),f||e||l||(b.tickInterval=nb(b.tickInterval,null,mb(b.tickInterval),d)),b.minorTickInterval="auto"===d.minorTickInterval&&b.tickInterval?b.tickInterval/5:d.minorTickInterval,b.tickPositions=a=d.tickPositions?[].concat(d.tickPositions):i&&i.apply(b,[b.min,b.max]),a||(!b.ordinalPositions&&(b.max-b.min)/b.tickInterval>v(2*b.len,200)&&ra(19,!0),a=f?b.getTimeTicks(b.normalizeTimeTickInterval(b.tickInterval,d.units),b.min,b.max,d.startOfWeek,b.ordinalPositions,b.closestPointRange,!0):e?b.getLogTickPositions(b.tickInterval,b.min,b.max):b.getLinearTickPositions(b.tickInterval,b.min,b.max),s&&a.splice(1,a.length-2),b.tickPositions=a),h||(e=a[0],f=a[a.length-1],h=b.minPointOffset||0,d.startOnTick?b.min=e:b.min-h>e&&a.shift(),d.endOnTick?b.max=f:b.max+h<f&&a.pop(),1===a.length&&(d=M(b.max)>1e13?1:.001,b.min-=d,b.max+=d))},setMaxTicks:function(){var a=this.chart,b=a.maxTicks||{},c=this.tickPositions,d=this._maxTicksKey=[this.coll,this.pos,this.len].join("-");!this.isLinked&&!this.isDatetimeAxis&&c&&c.length>(b[d]||0)&&this.options.alignTicks!==!1&&(b[d]=c.length),a.maxTicks=b},adjustTickAmount:function(){var a=this._maxTicksKey,b=this.tickPositions,c=this.chart.maxTicks;if(c&&c[a]&&!this.isDatetimeAxis&&!this.categories&&!this.isLinked&&this.options.alignTicks!==!1&&this.min!==t){var d=this.tickAmount,e=b.length;if(this.tickAmount=a=c[a],a>e){for(;b.length<a;)b.push(da(b[b.length-1]+this.tickInterval));this.transA*=(e-1)/(a-1),this.max=b[b.length-1]}r(d)&&a!==d&&(this.isDirty=!0)}},setScale:function(){var b,c,d,e,a=this.stacks;if(this.oldMin=this.min,this.oldMax=this.max,this.oldAxisLength=this.len,this.setAxisSize(),e=this.len!==this.oldAxisLength,p(this.series,function(a){(a.isDirtyData||a.isDirty||a.xAxis.isDirty)&&(d=!0)}),e||d||this.isLinked||this.forceRedraw||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax){if(!this.isXAxis)for(b in a)for(c in a[b])a[b][c].total=null,a[b][c].cum=0;this.forceRedraw=!1,this.getSeriesExtremes(),this.setTickPositions(),this.oldUserMin=this.userMin,this.oldUserMax=this.userMax,this.isDirty||(this.isDirty=e||this.min!==this.oldMin||this.max!==this.oldMax)}else if(!this.isXAxis){this.oldStacks&&(a=this.stacks=this.oldStacks);for(b in a)for(c in a[b])a[b][c].cum=a[b][c].total}this.setMaxTicks()},setExtremes:function(a,b,c,d,e){var f=this,g=f.chart,c=m(c,!0),e=q(e,{min:a,max:b});D(f,"setExtremes",e,function(){f.userMin=a,f.userMax=b,f.eventArgs=e,f.isDirtyExtremes=!0,c&&g.redraw(d)})},zoom:function(a,b){var c=this.dataMin,d=this.dataMax,e=this.options;return this.allowZoomOutside||(r(c)&&a<=C(c,m(e.min,c))&&(a=t),r(d)&&b>=v(d,m(e.max,d))&&(b=t)),this.displayBtn=a!==t||b!==t,this.setExtremes(a,b,!1,t,{trigger:"zoom"}),!0},setAxisSize:function(){var a=this.chart,b=this.options,c=b.offsetLeft||0,d=this.horiz,e=m(b.width,a.plotWidth-c+(b.offsetRight||0)),f=m(b.height,a.plotHeight),g=m(b.top,a.plotTop),b=m(b.left,a.plotLeft+c),c=/%$/;c.test(f)&&(f=parseInt(f,10)/100*a.plotHeight),c.test(g)&&(g=parseInt(g,10)/100*a.plotHeight+a.plotTop),this.left=b,this.top=g,this.width=e,this.height=f,this.bottom=a.chartHeight-f-g,this.right=a.chartWidth-e-b,this.len=v(d?e:f,0),this.pos=d?b:g},getExtremes:function(){var a=this.isLog;return{min:a?da(ia(this.min)):this.min,max:a?da(ia(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var b=this.isLog,c=b?ia(this.min):this.min,b=b?ia(this.max):this.max;return c>a||null===a?a=c:a>b&&(a=b),this.translate(a,0,1,0,1)},autoLabelAlign:function(a){return a=(m(a,0)-90*this.side+720)%360,a>15&&165>a?"right":a>195&&345>a?"left":"center"},getOffset:function(){var j,l,q,y,z,A,B,a=this,b=a.chart,c=b.renderer,d=a.options,e=a.tickPositions,f=a.ticks,g=a.horiz,h=a.side,i=b.inverted?[1,0,3,2][h]:h,k=0,o=0,n=d.title,s=d.labels,$=0,J=b.axisOffset,L=b.clipOffset,x=[-1,1,1,-1][h],u=1,w=m(s.maxStaggerLines,5),na=2===h?c.fontMetrics(s.style.fontSize).b:0;if(a.hasData=j=a.hasVisibleSeries||r(a.min)&&r(a.max)&&!!e,a.showAxis=b=j||m(d.showEmpty,!0),a.staggerLines=a.horiz&&s.staggerLines,a.axisGroup||(a.gridGroup=c.g("grid").attr({zIndex:d.gridZIndex||1}).add(),a.axisGroup=c.g("axis").attr({zIndex:d.zIndex||2}).add(),a.labelGroup=c.g("axis-labels").attr({zIndex:s.zIndex||7}).addClass("highcharts-"+a.coll.toLowerCase()+"-labels").add()),j||a.isLinked){if(a.labelAlign=m(s.align||a.autoLabelAlign(s.rotation)),p(e,function(b){f[b]?f[b].addLabel():f[b]=new Sa(a,b)
3
  }),a.horiz&&!a.staggerLines&&w&&!s.rotation){for(q=a.reversed?[].concat(e).reverse():e;w>u;){for(j=[],y=!1,s=0;s<q.length;s++)z=q[s],A=(A=f[z].label&&f[z].label.getBBox())?A.width:0,B=s%u,A&&(z=a.translate(z),j[B]!==t&&z<j[B]&&(y=!0),j[B]=z+A);if(!y)break;u++}u>1&&(a.staggerLines=u)}p(e,function(b){(0===h||2===h||{1:"left",3:"right"}[h]===a.labelAlign)&&($=v(f[b].getLabelSize(),$))}),a.staggerLines&&($*=a.staggerLines,a.labelOffset=$)}else for(q in f)f[q].destroy(),delete f[q];n&&n.text&&n.enabled!==!1&&(a.axisTitle||(a.axisTitle=c.text(n.text,0,0,n.useHTML).attr({zIndex:7,rotation:n.rotation||0,align:n.textAlign||{low:"left",middle:"center",high:"right"}[n.align]}).addClass("highcharts-"+this.coll.toLowerCase()+"-title").css(n.style).add(a.axisGroup),a.axisTitle.isNew=!0),b&&(k=a.axisTitle.getBBox()[g?"height":"width"],o=m(n.margin,g?5:10),l=n.offset),a.axisTitle[b?"show":"hide"]()),a.offset=x*m(d.offset,J[h]),a.axisTitleMargin=m(l,$+o+($&&x*d.labels[g?"y":"x"]-na)),J[h]=v(J[h],a.axisTitleMargin+k+x*a.offset),L[i]=v(L[i],2*T(d.lineWidth/2))},getLinePath:function(a){var b=this.chart,c=this.opposite,d=this.offset,e=this.horiz,f=this.left+(c?this.width:0)+d,d=b.chartHeight-this.bottom-(c?this.height:0)+d;return c&&(a*=-1),b.renderer.crispLine(["M",e?this.left:f,e?d:this.top,"L",e?b.chartWidth-this.right:f,e?d:b.chartHeight-this.bottom],a)},getTitlePosition:function(){var a=this.horiz,b=this.left,c=this.top,d=this.len,e=this.options.title,f=a?b:c,g=this.opposite,h=this.offset,i=z(e.style.fontSize||12),d={low:f+(a?0:d),middle:f+d/2,high:f+(a?d:0)}[e.align],b=(a?c+this.height:b)+(a?1:-1)*(g?-1:1)*this.axisTitleMargin+(2===this.side?i:0);return{x:a?d:b+(g?this.width:0)+h+(e.x||0),y:a?b-(g?this.height:0)+h:d+(e.y||0)}},render:function(){var j,u,z,a=this,b=a.horiz,c=a.reversed,d=a.chart,e=d.renderer,f=a.options,g=a.isLog,h=a.isLinked,i=a.tickPositions,k=a.axisTitle,l=a.ticks,o=a.minorTicks,n=a.alternateBands,s=f.stackLabels,m=f.alternateGridColor,J=a.tickmarkOffset,L=f.lineWidth,x=d.hasRendered&&r(a.oldMin)&&!isNaN(a.oldMin),q=a.hasData,v=a.showAxis,w=f.labels.overflow,y=a.justifyLabels=b&&w!==!1;a.labelEdge.length=0,a.justifyToPlot="justify"===w,p([l,o,n],function(a){for(var b in a)a[b].isActive=!1}),(q||h)&&(a.minorTickInterval&&!a.categories&&p(a.getMinorTickPositions(),function(b){o[b]||(o[b]=new Sa(a,b,"minor")),x&&o[b].isNew&&o[b].render(null,!0),o[b].render(null,!1,1)}),i.length&&(j=i.slice(),(b&&c||!b&&!c)&&j.reverse(),y&&(j=j.slice(1).concat([j[0]])),p(j,function(b,c){y&&(c=c===j.length-1?0:c+1),(!h||b>=a.min&&b<=a.max)&&(l[b]||(l[b]=new Sa(a,b)),x&&l[b].isNew&&l[b].render(c,!0,.1),l[b].render(c,!1,1))}),J&&0===a.min&&(l[-1]||(l[-1]=new Sa(a,-1,null,!0)),l[-1].render(-1))),m&&p(i,function(b,c){c%2===0&&b<a.max&&(n[b]||(n[b]=new R.PlotLineOrBand(a)),u=b+J,z=i[c+1]!==t?i[c+1]+J:a.max,n[b].options={from:g?ia(u):u,to:g?ia(z):z,color:m},n[b].render(),n[b].isActive=!0)}),a._addedPlotLB||(p((f.plotLines||[]).concat(f.plotBands||[]),function(b){a.addPlotBandOrLine(b)}),a._addedPlotLB=!0)),p([l,o,n],function(a){var b,c,e=[],f=va?va.duration||500:0,g=function(){for(c=e.length;c--;)a[e[c]]&&!a[e[c]].isActive&&(a[e[c]].destroy(),delete a[e[c]])};for(b in a)a[b].isActive||(a[b].render(b,!1,0),a[b].isActive=!1,e.push(b));a!==n&&d.hasRendered&&f?f&&setTimeout(g,f):g()}),L&&(b=a.getLinePath(L),a.axisLine?a.axisLine.animate({d:b}):a.axisLine=e.path(b).attr({stroke:f.lineColor,"stroke-width":L,zIndex:7}).add(a.axisGroup),a.axisLine[v?"show":"hide"]()),k&&v&&(k[k.isNew?"attr":"animate"](a.getTitlePosition()),k.isNew=!1),s&&s.enabled&&a.renderStackTotals(),a.isDirty=!1},redraw:function(){var a=this.chart.pointer;a&&a.reset(!0),this.render(),p(this.plotLinesAndBands,function(a){a.render()}),p(this.series,function(a){a.isDirty=!0})},destroy:function(a){var d,b=this,c=b.stacks,e=b.plotLinesAndBands;a||W(b);for(d in c)Oa(c[d]),c[d]=null;for(p([b.ticks,b.minorTicks,b.alternateBands],function(a){Oa(a)}),a=e.length;a--;)e[a].destroy();p("stackTotalGroup,axisLine,axisTitle,axisGroup,cross,gridGroup,labelGroup".split(","),function(a){b[a]&&(b[a]=b[a].destroy())}),this.cross&&this.cross.destroy()},drawCrosshair:function(a,b){if(this.crosshair)if((r(b)||!m(this.crosshair.snap,!0))===!1)this.hideCrosshair();else{var c,d=this.crosshair,e=d.animation;m(d.snap,!0)?r(b)&&(c=this.chart.inverted!=this.horiz?b.plotX:this.len-b.plotY):c=this.horiz?a.chartX-this.pos:this.len-a.chartY+this.pos,c=this.isRadial?this.getPlotLinePath(this.isXAxis?b.x:m(b.stackY,b.y)):this.getPlotLinePath(null,null,null,null,c),null===c?this.hideCrosshair():this.cross?this.cross.attr({visibility:"visible"})[e?"animate":"attr"]({d:c},e):(e={"stroke-width":d.width||1,stroke:d.color||"#C0C0C0",zIndex:d.zIndex||2},d.dashStyle&&(e.dashstyle=d.dashStyle),this.cross=this.chart.renderer.path(c).attr(e).add())}},hideCrosshair:function(){this.cross&&this.cross.hide()}},q(la.prototype,{getPlotBandPath:function(a,b){var c=this.getPlotLinePath(b),d=this.getPlotLinePath(a);return d&&c?d.push(c[4],c[5],c[1],c[2]):d=null,d},addPlotBand:function(a){this.addPlotBandOrLine(a,"plotBands")},addPlotLine:function(a){this.addPlotBandOrLine(a,"plotLines")},addPlotBandOrLine:function(a,b){var c=new R.PlotLineOrBand(this,a).render(),d=this.userOptions;return c&&(b&&(d[b]=d[b]||[],d[b].push(a)),this.plotLinesAndBands.push(c)),c},removePlotBandOrLine:function(a){for(var b=this.plotLinesAndBands,c=this.options,d=this.userOptions,e=b.length;e--;)b[e].id===a&&b[e].destroy();p([c.plotLines||[],d.plotLines||[],c.plotBands||[],d.plotBands||[]],function(b){for(e=b.length;e--;)b[e].id===a&&ja(b,b[e])})}}),la.prototype.getTimeTicks=function(a,b,c,d){var h,e=[],f={},g=E.global.useUTC,i=new Date(b-Ra),j=a.unitRange,k=a.count;if(r(b)){j>=A.second&&(i.setMilliseconds(0),i.setSeconds(j>=A.minute?0:k*T(i.getSeconds()/k))),j>=A.minute&&i[Db](j>=A.hour?0:k*T(i[pb]()/k)),j>=A.hour&&i[Eb](j>=A.day?0:k*T(i[qb]()/k)),j>=A.day&&i[sb](j>=A.month?1:k*T(i[Xa]()/k)),j>=A.month&&(i[Fb](j>=A.year?0:k*T(i[fb]()/k)),h=i[gb]()),j>=A.year&&(h-=h%k,i[Gb](h)),j===A.week&&i[sb](i[Xa]()-i[rb]()+m(d,1)),b=1,Ra&&(i=new Date(i.getTime()+Ra)),h=i[gb]();for(var d=i.getTime(),l=i[fb](),o=i[Xa](),n=g?Ra:(864e5+6e4*i.getTimezoneOffset())%864e5;c>d;)e.push(d),j===A.year?d=eb(h+b*k,0):j===A.month?d=eb(h,l+b*k):g||j!==A.day&&j!==A.week?d+=j*k:d=eb(h,l,o+b*k*(j===A.day?1:7)),b++;e.push(d),p(vb(e,function(a){return j<=A.hour&&a%A.day===n}),function(a){f[a]="day"})}return e.info=q(a,{higherRanks:f,totalRange:j*k}),e},la.prototype.normalizeTimeTickInterval=function(a,b){var g,c=b||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]],d=c[c.length-1],e=A[d[0]],f=d[1];for(g=0;g<c.length&&(d=c[g],e=A[d[0]],f=d[1],!(c[g+1]&&a<=(e*f[f.length-1]+A[c[g+1][0]])/2));g++);return e===A.year&&5*e>a&&(f=[1,2,5]),c=nb(a/e,f,"year"===d[0]?v(mb(a/e),1):1),{unitRange:e,count:c,unitName:d[0]}},la.prototype.getLogTickPositions=function(a,b,c,d){var e=this.options,f=this.len,g=[];if(d||(this._minorAutoInterval=null),a>=.5)a=u(a),g=this.getLinearTickPositions(a,b,c);else if(a>=.08)for(var h,i,j,k,l,f=T(b),e=a>.3?[1,2,4]:a>.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];c+1>f&&!l;f++)for(i=e.length,h=0;i>h&&!l;h++)j=za(ia(f)*e[h]),j>b&&(!d||c>=k)&&g.push(k),k>c&&(l=!0),k=j;else b=ia(b),c=ia(c),a=e[d?"minorTickInterval":"tickInterval"],a=m("auto"===a?null:a,this._minorAutoInterval,(c-b)*(e.tickPixelInterval/(d?5:1))/((d?f/this.tickPositions.length:f)||1)),a=nb(a,null,mb(a)),g=Ua(this.getLinearTickPositions(a,b,c),za),d||(this._minorAutoInterval=a/5);return d||(this.tickInterval=a),g};var Mb=R.Tooltip=function(){this.init.apply(this,arguments)};Mb.prototype={init:function(a,b){var c=b.borderWidth,d=b.style,e=z(d.padding);this.chart=a,this.options=b,this.crosshairs=[],this.now={x:0,y:0},this.isHidden=!0,this.label=a.renderer.label("",0,0,b.shape||"callout",null,null,b.useHTML,null,"tooltip").attr({padding:e,fill:b.backgroundColor,"stroke-width":c,r:b.borderRadius,zIndex:8}).css(d).css({padding:0}).add().attr({y:-9999}),fa||this.label.shadow(b.shadow),this.shared=b.shared},destroy:function(){this.label&&(this.label=this.label.destroy()),clearTimeout(this.hideTimer),clearTimeout(this.tooltipTimeout)},move:function(a,b,c,d){var e=this,f=e.now,g=e.options.animation!==!1&&!e.isHidden,h=e.followPointer||e.len>1;q(f,{x:g?(2*f.x+a)/3:a,y:g?(f.y+b)/2:b,anchorX:h?t:g?(2*f.anchorX+c)/3:c,anchorY:h?t:g?(f.anchorY+d)/2:d}),e.label.attr(f),g&&(M(a-f.x)>1||M(b-f.y)>1)&&(clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){e&&e.move(a,b,c,d)},32))},hide:function(){var b,a=this;clearTimeout(this.hideTimer),this.isHidden||(b=this.chart.hoverPoints,this.hideTimer=setTimeout(function(){a.label.fadeOut(),a.isHidden=!0},m(this.options.hideDelay,500)),b&&p(b,function(a){a.setState()}),this.chart.hoverPoints=null)},getAnchor:function(a,b){var c,i,d=this.chart,e=d.inverted,f=d.plotTop,g=0,h=0,a=qa(a);return c=a[0].tooltipPos,this.followPointer&&b&&(b.chartX===t&&(b=d.pointer.normalize(b)),c=[b.chartX-d.plotLeft,b.chartY-f]),c||(p(a,function(a){i=a.series.yAxis,g+=a.plotX,h+=(a.plotLow?(a.plotLow+a.plotHigh)/2:a.plotY)+(!e&&i?i.top-f:0)}),g/=a.length,h/=a.length,c=[e?d.plotWidth-h:g,this.shared&&!e&&a.length>1&&b?b.chartY-f:e?d.plotHeight-g:h]),Ua(c,u)},getPosition:function(a,b,c){var g,d=this.chart,e=this.distance,f={},h=["y",d.chartHeight,b,c.plotY+d.plotTop],i=["x",d.chartWidth,a,c.plotX+d.plotLeft],j=c.ttBelow||d.inverted&&!c.negative||!d.inverted&&c.negative,k=function(a,b,c,d){var g=d-e>c,b=b>d+e+c,c=d-e-c;if(d+=e,j&&b)f[a]=d;else if(!j&&g)f[a]=c;else if(g)f[a]=c;else{if(!b)return!1;f[a]=d}},l=function(a,b,c,d){return e>d||d>b-e?!1:void(f[a]=c/2>d?1:d>b-c/2?b-c-2:d-c/2)},o=function(a){var b=h;h=i,i=b,g=a},n=function(){k.apply(0,h)!==!1?l.apply(0,i)===!1&&!g&&(o(!0),n()):g?f.x=f.y=0:(o(!0),n())};return(d.inverted||this.len>1)&&o(),n(),f},defaultFormatter:function(a){var d,b=this.points||qa(this),c=b[0].series;return d=[a.tooltipHeaderFormatter(b[0])],p(b,function(a){c=a.series,d.push(c.tooltipFormatter&&c.tooltipFormatter(a)||a.point.tooltipFormatter(c.tooltipOptions.pointFormat))}),d.push(a.options.footerFormat||""),d.join("")},refresh:function(a,b){var f,g,i,c=this.chart,d=this.label,e=this.options,h={},j=[];i=e.formatter||this.defaultFormatter;var k,h=c.hoverPoints,l=this.shared;clearTimeout(this.hideTimer),this.followPointer=qa(a)[0].series.tooltipOptions.followPointer,g=this.getAnchor(a,b),f=g[0],g=g[1],!l||a.series&&a.series.noSharedTooltip?h=a.getLabelConfig():(c.hoverPoints=a,h&&p(h,function(a){a.setState()}),p(a,function(a){a.setState("hover"),j.push(a.getLabelConfig())}),h={x:a[0].category,y:a[0].y},h.points=j,this.len=j.length,a=a[0]),i=i.call(h,this),h=a.series,this.distance=m(h.tooltipOptions.distance,16),i===!1?this.hide():(this.isHidden&&(bb(d),d.attr("opacity",1).show()),d.attr({text:i}),k=e.borderColor||a.color||h.color||"#606060",d.attr({stroke:k}),this.updatePosition({plotX:f,plotY:g,negative:a.negative,ttBelow:a.ttBelow}),this.isHidden=!1),D(c,"tooltipRefresh",{text:i,x:f+c.plotLeft,y:g+c.plotTop,borderColor:k})},updatePosition:function(a){var b=this.chart,c=this.label,c=(this.options.positioner||this.getPosition).call(this,c.width,c.height,a);this.move(u(c.x),u(c.y),a.plotX+b.plotLeft,a.plotY+b.plotTop)},tooltipHeaderFormatter:function(a){var h,b=a.series,c=b.tooltipOptions,d=c.dateTimeLabelFormats,e=c.xDateFormat,f=b.xAxis,g=f&&"datetime"===f.options.type&&ha(a.key),c=c.headerFormat,f=f&&f.closestPointRange;if(g&&!e){if(f){for(h in A)if(A[h]>=f||A[h]<=A.day&&a.key%A[h]>0){e=d[h];break}}else e=d.day;e=e||d.year}return g&&e&&(c=c.replace("{point.key}","{point.key:"+e+"}")),Ia(c,{point:a,series:b})}};var oa;$a=y.documentElement.ontouchstart!==t;var Wa=R.Pointer=function(a,b){this.init(a,b)};if(Wa.prototype={init:function(a,b){var f,c=b.chart,d=c.events,e=fa?"":c.zoomType,c=a.inverted;this.options=b,this.chart=a,this.zoomX=f=/x/.test(e),this.zoomY=e=/y/.test(e),this.zoomHor=f&&!c||e&&c,this.zoomVert=e&&!c||f&&c,this.hasZoom=f||e,this.runChartClick=d&&!!d.click,this.pinchDown=[],this.lastValidTouch={},R.Tooltip&&b.tooltip.enabled&&(a.tooltip=new Mb(a,b.tooltip),this.followTouchMove=b.tooltip.followTouchMove),this.setDOMEvents()},normalize:function(a,b){var c,d,a=a||window.event,a=Sb(a);return a.target||(a.target=a.srcElement),d=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]:a,b||(this.chartPosition=b=Rb(this.chart.container)),d.pageX===t?(c=v(a.x,a.clientX-b.left),d=a.y):(c=d.pageX-b.left,d=d.pageY-b.top),q(a,{chartX:u(c),chartY:u(d)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};return p(this.chart.axes,function(c){b[c.isXAxis?"xAxis":"yAxis"].push({axis:c,value:c.toValue(a[c.horiz?"chartX":"chartY"])})}),b},getIndex:function(a){var b=this.chart;return b.inverted?b.plotHeight+b.plotTop-a.chartY:a.chartX-b.plotLeft},runPointActions:function(a){var e,f,i,j,b=this.chart,c=b.series,d=b.tooltip,g=b.hoverPoint,h=b.hoverSeries,k=b.chartWidth,l=this.getIndex(a);if(d&&this.options.tooltip.shared&&(!h||!h.noSharedTooltip)){for(f=[],i=c.length,j=0;i>j;j++)c[j].visible&&c[j].options.enableMouseTracking!==!1&&!c[j].noSharedTooltip&&c[j].singularTooltips!==!0&&c[j].tooltipPoints.length&&(e=c[j].tooltipPoints[l])&&e.series&&(e._dist=M(l-e.clientX),k=C(k,e._dist),f.push(e));for(i=f.length;i--;)f[i]._dist>k&&f.splice(i,1);f.length&&f[0].clientX!==this.hoverX&&(d.refresh(f,a),this.hoverX=f[0].clientX)}c=h&&h.tooltipOptions.followPointer,h&&h.tracker&&!c?(e=h.tooltipPoints[l])&&e!==g&&e.onMouseOver(a):d&&c&&!d.isHidden&&(h=d.getAnchor([{}],a),d.updatePosition({plotX:h[0],plotY:h[1]})),d&&!this._onDocumentMouseMove&&(this._onDocumentMouseMove=function(a){V[oa]&&V[oa].pointer.onDocumentMouseMove(a)},K(y,"mousemove",this._onDocumentMouseMove)),p(b.axes,function(b){b.drawCrosshair(a,m(e,g))})},reset:function(a){var b=this.chart,c=b.hoverSeries,d=b.hoverPoint,e=b.tooltip,f=e&&e.shared?b.hoverPoints:d;(a=a&&e&&f)&&qa(f)[0].plotX===t&&(a=!1),a?(e.refresh(f),d&&d.setState(d.state,!0)):(d&&d.onMouseOut(),c&&c.onMouseOut(),e&&e.hide(),this._onDocumentMouseMove&&(W(y,"mousemove",this._onDocumentMouseMove),this._onDocumentMouseMove=null),p(b.axes,function(a){a.hideCrosshair()}),this.hoverX=null)},scaleGroups:function(a,b){var d,c=this.chart;p(c.series,function(e){d=a||e.getPlotBox(),e.xAxis&&e.xAxis.zoomEnabled&&(e.group.attr(d),e.markerGroup&&(e.markerGroup.attr(d),e.markerGroup.clip(b?c.clipRect:null)),e.dataLabelsGroup&&e.dataLabelsGroup.attr(d))}),c.clipRect.attr(b||c.clipBox)},dragStart:function(a){var b=this.chart;b.mouseIsDown=a.type,b.cancelClick=!1,b.mouseDownX=this.mouseDownX=a.chartX,b.mouseDownY=this.mouseDownY=a.chartY},drag:function(a){var l,b=this.chart,c=b.options.chart,d=a.chartX,e=a.chartY,f=this.zoomHor,g=this.zoomVert,h=b.plotLeft,i=b.plotTop,j=b.plotWidth,k=b.plotHeight,o=this.mouseDownX,n=this.mouseDownY;h>d?d=h:d>h+j&&(d=h+j),i>e?e=i:e>i+k&&(e=i+k),this.hasDragged=Math.sqrt(Math.pow(o-d,2)+Math.pow(n-e,2)),this.hasDragged>10&&(l=b.isInsidePlot(o-h,n-i),b.hasCartesianSeries&&(this.zoomX||this.zoomY)&&l&&!this.selectionMarker&&(this.selectionMarker=b.renderer.rect(h,i,f?1:j,g?1:k,0).attr({fill:c.selectionMarkerFill||"rgba(69,114,167,0.25)",zIndex:7}).add()),this.selectionMarker&&f&&(d-=o,this.selectionMarker.attr({width:M(d),x:(d>0?0:d)+o})),this.selectionMarker&&g&&(d=e-n,this.selectionMarker.attr({height:M(d),y:(d>0?0:d)+n})),l&&!this.selectionMarker&&c.panning&&b.pan(a,c.panning))},drop:function(a){var b=this.chart,c=this.hasPinched;if(this.selectionMarker){var i,d={xAxis:[],yAxis:[],originalEvent:a.originalEvent||a},a=this.selectionMarker,e=a.attr?a.attr("x"):a.x,f=a.attr?a.attr("y"):a.y,g=a.attr?a.attr("width"):a.width,h=a.attr?a.attr("height"):a.height;(this.hasDragged||c)&&(p(b.axes,function(a){if(a.zoomEnabled){var b=a.horiz,c=a.toValue(b?e:f),b=a.toValue(b?e+g:f+h);!isNaN(c)&&!isNaN(b)&&(d[a.coll].push({axis:a,min:C(c,b),max:v(c,b)}),i=!0)}}),i&&D(b,"selection",d,function(a){b.zoom(q(a,c?{animation:!1}:null))})),this.selectionMarker=this.selectionMarker.destroy(),c&&this.scaleGroups()}b&&(G(b.container,{cursor:b._cursor}),b.cancelClick=this.hasDragged>10,b.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(a){a=this.normalize(a),a.preventDefault&&a.preventDefault(),this.dragStart(a)},onDocumentMouseUp:function(a){V[oa]&&V[oa].pointer.drop(a)},onDocumentMouseMove:function(a){var b=this.chart,c=this.chartPosition,d=b.hoverSeries,a=this.normalize(a,c);c&&d&&!this.inClass(a.target,"highcharts-tracker")&&!b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)&&this.reset()},onContainerMouseLeave:function(){var a=V[oa];a&&(a.pointer.reset(),a.pointer.chartPosition=null)},onContainerMouseMove:function(a){var b=this.chart;oa=b.index,a=this.normalize(a),"mousedown"===b.mouseIsDown&&this.drag(a),(this.inClass(a.target,"highcharts-tracker")||b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop))&&!b.openMenu&&this.runPointActions(a)},inClass:function(a,b){for(var c;a;){if(c=H(a,"class")){if(-1!==c.indexOf(b))return!0;if(-1!==c.indexOf("highcharts-container"))return!1}a=a.parentNode}},onTrackerMouseOut:function(a){var b=this.chart.hoverSeries,c=(a=a.relatedTarget||a.toElement)&&a.point&&a.point.series;!b||b.options.stickyTracking||this.inClass(a,"highcharts-tooltip")||c===b||b.onMouseOut()},onContainerClick:function(a){var b=this.chart,c=b.hoverPoint,d=b.plotLeft,e=b.plotTop,a=this.normalize(a);a.cancelBubble=!0,b.cancelClick||(c&&this.inClass(a.target,"highcharts-tracker")?(D(c.series,"click",q(a,{point:c})),b.hoverPoint&&c.firePointEvent("click",a)):(q(a,this.getCoordinates(a)),b.isInsidePlot(a.chartX-d,a.chartY-e)&&D(b,"click",a)))},setDOMEvents:function(){var a=this,b=a.chart.container;b.onmousedown=function(b){a.onContainerMouseDown(b)},b.onmousemove=function(b){a.onContainerMouseMove(b)},b.onclick=function(b){a.onContainerClick(b)},K(b,"mouseleave",a.onContainerMouseLeave),1===ab&&K(y,"mouseup",a.onDocumentMouseUp),$a&&(b.ontouchstart=function(b){a.onContainerTouchStart(b)},b.ontouchmove=function(b){a.onContainerTouchMove(b)},1===ab&&K(y,"touchend",a.onDocumentTouchEnd))},destroy:function(){var a;W(this.chart.container,"mouseleave",this.onContainerMouseLeave),ab||(W(y,"mouseup",this.onDocumentMouseUp),W(y,"touchend",this.onDocumentTouchEnd)),clearInterval(this.tooltipTimeout);for(a in this)this[a]=null}},q(R.Pointer.prototype,{pinchTranslate:function(a,b,c,d,e,f){(this.zoomHor||this.pinchHor)&&this.pinchTranslateDirection(!0,a,b,c,d,e,f),(this.zoomVert||this.pinchVert)&&this.pinchTranslateDirection(!1,a,b,c,d,e,f)},pinchTranslateDirection:function(a,b,c,d,e,f,g,h){var s,m,y,i=this.chart,j=a?"x":"y",k=a?"X":"Y",l="chart"+k,o=a?"width":"height",n=i["plot"+(a?"Left":"Top")],p=h||1,q=i.inverted,x=i.bounds[a?"h":"v"],r=1===b.length,v=b[0][l],u=c[0][l],t=!r&&b[1][l],w=!r&&c[1][l],c=function(){!r&&M(v-t)>20&&(p=h||M(u-w)/M(v-t)),m=(n-u)/p+v,s=i["plot"+(a?"Width":"Height")]/p};c(),b=m,b<x.min?(b=x.min,y=!0):b+s>x.max&&(b=x.max-s,y=!0),y?(u-=.8*(u-g[j][0]),r||(w-=.8*(w-g[j][1])),c()):g[j]=[u,w],q||(f[j]=m-n,f[o]=s),f=q?1/p:p,e[o]=s,e[j]=b,d[q?a?"scaleY":"scaleX":"scale"+k]=p,d["translate"+k]=f*n+(u-f*v)},pinch:function(a){var b=this,c=b.chart,d=b.pinchDown,e=b.followTouchMove,f=a.touches,g=f.length,h=b.lastValidTouch,i=b.hasZoom,j=b.selectionMarker,k={},l=1===g&&(b.inClass(a.target,"highcharts-tracker")&&c.runTrackerClick||c.runChartClick),o={};(i||e)&&!l&&a.preventDefault(),Ua(f,function(a){return b.normalize(a)}),"touchstart"===a.type?(p(f,function(a,b){d[b]={chartX:a.chartX,chartY:a.chartY}}),h.x=[d[0].chartX,d[1]&&d[1].chartX],h.y=[d[0].chartY,d[1]&&d[1].chartY],p(c.axes,function(a){if(a.zoomEnabled){var b=c.bounds[a.horiz?"h":"v"],d=a.minPixelPadding,e=a.toPixels(a.dataMin),f=a.toPixels(a.dataMax),g=C(e,f),e=v(e,f);b.min=C(a.pos,g-d),b.max=v(a.pos+a.len,e+d)}})):d.length&&(j||(b.selectionMarker=j=q({destroy:sa},c.plotBox)),b.pinchTranslate(d,f,k,j,o,h),b.hasPinched=i,b.scaleGroups(k,o),!i&&e&&1===g&&this.runPointActions(b.normalize(a)))},onContainerTouchStart:function(a){var b=this.chart;oa=b.index,1===a.touches.length?(a=this.normalize(a),b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)?(this.runPointActions(a),this.pinch(a)):this.reset()):2===a.touches.length&&this.pinch(a)},onContainerTouchMove:function(a){(1===a.touches.length||2===a.touches.length)&&this.pinch(a)},onDocumentTouchEnd:function(a){V[oa]&&V[oa].pointer.drop(a)}}),I.PointerEvent||I.MSPointerEvent){var ua={},zb=!!I.PointerEvent,Wb=function(){var a,b=[];b.item=function(a){return this[a]};for(a in ua)ua.hasOwnProperty(a)&&b.push({pageX:ua[a].pageX,pageY:ua[a].pageY,target:ua[a].target});return b},Ab=function(a,b,c,d){a=a.originalEvent||a,"touch"!==a.pointerType&&a.pointerType!==a.MSPOINTER_TYPE_TOUCH||!V[oa]||(d(a),d=V[oa].pointer,d[b]({type:c,target:a.currentTarget,preventDefault:sa,touches:Wb()}))};q(Wa.prototype,{onContainerPointerDown:function(a){Ab(a,"onContainerTouchStart","touchstart",function(a){ua[a.pointerId]={pageX:a.pageX,pageY:a.pageY,target:a.currentTarget}})},onContainerPointerMove:function(a){Ab(a,"onContainerTouchMove","touchmove",function(a){ua[a.pointerId]={pageX:a.pageX,pageY:a.pageY},ua[a.pointerId].target||(ua[a.pointerId].target=a.currentTarget)})},onDocumentPointerUp:function(a){Ab(a,"onContainerTouchEnd","touchend",function(a){delete ua[a.pointerId]})},batchMSEvents:function(a){a(this.chart.container,zb?"pointerdown":"MSPointerDown",this.onContainerPointerDown),a(this.chart.container,zb?"pointermove":"MSPointerMove",this.onContainerPointerMove),a(y,zb?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}}),Ma(Wa.prototype,"init",function(a,b,c){a.call(this,b,c),(this.hasZoom||this.followTouchMove)&&G(b.container,{"-ms-touch-action":Q,"touch-action":Q})}),Ma(Wa.prototype,"setDOMEvents",function(a){a.apply(this),(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(K)}),Ma(Wa.prototype,"destroy",function(a){this.batchMSEvents(W),a.call(this)})}var lb=R.Legend=function(a,b){this.init(a,b)};lb.prototype={init:function(a,b){var c=this,d=b.itemStyle,e=m(b.padding,8),f=b.itemMarginTop||0;this.options=b,b.enabled&&(c.baseline=z(d.fontSize)+3+f,c.itemStyle=d,c.itemHiddenStyle=w(d,b.itemHiddenStyle),c.itemMarginTop=f,c.padding=e,c.initialItemX=e,c.initialItemY=e-5,c.maxItemWidth=0,c.chart=a,c.itemHeight=0,c.lastLineHeight=0,c.symbolWidth=m(b.symbolWidth,16),c.pages=[],c.render(),K(c.chart,"endResize",function(){c.positionCheckboxes()}))},colorizeItem:function(a,b){var j,c=this.options,d=a.legendItem,e=a.legendLine,f=a.legendSymbol,g=this.itemHiddenStyle.color,c=b?c.itemStyle.color:g,h=b?a.legendColor||a.color||"#CCC":g,g=a.options&&a.options.marker,i={fill:h};if(d&&d.css({fill:c,color:c}),e&&e.attr({stroke:h}),f){if(g&&f.isMarker)for(j in i.stroke=h,g=a.convertAttribs(g))d=g[j],d!==t&&(i[j]=d);f.attr(i)}},positionItem:function(a){var b=this.options,c=b.symbolPadding,b=!b.rtl,d=a._legendItemPos,e=d[0],d=d[1],f=a.checkbox;a.legendGroup&&a.legendGroup.translate(b?e:this.legendWidth-e-2*c-4,d),f&&(f.x=e,f.y=d)},destroyItem:function(a){var b=a.checkbox;p(["legendItem","legendLine","legendSymbol","legendGroup"],function(b){a[b]&&(a[b]=a[b].destroy())}),b&&Pa(a.checkbox)},destroy:function(){var a=this.group,b=this.box;b&&(this.box=b.destroy()),a&&(this.group=a.destroy())},positionCheckboxes:function(a){var c,b=this.group.alignAttr,d=this.clipHeight||this.legendHeight;b&&(c=b.translateY,p(this.allItems,function(e){var g,f=e.checkbox;f&&(g=c+f.y+(a||0)+3,G(f,{left:b.translateX+e.checkboxOffset+f.x-20+"px",top:g+"px",display:g>c-6&&c+d-6>g?"":Q}))}))},renderTitle:function(){var a=this.padding,b=this.options.title,c=0;b.text&&(this.title||(this.title=this.chart.renderer.label(b.text,a-3,a-4,null,null,null,null,null,"legend-title").attr({zIndex:1}).css(b.style).add(this.group)),a=this.title.getBBox(),c=a.height,this.offsetWidth=a.width,this.contentGroup.attr({translateY:c})),this.titleHeight=c},renderItem:function(a){var b=this.chart,c=b.renderer,d=this.options,e="horizontal"===d.layout,f=this.symbolWidth,g=d.symbolPadding,h=this.itemStyle,i=this.itemHiddenStyle,j=this.padding,k=e?m(d.itemDistance,20):0,l=!d.rtl,o=d.width,n=d.itemMarginBottom||0,s=this.itemMarginTop,p=this.initialItemX,q=a.legendItem,r=a.series&&a.series.drawLegendSymbol?a.series:a,x=r.options,x=this.createCheckboxForItem&&x&&x.showCheckbox,t=d.useHTML;q||(a.legendGroup=c.g("legend-item").attr({zIndex:1}).add(this.scrollGroup),r.drawLegendSymbol(this,a),a.legendItem=q=c.text(d.labelFormat?Ia(d.labelFormat,a):d.labelFormatter.call(a),l?f+g:-g,this.baseline,t).css(w(a.visible?h:i)).attr({align:l?"left":"right",zIndex:2}).add(a.legendGroup),this.setItemEvents&&this.setItemEvents(a,q,t,h,i),this.colorizeItem(a,a.visible),x&&this.createCheckboxForItem(a)),c=q.getBBox(),f=a.checkboxOffset=d.itemWidth||a.legendItemWidth||f+g+c.width+k+(x?20:0),this.itemHeight=g=u(a.legendItemHeight||c.height),e&&this.itemX-p+f>(o||b.chartWidth-2*j-p-d.x)&&(this.itemX=p,this.itemY+=s+this.lastLineHeight+n,this.lastLineHeight=0),this.maxItemWidth=v(this.maxItemWidth,f),this.lastItemY=s+this.itemY+n,this.lastLineHeight=v(g,this.lastLineHeight),a._legendItemPos=[this.itemX,this.itemY],e?this.itemX+=f:(this.itemY+=s+g+n,this.lastLineHeight=g),this.offsetWidth=o||v((e?this.itemX-p-k:f)+j,this.offsetWidth)},getAllItems:function(){var a=[];return p(this.chart.series,function(b){var c=b.options;m(c.showInLegend,r(c.linkedTo)?!1:t,!0)&&(a=a.concat(b.legendItems||("point"===c.legendType?b.data:b)))}),a},render:function(){var e,f,g,h,a=this,b=a.chart,c=b.renderer,d=a.group,i=a.box,j=a.options,k=a.padding,l=j.borderWidth,o=j.backgroundColor;a.itemX=a.initialItemX,a.itemY=a.initialItemY,a.offsetWidth=0,a.lastItemY=0,d||(a.group=d=c.g("legend").attr({zIndex:7}).add(),a.contentGroup=c.g().attr({zIndex:1}).add(d),a.scrollGroup=c.g().add(a.contentGroup)),a.renderTitle(),e=a.getAllItems(),ob(e,function(a,b){return(a.options&&a.options.legendIndex||0)-(b.options&&b.options.legendIndex||0)}),j.reversed&&e.reverse(),a.allItems=e,a.display=f=!!e.length,p(e,function(b){a.renderItem(b)}),g=j.width||a.offsetWidth,h=a.lastItemY+a.lastLineHeight+a.titleHeight,h=a.handleOverflow(h),(l||o)&&(g+=k,h+=k,i?g>0&&h>0&&(i[i.isNew?"attr":"animate"](i.crisp({width:g,height:h})),i.isNew=!1):(a.box=i=c.rect(0,0,g,h,j.borderRadius,l||0).attr({stroke:j.borderColor,"stroke-width":l||0,fill:o||Q}).add(d).shadow(j.shadow),i.isNew=!0),i[f?"show":"hide"]()),a.legendWidth=g,a.legendHeight=h,p(e,function(b){a.positionItem(b)}),f&&d.align(q({width:g,height:h},j),!0,"spacingBox"),b.isResizing||this.positionCheckboxes()},handleOverflow:function(a){var h,s,b=this,c=this.chart,d=c.renderer,e=this.options,f=e.y,f=c.spacingBox.height+("top"===e.verticalAlign?-f:f)-this.padding,g=e.maxHeight,i=this.clipRect,j=e.navigation,k=m(j.animation,!0),l=j.arrowSize||12,o=this.nav,n=this.pages,q=this.allItems;return"horizontal"===e.layout&&(f/=2),g&&(f=C(f,g)),n.length=0,a>f&&!e.useHTML?(this.clipHeight=h=f-20-this.titleHeight-this.padding,this.currentPage=m(this.currentPage,1),this.fullHeight=a,p(q,function(a,b){var c=a._legendItemPos[1],d=u(a.legendItem.getBBox().height),e=n.length;(!e||c-n[e-1]>h&&(s||c)!==n[e-1])&&(n.push(s||c),e++),b===q.length-1&&c+d-n[e-1]>h&&n.push(c),c!==s&&(s=c)}),i||(i=b.clipRect=d.clipRect(0,this.padding,9999,0),b.contentGroup.clip(i)),i.attr({height:h}),o||(this.nav=o=d.g().attr({zIndex:1}).add(this.group),this.up=d.symbol("triangle",0,0,l,l).on("click",function(){b.scroll(-1,k)}).add(o),this.pager=d.text("",15,10).css(j.style).add(o),this.down=d.symbol("triangle-down",0,0,l,l).on("click",function(){b.scroll(1,k)}).add(o)),b.scroll(0),a=f):o&&(i.attr({height:c.chartHeight}),o.hide(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),a},scroll:function(a,b){var c=this.pages,d=c.length,e=this.currentPage+a,f=this.clipHeight,g=this.options.navigation,h=g.activeColor,g=g.inactiveColor,i=this.pager,j=this.padding;e>d&&(e=d),e>0&&(b!==t&&Qa(b,this.chart),this.nav.attr({translateX:j,translateY:f+this.padding+7+this.titleHeight,visibility:"visible"}),this.up.attr({fill:1===e?g:h}).css({cursor:1===e?"default":"pointer"}),i.attr({text:e+"/"+d}),this.down.attr({x:18+this.pager.getBBox().width,fill:e===d?g:h}).css({cursor:e===d?"default":"pointer"}),c=-c[e-1]+this.initialItemY,this.scrollGroup.animate({translateY:c}),this.currentPage=e,this.positionCheckboxes(c))}},N=R.LegendSymbolMixin={drawRectangle:function(a,b){var c=a.options.symbolHeight||12;b.legendSymbol=this.chart.renderer.rect(0,a.baseline-5-c/2,a.symbolWidth,c,a.options.symbolRadius||0).attr({zIndex:3}).add(b.legendGroup)},drawLineMarker:function(a){var d,b=this.options,c=b.marker;d=a.symbolWidth;var g,e=this.chart.renderer,f=this.legendGroup,a=a.baseline-u(.3*e.fontMetrics(a.options.itemStyle.fontSize).b);b.lineWidth&&(g={"stroke-width":b.lineWidth},b.dashStyle&&(g.dashstyle=b.dashStyle),this.legendLine=e.path(["M",0,a,"L",d,a]).attr(g).add(f)),c&&c.enabled!==!1&&(b=c.radius,this.legendSymbol=d=e.symbol(this.symbol,d/2-b,a-b,2*b,2*b).add(f),d.isMarker=!0)}},(/Trident\/7\.0/.test(wa)||Ta)&&Ma(lb.prototype,"positionItem",function(a,b){var c=this,d=function(){b._legendItemPos&&a.call(c,b)};d(),setTimeout(d)}),Ya.prototype={init:function(a,b){var c,d=a.series;a.series=null,c=w(E,a),c.series=a.series=d,this.userOptions=a,d=c.chart,this.margin=this.splashArray("margin",d),this.spacing=this.splashArray("spacing",d);var e=d.events;this.bounds={h:{},v:{}},this.callback=b,this.isResizing=0,this.options=c,this.axes=[],this.series=[],this.hasCartesianSeries=d.showAxes;var g,f=this;if(f.index=V.length,V.push(f),ab++,d.reflow!==!1&&K(f,"load",function(){f.initReflow()}),e)for(g in e)K(f,g,e[g]);f.xAxis=[],f.yAxis=[],f.animation=fa?!1:m(d.animation,!0),f.pointCount=0,f.counters=new Bb,f.firstRender()},initSeries:function(a){var b=this.options.chart;return(b=F[a.type||b.type||b.defaultSeriesType])||ra(17,!0),b=new b,b.init(this,a),b},isInsidePlot:function(a,b,c){var d=c?b:a,a=c?a:b;return d>=0&&d<=this.plotWidth&&a>=0&&a<=this.plotHeight},adjustTickAmounts:function(){this.options.chart.alignTicks!==!1&&p(this.axes,function(a){a.adjustTickAmount()}),this.maxTicks=null},redraw:function(a){var g,h,b=this.axes,c=this.series,d=this.pointer,e=this.legend,f=this.isDirtyLegend,i=this.isDirtyBox,j=c.length,k=j,l=this.renderer,o=l.isHidden(),n=[];for(Qa(a,this),o&&this.cloneRenderTo(),this.layOutTitles();k--;)if(a=c[k],a.options.stacking&&(g=!0,a.isDirty)){h=!0;break}if(h)for(k=j;k--;)a=c[k],a.options.stacking&&(a.isDirty=!0);p(c,function(a){a.isDirty&&"point"===a.options.legendType&&(f=!0)}),f&&e.options.enabled&&(e.render(),this.isDirtyLegend=!1),g&&this.getStacks(),this.hasCartesianSeries&&(this.isResizing||(this.maxTicks=null,p(b,function(a){a.setScale()})),this.adjustTickAmounts(),this.getMargins(),p(b,function(a){a.isDirty&&(i=!0)}),p(b,function(a){a.isDirtyExtremes&&(a.isDirtyExtremes=!1,n.push(function(){D(a,"afterSetExtremes",q(a.eventArgs,a.getExtremes())),delete a.eventArgs})),(i||g)&&a.redraw()})),i&&this.drawChartBox(),p(c,function(a){a.isDirty&&a.visible&&(!a.isCartesian||a.xAxis)&&a.redraw()}),d&&d.reset(!0),l.draw(),D(this,"redraw"),o&&this.cloneRenderTo(!0),p(n,function(a){a.call()})},get:function(a){var d,e,b=this.axes,c=this.series;for(d=0;d<b.length;d++)if(b[d].options.id===a)return b[d];for(d=0;d<c.length;d++)if(c[d].options.id===a)return c[d];for(d=0;d<c.length;d++)for(e=c[d].points||[],b=0;b<e.length;b++)if(e[b].id===a)return e[b];return null},getAxes:function(){var a=this,b=this.options,c=b.xAxis=qa(b.xAxis||{}),b=b.yAxis=qa(b.yAxis||{});p(c,function(a,b){a.index=b,a.isX=!0}),p(b,function(a,b){a.index=b}),c=c.concat(b),p(c,function(b){new la(a,b)}),a.adjustTickAmounts()},getSelectedPoints:function(){var a=[];return p(this.series,function(b){a=a.concat(vb(b.points||[],function(a){return a.selected}))
4
  }),a},getSelectedSeries:function(){return vb(this.series,function(a){return a.selected})},getStacks:function(){var a=this;p(a.yAxis,function(a){a.stacks&&a.hasVisibleSeries&&(a.oldStacks=a.stacks)}),p(a.series,function(b){!b.options.stacking||b.visible!==!0&&a.options.chart.ignoreHiddenSeries!==!1||(b.stackKey=b.type+m(b.options.stack,""))})},setTitle:function(a,b,c){var g,f,d=this,e=d.options;f=e.title=w(e.title,a),g=e.subtitle=w(e.subtitle,b),e=g,p([["title",a,f],["subtitle",b,e]],function(a){var b=a[0],c=d[b],e=a[1],a=a[2];c&&e&&(d[b]=c=c.destroy()),a&&a.text&&!c&&(d[b]=d.renderer.text(a.text,0,0,a.useHTML).attr({align:a.align,"class":"highcharts-"+b,zIndex:a.zIndex||4}).css(a.style).add())}),d.layOutTitles(c)},layOutTitles:function(a){var b=0,c=this.title,d=this.subtitle,e=this.options,f=e.title,e=e.subtitle,g=this.spacingBox.width-44;!c||(c.css({width:(f.width||g)+"px"}).align(q({y:15},f),!1,"spacingBox"),f.floating||f.verticalAlign)||(b=c.getBBox().height),d&&(d.css({width:(e.width||g)+"px"}).align(q({y:b+f.margin},e),!1,"spacingBox"),!e.floating&&!e.verticalAlign&&(b=Ka(b+d.getBBox().height))),c=this.titleOffset!==b,this.titleOffset=b,!this.isDirtyBox&&c&&(this.isDirtyBox=c,this.hasRendered&&m(a,!0)&&this.isDirtyBox&&this.redraw())},getChartSize:function(){var a=this.options.chart,b=a.width,a=a.height,c=this.renderToClone||this.renderTo;r(b)||(this.containerWidth=jb(c,"width")),r(a)||(this.containerHeight=jb(c,"height")),this.chartWidth=v(0,b||this.containerWidth||600),this.chartHeight=v(0,m(a,this.containerHeight>19?this.containerHeight:400))},cloneRenderTo:function(a){var b=this.renderToClone,c=this.container;a?b&&(this.renderTo.appendChild(c),Pa(b),delete this.renderToClone):(c&&c.parentNode===this.renderTo&&this.renderTo.removeChild(c),this.renderToClone=b=this.renderTo.cloneNode(0),G(b,{position:"absolute",top:"-9999px",display:"block"}),b.style.setProperty&&b.style.setProperty("display","block","important"),y.body.appendChild(b),c&&b.appendChild(c))},getContainer:function(){var a,c,d,e,b=this.options.chart;this.renderTo=a=b.renderTo,e="highcharts-"+tb++,Fa(a)&&(this.renderTo=a=y.getElementById(a)),a||ra(13,!0),c=z(H(a,"data-highcharts-chart")),!isNaN(c)&&V[c]&&V[c].hasRendered&&V[c].destroy(),H(a,"data-highcharts-chart",this.index),a.innerHTML="",!b.skipClone&&!a.offsetWidth&&this.cloneRenderTo(),this.getChartSize(),c=this.chartWidth,d=this.chartHeight,this.container=a=Y(Ja,{className:"highcharts-container"+(b.className?" "+b.className:""),id:e},q({position:"relative",overflow:"hidden",width:c+"px",height:d+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},b.style),this.renderToClone||a),this._cursor=a.style.cursor,this.renderer=b.forExport?new ta(a,c,d,b.style,!0):new Za(a,c,d,b.style),fa&&this.renderer.create(this,a,c,d)},getMargins:function(){var b,a=this.spacing,c=this.legend,d=this.margin,e=this.options.legend,f=m(e.margin,20),g=e.x,h=e.y,i=e.align,j=e.verticalAlign,k=this.titleOffset;this.resetMargins(),b=this.axisOffset,k&&!r(d[0])&&(this.plotTop=v(this.plotTop,k+this.options.title.margin+a[0])),c.display&&!e.floating&&("right"===i?r(d[1])||(this.marginRight=v(this.marginRight,c.legendWidth-g+f+a[1])):"left"===i?r(d[3])||(this.plotLeft=v(this.plotLeft,c.legendWidth+g+f+a[3])):"top"===j?r(d[0])||(this.plotTop=v(this.plotTop,c.legendHeight+h+f+a[0])):"bottom"!==j||r(d[2])||(this.marginBottom=v(this.marginBottom,c.legendHeight-h+f+a[2]))),this.extraBottomMargin&&(this.marginBottom+=this.extraBottomMargin),this.extraTopMargin&&(this.plotTop+=this.extraTopMargin),this.hasCartesianSeries&&p(this.axes,function(a){a.getOffset()}),r(d[3])||(this.plotLeft+=b[3]),r(d[0])||(this.plotTop+=b[0]),r(d[2])||(this.marginBottom+=b[2]),r(d[1])||(this.marginRight+=b[1]),this.setChartSize()},reflow:function(a){var b=this,c=b.options.chart,d=b.renderTo,e=c.width||jb(d,"width"),f=c.height||jb(d,"height"),c=a?a.target:I,d=function(){b.container&&(b.setSize(e,f,!1),b.hasUserSize=null)};b.hasUserSize||!e||!f||c!==I&&c!==y||((e!==b.containerWidth||f!==b.containerHeight)&&(clearTimeout(b.reflowTimeout),a?b.reflowTimeout=setTimeout(d,100):d()),b.containerWidth=e,b.containerHeight=f)},initReflow:function(){var a=this,b=function(b){a.reflow(b)};K(I,"resize",b),K(a,"destroy",function(){W(I,"resize",b)})},setSize:function(a,b,c){var e,f,g,d=this;d.isResizing+=1,g=function(){d&&D(d,"endResize",null,function(){d.isResizing-=1})},Qa(c,d),d.oldChartHeight=d.chartHeight,d.oldChartWidth=d.chartWidth,r(a)&&(d.chartWidth=e=v(0,u(a)),d.hasUserSize=!!e),r(b)&&(d.chartHeight=f=v(0,u(b))),(va?kb:G)(d.container,{width:e+"px",height:f+"px"},va),d.setChartSize(!0),d.renderer.setSize(e,f,c),d.maxTicks=null,p(d.axes,function(a){a.isDirty=!0,a.setScale()}),p(d.series,function(a){a.isDirty=!0}),d.isDirtyLegend=!0,d.isDirtyBox=!0,d.layOutTitles(),d.getMargins(),d.redraw(c),d.oldChartHeight=null,D(d,"resize"),va===!1?g():setTimeout(g,va&&va.duration||500)},setChartSize:function(a){var i,j,k,l,b=this.inverted,c=this.renderer,d=this.chartWidth,e=this.chartHeight,f=this.options.chart,g=this.spacing,h=this.clipOffset;this.plotLeft=i=u(this.plotLeft),this.plotTop=j=u(this.plotTop),this.plotWidth=k=v(0,u(d-i-this.marginRight)),this.plotHeight=l=v(0,u(e-j-this.marginBottom)),this.plotSizeX=b?l:k,this.plotSizeY=b?k:l,this.plotBorderWidth=f.plotBorderWidth||0,this.spacingBox=c.spacingBox={x:g[3],y:g[0],width:d-g[3]-g[1],height:e-g[0]-g[2]},this.plotBox=c.plotBox={x:i,y:j,width:k,height:l},d=2*T(this.plotBorderWidth/2),b=Ka(v(d,h[3])/2),c=Ka(v(d,h[0])/2),this.clipBox={x:b,y:c,width:T(this.plotSizeX-v(d,h[1])/2-b),height:T(this.plotSizeY-v(d,h[2])/2-c)},a||p(this.axes,function(a){a.setAxisSize(),a.setAxisTranslation()})},resetMargins:function(){var a=this.spacing,b=this.margin;this.plotTop=m(b[0],a[0]),this.marginRight=m(b[1],a[1]),this.marginBottom=m(b[2],a[2]),this.plotLeft=m(b[3],a[3]),this.axisOffset=[0,0,0,0],this.clipOffset=[0,0,0,0]},drawChartBox:function(){var n,a=this.options.chart,b=this.renderer,c=this.chartWidth,d=this.chartHeight,e=this.chartBackground,f=this.plotBackground,g=this.plotBorder,h=this.plotBGImage,i=a.borderWidth||0,j=a.backgroundColor,k=a.plotBackgroundColor,l=a.plotBackgroundImage,o=a.plotBorderWidth||0,s=this.plotLeft,m=this.plotTop,p=this.plotWidth,q=this.plotHeight,r=this.plotBox,v=this.clipRect,u=this.clipBox;n=i+(a.shadow?8:0),(i||j)&&(e?e.animate(e.crisp({width:c-n,height:d-n})):(e={fill:j||Q},i&&(e.stroke=a.borderColor,e["stroke-width"]=i),this.chartBackground=b.rect(n/2,n/2,c-n,d-n,a.borderRadius,i).attr(e).addClass("highcharts-background").add().shadow(a.shadow))),k&&(f?f.animate(r):this.plotBackground=b.rect(s,m,p,q,0).attr({fill:k}).add().shadow(a.plotShadow)),l&&(h?h.animate(r):this.plotBGImage=b.image(l,s,m,p,q).add()),v?v.animate({width:u.width,height:u.height}):this.clipRect=b.clipRect(u),o&&(g?g.animate(g.crisp({x:s,y:m,width:p,height:q})):this.plotBorder=b.rect(s,m,p,q,0,-o).attr({stroke:a.plotBorderColor,"stroke-width":o,fill:Q,zIndex:1}).add()),this.isDirtyBox=!1},propFromSeries:function(){var c,e,f,a=this,b=a.options.chart,d=a.options.series;p(["inverted","angular","polar"],function(g){for(c=F[b.type||b.defaultSeriesType],f=a[g]||b[g]||c&&c.prototype[g],e=d&&d.length;!f&&e--;)(c=F[d[e].type])&&c.prototype[g]&&(f=!0);a[g]=f})},linkSeries:function(){var a=this,b=a.series;p(b,function(a){a.linkedSeries.length=0}),p(b,function(b){var d=b.options.linkedTo;Fa(d)&&(d=":previous"===d?a.series[b.index-1]:a.get(d))&&(d.linkedSeries.push(b),b.linkedParent=d)})},renderSeries:function(){p(this.series,function(a){a.translate(),a.setTooltipPoints&&a.setTooltipPoints(),a.render()})},render:function(){var g,a=this,b=a.axes,c=a.renderer,d=a.options,e=d.labels,f=d.credits;a.setTitle(),a.legend=new lb(a,d.legend),a.getStacks(),p(b,function(a){a.setScale()}),a.getMargins(),a.maxTicks=null,p(b,function(a){a.setTickPositions(!0),a.setMaxTicks()}),a.adjustTickAmounts(),a.getMargins(),a.drawChartBox(),a.hasCartesianSeries&&p(b,function(a){a.render()}),a.seriesGroup||(a.seriesGroup=c.g("series-group").attr({zIndex:3}).add()),a.renderSeries(),e.items&&p(e.items,function(b){var d=q(e.style,b.style),f=z(d.left)+a.plotLeft,g=z(d.top)+a.plotTop+12;delete d.left,delete d.top,c.text(b.html,f,g).attr({zIndex:2}).css(d).add()}),f.enabled&&!a.credits&&(g=f.href,a.credits=c.text(f.text,0,0).on("click",function(){g&&(location.href=g)}).attr({align:f.position.align,zIndex:8}).css(f.style).add().align(f.position)),a.hasRendered=!0},destroy:function(){var e,a=this,b=a.axes,c=a.series,d=a.container,f=d&&d.parentNode;for(D(a,"destroy"),V[a.index]=t,ab--,a.renderTo.removeAttribute("data-highcharts-chart"),W(a),e=b.length;e--;)b[e]=b[e].destroy();for(e=c.length;e--;)c[e]=c[e].destroy();p("title,subtitle,chartBackground,plotBackground,plotBGImage,plotBorder,seriesGroup,clipRect,credits,pointer,scroller,rangeSelector,legend,resetZoomButton,tooltip,renderer".split(","),function(b){var c=a[b];c&&c.destroy&&(a[b]=c.destroy())}),d&&(d.innerHTML="",W(d),f&&Pa(d));for(e in a)delete a[e]},isReadyToRender:function(){var a=this;return!aa&&I==I.top&&"complete"!==y.readyState||fa&&!I.canvg?(fa?Lb.push(function(){a.firstRender()},a.options.global.canvasToolsURL):y.attachEvent("onreadystatechange",function(){y.detachEvent("onreadystatechange",a.firstRender),"complete"===y.readyState&&a.firstRender()}),!1):!0},firstRender:function(){var a=this,b=a.options,c=a.callback;a.isReadyToRender()&&(a.getContainer(),D(a,"init"),a.resetMargins(),a.setChartSize(),a.propFromSeries(),a.getAxes(),p(b.series||[],function(b){a.initSeries(b)}),a.linkSeries(),D(a,"beforeRender"),R.Pointer&&(a.pointer=new Wa(a,b)),a.render(),a.renderer.draw(),c&&c.apply(a,[a]),p(a.callbacks,function(b){b.apply(a,[a])}),a.cloneRenderTo(!0),D(a,"load"))},splashArray:function(a,b){var c=b[a],c=ca(c)?c:[c,c,c,c];return[m(b[a+"Top"],c[0]),m(b[a+"Right"],c[1]),m(b[a+"Bottom"],c[2]),m(b[a+"Left"],c[3])]}},Ya.prototype.callbacks=[],X=R.CenteredSeriesMixin={getCenter:function(){var d,h,a=this.options,b=this.chart,c=2*(a.slicedOffset||0),e=b.plotWidth-2*c,f=b.plotHeight-2*c,b=a.center,a=[m(b[0],"50%"),m(b[1],"50%"),a.size||"100%",a.innerSize||0],g=C(e,f);return Ua(a,function(a,b){return h=/%$/.test(a),d=2>b||2===b&&h,(h?[e,f,g,g][b]*z(a)/100:a)+(d?c:0)})}};var Ea=function(){};Ea.prototype={init:function(a,b,c){return this.series=a,this.applyOptions(b,c),this.pointAttr={},a.options.colorByPoint&&(b=a.options.colors||a.chart.options.colors,this.color=this.color||b[a.colorCounter++],a.colorCounter===b.length)&&(a.colorCounter=0),a.chart.pointCount++,this},applyOptions:function(a,b){var c=this.series,d=c.pointValKey,a=Ea.prototype.optionsToObject.call(this,a);return q(this,a),this.options=this.options?q(this.options,a):a,d&&(this.y=this[d]),this.x===t&&c&&(this.x=b===t?c.autoIncrement():b),this},optionsToObject:function(a){var b={},c=this.series,d=c.pointArrayMap||["y"],e=d.length,f=0,g=0;if("number"==typeof a||null===a)b[d[0]]=a;else if(La(a))for(a.length>e&&(c=typeof a[0],"string"===c?b.name=a[0]:"number"===c&&(b.x=a[0]),f++);e>g;)b[d[g++]]=a[f++];else"object"==typeof a&&(b=a,a.dataLabels&&(c._hasPointLabels=!0),a.marker&&(c._hasPointMarkers=!0));return b},destroy:function(){var c,a=this.series.chart,b=a.hoverPoints;a.pointCount--,b&&(this.setState(),ja(b,this),!b.length)&&(a.hoverPoints=null),this===a.hoverPoint&&this.onMouseOut(),(this.graphic||this.dataLabel)&&(W(this),this.destroyElements()),this.legendItem&&a.legend.destroyItem(this);for(c in this)this[c]=null},destroyElements:function(){for(var b,a="graphic,dataLabel,dataLabelUpper,group,connector,shadowGroup".split(","),c=6;c--;)b=a[c],this[b]&&(this[b]=this[b].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},tooltipFormatter:function(a){var b=this.series,c=b.tooltipOptions,d=m(c.valueDecimals,""),e=c.valuePrefix||"",f=c.valueSuffix||"";return p(b.pointArrayMap||["y"],function(b){b="{point."+b,(e||f)&&(a=a.replace(b+"}",e+b+"}"+f)),a=a.replace(b+"}",b+":,."+d+"f}")}),Ia(a,{point:this,series:this.series})},firePointEvent:function(a,b,c){var d=this,e=this.series.options;(e.point.events[a]||d.options&&d.options.events&&d.options.events[a])&&this.importEvents(),"click"===a&&e.allowPointSelect&&(c=function(a){d.select(null,a.ctrlKey||a.metaKey||a.shiftKey)}),D(this,a,b,c)}};var O=function(){};O.prototype={isCartesian:!0,type:"line",pointClass:Ea,sorted:!0,requireSorting:!0,pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor",r:"radius"},axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],init:function(a,b){var d,e,c=this,f=a.series,g=function(a,b){return m(a.options.index,a._i)-m(b.options.index,b._i)};c.chart=a,c.options=b=c.setOptions(b),c.linkedSeries=[],c.bindAxes(),q(c,{name:b.name,state:"",pointAttr:{},visible:b.visible!==!1,selected:b.selected===!0}),fa&&(b.animation=!1),e=b.events;for(d in e)K(c,d,e[d]);(e&&e.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)&&(a.runTrackerClick=!0),c.getColor(),c.getSymbol(),p(c.parallelArrays,function(a){c[a+"Data"]=[]}),c.setData(b.data,!1),c.isCartesian&&(a.hasCartesianSeries=!0),f.push(c),c._i=f.length-1,ob(f,g),this.yAxis&&ob(this.yAxis.series,g),p(f,function(a,b){a.index=b,a.name=a.name||"Series "+(b+1)})},bindAxes:function(){var d,a=this,b=a.options,c=a.chart;p(a.axisTypes||[],function(e){p(c[e],function(c){d=c.options,(b[e]===d.index||b[e]!==t&&b[e]===d.id||b[e]===t&&0===d.index)&&(c.series.push(a),a[e]=c,c.isDirty=!0)}),!a[e]&&a.optionalAxis!==e&&ra(18,!0)})},updateParallelArrays:function(a,b){var c=a.series,d=arguments;p(c.parallelArrays,"number"==typeof b?function(d){var f="y"===d&&c.toYData?c.toYData(a):a[d];c[d+"Data"][b]=f}:function(a){Array.prototype[b].apply(c[a+"Data"],Array.prototype.slice.call(d,2))})},autoIncrement:function(){var a=this.options,b=this.xIncrement,b=m(b,a.pointStart,0);return this.pointInterval=m(this.pointInterval,a.pointInterval,1),this.xIncrement=b+this.pointInterval,b},getSegments:function(){var c,a=-1,b=[],d=this.points,e=d.length;if(e)if(this.options.connectNulls){for(c=e;c--;)null===d[c].y&&d.splice(c,1);d.length&&(b=[d])}else p(d,function(c,g){null===c.y?(g>a+1&&b.push(d.slice(a+1,g)),a=g):g===e-1&&b.push(d.slice(a+1,g+1))});this.segments=b},setOptions:function(a){var b=this.chart,c=b.options.plotOptions,b=b.userOptions||{},d=b.plotOptions||{},e=c[this.type];return this.userOptions=a,c=w(e,c.series,a),this.tooltipOptions=w(E.tooltip,E.plotOptions[this.type].tooltip,b.tooltip,d.series&&d.series.tooltip,d[this.type]&&d[this.type].tooltip,a.tooltip),null===e.marker&&delete c.marker,c},getColor:function(){var e,a=this.options,b=this.userOptions,c=this.chart.options.colors,d=this.chart.counters;e=a.color||ba[this.type].color,e||a.colorByPoint||(r(b._colorIndex)?a=b._colorIndex:(b._colorIndex=d.color,a=d.color++),e=c[a]),this.color=e,d.wrapColor(c.length)},getSymbol:function(){var a=this.userOptions,b=this.options.marker,c=this.chart,d=c.options.symbols,c=c.counters;this.symbol=b.symbol,this.symbol||(r(a._symbolIndex)?a=a._symbolIndex:(a._symbolIndex=c.symbol,a=c.symbol++),this.symbol=d[a]),/^url/.test(this.symbol)&&(b.radius=0),c.wrapSymbol(d.length)},drawLegendSymbol:N.drawLineMarker,setData:function(a,b,c,d){var h,e=this,f=e.points,g=f&&f.length||0,i=e.options,j=e.chart,k=null,l=e.xAxis,o=l&&!!l.categories,n=e.tooltipPoints,s=i.turboThreshold,q=this.xData,r=this.yData,v=(h=e.pointArrayMap)&&h.length,a=a||[];if(h=a.length,b=m(b,!0),d===!1||!h||g!==h||e.cropped||e.hasGroupedData){if(e.xIncrement=null,e.pointRange=o?1:i.pointRange,e.colorCounter=0,p(this.parallelArrays,function(a){e[a+"Data"].length=0}),s&&h>s){for(c=0;null===k&&h>c;)k=a[c],c++;if(ha(k)){for(o=m(i.pointStart,0),i=m(i.pointInterval,1),c=0;h>c;c++)q[c]=o,r[c]=a[c],o+=i;e.xIncrement=o}else if(La(k))if(v)for(c=0;h>c;c++)i=a[c],q[c]=i[0],r[c]=i.slice(1,v+1);else for(c=0;h>c;c++)i=a[c],q[c]=i[0],r[c]=i[1];else ra(12)}else for(c=0;h>c;c++)a[c]!==t&&(i={series:e},e.pointClass.prototype.applyOptions.apply(i,[a[c]]),e.updateParallelArrays(i,c),o&&i.name)&&(l.names[i.x]=i.name);for(Fa(r[0])&&ra(14,!0),e.data=[],e.options.data=a,c=g;c--;)f[c]&&f[c].destroy&&f[c].destroy();n&&(n.length=0),l&&(l.minRange=l.userMinRange),e.isDirty=e.isDirtyData=j.isDirtyBox=!0,c=!1}else p(a,function(a,b){f[b].update(a,!1)});b&&j.redraw(c)},processData:function(a){var e,b=this.xData,c=this.yData,d=b.length;e=0;var f,g,o,n,h=this.xAxis,i=this.options,j=i.cropThreshold,k=0,l=this.isCartesian;if(l&&!this.isDirty&&!h.isDirty&&!this.yAxis.isDirty&&!a)return!1;for(l&&this.sorted&&(!j||d>j||this.forceCrop)&&(o=h.min,n=h.max,b[d-1]<o||b[0]>n?(b=[],c=[]):(b[0]<o||b[d-1]>n)&&(e=this.cropData(this.xData,this.yData,o,n),b=e.xData,c=e.yData,e=e.start,f=!0,k=b.length)),d=b.length-1;d>=0;d--)a=b[d]-b[d-1],!f&&b[d]>o&&b[d]<n&&k++,a>0&&(g===t||g>a)?g=a:0>a&&this.requireSorting&&ra(15);this.cropped=f,this.cropStart=e,this.processedXData=b,this.processedYData=c,this.activePointCount=k,null===i.pointRange&&(this.pointRange=g||1),this.closestPointRange=g},cropData:function(a,b,c,d){var i,e=a.length,f=0,g=e,h=m(this.cropShoulder,1);for(i=0;e>i;i++)if(a[i]>=c){f=v(0,i-h);break}for(;e>i;i++)if(a[i]>d){g=i+h;break}return{xData:a.slice(f,g),yData:b.slice(f,g),start:f,end:g}},generatePoints:function(){var c,i,k,o,a=this.options.data,b=this.data,d=this.processedXData,e=this.processedYData,f=this.pointClass,g=d.length,h=this.cropStart||0,j=this.hasGroupedData,l=[];for(b||j||(b=[],b.length=a.length,b=this.data=b),o=0;g>o;o++)i=h+o,j?l[o]=(new f).init(this,[d[o]].concat(qa(e[o]))):(b[i]?k=b[i]:a[i]!==t&&(b[i]=k=(new f).init(this,a[i],d[o])),l[o]=k);if(b&&(g!==(c=b.length)||j))for(o=0;c>o;o++)o===h&&!j&&(o+=g),b[o]&&(b[o].destroyElements(),b[o].plotX=t);this.data=b,this.points=l},getExtremes:function(a){var d,b=this.yAxis,c=this.processedXData,e=[],f=0;d=this.xAxis.getExtremes();var i,j,k,l,g=d.min,h=d.max,a=a||this.stackedYData||this.processedYData;for(d=a.length,l=0;d>l;l++)if(j=c[l],k=a[l],i=null!==k&&k!==t&&(!b.isLog||k.length||k>0),j=this.getExtremesFromAll||this.cropped||(c[l+1]||j)>=g&&(c[l-1]||j)<=h,i&&j)if(i=k.length)for(;i--;)null!==k[i]&&(e[f++]=k[i]);else e[f++]=k;this.dataMin=m(void 0,Na(e)),this.dataMax=m(void 0,Ba(e))},translate:function(){this.processedXData||this.processData(),this.generatePoints();for(var a=this.options,b=a.stacking,c=this.xAxis,d=c.categories,e=this.yAxis,f=this.points,g=f.length,h=!!this.modifyValue,i=a.pointPlacement,j="between"===i||ha(i),k=a.threshold,a=0;g>a;a++){var l=f[a],o=l.x,n=l.y,s=l.low,p=b&&e.stacks[(this.negStacks&&k>n?"-":"")+this.stackKey];e.isLog&&0>=n&&(l.y=n=null),l.plotX=c.translate(o,0,0,0,1,i,"flags"===this.type),b&&this.visible&&p&&p[o]&&(p=p[o],n=p.points[this.index+","+a],s=n[0],n=n[1],0===s&&(s=m(k,e.min)),e.isLog&&0>=s&&(s=null),l.total=l.stackTotal=p.total,l.percentage=p.total&&l.y/p.total*100,l.stackY=n,p.setOffset(this.pointXOffset||0,this.barW||0)),l.yBottom=r(s)?e.translate(s,0,1,0,1):null,h&&(n=this.modifyValue(n,l)),l.plotY="number"==typeof n&&1/0!==n?e.translate(n,0,1,0,1):t,l.clientX=j?c.translate(o,0,0,0,1):l.plotX,l.negative=l.y<(k||0),l.category=d&&d[l.x]!==t?d[l.x]:l.x}this.getSegments()},animate:function(a){var d,b=this.chart,c=b.renderer;d=this.options.animation;var g,e=this.clipBox||b.clipBox,f=b.inverted;d&&!ca(d)&&(d=ba[this.type].animation),g=["_sharedClip",d.duration,d.easing,e.height].join(","),a?(a=b[g],d=b[g+"m"],a||(b[g]=a=c.clipRect(q(e,{width:0})),b[g+"m"]=d=c.clipRect(-99,f?-b.plotLeft:-b.plotTop,99,f?b.chartWidth:b.chartHeight)),this.group.clip(a),this.markerGroup.clip(d),this.sharedClipKey=g):((a=b[g])&&a.animate({width:b.plotSizeX},d),b[g+"m"]&&b[g+"m"].animate({width:b.plotSizeX+99},d),this.animate=null)},afterAnimate:function(){var a=this.chart,b=this.sharedClipKey,c=this.group,d=this.clipBox;c&&this.options.clip!==!1&&(b&&d||c.clip(d?a.renderer.clipRect(d):a.clipRect),this.markerGroup.clip()),D(this,"afterAnimate"),setTimeout(function(){b&&a[b]&&(d||(a[b]=a[b].destroy()),a[b+"m"]&&(a[b+"m"]=a[b+"m"].destroy()))},100)},drawPoints:function(){var a,d,e,f,g,h,i,j,k,b=this.points,c=this.chart;d=this.options.marker;var o,l=this.pointAttr[""],n=this.markerGroup,s=m(d.enabled,this.activePointCount<.5*this.xAxis.len/d.radius);if(d.enabled!==!1||this._hasPointMarkers)for(f=b.length;f--;)g=b[f],d=T(g.plotX),e=g.plotY,k=g.graphic,i=g.marker||{},a=s&&i.enabled===t||i.enabled,o=c.isInsidePlot(u(d),e,c.inverted),a&&e!==t&&!isNaN(e)&&null!==g.y?(a=g.pointAttr[g.selected?"select":""]||l,h=a.r,i=m(i.symbol,this.symbol),j=0===i.indexOf("url"),k?k[o?"show":"hide"](!0).animate(q({x:d-h,y:e-h},k.symbolName?{width:2*h,height:2*h}:{})):o&&(h>0||j)&&(g.graphic=c.renderer.symbol(i,d-h,e-h,2*h,2*h).attr(a).add(n))):k&&(g.graphic=k.destroy())},convertAttribs:function(a,b,c,d){var f,g,e=this.pointAttrToOptions,h={},a=a||{},b=b||{},c=c||{},d=d||{};for(f in e)g=e[f],h[f]=m(a[g],b[f],c[f],d[f]);return h},getAttribs:function(){var f,a=this,b=a.options,c=ba[a.type].marker?b.marker:b,d=c.states,e=d.hover,g=a.color;f={stroke:g,fill:g};var i,k,h=a.points||[],j=[],l=a.pointAttrToOptions;k=a.hasPointSpecificOptions;var o=b.negativeColor,n=c.lineColor,s=c.fillColor;i=b.turboThreshold;var m;if(b.marker?(e.radius=e.radius||c.radius+2,e.lineWidth=e.lineWidth||c.lineWidth+1):e.color=e.color||ya(e.color||g).brighten(e.brightness).get(),j[""]=a.convertAttribs(c,f),p(["hover","select"],function(b){j[b]=a.convertAttribs(d[b],j[""])}),a.pointAttr=j,g=h.length,!i||i>g||k)for(;g--;){if(i=h[g],(c=i.options&&i.options.marker||i.options)&&c.enabled===!1&&(c.radius=0),i.negative&&o&&(i.color=i.fillColor=o),k=b.colorByPoint||i.color,i.options)for(m in l)r(c[l[m]])&&(k=!0);k?(c=c||{},k=[],d=c.states||{},f=d.hover=d.hover||{},b.marker||(f.color=f.color||!i.options.color&&e.color||ya(i.color).brighten(f.brightness||e.brightness).get()),f={color:i.color},s||(f.fillColor=i.color),n||(f.lineColor=i.color),k[""]=a.convertAttribs(q(f,c),j[""]),k.hover=a.convertAttribs(d.hover,j.hover,k[""]),k.select=a.convertAttribs(d.select,j.select,k[""])):k=j,i.pointAttr=k}},destroy:function(){var d,e,g,h,i,a=this,b=a.chart,c=/AppleWebKit\/533/.test(wa),f=a.data||[];for(D(a,"destroy"),W(a),p(a.axisTypes||[],function(b){(i=a[b])&&(ja(i.series,a),i.isDirty=i.forceRedraw=!0)}),a.legendItem&&a.chart.legend.destroyItem(a),e=f.length;e--;)(g=f[e])&&g.destroy&&g.destroy();a.points=null,clearTimeout(a.animationTimeout),p("area,graph,dataLabelsGroup,group,markerGroup,tracker,graphNeg,areaNeg,posClip,negClip".split(","),function(b){a[b]&&(d=c&&"group"===b?"hide":"destroy",a[b][d]())}),b.hoverSeries===a&&(b.hoverSeries=null),ja(b.series,a);for(h in a)delete a[h]},getSegmentPath:function(a){var b=this,c=[],d=b.options.step;return p(a,function(e,f){var i,g=e.plotX,h=e.plotY;b.getPointSpline?c.push.apply(c,b.getPointSpline(a,e,f)):(c.push(f?"L":"M"),d&&f&&(i=a[f-1],"right"===d?c.push(i.plotX,h):"center"===d?c.push((i.plotX+g)/2,i.plotY,(i.plotX+g)/2,h):c.push(g,i.plotY)),c.push(e.plotX,e.plotY))}),c},getGraphPath:function(){var c,a=this,b=[],d=[];return p(a.segments,function(e){c=a.getSegmentPath(e),e.length>1?b=b.concat(c):d.push(e[0])}),a.singlePoints=d,a.graphPath=b},drawGraph:function(){var a=this,b=this.options,c=[["graph",b.lineColor||this.color]],d=b.lineWidth,e=b.dashStyle,f="square"!==b.linecap,g=this.getGraphPath(),h=b.negativeColor;h&&c.push(["graphNeg",h]),p(c,function(c,h){var k=c[0],l=a[k];l?(bb(l),l.animate({d:g})):d&&g.length&&(l={stroke:c[1],"stroke-width":d,fill:Q,zIndex:1},e?l.dashstyle=e:f&&(l["stroke-linecap"]=l["stroke-linejoin"]="round"),a[k]=a.chart.renderer.path(g).attr(l).add(a.group).shadow(!h&&b.shadow))})},clipNeg:function(){var e,a=this.options,b=this.chart,c=b.renderer,d=a.negativeColor||a.negativeFillColor,f=this.graph,g=this.area,h=this.posClip,i=this.negClip;e=b.chartWidth;var j=b.chartHeight,k=v(e,j),l=this.yAxis;d&&(f||g)&&(d=u(l.toPixels(a.threshold||0,!0)),0>d&&(k-=d),a={x:0,y:0,width:k,height:d},k={x:0,y:d,width:k,height:k},b.inverted&&(a.height=k.y=b.plotWidth-d,c.isVML&&(a={x:b.plotWidth-d-b.plotLeft,y:0,width:e,height:j},k={x:d+b.plotLeft-e,y:0,width:b.plotLeft+d,height:e})),l.reversed?(b=k,e=a):(b=a,e=k),h?(h.animate(b),i.animate(e)):(this.posClip=h=c.clipRect(b),this.negClip=i=c.clipRect(e),f&&this.graphNeg&&(f.clip(h),this.graphNeg.clip(i)),g&&(g.clip(h),this.areaNeg.clip(i))))},invertGroups:function(){function a(){var a={width:b.yAxis.len,height:b.xAxis.len};p(["group","markerGroup"],function(c){b[c]&&b[c].attr(a).invert()})}var b=this,c=b.chart;b.xAxis&&(K(c,"resize",a),K(b,"destroy",function(){W(c,"resize",a)}),a(),b.invertGroups=a)},plotGroup:function(a,b,c,d,e){var f=this[a],g=!f;return g&&(this[a]=f=this.chart.renderer.g(b).attr({visibility:c,zIndex:d||.1}).add(e)),f[g?"attr":"animate"](this.getPlotBox()),f},getPlotBox:function(){var a=this.chart,b=this.xAxis,c=this.yAxis;return a.inverted&&(b=c,c=this.xAxis),{translateX:b?b.left:a.plotLeft,translateY:c?c.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var c,a=this,b=a.chart,d=a.options,e=(c=d.animation)&&!!a.animate&&b.renderer.isSVG&&m(c.duration,500)||0,f=a.visible?"visible":"hidden",g=d.zIndex,h=a.hasRendered,i=b.seriesGroup;c=a.plotGroup("group","series",f,g,i),a.markerGroup=a.plotGroup("markerGroup","markers",f,g,i),e&&a.animate(!0),a.getAttribs(),c.inverted=a.isCartesian?b.inverted:!1,a.drawGraph&&(a.drawGraph(),a.clipNeg()),a.drawDataLabels&&a.drawDataLabels(),a.visible&&a.drawPoints(),a.drawTracker&&a.options.enableMouseTracking!==!1&&a.drawTracker(),b.inverted&&a.invertGroups(),d.clip!==!1&&!a.sharedClipKey&&!h&&c.clip(b.clipRect),e&&a.animate(),h||(e?a.animationTimeout=setTimeout(function(){a.afterAnimate()},e):a.afterAnimate()),a.isDirty=a.isDirtyData=!1,a.hasRendered=!0},redraw:function(){var a=this.chart,b=this.isDirtyData,c=this.group,d=this.xAxis,e=this.yAxis;c&&(a.inverted&&c.attr({width:a.plotWidth,height:a.plotHeight}),c.animate({translateX:m(d&&d.left,a.plotLeft),translateY:m(e&&e.top,a.plotTop)})),this.translate(),this.setTooltipPoints&&this.setTooltipPoints(!0),this.render(),b&&D(this,"updatedData")}},Hb.prototype={destroy:function(){Oa(this,this.axis)},render:function(a){var b=this.options,c=b.format,c=c?Ia(c,this):b.formatter.call(this);this.label?this.label.attr({text:c,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(c,null,null,b.useHTML).css(b.style).attr({align:this.textAlign,rotation:b.rotation,visibility:"hidden"}).add(a)},setOffset:function(a,b){var c=this.axis,d=c.chart,e=d.inverted,f=this.isNegative,g=c.translate(c.usePercentage?100:this.total,0,0,0,1),c=c.translate(0),c=M(g-c),h=d.xAxis[0].translate(this.x)+a,i=d.plotHeight,f={x:e?f?g:g-c:h,y:e?i-h-b:f?i-g-c:i-g,width:e?c:b,height:e?b:c};(e=this.label)&&(e.align(this.alignOptions,null,f),f=e.alignAttr,e[this.options.crop===!1||d.isInsidePlot(f.x,f.y)?"show":"hide"](!0))}},la.prototype.buildStacks=function(){var a=this.series,b=m(this.options.reversedStacks,!0),c=a.length;if(!this.isXAxis){for(this.usePercentage=!1;c--;)a[b?c:a.length-c-1].setStackedPoints();if(this.usePercentage)for(c=0;c<a.length;c++)a[c].setPercentStacks()}},la.prototype.renderStackTotals=function(){var d,e,a=this.chart,b=a.renderer,c=this.stacks,f=this.stackTotalGroup;f||(this.stackTotalGroup=f=b.g("stack-labels").attr({visibility:"visible",zIndex:6}).add()),f.translate(a.plotLeft,a.plotTop);for(d in c)for(e in a=c[d])a[e].render(f)},O.prototype.setStackedPoints=function(){if(this.options.stacking&&(this.visible===!0||this.chart.options.chart.ignoreHiddenSeries===!1)){var n,m,p,q,r,u,a=this.processedXData,b=this.processedYData,c=[],d=b.length,e=this.options,f=e.threshold,g=e.stack,e=e.stacking,h=this.stackKey,i="-"+h,j=this.negStacks,k=this.yAxis,l=k.stacks,o=k.oldStacks;for(q=0;d>q;q++)r=a[q],u=b[q],p=this.index+","+q,m=(n=j&&f>u)?i:h,l[m]||(l[m]={}),l[m][r]||(o[m]&&o[m][r]?(l[m][r]=o[m][r],l[m][r].total=null):l[m][r]=new Hb(k,k.options.stackLabels,n,r,g)),m=l[m][r],m.points[p]=[m.cum||0],"percent"===e?(n=n?h:i,j&&l[n]&&l[n][r]?(n=l[n][r],m.total=n.total=v(n.total,m.total)+M(u)||0):m.total=da(m.total+(M(u)||0))):m.total=da(m.total+(u||0)),m.cum=(m.cum||0)+(u||0),m.points[p].push(m.cum),c[q]=m.cum;"percent"===e&&(k.usePercentage=!0),this.stackedYData=c,k.oldStacks={}}},O.prototype.setPercentStacks=function(){var a=this,b=a.stackKey,c=a.yAxis.stacks,d=a.processedXData;p([b,"-"+b],function(b){for(var e,g,h,f=d.length;f--;)g=d[f],e=(h=c[b]&&c[b][g])&&h.points[a.index+","+f],(g=e)&&(h=h.total?100/h.total:0,g[0]=da(g[0]*h),g[1]=da(g[1]*h),a.stackedYData[f]=g[1])})},q(Ya.prototype,{addSeries:function(a,b,c){var d,e=this;return a&&(b=m(b,!0),D(e,"addSeries",{options:a},function(){d=e.initSeries(a),e.isDirtyLegend=!0,e.linkSeries(),b&&e.redraw(c)})),d},addAxis:function(a,b,c,d){var e=b?"xAxis":"yAxis",f=this.options;new la(this,w(a,{index:this[e].length,isX:b})),f[e]=qa(f[e]||{}),f[e].push(a),m(c,!0)&&this.redraw(d)},showLoading:function(a){var b=this.options,c=this.loadingDiv,d=b.loading;c||(this.loadingDiv=c=Y(Ja,{className:"highcharts-loading"},q(d.style,{zIndex:10,display:Q}),this.container),this.loadingSpan=Y("span",null,d.labelStyle,c)),this.loadingSpan.innerHTML=a||b.lang.loading,this.loadingShown||(G(c,{opacity:0,display:"",left:this.plotLeft+"px",top:this.plotTop+"px",width:this.plotWidth+"px",height:this.plotHeight+"px"}),kb(c,{opacity:d.style.opacity},{duration:d.showDuration||0}),this.loadingShown=!0)},hideLoading:function(){var a=this.options,b=this.loadingDiv;b&&kb(b,{opacity:0},{duration:a.loading.hideDuration||100,complete:function(){G(b,{display:Q})}}),this.loadingShown=!1}}),q(Ea.prototype,{update:function(a,b,c){var g,d=this,e=d.series,f=d.graphic,h=e.data,i=e.chart,j=e.options,b=m(b,!0);d.firePointEvent("update",{options:a},function(){d.applyOptions(a),ca(a)&&(e.getAttribs(),f&&(a&&a.marker&&a.marker.symbol?d.graphic=f.destroy():f.attr(d.pointAttr[d.state||""])),a&&a.dataLabels&&d.dataLabel&&(d.dataLabel=d.dataLabel.destroy())),g=Da(d,h),e.updateParallelArrays(d,g),j.data[g]=d.options,e.isDirty=e.isDirtyData=!0,!e.fixedBox&&e.hasCartesianSeries&&(i.isDirtyBox=!0),"point"===j.legendType&&i.legend.destroyItem(d),b&&i.redraw(c)})},remove:function(a,b){var g,c=this,d=c.series,e=d.points,f=d.chart,h=d.data;Qa(b,f),a=m(a,!0),c.firePointEvent("remove",null,function(){g=Da(c,h),h.length===e.length&&e.splice(g,1),h.splice(g,1),d.options.data.splice(g,1),d.updateParallelArrays(c,"splice",g,1),c.destroy(),d.isDirty=!0,d.isDirtyData=!0,a&&f.redraw()})}}),q(O.prototype,{addPoint:function(a,b,c,d){var o,e=this.options,f=this.data,g=this.graph,h=this.area,i=this.chart,j=this.xAxis&&this.xAxis.names,k=g&&g.shift||0,l=e.data,n=this.xData;if(Qa(d,i),c&&p([g,h,this.graphNeg,this.areaNeg],function(a){a&&(a.shift=k+1)}),h&&(h.isArea=!0),b=m(b,!0),d={series:this},this.pointClass.prototype.applyOptions.apply(d,[a]),g=d.x,h=n.length,this.requireSorting&&g<n[h-1])for(o=!0;h&&n[h-1]>g;)h--;this.updateParallelArrays(d,"splice",h,0,0),this.updateParallelArrays(d,h),j&&(j[g]=d.name),l.splice(h,0,a),o&&(this.data.splice(h,0,null),this.processData()),"point"===e.legendType&&this.generatePoints(),c&&(f[0]&&f[0].remove?f[0].remove(!1):(f.shift(),this.updateParallelArrays(d,"shift"),l.shift())),this.isDirtyData=this.isDirty=!0,b&&(this.getAttribs(),i.redraw())},remove:function(a,b){var c=this,d=c.chart,a=m(a,!0);c.isRemoving||(c.isRemoving=!0,D(c,"remove",null,function(){c.destroy(),d.isDirtyLegend=d.isDirtyBox=!0,d.linkSeries(),a&&d.redraw(b)})),c.isRemoving=!1},update:function(a,b){var f,c=this.chart,d=this.type,e=F[d].prototype,a=w(this.userOptions,{animation:!1,index:this.index,pointStart:this.xData[0]},{data:this.options.data},a);this.remove(!1);for(f in e)e.hasOwnProperty(f)&&(this[f]=t);q(this,F[a.type||d].prototype),this.init(c,a),m(b,!0)&&c.redraw(!1)}}),q(la.prototype,{update:function(a,b){var c=this.chart,a=c.options[this.coll][this.options.index]=w(this.userOptions,a);
5
- this.destroy(!0),this._addedPlotLB=t,this.init(c,q(a,{events:t})),c.isDirtyBox=!0,m(b,!0)&&c.redraw()},remove:function(a){for(var b=this.chart,c=this.coll,d=this.series,e=d.length;e--;)d[e]&&d[e].remove(!1);ja(b.axes,this),ja(b[c],this),b.options[c].splice(this.options.index,1),p(b[c],function(a,b){a.options.index=b}),this.destroy(),b.isDirtyBox=!0,m(a,!0)&&b.redraw()},setTitle:function(a,b){this.update({title:a},b)},setCategories:function(a,b){this.update({categories:a},b)}}),ga=ka(O),F.line=ga,ba.area=w(S,{threshold:0});var pa=ka(O,{type:"area",getSegments:function(){var h,i,l,o,n,a=[],b=[],c=[],d=this.xAxis,e=this.yAxis,f=e.stacks[this.stackKey],g={},j=this.points,k=this.options.connectNulls;if(this.options.stacking&&!this.cropped){for(o=0;o<j.length;o++)g[j[o].x]=j[o];for(n in f)null!==f[n].total&&c.push(+n);c.sort(function(a,b){return a-b}),p(c,function(a){(!k||g[a]&&null!==g[a].y)&&(g[a]?b.push(g[a]):(h=d.translate(a),l=f[a].percent?f[a].total?100*f[a].cum/f[a].total:0:f[a].cum,i=e.toPixels(l,!0),b.push({y:null,plotX:h,clientX:h,plotY:i,yBottom:i,onMouseOver:sa})))}),b.length&&a.push(b)}else O.prototype.getSegments.call(this),a=this.segments;this.segments=a},getSegmentPath:function(a){var d,b=O.prototype.getSegmentPath.call(this,a),c=[].concat(b),e=this.options;d=b.length;var g,f=this.yAxis.getThreshold(e.threshold);if(3===d&&c.push("L",b[1],b[2]),e.stacking&&!this.closedStacks)for(d=a.length-1;d>=0;d--)g=m(a[d].yBottom,f),d<a.length-1&&e.step&&c.push(a[d+1].plotX,g),c.push(a[d].plotX,g);else this.closeSegment(c,a,f);return this.areaPath=this.areaPath.concat(c),b},closeSegment:function(a,b,c){a.push("L",b[b.length-1].plotX,c,"L",b[0].plotX,c)},drawGraph:function(){this.areaPath=[],O.prototype.drawGraph.apply(this);var a=this,b=this.areaPath,c=this.options,d=c.negativeColor,e=c.negativeFillColor,f=[["area",this.color,c.fillColor]];(d||e)&&f.push(["areaNeg",d,e]),p(f,function(d){var e=d[0],f=a[e];f?f.animate({d:b}):a[e]=a.chart.renderer.path(b).attr({fill:m(d[2],ya(d[1]).setOpacity(m(c.fillOpacity,.75)).get()),zIndex:0}).add(a.group)})},drawLegendSymbol:N.drawRectangle});F.area=pa,ba.spline=w(S),ga=ka(O,{type:"spline",getPointSpline:function(a,b,c){var h,i,j,k,d=b.plotX,e=b.plotY,f=a[c-1],g=a[c+1];if(f&&g){a=f.plotY,j=g.plotX;var l,g=g.plotY;h=(1.5*d+f.plotX)/2.5,i=(1.5*e+a)/2.5,j=(1.5*d+j)/2.5,k=(1.5*e+g)/2.5,l=(k-i)*(j-d)/(j-h)+e-k,i+=l,k+=l,i>a&&i>e?(i=v(a,e),k=2*e-i):a>i&&e>i&&(i=C(a,e),k=2*e-i),k>g&&k>e?(k=v(g,e),i=2*e-k):g>k&&e>k&&(k=C(g,e),i=2*e-k),b.rightContX=j,b.rightContY=k}return c?(b=["C",f.rightContX||f.plotX,f.rightContY||f.plotY,h||d,i||e,d,e],f.rightContX=f.rightContY=null):b=["M",d,e],b}}),F.spline=ga,ba.areaspline=w(ba.area),pa=pa.prototype,ga=ka(ga,{type:"areaspline",closedStacks:!0,getSegmentPath:pa.getSegmentPath,closeSegment:pa.closeSegment,drawGraph:pa.drawGraph,drawLegendSymbol:N.drawRectangle}),F.areaspline=ga,ba.column=w(S,{borderColor:"#FFFFFF",borderRadius:0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{brightness:.1,shadow:!1,halo:!1},select:{color:"#C0C0C0",borderColor:"#000000",shadow:!1}},dataLabels:{align:null,verticalAlign:null,y:null},stickyTracking:!1,tooltip:{distance:6},threshold:0}),ga=ka(O,{type:"column",pointAttrToOptions:{stroke:"borderColor",fill:"color",r:"borderRadius"},cropShoulder:0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){O.prototype.init.apply(this,arguments);var a=this,b=a.chart;b.hasRendered&&p(b.series,function(b){b.type===a.type&&(b.isDirty=!0)})},getColumnMetrics:function(){var f,h,a=this,b=a.options,c=a.xAxis,d=a.yAxis,e=c.reversed,g={},i=0;b.grouping===!1?i=1:p(a.chart.series,function(b){var c=b.options,e=b.yAxis;b.type===a.type&&b.visible&&d.len===e.len&&d.pos===e.pos&&(c.stacking?(f=b.stackKey,g[f]===t&&(g[f]=i++),h=g[f]):c.grouping!==!1&&(h=i++),b.columnIndex=h)});var c=C(M(c.transA)*(c.ordinalSlope||b.pointRange||c.closestPointRange||c.tickInterval||1),c.len),j=c*b.groupPadding,k=(c-2*j)/i,l=b.pointWidth,b=r(l)?(k-l)/2:k*b.pointPadding,l=m(l,k-2*b);return a.columnMetrics={width:l,offset:b+(j+((e?i-(a.columnIndex||0):a.columnIndex)||0)*k-c/2)*(e?-1:1)}},translate:function(){var a=this,b=a.chart,c=a.options,d=a.borderWidth=m(c.borderWidth,a.activePointCount>.5*a.xAxis.len?0:1),e=a.yAxis,f=a.translatedThreshold=e.getThreshold(c.threshold),g=m(c.minPointLength,5),c=a.getColumnMetrics(),h=c.width,i=a.barW=Ka(v(h,1+2*d)),j=a.pointXOffset=c.offset,k=-(d%2?.5:0),l=d%2?.5:1;b.renderer.isVML&&b.inverted&&(l+=1),O.prototype.translate.apply(a),p(a.points,function(c){var x,d=m(c.yBottom,f),p=C(v(-999-d,c.plotY),e.len+999+d),q=c.plotX+j,r=i,t=C(p,d);x=v(p,d)-t,M(x)<g&&g&&(x=g,t=u(M(t-f)>g?d-g:f-(e.translate(c.y,0,1,0,1)<=f?g:0))),c.barX=q,c.pointWidth=h,c.tooltipPos=b.inverted?[e.len-p,a.xAxis.len-q-r/2]:[q+r/2,p],d=M(q)<.5,r=u(q+r)+k,q=u(q)+k,r-=q,p=M(t)<.5,x=u(t+x)+l,t=u(t)+l,x-=t,d&&(q+=1,r-=1),p&&(t-=1,x+=1),c.shapeType="rect",c.shapeArgs={x:q,y:t,width:r,height:x}})},getSymbol:sa,drawLegendSymbol:N.drawRectangle,drawGraph:sa,drawPoints:function(){var f,g,h,a=this,b=this.chart,c=a.options,d=b.renderer,e=c.animationLimit||250;p(a.points,function(i){var j=i.plotY,k=i.graphic;j===t||isNaN(j)||null===i.y?k&&(i.graphic=k.destroy()):(f=i.shapeArgs,h=r(a.borderWidth)?{"stroke-width":a.borderWidth}:{},g=i.pointAttr[i.selected?"select":""]||a.pointAttr[""],k?(bb(k),k.attr(h)[b.pointCount<e?"animate":"attr"](w(f))):i.graphic=d[i.shapeType](f).attr(g).attr(h).add(a.group).shadow(c.shadow,null,c.stacking&&!c.borderRadius))})},animate:function(a){var b=this.yAxis,c=this.options,d=this.chart.inverted,e={};aa&&(a?(e.scaleY=.001,a=C(b.pos+b.len,v(b.pos,b.toPixels(c.threshold))),d?e.translateX=a-b.len:e.translateY=a,this.group.attr(e)):(e.scaleY=1,e[d?"translateX":"translateY"]=b.pos,this.group.animate(e,this.options.animation),this.animate=null))},remove:function(){var a=this,b=a.chart;b.hasRendered&&p(b.series,function(b){b.type===a.type&&(b.isDirty=!0)}),O.prototype.remove.apply(a,arguments)}}),F.column=ga,ba.bar=w(ba.column),pa=ka(ga,{type:"bar",inverted:!0}),F.bar=pa,ba.scatter=w(S,{lineWidth:0,tooltip:{headerFormat:'<span style="color:{series.color}">●</span> <span style="font-size: 10px;"> {series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"},stickyTracking:!1}),pa=ka(O,{type:"scatter",sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["markerGroup"],takeOrdinalPosition:!1,singularTooltips:!0,drawGraph:function(){this.options.lineWidth&&O.prototype.drawGraph.call(this)}}),F.scatter=pa,ba.pie=w(S,{borderColor:"#FFFFFF",borderWidth:1,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.name}},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,states:{hover:{brightness:.1,shadow:!1}},stickyTracking:!1,tooltip:{followPointer:!0}}),S={type:"pie",isCartesian:!1,pointClass:ka(Ea,{init:function(){Ea.prototype.init.apply(this,arguments);var b,a=this;return a.y<0&&(a.y=null),q(a,{visible:a.visible!==!1,name:m(a.name,"Slice")}),b=function(b){a.slice("select"===b.type)},K(a,"select",b),K(a,"unselect",b),a},setVisible:function(a){var b=this,c=b.series,d=c.chart;b.visible=b.options.visible=a=a===t?!b.visible:a,c.options.data[Da(b,c.data)]=b.options,p(["graphic","dataLabel","connector","shadowGroup"],function(c){b[c]&&b[c][a?"show":"hide"](!0)}),b.legendItem&&d.legend.colorizeItem(b,a),!c.isDirty&&c.options.ignoreHiddenPoint&&(c.isDirty=!0,d.redraw())},slice:function(a,b,c){var d=this.series;Qa(c,d.chart),m(b,!0),this.sliced=this.options.sliced=a=r(a)?a:!this.sliced,d.options.data[Da(this,d.data)]=this.options,a=a?this.slicedTranslation:{translateX:0,translateY:0},this.graphic.animate(a),this.shadowGroup&&this.shadowGroup.animate(a)},haloPath:function(a){var b=this.shapeArgs,c=this.series.chart;return this.series.chart.renderer.symbols.arc(c.plotLeft+b.x,c.plotTop+b.y,b.r+a,b.r+a,{innerR:this.shapeArgs.r,start:b.start,end:b.end})}}),requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},singularTooltips:!0,getColor:sa,animate:function(a){var b=this,c=b.points,d=b.startAngleRad;a||(p(c,function(a){var c=a.graphic,a=a.shapeArgs;c&&(c.attr({r:b.center[3]/2,start:d,end:d}),c.animate({r:a.r,start:a.start,end:a.end},b.options.animation))}),b.animate=null)},setData:function(a,b,c,d){O.prototype.setData.call(this,a,!1,c,d),this.processData(),this.generatePoints(),m(b,!0)&&this.chart.redraw(c)},generatePoints:function(){var a,c,d,e,b=0,f=this.options.ignoreHiddenPoint;for(O.prototype.generatePoints.call(this),c=this.points,d=c.length,a=0;d>a;a++)e=c[a],b+=f&&!e.visible?0:e.y;for(this.total=b,a=0;d>a;a++)e=c[a],e.percentage=b>0?e.y/b*100:0,e.total=b},translate:function(a){this.generatePoints();var f,g,h,o,p,b=0,c=this.options,d=c.slicedOffset,e=d+c.borderWidth,i=c.startAngle||0,j=this.startAngleRad=ma/180*(i-90),i=(this.endAngleRad=ma/180*(m(c.endAngle,i+360)-90))-j,k=this.points,l=c.dataLabels.distance,c=c.ignoreHiddenPoint,n=k.length;for(a||(this.center=a=this.getCenter()),this.getX=function(b,c){return h=U.asin(C((b-a[1])/(a[2]/2+l),1)),a[0]+(c?-1:1)*Z(h)*(a[2]/2+l)},o=0;n>o;o++)p=k[o],f=j+b*i,(!c||p.visible)&&(b+=p.percentage/100),g=j+b*i,p.shapeType="arc",p.shapeArgs={x:a[0],y:a[1],r:a[2]/2,innerR:a[3]/2,start:u(1e3*f)/1e3,end:u(1e3*g)/1e3},h=(g+f)/2,h>1.5*ma?h-=2*ma:-ma/2>h&&(h+=2*ma),p.slicedTranslation={translateX:u(Z(h)*d),translateY:u(ea(h)*d)},f=Z(h)*a[2]/2,g=ea(h)*a[2]/2,p.tooltipPos=[a[0]+.7*f,a[1]+.7*g],p.half=-ma/2>h||h>ma/2?1:0,p.angle=h,e=C(e,l/2),p.labelPos=[a[0]+f+Z(h)*l,a[1]+g+ea(h)*l,a[0]+f+Z(h)*e,a[1]+g+ea(h)*e,a[0]+f,a[1]+g,0>l?"center":p.half?"right":"left",h]},drawGraph:null,drawPoints:function(){var c,d,f,g,a=this,b=a.chart.renderer,e=a.options.shadow;e&&!a.shadowGroup&&(a.shadowGroup=b.g("shadow").add(a.group)),p(a.points,function(h){d=h.graphic,g=h.shapeArgs,f=h.shadowGroup,e&&!f&&(f=h.shadowGroup=b.g("shadow").add(a.shadowGroup)),c=h.sliced?h.slicedTranslation:{translateX:0,translateY:0},f&&f.attr(c),d?d.animate(q(g,c)):h.graphic=d=b[h.shapeType](g).setRadialReference(a.center).attr(h.pointAttr[h.selected?"select":""]).attr({"stroke-linejoin":"round"}).attr(c).add(a.group).shadow(e,f),void 0!==h.visible&&h.setVisible(h.visible)})},sortByAngle:function(a,b){a.sort(function(a,d){return void 0!==a.angle&&(d.angle-a.angle)*b})},drawLegendSymbol:N.drawRectangle,getCenter:X.getCenter,getSymbol:sa},S=ka(O,S),F.pie=S,O.prototype.drawDataLabels=function(){var f,g,h,i,a=this,b=a.options,c=b.cursor,d=b.dataLabels,e=a.points;(d.enabled||a._hasPointLabels)&&(a.dlProcessOptions&&a.dlProcessOptions(d),i=a.plotGroup("dataLabelsGroup","data-labels","hidden",d.zIndex||6),!a.hasRendered&&m(d.defer,!0)&&(i.attr({opacity:0}),K(a,"afterAnimate",function(){a.dataLabelsGroup.show()[b.animation?"animate":"attr"]({opacity:1},{duration:200})})),g=d,p(e,function(b){var e,o,n,l=b.dataLabel,p=b.connector,u=!0;if(f=b.options&&b.options.dataLabels,e=m(f&&f.enabled,g.enabled),l&&!e)b.dataLabel=l.destroy();else if(e){if(d=w(g,f),e=d.rotation,o=b.getLabelConfig(),h=d.format?Ia(d.format,o):d.formatter.call(o,d),d.style.color=m(d.color,d.style.color,a.color,"black"),l)r(h)?(l.attr({text:h}),u=!1):(b.dataLabel=l=l.destroy(),p&&(b.connector=p.destroy()));else if(r(h)){l={fill:d.backgroundColor,stroke:d.borderColor,"stroke-width":d.borderWidth,r:d.borderRadius||0,rotation:e,padding:d.padding,zIndex:1};for(n in l)l[n]===t&&delete l[n];l=b.dataLabel=a.chart.renderer[e?"text":"label"](h,0,-999,null,null,null,d.useHTML).attr(l).css(q(d.style,c&&{cursor:c})).add(i).shadow(d.shadow)}l&&a.alignDataLabel(b,l,d,null,u)}}))},O.prototype.alignDataLabel=function(a,b,c,d,e){var f=this.chart,g=f.inverted,h=m(a.plotX,-999),i=m(a.plotY,-999),j=b.getBBox();(a=this.visible&&(a.series.forceDL||f.isInsidePlot(h,u(i),g)||d&&f.isInsidePlot(h,g?d.x+1:d.y+d.height-1,g)))&&(d=q({x:g?f.plotWidth-i:h,y:u(g?f.plotHeight-h:i),width:0,height:0},d),q(c,{width:j.width,height:j.height}),c.rotation?(g={align:c.align,x:d.x+c.x+d.width/2,y:d.y+c.y+d.height/2},b[e?"attr":"animate"](g)):(b.align(c,null,d),g=b.alignAttr,"justify"===m(c.overflow,"justify")?this.justifyDataLabel(b,c,g,j,d,e):m(c.crop,!0)&&(a=f.isInsidePlot(g.x,g.y)&&f.isInsidePlot(g.x+j.width,g.y+j.height)))),a||(b.attr({y:-999}),b.placed=!1)},O.prototype.justifyDataLabel=function(a,b,c,d,e,f){var j,k,g=this.chart,h=b.align,i=b.verticalAlign;j=c.x,0>j&&("right"===h?b.align="left":b.x=-j,k=!0),j=c.x+d.width,j>g.plotWidth&&("left"===h?b.align="right":b.x=g.plotWidth-j,k=!0),j=c.y,0>j&&("bottom"===i?b.verticalAlign="top":b.y=-j,k=!0),j=c.y+d.height,j>g.plotHeight&&("top"===i?b.verticalAlign="bottom":b.y=g.plotHeight-j,k=!0),k&&(a.placed=!f,a.align(b,null,e))},F.pie&&(F.pie.prototype.drawDataLabels=function(){var c,i,j,t,w,x,y,A,C,G,D,B,a=this,b=a.data,d=a.chart,e=a.options.dataLabels,f=m(e.connectorPadding,10),g=m(e.connectorWidth,1),h=d.plotWidth,d=d.plotHeight,k=m(e.softConnector,!0),l=e.distance,o=a.center,n=o[2]/2,q=o[1],r=l>0,z=[[],[]],F=[0,0,0,0],N=function(a,b){return b.y-a.y};if(a.visible&&(e.enabled||a._hasPointLabels)){for(O.prototype.drawDataLabels.apply(a),p(b,function(a){a.dataLabel&&a.visible&&z[a.half].push(a)}),D=0;!y&&b[D];)y=b[D]&&b[D].dataLabel&&(b[D].dataLabel.getBBox().height||21),D++;for(D=2;D--;){var E,b=[],K=[],H=z[D],I=H.length;if(a.sortByAngle(H,D-.5),l>0){for(B=q-n-l;q+n+l>=B;B+=y)b.push(B);if(w=b.length,I>w){for(c=[].concat(H),c.sort(N),B=I;B--;)c[B].rank=B;for(B=I;B--;)H[B].rank>=w&&H.splice(B,1);I=H.length}for(B=0;I>B;B++){c=H[B],x=c.labelPos,c=9999;var Q,P;for(P=0;w>P;P++)Q=M(b[P]-x[1]),c>Q&&(c=Q,E=P);if(B>E&&null!==b[B])E=B;else for(I-B+E>w&&null!==b[B]&&(E=w-I+B);null===b[E];)E++;K.push({i:E,y:b[E]}),b[E]=null}K.sort(N)}for(B=0;I>B;B++)c=H[B],x=c.labelPos,t=c.dataLabel,G=c.visible===!1?"hidden":"visible",c=x[1],l>0?(w=K.pop(),E=w.i,C=w.y,(c>C&&null!==b[E+1]||C>c&&null!==b[E-1])&&(C=c)):C=c,A=e.justify?o[0]+(D?-1:1)*(n+l):a.getX(0===E||E===b.length-1?c:C,D),t._attr={visibility:G,align:x[6]},t._pos={x:A+e.x+({left:f,right:-f}[x[6]]||0),y:C+e.y-10},t.connX=A,t.connY=C,null===this.options.size&&(w=t.width,f>A-w?F[3]=v(u(w-A+f),F[3]):A+w>h-f&&(F[1]=v(u(A+w-h+f),F[1])),0>C-y/2?F[0]=v(u(-C+y/2),F[0]):C+y/2>d&&(F[2]=v(u(C+y/2-d),F[2])))}(0===Ba(F)||this.verifyDataLabelOverflow(F))&&(this.placeDataLabels(),r&&g&&p(this.points,function(b){i=b.connector,x=b.labelPos,(t=b.dataLabel)&&t._pos?(G=t._attr.visibility,A=t.connX,C=t.connY,j=k?["M",A+("left"===x[6]?5:-5),C,"C",A,C,2*x[2]-x[4],2*x[3]-x[5],x[2],x[3],"L",x[4],x[5]]:["M",A+("left"===x[6]?5:-5),C,"L",x[2],x[3],"L",x[4],x[5]],i?(i.animate({d:j}),i.attr("visibility",G)):b.connector=i=a.chart.renderer.path(j).attr({"stroke-width":g,stroke:e.connectorColor||b.color||"#606060",visibility:G}).add(a.dataLabelsGroup)):i&&(b.connector=i.destroy())}))}},F.pie.prototype.placeDataLabels=function(){p(this.points,function(a){var b,a=a.dataLabel;a&&((b=a._pos)?(a.attr(a._attr),a[a.moved?"animate":"attr"](b),a.moved=!0):a&&a.attr({y:-999}))})},F.pie.prototype.alignDataLabel=sa,F.pie.prototype.verifyDataLabelOverflow=function(a){var f,b=this.center,c=this.options,d=c.center,e=c=c.minSize||80;return null!==d[0]?e=v(b[2]-v(a[1],a[3]),c):(e=v(b[2]-a[1]-a[3],c),b[0]+=(a[3]-a[1])/2),null!==d[1]?e=v(C(e,b[2]-v(a[0],a[2])),c):(e=v(C(e,b[2]-a[0]-a[2]),c),b[1]+=(a[0]-a[2])/2),e<b[2]?(b[2]=e,this.translate(b),p(this.points,function(a){a.dataLabel&&(a.dataLabel._pos=null)}),this.drawDataLabels&&this.drawDataLabels()):f=!0,f}),F.column&&(F.column.prototype.alignDataLabel=function(a,b,c,d,e){var f=this.chart,g=f.inverted,h=a.dlBox||a.shapeArgs,i=a.below||a.plotY>m(this.translatedThreshold,f.plotSizeY),j=m(c.inside,!!this.options.stacking);h&&(d=w(h),g&&(d={x:f.plotWidth-d.y-d.height,y:f.plotHeight-d.x-d.width,width:d.height,height:d.width}),!j)&&(g?(d.x+=i?0:d.width,d.width=0):(d.y+=i?d.height:0,d.height=0)),c.align=m(c.align,!g||j?"center":i?"right":"left"),c.verticalAlign=m(c.verticalAlign,g||j?"middle":i?"top":"bottom"),O.prototype.alignDataLabel.call(this,a,b,c,d,e)}),S=R.TrackerMixin={drawTrackerPoint:function(){var a=this,b=a.chart,c=b.pointer,d=a.options.cursor,e=d&&{cursor:d},f=function(c){var e,d=c.target;for(b.hoverSeries!==a&&a.onMouseOver();d&&!e;)e=d.point,d=d.parentNode;e!==t&&e!==b.hoverPoint&&e.onMouseOver(c)};p(a.points,function(a){a.graphic&&(a.graphic.element.point=a),a.dataLabel&&(a.dataLabel.element.point=a)}),a._hasTracking||(p(a.trackerGroups,function(b){a[b]&&(a[b].addClass("highcharts-tracker").on("mouseover",f).on("mouseout",function(a){c.onTrackerMouseOut(a)}).css(e),$a)&&a[b].on("touchstart",f)}),a._hasTracking=!0)},drawTrackerGraph:function(){var m,a=this,b=a.options,c=b.trackByArea,d=[].concat(c?a.areaPath:a.graphPath),e=d.length,f=a.chart,g=f.pointer,h=f.renderer,i=f.options.tooltip.snap,j=a.tracker,k=b.cursor,l=k&&{cursor:k},k=a.singlePoints,n=function(){f.hoverSeries!==a&&a.onMouseOver()},q="rgba(192,192,192,"+(aa?1e-4:.002)+")";if(e&&!c)for(m=e+1;m--;)"M"===d[m]&&d.splice(m+1,0,d[m+1]-i,d[m+2],"L"),(m&&"M"===d[m]||m===e)&&d.splice(m,0,"L",d[m-2]+i,d[m-1]);for(m=0;m<k.length;m++)e=k[m],d.push("M",e.plotX-i,e.plotY,"L",e.plotX+i,e.plotY);j?j.attr({d:d}):(a.tracker=h.path(d).attr({"stroke-linejoin":"round",visibility:a.visible?"visible":"hidden",stroke:q,fill:c?q:Q,"stroke-width":b.lineWidth+(c?0:2*i),zIndex:2}).add(a.group),p([a.tracker,a.markerGroup],function(a){a.addClass("highcharts-tracker").on("mouseover",n).on("mouseout",function(a){g.onTrackerMouseOut(a)}).css(l),$a&&a.on("touchstart",n)}))}},F.column&&(ga.prototype.drawTracker=S.drawTrackerPoint),F.pie&&(F.pie.prototype.drawTracker=S.drawTrackerPoint),F.scatter&&(pa.prototype.drawTracker=S.drawTrackerPoint),q(lb.prototype,{setItemEvents:function(a,b,c,d,e){var f=this;(c?b:a.legendGroup).on("mouseover",function(){a.setState("hover"),b.css(f.options.itemHoverStyle)}).on("mouseout",function(){b.css(a.visible?d:e),a.setState()}).on("click",function(b){var c=function(){a.setVisible()},b={browserEvent:b};a.firePointEvent?a.firePointEvent("legendItemClick",b,c):D(a,"legendItemClick",b,c)})},createCheckboxForItem:function(a){a.checkbox=Y("input",{type:"checkbox",checked:a.selected,defaultChecked:a.selected},this.options.itemCheckboxStyle,this.chart.container),K(a.checkbox,"click",function(b){D(a,"checkboxClick",{checked:b.target.checked},function(){a.select()})})}}),E.legend.itemStyle.cursor="pointer",q(Ya.prototype,{showResetZoom:function(){var a=this,b=E.lang,c=a.options.chart.resetZoomButton,d=c.theme,e=d.states,f="chart"===c.relativeTo?null:"plotBox";this.resetZoomButton=a.renderer.button(b.resetZoom,null,null,function(){a.zoomOut()},d,e&&e.hover).attr({align:c.position.align,title:b.resetZoomTitle}).add().align(c.position,!1,f)},zoomOut:function(){var a=this;D(a,"selection",{resetSelection:!0},function(){a.zoom()})},zoom:function(a){var b,e,c=this.pointer,d=!1;!a||a.resetSelection?p(this.axes,function(a){b=a.zoom()}):p(a.xAxis.concat(a.yAxis),function(a){var e=a.axis,h=e.isXAxis;(c[h?"zoomX":"zoomY"]||c[h?"pinchX":"pinchY"])&&(b=e.zoom(a.min,a.max),e.displayBtn&&(d=!0))}),e=this.resetZoomButton,d&&!e?this.showResetZoom():!d&&ca(e)&&(this.resetZoomButton=e.destroy()),b&&this.redraw(m(this.options.chart.animation,a&&a.animation,this.pointCount<100))},pan:function(a,b){var e,c=this,d=c.hoverPoints;d&&p(d,function(a){a.setState()}),p("xy"===b?[1,0]:[1],function(b){var d=a[b?"chartX":"chartY"],h=c[b?"xAxis":"yAxis"][0],i=c[b?"mouseDownX":"mouseDownY"],j=(h.pointRange||0)/2,k=h.getExtremes(),l=h.toValue(i-d,!0)+j,i=h.toValue(i+c[b?"plotWidth":"plotHeight"]-d,!0)-j;h.series.length&&l>C(k.dataMin,k.min)&&i<v(k.dataMax,k.max)&&(h.setExtremes(l,i,!1,!1,{trigger:"pan"}),e=!0),c[b?"mouseDownX":"mouseDownY"]=d}),e&&c.redraw(!1),G(c.container,{cursor:"move"})}}),q(Ea.prototype,{select:function(a,b){var c=this,d=c.series,e=d.chart,a=m(a,!c.selected);c.firePointEvent(a?"select":"unselect",{accumulate:b},function(){c.selected=c.options.selected=a,d.options.data[Da(c,d.data)]=c.options,c.setState(a&&"select"),b||p(e.getSelectedPoints(),function(a){a.selected&&a!==c&&(a.selected=a.options.selected=!1,d.options.data[Da(a,d.data)]=a.options,a.setState(""),a.firePointEvent("unselect"))})})},onMouseOver:function(a){var b=this.series,c=b.chart,d=c.tooltip,e=c.hoverPoint;e&&e!==this&&e.onMouseOut(),this.firePointEvent("mouseOver"),d&&(!d.shared||b.noSharedTooltip)&&d.refresh(this,a),this.setState("hover"),c.hoverPoint=this},onMouseOut:function(){var a=this.series.chart,b=a.hoverPoints;b&&-1!==Da(this,b)||(this.firePointEvent("mouseOut"),this.setState(),a.hoverPoint=null)},importEvents:function(){if(!this.hasImportedEvents){var b,a=w(this.series.options.point,this.options).events;this.events=a;for(b in a)K(this,b,a[b]);this.hasImportedEvents=!0}},setState:function(a,b){var p,c=this.plotX,d=this.plotY,e=this.series,f=e.options.states,g=ba[e.type].marker&&e.options.marker,h=g&&!g.enabled,i=g&&g.states[a],j=i&&i.enabled===!1,k=e.stateMarkerGraphic,l=this.marker||{},m=e.chart,n=e.halo,a=a||"";p=this.pointAttr[a]||e.pointAttr[a],a===this.state&&!b||this.selected&&"select"!==a||f[a]&&f[a].enabled===!1||a&&(j||h&&i.enabled===!1)||a&&l.states&&l.states[a]&&l.states[a].enabled===!1||(this.graphic?(g=g&&this.graphic.symbolName&&p.r,this.graphic.attr(w(p,g?{x:c-g,y:d-g,width:2*g,height:2*g}:{})),k&&k.hide()):(a&&i&&(g=i.radius,l=l.symbol||e.symbol,k&&k.currentSymbol!==l&&(k=k.destroy()),k?k[b?"animate":"attr"]({x:c-g,y:d-g}):l&&(e.stateMarkerGraphic=k=m.renderer.symbol(l,c-g,d-g,2*g,2*g).attr(p).add(e.markerGroup),k.currentSymbol=l)),k&&k[a&&m.isInsidePlot(c,d,m.inverted)?"show":"hide"]()),(c=f[a]&&f[a].halo)&&c.size?(n||(e.halo=n=m.renderer.path().add(e.seriesGroup)),n.attr(q({fill:ya(this.color||e.color).setOpacity(c.opacity).get()},c.attributes))[b?"animate":"attr"]({d:this.haloPath(c.size)})):n&&n.attr({d:[]}),this.state=a)},haloPath:function(a){var b=this.series,c=b.chart,d=b.getPlotBox(),e=c.inverted;return c.renderer.symbols.circle(d.translateX+(e?b.yAxis.len-this.plotY:this.plotX)-a,d.translateY+(e?b.xAxis.len-this.plotX:this.plotY)-a,2*a,2*a)}}),q(O.prototype,{onMouseOver:function(){var a=this.chart,b=a.hoverSeries;b&&b!==this&&b.onMouseOut(),this.options.events.mouseOver&&D(this,"mouseOver"),this.setState("hover"),a.hoverSeries=this},onMouseOut:function(){var a=this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;d&&d.onMouseOut(),this&&a.events.mouseOut&&D(this,"mouseOut"),c&&!a.stickyTracking&&(!c.shared||this.noSharedTooltip)&&c.hide(),this.setState(),b.hoverSeries=null},setState:function(a){var b=this.options,c=this.graph,d=this.graphNeg,e=b.states,b=b.lineWidth,a=a||"";this.state!==a&&(this.state=a,e[a]&&e[a].enabled===!1||(a&&(b=e[a].lineWidth||b+1),c&&!c.dashstyle&&(a={"stroke-width":b},c.attr(a),d&&d.attr(a))))},setVisible:function(a,b){var f,c=this,d=c.chart,e=c.legendItem,g=d.options.chart.ignoreHiddenSeries,h=c.visible;f=(c.visible=a=c.userOptions.visible=a===t?!h:a)?"show":"hide",p(["group","dataLabelsGroup","markerGroup","tracker"],function(a){c[a]&&c[a][f]()}),d.hoverSeries===c&&c.onMouseOut(),e&&d.legend.colorizeItem(c,a),c.isDirty=!0,c.options.stacking&&p(d.series,function(a){a.options.stacking&&a.visible&&(a.isDirty=!0)}),p(c.linkedSeries,function(b){b.setVisible(a,!1)}),g&&(d.isDirtyBox=!0),b!==!1&&d.redraw(),D(c,f)},setTooltipPoints:function(a){var c,d,h,i,b=[],e=this.xAxis,f=e&&e.getExtremes(),g=e?e.tooltipLen||e.len:this.chart.plotSizeX,j=[];if(this.options.enableMouseTracking!==!1&&!this.singularTooltips){for(a&&(this.tooltipPoints=null),p(this.segments||this.points,function(a){b=b.concat(a)}),e&&e.reversed&&(b=b.reverse()),this.orderTooltipPoints&&this.orderTooltipPoints(b),a=b.length,i=0;a>i;i++)if(e=b[i],c=e.x,c>=f.min&&c<=f.max)for(h=b[i+1],c=d===t?0:d+1,d=b[i+1]?C(v(0,T((e.clientX+(h?h.wrappedClientX||h.clientX:g))/2)),g):g;c>=0&&d>=c;)j[c++]=e;this.tooltipPoints=j}},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(a){this.selected=a=a===t?!this.selected:a,this.checkbox&&(this.checkbox.checked=a),D(this,a?"select":"unselect")},drawTracker:S.drawTrackerGraph}),q(R,{Axis:la,Chart:Ya,Color:ya,Point:Ea,Tick:Sa,Renderer:Za,Series:O,SVGElement:P,SVGRenderer:ta,arrayMin:Na,arrayMax:Ba,charts:V,dateFormat:cb,format:Ia,pathAnim:ub,getOptions:function(){return E},hasBidiBug:Nb,isTouchDevice:Jb,numberFormat:Ga,seriesTypes:F,setOptions:function(a){return E=w(!0,E,a),Cb(),E},addEvent:K,removeEvent:W,createElement:Y,discardElement:Pa,css:G,each:p,extend:q,map:Ua,merge:w,pick:m,splat:qa,extendClass:ka,pInt:z,wrap:Ma,svg:aa,canvas:fa,vml:!aa&&!fa,product:"Highcharts",version:"4.0.1"})}(),jQuery(document).ready(function($){$("#close-share").click(function(){$.cookie("ignore_social_share",1,{expires:30})}),$(".big-button--share").click(function(){$.cookie("ignore_social_share",1)}),$.cookie("ignore_social_share")||leadin_check_social_share_popup(),$("#filter_action").select2(),$("#filter_action").change(function(){var $this=$(this);"submitted"==$this.val()?$("#form-filter-input").show():($("#form-filter-input").hide(),$("#filter_form").select2("val","any form"))}),$("#view-all-do-not-track-selectors").click(function(){$(".form-do-not-track, #view-less-do-not-track-selectors").not(".do-not-track-always-show").show(),$("#view-all-do-not-track-selectors").hide()}),$("#view-less-do-not-track-selectors").click(function(){$(".form-do-not-track, #view-less-do-not-track-selectors").not(".do-not-track-always-show").hide(),$("#view-all-do-not-track-selectors").show()}),$("#filter_content").select2({query:function(query){var key=query.term;$.ajax({type:"POST",url:li_admin_ajax.ajax_url,data:{action:"leadin_get_posts_and_pages",search_term:key},success:function(data){var i,json_data=jQuery.parseJSON(data),data_test={results:[]};for(i=0;i<json_data.length;i++)data_test.results.push({id:json_data[i].post_title,text:json_data[i].post_title});query.callback(data_test)}})},initSelection:function(){$("#filter_content").val()?$("#filter_content").select2("data",{id:$("#filter_content").val(),text:$("#filter_content").val()}):$("#filter_content").select2("data",{id:"any page",text:"any page"})}}),$("#filter_form").select2({query:function(query){var key=query.term;$.ajax({type:"POST",url:li_admin_ajax.ajax_url,data:{action:"leadin_get_form_selectors",search_term:key},success:function(data){var i,json_data=jQuery.parseJSON(data),data_test={results:[]};for(i=0;i<json_data.length;i++)data_test.results.push({id:json_data[i],text:json_data[i]});query.callback(data_test)}})},initSelection:function(){$("#filter_form").val()?$("#filter_form").select2("data",{id:$("#filter_form").val(),text:$("#filter_form").val()}):$("#filter_form").select2("data",{id:"any form",text:"any form"})}}),$("#leadin-contact-status").change(function(){$("#leadin-contact-status-button").addClass("button-primary")}),$("input[name=popup-position]:radio").change(function(){$("#btn-activate-subscribe").attr("href",window.location.href+"&leadin_action=activate&power_up=subscribe_widget&redirect_to="+encodeURIComponent(window.location.href+"&activate_popup=true&popup_position="+$("input:radio[name='popup-position']:checked").val()))}),$("#li_subscribe_vex_class, #li_subscribe_heading, #li_subscribe_text, #li_subscribe_btn_label, #li_subscribe_name_fields:checkbox, #li_subscribe_phone_field:checkbox").change(function(){var preview_link=$("#wp-admin-bar-view-site a.ab-item").attr("href")+"?preview-subscribe=1";preview_link+="&lis_heading="+$("#li_subscribe_heading").val(),preview_link+="&lis_desc="+$("#li_subscribe_text").val(),preview_link+="&lis_show_names="+($("#li_subscribe_name_fields").is(":checked")?1:0),preview_link+="&lis_show_phone="+($("#li_subscribe_phone_field").is(":checked")?1:0),preview_link+="&lis_btn_label="+$("#li_subscribe_btn_label").val(),preview_link+="&lis_vex_class="+$("#li_subscribe_vex_class option:selected").val(),$("#preview-popup-link").attr("href",preview_link)}),$("#pro-upgrade-button").click(function(e){return e.preventDefault(),$("#agree-pp").is(":checked")?($("#agree-pp-error").hide(),$(this).addClass("btn-submitting").text("Upgrading..."),void $.ajax({type:"POST",url:li_admin_ajax.ajax_url,data:{action:"leadin_upgrade_to_pro"},success:function(redirect_to){redirect_to&&(window.location.href=redirect_to+"&pro_upgrade=1")}})):($("#agree-pp-error").show(),!1)})}),jQuery(document).ready(function($){var $bulk_opt_selected=$('.bulkactions select option[value="add_tag_to_selected"], .bulkactions select option[value="remove_tag_from_selected"], .bulkactions select option[value="delete_selected"]');$("#leadin-contacts input:checkbox").not("thead input:checkbox, tfoot input:checkbox").bind("change",function(){var cb_count=0,selected_vals="",$btn_selected=$("#leadin-export-selected-leads"),$input_selected_vals=$(".leadin-selected-contacts"),$cb_selected=$("#leadin-contacts input:checkbox:checked").not("thead input:checkbox, tfoot input:checkbox");$cb_selected.length>0?($btn_selected.attr("disabled",!1),$bulk_opt_selected.attr("disabled",!1)):($btn_selected.attr("disabled",!0),$bulk_opt_selected.attr("disabled",!0)),$cb_selected.each(function(){selected_vals+=$(this).val(),cb_count!=$cb_selected.length-1&&(selected_vals+=","),cb_count++}),$input_selected_vals.val(selected_vals),$(".selected-contacts-count").text(cb_count)}),$("#cb-select-all-1, #cb-select-all-2").bind("change",function(){var cb_count=0,selected_vals="",$this=$(this),$btn_selected=$("#leadin-export-selected-leads"),$cb_selected=$("#leadin-contacts input:checkbox").not("thead input:checkbox, tfoot input:checkbox"),$input_selected_vals=$(".leadin-selected-contacts");$cb_selected.each(function(){selected_vals+=$(this).val(),cb_count!=$cb_selected.length-1&&(selected_vals+=","),cb_count++}),$input_selected_vals.val(selected_vals),$this.is(":checked")?($btn_selected.attr("disabled",!1),$bulk_opt_selected.attr("disabled",!1)):($btn_selected.attr("disabled",!0),$bulk_opt_selected.attr("disabled",!0),$(".selected-contacts-count").text($("#contact-count").text())),$(".selected-contacts-count").text(cb_count)}),$(".postbox .handlediv").bind("click",function(){var $postbox=$(this).parent();$postbox.hasClass("closed")?$postbox.removeClass("closed"):$postbox.addClass("closed")}),$(".selected-contacts-count").text($("#contact-count").text()),$bulk_opt_selected.attr("disabled",!0),$(".bulkactions select").change(function(){{var $this=$(this);$("#contact-count").text()}"add_tag_to_all"==$this.val()||"add_tag_to_selected"==$this.val()?($("#bulk-edit-tags h2").html($("#bulk-edit-tags h2").html().replace("remove from","add to")),$("#bulk-edit-button").val("Add Tag"),$("#bulk-edit-tag-action").val("add_tag"),tb_show("","#TB_inline?width=400&height=175&inlineId=bulk-edit-tags"),$(".bulkactions select").val("-1")):("remove_tag_from_all"==$this.val()||"remove_tag_from_selected"==$this.val())&&($("#bulk-edit-tags h2").html($("#bulk-edit-tags h2").html().replace("add to","remove from")),$("#bulk-edit-button").val("Remove Tag"),$("#bulk-edit-tag-action").val("remove_tag"),tb_show("","#TB_inline?width=400&height=175&inlineId=bulk-edit-tags"),$(".bulkactions select").val("-1"))}),$("#contact-detail-read-more").click(function(){$("#company-detail-overview-short").hide(),$("#company-detail-overview-full").show()}),$("#contact-detail-read-less").click(function(){$("#company-detail-overview-full").hide(),$("#company-detail-overview-short").show()})}),function($){"undefined"==typeof $.fn.each2&&$.extend($.fn,{each2:function(c){for(var j=$([0]),i=-1,l=this.length;++i<l&&(j.context=j[0]=this[i])&&c.call(j[0],i,j)!==!1;);return this}})}(jQuery),function($,undefined){"use strict";function reinsertElement(element){var placeholder=$(document.createTextNode(""));element.before(placeholder),placeholder.before(element),placeholder.remove()}function stripDiacritics(str){function match(a){return DIACRITICS[a]||a
6
- }return str.replace(/[^\u0000-\u007E]/g,match)}function indexOf(value,array){for(var i=0,l=array.length;l>i;i+=1)if(equal(value,array[i]))return i;return-1}function measureScrollbar(){var $template=$(MEASURE_SCROLLBAR_TEMPLATE);$template.appendTo("body");var dim={width:$template.width()-$template[0].clientWidth,height:$template.height()-$template[0].clientHeight};return $template.remove(),dim}function equal(a,b){return a===b?!0:a===undefined||b===undefined?!1:null===a||null===b?!1:a.constructor===String?a+""==b+"":b.constructor===String?b+""==a+"":!1}function splitVal(string,separator){var val,i,l;if(null===string||string.length<1)return[];for(val=string.split(separator),i=0,l=val.length;l>i;i+=1)val[i]=$.trim(val[i]);return val}function getSideBorderPadding(element){return element.outerWidth(!1)-element.width()}function installKeyUpChangeEvent(element){var key="keyup-change-value";element.on("keydown",function(){$.data(element,key)===undefined&&$.data(element,key,element.val())}),element.on("keyup",function(){var val=$.data(element,key);val!==undefined&&element.val()!==val&&($.removeData(element,key),element.trigger("keyup-change"))})}function installFilteredMouseMove(element){element.on("mousemove",function(e){var lastpos=lastMousePosition;(lastpos===undefined||lastpos.x!==e.pageX||lastpos.y!==e.pageY)&&$(e.target).trigger("mousemove-filtered",e)})}function debounce(quietMillis,fn,ctx){ctx=ctx||undefined;var timeout;return function(){var args=arguments;window.clearTimeout(timeout),timeout=window.setTimeout(function(){fn.apply(ctx,args)},quietMillis)}}function installDebouncedScroll(threshold,element){var notify=debounce(threshold,function(e){element.trigger("scroll-debounced",e)});element.on("scroll",function(e){indexOf(e.target,element.get())>=0&&notify(e)})}function focus($el){$el[0]!==document.activeElement&&window.setTimeout(function(){var range,el=$el[0],pos=$el.val().length;$el.focus();var isVisible=el.offsetWidth>0||el.offsetHeight>0;isVisible&&el===document.activeElement&&(el.setSelectionRange?el.setSelectionRange(pos,pos):el.createTextRange&&(range=el.createTextRange(),range.collapse(!1),range.select()))},0)}function getCursorInfo(el){el=$(el)[0];var offset=0,length=0;if("selectionStart"in el)offset=el.selectionStart,length=el.selectionEnd-offset;else if("selection"in document){el.focus();var sel=document.selection.createRange();length=document.selection.createRange().text.length,sel.moveStart("character",-el.value.length),offset=sel.text.length-length}return{offset:offset,length:length}}function killEvent(event){event.preventDefault(),event.stopPropagation()}function killEventImmediately(event){event.preventDefault(),event.stopImmediatePropagation()}function measureTextWidth(e){if(!sizer){var style=e[0].currentStyle||window.getComputedStyle(e[0],null);sizer=$(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:style.fontSize,fontFamily:style.fontFamily,fontStyle:style.fontStyle,fontWeight:style.fontWeight,letterSpacing:style.letterSpacing,textTransform:style.textTransform,whiteSpace:"nowrap"}),sizer.attr("class","select2-sizer"),$("body").append(sizer)}return sizer.text(e.val()),sizer.width()}function syncCssClasses(dest,src,adapter){var classes,adapted,replacements=[];classes=dest.attr("class"),classes&&(classes=""+classes,$(classes.split(" ")).each2(function(){0===this.indexOf("select2-")&&replacements.push(this)})),classes=src.attr("class"),classes&&(classes=""+classes,$(classes.split(" ")).each2(function(){0!==this.indexOf("select2-")&&(adapted=adapter(this),adapted&&replacements.push(adapted))})),dest.attr("class",replacements.join(" "))}function markMatch(text,term,markup,escapeMarkup){var match=stripDiacritics(text.toUpperCase()).indexOf(stripDiacritics(term.toUpperCase())),tl=term.length;return 0>match?void markup.push(escapeMarkup(text)):(markup.push(escapeMarkup(text.substring(0,match))),markup.push("<span class='select2-match'>"),markup.push(escapeMarkup(text.substring(match,match+tl))),markup.push("</span>"),void markup.push(escapeMarkup(text.substring(match+tl,text.length))))}function defaultEscapeMarkup(markup){var replace_map={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return String(markup).replace(/[&<>"'\/\\]/g,function(match){return replace_map[match]})}function ajax(options){var timeout,handler=null,quietMillis=options.quietMillis||100,ajaxUrl=options.url,self=this;return function(query){window.clearTimeout(timeout),timeout=window.setTimeout(function(){var data=options.data,url=ajaxUrl,transport=options.transport||$.fn.select2.ajaxDefaults.transport,deprecated={type:options.type||"GET",cache:options.cache||!1,jsonpCallback:options.jsonpCallback||undefined,dataType:options.dataType||"json"},params=$.extend({},$.fn.select2.ajaxDefaults.params,deprecated);data=data?data.call(self,query.term,query.page,query.context):null,url="function"==typeof url?url.call(self,query.term,query.page,query.context):url,handler&&"function"==typeof handler.abort&&handler.abort(),options.params&&($.isFunction(options.params)?$.extend(params,options.params.call(self)):$.extend(params,options.params)),$.extend(params,{url:url,dataType:options.dataType,data:data,success:function(data){var results=options.results(data,query.page);query.callback(results)}}),handler=transport.call(self,params)},quietMillis)}}function local(options){var dataText,tmp,data=options,text=function(item){return""+item.text};$.isArray(data)&&(tmp=data,data={results:tmp}),$.isFunction(data)===!1&&(tmp=data,data=function(){return tmp});var dataItem=data();return dataItem.text&&(text=dataItem.text,$.isFunction(text)||(dataText=dataItem.text,text=function(item){return item[dataText]})),function(query){var process,t=query.term,filtered={results:[]};return""===t?void query.callback(data()):(process=function(datum,collection){var group,attr;if(datum=datum[0],datum.children){group={};for(attr in datum)datum.hasOwnProperty(attr)&&(group[attr]=datum[attr]);group.children=[],$(datum.children).each2(function(i,childDatum){process(childDatum,group.children)}),(group.children.length||query.matcher(t,text(group),datum))&&collection.push(group)}else query.matcher(t,text(datum),datum)&&collection.push(datum)},$(data().results).each2(function(i,datum){process(datum,filtered.results)}),void query.callback(filtered))}}function tags(data){var isFunc=$.isFunction(data);return function(query){var t=query.term,filtered={results:[]},result=isFunc?data(query):data;$.isArray(result)&&($(result).each(function(){var isObject=this.text!==undefined,text=isObject?this.text:this;(""===t||query.matcher(t,text))&&filtered.results.push(isObject?this:{id:this,text:this})}),query.callback(filtered))}}function checkFormatter(formatter,formatterName){if($.isFunction(formatter))return!0;if(!formatter)return!1;if("string"==typeof formatter)return!0;throw new Error(formatterName+" must be a string, function, or falsy value")}function evaluate(val){if($.isFunction(val)){var args=Array.prototype.slice.call(arguments,1);return val.apply(null,args)}return val}function countResults(results){var count=0;return $.each(results,function(i,item){item.children?count+=countResults(item.children):count++}),count}function defaultTokenizer(input,selection,selectCallback,opts){var token,index,i,l,separator,original=input,dupe=!1;if(!opts.createSearchChoice||!opts.tokenSeparators||opts.tokenSeparators.length<1)return undefined;for(;;){for(index=-1,i=0,l=opts.tokenSeparators.length;l>i&&(separator=opts.tokenSeparators[i],index=input.indexOf(separator),!(index>=0));i++);if(0>index)break;if(token=input.substring(0,index),input=input.substring(index+separator.length),token.length>0&&(token=opts.createSearchChoice.call(this,token,selection),token!==undefined&&null!==token&&opts.id(token)!==undefined&&null!==opts.id(token))){for(dupe=!1,i=0,l=selection.length;l>i;i++)if(equal(opts.id(token),opts.id(selection[i]))){dupe=!0;break}dupe||selectCallback(token)}}return original!==input?input:void 0}function cleanupJQueryElements(){var self=this;Array.prototype.forEach.call(arguments,function(element){self[element].remove(),self[element]=null})}function clazz(SuperClass,methods){var constructor=function(){};return constructor.prototype=new SuperClass,constructor.prototype.constructor=constructor,constructor.prototype.parent=SuperClass.prototype,constructor.prototype=$.extend(constructor.prototype,methods),constructor}if(window.Select2===undefined){var KEY,AbstractSelect2,SingleSelect2,MultiSelect2,nextUid,sizer,$document,scrollBarDimensions,lastMousePosition={x:0,y:0},KEY={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(k){switch(k=k.which?k.which:k){case KEY.LEFT:case KEY.RIGHT:case KEY.UP:case KEY.DOWN:return!0}return!1},isControl:function(e){var k=e.which;switch(k){case KEY.SHIFT:case KEY.CTRL:case KEY.ALT:return!0}return e.metaKey?!0:!1},isFunctionKey:function(k){return k=k.which?k.which:k,k>=112&&123>=k}},MEASURE_SCROLLBAR_TEMPLATE="<div class='select2-measure-scrollbar'></div>",DIACRITICS={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z"};$document=$(document),nextUid=function(){var counter=1;return function(){return counter++}}(),$document.on("mousemove",function(e){lastMousePosition.x=e.pageX,lastMousePosition.y=e.pageY}),AbstractSelect2=clazz(Object,{bind:function(func){var self=this;return function(){func.apply(self,arguments)}},init:function(opts){var results,search,resultsSelector=".select2-results";this.opts=opts=this.prepareOpts(opts),this.id=opts.id,opts.element.data("select2")!==undefined&&null!==opts.element.data("select2")&&opts.element.data("select2").destroy(),this.container=this.createContainer(),this.liveRegion=$("<span>",{role:"status","aria-live":"polite"}).addClass("select2-hidden-accessible").appendTo(document.body),this.containerId="s2id_"+(opts.element.attr("id")||"autogen"+nextUid()),this.containerEventName=this.containerId.replace(/([.])/g,"_").replace(/([;&,\-\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.container.attr("title",opts.element.attr("title")),this.body=$("body"),syncCssClasses(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr("style",opts.element.attr("style")),this.container.css(evaluate(opts.containerCss)),this.container.addClass(evaluate(opts.containerCssClass)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",killEvent),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),syncCssClasses(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(evaluate(opts.dropdownCssClass)),this.dropdown.data("select2",this),this.dropdown.on("click",killEvent),this.results=results=this.container.find(resultsSelector),this.search=search=this.container.find("input.select2-input"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),this.container.on("click",killEvent),installFilteredMouseMove(this.results),this.dropdown.on("mousemove-filtered",resultsSelector,this.bind(this.highlightUnderEvent)),this.dropdown.on("touchstart touchmove touchend",resultsSelector,this.bind(function(event){this._touchEvent=!0,this.highlightUnderEvent(event)})),this.dropdown.on("touchmove",resultsSelector,this.bind(this.touchMoved)),this.dropdown.on("touchstart touchend",resultsSelector,this.bind(this.clearTouchMoved)),this.dropdown.on("click",this.bind(function(){this._touchEvent&&(this._touchEvent=!1,this.selectHighlighted())})),installDebouncedScroll(80,this.results),this.dropdown.on("scroll-debounced",resultsSelector,this.bind(this.loadMoreIfNeeded)),$(this.container).on("change",".select2-input",function(e){e.stopPropagation()}),$(this.dropdown).on("change",".select2-input",function(e){e.stopPropagation()}),$.fn.mousewheel&&results.mousewheel(function(e,delta,deltaX,deltaY){var top=results.scrollTop();deltaY>0&&0>=top-deltaY?(results.scrollTop(0),killEvent(e)):0>deltaY&&results.get(0).scrollHeight-results.scrollTop()+deltaY<=results.height()&&(results.scrollTop(results.get(0).scrollHeight-results.height()),killEvent(e))}),installKeyUpChangeEvent(search),search.on("keyup-change input paste",this.bind(this.updateResults)),search.on("focus",function(){search.addClass("select2-focused")}),search.on("blur",function(){search.removeClass("select2-focused")}),this.dropdown.on("mouseup",resultsSelector,this.bind(function(e){$(e.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(e),this.selectHighlighted(e))})),this.dropdown.on("click mouseup mousedown touchstart touchend focusin",function(e){e.stopPropagation()}),this.nextSearchTerm=undefined,$.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==opts.maximumInputLength&&this.search.attr("maxlength",opts.maximumInputLength);var disabled=opts.element.prop("disabled");disabled===undefined&&(disabled=!1),this.enable(!disabled);var readonly=opts.element.prop("readonly");readonly===undefined&&(readonly=!1),this.readonly(readonly),scrollBarDimensions=scrollBarDimensions||measureScrollbar(),this.autofocus=opts.element.prop("autofocus"),opts.element.prop("autofocus",!1),this.autofocus&&this.focus(),this.search.attr("placeholder",opts.searchInputPlaceholder)},destroy:function(){var element=this.opts.element,select2=element.data("select2");this.close(),this.propertyObserver&&(this.propertyObserver.disconnect(),this.propertyObserver=null),select2!==undefined&&(select2.container.remove(),select2.liveRegion.remove(),select2.dropdown.remove(),element.removeClass("select2-offscreen").removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?element.attr({tabindex:this.elementTabIndex}):element.removeAttr("tabindex"),element.show()),cleanupJQueryElements.call(this,"container","liveRegion","dropdown","results","search")},optionToData:function(element){return element.is("option")?{id:element.prop("value"),text:element.text(),element:element.get(),css:element.attr("class"),disabled:element.prop("disabled"),locked:equal(element.attr("locked"),"locked")||equal(element.data("locked"),!0)}:element.is("optgroup")?{text:element.attr("label"),children:[],element:element.get(),css:element.attr("class")}:void 0},prepareOpts:function(opts){var element,select,idKey,ajaxUrl,self=this;if(element=opts.element,"select"===element.get(0).tagName.toLowerCase()&&(this.select=select=opts.element),select&&$.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in opts)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),opts=$.extend({},{populateResults:function(container,results,query){var populate,id=this.opts.id,liveRegion=this.liveRegion;(populate=function(results,container,depth){var i,l,result,selectable,disabled,compound,node,label,innerContainer,formatted;for(results=opts.sortResults(results,container,query),i=0,l=results.length;l>i;i+=1)result=results[i],disabled=result.disabled===!0,selectable=!disabled&&id(result)!==undefined,compound=result.children&&result.children.length>0,node=$("<li></li>"),node.addClass("select2-results-dept-"+depth),node.addClass("select2-result"),node.addClass(selectable?"select2-result-selectable":"select2-result-unselectable"),disabled&&node.addClass("select2-disabled"),compound&&node.addClass("select2-result-with-children"),node.addClass(self.opts.formatResultCssClass(result)),node.attr("role","presentation"),label=$(document.createElement("div")),label.addClass("select2-result-label"),label.attr("id","select2-result-label-"+nextUid()),label.attr("role","option"),formatted=opts.formatResult(result,label,query,self.opts.escapeMarkup),formatted!==undefined&&(label.html(formatted),node.append(label)),compound&&(innerContainer=$("<ul></ul>"),innerContainer.addClass("select2-result-sub"),populate(result.children,innerContainer,depth+1),node.append(innerContainer)),node.data("select2-data",result),container.append(node);liveRegion.text(opts.formatMatches(results.length))})(results,container,0)}},$.fn.select2.defaults,opts),"function"!=typeof opts.id&&(idKey=opts.id,opts.id=function(e){return e[idKey]}),$.isArray(opts.element.data("select2Tags"))){if("tags"in opts)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+opts.element.attr("id");opts.tags=opts.element.data("select2Tags")}if(select?(opts.query=this.bind(function(query){var children,placeholderOption,process,data={results:[],more:!1},term=query.term;process=function(element,collection){var group;element.is("option")?query.matcher(term,element.text(),element)&&collection.push(self.optionToData(element)):element.is("optgroup")&&(group=self.optionToData(element),element.children().each2(function(i,elm){process(elm,group.children)}),group.children.length>0&&collection.push(group))},children=element.children(),this.getPlaceholder()!==undefined&&children.length>0&&(placeholderOption=this.getPlaceholderOption(),placeholderOption&&(children=children.not(placeholderOption))),children.each2(function(i,elm){process(elm,data.results)}),query.callback(data)}),opts.id=function(e){return e.id}):"query"in opts||("ajax"in opts?(ajaxUrl=opts.element.data("ajax-url"),ajaxUrl&&ajaxUrl.length>0&&(opts.ajax.url=ajaxUrl),opts.query=ajax.call(opts.element,opts.ajax)):"data"in opts?opts.query=local(opts.data):"tags"in opts&&(opts.query=tags(opts.tags),opts.createSearchChoice===undefined&&(opts.createSearchChoice=function(term){return{id:$.trim(term),text:$.trim(term)}}),opts.initSelection===undefined&&(opts.initSelection=function(element,callback){var data=[];$(splitVal(element.val(),opts.separator)).each(function(){var obj={id:this,text:this},tags=opts.tags;$.isFunction(tags)&&(tags=tags()),$(tags).each(function(){return equal(this.id,obj.id)?(obj=this,!1):void 0}),data.push(obj)}),callback(data)}))),"function"!=typeof opts.query)throw"query function not defined for Select2 "+opts.element.attr("id");if("top"===opts.createSearchChoicePosition)opts.createSearchChoicePosition=function(list,item){list.unshift(item)};else if("bottom"===opts.createSearchChoicePosition)opts.createSearchChoicePosition=function(list,item){list.push(item)};else if("function"!=typeof opts.createSearchChoicePosition)throw"invalid createSearchChoicePosition option must be 'top', 'bottom' or a custom function";return opts},monitorSource:function(){var sync,observer,el=this.opts.element;el.on("change.select2",this.bind(function(){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),sync=this.bind(function(){var disabled=el.prop("disabled");disabled===undefined&&(disabled=!1),this.enable(!disabled);var readonly=el.prop("readonly");readonly===undefined&&(readonly=!1),this.readonly(readonly),syncCssClasses(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(evaluate(this.opts.containerCssClass)),syncCssClasses(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(evaluate(this.opts.dropdownCssClass))}),el.length&&el[0].attachEvent&&el.each(function(){this.attachEvent("onpropertychange",sync)}),observer=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,observer!==undefined&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new observer(function(mutations){mutations.forEach(sync)}),this.propertyObserver.observe(el.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(data){var evt=$.Event("select2-selecting",{val:this.id(data),object:data});return this.opts.element.trigger(evt),!evt.isDefaultPrevented()},triggerChange:function(details){details=details||{},details=$.extend({},details,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(details),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},isInterfaceEnabled:function(){return this.enabledInterface===!0},enableInterface:function(){var enabled=this._enabled&&!this._readonly,disabled=!enabled;return enabled===this.enabledInterface?!1:(this.container.toggleClass("select2-container-disabled",disabled),this.close(),this.enabledInterface=enabled,!0)},enable:function(enabled){enabled===undefined&&(enabled=!0),this._enabled!==enabled&&(this._enabled=enabled,this.opts.element.prop("disabled",!enabled),this.enableInterface())},disable:function(){this.enable(!1)},readonly:function(enabled){enabled===undefined&&(enabled=!1),this._readonly!==enabled&&(this._readonly=enabled,this.opts.element.prop("readonly",enabled),this.enableInterface())},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var bodyOffset,above,changeDirection,css,resultsListNode,$dropdown=this.dropdown,offset=this.container.offset(),height=this.container.outerHeight(!1),width=this.container.outerWidth(!1),dropHeight=$dropdown.outerHeight(!1),$window=$(window),windowWidth=$window.width(),windowHeight=$window.height(),viewPortRight=$window.scrollLeft()+windowWidth,viewportBottom=$window.scrollTop()+windowHeight,dropTop=offset.top+height,dropLeft=offset.left,enoughRoomBelow=viewportBottom>=dropTop+dropHeight,enoughRoomAbove=offset.top-dropHeight>=$window.scrollTop(),dropWidth=$dropdown.outerWidth(!1),enoughRoomOnRight=viewPortRight>=dropLeft+dropWidth,aboveNow=$dropdown.hasClass("select2-drop-above");aboveNow?(above=!0,!enoughRoomAbove&&enoughRoomBelow&&(changeDirection=!0,above=!1)):(above=!1,!enoughRoomBelow&&enoughRoomAbove&&(changeDirection=!0,above=!0)),changeDirection&&($dropdown.hide(),offset=this.container.offset(),height=this.container.outerHeight(!1),width=this.container.outerWidth(!1),dropHeight=$dropdown.outerHeight(!1),viewPortRight=$window.scrollLeft()+windowWidth,viewportBottom=$window.scrollTop()+windowHeight,dropTop=offset.top+height,dropLeft=offset.left,dropWidth=$dropdown.outerWidth(!1),enoughRoomOnRight=viewPortRight>=dropLeft+dropWidth,$dropdown.show(),this.focusSearch()),this.opts.dropdownAutoWidth?(resultsListNode=$(".select2-results",$dropdown)[0],$dropdown.addClass("select2-drop-auto-width"),$dropdown.css("width",""),dropWidth=$dropdown.outerWidth(!1)+(resultsListNode.scrollHeight===resultsListNode.clientHeight?0:scrollBarDimensions.width),dropWidth>width?width=dropWidth:dropWidth=width,dropHeight=$dropdown.outerHeight(!1),enoughRoomOnRight=viewPortRight>=dropLeft+dropWidth):this.container.removeClass("select2-drop-auto-width"),"static"!==this.body.css("position")&&(bodyOffset=this.body.offset(),dropTop-=bodyOffset.top,dropLeft-=bodyOffset.left),enoughRoomOnRight||(dropLeft=offset.left+this.container.outerWidth(!1)-dropWidth),css={left:dropLeft,width:width},above?(css.top=offset.top-dropHeight,css.bottom="auto",this.container.addClass("select2-drop-above"),$dropdown.addClass("select2-drop-above")):(css.top=dropTop,css.bottom="auto",this.container.removeClass("select2-drop-above"),$dropdown.removeClass("select2-drop-above")),css=$.extend(css,evaluate(this.opts.dropdownCss)),$dropdown.css(css)},shouldOpen:function(){var event;return this.opened()?!1:this._enabled===!1||this._readonly===!0?!1:(event=$.Event("select2-opening"),this.opts.element.trigger(event),!event.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(this.opening(),!0):!1},opening:function(){var mask,cid=this.containerEventName,scroll="scroll."+cid,resize="resize."+cid,orient="orientationchange."+cid;this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.clearDropdownAlignmentPreference(),this.dropdown[0]!==this.body.children().last()[0]&&this.dropdown.detach().appendTo(this.body),mask=$("#select2-drop-mask"),0==mask.length&&(mask=$(document.createElement("div")),mask.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),mask.hide(),mask.appendTo(this.body),mask.on("mousedown touchstart click",function(e){reinsertElement(mask);var self,dropdown=$("#select2-drop");dropdown.length>0&&(self=dropdown.data("select2"),self.opts.selectOnBlur&&self.selectHighlighted({noFocus:!0}),self.close(),e.preventDefault(),e.stopPropagation())})),this.dropdown.prev()[0]!==mask[0]&&this.dropdown.before(mask),$("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),mask.show(),this.positionDropdown(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active");var that=this;this.container.parents().add(window).each(function(){$(this).on(resize+" "+scroll+" "+orient,function(){that.opened()&&that.positionDropdown()})})},close:function(){if(this.opened()){var cid=this.containerEventName,scroll="scroll."+cid,resize="resize."+cid,orient="orientationchange."+cid;this.container.parents().add(window).each(function(){$(this).off(scroll).off(resize).off(orient)}),this.clearDropdownAlignmentPreference(),$("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active"),this.results.empty(),this.clearSearch(),this.search.removeClass("select2-active"),this.opts.element.trigger($.Event("select2-close"))
7
  }},externalSearch:function(term){this.open(),this.search.val(term),this.updateResults(!1)},clearSearch:function(){},getMaximumSelectionSize:function(){return evaluate(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var children,index,child,hb,rb,y,more,results=this.results;if(index=this.highlight(),!(0>index)){if(0==index)return void results.scrollTop(0);children=this.findHighlightableChoices().find(".select2-result-label"),child=$(children[index]),hb=child.offset().top+child.outerHeight(!0),index===children.length-1&&(more=results.find("li.select2-more-results"),more.length>0&&(hb=more.offset().top+more.outerHeight(!0))),rb=results.offset().top+results.outerHeight(!0),hb>rb&&results.scrollTop(results.scrollTop()+(hb-rb)),y=child.offset().top-results.offset().top,0>y&&"none"!=child.css("display")&&results.scrollTop(results.scrollTop()+y)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-disabled):not(.select2-selected)")},moveHighlight:function(delta){for(var choices=this.findHighlightableChoices(),index=this.highlight();index>-1&&index<choices.length;){index+=delta;var choice=$(choices[index]);if(choice.hasClass("select2-result-selectable")&&!choice.hasClass("select2-disabled")&&!choice.hasClass("select2-selected")){this.highlight(index);break}}},highlight:function(index){var choice,data,choices=this.findHighlightableChoices();return 0===arguments.length?indexOf(choices.filter(".select2-highlighted")[0],choices.get()):(index>=choices.length&&(index=choices.length-1),0>index&&(index=0),this.removeHighlight(),choice=$(choices[index]),choice.addClass("select2-highlighted"),this.search.attr("aria-activedescendant",choice.find(".select2-result-label").attr("id")),this.ensureHighlightVisible(),this.liveRegion.text(choice.text()),data=choice.data("select2-data"),void(data&&this.opts.element.trigger({type:"select2-highlight",val:this.id(data),choice:data})))},removeHighlight:function(){this.results.find(".select2-highlighted").removeClass("select2-highlighted")},touchMoved:function(){this._touchMoved=!0},clearTouchMoved:function(){this._touchMoved=!1},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(event){var el=$(event.target).closest(".select2-result-selectable");if(el.length>0&&!el.is(".select2-highlighted")){var choices=this.findHighlightableChoices();this.highlight(choices.index(el))}else 0==el.length&&this.removeHighlight()},loadMoreIfNeeded:function(){var below,results=this.results,more=results.find("li.select2-more-results"),page=this.resultsPage+1,self=this,term=this.search.val(),context=this.context;0!==more.length&&(below=more.offset().top-results.offset().top-results.height(),below<=this.opts.loadMorePadding&&(more.addClass("select2-active"),this.opts.query({element:this.opts.element,term:term,page:page,context:context,matcher:this.opts.matcher,callback:this.bind(function(data){self.opened()&&(self.opts.populateResults.call(this,results,data.results,{term:term,page:page,context:context}),self.postprocessResults(data,!1,!1),data.more===!0?(more.detach().appendTo(results).text(evaluate(self.opts.formatLoadMore,page+1)),window.setTimeout(function(){self.loadMoreIfNeeded()},10)):more.remove(),self.positionDropdown(),self.resultsPage=page,self.context=data.context,this.opts.element.trigger({type:"select2-loaded",items:data}))})})))},tokenize:function(){},updateResults:function(initial){function postRender(){search.removeClass("select2-active"),self.positionDropdown(),self.liveRegion.text(results.find(".select2-no-results,.select2-selection-limit,.select2-searching").length?results.text():self.opts.formatMatches(results.find(".select2-result-selectable").length))}function render(html){results.html(html),postRender()}var data,input,queryNumber,search=this.search,results=this.results,opts=this.opts,self=this,term=search.val(),lastTerm=$.data(this.container,"select2-last-term");if((initial===!0||!lastTerm||!equal(term,lastTerm))&&($.data(this.container,"select2-last-term",term),initial===!0||this.showSearchInput!==!1&&this.opened())){queryNumber=++this.queryCount;var maxSelSize=this.getMaximumSelectionSize();if(maxSelSize>=1&&(data=this.data(),$.isArray(data)&&data.length>=maxSelSize&&checkFormatter(opts.formatSelectionTooBig,"formatSelectionTooBig")))return void render("<li class='select2-selection-limit'>"+evaluate(opts.formatSelectionTooBig,maxSelSize)+"</li>");if(search.val().length<opts.minimumInputLength)return render(checkFormatter(opts.formatInputTooShort,"formatInputTooShort")?"<li class='select2-no-results'>"+evaluate(opts.formatInputTooShort,search.val(),opts.minimumInputLength)+"</li>":""),void(initial&&this.showSearch&&this.showSearch(!0));if(opts.maximumInputLength&&search.val().length>opts.maximumInputLength)return void render(checkFormatter(opts.formatInputTooLong,"formatInputTooLong")?"<li class='select2-no-results'>"+evaluate(opts.formatInputTooLong,search.val(),opts.maximumInputLength)+"</li>":"");opts.formatSearching&&0===this.findHighlightableChoices().length&&render("<li class='select2-searching'>"+evaluate(opts.formatSearching)+"</li>"),search.addClass("select2-active"),this.removeHighlight(),input=this.tokenize(),input!=undefined&&null!=input&&search.val(input),this.resultsPage=1,opts.query({element:opts.element,term:search.val(),page:this.resultsPage,context:null,matcher:opts.matcher,callback:this.bind(function(data){var def;if(queryNumber==this.queryCount){if(!this.opened())return void this.search.removeClass("select2-active");if(this.context=data.context===undefined?null:data.context,this.opts.createSearchChoice&&""!==search.val()&&(def=this.opts.createSearchChoice.call(self,search.val(),data.results),def!==undefined&&null!==def&&self.id(def)!==undefined&&null!==self.id(def)&&0===$(data.results).filter(function(){return equal(self.id(this),self.id(def))}).length&&this.opts.createSearchChoicePosition(data.results,def)),0===data.results.length&&checkFormatter(opts.formatNoMatches,"formatNoMatches"))return void render("<li class='select2-no-results'>"+evaluate(opts.formatNoMatches,search.val())+"</li>");results.empty(),self.opts.populateResults.call(this,results,data.results,{term:search.val(),page:this.resultsPage,context:null}),data.more===!0&&checkFormatter(opts.formatLoadMore,"formatLoadMore")&&(results.append("<li class='select2-more-results'>"+self.opts.escapeMarkup(evaluate(opts.formatLoadMore,this.resultsPage))+"</li>"),window.setTimeout(function(){self.loadMoreIfNeeded()},10)),this.postprocessResults(data,initial),postRender(),this.opts.element.trigger({type:"select2-loaded",items:data})}})})}},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){focus(this.search)},selectHighlighted:function(options){if(this._touchMoved)return void this.clearTouchMoved();var index=this.highlight(),highlighted=this.results.find(".select2-highlighted"),data=highlighted.closest(".select2-result").data("select2-data");data?(this.highlight(index),this.onSelect(data,options)):options&&options.noFocus&&this.close()},getPlaceholder:function(){var placeholderOption;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((placeholderOption=this.getPlaceholderOption())!==undefined?placeholderOption.text():undefined)},getPlaceholderOption:function(){if(this.select){var firstOption=this.select.children("option").first();if(this.opts.placeholderOption!==undefined)return"first"===this.opts.placeholderOption&&firstOption||"function"==typeof this.opts.placeholderOption&&this.opts.placeholderOption(this.select);if(""===$.trim(firstOption.text())&&""===firstOption.val())return firstOption}},initContainerWidth:function(){function resolveContainerWidth(){var style,attrs,matches,i,l,attr;if("off"===this.opts.width)return null;if("element"===this.opts.width)return 0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px";if("copy"===this.opts.width||"resolve"===this.opts.width){if(style=this.opts.element.attr("style"),style!==undefined)for(attrs=style.split(";"),i=0,l=attrs.length;l>i;i+=1)if(attr=attrs[i].replace(/\s/g,""),matches=attr.match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i),null!==matches&&matches.length>=1)return matches[1];return"resolve"===this.opts.width?(style=this.opts.element.css("width"),style.indexOf("%")>0?style:0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px"):null}return $.isFunction(this.opts.width)?this.opts.width():this.opts.width}var width=resolveContainerWidth.call(this);null!==width&&this.container.css("width",width)}}),SingleSelect2=clazz(AbstractSelect2,{createContainer:function(){var container=$(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' class='select2-choice' tabindex='-1'>"," <span class='select2-chosen'>&#160;</span><abbr class='select2-search-choice-close'></abbr>"," <span class='select2-arrow' role='presentation'><b role='presentation'></b></span>","</a>","<label for='' class='select2-offscreen'></label>","<input class='select2-focusser select2-offscreen' type='text' aria-haspopup='true' role='button' />","<div class='select2-drop select2-display-none'>"," <div class='select2-search'>"," <label for='' class='select2-offscreen'></label>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input' role='combobox' aria-expanded='true'"," aria-autocomplete='list' />"," </div>"," <ul class='select2-results' role='listbox'>"," </ul>","</div>"].join(""));return container},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var el,range,len;this.opts.minimumResultsForSearch>=0&&this.showSearch(!0),this.parent.opening.apply(this,arguments),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.opts.shouldFocusInput(this)&&(this.search.focus(),el=this.search.get(0),el.createTextRange?(range=el.createTextRange(),range.collapse(!1),range.select()):el.setSelectionRange&&(len=this.search.val().length,el.setSelectionRange(len,len))),""===this.search.val()&&this.nextSearchTerm!=undefined&&(this.search.val(this.nextSearchTerm),this.search.select()),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger($.Event("select2-open"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus()},destroy:function(){$("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),cleanupJQueryElements.call(this,"selection","focusser")},initContainer:function(){var selection,elementLabel,container=this.container,dropdown=this.dropdown,idSuffix=nextUid();this.showSearch(this.opts.minimumResultsForSearch<0?!1:!0),this.selection=selection=container.find(".select2-choice"),this.focusser=container.find(".select2-focusser"),selection.find(".select2-chosen").attr("id","select2-chosen-"+idSuffix),this.focusser.attr("aria-labelledby","select2-chosen-"+idSuffix),this.results.attr("id","select2-results-"+idSuffix),this.search.attr("aria-owns","select2-results-"+idSuffix),this.focusser.attr("id","s2id_autogen"+idSuffix),elementLabel=$("label[for='"+this.opts.element.attr("id")+"']"),this.focusser.prev().text(elementLabel.text()).attr("for",this.focusser.attr("id"));var originalTitle=this.opts.element.attr("title");this.opts.element.attr("title",originalTitle||elementLabel.text()),this.focusser.attr("tabindex",this.elementTabIndex),this.search.attr("id",this.focusser.attr("id")+"_search"),this.search.prev().text($("label[for='"+this.focusser.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("keydown",this.bind(function(e){if(this.isInterfaceEnabled()){if(e.which===KEY.PAGE_UP||e.which===KEY.PAGE_DOWN)return void killEvent(e);switch(e.which){case KEY.UP:case KEY.DOWN:return this.moveHighlight(e.which===KEY.UP?-1:1),void killEvent(e);case KEY.ENTER:return this.selectHighlighted(),void killEvent(e);case KEY.TAB:return void this.selectHighlighted({noFocus:!0});case KEY.ESC:return this.cancel(e),void killEvent(e)}}})),this.search.on("blur",this.bind(function(){document.activeElement===this.body.get(0)&&window.setTimeout(this.bind(function(){this.opened()&&this.search.focus()}),0)})),this.focusser.on("keydown",this.bind(function(e){if(this.isInterfaceEnabled()&&e.which!==KEY.TAB&&!KEY.isControl(e)&&!KEY.isFunctionKey(e)&&e.which!==KEY.ESC){if(this.opts.openOnEnter===!1&&e.which===KEY.ENTER)return void killEvent(e);if(e.which==KEY.DOWN||e.which==KEY.UP||e.which==KEY.ENTER&&this.opts.openOnEnter){if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return;return this.open(),void killEvent(e)}return e.which==KEY.DELETE||e.which==KEY.BACKSPACE?(this.opts.allowClear&&this.clear(),void killEvent(e)):void 0}})),installKeyUpChangeEvent(this.focusser),this.focusser.on("keyup-change input",this.bind(function(e){if(this.opts.minimumResultsForSearch>=0){if(e.stopPropagation(),this.opened())return;this.open()}})),selection.on("mousedown touchstart","abbr",this.bind(function(e){this.isInterfaceEnabled()&&(this.clear(),killEventImmediately(e),this.close(),this.selection.focus())})),selection.on("mousedown touchstart",this.bind(function(e){reinsertElement(selection),this.container.hasClass("select2-container-active")||this.opts.element.trigger($.Event("select2-focus")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),killEvent(e)})),dropdown.on("mousedown touchstart",this.bind(function(){this.opts.shouldFocusInput(this)&&this.search.focus()})),selection.on("focus",this.bind(function(e){killEvent(e)})),this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger($.Event("select2-focus")),this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger($.Event("select2-blur")))})),this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger($.Event("select2-focus")),this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.setPlaceholder()},clear:function(triggerChange){var data=this.selection.data("select2-data");if(data){var evt=$.Event("select2-clearing");if(this.opts.element.trigger(evt),evt.isDefaultPrevented())return;var placeholderOption=this.getPlaceholderOption();this.opts.element.val(placeholderOption?placeholderOption.val():""),this.selection.find(".select2-chosen").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),triggerChange!==!1&&(this.opts.element.trigger({type:"select2-removed",val:this.id(data),choice:data}),this.triggerChange({removed:data}))}},initSelection:function(){if(this.isPlaceholderOptionSelected())this.updateSelection(null),this.close(),this.setPlaceholder();else{var self=this;this.opts.initSelection.call(null,this.opts.element,function(selected){selected!==undefined&&null!==selected&&(self.updateSelection(selected),self.close(),self.setPlaceholder(),self.nextSearchTerm=self.opts.nextSearchTerm(selected,self.search.val()))})}},isPlaceholderOptionSelected:function(){var placeholderOption;return this.getPlaceholder()===undefined?!1:(placeholderOption=this.getPlaceholderOption())!==undefined&&placeholderOption.prop("selected")||""===this.opts.element.val()||this.opts.element.val()===undefined||null===this.opts.element.val()},prepareOpts:function(){var opts=this.parent.prepareOpts.apply(this,arguments),self=this;return"select"===opts.element.get(0).tagName.toLowerCase()?opts.initSelection=function(element,callback){var selected=element.find("option").filter(function(){return this.selected&&!this.disabled});callback(self.optionToData(selected))}:"data"in opts&&(opts.initSelection=opts.initSelection||function(element,callback){var id=element.val(),match=null;opts.query({matcher:function(term,text,el){var is_match=equal(id,opts.id(el));return is_match&&(match=el),is_match},callback:$.isFunction(callback)?function(){callback(match)}:$.noop})}),opts},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===undefined?undefined:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var placeholder=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&placeholder!==undefined){if(this.select&&this.getPlaceholderOption()===undefined)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(placeholder)),this.selection.addClass("select2-default"),this.container.removeClass("select2-allowclear")}},postprocessResults:function(data,initial,noHighlightUpdate){var selected=0,self=this;if(this.findHighlightableChoices().each2(function(i,elm){return equal(self.id(elm.data("select2-data")),self.opts.element.val())?(selected=i,!1):void 0}),noHighlightUpdate!==!1&&this.highlight(initial===!0&&selected>=0?selected:0),initial===!0){var min=this.opts.minimumResultsForSearch;min>=0&&this.showSearch(countResults(data.results)>=min)}},showSearch:function(showSearchInput){this.showSearchInput!==showSearchInput&&(this.showSearchInput=showSearchInput,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!showSearchInput),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!showSearchInput),$(this.dropdown,this.container).toggleClass("select2-with-searchbox",showSearchInput))},onSelect:function(data,options){if(this.triggerSelect(data)){var old=this.opts.element.val(),oldData=this.data();this.opts.element.val(this.id(data)),this.updateSelection(data),this.opts.element.trigger({type:"select2-selected",val:this.id(data),choice:data}),this.nextSearchTerm=this.opts.nextSearchTerm(data,this.search.val()),this.close(),options&&options.noFocus||!this.opts.shouldFocusInput(this)||this.focusser.focus(),equal(old,this.id(data))||this.triggerChange({added:data,removed:oldData})}},updateSelection:function(data){var formatted,cssClass,container=this.selection.find(".select2-chosen");this.selection.data("select2-data",data),container.empty(),null!==data&&(formatted=this.opts.formatSelection(data,container,this.opts.escapeMarkup)),formatted!==undefined&&container.append(formatted),cssClass=this.opts.formatSelectionCssClass(data,container),cssClass!==undefined&&container.addClass(cssClass),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==undefined&&this.container.addClass("select2-allowclear")},val:function(){var val,triggerChange=!1,data=null,self=this,oldData=this.data();if(0===arguments.length)return this.opts.element.val();if(val=arguments[0],arguments.length>1&&(triggerChange=arguments[1]),this.select)this.select.val(val).find("option").filter(function(){return this.selected}).each2(function(i,elm){return data=self.optionToData(elm),!1}),this.updateSelection(data),this.setPlaceholder(),triggerChange&&this.triggerChange({added:data,removed:oldData});else{if(!val&&0!==val)return void this.clear(triggerChange);if(this.opts.initSelection===undefined)throw new Error("cannot call val() if initSelection() is not defined");this.opts.element.val(val),this.opts.initSelection(this.opts.element,function(data){self.opts.element.val(data?self.id(data):""),self.updateSelection(data),self.setPlaceholder(),triggerChange&&self.triggerChange({added:data,removed:oldData})})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(value){var data,triggerChange=!1;return 0===arguments.length?(data=this.selection.data("select2-data"),data==undefined&&(data=null),data):(arguments.length>1&&(triggerChange=arguments[1]),void(value?(data=this.data(),this.opts.element.val(value?this.id(value):""),this.updateSelection(value),triggerChange&&this.triggerChange({added:value,removed:data})):this.clear(triggerChange)))}}),MultiSelect2=clazz(AbstractSelect2,{createContainer:function(){var container=$(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html(["<ul class='select2-choices'>"," <li class='select2-search-field'>"," <label for='' class='select2-offscreen'></label>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi select2-display-none'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return container},prepareOpts:function(){var opts=this.parent.prepareOpts.apply(this,arguments),self=this;return"select"===opts.element.get(0).tagName.toLowerCase()?opts.initSelection=function(element,callback){var data=[];element.find("option").filter(function(){return this.selected&&!this.disabled}).each2(function(i,elm){data.push(self.optionToData(elm))}),callback(data)}:"data"in opts&&(opts.initSelection=opts.initSelection||function(element,callback){var ids=splitVal(element.val(),opts.separator),matches=[];opts.query({matcher:function(term,text,el){var is_match=$.grep(ids,function(id){return equal(id,opts.id(el))}).length;return is_match&&matches.push(el),is_match},callback:$.isFunction(callback)?function(){for(var ordered=[],i=0;i<ids.length;i++)for(var id=ids[i],j=0;j<matches.length;j++){var match=matches[j];if(equal(id,opts.id(match))){ordered.push(match),matches.splice(j,1);break}}callback(ordered)}:$.noop})}),opts},selectChoice:function(choice){var selected=this.container.find(".select2-search-choice-focus");selected.length&&choice&&choice[0]==selected[0]||(selected.length&&this.opts.element.trigger("choice-deselected",selected),selected.removeClass("select2-search-choice-focus"),choice&&choice.length&&(this.close(),choice.addClass("select2-search-choice-focus"),this.opts.element.trigger("choice-selected",choice)))},destroy:function(){$("label[for='"+this.search.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),cleanupJQueryElements.call(this,"searchContainer","selection")},initContainer:function(){var selection,selector=".select2-choices";this.searchContainer=this.container.find(".select2-search-field"),this.selection=selection=this.container.find(selector);var _this=this;this.selection.on("click",".select2-search-choice:not(.select2-locked)",function(){_this.search[0].focus(),_this.selectChoice($(this))}),this.search.attr("id","s2id_autogen"+nextUid()),this.search.prev().text($("label[for='"+this.opts.element.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("input paste",this.bind(function(){this.isInterfaceEnabled()&&(this.opened()||this.open())})),this.search.attr("tabindex",this.elementTabIndex),this.keydowns=0,this.search.on("keydown",this.bind(function(e){if(this.isInterfaceEnabled()){++this.keydowns;var selected=selection.find(".select2-search-choice-focus"),prev=selected.prev(".select2-search-choice:not(.select2-locked)"),next=selected.next(".select2-search-choice:not(.select2-locked)"),pos=getCursorInfo(this.search);if(selected.length&&(e.which==KEY.LEFT||e.which==KEY.RIGHT||e.which==KEY.BACKSPACE||e.which==KEY.DELETE||e.which==KEY.ENTER)){var selectedChoice=selected;return e.which==KEY.LEFT&&prev.length?selectedChoice=prev:e.which==KEY.RIGHT?selectedChoice=next.length?next:null:e.which===KEY.BACKSPACE?this.unselect(selected.first())&&(this.search.width(10),selectedChoice=prev.length?prev:next):e.which==KEY.DELETE?this.unselect(selected.first())&&(this.search.width(10),selectedChoice=next.length?next:null):e.which==KEY.ENTER&&(selectedChoice=null),this.selectChoice(selectedChoice),killEvent(e),void(selectedChoice&&selectedChoice.length||this.open())}if((e.which===KEY.BACKSPACE&&1==this.keydowns||e.which==KEY.LEFT)&&0==pos.offset&&!pos.length)return this.selectChoice(selection.find(".select2-search-choice:not(.select2-locked)").last()),void killEvent(e);if(this.selectChoice(null),this.opened())switch(e.which){case KEY.UP:case KEY.DOWN:return this.moveHighlight(e.which===KEY.UP?-1:1),void killEvent(e);case KEY.ENTER:return this.selectHighlighted(),void killEvent(e);case KEY.TAB:return this.selectHighlighted({noFocus:!0}),void this.close();case KEY.ESC:return this.cancel(e),void killEvent(e)}if(e.which!==KEY.TAB&&!KEY.isControl(e)&&!KEY.isFunctionKey(e)&&e.which!==KEY.BACKSPACE&&e.which!==KEY.ESC){if(e.which===KEY.ENTER){if(this.opts.openOnEnter===!1)return;if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return}this.open(),(e.which===KEY.PAGE_UP||e.which===KEY.PAGE_DOWN)&&killEvent(e),e.which===KEY.ENTER&&killEvent(e)}}})),this.search.on("keyup",this.bind(function(){this.keydowns=0,this.resizeSearch()})),this.search.on("blur",this.bind(function(e){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.selectChoice(null),this.opened()||this.clearSearch(),e.stopImmediatePropagation(),this.opts.element.trigger($.Event("select2-blur"))})),this.container.on("click",selector,this.bind(function(e){this.isInterfaceEnabled()&&($(e.target).closest(".select2-search-choice").length>0||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger($.Event("select2-focus")),this.open(),this.focusSearch(),e.preventDefault()))})),this.container.on("focus",selector,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger($.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var self=this;this.opts.initSelection.call(null,this.opts.element,function(data){data!==undefined&&null!==data&&(self.updateSelection(data),self.close(),self.clearSearch())})}},clearSearch:function(){var placeholder=this.getPlaceholder(),maxWidth=this.getMaxSearchWidth();placeholder!==undefined&&0===this.getVal().length&&this.search.hasClass("select2-focused")===!1?(this.search.val(placeholder).addClass("select2-default"),this.search.width(maxWidth>0?maxWidth:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),""===this.search.val()&&this.nextSearchTerm!=undefined&&(this.search.val(this.nextSearchTerm),this.search.select()),this.updateResults(!0),this.opts.shouldFocusInput(this)&&this.search.focus(),this.opts.element.trigger($.Event("select2-open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(data){var ids=[],filtered=[],self=this;$(data).each(function(){indexOf(self.id(this),ids)<0&&(ids.push(self.id(this)),filtered.push(this))}),data=filtered,this.selection.find(".select2-search-choice").remove(),$(data).each(function(){self.addSelectedChoice(this)}),self.postprocessResults()},tokenize:function(){var input=this.search.val();input=this.opts.tokenizer.call(this,input,this.data(),this.bind(this.onSelect),this.opts),null!=input&&input!=undefined&&(this.search.val(input),input.length>0&&this.open())},onSelect:function(data,options){this.triggerSelect(data)&&(this.addSelectedChoice(data),this.opts.element.trigger({type:"selected",val:this.id(data),choice:data}),this.nextSearchTerm=this.opts.nextSearchTerm(data,this.search.val()),this.clearSearch(),this.updateResults(),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(data,!1,this.opts.closeOnSelect===!0),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()?this.updateResults(!0):this.nextSearchTerm!=undefined&&(this.search.val(this.nextSearchTerm),this.updateResults(),this.search.select()),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:data}),options&&options.noFocus||this.focusSearch())},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(data){var formatted,cssClass,enableChoice=!data.locked,enabledItem=$("<li class='select2-search-choice'> <div></div> <a href='#' class='select2-search-choice-close' tabindex='-1'></a></li>"),disabledItem=$("<li class='select2-search-choice select2-locked'><div></div></li>"),choice=enableChoice?enabledItem:disabledItem,id=this.id(data),val=this.getVal();formatted=this.opts.formatSelection(data,choice.find("div"),this.opts.escapeMarkup),formatted!=undefined&&choice.find("div").replaceWith("<div>"+formatted+"</div>"),cssClass=this.opts.formatSelectionCssClass(data,choice.find("div")),cssClass!=undefined&&choice.addClass(cssClass),enableChoice&&choice.find(".select2-search-choice-close").on("mousedown",killEvent).on("click dblclick",this.bind(function(e){this.isInterfaceEnabled()&&(this.unselect($(e.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),killEvent(e),this.close(),this.focusSearch())})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),choice.data("select2-data",data),choice.insertBefore(this.searchContainer),val.push(id),this.setVal(val)},unselect:function(selected){var data,index,val=this.getVal();if(selected=selected.closest(".select2-search-choice"),0===selected.length)throw"Invalid argument: "+selected+". Must be .select2-search-choice";if(data=selected.data("select2-data")){var evt=$.Event("select2-removing");if(evt.val=this.id(data),evt.choice=data,this.opts.element.trigger(evt),evt.isDefaultPrevented())return!1;for(;(index=indexOf(this.id(data),val))>=0;)val.splice(index,1),this.setVal(val),this.select&&this.postprocessResults();return selected.remove(),this.opts.element.trigger({type:"select2-removed",val:this.id(data),choice:data}),this.triggerChange({removed:data}),!0}},postprocessResults:function(data,initial,noHighlightUpdate){var val=this.getVal(),choices=this.results.find(".select2-result"),compound=this.results.find(".select2-result-with-children"),self=this;choices.each2(function(i,choice){var id=self.id(choice.data("select2-data"));indexOf(id,val)>=0&&(choice.addClass("select2-selected"),choice.find(".select2-result-selectable").addClass("select2-selected"))
8
  }),compound.each2(function(i,choice){choice.is(".select2-result-selectable")||0!==choice.find(".select2-result-selectable:not(.select2-selected)").length||choice.addClass("select2-selected")}),-1==this.highlight()&&noHighlightUpdate!==!1&&self.highlight(0),!this.opts.createSearchChoice&&!choices.filter(".select2-result:not(.select2-selected)").length>0&&(!data||data&&!data.more&&0===this.results.find(".select2-no-results").length)&&checkFormatter(self.opts.formatNoMatches,"formatNoMatches")&&this.results.append("<li class='select2-no-results'>"+evaluate(self.opts.formatNoMatches,self.search.val())+"</li>")},getMaxSearchWidth:function(){return this.selection.width()-getSideBorderPadding(this.search)},resizeSearch:function(){var minimumWidth,left,maxWidth,containerLeft,searchWidth,sideBorderPadding=getSideBorderPadding(this.search);minimumWidth=measureTextWidth(this.search)+10,left=this.search.offset().left,maxWidth=this.selection.width(),containerLeft=this.selection.offset().left,searchWidth=maxWidth-(left-containerLeft)-sideBorderPadding,minimumWidth>searchWidth&&(searchWidth=maxWidth-sideBorderPadding),40>searchWidth&&(searchWidth=maxWidth-sideBorderPadding),0>=searchWidth&&(searchWidth=minimumWidth),this.search.width(Math.floor(searchWidth))},getVal:function(){var val;return this.select?(val=this.select.val(),null===val?[]:val):(val=this.opts.element.val(),splitVal(val,this.opts.separator))},setVal:function(val){var unique;this.select?this.select.val(val):(unique=[],$(val).each(function(){indexOf(this,unique)<0&&unique.push(this)}),this.opts.element.val(0===unique.length?"":unique.join(this.opts.separator)))},buildChangeDetails:function(old,current){for(var current=current.slice(0),old=old.slice(0),i=0;i<current.length;i++)for(var j=0;j<old.length;j++)equal(this.opts.id(current[i]),this.opts.id(old[j]))&&(current.splice(i,1),i>0&&i--,old.splice(j,1),j--);return{added:current,removed:old}},val:function(val,triggerChange){var oldData,self=this;if(0===arguments.length)return this.getVal();if(oldData=this.data(),oldData.length||(oldData=[]),!val&&0!==val)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),void(triggerChange&&this.triggerChange({added:this.data(),removed:oldData}));if(this.setVal(val),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),triggerChange&&this.triggerChange(this.buildChangeDetails(oldData,this.data()));else{if(this.opts.initSelection===undefined)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(data){var ids=$.map(data,self.id);self.setVal(ids),self.updateSelection(data),self.clearSearch(),triggerChange&&self.triggerChange(self.buildChangeDetails(oldData,self.data()))})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var val=[],self=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){val.push(self.opts.id($(this).data("select2-data")))}),this.setVal(val),this.triggerChange()},data:function(values,triggerChange){var ids,old,self=this;return 0===arguments.length?this.selection.children(".select2-search-choice").map(function(){return $(this).data("select2-data")}).get():(old=this.data(),values||(values=[]),ids=$.map(values,function(e){return self.opts.id(e)}),this.setVal(ids),this.updateSelection(values),this.clearSearch(),triggerChange&&this.triggerChange(this.buildChangeDetails(old,this.data())),void 0)}}),$.fn.select2=function(){var opts,select2,method,value,multiple,args=Array.prototype.slice.call(arguments,0),allowedMethods=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],valueMethods=["opened","isFocused","container","dropdown"],propertyMethods=["val","data"],methodsMap={search:"externalSearch"};return this.each(function(){if(0===args.length||"object"==typeof args[0])opts=0===args.length?{}:$.extend({},args[0]),opts.element=$(this),"select"===opts.element.get(0).tagName.toLowerCase()?multiple=opts.element.prop("multiple"):(multiple=opts.multiple||!1,"tags"in opts&&(opts.multiple=multiple=!0)),select2=multiple?new window.Select2["class"].multi:new window.Select2["class"].single,select2.init(opts);else{if("string"!=typeof args[0])throw"Invalid arguments to select2 plugin: "+args;if(indexOf(args[0],allowedMethods)<0)throw"Unknown method: "+args[0];if(value=undefined,select2=$(this).data("select2"),select2===undefined)return;if(method=args[0],"container"===method?value=select2.container:"dropdown"===method?value=select2.dropdown:(methodsMap[method]&&(method=methodsMap[method]),value=select2[method].apply(select2,args.slice(1))),indexOf(args[0],valueMethods)>=0||indexOf(args[0],propertyMethods)>=0&&1==args.length)return!1}}),value===undefined?this:value},$.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(result,container,query,escapeMarkup){var markup=[];return markMatch(result.text,query.term,markup,escapeMarkup),markup.join("")},formatSelection:function(data,container,escapeMarkup){return data?escapeMarkup(data.text):undefined},sortResults:function(results){return results},formatResultCssClass:function(data){return data.css},formatSelectionCssClass:function(){return undefined},formatMatches:function(matches){return matches+" results are available, use up and down arrow keys to navigate."},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(input,min){var n=min-input.length;return"Please enter "+n+" or more character"+(1==n?"":"s")},formatInputTooLong:function(input,max){var n=input.length-max;return"Please delete "+n+" character"+(1==n?"":"s")},formatSelectionTooBig:function(limit){return"You can only select "+limit+" item"+(1==limit?"":"s")},formatLoadMore:function(){return"Loading more results…"},formatSearching:function(){return"Searching…"},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(e){return e==undefined?null:e.id},matcher:function(term,text){return stripDiacritics(""+text).toUpperCase().indexOf(stripDiacritics(""+term).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:defaultTokenizer,escapeMarkup:defaultEscapeMarkup,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(c){return c},adaptDropdownCssClass:function(){return null},nextSearchTerm:function(){return undefined},searchInputPlaceholder:"",createSearchChoicePosition:"top",shouldFocusInput:function(instance){var supportsTouchEvents="ontouchstart"in window||navigator.msMaxTouchPoints>0;return supportsTouchEvents&&instance.opts.minimumResultsForSearch<0?!1:!0}},$.fn.select2.ajaxDefaults={transport:$.ajax,params:{type:"GET",cache:!1,dataType:"json"}},window.Select2={query:{ajax:ajax,local:local,tags:tags},util:{debounce:debounce,markMatch:markMatch,escapeMarkup:defaultEscapeMarkup,stripDiacritics:stripDiacritics},"class":{"abstract":AbstractSelect2,single:SingleSelect2,multi:MultiSelect2}}}}(jQuery),jQuery(document).ready(function($){$("#filter_action, #filter_content, #filter_form").change(function(){$("#leadin-contacts-filter-button").addClass("button-primary")})});
2
  },text:function(a,b,c,d){var e=fa||!aa&&this.forExport,f={};return d&&!this.forExport?this.html(a,b,c):(f.x=Math.round(b||0),c&&(f.y=Math.round(c)),(a||0===a)&&(f.text=a),a=this.createElement("text").attr(f),e&&a.css({position:"absolute"}),d||(a.xSetter=function(a,b,c){var e,f,d=c.childNodes;for(f=1;f<d.length;f++)e=d[f],e.getAttribute("x")===c.getAttribute("x")&&e.setAttribute("x",a);c.setAttribute(b,a)}),a)},fontMetrics:function(a){var a=a||this.style.fontSize,a=/px/.test(a)?z(a):/em/.test(a)?12*parseFloat(a):12,a=24>a?a+4:u(1.2*a),b=u(.8*a);return{h:a,b:b}},label:function(a,b,c,d,e,f,g,h,i){function j(){var a,b;a=s.element.style,J=(void 0===Va||void 0===wb||n.styles.textAlign)&&s.textStr&&s.getBBox(),n.width=(Va||J.width||0)+2*x+v,n.height=(wb||J.height||0)+2*x,na=x+o.fontMetrics(a&&a.fontSize).b,z&&(m||(a=u(-L*x),b=h?-na:0,n.box=m=d?o.symbol(d,a,b,n.width,n.height,B):o.rect(a,b,n.width,n.height,0,B[Pb]),m.attr("fill",Q).add(n)),m.isImg||m.attr(q({width:u(n.width),height:u(n.height)},B)),B=null)}function k(){var c,a=n.styles,a=a&&a.textAlign,b=v+x*(1-L);c=h?0:na,r(Va)&&J&&("center"===a||"right"===a)&&(b+={center:.5,right:1}[a]*(Va-J.width)),(b!==s.x||c!==s.y)&&(s.attr("x",b),c!==t&&s.attr("y",c)),s.x=b,s.y=c}function l(a,b){m?m.attr(a,b):B[a]=b}var m,J,Va,wb,xb,yb,na,z,o=this,n=o.g(i),s=o.text("",0,0,g).attr({zIndex:1}),L=0,x=3,v=0,y=0,B={};n.onAdd=function(){s.add(n),n.attr({text:a||"",x:b,y:c}),m&&r(e)&&n.attr({anchorX:e,anchorY:f})},n.widthSetter=function(a){Va=a},n.heightSetter=function(a){wb=a},n.paddingSetter=function(a){r(a)&&a!==x&&(x=a,k())},n.paddingLeftSetter=function(a){r(a)&&a!==v&&(v=a,k())},n.alignSetter=function(a){L={left:0,center:.5,right:1}[a]},n.textSetter=function(a){a!==t&&s.textSetter(a),j(),k()},n["stroke-widthSetter"]=function(a,b){a&&(z=!0),y=a%2/2,l(b,a)},n.strokeSetter=n.fillSetter=n.rSetter=function(a,b){"fill"===b&&a&&(z=!0),l(b,a)},n.anchorXSetter=function(a,b){e=a,l(b,a+y-xb)},n.anchorYSetter=function(a,b){f=a,l(b,a-yb)},n.xSetter=function(a){n.x=a,L&&(a-=L*((Va||J.width)+x)),xb=u(a),n.attr("translateX",xb)},n.ySetter=function(a){yb=n.y=u(a),n.attr("translateY",yb)};var A=n.css;return q(n,{css:function(a){if(a){var b={},a=w(a);p("fontSize,fontWeight,fontFamily,color,lineHeight,width,textDecoration,textShadow".split(","),function(c){a[c]!==t&&(b[c]=a[c],delete a[c])}),s.css(b)}return A.call(n,a)},getBBox:function(){return{width:J.width+2*x,height:J.height+2*x,x:J.x-x,y:J.y-x}},shadow:function(a){return m&&m.shadow(a),n},destroy:function(){W(n.element,"mouseenter"),W(n.element,"mouseleave"),s&&(s=s.destroy()),m&&(m=m.destroy()),P.prototype.destroy.call(n),n=o=j=k=l=null}})}},Za=ta,q(P.prototype,{htmlCss:function(a){var b=this.element;return(b=a&&"SPAN"===b.tagName&&a.width)&&(delete a.width,this.textWidth=b,this.updateTransform()),this.styles=q(this.styles,a),G(this.element,a),this},htmlGetBBox:function(){var a=this.element,b=this.bBox;return b||("text"===a.nodeName&&(a.style.position="absolute"),b=this.bBox={x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}),b},htmlUpdateTransform:function(){if(this.added){var a=this.renderer,b=this.element,c=this.translateX||0,d=this.translateY||0,e=this.x||0,f=this.y||0,g=this.textAlign||"left",h={left:0,center:.5,right:1}[g],i=this.shadows;if(G(b,{marginLeft:c,marginTop:d}),i&&p(i,function(a){G(a,{marginLeft:c+1,marginTop:d+1})}),this.inverted&&p(b.childNodes,function(c){a.invertChild(c,b)}),"SPAN"===b.tagName){var k,j=this.rotation,l=z(this.textWidth),o=[j,g,b.innerHTML,this.textWidth].join(",");o!==this.cTT&&(k=a.fontMetrics(b.style.fontSize).b,r(j)&&this.setSpanRotation(j,h,k),i=m(this.elemWidth,b.offsetWidth),i>l&&/[ \-]/.test(b.textContent||b.innerText)&&(G(b,{width:l+"px",display:"block",whiteSpace:"normal"}),i=l),this.getSpanCorrection(i,k,h,j,g)),G(b,{left:e+(this.xCorr||0)+"px",top:f+(this.yCorr||0)+"px"}),ib&&(k=b.offsetHeight),this.cTT=o}}else this.alignOnAdd=!0},setSpanRotation:function(a,b,c){var d={},e=Aa?"-ms-transform":ib?"-webkit-transform":Ta?"MozTransform":Ib?"-o-transform":"";d[e]=d.transform="rotate("+a+"deg)",d[e+(Ta?"Origin":"-origin")]=d.transformOrigin=100*b+"% "+c+"px",G(this.element,d)},getSpanCorrection:function(a,b,c){this.xCorr=-a*c,this.yCorr=-b}}),q(ta.prototype,{html:function(a,b,c){var d=this.createElement("span"),e=d.element,f=d.renderer;return d.textSetter=function(a){a!==e.innerHTML&&delete this.bBox,e.innerHTML=this.textStr=a},d.xSetter=d.ySetter=d.alignSetter=d.rotationSetter=function(a,b){"align"===b&&(b="textAlign"),d[b]=a,d.htmlUpdateTransform()},d.attr({text:a,x:u(b),y:u(c)}).css({position:"absolute",whiteSpace:"nowrap",fontFamily:this.style.fontFamily,fontSize:this.style.fontSize}),d.css=d.htmlCss,f.isSVG&&(d.add=function(a){var b,c=f.box.parentNode,j=[];if(this.parentGroup=a){if(b=a.div,!b){for(;a;)j.push(a),a=a.parentGroup;p(j.reverse(),function(a){var d;b=a.div=a.div||Y(Ja,{className:H(a.element,"class")},{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY||0)+"px"},b||c),d=b.style,q(a,{translateXSetter:function(b,c){d.left=b+"px",a[c]=b,a.doTransform=!0},translateYSetter:function(b,c){d.top=b+"px",a[c]=b,a.doTransform=!0},visibilitySetter:function(a,b){d[b]=a}})})}}else b=c;return b.appendChild(e),d.added=!0,d.alignOnAdd&&d.htmlUpdateTransform(),d}),d}});var X;if(!aa&&!fa){R.VMLElement=X={init:function(a,b){var c=["<",b,' filled="f" stroked="f"'],d=["position: ","absolute",";"],e=b===Ja;("shape"===b||e)&&d.push("left:0;top:0;width:1px;height:1px;"),d.push("visibility: ",e?"hidden":"visible"),c.push(' style="',d.join(""),'"/>'),b&&(c=e||"span"===b||"img"===b?c.join(""):a.prepVML(c),this.element=Y(c)),this.renderer=a},add:function(a){var b=this.renderer,c=this.element,d=b.box,d=a?a.element||a:d;return a&&a.inverted&&b.invertChild(c,d),d.appendChild(c),this.added=!0,this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform(),this.onAdd&&this.onAdd(),this},updateTransform:P.prototype.htmlUpdateTransform,setSpanRotation:function(){var a=this.rotation,b=Z(a*Ca),c=ea(a*Ca);G(this.element,{filter:a?["progid:DXImageTransform.Microsoft.Matrix(M11=",b,", M12=",-c,", M21=",c,", M22=",b,", sizingMethod='auto expand')"].join(""):Q})},getSpanCorrection:function(a,b,c,d,e){var i,f=d?Z(d*Ca):1,g=d?ea(d*Ca):0,h=m(this.elemHeight,this.element.offsetHeight);this.xCorr=0>f&&-a,this.yCorr=0>g&&-h,i=0>f*g,this.xCorr+=g*b*(i?1-c:c),this.yCorr-=f*b*(d?i?c:1-c:1),e&&"left"!==e&&(this.xCorr-=a*c*(0>f?-1:1),d&&(this.yCorr-=h*c*(0>g?-1:1)),G(this.element,{textAlign:e}))},pathToVML:function(a){for(var b=a.length,c=[];b--;)ha(a[b])?c[b]=u(10*a[b])-5:"Z"===a[b]?c[b]="x":(c[b]=a[b],!a.isArc||"wa"!==a[b]&&"at"!==a[b]||(c[b+5]===c[b+7]&&(c[b+7]+=a[b+7]>a[b+5]?1:-1),c[b+6]===c[b+8]&&(c[b+8]+=a[b+8]>a[b+6]?1:-1)));return c.join(" ")||"x"},clip:function(a){var c,b=this;return a?(c=a.members,ja(c,b),c.push(b),b.destroyClip=function(){ja(c,b)},a=a.getCSS(b)):(b.destroyClip&&b.destroyClip(),a={clip:hb?"inherit":"rect(auto)"}),b.css(a)},css:P.prototype.htmlCss,safeRemoveChild:function(a){a.parentNode&&Pa(a)},destroy:function(){return this.destroyClip&&this.destroyClip(),P.prototype.destroy.apply(this)},on:function(a,b){return this.element["on"+a]=function(){var a=I.event;a.target=a.srcElement,b(a)},this},cutOffPath:function(a,b){var c,a=a.split(/[ ,]/);return c=a.length,(9===c||11===c)&&(a[c-4]=a[c-2]=z(a[c-2])-10*b),a.join(" ")},shadow:function(a,b,c){var e,h,j,l,o,n,s,d=[],f=this.element,g=this.renderer,i=f.style,k=f.path;if(k&&"string"!=typeof k.value&&(k="x"),o=k,a){for(n=m(a.width,3),s=(a.opacity||.15)/n,e=1;3>=e;e++)l=2*n+1-2*e,c&&(o=this.cutOffPath(k.value,l+.5)),j=['<shape isShadow="true" strokeweight="',l,'" filled="false" path="',o,'" coordsize="10 10" style="',f.style.cssText,'" />'],h=Y(g.prepVML(j),null,{left:z(i.left)+m(a.offsetX,1),top:z(i.top)+m(a.offsetY,1)}),c&&(h.cutOff=l+1),j=['<stroke color="',a.color||"black",'" opacity="',s*e,'"/>'],Y(g.prepVML(j),null,null,h),b?b.element.appendChild(h):f.parentNode.insertBefore(h,f),d.push(h);this.shadows=d}return this},updateShadows:sa,setAttr:function(a,b){hb?this.element[a]=b:this.element.setAttribute(a,b)},classSetter:function(a){this.element.className=a},dashstyleSetter:function(a,b,c){(c.getElementsByTagName("stroke")[0]||Y(this.renderer.prepVML(["<stroke/>"]),null,null,c))[b]=a||"solid",this[b]=a},dSetter:function(a,b,c){var d=this.shadows,a=a||[];if(this.d=a.join(" "),c.path=a=this.pathToVML(a),d)for(c=d.length;c--;)d[c].path=d[c].cutOff?this.cutOffPath(a,d[c].cutOff):a;this.setAttr(b,a)},fillSetter:function(a,b,c){var d=c.nodeName;"SPAN"===d?c.style.color=a:"IMG"!==d&&(c.filled=a!==Q,this.setAttr("fillcolor",this.renderer.color(a,c,b,this)))},opacitySetter:sa,rotationSetter:function(a,b,c){c=c.style,this[b]=c[b]=a,c.left=-u(ea(a*Ca)+1)+"px",c.top=u(Z(a*Ca))+"px"},strokeSetter:function(a,b,c){this.setAttr("strokecolor",this.renderer.color(a,c,b))},"stroke-widthSetter":function(a,b,c){c.stroked=!!a,this[b]=a,ha(a)&&(a+="px"),this.setAttr("strokeweight",a)},titleSetter:function(a,b){this.setAttr(b,a)},visibilitySetter:function(a,b,c){"inherit"===a&&(a="visible"),this.shadows&&p(this.shadows,function(c){c.style[b]=a}),"DIV"===c.nodeName&&(a="hidden"===a?"-999em":0,hb||(c.style[b]=a?"visible":"hidden"),b="top"),c.style[b]=a},xSetter:function(a,b,c){this[b]=a,"x"===b?b="left":"y"===b&&(b="top"),this.updateClipping?(this[b]=a,this.updateClipping()):c.style[b]=a},zIndexSetter:function(a,b,c){c.style[b]=a}},X=ka(P,X),X.prototype.ySetter=X.prototype.widthSetter=X.prototype.heightSetter=X.prototype.xSetter;var ga={Element:X,isIE8:wa.indexOf("MSIE 8.0")>-1,init:function(a,b,c,d){var e;if(this.alignedObjects=[],d=this.createElement(Ja).css(q(this.getStyle(d),{position:"relative"})),e=d.element,a.appendChild(d.element),this.isVML=!0,this.box=e,this.boxWrapper=d,this.cache={},this.setSize(b,c,!1),!y.namespaces.hcv){y.namespaces.add("hcv","urn:schemas-microsoft-com:vml");try{y.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}catch(f){y.styleSheets[0].cssText+="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}}},isHidden:function(){return!this.box.offsetWidth},clipRect:function(a,b,c,d){var e=this.createElement(),f=ca(a);return q(e,{members:[],left:(f?a.x:a)+1,top:(f?a.y:b)+1,width:(f?a.width:c)-1,height:(f?a.height:d)-1,getCSS:function(a){var b=a.element,c=b.nodeName,a=a.inverted,d=this.top-("shape"===c?b.offsetTop:0),e=this.left,b=e+this.width,f=d+this.height,d={clip:"rect("+u(a?e:d)+"px,"+u(a?f:b)+"px,"+u(a?b:f)+"px,"+u(a?d:e)+"px)"};return!a&&hb&&"DIV"===c&&q(d,{width:b+"px",height:f+"px"}),d},updateClipping:function(){p(e.members,function(a){a.element&&a.css(e.getCSS(a))})}})},color:function(a,b,c,d){var f,h,i,e=this,g=/^rgba/,j=Q;if(a&&a.linearGradient?i="gradient":a&&a.radialGradient&&(i="pattern"),i){var k,l,n,s,m,J,L,r,o=a.linearGradient||a.radialGradient,x="",a=a.stops,v=[],q=function(){h=['<fill colors="'+v.join(",")+'" opacity="',m,'" o:opacity2="',s,'" type="',i,'" ',x,'focus="100%" method="any" />'],Y(e.prepVML(h),null,null,b)};if(n=a[0],r=a[a.length-1],n[0]>0&&a.unshift([0,n[1]]),r[0]<1&&a.push([1,r[1]]),p(a,function(a,b){g.test(a[1])?(f=ya(a[1]),k=f.get("rgb"),l=f.get("a")):(k=a[1],l=1),v.push(100*a[0]+"% "+k),b?(m=l,J=k):(s=l,L=k)}),"fill"===c)if("gradient"===i)c=o.x1||o[0]||0,a=o.y1||o[1]||0,n=o.x2||o[2]||0,o=o.y2||o[3]||0,x='angle="'+(90-180*U.atan((o-a)/(n-c))/ma)+'"',q();else{var w,j=o.r,t=2*j,u=2*j,y=o.cx,B=o.cy,na=b.radialReference,j=function(){na&&(w=d.getBBox(),y+=(na[0]-w.x)/w.width-.5,B+=(na[1]-w.y)/w.height-.5,t*=na[2]/w.width,u*=na[2]/w.height),x='src="'+E.global.VMLRadialGradientURL+'" size="'+t+","+u+'" origin="0.5,0.5" position="'+y+","+B+'" color2="'+L+'" ',q()};d.added?j():d.onAdd=j,j=J}else j=k}else g.test(a)&&"IMG"!==b.tagName?(f=ya(a),h=["<",c,' opacity="',f.get("a"),'"/>'],Y(this.prepVML(h),null,null,b),j=f.get("rgb")):(j=b.getElementsByTagName(c),j.length&&(j[0].opacity=1,j[0].type="solid"),j=a);return j},prepVML:function(a){var b=this.isIE8,a=a.join("");return b?(a=a.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),a=-1===a.indexOf('style="')?a.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):a.replace('style="','style="display:inline-block;behavior:url(#default#VML);')):a=a.replace("<","<hcv:"),a},text:ta.prototype.html,path:function(a){var b={coordsize:"10 10"};return La(a)?b.d=a:ca(a)&&q(b,a),this.createElement("shape").attr(b)},circle:function(a,b,c){var d=this.symbol("circle");return ca(a)&&(c=a.r,b=a.y,a=a.x),d.isCircle=!0,d.r=c,d.attr({x:a,y:b})},g:function(a){var b;return a&&(b={className:"highcharts-"+a,"class":"highcharts-"+a}),this.createElement(Ja).attr(b)},image:function(a,b,c,d,e){var f=this.createElement("img").attr({src:a});return arguments.length>1&&f.attr({x:b,y:c,width:d,height:e}),f},createElement:function(a){return"rect"===a?this.symbol(a):ta.prototype.createElement.call(this,a)},invertChild:function(a,b){var c=this,d=b.style,e="IMG"===a.tagName&&a.style;G(a,{flip:"x",left:z(d.width)-(e?z(e.top):1),top:z(d.height)-(e?z(e.left):1),rotation:-90}),p(a.childNodes,function(b){c.invertChild(b,a)})},symbols:{arc:function(a,b,c,d,e){var f=e.start,g=e.end,h=e.r||c||d,c=e.innerR,d=Z(f),i=ea(f),j=Z(g),k=ea(g);return g-f===0?["x"]:(f=["wa",a-h,b-h,a+h,b+h,a+h*d,b+h*i,a+h*j,b+h*k],e.open&&!c&&f.push("e","M",a,b),f.push("at",a-c,b-c,a+c,b+c,a+c*j,b+c*k,a+c*d,b+c*i,"x","e"),f.isArc=!0,f)},circle:function(a,b,c,d,e){return e&&(c=d=2*e.r),e&&e.isCircle&&(a-=c/2,b-=d/2),["wa",a,b,a+c,b+d,a+c,b+d/2,a+c,b+d/2,"e"]},rect:function(a,b,c,d,e){return ta.prototype.symbols[r(e)&&e.r?"callout":"square"].call(0,a,b,c,d,e)}}};R.VMLRenderer=X=function(){this.init.apply(this,arguments)},X.prototype=w(ta.prototype,ga),Za=X}ta.prototype.measureSpanWidth=function(a,b){var d,c=y.createElement("span");return d=y.createTextNode(a),c.appendChild(d),G(c,b),this.box.appendChild(c),d=c.offsetWidth,Pa(c),d};var Lb;fa&&(R.CanVGRenderer=X=function(){xa="http://www.w3.org/1999/xhtml"},X.prototype.symbols={},Lb=function(){function a(){var d,a=b.length;for(d=0;a>d;d++)b[d]();b=[]}var b=[];return{push:function(c,d){0===b.length&&Qb(d,a),b.push(c)}}}(),Za=X),Sa.prototype={addLabel:function(){var l,a=this.axis,b=a.options,c=a.chart,d=a.horiz,e=a.categories,f=a.names,g=this.pos,h=b.labels,i=a.tickPositions,d=d&&e&&!h.step&&!h.staggerLines&&!h.rotation&&c.plotWidth/i.length||!d&&(c.margin[3]||.33*c.chartWidth),j=g===i[0],k=g===i[i.length-1],f=e?m(e[g],f[g],g):g,e=this.label,o=i.info;a.isDatetimeAxis&&o&&(l=b.dateTimeLabelFormats[o.higherRanks[g]||o.unitName]),this.isFirst=j,this.isLast=k,b=a.labelFormatter.call({axis:a,chart:c,isFirst:j,isLast:k,dateTimeLabelFormat:l,value:a.isLog?da(ia(f)):f}),g=d&&{width:v(1,u(d-2*(h.padding||10)))+"px"},g=q(g,h.style),r(e)?e&&e.attr({text:b}).css(g):(l={align:a.labelAlign},ha(h.rotation)&&(l.rotation=h.rotation),d&&h.ellipsis&&(l._clipHeight=a.len/i.length),this.label=r(b)&&h.enabled?c.renderer.text(b,0,0,h.useHTML).attr(l).css(g).add(a.labelGroup):null)},getLabelSize:function(){var a=this.label,b=this.axis;return a?a.getBBox()[b.horiz?"height":"width"]:0},getLabelSides:function(){var a=this.label.getBBox(),b=this.axis,c=b.horiz,d=b.options.labels,a=c?a.width:a.height,b=c?d.x-a*{left:0,center:.5,right:1}[b.labelAlign]:0;return[b,c?a+b:a]},handleOverflow:function(a,b){var l,o,n,c=!0,d=this.axis,e=this.isFirst,f=this.isLast,g=d.horiz?b.x:b.y,h=d.reversed,i=d.tickPositions,j=this.getLabelSides(),k=j[0],j=j[1],s=this.label.line||0;if(l=d.labelEdge,o=d.justifyLabels&&(e||f),l[s]===t||g+k>l[s]?l[s]=g+j:o||(c=!1),o){l=(o=d.justifyToPlot)?d.pos:0,o=o?l+d.len:d.chart.chartWidth;do a+=e?1:-1,n=d.ticks[i[a]];while(i[a]&&(!n||n.label.line!==s));d=n&&n.label.xy&&n.label.xy.x+n.getLabelSides()[e?0:1],e&&!h||f&&h?l>g+k&&(g=l-k,n&&g+j>d&&(c=!1)):g+j>o&&(g=o-j,n&&d>g+k&&(c=!1)),b.x=g}return c},getPosition:function(a,b,c,d){var e=this.axis,f=e.chart,g=d&&f.oldChartHeight||f.chartHeight;return{x:a?e.translate(b+c,null,null,d)+e.transB:e.left+e.offset+(e.opposite?(d&&f.oldChartWidth||f.chartWidth)-e.right-e.left:0),y:a?g-e.bottom+e.offset-(e.opposite?e.height:0):g-e.translate(b+c,null,null,d)-e.transB}},getLabelPosition:function(a,b,c,d,e,f,g,h){var i=this.axis,j=i.transA,k=i.reversed,l=i.staggerLines,o=i.chart.renderer.fontMetrics(e.style.fontSize).b,n=e.rotation,a=a+e.x-(f&&d?f*j*(k?-1:1):0),b=b+e.y-(f&&!d?f*j*(k?1:-1):0);return n&&2===i.side&&(b-=o-o*Z(n*Ca)),!r(e.y)&&!n&&(b+=o-c.getBBox().height/2),l&&(c.line=g/(h||1)%l,b+=c.line*(i.labelOffset/l)),{x:a,y:b}},getMarkPath:function(a,b,c,d,e,f){return f.crispLine(["M",a,b,"L",a+(e?0:-c),b+(e?c:0)],d)},render:function(a,b,c){var d=this.axis,e=d.options,f=d.chart.renderer,g=d.horiz,h=this.type,i=this.label,j=this.pos,k=e.labels,l=this.gridLine,o=h?h+"Grid":"grid",n=h?h+"Tick":"tick",s=e[o+"LineWidth"],p=e[o+"LineColor"],J=e[o+"LineDashStyle"],L=e[n+"Length"],o=e[n+"Width"]||0,x=e[n+"Color"],r=e[n+"Position"],n=this.mark,v=k.step,q=!0,u=d.tickmarkOffset,w=this.getPosition(g,j,u,b),y=w.x,w=w.y,B=g&&y===d.pos+d.len||!g&&w===d.pos?-1:1;this.isActive=!0,s&&(j=d.getPlotLinePath(j+u,s*B,b,!0),l===t&&(l={stroke:p,"stroke-width":s},J&&(l.dashstyle=J),h||(l.zIndex=1),b&&(l.opacity=0),this.gridLine=l=s?f.path(j).attr(l).add(d.gridGroup):null),!b&&l&&j&&l[this.isNew?"attr":"animate"]({d:j,opacity:c})),o&&L&&("inside"===r&&(L=-L),d.opposite&&(L=-L),h=this.getMarkPath(y,w,L,o*B,g,f),n?n.animate({d:h,opacity:c}):this.mark=f.path(h).attr({stroke:x,"stroke-width":o,opacity:c}).add(d.axisGroup)),i&&!isNaN(y)&&(i.xy=w=this.getLabelPosition(y,w,i,g,k,u,a,v),this.isFirst&&!this.isLast&&!m(e.showFirstLabel,1)||this.isLast&&!this.isFirst&&!m(e.showLastLabel,1)?q=!1:!d.isRadial&&!k.step&&!k.rotation&&!b&&0!==c&&(q=this.handleOverflow(a,w)),v&&a%v&&(q=!1),q&&!isNaN(w.y)?(w.opacity=c,i[this.isNew?"attr":"animate"](w),this.isNew=!1):i.attr("y",-9999))},destroy:function(){Oa(this,this.axis)}},R.PlotLineOrBand=function(a,b){this.axis=a,b&&(this.options=b,this.id=b.id)},R.PlotLineOrBand.prototype={render:function(){var p,a=this,b=a.axis,c=b.horiz,d=(b.pointRange||0)/2,e=a.options,f=e.label,g=a.label,h=e.width,i=e.to,j=e.from,k=r(j)&&r(i),l=e.value,o=e.dashStyle,n=a.svgElem,s=[],J=e.color,L=e.zIndex,x=e.events,q={},t=b.chart.renderer;if(b.isLog&&(j=za(j),i=za(i),l=za(l)),h)s=b.getPlotLinePath(l,h),q={stroke:J,"stroke-width":h},o&&(q.dashstyle=o);else{if(!k)return;j=v(j,b.min-d),i=C(i,b.max+d),s=b.getPlotBandPath(j,i,e),J&&(q.fill=J),e.borderWidth&&(q.stroke=e.borderColor,q["stroke-width"]=e.borderWidth)}if(r(L)&&(q.zIndex=L),n)s?n.animate({d:s},null,n.onGetPath):(n.hide(),n.onGetPath=function(){n.show()},g&&(a.label=g=g.destroy()));else if(s&&s.length&&(a.svgElem=n=t.path(s).attr(q).add(),x))for(p in d=function(b){n.on(b,function(c){x[b].apply(a,[c])})},x)d(p);return f&&r(f.text)&&s&&s.length&&b.width>0&&b.height>0?(f=w({align:c&&k&&"center",x:c?!k&&4:10,verticalAlign:!c&&k&&"middle",y:c?k?16:10:k?6:-4,rotation:c&&!k&&90},f),g||(q={align:f.textAlign||f.align,rotation:f.rotation},r(L)&&(q.zIndex=L),a.label=g=t.text(f.text,0,0,f.useHTML).attr(q).css(f.style).add()),b=[s[1],s[4],m(s[6],s[1])],s=[s[2],s[5],m(s[7],s[2])],c=Na(b),k=Na(s),g.align(f,!1,{x:c,y:k,width:Ba(b)-c,height:Ba(s)-k}),g.show()):g&&g.hide(),a},destroy:function(){ja(this.axis.plotLinesAndBands,this),delete this.axis,Oa(this)}},la.prototype={defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,gridLineColor:"#C0C0C0",labels:N,lineColor:"#C0D0E0",lineWidth:1,minPadding:.01,maxPadding:.01,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickColor:"#C0D0E0",tickLength:10,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",tickWidth:1,title:{align:"middle",style:{color:"#707070"}},type:"linear"},defaultYAxisOptions:{endOnTick:!0,gridLineWidth:1,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8,y:3},lineWidth:0,maxPadding:.05,minPadding:.05,startOnTick:!0,tickWidth:0,title:{rotation:270,text:"Values"},stackLabels:{enabled:!1,formatter:function(){return Ga(this.total,-1)},style:N.style}},defaultLeftAxisOptions:{labels:{x:-15,y:null},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15,y:null},title:{rotation:90}},defaultBottomAxisOptions:{labels:{x:0,y:20},title:{rotation:0}},defaultTopAxisOptions:{labels:{x:0,y:-15},title:{rotation:0}},init:function(a,b){var c=b.isX;this.horiz=a.inverted?!c:c,this.coll=(this.isXAxis=c)?"xAxis":"yAxis",this.opposite=b.opposite,this.side=b.side||(this.horiz?this.opposite?0:2:this.opposite?1:3),this.setOptions(b);var d=this.options,e=d.type;this.labelFormatter=d.labels.formatter||this.defaultLabelFormatter,this.userOptions=b,this.minPixelPadding=0,this.chart=a,this.reversed=d.reversed,this.zoomEnabled=d.zoomEnabled!==!1,this.categories=d.categories||"category"===e,this.names=[],this.isLog="logarithmic"===e,this.isDatetimeAxis="datetime"===e,this.isLinked=r(d.linkedTo),this.tickmarkOffset=this.categories&&"between"===d.tickmarkPlacement?.5:0,this.ticks={},this.labelEdge=[],this.minorTicks={},this.plotLinesAndBands=[],this.alternateBands={},this.len=0,this.minRange=this.userMinRange=d.minRange||d.maxZoom,this.range=d.range,this.offset=d.offset||0,this.stacks={},this.oldStacks={},this.min=this.max=null,this.crosshair=m(d.crosshair,qa(a.options.tooltip.crosshairs)[c?0:1],!1);var f,d=this.options.events;-1===Da(this,a.axes)&&(c&&!this.isColorAxis?a.axes.splice(a.xAxis.length,0,this):a.axes.push(this),a[this.coll].push(this)),this.series=this.series||[],a.inverted&&c&&this.reversed===t&&(this.reversed=!0),this.removePlotLine=this.removePlotBand=this.removePlotBandOrLine;for(f in d)K(this,f,d[f]);this.isLog&&(this.val2lin=za,this.lin2val=ia)},setOptions:function(a){this.options=w(this.defaultOptions,this.isXAxis?{}:this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],w(E[this.coll],a))},defaultLabelFormatter:function(){var g,a=this.axis,b=this.value,c=a.categories,d=this.dateTimeLabelFormat,e=E.lang.numericSymbols,f=e&&e.length,h=a.options.labels.format,a=a.isLog?b:a.tickInterval;if(h)g=Ia(h,this);else if(c)g=b;else if(d)g=cb(d,b);else if(f&&a>=1e3)for(;f--&&g===t;)c=Math.pow(1e3,f+1),a>=c&&null!==e[f]&&(g=Ga(b/c,-1)+e[f]);return g===t&&(g=M(b)>=1e4?Ga(b,0):Ga(b,-1,t,"")),g},getSeriesExtremes:function(){var a=this,b=a.chart;a.hasVisibleSeries=!1,a.dataMin=a.dataMax=null,a.buildStacks&&a.buildStacks(),p(a.series,function(c){if(c.visible||!b.options.chart.ignoreHiddenSeries){var d;d=c.options.threshold;var e;a.hasVisibleSeries=!0,a.isLog&&0>=d&&(d=null),a.isXAxis?(d=c.xData,d.length&&(a.dataMin=C(m(a.dataMin,d[0]),Na(d)),a.dataMax=v(m(a.dataMax,d[0]),Ba(d)))):(c.getExtremes(),e=c.dataMax,c=c.dataMin,r(c)&&r(e)&&(a.dataMin=C(m(a.dataMin,c),c),a.dataMax=v(m(a.dataMax,e),e)),r(d)&&(a.dataMin>=d?(a.dataMin=d,a.ignoreMinPadding=!0):a.dataMax<d&&(a.dataMax=d,a.ignoreMaxPadding=!0)))}})},translate:function(a,b,c,d,e,f){var g=1,h=0,i=d?this.oldTransA:this.transA,d=d?this.oldMin:this.min,j=this.minPixelPadding,e=(this.options.ordinal||this.isLog&&e)&&this.lin2val;return i||(i=this.transA),c&&(g*=-1,h=this.len),this.reversed&&(g*=-1,h-=g*(this.sector||this.len)),b?(a=a*g+h,a-=j,a=a/i+d,e&&(a=this.lin2val(a))):(e&&(a=this.val2lin(a)),"between"===f&&(f=.5),a=g*(a-d)*i+h+g*j+(ha(f)?i*f*this.pointRange:0)),a},toPixels:function(a,b){return this.translate(a,!1,!this.horiz,null,!0)+(b?0:this.pos)},toValue:function(a,b){return this.translate(a-(b?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(a,b,c,d,e){var i,j,o,f=this.chart,g=this.left,h=this.top,k=c&&f.oldChartHeight||f.chartHeight,l=c&&f.oldChartWidth||f.chartWidth;return i=this.transB,e=m(e,this.translate(a,null,null,c)),a=c=u(e+i),i=j=u(k-e-i),isNaN(e)?o=!0:this.horiz?(i=h,j=k-this.bottom,(g>a||a>g+this.width)&&(o=!0)):(a=g,c=l-this.right,(h>i||i>h+this.height)&&(o=!0)),o&&!d?null:f.renderer.crispLine(["M",a,i,"L",c,j],b||1)},getLinearTickPositions:function(a,b,c){var d,e=da(T(b/a)*a),f=da(Ka(c/a)*a),g=[];if(b===c&&ha(b))return[b];for(b=e;f>=b&&(g.push(b),b=da(b+a),b!==d);)d=b;return g},getMinorTickPositions:function(){var e,a=this.options,b=this.tickPositions,c=this.minorTickInterval,d=[];if(this.isLog)for(e=b.length,a=1;e>a;a++)d=d.concat(this.getLogTickPositions(c,b[a-1],b[a],!0));else if(this.isDatetimeAxis&&"auto"===a.minorTickInterval)d=d.concat(this.getTimeTicks(this.normalizeTimeTickInterval(c),this.min,this.max,a.startOfWeek)),d[0]<this.min&&d.shift();else for(b=this.min+(b[0]-this.min)%c;b<=this.max;b+=c)d.push(b);return d},adjustForMinRange:function(){var d,f,g,h,i,j,a=this.options,b=this.min,c=this.max,e=this.dataMax-this.dataMin>=this.minRange;if(this.isXAxis&&this.minRange===t&&!this.isLog&&(r(a.min)||r(a.max)?this.minRange=null:(p(this.series,function(a){for(i=a.xData,g=j=a.xIncrement?1:i.length-1;g>0;g--)h=i[g]-i[g-1],(f===t||f>h)&&(f=h)}),this.minRange=C(5*f,this.dataMax-this.dataMin))),c-b<this.minRange){var k=this.minRange;d=(k-c+b)/2,d=[b-d,m(a.min,b-d)],e&&(d[2]=this.dataMin),b=Ba(d),c=[b+k,m(a.max,b+k)],e&&(c[2]=this.dataMax),c=Na(c),k>c-b&&(d[0]=c-k,d[1]=m(a.min,c-k),b=Ba(d))}this.min=b,this.max=c},setAxisTranslation:function(a){var e,b=this,c=b.max-b.min,d=b.axisPointRange||0,f=0,g=0,h=b.linkedParent,i=!!b.categories,j=b.transA;(b.isXAxis||i||d)&&(h?(f=h.minPointOffset,g=h.pointRangePadding):p(b.series,function(a){var h=i?1:b.isXAxis?a.pointRange:b.axisPointRange||0,j=a.options.pointPlacement,n=a.closestPointRange;h>c&&(h=0),d=v(d,h),f=v(f,Fa(j)?0:h/2),g=v(g,"on"===j?0:h),!a.noSharedTooltip&&r(n)&&(e=r(e)?C(e,n):n)}),h=b.ordinalSlope&&e?b.ordinalSlope/e:1,b.minPointOffset=f*=h,b.pointRangePadding=g*=h,b.pointRange=C(d,c),b.closestPointRange=e),a&&(b.oldTransA=j),b.translationSlope=b.transA=j=b.len/(c+g||1),b.transB=b.horiz?b.left:b.bottom,b.minPixelPadding=j*f},setTickPositions:function(a){var s,b=this,c=b.chart,d=b.options,e=b.isLog,f=b.isDatetimeAxis,g=b.isXAxis,h=b.isLinked,i=b.options.tickPositioner,j=d.maxPadding,k=d.minPadding,l=d.tickInterval,o=d.minTickInterval,n=d.tickPixelInterval,$=b.categories;h?(b.linkedParent=c[b.coll][d.linkedTo],c=b.linkedParent.getExtremes(),b.min=m(c.min,c.dataMin),b.max=m(c.max,c.dataMax),d.type!==b.linkedParent.options.type&&ra(11,1)):(b.min=m(b.userMin,d.min,b.dataMin),b.max=m(b.userMax,d.max,b.dataMax)),e&&(!a&&C(b.min,m(b.dataMin,b.min))<=0&&ra(10,1),b.min=da(za(b.min)),b.max=da(za(b.max))),b.range&&r(b.max)&&(b.userMin=b.min=v(b.min,b.max-b.range),b.userMax=b.max,b.range=null),b.beforePadding&&b.beforePadding(),b.adjustForMinRange(),$||b.axisPointRange||b.usePercentage||h||!r(b.min)||!r(b.max)||!(c=b.max-b.min)||(r(d.min)||r(b.userMin)||!k||!(b.dataMin<0)&&b.ignoreMinPadding||(b.min-=c*k),r(d.max)||r(b.userMax)||!j||!(b.dataMax>0)&&b.ignoreMaxPadding||(b.max+=c*j)),ha(d.floor)&&(b.min=v(b.min,d.floor)),ha(d.ceiling)&&(b.max=C(b.max,d.ceiling)),b.min===b.max||void 0===b.min||void 0===b.max?b.tickInterval=1:h&&!l&&n===b.linkedParent.options.tickPixelInterval?b.tickInterval=b.linkedParent.tickInterval:(b.tickInterval=m(l,$?1:(b.max-b.min)*n/v(b.len,n)),!r(l)&&b.len<n&&!this.isRadial&&!this.isLog&&!$&&d.startOnTick&&d.endOnTick&&(s=!0,b.tickInterval/=4)),g&&!a&&p(b.series,function(a){a.processData(b.min!==b.oldMin||b.max!==b.oldMax)}),b.setAxisTranslation(!0),b.beforeSetTickPositions&&b.beforeSetTickPositions(),b.postProcessTickInterval&&(b.tickInterval=b.postProcessTickInterval(b.tickInterval)),b.pointRange&&(b.tickInterval=v(b.pointRange,b.tickInterval)),!l&&b.tickInterval<o&&(b.tickInterval=o),f||e||l||(b.tickInterval=nb(b.tickInterval,null,mb(b.tickInterval),d)),b.minorTickInterval="auto"===d.minorTickInterval&&b.tickInterval?b.tickInterval/5:d.minorTickInterval,b.tickPositions=a=d.tickPositions?[].concat(d.tickPositions):i&&i.apply(b,[b.min,b.max]),a||(!b.ordinalPositions&&(b.max-b.min)/b.tickInterval>v(2*b.len,200)&&ra(19,!0),a=f?b.getTimeTicks(b.normalizeTimeTickInterval(b.tickInterval,d.units),b.min,b.max,d.startOfWeek,b.ordinalPositions,b.closestPointRange,!0):e?b.getLogTickPositions(b.tickInterval,b.min,b.max):b.getLinearTickPositions(b.tickInterval,b.min,b.max),s&&a.splice(1,a.length-2),b.tickPositions=a),h||(e=a[0],f=a[a.length-1],h=b.minPointOffset||0,d.startOnTick?b.min=e:b.min-h>e&&a.shift(),d.endOnTick?b.max=f:b.max+h<f&&a.pop(),1===a.length&&(d=M(b.max)>1e13?1:.001,b.min-=d,b.max+=d))},setMaxTicks:function(){var a=this.chart,b=a.maxTicks||{},c=this.tickPositions,d=this._maxTicksKey=[this.coll,this.pos,this.len].join("-");!this.isLinked&&!this.isDatetimeAxis&&c&&c.length>(b[d]||0)&&this.options.alignTicks!==!1&&(b[d]=c.length),a.maxTicks=b},adjustTickAmount:function(){var a=this._maxTicksKey,b=this.tickPositions,c=this.chart.maxTicks;if(c&&c[a]&&!this.isDatetimeAxis&&!this.categories&&!this.isLinked&&this.options.alignTicks!==!1&&this.min!==t){var d=this.tickAmount,e=b.length;if(this.tickAmount=a=c[a],a>e){for(;b.length<a;)b.push(da(b[b.length-1]+this.tickInterval));this.transA*=(e-1)/(a-1),this.max=b[b.length-1]}r(d)&&a!==d&&(this.isDirty=!0)}},setScale:function(){var b,c,d,e,a=this.stacks;if(this.oldMin=this.min,this.oldMax=this.max,this.oldAxisLength=this.len,this.setAxisSize(),e=this.len!==this.oldAxisLength,p(this.series,function(a){(a.isDirtyData||a.isDirty||a.xAxis.isDirty)&&(d=!0)}),e||d||this.isLinked||this.forceRedraw||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax){if(!this.isXAxis)for(b in a)for(c in a[b])a[b][c].total=null,a[b][c].cum=0;this.forceRedraw=!1,this.getSeriesExtremes(),this.setTickPositions(),this.oldUserMin=this.userMin,this.oldUserMax=this.userMax,this.isDirty||(this.isDirty=e||this.min!==this.oldMin||this.max!==this.oldMax)}else if(!this.isXAxis){this.oldStacks&&(a=this.stacks=this.oldStacks);for(b in a)for(c in a[b])a[b][c].cum=a[b][c].total}this.setMaxTicks()},setExtremes:function(a,b,c,d,e){var f=this,g=f.chart,c=m(c,!0),e=q(e,{min:a,max:b});D(f,"setExtremes",e,function(){f.userMin=a,f.userMax=b,f.eventArgs=e,f.isDirtyExtremes=!0,c&&g.redraw(d)})},zoom:function(a,b){var c=this.dataMin,d=this.dataMax,e=this.options;return this.allowZoomOutside||(r(c)&&a<=C(c,m(e.min,c))&&(a=t),r(d)&&b>=v(d,m(e.max,d))&&(b=t)),this.displayBtn=a!==t||b!==t,this.setExtremes(a,b,!1,t,{trigger:"zoom"}),!0},setAxisSize:function(){var a=this.chart,b=this.options,c=b.offsetLeft||0,d=this.horiz,e=m(b.width,a.plotWidth-c+(b.offsetRight||0)),f=m(b.height,a.plotHeight),g=m(b.top,a.plotTop),b=m(b.left,a.plotLeft+c),c=/%$/;c.test(f)&&(f=parseInt(f,10)/100*a.plotHeight),c.test(g)&&(g=parseInt(g,10)/100*a.plotHeight+a.plotTop),this.left=b,this.top=g,this.width=e,this.height=f,this.bottom=a.chartHeight-f-g,this.right=a.chartWidth-e-b,this.len=v(d?e:f,0),this.pos=d?b:g},getExtremes:function(){var a=this.isLog;return{min:a?da(ia(this.min)):this.min,max:a?da(ia(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var b=this.isLog,c=b?ia(this.min):this.min,b=b?ia(this.max):this.max;return c>a||null===a?a=c:a>b&&(a=b),this.translate(a,0,1,0,1)},autoLabelAlign:function(a){return a=(m(a,0)-90*this.side+720)%360,a>15&&165>a?"right":a>195&&345>a?"left":"center"},getOffset:function(){var j,l,q,y,z,A,B,a=this,b=a.chart,c=b.renderer,d=a.options,e=a.tickPositions,f=a.ticks,g=a.horiz,h=a.side,i=b.inverted?[1,0,3,2][h]:h,k=0,o=0,n=d.title,s=d.labels,$=0,J=b.axisOffset,L=b.clipOffset,x=[-1,1,1,-1][h],u=1,w=m(s.maxStaggerLines,5),na=2===h?c.fontMetrics(s.style.fontSize).b:0;if(a.hasData=j=a.hasVisibleSeries||r(a.min)&&r(a.max)&&!!e,a.showAxis=b=j||m(d.showEmpty,!0),a.staggerLines=a.horiz&&s.staggerLines,a.axisGroup||(a.gridGroup=c.g("grid").attr({zIndex:d.gridZIndex||1}).add(),a.axisGroup=c.g("axis").attr({zIndex:d.zIndex||2}).add(),a.labelGroup=c.g("axis-labels").attr({zIndex:s.zIndex||7}).addClass("highcharts-"+a.coll.toLowerCase()+"-labels").add()),j||a.isLinked){if(a.labelAlign=m(s.align||a.autoLabelAlign(s.rotation)),p(e,function(b){f[b]?f[b].addLabel():f[b]=new Sa(a,b)
3
  }),a.horiz&&!a.staggerLines&&w&&!s.rotation){for(q=a.reversed?[].concat(e).reverse():e;w>u;){for(j=[],y=!1,s=0;s<q.length;s++)z=q[s],A=(A=f[z].label&&f[z].label.getBBox())?A.width:0,B=s%u,A&&(z=a.translate(z),j[B]!==t&&z<j[B]&&(y=!0),j[B]=z+A);if(!y)break;u++}u>1&&(a.staggerLines=u)}p(e,function(b){(0===h||2===h||{1:"left",3:"right"}[h]===a.labelAlign)&&($=v(f[b].getLabelSize(),$))}),a.staggerLines&&($*=a.staggerLines,a.labelOffset=$)}else for(q in f)f[q].destroy(),delete f[q];n&&n.text&&n.enabled!==!1&&(a.axisTitle||(a.axisTitle=c.text(n.text,0,0,n.useHTML).attr({zIndex:7,rotation:n.rotation||0,align:n.textAlign||{low:"left",middle:"center",high:"right"}[n.align]}).addClass("highcharts-"+this.coll.toLowerCase()+"-title").css(n.style).add(a.axisGroup),a.axisTitle.isNew=!0),b&&(k=a.axisTitle.getBBox()[g?"height":"width"],o=m(n.margin,g?5:10),l=n.offset),a.axisTitle[b?"show":"hide"]()),a.offset=x*m(d.offset,J[h]),a.axisTitleMargin=m(l,$+o+($&&x*d.labels[g?"y":"x"]-na)),J[h]=v(J[h],a.axisTitleMargin+k+x*a.offset),L[i]=v(L[i],2*T(d.lineWidth/2))},getLinePath:function(a){var b=this.chart,c=this.opposite,d=this.offset,e=this.horiz,f=this.left+(c?this.width:0)+d,d=b.chartHeight-this.bottom-(c?this.height:0)+d;return c&&(a*=-1),b.renderer.crispLine(["M",e?this.left:f,e?d:this.top,"L",e?b.chartWidth-this.right:f,e?d:b.chartHeight-this.bottom],a)},getTitlePosition:function(){var a=this.horiz,b=this.left,c=this.top,d=this.len,e=this.options.title,f=a?b:c,g=this.opposite,h=this.offset,i=z(e.style.fontSize||12),d={low:f+(a?0:d),middle:f+d/2,high:f+(a?d:0)}[e.align],b=(a?c+this.height:b)+(a?1:-1)*(g?-1:1)*this.axisTitleMargin+(2===this.side?i:0);return{x:a?d:b+(g?this.width:0)+h+(e.x||0),y:a?b-(g?this.height:0)+h:d+(e.y||0)}},render:function(){var j,u,z,a=this,b=a.horiz,c=a.reversed,d=a.chart,e=d.renderer,f=a.options,g=a.isLog,h=a.isLinked,i=a.tickPositions,k=a.axisTitle,l=a.ticks,o=a.minorTicks,n=a.alternateBands,s=f.stackLabels,m=f.alternateGridColor,J=a.tickmarkOffset,L=f.lineWidth,x=d.hasRendered&&r(a.oldMin)&&!isNaN(a.oldMin),q=a.hasData,v=a.showAxis,w=f.labels.overflow,y=a.justifyLabels=b&&w!==!1;a.labelEdge.length=0,a.justifyToPlot="justify"===w,p([l,o,n],function(a){for(var b in a)a[b].isActive=!1}),(q||h)&&(a.minorTickInterval&&!a.categories&&p(a.getMinorTickPositions(),function(b){o[b]||(o[b]=new Sa(a,b,"minor")),x&&o[b].isNew&&o[b].render(null,!0),o[b].render(null,!1,1)}),i.length&&(j=i.slice(),(b&&c||!b&&!c)&&j.reverse(),y&&(j=j.slice(1).concat([j[0]])),p(j,function(b,c){y&&(c=c===j.length-1?0:c+1),(!h||b>=a.min&&b<=a.max)&&(l[b]||(l[b]=new Sa(a,b)),x&&l[b].isNew&&l[b].render(c,!0,.1),l[b].render(c,!1,1))}),J&&0===a.min&&(l[-1]||(l[-1]=new Sa(a,-1,null,!0)),l[-1].render(-1))),m&&p(i,function(b,c){c%2===0&&b<a.max&&(n[b]||(n[b]=new R.PlotLineOrBand(a)),u=b+J,z=i[c+1]!==t?i[c+1]+J:a.max,n[b].options={from:g?ia(u):u,to:g?ia(z):z,color:m},n[b].render(),n[b].isActive=!0)}),a._addedPlotLB||(p((f.plotLines||[]).concat(f.plotBands||[]),function(b){a.addPlotBandOrLine(b)}),a._addedPlotLB=!0)),p([l,o,n],function(a){var b,c,e=[],f=va?va.duration||500:0,g=function(){for(c=e.length;c--;)a[e[c]]&&!a[e[c]].isActive&&(a[e[c]].destroy(),delete a[e[c]])};for(b in a)a[b].isActive||(a[b].render(b,!1,0),a[b].isActive=!1,e.push(b));a!==n&&d.hasRendered&&f?f&&setTimeout(g,f):g()}),L&&(b=a.getLinePath(L),a.axisLine?a.axisLine.animate({d:b}):a.axisLine=e.path(b).attr({stroke:f.lineColor,"stroke-width":L,zIndex:7}).add(a.axisGroup),a.axisLine[v?"show":"hide"]()),k&&v&&(k[k.isNew?"attr":"animate"](a.getTitlePosition()),k.isNew=!1),s&&s.enabled&&a.renderStackTotals(),a.isDirty=!1},redraw:function(){var a=this.chart.pointer;a&&a.reset(!0),this.render(),p(this.plotLinesAndBands,function(a){a.render()}),p(this.series,function(a){a.isDirty=!0})},destroy:function(a){var d,b=this,c=b.stacks,e=b.plotLinesAndBands;a||W(b);for(d in c)Oa(c[d]),c[d]=null;for(p([b.ticks,b.minorTicks,b.alternateBands],function(a){Oa(a)}),a=e.length;a--;)e[a].destroy();p("stackTotalGroup,axisLine,axisTitle,axisGroup,cross,gridGroup,labelGroup".split(","),function(a){b[a]&&(b[a]=b[a].destroy())}),this.cross&&this.cross.destroy()},drawCrosshair:function(a,b){if(this.crosshair)if((r(b)||!m(this.crosshair.snap,!0))===!1)this.hideCrosshair();else{var c,d=this.crosshair,e=d.animation;m(d.snap,!0)?r(b)&&(c=this.chart.inverted!=this.horiz?b.plotX:this.len-b.plotY):c=this.horiz?a.chartX-this.pos:this.len-a.chartY+this.pos,c=this.isRadial?this.getPlotLinePath(this.isXAxis?b.x:m(b.stackY,b.y)):this.getPlotLinePath(null,null,null,null,c),null===c?this.hideCrosshair():this.cross?this.cross.attr({visibility:"visible"})[e?"animate":"attr"]({d:c},e):(e={"stroke-width":d.width||1,stroke:d.color||"#C0C0C0",zIndex:d.zIndex||2},d.dashStyle&&(e.dashstyle=d.dashStyle),this.cross=this.chart.renderer.path(c).attr(e).add())}},hideCrosshair:function(){this.cross&&this.cross.hide()}},q(la.prototype,{getPlotBandPath:function(a,b){var c=this.getPlotLinePath(b),d=this.getPlotLinePath(a);return d&&c?d.push(c[4],c[5],c[1],c[2]):d=null,d},addPlotBand:function(a){this.addPlotBandOrLine(a,"plotBands")},addPlotLine:function(a){this.addPlotBandOrLine(a,"plotLines")},addPlotBandOrLine:function(a,b){var c=new R.PlotLineOrBand(this,a).render(),d=this.userOptions;return c&&(b&&(d[b]=d[b]||[],d[b].push(a)),this.plotLinesAndBands.push(c)),c},removePlotBandOrLine:function(a){for(var b=this.plotLinesAndBands,c=this.options,d=this.userOptions,e=b.length;e--;)b[e].id===a&&b[e].destroy();p([c.plotLines||[],d.plotLines||[],c.plotBands||[],d.plotBands||[]],function(b){for(e=b.length;e--;)b[e].id===a&&ja(b,b[e])})}}),la.prototype.getTimeTicks=function(a,b,c,d){var h,e=[],f={},g=E.global.useUTC,i=new Date(b-Ra),j=a.unitRange,k=a.count;if(r(b)){j>=A.second&&(i.setMilliseconds(0),i.setSeconds(j>=A.minute?0:k*T(i.getSeconds()/k))),j>=A.minute&&i[Db](j>=A.hour?0:k*T(i[pb]()/k)),j>=A.hour&&i[Eb](j>=A.day?0:k*T(i[qb]()/k)),j>=A.day&&i[sb](j>=A.month?1:k*T(i[Xa]()/k)),j>=A.month&&(i[Fb](j>=A.year?0:k*T(i[fb]()/k)),h=i[gb]()),j>=A.year&&(h-=h%k,i[Gb](h)),j===A.week&&i[sb](i[Xa]()-i[rb]()+m(d,1)),b=1,Ra&&(i=new Date(i.getTime()+Ra)),h=i[gb]();for(var d=i.getTime(),l=i[fb](),o=i[Xa](),n=g?Ra:(864e5+6e4*i.getTimezoneOffset())%864e5;c>d;)e.push(d),j===A.year?d=eb(h+b*k,0):j===A.month?d=eb(h,l+b*k):g||j!==A.day&&j!==A.week?d+=j*k:d=eb(h,l,o+b*k*(j===A.day?1:7)),b++;e.push(d),p(vb(e,function(a){return j<=A.hour&&a%A.day===n}),function(a){f[a]="day"})}return e.info=q(a,{higherRanks:f,totalRange:j*k}),e},la.prototype.normalizeTimeTickInterval=function(a,b){var g,c=b||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]],d=c[c.length-1],e=A[d[0]],f=d[1];for(g=0;g<c.length&&(d=c[g],e=A[d[0]],f=d[1],!(c[g+1]&&a<=(e*f[f.length-1]+A[c[g+1][0]])/2));g++);return e===A.year&&5*e>a&&(f=[1,2,5]),c=nb(a/e,f,"year"===d[0]?v(mb(a/e),1):1),{unitRange:e,count:c,unitName:d[0]}},la.prototype.getLogTickPositions=function(a,b,c,d){var e=this.options,f=this.len,g=[];if(d||(this._minorAutoInterval=null),a>=.5)a=u(a),g=this.getLinearTickPositions(a,b,c);else if(a>=.08)for(var h,i,j,k,l,f=T(b),e=a>.3?[1,2,4]:a>.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];c+1>f&&!l;f++)for(i=e.length,h=0;i>h&&!l;h++)j=za(ia(f)*e[h]),j>b&&(!d||c>=k)&&g.push(k),k>c&&(l=!0),k=j;else b=ia(b),c=ia(c),a=e[d?"minorTickInterval":"tickInterval"],a=m("auto"===a?null:a,this._minorAutoInterval,(c-b)*(e.tickPixelInterval/(d?5:1))/((d?f/this.tickPositions.length:f)||1)),a=nb(a,null,mb(a)),g=Ua(this.getLinearTickPositions(a,b,c),za),d||(this._minorAutoInterval=a/5);return d||(this.tickInterval=a),g};var Mb=R.Tooltip=function(){this.init.apply(this,arguments)};Mb.prototype={init:function(a,b){var c=b.borderWidth,d=b.style,e=z(d.padding);this.chart=a,this.options=b,this.crosshairs=[],this.now={x:0,y:0},this.isHidden=!0,this.label=a.renderer.label("",0,0,b.shape||"callout",null,null,b.useHTML,null,"tooltip").attr({padding:e,fill:b.backgroundColor,"stroke-width":c,r:b.borderRadius,zIndex:8}).css(d).css({padding:0}).add().attr({y:-9999}),fa||this.label.shadow(b.shadow),this.shared=b.shared},destroy:function(){this.label&&(this.label=this.label.destroy()),clearTimeout(this.hideTimer),clearTimeout(this.tooltipTimeout)},move:function(a,b,c,d){var e=this,f=e.now,g=e.options.animation!==!1&&!e.isHidden,h=e.followPointer||e.len>1;q(f,{x:g?(2*f.x+a)/3:a,y:g?(f.y+b)/2:b,anchorX:h?t:g?(2*f.anchorX+c)/3:c,anchorY:h?t:g?(f.anchorY+d)/2:d}),e.label.attr(f),g&&(M(a-f.x)>1||M(b-f.y)>1)&&(clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){e&&e.move(a,b,c,d)},32))},hide:function(){var b,a=this;clearTimeout(this.hideTimer),this.isHidden||(b=this.chart.hoverPoints,this.hideTimer=setTimeout(function(){a.label.fadeOut(),a.isHidden=!0},m(this.options.hideDelay,500)),b&&p(b,function(a){a.setState()}),this.chart.hoverPoints=null)},getAnchor:function(a,b){var c,i,d=this.chart,e=d.inverted,f=d.plotTop,g=0,h=0,a=qa(a);return c=a[0].tooltipPos,this.followPointer&&b&&(b.chartX===t&&(b=d.pointer.normalize(b)),c=[b.chartX-d.plotLeft,b.chartY-f]),c||(p(a,function(a){i=a.series.yAxis,g+=a.plotX,h+=(a.plotLow?(a.plotLow+a.plotHigh)/2:a.plotY)+(!e&&i?i.top-f:0)}),g/=a.length,h/=a.length,c=[e?d.plotWidth-h:g,this.shared&&!e&&a.length>1&&b?b.chartY-f:e?d.plotHeight-g:h]),Ua(c,u)},getPosition:function(a,b,c){var g,d=this.chart,e=this.distance,f={},h=["y",d.chartHeight,b,c.plotY+d.plotTop],i=["x",d.chartWidth,a,c.plotX+d.plotLeft],j=c.ttBelow||d.inverted&&!c.negative||!d.inverted&&c.negative,k=function(a,b,c,d){var g=d-e>c,b=b>d+e+c,c=d-e-c;if(d+=e,j&&b)f[a]=d;else if(!j&&g)f[a]=c;else if(g)f[a]=c;else{if(!b)return!1;f[a]=d}},l=function(a,b,c,d){return e>d||d>b-e?!1:void(f[a]=c/2>d?1:d>b-c/2?b-c-2:d-c/2)},o=function(a){var b=h;h=i,i=b,g=a},n=function(){k.apply(0,h)!==!1?l.apply(0,i)===!1&&!g&&(o(!0),n()):g?f.x=f.y=0:(o(!0),n())};return(d.inverted||this.len>1)&&o(),n(),f},defaultFormatter:function(a){var d,b=this.points||qa(this),c=b[0].series;return d=[a.tooltipHeaderFormatter(b[0])],p(b,function(a){c=a.series,d.push(c.tooltipFormatter&&c.tooltipFormatter(a)||a.point.tooltipFormatter(c.tooltipOptions.pointFormat))}),d.push(a.options.footerFormat||""),d.join("")},refresh:function(a,b){var f,g,i,c=this.chart,d=this.label,e=this.options,h={},j=[];i=e.formatter||this.defaultFormatter;var k,h=c.hoverPoints,l=this.shared;clearTimeout(this.hideTimer),this.followPointer=qa(a)[0].series.tooltipOptions.followPointer,g=this.getAnchor(a,b),f=g[0],g=g[1],!l||a.series&&a.series.noSharedTooltip?h=a.getLabelConfig():(c.hoverPoints=a,h&&p(h,function(a){a.setState()}),p(a,function(a){a.setState("hover"),j.push(a.getLabelConfig())}),h={x:a[0].category,y:a[0].y},h.points=j,this.len=j.length,a=a[0]),i=i.call(h,this),h=a.series,this.distance=m(h.tooltipOptions.distance,16),i===!1?this.hide():(this.isHidden&&(bb(d),d.attr("opacity",1).show()),d.attr({text:i}),k=e.borderColor||a.color||h.color||"#606060",d.attr({stroke:k}),this.updatePosition({plotX:f,plotY:g,negative:a.negative,ttBelow:a.ttBelow}),this.isHidden=!1),D(c,"tooltipRefresh",{text:i,x:f+c.plotLeft,y:g+c.plotTop,borderColor:k})},updatePosition:function(a){var b=this.chart,c=this.label,c=(this.options.positioner||this.getPosition).call(this,c.width,c.height,a);this.move(u(c.x),u(c.y),a.plotX+b.plotLeft,a.plotY+b.plotTop)},tooltipHeaderFormatter:function(a){var h,b=a.series,c=b.tooltipOptions,d=c.dateTimeLabelFormats,e=c.xDateFormat,f=b.xAxis,g=f&&"datetime"===f.options.type&&ha(a.key),c=c.headerFormat,f=f&&f.closestPointRange;if(g&&!e){if(f){for(h in A)if(A[h]>=f||A[h]<=A.day&&a.key%A[h]>0){e=d[h];break}}else e=d.day;e=e||d.year}return g&&e&&(c=c.replace("{point.key}","{point.key:"+e+"}")),Ia(c,{point:a,series:b})}};var oa;$a=y.documentElement.ontouchstart!==t;var Wa=R.Pointer=function(a,b){this.init(a,b)};if(Wa.prototype={init:function(a,b){var f,c=b.chart,d=c.events,e=fa?"":c.zoomType,c=a.inverted;this.options=b,this.chart=a,this.zoomX=f=/x/.test(e),this.zoomY=e=/y/.test(e),this.zoomHor=f&&!c||e&&c,this.zoomVert=e&&!c||f&&c,this.hasZoom=f||e,this.runChartClick=d&&!!d.click,this.pinchDown=[],this.lastValidTouch={},R.Tooltip&&b.tooltip.enabled&&(a.tooltip=new Mb(a,b.tooltip),this.followTouchMove=b.tooltip.followTouchMove),this.setDOMEvents()},normalize:function(a,b){var c,d,a=a||window.event,a=Sb(a);return a.target||(a.target=a.srcElement),d=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]:a,b||(this.chartPosition=b=Rb(this.chart.container)),d.pageX===t?(c=v(a.x,a.clientX-b.left),d=a.y):(c=d.pageX-b.left,d=d.pageY-b.top),q(a,{chartX:u(c),chartY:u(d)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};return p(this.chart.axes,function(c){b[c.isXAxis?"xAxis":"yAxis"].push({axis:c,value:c.toValue(a[c.horiz?"chartX":"chartY"])})}),b},getIndex:function(a){var b=this.chart;return b.inverted?b.plotHeight+b.plotTop-a.chartY:a.chartX-b.plotLeft},runPointActions:function(a){var e,f,i,j,b=this.chart,c=b.series,d=b.tooltip,g=b.hoverPoint,h=b.hoverSeries,k=b.chartWidth,l=this.getIndex(a);if(d&&this.options.tooltip.shared&&(!h||!h.noSharedTooltip)){for(f=[],i=c.length,j=0;i>j;j++)c[j].visible&&c[j].options.enableMouseTracking!==!1&&!c[j].noSharedTooltip&&c[j].singularTooltips!==!0&&c[j].tooltipPoints.length&&(e=c[j].tooltipPoints[l])&&e.series&&(e._dist=M(l-e.clientX),k=C(k,e._dist),f.push(e));for(i=f.length;i--;)f[i]._dist>k&&f.splice(i,1);f.length&&f[0].clientX!==this.hoverX&&(d.refresh(f,a),this.hoverX=f[0].clientX)}c=h&&h.tooltipOptions.followPointer,h&&h.tracker&&!c?(e=h.tooltipPoints[l])&&e!==g&&e.onMouseOver(a):d&&c&&!d.isHidden&&(h=d.getAnchor([{}],a),d.updatePosition({plotX:h[0],plotY:h[1]})),d&&!this._onDocumentMouseMove&&(this._onDocumentMouseMove=function(a){V[oa]&&V[oa].pointer.onDocumentMouseMove(a)},K(y,"mousemove",this._onDocumentMouseMove)),p(b.axes,function(b){b.drawCrosshair(a,m(e,g))})},reset:function(a){var b=this.chart,c=b.hoverSeries,d=b.hoverPoint,e=b.tooltip,f=e&&e.shared?b.hoverPoints:d;(a=a&&e&&f)&&qa(f)[0].plotX===t&&(a=!1),a?(e.refresh(f),d&&d.setState(d.state,!0)):(d&&d.onMouseOut(),c&&c.onMouseOut(),e&&e.hide(),this._onDocumentMouseMove&&(W(y,"mousemove",this._onDocumentMouseMove),this._onDocumentMouseMove=null),p(b.axes,function(a){a.hideCrosshair()}),this.hoverX=null)},scaleGroups:function(a,b){var d,c=this.chart;p(c.series,function(e){d=a||e.getPlotBox(),e.xAxis&&e.xAxis.zoomEnabled&&(e.group.attr(d),e.markerGroup&&(e.markerGroup.attr(d),e.markerGroup.clip(b?c.clipRect:null)),e.dataLabelsGroup&&e.dataLabelsGroup.attr(d))}),c.clipRect.attr(b||c.clipBox)},dragStart:function(a){var b=this.chart;b.mouseIsDown=a.type,b.cancelClick=!1,b.mouseDownX=this.mouseDownX=a.chartX,b.mouseDownY=this.mouseDownY=a.chartY},drag:function(a){var l,b=this.chart,c=b.options.chart,d=a.chartX,e=a.chartY,f=this.zoomHor,g=this.zoomVert,h=b.plotLeft,i=b.plotTop,j=b.plotWidth,k=b.plotHeight,o=this.mouseDownX,n=this.mouseDownY;h>d?d=h:d>h+j&&(d=h+j),i>e?e=i:e>i+k&&(e=i+k),this.hasDragged=Math.sqrt(Math.pow(o-d,2)+Math.pow(n-e,2)),this.hasDragged>10&&(l=b.isInsidePlot(o-h,n-i),b.hasCartesianSeries&&(this.zoomX||this.zoomY)&&l&&!this.selectionMarker&&(this.selectionMarker=b.renderer.rect(h,i,f?1:j,g?1:k,0).attr({fill:c.selectionMarkerFill||"rgba(69,114,167,0.25)",zIndex:7}).add()),this.selectionMarker&&f&&(d-=o,this.selectionMarker.attr({width:M(d),x:(d>0?0:d)+o})),this.selectionMarker&&g&&(d=e-n,this.selectionMarker.attr({height:M(d),y:(d>0?0:d)+n})),l&&!this.selectionMarker&&c.panning&&b.pan(a,c.panning))},drop:function(a){var b=this.chart,c=this.hasPinched;if(this.selectionMarker){var i,d={xAxis:[],yAxis:[],originalEvent:a.originalEvent||a},a=this.selectionMarker,e=a.attr?a.attr("x"):a.x,f=a.attr?a.attr("y"):a.y,g=a.attr?a.attr("width"):a.width,h=a.attr?a.attr("height"):a.height;(this.hasDragged||c)&&(p(b.axes,function(a){if(a.zoomEnabled){var b=a.horiz,c=a.toValue(b?e:f),b=a.toValue(b?e+g:f+h);!isNaN(c)&&!isNaN(b)&&(d[a.coll].push({axis:a,min:C(c,b),max:v(c,b)}),i=!0)}}),i&&D(b,"selection",d,function(a){b.zoom(q(a,c?{animation:!1}:null))})),this.selectionMarker=this.selectionMarker.destroy(),c&&this.scaleGroups()}b&&(G(b.container,{cursor:b._cursor}),b.cancelClick=this.hasDragged>10,b.mouseIsDown=this.hasDragged=this.hasPinched=!1,this.pinchDown=[])},onContainerMouseDown:function(a){a=this.normalize(a),a.preventDefault&&a.preventDefault(),this.dragStart(a)},onDocumentMouseUp:function(a){V[oa]&&V[oa].pointer.drop(a)},onDocumentMouseMove:function(a){var b=this.chart,c=this.chartPosition,d=b.hoverSeries,a=this.normalize(a,c);c&&d&&!this.inClass(a.target,"highcharts-tracker")&&!b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)&&this.reset()},onContainerMouseLeave:function(){var a=V[oa];a&&(a.pointer.reset(),a.pointer.chartPosition=null)},onContainerMouseMove:function(a){var b=this.chart;oa=b.index,a=this.normalize(a),"mousedown"===b.mouseIsDown&&this.drag(a),(this.inClass(a.target,"highcharts-tracker")||b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop))&&!b.openMenu&&this.runPointActions(a)},inClass:function(a,b){for(var c;a;){if(c=H(a,"class")){if(-1!==c.indexOf(b))return!0;if(-1!==c.indexOf("highcharts-container"))return!1}a=a.parentNode}},onTrackerMouseOut:function(a){var b=this.chart.hoverSeries,c=(a=a.relatedTarget||a.toElement)&&a.point&&a.point.series;!b||b.options.stickyTracking||this.inClass(a,"highcharts-tooltip")||c===b||b.onMouseOut()},onContainerClick:function(a){var b=this.chart,c=b.hoverPoint,d=b.plotLeft,e=b.plotTop,a=this.normalize(a);a.cancelBubble=!0,b.cancelClick||(c&&this.inClass(a.target,"highcharts-tracker")?(D(c.series,"click",q(a,{point:c})),b.hoverPoint&&c.firePointEvent("click",a)):(q(a,this.getCoordinates(a)),b.isInsidePlot(a.chartX-d,a.chartY-e)&&D(b,"click",a)))},setDOMEvents:function(){var a=this,b=a.chart.container;b.onmousedown=function(b){a.onContainerMouseDown(b)},b.onmousemove=function(b){a.onContainerMouseMove(b)},b.onclick=function(b){a.onContainerClick(b)},K(b,"mouseleave",a.onContainerMouseLeave),1===ab&&K(y,"mouseup",a.onDocumentMouseUp),$a&&(b.ontouchstart=function(b){a.onContainerTouchStart(b)},b.ontouchmove=function(b){a.onContainerTouchMove(b)},1===ab&&K(y,"touchend",a.onDocumentTouchEnd))},destroy:function(){var a;W(this.chart.container,"mouseleave",this.onContainerMouseLeave),ab||(W(y,"mouseup",this.onDocumentMouseUp),W(y,"touchend",this.onDocumentTouchEnd)),clearInterval(this.tooltipTimeout);for(a in this)this[a]=null}},q(R.Pointer.prototype,{pinchTranslate:function(a,b,c,d,e,f){(this.zoomHor||this.pinchHor)&&this.pinchTranslateDirection(!0,a,b,c,d,e,f),(this.zoomVert||this.pinchVert)&&this.pinchTranslateDirection(!1,a,b,c,d,e,f)},pinchTranslateDirection:function(a,b,c,d,e,f,g,h){var s,m,y,i=this.chart,j=a?"x":"y",k=a?"X":"Y",l="chart"+k,o=a?"width":"height",n=i["plot"+(a?"Left":"Top")],p=h||1,q=i.inverted,x=i.bounds[a?"h":"v"],r=1===b.length,v=b[0][l],u=c[0][l],t=!r&&b[1][l],w=!r&&c[1][l],c=function(){!r&&M(v-t)>20&&(p=h||M(u-w)/M(v-t)),m=(n-u)/p+v,s=i["plot"+(a?"Width":"Height")]/p};c(),b=m,b<x.min?(b=x.min,y=!0):b+s>x.max&&(b=x.max-s,y=!0),y?(u-=.8*(u-g[j][0]),r||(w-=.8*(w-g[j][1])),c()):g[j]=[u,w],q||(f[j]=m-n,f[o]=s),f=q?1/p:p,e[o]=s,e[j]=b,d[q?a?"scaleY":"scaleX":"scale"+k]=p,d["translate"+k]=f*n+(u-f*v)},pinch:function(a){var b=this,c=b.chart,d=b.pinchDown,e=b.followTouchMove,f=a.touches,g=f.length,h=b.lastValidTouch,i=b.hasZoom,j=b.selectionMarker,k={},l=1===g&&(b.inClass(a.target,"highcharts-tracker")&&c.runTrackerClick||c.runChartClick),o={};(i||e)&&!l&&a.preventDefault(),Ua(f,function(a){return b.normalize(a)}),"touchstart"===a.type?(p(f,function(a,b){d[b]={chartX:a.chartX,chartY:a.chartY}}),h.x=[d[0].chartX,d[1]&&d[1].chartX],h.y=[d[0].chartY,d[1]&&d[1].chartY],p(c.axes,function(a){if(a.zoomEnabled){var b=c.bounds[a.horiz?"h":"v"],d=a.minPixelPadding,e=a.toPixels(a.dataMin),f=a.toPixels(a.dataMax),g=C(e,f),e=v(e,f);b.min=C(a.pos,g-d),b.max=v(a.pos+a.len,e+d)}})):d.length&&(j||(b.selectionMarker=j=q({destroy:sa},c.plotBox)),b.pinchTranslate(d,f,k,j,o,h),b.hasPinched=i,b.scaleGroups(k,o),!i&&e&&1===g&&this.runPointActions(b.normalize(a)))},onContainerTouchStart:function(a){var b=this.chart;oa=b.index,1===a.touches.length?(a=this.normalize(a),b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)?(this.runPointActions(a),this.pinch(a)):this.reset()):2===a.touches.length&&this.pinch(a)},onContainerTouchMove:function(a){(1===a.touches.length||2===a.touches.length)&&this.pinch(a)},onDocumentTouchEnd:function(a){V[oa]&&V[oa].pointer.drop(a)}}),I.PointerEvent||I.MSPointerEvent){var ua={},zb=!!I.PointerEvent,Wb=function(){var a,b=[];b.item=function(a){return this[a]};for(a in ua)ua.hasOwnProperty(a)&&b.push({pageX:ua[a].pageX,pageY:ua[a].pageY,target:ua[a].target});return b},Ab=function(a,b,c,d){a=a.originalEvent||a,"touch"!==a.pointerType&&a.pointerType!==a.MSPOINTER_TYPE_TOUCH||!V[oa]||(d(a),d=V[oa].pointer,d[b]({type:c,target:a.currentTarget,preventDefault:sa,touches:Wb()}))};q(Wa.prototype,{onContainerPointerDown:function(a){Ab(a,"onContainerTouchStart","touchstart",function(a){ua[a.pointerId]={pageX:a.pageX,pageY:a.pageY,target:a.currentTarget}})},onContainerPointerMove:function(a){Ab(a,"onContainerTouchMove","touchmove",function(a){ua[a.pointerId]={pageX:a.pageX,pageY:a.pageY},ua[a.pointerId].target||(ua[a.pointerId].target=a.currentTarget)})},onDocumentPointerUp:function(a){Ab(a,"onContainerTouchEnd","touchend",function(a){delete ua[a.pointerId]})},batchMSEvents:function(a){a(this.chart.container,zb?"pointerdown":"MSPointerDown",this.onContainerPointerDown),a(this.chart.container,zb?"pointermove":"MSPointerMove",this.onContainerPointerMove),a(y,zb?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}}),Ma(Wa.prototype,"init",function(a,b,c){a.call(this,b,c),(this.hasZoom||this.followTouchMove)&&G(b.container,{"-ms-touch-action":Q,"touch-action":Q})}),Ma(Wa.prototype,"setDOMEvents",function(a){a.apply(this),(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(K)}),Ma(Wa.prototype,"destroy",function(a){this.batchMSEvents(W),a.call(this)})}var lb=R.Legend=function(a,b){this.init(a,b)};lb.prototype={init:function(a,b){var c=this,d=b.itemStyle,e=m(b.padding,8),f=b.itemMarginTop||0;this.options=b,b.enabled&&(c.baseline=z(d.fontSize)+3+f,c.itemStyle=d,c.itemHiddenStyle=w(d,b.itemHiddenStyle),c.itemMarginTop=f,c.padding=e,c.initialItemX=e,c.initialItemY=e-5,c.maxItemWidth=0,c.chart=a,c.itemHeight=0,c.lastLineHeight=0,c.symbolWidth=m(b.symbolWidth,16),c.pages=[],c.render(),K(c.chart,"endResize",function(){c.positionCheckboxes()}))},colorizeItem:function(a,b){var j,c=this.options,d=a.legendItem,e=a.legendLine,f=a.legendSymbol,g=this.itemHiddenStyle.color,c=b?c.itemStyle.color:g,h=b?a.legendColor||a.color||"#CCC":g,g=a.options&&a.options.marker,i={fill:h};if(d&&d.css({fill:c,color:c}),e&&e.attr({stroke:h}),f){if(g&&f.isMarker)for(j in i.stroke=h,g=a.convertAttribs(g))d=g[j],d!==t&&(i[j]=d);f.attr(i)}},positionItem:function(a){var b=this.options,c=b.symbolPadding,b=!b.rtl,d=a._legendItemPos,e=d[0],d=d[1],f=a.checkbox;a.legendGroup&&a.legendGroup.translate(b?e:this.legendWidth-e-2*c-4,d),f&&(f.x=e,f.y=d)},destroyItem:function(a){var b=a.checkbox;p(["legendItem","legendLine","legendSymbol","legendGroup"],function(b){a[b]&&(a[b]=a[b].destroy())}),b&&Pa(a.checkbox)},destroy:function(){var a=this.group,b=this.box;b&&(this.box=b.destroy()),a&&(this.group=a.destroy())},positionCheckboxes:function(a){var c,b=this.group.alignAttr,d=this.clipHeight||this.legendHeight;b&&(c=b.translateY,p(this.allItems,function(e){var g,f=e.checkbox;f&&(g=c+f.y+(a||0)+3,G(f,{left:b.translateX+e.checkboxOffset+f.x-20+"px",top:g+"px",display:g>c-6&&c+d-6>g?"":Q}))}))},renderTitle:function(){var a=this.padding,b=this.options.title,c=0;b.text&&(this.title||(this.title=this.chart.renderer.label(b.text,a-3,a-4,null,null,null,null,null,"legend-title").attr({zIndex:1}).css(b.style).add(this.group)),a=this.title.getBBox(),c=a.height,this.offsetWidth=a.width,this.contentGroup.attr({translateY:c})),this.titleHeight=c},renderItem:function(a){var b=this.chart,c=b.renderer,d=this.options,e="horizontal"===d.layout,f=this.symbolWidth,g=d.symbolPadding,h=this.itemStyle,i=this.itemHiddenStyle,j=this.padding,k=e?m(d.itemDistance,20):0,l=!d.rtl,o=d.width,n=d.itemMarginBottom||0,s=this.itemMarginTop,p=this.initialItemX,q=a.legendItem,r=a.series&&a.series.drawLegendSymbol?a.series:a,x=r.options,x=this.createCheckboxForItem&&x&&x.showCheckbox,t=d.useHTML;q||(a.legendGroup=c.g("legend-item").attr({zIndex:1}).add(this.scrollGroup),r.drawLegendSymbol(this,a),a.legendItem=q=c.text(d.labelFormat?Ia(d.labelFormat,a):d.labelFormatter.call(a),l?f+g:-g,this.baseline,t).css(w(a.visible?h:i)).attr({align:l?"left":"right",zIndex:2}).add(a.legendGroup),this.setItemEvents&&this.setItemEvents(a,q,t,h,i),this.colorizeItem(a,a.visible),x&&this.createCheckboxForItem(a)),c=q.getBBox(),f=a.checkboxOffset=d.itemWidth||a.legendItemWidth||f+g+c.width+k+(x?20:0),this.itemHeight=g=u(a.legendItemHeight||c.height),e&&this.itemX-p+f>(o||b.chartWidth-2*j-p-d.x)&&(this.itemX=p,this.itemY+=s+this.lastLineHeight+n,this.lastLineHeight=0),this.maxItemWidth=v(this.maxItemWidth,f),this.lastItemY=s+this.itemY+n,this.lastLineHeight=v(g,this.lastLineHeight),a._legendItemPos=[this.itemX,this.itemY],e?this.itemX+=f:(this.itemY+=s+g+n,this.lastLineHeight=g),this.offsetWidth=o||v((e?this.itemX-p-k:f)+j,this.offsetWidth)},getAllItems:function(){var a=[];return p(this.chart.series,function(b){var c=b.options;m(c.showInLegend,r(c.linkedTo)?!1:t,!0)&&(a=a.concat(b.legendItems||("point"===c.legendType?b.data:b)))}),a},render:function(){var e,f,g,h,a=this,b=a.chart,c=b.renderer,d=a.group,i=a.box,j=a.options,k=a.padding,l=j.borderWidth,o=j.backgroundColor;a.itemX=a.initialItemX,a.itemY=a.initialItemY,a.offsetWidth=0,a.lastItemY=0,d||(a.group=d=c.g("legend").attr({zIndex:7}).add(),a.contentGroup=c.g().attr({zIndex:1}).add(d),a.scrollGroup=c.g().add(a.contentGroup)),a.renderTitle(),e=a.getAllItems(),ob(e,function(a,b){return(a.options&&a.options.legendIndex||0)-(b.options&&b.options.legendIndex||0)}),j.reversed&&e.reverse(),a.allItems=e,a.display=f=!!e.length,p(e,function(b){a.renderItem(b)}),g=j.width||a.offsetWidth,h=a.lastItemY+a.lastLineHeight+a.titleHeight,h=a.handleOverflow(h),(l||o)&&(g+=k,h+=k,i?g>0&&h>0&&(i[i.isNew?"attr":"animate"](i.crisp({width:g,height:h})),i.isNew=!1):(a.box=i=c.rect(0,0,g,h,j.borderRadius,l||0).attr({stroke:j.borderColor,"stroke-width":l||0,fill:o||Q}).add(d).shadow(j.shadow),i.isNew=!0),i[f?"show":"hide"]()),a.legendWidth=g,a.legendHeight=h,p(e,function(b){a.positionItem(b)}),f&&d.align(q({width:g,height:h},j),!0,"spacingBox"),b.isResizing||this.positionCheckboxes()},handleOverflow:function(a){var h,s,b=this,c=this.chart,d=c.renderer,e=this.options,f=e.y,f=c.spacingBox.height+("top"===e.verticalAlign?-f:f)-this.padding,g=e.maxHeight,i=this.clipRect,j=e.navigation,k=m(j.animation,!0),l=j.arrowSize||12,o=this.nav,n=this.pages,q=this.allItems;return"horizontal"===e.layout&&(f/=2),g&&(f=C(f,g)),n.length=0,a>f&&!e.useHTML?(this.clipHeight=h=f-20-this.titleHeight-this.padding,this.currentPage=m(this.currentPage,1),this.fullHeight=a,p(q,function(a,b){var c=a._legendItemPos[1],d=u(a.legendItem.getBBox().height),e=n.length;(!e||c-n[e-1]>h&&(s||c)!==n[e-1])&&(n.push(s||c),e++),b===q.length-1&&c+d-n[e-1]>h&&n.push(c),c!==s&&(s=c)}),i||(i=b.clipRect=d.clipRect(0,this.padding,9999,0),b.contentGroup.clip(i)),i.attr({height:h}),o||(this.nav=o=d.g().attr({zIndex:1}).add(this.group),this.up=d.symbol("triangle",0,0,l,l).on("click",function(){b.scroll(-1,k)}).add(o),this.pager=d.text("",15,10).css(j.style).add(o),this.down=d.symbol("triangle-down",0,0,l,l).on("click",function(){b.scroll(1,k)}).add(o)),b.scroll(0),a=f):o&&(i.attr({height:c.chartHeight}),o.hide(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),a},scroll:function(a,b){var c=this.pages,d=c.length,e=this.currentPage+a,f=this.clipHeight,g=this.options.navigation,h=g.activeColor,g=g.inactiveColor,i=this.pager,j=this.padding;e>d&&(e=d),e>0&&(b!==t&&Qa(b,this.chart),this.nav.attr({translateX:j,translateY:f+this.padding+7+this.titleHeight,visibility:"visible"}),this.up.attr({fill:1===e?g:h}).css({cursor:1===e?"default":"pointer"}),i.attr({text:e+"/"+d}),this.down.attr({x:18+this.pager.getBBox().width,fill:e===d?g:h}).css({cursor:e===d?"default":"pointer"}),c=-c[e-1]+this.initialItemY,this.scrollGroup.animate({translateY:c}),this.currentPage=e,this.positionCheckboxes(c))}},N=R.LegendSymbolMixin={drawRectangle:function(a,b){var c=a.options.symbolHeight||12;b.legendSymbol=this.chart.renderer.rect(0,a.baseline-5-c/2,a.symbolWidth,c,a.options.symbolRadius||0).attr({zIndex:3}).add(b.legendGroup)},drawLineMarker:function(a){var d,b=this.options,c=b.marker;d=a.symbolWidth;var g,e=this.chart.renderer,f=this.legendGroup,a=a.baseline-u(.3*e.fontMetrics(a.options.itemStyle.fontSize).b);b.lineWidth&&(g={"stroke-width":b.lineWidth},b.dashStyle&&(g.dashstyle=b.dashStyle),this.legendLine=e.path(["M",0,a,"L",d,a]).attr(g).add(f)),c&&c.enabled!==!1&&(b=c.radius,this.legendSymbol=d=e.symbol(this.symbol,d/2-b,a-b,2*b,2*b).add(f),d.isMarker=!0)}},(/Trident\/7\.0/.test(wa)||Ta)&&Ma(lb.prototype,"positionItem",function(a,b){var c=this,d=function(){b._legendItemPos&&a.call(c,b)};d(),setTimeout(d)}),Ya.prototype={init:function(a,b){var c,d=a.series;a.series=null,c=w(E,a),c.series=a.series=d,this.userOptions=a,d=c.chart,this.margin=this.splashArray("margin",d),this.spacing=this.splashArray("spacing",d);var e=d.events;this.bounds={h:{},v:{}},this.callback=b,this.isResizing=0,this.options=c,this.axes=[],this.series=[],this.hasCartesianSeries=d.showAxes;var g,f=this;if(f.index=V.length,V.push(f),ab++,d.reflow!==!1&&K(f,"load",function(){f.initReflow()}),e)for(g in e)K(f,g,e[g]);f.xAxis=[],f.yAxis=[],f.animation=fa?!1:m(d.animation,!0),f.pointCount=0,f.counters=new Bb,f.firstRender()},initSeries:function(a){var b=this.options.chart;return(b=F[a.type||b.type||b.defaultSeriesType])||ra(17,!0),b=new b,b.init(this,a),b},isInsidePlot:function(a,b,c){var d=c?b:a,a=c?a:b;return d>=0&&d<=this.plotWidth&&a>=0&&a<=this.plotHeight},adjustTickAmounts:function(){this.options.chart.alignTicks!==!1&&p(this.axes,function(a){a.adjustTickAmount()}),this.maxTicks=null},redraw:function(a){var g,h,b=this.axes,c=this.series,d=this.pointer,e=this.legend,f=this.isDirtyLegend,i=this.isDirtyBox,j=c.length,k=j,l=this.renderer,o=l.isHidden(),n=[];for(Qa(a,this),o&&this.cloneRenderTo(),this.layOutTitles();k--;)if(a=c[k],a.options.stacking&&(g=!0,a.isDirty)){h=!0;break}if(h)for(k=j;k--;)a=c[k],a.options.stacking&&(a.isDirty=!0);p(c,function(a){a.isDirty&&"point"===a.options.legendType&&(f=!0)}),f&&e.options.enabled&&(e.render(),this.isDirtyLegend=!1),g&&this.getStacks(),this.hasCartesianSeries&&(this.isResizing||(this.maxTicks=null,p(b,function(a){a.setScale()})),this.adjustTickAmounts(),this.getMargins(),p(b,function(a){a.isDirty&&(i=!0)}),p(b,function(a){a.isDirtyExtremes&&(a.isDirtyExtremes=!1,n.push(function(){D(a,"afterSetExtremes",q(a.eventArgs,a.getExtremes())),delete a.eventArgs})),(i||g)&&a.redraw()})),i&&this.drawChartBox(),p(c,function(a){a.isDirty&&a.visible&&(!a.isCartesian||a.xAxis)&&a.redraw()}),d&&d.reset(!0),l.draw(),D(this,"redraw"),o&&this.cloneRenderTo(!0),p(n,function(a){a.call()})},get:function(a){var d,e,b=this.axes,c=this.series;for(d=0;d<b.length;d++)if(b[d].options.id===a)return b[d];for(d=0;d<c.length;d++)if(c[d].options.id===a)return c[d];for(d=0;d<c.length;d++)for(e=c[d].points||[],b=0;b<e.length;b++)if(e[b].id===a)return e[b];return null},getAxes:function(){var a=this,b=this.options,c=b.xAxis=qa(b.xAxis||{}),b=b.yAxis=qa(b.yAxis||{});p(c,function(a,b){a.index=b,a.isX=!0}),p(b,function(a,b){a.index=b}),c=c.concat(b),p(c,function(b){new la(a,b)}),a.adjustTickAmounts()},getSelectedPoints:function(){var a=[];return p(this.series,function(b){a=a.concat(vb(b.points||[],function(a){return a.selected}))
4
  }),a},getSelectedSeries:function(){return vb(this.series,function(a){return a.selected})},getStacks:function(){var a=this;p(a.yAxis,function(a){a.stacks&&a.hasVisibleSeries&&(a.oldStacks=a.stacks)}),p(a.series,function(b){!b.options.stacking||b.visible!==!0&&a.options.chart.ignoreHiddenSeries!==!1||(b.stackKey=b.type+m(b.options.stack,""))})},setTitle:function(a,b,c){var g,f,d=this,e=d.options;f=e.title=w(e.title,a),g=e.subtitle=w(e.subtitle,b),e=g,p([["title",a,f],["subtitle",b,e]],function(a){var b=a[0],c=d[b],e=a[1],a=a[2];c&&e&&(d[b]=c=c.destroy()),a&&a.text&&!c&&(d[b]=d.renderer.text(a.text,0,0,a.useHTML).attr({align:a.align,"class":"highcharts-"+b,zIndex:a.zIndex||4}).css(a.style).add())}),d.layOutTitles(c)},layOutTitles:function(a){var b=0,c=this.title,d=this.subtitle,e=this.options,f=e.title,e=e.subtitle,g=this.spacingBox.width-44;!c||(c.css({width:(f.width||g)+"px"}).align(q({y:15},f),!1,"spacingBox"),f.floating||f.verticalAlign)||(b=c.getBBox().height),d&&(d.css({width:(e.width||g)+"px"}).align(q({y:b+f.margin},e),!1,"spacingBox"),!e.floating&&!e.verticalAlign&&(b=Ka(b+d.getBBox().height))),c=this.titleOffset!==b,this.titleOffset=b,!this.isDirtyBox&&c&&(this.isDirtyBox=c,this.hasRendered&&m(a,!0)&&this.isDirtyBox&&this.redraw())},getChartSize:function(){var a=this.options.chart,b=a.width,a=a.height,c=this.renderToClone||this.renderTo;r(b)||(this.containerWidth=jb(c,"width")),r(a)||(this.containerHeight=jb(c,"height")),this.chartWidth=v(0,b||this.containerWidth||600),this.chartHeight=v(0,m(a,this.containerHeight>19?this.containerHeight:400))},cloneRenderTo:function(a){var b=this.renderToClone,c=this.container;a?b&&(this.renderTo.appendChild(c),Pa(b),delete this.renderToClone):(c&&c.parentNode===this.renderTo&&this.renderTo.removeChild(c),this.renderToClone=b=this.renderTo.cloneNode(0),G(b,{position:"absolute",top:"-9999px",display:"block"}),b.style.setProperty&&b.style.setProperty("display","block","important"),y.body.appendChild(b),c&&b.appendChild(c))},getContainer:function(){var a,c,d,e,b=this.options.chart;this.renderTo=a=b.renderTo,e="highcharts-"+tb++,Fa(a)&&(this.renderTo=a=y.getElementById(a)),a||ra(13,!0),c=z(H(a,"data-highcharts-chart")),!isNaN(c)&&V[c]&&V[c].hasRendered&&V[c].destroy(),H(a,"data-highcharts-chart",this.index),a.innerHTML="",!b.skipClone&&!a.offsetWidth&&this.cloneRenderTo(),this.getChartSize(),c=this.chartWidth,d=this.chartHeight,this.container=a=Y(Ja,{className:"highcharts-container"+(b.className?" "+b.className:""),id:e},q({position:"relative",overflow:"hidden",width:c+"px",height:d+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"},b.style),this.renderToClone||a),this._cursor=a.style.cursor,this.renderer=b.forExport?new ta(a,c,d,b.style,!0):new Za(a,c,d,b.style),fa&&this.renderer.create(this,a,c,d)},getMargins:function(){var b,a=this.spacing,c=this.legend,d=this.margin,e=this.options.legend,f=m(e.margin,20),g=e.x,h=e.y,i=e.align,j=e.verticalAlign,k=this.titleOffset;this.resetMargins(),b=this.axisOffset,k&&!r(d[0])&&(this.plotTop=v(this.plotTop,k+this.options.title.margin+a[0])),c.display&&!e.floating&&("right"===i?r(d[1])||(this.marginRight=v(this.marginRight,c.legendWidth-g+f+a[1])):"left"===i?r(d[3])||(this.plotLeft=v(this.plotLeft,c.legendWidth+g+f+a[3])):"top"===j?r(d[0])||(this.plotTop=v(this.plotTop,c.legendHeight+h+f+a[0])):"bottom"!==j||r(d[2])||(this.marginBottom=v(this.marginBottom,c.legendHeight-h+f+a[2]))),this.extraBottomMargin&&(this.marginBottom+=this.extraBottomMargin),this.extraTopMargin&&(this.plotTop+=this.extraTopMargin),this.hasCartesianSeries&&p(this.axes,function(a){a.getOffset()}),r(d[3])||(this.plotLeft+=b[3]),r(d[0])||(this.plotTop+=b[0]),r(d[2])||(this.marginBottom+=b[2]),r(d[1])||(this.marginRight+=b[1]),this.setChartSize()},reflow:function(a){var b=this,c=b.options.chart,d=b.renderTo,e=c.width||jb(d,"width"),f=c.height||jb(d,"height"),c=a?a.target:I,d=function(){b.container&&(b.setSize(e,f,!1),b.hasUserSize=null)};b.hasUserSize||!e||!f||c!==I&&c!==y||((e!==b.containerWidth||f!==b.containerHeight)&&(clearTimeout(b.reflowTimeout),a?b.reflowTimeout=setTimeout(d,100):d()),b.containerWidth=e,b.containerHeight=f)},initReflow:function(){var a=this,b=function(b){a.reflow(b)};K(I,"resize",b),K(a,"destroy",function(){W(I,"resize",b)})},setSize:function(a,b,c){var e,f,g,d=this;d.isResizing+=1,g=function(){d&&D(d,"endResize",null,function(){d.isResizing-=1})},Qa(c,d),d.oldChartHeight=d.chartHeight,d.oldChartWidth=d.chartWidth,r(a)&&(d.chartWidth=e=v(0,u(a)),d.hasUserSize=!!e),r(b)&&(d.chartHeight=f=v(0,u(b))),(va?kb:G)(d.container,{width:e+"px",height:f+"px"},va),d.setChartSize(!0),d.renderer.setSize(e,f,c),d.maxTicks=null,p(d.axes,function(a){a.isDirty=!0,a.setScale()}),p(d.series,function(a){a.isDirty=!0}),d.isDirtyLegend=!0,d.isDirtyBox=!0,d.layOutTitles(),d.getMargins(),d.redraw(c),d.oldChartHeight=null,D(d,"resize"),va===!1?g():setTimeout(g,va&&va.duration||500)},setChartSize:function(a){var i,j,k,l,b=this.inverted,c=this.renderer,d=this.chartWidth,e=this.chartHeight,f=this.options.chart,g=this.spacing,h=this.clipOffset;this.plotLeft=i=u(this.plotLeft),this.plotTop=j=u(this.plotTop),this.plotWidth=k=v(0,u(d-i-this.marginRight)),this.plotHeight=l=v(0,u(e-j-this.marginBottom)),this.plotSizeX=b?l:k,this.plotSizeY=b?k:l,this.plotBorderWidth=f.plotBorderWidth||0,this.spacingBox=c.spacingBox={x:g[3],y:g[0],width:d-g[3]-g[1],height:e-g[0]-g[2]},this.plotBox=c.plotBox={x:i,y:j,width:k,height:l},d=2*T(this.plotBorderWidth/2),b=Ka(v(d,h[3])/2),c=Ka(v(d,h[0])/2),this.clipBox={x:b,y:c,width:T(this.plotSizeX-v(d,h[1])/2-b),height:T(this.plotSizeY-v(d,h[2])/2-c)},a||p(this.axes,function(a){a.setAxisSize(),a.setAxisTranslation()})},resetMargins:function(){var a=this.spacing,b=this.margin;this.plotTop=m(b[0],a[0]),this.marginRight=m(b[1],a[1]),this.marginBottom=m(b[2],a[2]),this.plotLeft=m(b[3],a[3]),this.axisOffset=[0,0,0,0],this.clipOffset=[0,0,0,0]},drawChartBox:function(){var n,a=this.options.chart,b=this.renderer,c=this.chartWidth,d=this.chartHeight,e=this.chartBackground,f=this.plotBackground,g=this.plotBorder,h=this.plotBGImage,i=a.borderWidth||0,j=a.backgroundColor,k=a.plotBackgroundColor,l=a.plotBackgroundImage,o=a.plotBorderWidth||0,s=this.plotLeft,m=this.plotTop,p=this.plotWidth,q=this.plotHeight,r=this.plotBox,v=this.clipRect,u=this.clipBox;n=i+(a.shadow?8:0),(i||j)&&(e?e.animate(e.crisp({width:c-n,height:d-n})):(e={fill:j||Q},i&&(e.stroke=a.borderColor,e["stroke-width"]=i),this.chartBackground=b.rect(n/2,n/2,c-n,d-n,a.borderRadius,i).attr(e).addClass("highcharts-background").add().shadow(a.shadow))),k&&(f?f.animate(r):this.plotBackground=b.rect(s,m,p,q,0).attr({fill:k}).add().shadow(a.plotShadow)),l&&(h?h.animate(r):this.plotBGImage=b.image(l,s,m,p,q).add()),v?v.animate({width:u.width,height:u.height}):this.clipRect=b.clipRect(u),o&&(g?g.animate(g.crisp({x:s,y:m,width:p,height:q})):this.plotBorder=b.rect(s,m,p,q,0,-o).attr({stroke:a.plotBorderColor,"stroke-width":o,fill:Q,zIndex:1}).add()),this.isDirtyBox=!1},propFromSeries:function(){var c,e,f,a=this,b=a.options.chart,d=a.options.series;p(["inverted","angular","polar"],function(g){for(c=F[b.type||b.defaultSeriesType],f=a[g]||b[g]||c&&c.prototype[g],e=d&&d.length;!f&&e--;)(c=F[d[e].type])&&c.prototype[g]&&(f=!0);a[g]=f})},linkSeries:function(){var a=this,b=a.series;p(b,function(a){a.linkedSeries.length=0}),p(b,function(b){var d=b.options.linkedTo;Fa(d)&&(d=":previous"===d?a.series[b.index-1]:a.get(d))&&(d.linkedSeries.push(b),b.linkedParent=d)})},renderSeries:function(){p(this.series,function(a){a.translate(),a.setTooltipPoints&&a.setTooltipPoints(),a.render()})},render:function(){var g,a=this,b=a.axes,c=a.renderer,d=a.options,e=d.labels,f=d.credits;a.setTitle(),a.legend=new lb(a,d.legend),a.getStacks(),p(b,function(a){a.setScale()}),a.getMargins(),a.maxTicks=null,p(b,function(a){a.setTickPositions(!0),a.setMaxTicks()}),a.adjustTickAmounts(),a.getMargins(),a.drawChartBox(),a.hasCartesianSeries&&p(b,function(a){a.render()}),a.seriesGroup||(a.seriesGroup=c.g("series-group").attr({zIndex:3}).add()),a.renderSeries(),e.items&&p(e.items,function(b){var d=q(e.style,b.style),f=z(d.left)+a.plotLeft,g=z(d.top)+a.plotTop+12;delete d.left,delete d.top,c.text(b.html,f,g).attr({zIndex:2}).css(d).add()}),f.enabled&&!a.credits&&(g=f.href,a.credits=c.text(f.text,0,0).on("click",function(){g&&(location.href=g)}).attr({align:f.position.align,zIndex:8}).css(f.style).add().align(f.position)),a.hasRendered=!0},destroy:function(){var e,a=this,b=a.axes,c=a.series,d=a.container,f=d&&d.parentNode;for(D(a,"destroy"),V[a.index]=t,ab--,a.renderTo.removeAttribute("data-highcharts-chart"),W(a),e=b.length;e--;)b[e]=b[e].destroy();for(e=c.length;e--;)c[e]=c[e].destroy();p("title,subtitle,chartBackground,plotBackground,plotBGImage,plotBorder,seriesGroup,clipRect,credits,pointer,scroller,rangeSelector,legend,resetZoomButton,tooltip,renderer".split(","),function(b){var c=a[b];c&&c.destroy&&(a[b]=c.destroy())}),d&&(d.innerHTML="",W(d),f&&Pa(d));for(e in a)delete a[e]},isReadyToRender:function(){var a=this;return!aa&&I==I.top&&"complete"!==y.readyState||fa&&!I.canvg?(fa?Lb.push(function(){a.firstRender()},a.options.global.canvasToolsURL):y.attachEvent("onreadystatechange",function(){y.detachEvent("onreadystatechange",a.firstRender),"complete"===y.readyState&&a.firstRender()}),!1):!0},firstRender:function(){var a=this,b=a.options,c=a.callback;a.isReadyToRender()&&(a.getContainer(),D(a,"init"),a.resetMargins(),a.setChartSize(),a.propFromSeries(),a.getAxes(),p(b.series||[],function(b){a.initSeries(b)}),a.linkSeries(),D(a,"beforeRender"),R.Pointer&&(a.pointer=new Wa(a,b)),a.render(),a.renderer.draw(),c&&c.apply(a,[a]),p(a.callbacks,function(b){b.apply(a,[a])}),a.cloneRenderTo(!0),D(a,"load"))},splashArray:function(a,b){var c=b[a],c=ca(c)?c:[c,c,c,c];return[m(b[a+"Top"],c[0]),m(b[a+"Right"],c[1]),m(b[a+"Bottom"],c[2]),m(b[a+"Left"],c[3])]}},Ya.prototype.callbacks=[],X=R.CenteredSeriesMixin={getCenter:function(){var d,h,a=this.options,b=this.chart,c=2*(a.slicedOffset||0),e=b.plotWidth-2*c,f=b.plotHeight-2*c,b=a.center,a=[m(b[0],"50%"),m(b[1],"50%"),a.size||"100%",a.innerSize||0],g=C(e,f);return Ua(a,function(a,b){return h=/%$/.test(a),d=2>b||2===b&&h,(h?[e,f,g,g][b]*z(a)/100:a)+(d?c:0)})}};var Ea=function(){};Ea.prototype={init:function(a,b,c){return this.series=a,this.applyOptions(b,c),this.pointAttr={},a.options.colorByPoint&&(b=a.options.colors||a.chart.options.colors,this.color=this.color||b[a.colorCounter++],a.colorCounter===b.length)&&(a.colorCounter=0),a.chart.pointCount++,this},applyOptions:function(a,b){var c=this.series,d=c.pointValKey,a=Ea.prototype.optionsToObject.call(this,a);return q(this,a),this.options=this.options?q(this.options,a):a,d&&(this.y=this[d]),this.x===t&&c&&(this.x=b===t?c.autoIncrement():b),this},optionsToObject:function(a){var b={},c=this.series,d=c.pointArrayMap||["y"],e=d.length,f=0,g=0;if("number"==typeof a||null===a)b[d[0]]=a;else if(La(a))for(a.length>e&&(c=typeof a[0],"string"===c?b.name=a[0]:"number"===c&&(b.x=a[0]),f++);e>g;)b[d[g++]]=a[f++];else"object"==typeof a&&(b=a,a.dataLabels&&(c._hasPointLabels=!0),a.marker&&(c._hasPointMarkers=!0));return b},destroy:function(){var c,a=this.series.chart,b=a.hoverPoints;a.pointCount--,b&&(this.setState(),ja(b,this),!b.length)&&(a.hoverPoints=null),this===a.hoverPoint&&this.onMouseOut(),(this.graphic||this.dataLabel)&&(W(this),this.destroyElements()),this.legendItem&&a.legend.destroyItem(this);for(c in this)this[c]=null},destroyElements:function(){for(var b,a="graphic,dataLabel,dataLabelUpper,group,connector,shadowGroup".split(","),c=6;c--;)b=a[c],this[b]&&(this[b]=this[b].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},tooltipFormatter:function(a){var b=this.series,c=b.tooltipOptions,d=m(c.valueDecimals,""),e=c.valuePrefix||"",f=c.valueSuffix||"";return p(b.pointArrayMap||["y"],function(b){b="{point."+b,(e||f)&&(a=a.replace(b+"}",e+b+"}"+f)),a=a.replace(b+"}",b+":,."+d+"f}")}),Ia(a,{point:this,series:this.series})},firePointEvent:function(a,b,c){var d=this,e=this.series.options;(e.point.events[a]||d.options&&d.options.events&&d.options.events[a])&&this.importEvents(),"click"===a&&e.allowPointSelect&&(c=function(a){d.select(null,a.ctrlKey||a.metaKey||a.shiftKey)}),D(this,a,b,c)}};var O=function(){};O.prototype={isCartesian:!0,type:"line",pointClass:Ea,sorted:!0,requireSorting:!0,pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor",r:"radius"},axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],init:function(a,b){var d,e,c=this,f=a.series,g=function(a,b){return m(a.options.index,a._i)-m(b.options.index,b._i)};c.chart=a,c.options=b=c.setOptions(b),c.linkedSeries=[],c.bindAxes(),q(c,{name:b.name,state:"",pointAttr:{},visible:b.visible!==!1,selected:b.selected===!0}),fa&&(b.animation=!1),e=b.events;for(d in e)K(c,d,e[d]);(e&&e.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)&&(a.runTrackerClick=!0),c.getColor(),c.getSymbol(),p(c.parallelArrays,function(a){c[a+"Data"]=[]}),c.setData(b.data,!1),c.isCartesian&&(a.hasCartesianSeries=!0),f.push(c),c._i=f.length-1,ob(f,g),this.yAxis&&ob(this.yAxis.series,g),p(f,function(a,b){a.index=b,a.name=a.name||"Series "+(b+1)})},bindAxes:function(){var d,a=this,b=a.options,c=a.chart;p(a.axisTypes||[],function(e){p(c[e],function(c){d=c.options,(b[e]===d.index||b[e]!==t&&b[e]===d.id||b[e]===t&&0===d.index)&&(c.series.push(a),a[e]=c,c.isDirty=!0)}),!a[e]&&a.optionalAxis!==e&&ra(18,!0)})},updateParallelArrays:function(a,b){var c=a.series,d=arguments;p(c.parallelArrays,"number"==typeof b?function(d){var f="y"===d&&c.toYData?c.toYData(a):a[d];c[d+"Data"][b]=f}:function(a){Array.prototype[b].apply(c[a+"Data"],Array.prototype.slice.call(d,2))})},autoIncrement:function(){var a=this.options,b=this.xIncrement,b=m(b,a.pointStart,0);return this.pointInterval=m(this.pointInterval,a.pointInterval,1),this.xIncrement=b+this.pointInterval,b},getSegments:function(){var c,a=-1,b=[],d=this.points,e=d.length;if(e)if(this.options.connectNulls){for(c=e;c--;)null===d[c].y&&d.splice(c,1);d.length&&(b=[d])}else p(d,function(c,g){null===c.y?(g>a+1&&b.push(d.slice(a+1,g)),a=g):g===e-1&&b.push(d.slice(a+1,g+1))});this.segments=b},setOptions:function(a){var b=this.chart,c=b.options.plotOptions,b=b.userOptions||{},d=b.plotOptions||{},e=c[this.type];return this.userOptions=a,c=w(e,c.series,a),this.tooltipOptions=w(E.tooltip,E.plotOptions[this.type].tooltip,b.tooltip,d.series&&d.series.tooltip,d[this.type]&&d[this.type].tooltip,a.tooltip),null===e.marker&&delete c.marker,c},getColor:function(){var e,a=this.options,b=this.userOptions,c=this.chart.options.colors,d=this.chart.counters;e=a.color||ba[this.type].color,e||a.colorByPoint||(r(b._colorIndex)?a=b._colorIndex:(b._colorIndex=d.color,a=d.color++),e=c[a]),this.color=e,d.wrapColor(c.length)},getSymbol:function(){var a=this.userOptions,b=this.options.marker,c=this.chart,d=c.options.symbols,c=c.counters;this.symbol=b.symbol,this.symbol||(r(a._symbolIndex)?a=a._symbolIndex:(a._symbolIndex=c.symbol,a=c.symbol++),this.symbol=d[a]),/^url/.test(this.symbol)&&(b.radius=0),c.wrapSymbol(d.length)},drawLegendSymbol:N.drawLineMarker,setData:function(a,b,c,d){var h,e=this,f=e.points,g=f&&f.length||0,i=e.options,j=e.chart,k=null,l=e.xAxis,o=l&&!!l.categories,n=e.tooltipPoints,s=i.turboThreshold,q=this.xData,r=this.yData,v=(h=e.pointArrayMap)&&h.length,a=a||[];if(h=a.length,b=m(b,!0),d===!1||!h||g!==h||e.cropped||e.hasGroupedData){if(e.xIncrement=null,e.pointRange=o?1:i.pointRange,e.colorCounter=0,p(this.parallelArrays,function(a){e[a+"Data"].length=0}),s&&h>s){for(c=0;null===k&&h>c;)k=a[c],c++;if(ha(k)){for(o=m(i.pointStart,0),i=m(i.pointInterval,1),c=0;h>c;c++)q[c]=o,r[c]=a[c],o+=i;e.xIncrement=o}else if(La(k))if(v)for(c=0;h>c;c++)i=a[c],q[c]=i[0],r[c]=i.slice(1,v+1);else for(c=0;h>c;c++)i=a[c],q[c]=i[0],r[c]=i[1];else ra(12)}else for(c=0;h>c;c++)a[c]!==t&&(i={series:e},e.pointClass.prototype.applyOptions.apply(i,[a[c]]),e.updateParallelArrays(i,c),o&&i.name)&&(l.names[i.x]=i.name);for(Fa(r[0])&&ra(14,!0),e.data=[],e.options.data=a,c=g;c--;)f[c]&&f[c].destroy&&f[c].destroy();n&&(n.length=0),l&&(l.minRange=l.userMinRange),e.isDirty=e.isDirtyData=j.isDirtyBox=!0,c=!1}else p(a,function(a,b){f[b].update(a,!1)});b&&j.redraw(c)},processData:function(a){var e,b=this.xData,c=this.yData,d=b.length;e=0;var f,g,o,n,h=this.xAxis,i=this.options,j=i.cropThreshold,k=0,l=this.isCartesian;if(l&&!this.isDirty&&!h.isDirty&&!this.yAxis.isDirty&&!a)return!1;for(l&&this.sorted&&(!j||d>j||this.forceCrop)&&(o=h.min,n=h.max,b[d-1]<o||b[0]>n?(b=[],c=[]):(b[0]<o||b[d-1]>n)&&(e=this.cropData(this.xData,this.yData,o,n),b=e.xData,c=e.yData,e=e.start,f=!0,k=b.length)),d=b.length-1;d>=0;d--)a=b[d]-b[d-1],!f&&b[d]>o&&b[d]<n&&k++,a>0&&(g===t||g>a)?g=a:0>a&&this.requireSorting&&ra(15);this.cropped=f,this.cropStart=e,this.processedXData=b,this.processedYData=c,this.activePointCount=k,null===i.pointRange&&(this.pointRange=g||1),this.closestPointRange=g},cropData:function(a,b,c,d){var i,e=a.length,f=0,g=e,h=m(this.cropShoulder,1);for(i=0;e>i;i++)if(a[i]>=c){f=v(0,i-h);break}for(;e>i;i++)if(a[i]>d){g=i+h;break}return{xData:a.slice(f,g),yData:b.slice(f,g),start:f,end:g}},generatePoints:function(){var c,i,k,o,a=this.options.data,b=this.data,d=this.processedXData,e=this.processedYData,f=this.pointClass,g=d.length,h=this.cropStart||0,j=this.hasGroupedData,l=[];for(b||j||(b=[],b.length=a.length,b=this.data=b),o=0;g>o;o++)i=h+o,j?l[o]=(new f).init(this,[d[o]].concat(qa(e[o]))):(b[i]?k=b[i]:a[i]!==t&&(b[i]=k=(new f).init(this,a[i],d[o])),l[o]=k);if(b&&(g!==(c=b.length)||j))for(o=0;c>o;o++)o===h&&!j&&(o+=g),b[o]&&(b[o].destroyElements(),b[o].plotX=t);this.data=b,this.points=l},getExtremes:function(a){var d,b=this.yAxis,c=this.processedXData,e=[],f=0;d=this.xAxis.getExtremes();var i,j,k,l,g=d.min,h=d.max,a=a||this.stackedYData||this.processedYData;for(d=a.length,l=0;d>l;l++)if(j=c[l],k=a[l],i=null!==k&&k!==t&&(!b.isLog||k.length||k>0),j=this.getExtremesFromAll||this.cropped||(c[l+1]||j)>=g&&(c[l-1]||j)<=h,i&&j)if(i=k.length)for(;i--;)null!==k[i]&&(e[f++]=k[i]);else e[f++]=k;this.dataMin=m(void 0,Na(e)),this.dataMax=m(void 0,Ba(e))},translate:function(){this.processedXData||this.processData(),this.generatePoints();for(var a=this.options,b=a.stacking,c=this.xAxis,d=c.categories,e=this.yAxis,f=this.points,g=f.length,h=!!this.modifyValue,i=a.pointPlacement,j="between"===i||ha(i),k=a.threshold,a=0;g>a;a++){var l=f[a],o=l.x,n=l.y,s=l.low,p=b&&e.stacks[(this.negStacks&&k>n?"-":"")+this.stackKey];e.isLog&&0>=n&&(l.y=n=null),l.plotX=c.translate(o,0,0,0,1,i,"flags"===this.type),b&&this.visible&&p&&p[o]&&(p=p[o],n=p.points[this.index+","+a],s=n[0],n=n[1],0===s&&(s=m(k,e.min)),e.isLog&&0>=s&&(s=null),l.total=l.stackTotal=p.total,l.percentage=p.total&&l.y/p.total*100,l.stackY=n,p.setOffset(this.pointXOffset||0,this.barW||0)),l.yBottom=r(s)?e.translate(s,0,1,0,1):null,h&&(n=this.modifyValue(n,l)),l.plotY="number"==typeof n&&1/0!==n?e.translate(n,0,1,0,1):t,l.clientX=j?c.translate(o,0,0,0,1):l.plotX,l.negative=l.y<(k||0),l.category=d&&d[l.x]!==t?d[l.x]:l.x}this.getSegments()},animate:function(a){var d,b=this.chart,c=b.renderer;d=this.options.animation;var g,e=this.clipBox||b.clipBox,f=b.inverted;d&&!ca(d)&&(d=ba[this.type].animation),g=["_sharedClip",d.duration,d.easing,e.height].join(","),a?(a=b[g],d=b[g+"m"],a||(b[g]=a=c.clipRect(q(e,{width:0})),b[g+"m"]=d=c.clipRect(-99,f?-b.plotLeft:-b.plotTop,99,f?b.chartWidth:b.chartHeight)),this.group.clip(a),this.markerGroup.clip(d),this.sharedClipKey=g):((a=b[g])&&a.animate({width:b.plotSizeX},d),b[g+"m"]&&b[g+"m"].animate({width:b.plotSizeX+99},d),this.animate=null)},afterAnimate:function(){var a=this.chart,b=this.sharedClipKey,c=this.group,d=this.clipBox;c&&this.options.clip!==!1&&(b&&d||c.clip(d?a.renderer.clipRect(d):a.clipRect),this.markerGroup.clip()),D(this,"afterAnimate"),setTimeout(function(){b&&a[b]&&(d||(a[b]=a[b].destroy()),a[b+"m"]&&(a[b+"m"]=a[b+"m"].destroy()))},100)},drawPoints:function(){var a,d,e,f,g,h,i,j,k,b=this.points,c=this.chart;d=this.options.marker;var o,l=this.pointAttr[""],n=this.markerGroup,s=m(d.enabled,this.activePointCount<.5*this.xAxis.len/d.radius);if(d.enabled!==!1||this._hasPointMarkers)for(f=b.length;f--;)g=b[f],d=T(g.plotX),e=g.plotY,k=g.graphic,i=g.marker||{},a=s&&i.enabled===t||i.enabled,o=c.isInsidePlot(u(d),e,c.inverted),a&&e!==t&&!isNaN(e)&&null!==g.y?(a=g.pointAttr[g.selected?"select":""]||l,h=a.r,i=m(i.symbol,this.symbol),j=0===i.indexOf("url"),k?k[o?"show":"hide"](!0).animate(q({x:d-h,y:e-h},k.symbolName?{width:2*h,height:2*h}:{})):o&&(h>0||j)&&(g.graphic=c.renderer.symbol(i,d-h,e-h,2*h,2*h).attr(a).add(n))):k&&(g.graphic=k.destroy())},convertAttribs:function(a,b,c,d){var f,g,e=this.pointAttrToOptions,h={},a=a||{},b=b||{},c=c||{},d=d||{};for(f in e)g=e[f],h[f]=m(a[g],b[f],c[f],d[f]);return h},getAttribs:function(){var f,a=this,b=a.options,c=ba[a.type].marker?b.marker:b,d=c.states,e=d.hover,g=a.color;f={stroke:g,fill:g};var i,k,h=a.points||[],j=[],l=a.pointAttrToOptions;k=a.hasPointSpecificOptions;var o=b.negativeColor,n=c.lineColor,s=c.fillColor;i=b.turboThreshold;var m;if(b.marker?(e.radius=e.radius||c.radius+2,e.lineWidth=e.lineWidth||c.lineWidth+1):e.color=e.color||ya(e.color||g).brighten(e.brightness).get(),j[""]=a.convertAttribs(c,f),p(["hover","select"],function(b){j[b]=a.convertAttribs(d[b],j[""])}),a.pointAttr=j,g=h.length,!i||i>g||k)for(;g--;){if(i=h[g],(c=i.options&&i.options.marker||i.options)&&c.enabled===!1&&(c.radius=0),i.negative&&o&&(i.color=i.fillColor=o),k=b.colorByPoint||i.color,i.options)for(m in l)r(c[l[m]])&&(k=!0);k?(c=c||{},k=[],d=c.states||{},f=d.hover=d.hover||{},b.marker||(f.color=f.color||!i.options.color&&e.color||ya(i.color).brighten(f.brightness||e.brightness).get()),f={color:i.color},s||(f.fillColor=i.color),n||(f.lineColor=i.color),k[""]=a.convertAttribs(q(f,c),j[""]),k.hover=a.convertAttribs(d.hover,j.hover,k[""]),k.select=a.convertAttribs(d.select,j.select,k[""])):k=j,i.pointAttr=k}},destroy:function(){var d,e,g,h,i,a=this,b=a.chart,c=/AppleWebKit\/533/.test(wa),f=a.data||[];for(D(a,"destroy"),W(a),p(a.axisTypes||[],function(b){(i=a[b])&&(ja(i.series,a),i.isDirty=i.forceRedraw=!0)}),a.legendItem&&a.chart.legend.destroyItem(a),e=f.length;e--;)(g=f[e])&&g.destroy&&g.destroy();a.points=null,clearTimeout(a.animationTimeout),p("area,graph,dataLabelsGroup,group,markerGroup,tracker,graphNeg,areaNeg,posClip,negClip".split(","),function(b){a[b]&&(d=c&&"group"===b?"hide":"destroy",a[b][d]())}),b.hoverSeries===a&&(b.hoverSeries=null),ja(b.series,a);for(h in a)delete a[h]},getSegmentPath:function(a){var b=this,c=[],d=b.options.step;return p(a,function(e,f){var i,g=e.plotX,h=e.plotY;b.getPointSpline?c.push.apply(c,b.getPointSpline(a,e,f)):(c.push(f?"L":"M"),d&&f&&(i=a[f-1],"right"===d?c.push(i.plotX,h):"center"===d?c.push((i.plotX+g)/2,i.plotY,(i.plotX+g)/2,h):c.push(g,i.plotY)),c.push(e.plotX,e.plotY))}),c},getGraphPath:function(){var c,a=this,b=[],d=[];return p(a.segments,function(e){c=a.getSegmentPath(e),e.length>1?b=b.concat(c):d.push(e[0])}),a.singlePoints=d,a.graphPath=b},drawGraph:function(){var a=this,b=this.options,c=[["graph",b.lineColor||this.color]],d=b.lineWidth,e=b.dashStyle,f="square"!==b.linecap,g=this.getGraphPath(),h=b.negativeColor;h&&c.push(["graphNeg",h]),p(c,function(c,h){var k=c[0],l=a[k];l?(bb(l),l.animate({d:g})):d&&g.length&&(l={stroke:c[1],"stroke-width":d,fill:Q,zIndex:1},e?l.dashstyle=e:f&&(l["stroke-linecap"]=l["stroke-linejoin"]="round"),a[k]=a.chart.renderer.path(g).attr(l).add(a.group).shadow(!h&&b.shadow))})},clipNeg:function(){var e,a=this.options,b=this.chart,c=b.renderer,d=a.negativeColor||a.negativeFillColor,f=this.graph,g=this.area,h=this.posClip,i=this.negClip;e=b.chartWidth;var j=b.chartHeight,k=v(e,j),l=this.yAxis;d&&(f||g)&&(d=u(l.toPixels(a.threshold||0,!0)),0>d&&(k-=d),a={x:0,y:0,width:k,height:d},k={x:0,y:d,width:k,height:k},b.inverted&&(a.height=k.y=b.plotWidth-d,c.isVML&&(a={x:b.plotWidth-d-b.plotLeft,y:0,width:e,height:j},k={x:d+b.plotLeft-e,y:0,width:b.plotLeft+d,height:e})),l.reversed?(b=k,e=a):(b=a,e=k),h?(h.animate(b),i.animate(e)):(this.posClip=h=c.clipRect(b),this.negClip=i=c.clipRect(e),f&&this.graphNeg&&(f.clip(h),this.graphNeg.clip(i)),g&&(g.clip(h),this.areaNeg.clip(i))))},invertGroups:function(){function a(){var a={width:b.yAxis.len,height:b.xAxis.len};p(["group","markerGroup"],function(c){b[c]&&b[c].attr(a).invert()})}var b=this,c=b.chart;b.xAxis&&(K(c,"resize",a),K(b,"destroy",function(){W(c,"resize",a)}),a(),b.invertGroups=a)},plotGroup:function(a,b,c,d,e){var f=this[a],g=!f;return g&&(this[a]=f=this.chart.renderer.g(b).attr({visibility:c,zIndex:d||.1}).add(e)),f[g?"attr":"animate"](this.getPlotBox()),f},getPlotBox:function(){var a=this.chart,b=this.xAxis,c=this.yAxis;return a.inverted&&(b=c,c=this.xAxis),{translateX:b?b.left:a.plotLeft,translateY:c?c.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var c,a=this,b=a.chart,d=a.options,e=(c=d.animation)&&!!a.animate&&b.renderer.isSVG&&m(c.duration,500)||0,f=a.visible?"visible":"hidden",g=d.zIndex,h=a.hasRendered,i=b.seriesGroup;c=a.plotGroup("group","series",f,g,i),a.markerGroup=a.plotGroup("markerGroup","markers",f,g,i),e&&a.animate(!0),a.getAttribs(),c.inverted=a.isCartesian?b.inverted:!1,a.drawGraph&&(a.drawGraph(),a.clipNeg()),a.drawDataLabels&&a.drawDataLabels(),a.visible&&a.drawPoints(),a.drawTracker&&a.options.enableMouseTracking!==!1&&a.drawTracker(),b.inverted&&a.invertGroups(),d.clip!==!1&&!a.sharedClipKey&&!h&&c.clip(b.clipRect),e&&a.animate(),h||(e?a.animationTimeout=setTimeout(function(){a.afterAnimate()},e):a.afterAnimate()),a.isDirty=a.isDirtyData=!1,a.hasRendered=!0},redraw:function(){var a=this.chart,b=this.isDirtyData,c=this.group,d=this.xAxis,e=this.yAxis;c&&(a.inverted&&c.attr({width:a.plotWidth,height:a.plotHeight}),c.animate({translateX:m(d&&d.left,a.plotLeft),translateY:m(e&&e.top,a.plotTop)})),this.translate(),this.setTooltipPoints&&this.setTooltipPoints(!0),this.render(),b&&D(this,"updatedData")}},Hb.prototype={destroy:function(){Oa(this,this.axis)},render:function(a){var b=this.options,c=b.format,c=c?Ia(c,this):b.formatter.call(this);this.label?this.label.attr({text:c,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(c,null,null,b.useHTML).css(b.style).attr({align:this.textAlign,rotation:b.rotation,visibility:"hidden"}).add(a)},setOffset:function(a,b){var c=this.axis,d=c.chart,e=d.inverted,f=this.isNegative,g=c.translate(c.usePercentage?100:this.total,0,0,0,1),c=c.translate(0),c=M(g-c),h=d.xAxis[0].translate(this.x)+a,i=d.plotHeight,f={x:e?f?g:g-c:h,y:e?i-h-b:f?i-g-c:i-g,width:e?c:b,height:e?b:c};(e=this.label)&&(e.align(this.alignOptions,null,f),f=e.alignAttr,e[this.options.crop===!1||d.isInsidePlot(f.x,f.y)?"show":"hide"](!0))}},la.prototype.buildStacks=function(){var a=this.series,b=m(this.options.reversedStacks,!0),c=a.length;if(!this.isXAxis){for(this.usePercentage=!1;c--;)a[b?c:a.length-c-1].setStackedPoints();if(this.usePercentage)for(c=0;c<a.length;c++)a[c].setPercentStacks()}},la.prototype.renderStackTotals=function(){var d,e,a=this.chart,b=a.renderer,c=this.stacks,f=this.stackTotalGroup;f||(this.stackTotalGroup=f=b.g("stack-labels").attr({visibility:"visible",zIndex:6}).add()),f.translate(a.plotLeft,a.plotTop);for(d in c)for(e in a=c[d])a[e].render(f)},O.prototype.setStackedPoints=function(){if(this.options.stacking&&(this.visible===!0||this.chart.options.chart.ignoreHiddenSeries===!1)){var n,m,p,q,r,u,a=this.processedXData,b=this.processedYData,c=[],d=b.length,e=this.options,f=e.threshold,g=e.stack,e=e.stacking,h=this.stackKey,i="-"+h,j=this.negStacks,k=this.yAxis,l=k.stacks,o=k.oldStacks;for(q=0;d>q;q++)r=a[q],u=b[q],p=this.index+","+q,m=(n=j&&f>u)?i:h,l[m]||(l[m]={}),l[m][r]||(o[m]&&o[m][r]?(l[m][r]=o[m][r],l[m][r].total=null):l[m][r]=new Hb(k,k.options.stackLabels,n,r,g)),m=l[m][r],m.points[p]=[m.cum||0],"percent"===e?(n=n?h:i,j&&l[n]&&l[n][r]?(n=l[n][r],m.total=n.total=v(n.total,m.total)+M(u)||0):m.total=da(m.total+(M(u)||0))):m.total=da(m.total+(u||0)),m.cum=(m.cum||0)+(u||0),m.points[p].push(m.cum),c[q]=m.cum;"percent"===e&&(k.usePercentage=!0),this.stackedYData=c,k.oldStacks={}}},O.prototype.setPercentStacks=function(){var a=this,b=a.stackKey,c=a.yAxis.stacks,d=a.processedXData;p([b,"-"+b],function(b){for(var e,g,h,f=d.length;f--;)g=d[f],e=(h=c[b]&&c[b][g])&&h.points[a.index+","+f],(g=e)&&(h=h.total?100/h.total:0,g[0]=da(g[0]*h),g[1]=da(g[1]*h),a.stackedYData[f]=g[1])})},q(Ya.prototype,{addSeries:function(a,b,c){var d,e=this;return a&&(b=m(b,!0),D(e,"addSeries",{options:a},function(){d=e.initSeries(a),e.isDirtyLegend=!0,e.linkSeries(),b&&e.redraw(c)})),d},addAxis:function(a,b,c,d){var e=b?"xAxis":"yAxis",f=this.options;new la(this,w(a,{index:this[e].length,isX:b})),f[e]=qa(f[e]||{}),f[e].push(a),m(c,!0)&&this.redraw(d)},showLoading:function(a){var b=this.options,c=this.loadingDiv,d=b.loading;c||(this.loadingDiv=c=Y(Ja,{className:"highcharts-loading"},q(d.style,{zIndex:10,display:Q}),this.container),this.loadingSpan=Y("span",null,d.labelStyle,c)),this.loadingSpan.innerHTML=a||b.lang.loading,this.loadingShown||(G(c,{opacity:0,display:"",left:this.plotLeft+"px",top:this.plotTop+"px",width:this.plotWidth+"px",height:this.plotHeight+"px"}),kb(c,{opacity:d.style.opacity},{duration:d.showDuration||0}),this.loadingShown=!0)},hideLoading:function(){var a=this.options,b=this.loadingDiv;b&&kb(b,{opacity:0},{duration:a.loading.hideDuration||100,complete:function(){G(b,{display:Q})}}),this.loadingShown=!1}}),q(Ea.prototype,{update:function(a,b,c){var g,d=this,e=d.series,f=d.graphic,h=e.data,i=e.chart,j=e.options,b=m(b,!0);d.firePointEvent("update",{options:a},function(){d.applyOptions(a),ca(a)&&(e.getAttribs(),f&&(a&&a.marker&&a.marker.symbol?d.graphic=f.destroy():f.attr(d.pointAttr[d.state||""])),a&&a.dataLabels&&d.dataLabel&&(d.dataLabel=d.dataLabel.destroy())),g=Da(d,h),e.updateParallelArrays(d,g),j.data[g]=d.options,e.isDirty=e.isDirtyData=!0,!e.fixedBox&&e.hasCartesianSeries&&(i.isDirtyBox=!0),"point"===j.legendType&&i.legend.destroyItem(d),b&&i.redraw(c)})},remove:function(a,b){var g,c=this,d=c.series,e=d.points,f=d.chart,h=d.data;Qa(b,f),a=m(a,!0),c.firePointEvent("remove",null,function(){g=Da(c,h),h.length===e.length&&e.splice(g,1),h.splice(g,1),d.options.data.splice(g,1),d.updateParallelArrays(c,"splice",g,1),c.destroy(),d.isDirty=!0,d.isDirtyData=!0,a&&f.redraw()})}}),q(O.prototype,{addPoint:function(a,b,c,d){var o,e=this.options,f=this.data,g=this.graph,h=this.area,i=this.chart,j=this.xAxis&&this.xAxis.names,k=g&&g.shift||0,l=e.data,n=this.xData;if(Qa(d,i),c&&p([g,h,this.graphNeg,this.areaNeg],function(a){a&&(a.shift=k+1)}),h&&(h.isArea=!0),b=m(b,!0),d={series:this},this.pointClass.prototype.applyOptions.apply(d,[a]),g=d.x,h=n.length,this.requireSorting&&g<n[h-1])for(o=!0;h&&n[h-1]>g;)h--;this.updateParallelArrays(d,"splice",h,0,0),this.updateParallelArrays(d,h),j&&(j[g]=d.name),l.splice(h,0,a),o&&(this.data.splice(h,0,null),this.processData()),"point"===e.legendType&&this.generatePoints(),c&&(f[0]&&f[0].remove?f[0].remove(!1):(f.shift(),this.updateParallelArrays(d,"shift"),l.shift())),this.isDirtyData=this.isDirty=!0,b&&(this.getAttribs(),i.redraw())},remove:function(a,b){var c=this,d=c.chart,a=m(a,!0);c.isRemoving||(c.isRemoving=!0,D(c,"remove",null,function(){c.destroy(),d.isDirtyLegend=d.isDirtyBox=!0,d.linkSeries(),a&&d.redraw(b)})),c.isRemoving=!1},update:function(a,b){var f,c=this.chart,d=this.type,e=F[d].prototype,a=w(this.userOptions,{animation:!1,index:this.index,pointStart:this.xData[0]},{data:this.options.data},a);this.remove(!1);for(f in e)e.hasOwnProperty(f)&&(this[f]=t);q(this,F[a.type||d].prototype),this.init(c,a),m(b,!0)&&c.redraw(!1)}}),q(la.prototype,{update:function(a,b){var c=this.chart,a=c.options[this.coll][this.options.index]=w(this.userOptions,a);
5
+ this.destroy(!0),this._addedPlotLB=t,this.init(c,q(a,{events:t})),c.isDirtyBox=!0,m(b,!0)&&c.redraw()},remove:function(a){for(var b=this.chart,c=this.coll,d=this.series,e=d.length;e--;)d[e]&&d[e].remove(!1);ja(b.axes,this),ja(b[c],this),b.options[c].splice(this.options.index,1),p(b[c],function(a,b){a.options.index=b}),this.destroy(),b.isDirtyBox=!0,m(a,!0)&&b.redraw()},setTitle:function(a,b){this.update({title:a},b)},setCategories:function(a,b){this.update({categories:a},b)}}),ga=ka(O),F.line=ga,ba.area=w(S,{threshold:0});var pa=ka(O,{type:"area",getSegments:function(){var h,i,l,o,n,a=[],b=[],c=[],d=this.xAxis,e=this.yAxis,f=e.stacks[this.stackKey],g={},j=this.points,k=this.options.connectNulls;if(this.options.stacking&&!this.cropped){for(o=0;o<j.length;o++)g[j[o].x]=j[o];for(n in f)null!==f[n].total&&c.push(+n);c.sort(function(a,b){return a-b}),p(c,function(a){(!k||g[a]&&null!==g[a].y)&&(g[a]?b.push(g[a]):(h=d.translate(a),l=f[a].percent?f[a].total?100*f[a].cum/f[a].total:0:f[a].cum,i=e.toPixels(l,!0),b.push({y:null,plotX:h,clientX:h,plotY:i,yBottom:i,onMouseOver:sa})))}),b.length&&a.push(b)}else O.prototype.getSegments.call(this),a=this.segments;this.segments=a},getSegmentPath:function(a){var d,b=O.prototype.getSegmentPath.call(this,a),c=[].concat(b),e=this.options;d=b.length;var g,f=this.yAxis.getThreshold(e.threshold);if(3===d&&c.push("L",b[1],b[2]),e.stacking&&!this.closedStacks)for(d=a.length-1;d>=0;d--)g=m(a[d].yBottom,f),d<a.length-1&&e.step&&c.push(a[d+1].plotX,g),c.push(a[d].plotX,g);else this.closeSegment(c,a,f);return this.areaPath=this.areaPath.concat(c),b},closeSegment:function(a,b,c){a.push("L",b[b.length-1].plotX,c,"L",b[0].plotX,c)},drawGraph:function(){this.areaPath=[],O.prototype.drawGraph.apply(this);var a=this,b=this.areaPath,c=this.options,d=c.negativeColor,e=c.negativeFillColor,f=[["area",this.color,c.fillColor]];(d||e)&&f.push(["areaNeg",d,e]),p(f,function(d){var e=d[0],f=a[e];f?f.animate({d:b}):a[e]=a.chart.renderer.path(b).attr({fill:m(d[2],ya(d[1]).setOpacity(m(c.fillOpacity,.75)).get()),zIndex:0}).add(a.group)})},drawLegendSymbol:N.drawRectangle});F.area=pa,ba.spline=w(S),ga=ka(O,{type:"spline",getPointSpline:function(a,b,c){var h,i,j,k,d=b.plotX,e=b.plotY,f=a[c-1],g=a[c+1];if(f&&g){a=f.plotY,j=g.plotX;var l,g=g.plotY;h=(1.5*d+f.plotX)/2.5,i=(1.5*e+a)/2.5,j=(1.5*d+j)/2.5,k=(1.5*e+g)/2.5,l=(k-i)*(j-d)/(j-h)+e-k,i+=l,k+=l,i>a&&i>e?(i=v(a,e),k=2*e-i):a>i&&e>i&&(i=C(a,e),k=2*e-i),k>g&&k>e?(k=v(g,e),i=2*e-k):g>k&&e>k&&(k=C(g,e),i=2*e-k),b.rightContX=j,b.rightContY=k}return c?(b=["C",f.rightContX||f.plotX,f.rightContY||f.plotY,h||d,i||e,d,e],f.rightContX=f.rightContY=null):b=["M",d,e],b}}),F.spline=ga,ba.areaspline=w(ba.area),pa=pa.prototype,ga=ka(ga,{type:"areaspline",closedStacks:!0,getSegmentPath:pa.getSegmentPath,closeSegment:pa.closeSegment,drawGraph:pa.drawGraph,drawLegendSymbol:N.drawRectangle}),F.areaspline=ga,ba.column=w(S,{borderColor:"#FFFFFF",borderRadius:0,groupPadding:.2,marker:null,pointPadding:.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{brightness:.1,shadow:!1,halo:!1},select:{color:"#C0C0C0",borderColor:"#000000",shadow:!1}},dataLabels:{align:null,verticalAlign:null,y:null},stickyTracking:!1,tooltip:{distance:6},threshold:0}),ga=ka(O,{type:"column",pointAttrToOptions:{stroke:"borderColor",fill:"color",r:"borderRadius"},cropShoulder:0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){O.prototype.init.apply(this,arguments);var a=this,b=a.chart;b.hasRendered&&p(b.series,function(b){b.type===a.type&&(b.isDirty=!0)})},getColumnMetrics:function(){var f,h,a=this,b=a.options,c=a.xAxis,d=a.yAxis,e=c.reversed,g={},i=0;b.grouping===!1?i=1:p(a.chart.series,function(b){var c=b.options,e=b.yAxis;b.type===a.type&&b.visible&&d.len===e.len&&d.pos===e.pos&&(c.stacking?(f=b.stackKey,g[f]===t&&(g[f]=i++),h=g[f]):c.grouping!==!1&&(h=i++),b.columnIndex=h)});var c=C(M(c.transA)*(c.ordinalSlope||b.pointRange||c.closestPointRange||c.tickInterval||1),c.len),j=c*b.groupPadding,k=(c-2*j)/i,l=b.pointWidth,b=r(l)?(k-l)/2:k*b.pointPadding,l=m(l,k-2*b);return a.columnMetrics={width:l,offset:b+(j+((e?i-(a.columnIndex||0):a.columnIndex)||0)*k-c/2)*(e?-1:1)}},translate:function(){var a=this,b=a.chart,c=a.options,d=a.borderWidth=m(c.borderWidth,a.activePointCount>.5*a.xAxis.len?0:1),e=a.yAxis,f=a.translatedThreshold=e.getThreshold(c.threshold),g=m(c.minPointLength,5),c=a.getColumnMetrics(),h=c.width,i=a.barW=Ka(v(h,1+2*d)),j=a.pointXOffset=c.offset,k=-(d%2?.5:0),l=d%2?.5:1;b.renderer.isVML&&b.inverted&&(l+=1),O.prototype.translate.apply(a),p(a.points,function(c){var x,d=m(c.yBottom,f),p=C(v(-999-d,c.plotY),e.len+999+d),q=c.plotX+j,r=i,t=C(p,d);x=v(p,d)-t,M(x)<g&&g&&(x=g,t=u(M(t-f)>g?d-g:f-(e.translate(c.y,0,1,0,1)<=f?g:0))),c.barX=q,c.pointWidth=h,c.tooltipPos=b.inverted?[e.len-p,a.xAxis.len-q-r/2]:[q+r/2,p],d=M(q)<.5,r=u(q+r)+k,q=u(q)+k,r-=q,p=M(t)<.5,x=u(t+x)+l,t=u(t)+l,x-=t,d&&(q+=1,r-=1),p&&(t-=1,x+=1),c.shapeType="rect",c.shapeArgs={x:q,y:t,width:r,height:x}})},getSymbol:sa,drawLegendSymbol:N.drawRectangle,drawGraph:sa,drawPoints:function(){var f,g,h,a=this,b=this.chart,c=a.options,d=b.renderer,e=c.animationLimit||250;p(a.points,function(i){var j=i.plotY,k=i.graphic;j===t||isNaN(j)||null===i.y?k&&(i.graphic=k.destroy()):(f=i.shapeArgs,h=r(a.borderWidth)?{"stroke-width":a.borderWidth}:{},g=i.pointAttr[i.selected?"select":""]||a.pointAttr[""],k?(bb(k),k.attr(h)[b.pointCount<e?"animate":"attr"](w(f))):i.graphic=d[i.shapeType](f).attr(g).attr(h).add(a.group).shadow(c.shadow,null,c.stacking&&!c.borderRadius))})},animate:function(a){var b=this.yAxis,c=this.options,d=this.chart.inverted,e={};aa&&(a?(e.scaleY=.001,a=C(b.pos+b.len,v(b.pos,b.toPixels(c.threshold))),d?e.translateX=a-b.len:e.translateY=a,this.group.attr(e)):(e.scaleY=1,e[d?"translateX":"translateY"]=b.pos,this.group.animate(e,this.options.animation),this.animate=null))},remove:function(){var a=this,b=a.chart;b.hasRendered&&p(b.series,function(b){b.type===a.type&&(b.isDirty=!0)}),O.prototype.remove.apply(a,arguments)}}),F.column=ga,ba.bar=w(ba.column),pa=ka(ga,{type:"bar",inverted:!0}),F.bar=pa,ba.scatter=w(S,{lineWidth:0,tooltip:{headerFormat:'<span style="color:{series.color}">●</span> <span style="font-size: 10px;"> {series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"},stickyTracking:!1}),pa=ka(O,{type:"scatter",sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["markerGroup"],takeOrdinalPosition:!1,singularTooltips:!0,drawGraph:function(){this.options.lineWidth&&O.prototype.drawGraph.call(this)}}),F.scatter=pa,ba.pie=w(S,{borderColor:"#FFFFFF",borderWidth:1,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.name}},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,states:{hover:{brightness:.1,shadow:!1}},stickyTracking:!1,tooltip:{followPointer:!0}}),S={type:"pie",isCartesian:!1,pointClass:ka(Ea,{init:function(){Ea.prototype.init.apply(this,arguments);var b,a=this;return a.y<0&&(a.y=null),q(a,{visible:a.visible!==!1,name:m(a.name,"Slice")}),b=function(b){a.slice("select"===b.type)},K(a,"select",b),K(a,"unselect",b),a},setVisible:function(a){var b=this,c=b.series,d=c.chart;b.visible=b.options.visible=a=a===t?!b.visible:a,c.options.data[Da(b,c.data)]=b.options,p(["graphic","dataLabel","connector","shadowGroup"],function(c){b[c]&&b[c][a?"show":"hide"](!0)}),b.legendItem&&d.legend.colorizeItem(b,a),!c.isDirty&&c.options.ignoreHiddenPoint&&(c.isDirty=!0,d.redraw())},slice:function(a,b,c){var d=this.series;Qa(c,d.chart),m(b,!0),this.sliced=this.options.sliced=a=r(a)?a:!this.sliced,d.options.data[Da(this,d.data)]=this.options,a=a?this.slicedTranslation:{translateX:0,translateY:0},this.graphic.animate(a),this.shadowGroup&&this.shadowGroup.animate(a)},haloPath:function(a){var b=this.shapeArgs,c=this.series.chart;return this.series.chart.renderer.symbols.arc(c.plotLeft+b.x,c.plotTop+b.y,b.r+a,b.r+a,{innerR:this.shapeArgs.r,start:b.start,end:b.end})}}),requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},singularTooltips:!0,getColor:sa,animate:function(a){var b=this,c=b.points,d=b.startAngleRad;a||(p(c,function(a){var c=a.graphic,a=a.shapeArgs;c&&(c.attr({r:b.center[3]/2,start:d,end:d}),c.animate({r:a.r,start:a.start,end:a.end},b.options.animation))}),b.animate=null)},setData:function(a,b,c,d){O.prototype.setData.call(this,a,!1,c,d),this.processData(),this.generatePoints(),m(b,!0)&&this.chart.redraw(c)},generatePoints:function(){var a,c,d,e,b=0,f=this.options.ignoreHiddenPoint;for(O.prototype.generatePoints.call(this),c=this.points,d=c.length,a=0;d>a;a++)e=c[a],b+=f&&!e.visible?0:e.y;for(this.total=b,a=0;d>a;a++)e=c[a],e.percentage=b>0?e.y/b*100:0,e.total=b},translate:function(a){this.generatePoints();var f,g,h,o,p,b=0,c=this.options,d=c.slicedOffset,e=d+c.borderWidth,i=c.startAngle||0,j=this.startAngleRad=ma/180*(i-90),i=(this.endAngleRad=ma/180*(m(c.endAngle,i+360)-90))-j,k=this.points,l=c.dataLabels.distance,c=c.ignoreHiddenPoint,n=k.length;for(a||(this.center=a=this.getCenter()),this.getX=function(b,c){return h=U.asin(C((b-a[1])/(a[2]/2+l),1)),a[0]+(c?-1:1)*Z(h)*(a[2]/2+l)},o=0;n>o;o++)p=k[o],f=j+b*i,(!c||p.visible)&&(b+=p.percentage/100),g=j+b*i,p.shapeType="arc",p.shapeArgs={x:a[0],y:a[1],r:a[2]/2,innerR:a[3]/2,start:u(1e3*f)/1e3,end:u(1e3*g)/1e3},h=(g+f)/2,h>1.5*ma?h-=2*ma:-ma/2>h&&(h+=2*ma),p.slicedTranslation={translateX:u(Z(h)*d),translateY:u(ea(h)*d)},f=Z(h)*a[2]/2,g=ea(h)*a[2]/2,p.tooltipPos=[a[0]+.7*f,a[1]+.7*g],p.half=-ma/2>h||h>ma/2?1:0,p.angle=h,e=C(e,l/2),p.labelPos=[a[0]+f+Z(h)*l,a[1]+g+ea(h)*l,a[0]+f+Z(h)*e,a[1]+g+ea(h)*e,a[0]+f,a[1]+g,0>l?"center":p.half?"right":"left",h]},drawGraph:null,drawPoints:function(){var c,d,f,g,a=this,b=a.chart.renderer,e=a.options.shadow;e&&!a.shadowGroup&&(a.shadowGroup=b.g("shadow").add(a.group)),p(a.points,function(h){d=h.graphic,g=h.shapeArgs,f=h.shadowGroup,e&&!f&&(f=h.shadowGroup=b.g("shadow").add(a.shadowGroup)),c=h.sliced?h.slicedTranslation:{translateX:0,translateY:0},f&&f.attr(c),d?d.animate(q(g,c)):h.graphic=d=b[h.shapeType](g).setRadialReference(a.center).attr(h.pointAttr[h.selected?"select":""]).attr({"stroke-linejoin":"round"}).attr(c).add(a.group).shadow(e,f),void 0!==h.visible&&h.setVisible(h.visible)})},sortByAngle:function(a,b){a.sort(function(a,d){return void 0!==a.angle&&(d.angle-a.angle)*b})},drawLegendSymbol:N.drawRectangle,getCenter:X.getCenter,getSymbol:sa},S=ka(O,S),F.pie=S,O.prototype.drawDataLabels=function(){var f,g,h,i,a=this,b=a.options,c=b.cursor,d=b.dataLabels,e=a.points;(d.enabled||a._hasPointLabels)&&(a.dlProcessOptions&&a.dlProcessOptions(d),i=a.plotGroup("dataLabelsGroup","data-labels","hidden",d.zIndex||6),!a.hasRendered&&m(d.defer,!0)&&(i.attr({opacity:0}),K(a,"afterAnimate",function(){a.dataLabelsGroup.show()[b.animation?"animate":"attr"]({opacity:1},{duration:200})})),g=d,p(e,function(b){var e,o,n,l=b.dataLabel,p=b.connector,u=!0;if(f=b.options&&b.options.dataLabels,e=m(f&&f.enabled,g.enabled),l&&!e)b.dataLabel=l.destroy();else if(e){if(d=w(g,f),e=d.rotation,o=b.getLabelConfig(),h=d.format?Ia(d.format,o):d.formatter.call(o,d),d.style.color=m(d.color,d.style.color,a.color,"black"),l)r(h)?(l.attr({text:h}),u=!1):(b.dataLabel=l=l.destroy(),p&&(b.connector=p.destroy()));else if(r(h)){l={fill:d.backgroundColor,stroke:d.borderColor,"stroke-width":d.borderWidth,r:d.borderRadius||0,rotation:e,padding:d.padding,zIndex:1};for(n in l)l[n]===t&&delete l[n];l=b.dataLabel=a.chart.renderer[e?"text":"label"](h,0,-999,null,null,null,d.useHTML).attr(l).css(q(d.style,c&&{cursor:c})).add(i).shadow(d.shadow)}l&&a.alignDataLabel(b,l,d,null,u)}}))},O.prototype.alignDataLabel=function(a,b,c,d,e){var f=this.chart,g=f.inverted,h=m(a.plotX,-999),i=m(a.plotY,-999),j=b.getBBox();(a=this.visible&&(a.series.forceDL||f.isInsidePlot(h,u(i),g)||d&&f.isInsidePlot(h,g?d.x+1:d.y+d.height-1,g)))&&(d=q({x:g?f.plotWidth-i:h,y:u(g?f.plotHeight-h:i),width:0,height:0},d),q(c,{width:j.width,height:j.height}),c.rotation?(g={align:c.align,x:d.x+c.x+d.width/2,y:d.y+c.y+d.height/2},b[e?"attr":"animate"](g)):(b.align(c,null,d),g=b.alignAttr,"justify"===m(c.overflow,"justify")?this.justifyDataLabel(b,c,g,j,d,e):m(c.crop,!0)&&(a=f.isInsidePlot(g.x,g.y)&&f.isInsidePlot(g.x+j.width,g.y+j.height)))),a||(b.attr({y:-999}),b.placed=!1)},O.prototype.justifyDataLabel=function(a,b,c,d,e,f){var j,k,g=this.chart,h=b.align,i=b.verticalAlign;j=c.x,0>j&&("right"===h?b.align="left":b.x=-j,k=!0),j=c.x+d.width,j>g.plotWidth&&("left"===h?b.align="right":b.x=g.plotWidth-j,k=!0),j=c.y,0>j&&("bottom"===i?b.verticalAlign="top":b.y=-j,k=!0),j=c.y+d.height,j>g.plotHeight&&("top"===i?b.verticalAlign="bottom":b.y=g.plotHeight-j,k=!0),k&&(a.placed=!f,a.align(b,null,e))},F.pie&&(F.pie.prototype.drawDataLabels=function(){var c,i,j,t,w,x,y,A,C,G,D,B,a=this,b=a.data,d=a.chart,e=a.options.dataLabels,f=m(e.connectorPadding,10),g=m(e.connectorWidth,1),h=d.plotWidth,d=d.plotHeight,k=m(e.softConnector,!0),l=e.distance,o=a.center,n=o[2]/2,q=o[1],r=l>0,z=[[],[]],F=[0,0,0,0],N=function(a,b){return b.y-a.y};if(a.visible&&(e.enabled||a._hasPointLabels)){for(O.prototype.drawDataLabels.apply(a),p(b,function(a){a.dataLabel&&a.visible&&z[a.half].push(a)}),D=0;!y&&b[D];)y=b[D]&&b[D].dataLabel&&(b[D].dataLabel.getBBox().height||21),D++;for(D=2;D--;){var E,b=[],K=[],H=z[D],I=H.length;if(a.sortByAngle(H,D-.5),l>0){for(B=q-n-l;q+n+l>=B;B+=y)b.push(B);if(w=b.length,I>w){for(c=[].concat(H),c.sort(N),B=I;B--;)c[B].rank=B;for(B=I;B--;)H[B].rank>=w&&H.splice(B,1);I=H.length}for(B=0;I>B;B++){c=H[B],x=c.labelPos,c=9999;var Q,P;for(P=0;w>P;P++)Q=M(b[P]-x[1]),c>Q&&(c=Q,E=P);if(B>E&&null!==b[B])E=B;else for(I-B+E>w&&null!==b[B]&&(E=w-I+B);null===b[E];)E++;K.push({i:E,y:b[E]}),b[E]=null}K.sort(N)}for(B=0;I>B;B++)c=H[B],x=c.labelPos,t=c.dataLabel,G=c.visible===!1?"hidden":"visible",c=x[1],l>0?(w=K.pop(),E=w.i,C=w.y,(c>C&&null!==b[E+1]||C>c&&null!==b[E-1])&&(C=c)):C=c,A=e.justify?o[0]+(D?-1:1)*(n+l):a.getX(0===E||E===b.length-1?c:C,D),t._attr={visibility:G,align:x[6]},t._pos={x:A+e.x+({left:f,right:-f}[x[6]]||0),y:C+e.y-10},t.connX=A,t.connY=C,null===this.options.size&&(w=t.width,f>A-w?F[3]=v(u(w-A+f),F[3]):A+w>h-f&&(F[1]=v(u(A+w-h+f),F[1])),0>C-y/2?F[0]=v(u(-C+y/2),F[0]):C+y/2>d&&(F[2]=v(u(C+y/2-d),F[2])))}(0===Ba(F)||this.verifyDataLabelOverflow(F))&&(this.placeDataLabels(),r&&g&&p(this.points,function(b){i=b.connector,x=b.labelPos,(t=b.dataLabel)&&t._pos?(G=t._attr.visibility,A=t.connX,C=t.connY,j=k?["M",A+("left"===x[6]?5:-5),C,"C",A,C,2*x[2]-x[4],2*x[3]-x[5],x[2],x[3],"L",x[4],x[5]]:["M",A+("left"===x[6]?5:-5),C,"L",x[2],x[3],"L",x[4],x[5]],i?(i.animate({d:j}),i.attr("visibility",G)):b.connector=i=a.chart.renderer.path(j).attr({"stroke-width":g,stroke:e.connectorColor||b.color||"#606060",visibility:G}).add(a.dataLabelsGroup)):i&&(b.connector=i.destroy())}))}},F.pie.prototype.placeDataLabels=function(){p(this.points,function(a){var b,a=a.dataLabel;a&&((b=a._pos)?(a.attr(a._attr),a[a.moved?"animate":"attr"](b),a.moved=!0):a&&a.attr({y:-999}))})},F.pie.prototype.alignDataLabel=sa,F.pie.prototype.verifyDataLabelOverflow=function(a){var f,b=this.center,c=this.options,d=c.center,e=c=c.minSize||80;return null!==d[0]?e=v(b[2]-v(a[1],a[3]),c):(e=v(b[2]-a[1]-a[3],c),b[0]+=(a[3]-a[1])/2),null!==d[1]?e=v(C(e,b[2]-v(a[0],a[2])),c):(e=v(C(e,b[2]-a[0]-a[2]),c),b[1]+=(a[0]-a[2])/2),e<b[2]?(b[2]=e,this.translate(b),p(this.points,function(a){a.dataLabel&&(a.dataLabel._pos=null)}),this.drawDataLabels&&this.drawDataLabels()):f=!0,f}),F.column&&(F.column.prototype.alignDataLabel=function(a,b,c,d,e){var f=this.chart,g=f.inverted,h=a.dlBox||a.shapeArgs,i=a.below||a.plotY>m(this.translatedThreshold,f.plotSizeY),j=m(c.inside,!!this.options.stacking);h&&(d=w(h),g&&(d={x:f.plotWidth-d.y-d.height,y:f.plotHeight-d.x-d.width,width:d.height,height:d.width}),!j)&&(g?(d.x+=i?0:d.width,d.width=0):(d.y+=i?d.height:0,d.height=0)),c.align=m(c.align,!g||j?"center":i?"right":"left"),c.verticalAlign=m(c.verticalAlign,g||j?"middle":i?"top":"bottom"),O.prototype.alignDataLabel.call(this,a,b,c,d,e)}),S=R.TrackerMixin={drawTrackerPoint:function(){var a=this,b=a.chart,c=b.pointer,d=a.options.cursor,e=d&&{cursor:d},f=function(c){var e,d=c.target;for(b.hoverSeries!==a&&a.onMouseOver();d&&!e;)e=d.point,d=d.parentNode;e!==t&&e!==b.hoverPoint&&e.onMouseOver(c)};p(a.points,function(a){a.graphic&&(a.graphic.element.point=a),a.dataLabel&&(a.dataLabel.element.point=a)}),a._hasTracking||(p(a.trackerGroups,function(b){a[b]&&(a[b].addClass("highcharts-tracker").on("mouseover",f).on("mouseout",function(a){c.onTrackerMouseOut(a)}).css(e),$a)&&a[b].on("touchstart",f)}),a._hasTracking=!0)},drawTrackerGraph:function(){var m,a=this,b=a.options,c=b.trackByArea,d=[].concat(c?a.areaPath:a.graphPath),e=d.length,f=a.chart,g=f.pointer,h=f.renderer,i=f.options.tooltip.snap,j=a.tracker,k=b.cursor,l=k&&{cursor:k},k=a.singlePoints,n=function(){f.hoverSeries!==a&&a.onMouseOver()},q="rgba(192,192,192,"+(aa?1e-4:.002)+")";if(e&&!c)for(m=e+1;m--;)"M"===d[m]&&d.splice(m+1,0,d[m+1]-i,d[m+2],"L"),(m&&"M"===d[m]||m===e)&&d.splice(m,0,"L",d[m-2]+i,d[m-1]);for(m=0;m<k.length;m++)e=k[m],d.push("M",e.plotX-i,e.plotY,"L",e.plotX+i,e.plotY);j?j.attr({d:d}):(a.tracker=h.path(d).attr({"stroke-linejoin":"round",visibility:a.visible?"visible":"hidden",stroke:q,fill:c?q:Q,"stroke-width":b.lineWidth+(c?0:2*i),zIndex:2}).add(a.group),p([a.tracker,a.markerGroup],function(a){a.addClass("highcharts-tracker").on("mouseover",n).on("mouseout",function(a){g.onTrackerMouseOut(a)}).css(l),$a&&a.on("touchstart",n)}))}},F.column&&(ga.prototype.drawTracker=S.drawTrackerPoint),F.pie&&(F.pie.prototype.drawTracker=S.drawTrackerPoint),F.scatter&&(pa.prototype.drawTracker=S.drawTrackerPoint),q(lb.prototype,{setItemEvents:function(a,b,c,d,e){var f=this;(c?b:a.legendGroup).on("mouseover",function(){a.setState("hover"),b.css(f.options.itemHoverStyle)}).on("mouseout",function(){b.css(a.visible?d:e),a.setState()}).on("click",function(b){var c=function(){a.setVisible()},b={browserEvent:b};a.firePointEvent?a.firePointEvent("legendItemClick",b,c):D(a,"legendItemClick",b,c)})},createCheckboxForItem:function(a){a.checkbox=Y("input",{type:"checkbox",checked:a.selected,defaultChecked:a.selected},this.options.itemCheckboxStyle,this.chart.container),K(a.checkbox,"click",function(b){D(a,"checkboxClick",{checked:b.target.checked},function(){a.select()})})}}),E.legend.itemStyle.cursor="pointer",q(Ya.prototype,{showResetZoom:function(){var a=this,b=E.lang,c=a.options.chart.resetZoomButton,d=c.theme,e=d.states,f="chart"===c.relativeTo?null:"plotBox";this.resetZoomButton=a.renderer.button(b.resetZoom,null,null,function(){a.zoomOut()},d,e&&e.hover).attr({align:c.position.align,title:b.resetZoomTitle}).add().align(c.position,!1,f)},zoomOut:function(){var a=this;D(a,"selection",{resetSelection:!0},function(){a.zoom()})},zoom:function(a){var b,e,c=this.pointer,d=!1;!a||a.resetSelection?p(this.axes,function(a){b=a.zoom()}):p(a.xAxis.concat(a.yAxis),function(a){var e=a.axis,h=e.isXAxis;(c[h?"zoomX":"zoomY"]||c[h?"pinchX":"pinchY"])&&(b=e.zoom(a.min,a.max),e.displayBtn&&(d=!0))}),e=this.resetZoomButton,d&&!e?this.showResetZoom():!d&&ca(e)&&(this.resetZoomButton=e.destroy()),b&&this.redraw(m(this.options.chart.animation,a&&a.animation,this.pointCount<100))},pan:function(a,b){var e,c=this,d=c.hoverPoints;d&&p(d,function(a){a.setState()}),p("xy"===b?[1,0]:[1],function(b){var d=a[b?"chartX":"chartY"],h=c[b?"xAxis":"yAxis"][0],i=c[b?"mouseDownX":"mouseDownY"],j=(h.pointRange||0)/2,k=h.getExtremes(),l=h.toValue(i-d,!0)+j,i=h.toValue(i+c[b?"plotWidth":"plotHeight"]-d,!0)-j;h.series.length&&l>C(k.dataMin,k.min)&&i<v(k.dataMax,k.max)&&(h.setExtremes(l,i,!1,!1,{trigger:"pan"}),e=!0),c[b?"mouseDownX":"mouseDownY"]=d}),e&&c.redraw(!1),G(c.container,{cursor:"move"})}}),q(Ea.prototype,{select:function(a,b){var c=this,d=c.series,e=d.chart,a=m(a,!c.selected);c.firePointEvent(a?"select":"unselect",{accumulate:b},function(){c.selected=c.options.selected=a,d.options.data[Da(c,d.data)]=c.options,c.setState(a&&"select"),b||p(e.getSelectedPoints(),function(a){a.selected&&a!==c&&(a.selected=a.options.selected=!1,d.options.data[Da(a,d.data)]=a.options,a.setState(""),a.firePointEvent("unselect"))})})},onMouseOver:function(a){var b=this.series,c=b.chart,d=c.tooltip,e=c.hoverPoint;e&&e!==this&&e.onMouseOut(),this.firePointEvent("mouseOver"),d&&(!d.shared||b.noSharedTooltip)&&d.refresh(this,a),this.setState("hover"),c.hoverPoint=this},onMouseOut:function(){var a=this.series.chart,b=a.hoverPoints;b&&-1!==Da(this,b)||(this.firePointEvent("mouseOut"),this.setState(),a.hoverPoint=null)},importEvents:function(){if(!this.hasImportedEvents){var b,a=w(this.series.options.point,this.options).events;this.events=a;for(b in a)K(this,b,a[b]);this.hasImportedEvents=!0}},setState:function(a,b){var p,c=this.plotX,d=this.plotY,e=this.series,f=e.options.states,g=ba[e.type].marker&&e.options.marker,h=g&&!g.enabled,i=g&&g.states[a],j=i&&i.enabled===!1,k=e.stateMarkerGraphic,l=this.marker||{},m=e.chart,n=e.halo,a=a||"";p=this.pointAttr[a]||e.pointAttr[a],a===this.state&&!b||this.selected&&"select"!==a||f[a]&&f[a].enabled===!1||a&&(j||h&&i.enabled===!1)||a&&l.states&&l.states[a]&&l.states[a].enabled===!1||(this.graphic?(g=g&&this.graphic.symbolName&&p.r,this.graphic.attr(w(p,g?{x:c-g,y:d-g,width:2*g,height:2*g}:{})),k&&k.hide()):(a&&i&&(g=i.radius,l=l.symbol||e.symbol,k&&k.currentSymbol!==l&&(k=k.destroy()),k?k[b?"animate":"attr"]({x:c-g,y:d-g}):l&&(e.stateMarkerGraphic=k=m.renderer.symbol(l,c-g,d-g,2*g,2*g).attr(p).add(e.markerGroup),k.currentSymbol=l)),k&&k[a&&m.isInsidePlot(c,d,m.inverted)?"show":"hide"]()),(c=f[a]&&f[a].halo)&&c.size?(n||(e.halo=n=m.renderer.path().add(e.seriesGroup)),n.attr(q({fill:ya(this.color||e.color).setOpacity(c.opacity).get()},c.attributes))[b?"animate":"attr"]({d:this.haloPath(c.size)})):n&&n.attr({d:[]}),this.state=a)},haloPath:function(a){var b=this.series,c=b.chart,d=b.getPlotBox(),e=c.inverted;return c.renderer.symbols.circle(d.translateX+(e?b.yAxis.len-this.plotY:this.plotX)-a,d.translateY+(e?b.xAxis.len-this.plotX:this.plotY)-a,2*a,2*a)}}),q(O.prototype,{onMouseOver:function(){var a=this.chart,b=a.hoverSeries;b&&b!==this&&b.onMouseOut(),this.options.events.mouseOver&&D(this,"mouseOver"),this.setState("hover"),a.hoverSeries=this},onMouseOut:function(){var a=this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;d&&d.onMouseOut(),this&&a.events.mouseOut&&D(this,"mouseOut"),c&&!a.stickyTracking&&(!c.shared||this.noSharedTooltip)&&c.hide(),this.setState(),b.hoverSeries=null},setState:function(a){var b=this.options,c=this.graph,d=this.graphNeg,e=b.states,b=b.lineWidth,a=a||"";this.state!==a&&(this.state=a,e[a]&&e[a].enabled===!1||(a&&(b=e[a].lineWidth||b+1),c&&!c.dashstyle&&(a={"stroke-width":b},c.attr(a),d&&d.attr(a))))},setVisible:function(a,b){var f,c=this,d=c.chart,e=c.legendItem,g=d.options.chart.ignoreHiddenSeries,h=c.visible;f=(c.visible=a=c.userOptions.visible=a===t?!h:a)?"show":"hide",p(["group","dataLabelsGroup","markerGroup","tracker"],function(a){c[a]&&c[a][f]()}),d.hoverSeries===c&&c.onMouseOut(),e&&d.legend.colorizeItem(c,a),c.isDirty=!0,c.options.stacking&&p(d.series,function(a){a.options.stacking&&a.visible&&(a.isDirty=!0)}),p(c.linkedSeries,function(b){b.setVisible(a,!1)}),g&&(d.isDirtyBox=!0),b!==!1&&d.redraw(),D(c,f)},setTooltipPoints:function(a){var c,d,h,i,b=[],e=this.xAxis,f=e&&e.getExtremes(),g=e?e.tooltipLen||e.len:this.chart.plotSizeX,j=[];if(this.options.enableMouseTracking!==!1&&!this.singularTooltips){for(a&&(this.tooltipPoints=null),p(this.segments||this.points,function(a){b=b.concat(a)}),e&&e.reversed&&(b=b.reverse()),this.orderTooltipPoints&&this.orderTooltipPoints(b),a=b.length,i=0;a>i;i++)if(e=b[i],c=e.x,c>=f.min&&c<=f.max)for(h=b[i+1],c=d===t?0:d+1,d=b[i+1]?C(v(0,T((e.clientX+(h?h.wrappedClientX||h.clientX:g))/2)),g):g;c>=0&&d>=c;)j[c++]=e;this.tooltipPoints=j}},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(a){this.selected=a=a===t?!this.selected:a,this.checkbox&&(this.checkbox.checked=a),D(this,a?"select":"unselect")},drawTracker:S.drawTrackerGraph}),q(R,{Axis:la,Chart:Ya,Color:ya,Point:Ea,Tick:Sa,Renderer:Za,Series:O,SVGElement:P,SVGRenderer:ta,arrayMin:Na,arrayMax:Ba,charts:V,dateFormat:cb,format:Ia,pathAnim:ub,getOptions:function(){return E},hasBidiBug:Nb,isTouchDevice:Jb,numberFormat:Ga,seriesTypes:F,setOptions:function(a){return E=w(!0,E,a),Cb(),E},addEvent:K,removeEvent:W,createElement:Y,discardElement:Pa,css:G,each:p,extend:q,map:Ua,merge:w,pick:m,splat:qa,extendClass:ka,pInt:z,wrap:Ma,svg:aa,canvas:fa,vml:!aa&&!fa,product:"Highcharts",version:"4.0.1"})}(),jQuery(document).ready(function($){$("#close-share").click(function(){$.cookie("ignore_social_share",1,{expires:30})}),$(".big-button--share").click(function(){$.cookie("ignore_social_share",1)}),$.cookie("ignore_social_share")||leadin_check_social_share_popup(),$("#filter_action").select2(),$("#filter_action").change(function(){var $this=$(this);"submitted"==$this.val()?$("#form-filter-input").show():($("#form-filter-input").hide(),$("#filter_form").select2("val","any form"))}),$("#view-all-do-not-track-selectors").click(function(){$(".form-do-not-track, #view-less-do-not-track-selectors").not(".do-not-track-always-show").show(),$("#view-all-do-not-track-selectors").hide()}),$("#view-less-do-not-track-selectors").click(function(){$(".form-do-not-track, #view-less-do-not-track-selectors").not(".do-not-track-always-show").hide(),$("#view-all-do-not-track-selectors").show()}),$("#filter_content").select2({query:function(query){var key=query.term;$.ajax({type:"POST",url:li_admin_ajax.ajax_url,data:{action:"leadin_get_posts_and_pages",search_term:key},success:function(data){var i,json_data=jQuery.parseJSON(data),data_test={results:[]};for(i=0;i<json_data.length;i++)data_test.results.push({id:json_data[i].post_title,text:json_data[i].post_title});query.callback(data_test)}})},initSelection:function(){$("#filter_content").val()?$("#filter_content").select2("data",{id:$("#filter_content").val(),text:$("#filter_content").val()}):$("#filter_content").select2("data",{id:"any page",text:"any page"})}}),$("#filter_form").select2({query:function(query){var key=query.term;$.ajax({type:"POST",url:li_admin_ajax.ajax_url,data:{action:"leadin_get_form_selectors",search_term:key},success:function(data){var i,json_data=jQuery.parseJSON(data),data_test={results:[]};for(i=0;i<json_data.length;i++)data_test.results.push({id:json_data[i],text:json_data[i]});query.callback(data_test)}})},initSelection:function(){$("#filter_form").val()?$("#filter_form").select2("data",{id:$("#filter_form").val(),text:$("#filter_form").val()}):$("#filter_form").select2("data",{id:"any form",text:"any form"})}}),$("#leadin-contact-status").change(function(){$("#leadin-contact-status-button").addClass("button-primary")}),$("input[name=popup-position]:radio").change(function(){$("#btn-activate-subscribe").attr("href",window.location.href+"&leadin_action=activate&power_up=subscribe_widget&redirect_to="+encodeURIComponent(window.location.href+"&activate_popup=true&popup_position="+$("input:radio[name='popup-position']:checked").val()))}),$("#li_subscribe_vex_class, #li_subscribe_heading, #li_subscribe_text, #li_subscribe_btn_label, #li_subscribe_btn_color, #li_subscribe_name_fields:checkbox, #li_subscribe_phone_field:checkbox").change(function(){var preview_link=$("#wp-admin-bar-view-site a.ab-item").attr("href")+"?preview-subscribe=1";preview_link+="&lis_heading="+$("#li_subscribe_heading").val(),preview_link+="&lis_desc="+$("#li_subscribe_text").val(),preview_link+="&lis_show_names="+($("#li_subscribe_name_fields").is(":checked")?1:0),preview_link+="&lis_show_phone="+($("#li_subscribe_phone_field").is(":checked")?1:0),preview_link+="&lis_btn_label="+$("#li_subscribe_btn_label").val(),preview_link+="&lis_btn_color="+$("#li_subscribe_btn_color").val(),preview_link+="&lis_vex_class="+$("#li_subscribe_vex_class option:selected").val(),$("#preview-popup-link").attr("href",preview_link)}),$("#pro-upgrade-button").click(function(e){return e.preventDefault(),$("#agree-pp").is(":checked")?($("#agree-pp-error").hide(),$(this).addClass("btn-submitting").text("Upgrading..."),void $.ajax({type:"POST",url:li_admin_ajax.ajax_url,data:{action:"leadin_upgrade_to_pro"},success:function(redirect_to){redirect_to&&(window.location.href=redirect_to+"&pro_upgrade=1")}})):($("#agree-pp-error").show(),!1)})}),jQuery(document).ready(function($){var $bulk_opt_selected=$('.bulkactions select option[value="add_tag_to_selected"], .bulkactions select option[value="remove_tag_from_selected"], .bulkactions select option[value="delete_selected"]');$("#leadin-contacts input:checkbox").not("thead input:checkbox, tfoot input:checkbox").bind("change",function(){var cb_count=0,selected_vals="",$btn_selected=$("#leadin-export-selected-leads"),$input_selected_vals=$(".leadin-selected-contacts"),$cb_selected=$("#leadin-contacts input:checkbox:checked").not("thead input:checkbox, tfoot input:checkbox");$cb_selected.length>0?($btn_selected.attr("disabled",!1),$bulk_opt_selected.attr("disabled",!1)):($btn_selected.attr("disabled",!0),$bulk_opt_selected.attr("disabled",!0)),$cb_selected.each(function(){selected_vals+=$(this).val(),cb_count!=$cb_selected.length-1&&(selected_vals+=","),cb_count++}),$input_selected_vals.val(selected_vals),$(".selected-contacts-count").text(cb_count)}),$("#cb-select-all-1, #cb-select-all-2").bind("change",function(){var cb_count=0,selected_vals="",$this=$(this),$btn_selected=$("#leadin-export-selected-leads"),$cb_selected=$("#leadin-contacts input:checkbox").not("thead input:checkbox, tfoot input:checkbox"),$input_selected_vals=$(".leadin-selected-contacts");$cb_selected.each(function(){selected_vals+=$(this).val(),cb_count!=$cb_selected.length-1&&(selected_vals+=","),cb_count++}),$input_selected_vals.val(selected_vals),$this.is(":checked")?($btn_selected.attr("disabled",!1),$bulk_opt_selected.attr("disabled",!1)):($btn_selected.attr("disabled",!0),$bulk_opt_selected.attr("disabled",!0),$(".selected-contacts-count").text($("#contact-count").text())),$(".selected-contacts-count").text(cb_count)}),$(".postbox .handlediv").bind("click",function(){var $postbox=$(this).parent();$postbox.hasClass("closed")?$postbox.removeClass("closed"):$postbox.addClass("closed")}),$(".selected-contacts-count").text($("#contact-count").text()),$bulk_opt_selected.attr("disabled",!0),$(".bulkactions select").change(function(){{var $this=$(this);$("#contact-count").text()}"add_tag_to_all"==$this.val()||"add_tag_to_selected"==$this.val()?($("#bulk-edit-tags h2").html($("#bulk-edit-tags h2").html().replace("remove from","add to")),$("#bulk-edit-button").val("Add Tag"),$("#bulk-edit-tag-action").val("add_tag"),tb_show("","#TB_inline?width=400&height=175&inlineId=bulk-edit-tags"),$(".bulkactions select").val("-1")):("remove_tag_from_all"==$this.val()||"remove_tag_from_selected"==$this.val())&&($("#bulk-edit-tags h2").html($("#bulk-edit-tags h2").html().replace("add to","remove from")),$("#bulk-edit-button").val("Remove Tag"),$("#bulk-edit-tag-action").val("remove_tag"),tb_show("","#TB_inline?width=400&height=175&inlineId=bulk-edit-tags"),$(".bulkactions select").val("-1"))}),$("#contact-detail-read-more").click(function(){$("#company-detail-overview-short").hide(),$("#company-detail-overview-full").show()}),$("#contact-detail-read-less").click(function(){$("#company-detail-overview-full").hide(),$("#company-detail-overview-short").show()})}),function($){"undefined"==typeof $.fn.each2&&$.extend($.fn,{each2:function(c){for(var j=$([0]),i=-1,l=this.length;++i<l&&(j.context=j[0]=this[i])&&c.call(j[0],i,j)!==!1;);return this}})}(jQuery),function($,undefined){"use strict";function reinsertElement(element){var placeholder=$(document.createTextNode(""));
6
+ element.before(placeholder),placeholder.before(element),placeholder.remove()}function stripDiacritics(str){function match(a){return DIACRITICS[a]||a}return str.replace(/[^\u0000-\u007E]/g,match)}function indexOf(value,array){for(var i=0,l=array.length;l>i;i+=1)if(equal(value,array[i]))return i;return-1}function measureScrollbar(){var $template=$(MEASURE_SCROLLBAR_TEMPLATE);$template.appendTo("body");var dim={width:$template.width()-$template[0].clientWidth,height:$template.height()-$template[0].clientHeight};return $template.remove(),dim}function equal(a,b){return a===b?!0:a===undefined||b===undefined?!1:null===a||null===b?!1:a.constructor===String?a+""==b+"":b.constructor===String?b+""==a+"":!1}function splitVal(string,separator){var val,i,l;if(null===string||string.length<1)return[];for(val=string.split(separator),i=0,l=val.length;l>i;i+=1)val[i]=$.trim(val[i]);return val}function getSideBorderPadding(element){return element.outerWidth(!1)-element.width()}function installKeyUpChangeEvent(element){var key="keyup-change-value";element.on("keydown",function(){$.data(element,key)===undefined&&$.data(element,key,element.val())}),element.on("keyup",function(){var val=$.data(element,key);val!==undefined&&element.val()!==val&&($.removeData(element,key),element.trigger("keyup-change"))})}function installFilteredMouseMove(element){element.on("mousemove",function(e){var lastpos=lastMousePosition;(lastpos===undefined||lastpos.x!==e.pageX||lastpos.y!==e.pageY)&&$(e.target).trigger("mousemove-filtered",e)})}function debounce(quietMillis,fn,ctx){ctx=ctx||undefined;var timeout;return function(){var args=arguments;window.clearTimeout(timeout),timeout=window.setTimeout(function(){fn.apply(ctx,args)},quietMillis)}}function installDebouncedScroll(threshold,element){var notify=debounce(threshold,function(e){element.trigger("scroll-debounced",e)});element.on("scroll",function(e){indexOf(e.target,element.get())>=0&&notify(e)})}function focus($el){$el[0]!==document.activeElement&&window.setTimeout(function(){var range,el=$el[0],pos=$el.val().length;$el.focus();var isVisible=el.offsetWidth>0||el.offsetHeight>0;isVisible&&el===document.activeElement&&(el.setSelectionRange?el.setSelectionRange(pos,pos):el.createTextRange&&(range=el.createTextRange(),range.collapse(!1),range.select()))},0)}function getCursorInfo(el){el=$(el)[0];var offset=0,length=0;if("selectionStart"in el)offset=el.selectionStart,length=el.selectionEnd-offset;else if("selection"in document){el.focus();var sel=document.selection.createRange();length=document.selection.createRange().text.length,sel.moveStart("character",-el.value.length),offset=sel.text.length-length}return{offset:offset,length:length}}function killEvent(event){event.preventDefault(),event.stopPropagation()}function killEventImmediately(event){event.preventDefault(),event.stopImmediatePropagation()}function measureTextWidth(e){if(!sizer){var style=e[0].currentStyle||window.getComputedStyle(e[0],null);sizer=$(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:style.fontSize,fontFamily:style.fontFamily,fontStyle:style.fontStyle,fontWeight:style.fontWeight,letterSpacing:style.letterSpacing,textTransform:style.textTransform,whiteSpace:"nowrap"}),sizer.attr("class","select2-sizer"),$("body").append(sizer)}return sizer.text(e.val()),sizer.width()}function syncCssClasses(dest,src,adapter){var classes,adapted,replacements=[];classes=dest.attr("class"),classes&&(classes=""+classes,$(classes.split(" ")).each2(function(){0===this.indexOf("select2-")&&replacements.push(this)})),classes=src.attr("class"),classes&&(classes=""+classes,$(classes.split(" ")).each2(function(){0!==this.indexOf("select2-")&&(adapted=adapter(this),adapted&&replacements.push(adapted))})),dest.attr("class",replacements.join(" "))}function markMatch(text,term,markup,escapeMarkup){var match=stripDiacritics(text.toUpperCase()).indexOf(stripDiacritics(term.toUpperCase())),tl=term.length;return 0>match?void markup.push(escapeMarkup(text)):(markup.push(escapeMarkup(text.substring(0,match))),markup.push("<span class='select2-match'>"),markup.push(escapeMarkup(text.substring(match,match+tl))),markup.push("</span>"),void markup.push(escapeMarkup(text.substring(match+tl,text.length))))}function defaultEscapeMarkup(markup){var replace_map={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return String(markup).replace(/[&<>"'\/\\]/g,function(match){return replace_map[match]})}function ajax(options){var timeout,handler=null,quietMillis=options.quietMillis||100,ajaxUrl=options.url,self=this;return function(query){window.clearTimeout(timeout),timeout=window.setTimeout(function(){var data=options.data,url=ajaxUrl,transport=options.transport||$.fn.select2.ajaxDefaults.transport,deprecated={type:options.type||"GET",cache:options.cache||!1,jsonpCallback:options.jsonpCallback||undefined,dataType:options.dataType||"json"},params=$.extend({},$.fn.select2.ajaxDefaults.params,deprecated);data=data?data.call(self,query.term,query.page,query.context):null,url="function"==typeof url?url.call(self,query.term,query.page,query.context):url,handler&&"function"==typeof handler.abort&&handler.abort(),options.params&&($.isFunction(options.params)?$.extend(params,options.params.call(self)):$.extend(params,options.params)),$.extend(params,{url:url,dataType:options.dataType,data:data,success:function(data){var results=options.results(data,query.page);query.callback(results)}}),handler=transport.call(self,params)},quietMillis)}}function local(options){var dataText,tmp,data=options,text=function(item){return""+item.text};$.isArray(data)&&(tmp=data,data={results:tmp}),$.isFunction(data)===!1&&(tmp=data,data=function(){return tmp});var dataItem=data();return dataItem.text&&(text=dataItem.text,$.isFunction(text)||(dataText=dataItem.text,text=function(item){return item[dataText]})),function(query){var process,t=query.term,filtered={results:[]};return""===t?void query.callback(data()):(process=function(datum,collection){var group,attr;if(datum=datum[0],datum.children){group={};for(attr in datum)datum.hasOwnProperty(attr)&&(group[attr]=datum[attr]);group.children=[],$(datum.children).each2(function(i,childDatum){process(childDatum,group.children)}),(group.children.length||query.matcher(t,text(group),datum))&&collection.push(group)}else query.matcher(t,text(datum),datum)&&collection.push(datum)},$(data().results).each2(function(i,datum){process(datum,filtered.results)}),void query.callback(filtered))}}function tags(data){var isFunc=$.isFunction(data);return function(query){var t=query.term,filtered={results:[]},result=isFunc?data(query):data;$.isArray(result)&&($(result).each(function(){var isObject=this.text!==undefined,text=isObject?this.text:this;(""===t||query.matcher(t,text))&&filtered.results.push(isObject?this:{id:this,text:this})}),query.callback(filtered))}}function checkFormatter(formatter,formatterName){if($.isFunction(formatter))return!0;if(!formatter)return!1;if("string"==typeof formatter)return!0;throw new Error(formatterName+" must be a string, function, or falsy value")}function evaluate(val){if($.isFunction(val)){var args=Array.prototype.slice.call(arguments,1);return val.apply(null,args)}return val}function countResults(results){var count=0;return $.each(results,function(i,item){item.children?count+=countResults(item.children):count++}),count}function defaultTokenizer(input,selection,selectCallback,opts){var token,index,i,l,separator,original=input,dupe=!1;if(!opts.createSearchChoice||!opts.tokenSeparators||opts.tokenSeparators.length<1)return undefined;for(;;){for(index=-1,i=0,l=opts.tokenSeparators.length;l>i&&(separator=opts.tokenSeparators[i],index=input.indexOf(separator),!(index>=0));i++);if(0>index)break;if(token=input.substring(0,index),input=input.substring(index+separator.length),token.length>0&&(token=opts.createSearchChoice.call(this,token,selection),token!==undefined&&null!==token&&opts.id(token)!==undefined&&null!==opts.id(token))){for(dupe=!1,i=0,l=selection.length;l>i;i++)if(equal(opts.id(token),opts.id(selection[i]))){dupe=!0;break}dupe||selectCallback(token)}}return original!==input?input:void 0}function cleanupJQueryElements(){var self=this;Array.prototype.forEach.call(arguments,function(element){self[element].remove(),self[element]=null})}function clazz(SuperClass,methods){var constructor=function(){};return constructor.prototype=new SuperClass,constructor.prototype.constructor=constructor,constructor.prototype.parent=SuperClass.prototype,constructor.prototype=$.extend(constructor.prototype,methods),constructor}if(window.Select2===undefined){var KEY,AbstractSelect2,SingleSelect2,MultiSelect2,nextUid,sizer,$document,scrollBarDimensions,lastMousePosition={x:0,y:0},KEY={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(k){switch(k=k.which?k.which:k){case KEY.LEFT:case KEY.RIGHT:case KEY.UP:case KEY.DOWN:return!0}return!1},isControl:function(e){var k=e.which;switch(k){case KEY.SHIFT:case KEY.CTRL:case KEY.ALT:return!0}return e.metaKey?!0:!1},isFunctionKey:function(k){return k=k.which?k.which:k,k>=112&&123>=k}},MEASURE_SCROLLBAR_TEMPLATE="<div class='select2-measure-scrollbar'></div>",DIACRITICS={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z"};$document=$(document),nextUid=function(){var counter=1;return function(){return counter++}}(),$document.on("mousemove",function(e){lastMousePosition.x=e.pageX,lastMousePosition.y=e.pageY}),AbstractSelect2=clazz(Object,{bind:function(func){var self=this;return function(){func.apply(self,arguments)}},init:function(opts){var results,search,resultsSelector=".select2-results";this.opts=opts=this.prepareOpts(opts),this.id=opts.id,opts.element.data("select2")!==undefined&&null!==opts.element.data("select2")&&opts.element.data("select2").destroy(),this.container=this.createContainer(),this.liveRegion=$("<span>",{role:"status","aria-live":"polite"}).addClass("select2-hidden-accessible").appendTo(document.body),this.containerId="s2id_"+(opts.element.attr("id")||"autogen"+nextUid()),this.containerEventName=this.containerId.replace(/([.])/g,"_").replace(/([;&,\-\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.container.attr("title",opts.element.attr("title")),this.body=$("body"),syncCssClasses(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr("style",opts.element.attr("style")),this.container.css(evaluate(opts.containerCss)),this.container.addClass(evaluate(opts.containerCssClass)),this.elementTabIndex=this.opts.element.attr("tabindex"),this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",killEvent),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),syncCssClasses(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(evaluate(opts.dropdownCssClass)),this.dropdown.data("select2",this),this.dropdown.on("click",killEvent),this.results=results=this.container.find(resultsSelector),this.search=search=this.container.find("input.select2-input"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),this.container.on("click",killEvent),installFilteredMouseMove(this.results),this.dropdown.on("mousemove-filtered",resultsSelector,this.bind(this.highlightUnderEvent)),this.dropdown.on("touchstart touchmove touchend",resultsSelector,this.bind(function(event){this._touchEvent=!0,this.highlightUnderEvent(event)})),this.dropdown.on("touchmove",resultsSelector,this.bind(this.touchMoved)),this.dropdown.on("touchstart touchend",resultsSelector,this.bind(this.clearTouchMoved)),this.dropdown.on("click",this.bind(function(){this._touchEvent&&(this._touchEvent=!1,this.selectHighlighted())})),installDebouncedScroll(80,this.results),this.dropdown.on("scroll-debounced",resultsSelector,this.bind(this.loadMoreIfNeeded)),$(this.container).on("change",".select2-input",function(e){e.stopPropagation()}),$(this.dropdown).on("change",".select2-input",function(e){e.stopPropagation()}),$.fn.mousewheel&&results.mousewheel(function(e,delta,deltaX,deltaY){var top=results.scrollTop();deltaY>0&&0>=top-deltaY?(results.scrollTop(0),killEvent(e)):0>deltaY&&results.get(0).scrollHeight-results.scrollTop()+deltaY<=results.height()&&(results.scrollTop(results.get(0).scrollHeight-results.height()),killEvent(e))}),installKeyUpChangeEvent(search),search.on("keyup-change input paste",this.bind(this.updateResults)),search.on("focus",function(){search.addClass("select2-focused")}),search.on("blur",function(){search.removeClass("select2-focused")}),this.dropdown.on("mouseup",resultsSelector,this.bind(function(e){$(e.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(e),this.selectHighlighted(e))})),this.dropdown.on("click mouseup mousedown touchstart touchend focusin",function(e){e.stopPropagation()}),this.nextSearchTerm=undefined,$.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==opts.maximumInputLength&&this.search.attr("maxlength",opts.maximumInputLength);var disabled=opts.element.prop("disabled");disabled===undefined&&(disabled=!1),this.enable(!disabled);var readonly=opts.element.prop("readonly");readonly===undefined&&(readonly=!1),this.readonly(readonly),scrollBarDimensions=scrollBarDimensions||measureScrollbar(),this.autofocus=opts.element.prop("autofocus"),opts.element.prop("autofocus",!1),this.autofocus&&this.focus(),this.search.attr("placeholder",opts.searchInputPlaceholder)},destroy:function(){var element=this.opts.element,select2=element.data("select2");this.close(),this.propertyObserver&&(this.propertyObserver.disconnect(),this.propertyObserver=null),select2!==undefined&&(select2.container.remove(),select2.liveRegion.remove(),select2.dropdown.remove(),element.removeClass("select2-offscreen").removeData("select2").off(".select2").prop("autofocus",this.autofocus||!1),this.elementTabIndex?element.attr({tabindex:this.elementTabIndex}):element.removeAttr("tabindex"),element.show()),cleanupJQueryElements.call(this,"container","liveRegion","dropdown","results","search")},optionToData:function(element){return element.is("option")?{id:element.prop("value"),text:element.text(),element:element.get(),css:element.attr("class"),disabled:element.prop("disabled"),locked:equal(element.attr("locked"),"locked")||equal(element.data("locked"),!0)}:element.is("optgroup")?{text:element.attr("label"),children:[],element:element.get(),css:element.attr("class")}:void 0},prepareOpts:function(opts){var element,select,idKey,ajaxUrl,self=this;if(element=opts.element,"select"===element.get(0).tagName.toLowerCase()&&(this.select=select=opts.element),select&&$.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in opts)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),opts=$.extend({},{populateResults:function(container,results,query){var populate,id=this.opts.id,liveRegion=this.liveRegion;(populate=function(results,container,depth){var i,l,result,selectable,disabled,compound,node,label,innerContainer,formatted;for(results=opts.sortResults(results,container,query),i=0,l=results.length;l>i;i+=1)result=results[i],disabled=result.disabled===!0,selectable=!disabled&&id(result)!==undefined,compound=result.children&&result.children.length>0,node=$("<li></li>"),node.addClass("select2-results-dept-"+depth),node.addClass("select2-result"),node.addClass(selectable?"select2-result-selectable":"select2-result-unselectable"),disabled&&node.addClass("select2-disabled"),compound&&node.addClass("select2-result-with-children"),node.addClass(self.opts.formatResultCssClass(result)),node.attr("role","presentation"),label=$(document.createElement("div")),label.addClass("select2-result-label"),label.attr("id","select2-result-label-"+nextUid()),label.attr("role","option"),formatted=opts.formatResult(result,label,query,self.opts.escapeMarkup),formatted!==undefined&&(label.html(formatted),node.append(label)),compound&&(innerContainer=$("<ul></ul>"),innerContainer.addClass("select2-result-sub"),populate(result.children,innerContainer,depth+1),node.append(innerContainer)),node.data("select2-data",result),container.append(node);liveRegion.text(opts.formatMatches(results.length))})(results,container,0)}},$.fn.select2.defaults,opts),"function"!=typeof opts.id&&(idKey=opts.id,opts.id=function(e){return e[idKey]}),$.isArray(opts.element.data("select2Tags"))){if("tags"in opts)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+opts.element.attr("id");opts.tags=opts.element.data("select2Tags")}if(select?(opts.query=this.bind(function(query){var children,placeholderOption,process,data={results:[],more:!1},term=query.term;process=function(element,collection){var group;element.is("option")?query.matcher(term,element.text(),element)&&collection.push(self.optionToData(element)):element.is("optgroup")&&(group=self.optionToData(element),element.children().each2(function(i,elm){process(elm,group.children)}),group.children.length>0&&collection.push(group))},children=element.children(),this.getPlaceholder()!==undefined&&children.length>0&&(placeholderOption=this.getPlaceholderOption(),placeholderOption&&(children=children.not(placeholderOption))),children.each2(function(i,elm){process(elm,data.results)}),query.callback(data)}),opts.id=function(e){return e.id}):"query"in opts||("ajax"in opts?(ajaxUrl=opts.element.data("ajax-url"),ajaxUrl&&ajaxUrl.length>0&&(opts.ajax.url=ajaxUrl),opts.query=ajax.call(opts.element,opts.ajax)):"data"in opts?opts.query=local(opts.data):"tags"in opts&&(opts.query=tags(opts.tags),opts.createSearchChoice===undefined&&(opts.createSearchChoice=function(term){return{id:$.trim(term),text:$.trim(term)}}),opts.initSelection===undefined&&(opts.initSelection=function(element,callback){var data=[];$(splitVal(element.val(),opts.separator)).each(function(){var obj={id:this,text:this},tags=opts.tags;$.isFunction(tags)&&(tags=tags()),$(tags).each(function(){return equal(this.id,obj.id)?(obj=this,!1):void 0}),data.push(obj)}),callback(data)}))),"function"!=typeof opts.query)throw"query function not defined for Select2 "+opts.element.attr("id");if("top"===opts.createSearchChoicePosition)opts.createSearchChoicePosition=function(list,item){list.unshift(item)};else if("bottom"===opts.createSearchChoicePosition)opts.createSearchChoicePosition=function(list,item){list.push(item)};else if("function"!=typeof opts.createSearchChoicePosition)throw"invalid createSearchChoicePosition option must be 'top', 'bottom' or a custom function";return opts},monitorSource:function(){var sync,observer,el=this.opts.element;el.on("change.select2",this.bind(function(){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),sync=this.bind(function(){var disabled=el.prop("disabled");disabled===undefined&&(disabled=!1),this.enable(!disabled);var readonly=el.prop("readonly");readonly===undefined&&(readonly=!1),this.readonly(readonly),syncCssClasses(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(evaluate(this.opts.containerCssClass)),syncCssClasses(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(evaluate(this.opts.dropdownCssClass))}),el.length&&el[0].attachEvent&&el.each(function(){this.attachEvent("onpropertychange",sync)}),observer=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,observer!==undefined&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new observer(function(mutations){mutations.forEach(sync)}),this.propertyObserver.observe(el.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(data){var evt=$.Event("select2-selecting",{val:this.id(data),object:data});return this.opts.element.trigger(evt),!evt.isDefaultPrevented()},triggerChange:function(details){details=details||{},details=$.extend({},details,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(details),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},isInterfaceEnabled:function(){return this.enabledInterface===!0},enableInterface:function(){var enabled=this._enabled&&!this._readonly,disabled=!enabled;return enabled===this.enabledInterface?!1:(this.container.toggleClass("select2-container-disabled",disabled),this.close(),this.enabledInterface=enabled,!0)},enable:function(enabled){enabled===undefined&&(enabled=!0),this._enabled!==enabled&&(this._enabled=enabled,this.opts.element.prop("disabled",!enabled),this.enableInterface())},disable:function(){this.enable(!1)},readonly:function(enabled){enabled===undefined&&(enabled=!1),this._readonly!==enabled&&(this._readonly=enabled,this.opts.element.prop("readonly",enabled),this.enableInterface())},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var bodyOffset,above,changeDirection,css,resultsListNode,$dropdown=this.dropdown,offset=this.container.offset(),height=this.container.outerHeight(!1),width=this.container.outerWidth(!1),dropHeight=$dropdown.outerHeight(!1),$window=$(window),windowWidth=$window.width(),windowHeight=$window.height(),viewPortRight=$window.scrollLeft()+windowWidth,viewportBottom=$window.scrollTop()+windowHeight,dropTop=offset.top+height,dropLeft=offset.left,enoughRoomBelow=viewportBottom>=dropTop+dropHeight,enoughRoomAbove=offset.top-dropHeight>=$window.scrollTop(),dropWidth=$dropdown.outerWidth(!1),enoughRoomOnRight=viewPortRight>=dropLeft+dropWidth,aboveNow=$dropdown.hasClass("select2-drop-above");aboveNow?(above=!0,!enoughRoomAbove&&enoughRoomBelow&&(changeDirection=!0,above=!1)):(above=!1,!enoughRoomBelow&&enoughRoomAbove&&(changeDirection=!0,above=!0)),changeDirection&&($dropdown.hide(),offset=this.container.offset(),height=this.container.outerHeight(!1),width=this.container.outerWidth(!1),dropHeight=$dropdown.outerHeight(!1),viewPortRight=$window.scrollLeft()+windowWidth,viewportBottom=$window.scrollTop()+windowHeight,dropTop=offset.top+height,dropLeft=offset.left,dropWidth=$dropdown.outerWidth(!1),enoughRoomOnRight=viewPortRight>=dropLeft+dropWidth,$dropdown.show(),this.focusSearch()),this.opts.dropdownAutoWidth?(resultsListNode=$(".select2-results",$dropdown)[0],$dropdown.addClass("select2-drop-auto-width"),$dropdown.css("width",""),dropWidth=$dropdown.outerWidth(!1)+(resultsListNode.scrollHeight===resultsListNode.clientHeight?0:scrollBarDimensions.width),dropWidth>width?width=dropWidth:dropWidth=width,dropHeight=$dropdown.outerHeight(!1),enoughRoomOnRight=viewPortRight>=dropLeft+dropWidth):this.container.removeClass("select2-drop-auto-width"),"static"!==this.body.css("position")&&(bodyOffset=this.body.offset(),dropTop-=bodyOffset.top,dropLeft-=bodyOffset.left),enoughRoomOnRight||(dropLeft=offset.left+this.container.outerWidth(!1)-dropWidth),css={left:dropLeft,width:width},above?(css.top=offset.top-dropHeight,css.bottom="auto",this.container.addClass("select2-drop-above"),$dropdown.addClass("select2-drop-above")):(css.top=dropTop,css.bottom="auto",this.container.removeClass("select2-drop-above"),$dropdown.removeClass("select2-drop-above")),css=$.extend(css,evaluate(this.opts.dropdownCss)),$dropdown.css(css)},shouldOpen:function(){var event;return this.opened()?!1:this._enabled===!1||this._readonly===!0?!1:(event=$.Event("select2-opening"),this.opts.element.trigger(event),!event.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(this.opening(),!0):!1},opening:function(){var mask,cid=this.containerEventName,scroll="scroll."+cid,resize="resize."+cid,orient="orientationchange."+cid;this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.clearDropdownAlignmentPreference(),this.dropdown[0]!==this.body.children().last()[0]&&this.dropdown.detach().appendTo(this.body),mask=$("#select2-drop-mask"),0==mask.length&&(mask=$(document.createElement("div")),mask.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),mask.hide(),mask.appendTo(this.body),mask.on("mousedown touchstart click",function(e){reinsertElement(mask);var self,dropdown=$("#select2-drop");dropdown.length>0&&(self=dropdown.data("select2"),self.opts.selectOnBlur&&self.selectHighlighted({noFocus:!0}),self.close(),e.preventDefault(),e.stopPropagation())})),this.dropdown.prev()[0]!==mask[0]&&this.dropdown.before(mask),$("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),mask.show(),this.positionDropdown(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active");var that=this;this.container.parents().add(window).each(function(){$(this).on(resize+" "+scroll+" "+orient,function(){that.opened()&&that.positionDropdown()})})},close:function(){if(this.opened()){var cid=this.containerEventName,scroll="scroll."+cid,resize="resize."+cid,orient="orientationchange."+cid;this.container.parents().add(window).each(function(){$(this).off(scroll).off(resize).off(orient)}),this.clearDropdownAlignmentPreference(),$("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active"),this.results.empty(),this.clearSearch(),this.search.removeClass("select2-active"),this.opts.element.trigger($.Event("select2-close"))
7
  }},externalSearch:function(term){this.open(),this.search.val(term),this.updateResults(!1)},clearSearch:function(){},getMaximumSelectionSize:function(){return evaluate(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var children,index,child,hb,rb,y,more,results=this.results;if(index=this.highlight(),!(0>index)){if(0==index)return void results.scrollTop(0);children=this.findHighlightableChoices().find(".select2-result-label"),child=$(children[index]),hb=child.offset().top+child.outerHeight(!0),index===children.length-1&&(more=results.find("li.select2-more-results"),more.length>0&&(hb=more.offset().top+more.outerHeight(!0))),rb=results.offset().top+results.outerHeight(!0),hb>rb&&results.scrollTop(results.scrollTop()+(hb-rb)),y=child.offset().top-results.offset().top,0>y&&"none"!=child.css("display")&&results.scrollTop(results.scrollTop()+y)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-disabled):not(.select2-selected)")},moveHighlight:function(delta){for(var choices=this.findHighlightableChoices(),index=this.highlight();index>-1&&index<choices.length;){index+=delta;var choice=$(choices[index]);if(choice.hasClass("select2-result-selectable")&&!choice.hasClass("select2-disabled")&&!choice.hasClass("select2-selected")){this.highlight(index);break}}},highlight:function(index){var choice,data,choices=this.findHighlightableChoices();return 0===arguments.length?indexOf(choices.filter(".select2-highlighted")[0],choices.get()):(index>=choices.length&&(index=choices.length-1),0>index&&(index=0),this.removeHighlight(),choice=$(choices[index]),choice.addClass("select2-highlighted"),this.search.attr("aria-activedescendant",choice.find(".select2-result-label").attr("id")),this.ensureHighlightVisible(),this.liveRegion.text(choice.text()),data=choice.data("select2-data"),void(data&&this.opts.element.trigger({type:"select2-highlight",val:this.id(data),choice:data})))},removeHighlight:function(){this.results.find(".select2-highlighted").removeClass("select2-highlighted")},touchMoved:function(){this._touchMoved=!0},clearTouchMoved:function(){this._touchMoved=!1},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(event){var el=$(event.target).closest(".select2-result-selectable");if(el.length>0&&!el.is(".select2-highlighted")){var choices=this.findHighlightableChoices();this.highlight(choices.index(el))}else 0==el.length&&this.removeHighlight()},loadMoreIfNeeded:function(){var below,results=this.results,more=results.find("li.select2-more-results"),page=this.resultsPage+1,self=this,term=this.search.val(),context=this.context;0!==more.length&&(below=more.offset().top-results.offset().top-results.height(),below<=this.opts.loadMorePadding&&(more.addClass("select2-active"),this.opts.query({element:this.opts.element,term:term,page:page,context:context,matcher:this.opts.matcher,callback:this.bind(function(data){self.opened()&&(self.opts.populateResults.call(this,results,data.results,{term:term,page:page,context:context}),self.postprocessResults(data,!1,!1),data.more===!0?(more.detach().appendTo(results).text(evaluate(self.opts.formatLoadMore,page+1)),window.setTimeout(function(){self.loadMoreIfNeeded()},10)):more.remove(),self.positionDropdown(),self.resultsPage=page,self.context=data.context,this.opts.element.trigger({type:"select2-loaded",items:data}))})})))},tokenize:function(){},updateResults:function(initial){function postRender(){search.removeClass("select2-active"),self.positionDropdown(),self.liveRegion.text(results.find(".select2-no-results,.select2-selection-limit,.select2-searching").length?results.text():self.opts.formatMatches(results.find(".select2-result-selectable").length))}function render(html){results.html(html),postRender()}var data,input,queryNumber,search=this.search,results=this.results,opts=this.opts,self=this,term=search.val(),lastTerm=$.data(this.container,"select2-last-term");if((initial===!0||!lastTerm||!equal(term,lastTerm))&&($.data(this.container,"select2-last-term",term),initial===!0||this.showSearchInput!==!1&&this.opened())){queryNumber=++this.queryCount;var maxSelSize=this.getMaximumSelectionSize();if(maxSelSize>=1&&(data=this.data(),$.isArray(data)&&data.length>=maxSelSize&&checkFormatter(opts.formatSelectionTooBig,"formatSelectionTooBig")))return void render("<li class='select2-selection-limit'>"+evaluate(opts.formatSelectionTooBig,maxSelSize)+"</li>");if(search.val().length<opts.minimumInputLength)return render(checkFormatter(opts.formatInputTooShort,"formatInputTooShort")?"<li class='select2-no-results'>"+evaluate(opts.formatInputTooShort,search.val(),opts.minimumInputLength)+"</li>":""),void(initial&&this.showSearch&&this.showSearch(!0));if(opts.maximumInputLength&&search.val().length>opts.maximumInputLength)return void render(checkFormatter(opts.formatInputTooLong,"formatInputTooLong")?"<li class='select2-no-results'>"+evaluate(opts.formatInputTooLong,search.val(),opts.maximumInputLength)+"</li>":"");opts.formatSearching&&0===this.findHighlightableChoices().length&&render("<li class='select2-searching'>"+evaluate(opts.formatSearching)+"</li>"),search.addClass("select2-active"),this.removeHighlight(),input=this.tokenize(),input!=undefined&&null!=input&&search.val(input),this.resultsPage=1,opts.query({element:opts.element,term:search.val(),page:this.resultsPage,context:null,matcher:opts.matcher,callback:this.bind(function(data){var def;if(queryNumber==this.queryCount){if(!this.opened())return void this.search.removeClass("select2-active");if(this.context=data.context===undefined?null:data.context,this.opts.createSearchChoice&&""!==search.val()&&(def=this.opts.createSearchChoice.call(self,search.val(),data.results),def!==undefined&&null!==def&&self.id(def)!==undefined&&null!==self.id(def)&&0===$(data.results).filter(function(){return equal(self.id(this),self.id(def))}).length&&this.opts.createSearchChoicePosition(data.results,def)),0===data.results.length&&checkFormatter(opts.formatNoMatches,"formatNoMatches"))return void render("<li class='select2-no-results'>"+evaluate(opts.formatNoMatches,search.val())+"</li>");results.empty(),self.opts.populateResults.call(this,results,data.results,{term:search.val(),page:this.resultsPage,context:null}),data.more===!0&&checkFormatter(opts.formatLoadMore,"formatLoadMore")&&(results.append("<li class='select2-more-results'>"+self.opts.escapeMarkup(evaluate(opts.formatLoadMore,this.resultsPage))+"</li>"),window.setTimeout(function(){self.loadMoreIfNeeded()},10)),this.postprocessResults(data,initial),postRender(),this.opts.element.trigger({type:"select2-loaded",items:data})}})})}},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){focus(this.search)},selectHighlighted:function(options){if(this._touchMoved)return void this.clearTouchMoved();var index=this.highlight(),highlighted=this.results.find(".select2-highlighted"),data=highlighted.closest(".select2-result").data("select2-data");data?(this.highlight(index),this.onSelect(data,options)):options&&options.noFocus&&this.close()},getPlaceholder:function(){var placeholderOption;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((placeholderOption=this.getPlaceholderOption())!==undefined?placeholderOption.text():undefined)},getPlaceholderOption:function(){if(this.select){var firstOption=this.select.children("option").first();if(this.opts.placeholderOption!==undefined)return"first"===this.opts.placeholderOption&&firstOption||"function"==typeof this.opts.placeholderOption&&this.opts.placeholderOption(this.select);if(""===$.trim(firstOption.text())&&""===firstOption.val())return firstOption}},initContainerWidth:function(){function resolveContainerWidth(){var style,attrs,matches,i,l,attr;if("off"===this.opts.width)return null;if("element"===this.opts.width)return 0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px";if("copy"===this.opts.width||"resolve"===this.opts.width){if(style=this.opts.element.attr("style"),style!==undefined)for(attrs=style.split(";"),i=0,l=attrs.length;l>i;i+=1)if(attr=attrs[i].replace(/\s/g,""),matches=attr.match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i),null!==matches&&matches.length>=1)return matches[1];return"resolve"===this.opts.width?(style=this.opts.element.css("width"),style.indexOf("%")>0?style:0===this.opts.element.outerWidth(!1)?"auto":this.opts.element.outerWidth(!1)+"px"):null}return $.isFunction(this.opts.width)?this.opts.width():this.opts.width}var width=resolveContainerWidth.call(this);null!==width&&this.container.css("width",width)}}),SingleSelect2=clazz(AbstractSelect2,{createContainer:function(){var container=$(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' class='select2-choice' tabindex='-1'>"," <span class='select2-chosen'>&#160;</span><abbr class='select2-search-choice-close'></abbr>"," <span class='select2-arrow' role='presentation'><b role='presentation'></b></span>","</a>","<label for='' class='select2-offscreen'></label>","<input class='select2-focusser select2-offscreen' type='text' aria-haspopup='true' role='button' />","<div class='select2-drop select2-display-none'>"," <div class='select2-search'>"," <label for='' class='select2-offscreen'></label>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input' role='combobox' aria-expanded='true'"," aria-autocomplete='list' />"," </div>"," <ul class='select2-results' role='listbox'>"," </ul>","</div>"].join(""));return container},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop("disabled",!this.isInterfaceEnabled())},opening:function(){var el,range,len;this.opts.minimumResultsForSearch>=0&&this.showSearch(!0),this.parent.opening.apply(this,arguments),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.opts.shouldFocusInput(this)&&(this.search.focus(),el=this.search.get(0),el.createTextRange?(range=el.createTextRange(),range.collapse(!1),range.select()):el.setSelectionRange&&(len=this.search.val().length,el.setSelectionRange(len,len))),""===this.search.val()&&this.nextSearchTerm!=undefined&&(this.search.val(this.nextSearchTerm),this.search.select()),this.focusser.prop("disabled",!0).val(""),this.updateResults(!0),this.opts.element.trigger($.Event("select2-open"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.prop("disabled",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus()},destroy:function(){$("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),cleanupJQueryElements.call(this,"selection","focusser")},initContainer:function(){var selection,elementLabel,container=this.container,dropdown=this.dropdown,idSuffix=nextUid();this.showSearch(this.opts.minimumResultsForSearch<0?!1:!0),this.selection=selection=container.find(".select2-choice"),this.focusser=container.find(".select2-focusser"),selection.find(".select2-chosen").attr("id","select2-chosen-"+idSuffix),this.focusser.attr("aria-labelledby","select2-chosen-"+idSuffix),this.results.attr("id","select2-results-"+idSuffix),this.search.attr("aria-owns","select2-results-"+idSuffix),this.focusser.attr("id","s2id_autogen"+idSuffix),elementLabel=$("label[for='"+this.opts.element.attr("id")+"']"),this.focusser.prev().text(elementLabel.text()).attr("for",this.focusser.attr("id"));var originalTitle=this.opts.element.attr("title");this.opts.element.attr("title",originalTitle||elementLabel.text()),this.focusser.attr("tabindex",this.elementTabIndex),this.search.attr("id",this.focusser.attr("id")+"_search"),this.search.prev().text($("label[for='"+this.focusser.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("keydown",this.bind(function(e){if(this.isInterfaceEnabled()){if(e.which===KEY.PAGE_UP||e.which===KEY.PAGE_DOWN)return void killEvent(e);switch(e.which){case KEY.UP:case KEY.DOWN:return this.moveHighlight(e.which===KEY.UP?-1:1),void killEvent(e);case KEY.ENTER:return this.selectHighlighted(),void killEvent(e);case KEY.TAB:return void this.selectHighlighted({noFocus:!0});case KEY.ESC:return this.cancel(e),void killEvent(e)}}})),this.search.on("blur",this.bind(function(){document.activeElement===this.body.get(0)&&window.setTimeout(this.bind(function(){this.opened()&&this.search.focus()}),0)})),this.focusser.on("keydown",this.bind(function(e){if(this.isInterfaceEnabled()&&e.which!==KEY.TAB&&!KEY.isControl(e)&&!KEY.isFunctionKey(e)&&e.which!==KEY.ESC){if(this.opts.openOnEnter===!1&&e.which===KEY.ENTER)return void killEvent(e);if(e.which==KEY.DOWN||e.which==KEY.UP||e.which==KEY.ENTER&&this.opts.openOnEnter){if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return;return this.open(),void killEvent(e)}return e.which==KEY.DELETE||e.which==KEY.BACKSPACE?(this.opts.allowClear&&this.clear(),void killEvent(e)):void 0}})),installKeyUpChangeEvent(this.focusser),this.focusser.on("keyup-change input",this.bind(function(e){if(this.opts.minimumResultsForSearch>=0){if(e.stopPropagation(),this.opened())return;this.open()}})),selection.on("mousedown touchstart","abbr",this.bind(function(e){this.isInterfaceEnabled()&&(this.clear(),killEventImmediately(e),this.close(),this.selection.focus())})),selection.on("mousedown touchstart",this.bind(function(e){reinsertElement(selection),this.container.hasClass("select2-container-active")||this.opts.element.trigger($.Event("select2-focus")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),killEvent(e)})),dropdown.on("mousedown touchstart",this.bind(function(){this.opts.shouldFocusInput(this)&&this.search.focus()})),selection.on("focus",this.bind(function(e){killEvent(e)})),this.focusser.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger($.Event("select2-focus")),this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){this.opened()||(this.container.removeClass("select2-container-active"),this.opts.element.trigger($.Event("select2-blur")))})),this.search.on("focus",this.bind(function(){this.container.hasClass("select2-container-active")||this.opts.element.trigger($.Event("select2-focus")),this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.setPlaceholder()},clear:function(triggerChange){var data=this.selection.data("select2-data");if(data){var evt=$.Event("select2-clearing");if(this.opts.element.trigger(evt),evt.isDefaultPrevented())return;var placeholderOption=this.getPlaceholderOption();this.opts.element.val(placeholderOption?placeholderOption.val():""),this.selection.find(".select2-chosen").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),triggerChange!==!1&&(this.opts.element.trigger({type:"select2-removed",val:this.id(data),choice:data}),this.triggerChange({removed:data}))}},initSelection:function(){if(this.isPlaceholderOptionSelected())this.updateSelection(null),this.close(),this.setPlaceholder();else{var self=this;this.opts.initSelection.call(null,this.opts.element,function(selected){selected!==undefined&&null!==selected&&(self.updateSelection(selected),self.close(),self.setPlaceholder(),self.nextSearchTerm=self.opts.nextSearchTerm(selected,self.search.val()))})}},isPlaceholderOptionSelected:function(){var placeholderOption;return this.getPlaceholder()===undefined?!1:(placeholderOption=this.getPlaceholderOption())!==undefined&&placeholderOption.prop("selected")||""===this.opts.element.val()||this.opts.element.val()===undefined||null===this.opts.element.val()},prepareOpts:function(){var opts=this.parent.prepareOpts.apply(this,arguments),self=this;return"select"===opts.element.get(0).tagName.toLowerCase()?opts.initSelection=function(element,callback){var selected=element.find("option").filter(function(){return this.selected&&!this.disabled});callback(self.optionToData(selected))}:"data"in opts&&(opts.initSelection=opts.initSelection||function(element,callback){var id=element.val(),match=null;opts.query({matcher:function(term,text,el){var is_match=equal(id,opts.id(el));return is_match&&(match=el),is_match},callback:$.isFunction(callback)?function(){callback(match)}:$.noop})}),opts},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===undefined?undefined:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var placeholder=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&placeholder!==undefined){if(this.select&&this.getPlaceholderOption()===undefined)return;this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(placeholder)),this.selection.addClass("select2-default"),this.container.removeClass("select2-allowclear")}},postprocessResults:function(data,initial,noHighlightUpdate){var selected=0,self=this;if(this.findHighlightableChoices().each2(function(i,elm){return equal(self.id(elm.data("select2-data")),self.opts.element.val())?(selected=i,!1):void 0}),noHighlightUpdate!==!1&&this.highlight(initial===!0&&selected>=0?selected:0),initial===!0){var min=this.opts.minimumResultsForSearch;min>=0&&this.showSearch(countResults(data.results)>=min)}},showSearch:function(showSearchInput){this.showSearchInput!==showSearchInput&&(this.showSearchInput=showSearchInput,this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!showSearchInput),this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!showSearchInput),$(this.dropdown,this.container).toggleClass("select2-with-searchbox",showSearchInput))},onSelect:function(data,options){if(this.triggerSelect(data)){var old=this.opts.element.val(),oldData=this.data();this.opts.element.val(this.id(data)),this.updateSelection(data),this.opts.element.trigger({type:"select2-selected",val:this.id(data),choice:data}),this.nextSearchTerm=this.opts.nextSearchTerm(data,this.search.val()),this.close(),options&&options.noFocus||!this.opts.shouldFocusInput(this)||this.focusser.focus(),equal(old,this.id(data))||this.triggerChange({added:data,removed:oldData})}},updateSelection:function(data){var formatted,cssClass,container=this.selection.find(".select2-chosen");this.selection.data("select2-data",data),container.empty(),null!==data&&(formatted=this.opts.formatSelection(data,container,this.opts.escapeMarkup)),formatted!==undefined&&container.append(formatted),cssClass=this.opts.formatSelectionCssClass(data,container),cssClass!==undefined&&container.addClass(cssClass),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==undefined&&this.container.addClass("select2-allowclear")},val:function(){var val,triggerChange=!1,data=null,self=this,oldData=this.data();if(0===arguments.length)return this.opts.element.val();if(val=arguments[0],arguments.length>1&&(triggerChange=arguments[1]),this.select)this.select.val(val).find("option").filter(function(){return this.selected}).each2(function(i,elm){return data=self.optionToData(elm),!1}),this.updateSelection(data),this.setPlaceholder(),triggerChange&&this.triggerChange({added:data,removed:oldData});else{if(!val&&0!==val)return void this.clear(triggerChange);if(this.opts.initSelection===undefined)throw new Error("cannot call val() if initSelection() is not defined");this.opts.element.val(val),this.opts.initSelection(this.opts.element,function(data){self.opts.element.val(data?self.id(data):""),self.updateSelection(data),self.setPlaceholder(),triggerChange&&self.triggerChange({added:data,removed:oldData})})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(value){var data,triggerChange=!1;return 0===arguments.length?(data=this.selection.data("select2-data"),data==undefined&&(data=null),data):(arguments.length>1&&(triggerChange=arguments[1]),void(value?(data=this.data(),this.opts.element.val(value?this.id(value):""),this.updateSelection(value),triggerChange&&this.triggerChange({added:value,removed:data})):this.clear(triggerChange)))}}),MultiSelect2=clazz(AbstractSelect2,{createContainer:function(){var container=$(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html(["<ul class='select2-choices'>"," <li class='select2-search-field'>"," <label for='' class='select2-offscreen'></label>"," <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi select2-display-none'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return container},prepareOpts:function(){var opts=this.parent.prepareOpts.apply(this,arguments),self=this;return"select"===opts.element.get(0).tagName.toLowerCase()?opts.initSelection=function(element,callback){var data=[];element.find("option").filter(function(){return this.selected&&!this.disabled}).each2(function(i,elm){data.push(self.optionToData(elm))}),callback(data)}:"data"in opts&&(opts.initSelection=opts.initSelection||function(element,callback){var ids=splitVal(element.val(),opts.separator),matches=[];opts.query({matcher:function(term,text,el){var is_match=$.grep(ids,function(id){return equal(id,opts.id(el))}).length;return is_match&&matches.push(el),is_match},callback:$.isFunction(callback)?function(){for(var ordered=[],i=0;i<ids.length;i++)for(var id=ids[i],j=0;j<matches.length;j++){var match=matches[j];if(equal(id,opts.id(match))){ordered.push(match),matches.splice(j,1);break}}callback(ordered)}:$.noop})}),opts},selectChoice:function(choice){var selected=this.container.find(".select2-search-choice-focus");selected.length&&choice&&choice[0]==selected[0]||(selected.length&&this.opts.element.trigger("choice-deselected",selected),selected.removeClass("select2-search-choice-focus"),choice&&choice.length&&(this.close(),choice.addClass("select2-search-choice-focus"),this.opts.element.trigger("choice-selected",choice)))},destroy:function(){$("label[for='"+this.search.attr("id")+"']").attr("for",this.opts.element.attr("id")),this.parent.destroy.apply(this,arguments),cleanupJQueryElements.call(this,"searchContainer","selection")},initContainer:function(){var selection,selector=".select2-choices";this.searchContainer=this.container.find(".select2-search-field"),this.selection=selection=this.container.find(selector);var _this=this;this.selection.on("click",".select2-search-choice:not(.select2-locked)",function(){_this.search[0].focus(),_this.selectChoice($(this))}),this.search.attr("id","s2id_autogen"+nextUid()),this.search.prev().text($("label[for='"+this.opts.element.attr("id")+"']").text()).attr("for",this.search.attr("id")),this.search.on("input paste",this.bind(function(){this.isInterfaceEnabled()&&(this.opened()||this.open())})),this.search.attr("tabindex",this.elementTabIndex),this.keydowns=0,this.search.on("keydown",this.bind(function(e){if(this.isInterfaceEnabled()){++this.keydowns;var selected=selection.find(".select2-search-choice-focus"),prev=selected.prev(".select2-search-choice:not(.select2-locked)"),next=selected.next(".select2-search-choice:not(.select2-locked)"),pos=getCursorInfo(this.search);if(selected.length&&(e.which==KEY.LEFT||e.which==KEY.RIGHT||e.which==KEY.BACKSPACE||e.which==KEY.DELETE||e.which==KEY.ENTER)){var selectedChoice=selected;return e.which==KEY.LEFT&&prev.length?selectedChoice=prev:e.which==KEY.RIGHT?selectedChoice=next.length?next:null:e.which===KEY.BACKSPACE?this.unselect(selected.first())&&(this.search.width(10),selectedChoice=prev.length?prev:next):e.which==KEY.DELETE?this.unselect(selected.first())&&(this.search.width(10),selectedChoice=next.length?next:null):e.which==KEY.ENTER&&(selectedChoice=null),this.selectChoice(selectedChoice),killEvent(e),void(selectedChoice&&selectedChoice.length||this.open())}if((e.which===KEY.BACKSPACE&&1==this.keydowns||e.which==KEY.LEFT)&&0==pos.offset&&!pos.length)return this.selectChoice(selection.find(".select2-search-choice:not(.select2-locked)").last()),void killEvent(e);if(this.selectChoice(null),this.opened())switch(e.which){case KEY.UP:case KEY.DOWN:return this.moveHighlight(e.which===KEY.UP?-1:1),void killEvent(e);case KEY.ENTER:return this.selectHighlighted(),void killEvent(e);case KEY.TAB:return this.selectHighlighted({noFocus:!0}),void this.close();case KEY.ESC:return this.cancel(e),void killEvent(e)}if(e.which!==KEY.TAB&&!KEY.isControl(e)&&!KEY.isFunctionKey(e)&&e.which!==KEY.BACKSPACE&&e.which!==KEY.ESC){if(e.which===KEY.ENTER){if(this.opts.openOnEnter===!1)return;if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return}this.open(),(e.which===KEY.PAGE_UP||e.which===KEY.PAGE_DOWN)&&killEvent(e),e.which===KEY.ENTER&&killEvent(e)}}})),this.search.on("keyup",this.bind(function(){this.keydowns=0,this.resizeSearch()})),this.search.on("blur",this.bind(function(e){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.selectChoice(null),this.opened()||this.clearSearch(),e.stopImmediatePropagation(),this.opts.element.trigger($.Event("select2-blur"))})),this.container.on("click",selector,this.bind(function(e){this.isInterfaceEnabled()&&($(e.target).closest(".select2-search-choice").length>0||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass("select2-container-active")||this.opts.element.trigger($.Event("select2-focus")),this.open(),this.focusSearch(),e.preventDefault()))})),this.container.on("focus",selector,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass("select2-container-active")||this.opts.element.trigger($.Event("select2-focus")),this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder())})),this.initContainerWidth(),this.opts.element.addClass("select2-offscreen"),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop("disabled",!this.isInterfaceEnabled())},initSelection:function(){if(""===this.opts.element.val()&&""===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||""!==this.opts.element.val()){var self=this;this.opts.initSelection.call(null,this.opts.element,function(data){data!==undefined&&null!==data&&(self.updateSelection(data),self.close(),self.clearSearch())})}},clearSearch:function(){var placeholder=this.getPlaceholder(),maxWidth=this.getMaxSearchWidth();placeholder!==undefined&&0===this.getVal().length&&this.search.hasClass("select2-focused")===!1?(this.search.val(placeholder).addClass("select2-default"),this.search.width(maxWidth>0?maxWidth:this.container.css("width"))):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),""===this.search.val()&&this.nextSearchTerm!=undefined&&(this.search.val(this.nextSearchTerm),this.search.select()),this.updateResults(!0),this.opts.shouldFocusInput(this)&&this.search.focus(),this.opts.element.trigger($.Event("select2-open"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(data){var ids=[],filtered=[],self=this;$(data).each(function(){indexOf(self.id(this),ids)<0&&(ids.push(self.id(this)),filtered.push(this))}),data=filtered,this.selection.find(".select2-search-choice").remove(),$(data).each(function(){self.addSelectedChoice(this)}),self.postprocessResults()},tokenize:function(){var input=this.search.val();input=this.opts.tokenizer.call(this,input,this.data(),this.bind(this.onSelect),this.opts),null!=input&&input!=undefined&&(this.search.val(input),input.length>0&&this.open())},onSelect:function(data,options){this.triggerSelect(data)&&(this.addSelectedChoice(data),this.opts.element.trigger({type:"selected",val:this.id(data),choice:data}),this.nextSearchTerm=this.opts.nextSearchTerm(data,this.search.val()),this.clearSearch(),this.updateResults(),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(data,!1,this.opts.closeOnSelect===!0),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()?this.updateResults(!0):this.nextSearchTerm!=undefined&&(this.search.val(this.nextSearchTerm),this.updateResults(),this.search.select()),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:data}),options&&options.noFocus||this.focusSearch())},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(data){var formatted,cssClass,enableChoice=!data.locked,enabledItem=$("<li class='select2-search-choice'> <div></div> <a href='#' class='select2-search-choice-close' tabindex='-1'></a></li>"),disabledItem=$("<li class='select2-search-choice select2-locked'><div></div></li>"),choice=enableChoice?enabledItem:disabledItem,id=this.id(data),val=this.getVal();formatted=this.opts.formatSelection(data,choice.find("div"),this.opts.escapeMarkup),formatted!=undefined&&choice.find("div").replaceWith("<div>"+formatted+"</div>"),cssClass=this.opts.formatSelectionCssClass(data,choice.find("div")),cssClass!=undefined&&choice.addClass(cssClass),enableChoice&&choice.find(".select2-search-choice-close").on("mousedown",killEvent).on("click dblclick",this.bind(function(e){this.isInterfaceEnabled()&&(this.unselect($(e.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),killEvent(e),this.close(),this.focusSearch())})).on("focus",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"))})),choice.data("select2-data",data),choice.insertBefore(this.searchContainer),val.push(id),this.setVal(val)},unselect:function(selected){var data,index,val=this.getVal();if(selected=selected.closest(".select2-search-choice"),0===selected.length)throw"Invalid argument: "+selected+". Must be .select2-search-choice";if(data=selected.data("select2-data")){var evt=$.Event("select2-removing");if(evt.val=this.id(data),evt.choice=data,this.opts.element.trigger(evt),evt.isDefaultPrevented())return!1;for(;(index=indexOf(this.id(data),val))>=0;)val.splice(index,1),this.setVal(val),this.select&&this.postprocessResults();return selected.remove(),this.opts.element.trigger({type:"select2-removed",val:this.id(data),choice:data}),this.triggerChange({removed:data}),!0}},postprocessResults:function(data,initial,noHighlightUpdate){var val=this.getVal(),choices=this.results.find(".select2-result"),compound=this.results.find(".select2-result-with-children"),self=this;choices.each2(function(i,choice){var id=self.id(choice.data("select2-data"));indexOf(id,val)>=0&&(choice.addClass("select2-selected"),choice.find(".select2-result-selectable").addClass("select2-selected"))
8
  }),compound.each2(function(i,choice){choice.is(".select2-result-selectable")||0!==choice.find(".select2-result-selectable:not(.select2-selected)").length||choice.addClass("select2-selected")}),-1==this.highlight()&&noHighlightUpdate!==!1&&self.highlight(0),!this.opts.createSearchChoice&&!choices.filter(".select2-result:not(.select2-selected)").length>0&&(!data||data&&!data.more&&0===this.results.find(".select2-no-results").length)&&checkFormatter(self.opts.formatNoMatches,"formatNoMatches")&&this.results.append("<li class='select2-no-results'>"+evaluate(self.opts.formatNoMatches,self.search.val())+"</li>")},getMaxSearchWidth:function(){return this.selection.width()-getSideBorderPadding(this.search)},resizeSearch:function(){var minimumWidth,left,maxWidth,containerLeft,searchWidth,sideBorderPadding=getSideBorderPadding(this.search);minimumWidth=measureTextWidth(this.search)+10,left=this.search.offset().left,maxWidth=this.selection.width(),containerLeft=this.selection.offset().left,searchWidth=maxWidth-(left-containerLeft)-sideBorderPadding,minimumWidth>searchWidth&&(searchWidth=maxWidth-sideBorderPadding),40>searchWidth&&(searchWidth=maxWidth-sideBorderPadding),0>=searchWidth&&(searchWidth=minimumWidth),this.search.width(Math.floor(searchWidth))},getVal:function(){var val;return this.select?(val=this.select.val(),null===val?[]:val):(val=this.opts.element.val(),splitVal(val,this.opts.separator))},setVal:function(val){var unique;this.select?this.select.val(val):(unique=[],$(val).each(function(){indexOf(this,unique)<0&&unique.push(this)}),this.opts.element.val(0===unique.length?"":unique.join(this.opts.separator)))},buildChangeDetails:function(old,current){for(var current=current.slice(0),old=old.slice(0),i=0;i<current.length;i++)for(var j=0;j<old.length;j++)equal(this.opts.id(current[i]),this.opts.id(old[j]))&&(current.splice(i,1),i>0&&i--,old.splice(j,1),j--);return{added:current,removed:old}},val:function(val,triggerChange){var oldData,self=this;if(0===arguments.length)return this.getVal();if(oldData=this.data(),oldData.length||(oldData=[]),!val&&0!==val)return this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),void(triggerChange&&this.triggerChange({added:this.data(),removed:oldData}));if(this.setVal(val),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),triggerChange&&this.triggerChange(this.buildChangeDetails(oldData,this.data()));else{if(this.opts.initSelection===undefined)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(data){var ids=$.map(data,self.id);self.setVal(ids),self.updateSelection(data),self.clearSearch(),triggerChange&&self.triggerChange(self.buildChangeDetails(oldData,self.data()))})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var val=[],self=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){val.push(self.opts.id($(this).data("select2-data")))}),this.setVal(val),this.triggerChange()},data:function(values,triggerChange){var ids,old,self=this;return 0===arguments.length?this.selection.children(".select2-search-choice").map(function(){return $(this).data("select2-data")}).get():(old=this.data(),values||(values=[]),ids=$.map(values,function(e){return self.opts.id(e)}),this.setVal(ids),this.updateSelection(values),this.clearSearch(),triggerChange&&this.triggerChange(this.buildChangeDetails(old,this.data())),void 0)}}),$.fn.select2=function(){var opts,select2,method,value,multiple,args=Array.prototype.slice.call(arguments,0),allowedMethods=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],valueMethods=["opened","isFocused","container","dropdown"],propertyMethods=["val","data"],methodsMap={search:"externalSearch"};return this.each(function(){if(0===args.length||"object"==typeof args[0])opts=0===args.length?{}:$.extend({},args[0]),opts.element=$(this),"select"===opts.element.get(0).tagName.toLowerCase()?multiple=opts.element.prop("multiple"):(multiple=opts.multiple||!1,"tags"in opts&&(opts.multiple=multiple=!0)),select2=multiple?new window.Select2["class"].multi:new window.Select2["class"].single,select2.init(opts);else{if("string"!=typeof args[0])throw"Invalid arguments to select2 plugin: "+args;if(indexOf(args[0],allowedMethods)<0)throw"Unknown method: "+args[0];if(value=undefined,select2=$(this).data("select2"),select2===undefined)return;if(method=args[0],"container"===method?value=select2.container:"dropdown"===method?value=select2.dropdown:(methodsMap[method]&&(method=methodsMap[method]),value=select2[method].apply(select2,args.slice(1))),indexOf(args[0],valueMethods)>=0||indexOf(args[0],propertyMethods)>=0&&1==args.length)return!1}}),value===undefined?this:value},$.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(result,container,query,escapeMarkup){var markup=[];return markMatch(result.text,query.term,markup,escapeMarkup),markup.join("")},formatSelection:function(data,container,escapeMarkup){return data?escapeMarkup(data.text):undefined},sortResults:function(results){return results},formatResultCssClass:function(data){return data.css},formatSelectionCssClass:function(){return undefined},formatMatches:function(matches){return matches+" results are available, use up and down arrow keys to navigate."},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(input,min){var n=min-input.length;return"Please enter "+n+" or more character"+(1==n?"":"s")},formatInputTooLong:function(input,max){var n=input.length-max;return"Please delete "+n+" character"+(1==n?"":"s")},formatSelectionTooBig:function(limit){return"You can only select "+limit+" item"+(1==limit?"":"s")},formatLoadMore:function(){return"Loading more results…"},formatSearching:function(){return"Searching…"},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(e){return e==undefined?null:e.id},matcher:function(term,text){return stripDiacritics(""+text).toUpperCase().indexOf(stripDiacritics(""+term).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:defaultTokenizer,escapeMarkup:defaultEscapeMarkup,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(c){return c},adaptDropdownCssClass:function(){return null},nextSearchTerm:function(){return undefined},searchInputPlaceholder:"",createSearchChoicePosition:"top",shouldFocusInput:function(instance){var supportsTouchEvents="ontouchstart"in window||navigator.msMaxTouchPoints>0;return supportsTouchEvents&&instance.opts.minimumResultsForSearch<0?!1:!0}},$.fn.select2.ajaxDefaults={transport:$.ajax,params:{type:"GET",cache:!1,dataType:"json"}},window.Select2={query:{ajax:ajax,local:local,tags:tags},util:{debounce:debounce,markMatch:markMatch,escapeMarkup:defaultEscapeMarkup,stripDiacritics:stripDiacritics},"class":{"abstract":AbstractSelect2,single:SingleSelect2,multi:MultiSelect2}}}}(jQuery),jQuery(document).ready(function($){$("#filter_action, #filter_content, #filter_form").change(function(){$("#leadin-contacts-filter-button").addClass("button-primary")})});
assets/js/build/leadin-subscribe.js CHANGED
@@ -346,7 +346,7 @@ jQuery(document).ready( function ( $ ) {
346
 
347
  var preview_subscribe = leadin_get_parameter_by_name('preview-subscribe');
348
 
349
- if ( !leadin_subscribe_check_mobile($) && ! preview_subscribe )
350
  {
351
  if ( ! li_subscribe_flag )
352
  {
@@ -360,8 +360,10 @@ jQuery(document).ready( function ( $ ) {
360
  $('#leadin-subscribe-name-fields').val(),
361
  $('#leadin-subscribe-phone-field').val(),
362
  $('#leadin-subscribe-btn-label').val(),
 
363
  $('#leadin-subscribe-vex-class').val(),
364
- $('#leadin-subscribe-confirmation').val()
 
365
  );
366
  }
367
  else
@@ -380,8 +382,10 @@ jQuery(document).ready( function ( $ ) {
380
  $('#leadin-subscribe-name-fields').val(),
381
  $('#leadin-subscribe-phone-field').val(),
382
  $('#leadin-subscribe-btn-label').val(),
 
383
  $('#leadin-subscribe-vex-class').val(),
384
- $('#leadin-subscribe-confirmation').val()
 
385
  );
386
  }
387
  }
@@ -394,22 +398,26 @@ jQuery(document).ready( function ( $ ) {
394
  leadin_get_parameter_by_name('lis_show_names'),
395
  leadin_get_parameter_by_name('lis_show_phone'),
396
  leadin_get_parameter_by_name('lis_btn_label'),
 
397
  leadin_get_parameter_by_name('lis_vex_class'),
398
- leadin_get_parameter_by_name('lis_confirmation')
 
399
  );
400
 
401
  subscribe.open();
402
  }
403
  });
404
 
405
- function bind_leadin_subscribe_widget ( lis_heading, lis_desc, lis_show_names, lis_show_phone, lis_btn_label, lis_vex_class, lis_confirmation )
406
  {
407
 
408
- lis_heading = ( lis_heading ? lis_heading : 'Sign up for email updates' );
409
- lis_desc = ( lis_desc ? lis_desc : '' );
410
- lis_btn_label = ( lis_btn_label ? lis_btn_label : 'SUBSCRIBE' );
411
- lis_vex_class = ( lis_vex_class ? lis_vex_class : 'vex-theme-bottom-right-corner' );
 
412
  lis_confirmation = ( lis_confirmation ? lis_confirmation : 1 );
 
413
 
414
  (function(){
415
  var $ = jQuery;
@@ -440,7 +448,7 @@ function bind_leadin_subscribe_widget ( lis_heading, lis_desc, lis_show_names, l
440
 
441
  subscribe.vex = vex.dialog.open({
442
  showCloseButton: true,
443
- className: 'leadin-subscribe ' + lis_vex_class,
444
  message: '<h4>' + lis_heading + '</h4>' + '<p>' + lis_desc + '</p>',
445
  input: '<input id="leadin-subscribe-email" name="email" type="email" placeholder="Email address" />' +
446
  ( parseInt(lis_show_names) ? '<input id="leadin-subscribe-fname" name="fname" type="text" placeholder="First Name" /><input id="leadin-subscribe-lname" name="lname" type="text" placeholder="Last Name" />' : '' ) +
@@ -469,8 +477,8 @@ function bind_leadin_subscribe_widget ( lis_heading, lis_desc, lis_show_names, l
469
  '<div class="vex-close"></div>' +
470
  ( parseInt(lis_confirmation) ? '<h3>Thanks!<br>You should receive a confirmation email in your inbox shortly.</h3>' : '<h3>Thanks!<br>We received your submission.</h3>' ) +
471
  '<div id="powered-by-leadin-thank-you">' +
472
- '<span class="powered-by">Powered by Leadin</span>' +
473
- '<a href="http://leadin.com/wordpress-subscribe-widget-plugin?utm_source=virality&utm_medium=referral&utm_term=' + window.location.host + '&utm_content=e11&utm_campaign=subscribe%20widget"><img alt="Leadin" height="20px" width="99px" src="' + document.location.protocol + '//leadin.com/wp-content/themes/LeadIn-WP-Theme/library/images/logos/Leadin_logo@2x.png" alt="leadin.com"/></a>' +
474
  '</div>'
475
  ).css('text-align', 'center').fadeIn(250);
476
  });
@@ -488,7 +496,7 @@ function bind_leadin_subscribe_widget ( lis_heading, lis_desc, lis_show_names, l
488
  }
489
  });
490
 
491
- $('.leadin-subscribe form.vex-dialog-form').append('<a href="http://leadin.com/wordpress-subscribe-widget-plugin?utm_source=virality&utm_medium=referral&utm_term=' + window.location.host + '&utm_content=e11&utm_campaign=subscribe%20widget" id="leadin-subscribe-powered-by" class="leadin-subscribe-powered-by">Powered by Leadin</a>');
492
  };
493
 
494
  subscribe._open = function() {
@@ -508,16 +516,6 @@ function bind_leadin_subscribe_widget ( lis_heading, lis_desc, lis_show_names, l
508
  })();
509
  }
510
 
511
- function leadin_subscribe_check_mobile( $ )
512
- {
513
- var is_mobile = false;
514
-
515
- if ( $('#leadin-subscribe-mobile-check').css('display')=='none' )
516
- is_mobile = true;
517
-
518
- return is_mobile;
519
- }
520
-
521
  function leadin_subscribe_show ()
522
  {
523
  jQuery.ajax({
346
 
347
  var preview_subscribe = leadin_get_parameter_by_name('preview-subscribe');
348
 
349
+ if ( !preview_subscribe )
350
  {
351
  if ( ! li_subscribe_flag )
352
  {
360
  $('#leadin-subscribe-name-fields').val(),
361
  $('#leadin-subscribe-phone-field').val(),
362
  $('#leadin-subscribe-btn-label').val(),
363
+ $('#leadin-subscribe-btn-color').val(),
364
  $('#leadin-subscribe-vex-class').val(),
365
+ $('#leadin-subscribe-confirmation').val(),
366
+ $('#leadin-subscribe-mobile-popup').val()
367
  );
368
  }
369
  else
382
  $('#leadin-subscribe-name-fields').val(),
383
  $('#leadin-subscribe-phone-field').val(),
384
  $('#leadin-subscribe-btn-label').val(),
385
+ $('#leadin-subscribe-btn-color').val(),
386
  $('#leadin-subscribe-vex-class').val(),
387
+ $('#leadin-subscribe-confirmation').val(),
388
+ $('#leadin-subscribe-mobile-popup').val()
389
  );
390
  }
391
  }
398
  leadin_get_parameter_by_name('lis_show_names'),
399
  leadin_get_parameter_by_name('lis_show_phone'),
400
  leadin_get_parameter_by_name('lis_btn_label'),
401
+ leadin_get_parameter_by_name('lis_btn_color'),
402
  leadin_get_parameter_by_name('lis_vex_class'),
403
+ leadin_get_parameter_by_name('lis_confirmation'),
404
+ leadin_get_parameter_by_name('lis_mobile_popup')
405
  );
406
 
407
  subscribe.open();
408
  }
409
  });
410
 
411
+ function bind_leadin_subscribe_widget ( lis_heading, lis_desc, lis_show_names, lis_show_phone, lis_btn_label, lis_btn_color, lis_vex_class, lis_confirmation, lis_mobile_popup )
412
  {
413
 
414
+ lis_heading = ( lis_heading ? lis_heading : 'Sign up for email updates' );
415
+ lis_desc = ( lis_desc ? lis_desc : '' );
416
+ lis_btn_label = ( lis_btn_label ? lis_btn_label : 'SUBSCRIBE' );
417
+ lis_btn_color = ( lis_btn_color ? lis_btn_color : 'leadin-popup-color-blue' );
418
+ lis_vex_class = ( lis_vex_class ? lis_vex_class : 'vex-theme-bottom-right-corner' );
419
  lis_confirmation = ( lis_confirmation ? lis_confirmation : 1 );
420
+ lis_mobile_popup = ( lis_mobile_popup ? lis_mobile_popup : 1 );
421
 
422
  (function(){
423
  var $ = jQuery;
448
 
449
  subscribe.vex = vex.dialog.open({
450
  showCloseButton: true,
451
+ className: 'leadin-subscribe ' + lis_vex_class + ' ' + lis_btn_color + ( lis_mobile_popup == 1 ? '' : ' leadin-subscribe-mobile-hide' ),
452
  message: '<h4>' + lis_heading + '</h4>' + '<p>' + lis_desc + '</p>',
453
  input: '<input id="leadin-subscribe-email" name="email" type="email" placeholder="Email address" />' +
454
  ( parseInt(lis_show_names) ? '<input id="leadin-subscribe-fname" name="fname" type="text" placeholder="First Name" /><input id="leadin-subscribe-lname" name="lname" type="text" placeholder="Last Name" />' : '' ) +
477
  '<div class="vex-close"></div>' +
478
  ( parseInt(lis_confirmation) ? '<h3>Thanks!<br>You should receive a confirmation email in your inbox shortly.</h3>' : '<h3>Thanks!<br>We received your submission.</h3>' ) +
479
  '<div id="powered-by-leadin-thank-you">' +
480
+ '<span class="powered-by">Powered by</span><br>' +
481
+ '<a href="http://leadin.com/wordpress-subscribe-widget?utm_source=virality&utm_medium=referral&utm_term=' + window.location.host + '&utm_content=e11&utm_campaign=subscribe%20widget"><img alt="Leadin" height="20px" width="99px" src="' + document.location.protocol + '//leadin.com/wp-content/themes/LeadIn-WP-Theme/library/images/logos/Leadin_logo@2x.png" alt="leadin.com"/></a>' +
482
  '</div>'
483
  ).css('text-align', 'center').fadeIn(250);
484
  });
496
  }
497
  });
498
 
499
+ $('.leadin-subscribe form.vex-dialog-form').append('<a href="http://leadin.com/wordpress-subscribe-widget?utm_source=virality&utm_medium=referral&utm_term=' + window.location.host + '&utm_content=e11&utm_campaign=subscribe%20widget" id="leadin-subscribe-powered-by" class="leadin-subscribe-powered-by">Powered by Leadin</a>');
500
  };
501
 
502
  subscribe._open = function() {
516
  })();
517
  }
518
 
 
 
 
 
 
 
 
 
 
 
519
  function leadin_subscribe_show ()
520
  {
521
  jQuery.ajax({
assets/js/build/leadin-subscribe.min.js CHANGED
@@ -1 +1 @@
1
- function bind_leadin_subscribe_widget(lis_heading,lis_desc,lis_show_names,lis_show_phone,lis_btn_label,lis_vex_class,lis_confirmation){lis_heading=lis_heading?lis_heading:"Sign up for email updates",lis_desc=lis_desc?lis_desc:"",lis_btn_label=lis_btn_label?lis_btn_label:"SUBSCRIBE",lis_vex_class=lis_vex_class?lis_vex_class:"vex-theme-bottom-right-corner",lis_confirmation=lis_confirmation?lis_confirmation:1,function(){var $=jQuery,subscribe={};subscribe.vex=void 0,subscribe.init=function(){$(window).scrollTop()+$(window).height()>$(document).height()/2&&subscribe.open(),$(window).scroll(function(){$(window).scrollTop()+$(window).height()>$(document).height()/2&&subscribe.open()})},subscribe.open=function(){return subscribe.vex?subscribe._open():(subscribe.vex=vex.dialog.open({showCloseButton:!0,className:"leadin-subscribe "+lis_vex_class,message:"<h4>"+lis_heading+"</h4><p>"+lis_desc+"</p>",input:'<input id="leadin-subscribe-email" name="email" type="email" placeholder="Email address" />'+(parseInt(lis_show_names)?'<input id="leadin-subscribe-fname" name="fname" type="text" placeholder="First Name" /><input id="leadin-subscribe-lname" name="lname" type="text" placeholder="Last Name" />':"")+(parseInt(lis_show_phone)?'<input id="leadin-subscribe-phone" name="phone" type="tel" placeholder="Phone" />':""),buttons:[$.extend({},vex.dialog.buttons.YES,{text:lis_btn_label?lis_btn_label:"SUBSCRIBE"})],onSubmit:function(){$subscribe_form=$(this),$subscribe_form.find("input.error").removeClass("error");var form_validated=!0;return $subscribe_form.find("input").each(function(){var $input=$(this);$input.val()||($input.addClass("error"),form_validated=!1)}),form_validated?($(".vex-dialog-form").fadeOut(300,function(){$(".vex-dialog-form").html('<div class="vex-close"></div>'+(parseInt(lis_confirmation)?"<h3>Thanks!<br>You should receive a confirmation email in your inbox shortly.</h3>":"<h3>Thanks!<br>We received your submission.</h3>")+'<div id="powered-by-leadin-thank-you"><span class="powered-by">Powered by Leadin</span><a href="http://leadin.com/wordpress-subscribe-widget-plugin?utm_source=virality&utm_medium=referral&utm_term='+window.location.host+'&utm_content=e11&utm_campaign=subscribe%20widget"><img alt="Leadin" height="20px" width="99px" src="'+document.location.protocol+'//leadin.com/wp-content/themes/LeadIn-WP-Theme/library/images/logos/Leadin_logo@2x.png" alt="leadin.com"/></a></div>').css("text-align","center").fadeIn(250)}),leadin_submit_form($(".leadin-subscribe form"),$),$.cookie("li_subscribe","ignore",{path:"/",domain:"",expires:ignore_date}),!1):!1},callback:function(data){data===!1&&$.cookie("li_subscribe","ignore",{path:"/",domain:"",expires:ignore_date}),$.cookie("li_subscribe","ignore",{path:"/",domain:"",expires:ignore_date})}}),void $(".leadin-subscribe form.vex-dialog-form").append('<a href="http://leadin.com/wordpress-subscribe-widget-plugin?utm_source=virality&utm_medium=referral&utm_term='+window.location.host+'&utm_content=e11&utm_campaign=subscribe%20widget" id="leadin-subscribe-powered-by" class="leadin-subscribe-powered-by">Powered by Leadin</a>'))},subscribe._open=function(){subscribe.vex.parent().removeClass("vex-closing")},subscribe.close=function(){subscribe.vex&&subscribe.vex.parent().addClass("vex-closing")},subscribe.init(),window.subscribe=subscribe}()}function leadin_subscribe_check_mobile($){var is_mobile=!1;return"none"==$("#leadin-subscribe-mobile-check").css("display")&&(is_mobile=!0),is_mobile}function leadin_subscribe_show(){jQuery.ajax({type:"POST",url:li_ajax.ajax_url,data:{action:"leadin_subscribe_show"},success:function(){},error:function(){}})}function leadin_get_parameter_by_name(name){name=name.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var regex=new RegExp("[\\?&]"+name+"=([^&#]*)"),results=regex.exec(location.search);return null==results?"":decodeURIComponent(results[1].replace(/\+/g," "))}(function(){var vexFactory;vexFactory=function($){var animationEndSupport,vex;return animationEndSupport=!1,$(function(){var s;return s=(document.body||document.documentElement).style,animationEndSupport=void 0!==s.animation||void 0!==s.WebkitAnimation||void 0!==s.MozAnimation||void 0!==s.MsAnimation||void 0!==s.OAnimation,$(window).bind("keyup.vex",function(event){return 27===event.keyCode?vex.closeByEscape():void 0})}),vex={globalID:1,animationEndEvent:"animationend webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend",baseClassNames:{vex:"vex",content:"vex-content",overlay:"vex-overlay",close:"vex-close",closing:"vex-closing",open:"vex-open"},defaultOptions:{content:"",showCloseButton:!0,escapeButtonCloses:!0,overlayClosesOnClick:!0,appendLocation:"body",className:"",css:{},overlayClassName:"",overlayCSS:{},contentClassName:"",contentCSS:{},closeClassName:"",closeCSS:{}},open:function(options){return options=$.extend({},vex.defaultOptions,options),options.id=vex.globalID,vex.globalID+=1,options.$vex=$("<div>").addClass(vex.baseClassNames.vex).addClass(options.className).css(options.css).data({vex:options}),options.$vexOverlay=$("<div>").addClass(vex.baseClassNames.overlay).addClass(options.overlayClassName).css(options.overlayCSS).data({vex:options}),options.overlayClosesOnClick&&options.$vexOverlay.bind("click.vex",function(e){return e.target===this?vex.close($(this).data().vex.id):void 0}),options.$vex.append(options.$vexOverlay),options.$vexContent=$("<div>").addClass(vex.baseClassNames.content).addClass(options.contentClassName).css(options.contentCSS).append(options.content).data({vex:options}),options.$vex.append(options.$vexContent),options.showCloseButton&&(options.$closeButton=$("<div>").addClass(vex.baseClassNames.close).addClass(options.closeClassName).css(options.closeCSS).data({vex:options}).bind("click.vex",function(){return vex.close($(this).data().vex.id)}),options.$vexContent.append(options.$closeButton)),$(options.appendLocation).append(options.$vex),vex.setupBodyClassName(options.$vex),options.afterOpen&&options.afterOpen(options.$vexContent,options),setTimeout(function(){return options.$vexContent.trigger("vexOpen",options)},0),options.$vexContent},getAllVexes:function(){return $("."+vex.baseClassNames.vex+':not(".'+vex.baseClassNames.closing+'") .'+vex.baseClassNames.content)},getVexByID:function(id){return vex.getAllVexes().filter(function(){return $(this).data().vex.id===id})},close:function(id){var $lastVex;if(!id){if($lastVex=vex.getAllVexes().last(),!$lastVex.length)return!1;id=$lastVex.data().vex.id}return vex.closeByID(id)},closeAll:function(){var ids;return ids=vex.getAllVexes().map(function(){return $(this).data().vex.id}).toArray(),(null!=ids?ids.length:void 0)?($.each(ids.reverse(),function(index,id){return vex.closeByID(id)}),!0):!1},closeByID:function(id){var $vex,$vexContent,beforeClose,close,options;return $vexContent=vex.getVexByID(id),$vexContent.length?($vex=$vexContent.data().vex.$vex,options=$.extend({},$vexContent.data().vex),beforeClose=function(){return options.beforeClose?options.beforeClose($vexContent,options):void 0},close=function(){return $vexContent.trigger("vexClose",options),$vex.remove(),options.afterClose?options.afterClose($vexContent,options):void 0},animationEndSupport?(beforeClose(),$vex.unbind(vex.animationEndEvent).bind(vex.animationEndEvent,function(){return close()}).addClass(vex.baseClassNames.closing)):(beforeClose(),close()),!0):void 0},closeByEscape:function(){var $lastVex,id,ids;return ids=vex.getAllVexes().map(function(){return $(this).data().vex.id}).toArray(),(null!=ids?ids.length:void 0)?(id=Math.max.apply(Math,ids),$lastVex=vex.getVexByID(id),$lastVex.data().vex.escapeButtonCloses!==!0?!1:vex.closeByID(id)):!1},setupBodyClassName:function($vex){return $vex.bind("vexOpen.vex",function(){return $("body").addClass(vex.baseClassNames.open)}).bind("vexClose.vex",function(){return vex.getAllVexes().length?void 0:$("body").removeClass(vex.baseClassNames.open)})},hideLoading:function(){return $(".vex-loading-spinner").remove()},showLoading:function(){return vex.hideLoading(),$("body").append('<div class="vex-loading-spinner '+vex.defaultOptions.className+'"></div>')}}},"function"==typeof define&&define.amd?define(["jquery"],vexFactory):"object"==typeof exports?module.exports=vexFactory(require("jquery")):window.vex=vexFactory(jQuery)}).call(this),function(){var vexDialogFactory;vexDialogFactory=function($,vex){var $formToObject,dialog;return null==vex?$.error("Vex is required to use vex.dialog"):($formToObject=function($form){var object;return object={},$.each($form.serializeArray(),function(){return object[this.name]?(object[this.name].push||(object[this.name]=[object[this.name]]),object[this.name].push(this.value||"")):object[this.name]=this.value||""}),object},dialog={},dialog.buttons={YES:{text:"OK",type:"submit",className:"vex-dialog-button-primary"},NO:{text:"Cancel",type:"button",className:"vex-dialog-button-secondary",click:function($vexContent){return $vexContent.data().vex.value=!1,vex.close($vexContent.data().vex.id)}}},dialog.defaultOptions={callback:function(){},afterOpen:function(){},message:"Message",input:'<input name="vex" type="hidden" value="_vex-empty-value" />',value:!1,buttons:[dialog.buttons.YES,dialog.buttons.NO],showCloseButton:!1,onSubmit:function(event){var $form,$vexContent;return $form=$(this),$vexContent=$form.parent(),event.preventDefault(),event.stopPropagation(),$vexContent.data().vex.value=dialog.getFormValueOnSubmit($formToObject($form)),vex.close($vexContent.data().vex.id)},focusFirstInput:!0},dialog.defaultAlertOptions={message:"Alert",buttons:[dialog.buttons.YES]},dialog.defaultConfirmOptions={message:"Confirm"},dialog.open=function(options){var $vexContent;return options=$.extend({},vex.defaultOptions,dialog.defaultOptions,options),options.content=dialog.buildDialogForm(options),options.beforeClose=function($vexContent){return options.callback($vexContent.data().vex.value)},$vexContent=vex.open(options),options.focusFirstInput&&$vexContent.find('input[type="submit"], textarea, input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="email"], input[type="month"], input[type="number"], input[type="password"], input[type="search"], input[type="tel"], input[type="text"], input[type="time"], input[type="url"], input[type="week"]').first().focus(),$vexContent},dialog.alert=function(options){return"string"==typeof options&&(options={message:options}),options=$.extend({},dialog.defaultAlertOptions,options),dialog.open(options)},dialog.confirm=function(options){return"string"==typeof options?$.error("dialog.confirm(options) requires options.callback."):(options=$.extend({},dialog.defaultConfirmOptions,options),dialog.open(options))},dialog.prompt=function(options){var defaultPromptOptions;return"string"==typeof options?$.error("dialog.prompt(options) requires options.callback."):(defaultPromptOptions={message:'<label for="vex">'+(options.label||"Prompt:")+"</label>",input:'<input name="vex" type="text" class="vex-dialog-prompt-input" placeholder="'+(options.placeholder||"")+'" value="'+(options.value||"")+'" />'},options=$.extend({},defaultPromptOptions,options),dialog.open(options))},dialog.buildDialogForm=function(options){var $form,$input,$message;return $form=$('<form class="vex-dialog-form" />'),$message=$('<div class="vex-dialog-message" />'),$input=$('<div class="vex-dialog-input" />'),$form.append($message.append(options.message)).append($input.append(options.input)).append(dialog.buttonsToDOM(options.buttons)).bind("submit.vex",options.onSubmit),$form},dialog.getFormValueOnSubmit=function(formData){return formData.vex||""===formData.vex?"_vex-empty-value"===formData.vex?!0:formData.vex:formData},dialog.buttonsToDOM=function(buttons){var $buttons;return $buttons=$('<div class="vex-dialog-buttons" />'),$.each(buttons,function(index,button){return $buttons.append($('<input type="'+button.type+'" />').val(button.text).addClass(button.className+" vex-dialog-button "+(0===index?"vex-first ":"")+(index===buttons.length-1?"vex-last ":"")).bind("click.vex",function(e){return button.click?button.click($(this).parents("."+vex.baseClassNames.content),e):void 0}))}),$buttons},dialog)},"function"==typeof define&&define.amd?define(["jquery","vex"],vexDialogFactory):"object"==typeof exports?module.exports=vexDialogFactory(require("jquery"),require("vex")):window.vex.dialog=vexDialogFactory(window.jQuery,window.vex)}.call(this);var ignore_date=new Date;ignore_date.setTime(ignore_date.getTime()+12096e5),jQuery(document).ready(function($){var li_subscribe_flag=$.cookie("li_subscribe"),preview_subscribe=leadin_get_parameter_by_name("preview-subscribe");leadin_subscribe_check_mobile($)||preview_subscribe?preview_subscribe&&(bind_leadin_subscribe_widget(leadin_get_parameter_by_name("lis_heading"),leadin_get_parameter_by_name("lis_desc"),leadin_get_parameter_by_name("lis_show_names"),leadin_get_parameter_by_name("lis_show_phone"),leadin_get_parameter_by_name("lis_btn_label"),leadin_get_parameter_by_name("lis_vex_class"),leadin_get_parameter_by_name("lis_confirmation")),subscribe.open()):li_subscribe_flag?"show"==li_subscribe_flag&&bind_leadin_subscribe_widget($("#leadin-subscribe-heading").val(),$("#leadin-subscribe-text").val(),$("#leadin-subscribe-name-fields").val(),$("#leadin-subscribe-phone-field").val(),$("#leadin-subscribe-btn-label").val(),$("#leadin-subscribe-vex-class").val(),$("#leadin-subscribe-confirmation").val()):leadin_check_visitor_status($.cookie("li_hash"),function(data){"vex_set"!=data?($.cookie("li_subscribe","show",{path:"/",domain:""}),bind_leadin_subscribe_widget($("#leadin-subscribe-heading").val(),$("#leadin-subscribe-text").val(),$("#leadin-subscribe-name-fields").val(),$("#leadin-subscribe-phone-field").val(),$("#leadin-subscribe-btn-label").val(),$("#leadin-subscribe-vex-class").val(),$("#leadin-subscribe-confirmation").val())):$.cookie("li_subscribe","ignore",{path:"/",domain:"",expires:ignore_date})})});
1
+ function bind_leadin_subscribe_widget(lis_heading,lis_desc,lis_show_names,lis_show_phone,lis_btn_label,lis_btn_color,lis_vex_class,lis_confirmation,lis_mobile_popup){lis_heading=lis_heading?lis_heading:"Sign up for email updates",lis_desc=lis_desc?lis_desc:"",lis_btn_label=lis_btn_label?lis_btn_label:"SUBSCRIBE",lis_btn_color=lis_btn_color?lis_btn_color:"leadin-popup-color-blue",lis_vex_class=lis_vex_class?lis_vex_class:"vex-theme-bottom-right-corner",lis_confirmation=lis_confirmation?lis_confirmation:1,lis_mobile_popup=lis_mobile_popup?lis_mobile_popup:1,function(){var $=jQuery,subscribe={};subscribe.vex=void 0,subscribe.init=function(){$(window).scrollTop()+$(window).height()>$(document).height()/2&&subscribe.open(),$(window).scroll(function(){$(window).scrollTop()+$(window).height()>$(document).height()/2&&subscribe.open()})},subscribe.open=function(){return subscribe.vex?subscribe._open():(subscribe.vex=vex.dialog.open({showCloseButton:!0,className:"leadin-subscribe "+lis_vex_class+" "+lis_btn_color+(1==lis_mobile_popup?"":" leadin-subscribe-mobile-hide"),message:"<h4>"+lis_heading+"</h4><p>"+lis_desc+"</p>",input:'<input id="leadin-subscribe-email" name="email" type="email" placeholder="Email address" />'+(parseInt(lis_show_names)?'<input id="leadin-subscribe-fname" name="fname" type="text" placeholder="First Name" /><input id="leadin-subscribe-lname" name="lname" type="text" placeholder="Last Name" />':"")+(parseInt(lis_show_phone)?'<input id="leadin-subscribe-phone" name="phone" type="tel" placeholder="Phone" />':""),buttons:[$.extend({},vex.dialog.buttons.YES,{text:lis_btn_label?lis_btn_label:"SUBSCRIBE"})],onSubmit:function(){$subscribe_form=$(this),$subscribe_form.find("input.error").removeClass("error");var form_validated=!0;return $subscribe_form.find("input").each(function(){var $input=$(this);$input.val()||($input.addClass("error"),form_validated=!1)}),form_validated?($(".vex-dialog-form").fadeOut(300,function(){$(".vex-dialog-form").html('<div class="vex-close"></div>'+(parseInt(lis_confirmation)?"<h3>Thanks!<br>You should receive a confirmation email in your inbox shortly.</h3>":"<h3>Thanks!<br>We received your submission.</h3>")+'<div id="powered-by-leadin-thank-you"><span class="powered-by">Powered by</span><br><a href="http://leadin.com/wordpress-subscribe-widget?utm_source=virality&utm_medium=referral&utm_term='+window.location.host+'&utm_content=e11&utm_campaign=subscribe%20widget"><img alt="Leadin" height="20px" width="99px" src="'+document.location.protocol+'//leadin.com/wp-content/themes/LeadIn-WP-Theme/library/images/logos/Leadin_logo@2x.png" alt="leadin.com"/></a></div>').css("text-align","center").fadeIn(250)}),leadin_submit_form($(".leadin-subscribe form"),$),$.cookie("li_subscribe","ignore",{path:"/",domain:"",expires:ignore_date}),!1):!1},callback:function(data){data===!1&&$.cookie("li_subscribe","ignore",{path:"/",domain:"",expires:ignore_date}),$.cookie("li_subscribe","ignore",{path:"/",domain:"",expires:ignore_date})}}),void $(".leadin-subscribe form.vex-dialog-form").append('<a href="http://leadin.com/wordpress-subscribe-widget?utm_source=virality&utm_medium=referral&utm_term='+window.location.host+'&utm_content=e11&utm_campaign=subscribe%20widget" id="leadin-subscribe-powered-by" class="leadin-subscribe-powered-by">Powered by Leadin</a>'))},subscribe._open=function(){subscribe.vex.parent().removeClass("vex-closing")},subscribe.close=function(){subscribe.vex&&subscribe.vex.parent().addClass("vex-closing")},subscribe.init(),window.subscribe=subscribe}()}function leadin_subscribe_show(){jQuery.ajax({type:"POST",url:li_ajax.ajax_url,data:{action:"leadin_subscribe_show"},success:function(){},error:function(){}})}function leadin_get_parameter_by_name(name){name=name.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var regex=new RegExp("[\\?&]"+name+"=([^&#]*)"),results=regex.exec(location.search);return null==results?"":decodeURIComponent(results[1].replace(/\+/g," "))}(function(){var vexFactory;vexFactory=function($){var animationEndSupport,vex;return animationEndSupport=!1,$(function(){var s;return s=(document.body||document.documentElement).style,animationEndSupport=void 0!==s.animation||void 0!==s.WebkitAnimation||void 0!==s.MozAnimation||void 0!==s.MsAnimation||void 0!==s.OAnimation,$(window).bind("keyup.vex",function(event){return 27===event.keyCode?vex.closeByEscape():void 0})}),vex={globalID:1,animationEndEvent:"animationend webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend",baseClassNames:{vex:"vex",content:"vex-content",overlay:"vex-overlay",close:"vex-close",closing:"vex-closing",open:"vex-open"},defaultOptions:{content:"",showCloseButton:!0,escapeButtonCloses:!0,overlayClosesOnClick:!0,appendLocation:"body",className:"",css:{},overlayClassName:"",overlayCSS:{},contentClassName:"",contentCSS:{},closeClassName:"",closeCSS:{}},open:function(options){return options=$.extend({},vex.defaultOptions,options),options.id=vex.globalID,vex.globalID+=1,options.$vex=$("<div>").addClass(vex.baseClassNames.vex).addClass(options.className).css(options.css).data({vex:options}),options.$vexOverlay=$("<div>").addClass(vex.baseClassNames.overlay).addClass(options.overlayClassName).css(options.overlayCSS).data({vex:options}),options.overlayClosesOnClick&&options.$vexOverlay.bind("click.vex",function(e){return e.target===this?vex.close($(this).data().vex.id):void 0}),options.$vex.append(options.$vexOverlay),options.$vexContent=$("<div>").addClass(vex.baseClassNames.content).addClass(options.contentClassName).css(options.contentCSS).append(options.content).data({vex:options}),options.$vex.append(options.$vexContent),options.showCloseButton&&(options.$closeButton=$("<div>").addClass(vex.baseClassNames.close).addClass(options.closeClassName).css(options.closeCSS).data({vex:options}).bind("click.vex",function(){return vex.close($(this).data().vex.id)}),options.$vexContent.append(options.$closeButton)),$(options.appendLocation).append(options.$vex),vex.setupBodyClassName(options.$vex),options.afterOpen&&options.afterOpen(options.$vexContent,options),setTimeout(function(){return options.$vexContent.trigger("vexOpen",options)},0),options.$vexContent},getAllVexes:function(){return $("."+vex.baseClassNames.vex+':not(".'+vex.baseClassNames.closing+'") .'+vex.baseClassNames.content)},getVexByID:function(id){return vex.getAllVexes().filter(function(){return $(this).data().vex.id===id})},close:function(id){var $lastVex;if(!id){if($lastVex=vex.getAllVexes().last(),!$lastVex.length)return!1;id=$lastVex.data().vex.id}return vex.closeByID(id)},closeAll:function(){var ids;return ids=vex.getAllVexes().map(function(){return $(this).data().vex.id}).toArray(),(null!=ids?ids.length:void 0)?($.each(ids.reverse(),function(index,id){return vex.closeByID(id)}),!0):!1},closeByID:function(id){var $vex,$vexContent,beforeClose,close,options;return $vexContent=vex.getVexByID(id),$vexContent.length?($vex=$vexContent.data().vex.$vex,options=$.extend({},$vexContent.data().vex),beforeClose=function(){return options.beforeClose?options.beforeClose($vexContent,options):void 0},close=function(){return $vexContent.trigger("vexClose",options),$vex.remove(),options.afterClose?options.afterClose($vexContent,options):void 0},animationEndSupport?(beforeClose(),$vex.unbind(vex.animationEndEvent).bind(vex.animationEndEvent,function(){return close()}).addClass(vex.baseClassNames.closing)):(beforeClose(),close()),!0):void 0},closeByEscape:function(){var $lastVex,id,ids;return ids=vex.getAllVexes().map(function(){return $(this).data().vex.id}).toArray(),(null!=ids?ids.length:void 0)?(id=Math.max.apply(Math,ids),$lastVex=vex.getVexByID(id),$lastVex.data().vex.escapeButtonCloses!==!0?!1:vex.closeByID(id)):!1},setupBodyClassName:function($vex){return $vex.bind("vexOpen.vex",function(){return $("body").addClass(vex.baseClassNames.open)}).bind("vexClose.vex",function(){return vex.getAllVexes().length?void 0:$("body").removeClass(vex.baseClassNames.open)})},hideLoading:function(){return $(".vex-loading-spinner").remove()},showLoading:function(){return vex.hideLoading(),$("body").append('<div class="vex-loading-spinner '+vex.defaultOptions.className+'"></div>')}}},"function"==typeof define&&define.amd?define(["jquery"],vexFactory):"object"==typeof exports?module.exports=vexFactory(require("jquery")):window.vex=vexFactory(jQuery)}).call(this),function(){var vexDialogFactory;vexDialogFactory=function($,vex){var $formToObject,dialog;return null==vex?$.error("Vex is required to use vex.dialog"):($formToObject=function($form){var object;return object={},$.each($form.serializeArray(),function(){return object[this.name]?(object[this.name].push||(object[this.name]=[object[this.name]]),object[this.name].push(this.value||"")):object[this.name]=this.value||""}),object},dialog={},dialog.buttons={YES:{text:"OK",type:"submit",className:"vex-dialog-button-primary"},NO:{text:"Cancel",type:"button",className:"vex-dialog-button-secondary",click:function($vexContent){return $vexContent.data().vex.value=!1,vex.close($vexContent.data().vex.id)}}},dialog.defaultOptions={callback:function(){},afterOpen:function(){},message:"Message",input:'<input name="vex" type="hidden" value="_vex-empty-value" />',value:!1,buttons:[dialog.buttons.YES,dialog.buttons.NO],showCloseButton:!1,onSubmit:function(event){var $form,$vexContent;return $form=$(this),$vexContent=$form.parent(),event.preventDefault(),event.stopPropagation(),$vexContent.data().vex.value=dialog.getFormValueOnSubmit($formToObject($form)),vex.close($vexContent.data().vex.id)},focusFirstInput:!0},dialog.defaultAlertOptions={message:"Alert",buttons:[dialog.buttons.YES]},dialog.defaultConfirmOptions={message:"Confirm"},dialog.open=function(options){var $vexContent;return options=$.extend({},vex.defaultOptions,dialog.defaultOptions,options),options.content=dialog.buildDialogForm(options),options.beforeClose=function($vexContent){return options.callback($vexContent.data().vex.value)},$vexContent=vex.open(options),options.focusFirstInput&&$vexContent.find('input[type="submit"], textarea, input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="email"], input[type="month"], input[type="number"], input[type="password"], input[type="search"], input[type="tel"], input[type="text"], input[type="time"], input[type="url"], input[type="week"]').first().focus(),$vexContent},dialog.alert=function(options){return"string"==typeof options&&(options={message:options}),options=$.extend({},dialog.defaultAlertOptions,options),dialog.open(options)},dialog.confirm=function(options){return"string"==typeof options?$.error("dialog.confirm(options) requires options.callback."):(options=$.extend({},dialog.defaultConfirmOptions,options),dialog.open(options))},dialog.prompt=function(options){var defaultPromptOptions;return"string"==typeof options?$.error("dialog.prompt(options) requires options.callback."):(defaultPromptOptions={message:'<label for="vex">'+(options.label||"Prompt:")+"</label>",input:'<input name="vex" type="text" class="vex-dialog-prompt-input" placeholder="'+(options.placeholder||"")+'" value="'+(options.value||"")+'" />'},options=$.extend({},defaultPromptOptions,options),dialog.open(options))},dialog.buildDialogForm=function(options){var $form,$input,$message;return $form=$('<form class="vex-dialog-form" />'),$message=$('<div class="vex-dialog-message" />'),$input=$('<div class="vex-dialog-input" />'),$form.append($message.append(options.message)).append($input.append(options.input)).append(dialog.buttonsToDOM(options.buttons)).bind("submit.vex",options.onSubmit),$form},dialog.getFormValueOnSubmit=function(formData){return formData.vex||""===formData.vex?"_vex-empty-value"===formData.vex?!0:formData.vex:formData},dialog.buttonsToDOM=function(buttons){var $buttons;return $buttons=$('<div class="vex-dialog-buttons" />'),$.each(buttons,function(index,button){return $buttons.append($('<input type="'+button.type+'" />').val(button.text).addClass(button.className+" vex-dialog-button "+(0===index?"vex-first ":"")+(index===buttons.length-1?"vex-last ":"")).bind("click.vex",function(e){return button.click?button.click($(this).parents("."+vex.baseClassNames.content),e):void 0}))}),$buttons},dialog)},"function"==typeof define&&define.amd?define(["jquery","vex"],vexDialogFactory):"object"==typeof exports?module.exports=vexDialogFactory(require("jquery"),require("vex")):window.vex.dialog=vexDialogFactory(window.jQuery,window.vex)}.call(this);var ignore_date=new Date;ignore_date.setTime(ignore_date.getTime()+12096e5),jQuery(document).ready(function($){var li_subscribe_flag=$.cookie("li_subscribe"),preview_subscribe=leadin_get_parameter_by_name("preview-subscribe");preview_subscribe?preview_subscribe&&(bind_leadin_subscribe_widget(leadin_get_parameter_by_name("lis_heading"),leadin_get_parameter_by_name("lis_desc"),leadin_get_parameter_by_name("lis_show_names"),leadin_get_parameter_by_name("lis_show_phone"),leadin_get_parameter_by_name("lis_btn_label"),leadin_get_parameter_by_name("lis_btn_color"),leadin_get_parameter_by_name("lis_vex_class"),leadin_get_parameter_by_name("lis_confirmation"),leadin_get_parameter_by_name("lis_mobile_popup")),subscribe.open()):li_subscribe_flag?"show"==li_subscribe_flag&&bind_leadin_subscribe_widget($("#leadin-subscribe-heading").val(),$("#leadin-subscribe-text").val(),$("#leadin-subscribe-name-fields").val(),$("#leadin-subscribe-phone-field").val(),$("#leadin-subscribe-btn-label").val(),$("#leadin-subscribe-btn-color").val(),$("#leadin-subscribe-vex-class").val(),$("#leadin-subscribe-confirmation").val(),$("#leadin-subscribe-mobile-popup").val()):leadin_check_visitor_status($.cookie("li_hash"),function(data){"vex_set"!=data?($.cookie("li_subscribe","show",{path:"/",domain:""}),bind_leadin_subscribe_widget($("#leadin-subscribe-heading").val(),$("#leadin-subscribe-text").val(),$("#leadin-subscribe-name-fields").val(),$("#leadin-subscribe-phone-field").val(),$("#leadin-subscribe-btn-label").val(),$("#leadin-subscribe-btn-color").val(),$("#leadin-subscribe-vex-class").val(),$("#leadin-subscribe-confirmation").val(),$("#leadin-subscribe-mobile-popup").val())):$.cookie("li_subscribe","ignore",{path:"/",domain:"",expires:ignore_date})})});
images/leadin-icon-16x16.png ADDED
Binary file
images/leadin-svg-icon 16-12-53-838.svg ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg width="32px" height="20px" viewBox="0 0 32 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
3
+ <title>leadin-svg-icon</title>
4
+ <description>Created with Sketch (http://www.bohemiancoding.com/sketch)</description>
5
+ <defs></defs>
6
+ <g id="Logo" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
7
+ <path d="M24.2659022,1.36625531 L18.6030712,19.9939886 L24.3824248,19.9939886 C25.180195,19.9939886 26.0085196,19.3966068 26.2321138,18.6610995 L31.4897464,1.36625531 C31.7135312,0.630121017 31.2475193,0.0333662628 30.450454,0.0333662628 L26.1155911,0.0333662628 C25.3178209,0.0333662628 24.4894964,0.63074804 24.2659022,1.36625531 Z" id="Rectangle-100" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
8
+ <path d="M13.4017203,6.68750917 L9.35655059,19.9939886 L15.1359041,19.9939886 C15.9336743,19.9939886 16.761737,19.3974683 16.9851132,18.6626783 L21.0302829,5.35619888 L15.2509294,5.35619888 C14.4531592,5.35619888 13.6250965,5.95271916 13.4017203,6.68750917 Z" id="Rectangle-100-copy" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
9
+ <path d="M2.53756131,12.008688 L0.514245522,18.664332 C0.291003421,19.3986811 0.757455297,19.9939886 1.55452066,19.9939886 L5.88938348,19.9939886 C6.68715368,19.9939886 7.51532043,19.3971259 7.73808978,18.664332 L10.1656212,10.6790315 L4.38626761,10.6790315 C3.58849742,10.6790315 2.76033066,11.2758941 2.53756131,12.008688 Z" id="Rectangle-100-copy-2" fill="#FFFFFF" sketch:type="MSShapeGroup"></path>
10
+ </g>
11
+ </svg>
inc/class-emailer.php CHANGED
@@ -57,16 +57,27 @@ class LI_Emailer {
57
 
58
  if ( isset($options['pro']) && $options['pro'] )
59
  {
60
- $email_sent = $this->send_email_via_sendgrid($to, $subject, $body, get_bloginfo('wpurl'));
61
-
62
- if ( $email_sent )
63
- {
64
- leadin_track_plugin_activity('Contact Notification Sent', array('service' => 'sendgrid'));
65
- }
66
  else
 
 
 
67
  {
68
- $email_sent = wp_mail($to, $subject, $body, $headers);
69
- leadin_track_plugin_activity('Contact Notification Sent', array('service' => 'php_mail'));
 
 
 
 
 
 
 
 
 
 
 
 
70
  }
71
  }
72
  else
@@ -105,7 +116,8 @@ class LI_Emailer {
105
  * @param string site URL
106
  * @return string concatenated string - New submission on [Site Name](linked to site URL)
107
  */
108
- function build_submission_details ( $url ) {
 
109
  $format = '<table class="row submission-detail" style="border-spacing: 0;border-collapse: collapse;padding: 0px;vertical-align: top;text-align: left;width: 100%%;position: relative;display: block;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="wrapper last" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 10px 20px 0px 0px;vertical-align: top;text-align: left;position: relative;padding-right: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><table class="twelve columns" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;margin: 0 auto;width: 580px;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="text-pad" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0px 0px 10px;vertical-align: top;text-align: left;padding-left: 10px;padding-right: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><h3 style="color: #666;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;margin: 0;text-align: left;line-height: 1.3;word-break: normal;font-size: 18px;">New submission on <a href="%s" style="color: #2ba6cb;text-decoration: none;">%s</a></h3></td><td class="expander" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;visibility: hidden;width: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"></td></tr></table></td></tr></table>' . "\r\n";
110
  $built_submission_details = sprintf($format, $url, get_bloginfo('name'));
111
  $built_submission_details .= '<img src="' . $this->create_tracking_pixel() . '"/>';
@@ -119,7 +131,8 @@ class LI_Emailer {
119
  * @param string email address from LI_Contact
120
  * @return string concatenated string with avatar + linked email address
121
  */
122
- function build_contact_identity ( $email ) {
 
123
  $avatar_img = "https://api.hubapi.com/socialintel/v1/avatars?email=" . $email;
124
 
125
  $format = '<table class="row lead-identity" style="border-spacing: 0;border-collapse: collapse;padding: 0px;vertical-align: top;text-align: left;width: 100%%;position: relative;display: block;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="wrapper" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 10px 20px 0px 0px;vertical-align: top;text-align: left;position: relative;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><table class="two columns" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;margin: 0 auto;width: 80px;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="text-pad" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0px 0px 10px;vertical-align: top;text-align: left;padding-left: 10px;padding-right: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><img height="60" width="60" src="%s" style="background-color:#F6601D;outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;width: auto;max-width: 100%%;float: left;clear: both;display: block;"/></td><td class="expander" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;visibility: hidden;width: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"></td></tr></table></td><td class="wrapper last" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 10px 20px 0px 0px;vertical-align: top;text-align: left;position: relative;padding-right: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><table class="ten columns" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;margin: 0 auto;width: 480px;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0px 0px 10px;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><a style="color: #2ba6cb;text-decoration: none;" href="mailto:%s"><h1 style="font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;margin: 0;text-align: left;line-height: 60px;word-break: normal;font-size: 26px;">%s</h1></a></td><td class="expander" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;visibility: hidden;width: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"></td></tr></table></td></tr></table>';
@@ -134,12 +147,14 @@ class LI_Emailer {
134
  * @param stdClass LI_contact
135
  * @return string concatenated string of sessions
136
  */
137
- function build_sessions ( $history ) {
 
138
  $built_sessions = "";
139
 
140
  $sessions = $history->sessions;
141
 
142
- foreach ( $sessions as &$session ) {
 
143
  $first_event = end($session['events']);
144
  $first_event_date = $first_event['activities'][0]['event_date'];
145
  $session_date = date('F j, Y, g:i a', strtotime($first_event_date));
@@ -154,8 +169,10 @@ class LI_Emailer {
154
 
155
  $events = $session['events'];
156
 
157
- foreach ( $events as &$event ) {
158
- if ( $event['event_type'] == 'pageview' ) {
 
 
159
  $pageview = $event['activities'][0];
160
  $pageview_time = date('g:ia', strtotime($pageview['event_date']));
161
  $pageview_url = $pageview['pageview_url'];
@@ -165,12 +182,14 @@ class LI_Emailer {
165
  $format = '<table class="row lead-timeline__event pageview" style="border-spacing: 0;border-collapse: collapse;padding: 0px;vertical-align: top;text-align: left;width: 100%%;position: relative;display: block;background-color: #fff;border-top: 1px solid #dedede;border-right: 1px solid #dedede;border-left: 4px solid #28c;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="wrapper" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 10px 20px 0px 0px;vertical-align: top;text-align: left;position: relative;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><table class="two columns" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;margin: 0 auto;width: 80px;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="text-pad" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0px 0px 10px;vertical-align: top;text-align: left;padding-left: 10px;padding-right: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><p class="lead-timeline__event-time" style="margin: 0;color: #1f6696;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;margin-bottom: 10px;">%s</p></td><td class="expander" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;visibility: hidden;width: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"></td></tr></table></td><td class="wrapper last" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 10px 20px 0px 0px;vertical-align: top;text-align: left;position: relative;padding-right: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><table class="ten columns" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;margin: 0 auto;width: 480px;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="text-pad" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0px 0px 10px;vertical-align: top;text-align: left;padding-left: 10px;padding-right: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><p class="lead-timeline__event-title" style="margin: 0;color: #1f6696;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;margin-bottom: 10px;">%s</p><p class="lead-timeline__pageview-url" style="margin: 0;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;margin-bottom: 10px;"><a href="%s" style="color: #999;text-decoration: none;">%s</a></p></td><td class="expander" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;visibility: hidden;width: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"></td></tr></table></td></tr></table>';
166
  $built_sessions .= sprintf($format, $pageview_time, $pageview_title, $pageview_url, leadin_strip_params_from_url($pageview_url));
167
 
168
- if ( $pageview['event_date'] == $first_event_date ) {
 
169
  $format = '<table class="row lead-timeline__event traffic-source" style="margin-bottom: 20px;border-spacing: 0;border-collapse: collapse;padding: 0px;vertical-align: top;text-align: left;width: 100%%;position: relative;display: block;background-color: #fff;border-top: 1px solid #dedede;border-right: 1px solid #dedede;border-left: 4px solid #99aa1f;border-bottom: 1px solid #dedede;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="wrapper" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 10px 20px 0px 0px;vertical-align: top;text-align: left;position: relative;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><table class="two columns" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;margin: 0 auto;width: 80px;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="text-pad" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0px 0px 10px;vertical-align: top;text-align: left;padding-left: 10px;padding-right: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><p class="lead-timeline__event-time" style="margin: 0;color: #727e14;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;margin-bottom: 10px;">%s</p></td><td class="expander" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;visibility: hidden;width: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"></td></tr></table></td><td class="wrapper last" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 10px 20px 0px 0px;vertical-align: top;text-align: left;position: relative;padding-right: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><table class="ten columns" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;margin: 0 auto;width: 480px;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="text-pad" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0px 0px 10px;vertical-align: top;text-align: left;padding-left: 10px;padding-right: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><p class="lead-timeline__event-title" style="margin: 0;color: #727e14;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;margin-bottom: 10px;">Traffic Source: %s</p> %s </td><td class="expander" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;visibility: hidden;width: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"></td></tr></table></td></tr></table>';
170
  $built_sessions .= sprintf($format, $pageview_time, ( $pageview_source ? '<a href="' . $pageview_source . '">' . leadin_strip_params_from_url($pageview_source) . '</a>' : 'Direct' ), $this->build_source_url_params($pageview_source));
171
  }
172
  }
173
- else if ( $event['event_type'] == 'form' ) {
 
174
  $submission = $event['activities'][0];
175
  $submission_Time = date('g:ia', strtotime($submission['event_date']));
176
  $submission_url = $submission['form_page_url'];
@@ -200,7 +219,8 @@ class LI_Emailer {
200
  * @param object json decoded set of form fields
201
  * @return string concatenated string of form fields
202
  */
203
- function build_form_fields ( $form_fields ) {
 
204
  $built_form_fields = "";
205
 
206
  if ( count($form_fields) )
@@ -223,7 +243,8 @@ class LI_Emailer {
223
  * @param object string
224
  * @return string concatenated string of key value pairs for url params
225
  */
226
- function build_source_url_params ( $source_url ) {
 
227
  $built_source_url_params = "";
228
  $url_parts = parse_url($source_url);
229
 
@@ -279,11 +300,11 @@ class LI_Emailer {
279
  * @return string footer content
280
  */
281
  function build_enrichment_personal ( $li_contact )
282
- {
283
- $properties = ( isset($li_contact->history->lead->social_data->properties) ? $li_contact->history->lead->social_data->properties : '' );
284
- $built_personal_data = "";
285
-
286
- if ( ! isset($properties->primary) && empty($properties->social_profiles) )
287
  {
288
  $format = '<td class="wrapper" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 10px 20px 0px 0px;vertical-align: top;text-align: left;position: relative;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><table class="six columns" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;margin: 0 auto;width: 280px;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="text-pad" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0px 0px 10px;vertical-align: top;text-align: left;padding-left: 10px;padding-right: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><p class="contact-description" style="margin: 0;color: #666;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;margin-bottom: 10px;">%s</p></td><td class="expander" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;visibility: hidden;width: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"></td></tr></table></td>';
289
  $built_personal_data .= sprintf($format, 'We couldn\'t find any personal info for this contact.');
@@ -295,12 +316,8 @@ class LI_Emailer {
295
  $format = '<td class="wrapper" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 10px 20px 0px 0px;vertical-align: top;text-align: left;position: relative;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><table class="six columns" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;margin: 0 auto;width: 280px;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="text-pad" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0px 0px 10px;vertical-align: top;text-align: left;padding-left: 10px;padding-right: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><h3 class="contact-name" style="color: #444;font-family: Helvetica, Arial, sans-serif;font-weight: bold;padding: 0;margin: 0;text-align: left;line-height: 1.3;word-break: normal;font-size: 14px;">%s</h3><h4 class="contact-name-subhead" style="color: #444;font-family: Helvetica, Arial, sans-serif;font-weight: 400;padding: 0;margin: 0;text-align: left;line-height: 1.3;word-break: normal;font-size: 14px;margin-bottom: 15px;">%s</h4><p class="contact-description" style="margin: 0;color: #666;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;margin-bottom: 10px;">%s</p>%s</td><td class="expander" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;visibility: hidden;width: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"></td></tr></table></td>';
296
 
297
  $contact_name = $li_contact->history->lead->lead_first_name . ' ' . $li_contact->history->lead->lead_last_name;
298
-
299
- $contact_job_title = '';
300
- if ( isset($properties->primary) )
301
- $contact_job_title = $properties->primary->title . ( $properties->primary->company_name ? ' - ' . $properties->primary->company_name : '' );
302
-
303
- $contact_bio = ( ! empty($properties->description) ? $properties->description : '');
304
 
305
  $built_personal_data .= sprintf($format, $contact_name, $contact_job_title, $contact_bio, $this->build_enrichment_personal_fields($li_contact));
306
 
@@ -313,22 +330,20 @@ class LI_Emailer {
313
  * @param stdClass history from LI_Contact
314
  * @return string footer content
315
  */
316
- function build_enrichment_personal_fields ( $li_contact ) {
 
317
  $built_personal_data_fields = "";
318
-
 
319
  $format = '<p class="lead-timeline__submission-field" style="margin: 0;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;margin-bottom: 10px;"><label class="lead-timeline__submission-label" style="text-transform: uppercase;font-size: 12px;color: #999;letter-spacing: 0.05em;">%s</label><br/>%s</p>';
320
 
321
- if ( isset($li_contact->history->lead->social_data->properties->social_profiles) )
322
  {
323
- if ( count($li_contact->history->lead->social_data->properties->social_profiles) )
324
  {
325
- foreach ( $li_contact->history->lead->social_data->properties->social_profiles as $key => $profile )
326
- {
327
- $field_label = $profile->typename;
328
- $field_data = '<a href="' . leadin_safe_social_profile_url($profile->url) . '" target="_blank">' . ( $profile->typeid == 'twitter' ? '@' : '' ) . ( $profile->typeid == 'linkedin' ? '/in/' : '' ) . $profile->username . '</a>';
329
-
330
- $built_personal_data_fields .= sprintf($format, $field_label, $field_data);
331
- }
332
  }
333
  }
334
 
@@ -345,48 +360,32 @@ class LI_Emailer {
345
  {
346
  $built_company_data = "";
347
 
348
- $company_data_exists = FALSE;
349
- $properties = ( isset($li_contact->history->lead->company_data->properties) ? $li_contact->history->lead->company_data->properties : '' );
350
 
351
- $company_name = '';
352
- $company_location = '';
353
- $company_bio = '';
354
-
355
- if ( isset($properties->name) && $properties->name )
356
- $company_name .= $properties->name;
357
-
358
- if ( isset($properties->city) && $properties->city )
359
  {
360
- $company_location .= $properties->city;
361
- $company_data_exists = TRUE;
362
- }
363
 
364
- if ( isset($properties->state) && $properties->state )
365
- {
366
- $company_location .= ', ' . $properties->state;
367
- $company_data_exists = TRUE;
368
- }
369
 
370
- if ( isset($properties->country) && $properties->country )
371
- {
372
- $company_location .= ', ' . $properties->country;
373
- $company_data_exists = TRUE;
374
- }
375
 
376
- if ( isset($properties->overview) )
377
- {
378
- if ( strlen($properties->overview) < 260 )
379
- $company_bio = $properties->overview;
380
- else
381
- $company_bio = substr($properties->overview, 0, strpos($properties->overview, '.', 260)) . ' ...';
382
 
383
- $company_data_exists = TRUE;
384
- }
 
 
 
 
 
385
 
386
- if ( $company_data_exists )
387
- {
388
  $format = '<td class="wrapper" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 10px 20px 0px 0px;vertical-align: top;text-align: left;position: relative;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><table class="six columns" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;margin: 0 auto;width: 280px;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="text-pad" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0px 0px 10px;vertical-align: top;text-align: left;padding-left: 10px;padding-right: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><h3 class="contact-name" style="color: #444;font-family: Helvetica, Arial, sans-serif;font-weight: bold;padding: 0;margin: 0;text-align: left;line-height: 1.3;word-break: normal;font-size: 14px;">%s</h3><h4 class="contact-name-subhead" style="color: #444;font-family: Helvetica, Arial, sans-serif;font-weight: 400;padding: 0;margin: 0;text-align: left;line-height: 1.3;word-break: normal;font-size: 14px;margin-bottom: 15px;">%s</h4><p class="contact-description" style="margin: 0;color: #666;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;margin-bottom: 10px;">%s</p>%s</td><td class="expander" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;visibility: hidden;width: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"></td></tr></table></td>';
389
- $built_company_data .= sprintf($format, $company_name, $company_location, $company_bio, $this->build_enrichment_company_fields($li_contact));
390
  }
391
  else
392
  {
@@ -403,31 +402,32 @@ class LI_Emailer {
403
  * @param stdClass history from LI_Contact
404
  * @return string footer content
405
  */
406
- function build_enrichment_company_fields ( $li_contact ) {
407
- $properties = $li_contact->history->lead->company_data->properties;
 
408
 
409
  $built_company_data_fields = "";
410
 
411
  $format = '<p class="lead-timeline__submission-field" style="margin: 0;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;margin-bottom: 10px;"><label class="lead-timeline__submission-label" style="text-transform: uppercase;font-size: 12px;color: #999;letter-spacing: 0.05em;">%s</label><br/>%s</p>';
412
 
413
- if ( !empty($properties->facebookpageurl) )
414
  {
415
  $field_label = "Facebook";
416
- $field_data = '<a href="' . $properties->facebookpageurl . '" target="_blank">' . $properties->name . '</a>';
417
  $built_company_data_fields .= sprintf($format, $field_label, $field_data);
418
  }
419
 
420
- if ( !empty($properties->twitterusername) )
421
  {
422
  $field_label = "Twitter";
423
- $field_data = '<a href="' . $properties->twitterurl . '" target="_blank">' . '@' . $properties->twitterusername . '</a>';
424
  $built_company_data_fields .= sprintf($format, $field_label, $field_data);
425
  }
426
 
427
- if ( !empty($properties->linkedinurl) )
428
  {
429
- $field_label = "LinkedIn";
430
- $field_data = '<a href="' . $properties->linkedinurl . '" target="_blank">' . $properties->name . '</a>';
431
  $built_company_data_fields .= sprintf($format, $field_label, $field_data);
432
  }
433
 
@@ -441,7 +441,8 @@ class LI_Emailer {
441
  * @param stdClass history from LI_Contact
442
  * @return string footer content
443
  */
444
- function build_footer ( $li_contact ) {
 
445
  $built_footer = "";
446
  $button_text = "View Contact Record";
447
  $contactViewUrl = get_bloginfo('wpurl') . "/wp-admin/admin.php?page=leadin_contacts&action=view&lead=" . $li_contact->history->lead->lead_id;
@@ -533,7 +534,7 @@ class LI_Emailer {
533
  // Each line in an email can only be 998 characters long, so lines need to be broken with a wordwrap
534
  $body = wordwrap($body, 900, "\r\n");
535
 
536
- $headers = "From: Leadin <notifications@leadin.com>\r\n";
537
  $headers.= "Reply-To: Leadin <" . $from . ">\r\n";
538
  $headers.= "X-Mailer: PHP/" . phpversion() . "\r\n";
539
  $headers.= "MIME-Version: 1.0\r\n";
@@ -555,7 +556,7 @@ class LI_Emailer {
555
  $powered_by = '';
556
 
557
  $powered_by .= "<table class='row section' style='border-spacing: 0;border-collapse: collapse;vertical-align: top;text-align: left;width: 100%;position: relative;display: block;margin-top: 20px;padding: 0px;'><tr style='vertical-align: top;text-align: left;padding: 0;' align='left'><td class='wrapper last' style='word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse !important;vertical-align: top;text-align: left;position: relative;padding: 0 0px 0 0;' align='left' valign='top'><table class='twelve columns' style='border-spacing: 0;border-collapse: collapse;vertical-align: top;text-align: left;width: 580px;margin: 0 auto;padding: 0;'><tr style='vertical-align: top;text-align: left;padding: 0;' align='left'><td style='padding: 10px 20px;' align='left' valign='top'><table style='border-spacing: 0;border-collapse: collapse;vertical-align: top;text-align: left;width: 100%;overflow: hidden;padding: 0;'><tr style='vertical-align: top;text-align: left;padding: 0;' align='left'><td style='word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse !important;vertical-align: top;text-align: center;display: block;width: auto !important;font-size: 16px;padding: 10px 20px;' align='center' valign='top'>";
558
- $powered_by .="<div style='font-size: 11px; color: #888; padding: 0 0 5px 0;'>Powered by</div><a href='http://leadin.com/wordpress-subscribe-widget-plugin?utm_source=virality&utm_medium=referral&utm_term=" . get_bloginfo('wpurl') . "&utm_content=e11&utm_campaign=subscribe%20confirmation%20email'><img alt='Leadin' height='20px' width='99px' src='http://leadin.com/wp-content/themes/LeadIn-WP-Theme/library/images/logos/leadin_logo_small_grey.png' alt='leadin.com'/></a>";
559
  $powered_by .= "</td></tr></table></td><td class='expander' style='word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse !important;vertical-align: top;text-align: left;visibility: hidden;width: 0px;padding: 0;border: 0;' align='left' valign='top'></td></tr></table></td></tr></table>";
560
 
561
  return $powered_by;
@@ -597,6 +598,9 @@ class LI_Emailer {
597
  */
598
  function send_email_via_sendgrid ( $to = '', $subject = '', $body = '', $domain = '' )
599
  {
 
 
 
600
  $fields = array(
601
  'to_email' => urlencode($to),
602
  'subject' => urlencode($subject),
@@ -607,9 +611,10 @@ class LI_Emailer {
607
  $fields_string = http_build_query($fields);
608
 
609
  $ch = curl_init();
610
- curl_setopt($ch,CURLOPT_URL, 'http://leadin.com/pro/notifications/sendgrid_email.php');
611
  curl_setopt($ch,CURLOPT_POST, 1);
612
  curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
 
613
  $result = curl_exec($ch);
614
  curl_close($ch);
615
 
57
 
58
  if ( isset($options['pro']) && $options['pro'] )
59
  {
60
+ if ( strstr($to, ',') )
61
+ $emails = explode(',', $to);
 
 
 
 
62
  else
63
+ $emails = array($to);
64
+
65
+ if ( count($emails) )
66
  {
67
+ foreach ( $emails as $to_email )
68
+ {
69
+ $email_sent = $this->send_email_via_sendgrid($to_email, $subject, $body, get_bloginfo('wpurl'));
70
+
71
+ if ( $email_sent )
72
+ {
73
+ leadin_track_plugin_activity('Contact Notification Sent', array('service' => 'sendgrid'));
74
+ }
75
+ else
76
+ {
77
+ $email_sent = wp_mail($to_email, $subject, $body, $headers);
78
+ leadin_track_plugin_activity('Contact Notification Sent', array('service' => 'php_mail'));
79
+ }
80
+ }
81
  }
82
  }
83
  else
116
  * @param string site URL
117
  * @return string concatenated string - New submission on [Site Name](linked to site URL)
118
  */
119
+ function build_submission_details ( $url )
120
+ {
121
  $format = '<table class="row submission-detail" style="border-spacing: 0;border-collapse: collapse;padding: 0px;vertical-align: top;text-align: left;width: 100%%;position: relative;display: block;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="wrapper last" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 10px 20px 0px 0px;vertical-align: top;text-align: left;position: relative;padding-right: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><table class="twelve columns" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;margin: 0 auto;width: 580px;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="text-pad" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0px 0px 10px;vertical-align: top;text-align: left;padding-left: 10px;padding-right: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><h3 style="color: #666;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;margin: 0;text-align: left;line-height: 1.3;word-break: normal;font-size: 18px;">New submission on <a href="%s" style="color: #2ba6cb;text-decoration: none;">%s</a></h3></td><td class="expander" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;visibility: hidden;width: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"></td></tr></table></td></tr></table>' . "\r\n";
122
  $built_submission_details = sprintf($format, $url, get_bloginfo('name'));
123
  $built_submission_details .= '<img src="' . $this->create_tracking_pixel() . '"/>';
131
  * @param string email address from LI_Contact
132
  * @return string concatenated string with avatar + linked email address
133
  */
134
+ function build_contact_identity ( $email )
135
+ {
136
  $avatar_img = "https://api.hubapi.com/socialintel/v1/avatars?email=" . $email;
137
 
138
  $format = '<table class="row lead-identity" style="border-spacing: 0;border-collapse: collapse;padding: 0px;vertical-align: top;text-align: left;width: 100%%;position: relative;display: block;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="wrapper" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 10px 20px 0px 0px;vertical-align: top;text-align: left;position: relative;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><table class="two columns" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;margin: 0 auto;width: 80px;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="text-pad" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0px 0px 10px;vertical-align: top;text-align: left;padding-left: 10px;padding-right: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><img height="60" width="60" src="%s" style="background-color:#F6601D;outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;width: auto;max-width: 100%%;float: left;clear: both;display: block;"/></td><td class="expander" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;visibility: hidden;width: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"></td></tr></table></td><td class="wrapper last" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 10px 20px 0px 0px;vertical-align: top;text-align: left;position: relative;padding-right: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><table class="ten columns" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;margin: 0 auto;width: 480px;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0px 0px 10px;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><a style="color: #2ba6cb;text-decoration: none;" href="mailto:%s"><h1 style="font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;margin: 0;text-align: left;line-height: 60px;word-break: normal;font-size: 26px;">%s</h1></a></td><td class="expander" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;visibility: hidden;width: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"></td></tr></table></td></tr></table>';
147
  * @param stdClass LI_contact
148
  * @return string concatenated string of sessions
149
  */
150
+ function build_sessions ( $history )
151
+ {
152
  $built_sessions = "";
153
 
154
  $sessions = $history->sessions;
155
 
156
+ foreach ( $sessions as &$session )
157
+ {
158
  $first_event = end($session['events']);
159
  $first_event_date = $first_event['activities'][0]['event_date'];
160
  $session_date = date('F j, Y, g:i a', strtotime($first_event_date));
169
 
170
  $events = $session['events'];
171
 
172
+ foreach ( $events as &$event )
173
+ {
174
+ if ( $event['event_type'] == 'pageview' )
175
+ {
176
  $pageview = $event['activities'][0];
177
  $pageview_time = date('g:ia', strtotime($pageview['event_date']));
178
  $pageview_url = $pageview['pageview_url'];
182
  $format = '<table class="row lead-timeline__event pageview" style="border-spacing: 0;border-collapse: collapse;padding: 0px;vertical-align: top;text-align: left;width: 100%%;position: relative;display: block;background-color: #fff;border-top: 1px solid #dedede;border-right: 1px solid #dedede;border-left: 4px solid #28c;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="wrapper" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 10px 20px 0px 0px;vertical-align: top;text-align: left;position: relative;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><table class="two columns" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;margin: 0 auto;width: 80px;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="text-pad" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0px 0px 10px;vertical-align: top;text-align: left;padding-left: 10px;padding-right: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><p class="lead-timeline__event-time" style="margin: 0;color: #1f6696;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;margin-bottom: 10px;">%s</p></td><td class="expander" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;visibility: hidden;width: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"></td></tr></table></td><td class="wrapper last" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 10px 20px 0px 0px;vertical-align: top;text-align: left;position: relative;padding-right: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><table class="ten columns" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;margin: 0 auto;width: 480px;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="text-pad" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0px 0px 10px;vertical-align: top;text-align: left;padding-left: 10px;padding-right: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><p class="lead-timeline__event-title" style="margin: 0;color: #1f6696;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;margin-bottom: 10px;">%s</p><p class="lead-timeline__pageview-url" style="margin: 0;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;margin-bottom: 10px;"><a href="%s" style="color: #999;text-decoration: none;">%s</a></p></td><td class="expander" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;visibility: hidden;width: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"></td></tr></table></td></tr></table>';
183
  $built_sessions .= sprintf($format, $pageview_time, $pageview_title, $pageview_url, leadin_strip_params_from_url($pageview_url));
184
 
185
+ if ( $pageview['event_date'] == $first_event_date )
186
+ {
187
  $format = '<table class="row lead-timeline__event traffic-source" style="margin-bottom: 20px;border-spacing: 0;border-collapse: collapse;padding: 0px;vertical-align: top;text-align: left;width: 100%%;position: relative;display: block;background-color: #fff;border-top: 1px solid #dedede;border-right: 1px solid #dedede;border-left: 4px solid #99aa1f;border-bottom: 1px solid #dedede;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="wrapper" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 10px 20px 0px 0px;vertical-align: top;text-align: left;position: relative;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><table class="two columns" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;margin: 0 auto;width: 80px;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="text-pad" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0px 0px 10px;vertical-align: top;text-align: left;padding-left: 10px;padding-right: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><p class="lead-timeline__event-time" style="margin: 0;color: #727e14;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;margin-bottom: 10px;">%s</p></td><td class="expander" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;visibility: hidden;width: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"></td></tr></table></td><td class="wrapper last" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 10px 20px 0px 0px;vertical-align: top;text-align: left;position: relative;padding-right: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><table class="ten columns" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;margin: 0 auto;width: 480px;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="text-pad" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0px 0px 10px;vertical-align: top;text-align: left;padding-left: 10px;padding-right: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><p class="lead-timeline__event-title" style="margin: 0;color: #727e14;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;margin-bottom: 10px;">Traffic Source: %s</p> %s </td><td class="expander" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;visibility: hidden;width: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"></td></tr></table></td></tr></table>';
188
  $built_sessions .= sprintf($format, $pageview_time, ( $pageview_source ? '<a href="' . $pageview_source . '">' . leadin_strip_params_from_url($pageview_source) . '</a>' : 'Direct' ), $this->build_source_url_params($pageview_source));
189
  }
190
  }
191
+ else if ( $event['event_type'] == 'form' )
192
+ {
193
  $submission = $event['activities'][0];
194
  $submission_Time = date('g:ia', strtotime($submission['event_date']));
195
  $submission_url = $submission['form_page_url'];
219
  * @param object json decoded set of form fields
220
  * @return string concatenated string of form fields
221
  */
222
+ function build_form_fields ( $form_fields )
223
+ {
224
  $built_form_fields = "";
225
 
226
  if ( count($form_fields) )
243
  * @param object string
244
  * @return string concatenated string of key value pairs for url params
245
  */
246
+ function build_source_url_params ( $source_url )
247
+ {
248
  $built_source_url_params = "";
249
  $url_parts = parse_url($source_url);
250
 
300
  * @return string footer content
301
  */
302
  function build_enrichment_personal ( $li_contact )
303
+ {
304
+ $built_personal_data = "";
305
+ $social_data = $li_contact->history->lead->social_data;
306
+
307
+ if ( ! $social_data )
308
  {
309
  $format = '<td class="wrapper" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 10px 20px 0px 0px;vertical-align: top;text-align: left;position: relative;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><table class="six columns" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;margin: 0 auto;width: 280px;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="text-pad" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0px 0px 10px;vertical-align: top;text-align: left;padding-left: 10px;padding-right: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><p class="contact-description" style="margin: 0;color: #666;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;margin-bottom: 10px;">%s</p></td><td class="expander" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;visibility: hidden;width: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"></td></tr></table></td>';
310
  $built_personal_data .= sprintf($format, 'We couldn\'t find any personal info for this contact.');
316
  $format = '<td class="wrapper" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 10px 20px 0px 0px;vertical-align: top;text-align: left;position: relative;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><table class="six columns" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;margin: 0 auto;width: 280px;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="text-pad" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0px 0px 10px;vertical-align: top;text-align: left;padding-left: 10px;padding-right: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><h3 class="contact-name" style="color: #444;font-family: Helvetica, Arial, sans-serif;font-weight: bold;padding: 0;margin: 0;text-align: left;line-height: 1.3;word-break: normal;font-size: 14px;">%s</h3><h4 class="contact-name-subhead" style="color: #444;font-family: Helvetica, Arial, sans-serif;font-weight: 400;padding: 0;margin: 0;text-align: left;line-height: 1.3;word-break: normal;font-size: 14px;margin-bottom: 15px;">%s</h4><p class="contact-description" style="margin: 0;color: #666;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;margin-bottom: 10px;">%s</p>%s</td><td class="expander" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;visibility: hidden;width: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"></td></tr></table></td>';
317
 
318
  $contact_name = $li_contact->history->lead->lead_first_name . ' ' . $li_contact->history->lead->lead_last_name;
319
+ $contact_job_title = $social_data->title . ( $social_data->company_name ? ' - ' . $social_data->company_name : '' );
320
+ $contact_bio = $social_data->description;
 
 
 
 
321
 
322
  $built_personal_data .= sprintf($format, $contact_name, $contact_job_title, $contact_bio, $this->build_enrichment_personal_fields($li_contact));
323
 
330
  * @param stdClass history from LI_Contact
331
  * @return string footer content
332
  */
333
+ function build_enrichment_personal_fields ( $li_contact )
334
+ {
335
  $built_personal_data_fields = "";
336
+ $social_data = $li_contact->history->lead->social_data;
337
+
338
  $format = '<p class="lead-timeline__submission-field" style="margin: 0;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;margin-bottom: 10px;"><label class="lead-timeline__submission-label" style="text-transform: uppercase;font-size: 12px;color: #999;letter-spacing: 0.05em;">%s</label><br/>%s</p>';
339
 
340
+ if ( count($social_data->social_profiles) )
341
  {
342
+ foreach ( $social_data->social_profiles as $key => $profile )
343
  {
344
+ $field_label = $profile->typename;
345
+ $field_data = '<a href="' . leadin_safe_social_profile_url($profile->url) . '" target="_blank">' . ( $profile->typeid == 'twitter' ? '@' : '' ) . ( $profile->typeid == 'linkedin' ? '/in/' : '' ) . $profile->username . '</a>';
346
+ $built_personal_data_fields .= sprintf($format, $field_label, $field_data);
 
 
 
 
347
  }
348
  }
349
 
360
  {
361
  $built_company_data = "";
362
 
363
+ $company_data = ( isset($li_contact->history->lead->company_data) ? $li_contact->history->lead->company_data : '' );
 
364
 
365
+ if ( $company_data )
 
 
 
 
 
 
 
366
  {
367
+ $company_location = '';
368
+ $company_bio = '';
 
369
 
370
+ if ( $company_data->city )
371
+ $company_location .= $company_data->city;
 
 
 
372
 
373
+ if ( $company_data->state )
374
+ $company_location .= ( $company_data->city ? ', ' : '' ) . $company_data->state;
 
 
 
375
 
376
+ if ( $company_data->country )
377
+ $company_location .= ', ' . $company_data->country;
 
 
 
 
378
 
379
+ if ( $company_data->overview )
380
+ {
381
+ if ( strlen($company_data->overview) < 260 )
382
+ $company_bio = $company_data->overview;
383
+ else
384
+ $company_bio = substr($company_data->overview, 0, strpos($company_data->overview, '.', 260)) . ' ...';
385
+ }
386
 
 
 
387
  $format = '<td class="wrapper" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 10px 20px 0px 0px;vertical-align: top;text-align: left;position: relative;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><table class="six columns" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;margin: 0 auto;width: 280px;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="text-pad" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0px 0px 10px;vertical-align: top;text-align: left;padding-left: 10px;padding-right: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><h3 class="contact-name" style="color: #444;font-family: Helvetica, Arial, sans-serif;font-weight: bold;padding: 0;margin: 0;text-align: left;line-height: 1.3;word-break: normal;font-size: 14px;">%s</h3><h4 class="contact-name-subhead" style="color: #444;font-family: Helvetica, Arial, sans-serif;font-weight: 400;padding: 0;margin: 0;text-align: left;line-height: 1.3;word-break: normal;font-size: 14px;margin-bottom: 15px;">%s</h4><p class="contact-description" style="margin: 0;color: #666;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;margin-bottom: 10px;">%s</p>%s</td><td class="expander" style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;visibility: hidden;width: 0px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"></td></tr></table></td>';
388
+ $built_company_data .= sprintf($format, $company_data->name, $company_location, $company_bio, $this->build_enrichment_company_fields($li_contact));
389
  }
390
  else
391
  {
402
  * @param stdClass history from LI_Contact
403
  * @return string footer content
404
  */
405
+ function build_enrichment_company_fields ( $li_contact )
406
+ {
407
+ $company_data = $li_contact->history->lead->company_data;
408
 
409
  $built_company_data_fields = "";
410
 
411
  $format = '<p class="lead-timeline__submission-field" style="margin: 0;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;margin-bottom: 10px;"><label class="lead-timeline__submission-label" style="text-transform: uppercase;font-size: 12px;color: #999;letter-spacing: 0.05em;">%s</label><br/>%s</p>';
412
 
413
+ if ( $company_data->facebookpageurl )
414
  {
415
  $field_label = "Facebook";
416
+ $field_data = '<a href="' . $company_data->facebookpageurl . '" target="_blank">' . $company_data->name . '</a>';
417
  $built_company_data_fields .= sprintf($format, $field_label, $field_data);
418
  }
419
 
420
+ if ( $company_data->twitterusername )
421
  {
422
  $field_label = "Twitter";
423
+ $field_data = '<a href="' . $company_data->twitterurl . '" target="_blank">' . '@' . $company_data->twitterusername . '</a>';
424
  $built_company_data_fields .= sprintf($format, $field_label, $field_data);
425
  }
426
 
427
+ if ( $company_data->linkedinurl )
428
  {
429
+ $field_label = "LinkedIn";
430
+ $field_data = '<a href="' . $company_data->linkedinurl . '" target="_blank">' . $company_data->name . '</a>';
431
  $built_company_data_fields .= sprintf($format, $field_label, $field_data);
432
  }
433
 
441
  * @param stdClass history from LI_Contact
442
  * @return string footer content
443
  */
444
+ function build_footer ( $li_contact )
445
+ {
446
  $built_footer = "";
447
  $button_text = "View Contact Record";
448
  $contactViewUrl = get_bloginfo('wpurl') . "/wp-admin/admin.php?page=leadin_contacts&action=view&lead=" . $li_contact->history->lead->lead_id;
534
  // Each line in an email can only be 998 characters long, so lines need to be broken with a wordwrap
535
  $body = wordwrap($body, 900, "\r\n");
536
 
537
+ $headers = "From: Leadin <" . $from . ">\r\n";
538
  $headers.= "Reply-To: Leadin <" . $from . ">\r\n";
539
  $headers.= "X-Mailer: PHP/" . phpversion() . "\r\n";
540
  $headers.= "MIME-Version: 1.0\r\n";
556
  $powered_by = '';
557
 
558
  $powered_by .= "<table class='row section' style='border-spacing: 0;border-collapse: collapse;vertical-align: top;text-align: left;width: 100%;position: relative;display: block;margin-top: 20px;padding: 0px;'><tr style='vertical-align: top;text-align: left;padding: 0;' align='left'><td class='wrapper last' style='word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse !important;vertical-align: top;text-align: left;position: relative;padding: 0 0px 0 0;' align='left' valign='top'><table class='twelve columns' style='border-spacing: 0;border-collapse: collapse;vertical-align: top;text-align: left;width: 580px;margin: 0 auto;padding: 0;'><tr style='vertical-align: top;text-align: left;padding: 0;' align='left'><td style='padding: 10px 20px;' align='left' valign='top'><table style='border-spacing: 0;border-collapse: collapse;vertical-align: top;text-align: left;width: 100%;overflow: hidden;padding: 0;'><tr style='vertical-align: top;text-align: left;padding: 0;' align='left'><td style='word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse !important;vertical-align: top;text-align: center;display: block;width: auto !important;font-size: 16px;padding: 10px 20px;' align='center' valign='top'>";
559
+ $powered_by .="<div style='font-size: 11px; color: #888; padding: 0 0 5px 0;'>Powered by</div><a href='http://leadin.com/wordpress-subscribe-widget?utm_source=virality&utm_medium=referral&utm_term=" . get_bloginfo('wpurl') . "&utm_content=e11&utm_campaign=subscribe%20confirmation%20email'><img alt='Leadin' height='20px' width='99px' src='http://leadin.com/wp-content/themes/LeadIn-WP-Theme/library/images/logos/leadin_logo_small_grey.png' alt='leadin.com'/></a>";
560
  $powered_by .= "</td></tr></table></td><td class='expander' style='word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;border-collapse: collapse !important;vertical-align: top;text-align: left;visibility: hidden;width: 0px;padding: 0;border: 0;' align='left' valign='top'></td></tr></table></td></tr></table>";
561
 
562
  return $powered_by;
598
  */
599
  function send_email_via_sendgrid ( $to = '', $subject = '', $body = '', $domain = '' )
600
  {
601
+ if ( ! function_exists('curl_init') )
602
+ return FALSE;
603
+
604
  $fields = array(
605
  'to_email' => urlencode($to),
606
  'subject' => urlencode($subject),
611
  $fields_string = http_build_query($fields);
612
 
613
  $ch = curl_init();
614
+ curl_setopt($ch,CURLOPT_URL, 'http://andygcook.com/scripts/notifications/sendgrid_email_localhost.php');
615
  curl_setopt($ch,CURLOPT_POST, 1);
616
  curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
617
+ curl_setopt($ch,CURLOPT_RETURNTRANSFER, 1);
618
  $result = curl_exec($ch);
619
  curl_close($ch);
620
 
inc/class-leadin.php CHANGED
@@ -72,9 +72,15 @@ class WPLeadIn {
72
  return FALSE;
73
  }
74
 
 
 
 
 
 
 
75
  $args = array(
76
  'id' => 'leadin-admin-menu',
77
- 'title' => '<span class="ab-icon" '. ( $wp_version < 3.8 && !is_plugin_active('mp6/mp6.php') ? ' style="margin-top: 3px;"' : ''). '><img src="data:image/svg+xml;base64,' . base64_encode(file_get_contents(LEADIN_PATH . '/images/leadin-svg-icon.svg')). '"></span><span class="ab-label">Leadin</span>', // alter the title of existing node
78
  'parent' => FALSE, // set parent to false to make it a top level (parent) node
79
  'href' => get_bloginfo('wpurl') . '/wp-admin/admin.php?page=leadin_stats',
80
  'meta' => array('title' => 'Leadin')
72
  return FALSE;
73
  }
74
 
75
+
76
+ if ( ini_get('allow_url_fopen') )
77
+ $leadin_icon = '<img src="data:image/svg+xml;base64,' . base64_encode(file_get_contents(LEADIN_PATH . '/images/leadin-svg-icon.svg')) . '">';
78
+ else
79
+ $leadin_icon = '<img src="' . LEADIN_PATH . '/images/leadin-icon-16x16.png' . '">';
80
+
81
  $args = array(
82
  'id' => 'leadin-admin-menu',
83
+ 'title' => '<span class="ab-icon" '. ( $wp_version < 3.8 && !is_plugin_active('mp6/mp6.php') ? ' style="margin-top: 3px;"' : '' ) . '>' . $leadin_icon . '</span><span class="ab-label">Leadin</span>', // alter the title of existing node
84
  'parent' => FALSE, // set parent to false to make it a top level (parent) node
85
  'href' => get_bloginfo('wpurl') . '/wp-admin/admin.php?page=leadin_stats',
86
  'meta' => array('title' => 'Leadin')
leadin.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Leadin
4
  Plugin URI: http://leadin.com
5
  Description: Leadin is an easy-to-use marketing automation and lead tracking plugin for WordPress that helps you better understand your web site visitors.
6
- Version: 3.1.5
7
  Author: Andy Cook, Nelson Joyce
8
  Author URI: http://leadin.com
9
  License: GPL2
@@ -26,7 +26,7 @@ if ( !defined('LEADIN_DB_VERSION') )
26
  define('LEADIN_DB_VERSION', '2.2.4');
27
 
28
  if ( !defined('LEADIN_PLUGIN_VERSION') )
29
- define('LEADIN_PLUGIN_VERSION', '3.1.5');
30
 
31
  if ( !defined('MIXPANEL_PROJECT_TOKEN') )
32
  define('MIXPANEL_PROJECT_TOKEN', '2791b6942b57bbef2ba12b2452468253');
3
  Plugin Name: Leadin
4
  Plugin URI: http://leadin.com
5
  Description: Leadin is an easy-to-use marketing automation and lead tracking plugin for WordPress that helps you better understand your web site visitors.
6
+ Version: 3.1.6
7
  Author: Andy Cook, Nelson Joyce
8
  Author URI: http://leadin.com
9
  License: GPL2
26
  define('LEADIN_DB_VERSION', '2.2.4');
27
 
28
  if ( !defined('LEADIN_PLUGIN_VERSION') )
29
+ define('LEADIN_PLUGIN_VERSION', '3.1.6');
30
 
31
  if ( !defined('MIXPANEL_PROJECT_TOKEN') )
32
  define('MIXPANEL_PROJECT_TOKEN', '2791b6942b57bbef2ba12b2452468253');
power-ups/contacts/admin/contacts-admin.php CHANGED
@@ -82,21 +82,41 @@ class WPLeadInContactsAdmin extends WPLeadInAdmin {
82
  $li_contact = new LI_Contact();
83
  $li_contact->set_hashkey_by_id($lead_id);
84
  $li_contact->get_contact_history();
85
- $lead_email = $li_contact->history->lead->lead_email;
86
- $lead_source = leadin_strip_params_from_url($li_contact->history->lead->lead_source);
87
- $leadin_user = leadin_get_current_user();
 
88
 
89
  ?>
 
 
90
  <script type="text/javascript">
91
  !function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","group","track","ready","alias","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION="3.0.1";
92
  analytics.load("<?php echo SEGMENT_WRITE_KEY ?>");
93
- analytics.identify("<?php echo $leadin_user['user_id'] ?>", {
94
- email : "<?php echo $leadin_user['email'] ?>",
95
- contacts : "<?php echo $leadin_user['total_contacts'] ?>",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  });
97
- analytics.page("Loaded Contact Detail Page");
 
98
  }}();
99
  </script>
 
 
100
  <?php
101
 
102
  if ( isset($_POST['edit_tags']) )
@@ -115,44 +135,64 @@ class WPLeadInContactsAdmin extends WPLeadInAdmin {
115
  $li_contact->history->tags = $li_contact->get_contact_tags($li_contact->hashkey);
116
  }
117
 
118
- if ( isset($_GET['stats_dashboard']) )
119
- echo '<a href="' . get_bloginfo('wpurl') . '/wp-admin/admin.php?page=leadin_stats">&larr; Stat Dashboard</a>';
120
- else
121
- {
122
- if ( isset($_GET['redirect_to']) )
 
 
 
 
 
123
  {
124
- if ( strstr($_GET['redirect_to'], 'contact_type') )
125
  {
126
- $url_parts = parse_url(urldecode($_GET['redirect_to']));
127
- parse_str($url_parts['query'], $url_vars);
 
 
128
 
129
- if ( isset($url_vars['contact_type']) && $url_vars['contact_type'] )
130
- echo '<a href="' . $_GET['redirect_to'] . '">&larr; All ' . ucwords($url_vars['contact_type']) . '</a>';
 
 
 
131
  else
132
  echo '<a href="' . $_GET['redirect_to'] . '">&larr; All Contacts</a>';
 
133
  }
134
  else
135
- echo '<a href="' . $_GET['redirect_to'] . '">&larr; All Contacts</a>';
136
-
137
  }
138
- else
139
- echo '<a href="' . get_bloginfo('wpurl') . '/wp-admin/admin.php?page=leadin_contacts">&larr; All Contacts</a>';
140
- }
141
-
142
- echo '<div class="contact-header-wrap">';
143
-
144
- if ( $li_contact->history->lead->lead_deleted )
145
- $li_contact->display_error_message_for_merged_contact($li_contact->history->lead->lead_email);
 
 
 
 
 
 
 
146
 
147
- echo '<img class="contact-header-avatar leadin-dynamic-avatar_' . substr($lead_id, -1) . '" height="76px" width="76px" src="https://api.hubapi.com/socialintel/v1/avatars?email=' . $lead_email . '"/>';
148
- echo '<div class="contact-header-info">';
149
- echo '<h1 class="contact-name">' . $lead_email . '</h1>';
 
 
150
 
151
-
152
- echo '<div class="contact-tags">';
 
153
  foreach( $li_contact->history->tags as $tag ) {
154
  if ($tag->tag_set)
155
- echo '<a class="contact-tag" href="' . get_bloginfo('wpurl') . '/wp-admin/admin.php?page=leadin_contacts&contact_type=' . $tag->tag_slug . '"><span class="icon-tag"></span>' . $tag->tag_text . '</a>';
156
  }
157
  ?>
158
 
@@ -183,125 +223,12 @@ class WPLeadInContactsAdmin extends WPLeadInAdmin {
183
  <a class="thickbox contact-edit-tags" <?php echo ( $li_contact->history->lead->lead_deleted ? 'style="display: none;"' : '' ); ?> href="#TB_inline?width=400&height=400&inlineId=edit-contact-tags">edit tags</a>
184
 
185
  <?php
 
 
186
 
187
- echo '</div>';
188
- echo '</div>';
189
- echo '</div>';
190
-
191
- echo '<div id="col-container">';
192
- echo '<div id="col-right" ' . ( $li_contact->history->lead->lead_deleted ? 'style="display: none;"' : '' ) . '>';
193
- echo '<div class="col-wrap contact-history">';
194
- echo '<ul class="sessions">';
195
- $sessions = $li_contact->history->sessions;
196
- foreach ( $sessions as &$session )
197
- {
198
- $first_event = end($session['events']);
199
- $first_event_date = $first_event['event_date'];
200
- $session_date = date('F j, Y, g:ia', strtotime($first_event['event_date']));
201
- $session_start_time = date('g:ia', strtotime($first_event['event_date']));
202
-
203
- $last_event = array_values($session['events']);
204
- $session_end_time = date('g:ia', strtotime($last_event[0]['event_date']));
205
-
206
- echo '<li class="session">';
207
- echo '<h3 class="session-date">' . $session_date . ( $session_start_time != $session_end_time ? ' - ' . $session_end_time : '' ) . '</h3>';
208
-
209
- echo '<ul class="events">';
210
-
211
- //$events = array_reverse($session['events']);
212
- $events = $session['events'];
213
- foreach ( $events as &$event )
214
- {
215
- if ( $event['event_type'] == 'pageview' )
216
- {
217
- $pageview = $event['activities'][0];
218
-
219
- echo '<li class="event pageview">';
220
- echo '<div class="event-time">' . date('g:ia', strtotime($pageview['event_date'])) . '</div>';
221
- echo '<div class="event-content">';
222
- echo '<p class="event-title">' . $pageview['pageview_title'] . '</p>';
223
- echo '<a class="event-detail pageview-url" target="_blank" href="' . $pageview['pageview_url'] . '">' . leadin_strip_params_from_url($pageview['pageview_url']) . '</a>';
224
- echo '</div>';
225
- echo '</li>';
226
-
227
- if ( $pageview['event_date'] == $first_event['event_date'] )
228
- {
229
- echo '<li class="event source">';
230
- echo '<div class="event-time">' . date('g:ia', strtotime($pageview['event_date'])) . '</div>';
231
- echo '<div class="event-content">';
232
- echo '<p class="event-title">Traffic Source: ' . ( $pageview['pageview_source'] ? '<a href="' . $pageview['pageview_source'] . '">' . leadin_strip_params_from_url($pageview['pageview_source']) : 'Direct' ) . '</a></p>';
233
- $url_parts = parse_url($pageview['pageview_source']);
234
- if ( isset($url_parts['query']) )
235
- {
236
- if ( $url_parts['query'] )
237
- {
238
- parse_str($url_parts['query'], $url_vars);
239
- if ( count($url_vars) )
240
- {
241
- echo '<ul class="event-detail fields">';
242
- foreach ( $url_vars as $key => $value )
243
- {
244
- if ( ! $value )
245
- continue;
246
-
247
- echo '<li class="field">';
248
- echo '<label class="field-label">' . $key . ':</label>';
249
- echo '<p class="field-value">' . nl2br($value) . '</p>';
250
- echo '</li>';
251
- }
252
- echo '</ul>';
253
- }
254
- }
255
- }
256
-
257
- echo '</div>';
258
- echo '</li>';
259
- }
260
- }
261
- else if ( $event['event_type'] == 'form' )
262
- {
263
- $submission = $event['activities'][0];
264
- $form_fields = json_decode($submission['form_fields']);
265
- $num_form_fieds = count($form_fields);
266
- $tag_text = '<a class="contact-tag" href="' . get_bloginfo('wpurl') . '/wp-admin/admin.php?page=leadin_contacts&contact_type=' . $tag->tag_slug . '">' . $tag->tag_text . '</a>';
267
-
268
- echo '<li class="event form-submission">';
269
- echo '<div class="event-time">' . date('g:ia', strtotime($submission['event_date'])) . '</div>';
270
- echo '<div class="event-content">';
271
- echo '<p class="event-title">';
272
- echo 'Filled out ' . $event['form_name'] . ' on page <a href="' . $submission['form_page_url'] . '">' . $submission['form_page_title'] . '</a>';
273
- if ( count($event['form_tags']) )
274
- {
275
- echo ' and tagged as ';
276
- for ( $i = 0; $i < count($event['form_tags']); $i++ )
277
- echo '<a href="' . get_bloginfo('wpurl') . '/wp-admin/admin.php?page=leadin_contacts&contact_type=' . $event['form_tags'][$i]['tag_slug'] . '">' . $event['form_tags'][$i]['tag_text'] . '</a> ';
278
- }
279
- echo '</p>';
280
- echo '<ul class="event-detail fields">';
281
- if ( count($form_fields) )
282
- {
283
- foreach ( $form_fields as $field )
284
- {
285
- echo '<li class="field">';
286
- echo '<label class="field-label">' . $field->label . ':</label>';
287
- echo '<p class="field-value">' . nl2br($field->value) . '</p>';
288
- echo '</li>';
289
- }
290
- }
291
- echo '</ul>';
292
- echo '</div>';
293
- echo '</li>';
294
- }
295
- }
296
- echo '</ul>';
297
- echo '</li>';
298
- }
299
- echo '</ul>';
300
- echo '</div>';
301
- echo '</div>';
302
- echo '<div id="col-left" class="metabox-holder" ' . ( $li_contact->history->lead->lead_deleted ? 'style="display: none;"' : '' ) . '>';
303
- echo '<div class="leadin-meta-section">';
304
- echo '<h4 class="leain-meta-header">Tracking Info</h4>';
305
  echo '<table class="leadin-meta-table"><tbody>';
306
 
307
  if ( $li_contact->history->lead->lead_first_name )
@@ -332,36 +259,30 @@ class WPLeadInContactsAdmin extends WPLeadInAdmin {
332
  echo '<td>' . $li_contact->history->lead->total_submissions . '</td>';
333
  echo '</tr>';
334
  echo '</tbody></table>';
335
- echo '</div>'; // leadin-meta-section
336
- echo '<div class="leadin-meta-section">';
337
- echo '<h4 class="leain-meta-header leadin-premium-tag">Personal Info</h4>';
 
 
338
  echo '<table class="leadin-meta-table"><tbody>';
339
  echo '<tr>';
340
  if ( leadin_check_pro_user() )
341
  {
342
- $social_data = FALSE;
343
-
344
- if ( isset($li_contact->history->lead->social_data->properties->primary) )
345
  {
346
- $primary = $li_contact->history->lead->social_data->properties->primary;
347
- echo '<b>' . $primary->title . ( $primary->company_name ? ' - ' . $primary->company_name : '' ) . '</b>';
348
-
349
- $social_data = TRUE;
350
  }
351
-
352
- if ( isset($li_contact->history->lead->social_data->properties->description) )
353
  {
354
- echo '</br>' . $li_contact->history->lead->social_data->properties->description;
 
355
 
356
- $social_data = TRUE;
357
- }
358
-
359
- if ( isset($li_contact->history->lead->social_data->properties->social_profiles) )
360
- {
361
- if ( count($li_contact->history->lead->social_data->properties->social_profiles) )
362
  {
363
  echo '<table class="leadin-meta-table"><tbody>';
364
- foreach ( $li_contact->history->lead->social_data->properties->social_profiles as $key => $profile )
365
  {
366
  echo '<tr>';
367
  echo '<th>';
@@ -373,13 +294,8 @@ class WPLeadInContactsAdmin extends WPLeadInAdmin {
373
  echo '</tr>';
374
  }
375
  echo '</tbody></table>';
376
-
377
- $social_data = TRUE;
378
  }
379
  }
380
-
381
- if ( ! $social_data )
382
- echo 'We couldn\'t find any personal info for this contact.';
383
  }
384
  else
385
  {
@@ -391,24 +307,28 @@ class WPLeadInContactsAdmin extends WPLeadInAdmin {
391
  }
392
  echo '</tr>';
393
  echo '</tbody></table>';
394
- echo '</div>'; // leadin-meta-section
395
- echo '<div class="leadin-meta-section">';
396
- echo '<h4 class="leain-meta-header leadin-premium-tag">Company Info</h4>';
 
 
397
  echo '<table class="leadin-meta-table"><tbody>';
398
  echo '<tr>';
399
  if ( leadin_check_pro_user() )
400
  {
401
- $company_data = FALSE;
402
 
403
- $properties = ( isset($li_contact->history->lead->company_data->properties) ? $li_contact->history->lead->company_data->properties : '' );
404
-
405
- if ( isset($properties->name) )
 
 
406
  {
407
  echo '<p>';
408
- echo '<b>About ' . $properties->name . '</b>';
409
- if ( isset($properties->overview) )
410
  {
411
- $overview = $properties->overview;
412
 
413
  if ( strlen($overview) < 260 )
414
  {
@@ -419,109 +339,85 @@ class WPLeadInContactsAdmin extends WPLeadInAdmin {
419
  echo '<div id="company-detail-overview-short">' . substr($overview, 0, strpos($overview, '.', 260)) . ' ... <a id="contact-detail-read-more" href="javascript:void(0);">read more</a></div>';
420
  echo '<div style="display: none;" id="company-detail-overview-full">' . $overview . ' <a id="contact-detail-read-less" href="javascript:void(0);">read less</a></div>';
421
  }
422
-
423
- $company_data = TRUE;
424
  }
425
  echo '</p>';
426
- }
427
-
428
- echo '<table class="leadin-meta-table"><tbody>';
429
 
430
- if ( !empty($properties->employees) )
431
- {
432
- echo '<tr>';
433
- echo '<th>Employees</th>';
434
- echo '<td>' . $properties->employees . '</td>';
435
- echo '</tr>';
436
 
437
- $company_data = TRUE;
438
- }
439
-
440
- if ( !empty($properties->revenue) )
441
- {
442
- echo '<tr>';
443
- echo '<th>Revenue</th>';
444
- echo '<td>' . $properties->revenue . '</td>';
445
- echo '</tr>';
446
-
447
- $company_data = TRUE;
448
- }
449
-
450
- if ( !empty($properties->state) || !empty($properties->country) )
451
- {
452
- echo '<tr>';
453
- echo '<th>Headquarters</th>';
454
- echo '<td>' . ( !empty($properties->state) ? $properties->state : '' ) . ( !empty($properties->state) && !empty($properties->country) ? ', ' : '' ) . ( !empty($properties->country) ? $properties->country : '' ) . '</td>';
455
- echo '</tr>';
456
-
457
- $company_data = TRUE;
458
- }
459
-
460
- if ( !empty($properties->founded) )
461
- {
462
- echo '<tr>';
463
- echo '<th>Founded</th>';
464
- echo '<td>' . $properties->founded . '</td>';
465
- echo '</tr>';
466
-
467
- $company_data = TRUE;
468
- }
469
-
470
- if ( !empty($properties->facebookpageurl) )
471
- {
472
- echo '<tr>';
473
- echo '<th>Facebook</th>';
474
- echo '<td>' . '<a href="' . $properties->facebookpageurl . '" target="_blank">' . $properties->name . '</a></td>';
475
- echo '</tr>';
476
 
477
- $company_data = TRUE;
478
- }
 
 
 
 
 
479
 
480
- if ( !empty($properties->twitterusername) )
481
- {
482
- echo '<tr>';
483
- echo '<th>Twitter</th>';
484
- echo '<td>' . '<a href="' . $properties->twitterurl . '" target="_blank">' . '@' . $properties->twitterusername . '</a></td>';
485
- echo '</tr>';
 
486
 
487
- $company_data = TRUE;
488
- }
 
 
 
 
 
489
 
490
- if ( !empty($properties->linkedinurl) )
491
- {
492
- echo '<tr>';
493
- echo '<th>LinkedIn</th>';
494
- echo '<td>' . '<a href="' . $properties->linkedinurl . '" target="_blank">' . $properties->name . '</a></td>';
495
- echo '</tr>';
 
496
 
497
- $company_data = TRUE;
498
- }
 
 
 
 
 
499
 
500
- if ( !empty($properties->address) )
501
- {
502
- echo '<tr>';
503
- echo '<th>Address</th>';
504
- echo '<td><a href="http://maps.google.com/maps?q=' . urlencode($properties->address) . '"" target="_blank">' . $properties->address . '</a></td>';
505
- echo '</tr>';
 
506
 
507
- $company_data = TRUE;
508
- }
 
 
 
 
 
509
 
510
- if ( !empty($properties->country) )
511
- {
512
- echo '<tr>';
513
- echo '<th>Country</th>';
514
- echo '<td>' . $properties->country . '</td>';
515
- echo '</tr>';
 
516
 
517
- $company_data = TRUE;
518
  }
519
-
520
- if ( ! $company_data )
521
- echo 'We couldn\'t find any company info for this contact.';
522
-
523
-
524
- echo '</tbody></table>';
525
  }
526
  else
527
  {
@@ -533,9 +429,120 @@ class WPLeadInContactsAdmin extends WPLeadInAdmin {
533
  }
534
  echo '</tr>';
535
  echo '</tbody></table>';
536
- echo '</div>'; // leadin-meta-section
537
- echo '</div>'; // col-left
538
- echo '</div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
539
  }
540
 
541
  /**
82
  $li_contact = new LI_Contact();
83
  $li_contact->set_hashkey_by_id($lead_id);
84
  $li_contact->get_contact_history();
85
+ $lead_name = ( $li_contact->history->lead->lead_first_name || $li_contact->history->lead->lead_last_name ? $li_contact->history->lead->lead_first_name . ' ' . $li_contact->history->lead->lead_last_name : '' );
86
+ $lead_email = $li_contact->history->lead->lead_email;
87
+ $lead_source = leadin_strip_params_from_url($li_contact->history->lead->lead_source);
88
+ $leadin_user = leadin_get_current_user();
89
 
90
  ?>
91
+
92
+ <?php if ( leadin_check_pro_user() ) : ?>
93
  <script type="text/javascript">
94
  !function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","group","track","ready","alias","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION="3.0.1";
95
  analytics.load("<?php echo SEGMENT_WRITE_KEY ?>");
96
+ analytics.identify("<?php echo $leadin_user['user_id']; ?>", {
97
+ "name" : "<?php echo $leadin_user['alias']; ?>",
98
+ "email" : "<?php echo $leadin_user['email']; ?>",
99
+ "wp-url" : "<?php echo $leadin_user['wp_url']; ?>",
100
+ "wp-version" : "<?php echo $leadin_user['wp_version']; ?>",
101
+ "li-version" : "<?php echo $leadin_user['li_version']; ?>",
102
+ "li-source" : "<?php echo LEADIN_SOURCE; ?>",
103
+ "createdAt" : "<?php echo date('Y-m-d H:i:s'); ?>",
104
+ "website" : "<?php echo $leadin_user['wp_url']; ?>",
105
+ "company" : "<?php echo $leadin_user['wp_url']; ?>",
106
+ "contacts" : <?php echo $leadin_user['total_contacts']; ?>,
107
+ "utm_source" : "<?php echo $leadin_user['utm_source']; ?>",
108
+ "utm_medium" : "<?php echo $leadin_user['utm_medium']; ?>",
109
+ "utm_term" : "<?php echo $leadin_user['utm_term']; ?>",
110
+ "utm_content" : "<?php echo $leadin_user['utm_content']; ?>",
111
+ "utm_campaign" : "<?php echo $leadin_user['utm_campaign']; ?>",
112
+ "referral_source" : "<?php echo $leadin_user['referral_source']; ?>"
113
  });
114
+ analytics.track("Loaded Contact Detail Page");
115
+ analytics.page('');
116
  }}();
117
  </script>
118
+ <?php endif; ?>
119
+
120
  <?php
121
 
122
  if ( isset($_POST['edit_tags']) )
135
  $li_contact->history->tags = $li_contact->get_contact_tags($li_contact->hashkey);
136
  }
137
 
138
+ echo '<div class="contact-top-navigation">';
139
+
140
+ if ( $li_contact->history->lead->lead_deleted ) {
141
+ $li_contact->display_error_message_for_merged_contact($li_contact->history->lead->lead_email);
142
+ }
143
+
144
+ if ( isset($_GET['stats_dashboard']) ) {
145
+ echo '<a href="' . get_bloginfo('wpurl') . '/wp-admin/admin.php?page=leadin_stats">&larr; Stat Dashboard</a>';
146
+ }
147
+ else
148
  {
149
+ if ( isset($_GET['redirect_to']) )
150
  {
151
+ if ( strstr($_GET['redirect_to'], 'contact_type') )
152
+ {
153
+ $url_parts = parse_url(urldecode($_GET['redirect_to']));
154
+ parse_str($url_parts['query'], $url_vars);
155
 
156
+ if ( isset($url_vars['contact_type']) && $url_vars['contact_type'] )
157
+ echo '<a href="' . $_GET['redirect_to'] . '">&larr; All ' . ucwords($url_vars['contact_type']) . '</a>';
158
+ else
159
+ echo '<a href="' . $_GET['redirect_to'] . '">&larr; All Contacts</a>';
160
+ }
161
  else
162
  echo '<a href="' . $_GET['redirect_to'] . '">&larr; All Contacts</a>';
163
+
164
  }
165
  else
166
+ echo '<a href="' . get_bloginfo('wpurl') . '/wp-admin/admin.php?page=leadin_contacts">&larr; All Contacts</a>';
 
167
  }
168
+ echo '</div>'; // contact-top-navigation
169
+
170
+ echo '<div class="contact-deatils-column">';
171
+ echo '<div class="leadin-meta-section">';
172
+ echo '<div class="leadin-postbox__content">';
173
+ echo '<img class="contact-header-avatar leadin-dynamic-avatar_' . substr($lead_id, -1) . '" height="65px" width="65px" src="https://api.hubapi.com/socialintel/v1/avatars?email=' . $lead_email . '"/>';
174
+ echo '<div class="contact-header-info">';
175
+ echo '<h2 class="contact-name">' . ( $lead_name ? $lead_name : $lead_email ) . '</h2>';
176
+ echo '<div class="contact-networks">';
177
+
178
+ if ( isset($li_contact->history->lead->social_data->social_profiles) && count($li_contact->history->lead->social_data->social_profiles) )
179
+ {
180
+ foreach ( $li_contact->history->lead->social_data->social_profiles as $key => $profile )
181
+ echo '<a href="' . leadin_safe_social_profile_url($profile->url) . '" class="icon-' . $profile->typeid . '" target="_blank"></a>';
182
+ }
183
 
184
+ echo '<a href="mailto:' . $lead_email . '" class="icon-envelope"></a>';
185
+ echo '</div>';
186
+ echo '</div>';
187
+ echo '</div>';
188
+ echo '</div>'; // leadin-meta-section
189
 
190
+ echo '<div class="leadin-meta-section">';
191
+ echo '<h4 class="leain-meta-header">Tags</h4>';
192
+ echo '<div class="leadin-postbox__content">';
193
  foreach( $li_contact->history->tags as $tag ) {
194
  if ($tag->tag_set)
195
+ echo '<a class="contact-tag" href="' . get_bloginfo('wpurl') . '/wp-admin/admin.php?page=leadin_contacts&contact_type=' . $tag->tag_slug . '">' . $tag->tag_text . '</a>';
196
  }
197
  ?>
198
 
223
  <a class="thickbox contact-edit-tags" <?php echo ( $li_contact->history->lead->lead_deleted ? 'style="display: none;"' : '' ); ?> href="#TB_inline?width=400&height=400&inlineId=edit-contact-tags">edit tags</a>
224
 
225
  <?php
226
+ echo '</div>'; // leadin-postbox__content
227
+ echo '</div>'; // leadin-meta-section
228
 
229
+ echo '<div class="leadin-meta-section">';
230
+ echo '<h4 class="leain-meta-header">Tracking Info</h4>';
231
+ echo '<div class="leadin-postbox__content">';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
232
  echo '<table class="leadin-meta-table"><tbody>';
233
 
234
  if ( $li_contact->history->lead->lead_first_name )
259
  echo '<td>' . $li_contact->history->lead->total_submissions . '</td>';
260
  echo '</tr>';
261
  echo '</tbody></table>';
262
+ echo '</div>'; // leadin-postbox__content
263
+ echo '</div>'; // leadin-meta-section
264
+ echo '<div class="leadin-meta-section">';
265
+ echo '<h4 class="leain-meta-header leadin-premium-tag">Personal Info</h4>';
266
+ echo '<div class="leadin-postbox__content">';
267
  echo '<table class="leadin-meta-table"><tbody>';
268
  echo '<tr>';
269
  if ( leadin_check_pro_user() )
270
  {
271
+ $social_data = ( isset($li_contact->history->lead->social_data) ? $li_contact->history->lead->social_data : array() );
272
+
273
+ if ( ! $social_data )
274
  {
275
+ echo 'We couldn\'t find any personal info for this contact.';
 
 
 
276
  }
277
+ else
 
278
  {
279
+ echo '<b>' . $social_data->title . ( $social_data->company_name ? ' - ' . $social_data->company_name : '' ) . '</b>';
280
+ echo '</br>' . $social_data->description;
281
 
282
+ if ( count($social_data->social_profiles) )
 
 
 
 
 
283
  {
284
  echo '<table class="leadin-meta-table"><tbody>';
285
+ foreach ( $social_data->social_profiles as $key => $profile )
286
  {
287
  echo '<tr>';
288
  echo '<th>';
294
  echo '</tr>';
295
  }
296
  echo '</tbody></table>';
 
 
297
  }
298
  }
 
 
 
299
  }
300
  else
301
  {
307
  }
308
  echo '</tr>';
309
  echo '</tbody></table>';
310
+ echo '</div>'; // leadin-postbox__content
311
+ echo '</div>'; // leadin-meta-section
312
+ echo '<div class="leadin-meta-section">';
313
+ echo '<h4 class="leain-meta-header leadin-premium-tag">Company Info</h4>';
314
+ echo '<div class="leadin-postbox__content">';
315
  echo '<table class="leadin-meta-table"><tbody>';
316
  echo '<tr>';
317
  if ( leadin_check_pro_user() )
318
  {
319
+ $company_data = ( isset($li_contact->history->lead->company_data) ? $li_contact->history->lead->company_data : array() );
320
 
321
+ if ( ! $company_data )
322
+ {
323
+ echo 'We couldn\'t find any company info for this contact.';
324
+ }
325
+ else
326
  {
327
  echo '<p>';
328
+ echo '<b>About ' . $company_data->name . '</b>';
329
+ if ( isset($company_data->overview) )
330
  {
331
+ $overview = $company_data->overview;
332
 
333
  if ( strlen($overview) < 260 )
334
  {
339
  echo '<div id="company-detail-overview-short">' . substr($overview, 0, strpos($overview, '.', 260)) . ' ... <a id="contact-detail-read-more" href="javascript:void(0);">read more</a></div>';
340
  echo '<div style="display: none;" id="company-detail-overview-full">' . $overview . ' <a id="contact-detail-read-less" href="javascript:void(0);">read less</a></div>';
341
  }
 
 
342
  }
343
  echo '</p>';
 
 
 
344
 
345
+ echo '<table class="leadin-meta-table"><tbody>';
 
 
 
 
 
346
 
347
+ if ( $company_data->employees )
348
+ {
349
+ echo '<tr>';
350
+ echo '<th>Employees</th>';
351
+ echo '<td>' . $company_data->employees . '</td>';
352
+ echo '</tr>';
353
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
354
 
355
+ if ( $company_data->revenue )
356
+ {
357
+ echo '<tr>';
358
+ echo '<th>Revenue</th>';
359
+ echo '<td>' . $company_data->revenue . '</td>';
360
+ echo '</tr>';
361
+ }
362
 
363
+ if ( $company_data->state || $company_data->country )
364
+ {
365
+ echo '<tr>';
366
+ echo '<th>Headquarters</th>';
367
+ echo '<td>' . ( !empty($company_data->state) ? $company_data->state : '' ) . ( !empty($company_data->state) && !empty($company_data->country) ? ', ' : '' ) . ( !empty($company_data->country) ? $company_data->country : '' ) . '</td>';
368
+ echo '</tr>';
369
+ }
370
 
371
+ if ( $company_data->founded )
372
+ {
373
+ echo '<tr>';
374
+ echo '<th>Founded</th>';
375
+ echo '<td>' . $company_data->founded . '</td>';
376
+ echo '</tr>';
377
+ }
378
 
379
+ if ( $company_data->facebookpageurl )
380
+ {
381
+ echo '<tr>';
382
+ echo '<th>Facebook</th>';
383
+ echo '<td>' . '<a href="' . $company_data->facebookpageurl . '" target="_blank">' . $company_data->name . '</a></td>';
384
+ echo '</tr>';
385
+ }
386
 
387
+ if ( $company_data->twitterusername )
388
+ {
389
+ echo '<tr>';
390
+ echo '<th>Twitter</th>';
391
+ echo '<td>' . '<a href="' . $company_data->twitterurl . '" target="_blank">' . '@' . $company_data->twitterusername . '</a></td>';
392
+ echo '</tr>';
393
+ }
394
 
395
+ if ( $company_data->linkedinurl )
396
+ {
397
+ echo '<tr>';
398
+ echo '<th>LinkedIn</th>';
399
+ echo '<td>' . '<a href="' . $company_data->linkedinurl . '" target="_blank">' . $company_data->name . '</a></td>';
400
+ echo '</tr>';
401
+ }
402
 
403
+ if ( $company_data->address )
404
+ {
405
+ echo '<tr>';
406
+ echo '<th>Address</th>';
407
+ echo '<td><a href="http://maps.google.com/maps?q=' . urlencode($company_data->address) . '"" target="_blank">' . $company_data->address . '</a></td>';
408
+ echo '</tr>';
409
+ }
410
 
411
+ if ( $company_data->country )
412
+ {
413
+ echo '<tr>';
414
+ echo '<th>Country</th>';
415
+ echo '<td>' . $company_data->country . '</td>';
416
+ echo '</tr>';
417
+ }
418
 
419
+ echo '</tbody></table>';
420
  }
 
 
 
 
 
 
421
  }
422
  else
423
  {
429
  }
430
  echo '</tr>';
431
  echo '</tbody></table>';
432
+ echo '</div>'; // leadin-postbox__content
433
+ echo '</div>'; // leadin-meta-section
434
+ echo '</div>'; // contact-deatils-column
435
+
436
+ echo '<div class="contact-timeline-column" ' . ( $li_contact->history->lead->lead_deleted ? 'style="display: none;"' : '' ) . '>';
437
+ echo '<div class="col-wrap contact-history">';
438
+ echo '<ul class="sessions">';
439
+ $sessions = $li_contact->history->sessions;
440
+ foreach ( $sessions as &$session )
441
+ {
442
+ $first_event = end($session['events']);
443
+ $first_event_date = $first_event['event_date'];
444
+ $session_date = date('F j, Y, g:ia', strtotime($first_event['event_date']));
445
+ $session_start_time = date('g:ia', strtotime($first_event['event_date']));
446
+
447
+ $last_event = array_values($session['events']);
448
+ $session_end_time = date('g:ia', strtotime($last_event[0]['event_date']));
449
+
450
+ echo '<li class="session">';
451
+ echo '<h3 class="session-date">' . $session_date . ( $session_start_time != $session_end_time ? ' - ' . $session_end_time : '' ) . '</h3>';
452
+
453
+ echo '<ul class="events">';
454
+
455
+ //$events = array_reverse($session['events']);
456
+ $events = $session['events'];
457
+ foreach ( $events as &$event )
458
+ {
459
+ if ( $event['event_type'] == 'pageview' )
460
+ {
461
+ $pageview = $event['activities'][0];
462
+
463
+ echo '<li class="event pageview">';
464
+ echo '<div class="event-time">' . date('g:ia', strtotime($pageview['event_date'])) . '</div>';
465
+ echo '<div class="event-content">';
466
+ echo '<p class="event-title">' . $pageview['pageview_title'] . '</p>';
467
+ echo '<a class="event-detail pageview-url" target="_blank" href="' . $pageview['pageview_url'] . '">' . leadin_strip_params_from_url($pageview['pageview_url']) . '</a>';
468
+ echo '</div>';
469
+ echo '</li>';
470
+
471
+ if ( $pageview['event_date'] == $first_event['event_date'] )
472
+ {
473
+ echo '<li class="event source">';
474
+ echo '<div class="event-time">' . date('g:ia', strtotime($pageview['event_date'])) . '</div>';
475
+ echo '<div class="event-content">';
476
+ echo '<p class="event-title">Traffic Source: ' . ( $pageview['pageview_source'] ? '<a href="' . $pageview['pageview_source'] . '">' . leadin_strip_params_from_url($pageview['pageview_source']) : 'Direct' ) . '</a></p>';
477
+ $url_parts = parse_url($pageview['pageview_source']);
478
+ if ( isset($url_parts['query']) )
479
+ {
480
+ if ( $url_parts['query'] )
481
+ {
482
+ parse_str($url_parts['query'], $url_vars);
483
+ if ( count($url_vars) )
484
+ {
485
+ echo '<ul class="event-detail fields">';
486
+ foreach ( $url_vars as $key => $value )
487
+ {
488
+ if ( ! $value )
489
+ continue;
490
+
491
+ echo '<li class="field">';
492
+ echo '<label class="field-label">' . $key . ':</label>';
493
+ echo '<p class="field-value">' . nl2br($value) . '</p>';
494
+ echo '</li>';
495
+ }
496
+ echo '</ul>';
497
+ }
498
+ }
499
+ }
500
+
501
+ echo '</div>';
502
+ echo '</li>';
503
+ }
504
+ }
505
+ else if ( $event['event_type'] == 'form' )
506
+ {
507
+ $submission = $event['activities'][0];
508
+ $form_fields = json_decode($submission['form_fields']);
509
+ $num_form_fieds = count($form_fields);
510
+ $tag_text = '<a class="contact-tag" href="' . get_bloginfo('wpurl') . '/wp-admin/admin.php?page=leadin_contacts&contact_type=' . $tag->tag_slug . '">' . $tag->tag_text . '</a>';
511
+
512
+ echo '<li class="event form-submission">';
513
+ echo '<div class="event-time">' . date('g:ia', strtotime($submission['event_date'])) . '</div>';
514
+ echo '<div class="event-content">';
515
+ echo '<p class="event-title">';
516
+ echo 'Filled out ' . $event['form_name'] . ' on page <a href="' . $submission['form_page_url'] . '">' . $submission['form_page_title'] . '</a>';
517
+ if ( count($event['form_tags']) )
518
+ {
519
+ echo ' and tagged as ';
520
+ for ( $i = 0; $i < count($event['form_tags']); $i++ )
521
+ echo '<a href="' . get_bloginfo('wpurl') . '/wp-admin/admin.php?page=leadin_contacts&contact_type=' . $event['form_tags'][$i]['tag_slug'] . '">' . $event['form_tags'][$i]['tag_text'] . '</a> ';
522
+ }
523
+ echo '</p>';
524
+ echo '<ul class="event-detail fields">';
525
+ if ( count($form_fields) )
526
+ {
527
+ foreach ( $form_fields as $field )
528
+ {
529
+ echo '<li class="field">';
530
+ echo '<label class="field-label">' . $field->label . ':</label>';
531
+ echo '<p class="field-value">' . nl2br($field->value) . '</p>';
532
+ echo '</li>';
533
+ }
534
+ }
535
+ echo '</ul>';
536
+ echo '</div>';
537
+ echo '</li>';
538
+ }
539
+ }
540
+ echo '</ul>';
541
+ echo '</li>';
542
+ }
543
+ echo '</ul>';
544
+ echo '</div>';
545
+ echo '</div>'; //contact-timeline-column
546
  }
547
 
548
  /**
power-ups/subscribe-widget.php CHANGED
@@ -98,13 +98,14 @@ class WPLeadInSubscribe extends WPLeadIn {
98
  'li_subscribe_heading' => ( isset($options['li_subscribe_heading']) ? $options['li_subscribe_heading'] : 'Sign up for email updates'),
99
  'li_subscribe_text' => ( isset($options['li_subscribe_text']) ? $options['li_subscribe_text'] : ''),
100
  'li_subscribe_btn_label' => ( isset($options['li_subscribe_btn_label']) ? $options['li_subscribe_btn_label'] : 'SUBSCRIBE'),
 
101
  'li_subscribe_name_fields' => ( isset($options['li_subscribe_name_fields']) ? $options['li_subscribe_name_fields'] : '0'),
102
  'li_subscribe_phone_field' => ( isset($options['li_subscribe_phone_field']) ? $options['li_subscribe_phone_field'] : '0'),
103
  'li_subscribe_template_posts' => '1',
104
  'li_subscribe_template_pages' => '1',
105
  'li_subscribe_template_archives' => '1',
106
- 'li_subscribe_template_home' => '1'
107
-
108
  );
109
 
110
  update_option('leadin_subscribe_options', $opt);
@@ -134,12 +135,11 @@ class WPLeadInSubscribe extends WPLeadIn {
134
  echo '<input id="leadin-subscribe-heading" value="' . ( isset($options['li_subscribe_heading']) ? $options['li_subscribe_heading'] : 'Sign up for email updates' ) . '" type="hidden"/>';
135
  echo '<input id="leadin-subscribe-text" value="' . ( isset($options['li_subscribe_text']) ? $options['li_subscribe_text'] : '' ) . '" type="hidden"/>';
136
  echo '<input id="leadin-subscribe-btn-label" value="' . ( isset($options['li_subscribe_btn_label']) ? $options['li_subscribe_btn_label'] : 'SUBSCRIBE' ) . '" type="hidden"/>';
 
137
  echo '<input id="leadin-subscribe-name-fields" value="' . ( isset($options['li_subscribe_name_fields']) ? $options['li_subscribe_name_fields'] : '0' ) . '" type="hidden"/>';
138
  echo '<input id="leadin-subscribe-phone-field" value="' . ( isset($options['li_subscribe_phone_field']) ? $options['li_subscribe_phone_field'] : '0' ) . '" type="hidden"/>';
139
  echo '<input id="leadin-subscribe-confirmation" value="' . ( isset($options['li_subscribe_confirmation']) ? $options['li_subscribe_confirmation'] : '0' ) . '" type="hidden"/>';
140
-
141
- // Div checked by media query for mobile
142
- echo '<span id="leadin-subscribe-mobile-check"></span>';
143
  }
144
 
145
  //=============================================
98
  'li_subscribe_heading' => ( isset($options['li_subscribe_heading']) ? $options['li_subscribe_heading'] : 'Sign up for email updates'),
99
  'li_subscribe_text' => ( isset($options['li_subscribe_text']) ? $options['li_subscribe_text'] : ''),
100
  'li_subscribe_btn_label' => ( isset($options['li_subscribe_btn_label']) ? $options['li_subscribe_btn_label'] : 'SUBSCRIBE'),
101
+ 'li_subscribe_btn_color' => ( isset($options['li_subscribe_btn_color']) ? $options['li_subscribe_btn_color'] : 'leadin-popup-color-blue'),
102
  'li_subscribe_name_fields' => ( isset($options['li_subscribe_name_fields']) ? $options['li_subscribe_name_fields'] : '0'),
103
  'li_subscribe_phone_field' => ( isset($options['li_subscribe_phone_field']) ? $options['li_subscribe_phone_field'] : '0'),
104
  'li_subscribe_template_posts' => '1',
105
  'li_subscribe_template_pages' => '1',
106
  'li_subscribe_template_archives' => '1',
107
+ 'li_subscribe_template_home' => '1',
108
+ 'li_subscribe_mobile_popup' => ( isset($options['li_subscribe_mobile_popup']) ? $options['li_subscribe_mobile_popup'] : '1')
109
  );
110
 
111
  update_option('leadin_subscribe_options', $opt);
135
  echo '<input id="leadin-subscribe-heading" value="' . ( isset($options['li_subscribe_heading']) ? $options['li_subscribe_heading'] : 'Sign up for email updates' ) . '" type="hidden"/>';
136
  echo '<input id="leadin-subscribe-text" value="' . ( isset($options['li_subscribe_text']) ? $options['li_subscribe_text'] : '' ) . '" type="hidden"/>';
137
  echo '<input id="leadin-subscribe-btn-label" value="' . ( isset($options['li_subscribe_btn_label']) ? $options['li_subscribe_btn_label'] : 'SUBSCRIBE' ) . '" type="hidden"/>';
138
+ echo '<input id="leadin-subscribe-btn-color" value="' . ( isset($options['li_subscribe_btn_color']) ? $options['li_subscribe_btn_color'] : 'leadin-popup-color-blue' ) . '" type="hidden"/>';
139
  echo '<input id="leadin-subscribe-name-fields" value="' . ( isset($options['li_subscribe_name_fields']) ? $options['li_subscribe_name_fields'] : '0' ) . '" type="hidden"/>';
140
  echo '<input id="leadin-subscribe-phone-field" value="' . ( isset($options['li_subscribe_phone_field']) ? $options['li_subscribe_phone_field'] : '0' ) . '" type="hidden"/>';
141
  echo '<input id="leadin-subscribe-confirmation" value="' . ( isset($options['li_subscribe_confirmation']) ? $options['li_subscribe_confirmation'] : '0' ) . '" type="hidden"/>';
142
+ echo '<input id="leadin-subscribe-mobile-popup" value="' . ( isset($options['li_subscribe_mobile_popup']) ? $options['li_subscribe_mobile_popup'] : '1' ) . '" type="hidden"/>';
 
 
143
  }
144
 
145
  //=============================================
power-ups/subscribe-widget/admin/subscribe-widget-admin.php CHANGED
@@ -77,6 +77,13 @@ class WPLeadInSubscribeAdmin extends WPLeadInAdmin {
77
  LEADIN_ADMIN_PATH,
78
  $this->power_up_settings_section
79
  );
 
 
 
 
 
 
 
80
  add_settings_field(
81
  'li_subscribe_additional_fields',
82
  'Also include fields for',
@@ -108,6 +115,14 @@ class WPLeadInSubscribeAdmin extends WPLeadInAdmin {
108
  LEADIN_ADMIN_PATH,
109
  $this->power_up_settings_section
110
  );
 
 
 
 
 
 
 
 
111
  }
112
 
113
  /**
@@ -134,6 +149,9 @@ class WPLeadInSubscribeAdmin extends WPLeadInAdmin {
134
  if( isset( $input['li_subscribe_btn_label'] ) )
135
  $new_input['li_subscribe_btn_label'] = sanitize_text_field( $input['li_subscribe_btn_label'] );
136
 
 
 
 
137
  if( isset( $input['li_subscribe_name_fields'] ) )
138
  $new_input['li_subscribe_name_fields'] = sanitize_text_field( $input['li_subscribe_name_fields'] );
139
 
@@ -157,6 +175,9 @@ class WPLeadInSubscribeAdmin extends WPLeadInAdmin {
157
  else
158
  $new_input['li_subscribe_confirmation'] = '0';
159
 
 
 
 
160
  return $new_input;
161
  }
162
 
@@ -230,6 +251,51 @@ class WPLeadInSubscribeAdmin extends WPLeadInAdmin {
230
 
231
  }
232
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
233
  /**
234
  * Prints additional fields for first name, last name and phone number
235
  */
@@ -289,6 +355,21 @@ class WPLeadInSubscribeAdmin extends WPLeadInAdmin {
289
  );
290
  }
291
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
292
  /**
293
  * Prints the options for toggling the widget on posts, pages, archives and homepage
294
  */
@@ -296,14 +377,18 @@ class WPLeadInSubscribeAdmin extends WPLeadInAdmin {
296
  {
297
  $options = $this->options;
298
 
 
 
299
  $preview_link = get_bloginfo('wpurl') . '?preview-subscribe=1';
300
  $preview_link .= '&lis_heading=' . ( isset($options['li_subscribe_heading']) ? $options['li_subscribe_heading'] : 'Sign up for email updates' );
301
  $preview_link .= '&lis_desc=' . ( isset($options['li_subscribe_text']) ? $options['li_subscribe_text'] : '' );
302
  $preview_link .= '&lis_show_names=' . ( isset($options['li_subscribe_name_fields']) ? $options['li_subscribe_name_fields'] : 0 );
303
  $preview_link .= '&lis_show_phone=' . ( isset($options['li_subscribe_phone_field']) ? $options['li_subscribe_phone_field'] : 0 );
304
  $preview_link .= '&lis_btn_label=' . ( isset($options['li_subscribe_btn_label']) ? $options['li_subscribe_btn_label'] : 'SUBSCRIBE' );
 
305
  $preview_link .= '&lis_vex_class=' . ( isset($options['li_subscribe_vex_class']) ? $options['li_subscribe_vex_class'] : 'vex-theme-bottom-right-corner' );
306
  $preview_link .= '&lis_confirmation=' . ( isset($options['li_subscribe_confirmation']) ? $options['li_subscribe_confirmation'] : 1 );
 
307
 
308
  printf(
309
  '<p><a id="preview-popup-link" href="%s" target="_blank" class="button button-secondary">Preview Pop-up Form</a></p>',
77
  LEADIN_ADMIN_PATH,
78
  $this->power_up_settings_section
79
  );
80
+ add_settings_field(
81
+ 'li_subscribe_btn_color',
82
+ 'Button color',
83
+ array($this, 'li_subscribe_btn_color_callback'),
84
+ LEADIN_ADMIN_PATH,
85
+ $this->power_up_settings_section
86
+ );
87
  add_settings_field(
88
  'li_subscribe_additional_fields',
89
  'Also include fields for',
115
  LEADIN_ADMIN_PATH,
116
  $this->power_up_settings_section
117
  );
118
+
119
+ add_settings_field(
120
+ 'li_subscribe_mobile_popup',
121
+ 'Show on mobile?',
122
+ array($this, 'li_subscribe_mobile_popup_callback'),
123
+ LEADIN_ADMIN_PATH,
124
+ $this->power_up_settings_section
125
+ );
126
  }
127
 
128
  /**
149
  if( isset( $input['li_subscribe_btn_label'] ) )
150
  $new_input['li_subscribe_btn_label'] = sanitize_text_field( $input['li_subscribe_btn_label'] );
151
 
152
+ if( isset( $input['li_subscribe_btn_color'] ) )
153
+ $new_input['li_subscribe_btn_color'] = sanitize_text_field( $input['li_subscribe_btn_color'] );
154
+
155
  if( isset( $input['li_subscribe_name_fields'] ) )
156
  $new_input['li_subscribe_name_fields'] = sanitize_text_field( $input['li_subscribe_name_fields'] );
157
 
175
  else
176
  $new_input['li_subscribe_confirmation'] = '0';
177
 
178
+ if( isset( $input['li_subscribe_mobile_popup'] ) )
179
+ $new_input['li_subscribe_mobile_popup'] = sanitize_text_field( $input['li_subscribe_mobile_popup'] );
180
+
181
  return $new_input;
182
  }
183
 
251
 
252
  }
253
 
254
+ /**
255
+ * Prints button color
256
+ */
257
+ function li_subscribe_btn_color_callback ()
258
+ {
259
+ $options = $this->options;
260
+
261
+ $li_subscribe_btn_color = ( isset($options['li_subscribe_btn_color']) ? $options['li_subscribe_btn_color'] : 'leadin-popup-color-blue' ); // Get button text from options, or show default
262
+
263
+ echo '<fieldset><legend class="screen-reader-text"><span>Button Color</span></legend>';
264
+
265
+ printf(
266
+ '<label for="li_subscribe_btn_color_blue"><input id="li_subscribe_btn_color_blue" type="radio" name="leadin_subscribe_options[li_subscribe_btn_color]" value="leadin-popup-color-blue"' . checked( 'leadin-popup-color-blue', ( isset($options['li_subscribe_btn_color']) ? $options['li_subscribe_btn_color'] : 'leadin-popup-color-blue' ), false ) . '>' .
267
+ '<span class="color-swatch blue">Blue</span></label><br>'
268
+ );
269
+
270
+ printf(
271
+ '<label for="li_subscribe_btn_color_red"><input id="li_subscribe_btn_color_red" type="radio" name="leadin_subscribe_options[li_subscribe_btn_color]" value="leadin-popup-color-red"' . checked( 'leadin-popup-color-red', ( isset($options['li_subscribe_btn_color']) ? $options['li_subscribe_btn_color'] : 'leadin-popup-color-red' ), false ) . '>' .
272
+ '<span class="color-swatch red">Red</span></label><br>'
273
+ );
274
+
275
+ printf(
276
+ '<label for="li_subscribe_btn_color_green"><input id="li_subscribe_btn_color_green" type="radio" name="leadin_subscribe_options[li_subscribe_btn_color]" value="leadin-popup-color-green"' . checked( 'leadin-popup-color-green', ( isset($options['li_subscribe_btn_color']) ? $options['li_subscribe_btn_color'] : 'leadin-popup-color-green' ), false ) . '>' .
277
+ '<span class="color-swatch green">Green</span></label><br>'
278
+ );
279
+
280
+ printf(
281
+ '<label for="li_subscribe_btn_color_yellow"><input id="li_subscribe_btn_color_yellow" type="radio" name="leadin_subscribe_options[li_subscribe_btn_color]" value="leadin-popup-color-yellow"' . checked( 'leadin-popup-color-yellow', ( isset($options['li_subscribe_btn_color']) ? $options['li_subscribe_btn_color'] : 'leadin-popup-color-yellow' ), false ) . '>' .
282
+ '<span class="color-swatch yellow">Yellow</span></label><br>'
283
+ );
284
+
285
+ printf(
286
+ '<label for="li_subscribe_btn_color_purple"><input id="li_subscribe_btn_color_purple" type="radio" name="leadin_subscribe_options[li_subscribe_btn_color]" value="leadin-popup-color-purple"' . checked( 'leadin-popup-color-purple', ( isset($options['li_subscribe_btn_color']) ? $options['li_subscribe_btn_color'] : 'leadin-popup-color-purple' ), false ) . '>' .
287
+ '<span class="color-swatch purple">Purple</span></label><br>'
288
+ );
289
+
290
+ printf(
291
+ '<label for="li_subscribe_btn_color_orange"><input id="li_subscribe_btn_color_orange" type="radio" name="leadin_subscribe_options[li_subscribe_btn_color]" value="leadin-popup-color-orange"' . checked( 'leadin-popup-color-orange', ( isset($options['li_subscribe_btn_color']) ? $options['li_subscribe_btn_color'] : 'leadin-popup-color-orange' ), false ) . '>' .
292
+ '<span class="color-swatch orange">Orange</span></label><br>'
293
+ );
294
+
295
+ echo '</fieldset>';
296
+
297
+ }
298
+
299
  /**
300
  * Prints additional fields for first name, last name and phone number
301
  */
355
  );
356
  }
357
 
358
+ /**
359
+ * Prints the options for toggling the widget on posts, pages, archives and homepage
360
+ */
361
+ function li_subscribe_mobile_popup_callback ()
362
+ {
363
+ $options = $this->options;
364
+
365
+ $li_subscribe_mobile_popup = ( isset($options['li_subscribe_mobile_popup']) ? $options['li_subscribe_mobile_popup'] : '1' );
366
+
367
+ echo '<select id="li_subscribe_mobile_popup" name="leadin_subscribe_options[li_subscribe_mobile_popup]">';
368
+ echo '<option value="1"' . ( $li_subscribe_mobile_popup == '1' ? ' selected' : '' ) . '>Yes</option>';
369
+ echo '<option value="0"' . ( $li_subscribe_mobile_popup == '0' ? ' selected' : '' ) . '>No</option>';
370
+ echo '</select>';
371
+ }
372
+
373
  /**
374
  * Prints the options for toggling the widget on posts, pages, archives and homepage
375
  */
377
  {
378
  $options = $this->options;
379
 
380
+
381
+
382
  $preview_link = get_bloginfo('wpurl') . '?preview-subscribe=1';
383
  $preview_link .= '&lis_heading=' . ( isset($options['li_subscribe_heading']) ? $options['li_subscribe_heading'] : 'Sign up for email updates' );
384
  $preview_link .= '&lis_desc=' . ( isset($options['li_subscribe_text']) ? $options['li_subscribe_text'] : '' );
385
  $preview_link .= '&lis_show_names=' . ( isset($options['li_subscribe_name_fields']) ? $options['li_subscribe_name_fields'] : 0 );
386
  $preview_link .= '&lis_show_phone=' . ( isset($options['li_subscribe_phone_field']) ? $options['li_subscribe_phone_field'] : 0 );
387
  $preview_link .= '&lis_btn_label=' . ( isset($options['li_subscribe_btn_label']) ? $options['li_subscribe_btn_label'] : 'SUBSCRIBE' );
388
+ $preview_link .= '&lis_btn_color=' . ( isset($options['li_subscribe_btn_color']) ? $options['li_subscribe_btn_color'] : 'leadin-popup-color-blue' );
389
  $preview_link .= '&lis_vex_class=' . ( isset($options['li_subscribe_vex_class']) ? $options['li_subscribe_vex_class'] : 'vex-theme-bottom-right-corner' );
390
  $preview_link .= '&lis_confirmation=' . ( isset($options['li_subscribe_confirmation']) ? $options['li_subscribe_confirmation'] : 1 );
391
+ $preview_link .= '&lis_mobile_popup=' . ( isset($options['li_subscribe_mobile_popup']) ? $options['li_subscribe_mobile_popup'] : 1 );
392
 
393
  printf(
394
  '<p><a id="preview-popup-link" href="%s" target="_blank" class="button button-secondary">Preview Pop-up Form</a></p>',
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: andygcook, nelsonjoyce
3
  Tags: crm, contacts, lead tracking, click tracking, visitor tracking, analytics, marketing automation, inbound marketing, subscription, marketing, lead generation, mailchimp, constant contact, newsletter, popup, popover, email list, email, contacts database, contact form, forms, form widget, popup form
4
  Requires at least: 3.7
5
  Tested up to: 4.1.1
6
- Stable tag: 3.1.5
7
 
8
  Leadin is an easy-to-use marketing automation and lead tracking plugin for WordPress that helps you better understand your web site visitors.
9
 
@@ -68,8 +68,21 @@ Having trouble? Check out our <a href="http://support.leadin.com/" target="_blan
68
 
69
  == Changelog ==
70
 
71
- - Current version: 3.1.5
72
- - Current version release: 2015-03-20
 
 
 
 
 
 
 
 
 
 
 
 
 
73
 
74
  = 3.1.5 (2015.03.20) =
75
  - Bug fixes
3
  Tags: crm, contacts, lead tracking, click tracking, visitor tracking, analytics, marketing automation, inbound marketing, subscription, marketing, lead generation, mailchimp, constant contact, newsletter, popup, popover, email list, email, contacts database, contact form, forms, form widget, popup form
4
  Requires at least: 3.7
5
  Tested up to: 4.1.1
6
+ Stable tag: 3.1.6
7
 
8
  Leadin is an easy-to-use marketing automation and lead tracking plugin for WordPress that helps you better understand your web site visitors.
9
 
68
 
69
  == Changelog ==
70
 
71
+ - Current version: 3.1.6
72
+ - Current version release: 2015-03-31
73
+
74
+ = 3.1.6 (2015.03.31) =
75
+ = Enhancements =
76
+ - Show name on contact timeline instead of email address if available
77
+ - New contact timeline page styles
78
+ - Ability to change color in popup
79
+ - Popup now works on mobile
80
+
81
+ - Bug fixes
82
+ - Fixed dashicons not loading in < WP 3.7
83
+ - Completely fix all the default object warnings for the contact lookups
84
+ - Swap in non-svg logo if allow_url_fopen not toggled on in php.ini
85
+ - Fixed Pro email delivery bugs
86
 
87
  = 3.1.5 (2015.03.20) =
88
  - Bug fixes