Smart Floating / Sticky Buttons – Call, Sharing, Chat Widgets & More – Buttonizer - Version 2.0.6

Version Description

Release date: 9 August 2019

Today we've released Buttonizer 2.0.6!

What's new? - Added rectangle menu style - Added Pulse animation (Premium) - Added Jelly animation (Premium) - Added Exit Intent (Premium)

Updated: - In a group, we've made 'button style' always visible (just grayed out) - Updated the way calling popups via Buttonizer - Fixed Facebook Messenger Widget bug - Fix for people who are using the plugin 'All in one WordPress Security' - Fixed some bugs on single buttons - Updated Freemius backend - Multiple other bug fixes and improvements

If you experience bugs, problems or you have some feedback, let us know on our Buttonizer community!

Download this release

Release Info

Developer buttonizer
Plugin Icon wp plugin Smart Floating / Sticky Buttons – Call, Sharing, Chat Widgets & More – Buttonizer
Version 2.0.6
Comparing to
See all releases

Code changes from version 2.0.5 to 2.0.6

Files changed (52) hide show
  1. app/Admin/Admin.php +19 -5
  2. app/Admin/Ajax/ButtonizerInitializer.php +3 -1
  3. app/Admin/Translations.php +52 -4
  4. app/Utils/Maintain.php +2 -0
  5. app/Utils/Remigrate.php +464 -0
  6. assets/dashboard.css +26 -3
  7. assets/dashboard.js +558 -120
  8. assets/dashboard.min.js +5 -5
  9. assets/frontend.css +479 -0
  10. assets/frontend.js +227 -212
  11. assets/frontend.min.js +1 -1
  12. buttonizer.php +13 -8
  13. freemius/assets/css/admin/account.css +1 -1
  14. freemius/assets/css/admin/add-ons.css +2 -2
  15. freemius/assets/css/admin/common.css +1 -1
  16. freemius/assets/css/admin/connect.css +1 -1
  17. freemius/assets/css/admin/dialog-boxes.css +1 -1
  18. freemius/assets/img/buttonizer-floating-action-button.jpg +0 -0
  19. freemius/assets/img/buttonizer-multifunctional-button.png +0 -0
  20. freemius/assets/scss/_colors.scss +0 -79
  21. freemius/assets/scss/_functions.scss +0 -0
  22. freemius/assets/scss/_load.scss +0 -4
  23. freemius/assets/scss/_mixins.scss +0 -270
  24. freemius/assets/scss/_start.scss +0 -4
  25. freemius/assets/scss/_vars.scss +0 -6
  26. freemius/assets/scss/admin/_ajax-loader.scss +0 -49
  27. freemius/assets/scss/admin/_auto-install.scss +0 -33
  28. freemius/assets/scss/admin/_buttons.scss +0 -28
  29. freemius/assets/scss/admin/_deactivation-feedback.scss +0 -55
  30. freemius/assets/scss/admin/_gdpr-consent.scss +0 -81
  31. freemius/assets/scss/admin/_license-activation.scss +0 -47
  32. freemius/assets/scss/admin/_license-key-resend.scss +0 -68
  33. freemius/assets/scss/admin/_modal-common.scss +0 -194
  34. freemius/assets/scss/admin/_multisite-options.scss +0 -40
  35. freemius/assets/scss/admin/_plugin-upgrade-notice.scss +0 -8
  36. freemius/assets/scss/admin/_subscription-cancellation.scss +0 -30
  37. freemius/assets/scss/admin/_themes.scss +0 -21
  38. freemius/assets/scss/admin/_tooltip.scss +0 -66
  39. freemius/assets/scss/admin/account.scss +0 -302
  40. freemius/assets/scss/admin/add-ons.scss +0 -449
  41. freemius/assets/scss/admin/affiliation.scss +0 -97
  42. freemius/assets/scss/admin/checkout.scss +0 -5
  43. freemius/assets/scss/admin/common.scss +0 -220
  44. freemius/assets/scss/admin/connect.scss +0 -548
  45. freemius/assets/scss/admin/debug.scss +0 -135
  46. freemius/assets/scss/admin/dialog-boxes.scss +0 -10
  47. freemius/assets/scss/admin/gdpr-optin-notice.scss +0 -17
  48. freemius/assets/scss/admin/index.php +0 -3
  49. freemius/assets/scss/customizer.scss +0 -125
  50. freemius/assets/scss/index.php +0 -3
  51. freemius/config.php +387 -387
  52. freemius/includes/class-freemius.php +1552 -291
app/Admin/Admin.php CHANGED
@@ -170,21 +170,35 @@ class Admin
170
  */
171
  public function ajaxHandler()
172
  {
173
- if ( !isset( $_GET['action'] ) || $_GET['action'] !== 'buttonizer_backend' || !isset( $_GET['request'] ) ) {
174
  return;
175
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
176
  // Replace dots to nothing
177
- $_GET['request'] = str_replace( "..", "", $_GET['request'] );
178
  // Check file exists
179
 
180
- if ( file_exists( BUTTONIZER_DIR . '/app/Admin/Ajax/' . $_GET['request'] . '.php' ) ) {
181
  // Create class path
182
- $className = '\\Buttonizer\\Admin\\Ajax\\' . str_replace( '/', '\\', $_GET['request'] );
183
  // Open file
184
- require BUTTONIZER_DIR . '/app/Admin/Ajax/' . $_GET['request'] . '.php';
185
  new $className();
186
  } else {
187
  echo json_encode( [
 
188
  'status' => 'error',
189
  'message' => 'Ajax request file not found.',
190
  ] ) ;
170
  */
171
  public function ajaxHandler()
172
  {
173
+ if ( !isset( $_GET['action'] ) || $_GET['action'] !== 'buttonizer_backend' || !isset( $_GET['item'] ) ) {
174
  return;
175
  }
176
+ // Get item
177
+ $ajaxFileRequest = urldecode( $_GET['item'] );
178
+ // Do not get further then this
179
+
180
+ if ( strpos( $ajaxFileRequest, '..' ) !== false ) {
181
+ echo json_encode( [
182
+ 'plugin' => 'Buttonizer',
183
+ 'status' => 'error',
184
+ 'message' => 'You are not allowed to do this. ',
185
+ ] ) ;
186
+ wp_die();
187
+ }
188
+
189
  // Replace dots to nothing
190
+ $ajaxFileRequest = str_replace( "..", "", $ajaxFileRequest );
191
  // Check file exists
192
 
193
+ if ( file_exists( BUTTONIZER_DIR . '/app/Admin/Ajax/' . $ajaxFileRequest . '.php' ) ) {
194
  // Create class path
195
+ $className = '\\Buttonizer\\Admin\\Ajax\\' . str_replace( '/', '\\', $ajaxFileRequest );
196
  // Open file
197
+ require BUTTONIZER_DIR . '/app/Admin/Ajax/' . $ajaxFileRequest . '.php';
198
  new $className();
199
  } else {
200
  echo json_encode( [
201
+ 'plugin' => 'Buttonizer',
202
  'status' => 'error',
203
  'message' => 'Ajax request file not found.',
204
  ] ) ;
app/Admin/Ajax/ButtonizerInitializer.php CHANGED
@@ -53,11 +53,13 @@ class ButtonizerInitializer
53
  */
54
  public function returnSettings()
55
  {
 
 
56
  echo json_encode( [
57
  "status" => "success",
58
  "version" => BUTTONIZER_VERSION,
59
  "fontawesome_current_version" => FONTAWESOME_CURRENT_VERSION,
60
- "premium" => ButtonizerLicense()->can_use_premium_code(),
61
  "settings" => [
62
  "welcome" => $this->check( "welcome", true ),
63
  "icon_library" => $this->check( "icon_library", 'fontawesome' ),
53
  */
54
  public function returnSettings()
55
  {
56
+ // Let the frontend know that this is the free version
57
+ $premium = false;
58
  echo json_encode( [
59
  "status" => "success",
60
  "version" => BUTTONIZER_VERSION,
61
  "fontawesome_current_version" => FONTAWESOME_CURRENT_VERSION,
62
+ "premium" => $premium,
63
  "settings" => [
64
  "welcome" => $this->check( "welcome", true ),
65
  "icon_library" => $this->check( "icon_library", 'fontawesome' ),
app/Admin/Translations.php CHANGED
@@ -388,6 +388,8 @@ class Translations {
388
  'none' => __('No animation', 'buttonizer-multifunctional-button'),
389
  'hello' => __('Buttonizer Hello', 'buttonizer-multifunctional-button'),
390
  'bounce' => __('Bounce', 'buttonizer-multifunctional-button'),
 
 
391
  ]
392
  ],
393
  'menu_position' => [
@@ -413,6 +415,7 @@ class Translations {
413
  'buildingup' => __('Build Up', 'buttonizer-multifunctional-button'),
414
  'pop' => __('Pop', 'buttonizer-multifunctional-button'),
415
  'square' => __('Square', 'buttonizer-multifunctional-button'),
 
416
  ]
417
  ],
418
  'label_desktop' => [
@@ -476,6 +479,32 @@ class Translations {
476
  ]
477
  ],
478
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
479
  'button_action' => [
480
  'title' => __('Button action', 'buttonizer-multifunctional-button'),
481
  'description' => __('Choose a click action for this button.', 'buttonizer-multifunctional-button'),
@@ -488,11 +517,13 @@ class Translations {
488
  'group_social_media' => __('Social Media', 'buttonizer-multifunctional-button'),
489
  'group_popup' => __('Popup', 'buttonizer-multifunctional-button'),
490
 
491
- 'phone_number' => __('Call action (Phone number)', 'buttonizer-multifunctional-button'),
492
- 'mail' => __('Mail', 'buttonizer-multifunctional-button'),
493
  'back_to_top' => __('Back to top', 'buttonizer-multifunctional-button'),
494
  'go_back_one_page' => __('Go back one page', 'buttonizer-multifunctional-button'),
495
  'share_page' => __('Share page', 'buttonizer-multifunctional-button'),
 
 
496
  'messenger_chat' => sprintf(
497
  // translators: %s and %s will be replaced with links
498
  __('New, Facebook Messenger Chat Widget! First, you\'ll need to <a %1$s>whitelist</a> your site on Facebook. Then add your <a %2$s>Page ID</a> into the input above.', 'buttonizer-multifunctional-button'),
@@ -503,7 +534,6 @@ class Translations {
503
  __('You need to install Poptin\'s WordPress plugin. You can find it <a %1$s>here</a>. Once you\'ve made a Poptin paste the <a %2$s>direct link</a> into the input.', 'buttonizer-multifunctional-button'),
504
  'href="https://wordpress.org/plugins/poptin/" target="_blank"', 'href="https://help.poptin.com/article/show/72942-how-to-show-a-poptin-when-the-visitor-clicks-on-a-button-link-on-your-site" target="_blank"'
505
  ),
506
-
507
  'share_page_on' => sprintf(
508
  // translators: %s will become the social media platform, like example: Share on Twitter
509
  __('Share on %s', 'buttonizer-multifunctional-button'),
@@ -534,7 +564,24 @@ class Translations {
534
  __('Fill in your phone number without any spaces and symbols. Read WhatsApps recommendations by <a %s>clicking here.</a>', 'buttonizer-multifunctional-button'),
535
  'href="https://faq.whatsapp.com/en/android/26000030/" target="_blank"'
536
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
537
  ]
 
538
  ],
539
 
540
  'open_new_tab' => [
@@ -948,7 +995,8 @@ class Translations {
948
 
949
  'page_rules' => [
950
  'first_page_rule' => __('My first page rule', 'buttonizer-multifunctional-button')
951
- ]
 
952
  ];
953
  }
954
 
388
  'none' => __('No animation', 'buttonizer-multifunctional-button'),
389
  'hello' => __('Buttonizer Hello', 'buttonizer-multifunctional-button'),
390
  'bounce' => __('Bounce', 'buttonizer-multifunctional-button'),
391
+ 'jelly' => __('Jelly', 'buttonizer-multifunctional-button'),
392
+ 'pulse' => __('Pulse', 'buttonizer-multifunctional-button'),
393
  ]
394
  ],
395
  'menu_position' => [
415
  'buildingup' => __('Build Up', 'buttonizer-multifunctional-button'),
416
  'pop' => __('Pop', 'buttonizer-multifunctional-button'),
417
  'square' => __('Square', 'buttonizer-multifunctional-button'),
418
+ 'rectangle' => __('Rectangle', 'buttonizer-multifunctional-button'),
419
  ]
420
  ],
421
  'label_desktop' => [
479
  ]
480
  ],
481
 
482
+ 'exit_intent' => [
483
+ 'title' => __('Exit intent', 'buttonizer-multifunctional-button'),
484
+ 'enable' => __('Enable exit intent', 'buttonizer-multifunctional-button'),
485
+ 'pro_description' => __('With this setting, you can trigger Buttonizer to animate before your guest exits your website.', 'buttonizer-multifunctional-button'),
486
+ 'info' => __('Please note: Exit intent will <b>not trigger</b> in preview mode, only in your LIVE website.', 'buttonizer-multifunctional-button'),
487
+
488
+ 'when_to_trigger' => __('When to trigger?', 'buttonizer-multifunctional-button'),
489
+ 'trigger_window' => __('Trigger when leaving browser window', 'buttonizer-multifunctional-button'),
490
+ 'trigger_inactive' => __('Trigger on inactivity (2 minutes)', 'buttonizer-multifunctional-button'),
491
+
492
+ 'how_often' => [
493
+ '_title' => __('How often should it be triggered?', 'buttonizer-multifunctional-button'),
494
+ 'once_page' => __('Only trigger once per page', 'buttonizer-multifunctional-button'),
495
+ 'once_session' => __('Only trigger once per session', 'buttonizer-multifunctional-button'),
496
+ 'always' => __('Trigger every time', 'buttonizer-multifunctional-button'),
497
+ ],
498
+
499
+ 'animation' => [
500
+ '_title' => __('Animation on intent', 'buttonizer-multifunctional-button'),
501
+ 'focused' => __('Focused', 'buttonizer-multifunctional-button'),
502
+ 'open_menu' => __('Open menu', 'buttonizer-multifunctional-button'),
503
+ 'jump' => __('Jump once and open', 'buttonizer-multifunctional-button'),
504
+ 'flip' => __('Flip and open', 'buttonizer-multifunctional-button'),
505
+ ]
506
+ ],
507
+
508
  'button_action' => [
509
  'title' => __('Button action', 'buttonizer-multifunctional-button'),
510
  'description' => __('Choose a click action for this button.', 'buttonizer-multifunctional-button'),
517
  'group_social_media' => __('Social Media', 'buttonizer-multifunctional-button'),
518
  'group_popup' => __('Popup', 'buttonizer-multifunctional-button'),
519
 
520
+ 'phone_number' => __('Call action (phone number)', 'buttonizer-multifunctional-button'),
521
+ 'mail' => __('Mail action (email address)', 'buttonizer-multifunctional-button'),
522
  'back_to_top' => __('Back to top', 'buttonizer-multifunctional-button'),
523
  'go_back_one_page' => __('Go back one page', 'buttonizer-multifunctional-button'),
524
  'share_page' => __('Share page', 'buttonizer-multifunctional-button'),
525
+ 'sms' => __('Some sms apps does not support a body tag. When this happens, it will simply open the sms app with the phone number already filled in.', 'buttonizer-multifunctional-button'),
526
+ 'viber' => __('Viber does not support a "chat with phone number " link. When a user clicks on this button it will open their "add contact" with the number filled in.', 'buttonizer-multifunctional-button'),
527
  'messenger_chat' => sprintf(
528
  // translators: %s and %s will be replaced with links
529
  __('New, Facebook Messenger Chat Widget! First, you\'ll need to <a %1$s>whitelist</a> your site on Facebook. Then add your <a %2$s>Page ID</a> into the input above.', 'buttonizer-multifunctional-button'),
534
  __('You need to install Poptin\'s WordPress plugin. You can find it <a %1$s>here</a>. Once you\'ve made a Poptin paste the <a %2$s>direct link</a> into the input.', 'buttonizer-multifunctional-button'),
535
  'href="https://wordpress.org/plugins/poptin/" target="_blank"', 'href="https://help.poptin.com/article/show/72942-how-to-show-a-poptin-when-the-visitor-clicks-on-a-button-link-on-your-site" target="_blank"'
536
  ),
 
537
  'share_page_on' => sprintf(
538
  // translators: %s will become the social media platform, like example: Share on Twitter
539
  __('Share on %s', 'buttonizer-multifunctional-button'),
564
  __('Fill in your phone number without any spaces and symbols. Read WhatsApps recommendations by <a %s>clicking here.</a>', 'buttonizer-multifunctional-button'),
565
  'href="https://faq.whatsapp.com/en/android/26000030/" target="_blank"'
566
  ),
567
+
568
+ 'twitter_info' => sprintf(
569
+ // translators: %1$s and %2$s will be replaced with links
570
+ __('When you want to use Twitter DM you will need to find your Twitter User ID and allow direct messages from anyone. To find your account ID <a %1$s>click here</a>. And to read more about how to allow direct messages from anyone, <a %2$s>click here</a>.', 'buttonizer-multifunctional-button'),
571
+ 'href="https://tweeterid.com/" target="_blank"', 'href="https://help.twitter.com/nl/using-twitter/direct-messages#receive" target="_blank"'
572
+ ),
573
+ ],
574
+ 'placeholders' => [
575
+ 'sms' => __('Text', 'buttonizer-multifunctional-button'),
576
+ 'message' => __('Message', 'buttonizer-multifunctional-button'),
577
+ 'username' => __('Username', 'buttonizer-multifunctional-button'),
578
+ 'mail' => [
579
+ 'recipient' => __('Recipient', 'buttonizer-multifunctional-button'),
580
+ 'subject' => __('Subject', 'buttonizer-multifunctional-button'),
581
+ 'body' => __('Body', 'buttonizer-multifunctional-button'),
582
+ ]
583
  ]
584
+
585
  ],
586
 
587
  'open_new_tab' => [
995
 
996
  'page_rules' => [
997
  'first_page_rule' => __('My first page rule', 'buttonizer-multifunctional-button')
998
+ ],
999
+ 'multiple_button_groups' => __('You are able to add multiple groups on different positions', 'buttonizer-multifunctional-button')
1000
  ];
1001
  }
1002
 
app/Utils/Maintain.php CHANGED
@@ -94,6 +94,7 @@ class Maintain {
94
 
95
  // Buttonizer buttons
96
  $admin_bar->add_menu(array(
 
97
  'parent' => 'buttonizer',
98
  'title' => 'Buttons',
99
  'href' => admin_url() . 'admin.php?page=Buttonizer' . (!is_admin() ? '#' . urlencode($_SERVER["REQUEST_URI"]) : ''),
@@ -102,6 +103,7 @@ class Maintain {
102
 
103
  // Settings
104
  $admin_bar->add_menu(array(
 
105
  'parent' => 'buttonizer',
106
  'title' => __('Settings'),
107
  'href' => admin_url() . 'admin.php?page=Buttonizer#open-settings',
94
 
95
  // Buttonizer buttons
96
  $admin_bar->add_menu(array(
97
+ 'id' => 'buttonizer_buttons',
98
  'parent' => 'buttonizer',
99
  'title' => 'Buttons',
100
  'href' => admin_url() . 'admin.php?page=Buttonizer' . (!is_admin() ? '#' . urlencode($_SERVER["REQUEST_URI"]) : ''),
103
 
104
  // Settings
105
  $admin_bar->add_menu(array(
106
+ 'id' => 'buttonizer_settings',
107
  'parent' => 'buttonizer',
108
  'title' => __('Settings'),
109
  'href' => admin_url() . 'admin.php?page=Buttonizer#open-settings',
app/Utils/Remigrate.php ADDED
@@ -0,0 +1,464 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php namespace Buttonizer\Utils;
2
+
3
+ /**
4
+ * Class Update Buttonizer to version 2.0 (or more)
5
+ *
6
+ * This PHP class contains NO premium code
7
+ *
8
+ * Thank you for updating Buttonizer and keeping Buttonizer UP TO DATE!
9
+ *
10
+ * By the way, not many people will ever see this comment after all...
11
+ * If you read this, email jasper@buttonizer.pro and say something nice referring to this comment!
12
+ *
13
+ * @package Buttonizer\Utils
14
+ */
15
+ class Remigrate
16
+ {
17
+ private $initialized = false;
18
+ private $removedAnything = false;
19
+ private $backupSettings = [];
20
+ private $backupButtons = [];
21
+ private $backupSchedule = [];
22
+ private $backupRules = [];
23
+ private $timeScheduleId = null;
24
+
25
+ public function __construct()
26
+ {
27
+ $this->timeScheduleId = time();
28
+ }
29
+
30
+ /**
31
+ * Run update to 2.0
32
+ */
33
+ public function run()
34
+ {
35
+ try {
36
+ $this->registerSettings();
37
+
38
+ if((count($this->backupButtons) === 0 || $this->backupButtons === false) && (count($this->backupSchedule) === 0 || $this->backupSchedule === false) && (count($this->backupRules) === 0 || $this->backupRules === false))
39
+ {
40
+ $this->cleanup(true);
41
+ return; // all OK, new installation :)
42
+ }
43
+
44
+ $this->convertButtons();
45
+ $this->convertTimeSchedules();
46
+ $this->convertPageRules();
47
+
48
+ $this->cleanup();
49
+ } catch (\Exception $e) {
50
+ header('Content-Type: application/javascript');
51
+
52
+ echo json_encode([
53
+ "status" => "error",
54
+ "message" => "Something went wrong while trying to migrate settings from version 1.5 to version 2.0. Please contact Buttonizer Support or go to the <a href=\"https://community.buttonizer.pro/\" target=\"_blank\">Buttonizer Community</a> and let us know the following message: " . $e->getMessage()
55
+ ]);
56
+ exit;
57
+ }
58
+ }
59
+
60
+ /**
61
+ * Register settings
62
+ */
63
+ private function registerSettings()
64
+ {
65
+ // Backup settings
66
+ register_setting("buttonizer", "buttonizer_buttons_backup");
67
+ register_setting("buttonizer", "buttonizer_opening_settings_backup");
68
+ register_setting("buttonizer", "buttonizer_page_categories_backup");
69
+ register_setting("buttonizer", "buttonizer_general_settings_backup");
70
+
71
+ // Get buttons
72
+ register_setting("buttonizer", "buttonizer_buttons");
73
+ register_setting("buttonizer", "buttonizer_opening_settings");
74
+ register_setting("buttonizer", "buttonizer_page_categories");
75
+
76
+ // Buttonizer 2.0 setting groups
77
+ register_setting("buttonizer", "buttonizer_buttons");
78
+ register_setting("buttonizer", "buttonizer_buttons_published");
79
+ register_setting("buttonizer", "buttonizer_settings");
80
+ register_setting("buttonizer", "buttonizer_schedules");
81
+ register_setting("buttonizer", "buttonizer_rules");
82
+
83
+ // Load buttons
84
+ $this->backupButtons = get_option('buttonizer_buttons_backup');
85
+ $this->backupSettings = get_option('buttonizer_general_settings_backup');
86
+ $this->backupSchedule = get_option('buttonizer_opening_settings_backup');
87
+ $this->backupRules = get_option('buttonizer_page_categories_backup');
88
+
89
+ $this->initialized = true;
90
+ }
91
+
92
+ /**
93
+ * Woah! Something went wrong :'(
94
+ */
95
+ private function beforeCrashRevert() {
96
+ // Check if anything got removed
97
+ if(!$this->initialized || !$this->removedAnything) return;
98
+
99
+ // Delete created options
100
+ delete_option('buttonizer_general_settings_backup');
101
+ delete_option("buttonizer_buttons_backup");
102
+ delete_option("buttonizer_opening_settings_backup");
103
+ delete_option("buttonizer_page_categories_backup");
104
+ delete_option("buttonizer_general_settings_backup");
105
+
106
+
107
+ // Make sure that the old values are still there
108
+ update_option('buttonizer_general_settings', $this->backupSettings);
109
+ update_option('buttonizer_buttons', $this->backupButtons);
110
+ update_option('buttonizer_opening_settings', $this->backupSchedule);
111
+ update_option('buttonizer_page_categories', $this->backupRules);
112
+ }
113
+
114
+ /**
115
+ * Convert
116
+ */
117
+ private function convertButtons()
118
+ {
119
+ $buttons = [];
120
+
121
+ $defaultButtonColor = $this->get15GeneralSettings('button_unpushed', '#ba54ff');
122
+ $defaultButtonColorHover = $this->get15GeneralSettings('button_pushed', '#ba54ff');
123
+
124
+ foreach ($this->backupButtons['buttonorder'] as $buttonId)
125
+ {
126
+ // Skip the placeholder button
127
+ if($buttonId == -1) continue;
128
+ $hasStyleChanges = false;
129
+
130
+ // Get action type and action
131
+ $actionType = $this->get15buttonValue($buttonId, 'action', '');
132
+ $action = $this->get15buttonValue($buttonId, 'url', '');
133
+
134
+ // Make sure social sharing actions get migrated
135
+ if($actionType == 'socialsharing') {
136
+ $action = $this->get15buttonValue($buttonId, 'social', 'facebook');
137
+ }else if($actionType == 'javascript') {
138
+ $actionType = 'javascript_pro';
139
+ }
140
+
141
+ // Make sure label gets migrated correctly
142
+ $showLabel = ($this->get15buttonValue($buttonId, 'show_label_on_hover', 'always') === 'default' ? 'always' : $this->get15buttonValue($buttonId, 'show_label_on_hover', 'always'));
143
+
144
+ // Hover on desktop, show on mobile
145
+ if($showLabel === 'showOnHover') {
146
+ $showLabelDesktop = 'hover';
147
+ $showLabelMobile = 'always';
148
+ }
149
+ // Hover on desktop, hide on mobile
150
+ else if($showLabel === 'showOnHoverDesktop') {
151
+ $showLabelDesktop = 'hover';
152
+ $showLabelMobile = 'hide';
153
+ }
154
+ // Hide on desktop, show on mobile
155
+ else if($showLabel === 'showOnHoverMobile') {
156
+ $showLabelDesktop = 'hide';
157
+ $showLabelMobile = 'always';
158
+ }
159
+ // Always show label
160
+ else {
161
+ $showLabelDesktop = 'always';
162
+ $showLabelMobile = 'always';
163
+ }
164
+
165
+ $button = [
166
+ // Name
167
+ "name" => $this->get15buttonValue($buttonId, 'title', 'Button ' . count($buttons)),
168
+ "icon" => 'fa ' . $this->get15buttonValue($buttonId, 'icon', 'fa-lightbulb'),
169
+
170
+ // When do we show this button?
171
+ "show_desktop" => $this->get15buttonValue($buttonId, 'show_on_desktop', 0) == 1 ? 'true' : 'false',
172
+ "show_mobile" => $this->get15buttonValue($buttonId, 'show_on_phone', 0) == 1 ? 'true' : 'false',
173
+
174
+ // Button actions
175
+ "type" => $actionType,
176
+ "action" => $action,
177
+ "action_new_tab" => $this->get15buttonValue($buttonId, 'url_newtab', 0) == 1 ? 'true' : 'false',
178
+
179
+ // Button label
180
+ "label" => $this->get15buttonValue($buttonId, 'text', 'Button label'),
181
+ "show_label_desktop" => $showLabelDesktop,
182
+ "show_label_mobile" => $showLabelMobile
183
+ ];
184
+
185
+ // Custom colors
186
+ if($this->get15buttonValue($buttonId, 'using_custom_colors', 0) == 1)
187
+ {
188
+ // Button background color
189
+ if($this->get15buttonValue($buttonId, 'colors_button', '#ba54ff') !== '#ba54ff' && $this->get15buttonValue($buttonId, 'colors_button', '#ba54ff') !== $defaultButtonColor) {
190
+ $hasStyleChanges = true;
191
+ $button['background_color'] = $this->fixColor($this->get15buttonValue($buttonId, 'colors_button', '#ba54ff'));
192
+ }
193
+
194
+ // Button background hover color
195
+ if($this->get15buttonValue($buttonId, 'colors_pushed', '#8d1acc') !== '#8d1acc' && $this->get15buttonValue($buttonId, 'colors_pushed', '#8d1acc') !== $defaultButtonColorHover) {
196
+ $hasStyleChanges = true;
197
+ $button['background_color_interaction'] = $this->fixColor($this->get15buttonValue($buttonId, 'colors_pushed', '#8d1acc'));
198
+ }
199
+
200
+ // Button icon color
201
+ if($this->fixColor($this->get15buttonValue($buttonId, 'colors_icon', '#FFFFFF')) !== '#FFFFFF' && $this->get15buttonValue($buttonId, 'colors_icon', '#FFFFFF') != $this->get15GeneralSettings('icon_color', '#FFFFFF')) {
202
+ $hasStyleChanges = true;
203
+ $button['icon_color'] = $this->fixColor($this->get15buttonValue($buttonId, 'colors_icon', '#FFFFFF'));
204
+ $button['icon_color_interaction'] = $this->fixColor($this->get15buttonValue($buttonId, 'colors_icon', '#FFFFFF'));
205
+ }
206
+ }
207
+
208
+ // Does it have a background image?
209
+ if($this->get15buttonValue($buttonId, 'image', '') !== '') {
210
+ if($this->get15buttonValue($buttonId, 'image_background', 0) == 1) {
211
+ $button['background_image'] = $this->get15buttonValue($buttonId, 'image', '');
212
+
213
+ // Empty icon
214
+ $button['icon'] = '';
215
+
216
+ $hasStyleChanges = true;
217
+ }else {
218
+ // is icon!
219
+ $button['icon_is_image'] = 'true';
220
+ $button['icon_image'] = $this->get15buttonValue($buttonId, 'image', '');
221
+ }
222
+ }
223
+
224
+ // Did it have a custom class
225
+ if($this->get15buttonValue($buttonId, 'custom_class', '') !== '') {
226
+ $button['custom_class'] = $this->get15buttonValue($buttonId, 'custom_class', '');
227
+ }
228
+
229
+ // Time schedule
230
+ if($this->get15buttonValue($buttonId, 'show_when_opened', 0) !== 0) {
231
+ $button['selected_schedule'] = $this->timeScheduleId;
232
+ }
233
+
234
+ // Page rule
235
+ if($this->get15buttonValue($buttonId, 'show_on_pages', -1) >= 0) {
236
+ $button['selected_page_rule'] = $this->get15buttonValue($buttonId, 'show_on_pages', '');
237
+ }
238
+
239
+ // Using main button style
240
+ $button['use_main_button_style'] = $hasStyleChanges ? 'false' : 'true';
241
+
242
+ // Add button
243
+ $buttons[] = $button;
244
+ }
245
+
246
+ $menuStyle = $this->get15GeneralSettings('buttons_animation', 'default');
247
+
248
+ // Update to new style name
249
+ if($menuStyle === 'circle') {
250
+ $menuStyle = 'corner-circle';
251
+ }else if($menuStyle === 'fade-left-to-right') {
252
+ $menuStyle = 'faded';
253
+ }
254
+
255
+ // Group label
256
+ $showGroupLabel = $this->get15GeneralSettings('buttons_label_show_on_hover', 'always');
257
+
258
+ // Hover on desktop, show on mobile
259
+ if($showGroupLabel === 'showOnHover') {
260
+ $showGroupLabelDesktop = 'hover';
261
+ $showGroupLabelMobile = 'always';
262
+ }
263
+ // Hover on desktop, hide on mobile
264
+ else if($showGroupLabel === 'showOnHoverDesktop') {
265
+ $showGroupLabelDesktop = 'hover';
266
+ $showGroupLabelMobile = 'hide';
267
+ }
268
+ // Hide on desktop, show on mobile
269
+ else if($showGroupLabel === 'showOnHoverMobile') {
270
+ $showGroupLabelDesktop = 'hide';
271
+ $showGroupLabelMobile = 'always';
272
+ }
273
+ // Always show label
274
+ else {
275
+ $showGroupLabelDesktop = 'always';
276
+ $showGroupLabelMobile = 'always';
277
+ }
278
+
279
+ $groups = [];
280
+ $groups[] = [
281
+ 'data' => [
282
+ 'name' => 'Buttonizer',
283
+
284
+ // Show on mobile and desktop
285
+ 'show_desktop' => 'true',
286
+ 'show_mobile' => 'true',
287
+
288
+ // Icon
289
+ 'icon_is_image' => 'false',
290
+ 'icon' => 'fa ' . $this->get15GeneralSettings('icon_icon', 'fa-plus'),
291
+ 'icon_color' => $this->fixColor($this->get15GeneralSettings('icon_color', '#ffffff')),
292
+ 'icon_color_interaction' => $this->fixColor($this->get15GeneralSettings('icon_color', '#ffffff')),
293
+
294
+ // Button background
295
+ 'background_color' => $defaultButtonColor,
296
+ 'background_color_interaction' => $defaultButtonColorHover,
297
+
298
+ // Position
299
+ 'horizontal' => $this->get15GeneralSettings('position_horizontal', 5),
300
+ 'vertical' => $this->get15GeneralSettings('position_bottom', 5),
301
+ 'position' => (($this->get15GeneralSettings('position_horizontal', 5) != 5 || $this->get15GeneralSettings('position_vertical', 5) != 5) ? 'advanced' : 'bottomright'),
302
+
303
+ // Menu style & animation
304
+ 'menu_style' => $menuStyle,
305
+ 'menu_animation' => $this->get15GeneralSettings('attention_animation', 'none'),
306
+
307
+ // Label
308
+ 'label' => $this->get15GeneralSettings('icon_label', ''),
309
+ 'label_color' => $this->get15GeneralSettings('label_text_color', ''),
310
+ 'label_background_color' => $this->get15GeneralSettings('label_color', ''),
311
+
312
+ // Show label
313
+ 'show_label_desktop' => $showGroupLabelDesktop,
314
+ 'show_label_mobile' => $showGroupLabelMobile,
315
+
316
+ 'advanced_scroll' => $this->get15GeneralSettings('procent_to_scroll', ''),
317
+ 'advanced_timeout' => $this->get15GeneralSettings('time_to_timeout', ''),
318
+ 'advanced_exit_intent' => $this->get15GeneralSettings('enable_exit_intent', '')
319
+ ],
320
+
321
+ 'buttons' => $buttons
322
+ ];
323
+
324
+ // Save new buttons and publish them
325
+ update_option('buttonizer_buttons', $groups);
326
+ update_option('buttonizer_buttons_published', $groups);
327
+ }
328
+
329
+ private function fixColor($hex) {
330
+ if(strtoupper($hex) === '#FFFFF') {
331
+ return '#FFFFFF';
332
+ }
333
+
334
+ return $hex;
335
+ }
336
+
337
+ /**
338
+ * Convert 'opening hours' to time schedules
339
+ */
340
+ private function convertTimeSchedules()
341
+ {
342
+ $days = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'];
343
+
344
+ $newSchedule = [
345
+ 'name' => 'First time schedule',
346
+ 'id' => $this->timeScheduleId,
347
+ 'weekdays' => [],
348
+ 'custom' => []
349
+ ];
350
+
351
+ // Loop through all days
352
+ foreach ($days as $day)
353
+ {
354
+ $opened = isset($this->backupSchedule['buttonizer_'. $day .'_opened']) && $this->backupSchedule['buttonizer_'. $day .'_opened'] == '1' ? 'true' : 'false';
355
+ $openingFrom = isset($this->backupSchedule['buttonizer_'. $day .'_opened_from']) ? $this->backupSchedule['buttonizer_'. $day .'_opened_from'] : '10:00';
356
+ $closingOn = isset($this->backupSchedule['buttonizer_'. $day .'_closing_on']) ? $this->backupSchedule['buttonizer_'. $day .'_closing_on'] : '17:00';
357
+
358
+ $newSchedule['weekdays'][] = [
359
+ 'opened' => $opened,
360
+ 'open' => $openingFrom,
361
+ 'close' => $closingOn,
362
+ 'weekday' => $day
363
+ ];
364
+ }
365
+
366
+ // Save time schedule
367
+ update_option('buttonizer_schedules', [$newSchedule]);
368
+ }
369
+
370
+ /**
371
+ * Convert page rules, not many changes though
372
+ */
373
+ private function convertPageRules()
374
+ {
375
+ $pageRules = [];
376
+
377
+ // Full page rule
378
+ foreach ($this->backupRules as $pageRule) {
379
+ $container = [
380
+ 'id' => $pageRule['id'],
381
+ 'name' => $pageRule['title'],
382
+ 'filter_role' => $pageRule['filter_role'],
383
+ 'type' => $pageRule['andor'],
384
+ 'rules' => []
385
+ ];
386
+
387
+ $rules = [];
388
+ foreach ($pageRule['rules'] as $rule)
389
+ {
390
+ $rules[] = [
391
+ 'type' => $rule['type'],
392
+ 'value' => $rule['value']
393
+ ];
394
+ }
395
+
396
+ $container['rules'] = $rules;
397
+
398
+
399
+ $pageRules[] = $container;
400
+ }
401
+
402
+ // Save page rule
403
+ update_option('buttonizer_rules', $pageRules);
404
+ update_option('buttonizer_rules_published', $pageRules);
405
+ }
406
+
407
+ /**
408
+ * Let's get the old Buttonizer values
409
+ *
410
+ * @param $id
411
+ * @param $option
412
+ * @param string $default
413
+ * @return mixed|string
414
+ */
415
+ private function get15buttonValue($id, $option, $default = '')
416
+ {
417
+ $optionName = 'button_'. $id .'_' . $option;
418
+
419
+ // Option does not exists OR has no value
420
+ if(!isset($this->backupButtons[$optionName])) return $default;
421
+
422
+ return $this->backupButtons[$optionName];
423
+ }
424
+
425
+ /**
426
+ * Let's get the old Buttonizer values
427
+ *
428
+ * @param $option
429
+ * @param string $default
430
+ * @return mixed|string
431
+ */
432
+ private function get15GeneralSettings($option, $default = '')
433
+ {
434
+ // Option does not exists OR has no value
435
+ if(!isset($this->backupSettings[$option])) return $default;
436
+
437
+ return $this->backupSettings[$option];
438
+ }
439
+
440
+ /**
441
+ * Cleanup
442
+ * @param bool $newInstall
443
+ */
444
+ private function cleanup($newInstall = false)
445
+ {
446
+ $settings = [];
447
+
448
+ $settings['migration_version'] = '2.0';
449
+ $settings['import_icon_library'] = 'true';
450
+
451
+ if($newInstall === false) {
452
+ $settings['google_analytics'] = $this->get15GeneralSettings('google_analytics', '');
453
+ $settings['icon_library'] = 'fontawesome';
454
+ $settings['icon_library_version'] = '4.7.0';
455
+ $settings['welcome'] = 'true';
456
+ }else{
457
+ $settings['google_analytics'] = '';
458
+ $settings['icon_library'] = 'fontawesome';
459
+ $settings['icon_library_version'] = '5.free';
460
+ }
461
+
462
+ update_option('buttonizer_settings', $settings);
463
+ }
464
+ }
assets/dashboard.css CHANGED
@@ -11,7 +11,7 @@
11
  * (C) 2017-2019 Buttonizer
12
  *
13
  */
14
- .fs-modal{position:fixed;overflow:auto;height:100%;width:100%;top:0;z-index:100000;display:none;background:rgba(0,0,0,0.6)}.fs-modal .fs-modal-dialog{background:transparent;position:absolute;left:50%;margin-left:-298px;padding-bottom:30px;top:-100%;z-index:100001;width:596px}@media (max-width: 650px){.fs-modal .fs-modal-dialog{margin-left:-50%;box-sizing:border-box;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}}.fs-modal.active{display:block}.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal.fs-success .fs-modal-header{border-bottom-color:#46b450}.fs-modal.fs-success .fs-modal-body{background-color:#f7fff7}.fs-modal.fs-warn .fs-modal-header{border-bottom-color:#ffb900}.fs-modal.fs-warn .fs-modal-body{background-color:#fff8e5}.fs-modal.fs-error .fs-modal-header{border-bottom-color:#dc3232}.fs-modal.fs-error .fs-modal-body{background-color:#ffeaea}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{border:0;background:#fefefe;padding:20px}.fs-modal .fs-modal-header{border-bottom:#eeeeee solid 1px;background:#fbfbfb;padding:15px 20px;position:relative;margin-bottom:-10px}.fs-modal .fs-modal-header h4{margin:0;padding:0;text-transform:uppercase;font-size:1.2em;font-weight:bold;color:#cacaca;text-shadow:1px 1px 1px #fff;letter-spacing:0.6px;-webkit-font-smoothing:antialiased}.fs-modal .fs-modal-header .fs-close{position:absolute;right:10px;top:12px;cursor:pointer;color:#bbb;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;padding:3px;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.fs-modal .fs-modal-header .fs-close:hover{color:#fff;background:#aaa}.fs-modal .fs-modal-header .fs-close .dashicons,.fs-modal .fs-modal-header .fs-close:hover .dashicons{text-decoration:none}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px;line-height:1.5em}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-weight:bold;font-size:20px;margin-top:0}.fs-modal .fs-modal-footer{border-top:#eeeeee solid 1px;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:first-child{margin:0}.fs-modal .fs-modal-panel>.notice.inline{margin:0;display:none}.fs-modal .fs-modal-panel:not(.active){display:none}.rtl .fs-modal .fs-modal-header .fs-close{right:auto;left:20px}body.has-fs-modal{overflow:hidden}.fs-modal.fs-modal-deactivation-feedback .reason-input,.fs-modal.fs-modal-deactivation-feedback .internal-message{margin:3px 0 3px 22px}.fs-modal.fs-modal-deactivation-feedback .reason-input input,.fs-modal.fs-modal-deactivation-feedback .reason-input textarea,.fs-modal.fs-modal-deactivation-feedback .internal-message input,.fs-modal.fs-modal-deactivation-feedback .internal-message textarea{width:100%}.fs-modal.fs-modal-deactivation-feedback li.reason.has-internal-message .internal-message{border:1px solid #ccc;padding:7px;display:none}@media (max-width: 650px){.fs-modal.fs-modal-deactivation-feedback li.reason li.reason{margin-bottom:10px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .reason-input,.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .internal-message{margin-left:29px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label{display:table}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label>span{display:table-cell;font-size:1.3em}}.fs-modal.fs-modal-deactivation-feedback .anonymous-feedback-label{float:left}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel{margin-top:0 !important}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel h3{margin-top:0;line-height:1.5em}#the-list .deactivate>.fs-slug{display:none}.fs-modal.fs-modal-subscription-cancellation .fs-price-increase-warning{color:red;font-weight:bold;padding:0 25px;margin-bottom:0}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:left;top:5px;position:relative}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:right}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{display:block;margin-left:24px}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{margin-left:0;margin-right:24px}.fs-modal.fs-modal-license-activation .fs-modal-body input.license_key{width:100%}#license_options_container table,#license_options_container table select,#license_options_container table #available_license_key{width:100%}#license_options_container table td:first-child{width:1%}#license_options_container table #other_license_key_container label{position:relative;top:6px;float:left;margin-right:5px}#license_options_container table #other_license_key_container div{overflow:hidden;width:auto;height:30px;display:block;top:2px;position:relative}#license_options_container table #other_license_key_container div input{margin:0}#sites_list_container td{cursor:pointer}#multisite_options_container{margin-top:10px;border:1px solid #ccc;padding:5px}#multisite_options_container a{text-decoration:none}#multisite_options_container a:focus{box-shadow:none}#multisite_options_container a.selected{font-weight:bold}#multisite_options_container.apply-on-all-sites{border:0 none;padding:0}#multisite_options_container.apply-on-all-sites #all_sites_options{border-spacing:0}#multisite_options_container.apply-on-all-sites #all_sites_options td:not(:first-child){display:none}#multisite_options_container #sites_list_container{display:none;overflow:auto}#multisite_options_container #sites_list_container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-modal.fs-modal-license-key-resend .email-address-container{overflow:hidden;padding-right:2px}.fs-modal.fs-modal-license-key-resend.fs-freemium input.email-address{width:300px}.fs-modal.fs-modal-license-key-resend.fs-freemium label{display:block;margin-bottom:10px}.fs-modal.fs-modal-license-key-resend.fs-premium input.email-address{width:100%}.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{float:right;margin-left:7px}@media (max-width: 650px){.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{margin-top:2px}}
15
  .rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{padding-left:2px;padding-right:0}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:left;margin-right:7px;margin-left:0}a.show-license-resend-modal{margin-top:4px;display:inline-block}.fs-ajax-loader{position:relative;width:170px;height:20px;margin:auto}.fs-ajax-loader .fs-ajax-loader-bar{position:absolute;top:0;background-color:#0074a3;width:20px;height:20px;-webkit-animation-name:bounce_ajaxLoader;-moz-animation-name:bounce_ajaxLoader;-ms-animation-name:bounce_ajaxLoader;-o-animation-name:bounce_ajaxLoader;animation-name:bounce_ajaxLoader;-webkit-animation-duration:1.5s;-moz-animation-duration:1.5s;-ms-animation-duration:1.5s;-o-animation-duration:1.5s;animation-duration:1.5s;animation-iteration-count:infinite;-o-animation-iteration-count:infinite;-ms-animation-iteration-count:infinite;-webkit-animation-iteration-count:infinite;-moz-animation-iteration-count:infinite;-webkit-animation-direction:normal;-moz-animation-direction:normal;-ms-animation-direction:normal;-o-animation-direction:normal;animation-direction:normal;-moz-transform:0.3;-o-transform:0.3;-ms-transform:0.3;-webkit-transform:0.3;transform:0.3}.fs-ajax-loader .fs-ajax-loader-bar-1{left:0px;animation-delay:0.6s;-o-animation-delay:0.6s;-ms-animation-delay:0.6s;-webkit-animation-delay:0.6s;-moz-animation-delay:0.6s}.fs-ajax-loader .fs-ajax-loader-bar-2{left:19px;animation-delay:0.75s;-o-animation-delay:0.75s;-ms-animation-delay:0.75s;-webkit-animation-delay:0.75s;-moz-animation-delay:0.75s}.fs-ajax-loader .fs-ajax-loader-bar-3{left:38px;animation-delay:0.9s;-o-animation-delay:0.9s;-ms-animation-delay:0.9s;-webkit-animation-delay:0.9s;-moz-animation-delay:0.9s}.fs-ajax-loader .fs-ajax-loader-bar-4{left:57px;animation-delay:1.05s;-o-animation-delay:1.05s;-ms-animation-delay:1.05s;-webkit-animation-delay:1.05s;-moz-animation-delay:1.05s}.fs-ajax-loader .fs-ajax-loader-bar-5{left:76px;animation-delay:1.2s;-o-animation-delay:1.2s;-ms-animation-delay:1.2s;-webkit-animation-delay:1.2s;-moz-animation-delay:1.2s}.fs-ajax-loader .fs-ajax-loader-bar-6{left:95px;animation-delay:1.35s;-o-animation-delay:1.35s;-ms-animation-delay:1.35s;-webkit-animation-delay:1.35s;-moz-animation-delay:1.35s}.fs-ajax-loader .fs-ajax-loader-bar-7{left:114px;animation-delay:1.5s;-o-animation-delay:1.5s;-ms-animation-delay:1.5s;-webkit-animation-delay:1.5s;-moz-animation-delay:1.5s}.fs-ajax-loader .fs-ajax-loader-bar-8{left:133px;animation-delay:1.65s;-o-animation-delay:1.65s;-ms-animation-delay:1.65s;-webkit-animation-delay:1.65s;-moz-animation-delay:1.65s}@-moz-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-ms-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-o-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-webkit-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}.fs-modal-auto-install #request-filesystem-credentials-form h2,.fs-modal-auto-install #request-filesystem-credentials-form .request-filesystem-credentials-action-buttons{display:none}.fs-modal-auto-install #request-filesystem-credentials-form input[type=password],.fs-modal-auto-install #request-filesystem-credentials-form input[type=email],.fs-modal-auto-install #request-filesystem-credentials-form input[type=text]{-webkit-appearance:none;padding:10px 10px 5px 10px;width:300px;max-width:100%}.fs-modal-auto-install #request-filesystem-credentials-form>div,.fs-modal-auto-install #request-filesystem-credentials-form label,.fs-modal-auto-install #request-filesystem-credentials-form fieldset{width:300px;max-width:100%;margin:0 auto;display:block}.button-primary.warn{box-shadow:0 1px 0 #d2593c;text-shadow:0 -1px 1px #d2593c,1px 0 1px #d2593c,0 1px 1px #d2593c,-1px 0 1px #d2593c;background:#f56a48;border-color:#ec6544 #d2593c #d2593c}.button-primary.warn:hover{background:#fd6d4a;border-color:#d2593c}.button-primary.warn:focus{box-shadow:0 1px 0 #dd6041,0 0 2px 1px #e4a796}.button-primary.warn:active{background:#dd6041;border-color:#d2593c;box-shadow:inset 0 2px 0 #d2593c}.button-primary.warn.disabled{color:#f5b3a1 !important;background:#e76444 !important;border-color:#d85e40 !important;text-shadow:0 -1px 0 rgba(0,0,0,0.1) !important}
16
  .chosen-select {
17
  width: 100%; }
@@ -4914,6 +4914,10 @@ tr.introjs-showElement > th {
4914
  -moz-transition: 150ms all ease-in-out;
4915
  -webkit-transition: 150ms all ease-in-out; }
4916
 
 
 
 
 
4917
  .buttonizer-toggle {
4918
  display: block;
4919
  width: 100%;
@@ -4997,6 +5001,10 @@ tr.introjs-showElement > th {
4997
  transition: 150ms all ease-in;
4998
  -moz-transition: 150ms all ease-in;
4999
  -webkit-transition: 150ms all ease-in; }
 
 
 
 
5000
  .buttonizer-boolean .buttonizer-boolean-circle {
5001
  position: absolute;
5002
  width: 22px;
@@ -5155,6 +5163,11 @@ tr.introjs-showElement > th {
5155
  display: block;
5156
  color: rgba(0, 0, 0, 0.8);
5157
  padding: 8px 10px !important; }
 
 
 
 
 
5158
 
5159
  #wpadminbar, #adminmenumain {
5160
  display: none; }
@@ -5799,6 +5812,9 @@ body.buttonizer-initialized #wpwrap {
5799
  width: 100%; }
5800
  .buttonizer-bar .container .button-group-styling .buttonizer-setting-row .first {
5801
  padding-right: 10px; }
 
 
 
5802
  .buttonizer-bar .container .button-group-styling .buttonizer-setting-row.form-has-extra-fields .is-textfield, .buttonizer-bar .container .button-group-styling .buttonizer-setting-row.form-has-extra-fields .buttonizer-input-only {
5803
  margin-top: 7px; }
5804
  .buttonizer-bar .container .button-group-styling .buttonizer-setting-row.is-boolean-only .buttonizer-setting-row-c1 {
@@ -6771,8 +6787,9 @@ body.warning-left-preview-window .buttonizer-frame, body.warning-reverted-change
6771
  .fs-modal.has-video .fs-modal-dialog .fs-modal-body {
6772
  width: 400px;
6773
  display: block;
6774
- float: left;
6775
- border-rght: #eeeeee solid 1px; }
 
6776
  .fs-modal.has-video .fs-modal-dialog .fs-modal-video {
6777
  display: block;
6778
  width: 571px;
@@ -6802,6 +6819,9 @@ body.warning-left-preview-window .buttonizer-frame, body.warning-reverted-change
6802
  .buttonizer-premium-gray-out:hover .buttonizer-premium {
6803
  opacity: 1; }
6804
 
 
 
 
6805
  .buttonizer-premium {
6806
  background: #2d7688;
6807
  background: -moz-linear-gradient(-45deg, #2d7688 0%, #187287 50%, #187287 50%, #f0841a 51%, #e8832c 98%);
@@ -6947,6 +6967,9 @@ body {
6947
  .info-link.has-margin-everywhere, .info-link.has-margin-bottom {
6948
  margin-bottom: 20px; }
6949
 
 
 
 
6950
  @media screen and (max-width: 782px) {
6951
  html.wp-toolbar {
6952
  padding: 0 !important; }
11
  * (C) 2017-2019 Buttonizer
12
  *
13
  */
14
+ .fs-modal{position:fixed;overflow:auto;height:100%;width:100%;top:0;z-index:100000;display:none;background:rgba(0,0,0,0.6)}.fs-modal .fs-modal-dialog{background:transparent;position:absolute;left:50%;margin-left:-298px;padding-bottom:30px;top:-100%;z-index:100001;width:596px}@media (max-width: 650px){.fs-modal .fs-modal-dialog{margin-left:-50%;box-sizing:border-box;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}}.fs-modal.active{display:block}.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal.fs-success .fs-modal-header{border-bottom-color:#46b450}.fs-modal.fs-success .fs-modal-body{background-color:#f7fff7}.fs-modal.fs-warn .fs-modal-header{border-bottom-color:#ffb900}.fs-modal.fs-warn .fs-modal-body{background-color:#fff8e5}.fs-modal.fs-error .fs-modal-header{border-bottom-color:#dc3232}.fs-modal.fs-error .fs-modal-body{background-color:#ffeaea}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{border:0;background:#fefefe;padding:20px}.fs-modal .fs-modal-header{border-bottom:#eeeeee solid 1px;background:#fbfbfb;padding:15px 20px;position:relative;margin-bottom:-10px}.fs-modal .fs-modal-header h4{margin:0;padding:0;text-transform:uppercase;font-size:1.2em;font-weight:bold;color:#cacaca;text-shadow:1px 1px 1px #fff;letter-spacing:0.6px;-webkit-font-smoothing:antialiased}.fs-modal .fs-modal-header .fs-close{position:absolute;right:10px;top:12px;cursor:pointer;color:#bbb;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;padding:3px;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.fs-modal .fs-modal-header .fs-close:hover{color:#fff;background:#aaa}.fs-modal .fs-modal-header .fs-close .dashicons,.fs-modal .fs-modal-header .fs-close:hover .dashicons{text-decoration:none}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px;line-height:1.5em}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-weight:bold;font-size:20px;margin-top:0}.fs-modal .fs-modal-footer{border-top:#eeeeee solid 1px;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:first-child{margin:0}.fs-modal .fs-modal-panel>.notice.inline{margin:0;display:none}.fs-modal .fs-modal-panel:not(.active){display:none}.rtl .fs-modal .fs-modal-header .fs-close{right:auto;left:20px}body.has-fs-modal{overflow:hidden}.fs-modal.fs-modal-deactivation-feedback .reason-input,.fs-modal.fs-modal-deactivation-feedback .internal-message{margin:3px 0 3px 22px}.fs-modal.fs-modal-deactivation-feedback .reason-input input,.fs-modal.fs-modal-deactivation-feedback .reason-input textarea,.fs-modal.fs-modal-deactivation-feedback .internal-message input,.fs-modal.fs-modal-deactivation-feedback .internal-message textarea{width:100%}.fs-modal.fs-modal-deactivation-feedback li.reason.has-internal-message .internal-message{border:1px solid #ccc;padding:7px;display:none}@media (max-width: 650px){.fs-modal.fs-modal-deactivation-feedback li.reason li.reason{margin-bottom:10px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .reason-input,.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .internal-message{margin-left:29px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label{display:table}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label>span{display:table-cell;font-size:1.3em}}.fs-modal.fs-modal-deactivation-feedback .anonymous-feedback-label{float:left}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel{margin-top:0 !important}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel h3{margin-top:0;line-height:1.5em}#the-list .deactivate>.fs-slug{display:none}.fs-modal.fs-modal-subscription-cancellation .fs-price-increase-warning{color:red;font-weight:bold;padding:0 25px;margin-bottom:0}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:left;top:5px;position:relative}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:right}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{display:block;margin-left:24px}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{margin-left:0;margin-right:24px}.fs-modal.fs-modal-license-activation .fs-modal-body input.fs-license-key{width:100%}.fs-license-options-container table,.fs-license-options-container table select,.fs-license-options-container table .fs-available-license-key{width:100%}.fs-license-options-container table td:first-child{width:1%}.fs-license-options-container table .fs-other-license-key-container label{position:relative;top:6px;float:left;margin-right:5px}.fs-license-options-container table .fs-other-license-key-container div{overflow:hidden;width:auto;height:30px;display:block;top:2px;position:relative}.fs-license-options-container table .fs-other-license-key-container div input{margin:0}.fs-sites-list-container td{cursor:pointer}.fs-multisite-options-container{margin-top:10px;border:1px solid #ccc;padding:5px}.fs-multisite-options-container a{text-decoration:none}.fs-multisite-options-container a:focus{box-shadow:none}.fs-multisite-options-container a.selected{font-weight:bold}.fs-multisite-options-container.fs-apply-on-all-sites{border:0 none;padding:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options{border-spacing:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options td:not(:first-child){display:none}.fs-multisite-options-container .fs-sites-list-container{display:none;overflow:auto}.fs-multisite-options-container .fs-sites-list-container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-modal.fs-modal-license-key-resend .email-address-container{overflow:hidden;padding-right:2px}.fs-modal.fs-modal-license-key-resend.fs-freemium input.email-address{width:300px}.fs-modal.fs-modal-license-key-resend.fs-freemium label{display:block;margin-bottom:10px}.fs-modal.fs-modal-license-key-resend.fs-premium input.email-address{width:100%}.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{float:right;margin-left:7px}@media (max-width: 650px){.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{margin-top:2px}}
15
  .rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{padding-left:2px;padding-right:0}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:left;margin-right:7px;margin-left:0}a.show-license-resend-modal{margin-top:4px;display:inline-block}.fs-ajax-loader{position:relative;width:170px;height:20px;margin:auto}.fs-ajax-loader .fs-ajax-loader-bar{position:absolute;top:0;background-color:#0074a3;width:20px;height:20px;-webkit-animation-name:bounce_ajaxLoader;-moz-animation-name:bounce_ajaxLoader;-ms-animation-name:bounce_ajaxLoader;-o-animation-name:bounce_ajaxLoader;animation-name:bounce_ajaxLoader;-webkit-animation-duration:1.5s;-moz-animation-duration:1.5s;-ms-animation-duration:1.5s;-o-animation-duration:1.5s;animation-duration:1.5s;animation-iteration-count:infinite;-o-animation-iteration-count:infinite;-ms-animation-iteration-count:infinite;-webkit-animation-iteration-count:infinite;-moz-animation-iteration-count:infinite;-webkit-animation-direction:normal;-moz-animation-direction:normal;-ms-animation-direction:normal;-o-animation-direction:normal;animation-direction:normal;-moz-transform:0.3;-o-transform:0.3;-ms-transform:0.3;-webkit-transform:0.3;transform:0.3}.fs-ajax-loader .fs-ajax-loader-bar-1{left:0px;animation-delay:0.6s;-o-animation-delay:0.6s;-ms-animation-delay:0.6s;-webkit-animation-delay:0.6s;-moz-animation-delay:0.6s}.fs-ajax-loader .fs-ajax-loader-bar-2{left:19px;animation-delay:0.75s;-o-animation-delay:0.75s;-ms-animation-delay:0.75s;-webkit-animation-delay:0.75s;-moz-animation-delay:0.75s}.fs-ajax-loader .fs-ajax-loader-bar-3{left:38px;animation-delay:0.9s;-o-animation-delay:0.9s;-ms-animation-delay:0.9s;-webkit-animation-delay:0.9s;-moz-animation-delay:0.9s}.fs-ajax-loader .fs-ajax-loader-bar-4{left:57px;animation-delay:1.05s;-o-animation-delay:1.05s;-ms-animation-delay:1.05s;-webkit-animation-delay:1.05s;-moz-animation-delay:1.05s}.fs-ajax-loader .fs-ajax-loader-bar-5{left:76px;animation-delay:1.2s;-o-animation-delay:1.2s;-ms-animation-delay:1.2s;-webkit-animation-delay:1.2s;-moz-animation-delay:1.2s}.fs-ajax-loader .fs-ajax-loader-bar-6{left:95px;animation-delay:1.35s;-o-animation-delay:1.35s;-ms-animation-delay:1.35s;-webkit-animation-delay:1.35s;-moz-animation-delay:1.35s}.fs-ajax-loader .fs-ajax-loader-bar-7{left:114px;animation-delay:1.5s;-o-animation-delay:1.5s;-ms-animation-delay:1.5s;-webkit-animation-delay:1.5s;-moz-animation-delay:1.5s}.fs-ajax-loader .fs-ajax-loader-bar-8{left:133px;animation-delay:1.65s;-o-animation-delay:1.65s;-ms-animation-delay:1.65s;-webkit-animation-delay:1.65s;-moz-animation-delay:1.65s}@-moz-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-ms-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-o-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-webkit-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}.fs-modal-auto-install #request-filesystem-credentials-form h2,.fs-modal-auto-install #request-filesystem-credentials-form .request-filesystem-credentials-action-buttons{display:none}.fs-modal-auto-install #request-filesystem-credentials-form input[type=password],.fs-modal-auto-install #request-filesystem-credentials-form input[type=email],.fs-modal-auto-install #request-filesystem-credentials-form input[type=text]{-webkit-appearance:none;padding:10px 10px 5px 10px;width:300px;max-width:100%}.fs-modal-auto-install #request-filesystem-credentials-form>div,.fs-modal-auto-install #request-filesystem-credentials-form label,.fs-modal-auto-install #request-filesystem-credentials-form fieldset{width:300px;max-width:100%;margin:0 auto;display:block}.button-primary.warn{box-shadow:0 1px 0 #d2593c;text-shadow:0 -1px 1px #d2593c,1px 0 1px #d2593c,0 1px 1px #d2593c,-1px 0 1px #d2593c;background:#f56a48;border-color:#ec6544 #d2593c #d2593c}.button-primary.warn:hover{background:#fd6d4a;border-color:#d2593c}.button-primary.warn:focus{box-shadow:0 1px 0 #dd6041,0 0 2px 1px #e4a796}.button-primary.warn:active{background:#dd6041;border-color:#d2593c;box-shadow:inset 0 2px 0 #d2593c}.button-primary.warn.disabled{color:#f5b3a1 !important;background:#e76444 !important;border-color:#d85e40 !important;text-shadow:0 -1px 0 rgba(0,0,0,0.1) !important}
16
  .chosen-select {
17
  width: 100%; }
4914
  -moz-transition: 150ms all ease-in-out;
4915
  -webkit-transition: 150ms all ease-in-out; }
4916
 
4917
+ span.span-middle {
4918
+ display: inline-block;
4919
+ vertical-align: middle; }
4920
+
4921
  .buttonizer-toggle {
4922
  display: block;
4923
  width: 100%;
5001
  transition: 150ms all ease-in;
5002
  -moz-transition: 150ms all ease-in;
5003
  -webkit-transition: 150ms all ease-in; }
5004
+ .buttonizer-boolean.inline-toggle {
5005
+ display: inline-block;
5006
+ margin-right: 15px;
5007
+ vertical-align: middle; }
5008
  .buttonizer-boolean .buttonizer-boolean-circle {
5009
  position: absolute;
5010
  width: 22px;
5163
  display: block;
5164
  color: rgba(0, 0, 0, 0.8);
5165
  padding: 8px 10px !important; }
5166
+ .buttonizer-input-action.buttonizer-input-textarea {
5167
+ display: block;
5168
+ width: 100%;
5169
+ height: 52px;
5170
+ border: 1px solid #c2c7cc94; }
5171
 
5172
  #wpadminbar, #adminmenumain {
5173
  display: none; }
5812
  width: 100%; }
5813
  .buttonizer-bar .container .button-group-styling .buttonizer-setting-row .first {
5814
  padding-right: 10px; }
5815
+ .buttonizer-bar .container .button-group-styling .buttonizer-setting-row.disabled {
5816
+ pointer-events: none;
5817
+ opacity: 0.4; }
5818
  .buttonizer-bar .container .button-group-styling .buttonizer-setting-row.form-has-extra-fields .is-textfield, .buttonizer-bar .container .button-group-styling .buttonizer-setting-row.form-has-extra-fields .buttonizer-input-only {
5819
  margin-top: 7px; }
5820
  .buttonizer-bar .container .button-group-styling .buttonizer-setting-row.is-boolean-only .buttonizer-setting-row-c1 {
6787
  .fs-modal.has-video .fs-modal-dialog .fs-modal-body {
6788
  width: 400px;
6789
  display: block;
6790
+ float: left; }
6791
+ .fs-modal.has-video .fs-modal-dialog .fs-modal-body.fs-modal-body-text {
6792
+ border-right: #eeeeee solid 1px; }
6793
  .fs-modal.has-video .fs-modal-dialog .fs-modal-video {
6794
  display: block;
6795
  width: 571px;
6819
  .buttonizer-premium-gray-out:hover .buttonizer-premium {
6820
  opacity: 1; }
6821
 
6822
+ .buttonizer-premium-ghost {
6823
+ opacity: 0.5; }
6824
+
6825
  .buttonizer-premium {
6826
  background: #2d7688;
6827
  background: -moz-linear-gradient(-45deg, #2d7688 0%, #187287 50%, #187287 50%, #f0841a 51%, #e8832c 98%);
6967
  .info-link.has-margin-everywhere, .info-link.has-margin-bottom {
6968
  margin-bottom: 20px; }
6969
 
6970
+ .has-extra-fields input, .has-extra-fields textarea {
6971
+ margin-bottom: 5px; }
6972
+
6973
  @media screen and (max-width: 782px) {
6974
  html.wp-toolbar {
6975
  padding: 0 !important; }
assets/dashboard.js CHANGED
@@ -9268,7 +9268,7 @@ class Modal_Index
9268
  let container = document.createElement('div');
9269
 
9270
  let body = document.createElement("div");
9271
- body.className = "fs-modal-body";
9272
 
9273
  // Panel
9274
  let panel = document.createElement("div");
@@ -10638,7 +10638,7 @@ function canReceiveFocus(element) {
10638
  * Returns a new `div` element
10639
  */
10640
 
10641
- function div() {
10642
  return document.createElement('div');
10643
  }
10644
  /**
@@ -10742,7 +10742,7 @@ function removeInertia(tooltip) {
10742
  */
10743
 
10744
  function createArrowElement(arrowType) {
10745
- var arrow = div();
10746
 
10747
  if (arrowType === 'round') {
10748
  arrow.className = 'tippy-roundarrow';
@@ -10758,7 +10758,7 @@ function createArrowElement(arrowType) {
10758
  */
10759
 
10760
  function createBackdropElement() {
10761
- var backdrop = div();
10762
  backdrop.className = 'tippy-backdrop';
10763
  backdrop.setAttribute('data-state', 'hidden');
10764
  return backdrop;
@@ -10818,7 +10818,7 @@ function updateTheme(tooltip, action, theme) {
10818
  */
10819
 
10820
  function createPopperElement(id, props) {
10821
- var popper = div();
10822
  popper.className = 'tippy-popper';
10823
  popper.id = "tippy-".concat(id);
10824
  popper.style.zIndex = '' + props.zIndex;
@@ -10827,14 +10827,14 @@ function createPopperElement(id, props) {
10827
  popper.setAttribute('role', props.role);
10828
  }
10829
 
10830
- var tooltip = div();
10831
  tooltip.className = 'tippy-tooltip';
10832
  tooltip.style.maxWidth = props.maxWidth + (typeof props.maxWidth === 'number' ? 'px' : '');
10833
  tooltip.setAttribute('data-size', props.size);
10834
  tooltip.setAttribute('data-animation', props.animation);
10835
  tooltip.setAttribute('data-state', 'hidden');
10836
  updateTheme(tooltip, 'add', props.theme);
10837
- var content = div();
10838
  content.className = 'tippy-content';
10839
  content.setAttribute('data-state', 'hidden');
10840
 
@@ -12373,6 +12373,7 @@ class ButtonHolder_ButtonHolder
12373
  button.innerHTML = "<i class='fa fa-pencil-alt'></i>";
12374
 
12375
  title.addEventListener("change", () => this.updateTitle());
 
12376
 
12377
  title.addEventListener("keyup", (e) => {
12378
  if(e.keyCode === 13) {
@@ -12885,11 +12886,11 @@ class PhoneNumber
12885
  this.buttonAction = ButtonAction;
12886
  }
12887
 
12888
- build()
12889
  {
12890
  // Add input
12891
  let input = this.buttonAction.inputText();
12892
- input.placeholder = "(000) 123 456 78";
12893
  input.addEventListener("keyup", () => this.change(input.value));
12894
 
12895
  if(this.buttonAction.value !== "")
@@ -12948,11 +12949,12 @@ class Mail
12948
  this.buttonAction = ButtonAction;
12949
  }
12950
 
12951
- build()
12952
  {
12953
  // Add input
12954
  let input = this.buttonAction.inputText();
12955
- input.placeholder = "account@domain.tld";
 
12956
  input.addEventListener("keyup", () => this.change(input.value));
12957
 
12958
  if(this.buttonAction.value !== "")
@@ -13024,23 +13026,55 @@ class SocialSharing
13024
  let select = document.createElement("select");
13025
  select.className = "buttonizer-select-action";
13026
 
13027
- // Share on Facebook
13028
- select.appendChild(this.add('facebook', window.Buttonizer.translate('settings.button_action.actions.share_page_on').format('Facebook')));
13029
 
13030
- // Twitter
13031
- select.appendChild(this.add('twitter', window.Buttonizer.translate('settings.button_action.actions.share_page_on').format('Twitter')));
13032
 
13033
- // Whatsapp
13034
- select.appendChild(this.add('whatsapp', window.Buttonizer.translate('settings.button_action.actions.share_page_on').format('Whatsapp')));
13035
 
13036
- // LinkedIn
13037
- select.appendChild(this.add('linkedin', window.Buttonizer.translate('settings.button_action.actions.share_page_on').format('LinkedIn')));
13038
 
13039
- // Pinterest //James
13040
- select.appendChild(this.add('pinterest', window.Buttonizer.translate('settings.button_action.actions.share_page_on').format('Pinterest')));
13041
 
13042
- // Mail Address
13043
- select.appendChild(this.add('mail', window.Buttonizer.translate('settings.button_action.actions.share_page_via').format('email')));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13044
 
13045
  // Change
13046
  select.addEventListener("change", () => {
@@ -13071,6 +13105,18 @@ class SocialSharing
13071
 
13072
  return option;
13073
  }
 
 
 
 
 
 
 
 
 
 
 
 
13074
  }
13075
  // CONCATENATED MODULE: ./src/js/admin/ui/Button/ButtonOptions/Action.js
13076
 
@@ -13084,6 +13130,7 @@ class SocialSharing
13084
 
13085
 
13086
 
 
13087
  class Action_Action
13088
  {
13089
  /**
@@ -13101,6 +13148,13 @@ class Action_Action
13101
 
13102
  this.value = typeof this.buttonSettingsObject.buttonObject.data.action !== typeof undefined ? this.buttonSettingsObject.buttonObject.data.action : '';
13103
 
 
 
 
 
 
 
 
13104
  }
13105
 
13106
  /**
@@ -13126,7 +13180,7 @@ class Action_Action
13126
  {value: "whatsapp", text: "WhatsApp chat"},
13127
  {value: "backtotop", text: window.Buttonizer.translate('settings.button_action.actions.back_to_top')},
13128
  {value: "gobackpage", text: window.Buttonizer.translate('settings.button_action.actions.go_back_one_page')},
13129
- {value: "socialsharing", text: "Social Sharing"},
13130
  {value: "javascript_pro", text: "Javascript function"},
13131
  ]
13132
  )
@@ -13141,7 +13195,6 @@ class Action_Action
13141
  {value: "messenger", text: "Facebook Messenger Link"},
13142
  {value: "twitter_dm", text: "Twitter DM"},
13143
  {value: "skype", text: "Skype"},
13144
- {value: "snapchat", text: "Snapchat"},
13145
  {value: "line", text: "LINE"},
13146
  {value: "telegram", text: "Telegram"},
13147
  {value: "wechat", text: "WeChat"},
@@ -13157,6 +13210,7 @@ class Action_Action
13157
  {value: "facebook", text: "Facebook"},
13158
  {value: "twitter", text: "Twitter"},
13159
  {value: "instagram", text: "Instagram"},
 
13160
  {value: "linkedin", text: "LinkedIn"},
13161
  {value: "vk", text: "VKontakte"},
13162
  {value: "poptin", text: "Poptin"},
@@ -13257,7 +13311,10 @@ class Action_Action
13257
  },
13258
  onCancel: () => {
13259
  this.buttonSettingsObject.buttonObject.data.type = 'javascript_pro';
13260
- jQuery(this.dropdown).val('javascript_pro');
 
 
 
13261
  }
13262
  });
13263
  return;
@@ -13266,9 +13323,77 @@ class Action_Action
13266
  this.buttonSettingsObject.buttonObject.data.action = "facebook";
13267
  }
13268
  else if(this.buttonSettingsObject.buttonObject.data.type === "socialsharing")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13269
  {
13270
  this.value = "";
13271
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13272
 
13273
  this.buttonSettingsObject.buttonObject.data.type = value;
13274
 
@@ -13289,6 +13414,8 @@ class Action_Action
13289
  this.value = value;
13290
  }
13291
 
 
 
13292
  /**
13293
  *
13294
  * @param value
@@ -13298,6 +13425,7 @@ class Action_Action
13298
  {
13299
  // Empty
13300
  this.element.innerHTML = '';
 
13301
 
13302
  let boolean = new FormToggle({
13303
  state: (typeof this.buttonSettingsObject.buttonObject.data.action_new_tab === undefined ? 'false' : this.buttonSettingsObject.buttonObject.data.action_new_tab)
@@ -13308,20 +13436,36 @@ class Action_Action
13308
  window.Buttonizer.buttonChanges = true;
13309
  });
13310
 
13311
- if(value === "phone" || value === 'sms' || value === 'viber')
13312
  {
13313
  this.element.appendChild((new PhoneNumber(this)).build());
13314
 
 
 
 
 
13315
  this.addKnowledgeBaseLink();
13316
  }
 
 
 
 
 
 
 
 
 
13317
  else if(value === "mail")
13318
  {
13319
- this.element.appendChild((new Mail(this)).build());
 
13320
  }
13321
  else if(value === "whatsapp_pro" || value === "whatsapp")
13322
  {
13323
  this.element.appendChild((new PhoneNumber(this)).build());
13324
 
 
 
13325
  let infoText = document.createElement("p");
13326
  infoText.innerHTML = window.Buttonizer.translate('settings.button_action.actions.whatsapp_info');
13327
 
@@ -13340,7 +13484,7 @@ class Action_Action
13340
  /* NEW Social Media actions */
13341
  else if(value === 'skype' || value === 'telegram' || value === 'twitter' || value === 'snapchat' || value === 'instagram' || value === 'vk')
13342
  {
13343
- this.element.appendChild((new input_Input(this)).build('Username'));
13344
 
13345
  this.addKnowledgeBaseLink();
13346
  }
@@ -13348,8 +13492,10 @@ class Action_Action
13348
  {
13349
  this.element.appendChild((new input_Input(this, true)).build('Account ID'));
13350
 
 
 
13351
  let info = document.createElement("p");
13352
- info.innerHTML = 'When you want to use Twitter DM you will need to find your Twitter User ID and allow direct messages from anyone. To find your account ID <a href="https://tweeterid.com/" target="_blank">click here</a>. And to read more about how to allow direct messages from anyone, <a href="https://help.twitter.com/nl/using-twitter/direct-messages#receive" target="_blank">click here</a>.';
13353
  this.element.appendChild(info);
13354
  }
13355
  else if(value === 'messenger') {
@@ -13378,7 +13524,7 @@ class Action_Action
13378
  this.addKnowledgeBaseLink();
13379
  }
13380
  else if(value === 'line') {
13381
- this.element.appendChild((new input_Input(this)).build('LINE_id'));
13382
  }
13383
  else if(value === 'wechat') {
13384
  this.element.appendChild((new input_Input(this)).build('User ID'));
@@ -13387,11 +13533,21 @@ class Action_Action
13387
  this.element.appendChild((new Url(this)).build('https://www.waze.com/ul?q=Netherlands'));
13388
  }
13389
  else if(value === 'popup_maker') {
13390
- this.element.appendChild((new input_Input(this)).build('URL trigger'));
 
 
 
 
 
13391
  this.addKnowledgeBaseLink(57, "Popup maker");
13392
  }
13393
  else if(value === 'elementor_popup') {
13394
- this.element.appendChild((new input_Input(this)).build('Trigger'));
 
 
 
 
 
13395
  this.addKnowledgeBaseLink(57, "Elementor popup");
13396
  }
13397
  else if(value === 'poptin') {
@@ -13528,7 +13684,16 @@ class Setting_Setting
13528
 
13529
  // Hide element
13530
  if(this.hidden) {
13531
- this.element.style.display = 'none';
 
 
 
 
 
 
 
 
 
13532
  }
13533
 
13534
  let title = document.createElement("div");
@@ -13571,6 +13736,11 @@ class Setting_Setting
13571
  show()
13572
  {
13573
  this.element.style.display = "";
 
 
 
 
 
13574
  }
13575
  }
13576
  // CONCATENATED MODULE: ./src/js/admin/components/Inputs/Input.js
@@ -13733,6 +13903,9 @@ class Toggle
13733
  // Is the switch visible?
13734
  this.visible = (typeof data.visible === typeof undefined ? true : data.visible);
13735
  this.callback = typeof data.callback !== typeof undefined ? data.callback : (v) => {return;};
 
 
 
13736
  }
13737
 
13738
  /**
@@ -13741,7 +13914,7 @@ class Toggle
13741
  build()
13742
  {
13743
  this.element.href = "javascript:void(0)";
13744
- this.element.className = "buttonizer-boolean " + (this.state === true || this.state === 'true' ? 'boolean-selected' : '');
13745
  this.element.addEventListener("click", () => this.toggle());
13746
 
13747
  // Switch circle
@@ -13793,6 +13966,16 @@ class Toggle
13793
  }
13794
  this.callback(state);
13795
  }
 
 
 
 
 
 
 
 
 
 
13796
  }
13797
  // CONCATENATED MODULE: ./src/js/admin/components/Settings/Label.js
13798
 
@@ -14781,7 +14964,7 @@ class LabelFontSizeBorderRadius_LabelFontSizeBorderRadius extends Setting_Settin
14781
  }),
14782
  new Input_Input({
14783
  title: 'px',
14784
- placeholder: 12,
14785
  width: 'space',
14786
  dataEntry: 'label_border_radius',
14787
  parentObject: parent,
@@ -15042,6 +15225,10 @@ class Dropdown
15042
  option.text = data.text;
15043
  option.value = data.value;
15044
  option.selected = typeof this.selected !== undefined && this.selected === data.value ;
 
 
 
 
15045
 
15046
  //appends option to drawer
15047
  this.element.appendChild(option)
@@ -15305,10 +15492,10 @@ class UseMainButtonStyle_UseMainButtonStyle extends Setting_Setting
15305
  update(value)
15306
  {
15307
  if(value === true || value === 'true'){
15308
- this.parent.getUI('background-color-container').forEach(item => { item.hide() });
15309
- this.parent.getUI('label-color-container').forEach(item => { item.hide() });
15310
- this.parent.getUI('border-radius-container').forEach(item => { item.hide() });
15311
- this.parent.getUI('background-image-container').forEach(item => { item.hide() });
15312
  }else{
15313
  this.parent.getUI('background-color-container').forEach(item => { item.show() });
15314
  this.parent.getUI('label-color-container').forEach(item => { item.show() });
@@ -15555,23 +15742,97 @@ class MenuAnimation_MenuAnimation extends Setting_Setting
15555
  parentObject: parent,
15556
  dataEntry: 'menu_animation',
15557
  default: 'none',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15558
  list: [{
15559
- value: 'none',
15560
- text: window.Buttonizer.translate('settings.menu_animation.animations.none')
15561
  },
15562
  {
15563
- value: 'hello',
15564
- text: window.Buttonizer.translate('settings.menu_animation.animations.hello')
 
15565
  },
15566
  {
15567
- value: 'bounce',
15568
- text: window.Buttonizer.translate('settings.menu_animation.animations.bounce')
15569
- }]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15570
  })
15571
  ]
15572
  });
15573
  }
15574
- }
 
 
15575
  // CONCATENATED MODULE: ./src/js/admin/ui/Button/ButtonSettings.js
15576
 
15577
 
@@ -15598,6 +15859,7 @@ class MenuAnimation_MenuAnimation extends Setting_Setting
15598
 
15599
 
15600
 
 
15601
  class ButtonSettings_ButtonSettings
15602
  {
15603
  constructor(buttonObject)
@@ -15714,6 +15976,10 @@ class ButtonSettings_ButtonSettings
15714
  this.groupSetting.appendChild(this.formElements.menuAnimation.build());
15715
  this.formElements.menuAnimation.element.style.display = 'none';
15716
 
 
 
 
 
15717
  container.appendChild(this.groupSetting);
15718
 
15719
  // Button action
@@ -15746,19 +16012,19 @@ class ButtonSettings_ButtonSettings
15746
  // Button color
15747
  this.formElements.buttonColor = new BackgroundColor_BackgroundColor(this.buttonObject);
15748
  container.appendChild(this.formElements.buttonColor.build());
15749
-
15750
- // Label color
15751
- this.formElements.labelColor = new LabelColor_LabelColor(this.buttonObject);
15752
- container.appendChild(this.formElements.labelColor.build());
15753
-
15754
  // Border radius
15755
  this.formElements.borderRadius = new BorderRadius_BorderRadius(this.buttonObject);
15756
  container.appendChild(this.formElements.borderRadius.build());
15757
-
15758
- // Border radius
15759
  this.formElements.backgroundImage = new BackgroundImage_BackgroundImage(this.buttonObject);
15760
  container.appendChild(this.formElements.backgroundImage.build());
15761
 
 
 
 
 
15762
  return container;
15763
  }
15764
 
@@ -16076,6 +16342,8 @@ class GroupHolder_GroupHolder
16076
  show_desktop: 'true'
16077
  });
16078
  this.groupObject.getButtons()[0].set('icon_size', '16');
 
 
16079
  jQuery(this.groupObject.groupBody).sortable('option', 'cancel', null);
16080
  }, 'convert-button'));
16081
  buttonMenu.appendChild(this.createQuickMenuButton('fas fa-wrench', window.Buttonizer.translate('common.settings'), () => this.toggleStyling(), ''));
@@ -16355,6 +16623,13 @@ class GroupHolder_GroupHolder
16355
  this.groupObject.getButtons()[0].getUI('use_main_button_style-container')[0].element.style.display = 'none';
16356
  this.groupObject.getUI('position-container')[1].element.style.display = '';
16357
  this.groupObject.getUI('animation-container')[1].element.style.display = '';
 
 
 
 
 
 
 
16358
 
16359
  this.groupObject.set('single_button_mode', 'true');
16360
 
@@ -16363,6 +16638,7 @@ class GroupHolder_GroupHolder
16363
 
16364
  this.groupObject.getUI('position-container')[1].element.style.display = 'none';
16365
  this.groupObject.getUI('animation-container')[1].element.style.display = 'none';
 
16366
  this.groupObject.getButtons()[0].set('use_main_button_style', 'true');
16367
  this.groupObject.getButtons()[0].getUI('use_main_button_style-container')[0].element.style.display = '';
16368
  this.titleElement.value = this.groupObject.data.name;
@@ -16400,57 +16676,6 @@ class StartOpened_StartOpened extends Setting_Setting
16400
  });
16401
  }
16402
  }
16403
- // CONCATENATED MODULE: ./src/js/admin/components/Settings/MenuStyle.js
16404
-
16405
-
16406
-
16407
-
16408
- class MenuStyle_MenuStyle extends Setting_Setting
16409
- {
16410
- /**
16411
- *
16412
- * @param {Group or Button object} parent
16413
- */
16414
- constructor(parent){
16415
- super({
16416
- title: window.Buttonizer.translate('settings.menu_style.title'),
16417
- description: window.Buttonizer.translate('settings.menu_style.description'),
16418
- content: [
16419
- new Dropdown({
16420
- parentObject: parent,
16421
- dataEntry: 'menu_style',
16422
- default: 'default',
16423
- list: [{
16424
- value: 'default',
16425
- text: window.Buttonizer.translate('settings.menu_style.styles.default'),
16426
- },
16427
- {
16428
- value: 'faded',
16429
- text: window.Buttonizer.translate('settings.menu_style.styles.faded'),
16430
- },
16431
- {
16432
- value: 'corner-circle',
16433
- text: window.Buttonizer.translate('settings.menu_style.styles.cornercircle'),
16434
- },
16435
- {
16436
- value: 'building-up',
16437
- text: window.Buttonizer.translate('settings.menu_style.styles.buildingup'),
16438
- },
16439
- {
16440
- value: 'pop',
16441
- text: window.Buttonizer.translate('settings.menu_style.styles.pop'),
16442
- },
16443
- {
16444
- value: 'square',
16445
- text: window.Buttonizer.translate('settings.menu_style.styles.square'),
16446
- }]
16447
- })
16448
- ]
16449
- });
16450
- }
16451
- }
16452
-
16453
-
16454
  // CONCATENATED MODULE: ./src/js/admin/ui/ButtonGroup/GroupSettings.js
16455
  // New settings
16456
 
@@ -16740,6 +16965,200 @@ class GroupSettings_GroupSettings
16740
  }
16741
 
16742
  /* harmony default export */ var ButtonGroup_GroupSettings = (GroupSettings_GroupSettings);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16743
  // CONCATENATED MODULE: ./src/js/admin/ui/ButtonGroup/GroupWindow.js
16744
 
16745
 
@@ -16751,6 +17170,7 @@ class GroupSettings_GroupSettings
16751
 
16752
 
16753
 
 
16754
  class GroupWindow_GroupWindow extends SettingsWindow
16755
  {
16756
  constructor(group) {
@@ -16784,6 +17204,7 @@ class GroupWindow_GroupWindow extends SettingsWindow
16784
 
16785
  delay.appendChild(new ShowAfterTimeout_ShowAfterTimeout(this).build());
16786
  delay.appendChild(new ShowOnScroll_ShowOnScroll(this).build());
 
16787
 
16788
  // Add
16789
  super.addItem(window.Buttonizer.translate('settings.button_group_window.timeout_scroll'), delay);
@@ -16853,6 +17274,11 @@ class ButtonGroup_Index {
16853
  new ui_Button(this, buttons[button]);
16854
  }
16855
 
 
 
 
 
 
16856
  this.appendAddButton();
16857
  window.Buttonizer.buttonGroups.push(this);
16858
  }
@@ -16948,11 +17374,6 @@ class ButtonGroup_Index {
16948
  registerButton(object)
16949
  {
16950
  this.buttons.push(object);
16951
-
16952
- if(this.getButtonsAlive() === 1 !== this.singleButtonMode){
16953
- this.singleButtonMode = this.getButtonsAlive() === 1;
16954
- this.groupHolder.setSingleButtonMode();
16955
- }
16956
  }
16957
 
16958
  removeGroup()
@@ -17645,7 +18066,7 @@ class Bar_Bar
17645
  addGroup.href = "javascript:void(0)";
17646
  addGroup.className = "create-new-button is-create-group buttonizer-premium-gray-out";
17647
  addGroup.innerHTML = window.Buttonizer.translate('utils.add_group') + '+ <span class="buttonizer-premium">PRO</span>';
17648
- addGroup.addEventListener("click", () => window.Buttonizer.showPremiumPopup("You are able to add multiple groups on different positions.", 'Qxs1oGCVATU'));
17649
 
17650
  return addGroup;
17651
  }
@@ -17873,7 +18294,7 @@ class Saving_Saving
17873
  console.log("[BUG DEBUG SAVING AND RELOADING] button changes!");
17874
 
17875
  jQuery.ajax({
17876
- url: buttonizer_admin.ajax + '?action=buttonizer_backend&request=SaveData&save=buttons',
17877
  dataType: 'json',
17878
  method: 'post',
17879
  data: {
@@ -17916,7 +18337,7 @@ class Saving_Saving
17916
  window.Buttonizer.topBar.publishButton.disable(window.Buttonizer.translate('common.publishing'));
17917
 
17918
  jQuery.ajax({
17919
- url: buttonizer_admin.ajax + '?action=buttonizer_backend&request=SaveData&save=publish',
17920
  dataType: 'json',
17921
  data: {
17922
  security: buttonizer_admin.security
@@ -17965,7 +18386,7 @@ class Saving_Saving
17965
  window.Buttonizer.buttonChanges = false;
17966
 
17967
  jQuery.ajax({
17968
- url: buttonizer_admin.ajax + '?action=buttonizer_backend&request=SaveData&save=revert',
17969
  dataType: 'json',
17970
  method: 'post',
17971
  data: {
@@ -18638,7 +19059,7 @@ class ResetButtonizer
18638
  reset()
18639
  {
18640
  jQuery.ajax({
18641
- url: buttonizer_admin.ajax + '?action=buttonizer_backend&request=SaveData&save=reset-buttonizer',
18642
  dataType: 'json',
18643
  method: 'post',
18644
  data: {
@@ -18822,7 +19243,7 @@ class Remigrate
18822
  remigrate()
18823
  {
18824
  jQuery.ajax({
18825
- url: buttonizer_admin.ajax + '?action=buttonizer_backend&request=SaveData&save=remigrate-buttonizer',
18826
  dataType: 'json',
18827
  method: 'post',
18828
  data: {
@@ -19360,6 +19781,21 @@ body, html {
19360
  this.opened = false;
19361
  }
19362
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19363
  }
19364
 
19365
  /**
@@ -20443,7 +20879,7 @@ class Buttonizer_Buttonizer {
20443
  */
20444
  loadSettings() {
20445
  jQuery.ajax({
20446
- url: buttonizer_admin.ajax + '?action=buttonizer_backend&request=ButtonizerInitializer',
20447
  dataType: 'json',
20448
  method: 'get',
20449
  success: (data) => {
@@ -20459,6 +20895,8 @@ class Buttonizer_Buttonizer {
20459
  error: (err, msg, data) => {
20460
  this.loader.hide();
20461
 
 
 
20462
  this.fatalErrorLoading("<b>" + msg.toUpperCase() + ":</b>" + "<br />" + data, "Buttonizer.loadSettings().error");
20463
  }
20464
  });
@@ -20759,7 +21197,7 @@ class Buttonizer_Buttonizer {
20759
  window.Buttonizer.loader.show(this.translate("loading.running_migration"));
20760
 
20761
  jQuery.ajax({
20762
- url: buttonizer_admin.ajax + '?action=buttonizer_backend&request=SaveData&save=migrate-buttonizer',
20763
  dataType: 'json',
20764
  method: 'post',
20765
  data: {
@@ -20837,7 +21275,7 @@ class Buttonizer_Buttonizer {
20837
  Object.assign(this.settings, newSetting);
20838
 
20839
  jQuery.ajax({
20840
- url: buttonizer_admin.ajax + '?action=buttonizer_backend&request=SaveData&save=settings',
20841
  dataType: 'json',
20842
  method: 'post',
20843
  data: {
9268
  let container = document.createElement('div');
9269
 
9270
  let body = document.createElement("div");
9271
+ body.className = "fs-modal-body fs-modal-body-text";
9272
 
9273
  // Panel
9274
  let panel = document.createElement("div");
10638
  * Returns a new `div` element
10639
  */
10640
 
10641
+ function index_all_div() {
10642
  return document.createElement('div');
10643
  }
10644
  /**
10742
  */
10743
 
10744
  function createArrowElement(arrowType) {
10745
+ var arrow = index_all_div();
10746
 
10747
  if (arrowType === 'round') {
10748
  arrow.className = 'tippy-roundarrow';
10758
  */
10759
 
10760
  function createBackdropElement() {
10761
+ var backdrop = index_all_div();
10762
  backdrop.className = 'tippy-backdrop';
10763
  backdrop.setAttribute('data-state', 'hidden');
10764
  return backdrop;
10818
  */
10819
 
10820
  function createPopperElement(id, props) {
10821
+ var popper = index_all_div();
10822
  popper.className = 'tippy-popper';
10823
  popper.id = "tippy-".concat(id);
10824
  popper.style.zIndex = '' + props.zIndex;
10827
  popper.setAttribute('role', props.role);
10828
  }
10829
 
10830
+ var tooltip = index_all_div();
10831
  tooltip.className = 'tippy-tooltip';
10832
  tooltip.style.maxWidth = props.maxWidth + (typeof props.maxWidth === 'number' ? 'px' : '');
10833
  tooltip.setAttribute('data-size', props.size);
10834
  tooltip.setAttribute('data-animation', props.animation);
10835
  tooltip.setAttribute('data-state', 'hidden');
10836
  updateTheme(tooltip, 'add', props.theme);
10837
+ var content = index_all_div();
10838
  content.className = 'tippy-content';
10839
  content.setAttribute('data-state', 'hidden');
10840
 
12373
  button.innerHTML = "<i class='fa fa-pencil-alt'></i>";
12374
 
12375
  title.addEventListener("change", () => this.updateTitle());
12376
+ title.addEventListener("blur", () => this.updateTitle());
12377
 
12378
  title.addEventListener("keyup", (e) => {
12379
  if(e.keyCode === 13) {
12886
  this.buttonAction = ButtonAction;
12887
  }
12888
 
12889
+ build(placeholder)
12890
  {
12891
  // Add input
12892
  let input = this.buttonAction.inputText();
12893
+ input.placeholder = placeholder === undefined ? "(000) 123 456 78" : placeholder;
12894
  input.addEventListener("keyup", () => this.change(input.value));
12895
 
12896
  if(this.buttonAction.value !== "")
12949
  this.buttonAction = ButtonAction;
12950
  }
12951
 
12952
+ build(placeholder)
12953
  {
12954
  // Add input
12955
  let input = this.buttonAction.inputText();
12956
+ input.placeholder = placeholder === undefined ? "account@domain.tld" : placeholder;
12957
+
12958
  input.addEventListener("keyup", () => this.change(input.value));
12959
 
12960
  if(this.buttonAction.value !== "")
13026
  let select = document.createElement("select");
13027
  select.className = "buttonizer-select-action";
13028
 
13029
+ // // Share on Facebook
13030
+ // select.appendChild(this.add('facebook', window.Buttonizer.translate('settings.button_action.actions.share_page_on').format('Facebook')));
13031
 
13032
+ // // Twitter
13033
+ // select.appendChild(this.add('twitter', window.Buttonizer.translate('settings.button_action.actions.share_page_on').format('Twitter')));
13034
 
13035
+ // // Whatsapp
13036
+ // select.appendChild(this.add('whatsapp', window.Buttonizer.translate('settings.button_action.actions.share_page_on').format('Whatsapp')));
13037
 
13038
+ // // LinkedIn
13039
+ // select.appendChild(this.add('linkedin', window.Buttonizer.translate('settings.button_action.actions.share_page_on').format('LinkedIn')));
13040
 
13041
+ // // Pinterest //James
13042
+ // select.appendChild(this.add('pinterest', window.Buttonizer.translate('settings.button_action.actions.share_page_on').format('Pinterest')));
13043
 
13044
+ // // Mail Address
13045
+ // select.appendChild(this.add('mail', window.Buttonizer.translate('settings.button_action.actions.share_page_via').format('email')));
13046
+
13047
+ // Popular actions
13048
+ select.appendChild(
13049
+ this.selectGroup(window.Buttonizer.translate('settings.button_action.actions.group_popular'),
13050
+ [
13051
+ {value: "facebook", text: window.Buttonizer.translate('settings.button_action.actions.share_page_on').format('Facebook')},
13052
+ {value: "twitter", text: window.Buttonizer.translate('settings.button_action.actions.share_page_on').format('Twitter')},
13053
+ {value: "whatsapp", text: window.Buttonizer.translate('settings.button_action.actions.share_page_on').format('Whatsapp')},
13054
+ {value: "linkedin", text: window.Buttonizer.translate('settings.button_action.actions.share_page_on').format('LinkedIn')},
13055
+ {value: "pinterest", text: window.Buttonizer.translate('settings.button_action.actions.share_page_on').format('Pinterest')},
13056
+ {value: "mail", text: window.Buttonizer.translate('settings.button_action.actions.share_page_via').format('email')},
13057
+ ]
13058
+ )
13059
+ );
13060
+
13061
+ // New actions
13062
+ select.appendChild(
13063
+ this.selectGroup('New actions',
13064
+ [
13065
+ {value: "sms", text: 'Share on SMS'},
13066
+ {value: "reddit", text: 'Share on Reddit'},
13067
+ {value: "tumblr", text: 'Share on Tumblr'},
13068
+ {value: "digg", text: 'Share on Digg'},
13069
+ {value: "weibo", text: 'Share on Weibo'},
13070
+ {value: "vk", text: 'Share on VK'},
13071
+ {value: "ok", text: 'Share on OK.ru (Odnoklassniki)'},
13072
+ {value: "xing", text: 'Share on Xing'},
13073
+ {value: "blogger", text: 'Share on Blogger'},
13074
+ {value: "flipboard", text: 'Share on Flipboard'},
13075
+ ]
13076
+ )
13077
+ );
13078
 
13079
  // Change
13080
  select.addEventListener("change", () => {
13105
 
13106
  return option;
13107
  }
13108
+
13109
+ selectGroup(label, option)
13110
+ {
13111
+ let optgroup = document.createElement('optgroup');
13112
+ optgroup.label = label;
13113
+
13114
+ for (let num of option) {
13115
+ optgroup.appendChild(this.add(num.value, num.text));
13116
+ }
13117
+
13118
+ return optgroup;
13119
+ }
13120
  }
13121
  // CONCATENATED MODULE: ./src/js/admin/ui/Button/ButtonOptions/Action.js
13122
 
13130
 
13131
 
13132
 
13133
+
13134
  class Action_Action
13135
  {
13136
  /**
13148
 
13149
  this.value = typeof this.buttonSettingsObject.buttonObject.data.action !== typeof undefined ? this.buttonSettingsObject.buttonObject.data.action : '';
13150
 
13151
+
13152
+ // Creates random string for this button
13153
+ this.unique = Array.apply(0, Array(15)).map(() => (charset => {
13154
+ return charset.charAt(Math.floor(Math.random() * charset.length))
13155
+ })('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789')).join('');
13156
+
13157
+
13158
  }
13159
 
13160
  /**
13180
  {value: "whatsapp", text: "WhatsApp chat"},
13181
  {value: "backtotop", text: window.Buttonizer.translate('settings.button_action.actions.back_to_top')},
13182
  {value: "gobackpage", text: window.Buttonizer.translate('settings.button_action.actions.go_back_one_page')},
13183
+ {value: "socialsharing", text: "Social sharing"},
13184
  {value: "javascript_pro", text: "Javascript function"},
13185
  ]
13186
  )
13195
  {value: "messenger", text: "Facebook Messenger Link"},
13196
  {value: "twitter_dm", text: "Twitter DM"},
13197
  {value: "skype", text: "Skype"},
 
13198
  {value: "line", text: "LINE"},
13199
  {value: "telegram", text: "Telegram"},
13200
  {value: "wechat", text: "WeChat"},
13210
  {value: "facebook", text: "Facebook"},
13211
  {value: "twitter", text: "Twitter"},
13212
  {value: "instagram", text: "Instagram"},
13213
+ {value: "snapchat", text: "Snapchat"},
13214
  {value: "linkedin", text: "LinkedIn"},
13215
  {value: "vk", text: "VKontakte"},
13216
  {value: "poptin", text: "Poptin"},
13311
  },
13312
  onCancel: () => {
13313
  this.buttonSettingsObject.buttonObject.data.type = 'javascript_pro';
13314
+ // jQuery(this.dropdown).val('javascript_pro');
13315
+ jQuery(this.dropdown).val(this.buttonSettingsObject.buttonObject.data.type);
13316
+ jQuery(this.dropdown).trigger("chosen:updated");
13317
+
13318
  }
13319
  });
13320
  return;
13323
  this.buttonSettingsObject.buttonObject.data.action = "facebook";
13324
  }
13325
  else if(this.buttonSettingsObject.buttonObject.data.type === "socialsharing")
13326
+ {
13327
+ switch(value) {
13328
+ case "elementor_popup":
13329
+ this.value = "elementor" + this.unique;
13330
+ this.updateButtonActionValue(this.value);
13331
+ break;
13332
+ case "popup_maker":
13333
+ this.value = "popupmaker" + this.unique;
13334
+ this.updateButtonActionValue(this.value);
13335
+ break;
13336
+ default:
13337
+ this.value = "";
13338
+ }
13339
+ }
13340
+ else if(value === "elementor_popup")
13341
+ {
13342
+ this.value = "elementor" + this.unique;
13343
+ this.updateButtonActionValue(this.value);
13344
+
13345
+ console.log(this.value);
13346
+ }
13347
+ else if(this.buttonSettingsObject.buttonObject.data.type === "elementor_popup" && value !== "popup_maker")
13348
  {
13349
  this.value = "";
13350
  }
13351
+ else if(value === "popup_maker")
13352
+ {
13353
+ this.value = "popupmaker" + this.unique;
13354
+ this.updateButtonActionValue(this.value);
13355
+
13356
+ console.log(this.value);
13357
+ }
13358
+ else if(this.buttonSettingsObject.buttonObject.data.type === "popup_maker" && value !== "elementor_popup")
13359
+ {
13360
+ this.value = "";
13361
+ }
13362
+ else if(value === "messenger_chat")
13363
+ {
13364
+ for (let groups of window.Buttonizer.buttonGroups) {
13365
+ for (let buttons of groups.buttons) {
13366
+ let buttonName = `<br>Button: <b>${buttons.data.name}</b>`;
13367
+
13368
+
13369
+
13370
+ if(buttons.data.type === 'messenger_chat') {
13371
+ new Modal({
13372
+ title: `This is getting out of hand. Now there are two of them!`,
13373
+ content: `<p>You currently have a button with a Facebook Messenger Chat Widget action.
13374
+ <br>
13375
+ As of now, the Facebook Messenger SDK can only support 1 Facebook Messenger Chat Widget.
13376
+ <br><br>
13377
+ Button with Facebook Messenger Widget:
13378
+ ${buttonName}
13379
+ <p>`,
13380
+ class: 'warning-red',
13381
+ buttons: [ {
13382
+ text: 'I understand',
13383
+ close: true,
13384
+ confirm: true
13385
+ }],
13386
+ onConfirm: () => {
13387
+ jQuery(this.dropdown).val(this.buttonSettingsObject.buttonObject.data.type);
13388
+ jQuery(this.dropdown).trigger("chosen:updated");
13389
+ }
13390
+ });
13391
+
13392
+ return;
13393
+ }
13394
+ }
13395
+ }
13396
+ }
13397
 
13398
  this.buttonSettingsObject.buttonObject.data.type = value;
13399
 
13414
  this.value = value;
13415
  }
13416
 
13417
+
13418
+
13419
  /**
13420
  *
13421
  * @param value
13425
  {
13426
  // Empty
13427
  this.element.innerHTML = '';
13428
+ this.element.className = '';
13429
 
13430
  let boolean = new FormToggle({
13431
  state: (typeof this.buttonSettingsObject.buttonObject.data.action_new_tab === undefined ? 'false' : this.buttonSettingsObject.buttonObject.data.action_new_tab)
13436
  window.Buttonizer.buttonChanges = true;
13437
  });
13438
 
13439
+ if(value === "phone" || value === 'sms')
13440
  {
13441
  this.element.appendChild((new PhoneNumber(this)).build());
13442
 
13443
+ if(value === 'sms') {
13444
+
13445
+ }
13446
+
13447
  this.addKnowledgeBaseLink();
13448
  }
13449
+ else if(value === 'viber')
13450
+ {
13451
+ this.element.appendChild((new PhoneNumber(this)).build('+00123456789'));
13452
+
13453
+ let infoText = document.createElement("p");
13454
+ infoText.innerHTML = window.Buttonizer.translate('settings.button_action.actions.viber');
13455
+
13456
+ this.element.appendChild(infoText);
13457
+ }
13458
  else if(value === "mail")
13459
  {
13460
+ this.element.appendChild((new Mail(this)).build(window.Buttonizer.translate('settings.button_action.placeholders.mail.recipient')));
13461
+
13462
  }
13463
  else if(value === "whatsapp_pro" || value === "whatsapp")
13464
  {
13465
  this.element.appendChild((new PhoneNumber(this)).build());
13466
 
13467
+
13468
+
13469
  let infoText = document.createElement("p");
13470
  infoText.innerHTML = window.Buttonizer.translate('settings.button_action.actions.whatsapp_info');
13471
 
13484
  /* NEW Social Media actions */
13485
  else if(value === 'skype' || value === 'telegram' || value === 'twitter' || value === 'snapchat' || value === 'instagram' || value === 'vk')
13486
  {
13487
+ this.element.appendChild((new input_Input(this)).build(window.Buttonizer.translate('settings.button_action.placeholders.username')));
13488
 
13489
  this.addKnowledgeBaseLink();
13490
  }
13492
  {
13493
  this.element.appendChild((new input_Input(this, true)).build('Account ID'));
13494
 
13495
+
13496
+
13497
  let info = document.createElement("p");
13498
+ info.innerHTML = window.Buttonizer.translate('settings.button_action.actions.twitter_info');
13499
  this.element.appendChild(info);
13500
  }
13501
  else if(value === 'messenger') {
13524
  this.addKnowledgeBaseLink();
13525
  }
13526
  else if(value === 'line') {
13527
+ this.element.appendChild((new input_Input(this)).build('LINE ID'));
13528
  }
13529
  else if(value === 'wechat') {
13530
  this.element.appendChild((new input_Input(this)).build('User ID'));
13533
  this.element.appendChild((new Url(this)).build('https://www.waze.com/ul?q=Netherlands'));
13534
  }
13535
  else if(value === 'popup_maker') {
13536
+ // this.element.appendChild((new Input(this)).build('URL trigger'));
13537
+
13538
+ let info = document.createElement("p");
13539
+ info.innerHTML = `In your <b>Popup Settings</b>, add a new <b>"Click to Open"</b> trigger and copy and paste this code in <b>"Extra CSS Selectors"</b> </br> <code style="font-size: 11px;">a[href="#${this.value}"]</code>`;
13540
+ this.element.appendChild(info);
13541
+
13542
  this.addKnowledgeBaseLink(57, "Popup maker");
13543
  }
13544
  else if(value === 'elementor_popup') {
13545
+ // this.element.appendChild((new Input(this)).build('Trigger'));
13546
+
13547
+ let info = document.createElement("p");
13548
+ info.innerHTML = `Copy and paste this into your Elementor Popup's <b>"Open By Selector"</b> option. </br> <code style="font-size: 11px;">a[href="#${this.value}"]</code>`;
13549
+ this.element.appendChild(info);
13550
+
13551
  this.addKnowledgeBaseLink(57, "Elementor popup");
13552
  }
13553
  else if(value === 'poptin') {
13684
 
13685
  // Hide element
13686
  if(this.hidden) {
13687
+ switch(this.rowName) {
13688
+ case "background-color":
13689
+ case "border-radius":
13690
+ case "background-image":
13691
+ case "label-color":
13692
+ this.element.classList += ' disabled'
13693
+ break;
13694
+ default:
13695
+ this.element.style.display = 'none';
13696
+ }
13697
  }
13698
 
13699
  let title = document.createElement("div");
13736
  show()
13737
  {
13738
  this.element.style.display = "";
13739
+ this.element.classList.remove('disabled')
13740
+ }
13741
+ disable()
13742
+ {
13743
+ this.element.classList += ' disabled'
13744
  }
13745
  }
13746
  // CONCATENATED MODULE: ./src/js/admin/components/Inputs/Input.js
13903
  // Is the switch visible?
13904
  this.visible = (typeof data.visible === typeof undefined ? true : data.visible);
13905
  this.callback = typeof data.callback !== typeof undefined ? data.callback : (v) => {return;};
13906
+
13907
+ // Custom class
13908
+ this.class = (typeof data.class === "undefined" ? '' : data.class);
13909
  }
13910
 
13911
  /**
13914
  build()
13915
  {
13916
  this.element.href = "javascript:void(0)";
13917
+ this.element.className = "buttonizer-boolean " + (this.state === true || this.state === 'true' ? 'boolean-selected' : '') + ' ' + this.class;
13918
  this.element.addEventListener("click", () => this.toggle());
13919
 
13920
  // Switch circle
13966
  }
13967
  this.callback(state);
13968
  }
13969
+
13970
+ // Enable input
13971
+ enable() {
13972
+ this.disabled = false;
13973
+ }
13974
+
13975
+ // Disable input
13976
+ disable() {
13977
+ this.disabled = true;
13978
+ }
13979
  }
13980
  // CONCATENATED MODULE: ./src/js/admin/components/Settings/Label.js
13981
 
14964
  }),
14965
  new Input_Input({
14966
  title: 'px',
14967
+ placeholder: 3,
14968
  width: 'space',
14969
  dataEntry: 'label_border_radius',
14970
  parentObject: parent,
15225
  option.text = data.text;
15226
  option.value = data.value;
15227
  option.selected = typeof this.selected !== undefined && this.selected === data.value ;
15228
+
15229
+ if(typeof data.disabled !== 'undefined' && data.disabled) {
15230
+ option.disabled = true;
15231
+ }
15232
 
15233
  //appends option to drawer
15234
  this.element.appendChild(option)
15492
  update(value)
15493
  {
15494
  if(value === true || value === 'true'){
15495
+ this.parent.getUI('background-color-container').forEach(item => { item.disable() });
15496
+ this.parent.getUI('label-color-container').forEach(item => { item.disable() });
15497
+ this.parent.getUI('border-radius-container').forEach(item => { item.disable() });
15498
+ this.parent.getUI('background-image-container').forEach(item => { item.disable() });
15499
  }else{
15500
  this.parent.getUI('background-color-container').forEach(item => { item.show() });
15501
  this.parent.getUI('label-color-container').forEach(item => { item.show() });
15742
  parentObject: parent,
15743
  dataEntry: 'menu_animation',
15744
  default: 'none',
15745
+ list: [
15746
+ {
15747
+ value: 'none',
15748
+ text: window.Buttonizer.translate('settings.menu_animation.animations.none')
15749
+ },
15750
+ {
15751
+ value: 'hello',
15752
+ text: window.Buttonizer.translate('settings.menu_animation.animations.hello')
15753
+ },
15754
+ {
15755
+ value: 'bounce',
15756
+ text: window.Buttonizer.translate('settings.menu_animation.animations.bounce')
15757
+ },
15758
+ {
15759
+ value: 'pulse',
15760
+ text: window.Buttonizer.translate('settings.menu_animation.animations.pulse') + (!window.Buttonizer.hasPremium() ? ' (PRO)' : ''),
15761
+ disabled: !window.Buttonizer.hasPremium()
15762
+ },
15763
+ {
15764
+ value: 'jelly',
15765
+ text: window.Buttonizer.translate('settings.menu_animation.animations.jelly') + (!window.Buttonizer.hasPremium() ? ' (PRO)' : ''),
15766
+ disabled: !window.Buttonizer.hasPremium()
15767
+ }
15768
+ ]
15769
+ })
15770
+ ]
15771
+ });
15772
+ }
15773
+ }
15774
+ // CONCATENATED MODULE: ./src/js/admin/components/Settings/MenuStyle.js
15775
+
15776
+
15777
+
15778
+
15779
+ class MenuStyle_MenuStyle extends Setting_Setting
15780
+ {
15781
+ /**
15782
+ *
15783
+ * @param {Group or Button object} parent
15784
+ */
15785
+ constructor(parent){
15786
+ super({
15787
+ title: window.Buttonizer.translate('settings.menu_style.title'),
15788
+ description: window.Buttonizer.translate('settings.menu_style.description'),
15789
+ parentObject: parent,
15790
+ rowName: 'style',
15791
+ content: [
15792
+ new Dropdown({
15793
+ parentObject: parent,
15794
+ dataEntry: 'menu_style',
15795
+ default: 'default',
15796
  list: [{
15797
+ value: 'default',
15798
+ text: window.Buttonizer.translate('settings.menu_style.styles.default'),
15799
  },
15800
  {
15801
+ value: 'faded',
15802
+ text: window.Buttonizer.translate('settings.menu_style.styles.faded'),
15803
+ hidden: true,
15804
  },
15805
  {
15806
+ value: 'corner-circle',
15807
+ text: window.Buttonizer.translate('settings.menu_style.styles.cornercircle'),
15808
+ hidden: true,
15809
+ },
15810
+ {
15811
+ value: 'building-up',
15812
+ text: window.Buttonizer.translate('settings.menu_style.styles.buildingup'),
15813
+ hidden: true,
15814
+ },
15815
+ {
15816
+ value: 'pop',
15817
+ text: window.Buttonizer.translate('settings.menu_style.styles.pop'),
15818
+ hidden: true,
15819
+ },
15820
+ {
15821
+ value: 'square',
15822
+ text: window.Buttonizer.translate('settings.menu_style.styles.square'),
15823
+ },
15824
+ {
15825
+ value: 'rectangle',
15826
+ text: window.Buttonizer.translate('settings.menu_style.styles.rectangle'),
15827
+ }
15828
+ ]
15829
  })
15830
  ]
15831
  });
15832
  }
15833
+ }
15834
+
15835
+
15836
  // CONCATENATED MODULE: ./src/js/admin/ui/Button/ButtonSettings.js
15837
 
15838
 
15859
 
15860
 
15861
 
15862
+
15863
  class ButtonSettings_ButtonSettings
15864
  {
15865
  constructor(buttonObject)
15976
  this.groupSetting.appendChild(this.formElements.menuAnimation.build());
15977
  this.formElements.menuAnimation.element.style.display = 'none';
15978
 
15979
+ this.formElements.menuStyle = new MenuStyle_MenuStyle(this.buttonObject.groupObject);
15980
+ this.groupSetting.appendChild(this.formElements.menuStyle.build());
15981
+ this.formElements.menuStyle.element.style.display = 'none';
15982
+
15983
  container.appendChild(this.groupSetting);
15984
 
15985
  // Button action
16012
  // Button color
16013
  this.formElements.buttonColor = new BackgroundColor_BackgroundColor(this.buttonObject);
16014
  container.appendChild(this.formElements.buttonColor.build());
16015
+
 
 
 
 
16016
  // Border radius
16017
  this.formElements.borderRadius = new BorderRadius_BorderRadius(this.buttonObject);
16018
  container.appendChild(this.formElements.borderRadius.build());
16019
+
16020
+ // Background Image
16021
  this.formElements.backgroundImage = new BackgroundImage_BackgroundImage(this.buttonObject);
16022
  container.appendChild(this.formElements.backgroundImage.build());
16023
 
16024
+ // Label color
16025
+ this.formElements.labelColor = new LabelColor_LabelColor(this.buttonObject);
16026
+ container.appendChild(this.formElements.labelColor.build());
16027
+
16028
  return container;
16029
  }
16030
 
16342
  show_desktop: 'true'
16343
  });
16344
  this.groupObject.getButtons()[0].set('icon_size', '16');
16345
+ this.groupObject.singleButtonMode = false;
16346
+ this.setSingleButtonMode();
16347
  jQuery(this.groupObject.groupBody).sortable('option', 'cancel', null);
16348
  }, 'convert-button'));
16349
  buttonMenu.appendChild(this.createQuickMenuButton('fas fa-wrench', window.Buttonizer.translate('common.settings'), () => this.toggleStyling(), ''));
16623
  this.groupObject.getButtons()[0].getUI('use_main_button_style-container')[0].element.style.display = 'none';
16624
  this.groupObject.getUI('position-container')[1].element.style.display = '';
16625
  this.groupObject.getUI('animation-container')[1].element.style.display = '';
16626
+ this.groupObject.getUI('style-container')[1].element.style.display = '';
16627
+ for(let i = 0; i < this.groupObject.getUI('style-container')[1].content[0].element.length; i++) {
16628
+ if(this.groupObject.getUI('style-container')[1].content[0].list[i].hidden === true) {
16629
+ this.groupObject.getUI('style-container')[1].content[0].element[i].style.display = 'none';
16630
+ }
16631
+ }
16632
+
16633
 
16634
  this.groupObject.set('single_button_mode', 'true');
16635
 
16638
 
16639
  this.groupObject.getUI('position-container')[1].element.style.display = 'none';
16640
  this.groupObject.getUI('animation-container')[1].element.style.display = 'none';
16641
+ this.groupObject.getUI('style-container')[1].element.style.display = 'none';
16642
  this.groupObject.getButtons()[0].set('use_main_button_style', 'true');
16643
  this.groupObject.getButtons()[0].getUI('use_main_button_style-container')[0].element.style.display = '';
16644
  this.titleElement.value = this.groupObject.data.name;
16676
  });
16677
  }
16678
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16679
  // CONCATENATED MODULE: ./src/js/admin/ui/ButtonGroup/GroupSettings.js
16680
  // New settings
16681
 
16965
  }
16966
 
16967
  /* harmony default export */ var ButtonGroup_GroupSettings = (GroupSettings_GroupSettings);
16968
+ // CONCATENATED MODULE: ./src/js/admin/components/Settings/Window/ExitIntent.js
16969
+
16970
+
16971
+
16972
+
16973
+ class ExitIntent_ExitIntent {
16974
+ constructor(windowObject) {
16975
+ this.windowObject = windowObject;
16976
+
16977
+ this.checkbox = document.createElement("input");
16978
+
16979
+ this.mainBox;
16980
+
16981
+ }
16982
+
16983
+ build() {
16984
+ let build = this.createTable();
16985
+
16986
+ if (!window.Buttonizer.hasPremium()) {
16987
+ build.addEventListener('click', () => {
16988
+ window.Buttonizer.showPremiumPopup(window.Buttonizer.translate('settings.exit_intent.pro_description'));
16989
+ });
16990
+ }
16991
+
16992
+ return build;
16993
+ }
16994
+
16995
+ /**
16996
+ * Create table
16997
+ * @returns {*}
16998
+ */
16999
+ createTable() {
17000
+ let div = document.createElement("div");
17001
+ div.appendChild(this.buildTriggers());
17002
+ div.appendChild(this.createTriggerDropdown());
17003
+ div.appendChild(this.createTriggerAnimation());
17004
+
17005
+ this.mainBox = div;
17006
+
17007
+
17008
+
17009
+ let timeout = new Table('table-relative');
17010
+ timeout.addColumnHTML("<h2>"+ window.Buttonizer.translate('settings.exit_intent.title') +"</h2>" + (!window.Buttonizer.hasPremium() ? '<span class="buttonizer-premium premium-right">PRO</span>' : ''));
17011
+ timeout.addColumn(this.createCheckbox(), (!window.Buttonizer.hasPremium() ? 'buttonizer-premium-ghost' : ''), "10");
17012
+ timeout.newRow();
17013
+ timeout.addColumnHTML('', "", "");
17014
+ timeout.addColumn(this.mainBox, (!window.Buttonizer.hasPremium() ? 'buttonizer-premium-ghost' : ''), "358");
17015
+ timeout.newRow();
17016
+ timeout.addColumnHTML('', "", "");
17017
+ timeout.addColumnHTML(window.Buttonizer.translate('settings.exit_intent.info'), (!window.Buttonizer.hasPremium() ? 'buttonizer-premium-ghost' : ''), "358");
17018
+
17019
+ return timeout.build();
17020
+ }
17021
+
17022
+ // Build trigger
17023
+ buildTriggers() {
17024
+ let div = document.createElement("div");
17025
+ div.innerHTML = '<b>'+ window.Buttonizer.translate('settings.exit_intent.when_to_trigger') +'</b><br /><br />';
17026
+
17027
+ div.appendChild(this.triggerLeavingWindow());
17028
+ div.appendChild(this.triggerInactive());
17029
+
17030
+ return div;
17031
+ }
17032
+
17033
+ // Trigger by leaving window
17034
+ triggerLeavingWindow() {
17035
+ let triggerDiv = document.createElement("div");
17036
+
17037
+ if (!window.Buttonizer.hasPremium()) {
17038
+ triggerDiv.innerHTML = window.Buttonizer.translate('settings.exit_intent.trigger_window');
17039
+ triggerDiv.prepend(new Toggle({
17040
+ parentObject: this.windowObject.objectOwner,
17041
+ default: 'true',
17042
+ disabled: true,
17043
+ class: 'inline-toggle',
17044
+ callback: () => {}
17045
+ }).build())
17046
+
17047
+ return triggerDiv;
17048
+ }
17049
+
17050
+
17051
+ }
17052
+
17053
+ // Trigger by leaving window
17054
+ triggerInactive() {
17055
+ let triggerDiv = document.createElement("div");
17056
+ triggerDiv.style.marginTop = '10px';
17057
+ triggerDiv.style.marginBottom = '15px';
17058
+
17059
+ if (!window.Buttonizer.hasPremium()) {
17060
+ triggerDiv.innerHTML = window.Buttonizer.translate('settings.exit_intent.trigger_inactive');
17061
+ triggerDiv.prepend(new Toggle({
17062
+ parentObject: this.windowObject.objectOwner,
17063
+ default: 'false',
17064
+ disabled: true,
17065
+ class: 'inline-toggle',
17066
+ callback: () => {}
17067
+ }).build());
17068
+
17069
+ return triggerDiv;
17070
+ }
17071
+
17072
+
17073
+ }
17074
+
17075
+ // Trigger on time
17076
+ createTriggerDropdown() {
17077
+ let div = document.createElement("div");
17078
+ div.style.marginBottom = '15px';
17079
+ div.innerHTML = '<b>'+ window.Buttonizer.translate('settings.exit_intent.how_often._title') +'</b><br />';
17080
+
17081
+ if (!window.Buttonizer.hasPremium()) {
17082
+ div.appendChild(new Dropdown({
17083
+ parentObject: this.windowObject.objectOwner,
17084
+ class: 'window-select',
17085
+ disabled: true,
17086
+ width: '100%',
17087
+ callback: () => {},
17088
+ list: [
17089
+ {
17090
+ value: 'first',
17091
+ text: window.Buttonizer.translate('settings.exit_intent.how_often.once_page'),
17092
+ }]
17093
+ }).build())
17094
+
17095
+ return div;
17096
+ }
17097
+
17098
+
17099
+ }
17100
+
17101
+ // Trigger animation
17102
+ createTriggerAnimation() {
17103
+ let div = document.createElement("div");
17104
+ div.style.marginBottom = '15px';
17105
+ div.innerHTML = '<b>'+ window.Buttonizer.translate('settings.exit_intent.animation._title') +'</b><br />';
17106
+
17107
+ if (!window.Buttonizer.hasPremium()) {
17108
+ div.appendChild(new Dropdown({
17109
+ parentObject: this.windowObject.objectOwner,
17110
+ default: 'first',
17111
+ class: 'window-select',
17112
+ disabled: true,
17113
+ width: '100%',
17114
+ callback: () => {},
17115
+ list: [
17116
+ {
17117
+ value: 'first',
17118
+ text: window.Buttonizer.translate('settings.exit_intent.animation.focused'),
17119
+ }]
17120
+ }).build())
17121
+
17122
+ return div;
17123
+ }
17124
+
17125
+
17126
+ }
17127
+
17128
+ // Create enable/disable
17129
+ createCheckbox() {
17130
+ let triggerDiv = document.createElement("div");
17131
+
17132
+ if (!window.Buttonizer.hasPremium()) {
17133
+ this.checkbox = new Toggle({
17134
+ parentObject: this.windowObject.objectOwner,
17135
+ default: 'false',
17136
+ disabled: true,
17137
+ class: 'inline-toggle',
17138
+ callback: (value) => {}
17139
+ });
17140
+ }else {
17141
+
17142
+ }
17143
+
17144
+ triggerDiv.appendChild(this.checkbox.build());
17145
+
17146
+ let info = document.createElement('span');
17147
+ info.className = 'span-middle';
17148
+ info.innerHTML = window.Buttonizer.translate('settings.exit_intent.enable');
17149
+ info.addEventListener("click", () => this.checkbox.toggle());
17150
+ triggerDiv.appendChild(info);
17151
+
17152
+ return triggerDiv;
17153
+ }
17154
+
17155
+ /**
17156
+ * On enable/disable
17157
+ *
17158
+ * @param value
17159
+ */
17160
+
17161
+ }
17162
  // CONCATENATED MODULE: ./src/js/admin/ui/ButtonGroup/GroupWindow.js
17163
 
17164
 
17170
 
17171
 
17172
 
17173
+
17174
  class GroupWindow_GroupWindow extends SettingsWindow
17175
  {
17176
  constructor(group) {
17204
 
17205
  delay.appendChild(new ShowAfterTimeout_ShowAfterTimeout(this).build());
17206
  delay.appendChild(new ShowOnScroll_ShowOnScroll(this).build());
17207
+ delay.appendChild(new ExitIntent_ExitIntent(this).build());
17208
 
17209
  // Add
17210
  super.addItem(window.Buttonizer.translate('settings.button_group_window.timeout_scroll'), delay);
17274
  new ui_Button(this, buttons[button]);
17275
  }
17276
 
17277
+ if(this.getButtonsAlive() === 1 !== this.singleButtonMode){
17278
+ this.singleButtonMode = this.getButtonsAlive() === 1;
17279
+ this.groupHolder.setSingleButtonMode();
17280
+ }
17281
+
17282
  this.appendAddButton();
17283
  window.Buttonizer.buttonGroups.push(this);
17284
  }
17374
  registerButton(object)
17375
  {
17376
  this.buttons.push(object);
 
 
 
 
 
17377
  }
17378
 
17379
  removeGroup()
18066
  addGroup.href = "javascript:void(0)";
18067
  addGroup.className = "create-new-button is-create-group buttonizer-premium-gray-out";
18068
  addGroup.innerHTML = window.Buttonizer.translate('utils.add_group') + '+ <span class="buttonizer-premium">PRO</span>';
18069
+ addGroup.addEventListener("click", () => window.Buttonizer.showPremiumPopup(window.Buttonizer.translate('premium.multiple_button_groups'), 'Qxs1oGCVATU'));
18070
 
18071
  return addGroup;
18072
  }
18294
  console.log("[BUG DEBUG SAVING AND RELOADING] button changes!");
18295
 
18296
  jQuery.ajax({
18297
+ url: buttonizer_admin.ajax + '?action=buttonizer_backend&item=SaveData&save=buttons',
18298
  dataType: 'json',
18299
  method: 'post',
18300
  data: {
18337
  window.Buttonizer.topBar.publishButton.disable(window.Buttonizer.translate('common.publishing'));
18338
 
18339
  jQuery.ajax({
18340
+ url: buttonizer_admin.ajax + '?action=buttonizer_backend&item=SaveData&save=publish',
18341
  dataType: 'json',
18342
  data: {
18343
  security: buttonizer_admin.security
18386
  window.Buttonizer.buttonChanges = false;
18387
 
18388
  jQuery.ajax({
18389
+ url: buttonizer_admin.ajax + '?action=buttonizer_backend&item=SaveData&save=revert',
18390
  dataType: 'json',
18391
  method: 'post',
18392
  data: {
19059
  reset()
19060
  {
19061
  jQuery.ajax({
19062
+ url: buttonizer_admin.ajax + '?action=buttonizer_backend&item=SaveData&save=reset-buttonizer',
19063
  dataType: 'json',
19064
  method: 'post',
19065
  data: {
19243
  remigrate()
19244
  {
19245
  jQuery.ajax({
19246
+ url: buttonizer_admin.ajax + '?action=buttonizer_backend&item=SaveData&save=remigrate-buttonizer',
19247
  dataType: 'json',
19248
  method: 'post',
19249
  data: {
19781
  this.opened = false;
19782
  }
19783
  });
19784
+
19785
+ setTimeout(() => {
19786
+ document.querySelector("#buttonizer-iframe").contentDocument.addEventListener("click", (e) => {
19787
+ if(!this.opened) {
19788
+ return;
19789
+ }
19790
+
19791
+ if(e.target.className !== "icon-selector-searchbar")
19792
+ {
19793
+ this.element.style.display = 'none';
19794
+ this.element.className = 'buttonizer-icon-selector';
19795
+ this.opened = false;
19796
+ }
19797
+ })
19798
+ }, 500);
19799
  }
19800
 
19801
  /**
20879
  */
20880
  loadSettings() {
20881
  jQuery.ajax({
20882
+ url: buttonizer_admin.ajax + '?action=buttonizer_backend&item=ButtonizerInitializer',
20883
  dataType: 'json',
20884
  method: 'get',
20885
  success: (data) => {
20895
  error: (err, msg, data) => {
20896
  this.loader.hide();
20897
 
20898
+ console.log(err);
20899
+
20900
  this.fatalErrorLoading("<b>" + msg.toUpperCase() + ":</b>" + "<br />" + data, "Buttonizer.loadSettings().error");
20901
  }
20902
  });
21197
  window.Buttonizer.loader.show(this.translate("loading.running_migration"));
21198
 
21199
  jQuery.ajax({
21200
+ url: buttonizer_admin.ajax + '?action=buttonizer_backend&item=SaveData&save=migrate-buttonizer',
21201
  dataType: 'json',
21202
  method: 'post',
21203
  data: {
21275
  Object.assign(this.settings, newSetting);
21276
 
21277
  jQuery.ajax({
21278
+ url: buttonizer_admin.ajax + '?action=buttonizer_backend&item=SaveData&save=settings',
21279
  dataType: 'json',
21280
  method: 'post',
21281
  data: {
assets/dashboard.min.js CHANGED
@@ -18,7 +18,7 @@
18
  * Copyright 2017-2018 Andreas Borgen
19
  * Released under the MIT license.
20
  */
21
- t.exports=function(){"use strict";var t=window;return function(e){var i=Element.prototype;i.matches||(i.matches=i.msMatchesSelector||i.webkitMatchesSelector),i.closest||(i.closest=function(t){var e=this;do{if(e.matches(t))return e;e="svg"===e.tagName?e.parentNode:e.parentElement}while(e);return null});var n=(e=e||{}).container||document.documentElement,o=e.selector,s=e.callback||console.log,r=e.callbackDragStart,a=e.callbackDragEnd,l=e.callbackClick,u=e.propagateEvents,c=!1!==e.roundCoords,d=!1!==e.dragOutside,p=e.handleOffset||!1!==e.handleOffset,h=null;switch(p){case"center":h=!0;break;case"topleft":case"top-left":h=!1}var m=void 0;function b(t,e,i,o){var s=t.clientX,r=t.clientY;function a(t,e,i){return Math.max(e,Math.min(t,i))}if(e){var l=e.getBoundingClientRect();if(s-=l.left,r-=l.top,i&&(s-=i[0],r-=i[1]),o&&(s=a(s,0,l.width),r=a(r,0,l.height)),e!==n){var u=null!==h?h:"circle"===e.nodeName||"ellipse"===e.nodeName;u&&(s-=l.width/2,r-=l.height/2)}}return c?[Math.round(s),Math.round(r)]:[s,r]}function f(t){t.preventDefault(),u||t.stopPropagation()}function w(t){var e=void 0;if(e=o?o instanceof Element?o.contains(t.target)?o:null:t.target.closest(o):{}){f(t);var i=o&&p?b(t,e):[0,0],s=b(t,n,i);m={target:e,mouseOffset:i,startPos:s,actuallyDragged:!1},r&&r(e,s)}}function g(t){if(m){f(t);var e=m.startPos,i=b(t,n,m.mouseOffset,!d);m.actuallyDragged=m.actuallyDragged||e[0]!==i[0]||e[1]!==i[1],s(m.target,i,e)}}function y(t,e){if(m){if(a||l){var i=!m.actuallyDragged,o=i?m.startPos:b(t,n,m.mouseOffset,!d);l&&i&&!e&&l(m.target,o),a&&a(m.target,o,m.startPos,e||i&&l)}m=null}}function v(t,e){y(E(t),e)}function _(t,e,i){t.addEventListener(e,i)}function k(t){return void 0!==t.buttons?1===t.buttons:1===t.which}function x(t,e){1===t.touches.length?e(E(t)):y(t,!0)}function E(t){var e=t.targetTouches[0];return e||(e=t.changedTouches[0]),e.preventDefault=t.preventDefault.bind(t),e.stopPropagation=t.stopPropagation.bind(t),e}_(n,"mousedown",function(t){k(t)?w(t):y(t,!0)}),_(n,"touchstart",function(t){return x(t,w)}),_(t,"mousemove",function(t){m&&(k(t)?g(t):y(t))}),_(t,"touchmove",function(t){return x(t,g)}),_(n,"mouseup",function(t){m&&!k(t)&&y(t)}),_(n,"touchend",function(t){return v(t)}),_(n,"touchcancel",function(t){return v(t,!0)})}}()},function(t,e){var i,n,o=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function a(t){if(i===setTimeout)return setTimeout(t,0);if((i===s||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:s}catch(t){i=s}try{n="function"==typeof clearTimeout?clearTimeout:r}catch(t){n=r}}();var l,u=[],c=!1,d=-1;function p(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&h())}function h(){if(!c){var t=a(p);c=!0;for(var e=u.length;e;){for(l=u,u=[];++d<e;)l&&l[d].run();d=-1,e=u.length}l=null,c=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===r||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function m(t,e){this.fun=t,this.array=e}function b(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];u.push(new m(t,e)),1!==u.length||c||a(h)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=b,o.addListener=b,o.once=b,o.off=b,o.removeListener=b,o.removeAllListeners=b,o.emit=b,o.prependListener=b,o.prependOnceListener=b,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,i){"use strict";(function(t){for(
22
  /**!
23
  * @fileOverview Kickass library to create and place poppers near their reference elements.
24
  * @version 1.15.0
@@ -43,7 +43,7 @@ t.exports=function(){"use strict";var t=window;return function(e){var i=Element.
43
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
44
  * SOFTWARE.
45
  */
46
- var i="undefined"!=typeof window&&"undefined"!=typeof document,n=["Edge","Trident","Firefox"],o=0,s=0;s<n.length;s+=1)if(i&&navigator.userAgent.indexOf(n[s])>=0){o=1;break}var r=i&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then(function(){e=!1,t()}))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout(function(){e=!1,t()},o))}};function a(t){return t&&"[object Function]"==={}.toString.call(t)}function l(t,e){if(1!==t.nodeType)return[];var i=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?i[e]:i}function u(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function c(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=l(t),i=e.overflow,n=e.overflowX,o=e.overflowY;return/(auto|scroll|overlay)/.test(i+o+n)?t:c(u(t))}var d=i&&!(!window.MSInputMethodContext||!document.documentMode),p=i&&/MSIE 10/.test(navigator.userAgent);function h(t){return 11===t?d:10===t?p:d||p}function m(t){if(!t)return document.documentElement;for(var e=h(10)?document.body:null,i=t.offsetParent||null;i===e&&t.nextElementSibling;)i=(t=t.nextElementSibling).offsetParent;var n=i&&i.nodeName;return n&&"BODY"!==n&&"HTML"!==n?-1!==["TH","TD","TABLE"].indexOf(i.nodeName)&&"static"===l(i,"position")?m(i):i:t?t.ownerDocument.documentElement:document.documentElement}function b(t){return null!==t.parentNode?b(t.parentNode):t}function f(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var i=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,n=i?t:e,o=i?e:t,s=document.createRange();s.setStart(n,0),s.setEnd(o,0);var r,a,l=s.commonAncestorContainer;if(t!==l&&e!==l||n.contains(o))return"BODY"===(a=(r=l).nodeName)||"HTML"!==a&&m(r.firstElementChild)!==r?m(l):l;var u=b(t);return u.host?f(u.host,e):f(t,b(e).host)}function w(t){var e="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",i=t.nodeName;if("BODY"===i||"HTML"===i){var n=t.ownerDocument.documentElement;return(t.ownerDocument.scrollingElement||n)[e]}return t[e]}function g(t,e){var i="x"===e?"Left":"Top",n="Left"===i?"Right":"Bottom";return parseFloat(t["border"+i+"Width"],10)+parseFloat(t["border"+n+"Width"],10)}function y(t,e,i,n){return Math.max(e["offset"+t],e["scroll"+t],i["client"+t],i["offset"+t],i["scroll"+t],h(10)?parseInt(i["offset"+t])+parseInt(n["margin"+("Height"===t?"Top":"Left")])+parseInt(n["margin"+("Height"===t?"Bottom":"Right")]):0)}function v(t){var e=t.body,i=t.documentElement,n=h(10)&&getComputedStyle(i);return{height:y("Height",e,i,n),width:y("Width",e,i,n)}}var _=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},k=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),x=function(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t},E=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t};function B(t){return E({},t,{right:t.left+t.width,bottom:t.top+t.height})}function z(t){var e={};try{if(h(10)){e=t.getBoundingClientRect();var i=w(t,"top"),n=w(t,"left");e.top+=i,e.left+=n,e.bottom+=i,e.right+=n}else e=t.getBoundingClientRect()}catch(t){}var o={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},s="HTML"===t.nodeName?v(t.ownerDocument):{},r=s.width||t.clientWidth||o.right-o.left,a=s.height||t.clientHeight||o.bottom-o.top,u=t.offsetWidth-r,c=t.offsetHeight-a;if(u||c){var d=l(t);u-=g(d,"x"),c-=g(d,"y"),o.width-=u,o.height-=c}return B(o)}function C(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=h(10),o="HTML"===e.nodeName,s=z(t),r=z(e),a=c(t),u=l(e),d=parseFloat(u.borderTopWidth,10),p=parseFloat(u.borderLeftWidth,10);i&&o&&(r.top=Math.max(r.top,0),r.left=Math.max(r.left,0));var m=B({top:s.top-r.top-d,left:s.left-r.left-p,width:s.width,height:s.height});if(m.marginTop=0,m.marginLeft=0,!n&&o){var b=parseFloat(u.marginTop,10),f=parseFloat(u.marginLeft,10);m.top-=d-b,m.bottom-=d-b,m.left-=p-f,m.right-=p-f,m.marginTop=b,m.marginLeft=f}return(n&&!i?e.contains(a):e===a&&"BODY"!==a.nodeName)&&(m=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=w(e,"top"),o=w(e,"left"),s=i?-1:1;return t.top+=n*s,t.bottom+=n*s,t.left+=o*s,t.right+=o*s,t}(m,e)),m}function j(t){if(!t||!t.parentElement||h())return document.documentElement;for(var e=t.parentElement;e&&"none"===l(e,"transform");)e=e.parentElement;return e||document.documentElement}function S(t,e,i,n){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s={top:0,left:0},r=o?j(t):f(t,e);if("viewport"===n)s=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=t.ownerDocument.documentElement,n=C(t,i),o=Math.max(i.clientWidth,window.innerWidth||0),s=Math.max(i.clientHeight,window.innerHeight||0),r=e?0:w(i),a=e?0:w(i,"left");return B({top:r-n.top+n.marginTop,left:a-n.left+n.marginLeft,width:o,height:s})}(r,o);else{var a=void 0;"scrollParent"===n?"BODY"===(a=c(u(e))).nodeName&&(a=t.ownerDocument.documentElement):a="window"===n?t.ownerDocument.documentElement:n;var d=C(a,r,o);if("HTML"!==a.nodeName||function t(e){var i=e.nodeName;if("BODY"===i||"HTML"===i)return!1;if("fixed"===l(e,"position"))return!0;var n=u(e);return!!n&&t(n)}(r))s=d;else{var p=v(t.ownerDocument),h=p.height,m=p.width;s.top+=d.top-d.marginTop,s.bottom=h+d.top,s.left+=d.left-d.marginLeft,s.right=m+d.left}}var b="number"==typeof(i=i||0);return s.left+=b?i:i.left||0,s.top+=b?i:i.top||0,s.right-=b?i:i.right||0,s.bottom-=b?i:i.bottom||0,s}function L(t,e,i,n,o){var s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var r=S(i,n,s,o),a={top:{width:r.width,height:e.top-r.top},right:{width:r.right-e.right,height:r.height},bottom:{width:r.width,height:r.bottom-e.bottom},left:{width:e.left-r.left,height:r.height}},l=Object.keys(a).map(function(t){return E({key:t},a[t],{area:(e=a[t],e.width*e.height)});var e}).sort(function(t,e){return e.area-t.area}),u=l.filter(function(t){var e=t.width,n=t.height;return e>=i.clientWidth&&n>=i.clientHeight}),c=u.length>0?u[0].key:l[0].key,d=t.split("-")[1];return c+(d?"-"+d:"")}function O(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return C(i,n?j(e):f(e,i),n)}function T(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),i=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),n=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+n,height:t.offsetHeight+i}}function N(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,function(t){return e[t]})}function A(t,e,i){i=i.split("-")[0];var n=T(t),o={width:n.width,height:n.height},s=-1!==["right","left"].indexOf(i),r=s?"top":"left",a=s?"left":"top",l=s?"height":"width",u=s?"width":"height";return o[r]=e[r]+e[l]/2-n[l]/2,o[a]=i===a?e[a]-n[u]:e[N(a)],o}function I(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function M(t,e,i){return(void 0===i?t:t.slice(0,function(t,e,i){if(Array.prototype.findIndex)return t.findIndex(function(t){return t[e]===i});var n=I(t,function(t){return t[e]===i});return t.indexOf(n)}(t,"name",i))).forEach(function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var i=t.function||t.fn;t.enabled&&a(i)&&(e.offsets.popper=B(e.offsets.popper),e.offsets.reference=B(e.offsets.reference),e=i(e,t))}),e}function q(t,e){return t.some(function(t){var i=t.name;return t.enabled&&i===e})}function H(t){for(var e=[!1,"ms","Webkit","Moz","O"],i=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<e.length;n++){var o=e[n],s=o?""+o+i:t;if(void 0!==document.body.style[s])return s}return null}function P(t){var e=t.ownerDocument;return e?e.defaultView:window}function D(t,e,i,n){i.updateBound=n,P(t).addEventListener("resize",i.updateBound,{passive:!0});var o=c(t);return function t(e,i,n,o){var s="BODY"===e.nodeName,r=s?e.ownerDocument.defaultView:e;r.addEventListener(i,n,{passive:!0}),s||t(c(r.parentNode),i,n,o),o.push(r)}(o,"scroll",i.updateBound,i.scrollParents),i.scrollElement=o,i.eventsEnabled=!0,i}function F(){var t,e;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(t=this.reference,e=this.state,P(t).removeEventListener("resize",e.updateBound),e.scrollParents.forEach(function(t){t.removeEventListener("scroll",e.updateBound)}),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e))}function R(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function W(t,e){Object.keys(e).forEach(function(i){var n="";-1!==["width","height","top","right","bottom","left"].indexOf(i)&&R(e[i])&&(n="px"),t.style[i]=e[i]+n})}var U=i&&/Firefox/i.test(navigator.userAgent);function G(t,e,i){var n=I(t,function(t){return t.name===e}),o=!!n&&t.some(function(t){return t.name===i&&t.enabled&&t.order<n.order});if(!o){var s="`"+e+"`",r="`"+i+"`";console.warn(r+" modifier is required by "+s+" modifier in order to work, be sure to include it before "+s+"!")}return o}var Q=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],$=Q.slice(3);function Y(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=$.indexOf(t),n=$.slice(i+1).concat($.slice(0,i));return e?n.reverse():n}var V={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function X(t,e,i,n){var o=[0,0],s=-1!==["right","left"].indexOf(n),r=t.split(/(\+|\-)/).map(function(t){return t.trim()}),a=r.indexOf(I(r,function(t){return-1!==t.search(/,|\s/)}));r[a]&&-1===r[a].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,u=-1!==a?[r.slice(0,a).concat([r[a].split(l)[0]]),[r[a].split(l)[1]].concat(r.slice(a+1))]:[r];return(u=u.map(function(t,n){var o=(1===n?!s:s)?"height":"width",r=!1;return t.reduce(function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,r=!0,t):r?(t[t.length-1]+=e,r=!1,t):t.concat(e)},[]).map(function(t){return function(t,e,i,n){var o=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),s=+o[1],r=o[2];if(!s)return t;if(0===r.indexOf("%")){var a=void 0;switch(r){case"%p":a=i;break;case"%":case"%r":default:a=n}return B(a)[e]/100*s}if("vh"===r||"vw"===r)return("vh"===r?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*s;return s}(t,o,e,i)})})).forEach(function(t,e){t.forEach(function(i,n){R(i)&&(o[e]+=i*("-"===t[n-1]?-1:1))})}),o}var K={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,i=e.split("-")[0],n=e.split("-")[1];if(n){var o=t.offsets,s=o.reference,r=o.popper,a=-1!==["bottom","top"].indexOf(i),l=a?"left":"top",u=a?"width":"height",c={start:x({},l,s[l]),end:x({},l,s[l]+s[u]-r[u])};t.offsets.popper=E({},r,c[n])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var i=e.offset,n=t.placement,o=t.offsets,s=o.popper,r=o.reference,a=n.split("-")[0],l=void 0;return l=R(+i)?[+i,0]:X(i,s,r,a),"left"===a?(s.top+=l[0],s.left-=l[1]):"right"===a?(s.top+=l[0],s.left+=l[1]):"top"===a?(s.left+=l[0],s.top-=l[1]):"bottom"===a&&(s.left+=l[0],s.top+=l[1]),t.popper=s,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var i=e.boundariesElement||m(t.instance.popper);t.instance.reference===i&&(i=m(i));var n=H("transform"),o=t.instance.popper.style,s=o.top,r=o.left,a=o[n];o.top="",o.left="",o[n]="";var l=S(t.instance.popper,t.instance.reference,e.padding,i,t.positionFixed);o.top=s,o.left=r,o[n]=a,e.boundaries=l;var u=e.priority,c=t.offsets.popper,d={primary:function(t){var i=c[t];return c[t]<l[t]&&!e.escapeWithReference&&(i=Math.max(c[t],l[t])),x({},t,i)},secondary:function(t){var i="right"===t?"left":"top",n=c[i];return c[t]>l[t]&&!e.escapeWithReference&&(n=Math.min(c[i],l[t]-("right"===t?c.width:c.height))),x({},i,n)}};return u.forEach(function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";c=E({},c,d[e](t))}),t.offsets.popper=c,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,i=e.popper,n=e.reference,o=t.placement.split("-")[0],s=Math.floor,r=-1!==["top","bottom"].indexOf(o),a=r?"right":"bottom",l=r?"left":"top",u=r?"width":"height";return i[a]<s(n[l])&&(t.offsets.popper[l]=s(n[l])-i[u]),i[l]>s(n[a])&&(t.offsets.popper[l]=s(n[a])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var i;if(!G(t.instance.modifiers,"arrow","keepTogether"))return t;var n=e.element;if("string"==typeof n){if(!(n=t.instance.popper.querySelector(n)))return t}else if(!t.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var o=t.placement.split("-")[0],s=t.offsets,r=s.popper,a=s.reference,u=-1!==["left","right"].indexOf(o),c=u?"height":"width",d=u?"Top":"Left",p=d.toLowerCase(),h=u?"left":"top",m=u?"bottom":"right",b=T(n)[c];a[m]-b<r[p]&&(t.offsets.popper[p]-=r[p]-(a[m]-b)),a[p]+b>r[m]&&(t.offsets.popper[p]+=a[p]+b-r[m]),t.offsets.popper=B(t.offsets.popper);var f=a[p]+a[c]/2-b/2,w=l(t.instance.popper),g=parseFloat(w["margin"+d],10),y=parseFloat(w["border"+d+"Width"],10),v=f-t.offsets.popper[p]-g-y;return v=Math.max(Math.min(r[c]-b,v),0),t.arrowElement=n,t.offsets.arrow=(x(i={},p,Math.round(v)),x(i,h,""),i),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(q(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var i=S(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),n=t.placement.split("-")[0],o=N(n),s=t.placement.split("-")[1]||"",r=[];switch(e.behavior){case V.FLIP:r=[n,o];break;case V.CLOCKWISE:r=Y(n);break;case V.COUNTERCLOCKWISE:r=Y(n,!0);break;default:r=e.behavior}return r.forEach(function(a,l){if(n!==a||r.length===l+1)return t;n=t.placement.split("-")[0],o=N(n);var u=t.offsets.popper,c=t.offsets.reference,d=Math.floor,p="left"===n&&d(u.right)>d(c.left)||"right"===n&&d(u.left)<d(c.right)||"top"===n&&d(u.bottom)>d(c.top)||"bottom"===n&&d(u.top)<d(c.bottom),h=d(u.left)<d(i.left),m=d(u.right)>d(i.right),b=d(u.top)<d(i.top),f=d(u.bottom)>d(i.bottom),w="left"===n&&h||"right"===n&&m||"top"===n&&b||"bottom"===n&&f,g=-1!==["top","bottom"].indexOf(n),y=!!e.flipVariations&&(g&&"start"===s&&h||g&&"end"===s&&m||!g&&"start"===s&&b||!g&&"end"===s&&f),v=!!e.flipVariationsByContent&&(g&&"start"===s&&m||g&&"end"===s&&h||!g&&"start"===s&&f||!g&&"end"===s&&b),_=y||v;(p||w||_)&&(t.flipped=!0,(p||w)&&(n=r[l+1]),_&&(s=function(t){return"end"===t?"start":"start"===t?"end":t}(s)),t.placement=n+(s?"-"+s:""),t.offsets.popper=E({},t.offsets.popper,A(t.instance.popper,t.offsets.reference,t.placement)),t=M(t.instance.modifiers,t,"flip"))}),t},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,i=e.split("-")[0],n=t.offsets,o=n.popper,s=n.reference,r=-1!==["left","right"].indexOf(i),a=-1===["top","left"].indexOf(i);return o[r?"left":"top"]=s[i]-(a?o[r?"width":"height"]:0),t.placement=N(e),t.offsets.popper=B(o),t}},hide:{order:800,enabled:!0,fn:function(t){if(!G(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,i=I(t.instance.modifiers,function(t){return"preventOverflow"===t.name}).boundaries;if(e.bottom<i.top||e.left>i.right||e.top>i.bottom||e.right<i.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}},computeStyle:{order:850,enabled:!0,fn:function(t,e){var i=e.x,n=e.y,o=t.offsets.popper,s=I(t.instance.modifiers,function(t){return"applyStyle"===t.name}).gpuAcceleration;void 0!==s&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var r=void 0!==s?s:e.gpuAcceleration,a=m(t.instance.popper),l=z(a),u={position:o.position},c=function(t,e){var i=t.offsets,n=i.popper,o=i.reference,s=Math.round,r=Math.floor,a=function(t){return t},l=s(o.width),u=s(n.width),c=-1!==["left","right"].indexOf(t.placement),d=-1!==t.placement.indexOf("-"),p=e?c||d||l%2==u%2?s:r:a,h=e?s:a;return{left:p(l%2==1&&u%2==1&&!d&&e?n.left-1:n.left),top:h(n.top),bottom:h(n.bottom),right:p(n.right)}}(t,window.devicePixelRatio<2||!U),d="bottom"===i?"top":"bottom",p="right"===n?"left":"right",h=H("transform"),b=void 0,f=void 0;if(f="bottom"===d?"HTML"===a.nodeName?-a.clientHeight+c.bottom:-l.height+c.bottom:c.top,b="right"===p?"HTML"===a.nodeName?-a.clientWidth+c.right:-l.width+c.right:c.left,r&&h)u[h]="translate3d("+b+"px, "+f+"px, 0)",u[d]=0,u[p]=0,u.willChange="transform";else{var w="bottom"===d?-1:1,g="right"===p?-1:1;u[d]=f*w,u[p]=b*g,u.willChange=d+", "+p}var y={"x-placement":t.placement};return t.attributes=E({},y,t.attributes),t.styles=E({},u,t.styles),t.arrowStyles=E({},t.offsets.arrow,t.arrowStyles),t},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(t){var e,i;return W(t.instance.popper,t.styles),e=t.instance.popper,i=t.attributes,Object.keys(i).forEach(function(t){!1!==i[t]?e.setAttribute(t,i[t]):e.removeAttribute(t)}),t.arrowElement&&Object.keys(t.arrowStyles).length&&W(t.arrowElement,t.arrowStyles),t},onLoad:function(t,e,i,n,o){var s=O(o,e,t,i.positionFixed),r=L(i.placement,s,e,t,i.modifiers.flip.boundariesElement,i.modifiers.flip.padding);return e.setAttribute("x-placement",r),W(e,{position:i.positionFixed?"fixed":"absolute"}),i},gpuAcceleration:void 0}}},J=function(){function t(e,i){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};_(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=r(this.update.bind(this)),this.options=E({},t.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=i&&i.jquery?i[0]:i,this.options.modifiers={},Object.keys(E({},t.Defaults.modifiers,o.modifiers)).forEach(function(e){n.options.modifiers[e]=E({},t.Defaults.modifiers[e]||{},o.modifiers?o.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(t){return E({name:t},n.options.modifiers[t])}).sort(function(t,e){return t.order-e.order}),this.modifiers.forEach(function(t){t.enabled&&a(t.onLoad)&&t.onLoad(n.reference,n.popper,n.options,t,n.state)}),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return k(t,[{key:"update",value:function(){return function(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=O(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=L(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=A(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=M(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}.call(this)}},{key:"destroy",value:function(){return function(){return this.state.isDestroyed=!0,q(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[H("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}.call(this)}},{key:"enableEventListeners",value:function(){return function(){this.state.eventsEnabled||(this.state=D(this.reference,this.options,this.state,this.scheduleUpdate))}.call(this)}},{key:"disableEventListeners",value:function(){return F.call(this)}}]),t}();J.Utils=("undefined"!=typeof window?window:t).PopperUtils,J.placements=Q,J.Defaults=K,e.a=J}).call(this,i(1))},function(t,e,i){
47
  /*!
48
  * @sphinxxxx/color-conversion v2.2.1
49
  * https://github.com/Sphinxxxx/color-conversion
@@ -58,7 +58,7 @@ t.exports=function(){"use strict";var t=function(t,e){if(!(t instanceof e))throw
58
  * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
59
  * @license MIT
60
  */
61
- function n(t,e){if(t===e)return 0;for(var i=t.length,n=e.length,o=0,s=Math.min(i,n);o<s;++o)if(t[o]!==e[o]){i=t[o],n=e[o];break}return i<n?-1:n<i?1:0}function o(t){return e.Buffer&&"function"==typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var s=i(8),r=Object.prototype.hasOwnProperty,a=Array.prototype.slice,l="foo"===function(){}.name;function u(t){return Object.prototype.toString.call(t)}function c(t){return!o(t)&&("function"==typeof e.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var d=t.exports=w,p=/\s*function\s+([^\(\s]*)\s*/;function h(t){if(s.isFunction(t)){if(l)return t.name;var e=t.toString().match(p);return e&&e[1]}}function m(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function b(t){if(l||!s.isFunction(t))return s.inspect(t);var e=h(t);return"[Function"+(e?": "+e:"")+"]"}function f(t,e,i,n,o){throw new d.AssertionError({message:i,actual:t,expected:e,operator:n,stackStartFunction:o})}function w(t,e){t||f(t,!0,e,"==",d.ok)}function g(t,e,i,r){if(t===e)return!0;if(o(t)&&o(e))return 0===n(t,e);if(s.isDate(t)&&s.isDate(e))return t.getTime()===e.getTime();if(s.isRegExp(t)&&s.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(c(t)&&c(e)&&u(t)===u(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===n(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(o(t)!==o(e))return!1;var l=(r=r||{actual:[],expected:[]}).actual.indexOf(t);return-1!==l&&l===r.expected.indexOf(e)||(r.actual.push(t),r.expected.push(e),function(t,e,i,n){if(null==t||null==e)return!1;if(s.isPrimitive(t)||s.isPrimitive(e))return t===e;if(i&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var o=y(t),r=y(e);if(o&&!r||!o&&r)return!1;if(o)return t=a.call(t),e=a.call(e),g(t,e,i);var l,u,c=k(t),d=k(e);if(c.length!==d.length)return!1;for(c.sort(),d.sort(),u=c.length-1;u>=0;u--)if(c[u]!==d[u])return!1;for(u=c.length-1;u>=0;u--)if(l=c[u],!g(t[l],e[l],i,n))return!1;return!0}(t,e,i,r))}return i?t===e:t==e}function y(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function v(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function _(t,e,i,n){var o;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof i&&(n=i,i=null),o=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(i&&i.name?" ("+i.name+").":".")+(n?" "+n:"."),t&&!o&&f(o,i,"Missing expected exception"+n);var r="string"==typeof n,a=!t&&o&&!i;if((!t&&s.isError(o)&&r&&v(o,i)||a)&&f(o,i,"Got unwanted exception"+n),t&&o&&i&&!v(o,i)||!t&&o)throw o}d.AssertionError=function(t){var e;this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=m(b((e=this).actual),128)+" "+e.operator+" "+m(b(e.expected),128),this.generatedMessage=!0);var i=t.stackStartFunction||f;if(Error.captureStackTrace)Error.captureStackTrace(this,i);else{var n=new Error;if(n.stack){var o=n.stack,s=h(i),r=o.indexOf("\n"+s);if(r>=0){var a=o.indexOf("\n",r+1);o=o.substring(a+1)}this.stack=o}}},s.inherits(d.AssertionError,Error),d.fail=f,d.ok=w,d.equal=function(t,e,i){t!=e&&f(t,e,i,"==",d.equal)},d.notEqual=function(t,e,i){t==e&&f(t,e,i,"!=",d.notEqual)},d.deepEqual=function(t,e,i){g(t,e,!1)||f(t,e,i,"deepEqual",d.deepEqual)},d.deepStrictEqual=function(t,e,i){g(t,e,!0)||f(t,e,i,"deepStrictEqual",d.deepStrictEqual)},d.notDeepEqual=function(t,e,i){g(t,e,!1)&&f(t,e,i,"notDeepEqual",d.notDeepEqual)},d.notDeepStrictEqual=function t(e,i,n){g(e,i,!0)&&f(e,i,n,"notDeepStrictEqual",t)},d.strictEqual=function(t,e,i){t!==e&&f(t,e,i,"===",d.strictEqual)},d.notStrictEqual=function(t,e,i){t===e&&f(t,e,i,"!==",d.notStrictEqual)},d.throws=function(t,e,i){_(!0,t,e,i)},d.doesNotThrow=function(t,e,i){_(!1,t,e,i)},d.ifError=function(t){if(t)throw t};var k=Object.keys||function(t){var e=[];for(var i in t)r.call(t,i)&&e.push(i);return e}}).call(this,i(1))},function(t,e,i){(function(t){var n=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),i={},n=0;n<e.length;n++)i[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return i},o=/%[sdj%]/g;e.format=function(t){if(!w(t)){for(var e=[],i=0;i<arguments.length;i++)e.push(a(arguments[i]));return e.join(" ")}i=1;for(var n=arguments,s=n.length,r=String(t).replace(o,function(t){if("%%"===t)return"%";if(i>=s)return t;switch(t){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch(t){return"[Circular]"}default:return t}}),l=n[i];i<s;l=n[++i])b(l)||!v(l)?r+=" "+l:r+=" "+a(l);return r},e.deprecate=function(i,n){if(void 0!==t&&!0===t.noDeprecation)return i;if(void 0===t)return function(){return e.deprecate(i,n).apply(this,arguments)};var o=!1;return function(){if(!o){if(t.throwDeprecation)throw new Error(n);t.traceDeprecation?console.trace(n):console.error(n),o=!0}return i.apply(this,arguments)}};var s,r={};function a(t,i){var n={seen:[],stylize:u};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(i)?n.showHidden=i:i&&e._extend(n,i),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),c(n,t,n.depth)}function l(t,e){var i=a.styles[e];return i?"["+a.colors[i][0]+"m"+t+"["+a.colors[i][1]+"m":t}function u(t,e){return t}function c(t,i,n){if(t.customInspect&&i&&x(i.inspect)&&i.inspect!==e.inspect&&(!i.constructor||i.constructor.prototype!==i)){var o=i.inspect(n,t);return w(o)||(o=c(t,o,n)),o}var s=function(t,e){if(g(e))return t.stylize("undefined","undefined");if(w(e)){var i="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(i,"string")}if(f(e))return t.stylize(""+e,"number");if(m(e))return t.stylize(""+e,"boolean");if(b(e))return t.stylize("null","null")}(t,i);if(s)return s;var r=Object.keys(i),a=function(t){var e={};return t.forEach(function(t,i){e[t]=!0}),e}(r);if(t.showHidden&&(r=Object.getOwnPropertyNames(i)),k(i)&&(r.indexOf("message")>=0||r.indexOf("description")>=0))return d(i);if(0===r.length){if(x(i)){var l=i.name?": "+i.name:"";return t.stylize("[Function"+l+"]","special")}if(y(i))return t.stylize(RegExp.prototype.toString.call(i),"regexp");if(_(i))return t.stylize(Date.prototype.toString.call(i),"date");if(k(i))return d(i)}var u,v="",E=!1,B=["{","}"];(h(i)&&(E=!0,B=["[","]"]),x(i))&&(v=" [Function"+(i.name?": "+i.name:"")+"]");return y(i)&&(v=" "+RegExp.prototype.toString.call(i)),_(i)&&(v=" "+Date.prototype.toUTCString.call(i)),k(i)&&(v=" "+d(i)),0!==r.length||E&&0!=i.length?n<0?y(i)?t.stylize(RegExp.prototype.toString.call(i),"regexp"):t.stylize("[Object]","special"):(t.seen.push(i),u=E?function(t,e,i,n,o){for(var s=[],r=0,a=e.length;r<a;++r)C(e,String(r))?s.push(p(t,e,i,n,String(r),!0)):s.push("");return o.forEach(function(o){o.match(/^\d+$/)||s.push(p(t,e,i,n,o,!0))}),s}(t,i,n,a,r):r.map(function(e){return p(t,i,n,a,e,E)}),t.seen.pop(),function(t,e,i){if(t.reduce(function(t,e){return 0,e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return i[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+i[1];return i[0]+e+" "+t.join(", ")+" "+i[1]}(u,v,B)):B[0]+v+B[1]}function d(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,i,n,o,s){var r,a,l;if((l=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]}).get?a=l.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):l.set&&(a=t.stylize("[Setter]","special")),C(n,o)||(r="["+o+"]"),a||(t.seen.indexOf(l.value)<0?(a=b(i)?c(t,l.value,null):c(t,l.value,i-1)).indexOf("\n")>-1&&(a=s?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n")):a=t.stylize("[Circular]","special")),g(r)){if(s&&o.match(/^\d+$/))return a;(r=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(r=r.substr(1,r.length-2),r=t.stylize(r,"name")):(r=r.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),r=t.stylize(r,"string"))}return r+": "+a}function h(t){return Array.isArray(t)}function m(t){return"boolean"==typeof t}function b(t){return null===t}function f(t){return"number"==typeof t}function w(t){return"string"==typeof t}function g(t){return void 0===t}function y(t){return v(t)&&"[object RegExp]"===E(t)}function v(t){return"object"==typeof t&&null!==t}function _(t){return v(t)&&"[object Date]"===E(t)}function k(t){return v(t)&&("[object Error]"===E(t)||t instanceof Error)}function x(t){return"function"==typeof t}function E(t){return Object.prototype.toString.call(t)}function B(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(i){if(g(s)&&(s=t.env.NODE_DEBUG||""),i=i.toUpperCase(),!r[i])if(new RegExp("\\b"+i+"\\b","i").test(s)){var n=t.pid;r[i]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",i,n,t)}}else r[i]=function(){};return r[i]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=h,e.isBoolean=m,e.isNull=b,e.isNullOrUndefined=function(t){return null==t},e.isNumber=f,e.isString=w,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=g,e.isRegExp=y,e.isObject=v,e.isDate=_,e.isError=k,e.isFunction=x,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=i(9);var z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,i;console.log("%s - %s",(t=new Date,i=[B(t.getHours()),B(t.getMinutes()),B(t.getSeconds())].join(":"),[t.getDate(),z[t.getMonth()],i].join(" ")),e.format.apply(e,arguments))},e.inherits=i(10),e._extend=function(t,e){if(!e||!v(e))return t;for(var i=Object.keys(e),n=i.length;n--;)t[i[n]]=e[i[n]];return t};var j="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function S(t,e){if(!t){var i=new Error("Promise was rejected with a falsy value");i.reason=t,t=i}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(j&&t[j]){var e;if("function"!=typeof(e=t[j]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,j,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,i,n=new Promise(function(t,n){e=t,i=n}),o=[],s=0;s<arguments.length;s++)o.push(arguments[s]);o.push(function(t,n){t?i(t):e(n)});try{t.apply(this,o)}catch(t){i(t)}return n}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),j&&Object.defineProperty(e,j,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,n(t))},e.promisify.custom=j,e.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function i(){for(var i=[],n=0;n<arguments.length;n++)i.push(arguments[n]);var o=i.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var s=this,r=function(){return o.apply(s,arguments)};e.apply(this,i).then(function(e){t.nextTick(r,null,e)},function(e){t.nextTick(S,e,r)})}return Object.setPrototypeOf(i,Object.getPrototypeOf(e)),Object.defineProperties(i,n(e)),i}}).call(this,i(3))},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}},function(t,e,i){(function(t,e){!function(t,i){"use strict";if(!t.setImmediate){var n,o,s,r,a,l=1,u={},c=!1,d=t.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(t);p=p&&p.setTimeout?p:t,"[object process]"==={}.toString.call(t.process)?n=function(t){e.nextTick(function(){m(t)})}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,i=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=i,e}}()?t.MessageChannel?((s=new MessageChannel).port1.onmessage=function(t){m(t.data)},n=function(t){s.port2.postMessage(t)}):d&&"onreadystatechange"in d.createElement("script")?(o=d.documentElement,n=function(t){var e=d.createElement("script");e.onreadystatechange=function(){m(t),e.onreadystatechange=null,o.removeChild(e),e=null},o.appendChild(e)}):n=function(t){setTimeout(m,0,t)}:(r="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(r)&&m(+e.data.slice(r.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),n=function(e){t.postMessage(r+e,"*")}),p.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),i=0;i<e.length;i++)e[i]=arguments[i+1];var o={callback:t,args:e};return u[l]=o,n(l),l++},p.clearImmediate=h}function h(t){delete u[t]}function m(t){if(c)setTimeout(m,0,t);else{var e=u[t];if(e){c=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(i,n)}}(e)}finally{h(t),c=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,i(1),i(3))},function(t,e,i){var n;n=function(){function t(t){this._targetElement=t,this._introItems=[],this._options={nextLabel:"Next &rarr;",prevLabel:"&larr; Back",skipLabel:"Skip",doneLabel:"Done",hidePrev:!1,hideNext:!1,tooltipPosition:"bottom",tooltipClass:"",highlightClass:"",exitOnEsc:!0,exitOnOverlayClick:!0,showStepNumbers:!0,keyboardNavigation:!0,showButtons:!0,showBullets:!0,showProgress:!1,scrollToElement:!0,scrollTo:"element",scrollPadding:30,overlayOpacity:.8,positionPrecedence:["bottom","top","right","left"],disableInteraction:!1,helperElementPadding:10,hintPosition:"top-middle",hintButtonLabel:"Got it",hintAnimation:!0,buttonClass:"introjs-button"}}function e(t,e){var r=t.querySelectorAll("*[data-intro]"),l=[];if(this._options.steps)w(this._options.steps,function(t){var e=o(t);if(e.step=l.length+1,"string"==typeof e.element&&(e.element=document.querySelector(e.element)),void 0===e.element||null===e.element){var i=document.querySelector(".introjsFloatingElement");null===i&&((i=document.createElement("div")).className="introjsFloatingElement",document.body.appendChild(i)),e.element=i,e.position="floating"}e.scrollTo=e.scrollTo||this._options.scrollTo,void 0===e.disableInteraction&&(e.disableInteraction=this._options.disableInteraction),null!==e.element&&l.push(e)}.bind(this));else{var u;if(r.length<1)return!1;w(r,function(t){if((!e||t.getAttribute("data-intro-group")===e)&&"none"!==t.style.display){var i=parseInt(t.getAttribute("data-step"),10);u=void 0!==t.getAttribute("data-disable-interaction")?!!t.getAttribute("data-disable-interaction"):this._options.disableInteraction,i>0&&(l[i-1]={element:t,intro:t.getAttribute("data-intro"),step:parseInt(t.getAttribute("data-step"),10),tooltipClass:t.getAttribute("data-tooltipclass"),highlightClass:t.getAttribute("data-highlightclass"),position:t.getAttribute("data-position")||this._options.tooltipPosition,scrollTo:t.getAttribute("data-scrollto")||this._options.scrollTo,disableInteraction:u})}}.bind(this));var c=0;w(r,function(t){if((!e||t.getAttribute("data-intro-group")===e)&&null===t.getAttribute("data-step")){for(;void 0!==l[c];)c++;u=void 0!==t.getAttribute("data-disable-interaction")?!!t.getAttribute("data-disable-interaction"):this._options.disableInteraction,l[c]={element:t,intro:t.getAttribute("data-intro"),step:c+1,tooltipClass:t.getAttribute("data-tooltipclass"),highlightClass:t.getAttribute("data-highlightclass"),position:t.getAttribute("data-position")||this._options.tooltipPosition,scrollTo:t.getAttribute("data-scrollto")||this._options.scrollTo,disableInteraction:u}}}.bind(this))}for(var d=[],p=0;p<l.length;p++)l[p]&&d.push(l[p]);return(l=d).sort(function(t,e){return t.step-e.step}),this._introItems=l,function(t){var e=document.createElement("div"),i="",n=this;if(e.className="introjs-overlay",t.tagName&&"body"!==t.tagName.toLowerCase()){var o=I(t);o&&(i+="width: "+o.width+"px; height:"+o.height+"px; top:"+o.top+"px;left: "+o.left+"px;",e.style.cssText=i)}else i+="top: 0;bottom: 0; left: 0;right: 0;position: fixed;",e.style.cssText=i;return t.appendChild(e),e.onclick=function(){!0===n._options.exitOnOverlayClick&&a.call(n,t)},window.setTimeout(function(){i+="opacity: "+n._options.overlayOpacity.toString()+";",e.style.cssText=i},10),!0}.call(this,t)&&(s.call(this),this._options.keyboardNavigation&&v.on(window,"keydown",n,this,!0),v.on(window,"resize",i,this,!0)),!1}function i(){this.refresh.call(this)}function n(t){var e=null===t.code?t.which:t.code;if(null===e&&(e=null===t.charCode?t.keyCode:t.charCode),"Escape"!==e&&27!==e||!0!==this._options.exitOnEsc){if("ArrowLeft"===e||37===e)r.call(this);else if("ArrowRight"===e||39===e)s.call(this);else if("Enter"===e||13===e){var i=t.target||t.srcElement;i&&i.className.match("introjs-prevbutton")?r.call(this):i&&i.className.match("introjs-skipbutton")?(this._introItems.length-1===this._currentStep&&"function"==typeof this._introCompleteCallback&&this._introCompleteCallback.call(this),a.call(this,this._targetElement)):i&&i.getAttribute("data-stepnumber")?i.click():s.call(this),t.preventDefault?t.preventDefault():t.returnValue=!1}}else a.call(this,this._targetElement)}function o(t){if(null===t||"object"!=typeof t||void 0!==t.nodeType)return t;var e={};for(var i in t)void 0!==window.jQuery&&t[i]instanceof window.jQuery?e[i]=t[i]:e[i]=o(t[i]);return e}function s(){this._direction="forward",void 0!==this._currentStepNumber&&w(this._introItems,function(t,e){t.step===this._currentStepNumber&&(this._currentStep=e-1,this._currentStepNumber=void 0)}.bind(this)),void 0===this._currentStep?this._currentStep=0:++this._currentStep;var t=this._introItems[this._currentStep],e=!0;return void 0!==this._introBeforeChangeCallback&&(e=this._introBeforeChangeCallback.call(this,t.element)),!1===e?(--this._currentStep,!1):this._introItems.length<=this._currentStep?("function"==typeof this._introCompleteCallback&&this._introCompleteCallback.call(this),void a.call(this,this._targetElement)):void m.call(this,t)}function r(){if(this._direction="backward",0===this._currentStep)return!1;--this._currentStep;var t=this._introItems[this._currentStep],e=!0;if(void 0!==this._introBeforeChangeCallback&&(e=this._introBeforeChangeCallback.call(this,t.element)),!1===e)return++this._currentStep,!1;m.call(this,t)}function a(t,e){var o=!0;if(void 0!==this._introBeforeExitCallback&&(o=this._introBeforeExitCallback.call(this)),e||!1!==o){var s=t.querySelectorAll(".introjs-overlay");s&&s.length&&w(s,function(t){t.style.opacity=0,window.setTimeout(function(){this.parentNode&&this.parentNode.removeChild(this)}.bind(t),500)}.bind(this));var r=t.querySelector(".introjs-helperLayer");r&&r.parentNode.removeChild(r);var a=t.querySelector(".introjs-tooltipReferenceLayer");a&&a.parentNode.removeChild(a);var l=t.querySelector(".introjs-disableInteraction");l&&l.parentNode.removeChild(l);var u=document.querySelector(".introjsFloatingElement");u&&u.parentNode.removeChild(u),f(),w(document.querySelectorAll(".introjs-fixParent"),function(t){k(t,/introjs-fixParent/g)}),v.off(window,"keydown",n,this,!0),v.off(window,"resize",i,this,!0),void 0!==this._introExitCallback&&this._introExitCallback.call(this),this._currentStep=void 0}}function l(t,e,i,n,o){var s,r,a,l,p,h="";if(o=o||!1,e.style.top=null,e.style.right=null,e.style.bottom=null,e.style.left=null,e.style.marginLeft=null,e.style.marginTop=null,i.style.display="inherit",null!=n&&(n.style.top=null,n.style.left=null),this._introItems[this._currentStep])switch(h="string"==typeof(s=this._introItems[this._currentStep]).tooltipClass?s.tooltipClass:this._options.tooltipClass,e.className=("introjs-tooltip "+h).replace(/^\s+|\s+$/g,""),e.setAttribute("role","dialog"),"floating"!==(p=this._introItems[this._currentStep].position)&&(p=function(t,e,i){var n=this._options.positionPrecedence.slice(),o=B(),s=I(e).height+10,r=I(e).width+20,a=t.getBoundingClientRect(),l="floating";a.bottom+s+s>o.height&&d(n,"bottom");a.top-s<0&&d(n,"top");a.right+r>o.width&&d(n,"right");a.left-r<0&&d(n,"left");var u=(c=i||"",p=c.indexOf("-"),-1!==p?c.substr(p):"");var c,p;i&&(i=i.split("-")[0]);n.length&&(l="auto"!==i&&n.indexOf(i)>-1?i:n[0]);-1!==["top","bottom"].indexOf(l)&&(l+=function(t,e,i,n){var o=e/2,s=Math.min(i.width,window.screen.width),r=["-left-aligned","-middle-aligned","-right-aligned"],a="";s-t<e&&d(r,"-left-aligned");(t<o||s-t<o)&&d(r,"-middle-aligned");t<e&&d(r,"-right-aligned");a=r.length?-1!==r.indexOf(n)?n:r[0]:"-middle-aligned";return a}(a.left,r,o,u));return l}.call(this,t,e,p)),a=I(t),r=I(e),l=B(),_(e,"introjs-"+p),p){case"top-right-aligned":i.className="introjs-arrow bottom-right";var m=0;c(a,m,r,e),e.style.bottom=a.height+20+"px";break;case"top-middle-aligned":i.className="introjs-arrow bottom-middle";var b=a.width/2-r.width/2;o&&(b+=5),c(a,b,r,e)&&(e.style.right=null,u(a,b,r,l,e)),e.style.bottom=a.height+20+"px";break;case"top-left-aligned":case"top":i.className="introjs-arrow bottom",u(a,o?0:15,r,l,e),e.style.bottom=a.height+20+"px";break;case"right":e.style.left=a.width+20+"px",a.top+r.height>l.height?(i.className="introjs-arrow left-bottom",e.style.top="-"+(r.height-a.height-20)+"px"):i.className="introjs-arrow left";break;case"left":o||!0!==this._options.showStepNumbers||(e.style.top="15px"),a.top+r.height>l.height?(e.style.top="-"+(r.height-a.height-20)+"px",i.className="introjs-arrow right-bottom"):i.className="introjs-arrow right",e.style.right=a.width+20+"px";break;case"floating":i.style.display="none",e.style.left="50%",e.style.top="50%",e.style.marginLeft="-"+r.width/2+"px",e.style.marginTop="-"+r.height/2+"px",null!=n&&(n.style.left="-"+(r.width/2+18)+"px",n.style.top="-"+(r.height/2+18)+"px");break;case"bottom-right-aligned":i.className="introjs-arrow top-right",c(a,m=0,r,e),e.style.top=a.height+20+"px";break;case"bottom-middle-aligned":i.className="introjs-arrow top-middle",b=a.width/2-r.width/2,o&&(b+=5),c(a,b,r,e)&&(e.style.right=null,u(a,b,r,l,e)),e.style.top=a.height+20+"px";break;default:i.className="introjs-arrow top",u(a,0,r,l,e),e.style.top=a.height+20+"px"}}function u(t,e,i,n,o){return t.left+e+i.width>n.width?(o.style.left=n.width-i.width-t.left+"px",!1):(o.style.left=e+"px",!0)}function c(t,e,i,n){return t.left+t.width-e-i.width<0?(n.style.left=-t.left+"px",!1):(n.style.right=e+"px",!0)}function d(t,e){t.indexOf(e)>-1&&t.splice(t.indexOf(e),1)}function p(t){if(t){if(!this._introItems[this._currentStep])return;var e=this._introItems[this._currentStep],i=I(e.element),n=this._options.helperElementPadding;E(e.element)?_(t,"introjs-fixedTooltip"):k(t,"introjs-fixedTooltip"),"floating"===e.position&&(n=0),t.style.cssText="width: "+(i.width+n)+"px; height:"+(i.height+n)+"px; top:"+(i.top-n/2)+"px;left: "+(i.left-n/2)+"px;"}}function h(t){t.setAttribute("role","button"),t.tabIndex=0}function m(t){void 0!==this._introChangeCallback&&this._introChangeCallback.call(this,t.element);var e,i,n,o,u=this,c=document.querySelector(".introjs-helperLayer"),d=document.querySelector(".introjs-tooltipReferenceLayer"),m="introjs-helperLayer";if("string"==typeof t.highlightClass&&(m+=" "+t.highlightClass),"string"==typeof this._options.highlightClass&&(m+=" "+this._options.highlightClass),null!==c){var g=d.querySelector(".introjs-helperNumberLayer"),y=d.querySelector(".introjs-tooltiptext"),v=d.querySelector(".introjs-arrow"),E=d.querySelector(".introjs-tooltip");if(n=d.querySelector(".introjs-skipbutton"),i=d.querySelector(".introjs-prevbutton"),e=d.querySelector(".introjs-nextbutton"),c.className=m,E.style.opacity=0,E.style.display="none",null!==g){var B=this._introItems[t.step-2>=0?t.step-2:0];(null!==B&&"forward"===this._direction&&"floating"===B.position||"backward"===this._direction&&"floating"===t.position)&&(g.style.opacity=0)}(o=M(t.element))!==document.body&&q(o,t.element),p.call(u,c),p.call(u,d),w(document.querySelectorAll(".introjs-fixParent"),function(t){k(t,/introjs-fixParent/g)}),f(),u._lastShowElementTimer&&window.clearTimeout(u._lastShowElementTimer),u._lastShowElementTimer=window.setTimeout(function(){null!==g&&(g.innerHTML=t.step),y.innerHTML=t.intro,E.style.display="block",l.call(u,t.element,E,v,g),u._options.showBullets&&(d.querySelector(".introjs-bullets li > a.active").className="",d.querySelector('.introjs-bullets li > a[data-stepnumber="'+t.step+'"]').className="active"),d.querySelector(".introjs-progress .introjs-progressbar").style.cssText="width:"+H.call(u)+"%;",d.querySelector(".introjs-progress .introjs-progressbar").setAttribute("aria-valuenow",H.call(u)),E.style.opacity=1,g&&(g.style.opacity=1),null!=n&&/introjs-donebutton/gi.test(n.className)?n.focus():null!=e&&e.focus(),b.call(u,t.scrollTo,t,y)},350)}else{var z=document.createElement("div"),C=document.createElement("div"),j=document.createElement("div"),S=document.createElement("div"),L=document.createElement("div"),O=document.createElement("div"),T=document.createElement("div"),N=document.createElement("div");z.className=m,C.className="introjs-tooltipReferenceLayer",(o=M(t.element))!==document.body&&q(o,t.element),p.call(u,z),p.call(u,C),this._targetElement.appendChild(z),this._targetElement.appendChild(C),j.className="introjs-arrow",L.className="introjs-tooltiptext",L.innerHTML=t.intro,O.className="introjs-bullets",!1===this._options.showBullets&&(O.style.display="none");var A=document.createElement("ul");A.setAttribute("role","tablist");var I=function(){u.goToStep(this.getAttribute("data-stepnumber"))};w(this._introItems,function(e,i){var n=document.createElement("li"),o=document.createElement("a");n.setAttribute("role","presentation"),o.setAttribute("role","tab"),o.onclick=I,i===t.step-1&&(o.className="active"),h(o),o.innerHTML="&nbsp;",o.setAttribute("data-stepnumber",e.step),n.appendChild(o),A.appendChild(n)}),O.appendChild(A),T.className="introjs-progress",!1===this._options.showProgress&&(T.style.display="none");var P=document.createElement("div");P.className="introjs-progressbar",P.setAttribute("role","progress"),P.setAttribute("aria-valuemin",0),P.setAttribute("aria-valuemax",100),P.setAttribute("aria-valuenow",H.call(this)),P.style.cssText="width:"+H.call(this)+"%;",T.appendChild(P),N.className="introjs-tooltipbuttons",!1===this._options.showButtons&&(N.style.display="none"),S.className="introjs-tooltip",S.appendChild(L),S.appendChild(O),S.appendChild(T);var D=document.createElement("span");!0===this._options.showStepNumbers&&(D.className="introjs-helperNumberLayer",D.innerHTML=t.step,C.appendChild(D)),S.appendChild(j),C.appendChild(S),(e=document.createElement("a")).onclick=function(){u._introItems.length-1!==u._currentStep&&s.call(u)},h(e),e.innerHTML=this._options.nextLabel,(i=document.createElement("a")).onclick=function(){0!==u._currentStep&&r.call(u)},h(i),i.innerHTML=this._options.prevLabel,(n=document.createElement("a")).className=this._options.buttonClass+" introjs-skipbutton ",h(n),n.innerHTML=this._options.skipLabel,n.onclick=function(){u._introItems.length-1===u._currentStep&&"function"==typeof u._introCompleteCallback&&u._introCompleteCallback.call(u),u._introItems.length-1!==u._currentStep&&"function"==typeof u._introExitCallback&&u._introExitCallback.call(u),"function"==typeof u._introSkipCallback&&u._introSkipCallback.call(u),a.call(u,u._targetElement)},N.appendChild(n),this._introItems.length>1&&(N.appendChild(i),N.appendChild(e)),S.appendChild(N),l.call(u,t.element,S,j,D),b.call(this,t.scrollTo,t,S)}var F=u._targetElement.querySelector(".introjs-disableInteraction");F&&F.parentNode.removeChild(F),t.disableInteraction&&function(){var t=document.querySelector(".introjs-disableInteraction");null===t&&((t=document.createElement("div")).className="introjs-disableInteraction",this._targetElement.appendChild(t)),p.call(this,t)}.call(u),0===this._currentStep&&this._introItems.length>1?(null!=n&&(n.className=this._options.buttonClass+" introjs-skipbutton"),null!=e&&(e.className=this._options.buttonClass+" introjs-nextbutton"),!0===this._options.hidePrev?(null!=i&&(i.className=this._options.buttonClass+" introjs-prevbutton introjs-hidden"),null!=e&&_(e,"introjs-fullbutton")):null!=i&&(i.className=this._options.buttonClass+" introjs-prevbutton introjs-disabled"),null!=n&&(n.innerHTML=this._options.skipLabel)):this._introItems.length-1===this._currentStep||1===this._introItems.length?(null!=n&&(n.innerHTML=this._options.doneLabel,_(n,"introjs-donebutton")),null!=i&&(i.className=this._options.buttonClass+" introjs-prevbutton"),!0===this._options.hideNext?(null!=e&&(e.className=this._options.buttonClass+" introjs-nextbutton introjs-hidden"),null!=i&&_(i,"introjs-fullbutton")):null!=e&&(e.className=this._options.buttonClass+" introjs-nextbutton introjs-disabled")):(null!=n&&(n.className=this._options.buttonClass+" introjs-skipbutton"),null!=i&&(i.className=this._options.buttonClass+" introjs-prevbutton"),null!=e&&(e.className=this._options.buttonClass+" introjs-nextbutton"),null!=n&&(n.innerHTML=this._options.skipLabel)),i.setAttribute("role","button"),e.setAttribute("role","button"),n.setAttribute("role","button"),null!=e&&e.focus(),function(t){var e;if(t.element instanceof SVGElement)for(e=t.element.parentNode;null!==t.element.parentNode&&e.tagName&&"body"!==e.tagName.toLowerCase();)"svg"===e.tagName.toLowerCase()&&_(e,"introjs-showElement introjs-relativePosition"),e=e.parentNode;_(t.element,"introjs-showElement");var i=x(t.element,"position");"absolute"!==i&&"relative"!==i&&"fixed"!==i&&_(t.element,"introjs-relativePosition");e=t.element.parentNode;for(;null!==e&&e.tagName&&"body"!==e.tagName.toLowerCase();){var n=x(e,"z-index"),o=parseFloat(x(e,"opacity")),s=x(e,"transform")||x(e,"-webkit-transform")||x(e,"-moz-transform")||x(e,"-ms-transform")||x(e,"-o-transform");(/[0-9]+/.test(n)||o<1||"none"!==s&&void 0!==s)&&_(e,"introjs-fixParent"),e=e.parentNode}}(t),void 0!==this._introAfterChangeCallback&&this._introAfterChangeCallback.call(this,t.element)}function b(t,e,i){var n;if("off"!==t&&(this._options.scrollToElement&&(n="tooltip"===t?i.getBoundingClientRect():e.element.getBoundingClientRect(),!function(t){var e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom+80<=window.innerHeight&&e.right<=window.innerWidth}(e.element)))){var o=B().height;n.bottom-(n.bottom-n.top)<0||e.element.clientHeight>o?window.scrollBy(0,n.top-(o/2-n.height/2)-this._options.scrollPadding):window.scrollBy(0,n.top-(o/2-n.height/2)+this._options.scrollPadding)}}function f(){w(document.querySelectorAll(".introjs-showElement"),function(t){k(t,/introjs-[a-zA-Z]+/g)})}function w(t,e,i){if(t)for(var n=0,o=t.length;n<o;n++)e(t[n],n);"function"==typeof i&&i()}var g,y=(g={},function(t,e){return g[e=e||"introjs-stamp"]=g[e]||0,void 0===t[e]&&(t[e]=g[e]++),t[e]}),v=function(){return new function(){var t="introjs_event";this._id=function(t,e,i,n){return e+y(i)+(n?"_"+y(n):"")},this.on=function(e,i,n,o,s){var r=this._id.apply(this,arguments),a=function(t){return n.call(o||e,t||window.event)};"addEventListener"in e?e.addEventListener(i,a,s):"attachEvent"in e&&e.attachEvent("on"+i,a),e[t]=e[t]||{},e[t][r]=a},this.off=function(e,i,n,o,s){var r=this._id.apply(this,arguments),a=e[t]&&e[t][r];a&&("removeEventListener"in e?e.removeEventListener(i,a,s):"detachEvent"in e&&e.detachEvent("on"+i,a),e[t][r]=null)}}}();function _(t,e){if(t instanceof SVGElement){var i=t.getAttribute("class")||"";t.setAttribute("class",i+" "+e)}else{if(void 0!==t.classList)w(e.split(" "),function(e){t.classList.add(e)});else t.className.match(e)||(t.className+=" "+e)}}function k(t,e){if(t instanceof SVGElement){var i=t.getAttribute("class")||"";t.setAttribute("class",i.replace(e,"").replace(/^\s+|\s+$/g,""))}else t.className=t.className.replace(e,"").replace(/^\s+|\s+$/g,"")}function x(t,e){var i="";return t.currentStyle?i=t.currentStyle[e]:document.defaultView&&document.defaultView.getComputedStyle&&(i=document.defaultView.getComputedStyle(t,null).getPropertyValue(e)),i&&i.toLowerCase?i.toLowerCase():i}function E(t){var e=t.parentNode;return!(!e||"HTML"===e.nodeName)&&("fixed"===x(t,"position")||E(e))}function B(){if(void 0!==window.innerWidth)return{width:window.innerWidth,height:window.innerHeight};var t=document.documentElement;return{width:t.clientWidth,height:t.clientHeight}}function z(){var t=document.querySelector(".introjs-hintReference");if(t){var e=t.getAttribute("data-step");return t.parentNode.removeChild(t),e}}function C(t){if(this._introItems=[],this._options.hints)w(this._options.hints,function(t){var e=o(t);"string"==typeof e.element&&(e.element=document.querySelector(e.element)),e.hintPosition=e.hintPosition||this._options.hintPosition,e.hintAnimation=e.hintAnimation||this._options.hintAnimation,null!==e.element&&this._introItems.push(e)}.bind(this));else{var e=t.querySelectorAll("*[data-hint]");if(!e||!e.length)return!1;w(e,function(t){var e=t.getAttribute("data-hintanimation");e=e?"true"===e:this._options.hintAnimation,this._introItems.push({element:t,hint:t.getAttribute("data-hint"),hintPosition:t.getAttribute("data-hintposition")||this._options.hintPosition,hintAnimation:e,tooltipClass:t.getAttribute("data-tooltipclass"),position:t.getAttribute("data-position")||this._options.tooltipPosition})}.bind(this))}(function(){var t=this,e=document.querySelector(".introjs-hints");null===e&&((e=document.createElement("div")).className="introjs-hints");w(this._introItems,function(i,n){if(!document.querySelector('.introjs-hint[data-step="'+n+'"]')){var o=document.createElement("a");h(o),o.onclick=function(e){return function(i){var n=i||window.event;n.stopPropagation&&n.stopPropagation(),null!==n.cancelBubble&&(n.cancelBubble=!0),A.call(t,e)}}(n),o.className="introjs-hint",i.hintAnimation||_(o,"introjs-hint-no-anim"),E(i.element)&&_(o,"introjs-fixedhint");var s=document.createElement("div");s.className="introjs-hint-dot";var r=document.createElement("div");r.className="introjs-hint-pulse",o.appendChild(s),o.appendChild(r),o.setAttribute("data-step",n),i.targetElement=i.element,i.element=o,N.call(this,i.hintPosition,o,i.targetElement),e.appendChild(o)}}.bind(this)),document.body.appendChild(e),void 0!==this._hintsAddedCallback&&this._hintsAddedCallback.call(this)}).call(this),v.on(document,"click",z,this,!1),v.on(window,"resize",j,this,!0)}function j(){w(this._introItems,function(t){void 0!==t.targetElement&&N.call(this,t.hintPosition,t.element,t.targetElement)}.bind(this))}function S(t){var e=document.querySelector(".introjs-hints");return e?e.querySelectorAll(t):[]}function L(t){var e=S('.introjs-hint[data-step="'+t+'"]')[0];z.call(this),e&&_(e,"introjs-hidehint"),void 0!==this._hintCloseCallback&&this._hintCloseCallback.call(this,t)}function O(t){var e=S('.introjs-hint[data-step="'+t+'"]')[0];e&&k(e,/introjs-hidehint/g)}function T(t){var e=S('.introjs-hint[data-step="'+t+'"]')[0];e&&e.parentNode.removeChild(e)}function N(t,e,i){var n=I.call(this,i);switch(t){default:case"top-left":e.style.left=n.left+"px",e.style.top=n.top+"px";break;case"top-right":e.style.left=n.left+n.width-20+"px",e.style.top=n.top+"px";break;case"bottom-left":e.style.left=n.left+"px",e.style.top=n.top+n.height-20+"px";break;case"bottom-right":e.style.left=n.left+n.width-20+"px",e.style.top=n.top+n.height-20+"px";break;case"middle-left":e.style.left=n.left+"px",e.style.top=n.top+(n.height-20)/2+"px";break;case"middle-right":e.style.left=n.left+n.width-20+"px",e.style.top=n.top+(n.height-20)/2+"px";break;case"middle-middle":e.style.left=n.left+(n.width-20)/2+"px",e.style.top=n.top+(n.height-20)/2+"px";break;case"bottom-middle":e.style.left=n.left+(n.width-20)/2+"px",e.style.top=n.top+n.height-20+"px";break;case"top-middle":e.style.left=n.left+(n.width-20)/2+"px",e.style.top=n.top+"px"}}function A(t){var e=document.querySelector('.introjs-hint[data-step="'+t+'"]'),i=this._introItems[t];void 0!==this._hintClickCallback&&this._hintClickCallback.call(this,e,i,t);var n=z.call(this);if(parseInt(n,10)!==t){var o=document.createElement("div"),s=document.createElement("div"),r=document.createElement("div"),a=document.createElement("div");o.className="introjs-tooltip",o.onclick=function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},s.className="introjs-tooltiptext";var u=document.createElement("p");u.innerHTML=i.hint;var c=document.createElement("a");c.className=this._options.buttonClass,c.setAttribute("role","button"),c.innerHTML=this._options.hintButtonLabel,c.onclick=L.bind(this,t),s.appendChild(u),s.appendChild(c),r.className="introjs-arrow",o.appendChild(r),o.appendChild(s),this._currentStep=e.getAttribute("data-step"),a.className="introjs-tooltipReferenceLayer introjs-hintReference",a.setAttribute("data-step",e.getAttribute("data-step")),p.call(this,a),a.appendChild(o),document.body.appendChild(a),l.call(this,e,o,r,null,!0)}}function I(t){var e=document.body,i=document.documentElement,n=window.pageYOffset||i.scrollTop||e.scrollTop,o=window.pageXOffset||i.scrollLeft||e.scrollLeft,s=t.getBoundingClientRect();return{top:s.top+n,width:s.width,height:s.height,left:s.left+o}}function M(t){var e=window.getComputedStyle(t),i="absolute"===e.position,n=/(auto|scroll)/;if("fixed"===e.position)return document.body;for(var o=t;o=o.parentElement;)if(e=window.getComputedStyle(o),(!i||"static"!==e.position)&&n.test(e.overflow+e.overflowY+e.overflowX))return o;return document.body}function q(t,e){t.scrollTop=e.offsetTop-t.offsetTop}function H(){return parseInt(this._currentStep+1,10)/this._introItems.length*100}var P=function(e){var i;if("object"==typeof e)i=new t(e);else if("string"==typeof e){var n=document.querySelector(e);if(!n)throw new Error("There is no element with given selector.");i=new t(n)}else i=new t(document.body);return P.instances[y(i,"introjs-instance")]=i,i};return P.version="2.9.3",P.instances={},P.fn=t.prototype={clone:function(){return new t(this)},setOption:function(t,e){return this._options[t]=e,this},setOptions:function(t){return this._options=function(t,e){var i,n={};for(i in t)n[i]=t[i];for(i in e)n[i]=e[i];return n}(this._options,t),this},start:function(t){return e.call(this,this._targetElement,t),this},goToStep:function(t){return function(t){this._currentStep=t-2,void 0!==this._introItems&&s.call(this)}.call(this,t),this},addStep:function(t){return this._options.steps||(this._options.steps=[]),this._options.steps.push(t),this},addSteps:function(t){if(t.length){for(var e=0;e<t.length;e++)this.addStep(t[e]);return this}},goToStepNumber:function(t){return function(t){this._currentStepNumber=t,void 0!==this._introItems&&s.call(this)}.call(this,t),this},nextStep:function(){return s.call(this),this},previousStep:function(){return r.call(this),this},exit:function(t){return a.call(this,this._targetElement,t),this},refresh:function(){return function(){if(p.call(this,document.querySelector(".introjs-helperLayer")),p.call(this,document.querySelector(".introjs-tooltipReferenceLayer")),p.call(this,document.querySelector(".introjs-disableInteraction")),void 0!==this._currentStep&&null!==this._currentStep){var t=document.querySelector(".introjs-helperNumberLayer"),e=document.querySelector(".introjs-arrow"),i=document.querySelector(".introjs-tooltip");l.call(this,this._introItems[this._currentStep].element,i,e,t)}return j.call(this),this}.call(this),this},onbeforechange:function(t){if("function"!=typeof t)throw new Error("Provided callback for onbeforechange was not a function");return this._introBeforeChangeCallback=t,this},onchange:function(t){if("function"!=typeof t)throw new Error("Provided callback for onchange was not a function.");return this._introChangeCallback=t,this},onafterchange:function(t){if("function"!=typeof t)throw new Error("Provided callback for onafterchange was not a function");return this._introAfterChangeCallback=t,this},oncomplete:function(t){if("function"!=typeof t)throw new Error("Provided callback for oncomplete was not a function.");return this._introCompleteCallback=t,this},onhintsadded:function(t){if("function"!=typeof t)throw new Error("Provided callback for onhintsadded was not a function.");return this._hintsAddedCallback=t,this},onhintclick:function(t){if("function"!=typeof t)throw new Error("Provided callback for onhintclick was not a function.");return this._hintClickCallback=t,this},onhintclose:function(t){if("function"!=typeof t)throw new Error("Provided callback for onhintclose was not a function.");return this._hintCloseCallback=t,this},onexit:function(t){if("function"!=typeof t)throw new Error("Provided callback for onexit was not a function.");return this._introExitCallback=t,this},onskip:function(t){if("function"!=typeof t)throw new Error("Provided callback for onskip was not a function.");return this._introSkipCallback=t,this},onbeforeexit:function(t){if("function"!=typeof t)throw new Error("Provided callback for onbeforeexit was not a function.");return this._introBeforeExitCallback=t,this},addHints:function(){return C.call(this,this._targetElement),this},hideHint:function(t){return L.call(this,t),this},hideHints:function(){return function(){w(S(".introjs-hint"),function(t){L.call(this,t.getAttribute("data-step"))}.bind(this))}.call(this),this},showHint:function(t){return O.call(this,t),this},showHints:function(){return function(){var t=S(".introjs-hint");t&&t.length?w(t,function(t){O.call(this,t.getAttribute("data-step"))}.bind(this)):C.call(this,this._targetElement)}.call(this),this},removeHints:function(){return function(){w(S(".introjs-hint"),function(t){T.call(this,t.getAttribute("data-step"))}.bind(this))}.call(this),this},removeHint:function(t){return T.call(this,t),this},showHintDialog:function(t){return A.call(this,t),this}},P},t.exports=n(),t.exports.introJs=function(){return console.warn('Deprecated: please use require("intro.js") directly, instead of the introJs method of the function'),n().apply(this,arguments)}},function(t,e){
62
  /*!
63
  Chosen, a Select Box Enhancer for jQuery and Prototype
64
  by Patrick Filler for Harvest, http://getharvest.com
@@ -70,9 +70,9 @@ Copyright (c) 2011-2018 Harvest http://getharvest.com
70
  MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
71
  This file is generated by `grunt build`, do not edit it by hand.
72
  */
73
- (function(){var t,e,i,n,o=function(t,e){return function(){return t.apply(e,arguments)}},s={}.hasOwnProperty;(n=function(){function t(){this.options_index=0,this.parsed=[]}return t.prototype.add_node=function(t){return"OPTGROUP"===t.nodeName.toUpperCase()?this.add_group(t):this.add_option(t)},t.prototype.add_group=function(t){var e,i,n,o,s,r;for(e=this.parsed.length,this.parsed.push({array_index:e,group:!0,label:t.label,title:t.title?t.title:void 0,children:0,disabled:t.disabled,classes:t.className}),r=[],i=0,n=(s=t.childNodes).length;i<n;i++)o=s[i],r.push(this.add_option(o,e,t.disabled));return r},t.prototype.add_option=function(t,e,i){if("OPTION"===t.nodeName.toUpperCase())return""!==t.text?(null!=e&&(this.parsed[e].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:t.value,text:t.text,html:t.innerHTML,title:t.title?t.title:void 0,selected:t.selected,disabled:!0===i?i:t.disabled,group_array_index:e,group_label:null!=e?this.parsed[e].label:null,classes:t.className,style:t.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},t}()).select_to_array=function(t){var e,i,o,s,r;for(s=new n,i=0,o=(r=t.childNodes).length;i<o;i++)e=r[i],s.add_node(e);return s.parsed},e=function(){function t(e,i){this.form_field=e,this.options=null!=i?i:{},this.label_click_handler=o(this.label_click_handler,this),t.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return t.prototype.set_default_values=function(){var t;return this.click_test_action=(t=this,function(e){return t.test_active_click(e)}),this.activate_action=function(t){return function(e){return t.activate_field(e)}}(this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.is_rtl=this.options.rtl||/\bchosen-rtl\b/.test(this.form_field.className),this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY,this.case_sensitive_search=this.options.case_sensitive_search||!1,this.hide_results_on_select=null==this.options.hide_results_on_select||this.options.hide_results_on_select},t.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||t.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||t.default_single_text,this.default_text=this.escape_html(this.default_text),this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||t.default_no_result_text},t.prototype.choice_label=function(t){return this.include_group_label_in_selected&&null!=t.group_label?"<b class='group-name'>"+this.escape_html(t.group_label)+"</b>"+t.html:t.html},t.prototype.mouse_enter=function(){return this.mouse_on_container=!0},t.prototype.mouse_leave=function(){return this.mouse_on_container=!1},t.prototype.input_focus=function(t){if(this.is_multiple){if(!this.active_field)return setTimeout((e=this,function(){return e.container_mousedown()}),50)}else if(!this.active_field)return this.activate_field();var e},t.prototype.input_blur=function(t){if(!this.mouse_on_container)return this.active_field=!1,setTimeout((e=this,function(){return e.blur_test()}),100);var e},t.prototype.label_click_handler=function(t){return this.is_multiple?this.container_mousedown(t):this.activate_field()},t.prototype.results_option_build=function(t){var e,i,n,o,s,r,a;for(e="",a=0,o=0,s=(r=this.results_data).length;o<s&&(n="",""!==(n=(i=r[o]).group?this.result_add_group(i):this.result_add_option(i))&&(a++,e+=n),(null!=t?t.first:void 0)&&(i.selected&&this.is_multiple?this.choice_build(i):i.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(i))),!(a>=this.max_shown_results));o++);return e},t.prototype.result_add_option=function(t){var e,i;return t.search_match&&this.include_option_in_results(t)?(e=[],t.disabled||t.selected&&this.is_multiple||e.push("active-result"),!t.disabled||t.selected&&this.is_multiple||e.push("disabled-result"),t.selected&&e.push("result-selected"),null!=t.group_array_index&&e.push("group-option"),""!==t.classes&&e.push(t.classes),(i=document.createElement("li")).className=e.join(" "),t.style&&(i.style.cssText=t.style),i.setAttribute("data-option-array-index",t.array_index),i.innerHTML=t.highlighted_html||t.html,t.title&&(i.title=t.title),this.outerHTML(i)):""},t.prototype.result_add_group=function(t){var e,i;return(t.search_match||t.group_match)&&t.active_options>0?((e=[]).push("group-result"),t.classes&&e.push(t.classes),(i=document.createElement("li")).className=e.join(" "),i.innerHTML=t.highlighted_html||this.escape_html(t.label),t.title&&(i.title=t.title),this.outerHTML(i)):""},t.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},t.prototype.reset_single_select_options=function(){var t,e,i,n,o;for(o=[],t=0,e=(i=this.results_data).length;t<e;t++)(n=i[t]).selected?o.push(n.selected=!1):o.push(void 0);return o},t.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},t.prototype.results_search=function(t){return this.results_showing?this.winnow_results():this.results_show()},t.prototype.winnow_results=function(t){var e,i,n,o,s,r,a,l,u,c,d,p,h,m,b;for(this.no_results_clear(),c=0,e=(a=this.get_search_text()).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),u=this.get_search_regex(e),n=0,o=(l=this.results_data).length;n<o;n++)(s=l[n]).search_match=!1,d=null,p=null,s.highlighted_html="",this.include_option_in_results(s)&&(s.group&&(s.group_match=!1,s.active_options=0),null!=s.group_array_index&&this.results_data[s.group_array_index]&&(0===(d=this.results_data[s.group_array_index]).active_options&&d.search_match&&(c+=1),d.active_options+=1),b=s.group?s.label:s.text,s.group&&!this.group_search||(p=this.search_string_match(b,u),s.search_match=null!=p,s.search_match&&!s.group&&(c+=1),s.search_match?(a.length&&(h=p.index,r=b.slice(0,h),i=b.slice(h,h+a.length),m=b.slice(h+a.length),s.highlighted_html=this.escape_html(r)+"<em>"+this.escape_html(i)+"</em>"+this.escape_html(m)),null!=d&&(d.group_match=!0)):null!=s.group_array_index&&this.results_data[s.group_array_index].search_match&&(s.search_match=!0)));return this.result_clear_highlight(),c<1&&a.length?(this.update_results_content(""),this.no_results(a)):(this.update_results_content(this.results_option_build()),(null!=t?t.skip_highlight:void 0)?void 0:this.winnow_results_set_highlight())},t.prototype.get_search_regex=function(t){var e,i;return i=this.search_contains?t:"(^|\\s|\\b)"+t+"[^\\s]*",this.enable_split_word_search||this.search_contains||(i="^"+i),e=this.case_sensitive_search?"":"i",new RegExp(i,e)},t.prototype.search_string_match=function(t,e){var i;return i=e.exec(t),!this.search_contains&&(null!=i?i[1]:void 0)&&(i.index+=1),i},t.prototype.choices_count=function(){var t,e,i;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,t=0,e=(i=this.form_field.options).length;t<e;t++)i[t].selected&&(this.selected_option_count+=1);return this.selected_option_count},t.prototype.choices_click=function(t){if(t.preventDefault(),this.activate_field(),!this.results_showing&&!this.is_disabled)return this.results_show()},t.prototype.keydown_checker=function(t){var e,i;switch(i=null!=(e=t.which)?e:t.keyCode,this.search_field_scale(),8!==i&&this.pending_backstroke&&this.clear_backstroke(),i){case 8:this.backstroke_length=this.get_search_field_value().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(t),this.mouse_on_container=!1;break;case 13:case 27:this.results_showing&&t.preventDefault();break;case 32:this.disable_search&&t.preventDefault();break;case 38:t.preventDefault(),this.keyup_arrow();break;case 40:t.preventDefault(),this.keydown_arrow()}},t.prototype.keyup_checker=function(t){var e,i;switch(i=null!=(e=t.which)?e:t.keyCode,this.search_field_scale(),i){case 8:this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case 13:t.preventDefault(),this.results_showing&&this.result_select(t);break;case 27:this.results_showing&&this.results_hide();break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search()}},t.prototype.clipboard_event_checker=function(t){var e;if(!this.is_disabled)return setTimeout((e=this,function(){return e.results_search()}),50)},t.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},t.prototype.include_option_in_results=function(t){return!(this.is_multiple&&!this.display_selected_options&&t.selected)&&(!(!this.display_disabled_options&&t.disabled)&&!t.empty)},t.prototype.search_results_touchstart=function(t){return this.touch_started=!0,this.search_results_mouseover(t)},t.prototype.search_results_touchmove=function(t){return this.touch_started=!1,this.search_results_mouseout(t)},t.prototype.search_results_touchend=function(t){if(this.touch_started)return this.search_results_mouseup(t)},t.prototype.outerHTML=function(t){var e;return t.outerHTML?t.outerHTML:((e=document.createElement("div")).appendChild(t),e.innerHTML)},t.prototype.get_single_html=function(){return'<a class="chosen-single chosen-default">\n <span>'+this.default_text+'</span>\n <div><b></b></div>\n</a>\n<div class="chosen-drop">\n <div class="chosen-search">\n <input class="chosen-search-input" type="text" autocomplete="off" />\n </div>\n <ul class="chosen-results"></ul>\n</div>'},t.prototype.get_multi_html=function(){return'<ul class="chosen-choices">\n <li class="search-field">\n <input class="chosen-search-input" type="text" autocomplete="off" value="'+this.default_text+'" />\n </li>\n</ul>\n<div class="chosen-drop">\n <ul class="chosen-results"></ul>\n</div>'},t.prototype.get_no_results_html=function(t){return'<li class="no-results">\n '+this.results_none_found+" <span>"+this.escape_html(t)+"</span>\n</li>"},t.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent))},t.default_multiple_text="Select Some Options",t.default_single_text="Select an Option",t.default_no_result_text="No results match",t}(),(t=jQuery).fn.extend({chosen:function(n){return e.browser_is_supported()?this.each(function(e){var o,s;s=(o=t(this)).data("chosen"),"destroy"!==n?s instanceof i||o.data("chosen",new i(this,n)):s instanceof i&&s.destroy()}):this}}),i=function(i){function o(){return o.__super__.constructor.apply(this,arguments)}return function(t,e){for(var i in e)s.call(e,i)&&(t[i]=e[i]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(o,e),o.prototype.setup=function(){return this.form_field_jq=t(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex},o.prototype.set_up_html=function(){var e,i;return(e=["chosen-container"]).push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push("chosen-rtl"),i={class:e.join(" "),title:this.form_field.title},this.form_field.id.length&&(i.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=t("<div />",i),this.container.width(this.container_width()),this.is_multiple?this.container.html(this.get_multi_html()):this.container.html(this.get_single_html()),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},o.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},o.prototype.register_observers=function(){var t;return this.container.on("touchstart.chosen",(t=this,function(e){t.container_mousedown(e)})),this.container.on("touchend.chosen",function(t){return function(e){t.container_mouseup(e)}}(this)),this.container.on("mousedown.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.container.on("mouseup.chosen",function(t){return function(e){t.container_mouseup(e)}}(this)),this.container.on("mouseenter.chosen",function(t){return function(e){t.mouse_enter(e)}}(this)),this.container.on("mouseleave.chosen",function(t){return function(e){t.mouse_leave(e)}}(this)),this.search_results.on("mouseup.chosen",function(t){return function(e){t.search_results_mouseup(e)}}(this)),this.search_results.on("mouseover.chosen",function(t){return function(e){t.search_results_mouseover(e)}}(this)),this.search_results.on("mouseout.chosen",function(t){return function(e){t.search_results_mouseout(e)}}(this)),this.search_results.on("mousewheel.chosen DOMMouseScroll.chosen",function(t){return function(e){t.search_results_mousewheel(e)}}(this)),this.search_results.on("touchstart.chosen",function(t){return function(e){t.search_results_touchstart(e)}}(this)),this.search_results.on("touchmove.chosen",function(t){return function(e){t.search_results_touchmove(e)}}(this)),this.search_results.on("touchend.chosen",function(t){return function(e){t.search_results_touchend(e)}}(this)),this.form_field_jq.on("chosen:updated.chosen",function(t){return function(e){t.results_update_field(e)}}(this)),this.form_field_jq.on("chosen:activate.chosen",function(t){return function(e){t.activate_field(e)}}(this)),this.form_field_jq.on("chosen:open.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.form_field_jq.on("chosen:close.chosen",function(t){return function(e){t.close_field(e)}}(this)),this.search_field.on("blur.chosen",function(t){return function(e){t.input_blur(e)}}(this)),this.search_field.on("keyup.chosen",function(t){return function(e){t.keyup_checker(e)}}(this)),this.search_field.on("keydown.chosen",function(t){return function(e){t.keydown_checker(e)}}(this)),this.search_field.on("focus.chosen",function(t){return function(e){t.input_focus(e)}}(this)),this.search_field.on("cut.chosen",function(t){return function(e){t.clipboard_event_checker(e)}}(this)),this.search_field.on("paste.chosen",function(t){return function(e){t.clipboard_event_checker(e)}}(this)),this.is_multiple?this.search_choices.on("click.chosen",function(t){return function(e){t.choices_click(e)}}(this)):this.container.on("click.chosen",function(t){t.preventDefault()})},o.prototype.destroy=function(){return t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.form_field_label.length>0&&this.form_field_label.off("click.chosen"),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},o.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field.disabled||this.form_field_jq.parents("fieldset").is(":disabled"),this.container.toggleClass("chosen-disabled",this.is_disabled),this.search_field[0].disabled=this.is_disabled,this.is_multiple||this.selected_item.off("focus.chosen",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void 0:this.selected_item.on("focus.chosen",this.activate_field)},o.prototype.container_mousedown=function(e){var i;if(!this.is_disabled)return!e||"mousedown"!==(i=e.type)&&"touchstart"!==i||this.results_showing||e.preventDefault(),null!=e&&t(e.target).hasClass("search-choice-close")?void 0:(this.active_field?this.is_multiple||!e||t(e.target)[0]!==this.selected_item[0]&&!t(e.target).parents("a.chosen-single").length||(e.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),t(this.container[0].ownerDocument).on("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},o.prototype.container_mouseup=function(t){if("ABBR"===t.target.nodeName&&!this.is_disabled)return this.results_reset(t)},o.prototype.search_results_mousewheel=function(t){var e;if(t.originalEvent&&(e=t.originalEvent.deltaY||-t.originalEvent.wheelDelta||t.originalEvent.detail),null!=e)return t.preventDefault(),"DOMMouseScroll"===t.type&&(e*=40),this.search_results.scrollTop(e+this.search_results.scrollTop())},o.prototype.blur_test=function(t){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},o.prototype.close_field=function(){return t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale(),this.search_field.blur()},o.prototype.activate_field=function(){if(!this.is_disabled)return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},o.prototype.test_active_click=function(e){var i;return(i=t(e.target).closest(".chosen-container")).length&&this.container[0]===i[0]?this.active_field=!0:this.close_field()},o.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=n.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},o.prototype.result_do_highlight=function(t){var e,i,n,o,s;if(t.length){if(this.result_clear_highlight(),this.result_highlight=t,this.result_highlight.addClass("highlighted"),o=(n=parseInt(this.search_results.css("maxHeight"),10))+(s=this.search_results.scrollTop()),(e=(i=this.result_highlight.position().top+this.search_results.scrollTop())+this.result_highlight.outerHeight())>=o)return this.search_results.scrollTop(e-n>0?e-n:0);if(i<s)return this.search_results.scrollTop(i)}},o.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},o.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.get_search_field_value()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},o.prototype.update_results_content=function(t){return this.search_results.html(t)},o.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},o.prototype.set_tab_index=function(t){var e;if(this.form_field.tabIndex)return e=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=e},o.prototype.set_label_behavior=function(){if(this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=t("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0)return this.form_field_label.on("click.chosen",this.label_click_handler)},o.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},o.prototype.search_results_mouseup=function(e){var i;if((i=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first()).length)return this.result_highlight=i,this.result_select(e),this.search_field.focus()},o.prototype.search_results_mouseover=function(e){var i;if(i=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first())return this.result_do_highlight(i)},o.prototype.search_results_mouseout=function(e){if(t(e.target).hasClass("active-result")||t(e.target).parents(".active-result").first())return this.result_clear_highlight()},o.prototype.choice_build=function(e){var i,n,o;return i=t("<li />",{class:"search-choice"}).html("<span>"+this.choice_label(e)+"</span>"),e.disabled?i.addClass("search-choice-disabled"):((n=t("<a />",{class:"search-choice-close","data-option-array-index":e.array_index})).on("click.chosen",(o=this,function(t){return o.choice_destroy_link_click(t)})),i.append(n)),this.search_container.before(i)},o.prototype.choice_destroy_link_click=function(e){if(e.preventDefault(),e.stopPropagation(),!this.is_disabled)return this.choice_destroy(t(e.target))},o.prototype.choice_destroy=function(t){if(this.result_deselect(t[0].getAttribute("data-option-array-index")))return this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.get_search_field_value().length<1&&this.results_hide(),t.parents("li").first().remove(),this.search_field_scale()},o.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return this.results_hide()},o.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},o.prototype.result_select=function(t){var e,i;if(this.result_highlight)return e=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?e.removeClass("active-result"):this.reset_single_select_options(),e.addClass("result-selected"),(i=this.results_data[e[0].getAttribute("data-option-array-index")]).selected=!0,this.form_field.options[i.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(i):this.single_set_selected_text(this.choice_label(i)),this.is_multiple&&(!this.hide_results_on_select||t.metaKey||t.ctrlKey)?t.metaKey||t.ctrlKey?this.winnow_results({skip_highlight:!0}):(this.search_field.val(""),this.winnow_results()):(this.results_hide(),this.show_search_field_default()),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.trigger_form_field_change({selected:this.form_field.options[i.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,t.preventDefault(),this.search_field_scale())},o.prototype.single_set_selected_text=function(t){return null==t&&(t=this.default_text),t===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(t)},o.prototype.result_deselect=function(t){var e;return e=this.results_data[t],!this.form_field.options[e.options_index].disabled&&(e.selected=!1,this.form_field.options[e.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change({deselected:this.form_field.options[e.options_index].value}),this.search_field_scale(),!0)},o.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")},o.prototype.get_search_field_value=function(){return this.search_field.val()},o.prototype.get_search_text=function(){return t.trim(this.get_search_field_value())},o.prototype.escape_html=function(e){return t("<div/>").text(e).html()},o.prototype.winnow_results_set_highlight=function(){var t,e;if(null!=(t=(e=this.is_multiple?[]:this.search_results.find(".result-selected.active-result")).length?e.first():this.search_results.find(".active-result").first()))return this.result_do_highlight(t)},o.prototype.no_results=function(t){var e;return e=this.get_no_results_html(t),this.search_results.append(e),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},o.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},o.prototype.keydown_arrow=function(){var t;return this.results_showing&&this.result_highlight?(t=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(t):void 0:this.results_show()},o.prototype.keyup_arrow=function(){var t;return this.results_showing||this.is_multiple?this.result_highlight?(t=this.result_highlight.prevAll("li.active-result")).length?this.result_do_highlight(t.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight()):void 0:this.results_show()},o.prototype.keydown_backstroke=function(){var t;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(t=this.search_container.siblings("li.search-choice").last()).length&&!t.hasClass("search-choice-disabled")?(this.pending_backstroke=t,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0},o.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},o.prototype.search_field_scale=function(){var e,i,n,o,s,r,a;if(this.is_multiple){for(s={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},i=0,n=(r=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"]).length;i<n;i++)s[o=r[i]]=this.search_field.css(o);return(e=t("<div />").css(s)).text(this.get_search_field_value()),t("body").append(e),a=e.width()+25,e.remove(),this.container.is(":visible")&&(a=Math.min(this.container.outerWidth()-10,a)),this.search_field.width(a)}},o.prototype.trigger_form_field_change=function(t){return this.form_field_jq.trigger("input",t),this.form_field_jq.trigger("change",t)},o}()}).call(this)},,,function(t,e,i){"use strict";i.r(e);i(18);var n=class{startDebugging(){this.debugging=!0,this.log({data:"Buttonizer is debugging!",style:"font-size: 30px; color: #FF0000;"})}welcomeToTheConsole(){this.debugging=!0,this.log({data:"Welcome to Buttonizer. Please do not continue without any knowledge.",style:"font-size: 30px; color: #FF0000;"}),this.log({data:"You can find errors down here. If there is any error that is related to Buttonizer you can contact us at contact@buttonizer.pro",style:"font-size: 18px; color: #FF0000;"}),this.log({data:"Check https://community.buttonizer.pro",style:"font-size: 18px; color: #FF0000;"}),this.log({data:" ",style:"font-size: 18px; color: #FF0000;"}),this.log({data:" ",style:"font-size: 18px; color: #FF0000;"}),this.log({data:"----- Logs: -----",style:"font-size: 18px; color: #FF0000;"}),this.debugging=!1}log(t){this.debugging&&t.data&&(t.color&&(t.style=""),t.color||t.style?console.log("%c "+t.data,t.style):console.log(t.data))}warning(t){this.debugging&&console.warn(t)}warn(t){this.debugging&&console.warn(t)}error(t){console.error(t)}};var o=class{constructor(t,e){this.data=t,this.modal=e,this.validate()}validate(){void 0===this.data.onClick&&(this.data.onClick=function(){}),void 0===this.data.text&&(this.data.text="Button"),void 0===this.data.confirm&&(this.data.confirm=!1),void 0===this.data.focus&&(this.data.focus=!1)}render(){let t=document.createElement("a");return t.href="javascript:void(0)",t.innerHTML=this.data.text,t.className="button",t.style.marginLeft="5px",this.data.confirm&&(t.className+=" button-primary"),t.addEventListener("click",()=>{this.data.close&&this.modal.closeDialog(),this.data.confirm&&this.modal.confirmDialog(),this.data.cancel&&this.modal.cancelDialog(),this.data.onClick()}),setTimeout(()=>{this.data.focus&&t.focus()},50),t}};var s=class{constructor(t){this.data=t,this.element=HTMLElement,"function"==typeof this.data.onConfirm?this.onConfirm=this.data.onConfirm:this.onConfirm=function(){},"function"==typeof this.data.onCancel?this.onCancel=this.data.onCancel:this.onCancel=function(){},"function"==typeof this.data.onClose?this.onClose=this.data.onClose:this.onClose=function(){},void 0===this.data.class?this.class="":this.class=this.data.class,void 0!==this.data.video&&(this.class+=" has-video"),this.render()}render(){this.element=document.createElement("div"),this.element.classList="fs-modal active"+(""!==this.class?" "+this.class:"");let t=document.createElement("div");t.classList="fs-modal-dialog",t.appendChild(this.modalHeader()),t.appendChild(this.modalBody()),void 0!==this.data.video&&t.appendChild(this.clearBoth()),t.appendChild(this.modalFooter()),this.element.appendChild(t),document.body.appendChild(this.element)}modalHeader(){let t=document.createElement("div");t.classList="fs-modal-header";let e=document.createElement("h4");e.innerHTML=this.data.title,t.appendChild(e);let i=document.createElement("a");return i.className="fs-close",i.href="javascript:void(0)",i.innerHTML='<i class="dashicons dashicons-no" title="'+window.Buttonizer.translate("modal.dismiss")+'"></i>',i.addEventListener("click",()=>{this.closeDialog()}),t.appendChild(i),t}modalBody(){let t=document.createElement("div"),e=document.createElement("div");e.className="fs-modal-body";let i=document.createElement("div");return i.className="fs-modal-panel active","object"==typeof this.data.content?i.appendChild(this.data.content):i.innerHTML=this.data.content,e.appendChild(i),void 0!==this.data.video?(t.appendChild(e),t.appendChild(this.video()),t):e}modalFooter(){let t=document.createElement("div");return t.className="fs-modal-footer",this.data.buttons&&t.appendChild(this.renderButtons()),t}renderButtons(){let t=document.createElement("div");for(var e=0;e<this.data.buttons.length;e++){let i=new o(this.data.buttons[e],this);t.appendChild(i.render())}return t}cancelDialog(){this.onCancel(),this.closeDialog()}confirmDialog(){this.onConfirm(),this.closeDialog()}closeDialog(){this.onClose(),this.element.remove()}video(){let t=document.createElement("div");t.className="fs-modal-body fs-modal-video";let e=document.createElement("div");e.className="fs-modal-panel active";let i=document.createElement("iframe");return i.width="100%",i.style.maxWidth="560px",i.height="315",i.src=`https://www.youtube.com/embed/${this.data.video}?&autoplay=1`,i.frameBorder="0",i.allow="accelerometer",i.setAttribute("autoplay",""),i.setAttribute("encrypted-media",""),i.setAttribute("gyroscope",""),i.setAttribute("picture-in-picture",""),i.setAttribute("allowfullscreen",""),e.appendChild(i),t.appendChild(e),t}clearBoth(){let t=document.createElement("div");return t.style.clear="both",t}};class r{constructor(t){this.table=document.createElement("table"),this.table.width="100%",""!==t&&(this.table.className=t),this.currentRow=document.createElement("tr")}newRow(){return this.table.appendChild(this.currentRow),this.currentRow=document.createElement("tr"),this}addColumn(t,e,i){let n=document.createElement("td");return n.appendChild(t),"undefined"!==e&&(n.className=e),"undefined"!==i&&(n.width=i),this.currentRow.appendChild(n),this}addColumnText(t,e,i){let n=document.createElement("td");return n.innerText=t,"undefined"!==e&&(n.className=""+e),"undefined"!==i&&(n.width=i),this.currentRow.appendChild(n),this}addColumnHTML(t,e,i){let n=document.createElement("td");return n.innerHTML=t,"undefined"!==e&&(n.className=e),"undefined"!==i&&(n.width=i),this.currentRow.appendChild(n),this}build(){return this.table.appendChild(this.currentRow),this.table}}class a{constructor(t){this.windowObject=t,this.onTriggerContainer=null,this.dropdown=document.createElement("select"),this.dropdown.className="window-select"}build(){let t=document.createElement("div");t.appendChild(this.dropdown),this.onChange();let e=new r("table-relative");return e.addColumnHTML("<h2>"+window.Buttonizer.translate("page_rules.single_name")+(window.Buttonizer.hasPremium()?"":' <span class="buttonizer-premium premium-right">PRO</span>')+"</h2>","table-align-top",""),e.addColumn(t,"","370"),e.newRow(),e.build()}onChange(){this.dropdown.innerHTML="<option>"+window.Buttonizer.translate("page_rules.input_any_page")+"</option>",this.dropdown.readonly=!0,this.dropdown.addEventListener("click",()=>window.Buttonizer.showPremiumPopup(window.Buttonizer.translate("page_rules.pro_description"),"SQnAhyBWLWg"))}}class l{constructor(t){this.windowObject=t,this.onTriggerContainer=null,this.dropdown=document.createElement("select"),this.dropdown.className="window-select"}build(){let t=document.createElement("div");t.appendChild(this.dropdown),this.onChange();let e=new r("table-relative");return e.addColumnHTML("<h2>"+window.Buttonizer.translate("time_schedules.single_name")+(window.Buttonizer.hasPremium()?"":' <span class="buttonizer-premium premium-right">PRO</span>')+"</h2>","table-align-top",""),e.addColumn(t,"","370"),e.newRow(),e.build()}onChange(){this.dropdown.innerHTML="<option>Show on all times</option>",this.dropdown.readonly=!0,this.dropdown.addEventListener("click",()=>window.Buttonizer.showPremiumPopup(window.Buttonizer.translate("time_schedules.pro_description"),"C-B9ITdY6A4"))}}class u{constructor(t){this.windowObject=t}build(){let t=this.buildElements();return window.Buttonizer.hasPremium()||t.addEventListener("click",()=>{window.Buttonizer.showPremiumPopup("With this setting, you can make your button appear/hide after certain amount of time.","V4lvZ15ULWw")}),t}buildElements(){let t=document.createElement("input");t.type="checkbox",t.className="buttonizer-timeout-checkbox",t.checked=void 0!==this.windowObject.objectOwner.data.advanced_timeout&&!isNaN(this.windowObject.objectOwner.data.advanced_timeout)&&this.windowObject.objectOwner.data.advanced_timeout>0;let e=document.createElement("input");e.type="number",e.value=void 0===this.windowObject.objectOwner.data.advanced_timeout?"":this.windowObject.objectOwner.data.advanced_timeout,e.className="window-select",e.placeholder="miliseconds";let i=document.createElement("div");i.innerHTML=` Show Buttonizer after <b>${e.value/1e3}</b> seconds`,window.Buttonizer.hasPremium()||(t.setAttribute("disabled",""),e.setAttribute("readonly",""),e.value="",e.style.opacity="0.5",i.style.opacity="0.5");let n=new r("table-relative");return n.addColumnHTML("<h2>Timeout</h2>"+(window.Buttonizer.hasPremium()?"":'<span class="buttonizer-premium premium-right">PRO</span>')),n.addColumn(t,"","10"),n.addColumn(e,"","360"),n.newRow(),n.addColumnText(""),n.addColumnText(""),n.addColumn(i),n.build()}}class c{constructor(t){this.windowObject=t,this.checkbox,this.input,this.toggle,this.hide,this.toggleHide,this.select,this.info}build(){let t=this.elements().build();return window.Buttonizer.hasPremium()||t.addEventListener("click",()=>{window.Buttonizer.showPremiumPopup("With this setting, you can make your button appear/hide after scrolling for a certain amount.","hh5LBF4C1pg")}),t}elements(){this.checkbox=document.createElement("input"),this.checkbox.type="checkbox",this.checkbox.className="buttonizer-scroll-checkbox",this.input=document.createElement("input"),this.input.type="number",this.input.className="window-select",this.input.placeholder="0",this.toggle=document.createElement("input"),this.toggle.type="checkbox",this.toggle.className="buttonizer-switch",this.toggle.style.display="inline-block",this.hide=document.createElement("div"),this.hide.style.display="inline-block",window.Buttonizer.hasPremium()||(this.hide.innerHTML="Starting visibility: <b>Show</b>"),this.toggleHide=document.createElement("div"),this.toggleHide.appendChild(this.toggle),this.toggleHide.appendChild(this.hide),this.select=document.createElement("select");let t=document.createElement("option");t.value="px",t.innerHTML="px";let e=document.createElement("option");e.value="%",e.innerHTML="%",this.select.classList="window-select",this.select.appendChild(e),this.select.appendChild(t),this.info=document.createElement("div"),this.info.innerHTML=` Scroll <b>${this.input.value<=0?"0":this.input.value} ${this.select.value}</b> from top of page to <b>${"true"==this.windowObject.objectOwner.data.advanced_scroll_hide?"hide":"show"}</b> Buttonizer`,window.Buttonizer.hasPremium()||(this.checkbox.setAttribute("disabled",""),this.input.setAttribute("readonly",""),this.toggle.setAttribute("disabled",""),this.select.setAttribute("disabled",""),this.input.value="",this.input.style.opacity="0.5",this.select.style.opacity="0.5",this.info.style.opacity="0.5",this.toggleHide.style.opacity="0.5");let i=new r("table-relative");return i.addColumnHTML("<h2>Scroll</h2>"+(window.Buttonizer.hasPremium()?"":'<span class="buttonizer-premium premium-right">PRO</span>')),i.addColumn(this.checkbox,"","10"),i.addColumn(this.input,"","284"),i.addColumn(this.select,"","70"),i.newRow(),i.addColumnText(""),i.addColumnText(""),i.addColumn(this.toggleHide),i.newRow(),i.addColumnText(""),i.addColumnText(""),i.addColumn(this.info),i}}class d{constructor(t,e){this.window=HTMLElement,this.body=HTMLElement,this.footer=HTMLElement,this.background=document.createElement("div"),this.background.className="background",this.background.addEventListener("click",()=>{this.hide()}),this.title=document.createElement("div"),this.title.innerHTML=e,this.settings={},this.objectOwner=t,this.menuItems=[],this.buttonFilter=document.createElement("div"),this.build()}header(){let t=document.createElement("div");t.className="header";let e=document.createElement("a");e.className="close-btn",e.href="javascript:void(0)";let i=document.createElement("i");return i.className="fa fa-times",e.appendChild(i),e.addEventListener("click",()=>{this.hide()}),t.appendChild(e),t.appendChild(this.title),t}createBody(){let t=document.createElement("div"),e=document.createElement("div");return e.className="window-menu",this.bodyMenu=e,this.body=document.createElement("div"),this.body.className="window-body",t.appendChild(this.bodyMenu),t.appendChild(this.body),t}build(){let t=document.createElement("div");t.className="buttonizer-settings-window",t.style.display="none",t.style.top="500px",t.appendChild(this.header()),t.appendChild(this.createBody()),t.appendChild(this.background),this.window=t,document.body.appendChild(this.window),jQuery(this.window).draggable({handle:".header",containment:"body",start:()=>this.topMeUp()}),this.window.addEventListener("click",()=>this.topMeUp()),this.afterBuild(),this.render()}addItem(t,e){let i=document.createElement("a");i.href="javascript:void(0)",i.innerHTML=t;let n=document.createElement("div");n.className="body-inner animated pulse",this.menuItems.length>=1&&(n.style.display="none"),n.appendChild(e),i.addEventListener("click",()=>{this.openMenuItem(t)}),0===this.menuItems.length&&i.classList.add("selected"),this.menuItems.push({unique:t,menu:i,body:n}),this.bodyMenu.appendChild(i),this.body.appendChild(n)}openMenuItem(t){for(let e=0;e<this.menuItems.length;e++)this.menuItems[e].unique===t?(this.menuItems[e].menu.classList.add("selected"),this.menuItems[e].body.style.display="block"):(this.menuItems[e].menu.classList.remove("selected"),this.menuItems[e].body.style.display="none")}show(){this.window.style.display="block"}hide(){this.window.style.display="none"}toggle(){"block"===this.window.style.display?this.hide():this.show()}topMeUp(){Buttonizer.windowsZindex!==this.window.style.zIndex&&(Buttonizer.windowsZindex++,this.window.style.zIndex=Buttonizer.windowsZindex)}render(){}afterBuild(){}}class p{constructor(t){this.windowObject=t}build(){let t=document.createElement("input");t.className="window-select",t.placeholder=window.Buttonizer.translate("settings.custom_id.placeholder");let e=new r("table-relative");return e.addColumnHTML("<h2>"+window.Buttonizer.translate("settings.custom_id.title")+" <span class='buttonizer-premium premium-right'>PRO</span></h2>"),t.addEventListener("mousedown",()=>window.Buttonizer.showPremiumPopup(window.Buttonizer.translate("settings.custom_id.pro_description"))),e.addColumn(t,"","370"),e.build()}}class h{constructor(t){this.windowObject=t}build(){let t=document.createElement("input");t.className="window-select",t.placeholder=window.Buttonizer.translate("settings.custom_class.placeholder");let e=new r("table-relative");return e.addColumnHTML("<h2>"+window.Buttonizer.translate("settings.custom_class.title")+" <span class='buttonizer-premium premium-right'>PRO</span></h2>","table-align-top",""),t.addEventListener("mousedown",()=>window.Buttonizer.showPremiumPopup(window.Buttonizer.translate("settings.custom_class.pro_description"))),e.addColumn(t,"","370"),e.build()}}class m extends d{constructor(t){super(t,window.Buttonizer.translate("utils.advanced_settings")+" - "+t.data.name+(window.Buttonizer.hasPremium()?"":" (premium)"))}render(){this.filter(),this.styling(),this.delay()}filter(){let t=document.createElement("div");this.pageRuleSelect=new a(this),this.timeSchedule=new l(this),t.appendChild(this.timeSchedule.build()),t.appendChild(this.pageRuleSelect.build()),super.addItem(window.Buttonizer.translate("settings.button_group_window.filters"),t)}styling(){let t=document.createElement("div");t.appendChild(new h(this).build()),t.appendChild(new p(this).build()),super.addItem(window.Buttonizer.translate("settings.button_group_window.styling"),t)}delay(){let t=document.createElement("div");t.appendChild(new u(this.objectOwner.groupObject.windowObject).build()),t.appendChild(new c(this.objectOwner.groupObject.windowObject).build()),this.addItem("Timeout & Scroll",t),this.menuItems.forEach(t=>{"Timeout & Scroll"===t.unique&&(t.menu.style.display="none")})}}var b=i(4);
74
  /**!
75
  * tippy.js v4.3.0
76
  * (c) 2017-2019 atomiks
77
  * MIT License
78
- */function f(){return(f=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}var w="undefined"!=typeof window&&"undefined"!=typeof document,g=w?navigator.userAgent:"",y=/MSIE |Trident\//.test(g),v=/UCBrowser\//.test(g),_=w&&/iPhone|iPad|iPod/.test(navigator.platform)&&!window.MSStream,k={a11y:!0,allowHTML:!0,animateFill:!0,animation:"shift-away",appendTo:function(){return document.body},aria:"describedby",arrow:!1,arrowType:"sharp",boundary:"scrollParent",content:"",delay:0,distance:10,duration:[325,275],flip:!0,flipBehavior:"flip",flipOnUpdate:!1,followCursor:!1,hideOnClick:!0,ignoreAttributes:!1,inertia:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,lazy:!0,maxWidth:350,multiple:!1,offset:0,onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},placement:"top",popperOptions:{},role:"tooltip",showOnInit:!1,size:"regular",sticky:!1,target:"",theme:"dark",touch:!0,touchHold:!1,trigger:"mouseenter focus",triggerTarget:null,updateDuration:0,wait:null,zIndex:9999},x=["arrow","arrowType","boundary","distance","flip","flipBehavior","flipOnUpdate","offset","placement","popperOptions"],E=w?Element.prototype:{},B=E.matches||E.matchesSelector||E.webkitMatchesSelector||E.mozMatchesSelector||E.msMatchesSelector;function z(t){return[].slice.call(t)}function C(t,e){return j(t,function(t){return B.call(t,e)})}function j(t,e){for(;t;){if(e(t))return t;t=t.parentElement}return null}var S={passive:!0},L=4,O="x-placement",T="x-out-of-boundaries",N="tippy-iOS",A="tippy-active",I=".tippy-popper",M=".tippy-tooltip",q=".tippy-content",H=".tippy-backdrop",P=".tippy-arrow",D=".tippy-roundarrow",F=Object.keys(k);function R(t,e){return{}.hasOwnProperty.call(t,e)}function W(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?i:n}return t}function U(t,e){var i;return function(){var n=this,o=arguments;clearTimeout(i),i=setTimeout(function(){return t.apply(n,o)},e)}}function G(t,e){return t&&t.modifiers&&t.modifiers[e]}function Q(t,e){return t.indexOf(e)>-1}function $(t){return t instanceof Element}function Y(t){return!(!t||!R(t,"isVirtual"))||$(t)}function V(t,e){return"function"==typeof t?t.apply(null,e):t}function X(t,e){t.filter(function(t){return"flip"===t.name})[0].enabled=e}function K(){return document.createElement("div")}function J(t,e){t.forEach(function(t){t&&(t.style.transitionDuration="".concat(e,"ms"))})}function Z(t,e){t.forEach(function(t){t&&t.setAttribute("data-state",e)})}function tt(t,e){var i=f({},e,{content:V(e.content,[t])},e.ignoreAttributes?{}:function(t){return F.reduce(function(e,i){var n=(t.getAttribute("data-tippy-".concat(i))||"").trim();if(!n)return e;if("content"===i)e[i]=n;else try{e[i]=JSON.parse(n)}catch(t){e[i]=n}return e},{})}(t));return(i.arrow||v)&&(i.animateFill=!1),i}function et(t,e){Object.keys(t).forEach(function(t){if(!R(e,t))throw new Error("[tippy]: `".concat(t,"` is not a valid option"))})}function it(t,e){t.innerHTML=e instanceof Element?e.innerHTML:e}function nt(t,e){if(e.content instanceof Element)it(t,""),t.appendChild(e.content);else if("function"!=typeof e.content){t[e.allowHTML?"innerHTML":"textContent"]=e.content}}function ot(t){return{tooltip:t.querySelector(M),backdrop:t.querySelector(H),content:t.querySelector(q),arrow:t.querySelector(P)||t.querySelector(D)}}function st(t){t.setAttribute("data-inertia","")}function rt(t){var e=K();return"round"===t?(e.className="tippy-roundarrow",it(e,'<svg viewBox="0 0 18 7" xmlns="http://www.w3.org/2000/svg"><path d="M0 7s2.021-.015 5.253-4.218C6.584 1.051 7.797.007 9 0c1.203-.007 2.416 1.035 3.761 2.782C16.012 7.005 18 7 18 7H0z"/></svg>')):e.className="tippy-arrow",e}function at(){var t=K();return t.className="tippy-backdrop",t.setAttribute("data-state","hidden"),t}function lt(t,e){t.setAttribute("tabindex","-1"),e.setAttribute("data-interactive","")}function ut(t,e,i){var n=v&&void 0!==document.body.style.webkitTransition?"webkitTransitionEnd":"transitionend";t[e+"EventListener"](n,i)}function ct(t){var e=t.getAttribute(O);return e?e.split("-")[0]:""}function dt(t,e,i){i.split(" ").forEach(function(i){t.classList[e](i+"-theme")})}function pt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.checkHideOnClick,i=t.exclude,n=t.duration;z(document.querySelectorAll(I)).forEach(function(t){var o,s=t._tippy;if(s){var r=!e||!0===s.props.hideOnClick,a=!1;i&&(a=(o=i)._tippy&&!B.call(o,I)?s.reference===i:t===i.popper),r&&!a&&s.hide(n)}})}var ht=!1;function mt(){ht||(ht=!0,_&&document.body.classList.add(N),window.performance&&document.addEventListener("mousemove",ft))}var bt=0;function ft(){var t=performance.now();t-bt<20&&(ht=!1,document.removeEventListener("mousemove",ft),_||document.body.classList.remove(N)),bt=t}function wt(t){if(!(t.target instanceof Element))return pt();var e=C(t.target,I);if(!(e&&e._tippy&&e._tippy.props.interactive)){var i=j(t.target,function(t){return t._tippy&&t._tippy.reference===t});if(i){var n=i._tippy;if(n){var o=Q(n.props.trigger||"","click");if(ht||o)return pt({exclude:i,checkHideOnClick:!0});if(!0!==n.props.hideOnClick||o)return;n.clearDelayTimeouts()}}pt({checkHideOnClick:!0})}}function gt(){var t=document.activeElement;t&&t.blur&&t._tippy&&t.blur()}var yt=1;function vt(t,e){var i,n,o,s,r,a=tt(t,e);if(!a.multiple&&t._tippy)return null;var l,u,c,d,p,h,m=!1,w=!1,g=!1,v=[],_=a.interactiveDebounce>0?U(_t,a.interactiveDebounce):_t,E=yt++,N=function(t,e){var i=K();i.className="tippy-popper",i.id="tippy-".concat(t),i.style.zIndex=""+e.zIndex,e.role&&i.setAttribute("role",e.role);var n=K();n.className="tippy-tooltip",n.style.maxWidth=e.maxWidth+("number"==typeof e.maxWidth?"px":""),n.setAttribute("data-size",e.size),n.setAttribute("data-animation",e.animation),n.setAttribute("data-state","hidden"),dt(n,"add",e.theme);var o=K();return o.className="tippy-content",o.setAttribute("data-state","hidden"),e.interactive&&lt(i,n),e.arrow&&n.appendChild(rt(e.arrowType)),e.animateFill&&(n.appendChild(at()),n.setAttribute("data-animatefill","")),e.inertia&&st(n),nt(o,e),n.appendChild(o),i.appendChild(n),i}(E,a),M=ot(N),q={id:E,reference:t,popper:N,popperChildren:M,popperInstance:null,props:a,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},clearDelayTimeouts:Ot,set:Tt,setContent:function(t){Tt({content:t})},show:Nt,hide:At,enable:function(){q.state.isEnabled=!0},disable:function(){q.state.isEnabled=!1},destroy:function(e){if(q.state.isDestroyed)return;q.state.isMounted&&At(0);bt(),delete t._tippy,delete D()._tippy;var i=q.props.target;i&&e&&$(t)&&z(t.querySelectorAll(i)).forEach(function(t){t._tippy&&t._tippy.destroy()});q.popperInstance&&q.popperInstance.destroy();q.state.isDestroyed=!0}};return t._tippy=q,N._tippy=q,D()._tippy=q,mt(),a.lazy||jt(),a.showOnInit&&St(),a.a11y&&!a.target&&((h=t)instanceof Element&&(!B.call(h,"a[href],area[href],button,details,input,textarea,select,iframe,[tabindex]")||h.hasAttribute("disabled")))&&D().setAttribute("tabindex","0"),N.addEventListener("mouseenter",function(t){q.props.interactive&&q.state.isVisible&&"mouseenter"===i&&St(t,!0)}),N.addEventListener("mouseleave",function(){q.props.interactive&&"mouseenter"===i&&document.addEventListener("mousemove",_)}),q;function H(){document.removeEventListener("mousemove",wt)}function P(){document.body.removeEventListener("mouseleave",Lt),document.removeEventListener("mousemove",_)}function D(){return q.props.triggerTarget||t}function F(){return[q.popperChildren.tooltip,q.popperChildren.backdrop,q.popperChildren.content]}function Y(){return q.props.followCursor&&!ht&&"focus"!==i}function it(t,e){var i=q.popperChildren.tooltip;function n(t){t.target===i&&(ut(i,"remove",n),e())}if(0===t)return e();ut(i,"remove",d),ut(i,"add",n),d=n}function pt(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];D().addEventListener(t,e,i),v.push({eventType:t,handler:e,options:i})}function mt(){q.props.touchHold&&!q.props.target&&(pt("touchstart",gt,S),pt("touchend",kt,S)),q.props.trigger.trim().split(" ").forEach(function(t){if("manual"!==t)if(q.props.target)switch(t){case"mouseenter":pt("mouseover",Et),pt("mouseout",Bt);break;case"focus":pt("focusin",Et),pt("focusout",Bt);break;case"click":pt(t,Et)}else switch(pt(t,gt),t){case"mouseenter":pt("mouseleave",kt);break;case"focus":pt(y?"focusout":"blur",xt)}})}function bt(){v.forEach(function(t){var e=t.eventType,i=t.handler,n=t.options;D().removeEventListener(e,i,n)}),v=[]}function ft(t){return q.props.arrow?p[t]+("round"===q.props.arrowType?18:16):p[t]}function wt(e){var i=n=e,o=i.clientX,s=i.clientY;if(p){var r=t.getBoundingClientRect(),a=q.props.followCursor,l="horizontal"===a,u="vertical"===a,c=ct(N),d=Q(["top","bottom"],c),h=Q(["left","right"],c),m=f({},p);d&&(m.left=ft("left"),m.right=ft("right")),h&&(m.top=ft("top"),m.bottom=ft("bottom"));var b=d?Math.max(m.left,o):o,w=h?Math.max(m.top,s):s;d&&b>m.right&&(b=Math.min(o,window.innerWidth-m.right)),h&&w>m.bottom&&(w=Math.min(s,window.innerHeight-m.bottom)),!j(e.target,function(e){return e===t})&&q.props.interactive||(q.popperInstance.reference=f({},q.popperInstance.reference,{getBoundingClientRect:function(){return{width:0,height:0,top:l?r.top:w,bottom:l?r.bottom:w,left:u?r.left:b,right:u?r.right:b}},clientWidth:0,clientHeight:0}),q.popperInstance.scheduleUpdate()),"initial"===a&&q.state.isVisible&&H()}}function gt(t){q.state.isEnabled&&!zt(t)&&(q.state.isVisible||(i=t.type,t instanceof MouseEvent&&(n=t)),"click"===t.type&&!1!==q.props.hideOnClick&&q.state.isVisible?Lt():St(t))}function _t(e){var i=j(e.target,function(t){return t._tippy});C(e.target,I)===N||i===t||function(t,e,i,n){if(!t)return!0;var o=i.clientX,s=i.clientY,r=n.interactiveBorder,a=n.distance,l=e.top-s>("top"===t?r+a:r),u=s-e.bottom>("bottom"===t?r+a:r),c=e.left-o>("left"===t?r+a:r),d=o-e.right>("right"===t?r+a:r);return l||u||c||d}(ct(N),N.getBoundingClientRect(),e,q.props)&&(P(),Lt())}function kt(t){if(!zt(t))return q.props.interactive?(document.body.addEventListener("mouseleave",Lt),void document.addEventListener("mousemove",_)):void Lt()}function xt(t){t.target===D()&&(q.props.interactive&&t.relatedTarget&&N.contains(t.relatedTarget)||Lt())}function Et(t){C(t.target,q.props.target)&&St(t)}function Bt(t){C(t.target,q.props.target)&&Lt()}function zt(t){var e="ontouchstart"in window,i=Q(t.type,"touch"),n=q.props.touchHold;return e&&ht&&n&&!i||ht&&!n&&i}function Ct(){!g&&c&&(g=!0,function(t){t.offsetHeight}(N),c())}function jt(){var e=q.props.popperOptions,i=q.popperChildren,n=i.tooltip,o=i.arrow,s=G(e,"preventOverflow");function r(t){q.props.flip&&!q.props.flipOnUpdate&&(t.flipped&&(q.popperInstance.options.placement=t.placement),X(q.popperInstance.modifiers,!1)),n.setAttribute(O,t.placement),!1!==t.attributes[T]?n.setAttribute(T,""):n.removeAttribute(T),u&&u!==t.placement&&w&&(n.style.transition="none",requestAnimationFrame(function(){n.style.transition=""})),u=t.placement,w=q.state.isVisible;var e=ct(N),i=n.style;i.top=i.bottom=i.left=i.right="",i[e]=-(q.props.distance-10)+"px";var o=s&&void 0!==s.padding?s.padding:L,r="number"==typeof o,a=f({top:r?o:o.top,bottom:r?o:o.bottom,left:r?o:o.left,right:r?o:o.right},!r&&o);a[e]=r?o+q.props.distance:(o[e]||0)+q.props.distance,q.popperInstance.modifiers.filter(function(t){return"preventOverflow"===t.name})[0].padding=a,p=a}var a=f({eventsEnabled:!1,placement:q.props.placement},e,{modifiers:f({},e?e.modifiers:{},{preventOverflow:f({boundariesElement:q.props.boundary,padding:L},s),arrow:f({element:o,enabled:!!o},G(e,"arrow")),flip:f({enabled:q.props.flip,padding:q.props.distance+L,behavior:q.props.flipBehavior},G(e,"flip")),offset:f({offset:q.props.offset},G(e,"offset"))}),onCreate:function(t){Ct(),r(t),e&&e.onCreate&&e.onCreate(t)},onUpdate:function(t){Ct(),r(t),e&&e.onUpdate&&e.onUpdate(t)}});q.popperInstance=new b.a(t,N,a)}function St(t,i){if(Ot(),!q.state.isVisible){if(q.props.target)return function(t){if(t){var i=C(t.target,q.props.target);i&&!i._tippy&&vt(i,f({},q.props,{content:V(e.content,[i]),appendTo:e.appendTo,target:"",showOnInit:!0}))}}(t);if(m=!0,t&&!i&&q.props.onTrigger(q,t),q.props.wait)return q.props.wait(q,t);Y()&&!q.state.isMounted&&(q.popperInstance||jt(),document.addEventListener("mousemove",wt));var n=W(q.props.delay,0,k.delay);n?o=setTimeout(function(){Nt()},n):Nt()}}function Lt(){if(Ot(),!q.state.isVisible)return H();m=!1;var t=W(q.props.delay,1,k.delay);t?s=setTimeout(function(){q.state.isVisible&&At()},t):r=requestAnimationFrame(function(){At()})}function Ot(){clearTimeout(o),clearTimeout(s),cancelAnimationFrame(r)}function Tt(e){et(e=e||{},k),bt(),q.props.triggerTarget&&delete q.props.triggerTarget._tippy;var i=q.props,o=tt(t,f({},q.props,e,{ignoreAttributes:!0}));o.ignoreAttributes=R(e,"ignoreAttributes")?e.ignoreAttributes||!1:i.ignoreAttributes,q.props=o,D()._tippy=q,mt(),P(),_=U(_t,e.interactiveDebounce||0),function(t,e,i){var n=ot(t),o=n.tooltip,s=n.content,r=n.backdrop,a=n.arrow;t.style.zIndex=""+i.zIndex,o.setAttribute("data-size",i.size),o.setAttribute("data-animation",i.animation),o.style.maxWidth=i.maxWidth+("number"==typeof i.maxWidth?"px":""),i.role?t.setAttribute("role",i.role):t.removeAttribute("role"),e.content!==i.content&&nt(s,i),!e.animateFill&&i.animateFill?(o.appendChild(at()),o.setAttribute("data-animatefill","")):e.animateFill&&!i.animateFill&&(o.removeChild(r),o.removeAttribute("data-animatefill")),!e.arrow&&i.arrow?o.appendChild(rt(i.arrowType)):e.arrow&&!i.arrow&&o.removeChild(a),e.arrow&&i.arrow&&e.arrowType!==i.arrowType&&o.replaceChild(rt(i.arrowType),a),!e.interactive&&i.interactive?lt(t,o):e.interactive&&!i.interactive&&function(t,e){t.removeAttribute("tabindex"),e.removeAttribute("data-interactive")}(t,o),!e.inertia&&i.inertia?st(o):e.inertia&&!i.inertia&&function(t){t.removeAttribute("data-inertia")}(o),e.theme!==i.theme&&(dt(o,"remove",e.theme),dt(o,"add",i.theme))}(N,i,o),q.popperChildren=ot(N),q.popperInstance&&(q.popperInstance.update(),x.some(function(t){return R(e,t)&&e[t]!==i[t]})&&(q.popperInstance.destroy(),jt(),q.state.isVisible&&q.popperInstance.enableEventListeners(),q.props.followCursor&&n&&wt(n)))}function Nt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W(q.props.duration,0,k.duration[1]);if(!q.state.isDestroyed&&q.state.isEnabled&&(!ht||q.props.touch)&&!D().hasAttribute("disabled")&&!1!==q.props.onShow(q)){N.style.visibility="visible",q.state.isVisible=!0,q.props.interactive&&D().classList.add(A);var i=F();J(i.concat(N),0),c=function(){q.state.isVisible&&(Y()||q.popperInstance.update(),q.popperChildren.backdrop&&(q.popperChildren.content.style.transitionDelay=Math.round(e/12)+"ms"),q.props.sticky&&(J([N],y?0:q.props.updateDuration),function t(){q.popperInstance.scheduleUpdate(),q.state.isMounted?requestAnimationFrame(t):J([N],0)}()),J([N],q.props.updateDuration),J(i,e),Z(i,"visible"),function(t,e){it(t,e)}(e,function(){q.props.aria&&D().setAttribute("aria-".concat(q.props.aria),N.id),q.props.onShown(q),q.state.isShown=!0}))},function(){g=!1;var e=!(Y()||"initial"===q.props.followCursor&&ht);q.popperInstance?(Y()||(q.popperInstance.scheduleUpdate(),e&&q.popperInstance.enableEventListeners()),X(q.popperInstance.modifiers,q.props.flip)):(jt(),e&&q.popperInstance.enableEventListeners()),q.popperInstance.reference=t;var i=q.popperChildren.arrow;Y()?(i&&(i.style.margin="0"),n&&wt(n)):i&&(i.style.margin=""),ht&&n&&"initial"===q.props.followCursor&&(wt(n),i&&(i.style.margin="0"));var o=q.props.appendTo;(l="parent"===o?t.parentNode:V(o,[t])).contains(N)||(l.appendChild(N),q.props.onMount(q),q.state.isMounted=!0)}()}}function At(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W(q.props.duration,1,k.duration[1]);if(!q.state.isDestroyed&&q.state.isEnabled&&!1!==q.props.onHide(q)){N.style.visibility="hidden",q.state.isVisible=!1,q.state.isShown=!1,w=!1,q.props.interactive&&D().classList.remove(A);var e=F();J(e,t),Z(e,"hidden"),function(t,e){it(t,function(){!q.state.isVisible&&l&&l.contains(N)&&e()})}(t,function(){m||H(),q.props.aria&&D().removeAttribute("aria-".concat(q.props.aria)),q.popperInstance.disableEventListeners(),q.popperInstance.options.placement=q.props.placement,l.removeChild(N),q.props.onHidden(q),q.state.isMounted=!1})}}}var _t=!1;function kt(t,e){et(e||{},k),_t||(document.addEventListener("click",wt,!0),document.addEventListener("touchstart",mt,S),window.addEventListener("blur",gt),_t=!0);var i,n=f({},k,e);i=t,"[object Object]"!=={}.toString.call(i)||i.addEventListener||function(t){var e={isVirtual:!0,attributes:t.attributes||{},setAttribute:function(e,i){t.attributes[e]=i},getAttribute:function(e){return t.attributes[e]},removeAttribute:function(e){delete t.attributes[e]},hasAttribute:function(e){return e in t.attributes},addEventListener:function(){},removeEventListener:function(){},classList:{classNames:{},add:function(e){t.classList.classNames[e]=!0},remove:function(e){delete t.classList.classNames[e]},contains:function(e){return e in t.classList.classNames}}};for(var i in e)t[i]=e[i]}(t);var o=function(t){if(Y(t))return[t];if(t instanceof NodeList)return z(t);if(Array.isArray(t))return t;try{return z(document.querySelectorAll(t))}catch(t){return[]}}(t).reduce(function(t,e){var i=e&&vt(e,n);return i&&t.push(i),t},[]);return Y(t)?o[0]:o}kt.version="4.3.0",kt.defaults=k,kt.setDefaults=function(t){Object.keys(t).forEach(function(e){k[e]=t[e]})},kt.hideAll=pt,kt.group=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.delay,n=void 0===i?t[0].props.delay:i,o=e.duration,s=void 0===o?0:o,r=!1;function a(t){r=t,d()}function l(e){e._originalProps.onShow(e),t.forEach(function(t){t.set({duration:s}),t.hide()}),a(!0)}function u(t){t._originalProps.onHide(t),a(!1)}function c(t){t._originalProps.onShown(t),t.set({duration:t._originalProps.duration})}function d(){t.forEach(function(t){t.set({onShow:l,onShown:c,onHide:u,delay:r?[0,Array.isArray(n)?n[1]:n]:n,duration:r?s:t._originalProps.duration})})}t.forEach(function(t){t._originalProps?t.set(t._originalProps):t._originalProps=f({},t.props)}),d()},w&&setTimeout(function(){z(document.querySelectorAll("[data-tippy]")).forEach(function(t){var e=t.getAttribute("data-tippy");e&&kt(t,{content:e})})}),function(t){if(w){var e=document.createElement("style");e.type="text/css",e.textContent=t;var i=document.head,n=i.firstChild;n?i.insertBefore(e,n):i.appendChild(e)}}('.tippy-iOS{cursor:pointer!important;-webkit-tap-highlight-color:transparent}.tippy-popper{transition-timing-function:cubic-bezier(.165,.84,.44,1);max-width:calc(100% - 8px);pointer-events:none;outline:0}.tippy-popper[x-placement^=top] .tippy-backdrop{border-radius:40% 40% 0 0}.tippy-popper[x-placement^=top] .tippy-roundarrow{bottom:-7px;bottom:-6.5px;-webkit-transform-origin:50% 0;transform-origin:50% 0;margin:0 3px}.tippy-popper[x-placement^=top] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.tippy-popper[x-placement^=top] .tippy-arrow{border-top:8px solid #333;border-right:8px solid transparent;border-left:8px solid transparent;bottom:-7px;margin:0 3px;-webkit-transform-origin:50% 0;transform-origin:50% 0}.tippy-popper[x-placement^=top] .tippy-backdrop{-webkit-transform-origin:0 25%;transform-origin:0 25%}.tippy-popper[x-placement^=top] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-55%);transform:scale(1) translate(-50%,-55%)}.tippy-popper[x-placement^=top] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-50%,-45%);transform:scale(.2) translate(-50%,-45%);opacity:0}.tippy-popper[x-placement^=top] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateY(-20px);transform:translateY(-20px)}.tippy-popper[x-placement^=top] [data-animation=perspective]{-webkit-transform-origin:bottom;transform-origin:bottom}.tippy-popper[x-placement^=top] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateY(-10px) rotateX(0);transform:perspective(700px) translateY(-10px) rotateX(0)}.tippy-popper[x-placement^=top] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateY(0) rotateX(60deg);transform:perspective(700px) translateY(0) rotateX(60deg)}.tippy-popper[x-placement^=top] [data-animation=fade][data-state=visible]{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateY(0);transform:translateY(0)}.tippy-popper[x-placement^=top] [data-animation=scale]{-webkit-transform-origin:bottom;transform-origin:bottom}.tippy-popper[x-placement^=top] [data-animation=scale][data-state=visible]{-webkit-transform:translateY(-10px) scale(1);transform:translateY(-10px) scale(1)}.tippy-popper[x-placement^=top] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateY(-10px) scale(.5);transform:translateY(-10px) scale(.5)}.tippy-popper[x-placement^=bottom] .tippy-backdrop{border-radius:0 0 30% 30%}.tippy-popper[x-placement^=bottom] .tippy-roundarrow{top:-7px;-webkit-transform-origin:50% 100%;transform-origin:50% 100%;margin:0 3px}.tippy-popper[x-placement^=bottom] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(0);transform:rotate(0)}.tippy-popper[x-placement^=bottom] .tippy-arrow{border-bottom:8px solid #333;border-right:8px solid transparent;border-left:8px solid transparent;top:-7px;margin:0 3px;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}.tippy-popper[x-placement^=bottom] .tippy-backdrop{-webkit-transform-origin:0 -50%;transform-origin:0 -50%}.tippy-popper[x-placement^=bottom] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-45%);transform:scale(1) translate(-50%,-45%)}.tippy-popper[x-placement^=bottom] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-50%);transform:scale(.2) translate(-50%);opacity:0}.tippy-popper[x-placement^=bottom] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateY(20px);transform:translateY(20px)}.tippy-popper[x-placement^=bottom] [data-animation=perspective]{-webkit-transform-origin:top;transform-origin:top}.tippy-popper[x-placement^=bottom] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateY(10px) rotateX(0);transform:perspective(700px) translateY(10px) rotateX(0)}.tippy-popper[x-placement^=bottom] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateY(0) rotateX(-60deg);transform:perspective(700px) translateY(0) rotateX(-60deg)}.tippy-popper[x-placement^=bottom] [data-animation=fade][data-state=visible]{-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateY(0);transform:translateY(0)}.tippy-popper[x-placement^=bottom] [data-animation=scale]{-webkit-transform-origin:top;transform-origin:top}.tippy-popper[x-placement^=bottom] [data-animation=scale][data-state=visible]{-webkit-transform:translateY(10px) scale(1);transform:translateY(10px) scale(1)}.tippy-popper[x-placement^=bottom] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateY(10px) scale(.5);transform:translateY(10px) scale(.5)}.tippy-popper[x-placement^=left] .tippy-backdrop{border-radius:50% 0 0 50%}.tippy-popper[x-placement^=left] .tippy-roundarrow{right:-12px;-webkit-transform-origin:33.33333333% 50%;transform-origin:33.33333333% 50%;margin:3px 0}.tippy-popper[x-placement^=left] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.tippy-popper[x-placement^=left] .tippy-arrow{border-left:8px solid #333;border-top:8px solid transparent;border-bottom:8px solid transparent;right:-7px;margin:3px 0;-webkit-transform-origin:0 50%;transform-origin:0 50%}.tippy-popper[x-placement^=left] .tippy-backdrop{-webkit-transform-origin:50% 0;transform-origin:50% 0}.tippy-popper[x-placement^=left] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-50%);transform:scale(1) translate(-50%,-50%)}.tippy-popper[x-placement^=left] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-75%,-50%);transform:scale(.2) translate(-75%,-50%);opacity:0}.tippy-popper[x-placement^=left] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateX(-20px);transform:translateX(-20px)}.tippy-popper[x-placement^=left] [data-animation=perspective]{-webkit-transform-origin:right;transform-origin:right}.tippy-popper[x-placement^=left] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateX(-10px) rotateY(0);transform:perspective(700px) translateX(-10px) rotateY(0)}.tippy-popper[x-placement^=left] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateX(0) rotateY(-60deg);transform:perspective(700px) translateX(0) rotateY(-60deg)}.tippy-popper[x-placement^=left] [data-animation=fade][data-state=visible]{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateX(0);transform:translateX(0)}.tippy-popper[x-placement^=left] [data-animation=scale]{-webkit-transform-origin:right;transform-origin:right}.tippy-popper[x-placement^=left] [data-animation=scale][data-state=visible]{-webkit-transform:translateX(-10px) scale(1);transform:translateX(-10px) scale(1)}.tippy-popper[x-placement^=left] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateX(-10px) scale(.5);transform:translateX(-10px) scale(.5)}.tippy-popper[x-placement^=right] .tippy-backdrop{border-radius:0 50% 50% 0}.tippy-popper[x-placement^=right] .tippy-roundarrow{left:-12px;-webkit-transform-origin:66.66666666% 50%;transform-origin:66.66666666% 50%;margin:3px 0}.tippy-popper[x-placement^=right] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.tippy-popper[x-placement^=right] .tippy-arrow{border-right:8px solid #333;border-top:8px solid transparent;border-bottom:8px solid transparent;left:-7px;margin:3px 0;-webkit-transform-origin:100% 50%;transform-origin:100% 50%}.tippy-popper[x-placement^=right] .tippy-backdrop{-webkit-transform-origin:-50% 0;transform-origin:-50% 0}.tippy-popper[x-placement^=right] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-50%);transform:scale(1) translate(-50%,-50%)}.tippy-popper[x-placement^=right] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-25%,-50%);transform:scale(.2) translate(-25%,-50%);opacity:0}.tippy-popper[x-placement^=right] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateX(20px);transform:translateX(20px)}.tippy-popper[x-placement^=right] [data-animation=perspective]{-webkit-transform-origin:left;transform-origin:left}.tippy-popper[x-placement^=right] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateX(10px) rotateY(0);transform:perspective(700px) translateX(10px) rotateY(0)}.tippy-popper[x-placement^=right] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateX(0) rotateY(60deg);transform:perspective(700px) translateX(0) rotateY(60deg)}.tippy-popper[x-placement^=right] [data-animation=fade][data-state=visible]{-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateX(0);transform:translateX(0)}.tippy-popper[x-placement^=right] [data-animation=scale]{-webkit-transform-origin:left;transform-origin:left}.tippy-popper[x-placement^=right] [data-animation=scale][data-state=visible]{-webkit-transform:translateX(10px) scale(1);transform:translateX(10px) scale(1)}.tippy-popper[x-placement^=right] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateX(10px) scale(.5);transform:translateX(10px) scale(.5)}.tippy-tooltip{position:relative;color:#fff;border-radius:.25rem;font-size:.875rem;padding:.3125rem .5625rem;line-height:1.4;text-align:center;background-color:#333}.tippy-tooltip[data-size=small]{padding:.1875rem .375rem;font-size:.75rem}.tippy-tooltip[data-size=large]{padding:.375rem .75rem;font-size:1rem}.tippy-tooltip[data-animatefill]{overflow:hidden;background-color:transparent}.tippy-tooltip[data-interactive],.tippy-tooltip[data-interactive] path{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-tooltip[data-inertia][data-state=hidden]{transition-timing-function:ease}.tippy-arrow,.tippy-roundarrow{position:absolute;width:0;height:0}.tippy-roundarrow{width:18px;height:7px;fill:#333;pointer-events:none}.tippy-backdrop{position:absolute;background-color:#333;border-radius:50%;width:calc(110% + 2rem);left:50%;top:50%;z-index:-1;transition:all cubic-bezier(.46,.1,.52,.98);-webkit-backface-visibility:hidden;backface-visibility:hidden}.tippy-backdrop:after{content:"";float:left;padding-top:100%}.tippy-backdrop+.tippy-content{transition-property:opacity;will-change:opacity}.tippy-backdrop+.tippy-content[data-state=visible]{opacity:1}.tippy-backdrop+.tippy-content[data-state=hidden]{opacity:0}');var xt=kt;var Et=class{constructor(t){this.buttonObject=t,this.buttonObject.stylingObject=this,this.groupHolder=null,this.buttonTitle=null,this.manageButtonMenu=null}build(){let t=document.createElement("div");return t.className="button-group-holder",t.appendChild(this.createTitleField()),t.appendChild(this.createButtonMobileDesktop()),t.appendChild(this.createButtonHolderButton()),t.appendChild(this.createQuickMenu()),this.groupHolder=t,t}createButtonHolderButton(){let t=document.createElement("a");t.href="javascript:void(0)",t.className="holder-button";let e=document.createElement("i");return e.className="fas fa-ellipsis-v",t.appendChild(e),t.addEventListener("click",()=>{let t=this.groupHolder.className.indexOf("holder-show-quick-menu");jQuery(".holder-show-quick-menu").removeClass("holder-show-quick-menu"),-1===t&&this.groupHolder.classList.add("holder-show-quick-menu")}),t}createQuickMenu(){let t=document.createElement("div");return t.className="group-holder-quick-menu",t.addEventListener("click",()=>{this.groupHolder.classList.remove("holder-show-quick-menu")}),t.appendChild(this.createQuickMenuButton("fas fa-wrench",window.Buttonizer.translate("common.settings"),()=>this.revealSettings(),"settings")),t.appendChild(this.createQuickMenuButton("fas fa-cog",window.Buttonizer.translate("utils.advanced_settings"),()=>this.buttonObject.windowObject.toggle(),window.Buttonizer.hasPremium()?"":"buttonizer-premium-gray-out")),t.appendChild(this.createQuickMenuButton("fas fa-pencil-alt",window.Buttonizer.translate("utils.rename"),()=>this.buttonRename(),"")),t.appendChild(this.createQuickMenuButton("far fa-copy",window.Buttonizer.translate("utils.duplicate"),()=>this.buttonDuplicate(),"")),t.appendChild(this.createQuickMenuButton("far fa-trash-alt",window.Buttonizer.translate("utils.delete"),()=>this.buttonDelete(),"delete")),this.manageButtonMenu=t,t}createQuickMenuButton(t,e,i,n=""){let o=document.createElement("a");o.href="javascript:void(0)",o.className=n;let s=document.createElement("i");return s.className=t,o.appendChild(s),o.innerHTML+=e,o.addEventListener("click",t=>i(t)),o}createTitleField(){let t=document.createElement("div");t.className+="button-title-holder";let e=document.createElement("input");e.type="text",e.className="group-title",e.value=this.buttonObject.data.name,e.setAttribute("readonly",""),e.id="buttonizer-button-title";let i=document.createElement("a");return i.href="javascript:void(0)",i.className="group-rename",i.innerHTML="<i class='fa fa-pencil-alt'></i>",e.addEventListener("change",()=>this.updateTitle()),e.addEventListener("keyup",t=>{13===t.keyCode?this.updateTitle():27===t.keyCode&&(e.value=this.buttonObject.data.name,e.setAttribute("readonly",""))}),e.addEventListener("click",t=>{jQuery(".holder-show-quick-menu").removeClass("holder-show-quick-menu"),t.isTrusted&&e.hasAttribute("readonly")&&this.revealSettings()}),this.buttonTitle=e,t.appendChild(e),t.appendChild(i),e}updateTitle(){this.buttonObject.data.name=this.buttonTitle.value,window.Buttonizer.buttonChanges=!0,this.buttonTitle.setAttribute("readonly","")}buttonRename(){this.buttonTitle.hasAttribute("readonly")&&(this.buttonTitle.removeAttribute("readonly"),this.buttonTitle.focus())}buttonDelete(){1!==this.buttonObject.groupObject.getButtonsAlive()?new s({title:window.Buttonizer.translate("bar.buttons.delete_button.window_title_button"),content:"<p>"+window.Buttonizer.translate("bar.buttons.delete_button.question_remove_button").format(this.buttonObject.data.name)+"</p>",onConfirm:()=>{this.buttonObject.removeButton()},buttons:[{text:window.Buttonizer.translate("modal.changed_my_mind"),close:!0,focus:!0},{text:window.Buttonizer.translate("utils.delete"),confirm:!0}]}):new s({title:window.Buttonizer.translate("bar.buttons.delete_button.window_title_button"),content:"<p>"+window.Buttonizer.translate("bar.buttons.delete_button.cannot_delete")+"</p>",buttons:[{text:window.Buttonizer.translate("modal.close"),close:!0,focus:!0,confirm:!0}]})}buttonDuplicate(){let t=new RegExp(this.buttonObject.data.name+" - Copy \\([0-9]+\\)"),e=this.buttonObject.data.name+" - Copy";for(let i=0;i<this.buttonObject.groupObject.buttons.length;i++)if(this.buttonObject.groupObject.buttons[i].data.name.match(t)){let n=this.buttonObject.groupObject.buttons[i].data.name.match(t).toString().match(/- Copy \([0-9]+\)/).toString(),o=parseInt(n.replace(/\D/g,""));e=this.buttonObject.data.name+` - Copy (${o+1})`}else this.buttonObject.groupObject.buttons[i].data.name!==e||this.buttonObject.groupObject.buttons[i].data.name.match(t)||(e+=" (2)");let i={};for(let t in this.buttonObject.data)i[t]=this.buttonObject.data[t];i.name=e,new we(this.buttonObject.groupObject,i),window.Buttonizer.buttonChanges=!0}createButtonMobileDesktop(){let t=document.createElement("a");t.href="javascript:void(0)",t.className="mobile-desktop",t.innerHTML="&nbsp;";let e=document.createElement("i");e.className="mobile-preview",e.innerHTML='<i class="fa fa-mobile-alt"></i>';let i=document.createElement("i");i.className="desktop-preview",i.innerHTML='<i class="fa fa-desktop"></i>',"true"!==this.buttonObject.data.show_mobile&&void 0!==this.buttonObject.data.show_mobile||(e.className+=" selected"),"true"!==this.buttonObject.data.show_desktop&&void 0!==this.buttonObject.data.show_desktop||(i.className+=" selected");let n=document.createElement("div");return n.className="new-button-visibility",n.appendChild(this.createMobile(e)),n.appendChild(this.createDesktop(i)),t.appendChild(n),t.appendChild(e),t.appendChild(i),t}createMobile(t){let e=document.createElement("a");e.href="javascript:void(0)",e.className="visibility-deskmobi";let i=document.createElement("i");return i.className="fa fa-mobile-alt",e.appendChild(i),this.buttonObject.registerUI("show_mobile",{update:i=>{!0===i||"true"===i?(e.classList.add("selected"),t.classList.add("selected")):(e.classList.remove("selected"),t.classList.remove("selected"))}}),this.buttonObject.getUI("show_mobile").forEach(t=>t.update(this.buttonObject.get("show_mobile"))),e.addEventListener("click",()=>{let t=this.buttonObject.get("show_mobile",!0);this.buttonObject.set("show_mobile",!(!0===t||"true"===t))}),e}createDesktop(t){let e=document.createElement("a");e.href="javascript:void(0)",e.className="visibility-deskmobi";let i=document.createElement("i");return i.className="fa fa-desktop",e.appendChild(i),this.buttonObject.registerUI("show_desktop",{update:i=>{!0===i||"true"===i?(e.classList.add("selected"),t.classList.add("selected")):(e.classList.remove("selected"),t.classList.remove("selected"))}}),this.buttonObject.getUI("show_desktop").forEach(t=>t.update(this.buttonObject.get("show_desktop"))),e.addEventListener("click",()=>{let t=this.buttonObject.get("show_desktop",!0);this.buttonObject.set("show_desktop",!(!0===t||"true"===t))}),e}revealSettings(){this.buttonObject.revealSettings()}};class Bt{constructor(t){this.state=void 0!==t.state&&"true"==t.state,this.onChange=void 0===t.onChange?function(){console.log("FormBoolean: No binding. Use FormBoolean.onChange()")}:t.onChange,this.disabled=void 0!==t.disabled&&t.disabled,this.visible=void 0===t.visible||t.visible,this.element=HTMLElement}build(){this.element=document.createElement("a"),this.element.href="javascript:void(0)",this.element.className="buttonizer-boolean "+(!0===this.state?"boolean-selected":""),this.element.addEventListener("click",()=>this.toggle());let t=document.createElement("div");return t.className="buttonizer-boolean-circle",this.element.appendChild(t),this.element}hide(){this.element.style.display="none"}show(){this.element.style.display="block"}onToggle(t){this.onChange=t}toggle(){this.disabled?console.log("Sorry, you're not able to edit this"):(this.state=!this.state,!0===this.state?this.element.classList.add("boolean-selected"):this.element.classList.remove("boolean-selected"),this.onChange(this.state))}}class zt{constructor(t,e,i){this.title=t,this.settingHolderContent=e,this.className=void 0!==i&&i}build(){let t=document.createElement("div");t.className="buttonizer-setting-row "+(!1===this.className?"":this.className),t.style.marginTop="10px";let e=document.createElement("div");e.className="buttonizer-setting-row-c1",e.innerHTML=this.title;let i=document.createElement("div");return i.className="buttonizer-setting-row-c2",i.appendChild(this.settingHolderContent),t.appendChild(e),t.appendChild(i),t}}class Ct{constructor(t){this.buttonAction=t}build(t){let e=this.buttonAction.inputText();return e.placeholder=void 0===t?"https://www.domain.ltd/page ":t,e.addEventListener("keyup",()=>this.change(e.value)),""!==this.buttonAction.value&&(e.value=this.buttonAction.value),e}change(t){this.valid(t)&&this.buttonAction.removeError(),this.buttonAction.updateButtonActionValue(t)}valid(t){let e=!1;return/(http|https):\/\/(\w+:{0,1}\w*)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%!\-\/]))?/.test(t)||"?"===t.substring(0,1)||"#"===t.substring(0,1)?-1===t.indexOf("https://")&&"#"!==t.substring(0,1)&&(e="<p>"+window.Buttonizer.translate("settings.button_action.actions.url.insecure")+'</p><p><a href="https://community.buttonizer.pro/knowledgebase/19" target="_blank" style="text-decoration: none;">More info &raquo;</a></p>'):e="<p>"+window.Buttonizer.translate("settings.button_action.actions.url.invalid")+"</p><p>"+window.Buttonizer.translate("settings.button_action.actions.url.invalid_tip")+"</p>",!1===e||(this.buttonAction.addError(e),!1)}}class jt{constructor(t,e=!1){this.buttonAction=t,this.numbersOnly=e}build(t){let e=document.createElement("div"),i=this.buttonAction.inputText();return i.placeholder=void 0===t?"Add text here":t,i.addEventListener("keyup",()=>this.change(i.value)),""!==this.buttonAction.value&&(i.value=this.buttonAction.value),e.appendChild(i),this.numbersOnly&&(this.numbersOnlyField=document.createElement("div"),this.numbersOnlyField.className="field-error",this.numbersOnlyField.innerHTML=window.Buttonizer.translate("warnings.only_numbers"),this.numbersOnlyField.style.display="none",e.appendChild(this.numbersOnlyField)),e}change(t){this.numbersOnly&&(isNaN(t)?this.numbersOnlyField.style.display="block":this.numbersOnlyField.style.display="none"),this.buttonAction.updateButtonActionValue(t)}}class St{constructor(t){this.buttonAction=t}build(){let t=this.buttonAction.inputText();return t.placeholder="(000) 123 456 78",t.addEventListener("keyup",()=>this.change(t.value)),""!==this.buttonAction.value&&(t.value=this.buttonAction.value),t}change(t){this.valid(t)&&this.buttonAction.removeError(),this.buttonAction.updateButtonActionValue(t)}valid(t){let e=!1;return t=(t=t.replace("+","")).replace(" ",""),/^(?=.*\d)[\d ]+$/.test(t)||(e="<p>"+window.Buttonizer.translate("warnings.invalid_phone_number")+"</p>"),!1===e||(this.buttonAction.addError(e),!1)}}class Lt{constructor(t){this.buttonAction=t}build(){let t=this.buttonAction.inputText();return t.placeholder="account@domain.tld",t.addEventListener("keyup",()=>this.change(t.value)),""!==this.buttonAction.value&&(t.value=this.buttonAction.value),t}change(t){this.valid(t)&&this.buttonAction.removeError(),this.buttonAction.updateButtonActionValue(t)}valid(t){let e=!1;return t=(t=t.replace("+","")).replace(" ",""),/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,10})+$/.test(t)||(e="<p>"+window.Buttonizer.translate("warnings.invalid_email")+"</p>"),!1===e||(this.buttonAction.addError(e),!1)}}i(6);class Ot{constructor(t){this.buttonAction=t}build(){let t=document.createElement("select");return t.className="buttonizer-select-action",t.appendChild(this.add("facebook",window.Buttonizer.translate("settings.button_action.actions.share_page_on").format("Facebook"))),t.appendChild(this.add("twitter",window.Buttonizer.translate("settings.button_action.actions.share_page_on").format("Twitter"))),t.appendChild(this.add("whatsapp",window.Buttonizer.translate("settings.button_action.actions.share_page_on").format("Whatsapp"))),t.appendChild(this.add("linkedin",window.Buttonizer.translate("settings.button_action.actions.share_page_on").format("LinkedIn"))),t.appendChild(this.add("pinterest",window.Buttonizer.translate("settings.button_action.actions.share_page_on").format("Pinterest"))),t.appendChild(this.add("mail",window.Buttonizer.translate("settings.button_action.actions.share_page_via").format("email"))),t.addEventListener("change",()=>{this.buttonAction.updateButtonActionValue(t.value)}),t}add(t,e){let i=document.createElement("option");return i.text=e,t===this.buttonAction.value&&(i.selected=!0),i.value=t,i}}class Tt{constructor(t){this.element=document.createElement("div"),this.errorElement=document.createElement("div"),this.buttonSettingsObject=t,this.dropdown=null,this.value=void 0!==this.buttonSettingsObject.buttonObject.data.action?this.buttonSettingsObject.buttonObject.data.action:""}build(){this.element.style.marginTop="10px",this.dropdown=document.createElement("select"),this.dropdown.style.width="199px",this.dropdown.className="buttonizer-select-action",this.dropdown.appendChild(this.selectGroup(window.Buttonizer.translate("settings.button_action.actions.group_popular"),[{value:"url",text:"Website URL"},{value:"phone",text:window.Buttonizer.translate("settings.button_action.actions.phone_number")},{value:"mail",text:window.Buttonizer.translate("settings.button_action.actions.mail")},{value:"whatsapp",text:"WhatsApp chat"},{value:"backtotop",text:window.Buttonizer.translate("settings.button_action.actions.back_to_top")},{value:"gobackpage",text:window.Buttonizer.translate("settings.button_action.actions.go_back_one_page")},{value:"socialsharing",text:"Social Sharing"},{value:"javascript_pro",text:"Javascript function"}])),this.dropdown.appendChild(this.selectGroup(window.Buttonizer.translate("settings.button_action.actions.group_chat"),[{value:"sms",text:"SMS"},{value:"messenger_chat",text:"Facebook Messenger Chat Widget"},{value:"messenger",text:"Facebook Messenger Link"},{value:"twitter_dm",text:"Twitter DM"},{value:"skype",text:"Skype"},{value:"snapchat",text:"Snapchat"},{value:"line",text:"LINE"},{value:"telegram",text:"Telegram"},{value:"wechat",text:"WeChat"},{value:"viber",text:"Viber"}])),this.dropdown.appendChild(this.selectGroup(window.Buttonizer.translate("settings.button_action.actions.group_social_media"),[{value:"facebook",text:"Facebook"},{value:"twitter",text:"Twitter"},{value:"instagram",text:"Instagram"},{value:"linkedin",text:"LinkedIn"},{value:"vk",text:"VKontakte"},{value:"poptin",text:"Poptin"},{value:"waze",text:"Waze"}])),this.dropdown.appendChild(this.selectGroup(window.Buttonizer.translate("settings.button_action.actions.group_popup"),[{value:"poptin",text:"Poptin"},{value:"elementor_popup",text:"Elementor Popup"},{value:"popup_maker",text:"Popup Maker"}]));let t=document.createElement("div");return xt(t.appendChild(new zt("<label for='label-always-open'>"+window.Buttonizer.translate("settings.button_action.title")+"</label>",this.dropdown).build()).firstChild.firstChild,{content:window.Buttonizer.translate("settings.button_action.description"),animation:"shift-away",arrow:!0,hideOnClick:!1}),t.appendChild(this.element),t.appendChild(this.errorElement),this.changeForm(this.buttonSettingsObject.buttonObject.data.type),jQuery(this.dropdown).chosen({placeholder_text_single:window.Buttonizer.translate("settings.button_action.select"),no_results_text:window.Buttonizer.translate("settings.button_action.search_not_found"),hide_results_on_select:!1}).change(()=>this.update(this.dropdown.value)),t}add(t,e){let i=document.createElement("option");return i.text=e,t===this.buttonSettingsObject.buttonObject.data.type&&(i.selected=!0),-1===t.indexOf("pro")||window.Buttonizer.hasPremium()?i.value=t:(i.disabled=!0,i.text+=" (PRO ONLY)"),i}update(t,e=!1){if("javascript_pro"===this.buttonSettingsObject.buttonObject.data.type&&"javascript_pro"!==t){if(!e)return void new s({title:"<i class='fas fa-exclamation window-icon'></i> "+window.Buttonizer.translate("settings.button_action.actions.javascript.warning_modal_title"),content:"<p>"+window.Buttonizer.translate("settings.button_action.actions.javascript.warning_intro")+"</p><p>"+window.Buttonizer.translate("settings.button_action.actions.javascript.warning_question")+"</p>",class:"warning-red",buttons:[{text:window.Buttonizer.translate("modal.changed_my_mind"),close:!0,focus:!0,cancel:!0},{text:window.Buttonizer.translate("modal.yes_please"),close:!0,confirm:!0}],onConfirm:()=>{this.value="",this.update(t,!0)},onCancel:()=>{this.buttonSettingsObject.buttonObject.data.type="javascript_pro",jQuery(this.dropdown).val("javascript_pro")}})}else"socialsharing"===t?this.buttonSettingsObject.buttonObject.data.action="facebook":"socialsharing"===this.buttonSettingsObject.buttonObject.data.type&&(this.value="");this.buttonSettingsObject.buttonObject.data.type=t,window.Buttonizer.buttonChanges=!0,this.removeError(),this.changeForm(t)}updateButtonActionValue(t){this.buttonSettingsObject.buttonObject.data.action=t,window.Buttonizer.buttonChanges=!0,this.value=t}changeForm(t){this.element.innerHTML="";let e=new Bt({state:void 0===typeof this.buttonSettingsObject.buttonObject.data.action_new_tab?"false":this.buttonSettingsObject.buttonObject.data.action_new_tab});if(e.onToggle(t=>{this.buttonSettingsObject.buttonObject.data.action_new_tab=t,window.Buttonizer.buttonChanges=!0}),"phone"===t||"sms"===t||"viber"===t)this.element.appendChild(new St(this).build()),this.addKnowledgeBaseLink();else if("mail"===t)this.element.appendChild(new Lt(this).build());else if("whatsapp_pro"===t||"whatsapp"===t){this.element.appendChild(new St(this).build());let t=document.createElement("p");t.innerHTML=window.Buttonizer.translate("settings.button_action.actions.whatsapp_info"),this.element.appendChild(t)}else if("socialsharing"===t)this.element.appendChild(new Ot(this).build());else{if("backtotop"===t||"gobackpage"===t)return;if("skype"===t||"telegram"===t||"twitter"===t||"snapchat"===t||"instagram"===t||"vk"===t)this.element.appendChild(new jt(this).build("Username")),this.addKnowledgeBaseLink();else if("twitter_dm"===t){this.element.appendChild(new jt(this,!0).build("Account ID"));let t=document.createElement("p");t.innerHTML='When you want to use Twitter DM you will need to find your Twitter User ID and allow direct messages from anyone. To find your account ID <a href="https://tweeterid.com/" target="_blank">click here</a>. And to read more about how to allow direct messages from anyone, <a href="https://help.twitter.com/nl/using-twitter/direct-messages#receive" target="_blank">click here</a>.',this.element.appendChild(t)}else if("messenger"===t)this.element.appendChild(new Ct(this).build("https://m.me/YOUR-PAGE-NAME")),this.addKnowledgeBaseLink();else if("messenger_chat"===t){this.element.appendChild(new jt(this).build("Facebook page ID"));let t=document.createElement("p");t.innerHTML=window.Buttonizer.translate("settings.button_action.actions.messenger_chat"),this.element.appendChild(t),this.addKnowledgeBaseLink(59,"Facebook Messenger Chat Widget")}else if("facebook"===t)this.element.appendChild(new jt(this).build("Facebook username/page")),this.addKnowledgeBaseLink();else if("linkedin"===t)this.element.appendChild(new jt(this).build('"company/COMPANY-NAME" or "in/USERNAME"')),this.addKnowledgeBaseLink();else if("line"===t)this.element.appendChild(new jt(this).build("LINE_id"));else if("wechat"===t)this.element.appendChild(new jt(this).build("User ID"));else if("waze"===t)this.element.appendChild(new Ct(this).build("https://www.waze.com/ul?q=Netherlands"));else if("popup_maker"===t)this.element.appendChild(new jt(this).build("URL trigger")),this.addKnowledgeBaseLink(57,"Popup maker");else if("elementor_popup"===t)this.element.appendChild(new jt(this).build("Trigger")),this.addKnowledgeBaseLink(57,"Elementor popup");else if("poptin"===t){this.element.appendChild(new Ct(this).build("https://app.popt.in/APIRequest/click/0c768294b0605"));let t=document.createElement("p");t.innerHTML=window.Buttonizer.translate("settings.button_action.actions.poptin"),this.element.appendChild(t),this.addKnowledgeBaseLink(57)}else this.element.appendChild(new Ct(this).build()),xt(this.element.appendChild(new zt("<label for='label-always-open'>"+window.Buttonizer.translate("settings.open_new_tab.title")+":</label>",e.build(),"is-boolean-only").build()).firstChild.firstChild,{content:window.Buttonizer.translate("settings.open_new_tab.description"),animation:"shift-away",arrow:!0,hideOnClick:!1}),this.addKnowledgeBaseLink()}}addKnowledgeBaseLink(t="",e=""){let i=document.createElement("a");i.className="info-link has-margin-everywhere",i.innerHTML=""===e?window.Buttonizer.translate("utils.visit_knowledgebase"):window.Buttonizer.translate("utils.knowledge_link").format(e),i.href="https://community.buttonizer.pro/knowledgebase"+(""===t?"":"/"+t),i.target="_blank",this.element.appendChild(i)}inputText(){let t=document.createElement("input");return t.type="text",t.style.display="block",t.style.width="100%",t.className="buttonizer-input-action",t}addError(t){this.errorElement.innerHTML="";let e=document.createElement("div");e.innerHTML=t,e.className="field-error-container",this.errorElement.appendChild(e)}removeError(){this.errorElement.innerHTML=""}selectGroup(t,e){let i=document.createElement("optgroup");i.label=t;for(let t of e)i.appendChild(this.add(t.value,t.text));return i}}class Nt{constructor(t){this.parentObject=void 0!==t.parentObject?t.parentObject:null,this.rowName=void 0!==t.rowName?t.rowName:null,this.title=void 0!==t.title?t.title:"",this.description=void 0!==t.description?t.description:null,this.wrap=void 0!==t.wrap&&t.wrap,this.content=void 0!==t.content?t.content:[],this.className=void 0!==t.class?t.class:[],this.customBuild=void 0!==t.useCustomBuild&&t.useCustomBuild,this.hidden=void 0!==t.hidden&&t.hidden,this.element=document.createElement("div"),null!==this.parentObject?null!==this.rowName&&this.parentObject.registerUI(this.rowName+"-container",this):null!==this.rowName&&null===this.parentObject&&console.error("Row name '"+this.rowName+"' is set, but no parent has been set")}build(){this.element.className="buttonizer-setting-row "+(!1===this.className?"":this.className),this.element.style.marginTop="10px",this.hidden&&(this.element.style.display="none");let t=document.createElement("div");t.className="buttonizer-setting-row-c1";let e=document.createElement("label");e.innerHTML=this.title,null!==this.description&&xt(e,{content:this.description,animation:"shift-away",arrow:!0,hideOnClick:!1}),t.appendChild(e);let i=document.createElement("div");i.className="buttonizer-setting-row-c2";for(const t in this.content)i.appendChild(this.customBuild?this.content[t]():this.content[t].build());return this.wrap&&(i.style["flex-wrap"]="wrap"),this.element.appendChild(t),this.element.appendChild(i),this.element}hide(){this.element.style.display="none"}show(){this.element.style.display=""}}class At{constructor(t){this.parent=t.parentObject,this.element=document.createElement("div"),this.dataEntry=t.dataEntry,this.default=void 0===t.default?"":t.default,this.callback=void 0===t.callback?()=>{}:t.callback,this.onClick=void 0===t.onClick?null:t.onClick,this.input=HTMLElement,this.onlyNumbers=void 0!==t.onlyNumbers&&t.onlyNumbers,this.parent.registerUI(this.dataEntry,this),this.placeholder=void 0===t.placeholder?"":t.placeholder,this.title=void 0===t.title?"":t.title,this.fieldWidth=void 0===t.width?"default":t.width,this.hidden=void 0!==t.hidden&&t.hidden}build(){this.element=document.createElement("div"),this.element.className="buttonizer-input-container is-textfield input-field-width-"+this.fieldWidth,this.element.style.marginRight="7px";let t=document.createElement("div");t.className="buttonizer-input-item";let e=document.createElement("input");e.type="text",e.value=this.parent.get(this.dataEntry,this.default),this.onlyNumbers&&e.addEventListener("keyup",t=>{(isNaN(e.value)||e.value<0)&&(e.value=this.default,new s({title:window.Buttonizer.translate("errors.forms.only_numbers"),content:"<p>"+window.Buttonizer.translate("errors.forms.only_numbers_info")+"</p>",buttons:[{text:window.Buttonizer.translate("modal.close"),close:!0,focus:!0}]}))}),null!==this.onClick&&e.addEventListener("click",t=>this.onClick(t,e)),e.addEventListener("change",()=>{this.onlyNumbers&&(isNaN(e.value)||e.value<0)&&(e.value=this.default),this.parent.set(this.dataEntry,e.value)}),""!==this.placeholder&&e.setAttribute("placeholder",this.placeholder),t.appendChild(e),this.element.appendChild(t);let i=document.createElement("div");return i.className="buttonizer-input-info",i.innerHTML=this.title,this.element.appendChild(i),this.input=e,this.hidden&&this.hide(),""!==this.title?this.element:(this.input.className="buttonizer-input-only",this.input)}hide(){this.element.style.display="none",this.input.style.display="none"}show(){this.element.style.display="",this.input.style.display=""}update(t){this.input.value=t,this.callback(t)}}class It{constructor(t){this.parentObject=t.parentObject,this.element=document.createElement("a"),this.dataEntry=t.dataEntry,this.state=this.parentObject.get(this.dataEntry,t.default),this.parentObject.registerUI(this.dataEntry,this),this.disabled=void 0!==t.disabled&&t.disabled,this.visible=void 0===t.visible||t.visible,this.callback=void 0!==t.callback?t.callback:t=>{}}build(){this.element.href="javascript:void(0)",this.element.className="buttonizer-boolean "+(!0===this.state||"true"===this.state?"boolean-selected":""),this.element.addEventListener("click",()=>this.toggle());let t=document.createElement("div");return t.className="buttonizer-boolean-circle",this.element.appendChild(t),this.element}hide(){this.element.style.display="none"}show(){this.element.style.display="block"}toggle(){this.disabled?console.log("Sorry, you're not able to edit this"):(!0===this.state||"true"===this.state?this.state=!1:this.state=!0,this.parentObject.set(this.dataEntry,this.state),void 0!==this.callback&&this.callback(this.state))}update(t){this.state=t,!0===t||"true"===t?this.element.classList.contains("boolean-selected")||this.element.classList.add("boolean-selected"):this.element.classList.contains("boolean-selected")&&this.element.classList.remove("boolean-selected"),this.callback(t)}}class Mt extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.label.title"),description:window.Buttonizer.translate("settings.label.description"),wrap:!0,class:"form-has-extra-fields",content:[new At({parentObject:t,dataEntry:"label",default:t.get("label"),placeholder:window.Buttonizer.translate("settings.label.placeholder")})]})}}var qt=i(5),Ht=i(2);const Pt="url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E\")",Dt=360,Ft="keydown",Rt="mousedown",Wt="focusin";function Ut(t,e){return(e||document).querySelector(t)}function Gt(t,e,i){t.addEventListener(e,i,!1)}function Qt(t){t.preventDefault(),t.stopPropagation()}function $t(t,e,i,n){Gt(t,Ft,function(t){e.indexOf(t.key)>=0&&(n&&Qt(t),i(t))})}const Yt=document.createElement("style");Yt.textContent=".picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.layout_default.picker_wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:'';display:block;width:100%;height:0;-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}.layout_default .picker_sl::before{content:'';display:block;padding-bottom:100%}.layout_default .picker_editor{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1;width:6rem}.layout_default .picker_editor input{width:calc(100% + 2px);height:calc(100% + 2px)}.layout_default .picker_sample{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}.layout_default .picker_done{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.picker_wrapper{-webkit-box-sizing:border-box;box-sizing:border-box;background:#f2f2f2;-webkit-box-shadow:0 0 0 1px silver;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{margin:-1px}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid white;border-radius:100%;-webkit-box-shadow:0 0 3px 1px #67b9ff;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:-webkit-gradient(linear, left top, right top, from(red), color-stop(yellow), color-stop(lime), color-stop(cyan), color-stop(blue), color-stop(magenta), to(red));background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);-webkit-box-shadow:0 0 0 1px silver;box-shadow:0 0 0 1px silver}.picker_sl{position:relative;-webkit-box-shadow:0 0 0 1px silver;box-shadow:0 0 0 1px silver;background-image:-webkit-gradient(linear, left top, left bottom, from(white), color-stop(50%, rgba(255,255,255,0))),-webkit-gradient(linear, left bottom, left top, from(black), color-stop(50%, rgba(0,0,0,0))),-webkit-gradient(linear, left top, right top, from(gray), to(rgba(128,128,128,0)));background-image:linear-gradient(180deg, white, rgba(255,255,255,0) 50%),linear-gradient(0deg, black, rgba(0,0,0,0) 50%),linear-gradient(90deg, gray, rgba(128,128,128,0))}.picker_alpha,.picker_sample{position:relative;background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E\") left top/contain white;-webkit-box-shadow:0 0 0 1px silver;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:monospace;padding:.1em .2em}.picker_sample::before{content:'';position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_done button{-webkit-box-sizing:border-box;box-sizing:border-box;padding:.2em .5em;cursor:pointer}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;-webkit-box-shadow:0 0 10px 1px rgba(0,0,0,0.4);box-shadow:0 0 10px 1px rgba(0,0,0,0.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:\"\";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;-webkit-box-shadow:none;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}",document.documentElement.firstElementChild.appendChild(Yt);var Vt=class{constructor(t){this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex"},this._openProxy=(t=>this.openHandler(t)),this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(t)}setOptions(t){if(!t)return;const e=this.settings;if(t instanceof HTMLElement)e.parent=t;else{e.parent&&t.parent&&e.parent!==t.parent&&(e.parent.removeEventListener("click",this._openProxy,!1),this._popupInited=!1),function(t,e,i){for(const n in t)i&&i.indexOf(n)>=0||(e[n]=t[n])}(t,e),t.onChange&&(this.onChange=t.onChange),t.onDone&&(this.onDone=t.onDone),t.onOpen&&(this.onOpen=t.onOpen),t.onClose&&(this.onClose=t.onClose);const i=t.color||t.colour;i&&this._setColor(i)}const i=e.parent;i&&e.popup&&!this._popupInited?(Gt(i,"click",this._openProxy),$t(i,[" ","Spacebar","Enter"],this._openProxy),this._popupInited=!0):t.parent&&!e.popup&&this.show()}openHandler(t){if(this.show()){t&&t.preventDefault(),this.settings.parent.style.pointerEvents="none";const e=t&&t.type===Ft?this._domEdit:this.domElement;setTimeout(()=>e.focus(),100),this.onOpen&&this.onOpen(this.colour)}}closeHandler(t){const e=t&&t.type;let i=!1;t?("click"!==e&&e!==Ft||Qt(t),i=!0):i=!0,i&&this.hide()&&(this.settings.parent.style.pointerEvents="",e!==Rt&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}movePopup(t,e){this.closeHandler(),this.setOptions(t),e&&this.openHandler()}setColor(t,e){this._setColor(t,{silent:e})}_setColor(t,e){if("string"==typeof t&&(t=t.trim()),!t)return;let i;e=e||{};try{i=new qt(t)}catch(t){if(e.failSilently)return;throw t}if(!this.settings.alpha){const t=i.hsla;t[3]=1,i.hsla=t}this.colour=this.color=i,this._setHSLA(null,null,null,null,e)}setColour(t,e){this.setColor(t,e)}show(){if(!this.settings.parent)return!1;if(this.domElement){const t=this._toggleDOM(!0);return this._setPosition(),t}const t=function(t){const e=document.createElement("div");return e.innerHTML=t,e.firstElementChild}(this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div></div>');return this.domElement=t,this._domH=Ut(".picker_hue",t),this._domSL=Ut(".picker_sl",t),this._domA=Ut(".picker_alpha",t),this._domEdit=Ut(".picker_editor input",t),this._domSample=Ut(".picker_sample",t),this._domOkay=Ut(".picker_done button",t),t.classList.add("layout_"+this.settings.layout),this.settings.alpha||t.classList.add("no_alpha"),this.settings.editor||t.classList.add("no_editor"),this._ifPopup(()=>t.classList.add("popup")),this._setPosition(),this.colour?this._updateUI():this._setColor("#0cf"),this._bindEvents(),!0}hide(){return this._toggleDOM(!1)}_bindEvents(){const t=this,e=this.domElement;function i(t,e){function i(i,n){const o=n[0]/t.clientWidth,s=n[1]/t.clientHeight;e(o,s)}return{container:t,dragOutside:!1,callback:i,callbackDragStart:i,propagateEvents:!0}}Gt(e,"click",t=>t.preventDefault()),Ht(i(this._domH,(e,i)=>t._setHSLA(e))),Ht(i(this._domSL,(e,i)=>t._setHSLA(null,e,1-i))),this.settings.alpha&&Ht(i(this._domA,(e,i)=>t._setHSLA(null,null,null,1-i)));const n=this._domEdit;Gt(n,"input",function(e){t._setColor(this.value,{fromEditor:!0,failSilently:!0})}),Gt(n,"focus",function(t){const e=this;e.selectionStart===e.selectionEnd&&e.select()});const o=t=>{this._ifPopup(()=>this.closeHandler(t)),this.onDone&&this.onDone(this.colour)};this._ifPopup(()=>{const t=t=>this.closeHandler(t);Gt(window,Rt,t),Gt(window,Wt,t),$t(e,["Esc","Escape"],t),Gt(e,Rt,Qt),Gt(e,Wt,Qt),Gt(this._domEdit,Rt,t=>this._domEdit.focus())}),Gt(this._domOkay,"click",o),$t(e,["Enter"],o)}_setPosition(){const t=this.settings.parent,e=this.domElement;t!==e.parentNode&&t.appendChild(e),this._ifPopup(i=>{"static"===getComputedStyle(t).position&&(t.style.position="relative");const n=!0===i?"popup_right":"popup_"+i;["popup_top","popup_bottom","popup_left","popup_right"].forEach(t=>{t===n?e.classList.add(t):e.classList.remove(t)}),e.classList.add(n)})}_setHSLA(t,e,i,n,o){o=o||{};const s=this.colour,r=s.hsla;[t,e,i,n].forEach((t,e)=>{(t||0===t)&&(r[e]=t)}),s.hsla=r,this._updateUI(o),this.onChange&&!o.silent&&this.onChange(s)}_updateUI(t){if(!this.domElement)return;t=t||{};const e=this.colour,i=e.hsla,n=`hsl(${i[0]*Dt}, 100%, 50%)`,o=e.hslString,s=e.hslaString,r=this._domH,a=this._domSL,l=this._domA,u=Ut(".picker_selector",r),c=Ut(".picker_selector",a),d=Ut(".picker_selector",l);function p(t,e,i){e.style.left=100*i+"%"}function h(t,e,i){e.style.top=100*i+"%"}p(0,u,i[0]),this._domSL.style.backgroundColor=this._domH.style.color=n,p(0,c,i[1]),h(0,c,1-i[2]),a.style.color=o,h(0,d,1-i[3]);const m=o,b=m.replace("hsl","hsla").replace(")",", 0)"),f=`linear-gradient(${[m,b]})`;if(this._domA.style.backgroundImage=f+", "+Pt,!t.fromEditor){const t=this.settings.editorFormat,i=this.settings.alpha;let n;switch(t){case"rgb":n=e.printRGB(i);break;case"hsl":n=e.printHSL(i);break;default:n=e.printHex(i)}this._domEdit.value=n}this._domSample.style.color=s}_ifPopup(t,e){this.settings.parent&&this.settings.popup?t&&t(this.settings.popup):e&&e()}_toggleDOM(t){const e=this.domElement;if(!e)return!1;const i=t?"":"none",n=e.style.display!==i;return n&&(e.style.display=i),n}static get StyleElement(){return Yt}};class Xt{constructor(t){this.parent=t.parentObject,this.element=document.createElement("div"),this.dataEntry=t.dataEntry,this.default=void 0===t.default?"":t.default,this.callback=void 0===t.callback?()=>{}:t.callback,this.style=void 0===t.style?{}:t.style,this.parent.registerUI(this.dataEntry,this),this.currentColor=this.parent.get(this.dataEntry,this.default),this.title=void 0===t.title?"Color":t.title,this.timer=setTimeout(()=>{},0),this.opened=!1,this.element=HTMLElement,this.colorView=HTMLElement,this.colorPicker=HTMLElement,("#fffff"===this.currentColor||"#FFFFF"===this.currentColor||this.currentColor.length<=6)&&(this.currentColor="#FFFFFF")}build(){this.buildVisiblePicker();let t=new Vt({parent:this.element,popup:"bottom",alpha:!0,color:this.currentColor,onChange:t=>{this.currentColor!==t.rgbaString&&(this.currentColor=t.rgbaString,this.parent.set(this.dataEntry,t.rgbaString))}});return this.element.addEventListener("click",()=>{t.show()}),this.colorPicker=t,this.element}buildVisiblePicker(){this.element=document.createElement("div"),this.element.className="buttonizer-input-container is-color-picker",this.element.style.marginRight="7px";let t=document.createElement("div");t.className="buttonizer-input-item",this.colorView=document.createElement("div"),this.colorView.style.background=this.currentColor,this.colorView.className="colored-background",t.appendChild(this.colorView),this.element.appendChild(t);let e=document.createElement("div");e.className="buttonizer-input-info",e.innerHTML=this.title,this.element.appendChild(e)}onSelect(t){this.callback=t}hide(){this.element.style.display="none"}show(){this.element.style.display="block"}update(t){clearTimeout(this.timer),this.colorView.style.background=t,this.colorPicker.color=t,this.timer=setTimeout(()=>this.callback(t),1500)}}class Kt extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.icon_color.title"),description:window.Buttonizer.translate("settings.icon_color.description"),rowName:"icon-color",parentObject:t,hidden:window.Buttonizer.hasPremium()&&"true"==t.get("icon_is_image"),content:[new Xt({parentObject:t,dataEntry:"icon_color",title:window.Buttonizer.translate("utils.base"),default:"#FFFFFF",width:"space"}),new Xt({parentObject:t,dataEntry:"icon_color_interaction",title:window.Buttonizer.translate("utils.interaction"),default:"#FFFFFF",width:"space"})]})}}class Jt extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.icon_size.title"),description:window.Buttonizer.translate("settings.icon_size.description"),rowName:"icon-size",parentObject:t,hidden:window.Buttonizer.hasPremium()&&"true"==t.get("icon_is_image"),content:[new At({title:"px",placeholder:"button"===t.type?16:25,width:"space",dataEntry:"icon_size",parentObject:t,onlyNumbers:!0,default:"button"===t.type?16:25})]})}}class Zt extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.border_radius.title"),description:window.Buttonizer.translate("settings.border_radius.description"),hidden:"button"===t.type&&"false"!==t.get("use_main_button_style"),rowName:"border-radius",parentObject:t,content:[new At({parentObject:t,dataEntry:"border_radius",default:"",placeholder:50,title:"%",width:"space",onlyNumbers:!0})]})}}class te extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.font_size_border_radius.title"),description:window.Buttonizer.translate("settings.font_size_border_radius.description"),content:[new At({title:"px",placeholder:12,width:"space",dataEntry:"label_font_size",parentObject:t,onlyNumbers:!0}),new At({title:"px",placeholder:12,width:"space",dataEntry:"label_border_radius",parentObject:t,onlyNumbers:!0})]})}}class ee{constructor(t){this.parentObject=t.parentObject,this.element=document.createElement("a"),this.dataEntry=t.dataEntry,this.default=t.default,this.callback=t.callback,this.type=t.type,this.data=t,this.title=t.title,this.state=this.parentObject.get(this.dataEntry,this.default),this.parentObject.registerUI(this.dataEntry,this),this.disabled=void 0!==t.disabled&&t.disabled,this.visible=void 0===t.visible||t.visible}build(){this.element.href="javascript:void(0)",this.element.className=`buttonizer-checkbox ${"Mobile"===this.title?"mobile-checkbox":"desktop-checkbox"}`;let t=document.createElement("div");t.className="buttonizer-checkbox-box",t.innerHTML="&#10003;",this.element.appendChild(t),this.element.addEventListener("click",()=>this.toggle());let e=document.createElement("div");return e.className="buttonizer-checkbox-text",e.innerHTML=this.title,this.element.appendChild(e),this.update(this.state),this.eventListener(this.type),this.element}hide(){this.element.style.display="none"}show(){this.element.style.display="block"}toggle(){this.disabled?console.log("Sorry, you're not able to edit this"):(!0===this.state||"true"===this.state?this.parentObject.set(this.dataEntry,!1):this.parentObject.set(this.dataEntry,!0),"undefined"!=typeof callback&&this.callback(this.state))}update(t){this.state=t,!0===t||"true"===t?this.element.classList.contains("checkbox-selected")||this.element.classList.add("checkbox-selected"):this.element.classList.contains("checkbox-selected")&&this.element.classList.remove("checkbox-selected")}eventListener(t){"button"===t&&this.element.addEventListener("click",()=>{let t=this.parentObject.buttonHTMLObject.querySelector(".mobile-preview"),e=this.parentObject.buttonHTMLObject.querySelector(".fa-mobile-alt").parentElement,i=this.parentObject.buttonHTMLObject.querySelector(".desktop-preview"),n=this.parentObject.buttonHTMLObject.querySelector(".fa-desktop").parentElement;"Mobile"===this.title?t.classList.contains("selected")&&!1===this.state?(t.classList.remove("selected"),e.classList.remove("selected")):t.classList.contains("selected")||!0!==this.state||(t.classList+=" selected",e.classList+=" selected"):"Desktop"===this.title&&(i.classList.contains("selected")&&!1===this.state?(i.classList.remove("selected"),n.classList.remove("selected")):i.classList.contains("selected")||!0!==this.state||(i.classList+=" selected",n.classList+=" selected"))})}}class ie extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.show_mobile_desktop.title"),description:window.Buttonizer.translate("settings.show_mobile_desktop.description"),content:[new ee({parentObject:t,dataEntry:"show_mobile",title:window.Buttonizer.translate("settings.show_mobile_desktop.mobile"),default:!0,type:"button"===t.type?"button":"group"}),new ee({parentObject:t,dataEntry:"show_desktop",title:window.Buttonizer.translate("settings.show_mobile_desktop.desktop"),default:!0,type:"button"===t.type?"button":"group"})]})}}class ne extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.background_color.title"),description:window.Buttonizer.translate("settings.background_color.description"),hidden:"button"===t.type&&"false"!==t.get("use_main_button_style"),rowName:"background-color",parentObject:t,content:[new Xt({parentObject:t,dataEntry:"background_color",title:window.Buttonizer.translate("utils.base"),default:"#f08419"}),new Xt({parentObject:t,dataEntry:"background_color_interaction",title:window.Buttonizer.translate("utils.interaction"),default:"#ff9d3c"})]})}}class oe{constructor(t){this.parentObject=t.parentObject,this.element=document.createElement("select"),this.dataEntry=t.dataEntry,this.default=t.default,this.callback=t.callback,this.style=t.style,this.list=t.list,this.width=void 0===t.width?"199px":t.width,this.class=void 0===t.class?"buttonizer-select-drawer":t.class,this.parentObject.registerUI(this.dataEntry,this)}build(){this.element.style.width=this.width,this.element.className=this.class,this.element.addEventListener("change",t=>{this.parentObject.set(this.dataEntry,this.element.value)});for(let t in this.list){let e=this.list[t],i=document.createElement("option");i.text=e.text,i.value=e.value,i.selected=void 0!==typeof this.selected&&this.selected===e.value,this.element.appendChild(i)}return this.element.value=this.parentObject.get(this.dataEntry,this.default),this.element}hide(){this.element.style.display="none"}show(){this.element.style.display="block"}update(t){this.element.value=t,void 0!==this.callback&&this.callback(t,this)}}class se extends Nt{constructor(t){super({title:'<span class="setting-icon"><i class="fa fa-desktop"></i></span> '+window.Buttonizer.translate("settings.label_desktop.title"),description:window.Buttonizer.translate("settings.label_desktop.description"),content:[new oe({parentObject:t,dataEntry:"show_label_desktop",default:"always",list:[{value:"always",text:window.Buttonizer.translate("settings.label_styles.always")},{value:"hover",text:window.Buttonizer.translate("settings.label_styles.hover")},{value:"hide",text:window.Buttonizer.translate("settings.label_styles.hide")}]})]})}}class re extends Nt{constructor(t){super({title:'<span class="setting-icon"><i class="fa fa-mobile-alt"></i></span> '+window.Buttonizer.translate("settings.label_mobile.title"),description:window.Buttonizer.translate("settings.label_mobile.description"),content:[new oe({parentObject:t,dataEntry:"show_label_mobile",default:"always",list:[{value:"always",text:window.Buttonizer.translate("settings.label_styles.always")},{value:"hide",text:window.Buttonizer.translate("settings.label_styles.hide")}]})]})}}class ae extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.label_color.title"),description:window.Buttonizer.translate("settings.label_color.description"),hidden:"button"===t.type&&"false"!==t.get("use_main_button_style"),rowName:"label-color",parentObject:t,content:[new Xt({parentObject:t,dataEntry:"label_color",title:window.Buttonizer.translate("utils.text"),default:"#FFFFFF"}),new Xt({parentObject:t,dataEntry:"label_background_color",title:window.Buttonizer.translate("utils.background"),default:"#4E4C4C"})]})}}class le extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.icon.title"),description:window.Buttonizer.translate("settings.icon.description"),rowName:"icon",parentObject:t,hidden:window.Buttonizer.hasPremium()&&"true"==t.get("icon_is_image"),content:[new At({parentObject:t,dataEntry:"icon",default:"fa fa-user",onClick:(t,e)=>{window.Buttonizer.iconSelector.open(e)}})]})}}class ue{constructor(t){this.parentObject=t.parentObject,this.button=null,this.selectedImage=null,this.dataEntry=void 0===t.dataEntry?null:t.dataEntry,this.default=void 0===t.default?"":t.default,this.value=t.parentObject.get(t.dataEntry,""),this.callback=t.callback,this.parentObject.registerUI(this.dataEntry,this)}build(){return this.buildFree()}buildFree(){let t=document.createElement("a");return t.className="button",t.href="javascript:void(0)",t.innerHTML='<i class="fa fa-image"></i>&nbsp;&nbsp;'+window.Buttonizer.translate("utils.select_image")+" <small>(premium)</small>",t.addEventListener("click",()=>{window.Buttonizer.showPremiumPopup("You can select images and set them as icon or as button background image.")}),t}}class ce extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.background_image.title"),description:window.Buttonizer.translate("settings.background_image.description"),hidden:"button"===t.type&&"false"!==t.get("use_main_button_style"),rowName:"background-image",parentObject:t,content:[new ue({parentObject:t,dataEntry:"background_image"})]})}}class de extends Nt{constructor(t){super({parentObject:t,title:window.Buttonizer.translate("settings.use_main_button_style.title"),description:window.Buttonizer.translate("settings.use_main_button_style.description"),class:"is-boolean-only",rowName:"use_main_button_style",content:[new It({parentObject:t,dataEntry:"use_main_button_style",default:"true",callback:t=>this.update(t)})]}),this.parent=t}update(t){!0===t||"true"===t?(this.parent.getUI("background-color-container").forEach(t=>{t.hide()}),this.parent.getUI("label-color-container").forEach(t=>{t.hide()}),this.parent.getUI("border-radius-container").forEach(t=>{t.hide()}),this.parent.getUI("background-image-container").forEach(t=>{t.hide()})):(this.parent.getUI("background-color-container").forEach(t=>{t.show()}),this.parent.getUI("label-color-container").forEach(t=>{t.show()}),this.parent.getUI("border-radius-container").forEach(t=>{t.show()}),this.parent.getUI("background-image-container").forEach(t=>{t.show()}))}}class pe{constructor(t){this.parentObject=t.parentObject,this.element=document.createElement("div"),this.dataEntry=void 0===t.dataEntry?null:t.dataEntry,this.default=void 0!==t.default&&t.default,this.state=void 0!==t.state&&"true"==t.state,this.first=void 0===t.first?"First":t.first,this.second=void 0===t.second?"Second":t.second,this.callback=t.callback,null!==this.dataEntry&&this.parentObject.registerUI(this.dataEntry,this)}build(){this.element.className="buttonizer-toggle"+(!0===this.state?" right-selected":" left-selected");let t=document.createElement("a");t.href="javascript:void(0)",t.innerHTML=this.first,t.addEventListener("click",()=>this.toggle()),this.element.appendChild(t);let e=document.createElement("a");return e.href="javascript:void(0)",e.innerHTML=this.second,e.addEventListener("click",()=>this.toggle()),this.element.appendChild(e),this.element}toggle(){null!==this.dataEntry?this.parentObject.set(this.dataEntry,!this.state):this.callback(!1)}update(t){this.state=t,!1===t?(this.element.classList.add("left-selected"),this.element.classList.remove("right-selected")):(this.element.classList.remove("left-selected"),this.element.classList.add("right-selected")),this.callback(t)}hide(){this.element.style.display="none"}show(){this.element.style.display="block"}}class he extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.icon_or_image.title"),description:window.Buttonizer.translate("settings.icon_or_image.description"),useCustomBuild:!0,content:[()=>this.buildBoolean()]}),this.parent=t}buildBoolean(){return new pe({parentObject:this.parent,state:!1,first:window.Buttonizer.translate("utils.icon"),second:window.Buttonizer.translate("utils.image")+" <small>(premium)</small>",callback:()=>{window.Buttonizer.showPremiumPopup("You can select an custom image as icon for your buttons and groups.")}}).build()}}class me extends Nt{constructor(t){super({parentObject:t,title:window.Buttonizer.translate("settings.menu_position.title"),description:window.Buttonizer.translate("settings.menu_position.description"),wrap:!0,class:"form-has-extra-fields",rowName:"position",content:[new oe({parentObject:t,dataEntry:"position",default:"bottomright",callback:t=>this.changePosition(t),list:[{value:"bottomright",text:window.Buttonizer.translate("settings.menu_position.positions.bottomright")},{value:"bottomleft",text:window.Buttonizer.translate("settings.menu_position.positions.bottomleft")},{value:"topright",text:window.Buttonizer.translate("settings.menu_position.positions.topright")},{value:"topleft",text:window.Buttonizer.translate("settings.menu_position.positions.topleft")},{value:"advanced",text:window.Buttonizer.translate("settings.menu_position.positions.advanced")}]}),new At({parentObject:t,dataEntry:"horizontal",title:"X&nbsp;&lpar;&percnt;&rpar;",width:"space",hidden:"advanced"!==t.get("position"),onlyNumbers:!0}),new At({parentObject:t,dataEntry:"vertical",title:"Y&nbsp;&lpar;&percnt;&rpar;",width:"space",hidden:"advanced"!==t.get("position"),onlyNumbers:!0})]}),this.translatedPositions={topleft:{x:95,y:95},topright:{x:5,y:95},bottomleft:{x:95,y:5},bottomright:{x:5,y:5}},this.parentObject=t}changePosition(t){"advanced"===t?(this.parentObject.getUI("horizontal").forEach(t=>t.show()),this.parentObject.getUI("vertical").forEach(t=>t.show())):(this.parentObject.getUI("horizontal").forEach(t=>t.hide()),this.parentObject.getUI("vertical").forEach(t=>t.hide()),this.parentObject.set("horizontal",this.translatedPositions[t].x),this.parentObject.set("vertical",this.translatedPositions[t].y))}}class be extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.menu_animation.title"),description:window.Buttonizer.translate("settings.menu_animation.description"),parentObject:t,rowName:"animation",content:[new oe({parentObject:t,dataEntry:"menu_animation",default:"none",list:[{value:"none",text:window.Buttonizer.translate("settings.menu_animation.animations.none")},{value:"hello",text:window.Buttonizer.translate("settings.menu_animation.animations.hello")},{value:"bounce",text:window.Buttonizer.translate("settings.menu_animation.animations.bounce")}]})]})}}class fe{constructor(t){this.buttonObject=t,this.groupSetting=HTMLElement,this.formElements={useMainButtonStyle:void 0,buttonColor:void 0,borderColor:void 0,borderRadius:void 0,backgroundImage:void 0,buttonIconSelect:void 0,buttonIconColor:void 0,buttonIconSize:void 0,buttonImageSelect:void 0,buttonImageIcon:void 0,buttonImageIconSelect:void 0,imageBorderRadius:void 0,imageSize:void 0,label:void 0,labelColor:void 0,labelFontSizeBorderRadius:void 0,show_label:void 0,showOnOpeningTimes:void 0,buttonCustomClass:void 0}}build(){let t=document.createElement("div");return t.className="button-group-styling",t.style.display="none",this.element=t,this.buildForm(),this.buttonObject.stylingObject=t,this.element}buildForm(){this.element.appendChild(this.generalSetting()),this.element.appendChild(this.buttonStyle()),this.element.appendChild(this.iconStyle()),this.element.appendChild(this.labelStyle()),this.element.appendChild(this.advancedSettings())}advancedSettings(){let t=document.createElement("a");return t.href="javascript:void(0)",t.className="advanced-settings"+(window.Buttonizer.hasPremium()?"":" buttonizer-premium-gray-out"),t.innerHTML="<i></i> "+window.Buttonizer.translate("utils.advanced_settings")+(window.Buttonizer.hasPremium()?"":" <span class='buttonizer-premium'>PRO</span>"),t.addEventListener("click",()=>{this.buttonObject.windowObject.toggle()}),t}generalSetting(){let t=document.createElement("div");return t.className="style-top",this.groupSetting=document.createElement("div"),this.groupSetting.className="style-group",this.formElements.menuPosition=new me(this.buttonObject.groupObject),this.groupSetting.appendChild(this.formElements.menuPosition.build()),this.formElements.menuPosition.element.style.display="none",this.formElements.menuAnimation=new be(this.buttonObject.groupObject),this.groupSetting.appendChild(this.formElements.menuAnimation.build()),this.formElements.menuAnimation.element.style.display="none",t.appendChild(this.groupSetting),this.formElements.buttonAction=new Tt(this),t.appendChild(this.formElements.buttonAction.build()),this.formElements.isMobile=new ie(this.buttonObject),t.appendChild(this.formElements.isMobile.build()),t}buttonStyle(){let t=document.createElement("div");t.className="style-button";let e=document.createElement("h2");return e.innerHTML="<i></i><span>"+window.Buttonizer.translate("settings.setting_categories.button_style")+"</span>",t.appendChild(e),this.formElements.useMainButtonStyle=new de(this.buttonObject),t.appendChild(this.formElements.useMainButtonStyle.build()),this.formElements.buttonColor=new ne(this.buttonObject),t.appendChild(this.formElements.buttonColor.build()),this.formElements.labelColor=new ae(this.buttonObject),t.appendChild(this.formElements.labelColor.build()),this.formElements.borderRadius=new Zt(this.buttonObject),t.appendChild(this.formElements.borderRadius.build()),this.formElements.backgroundImage=new ce(this.buttonObject),t.appendChild(this.formElements.backgroundImage.build()),t}iconStyle(){let t=document.createElement("div");t.className="style-icon";let e=document.createElement("h2");return e.innerHTML="<i></i><span>"+window.Buttonizer.translate("settings.setting_categories.button_icon")+"</span>",t.appendChild(e),this.formElements.buttonIconOrImage=new he(this.buttonObject),t.appendChild(this.formElements.buttonIconOrImage.build()),this.formElements.buttonIconSelect=new le(this.buttonObject),t.appendChild(this.formElements.buttonIconSelect.build()),this.formElements.buttonIconColor=new Kt(this.buttonObject),t.appendChild(this.formElements.buttonIconColor.build()),this.formElements.buttonIconSize=new Jt(this.buttonObject),t.appendChild(this.formElements.buttonIconSize.build()),t}labelStyle(){let t=document.createElement("div");t.className="style-label";let e=document.createElement("h2");return e.innerHTML="<i></i><span>"+window.Buttonizer.translate("settings.setting_categories.label")+"</span>",t.appendChild(e),this.formElements.buttonLabel=new Mt(this.buttonObject),t.appendChild(this.formElements.buttonLabel.build()),this.formElements.show_label=new se(this.buttonObject),t.appendChild(this.formElements.show_label.build()),this.formElements.show_label_mobile=new re(this.buttonObject),t.appendChild(this.formElements.show_label_mobile.build()),this.formElements.buttonLabelFontSizeBorderRadius=new te(this.buttonObject),t.appendChild(this.formElements.buttonLabelFontSizeBorderRadius.build()),t}}var we=class{constructor(t,e){this.type="button",this.groupObject=t,this.alive=!0,this.data=e,this.ui=[],this.buttonName=e.name,this.id=-1,this.settingsOpened=!1,this.buttonHTMLObject=HTMLElement,this.buttonIconObject=HTMLElement,this.buttonTitleObject=HTMLElement,this.windowObject=HTMLElement,this.stylingObject=void 0,this.stylingObject=HTMLElement,this.settingsObject={},this.buildButton(),this.windowObject=new m(this),this.groupObject.registerButton(this)}buildButton(){let t=document.createElement("div");t.className="buttonizer-button-group group-button",t.appendChild(new Et(this).build()),this.settingsObject=new fe(this),Buttonizer.bar.settingContent.appendChild(this.settingsObject.build());var e=!1,i=!1;const n=xt(t,{content:window.Buttonizer.translate("bar.buttons.tippy_drag_warning"),animation:"shift-away",arrow:!0,hideOnClick:!1,trigger:"manual",onShow:()=>{i=!0,setTimeout(()=>{i=!1,n.hide()},5e3)}});t.addEventListener("mousedown",()=>{i||(e=!0)}),t.addEventListener("mouseout",()=>{e&&null!==jQuery(this.groupObject.groupBody).sortable("option","cancel")&&(e=!1,n.show())}),t.addEventListener("mouseup",()=>{e=!1}),this.buttonHTMLObject=t,this.groupObject.groupBody.appendChild(this.buttonHTMLObject)}removeButton(){this.alive=!1,this.buttonHTMLObject.remove(),window.Buttonizer.buttonChanges=!0,this.groupObject.buttonsAmount<=1&&jQuery(this.groupObject.groupBody).sortable("option","cancel",".group-button"),1===this.groupObject.getButtonsAlive()!==this.groupObject.singleButtonMode&&(this.groupObject.singleButtonMode=1===this.groupObject.getButtonsAlive(),this.groupObject.getButtons()[0].set("icon_size","25"),this.groupObject.groupHolder.setSingleButtonMode())}set(t,e){this.data[t]=e,this.ui[t].forEach(t=>t.update(e)),window.Buttonizer.buttonChanges=!0}get(t,e){return void 0!==this.data[t]?this.data[t]:(this.data[t]=e,window.Buttonizer.buttonChanges=!0,e)}registerUI(t,e){void 0!==this.ui[t]?this.ui[t].push(e):this.ui[t]=[e]}getUI(t){return void 0!==this.ui[t]&&this.ui[t]}revealSettings(){this.buttonHTMLObject.classList.add("opened"),this.stylingObject.style.display="block",Buttonizer.bar.showSettings(this.get("name"),()=>this.closeSettings())}closeSettings(){this.stylingObject.style.display="none",this.buttonHTMLObject.classList.remove("opened")}};var ge=class{constructor(t){this.groupObject=t,this.groupObject.stylingObject=this,this.groupHolder=null,this.titleElement=null,this.arrow=HTMLElement}build(){let t=document.createElement("div");return t.className="button-group-holder",t.appendChild(this.groupArrow()),t.appendChild(this.createTitle()),t.appendChild(this.groupSettingsButton()),t.appendChild(this.createButtonHolderButton()),t.appendChild(this.createQuickMenu()),this.groupHolder=t,t}createButtonHolderButton(){let t=document.createElement("a");t.href="javascript:void(0)",t.className="holder-button";let e=document.createElement("i");return e.className="fas fa-ellipsis-v",t.appendChild(e),t.addEventListener("click",()=>{let t=this.groupHolder.className.indexOf("holder-show-quick-menu");jQuery(".holder-show-quick-menu").removeClass("holder-show-quick-menu"),-1===t&&this.groupHolder.classList.add("holder-show-quick-menu")}),t}createQuickMenu(){let t=document.createElement("div");return t.className="group-holder-quick-menu",t.addEventListener("click",()=>{this.groupHolder.classList.remove("holder-show-quick-menu")}),t.appendChild(this.createQuickMenuButton("fas fa-plus",window.Buttonizer.translate("bar.buttons.convert_to_group"),()=>{new we(this.groupObject,{name:window.Buttonizer.translate("common.button")+" 2",show_mobile:"true",show_desktop:"true"}),this.groupObject.getButtons()[0].set("icon_size","16"),jQuery(this.groupObject.groupBody).sortable("option","cancel",null)},"convert-button")),t.appendChild(this.createQuickMenuButton("fas fa-wrench",window.Buttonizer.translate("common.settings"),()=>this.toggleStyling(),"")),t.appendChild(this.createQuickMenuButton("fas fa-cog",window.Buttonizer.translate("utils.advanced_settings"),()=>{this.groupObject.singleButtonMode?this.groupObject.getButtons()[0].windowObject.toggle():this.groupObject.windowObject.toggle()},window.Buttonizer.hasPremium()?"":"buttonizer-premium-gray-out")),t.appendChild(this.createQuickMenuButton("fas fa-pencil-alt",window.Buttonizer.translate("utils.rename"),()=>this.groupRename(),"")),t.appendChild(this.createQuickMenuButton("far fa-trash-alt",window.Buttonizer.translate("utils.delete"),()=>this.groupDelete(),"delete")),t.firstChild.style.display="none",this.quickMenu=t,t}createQuickMenuButton(t,e,i,n=""){let o=document.createElement("a");o.href="javascript:void(0)",o.className=n;let s=document.createElement("i");return s.className=t,o.appendChild(s),o.innerHTML+=e,o.addEventListener("click",t=>i(t)),o}groupArrow(){let t=document.createElement("a");t.href="javascript:void(0)",t.className="holder-button pull-left has-background group-arrow";let e=document.createElement("i");e.className="fa fa-angle-down buttonizer-arrow-down",t.appendChild(e);let i=document.createElement("i");return i.className="fa fa-angle-up buttonizer-arrow-up",t.appendChild(i),t.addEventListener("click",()=>this.revealButtons()),this.arrow=t,t}createTitle(){let t=document.createElement("input");return t.type="text",t.className="group-title",t.value=this.groupObject.get("name"),t.setAttribute("readonly",""),t.id="buttonizer-group-title",this.titleElement=t,t.addEventListener("blur",()=>this.updateTitle()),t.addEventListener("keyup",e=>{e.preventDefault(),13===e.keyCode?this.updateTitle():27===e.keyCode&&(t.value=this.groupObject.singleButtonMode?this.groupObject.getButtons()[0].data.name:this.groupObject.data.name,t.setAttribute("readonly",""))}),t.addEventListener("click",e=>{jQuery(".holder-show-quick-menu").removeClass("holder-show-quick-menu"),e.isTrusted&&t.hasAttribute("readonly")&&(this.groupObject.singleButtonMode?this.toggleStyling():this.revealButtons())}),t}updateTitle(){(this.groupObject.singleButtonMode?this.groupObject.getButtons()[0]:this.groupObject).data.name=this.titleElement.value,window.Buttonizer.buttonChanges=!0,this.titleElement.setAttribute("readonly","")}groupRename(){this.titleElement.hasAttribute("readonly")&&(this.titleElement.removeAttribute("readonly"),this.titleElement.focus())}groupSettingsButton(){let t=document.createElement("a");t.href="javascript:void(0)",t.className="holder-button group-style";let e=document.createElement("i");return e.className="fas fa-wrench",t.appendChild(e),t.addEventListener("click",t=>{jQuery(".holder-show-quick-menu").removeClass("holder-show-quick-menu"),this.toggleStyling()}),t}toggleStyling(){this.groupObject.singleButtonMode?this.groupObject.getButtons()[0].revealSettings():this.groupObject.groupSettings.show()}groupDelete(){if(this.groupObject.singleButtonMode)return window.Buttonizer.buttonGroups.length<=1?void new s({title:window.Buttonizer.translate("bar.buttons.delete_button.window_title_button"),content:"<p>"+window.Buttonizer.translate("bar.buttons.delete_button.cannot_delete")+"</p>",buttons:[{text:window.Buttonizer.translate("modal.close"),close:!0,focus:!0,confirm:!0}]}):void new s({title:window.Buttonizer.translate("bar.buttons.delete_button.window_title_button"),content:"<p>"+window.Buttonizer.translate("bar.buttons.delete_button.question_button")+"</p>",onConfirm:()=>{this.groupObject.removeGroup(),window.Buttonizer.buttonChanges=!0},buttons:[{text:window.Buttonizer.translate("modal.changed_my_mind"),close:!0,focus:!0},{text:window.Buttonizer.translate("utils.delete"),confirm:!0}]});window.Buttonizer.buttonGroups.length<=1?new s({title:window.Buttonizer.translate("bar.buttons.delete_button.window_title_button"),content:"<p>"+window.Buttonizer.translate("bar.buttons.delete_button.cannot_delete_group")+"</p>",buttons:[{text:window.Buttonizer.translate("modal.close"),close:!0,focus:!0,confirm:!0}]}):new s({title:window.Buttonizer.translate("bar.buttons.delete_button.window_title_group"),content:"<p>"+window.Buttonizer.translate("bar.buttons.delete_button.question_group_multiple_buttons").format(this.groupObject.getButtonsAlive())+"</p>",onConfirm:()=>{this.groupObject.removeGroup(),window.Buttonizer.buttonChanges=!0},buttons:[{text:window.Buttonizer.translate("modal.changed_my_mind"),close:!0,focus:!0},{text:window.Buttonizer.translate("utils.delete"),confirm:!0}]})}revealButtons(){this.groupObject.groupOpened=!this.groupObject.groupOpened,this.groupObject.groupOpened?(this.groupObject.groupObject.classList.add("opened"),jQuery(this.groupObject.groupBody).sortable("enable")):(this.groupObject.groupObject.classList.remove("opened"),jQuery(this.groupObject.groupBody).sortable("disable")),this.groupObject.groupBody.style.display=this.groupObject.groupOpened?"block":"none"}setSingleButtonMode(){this.groupObject.singleButtonMode?(this.quickMenu.firstChild.style.display="",this.titleElement.value=void 0===this.groupObject.getButtons()[0]?this.groupObject.firstButtonName:this.groupObject.getButtons()[0].data.name,this.groupHolder.classList.add("single-button"),this.groupObject.groupOpened&&this.revealButtons(),this.groupObject.getButtons()[0].set("use_main_button_style","false"),this.groupObject.getButtons()[0].getUI("use_main_button_style-container")[0].element.style.display="none",this.groupObject.getUI("position-container")[1].element.style.display="",this.groupObject.getUI("animation-container")[1].element.style.display="",this.groupObject.set("single_button_mode","true")):(this.quickMenu.firstChild.style.display="none",this.groupObject.getUI("position-container")[1].element.style.display="none",this.groupObject.getUI("animation-container")[1].element.style.display="none",this.groupObject.getButtons()[0].set("use_main_button_style","true"),this.groupObject.getButtons()[0].getUI("use_main_button_style-container")[0].element.style.display="",this.titleElement.value=this.groupObject.data.name,this.groupHolder.classList.remove("single-button"),this.groupObject.set("single_button_mode","false"))}};class ye extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.start_opened.title"),description:window.Buttonizer.translate("settings.start_opened.description"),class:"is-boolean-only",content:[new It({parentObject:t,dataEntry:"start_opened",default:"false"})]})}}class ve extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.menu_style.title"),description:window.Buttonizer.translate("settings.menu_style.description"),content:[new oe({parentObject:t,dataEntry:"menu_style",default:"default",list:[{value:"default",text:window.Buttonizer.translate("settings.menu_style.styles.default")},{value:"faded",text:window.Buttonizer.translate("settings.menu_style.styles.faded")},{value:"corner-circle",text:window.Buttonizer.translate("settings.menu_style.styles.cornercircle")},{value:"building-up",text:window.Buttonizer.translate("settings.menu_style.styles.buildingup")},{value:"pop",text:window.Buttonizer.translate("settings.menu_style.styles.pop")},{value:"square",text:window.Buttonizer.translate("settings.menu_style.styles.square")}]})]})}}var _e=class{constructor(t){this.groupObject=t,this.open=!1,this.formElements={alwaysOpen:void 0,menuStyle:void 0,isMobile:void 0,isDesktop:void 0,attentionAnimation:void 0,buttonColor:void 0,borderRadius:void 0,backgroundImage:void 0,groupPosition:void 0,buttonIconSelect:void 0,buttonIconColor:void 0,buttonIconSize:void 0,buttonImageSelect:void 0,buttonImageBackground:void 0,buttonImageIconSelect:void 0,imageSize:void 0,imageBorderRadius:void 0,buttonLabel:void 0,buttonLabelColor:void 0,buttonLabelSize:void 0,show_label:void 0},this.element=HTMLElement}build(){let t=document.createElement("div");return t.className="button-group-styling hidden",this.element=t,this.hide(),this.buildTop(),this.buildForm(),this.groupObject.stylingObject=t,this.element}buildForm(){this.element.appendChild(this.top()),this.element.appendChild(this.menuStyle()),this.element.appendChild(this.buttonStyle()),this.element.appendChild(this.iconStyle()),this.element.appendChild(this.labelStyle());let t=document.createElement("a");t.href="javascript:void(0)",t.className="advanced-settings"+(window.Buttonizer.hasPremium()?"":" buttonizer-premium-gray-out"),t.innerHTML="<i></i> "+window.Buttonizer.translate("utils.advanced_settings")+(window.Buttonizer.hasPremium()?"":" <span class='buttonizer-premium'>PRO</span>"),t.addEventListener("click",()=>{this.groupObject.windowObject.toggle()}),this.element.appendChild(t)}top(){let t=document.createElement("div");return t.className="style-top",this.formElements.menuPosition=new me(this.groupObject),t.appendChild(this.formElements.menuPosition.build()),this.formElements.isMobile=new ie(this.groupObject),t.appendChild(this.formElements.isMobile.build()),t}menuStyle(){let t=document.createElement("div");t.className="style-menu";let e=document.createElement("h2");return e.innerHTML="<i></i><span>"+window.Buttonizer.translate("settings.setting_categories.menu_style")+"</span>",t.appendChild(e),this.formElements.alwaysOpen=new ye(this.groupObject),t.appendChild(this.formElements.alwaysOpen.build()),this.formElements.menuStyle=new ve(this.groupObject),t.appendChild(this.formElements.menuStyle.build()),this.formElements.attentionAnimation=new be(this.groupObject),t.appendChild(this.formElements.attentionAnimation.build()),t}buttonStyle(){let t=document.createElement("div");t.className="style-button";let e=document.createElement("h2");return e.innerHTML="<i></i><span>"+window.Buttonizer.translate("settings.setting_categories.group_style")+"</span>",t.appendChild(e),this.formElements.buttonColor=new ne(this.groupObject),t.appendChild(this.formElements.buttonColor.build()),this.formElements.borderRadius=new Zt(this.groupObject),t.appendChild(this.formElements.borderRadius.build()),this.formElements.backgroundImage=new ce(this.groupObject),t.appendChild(this.formElements.backgroundImage.build()),t}iconStyle(){let t=document.createElement("div");t.className="style-icon";let e=document.createElement("h2");return e.innerHTML="<i></i><span>"+window.Buttonizer.translate("settings.setting_categories.group_icon")+"</span>",t.appendChild(e),this.formElements.buttonIcon=new he(this.groupObject),t.appendChild(this.formElements.buttonIcon.build()),this.formElements.buttonIconSelect=new le(this.groupObject),t.appendChild(this.formElements.buttonIconSelect.build()),this.formElements.buttonIconColor=new Kt(this.groupObject),t.appendChild(this.formElements.buttonIconColor.build()),this.formElements.buttonIconSize=new Jt(this.groupObject),t.appendChild(this.formElements.buttonIconSize.build()),t}labelStyle(){let t=document.createElement("div");t.className="style-label";let e=document.createElement("h2");return e.innerHTML="<i></i><span>"+window.Buttonizer.translate("settings.setting_categories.label")+"</span>",t.appendChild(e),this.formElements.buttonLabel=new Mt(this.groupObject),t.appendChild(this.formElements.buttonLabel.build()),this.formElements.show_label=new se(this.groupObject),t.appendChild(this.formElements.show_label.build()),this.formElements.show_label_mobile=new re(this.groupObject),t.appendChild(this.formElements.show_label_mobile.build()),this.formElements.buttonLabelColor=new ae(this.groupObject),t.appendChild(this.formElements.buttonLabelColor.build()),this.formElements.buttonLabelFontSizeBorderRadius=new te(this.groupObject),t.appendChild(this.formElements.buttonLabelFontSizeBorderRadius.build()),t}buildTop(){}toggle(){(this.open=!0)?(this.open=!1,this.hide()):(this.open=!0,this.show())}show(){this.element.className="button-group-styling",Buttonizer.bar.showSettings(this.groupObject.get("name"),()=>this.hide())}hide(){this.element.className="button-group-styling hidden"}};class ke extends d{constructor(t){super(t,window.Buttonizer.translate("utils.advanced_settings")+" - "+window.Buttonizer.translate("common.group")+" "+t.data.name+(window.Buttonizer.hasPremium()?"":" (premium)"))}render(){this.filter(),this.delay(),this.styling()}filter(){let t=document.createElement("div");t.appendChild(new l(this).build()),t.appendChild(new a(this).build()),super.addItem(window.Buttonizer.translate("settings.button_group_window.filters"),t)}delay(){let t=document.createElement("div");t.appendChild(new u(this).build()),t.appendChild(new c(this).build()),super.addItem(window.Buttonizer.translate("settings.button_group_window.timeout_scroll"),t)}styling(){let t=document.createElement("div");t.appendChild(new h(this).build()),t.appendChild(new p(this).build()),super.addItem(window.Buttonizer.translate("settings.button_group_window.styling"),t)}}class xe{constructor(t,e){e||(e=[]),this.type="group",this.groupOpened=!1,this.data=t,this.ui={},this.groupObject=HTMLElement,this.groupID=window.Buttonizer.buttonGroups.length,this.stylingOpened=!1,this.stylingObject=HTMLElement,this.groupBody=HTMLElement,this.windowObject=HTMLElement,this.buttons=[],this.buttonsLength=e.length,this.singleButtonMode=!1,this.buildGroup(),this.windowObject=new ke(this);for(let t in e)new we(this,e[t]);this.appendAddButton(),window.Buttonizer.buttonGroups.push(this)}get buttonsAmount(){return this.getButtonsAlive()}buildGroup(){let t=document.createElement("div");t.className="buttonizer-button-group is-group",this.groupObject=t,this.groupHolder=new ge(this),t.appendChild(this.groupHolder.build()),this.groupSettings=new _e(this),Buttonizer.bar.settingContent.appendChild(this.groupSettings.build()),this.appendAddButton(),this.groupBody=document.createElement("div"),this.groupBody.style.display="none",this.groupBody.className="button-group-body",t.appendChild(this.groupBody),jQuery(this.groupBody).sortable({items:"> div",axis:"y",cursor:"move",delay:150,handle:"#buttonizer-button-title",helper:"clone",cancel:this.buttonsLength<=1?".group-button":null,connectWith:".button-group-body",disabled:!0,start:(t,e)=>{jQuery(e.item).attr("previndex",e.item.index()),jQuery(e.item).attr("prevgroup",jQuery(this.groupBody).parent().index())},stop:(t,e)=>{jQuery(e.item).removeAttr("previndex"),jQuery(e.item).removeAttr("prevgroup")},update:function(t,e){if(this===e.item.parent()[0]){let t=e.item.index(),i=jQuery(e.item).attr("previndex"),n=jQuery(this).parent().index(),o=jQuery(e.item).attr("prevgroup");e.sender&&jQuery(this).sortable("option","cancel",null),window.Buttonizer.updateButtonList(t,i,n,o),jQuery(e.item).removeAttr("previndex"),jQuery(e.item).removeAttr("prevgroup")}}}),jQuery(this.groupBody).disableSelection(),jQuery(".group-title").disableSelection(),Buttonizer.bar.groupHolder.appendChild(this.groupObject)}duplicate(){new xe(this.data,this.buttons)}appendAddButton(){let t=document.createElement("a");t.href="javascript:void(0)",t.className="create-new-button",t.innerHTML=window.Buttonizer.translate("utils.add_button")+" +",t.addEventListener("click",()=>{new we(this,{name:window.Buttonizer.translate("common.button")+" "+(this.getButtonsAlive()+1),show_mobile:"true",show_desktop:"true"}),jQuery(this.groupBody).sortable("option","cancel",null)}),this.groupObject.appendChild(t)}registerButton(t){this.buttons.push(t),1===this.getButtonsAlive()!==this.singleButtonMode&&(this.singleButtonMode=1===this.getButtonsAlive(),this.groupHolder.setSingleButtonMode())}removeGroup(){let t=window.Buttonizer.buttonGroups.indexOf(this);window.Buttonizer.buttonGroups.splice(t,1),this.groupObject.remove()}set(t,e){this.data[t]=e,void 0!==this.ui[t]&&this.ui[t].forEach(t=>t.update(e)),window.Buttonizer.buttonChanges=!0}get(t,e){return void 0!==this.data[t]?this.data[t]:(this.data[t]=e,window.Buttonizer.buttonChanges=!0,e)}getButtonsAlive(){let t=0;return this.buttons.forEach(e=>{e.alive&&t++}),t}getButtons(){return this.buttons.filter(t=>t.alive)}registerUI(t,e){void 0!==this.ui[t]?this.ui[t].push(e):this.ui[t]=[e]}getUI(t){return void 0!==this.ui[t]&&this.ui[t]}}var Ee=xe;var Be=class{constructor(t){this.buttonizerObject=t,this.topBarElement=HTMLElement,this.optionsWindow=HTMLElement,this.publishButton=HTMLElement,this.revertChangesText=HTMLElement,this.alertText=HTMLElement,this.eventListCache=[],this.eventTrackerMenuItem=null,this.eventTracker=null,this.windowOptions=[{buttons:[{title:"Buttonizer",description:window.Buttonizer.translate("bar.menu.version"),callback:()=>{window.open("https://www.buttonizer.pro/")}},{title:window.Buttonizer.translate("bar.menu.knowledgebase.title"),description:window.Buttonizer.translate("bar.menu.knowledgebase.description"),callback:()=>{window.open("https://community.buttonizer.pro/knowledgebase")}}]},{title:window.Buttonizer.translate("bar.menu.support_group"),buttons:[{title:window.Buttonizer.translate("bar.menu.support.title"),callback:()=>{window.open("https://community.buttonizer.pro/t/support")}},{title:window.Buttonizer.translate("bar.menu.community.title"),description:window.Buttonizer.translate("bar.menu.community.description"),callback:()=>{window.open("https://community.buttonizer.pro/")}},{title:window.Buttonizer.translate("bar.menu.tour.title"),description:window.Buttonizer.translate("bar.menu.tour.description"),callback:()=>{window.Buttonizer.startTour()}}]},{title:window.Buttonizer.translate("bar.menu.account_group"),buttons:[{title:window.Buttonizer.translate("bar.menu.account.title"),callback:()=>{window.open(buttonizer_admin.admin+"?page=Buttonizer-account")}},{title:window.Buttonizer.translate("bar.menu.upgrade.title"),callback:()=>{window.open(buttonizer_admin.admin+"?page=Buttonizer-pricing")}},{title:window.Buttonizer.translate("bar.menu.affiliation.title"),description:window.Buttonizer.translate("bar.menu.affiliation.description"),callback:()=>{window.open(buttonizer_admin.admin+"?page=Buttonizer-affiliation")}}]},{buttons:[{title:window.Buttonizer.translate("page_rules.name"),icon:"fas fa-filter",class:window.Buttonizer.hasPremium()?"":"buttonizer-premium-gray-out",callback:()=>{window.Buttonizer.hasPremium()?window.Buttonizer.pageRule.show():window.Buttonizer.showPremiumPopup(window.Buttonizer.translate("page_rules.pro_description"),"SQnAhyBWLWg")}},{title:window.Buttonizer.translate("time_schedules.name"),icon:"far fa-clock",class:window.Buttonizer.hasPremium()?"":"buttonizer-premium-gray-out",callback:()=>{window.Buttonizer.hasPremium()?window.Buttonizer.timeSchedule.show():window.Buttonizer.showPremiumPopup(window.Buttonizer.translate("time_schedules.pro_description"),"C-B9ITdY6A4")}}]},{buttons:[{title:window.Buttonizer.translate("bar.menu.options.title"),icon:"fa fa-cogs",class:"single-button",callback:()=>{this.buttonizerObject.settingsWindow.toggle()}}]}],document.body.appendChild(this.buildTopBar())}buildTopBar(){let t=document.createElement("div");t.className="buttonizer-topbar";let e=document.createElement("div");return e.className="revert-save",e.style.display="inline-block",e.appendChild(this.createRevertChangesButton()),e.appendChild(this.createPublishButton()),t.appendChild(this.createBackButton()),t.appendChild(this.createLogo()),t.appendChild(e),t.appendChild(this.createOptionsButton()),t.appendChild(this.createAlertText()),t.appendChild(this.createOptionsWindow()),t.appendChild(this.createEventMenuItem()),t.appendChild(this.createEventWindow()),this.topBarElement=t,t}createOptionsButton(){let t=document.createElement("a");return t.className="options-button button right fas fa-cog",t.addEventListener("click",()=>{this.optionsWindow.toggle()}),t}createEventMenuItem(){let t=document.createElement("a");return t.href="javascript:void(0)",t.className="event-tracker-button",t.style.display="none",t.innerHTML="",t.addEventListener("click",()=>{"block"===this.eventTracker.container.style.display?this.eventTracker.container.style.display="none":this.eventTracker.container.style.display="block"}),this.eventTrackerMenuItem=t,t}createEventWindow(){let t=document.createElement("div");t.className="event-track-window",t.style.display="none",t.innerHTML=`<div class="track-window-title">${window.Buttonizer.translate("event_tracker.window_title")}</div>`;let e=document.createElement("a");e.href="javascript:void(0)",e.className="close",e.innerHTML='<i class="fas fa-times"></i>',e.addEventListener("click",()=>{t.style.display="none"}),t.appendChild(e);let i=document.createElement("div");return i.className="list-container",i.innerHTML="",t.appendChild(i),this.eventTracker={container:t,list:i},t}updateEventLogs(t){if(0!==t.length){if(this.eventListCache!==t){this.eventTrackerMenuItem.style.display="block",this.eventTrackerMenuItem.innerHTML='<i class="fas fa-info"></i> ('+t.length+") "+window.Buttonizer.translate("event_tracker.title"),this.eventTracker.list.innerHTML="";for(let e=0;e<t.length;e++){let i=document.createElement("div");i.className="event-element event-"+t[e].type,i.innerHTML=t[e].message,this.eventTracker.list.appendChild(i)}}}else this.eventTrackerMenuItem.style.display="none"}createOptionsWindow(){this.optionsWindow=document.createElement("div"),this.optionsWindow.className="options-window",this.optionsWindow.hidden=!0,this.optionsWindow.toggle=(()=>{this.optionsWindow.hidden=!this.optionsWindow.hidden});let t=document.createElement("ul");for(let e=0;e<this.windowOptions.length;e++){let i=document.createElement("li");if(i.className="group-container","string"==typeof this.windowOptions[e].title){let t=document.createElement("div");t.className="group-title",t.innerHTML=this.windowOptions[e].title,i.appendChild(t)}for(let t=0;t<this.windowOptions[e].buttons.length;t++)i.appendChild(this.barMenuItem(this.windowOptions[e].buttons[t]));t.appendChild(i)}return this.optionsWindow.appendChild(t),this.optionsWindow}barMenuItem(t){let e=document.createElement("a");e.href="javascript:void(0)",e.className=t.class?"option "+t.class:"option";let i=document.createElement("span");if(i.className="button-title",i.innerHTML=t.title?t.title:"Default title",e.appendChild(i),t.hasOwnProperty("description")){let i=document.createElement("span");i.className="button-description",i.innerHTML=t.description?t.description:"",e.appendChild(i)}if(t.hasOwnProperty("icon")){let i=document.createElement("i");i.className=t.icon,e.appendChild(i)}return t.hasOwnProperty("callback")&&e.addEventListener("click",()=>{this.optionsWindow.toggle(),t.callback()}),e}createBackButton(){let t=document.createElement("a");return t.className="close-button fa fa-times",t.addEventListener("click",()=>{document.location.href=window.Buttonizer.buttonizerInitData.wordpress.admin_base}),t}createLogo(){let t=document.createElement("img");return t.className="buttonizer-logo",t.src=buttonizer_admin.assets+"/images/logo.png",t}createPublishButton(){return this.publishButton=document.createElement("a"),this.publishButton.className="publish-button button-primary right",this.publishButton.innerText=window.Buttonizer.translate("common.save_publish"),this.publishButton.enabled=!0,this.publishButton.addEventListener("click",()=>{this.publishButton.enabled&&this.buttonizerObject.savingMechanism.publish()}),this.publishButton.enable=(()=>{this.publishButton.enabled=!0,this.revertChangesText.hidden=!1,this.publishButton.innerText=window.Buttonizer.translate("common.save_publish"),this.publishButton.className=this.publishButton.className.replace(" disabled","")}),this.publishButton.disable=(t=>{this.publishButton.enabled=!1,this.revertChangesText.hidden=!0,this.publishButton.innerText=t,this.publishButton.className.includes(" disabled")||(this.publishButton.className+=" disabled")}),this.publishButton}createRevertChangesButton(){return this.revertChangesText=document.createElement("a"),this.revertChangesText.className="revert-button right",this.revertChangesText.innerText=window.Buttonizer.translate("revert.revert_changes"),this.revertChangesText.href="javascript:void(0)",this.revertChangesText.addEventListener("click",()=>{new s({title:window.Buttonizer.translate("revert.revert_changes"),content:"<p>"+window.Buttonizer.translate("revert.modal.intro")+"</p><p>"+window.Buttonizer.translate("revert.modal.action")+"</p>",onConfirm:()=>{this.buttonizerObject.savingMechanism.revert()},buttons:[{text:window.Buttonizer.translate("modal.changed_my_mind"),close:!0,focus:!0},{text:window.Buttonizer.translate("revert.revert_changes"),confirm:!0}]})}),this.revertChangesText}createAlertText(){return this.alertText=document.createElement("a"),this.alertText.className="alert-text",this.alertText.showSaving=(()=>{this.alertText.innerHTML='<i class="fas fa-mug-hot"></i> '+window.Buttonizer.translate("saving.saving"),this.alertText.hidden=!1}),this.alertText.showSaved=(()=>{this.alertText.innerHTML='<i class="fas fa-check"></i> '+window.Buttonizer.translate("saving.completed"),setTimeout(()=>{this.alertText.hidden=!0},2e3)}),this.alertText.alert=(t=>{this.alertText.innerText=t,this.alertText.hidden=!1,setTimeout(()=>{this.alertText.hidden=!0},2e3)}),this.alertText.hidden=!0,this.alertText}set changes(t){t?this.publishButton.enable():this.publishButton.disable(window.Buttonizer.translate("common.published"))}};var ze=class{constructor(t){this.buttonizerObject=t,this.barElement=HTMLElement,this.groupContainer=HTMLElement,this.settingBar=HTMLElement,this.settingContainer=HTMLElement,this.settingContent=HTMLElement,this.settingTitle=HTMLElement,this.settingCallback=(()=>console.log("huh?")),document.body.appendChild(this.buildBar()),jQuery(this.groupContainer).scrollbar(),jQuery(this.settingContent).scrollbar()}buildBar(){let t=document.createElement("div");t.className="buttonizer-bar";let e=document.createElement("div");e.className="group-container container",e.appendChild(this.createButtonHolder()),e.appendChild(this.addButtonGroup()),t.appendChild(e),t.appendChild(this.createBarFooter()),this.barElement=t,this.groupContainer=e;let i=document.createElement("div"),n=document.createElement("div");n.className="settings-content";let o=document.createElement("div");return o.className="settings-container container hidden",o.appendChild(this.createSettingBar()),n.appendChild(i),o.appendChild(n),t.appendChild(o),this.settingContent=i,this.settingContainer=o,t}createSettingBar(){let t=document.createElement("div");t.className="top";let e=document.createElement("a");e.className="back-button fa fa-angle-left",e.addEventListener("click",()=>{jQuery(".settings-container").addClass("hidden"),jQuery(".group-container").removeClass("hidden"),setTimeout(()=>this.settingCallback(),250)}),t.appendChild(e);let i=document.createElement("div");i.className="title-wrapper";let n=document.createElement("h4");n.innerHTML=window.Buttonizer.translate("bar.buttons.now_editing");let o=document.createElement("h2");return o.innerHTML="nothing!",i.appendChild(n),i.appendChild(o),t.appendChild(i),this.settingBar=t,this.settingTitle=o,t}createButtonHolder(){return this.groupHolder=document.createElement("div"),this.groupHolder.className="buttonizer-group-holder",jQuery(this.groupHolder).sortable({items:"> div",axis:"y",cursor:"move",delay:150,handle:"#buttonizer-group-title",helper:"clone",start:function(t,e){jQuery(this).attr("data-previndex",e.item.index())},stop:function(t,e){jQuery(this).removeAttr("data-previndex")},update:function(t,e){var i=e.item.index(),n=jQuery(this).attr("data-previndex");window.Buttonizer.updateButtonGroupList(i,n),jQuery(this).removeAttr("data-previndex")},cancel:null}),jQuery(this.groupHolder).disableSelection(),jQuery(".group-title").disableSelection(),this.groupHolder}addButtonGroup(){let t=document.createElement("a");return t.href="javascript:void(0)",t.className="create-new-button is-create-group buttonizer-premium-gray-out",t.innerHTML=window.Buttonizer.translate("utils.add_group")+'+ <span class="buttonizer-premium">PRO</span>',t.addEventListener("click",()=>window.Buttonizer.showPremiumPopup("You are able to add multiple groups on different positions.","Qxs1oGCVATU")),t}generateLink(t,e,i,n){n||(n="");let o=document.createElement("a");return o.href="javascript:void(0)",o.className=n,o.innerHTML='<i class="'+t+'"></i> '+e,o.addEventListener("click",i),o}showSettings(t,e){jQuery(".buttonizer-bar .settings-container").removeClass("hidden"),jQuery(".buttonizer-bar .group-container").addClass("hidden"),this.settingTitle.innerHTML=t,this.settingCallback=e}createBarFooter(){let t=document.createElement("div");t.className="bar-footer";let e=document.createElement("div");e.className="footer-device-selector";let i=document.createElement("a");i.href="javascript:void(0)",i.className="active",i.innerHTML='<span class="dashicons-before dashicons-desktop"></span>',i.addEventListener("click",()=>{i.classList.add("active"),n.classList.remove("active"),o.classList.remove("active"),document.querySelector(".buttonizer-frame").className="buttonizer-frame"}),xt(i,{content:window.Buttonizer.translate("bar.preview.desktop"),animation:"shift-away",arrow:!1,placement:"top"}),e.appendChild(i);let n=document.createElement("a");n.href="javascript:void(0)",n.innerHTML='<span class="dashicons-before dashicons-tablet"></span>',n.addEventListener("click",()=>{i.classList.remove("active"),n.classList.add("active"),o.classList.remove("active"),document.querySelector(".buttonizer-frame").className="buttonizer-frame frame-size-tablet"}),xt(n,{content:window.Buttonizer.translate("bar.preview.tablet"),animation:"shift-away",arrow:!1,placement:"top"}),e.appendChild(n);let o=document.createElement("a");return o.href="javascript:void(0)",o.innerHTML='<span class="dashicons-before dashicons-smartphone"></span>',o.addEventListener("click",()=>{i.classList.remove("active"),n.classList.remove("active"),o.classList.add("active"),document.querySelector(".buttonizer-frame").className="buttonizer-frame frame-size-mobile"}),xt(o,{content:window.Buttonizer.translate("bar.preview.mobile"),animation:"shift-away",arrow:!1,placement:"top"}),e.appendChild(o),t.appendChild(e),t}};var Ce=class{constructor(){this.element=document.createElement("div"),this.element.className="buttonizer-loading";let t=document.createElement("div");t.className="middle";let e=document.createElement("img");e.src=buttonizer_admin.assets+"/images/buttonizer-loading.png",t.innerHTML=this.svg(),t.appendChild(e),this.textElement=document.createElement("div"),this.textElement.className="loader-text",t.appendChild(this.textElement),this.element.appendChild(t),document.body.appendChild(this.element)}svg(){return'<svg width="165" height="165" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="lds-rolling"><circle cx="50" cy="50" fill="none" stroke="#2f788a" stroke-width="7" r="35" stroke-dasharray="164.93361431346415 56.97787143782138" transform="rotate(300 50 50)">\x3c!--animateTransform attributeName="transform" type="rotate" calcMode="linear" values="0 50 50;360 50 50" keyTimes="0;1" dur="1s" begin="0s" repeatCount="indefinite"--\x3e</animateTransform></circle></svg>'}show(t,e=""){t||(t=""),this.textElement.innerHTML=t,this.element.className="buttonizer-loading "+e,this.element.style.display="block"}hide(){this.element.style.display="none"}};var je=class{constructor(){this.updateTimer=setTimeout(()=>{},0),this.isUpdating=!1,this.tempButtons={},this.savingObject=HTMLElement,this.savedObject=HTMLElement,setInterval(()=>this.checkUpdates(),500)}checkUpdates(){window.Buttonizer.buttonChanges&&!this.isUpdating&&(window.Buttonizer.buttonChanges=!1,clearTimeout(this.updateTimer),this.updateTimer=setTimeout(()=>this.save(),1e3))}save(){window.Buttonizer.buttonChanges||(this.isUpdating=!0,window.Buttonizer.buttonChanges=!1,window.Buttonizer.topBar.alertText.showSaving(),console.log("[BUG DEBUG SAVING AND RELOADING] button changes!"),jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&request=SaveData&save=buttons",dataType:"json",method:"post",data:{security:buttonizer_admin.security,buttons:this.generateJSONObject()},success:t=>{this.isUpdating=!1,"success"===t.status?(console.log("[BUG DEBUG SAVING AND RELOADING] saved!"),window.Buttonizer.topBar.alertText.showSaved(),this.reloadPreview(),window.Buttonizer.changes=!0):window.Buttonizer.savingError(t.message)},error:t=>{this.isUpdating=!1,window.Buttonizer.savingError(t)}}))}publish(){window.Buttonizer.buttonChanges||this.isUpdating||(this.isUpdating=!0,window.Buttonizer.buttonChanges=!1,window.Buttonizer.topBar.publishButton.disable(window.Buttonizer.translate("common.publishing")),jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&request=SaveData&save=publish",dataType:"json",data:{security:buttonizer_admin.security},method:"post",success:t=>{this.isUpdating=!1,"success"===t.status?window.Buttonizer.topBar.publishButton.disable(window.Buttonizer.translate("common.published")):new s({title:window.Buttonizer.translate("errors.saving.title"),content:`<p>${window.Buttonizer.translate("errors.saving.message")}.</p><p>${t.message}</p>`,buttons:[{text:"Close",close:!0}]})},error:(t,e,i)=>{this.isUpdating=!1,window.Buttonizer.topBar.publishButton.enable(),window.bdebug.error("Couldn't complete saving: "+t)}}))}revert(){window.Buttonizer.buttonChanges||(window.Buttonizer.loader.show(window.Buttonizer.translate("revert.reverting")),this.isUpdating=!0,window.Buttonizer.buttonChanges=!1,jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&request=SaveData&save=revert",dataType:"json",method:"post",data:{security:buttonizer_admin.security},success:t=>{if(this.isUpdating=!1,"success"!==t.status)return window.Buttonizer.loader.hide(),void new s({title:window.Buttonizer.translate("revert.error.title"),content:`<p>${window.Buttonizer.translate("revert.error.message")}</p><p>${t.message}</p>`,buttons:[{text:"Close",close:!0}]});document.location.reload()},error:(t,e,i)=>{this.isUpdating=!1,window.bdebug.error("Couldn't complete saving: "+t)}}))}reloadPreview(){console.log("[BUG DEBUG SAVING AND RELOADING] requested!");try{document.getElementById("buttonizer-iframe").contentWindow.postMessage({eventType:"buttonizer",messageType:"preview-reload"},document.location.origin)}catch(t){console.log("Buttonizer tried to auto update the Buttonizer Buttons. But the message didn't came through. Well. Doesn't matter, it's just an extra function. It's nice to have."),console.log(t),document.getElementById("buttonizer-iframe").contentWindow.location.reload()}}generateJSONObject(){let t=window.Buttonizer.buttonGroups,e=[];for(let i=0;i<t.length;i++){let n=t[i].buttons,o=[];for(let t=0;t<n.length;t++)n[t].alive&&o.push(n[t].data);e.push({data:t[i].data,buttons:o})}return e}},Se=class{constructor(){this.versionDropdown={},this.libraryPremiumCode={},this.currentSelected=window.Buttonizer.getSetting("icon_library","fontawesome"),this.currentSelectedIndex=null,this.currentSelectedVersion=window.Buttonizer.getSetting("icon_library_version","5.free"),this.currentSelectedVersionIndex=null,this.currentSelectedPremiumCode=window.Buttonizer.getSetting("icon_library_code",""),this.cachedPremium=[],this.libraries=[{name:"Font Awesome",id:"fontawesome",versions:[{id:"5.free",name:"Font Awesome 5 - "+window.Buttonizer.translate("settings_window.icon_library.free")+" - "+window.Buttonizer.translate("settings_window.icon_library.latest"),free:!0},{id:"5.paid",name:"Font Awesome 5 - Pro - "+window.Buttonizer.translate("settings_window.icon_library.latest"),free:!1},{id:"4.7.0",name:"Font Awesome 4.7",free:!0}]}]}build(){let t=document.createElement("div");return t.appendChild(this.iconLibrary()),t.appendChild(this.versionSelector()),t.appendChild(this.importIconLibrary()),t}showPremiumIcons(){return!0}iconLibrary(){let t=document.createElement("select");t.className="window-select";for(let e=0;e<this.libraries.length;e++){let i=document.createElement("option");i.value=e,i.text=this.libraries[e].name,i.setAttribute("data-index",e.toString()),this.currentSelected===this.libraries[e].id&&(i.selected=!0,this.currentSelectedIndex=e),t.appendChild(i)}t.addEventListener("change",()=>{this.currentSelected=t.value,this.currentSelectedIndex=Number(t.getAttribute("data-index")),this.currentSelectedVersion=0,window.Buttonizer.saveSettings({icon_library:t.value,icon_library_version:this.libraries[this.currentSelectedIndex].versions[0]},!1),this.buildVersionSelector(),this.reloadIframe()});let e=document.createElement("div");e.innerHTML=window.Buttonizer.translate("settings_window.icon_library.info");let i=new r;return i.addColumnHTML("<h2>"+window.Buttonizer.translate("settings_window.icon_library.title")+"</h2>"),i.addColumn(t,"","370"),i.newRow(),i.addColumnText(""),i.addColumn(e),i.build()}versionSelector(){this.versionDropdown=document.createElement("select"),this.versionDropdown.className="window-select",this.versionDropdown.addEventListener("change",()=>{this.currentSelectedVersion=this.versionDropdown.value,window.Buttonizer.saveSettings({icon_library_version:this.currentSelectedVersion},!1),this.currentSelectedVersion.indexOf("paid")>=0?(this.libraryPremiumCode.style.display="block",""!==this.currentSelectedPremiumCode&&this.reloadIcons()):(this.libraryPremiumCode.style.display="none",this.reloadIcons())});let t=document.createElement("div");t.innerHTML=window.Buttonizer.translate("settings_window.icon_library.select_version.info");let e=new r;e.addColumnHTML("<h2>"+window.Buttonizer.translate("settings_window.icon_library.select_version.title")+"</h2>"),e.addColumn(this.versionDropdown,"","370"),e.newRow(),e.addColumnText(""),e.addColumn(t);let i=document.createElement("div");return i.appendChild(e.build()),i.appendChild(this.libraryLicenseKey()),this.buildVersionSelector(),i}reloadIcons(){window.Buttonizer.iconSelector.iconListener.onReady(()=>{window.Buttonizer.iconSelector.rebuild(),window.Buttonizer.addIconLibrary(),this.reloadIframe()}),window.Buttonizer.iconSelector.iconListener.loadIcons()}libraryLicenseKey(){let t=document.createElement("div");t.innerHTML=window.Buttonizer.translate("settings_window.icon_library.library_license_key.info")+'<a href="" target="_blank" class="link-add-more" style="display: inline">'+window.Buttonizer.translate("settings_window.icon_library.library_license_key.how_does_it_work")+"</a>";let e=document.createElement("input");e.placeholder=window.Buttonizer.translate("settings_window.icon_library.library_license_key.enter_integrity_code"),e.className="window-select",e.value=this.currentSelectedPremiumCode,e.addEventListener("change",()=>{window.Buttonizer.saveSettings({icon_library_code:e.value},!1),this.reloadIcons()});let i=new r;return i.addColumnHTML(" "),i.addColumn(e,"","370"),i.newRow(),i.addColumnText(""),i.addColumn(t),this.libraryPremiumCode=i.build(),this.libraryPremiumCode}buildVersionSelector(){this.versionDropdown.innerHTML="";let t=!1;for(let e=0;e<this.libraries[this.currentSelectedIndex].versions.length;e++){let i=document.createElement("option");i.value=this.libraries[this.currentSelectedIndex].versions[e].id,i.text=this.libraries[this.currentSelectedIndex].versions[e].name,this.currentSelectedVersion===i.value&&(i.selected=!0,this.libraries[this.currentSelectedIndex].versions[e].free||(t=!0)),this.versionDropdown.appendChild(i)}this.libraryPremiumCode.style.display=t?"block":"none"}importIconLibrary(){let t=new Bt({state:window.Buttonizer.getSetting("import_icon_library",!0)});t.onToggle(t=>{window.Buttonizer.saveSettings({import_icon_library:t},!1),this.reloadIframe()});let e=document.createElement("div");e.innerHTML=window.Buttonizer.translate("settings_window.icon_library.import_library.info");let i=new r;return i.addColumnHTML("<h2>"+window.Buttonizer.translate("settings_window.icon_library.import_library.title")+"</h2>"),i.addColumn(t.build(),"","370"),i.newRow(),i.addColumnText(""),i.addColumn(e),this.buildVersionSelector(),i.build()}reloadIframe(){setTimeout(()=>{document.getElementById("buttonizer-iframe").contentWindow.location.reload()},1500)}};class Le{constructor(){this.versionDropdown={},this.currentSelected=window.Buttonizer.getSetting("google_analytics","")}build(){let t=document.createElement("div");t.appendChild(this.input());let e=document.createElement("a");return e.href="https://community.buttonizer.pro/knowledgebase/17",e.target="_blank",e.className="info-link text-big",e.innerHTML='<i class="fas fa-info"></i> '+window.Buttonizer.translate("settings_window.google_analytics.info"),e.style.marginTop="40px",e.style.textAlign="center",t.appendChild(e),t}input(){let t=document.createElement("input");t.value=this.currentSelected,t.className="window-select",t.placeholder="UA-XXXXXX-Y",t.addEventListener("change",()=>{window.Buttonizer.saveSettings({google_analytics:t.value},!1)});let e=document.createElement("div");e.innerHTML=window.Buttonizer.translate("settings_window.google_analytics.input_info");let i=new r;return i.addColumnHTML("<h2>Google Analytics</h2>"),i.addColumn(t,"","375"),i.newRow(),i.addColumnText(""),i.addColumn(e),i.build()}}class Oe{constructor(){}build(){let t=document.createElement("div"),e=document.createElement("div");return e.className="settings-window-information",e.innerHTML="<p>"+window.Buttonizer.translate("settings_window.reset.info")+"</p>",t.appendChild(e),t.appendChild(this.whatWillHappen()),t.appendChild(this.why()),t.appendChild(this.myLicense()),t.appendChild(this.andThen()),t.appendChild(this.ready()),t}whatWillHappen(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML=window.Buttonizer.translate("settings_window.reset.what_will_happen.title"),e.style.marginBottom="20px",t.appendChild(e);let i=document.createElement("div");return i.className="settings-window-information",i.innerHTML="<p>"+window.Buttonizer.translate("settings_window.reset.what_will_happen.info")+"</p>",t.appendChild(i),t}why(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML=window.Buttonizer.translate("settings_window.reset.why.title"),e.style.marginBottom="20px",t.appendChild(e);let i=document.createElement("div");return i.className="settings-window-information",i.innerHTML="<p>"+window.Buttonizer.translate("settings_window.reset.why.info")+"</p>",t.appendChild(i),t}myLicense(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML=window.Buttonizer.translate("settings_window.reset.license.title"),e.style.marginBottom="20px",t.appendChild(e);let i=document.createElement("div");return i.className="settings-window-information",i.innerHTML=`\n<p>${window.Buttonizer.translate("settings_window.reset.license.info")}</p>\n<p>\n<ul>\n <li>${window.Buttonizer.translate("settings_window.reset.license.list.buttons")}</li>\n <li>${window.Buttonizer.translate("settings_window.reset.license.list.groups")}</li>\n <li>${window.Buttonizer.translate("settings_window.reset.license.list.time_schedules")}</li>\n <li>${window.Buttonizer.translate("settings_window.reset.license.list.page_rules")}</li>\n <li>${window.Buttonizer.translate("settings_window.reset.license.list.settings")}</li>\n <li>${window.Buttonizer.translate("settings_window.reset.license.list.published")}</li>\n</ul>\n</p>\n`,t.appendChild(i),t}andThen(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML=window.Buttonizer.translate("settings_window.reset.default_settings.title"),e.style.marginBottom="20px",t.appendChild(e);let i=document.createElement("div");return i.className="settings-window-information",i.innerHTML="<p>"+window.Buttonizer.translate("settings_window.reset.default_settings.info")+"</p>",t.appendChild(i),t}ready(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML=window.Buttonizer.translate("settings_window.reset.ready.title"),e.style.marginBottom="20px",t.appendChild(e);let i=document.createElement("div");i.className="settings-window-information",i.innerHTML="<p>"+window.Buttonizer.translate("settings_window.reset.ready.info")+"</p>",t.appendChild(i);let n=document.createElement("a");return n.className="button button-red button-centered-reset",n.innerHTML='<i class="fas fa-sync"></i> '+window.Buttonizer.translate("settings_window.reset.ready.button"),n.href="javascript:void(0)",n.addEventListener("click",()=>this.countdown()),t.appendChild(n),t}countdown(){window.Buttonizer.loader.show(window.Buttonizer.translate("loading.initializing")),setTimeout(()=>{window.Buttonizer.loader.show(window.Buttonizer.translate("loading.resetting")),this.reset()},1500)}reset(){jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&request=SaveData&save=reset-buttonizer",dataType:"json",method:"post",data:{security:buttonizer_admin.security},success:t=>{"success"===t.status?(window.Buttonizer.loader.show(window.Buttonizer.translate("loading.finishing")),setTimeout(()=>{document.location.reload()},500)):(window.Buttonizer.loader.hide(),window.Buttonizer.savingError(t.message))},error:(t,e,i)=>{window.Buttonizer.loader.hide(),window.Buttonizer.savingError(e)}})}error(){}}class Te{constructor(){}build(){let t=document.createElement("div"),e=document.createElement("div");return e.className="settings-window-information",e.innerHTML="<p>We have fixed the migration issues in the last couple updates. \n If you lost buttons when updating to version 2.0,\n you can try migrating your old buttons again!</p>",t.appendChild(e),t.appendChild(this.whatWillHappen()),t.appendChild(this.why()),t.appendChild(this.caution()),t.appendChild(this.ready()),t}whatWillHappen(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML="What happens when I click the red button below?",e.style.marginBottom="20px",t.appendChild(e);let i=document.createElement("div");return i.className="settings-window-information",i.innerHTML="<p>Buttonizer made a backup of your buttons from version 1.5.x in your database. \n When you click on the button below, it will convert that backup into buttons suitable for version 2.0.\n It will not remove the backup so that you can still revert back to version 1.5.7 if you want!</p>",t.appendChild(i),t}why(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML="Why would I do that?",e.style.marginBottom="20px",t.appendChild(e);let i=document.createElement("div");return i.className="settings-window-information",i.innerHTML="<p>During the first update to version 2.0, a couple of users lost their settings or buttons!\n Since then we've fixed all the reported migration issues.\n <b>This is a chance for those who lost their buttons to try and see if they can migrate their old buttons again.</b></p>",t.appendChild(i),t}caution(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML="Extra! Extra!",e.style.marginBottom="20px",t.appendChild(e);let i=document.createElement("div");return i.className="settings-window-information",i.innerHTML="\n <p>A little warning! \n This will remove your current Buttonizer version 2.0 buttons/settings. \n <b>It will not make a backup!</b></p>",t.appendChild(i),t}andThen(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML="Okay, sounds good. What then?",e.style.marginBottom="20px",t.appendChild(e);let i=document.createElement("div");return i.className="settings-window-information",i.innerHTML="<p>Buttonizer will go back to the default settings and will behave like a fresh installation. That's all.</p>",t.appendChild(i),t}ready(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML="Okay, I'm ready!",e.style.marginBottom="20px",t.appendChild(e);let i=document.createElement("div");i.className="settings-window-information",i.innerHTML="<p>Press the red button below to re-migrate old data. There will be no more warnings.</p>",t.appendChild(i);let n=document.createElement("a");return n.className="button button-red button-centered-reset",n.innerHTML='<i class="fas fa-sync"></i> Re-migrate old data!',n.href="javascript:void(0)",n.addEventListener("click",()=>this.countdown()),t.appendChild(n),t}countdown(){window.Buttonizer.loader.show("Initializing..."),setTimeout(()=>{window.Buttonizer.loader.show("Running migration..."),this.remigrate()},1500)}remigrate(){jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&request=SaveData&save=remigrate-buttonizer",dataType:"json",method:"post",data:{security:buttonizer_admin.security},success:t=>{"success"===t.status?(window.Buttonizer.loader.show("Finishing..."),setTimeout(()=>{document.location.reload()},500)):(window.Buttonizer.loader.hide(),window.Buttonizer.savingError(t.message))},error:(t,e,i)=>{window.Buttonizer.loader.hide(),window.Buttonizer.savingError(e)}})}error(){}}class Ne{build(){let t=document.createElement("div");return t.appendChild(this.showWPAdminTopBarButton()),t.appendChild(this.showTooltips()),t.appendChild(this.allowRequestsFromSubdomains()),t}showWPAdminTopBarButton(){let t=new Bt({state:window.Buttonizer.getSetting("admin_top_bar_show_button","true")});t.onToggle(t=>{window.Buttonizer.saveSettings({admin_top_bar_show_button:t},!1)});let e=new r;return e.addColumnHTML("<h2>"+window.Buttonizer.translate("settings_window.other_settings.admin_button.title")+"</h2>"),e.addColumn(t.build(),"","370"),e.newRow(),e.addColumnText(""),e.addColumnText(window.Buttonizer.translate("settings_window.other_settings.admin_button.info")),e.build()}showTooltips(){let t=new Bt({state:window.Buttonizer.getSetting("show_tooltips")});t.onToggle(t=>{window.Buttonizer.saveSettings({show_tooltips:t},!1)});let e=new r;return e.addColumnHTML("<h2>"+window.Buttonizer.translate("settings_window.other_settings.tooltips.title")+"</h2>"),e.addColumn(t.build(),"","370"),e.newRow(),e.addColumnText(""),e.addColumnText(window.Buttonizer.translate("settings_window.other_settings.tooltips.info")),e.build()}allowRequestsFromSubdomains(){let t=new Bt({state:window.Buttonizer.getSetting("allow_subdomains","false")});t.onToggle(t=>{window.Buttonizer.saveSettings({allow_subdomains:t},!1)});let e=new r;return e.addColumnHTML("<h2>"+window.Buttonizer.translate("settings_window.other_settings.subdomain.title")+"</h2>"),e.addColumn(t.build(),"","370"),e.newRow(),e.addColumnText(""),e.addColumnText(window.Buttonizer.translate("settings_window.other_settings.subdomain.info")),e.build()}}var Ae=class extends d{constructor(){super({},window.Buttonizer.translate("settings_window.title"))}render(){this.fontAwesome(),this.analytics(),this.mainSettings(),this.reset()}fontAwesome(){super.addItem(window.Buttonizer.translate("settings_window.icon_library.title"),(new Se).build())}analytics(){super.addItem("Google Analytics",(new Le).build())}mainSettings(){super.addItem(window.Buttonizer.translate("settings_window.other_settings.title"),(new Ne).build())}remigrate(){super.addItem("Re-migrate",(new Te).build())}reset(){super.addItem(window.Buttonizer.translate("settings_window.reset.title"),(new Oe).build())}},Ie=class{constructor(){this.element=null,this.itemList=null,this.searchList=null,this.searchInput=null,this.fontAwesomeStylesheet=null,this.iframeContent=null,this.mayClose(),this.build(),this.iconListener=new class{constructor(){this.icons=[],this.callback=(()=>{}),this.searchResultCache=[],this.loadIcons()}onReady(t){this.callback=t}getIcons(){return this.icons}search(t){if(void 0!==this.searchResultCache[t])return this.searchResultCache[t];let e=[];for(let i=0;i<this.icons.length;i++){let n=this.icons[i];(n.searchTerms.indexOf(t)>=0||n.name.indexOf(t)>=0)&&e.push(n)}return this.searchResultCache[t]=e,e}loadIcons(){this.searchResultCache=[],this.icons=[];let t=window.Buttonizer.settings.icon_library,e=window.Buttonizer.settings.icon_library_version;jQuery.ajax({url:buttonizer_admin.assets+"/icon_definitions/"+t+"."+e+".json?buttonizer-icon-cache="+window.Buttonizer.version,dataType:"json",method:"get",success:i=>{this.icons=i,console.log("Finished loading icon library '"+t+"' version "+e),this.callback()},error:()=>{console.error("Could not load icon library '"+t+"' version "+e)}})}},this.iconLibrary=new Se,this.currentInput=null,this.currentInputJ=null,this.searchTimeout=setTimeout(()=>{},1),setInterval(()=>this.stayOnPlace(),100),this.firstBuild=!0,this.opened=!1}build(){let t=document.createElement("div");t.className="buttonizer-icon-selector";let e=document.createElement("div");e.className="icon-selector-searchbar";let i=document.createElement("input");i.className="icon-selector-searchbar",i.placeholder=window.Buttonizer.translate("utils.search_icons"),i.addEventListener("keyup",()=>{clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.search(i.value)},200)}),this.searchInput=i,e.appendChild(this.searchInput),t.appendChild(e);let n=document.createElement("iframe");n.height="350px",n.width="100%",n.src="about:blank",n.frameborder=0,n.addEventListener("load",()=>{n.contentDocument.querySelector("head").appendChild(window.Buttonizer.iconLibraryStylesheet);let t=document.createElement("style");t.innerText='\nbody, html {\n background-color: #f5f5f5;\n margin: 0;\n padding: 0;\n font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;\n font-size: 14px;\n}\n\n.icon-selector-list {\n border-top: 1px solid #e7e7e7;\n overflow: auto;\n text-align: center;\n}\n\n.icon-selector-list a {\n background-color: #f5f5f5;\n color: #464646;\n font-size: 19px;\n width: 16%;\n height: 50px;\n line-height: 50px;\n text-decoration: none;\n display: inline-block;\n text-align: center;\n outline: none;\n}\n\n.icon-selector-list a:hover {\n background-color: #e7e7e7;\n}\n\n.icon-selector-list a:focus {\n box-shadow: none !important;\n}\n\n.fa, .fal, .far, .fas, .fab {\n line-height: 50px !important;\n}',n.contentDocument.querySelector("head").appendChild(t),this.itemList=document.createElement("div"),this.itemList.className="icon-selector-list",n.contentDocument.body.appendChild(this.itemList),this.searchList=document.createElement("div"),this.searchList.className="icon-selector-list search-list",this.searchList.style.display="none",n.contentDocument.body.appendChild(this.searchList)}),this.iframeContent=n,t.appendChild(this.iframeContent),this.element=t,document.body.appendChild(this.element)}search(t){if(""===t)return this.searchList.style.display="none",this.itemList.style.display="block",void(this.iframeContent.height="350px");this.searchList.style.display="block",this.itemList.style.display="none";let e=this.iconListener.search(t);e.length>0?(this.searchList.innerHTML="",this.showIcons(this.searchList,e),jQuery(this.searchList).height()>350?this.iframeContent.height="350px":this.iframeContent.height=jQuery(this.searchList).height()+5+"px"):(this.iframeContent.height="50px",this.searchList.innerHTML=`<p>${window.Buttonizer.translate("utils.search_not_found")} <b>${t}</b></p>`)}rebuild(){this.itemList.innerHTML="",this.searchList.innerHTML="",this.showIcons(this.itemList,this.iconListener.getIcons())}showIcons(t,e){for(let i=0;i<e.length;i++){let n=e[i];for(let e=0;e<n.icons.length;e++){let i=document.createElement("a");i.innerHTML=`<i class="${n.icons[e].icon}"></i>`,i.href="javascript:void(0)",i.title=n.name+" ("+n.icons[e].type+")",i.addEventListener("click",()=>{if(null!==this.currentInput){if(this.currentInput.value=n.icons[e].icon,"createEvent"in document){let t=document.createEvent("HTMLEvents");t.initEvent("change",!1,!0),this.currentInput.dispatchEvent(t)}else this.currentInput.fireEvent("onchange");this.close()}}),t.appendChild(i)}}}open(t){this.currentInput=t,this.currentInputJ=jQuery(this.currentInput),this.searchInput.value="",this.searchList.style.display="none",this.itemList.style.display="block",this.element.style.display="block",setTimeout(()=>{this.searchInput.focus(),this.opened=!0,this.stayOnPlace(),setTimeout(()=>{this.element.className="buttonizer-icon-selector selector-animated",this.firstBuild&&(this.firstBuild=!1,this.rebuild())},250)},50)}mayClose(){document.querySelector("body").addEventListener("click",t=>{this.opened&&"icon-selector-searchbar"!==t.target.className&&(this.element.style.display="none",this.element.className="buttonizer-icon-selector",this.opened=!1)})}close(){this.element.style.display="none",this.opened=!1}stayOnPlace(){if(this.opened){let t=this.currentInputJ.offset().top+this.currentInputJ.height()+10+"px";t!==this.element.style.top&&(this.element.style.top=t,this.element.style.left=this.currentInputJ.offset().left+"px")}}},Me=(i(7),i(0));const qe=i(12);class He{constructor(){this.tour=null,this.amount=window.Buttonizer.buttonGroups[0].groupObject.querySelectorAll(".group-button").length,this.single="",this.setupStep5=!1,this.setupStep6=!1,this.setupStep7=!1,this.setupStep10=!1,this.setupStep11=!1,this.setup2Step4=!1,this.setup2Step6=!1,this.setup2Step7=!1,this.setup2Step12=!1}build(){let t=this.intro();t.onchange(e=>this.conditions(t._currentStep,e,1)),t.start(),t.onbeforeexit(()=>this.onExit(t._currentStep,1)),t.onexit(()=>{this.tour=null,this.amount=window.Buttonizer.buttonGroups[0].groupObject.querySelectorAll(".group-button").length,this.setupStep5=!1,this.setupStep6=!1,this.setupStep7=!1,this.setupStep10=!1,this.setupStep11=!1,this.setup2Step4=!1,this.setup2Step6=!1,this.setup2Step7=!1,this.setup2Step12=!1,20===t._currentStep&&window.Buttonizer.bar.groupHolder.querySelector(".create-new-button").click()})}getAmount(){return this.amount=window.Buttonizer.buttonGroups[0].groupObject.querySelectorAll(".group-button").length,this.amount}conditions(t,e,i){if(this.amount=window.Buttonizer.buttonGroups[0].groupObject.querySelectorAll(".group-button").length,1===i)if(0===t)window.Buttonizer.bar.settingContainer.classList.contains("hidden")||window.Buttonizer.bar.settingContainer.querySelector(".back-button").click();else if(4===t){if(!this.setupStep5){this.setupStep5=!0,document.querySelector(".options-button").addEventListener("click",()=>{null!==this.tour&&this.tour.goToStep(6)})}"backward"===this.tour._direction&&(document.querySelector(".options-window").hasAttribute("hidden")||document.querySelector(".options-window").setAttribute("hidden",""))}else if(5===t)document.querySelector(".options-window").hasAttribute("hidden")&&document.querySelector(".options-window").removeAttribute("hidden"),"backward"===this.tour._direction&&document.querySelector(".options-window").classList.remove("disabled");else if(6===t){document.querySelector(".options-window").hasAttribute("hidden")&&document.querySelector(".options-window").removeAttribute("hidden"),document.querySelector(".options-window").setAttribute("style","z-index:9999999 !important"),document.querySelector(".options-window").classList+=" disabled";let t=window.Buttonizer.topBar.optionsWindow.querySelector(".single-button");t.style.pointerEvents="all",t.style.cursor="pointer",this.setupStep7||(this.setupStep7=!0,t.addEventListener("click",()=>{null!==this.tour&&this.tour.nextStep()})),"backward"===this.tour._direction&&(window.Buttonizer.settingsWindow.title.parentElement.parentElement.style.display="none")}else if(7===t)document.querySelector(".options-window").removeAttribute("style","z-index:9999999 !important"),document.querySelector(".options-window").classList.remove("disabled"),window.Buttonizer.settingsWindow.title.parentElement.parentElement.style.display="block",window.Buttonizer.settingsWindow.title.parentElement.parentElement.setAttribute("style","z-index:9999999 !important;pointer-events: none;"),document.querySelector(".options-window").hasAttribute("hidden")||document.querySelector(".options-window").setAttribute("hidden","");else if(8===t)window.Buttonizer.settingsWindow.title.parentElement.parentElement.removeAttribute("style","z-index:9999999 !important"),window.Buttonizer.settingsWindow.title.parentElement.parentElement.style.display="none";else if(9===t){if(!this.setupStep10){this.setupStep10=!0,window.Buttonizer.bar.groupHolder.querySelector(".button-group-holder").querySelector(".group-style").addEventListener("click",()=>{null!==this.tour&&!1===this.setupStep11&&this.tour.nextStep()})}"backward"===this.tour._direction&&(this.setupStep11=!1,Object(Me.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style","width: 50px; height: 60px; top: 67px; left: 276px;"),document.querySelector(".introjs-helperLayer").setAttribute("style","width: 50px; height: 60px; top: 67px; left: 276px;")},100),window.Buttonizer.bar.settingContainer.querySelector(".back-button").click())}else if(10===t)"forward"===this.tour._direction&&(0==this.setupStep11&&(this.setupStep11=!0,window.Buttonizer.buttonGroups[0].groupHolder.toggleStyling()),this.tour._introItems[11].element=jQuery(".button-group-styling:visible")[0].querySelector(".style-top"),this.tour._introItems[13].element=jQuery(".button-group-styling:visible")[0].querySelector(".style-button"),this.tour._introItems[14].element=jQuery(".button-group-styling:visible")[0].querySelector(".style-icon"),this.tour._introItems[15].element=jQuery(".button-group-styling:visible")[0].querySelector(".style-label"),Object(Me.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style","width: 385px; height: 966px; top: 46px; left: -5px;")},100),window.Buttonizer.bar.settingContainer.querySelector(".back-button").style.pointerEvents="none");else if(12===t)1===this.amount&&("forward"===this.tour._direction?Object(Me.setTimeout)(()=>{this.tour.nextStep()},100):"backward"===this.tour._direction&&Object(Me.setTimeout)(()=>{this.tour.previousStep()},100));else if(15===t)"backward"===this.tour._direction&&(window.Buttonizer.buttonGroups[0].groupHolder.toggleStyling(),Object(Me.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style","width: 371px; height: 263px; top: 688px; left: 2px;")},100));else if(16===t||17===t||18===t||19===t){window.Buttonizer.bar.settingContainer.querySelector(".back-button").click(),window.Buttonizer.bar.groupHolder.querySelector(".create-new-button").addEventListener("click",()=>{null!==this.tour&&this.tour.goToStep(21)}),16===t&&(this.tour._direction="forward")&&(1===this.getAmount()&&window.Buttonizer.buttonGroups[0].groupHolder.quickMenu.querySelector(".convert-button").click(),window.Buttonizer.buttonGroups[0].groupObject.classList.contains("opened")||window.Buttonizer.buttonGroups[0].groupHolder.revealButtons(),Object(Me.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style")+"width: 333px !important; height: 48px !important; left: 36px !important;"),document.querySelector(".introjs-helperLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style")+"width: 333px !important; height: 48px !important; left: 36px !important;")},100))}else 20===t&&Object(Me.setTimeout)(()=>{this.tour.exit()},100);else if(2===i){let e=window.Buttonizer.buttonGroups[0].groupBody.querySelectorAll(".buttonizer-button-group")[window.Buttonizer.buttonGroups[0].groupBody.querySelectorAll(".buttonizer-button-group").length-1];if(0===t);else if(2===t)Object(Me.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style")+"left: 276px !important;")},100);else if(2===t)"backward"===this.tour._direction&&(e.querySelector(".group-title").style.pointerEvents="all",e.querySelector(".mobile-desktop").style.pointerEvents="all");else if(3===t)(e.querySelector(".group-holder-quick-menu").style.visibility="visible")&&(e.querySelector(".group-holder-quick-menu").style.visibility="hidden",e.querySelector(".group-holder-quick-menu").style.top="45px",e.querySelector(".group-holder-quick-menu").style.opacity="0"),Object(Me.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style"))},100),e.querySelector(".group-title").style.pointerEvents="none",e.querySelector(".mobile-desktop").style.pointerEvents="none",this.setup2Step4||(this.setup2Step4=!0,e.querySelector(".holder-button").addEventListener("click",()=>{null!==this.tour&&this.tour.nextStep()})),e.querySelector(".holder-button").style.backgroundColor="rgb(255, 255, 255)";else if(4===t){if((e.querySelector(".group-holder-quick-menu").style.visibility="hidden")&&(e.querySelector(".group-holder-quick-menu").style.visibility="visible",e.querySelector(".group-holder-quick-menu").style.top="50px",e.querySelector(".group-holder-quick-menu").style.opacity="1"),"backward"===this.tour._direction){e.querySelector(".fa-wrench").parentElement.style.pointerEvents="none",e.querySelector(".group-holder-quick-menu").style.pointerEvents="none"}else"forward"===this.tour._direction&&(e.querySelector(".group-holder-quick-menu").style.pointerEvents="none");this.amount>=8&&Object(Me.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style")+"top: 684px !important;")},100)}else if(5===t){"backward"===this.tour._direction&&(this.setup2Step7=!1,e.querySelector(".group-holder-quick-menu").style.visibility="visible",e.querySelector(".group-holder-quick-menu").style.top="50px",e.querySelector(".group-holder-quick-menu").style.opacity="1",window.Buttonizer.bar.settingContainer.querySelector(".back-button").click(),Object(Me.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style")+"left: 36px !important;")},100)),this.amount>=8&&Object(Me.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style")+"top: 692px !important;")},100),e.querySelector(".group-holder-quick-menu").setAttribute("style",e.querySelector(".group-holder-quick-menu").getAttribute("style")+"z-index: 99999999 !important;");let t=e.querySelector(".fa-wrench").parentElement;t.style.pointerEvents="all",t.style.cursor="pointer",this.setup2Step6||(this.setup2Step6=!0,e.querySelector(".fa-wrench").parentElement.addEventListener("click",()=>{null!==this.tour&&!1===this.setup2Step7&&this.tour.nextStep()}))}else 6===t?("forward"===this.tour._direction&&(0==this.setup2Step7&&(this.setup2Step7=!0,e.querySelector(".settings").click()),Object(Me.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style","width: 385px; height: 966px; top: 46px; left: -5px;")},100)),e.querySelector(".group-holder-quick-menu").style.visibility="hidden",e.querySelector(".group-holder-quick-menu").style.top="45px",e.querySelector(".group-holder-quick-menu").style.opacity="0"):10===t?(e.querySelector(".settings").click(),"backward"===this.tour._direction&&Object(Me.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style","width: 371px; height: 224px; top: 630px; left: 2px;")},100)):11===t&&(window.Buttonizer.bar.settingContainer.querySelector(".back-button").click(),this.setup2Step12||(this.setup2Step12=!0,window.Buttonizer.topBar.topBarElement.querySelector(".revert-save").addEventListener("click",()=>{null!==this.tour&&this.tour.nextStep()})))}}onExit(t,e){if(this.tour=null,this.amount=window.Buttonizer.buttonGroups[0].groupObject.querySelectorAll(".group-button").length,this.setupStep5=!1,this.setupStep6=!1,this.setupStep7=!1,this.setupStep10=!1,this.setupStep11=!1,this.setup2Step4=!1,this.setup2Step6=!1,this.setup2Step7=!1,this.setup2Step12=!1,1===e)(window.Buttonizer.bar.settingContainer.querySelector(".back-button").style.pointerEvents="none")&&(window.Buttonizer.bar.settingContainer.querySelector(".back-button").style.pointerEvents="all"),5===t?document.querySelector(".options-window").setAttribute("hidden",""):6===t?document.querySelector(".options-window").classList.remove("disabled"):7===t?window.Buttonizer.settingsWindow.title.parentElement.parentElement.removeAttribute("style","z-index:9999999 !important;pointer-events: none;"):20===t&&Object(Me.setTimeout)(()=>{let t=this.intro2();t.onchange(e=>this.conditions(t._currentStep,e,2)),t.start(),t.onbeforeexit(()=>this.onExit(t._currentStep,2)),t.onexit(()=>{this.tour=null,this.amount=window.Buttonizer.buttonGroups[0].groupObject.querySelectorAll(".group-button").length,this.setupStep5=!1,this.setupStep6=!1,this.setupStep7=!1,this.setupStep10=!1,this.setupStep11=!1,this.setup2Step4=!1,this.setup2Step6=!1,this.setup2Step7=!1,this.setup2Step12=!1,20===t._currentStep&&window.Buttonizer.bar.groupHolder.querySelector(".create-new-button").click()})},300);else if(2===e){let e=window.Buttonizer.buttonGroups[0].groupBody.querySelectorAll(".buttonizer-button-group")[window.Buttonizer.buttonGroups[0].groupBody.querySelectorAll(".buttonizer-button-group").length-1];3===t&&(e.querySelector(".group-title").style.pointerEvents="all",e.querySelector(".mobile-desktop").style.pointerEvents="all"),e.querySelector(".group-holder-quick-menu").hasAttribute("style")&&e.querySelector(".group-holder-quick-menu").setAttribute("style",""),e.querySelector(".group-holder-quick-menu").classList.contains("disabled")&&e.querySelector(".group-holder-quick-menu").classList.remove("disabled"),(e.querySelector(".group-holder-quick-menu").style.pointerEvents="none")&&(e.querySelector(".group-holder-quick-menu").style.pointerEvents="all"),(e.querySelector(".group-title").style.pointerEvents="none")&&(e.querySelector(".group-title").style.pointerEvents="all"),(e.querySelector(".mobile-desktop").style.pointerEvents="none")&&(e.querySelector(".mobile-desktop").style.pointerEvents="all"),(e.querySelector(".fa-wrench").parentElement.style.pointerEvents="none")&&(e.querySelector(".fa-wrench").parentElement.style.pointerEvents="all")}}intro(){return this.tour=qe(),this.tour.setOptions({showBullets:!1,exitOnOverlayClick:!1,skipLabel:window.Buttonizer.translate("welcome.exit_tour"),doneLabel:window.Buttonizer.translate("welcome.exit_tour"),nextLabel:window.Buttonizer.translate("common.next")+" →",prevLabel:"← "+window.Buttonizer.translate("common.previous"),scrollToElement:!0,showStepNumbers:!1,disableInteraction:!0}),this.tour.setOptions({steps:[{intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-0.title")+"</b></h2> "+window.Buttonizer.translate("welcome.tour-steps.step-0.description")+"<br /><br />"+window.Buttonizer.translate("welcome.tour-steps.step-0.keyboard"),position:"left",tooltipClass:"max-width"},{element:document.querySelector(".buttonizer-bar"),intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-1.title")+"</b></h2> "+window.Buttonizer.translate("welcome.tour-steps.step-1.description"),position:"left"},{element:document.querySelector(".buttonizer-frame"),intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-2.title")+"</b></h2> "+window.Buttonizer.translate("welcome.tour-steps.step-2.description"),position:"left"},{element:document.querySelector(".buttonizer-topbar"),intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-3.title")+"</b></h2> "+window.Buttonizer.translate("welcome.tour-steps.step-3.description")+`\n\n <h4 style="font-weight:400;text-align:left;padding:0 15px">\n 1. ${window.Buttonizer.translate("welcome.tour-steps.step-3.list.close")}<br>\n 2. ${window.Buttonizer.translate("welcome.tour-steps.step-3.list.revert")}<br>\n 3. ${window.Buttonizer.translate("welcome.tour-steps.step-3.list.publish")}<br>\n 4. ${window.Buttonizer.translate("welcome.tour-steps.step-3.list.general-settings")}\n </h4>`,position:"left",tooltipClass:"middle"},{element:document.querySelector(".buttonizer-topbar .options-button"),intro:window.Buttonizer.translate("welcome.tour-steps.step-4.description"),position:"left",disableInteraction:!1},{element:document.querySelector(".options-window"),intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-5.title")+"</b></h2><b>"+window.Buttonizer.translate("bar.menu.knowledgebase.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-5.list.knowledgebase")+"<br><b>"+window.Buttonizer.translate("bar.menu.support.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-5.list.support")+"<br><b>"+window.Buttonizer.translate("bar.menu.community.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-5.list.community")+"<br><b>"+window.Buttonizer.translate("bar.menu.account.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-5.list.account")+"<br><b>"+window.Buttonizer.translate("bar.menu.upgrade.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-5.list.upgrade")+"<br><b>"+window.Buttonizer.translate("bar.menu.affiliation.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-5.list.affiliation")+"<br><b>"+window.Buttonizer.translate("bar.menu.options.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-5.list.options"),position:"left",tooltipClass:"wider"},{element:window.Buttonizer.topBar.optionsWindow.querySelector(".single-button"),intro:window.Buttonizer.translate("welcome.tour-steps.step-6.description")+" &rarr;",position:"left",disableInteraction:!1,highlightClass:"introjs-custom-hidden"},{element:window.Buttonizer.settingsWindow.title.parentElement.parentElement.querySelector(".window-menu"),intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-7.title")+"</b></h2><b>"+window.Buttonizer.translate("settings_window.icon_library.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-7.list.icon-library")+"<br><b>Google Analytics:</b> "+window.Buttonizer.translate("welcome.tour-steps.step-7.list.google-analytics")+"<br><b>"+window.Buttonizer.translate("settings_window.reset.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-7.list.reset")+"<br>",position:"left",highlightClass:"introjs-custom-hidden",tooltipClass:"wider"},{element:window.Buttonizer.bar.groupHolder.querySelector(".button-group-holder"),intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-8.title")+"</b></h2>"+window.Buttonizer.translate("welcome.tour-steps.step-8.multiple_buttons")+"<br><br>"+window.Buttonizer.translate("welcome.tour-steps.step-8.visible")+"<br><br>"+window.Buttonizer.translate("welcome.tour-steps.step-8.position")+"<br>",position:"right",tooltipClass:"max-width"},{element:window.Buttonizer.bar.groupHolder.querySelector(".button-group-holder").querySelector(".group-style"),intro:"<b>&larr;</b> "+window.Buttonizer.translate("welcome.tour-steps.step-9.description"),position:"right",disableInteraction:!1},{element:window.Buttonizer.bar.settingContainer,intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-10.title")+"</b></h2>"+window.Buttonizer.translate("welcome.tour-steps.step-10.description")+"<br><br>"+window.Buttonizer.translate("welcome.tour-steps.step-10.action"),position:"right",disableInteraction:!1,highlightClass:"introjs-custom-gone",scrollTo:!1,tooltipClass:"intojs-foff-height"},{element:1===this.getAmount()?jQuery(".button-group-styling")[1].querySelector(".style-top"):window.Buttonizer.buttonGroups[0].stylingObject.querySelector(".style-top"),intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-11.title")+"</b></h2><b>"+window.Buttonizer.translate("settings.menu_position.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-11.position")+"<br><b>"+window.Buttonizer.translate("settings.show_mobile_desktop.title")+"</b> "+window.Buttonizer.translate("welcome.tour-steps.step-11.visibility")+"<br>",position:"right",disableInteraction:!1,scrollTo:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:1===this.getAmount()?jQuery(".button-group-styling")[1].querySelector(".style-menu"):window.Buttonizer.buttonGroups[0].stylingObject.querySelector(".style-menu"),intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-12.title")+"</b></h2><b>"+window.Buttonizer.translate("settings.start_opened.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-12.start_opened")+"<br><b>"+window.Buttonizer.translate("settings.menu_style.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-12.menu_style")+"<br><b>"+window.Buttonizer.translate("settings.menu_animation.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-12.animation")+"<br>",position:"right",disableInteraction:!1,scrollTo:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:1===this.getAmount()?jQuery(".button-group-styling")[1].querySelector(".style-button"):window.Buttonizer.buttonGroups[0].stylingObject.querySelector(".style-button"),intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-13.title")+"</b></h2><b>"+window.Buttonizer.translate("settings.background_color.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-13.background_color")+"<br><b>"+window.Buttonizer.translate("settings.border_radius.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-13.border_radius")+"<br><b>"+window.Buttonizer.translate("settings.background_image.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-13.background_image")+"<br>",position:"right",disableInteraction:!1,scrollTo:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:1===this.getAmount()?jQuery(".button-group-styling")[1].querySelector(".style-icon"):window.Buttonizer.buttonGroups[0].stylingObject.querySelector(".style-icon"),intro:"<h2><b>"+window.Buttonizer.translate("settings.setting_categories.group_icon")+"</b></h2><b>"+window.Buttonizer.translate("settings.icon_or_image.title")+":</b> "+window.Buttonizer.translate("settings.icon_or_image.description")+'<br><h2 style="margin: 1em 0 0 0;"><b>'+window.Buttonizer.translate("settings.icon.title")+"</b></h2><b>"+window.Buttonizer.translate("settings.icon.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-14.icon")+"<br><b>"+window.Buttonizer.translate("settings.icon_color.title")+":</b> "+window.Buttonizer.translate("settings.icon_color.description")+"<br><b>"+window.Buttonizer.translate("settings.icon_size.title")+":</b> "+window.Buttonizer.translate("settings.icon_size.description")+'<br><h2 style="margin: 1em 0 0 0;"><b>'+window.Buttonizer.translate("utils.image")+"</b></h2><b>"+window.Buttonizer.translate("settings.icon_image_select.title")+":</b> "+window.Buttonizer.translate("settings.icon_image_select.description")+"<br><b>"+window.Buttonizer.translate("settings.icon_image_border_radius.title")+":</b> "+window.Buttonizer.translate("settings.icon_image_border_radius.description")+"<br><b>"+window.Buttonizer.translate("settings.icon_image_size.title")+":</b> "+window.Buttonizer.translate("settings.icon_image_size.description")+"<br>",position:"right",disableInteraction:!1,scrollTo:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:1===this.getAmount()?jQuery(".button-group-styling")[1].querySelector(".style-label"):window.Buttonizer.buttonGroups[0].stylingObject.querySelector(".style-label"),intro:"<h2><b>"+window.Buttonizer.translate("settings.setting_categories.label")+"</b></h2><b>"+window.Buttonizer.translate("settings.label.title")+":</b> "+window.Buttonizer.translate("settings.label.description")+"<br><b>"+window.Buttonizer.translate("settings.label_desktop.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-15.label_visibility")+"<br><b>"+window.Buttonizer.translate("settings.label_color.title")+":</b> "+window.Buttonizer.translate("settings.label_color.description")+"<br><b>"+window.Buttonizer.translate("settings.font_size_border_radius.title")+":</b> "+window.Buttonizer.translate("settings.font_size_border_radius.description")+"<br>",position:"right",disableInteraction:!1,scrollTo:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:window.Buttonizer.buttonGroups[0].groupObject.querySelector(".create-new-button"),intro:"<h2><b>"+window.Buttonizer.translate("utils.new_button")+"</b></h2>&larr; "+window.Buttonizer.translate("welcome.tour-steps.step-before-button.action"),position:"right",disableInteraction:!1},{element:window.Buttonizer.buttonGroups[0].groupObject.querySelector(".create-new-button"),intro:window.Buttonizer.translate("welcome.tour-steps.step-before-button.msg1"),position:"right",disableInteraction:!1},{element:window.Buttonizer.buttonGroups[0].groupObject.querySelector(".create-new-button"),intro:window.Buttonizer.translate("welcome.tour-steps.step-before-button.msg2"),position:"right",disableInteraction:!1},{element:window.Buttonizer.buttonGroups[0].groupObject.querySelector(".create-new-button"),intro:window.Buttonizer.translate("welcome.tour-steps.step-before-button.msg3"),position:"right",disableInteraction:!1},{position:"bottom",disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"introjs-custom-gone"},{position:"bottom",intro:window.Buttonizer.translate("welcome.tour-steps.step-before-button.msg4"),disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"introjs-custom-gone"},{position:"bottom",disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"introjs-custom-gone"}]}),this.tour}intro2(){this.tour=qe(),this.tour.setOptions({showBullets:!1,exitOnOverlayClick:!1,skipLabel:window.Buttonizer.translate("welcome.exit_tour"),doneLabel:window.Buttonizer.translate("welcome.exit_tour"),nextLabel:window.Buttonizer.translate("common.next")+" →",prevLabel:"← "+window.Buttonizer.translate("common.previous"),scrollToElement:!0,showStepNumbers:!1,disableInteraction:!0});let t=window.Buttonizer.buttonGroups[0].groupBody.querySelectorAll(".buttonizer-button-group")[window.Buttonizer.buttonGroups[0].groupBody.querySelectorAll(".buttonizer-button-group").length-1],e=window.Buttonizer.bar.settingContainer;return this.tour.setOptions({steps:[{element:t,intro:"<h2><b>"+window.Buttonizer.translate("common.button")+"</b></h2> "+window.Buttonizer.translate("welcome.tour-steps.step-23"),position:"right"},{element:this.amount<=7?t.querySelector(".group-title"):t,intro:"<h2><b>"+window.Buttonizer.translate("settings.name.title")+"</b></h2> "+window.Buttonizer.translate("settings.name.description"),position:"bottom",scrollToElement:!1,highlightClass:"introjs-custom-gone"},{element:this.amount<=7?t.querySelector(".mobile-desktop"):t,intro:"<h2><b>"+window.Buttonizer.translate("settings.label_desktop.title")+"</b></h2> "+window.Buttonizer.translate("welcome.tour-steps.step-15"),position:"bottom",highlightClass:"introjs-custom-gone"},{element:this.amount<=7?t.querySelector(".holder-button"):t,intro:"&larr; "+window.Buttonizer.translate("welcome.tour-steps.step-26"),position:"right",highlightClass:"introjs-custom-gone",disableInteraction:!1},{element:this.amount<=7?t.querySelector(".group-holder-quick-menu"):t,intro:'<h2><b>Menu</b></h2><p style="text-align: left;"><b>'+window.Buttonizer.translate("common.settings")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-27.edit_button")+"<br><b>"+window.Buttonizer.translate("utils.advanced_settings")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-27.advanced_settings")+"<br><b>"+window.Buttonizer.translate("utils.rename")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-27.rename")+"<br><b>"+window.Buttonizer.translate("utils.duplicate")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-27.duplicate")+"<br><b>"+window.Buttonizer.translate("utils.delete")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-27.delete")+"<br></p>",position:"right",highlightClass:"introjs-custom-gone"},{element:this.amount<=7?t.querySelector(".group-holder-quick-menu").querySelector(".settings"):t,intro:"&larr; "+window.Buttonizer.translate("welcome.tour-steps.step-28"),position:"right",disableInteraction:!1,highlightClass:"introjs-custom-hidden"},{element:window.Buttonizer.bar.settingContainer,intro:"<b><h2>"+window.Buttonizer.translate("welcome.tour-steps.step-29.title")+"</h2></b> "+window.Buttonizer.translate("welcome.tour-steps.step-29.description"),position:"right",disableInteraction:!1,highlightClass:"introjs-custom-gone"},{element:e.querySelectorAll(".style-top")[e.querySelectorAll(".style-top").length-1],intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-30.title")+"</b></h2><b>"+window.Buttonizer.translate("settings.button_action.title")+":</b> "+window.Buttonizer.translate("settings.button_action.description")+"<br><b>"+window.Buttonizer.translate("settings.show_mobile_desktop.device_visibility")+":</b> "+window.Buttonizer.translate("settings.show_mobile_desktop.description"),position:"right",disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:e.querySelectorAll(".style-button")[e.querySelectorAll(".style-button").length-1],intro:"<h2><b>"+window.Buttonizer.translate("settings.setting_categories.button_style")+"</b></h2>"+window.Buttonizer.translate("welcome.tour-steps.step-31.enabled")+"<br>"+window.Buttonizer.translate("welcome.tour-steps.step-31.turning_off"),position:"right",disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:e.querySelectorAll(".style-icon")[e.querySelectorAll(".style-icon").length-1],intro:"<h2><b>"+window.Buttonizer.translate("settings.setting_categories.button_icon")+"</b></h2><b>"+window.Buttonizer.translate("settings.icon_or_image.title")+":</b> "+window.Buttonizer.translate("settings.icon_or_image.description")+'<br><h2 style="margin: 1em 0 0 0;"><b>'+window.Buttonizer.translate("settings.icon.title")+"</b></h2><b>"+window.Buttonizer.translate("settings.icon.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-14.icon")+"<br><b>"+window.Buttonizer.translate("settings.icon_color.title")+":</b> "+window.Buttonizer.translate("settings.icon_color.description")+"<br><b>"+window.Buttonizer.translate("settings.icon_size.title")+":</b> "+window.Buttonizer.translate("settings.icon_size.description")+'<br><h2 style="margin: 1em 0 0 0;"><b>'+window.Buttonizer.translate("utils.image")+"</b></h2><b>"+window.Buttonizer.translate("settings.icon_image_select.title")+":</b> "+window.Buttonizer.translate("settings.icon_image_select.description")+"<br><b>"+window.Buttonizer.translate("settings.icon_image_border_radius.title")+":</b> "+window.Buttonizer.translate("settings.icon_image_border_radius.description")+"<br><b>"+window.Buttonizer.translate("settings.icon_image_size.title")+":</b> "+window.Buttonizer.translate("settings.icon_image_size.description")+"<br>",position:"right",disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:e.querySelectorAll(".style-label")[e.querySelectorAll(".style-label").length-1],intro:"<h2><b>"+window.Buttonizer.translate("settings.setting_categories.label")+"</b></h2><b>"+window.Buttonizer.translate("settings.label.title")+":</b> "+window.Buttonizer.translate("settings.label.description")+"<br><b>"+window.Buttonizer.translate("settings.label_desktop.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-15.label_visibility")+"<br><b>"+window.Buttonizer.translate("settings.label_color.title")+":</b> "+window.Buttonizer.translate("settings.label_color.description")+"<br><b>"+window.Buttonizer.translate("settings.font_size_border_radius.title")+":</b> "+window.Buttonizer.translate("settings.font_size_border_radius.description")+"<br>",position:"right",disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:window.Buttonizer.topBar.topBarElement.querySelector(".revert-save"),intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-34.title")+"</b></h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-34.revert_title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-34.revert_description")+"<br><br><b>"+window.Buttonizer.translate("welcome.tour-steps.step-34.save_title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-34.save_description"),position:"right",disableInteraction:!0,tooltipClass:"right"},{intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.final.title")+"</b></h2>"+window.Buttonizer.translate("welcome.tour-steps.final.intro")+"<br /><br />"+window.Buttonizer.translate("welcome.tour-steps.final.outro"),position:"left",tooltipClass:"max-width"}]}),this.tour}}i(13),window.bdebug=new n;String.prototype.format||(String.prototype.format=function(){var t=arguments;return this.replace(/{(\d+)}/g,function(e,i){return void 0!==t[i]?t[i]:e})}),window.Buttonizer=new class{constructor(){this.loader={},this.topBar={},this.bar={},this.assetsLink=".",this.tour=null,this.version="-",this.settings={},this.buttonGroups=[],this.savingMechanism={},this.buttonizerInitData=[],this.timeSchedule={},this.pageRule={},this.windowsZindex=9999,this.bc,this.loading=!0,this.settingsWindow={},this.iframe=null,this.iframeLoaded=!1,this.iconLibraryLoaded=!1,this.ButtonizerStartedLoading=0,this.iconSelector=null,this.iconLibraryStylesheet=null,this.previewWarning=null,this.premium=!1,this.init(!0)}set buttonChanges(t){this.loading||(this.bc=t)}get buttonChanges(){return this.bc}init(t){document.body.className+=" buttonizer-initialized",bdebug.welcomeToTheConsole(),!0===t&&bdebug.startDebugging(),bdebug.warning("Buttonizer 2.0");let e=document.createElement("link");e.rel="shortcut icon",e.href=buttonizer_admin.dir+"/favicon.ico",document.head.appendChild(e),this.loader=new Ce,this.loader.show(this.translate("loading.settings")),this.savingMechanism=new je,bdebug.warning("Buttonizer settings loading"),this.ButtonizerStartedLoading=(new Date).getTime(),this.loadSettings()}loadSettings(){jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&request=ButtonizerInitializer",dataType:"json",method:"get",success:t=>{bdebug.warning("Buttonizer settings loaded: "+((new Date).getTime()-this.ButtonizerStartedLoading)/1e3+"s"),"success"===t.status?this.defineSettings(t):this.fatalErrorLoading("<b>"+t.message+"</b>","Buttonizer.loadSettings().success")},error:(t,e,i)=>{this.loader.hide(),this.fatalErrorLoading("<b>"+e.toUpperCase()+":</b><br />"+i,"Buttonizer.loadSettings().error")}})}fatalErrorLoading(t,e){new s({title:"Error!",content:`\n <p>Oh, that was not what I was expecting! Something went wrong while we tried to load all Buttonizer settings.</p>\n <p>Try to reload the webpage. If that did not work, send us a <a href="https://community.buttonizer.pro/" target="_blank">support request</a>.</p>\n <p>Report the following information:</p>\n <p style='color: #FF0000; display: block; border: 1px solid #FF0000; padding: 10px;'>${t}<br /><br />Function place: ${e}</p>`,onConfirm:()=>{document.location.reload()},buttons:[{text:"Reload webpage",confirm:!0}]})}fatalError(t){console.error(t);let e=document.createElement("div");e.innerHTML='<p>Oh, that was not what we were expecting! Something went wrong.</p>\n <p>Try to reload the webpage. If that did not work, send us a <a href="https://community.buttonizer.pro/" target="_blank">support request</a>.</p>';let i=document.createElement("p");i.innerHTML="Do you want to see technical details? <a href='javascript:void(0)'>Click here!</a>",e.appendChild(i);let n=document.createElement("code");n.style.overflowX="auto",n.style.whiteSpace="nowrap",n.innerText=`Error type: ${t.name}\n \n Stack trace:\n \n ${t.stack}`,n.style.display="none",e.appendChild(n),i.addEventListener("click",()=>{i.style.display="none",n.style.display="block"}),new s({title:"Error!?!?1?!1?!",content:e,buttons:[{text:"Close",confirm:!0}]})}defineSettings(t){this.settings=t.settings,this.version=t.version,this.buttonizerInitData=t,this.premium=t.premium,xt.setDefaults({onShow:()=>"true"===this.getSetting("show_tooltips","true")||!0===this.getSetting("show_tooltips")}),this.loader.show(this.translate("loading.bar")),this.topBar=new Be(this),this.bar=new ze(this),this.previewWarning=this.leftButtonizerWarning(),this.changes=t.changes,t.changes&&this.topBar.alertText.alert(this.translate("bar.previous_session")),this.initializeSettings(t.settings),this.initializeTimeSchedules(),this.initializePageRules(),this.loadButtonGroups(),this.loading=!1,this.settingsWindow=new Ae,document.location.href.indexOf("open-settings")>=0&&this.settingsWindow.show(),this.iconSelector=new Ie,1!==this.buttonGroups.length||this.buttonGroups[0].singleButtonMode||this.buttonGroups[0].groupHolder.revealButtons(),this.createIframe();let e=document.createElement("link");e.rel="stylesheet",e.type="text/css",e.href="https://use.fontawesome.com/releases/v5.8.2/css/all.css",e.integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay",e.setAttribute("crossorigin","anonymous"),document.getElementsByTagName("head")[0].appendChild(e),window.addEventListener("message",t=>{t.isTrusted&&void 0!==t.data&&void 0!==t.data.eventType&&"buttonizer"===t.data.eventType&&("warning"===t.data.messageType?this.topBar.updateEventLogs(t.data.message):"javascript_error"===t.data.messageType?new s({title:this.translate("errors.custom_javascript.title"),content:`\n <p>${this.translate("errors.custom_javascript.message")}</p> <p><code style="display: block; padding: 15px;">${t.data.message}</code></p>\n `,buttons:[{text:this.translate("common.ok_fix"),confirm:!0}]}):"(re)loaded"===t.data.messageType&&console.log("[Buttonizer ADMIN] Buttonizer is (re)loaded! So last changes can be seen in the preview window."))},!1),document.location.href.indexOf("tour")>=0&&this.startTour()}startTour(){null===this.tour&&(this.tour=new He),this.tour.build()}createIframe(){let t=""===document.location.hash||"#open-settings"===document.location.hash?this.buttonizerInitData.wordpress.base:decodeURIComponent(document.location.hash.substr(1)),e=document.createElement("div");e.className="buttonizer-frame";let i=document.createElement("iframe");i.src=t+"?buttonizer-preview=1",i.id="buttonizer-iframe",i.setAttribute("frameborder","0"),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.addEventListener("load",t=>{this.iframeLoaded=!0,-1===t.target.contentWindow.location.href.indexOf("buttonizer-preview")&&-1===document.body.className.indexOf("warning-left-preview-window")&&(document.body.className+=" warning-left-preview-window",this.previewWarning.style.display="block")}),e.appendChild(i),document.body.appendChild(e),this.loader.show(this.translate("loading.website"),"site-loading"),setTimeout(()=>{this.iframeLoaded||this.loader.show(this.translate("loading.website")+"<br /><br /><small>"+this.translate("loading.website_slow")+"<br /><br /><a href='javascript:void(0)' onclick='window.Buttonizer.loader.hide()'>"+this.translate("loading.website_skip")+"</a></small>")},5e3);let n=setInterval(()=>{this.iframeLoaded&&this.iconLibraryLoaded&&(this.loader.hide(),document.body.className+=" buttonizer-loaded",clearInterval(n))})}welcome(){this.loader.hide(),new s({title:this.translate("welcome.title")+" "+this.version,content:`\n <img src="${buttonizer_admin.assets}/images/plugin-icon.png" width="100" align="left" style="margin-right: 20px; margin-bottom: 10px;" />\n <p>${this.translate("welcome.intro")}</p>\n <p>${this.translate("welcome.tour")}</p>\n `,onClose:()=>{this.saveSettings({welcome:"false"},!0)},onConfirm:()=>{this.startTour()},buttons:[{text:this.translate("welcome.already_know")+' <i class="fa fa-chevron-right" style="margin-left: 10px; vertical-align: middle;" aria-hidden="true"></i>',close:!0},{text:this.translate("welcome.take_tour")+' <i class="fa fa-chevron-right" style="margin-left: 10px; vertical-align: middle;" aria-hidden="true"></i>',confirm:!0}]})}updateButtonsTo2Point0(){new s({title:this.translate("migration_modal.title"),content:`\n <p>${this.translate("migration_modal.intro")}</p>\n <p>${this.translate("migration_modal.convert")}</p>\n \n <p>${this.translate("migration_modal.popping_up")}</p> \n `,onConfirm:()=>{window.Buttonizer.loader.show(this.translate("loading.running_migration")),jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&request=SaveData&save=migrate-buttonizer",dataType:"json",method:"post",data:{security:buttonizer_admin.security},success:t=>{"success"===t.status?(window.Buttonizer.loader.show(this.translate("loading.finishing")),setTimeout(()=>{document.location.reload()},500)):(window.Buttonizer.loader.hide(),window.Buttonizer.savingError(t.message))},error:(t,e,i)=>{window.Buttonizer.loader.hide(),window.Buttonizer.savingError(e)}})},buttons:[{text:this.translate("modal.no_thanks"),close:!0},{text:this.translate("migration_modal.convert_buttons")+' <i class="fa fa-chevron-right" style="margin-left: 10px; vertical-align: middle;" aria-hidden="true"></i>',confirm:!0}]})}leftButtonizerWarning(){let t=document.createElement("div");t.className="buttonizer-warning warning-red",t.innerHTML=this.translate("bar.preview.no_changes");let e=document.createElement("a");return e.href="javascript:void(0)",e.className="buttonizer-warning-button",e.innerText=this.translate("bar.preview.return"),e.addEventListener("click",()=>{document.body.className=document.body.className.replace("warning-left-preview-window",""),this.previewWarning.style.display="none",document.getElementById("buttonizer-iframe").setAttribute("src",window.Buttonizer.buttonizerInitData.wordpress.base+"?buttonizer-preview=true")}),t.appendChild(e),document.body.appendChild(t),t}saveSettings(t,e){e&&this.loader.show(this.translate("common.saving_settings")),Object.assign(this.settings,t),jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&request=SaveData&save=settings",dataType:"json",method:"post",data:{data:this.settings,security:buttonizer_admin.security},success:t=>{this.loader.hide(),"success"!==t.status&&window.Buttonizer.savingError(t.message)},error:t=>{this.loader.hide(),window.Buttonizer.savingError(t)}})}registerButton(t){}saveButtons(){console.log(this.buttons)}initializeSettings(t){"true"===t.welcome.toString()&&this.welcome(),this.settings=t,this.addIconLibrary()}addIconLibrary(){let t=!1;null===this.iconLibraryStylesheet&&(this.iconLibraryStylesheet=document.createElement("link"),this.iconLibraryStylesheet.rel="stylesheet",this.iconLibraryStylesheet.type="text/css",t=!0),"fontawesome"!==this.settings.icon_library||"5.free"!==this.settings.icon_library_version&&"5.paid"!==this.settings.icon_library_version?"fontawesome"===this.settings.icon_library&&"4.7.0"===this.settings.icon_library_version&&(this.iconLibraryStylesheet.setAttribute("integrity",""),this.iconLibraryStylesheet.href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"):("5.paid"===this.settings.icon_library_version&&""!==this.settings.icon_library_code?this.iconLibraryStylesheet.setAttribute("integrity",this.settings.icon_library_code):this.iconLibraryStylesheet.setAttribute("integrity","sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay"),this.iconLibraryStylesheet.setAttribute("crossorigin","anonymous"),this.iconLibraryStylesheet.href="https://"+("5.paid"===this.settings.icon_library_version?"pro":"use")+".fontawesome.com/releases/"+this.buttonizerInitData.fontawesome_current_version+"/css/all.css"),this.iconLibraryLoaded=!0}hasPremium(){return this.premium}showPremiumPopup(t,e){new s({title:'<i class="far fa-gem window-icon"></i> '+this.translate("premium.modal.title"),content:`\n <p>${this.translate("premium.modal.describe")}</p>\n <code style="display: block; margin-bottom: 5px; padding: 10px;">${t}</code>\n <p><b>${this.translate("premium.modal.what_do_i_get")}</b></p>\n \n <ul class="buttonizer-pro-checklist">\n <li><i class="fas fa-check"></i> ${this.translate("premium.modal.list.time_schedules")}</li>\n <li><i class="fas fa-check"></i> ${this.translate("premium.modal.list.page_rules")}</li>\n <li><i class="fas fa-check"></i> ${this.translate("premium.modal.list.button_groups")}</li>\n <li><i class="fas fa-check"></i> ${this.translate("premium.modal.list.custom_images")}</li>\n <li><i class="fas fa-check"></i> ${this.translate("premium.modal.list.exit_intent")}</li>\n <li><i class="fas fa-check"></i> ${this.translate("premium.modal.list.show_on_scroll")}</li>\n <li><i class="fas fa-check"></i> ${this.translate("premium.modal.list.show_on_timeout")}</li>\n <li><i class="fas fa-check"></i> ${this.translate("premium.modal.list.custom_class")}</li>\n <li><i class="fas fa-check"></i> ${this.translate("premium.modal.list.javascript")}</li>\n </ul>`,onConfirm:()=>{document.location.href=buttonizer_admin.admin+"?page=Buttonizer-pricing"},video:e,buttons:[{text:this.translate("modal.close"),close:!0},{text:this.translate("premium.modal.go_pro")+' <i class="fas fa-chevron-right" style="margin-left: 5px;vertical-align: middle;"></i>',confirm:!0,close:!0,focus:!0}]})}getSetting(t,e){return void 0!==this.settings[t]?this.settings[t]:e}set changes(t){this.topBar.changes=t}updateButtonGroupList(t,e){this.buttonGroups.splice(t,0,this.buttonGroups.splice(e,1)[0]),this.buttonChanges=!0}updateButtonList(t,e,i,n){this.buttonGroups[i].buttons.splice(t,0,this.buttonGroups[n].buttons.splice(e,1)[0]),this.buttonGroups[i].buttons[t].groupObject=this.buttonGroups[i],this.buttonChanges=!0,this.buttonGroups[n].buttons.length<=1&&jQuery(this.buttonGroups[n].groupBody).sortable("option","cancel",".group-button")}savingError(t){new s({title:this.translate("errors.saving.title"),content:`<p>${this.translate("errors.saving.message")}.</p><p>${t}</p>`,buttons:[{text:this.translate("modal.close"),close:!0}]})}initializeTimeSchedules(){}initializePageRules(){}loadButtonGroups(){if(void 0!==this.buttonizerInitData.groups.buttonorder&&this.updateButtonsTo2Point0(),0===this.buttonizerInitData.groups.length)return new Ee({name:"Buttonizer",position:"bottomright",icon:"fa fa-plus",horizontal:5,vertical:5},[{name:window.Buttonizer.translate("utils.first_button"),show_mobile:!0,show_desktop:!0},{name:window.Buttonizer.translate("utils.second_button"),show_mobile:!0,show_desktop:!0}]),void setTimeout(()=>{this.buttonChanges=!0},1e3);new Ee(this.buttonizerInitData.groups[0].data,this.buttonizerInitData.groups[0].buttons)}translate(t=""){let e=t.split(".");if(void 0===buttonizer_translations[e[0]])return console.error("Localization not found: "+t),t;let i=buttonizer_translations[e[0]];for(let n=1,o=e.length;n<o;n++){if(void 0===i[e[n]])return console.error("Localization not found: "+t),t;i=i[e[n]]}return i}__(t=""){return this.translate(t)}}},,function(t,e){}]);
18
  * Copyright 2017-2018 Andreas Borgen
19
  * Released under the MIT license.
20
  */
21
+ t.exports=function(){"use strict";var t=window;return function(e){var i=Element.prototype;i.matches||(i.matches=i.msMatchesSelector||i.webkitMatchesSelector),i.closest||(i.closest=function(t){var e=this;do{if(e.matches(t))return e;e="svg"===e.tagName?e.parentNode:e.parentElement}while(e);return null});var n=(e=e||{}).container||document.documentElement,o=e.selector,s=e.callback||console.log,r=e.callbackDragStart,a=e.callbackDragEnd,l=e.callbackClick,u=e.propagateEvents,c=!1!==e.roundCoords,d=!1!==e.dragOutside,p=e.handleOffset||!1!==e.handleOffset,h=null;switch(p){case"center":h=!0;break;case"topleft":case"top-left":h=!1}var m=void 0;function b(t,e,i,o){var s=t.clientX,r=t.clientY;function a(t,e,i){return Math.max(e,Math.min(t,i))}if(e){var l=e.getBoundingClientRect();if(s-=l.left,r-=l.top,i&&(s-=i[0],r-=i[1]),o&&(s=a(s,0,l.width),r=a(r,0,l.height)),e!==n){var u=null!==h?h:"circle"===e.nodeName||"ellipse"===e.nodeName;u&&(s-=l.width/2,r-=l.height/2)}}return c?[Math.round(s),Math.round(r)]:[s,r]}function f(t){t.preventDefault(),u||t.stopPropagation()}function w(t){var e=void 0;if(e=o?o instanceof Element?o.contains(t.target)?o:null:t.target.closest(o):{}){f(t);var i=o&&p?b(t,e):[0,0],s=b(t,n,i);m={target:e,mouseOffset:i,startPos:s,actuallyDragged:!1},r&&r(e,s)}}function g(t){if(m){f(t);var e=m.startPos,i=b(t,n,m.mouseOffset,!d);m.actuallyDragged=m.actuallyDragged||e[0]!==i[0]||e[1]!==i[1],s(m.target,i,e)}}function y(t,e){if(m){if(a||l){var i=!m.actuallyDragged,o=i?m.startPos:b(t,n,m.mouseOffset,!d);l&&i&&!e&&l(m.target,o),a&&a(m.target,o,m.startPos,e||i&&l)}m=null}}function v(t,e){y(B(t),e)}function _(t,e,i){t.addEventListener(e,i)}function k(t){return void 0!==t.buttons?1===t.buttons:1===t.which}function x(t,e){1===t.touches.length?e(B(t)):y(t,!0)}function B(t){var e=t.targetTouches[0];return e||(e=t.changedTouches[0]),e.preventDefault=t.preventDefault.bind(t),e.stopPropagation=t.stopPropagation.bind(t),e}_(n,"mousedown",function(t){k(t)?w(t):y(t,!0)}),_(n,"touchstart",function(t){return x(t,w)}),_(t,"mousemove",function(t){m&&(k(t)?g(t):y(t))}),_(t,"touchmove",function(t){return x(t,g)}),_(n,"mouseup",function(t){m&&!k(t)&&y(t)}),_(n,"touchend",function(t){return v(t)}),_(n,"touchcancel",function(t){return v(t,!0)})}}()},function(t,e){var i,n,o=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function a(t){if(i===setTimeout)return setTimeout(t,0);if((i===s||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:s}catch(t){i=s}try{n="function"==typeof clearTimeout?clearTimeout:r}catch(t){n=r}}();var l,u=[],c=!1,d=-1;function p(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&h())}function h(){if(!c){var t=a(p);c=!0;for(var e=u.length;e;){for(l=u,u=[];++d<e;)l&&l[d].run();d=-1,e=u.length}l=null,c=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===r||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function m(t,e){this.fun=t,this.array=e}function b(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];u.push(new m(t,e)),1!==u.length||c||a(h)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=b,o.addListener=b,o.once=b,o.off=b,o.removeListener=b,o.removeAllListeners=b,o.emit=b,o.prependListener=b,o.prependOnceListener=b,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,i){"use strict";(function(t){for(
22
  /**!
23
  * @fileOverview Kickass library to create and place poppers near their reference elements.
24
  * @version 1.15.0
43
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
44
  * SOFTWARE.
45
  */
46
+ var i="undefined"!=typeof window&&"undefined"!=typeof document,n=["Edge","Trident","Firefox"],o=0,s=0;s<n.length;s+=1)if(i&&navigator.userAgent.indexOf(n[s])>=0){o=1;break}var r=i&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then(function(){e=!1,t()}))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout(function(){e=!1,t()},o))}};function a(t){return t&&"[object Function]"==={}.toString.call(t)}function l(t,e){if(1!==t.nodeType)return[];var i=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?i[e]:i}function u(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function c(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=l(t),i=e.overflow,n=e.overflowX,o=e.overflowY;return/(auto|scroll|overlay)/.test(i+o+n)?t:c(u(t))}var d=i&&!(!window.MSInputMethodContext||!document.documentMode),p=i&&/MSIE 10/.test(navigator.userAgent);function h(t){return 11===t?d:10===t?p:d||p}function m(t){if(!t)return document.documentElement;for(var e=h(10)?document.body:null,i=t.offsetParent||null;i===e&&t.nextElementSibling;)i=(t=t.nextElementSibling).offsetParent;var n=i&&i.nodeName;return n&&"BODY"!==n&&"HTML"!==n?-1!==["TH","TD","TABLE"].indexOf(i.nodeName)&&"static"===l(i,"position")?m(i):i:t?t.ownerDocument.documentElement:document.documentElement}function b(t){return null!==t.parentNode?b(t.parentNode):t}function f(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var i=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,n=i?t:e,o=i?e:t,s=document.createRange();s.setStart(n,0),s.setEnd(o,0);var r,a,l=s.commonAncestorContainer;if(t!==l&&e!==l||n.contains(o))return"BODY"===(a=(r=l).nodeName)||"HTML"!==a&&m(r.firstElementChild)!==r?m(l):l;var u=b(t);return u.host?f(u.host,e):f(t,b(e).host)}function w(t){var e="top"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top")?"scrollTop":"scrollLeft",i=t.nodeName;if("BODY"===i||"HTML"===i){var n=t.ownerDocument.documentElement;return(t.ownerDocument.scrollingElement||n)[e]}return t[e]}function g(t,e){var i="x"===e?"Left":"Top",n="Left"===i?"Right":"Bottom";return parseFloat(t["border"+i+"Width"],10)+parseFloat(t["border"+n+"Width"],10)}function y(t,e,i,n){return Math.max(e["offset"+t],e["scroll"+t],i["client"+t],i["offset"+t],i["scroll"+t],h(10)?parseInt(i["offset"+t])+parseInt(n["margin"+("Height"===t?"Top":"Left")])+parseInt(n["margin"+("Height"===t?"Bottom":"Right")]):0)}function v(t){var e=t.body,i=t.documentElement,n=h(10)&&getComputedStyle(i);return{height:y("Height",e,i,n),width:y("Width",e,i,n)}}var _=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},k=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),x=function(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t},B=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t};function E(t){return B({},t,{right:t.left+t.width,bottom:t.top+t.height})}function z(t){var e={};try{if(h(10)){e=t.getBoundingClientRect();var i=w(t,"top"),n=w(t,"left");e.top+=i,e.left+=n,e.bottom+=i,e.right+=n}else e=t.getBoundingClientRect()}catch(t){}var o={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},s="HTML"===t.nodeName?v(t.ownerDocument):{},r=s.width||t.clientWidth||o.right-o.left,a=s.height||t.clientHeight||o.bottom-o.top,u=t.offsetWidth-r,c=t.offsetHeight-a;if(u||c){var d=l(t);u-=g(d,"x"),c-=g(d,"y"),o.width-=u,o.height-=c}return E(o)}function C(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=h(10),o="HTML"===e.nodeName,s=z(t),r=z(e),a=c(t),u=l(e),d=parseFloat(u.borderTopWidth,10),p=parseFloat(u.borderLeftWidth,10);i&&o&&(r.top=Math.max(r.top,0),r.left=Math.max(r.left,0));var m=E({top:s.top-r.top-d,left:s.left-r.left-p,width:s.width,height:s.height});if(m.marginTop=0,m.marginLeft=0,!n&&o){var b=parseFloat(u.marginTop,10),f=parseFloat(u.marginLeft,10);m.top-=d-b,m.bottom-=d-b,m.left-=p-f,m.right-=p-f,m.marginTop=b,m.marginLeft=f}return(n&&!i?e.contains(a):e===a&&"BODY"!==a.nodeName)&&(m=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=w(e,"top"),o=w(e,"left"),s=i?-1:1;return t.top+=n*s,t.bottom+=n*s,t.left+=o*s,t.right+=o*s,t}(m,e)),m}function j(t){if(!t||!t.parentElement||h())return document.documentElement;for(var e=t.parentElement;e&&"none"===l(e,"transform");)e=e.parentElement;return e||document.documentElement}function S(t,e,i,n){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s={top:0,left:0},r=o?j(t):f(t,e);if("viewport"===n)s=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=t.ownerDocument.documentElement,n=C(t,i),o=Math.max(i.clientWidth,window.innerWidth||0),s=Math.max(i.clientHeight,window.innerHeight||0),r=e?0:w(i),a=e?0:w(i,"left");return E({top:r-n.top+n.marginTop,left:a-n.left+n.marginLeft,width:o,height:s})}(r,o);else{var a=void 0;"scrollParent"===n?"BODY"===(a=c(u(e))).nodeName&&(a=t.ownerDocument.documentElement):a="window"===n?t.ownerDocument.documentElement:n;var d=C(a,r,o);if("HTML"!==a.nodeName||function t(e){var i=e.nodeName;if("BODY"===i||"HTML"===i)return!1;if("fixed"===l(e,"position"))return!0;var n=u(e);return!!n&&t(n)}(r))s=d;else{var p=v(t.ownerDocument),h=p.height,m=p.width;s.top+=d.top-d.marginTop,s.bottom=h+d.top,s.left+=d.left-d.marginLeft,s.right=m+d.left}}var b="number"==typeof(i=i||0);return s.left+=b?i:i.left||0,s.top+=b?i:i.top||0,s.right-=b?i:i.right||0,s.bottom-=b?i:i.bottom||0,s}function O(t,e,i,n,o){var s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var r=S(i,n,s,o),a={top:{width:r.width,height:e.top-r.top},right:{width:r.right-e.right,height:r.height},bottom:{width:r.width,height:r.bottom-e.bottom},left:{width:e.left-r.left,height:r.height}},l=Object.keys(a).map(function(t){return B({key:t},a[t],{area:(e=a[t],e.width*e.height)});var e}).sort(function(t,e){return e.area-t.area}),u=l.filter(function(t){var e=t.width,n=t.height;return e>=i.clientWidth&&n>=i.clientHeight}),c=u.length>0?u[0].key:l[0].key,d=t.split("-")[1];return c+(d?"-"+d:"")}function L(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return C(i,n?j(e):f(e,i),n)}function T(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),i=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),n=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+n,height:t.offsetHeight+i}}function N(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,function(t){return e[t]})}function A(t,e,i){i=i.split("-")[0];var n=T(t),o={width:n.width,height:n.height},s=-1!==["right","left"].indexOf(i),r=s?"top":"left",a=s?"left":"top",l=s?"height":"width",u=s?"width":"height";return o[r]=e[r]+e[l]/2-n[l]/2,o[a]=i===a?e[a]-n[u]:e[N(a)],o}function I(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function M(t,e,i){return(void 0===i?t:t.slice(0,function(t,e,i){if(Array.prototype.findIndex)return t.findIndex(function(t){return t[e]===i});var n=I(t,function(t){return t[e]===i});return t.indexOf(n)}(t,"name",i))).forEach(function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var i=t.function||t.fn;t.enabled&&a(i)&&(e.offsets.popper=E(e.offsets.popper),e.offsets.reference=E(e.offsets.reference),e=i(e,t))}),e}function H(t,e){return t.some(function(t){var i=t.name;return t.enabled&&i===e})}function q(t){for(var e=[!1,"ms","Webkit","Moz","O"],i=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<e.length;n++){var o=e[n],s=o?""+o+i:t;if(void 0!==document.body.style[s])return s}return null}function P(t){var e=t.ownerDocument;return e?e.defaultView:window}function D(t,e,i,n){i.updateBound=n,P(t).addEventListener("resize",i.updateBound,{passive:!0});var o=c(t);return function t(e,i,n,o){var s="BODY"===e.nodeName,r=s?e.ownerDocument.defaultView:e;r.addEventListener(i,n,{passive:!0}),s||t(c(r.parentNode),i,n,o),o.push(r)}(o,"scroll",i.updateBound,i.scrollParents),i.scrollElement=o,i.eventsEnabled=!0,i}function F(){var t,e;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(t=this.reference,e=this.state,P(t).removeEventListener("resize",e.updateBound),e.scrollParents.forEach(function(t){t.removeEventListener("scroll",e.updateBound)}),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e))}function R(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function W(t,e){Object.keys(e).forEach(function(i){var n="";-1!==["width","height","top","right","bottom","left"].indexOf(i)&&R(e[i])&&(n="px"),t.style[i]=e[i]+n})}var U=i&&/Firefox/i.test(navigator.userAgent);function G(t,e,i){var n=I(t,function(t){return t.name===e}),o=!!n&&t.some(function(t){return t.name===i&&t.enabled&&t.order<n.order});if(!o){var s="`"+e+"`",r="`"+i+"`";console.warn(r+" modifier is required by "+s+" modifier in order to work, be sure to include it before "+s+"!")}return o}var Q=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],$=Q.slice(3);function Y(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=$.indexOf(t),n=$.slice(i+1).concat($.slice(0,i));return e?n.reverse():n}var V={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function X(t,e,i,n){var o=[0,0],s=-1!==["right","left"].indexOf(n),r=t.split(/(\+|\-)/).map(function(t){return t.trim()}),a=r.indexOf(I(r,function(t){return-1!==t.search(/,|\s/)}));r[a]&&-1===r[a].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,u=-1!==a?[r.slice(0,a).concat([r[a].split(l)[0]]),[r[a].split(l)[1]].concat(r.slice(a+1))]:[r];return(u=u.map(function(t,n){var o=(1===n?!s:s)?"height":"width",r=!1;return t.reduce(function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,r=!0,t):r?(t[t.length-1]+=e,r=!1,t):t.concat(e)},[]).map(function(t){return function(t,e,i,n){var o=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),s=+o[1],r=o[2];if(!s)return t;if(0===r.indexOf("%")){var a=void 0;switch(r){case"%p":a=i;break;case"%":case"%r":default:a=n}return E(a)[e]/100*s}if("vh"===r||"vw"===r)return("vh"===r?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*s;return s}(t,o,e,i)})})).forEach(function(t,e){t.forEach(function(i,n){R(i)&&(o[e]+=i*("-"===t[n-1]?-1:1))})}),o}var K={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,i=e.split("-")[0],n=e.split("-")[1];if(n){var o=t.offsets,s=o.reference,r=o.popper,a=-1!==["bottom","top"].indexOf(i),l=a?"left":"top",u=a?"width":"height",c={start:x({},l,s[l]),end:x({},l,s[l]+s[u]-r[u])};t.offsets.popper=B({},r,c[n])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var i=e.offset,n=t.placement,o=t.offsets,s=o.popper,r=o.reference,a=n.split("-")[0],l=void 0;return l=R(+i)?[+i,0]:X(i,s,r,a),"left"===a?(s.top+=l[0],s.left-=l[1]):"right"===a?(s.top+=l[0],s.left+=l[1]):"top"===a?(s.left+=l[0],s.top-=l[1]):"bottom"===a&&(s.left+=l[0],s.top+=l[1]),t.popper=s,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var i=e.boundariesElement||m(t.instance.popper);t.instance.reference===i&&(i=m(i));var n=q("transform"),o=t.instance.popper.style,s=o.top,r=o.left,a=o[n];o.top="",o.left="",o[n]="";var l=S(t.instance.popper,t.instance.reference,e.padding,i,t.positionFixed);o.top=s,o.left=r,o[n]=a,e.boundaries=l;var u=e.priority,c=t.offsets.popper,d={primary:function(t){var i=c[t];return c[t]<l[t]&&!e.escapeWithReference&&(i=Math.max(c[t],l[t])),x({},t,i)},secondary:function(t){var i="right"===t?"left":"top",n=c[i];return c[t]>l[t]&&!e.escapeWithReference&&(n=Math.min(c[i],l[t]-("right"===t?c.width:c.height))),x({},i,n)}};return u.forEach(function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";c=B({},c,d[e](t))}),t.offsets.popper=c,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,i=e.popper,n=e.reference,o=t.placement.split("-")[0],s=Math.floor,r=-1!==["top","bottom"].indexOf(o),a=r?"right":"bottom",l=r?"left":"top",u=r?"width":"height";return i[a]<s(n[l])&&(t.offsets.popper[l]=s(n[l])-i[u]),i[l]>s(n[a])&&(t.offsets.popper[l]=s(n[a])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var i;if(!G(t.instance.modifiers,"arrow","keepTogether"))return t;var n=e.element;if("string"==typeof n){if(!(n=t.instance.popper.querySelector(n)))return t}else if(!t.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var o=t.placement.split("-")[0],s=t.offsets,r=s.popper,a=s.reference,u=-1!==["left","right"].indexOf(o),c=u?"height":"width",d=u?"Top":"Left",p=d.toLowerCase(),h=u?"left":"top",m=u?"bottom":"right",b=T(n)[c];a[m]-b<r[p]&&(t.offsets.popper[p]-=r[p]-(a[m]-b)),a[p]+b>r[m]&&(t.offsets.popper[p]+=a[p]+b-r[m]),t.offsets.popper=E(t.offsets.popper);var f=a[p]+a[c]/2-b/2,w=l(t.instance.popper),g=parseFloat(w["margin"+d],10),y=parseFloat(w["border"+d+"Width"],10),v=f-t.offsets.popper[p]-g-y;return v=Math.max(Math.min(r[c]-b,v),0),t.arrowElement=n,t.offsets.arrow=(x(i={},p,Math.round(v)),x(i,h,""),i),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(H(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var i=S(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),n=t.placement.split("-")[0],o=N(n),s=t.placement.split("-")[1]||"",r=[];switch(e.behavior){case V.FLIP:r=[n,o];break;case V.CLOCKWISE:r=Y(n);break;case V.COUNTERCLOCKWISE:r=Y(n,!0);break;default:r=e.behavior}return r.forEach(function(a,l){if(n!==a||r.length===l+1)return t;n=t.placement.split("-")[0],o=N(n);var u=t.offsets.popper,c=t.offsets.reference,d=Math.floor,p="left"===n&&d(u.right)>d(c.left)||"right"===n&&d(u.left)<d(c.right)||"top"===n&&d(u.bottom)>d(c.top)||"bottom"===n&&d(u.top)<d(c.bottom),h=d(u.left)<d(i.left),m=d(u.right)>d(i.right),b=d(u.top)<d(i.top),f=d(u.bottom)>d(i.bottom),w="left"===n&&h||"right"===n&&m||"top"===n&&b||"bottom"===n&&f,g=-1!==["top","bottom"].indexOf(n),y=!!e.flipVariations&&(g&&"start"===s&&h||g&&"end"===s&&m||!g&&"start"===s&&b||!g&&"end"===s&&f),v=!!e.flipVariationsByContent&&(g&&"start"===s&&m||g&&"end"===s&&h||!g&&"start"===s&&f||!g&&"end"===s&&b),_=y||v;(p||w||_)&&(t.flipped=!0,(p||w)&&(n=r[l+1]),_&&(s=function(t){return"end"===t?"start":"start"===t?"end":t}(s)),t.placement=n+(s?"-"+s:""),t.offsets.popper=B({},t.offsets.popper,A(t.instance.popper,t.offsets.reference,t.placement)),t=M(t.instance.modifiers,t,"flip"))}),t},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,i=e.split("-")[0],n=t.offsets,o=n.popper,s=n.reference,r=-1!==["left","right"].indexOf(i),a=-1===["top","left"].indexOf(i);return o[r?"left":"top"]=s[i]-(a?o[r?"width":"height"]:0),t.placement=N(e),t.offsets.popper=E(o),t}},hide:{order:800,enabled:!0,fn:function(t){if(!G(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,i=I(t.instance.modifiers,function(t){return"preventOverflow"===t.name}).boundaries;if(e.bottom<i.top||e.left>i.right||e.top>i.bottom||e.right<i.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}},computeStyle:{order:850,enabled:!0,fn:function(t,e){var i=e.x,n=e.y,o=t.offsets.popper,s=I(t.instance.modifiers,function(t){return"applyStyle"===t.name}).gpuAcceleration;void 0!==s&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var r=void 0!==s?s:e.gpuAcceleration,a=m(t.instance.popper),l=z(a),u={position:o.position},c=function(t,e){var i=t.offsets,n=i.popper,o=i.reference,s=Math.round,r=Math.floor,a=function(t){return t},l=s(o.width),u=s(n.width),c=-1!==["left","right"].indexOf(t.placement),d=-1!==t.placement.indexOf("-"),p=e?c||d||l%2==u%2?s:r:a,h=e?s:a;return{left:p(l%2==1&&u%2==1&&!d&&e?n.left-1:n.left),top:h(n.top),bottom:h(n.bottom),right:p(n.right)}}(t,window.devicePixelRatio<2||!U),d="bottom"===i?"top":"bottom",p="right"===n?"left":"right",h=q("transform"),b=void 0,f=void 0;if(f="bottom"===d?"HTML"===a.nodeName?-a.clientHeight+c.bottom:-l.height+c.bottom:c.top,b="right"===p?"HTML"===a.nodeName?-a.clientWidth+c.right:-l.width+c.right:c.left,r&&h)u[h]="translate3d("+b+"px, "+f+"px, 0)",u[d]=0,u[p]=0,u.willChange="transform";else{var w="bottom"===d?-1:1,g="right"===p?-1:1;u[d]=f*w,u[p]=b*g,u.willChange=d+", "+p}var y={"x-placement":t.placement};return t.attributes=B({},y,t.attributes),t.styles=B({},u,t.styles),t.arrowStyles=B({},t.offsets.arrow,t.arrowStyles),t},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(t){var e,i;return W(t.instance.popper,t.styles),e=t.instance.popper,i=t.attributes,Object.keys(i).forEach(function(t){!1!==i[t]?e.setAttribute(t,i[t]):e.removeAttribute(t)}),t.arrowElement&&Object.keys(t.arrowStyles).length&&W(t.arrowElement,t.arrowStyles),t},onLoad:function(t,e,i,n,o){var s=L(o,e,t,i.positionFixed),r=O(i.placement,s,e,t,i.modifiers.flip.boundariesElement,i.modifiers.flip.padding);return e.setAttribute("x-placement",r),W(e,{position:i.positionFixed?"fixed":"absolute"}),i},gpuAcceleration:void 0}}},J=function(){function t(e,i){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};_(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=r(this.update.bind(this)),this.options=B({},t.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=i&&i.jquery?i[0]:i,this.options.modifiers={},Object.keys(B({},t.Defaults.modifiers,o.modifiers)).forEach(function(e){n.options.modifiers[e]=B({},t.Defaults.modifiers[e]||{},o.modifiers?o.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(t){return B({name:t},n.options.modifiers[t])}).sort(function(t,e){return t.order-e.order}),this.modifiers.forEach(function(t){t.enabled&&a(t.onLoad)&&t.onLoad(n.reference,n.popper,n.options,t,n.state)}),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return k(t,[{key:"update",value:function(){return function(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=L(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=O(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=A(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=M(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}.call(this)}},{key:"destroy",value:function(){return function(){return this.state.isDestroyed=!0,H(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[q("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}.call(this)}},{key:"enableEventListeners",value:function(){return function(){this.state.eventsEnabled||(this.state=D(this.reference,this.options,this.state,this.scheduleUpdate))}.call(this)}},{key:"disableEventListeners",value:function(){return F.call(this)}}]),t}();J.Utils=("undefined"!=typeof window?window:t).PopperUtils,J.placements=Q,J.Defaults=K,e.a=J}).call(this,i(1))},function(t,e,i){
47
  /*!
48
  * @sphinxxxx/color-conversion v2.2.1
49
  * https://github.com/Sphinxxxx/color-conversion
58
  * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
59
  * @license MIT
60
  */
61
+ function n(t,e){if(t===e)return 0;for(var i=t.length,n=e.length,o=0,s=Math.min(i,n);o<s;++o)if(t[o]!==e[o]){i=t[o],n=e[o];break}return i<n?-1:n<i?1:0}function o(t){return e.Buffer&&"function"==typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var s=i(8),r=Object.prototype.hasOwnProperty,a=Array.prototype.slice,l="foo"===function(){}.name;function u(t){return Object.prototype.toString.call(t)}function c(t){return!o(t)&&("function"==typeof e.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var d=t.exports=w,p=/\s*function\s+([^\(\s]*)\s*/;function h(t){if(s.isFunction(t)){if(l)return t.name;var e=t.toString().match(p);return e&&e[1]}}function m(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function b(t){if(l||!s.isFunction(t))return s.inspect(t);var e=h(t);return"[Function"+(e?": "+e:"")+"]"}function f(t,e,i,n,o){throw new d.AssertionError({message:i,actual:t,expected:e,operator:n,stackStartFunction:o})}function w(t,e){t||f(t,!0,e,"==",d.ok)}function g(t,e,i,r){if(t===e)return!0;if(o(t)&&o(e))return 0===n(t,e);if(s.isDate(t)&&s.isDate(e))return t.getTime()===e.getTime();if(s.isRegExp(t)&&s.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(c(t)&&c(e)&&u(t)===u(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===n(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(o(t)!==o(e))return!1;var l=(r=r||{actual:[],expected:[]}).actual.indexOf(t);return-1!==l&&l===r.expected.indexOf(e)||(r.actual.push(t),r.expected.push(e),function(t,e,i,n){if(null==t||null==e)return!1;if(s.isPrimitive(t)||s.isPrimitive(e))return t===e;if(i&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var o=y(t),r=y(e);if(o&&!r||!o&&r)return!1;if(o)return t=a.call(t),e=a.call(e),g(t,e,i);var l,u,c=k(t),d=k(e);if(c.length!==d.length)return!1;for(c.sort(),d.sort(),u=c.length-1;u>=0;u--)if(c[u]!==d[u])return!1;for(u=c.length-1;u>=0;u--)if(l=c[u],!g(t[l],e[l],i,n))return!1;return!0}(t,e,i,r))}return i?t===e:t==e}function y(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function v(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function _(t,e,i,n){var o;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof i&&(n=i,i=null),o=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(i&&i.name?" ("+i.name+").":".")+(n?" "+n:"."),t&&!o&&f(o,i,"Missing expected exception"+n);var r="string"==typeof n,a=!t&&o&&!i;if((!t&&s.isError(o)&&r&&v(o,i)||a)&&f(o,i,"Got unwanted exception"+n),t&&o&&i&&!v(o,i)||!t&&o)throw o}d.AssertionError=function(t){var e;this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=m(b((e=this).actual),128)+" "+e.operator+" "+m(b(e.expected),128),this.generatedMessage=!0);var i=t.stackStartFunction||f;if(Error.captureStackTrace)Error.captureStackTrace(this,i);else{var n=new Error;if(n.stack){var o=n.stack,s=h(i),r=o.indexOf("\n"+s);if(r>=0){var a=o.indexOf("\n",r+1);o=o.substring(a+1)}this.stack=o}}},s.inherits(d.AssertionError,Error),d.fail=f,d.ok=w,d.equal=function(t,e,i){t!=e&&f(t,e,i,"==",d.equal)},d.notEqual=function(t,e,i){t==e&&f(t,e,i,"!=",d.notEqual)},d.deepEqual=function(t,e,i){g(t,e,!1)||f(t,e,i,"deepEqual",d.deepEqual)},d.deepStrictEqual=function(t,e,i){g(t,e,!0)||f(t,e,i,"deepStrictEqual",d.deepStrictEqual)},d.notDeepEqual=function(t,e,i){g(t,e,!1)&&f(t,e,i,"notDeepEqual",d.notDeepEqual)},d.notDeepStrictEqual=function t(e,i,n){g(e,i,!0)&&f(e,i,n,"notDeepStrictEqual",t)},d.strictEqual=function(t,e,i){t!==e&&f(t,e,i,"===",d.strictEqual)},d.notStrictEqual=function(t,e,i){t===e&&f(t,e,i,"!==",d.notStrictEqual)},d.throws=function(t,e,i){_(!0,t,e,i)},d.doesNotThrow=function(t,e,i){_(!1,t,e,i)},d.ifError=function(t){if(t)throw t};var k=Object.keys||function(t){var e=[];for(var i in t)r.call(t,i)&&e.push(i);return e}}).call(this,i(1))},function(t,e,i){(function(t){var n=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),i={},n=0;n<e.length;n++)i[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return i},o=/%[sdj%]/g;e.format=function(t){if(!w(t)){for(var e=[],i=0;i<arguments.length;i++)e.push(a(arguments[i]));return e.join(" ")}i=1;for(var n=arguments,s=n.length,r=String(t).replace(o,function(t){if("%%"===t)return"%";if(i>=s)return t;switch(t){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch(t){return"[Circular]"}default:return t}}),l=n[i];i<s;l=n[++i])b(l)||!v(l)?r+=" "+l:r+=" "+a(l);return r},e.deprecate=function(i,n){if(void 0!==t&&!0===t.noDeprecation)return i;if(void 0===t)return function(){return e.deprecate(i,n).apply(this,arguments)};var o=!1;return function(){if(!o){if(t.throwDeprecation)throw new Error(n);t.traceDeprecation?console.trace(n):console.error(n),o=!0}return i.apply(this,arguments)}};var s,r={};function a(t,i){var n={seen:[],stylize:u};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(i)?n.showHidden=i:i&&e._extend(n,i),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),c(n,t,n.depth)}function l(t,e){var i=a.styles[e];return i?"["+a.colors[i][0]+"m"+t+"["+a.colors[i][1]+"m":t}function u(t,e){return t}function c(t,i,n){if(t.customInspect&&i&&x(i.inspect)&&i.inspect!==e.inspect&&(!i.constructor||i.constructor.prototype!==i)){var o=i.inspect(n,t);return w(o)||(o=c(t,o,n)),o}var s=function(t,e){if(g(e))return t.stylize("undefined","undefined");if(w(e)){var i="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(i,"string")}if(f(e))return t.stylize(""+e,"number");if(m(e))return t.stylize(""+e,"boolean");if(b(e))return t.stylize("null","null")}(t,i);if(s)return s;var r=Object.keys(i),a=function(t){var e={};return t.forEach(function(t,i){e[t]=!0}),e}(r);if(t.showHidden&&(r=Object.getOwnPropertyNames(i)),k(i)&&(r.indexOf("message")>=0||r.indexOf("description")>=0))return d(i);if(0===r.length){if(x(i)){var l=i.name?": "+i.name:"";return t.stylize("[Function"+l+"]","special")}if(y(i))return t.stylize(RegExp.prototype.toString.call(i),"regexp");if(_(i))return t.stylize(Date.prototype.toString.call(i),"date");if(k(i))return d(i)}var u,v="",B=!1,E=["{","}"];(h(i)&&(B=!0,E=["[","]"]),x(i))&&(v=" [Function"+(i.name?": "+i.name:"")+"]");return y(i)&&(v=" "+RegExp.prototype.toString.call(i)),_(i)&&(v=" "+Date.prototype.toUTCString.call(i)),k(i)&&(v=" "+d(i)),0!==r.length||B&&0!=i.length?n<0?y(i)?t.stylize(RegExp.prototype.toString.call(i),"regexp"):t.stylize("[Object]","special"):(t.seen.push(i),u=B?function(t,e,i,n,o){for(var s=[],r=0,a=e.length;r<a;++r)C(e,String(r))?s.push(p(t,e,i,n,String(r),!0)):s.push("");return o.forEach(function(o){o.match(/^\d+$/)||s.push(p(t,e,i,n,o,!0))}),s}(t,i,n,a,r):r.map(function(e){return p(t,i,n,a,e,B)}),t.seen.pop(),function(t,e,i){if(t.reduce(function(t,e){return 0,e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return i[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+i[1];return i[0]+e+" "+t.join(", ")+" "+i[1]}(u,v,E)):E[0]+v+E[1]}function d(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,i,n,o,s){var r,a,l;if((l=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]}).get?a=l.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):l.set&&(a=t.stylize("[Setter]","special")),C(n,o)||(r="["+o+"]"),a||(t.seen.indexOf(l.value)<0?(a=b(i)?c(t,l.value,null):c(t,l.value,i-1)).indexOf("\n")>-1&&(a=s?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n")):a=t.stylize("[Circular]","special")),g(r)){if(s&&o.match(/^\d+$/))return a;(r=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(r=r.substr(1,r.length-2),r=t.stylize(r,"name")):(r=r.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),r=t.stylize(r,"string"))}return r+": "+a}function h(t){return Array.isArray(t)}function m(t){return"boolean"==typeof t}function b(t){return null===t}function f(t){return"number"==typeof t}function w(t){return"string"==typeof t}function g(t){return void 0===t}function y(t){return v(t)&&"[object RegExp]"===B(t)}function v(t){return"object"==typeof t&&null!==t}function _(t){return v(t)&&"[object Date]"===B(t)}function k(t){return v(t)&&("[object Error]"===B(t)||t instanceof Error)}function x(t){return"function"==typeof t}function B(t){return Object.prototype.toString.call(t)}function E(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(i){if(g(s)&&(s=t.env.NODE_DEBUG||""),i=i.toUpperCase(),!r[i])if(new RegExp("\\b"+i+"\\b","i").test(s)){var n=t.pid;r[i]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",i,n,t)}}else r[i]=function(){};return r[i]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=h,e.isBoolean=m,e.isNull=b,e.isNullOrUndefined=function(t){return null==t},e.isNumber=f,e.isString=w,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=g,e.isRegExp=y,e.isObject=v,e.isDate=_,e.isError=k,e.isFunction=x,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=i(9);var z=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,i;console.log("%s - %s",(t=new Date,i=[E(t.getHours()),E(t.getMinutes()),E(t.getSeconds())].join(":"),[t.getDate(),z[t.getMonth()],i].join(" ")),e.format.apply(e,arguments))},e.inherits=i(10),e._extend=function(t,e){if(!e||!v(e))return t;for(var i=Object.keys(e),n=i.length;n--;)t[i[n]]=e[i[n]];return t};var j="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function S(t,e){if(!t){var i=new Error("Promise was rejected with a falsy value");i.reason=t,t=i}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(j&&t[j]){var e;if("function"!=typeof(e=t[j]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,j,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,i,n=new Promise(function(t,n){e=t,i=n}),o=[],s=0;s<arguments.length;s++)o.push(arguments[s]);o.push(function(t,n){t?i(t):e(n)});try{t.apply(this,o)}catch(t){i(t)}return n}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),j&&Object.defineProperty(e,j,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,n(t))},e.promisify.custom=j,e.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function i(){for(var i=[],n=0;n<arguments.length;n++)i.push(arguments[n]);var o=i.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var s=this,r=function(){return o.apply(s,arguments)};e.apply(this,i).then(function(e){t.nextTick(r,null,e)},function(e){t.nextTick(S,e,r)})}return Object.setPrototypeOf(i,Object.getPrototypeOf(e)),Object.defineProperties(i,n(e)),i}}).call(this,i(3))},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}},function(t,e,i){(function(t,e){!function(t,i){"use strict";if(!t.setImmediate){var n,o,s,r,a,l=1,u={},c=!1,d=t.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(t);p=p&&p.setTimeout?p:t,"[object process]"==={}.toString.call(t.process)?n=function(t){e.nextTick(function(){m(t)})}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,i=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=i,e}}()?t.MessageChannel?((s=new MessageChannel).port1.onmessage=function(t){m(t.data)},n=function(t){s.port2.postMessage(t)}):d&&"onreadystatechange"in d.createElement("script")?(o=d.documentElement,n=function(t){var e=d.createElement("script");e.onreadystatechange=function(){m(t),e.onreadystatechange=null,o.removeChild(e),e=null},o.appendChild(e)}):n=function(t){setTimeout(m,0,t)}:(r="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(r)&&m(+e.data.slice(r.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),n=function(e){t.postMessage(r+e,"*")}),p.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),i=0;i<e.length;i++)e[i]=arguments[i+1];var o={callback:t,args:e};return u[l]=o,n(l),l++},p.clearImmediate=h}function h(t){delete u[t]}function m(t){if(c)setTimeout(m,0,t);else{var e=u[t];if(e){c=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(i,n)}}(e)}finally{h(t),c=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,i(1),i(3))},function(t,e,i){var n;n=function(){function t(t){this._targetElement=t,this._introItems=[],this._options={nextLabel:"Next &rarr;",prevLabel:"&larr; Back",skipLabel:"Skip",doneLabel:"Done",hidePrev:!1,hideNext:!1,tooltipPosition:"bottom",tooltipClass:"",highlightClass:"",exitOnEsc:!0,exitOnOverlayClick:!0,showStepNumbers:!0,keyboardNavigation:!0,showButtons:!0,showBullets:!0,showProgress:!1,scrollToElement:!0,scrollTo:"element",scrollPadding:30,overlayOpacity:.8,positionPrecedence:["bottom","top","right","left"],disableInteraction:!1,helperElementPadding:10,hintPosition:"top-middle",hintButtonLabel:"Got it",hintAnimation:!0,buttonClass:"introjs-button"}}function e(t,e){var r=t.querySelectorAll("*[data-intro]"),l=[];if(this._options.steps)w(this._options.steps,function(t){var e=o(t);if(e.step=l.length+1,"string"==typeof e.element&&(e.element=document.querySelector(e.element)),void 0===e.element||null===e.element){var i=document.querySelector(".introjsFloatingElement");null===i&&((i=document.createElement("div")).className="introjsFloatingElement",document.body.appendChild(i)),e.element=i,e.position="floating"}e.scrollTo=e.scrollTo||this._options.scrollTo,void 0===e.disableInteraction&&(e.disableInteraction=this._options.disableInteraction),null!==e.element&&l.push(e)}.bind(this));else{var u;if(r.length<1)return!1;w(r,function(t){if((!e||t.getAttribute("data-intro-group")===e)&&"none"!==t.style.display){var i=parseInt(t.getAttribute("data-step"),10);u=void 0!==t.getAttribute("data-disable-interaction")?!!t.getAttribute("data-disable-interaction"):this._options.disableInteraction,i>0&&(l[i-1]={element:t,intro:t.getAttribute("data-intro"),step:parseInt(t.getAttribute("data-step"),10),tooltipClass:t.getAttribute("data-tooltipclass"),highlightClass:t.getAttribute("data-highlightclass"),position:t.getAttribute("data-position")||this._options.tooltipPosition,scrollTo:t.getAttribute("data-scrollto")||this._options.scrollTo,disableInteraction:u})}}.bind(this));var c=0;w(r,function(t){if((!e||t.getAttribute("data-intro-group")===e)&&null===t.getAttribute("data-step")){for(;void 0!==l[c];)c++;u=void 0!==t.getAttribute("data-disable-interaction")?!!t.getAttribute("data-disable-interaction"):this._options.disableInteraction,l[c]={element:t,intro:t.getAttribute("data-intro"),step:c+1,tooltipClass:t.getAttribute("data-tooltipclass"),highlightClass:t.getAttribute("data-highlightclass"),position:t.getAttribute("data-position")||this._options.tooltipPosition,scrollTo:t.getAttribute("data-scrollto")||this._options.scrollTo,disableInteraction:u}}}.bind(this))}for(var d=[],p=0;p<l.length;p++)l[p]&&d.push(l[p]);return(l=d).sort(function(t,e){return t.step-e.step}),this._introItems=l,function(t){var e=document.createElement("div"),i="",n=this;if(e.className="introjs-overlay",t.tagName&&"body"!==t.tagName.toLowerCase()){var o=I(t);o&&(i+="width: "+o.width+"px; height:"+o.height+"px; top:"+o.top+"px;left: "+o.left+"px;",e.style.cssText=i)}else i+="top: 0;bottom: 0; left: 0;right: 0;position: fixed;",e.style.cssText=i;return t.appendChild(e),e.onclick=function(){!0===n._options.exitOnOverlayClick&&a.call(n,t)},window.setTimeout(function(){i+="opacity: "+n._options.overlayOpacity.toString()+";",e.style.cssText=i},10),!0}.call(this,t)&&(s.call(this),this._options.keyboardNavigation&&v.on(window,"keydown",n,this,!0),v.on(window,"resize",i,this,!0)),!1}function i(){this.refresh.call(this)}function n(t){var e=null===t.code?t.which:t.code;if(null===e&&(e=null===t.charCode?t.keyCode:t.charCode),"Escape"!==e&&27!==e||!0!==this._options.exitOnEsc){if("ArrowLeft"===e||37===e)r.call(this);else if("ArrowRight"===e||39===e)s.call(this);else if("Enter"===e||13===e){var i=t.target||t.srcElement;i&&i.className.match("introjs-prevbutton")?r.call(this):i&&i.className.match("introjs-skipbutton")?(this._introItems.length-1===this._currentStep&&"function"==typeof this._introCompleteCallback&&this._introCompleteCallback.call(this),a.call(this,this._targetElement)):i&&i.getAttribute("data-stepnumber")?i.click():s.call(this),t.preventDefault?t.preventDefault():t.returnValue=!1}}else a.call(this,this._targetElement)}function o(t){if(null===t||"object"!=typeof t||void 0!==t.nodeType)return t;var e={};for(var i in t)void 0!==window.jQuery&&t[i]instanceof window.jQuery?e[i]=t[i]:e[i]=o(t[i]);return e}function s(){this._direction="forward",void 0!==this._currentStepNumber&&w(this._introItems,function(t,e){t.step===this._currentStepNumber&&(this._currentStep=e-1,this._currentStepNumber=void 0)}.bind(this)),void 0===this._currentStep?this._currentStep=0:++this._currentStep;var t=this._introItems[this._currentStep],e=!0;return void 0!==this._introBeforeChangeCallback&&(e=this._introBeforeChangeCallback.call(this,t.element)),!1===e?(--this._currentStep,!1):this._introItems.length<=this._currentStep?("function"==typeof this._introCompleteCallback&&this._introCompleteCallback.call(this),void a.call(this,this._targetElement)):void m.call(this,t)}function r(){if(this._direction="backward",0===this._currentStep)return!1;--this._currentStep;var t=this._introItems[this._currentStep],e=!0;if(void 0!==this._introBeforeChangeCallback&&(e=this._introBeforeChangeCallback.call(this,t.element)),!1===e)return++this._currentStep,!1;m.call(this,t)}function a(t,e){var o=!0;if(void 0!==this._introBeforeExitCallback&&(o=this._introBeforeExitCallback.call(this)),e||!1!==o){var s=t.querySelectorAll(".introjs-overlay");s&&s.length&&w(s,function(t){t.style.opacity=0,window.setTimeout(function(){this.parentNode&&this.parentNode.removeChild(this)}.bind(t),500)}.bind(this));var r=t.querySelector(".introjs-helperLayer");r&&r.parentNode.removeChild(r);var a=t.querySelector(".introjs-tooltipReferenceLayer");a&&a.parentNode.removeChild(a);var l=t.querySelector(".introjs-disableInteraction");l&&l.parentNode.removeChild(l);var u=document.querySelector(".introjsFloatingElement");u&&u.parentNode.removeChild(u),f(),w(document.querySelectorAll(".introjs-fixParent"),function(t){k(t,/introjs-fixParent/g)}),v.off(window,"keydown",n,this,!0),v.off(window,"resize",i,this,!0),void 0!==this._introExitCallback&&this._introExitCallback.call(this),this._currentStep=void 0}}function l(t,e,i,n,o){var s,r,a,l,p,h="";if(o=o||!1,e.style.top=null,e.style.right=null,e.style.bottom=null,e.style.left=null,e.style.marginLeft=null,e.style.marginTop=null,i.style.display="inherit",null!=n&&(n.style.top=null,n.style.left=null),this._introItems[this._currentStep])switch(h="string"==typeof(s=this._introItems[this._currentStep]).tooltipClass?s.tooltipClass:this._options.tooltipClass,e.className=("introjs-tooltip "+h).replace(/^\s+|\s+$/g,""),e.setAttribute("role","dialog"),"floating"!==(p=this._introItems[this._currentStep].position)&&(p=function(t,e,i){var n=this._options.positionPrecedence.slice(),o=E(),s=I(e).height+10,r=I(e).width+20,a=t.getBoundingClientRect(),l="floating";a.bottom+s+s>o.height&&d(n,"bottom");a.top-s<0&&d(n,"top");a.right+r>o.width&&d(n,"right");a.left-r<0&&d(n,"left");var u=(c=i||"",p=c.indexOf("-"),-1!==p?c.substr(p):"");var c,p;i&&(i=i.split("-")[0]);n.length&&(l="auto"!==i&&n.indexOf(i)>-1?i:n[0]);-1!==["top","bottom"].indexOf(l)&&(l+=function(t,e,i,n){var o=e/2,s=Math.min(i.width,window.screen.width),r=["-left-aligned","-middle-aligned","-right-aligned"],a="";s-t<e&&d(r,"-left-aligned");(t<o||s-t<o)&&d(r,"-middle-aligned");t<e&&d(r,"-right-aligned");a=r.length?-1!==r.indexOf(n)?n:r[0]:"-middle-aligned";return a}(a.left,r,o,u));return l}.call(this,t,e,p)),a=I(t),r=I(e),l=E(),_(e,"introjs-"+p),p){case"top-right-aligned":i.className="introjs-arrow bottom-right";var m=0;c(a,m,r,e),e.style.bottom=a.height+20+"px";break;case"top-middle-aligned":i.className="introjs-arrow bottom-middle";var b=a.width/2-r.width/2;o&&(b+=5),c(a,b,r,e)&&(e.style.right=null,u(a,b,r,l,e)),e.style.bottom=a.height+20+"px";break;case"top-left-aligned":case"top":i.className="introjs-arrow bottom",u(a,o?0:15,r,l,e),e.style.bottom=a.height+20+"px";break;case"right":e.style.left=a.width+20+"px",a.top+r.height>l.height?(i.className="introjs-arrow left-bottom",e.style.top="-"+(r.height-a.height-20)+"px"):i.className="introjs-arrow left";break;case"left":o||!0!==this._options.showStepNumbers||(e.style.top="15px"),a.top+r.height>l.height?(e.style.top="-"+(r.height-a.height-20)+"px",i.className="introjs-arrow right-bottom"):i.className="introjs-arrow right",e.style.right=a.width+20+"px";break;case"floating":i.style.display="none",e.style.left="50%",e.style.top="50%",e.style.marginLeft="-"+r.width/2+"px",e.style.marginTop="-"+r.height/2+"px",null!=n&&(n.style.left="-"+(r.width/2+18)+"px",n.style.top="-"+(r.height/2+18)+"px");break;case"bottom-right-aligned":i.className="introjs-arrow top-right",c(a,m=0,r,e),e.style.top=a.height+20+"px";break;case"bottom-middle-aligned":i.className="introjs-arrow top-middle",b=a.width/2-r.width/2,o&&(b+=5),c(a,b,r,e)&&(e.style.right=null,u(a,b,r,l,e)),e.style.top=a.height+20+"px";break;default:i.className="introjs-arrow top",u(a,0,r,l,e),e.style.top=a.height+20+"px"}}function u(t,e,i,n,o){return t.left+e+i.width>n.width?(o.style.left=n.width-i.width-t.left+"px",!1):(o.style.left=e+"px",!0)}function c(t,e,i,n){return t.left+t.width-e-i.width<0?(n.style.left=-t.left+"px",!1):(n.style.right=e+"px",!0)}function d(t,e){t.indexOf(e)>-1&&t.splice(t.indexOf(e),1)}function p(t){if(t){if(!this._introItems[this._currentStep])return;var e=this._introItems[this._currentStep],i=I(e.element),n=this._options.helperElementPadding;B(e.element)?_(t,"introjs-fixedTooltip"):k(t,"introjs-fixedTooltip"),"floating"===e.position&&(n=0),t.style.cssText="width: "+(i.width+n)+"px; height:"+(i.height+n)+"px; top:"+(i.top-n/2)+"px;left: "+(i.left-n/2)+"px;"}}function h(t){t.setAttribute("role","button"),t.tabIndex=0}function m(t){void 0!==this._introChangeCallback&&this._introChangeCallback.call(this,t.element);var e,i,n,o,u=this,c=document.querySelector(".introjs-helperLayer"),d=document.querySelector(".introjs-tooltipReferenceLayer"),m="introjs-helperLayer";if("string"==typeof t.highlightClass&&(m+=" "+t.highlightClass),"string"==typeof this._options.highlightClass&&(m+=" "+this._options.highlightClass),null!==c){var g=d.querySelector(".introjs-helperNumberLayer"),y=d.querySelector(".introjs-tooltiptext"),v=d.querySelector(".introjs-arrow"),B=d.querySelector(".introjs-tooltip");if(n=d.querySelector(".introjs-skipbutton"),i=d.querySelector(".introjs-prevbutton"),e=d.querySelector(".introjs-nextbutton"),c.className=m,B.style.opacity=0,B.style.display="none",null!==g){var E=this._introItems[t.step-2>=0?t.step-2:0];(null!==E&&"forward"===this._direction&&"floating"===E.position||"backward"===this._direction&&"floating"===t.position)&&(g.style.opacity=0)}(o=M(t.element))!==document.body&&H(o,t.element),p.call(u,c),p.call(u,d),w(document.querySelectorAll(".introjs-fixParent"),function(t){k(t,/introjs-fixParent/g)}),f(),u._lastShowElementTimer&&window.clearTimeout(u._lastShowElementTimer),u._lastShowElementTimer=window.setTimeout(function(){null!==g&&(g.innerHTML=t.step),y.innerHTML=t.intro,B.style.display="block",l.call(u,t.element,B,v,g),u._options.showBullets&&(d.querySelector(".introjs-bullets li > a.active").className="",d.querySelector('.introjs-bullets li > a[data-stepnumber="'+t.step+'"]').className="active"),d.querySelector(".introjs-progress .introjs-progressbar").style.cssText="width:"+q.call(u)+"%;",d.querySelector(".introjs-progress .introjs-progressbar").setAttribute("aria-valuenow",q.call(u)),B.style.opacity=1,g&&(g.style.opacity=1),null!=n&&/introjs-donebutton/gi.test(n.className)?n.focus():null!=e&&e.focus(),b.call(u,t.scrollTo,t,y)},350)}else{var z=document.createElement("div"),C=document.createElement("div"),j=document.createElement("div"),S=document.createElement("div"),O=document.createElement("div"),L=document.createElement("div"),T=document.createElement("div"),N=document.createElement("div");z.className=m,C.className="introjs-tooltipReferenceLayer",(o=M(t.element))!==document.body&&H(o,t.element),p.call(u,z),p.call(u,C),this._targetElement.appendChild(z),this._targetElement.appendChild(C),j.className="introjs-arrow",O.className="introjs-tooltiptext",O.innerHTML=t.intro,L.className="introjs-bullets",!1===this._options.showBullets&&(L.style.display="none");var A=document.createElement("ul");A.setAttribute("role","tablist");var I=function(){u.goToStep(this.getAttribute("data-stepnumber"))};w(this._introItems,function(e,i){var n=document.createElement("li"),o=document.createElement("a");n.setAttribute("role","presentation"),o.setAttribute("role","tab"),o.onclick=I,i===t.step-1&&(o.className="active"),h(o),o.innerHTML="&nbsp;",o.setAttribute("data-stepnumber",e.step),n.appendChild(o),A.appendChild(n)}),L.appendChild(A),T.className="introjs-progress",!1===this._options.showProgress&&(T.style.display="none");var P=document.createElement("div");P.className="introjs-progressbar",P.setAttribute("role","progress"),P.setAttribute("aria-valuemin",0),P.setAttribute("aria-valuemax",100),P.setAttribute("aria-valuenow",q.call(this)),P.style.cssText="width:"+q.call(this)+"%;",T.appendChild(P),N.className="introjs-tooltipbuttons",!1===this._options.showButtons&&(N.style.display="none"),S.className="introjs-tooltip",S.appendChild(O),S.appendChild(L),S.appendChild(T);var D=document.createElement("span");!0===this._options.showStepNumbers&&(D.className="introjs-helperNumberLayer",D.innerHTML=t.step,C.appendChild(D)),S.appendChild(j),C.appendChild(S),(e=document.createElement("a")).onclick=function(){u._introItems.length-1!==u._currentStep&&s.call(u)},h(e),e.innerHTML=this._options.nextLabel,(i=document.createElement("a")).onclick=function(){0!==u._currentStep&&r.call(u)},h(i),i.innerHTML=this._options.prevLabel,(n=document.createElement("a")).className=this._options.buttonClass+" introjs-skipbutton ",h(n),n.innerHTML=this._options.skipLabel,n.onclick=function(){u._introItems.length-1===u._currentStep&&"function"==typeof u._introCompleteCallback&&u._introCompleteCallback.call(u),u._introItems.length-1!==u._currentStep&&"function"==typeof u._introExitCallback&&u._introExitCallback.call(u),"function"==typeof u._introSkipCallback&&u._introSkipCallback.call(u),a.call(u,u._targetElement)},N.appendChild(n),this._introItems.length>1&&(N.appendChild(i),N.appendChild(e)),S.appendChild(N),l.call(u,t.element,S,j,D),b.call(this,t.scrollTo,t,S)}var F=u._targetElement.querySelector(".introjs-disableInteraction");F&&F.parentNode.removeChild(F),t.disableInteraction&&function(){var t=document.querySelector(".introjs-disableInteraction");null===t&&((t=document.createElement("div")).className="introjs-disableInteraction",this._targetElement.appendChild(t)),p.call(this,t)}.call(u),0===this._currentStep&&this._introItems.length>1?(null!=n&&(n.className=this._options.buttonClass+" introjs-skipbutton"),null!=e&&(e.className=this._options.buttonClass+" introjs-nextbutton"),!0===this._options.hidePrev?(null!=i&&(i.className=this._options.buttonClass+" introjs-prevbutton introjs-hidden"),null!=e&&_(e,"introjs-fullbutton")):null!=i&&(i.className=this._options.buttonClass+" introjs-prevbutton introjs-disabled"),null!=n&&(n.innerHTML=this._options.skipLabel)):this._introItems.length-1===this._currentStep||1===this._introItems.length?(null!=n&&(n.innerHTML=this._options.doneLabel,_(n,"introjs-donebutton")),null!=i&&(i.className=this._options.buttonClass+" introjs-prevbutton"),!0===this._options.hideNext?(null!=e&&(e.className=this._options.buttonClass+" introjs-nextbutton introjs-hidden"),null!=i&&_(i,"introjs-fullbutton")):null!=e&&(e.className=this._options.buttonClass+" introjs-nextbutton introjs-disabled")):(null!=n&&(n.className=this._options.buttonClass+" introjs-skipbutton"),null!=i&&(i.className=this._options.buttonClass+" introjs-prevbutton"),null!=e&&(e.className=this._options.buttonClass+" introjs-nextbutton"),null!=n&&(n.innerHTML=this._options.skipLabel)),i.setAttribute("role","button"),e.setAttribute("role","button"),n.setAttribute("role","button"),null!=e&&e.focus(),function(t){var e;if(t.element instanceof SVGElement)for(e=t.element.parentNode;null!==t.element.parentNode&&e.tagName&&"body"!==e.tagName.toLowerCase();)"svg"===e.tagName.toLowerCase()&&_(e,"introjs-showElement introjs-relativePosition"),e=e.parentNode;_(t.element,"introjs-showElement");var i=x(t.element,"position");"absolute"!==i&&"relative"!==i&&"fixed"!==i&&_(t.element,"introjs-relativePosition");e=t.element.parentNode;for(;null!==e&&e.tagName&&"body"!==e.tagName.toLowerCase();){var n=x(e,"z-index"),o=parseFloat(x(e,"opacity")),s=x(e,"transform")||x(e,"-webkit-transform")||x(e,"-moz-transform")||x(e,"-ms-transform")||x(e,"-o-transform");(/[0-9]+/.test(n)||o<1||"none"!==s&&void 0!==s)&&_(e,"introjs-fixParent"),e=e.parentNode}}(t),void 0!==this._introAfterChangeCallback&&this._introAfterChangeCallback.call(this,t.element)}function b(t,e,i){var n;if("off"!==t&&(this._options.scrollToElement&&(n="tooltip"===t?i.getBoundingClientRect():e.element.getBoundingClientRect(),!function(t){var e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom+80<=window.innerHeight&&e.right<=window.innerWidth}(e.element)))){var o=E().height;n.bottom-(n.bottom-n.top)<0||e.element.clientHeight>o?window.scrollBy(0,n.top-(o/2-n.height/2)-this._options.scrollPadding):window.scrollBy(0,n.top-(o/2-n.height/2)+this._options.scrollPadding)}}function f(){w(document.querySelectorAll(".introjs-showElement"),function(t){k(t,/introjs-[a-zA-Z]+/g)})}function w(t,e,i){if(t)for(var n=0,o=t.length;n<o;n++)e(t[n],n);"function"==typeof i&&i()}var g,y=(g={},function(t,e){return g[e=e||"introjs-stamp"]=g[e]||0,void 0===t[e]&&(t[e]=g[e]++),t[e]}),v=function(){return new function(){var t="introjs_event";this._id=function(t,e,i,n){return e+y(i)+(n?"_"+y(n):"")},this.on=function(e,i,n,o,s){var r=this._id.apply(this,arguments),a=function(t){return n.call(o||e,t||window.event)};"addEventListener"in e?e.addEventListener(i,a,s):"attachEvent"in e&&e.attachEvent("on"+i,a),e[t]=e[t]||{},e[t][r]=a},this.off=function(e,i,n,o,s){var r=this._id.apply(this,arguments),a=e[t]&&e[t][r];a&&("removeEventListener"in e?e.removeEventListener(i,a,s):"detachEvent"in e&&e.detachEvent("on"+i,a),e[t][r]=null)}}}();function _(t,e){if(t instanceof SVGElement){var i=t.getAttribute("class")||"";t.setAttribute("class",i+" "+e)}else{if(void 0!==t.classList)w(e.split(" "),function(e){t.classList.add(e)});else t.className.match(e)||(t.className+=" "+e)}}function k(t,e){if(t instanceof SVGElement){var i=t.getAttribute("class")||"";t.setAttribute("class",i.replace(e,"").replace(/^\s+|\s+$/g,""))}else t.className=t.className.replace(e,"").replace(/^\s+|\s+$/g,"")}function x(t,e){var i="";return t.currentStyle?i=t.currentStyle[e]:document.defaultView&&document.defaultView.getComputedStyle&&(i=document.defaultView.getComputedStyle(t,null).getPropertyValue(e)),i&&i.toLowerCase?i.toLowerCase():i}function B(t){var e=t.parentNode;return!(!e||"HTML"===e.nodeName)&&("fixed"===x(t,"position")||B(e))}function E(){if(void 0!==window.innerWidth)return{width:window.innerWidth,height:window.innerHeight};var t=document.documentElement;return{width:t.clientWidth,height:t.clientHeight}}function z(){var t=document.querySelector(".introjs-hintReference");if(t){var e=t.getAttribute("data-step");return t.parentNode.removeChild(t),e}}function C(t){if(this._introItems=[],this._options.hints)w(this._options.hints,function(t){var e=o(t);"string"==typeof e.element&&(e.element=document.querySelector(e.element)),e.hintPosition=e.hintPosition||this._options.hintPosition,e.hintAnimation=e.hintAnimation||this._options.hintAnimation,null!==e.element&&this._introItems.push(e)}.bind(this));else{var e=t.querySelectorAll("*[data-hint]");if(!e||!e.length)return!1;w(e,function(t){var e=t.getAttribute("data-hintanimation");e=e?"true"===e:this._options.hintAnimation,this._introItems.push({element:t,hint:t.getAttribute("data-hint"),hintPosition:t.getAttribute("data-hintposition")||this._options.hintPosition,hintAnimation:e,tooltipClass:t.getAttribute("data-tooltipclass"),position:t.getAttribute("data-position")||this._options.tooltipPosition})}.bind(this))}(function(){var t=this,e=document.querySelector(".introjs-hints");null===e&&((e=document.createElement("div")).className="introjs-hints");w(this._introItems,function(i,n){if(!document.querySelector('.introjs-hint[data-step="'+n+'"]')){var o=document.createElement("a");h(o),o.onclick=function(e){return function(i){var n=i||window.event;n.stopPropagation&&n.stopPropagation(),null!==n.cancelBubble&&(n.cancelBubble=!0),A.call(t,e)}}(n),o.className="introjs-hint",i.hintAnimation||_(o,"introjs-hint-no-anim"),B(i.element)&&_(o,"introjs-fixedhint");var s=document.createElement("div");s.className="introjs-hint-dot";var r=document.createElement("div");r.className="introjs-hint-pulse",o.appendChild(s),o.appendChild(r),o.setAttribute("data-step",n),i.targetElement=i.element,i.element=o,N.call(this,i.hintPosition,o,i.targetElement),e.appendChild(o)}}.bind(this)),document.body.appendChild(e),void 0!==this._hintsAddedCallback&&this._hintsAddedCallback.call(this)}).call(this),v.on(document,"click",z,this,!1),v.on(window,"resize",j,this,!0)}function j(){w(this._introItems,function(t){void 0!==t.targetElement&&N.call(this,t.hintPosition,t.element,t.targetElement)}.bind(this))}function S(t){var e=document.querySelector(".introjs-hints");return e?e.querySelectorAll(t):[]}function O(t){var e=S('.introjs-hint[data-step="'+t+'"]')[0];z.call(this),e&&_(e,"introjs-hidehint"),void 0!==this._hintCloseCallback&&this._hintCloseCallback.call(this,t)}function L(t){var e=S('.introjs-hint[data-step="'+t+'"]')[0];e&&k(e,/introjs-hidehint/g)}function T(t){var e=S('.introjs-hint[data-step="'+t+'"]')[0];e&&e.parentNode.removeChild(e)}function N(t,e,i){var n=I.call(this,i);switch(t){default:case"top-left":e.style.left=n.left+"px",e.style.top=n.top+"px";break;case"top-right":e.style.left=n.left+n.width-20+"px",e.style.top=n.top+"px";break;case"bottom-left":e.style.left=n.left+"px",e.style.top=n.top+n.height-20+"px";break;case"bottom-right":e.style.left=n.left+n.width-20+"px",e.style.top=n.top+n.height-20+"px";break;case"middle-left":e.style.left=n.left+"px",e.style.top=n.top+(n.height-20)/2+"px";break;case"middle-right":e.style.left=n.left+n.width-20+"px",e.style.top=n.top+(n.height-20)/2+"px";break;case"middle-middle":e.style.left=n.left+(n.width-20)/2+"px",e.style.top=n.top+(n.height-20)/2+"px";break;case"bottom-middle":e.style.left=n.left+(n.width-20)/2+"px",e.style.top=n.top+n.height-20+"px";break;case"top-middle":e.style.left=n.left+(n.width-20)/2+"px",e.style.top=n.top+"px"}}function A(t){var e=document.querySelector('.introjs-hint[data-step="'+t+'"]'),i=this._introItems[t];void 0!==this._hintClickCallback&&this._hintClickCallback.call(this,e,i,t);var n=z.call(this);if(parseInt(n,10)!==t){var o=document.createElement("div"),s=document.createElement("div"),r=document.createElement("div"),a=document.createElement("div");o.className="introjs-tooltip",o.onclick=function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},s.className="introjs-tooltiptext";var u=document.createElement("p");u.innerHTML=i.hint;var c=document.createElement("a");c.className=this._options.buttonClass,c.setAttribute("role","button"),c.innerHTML=this._options.hintButtonLabel,c.onclick=O.bind(this,t),s.appendChild(u),s.appendChild(c),r.className="introjs-arrow",o.appendChild(r),o.appendChild(s),this._currentStep=e.getAttribute("data-step"),a.className="introjs-tooltipReferenceLayer introjs-hintReference",a.setAttribute("data-step",e.getAttribute("data-step")),p.call(this,a),a.appendChild(o),document.body.appendChild(a),l.call(this,e,o,r,null,!0)}}function I(t){var e=document.body,i=document.documentElement,n=window.pageYOffset||i.scrollTop||e.scrollTop,o=window.pageXOffset||i.scrollLeft||e.scrollLeft,s=t.getBoundingClientRect();return{top:s.top+n,width:s.width,height:s.height,left:s.left+o}}function M(t){var e=window.getComputedStyle(t),i="absolute"===e.position,n=/(auto|scroll)/;if("fixed"===e.position)return document.body;for(var o=t;o=o.parentElement;)if(e=window.getComputedStyle(o),(!i||"static"!==e.position)&&n.test(e.overflow+e.overflowY+e.overflowX))return o;return document.body}function H(t,e){t.scrollTop=e.offsetTop-t.offsetTop}function q(){return parseInt(this._currentStep+1,10)/this._introItems.length*100}var P=function(e){var i;if("object"==typeof e)i=new t(e);else if("string"==typeof e){var n=document.querySelector(e);if(!n)throw new Error("There is no element with given selector.");i=new t(n)}else i=new t(document.body);return P.instances[y(i,"introjs-instance")]=i,i};return P.version="2.9.3",P.instances={},P.fn=t.prototype={clone:function(){return new t(this)},setOption:function(t,e){return this._options[t]=e,this},setOptions:function(t){return this._options=function(t,e){var i,n={};for(i in t)n[i]=t[i];for(i in e)n[i]=e[i];return n}(this._options,t),this},start:function(t){return e.call(this,this._targetElement,t),this},goToStep:function(t){return function(t){this._currentStep=t-2,void 0!==this._introItems&&s.call(this)}.call(this,t),this},addStep:function(t){return this._options.steps||(this._options.steps=[]),this._options.steps.push(t),this},addSteps:function(t){if(t.length){for(var e=0;e<t.length;e++)this.addStep(t[e]);return this}},goToStepNumber:function(t){return function(t){this._currentStepNumber=t,void 0!==this._introItems&&s.call(this)}.call(this,t),this},nextStep:function(){return s.call(this),this},previousStep:function(){return r.call(this),this},exit:function(t){return a.call(this,this._targetElement,t),this},refresh:function(){return function(){if(p.call(this,document.querySelector(".introjs-helperLayer")),p.call(this,document.querySelector(".introjs-tooltipReferenceLayer")),p.call(this,document.querySelector(".introjs-disableInteraction")),void 0!==this._currentStep&&null!==this._currentStep){var t=document.querySelector(".introjs-helperNumberLayer"),e=document.querySelector(".introjs-arrow"),i=document.querySelector(".introjs-tooltip");l.call(this,this._introItems[this._currentStep].element,i,e,t)}return j.call(this),this}.call(this),this},onbeforechange:function(t){if("function"!=typeof t)throw new Error("Provided callback for onbeforechange was not a function");return this._introBeforeChangeCallback=t,this},onchange:function(t){if("function"!=typeof t)throw new Error("Provided callback for onchange was not a function.");return this._introChangeCallback=t,this},onafterchange:function(t){if("function"!=typeof t)throw new Error("Provided callback for onafterchange was not a function");return this._introAfterChangeCallback=t,this},oncomplete:function(t){if("function"!=typeof t)throw new Error("Provided callback for oncomplete was not a function.");return this._introCompleteCallback=t,this},onhintsadded:function(t){if("function"!=typeof t)throw new Error("Provided callback for onhintsadded was not a function.");return this._hintsAddedCallback=t,this},onhintclick:function(t){if("function"!=typeof t)throw new Error("Provided callback for onhintclick was not a function.");return this._hintClickCallback=t,this},onhintclose:function(t){if("function"!=typeof t)throw new Error("Provided callback for onhintclose was not a function.");return this._hintCloseCallback=t,this},onexit:function(t){if("function"!=typeof t)throw new Error("Provided callback for onexit was not a function.");return this._introExitCallback=t,this},onskip:function(t){if("function"!=typeof t)throw new Error("Provided callback for onskip was not a function.");return this._introSkipCallback=t,this},onbeforeexit:function(t){if("function"!=typeof t)throw new Error("Provided callback for onbeforeexit was not a function.");return this._introBeforeExitCallback=t,this},addHints:function(){return C.call(this,this._targetElement),this},hideHint:function(t){return O.call(this,t),this},hideHints:function(){return function(){w(S(".introjs-hint"),function(t){O.call(this,t.getAttribute("data-step"))}.bind(this))}.call(this),this},showHint:function(t){return L.call(this,t),this},showHints:function(){return function(){var t=S(".introjs-hint");t&&t.length?w(t,function(t){L.call(this,t.getAttribute("data-step"))}.bind(this)):C.call(this,this._targetElement)}.call(this),this},removeHints:function(){return function(){w(S(".introjs-hint"),function(t){T.call(this,t.getAttribute("data-step"))}.bind(this))}.call(this),this},removeHint:function(t){return T.call(this,t),this},showHintDialog:function(t){return A.call(this,t),this}},P},t.exports=n(),t.exports.introJs=function(){return console.warn('Deprecated: please use require("intro.js") directly, instead of the introJs method of the function'),n().apply(this,arguments)}},function(t,e){
62
  /*!
63
  Chosen, a Select Box Enhancer for jQuery and Prototype
64
  by Patrick Filler for Harvest, http://getharvest.com
70
  MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
71
  This file is generated by `grunt build`, do not edit it by hand.
72
  */
73
+ (function(){var t,e,i,n,o=function(t,e){return function(){return t.apply(e,arguments)}},s={}.hasOwnProperty;(n=function(){function t(){this.options_index=0,this.parsed=[]}return t.prototype.add_node=function(t){return"OPTGROUP"===t.nodeName.toUpperCase()?this.add_group(t):this.add_option(t)},t.prototype.add_group=function(t){var e,i,n,o,s,r;for(e=this.parsed.length,this.parsed.push({array_index:e,group:!0,label:t.label,title:t.title?t.title:void 0,children:0,disabled:t.disabled,classes:t.className}),r=[],i=0,n=(s=t.childNodes).length;i<n;i++)o=s[i],r.push(this.add_option(o,e,t.disabled));return r},t.prototype.add_option=function(t,e,i){if("OPTION"===t.nodeName.toUpperCase())return""!==t.text?(null!=e&&(this.parsed[e].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:t.value,text:t.text,html:t.innerHTML,title:t.title?t.title:void 0,selected:t.selected,disabled:!0===i?i:t.disabled,group_array_index:e,group_label:null!=e?this.parsed[e].label:null,classes:t.className,style:t.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},t}()).select_to_array=function(t){var e,i,o,s,r;for(s=new n,i=0,o=(r=t.childNodes).length;i<o;i++)e=r[i],s.add_node(e);return s.parsed},e=function(){function t(e,i){this.form_field=e,this.options=null!=i?i:{},this.label_click_handler=o(this.label_click_handler,this),t.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return t.prototype.set_default_values=function(){var t;return this.click_test_action=(t=this,function(e){return t.test_active_click(e)}),this.activate_action=function(t){return function(e){return t.activate_field(e)}}(this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.is_rtl=this.options.rtl||/\bchosen-rtl\b/.test(this.form_field.className),this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY,this.case_sensitive_search=this.options.case_sensitive_search||!1,this.hide_results_on_select=null==this.options.hide_results_on_select||this.options.hide_results_on_select},t.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||t.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||t.default_single_text,this.default_text=this.escape_html(this.default_text),this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||t.default_no_result_text},t.prototype.choice_label=function(t){return this.include_group_label_in_selected&&null!=t.group_label?"<b class='group-name'>"+this.escape_html(t.group_label)+"</b>"+t.html:t.html},t.prototype.mouse_enter=function(){return this.mouse_on_container=!0},t.prototype.mouse_leave=function(){return this.mouse_on_container=!1},t.prototype.input_focus=function(t){if(this.is_multiple){if(!this.active_field)return setTimeout((e=this,function(){return e.container_mousedown()}),50)}else if(!this.active_field)return this.activate_field();var e},t.prototype.input_blur=function(t){if(!this.mouse_on_container)return this.active_field=!1,setTimeout((e=this,function(){return e.blur_test()}),100);var e},t.prototype.label_click_handler=function(t){return this.is_multiple?this.container_mousedown(t):this.activate_field()},t.prototype.results_option_build=function(t){var e,i,n,o,s,r,a;for(e="",a=0,o=0,s=(r=this.results_data).length;o<s&&(n="",""!==(n=(i=r[o]).group?this.result_add_group(i):this.result_add_option(i))&&(a++,e+=n),(null!=t?t.first:void 0)&&(i.selected&&this.is_multiple?this.choice_build(i):i.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(i))),!(a>=this.max_shown_results));o++);return e},t.prototype.result_add_option=function(t){var e,i;return t.search_match&&this.include_option_in_results(t)?(e=[],t.disabled||t.selected&&this.is_multiple||e.push("active-result"),!t.disabled||t.selected&&this.is_multiple||e.push("disabled-result"),t.selected&&e.push("result-selected"),null!=t.group_array_index&&e.push("group-option"),""!==t.classes&&e.push(t.classes),(i=document.createElement("li")).className=e.join(" "),t.style&&(i.style.cssText=t.style),i.setAttribute("data-option-array-index",t.array_index),i.innerHTML=t.highlighted_html||t.html,t.title&&(i.title=t.title),this.outerHTML(i)):""},t.prototype.result_add_group=function(t){var e,i;return(t.search_match||t.group_match)&&t.active_options>0?((e=[]).push("group-result"),t.classes&&e.push(t.classes),(i=document.createElement("li")).className=e.join(" "),i.innerHTML=t.highlighted_html||this.escape_html(t.label),t.title&&(i.title=t.title),this.outerHTML(i)):""},t.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},t.prototype.reset_single_select_options=function(){var t,e,i,n,o;for(o=[],t=0,e=(i=this.results_data).length;t<e;t++)(n=i[t]).selected?o.push(n.selected=!1):o.push(void 0);return o},t.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},t.prototype.results_search=function(t){return this.results_showing?this.winnow_results():this.results_show()},t.prototype.winnow_results=function(t){var e,i,n,o,s,r,a,l,u,c,d,p,h,m,b;for(this.no_results_clear(),c=0,e=(a=this.get_search_text()).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),u=this.get_search_regex(e),n=0,o=(l=this.results_data).length;n<o;n++)(s=l[n]).search_match=!1,d=null,p=null,s.highlighted_html="",this.include_option_in_results(s)&&(s.group&&(s.group_match=!1,s.active_options=0),null!=s.group_array_index&&this.results_data[s.group_array_index]&&(0===(d=this.results_data[s.group_array_index]).active_options&&d.search_match&&(c+=1),d.active_options+=1),b=s.group?s.label:s.text,s.group&&!this.group_search||(p=this.search_string_match(b,u),s.search_match=null!=p,s.search_match&&!s.group&&(c+=1),s.search_match?(a.length&&(h=p.index,r=b.slice(0,h),i=b.slice(h,h+a.length),m=b.slice(h+a.length),s.highlighted_html=this.escape_html(r)+"<em>"+this.escape_html(i)+"</em>"+this.escape_html(m)),null!=d&&(d.group_match=!0)):null!=s.group_array_index&&this.results_data[s.group_array_index].search_match&&(s.search_match=!0)));return this.result_clear_highlight(),c<1&&a.length?(this.update_results_content(""),this.no_results(a)):(this.update_results_content(this.results_option_build()),(null!=t?t.skip_highlight:void 0)?void 0:this.winnow_results_set_highlight())},t.prototype.get_search_regex=function(t){var e,i;return i=this.search_contains?t:"(^|\\s|\\b)"+t+"[^\\s]*",this.enable_split_word_search||this.search_contains||(i="^"+i),e=this.case_sensitive_search?"":"i",new RegExp(i,e)},t.prototype.search_string_match=function(t,e){var i;return i=e.exec(t),!this.search_contains&&(null!=i?i[1]:void 0)&&(i.index+=1),i},t.prototype.choices_count=function(){var t,e,i;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,t=0,e=(i=this.form_field.options).length;t<e;t++)i[t].selected&&(this.selected_option_count+=1);return this.selected_option_count},t.prototype.choices_click=function(t){if(t.preventDefault(),this.activate_field(),!this.results_showing&&!this.is_disabled)return this.results_show()},t.prototype.keydown_checker=function(t){var e,i;switch(i=null!=(e=t.which)?e:t.keyCode,this.search_field_scale(),8!==i&&this.pending_backstroke&&this.clear_backstroke(),i){case 8:this.backstroke_length=this.get_search_field_value().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(t),this.mouse_on_container=!1;break;case 13:case 27:this.results_showing&&t.preventDefault();break;case 32:this.disable_search&&t.preventDefault();break;case 38:t.preventDefault(),this.keyup_arrow();break;case 40:t.preventDefault(),this.keydown_arrow()}},t.prototype.keyup_checker=function(t){var e,i;switch(i=null!=(e=t.which)?e:t.keyCode,this.search_field_scale(),i){case 8:this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case 13:t.preventDefault(),this.results_showing&&this.result_select(t);break;case 27:this.results_showing&&this.results_hide();break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search()}},t.prototype.clipboard_event_checker=function(t){var e;if(!this.is_disabled)return setTimeout((e=this,function(){return e.results_search()}),50)},t.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},t.prototype.include_option_in_results=function(t){return!(this.is_multiple&&!this.display_selected_options&&t.selected)&&(!(!this.display_disabled_options&&t.disabled)&&!t.empty)},t.prototype.search_results_touchstart=function(t){return this.touch_started=!0,this.search_results_mouseover(t)},t.prototype.search_results_touchmove=function(t){return this.touch_started=!1,this.search_results_mouseout(t)},t.prototype.search_results_touchend=function(t){if(this.touch_started)return this.search_results_mouseup(t)},t.prototype.outerHTML=function(t){var e;return t.outerHTML?t.outerHTML:((e=document.createElement("div")).appendChild(t),e.innerHTML)},t.prototype.get_single_html=function(){return'<a class="chosen-single chosen-default">\n <span>'+this.default_text+'</span>\n <div><b></b></div>\n</a>\n<div class="chosen-drop">\n <div class="chosen-search">\n <input class="chosen-search-input" type="text" autocomplete="off" />\n </div>\n <ul class="chosen-results"></ul>\n</div>'},t.prototype.get_multi_html=function(){return'<ul class="chosen-choices">\n <li class="search-field">\n <input class="chosen-search-input" type="text" autocomplete="off" value="'+this.default_text+'" />\n </li>\n</ul>\n<div class="chosen-drop">\n <ul class="chosen-results"></ul>\n</div>'},t.prototype.get_no_results_html=function(t){return'<li class="no-results">\n '+this.results_none_found+" <span>"+this.escape_html(t)+"</span>\n</li>"},t.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent))},t.default_multiple_text="Select Some Options",t.default_single_text="Select an Option",t.default_no_result_text="No results match",t}(),(t=jQuery).fn.extend({chosen:function(n){return e.browser_is_supported()?this.each(function(e){var o,s;s=(o=t(this)).data("chosen"),"destroy"!==n?s instanceof i||o.data("chosen",new i(this,n)):s instanceof i&&s.destroy()}):this}}),i=function(i){function o(){return o.__super__.constructor.apply(this,arguments)}return function(t,e){for(var i in e)s.call(e,i)&&(t[i]=e[i]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(o,e),o.prototype.setup=function(){return this.form_field_jq=t(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex},o.prototype.set_up_html=function(){var e,i;return(e=["chosen-container"]).push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push("chosen-rtl"),i={class:e.join(" "),title:this.form_field.title},this.form_field.id.length&&(i.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=t("<div />",i),this.container.width(this.container_width()),this.is_multiple?this.container.html(this.get_multi_html()):this.container.html(this.get_single_html()),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},o.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},o.prototype.register_observers=function(){var t;return this.container.on("touchstart.chosen",(t=this,function(e){t.container_mousedown(e)})),this.container.on("touchend.chosen",function(t){return function(e){t.container_mouseup(e)}}(this)),this.container.on("mousedown.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.container.on("mouseup.chosen",function(t){return function(e){t.container_mouseup(e)}}(this)),this.container.on("mouseenter.chosen",function(t){return function(e){t.mouse_enter(e)}}(this)),this.container.on("mouseleave.chosen",function(t){return function(e){t.mouse_leave(e)}}(this)),this.search_results.on("mouseup.chosen",function(t){return function(e){t.search_results_mouseup(e)}}(this)),this.search_results.on("mouseover.chosen",function(t){return function(e){t.search_results_mouseover(e)}}(this)),this.search_results.on("mouseout.chosen",function(t){return function(e){t.search_results_mouseout(e)}}(this)),this.search_results.on("mousewheel.chosen DOMMouseScroll.chosen",function(t){return function(e){t.search_results_mousewheel(e)}}(this)),this.search_results.on("touchstart.chosen",function(t){return function(e){t.search_results_touchstart(e)}}(this)),this.search_results.on("touchmove.chosen",function(t){return function(e){t.search_results_touchmove(e)}}(this)),this.search_results.on("touchend.chosen",function(t){return function(e){t.search_results_touchend(e)}}(this)),this.form_field_jq.on("chosen:updated.chosen",function(t){return function(e){t.results_update_field(e)}}(this)),this.form_field_jq.on("chosen:activate.chosen",function(t){return function(e){t.activate_field(e)}}(this)),this.form_field_jq.on("chosen:open.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.form_field_jq.on("chosen:close.chosen",function(t){return function(e){t.close_field(e)}}(this)),this.search_field.on("blur.chosen",function(t){return function(e){t.input_blur(e)}}(this)),this.search_field.on("keyup.chosen",function(t){return function(e){t.keyup_checker(e)}}(this)),this.search_field.on("keydown.chosen",function(t){return function(e){t.keydown_checker(e)}}(this)),this.search_field.on("focus.chosen",function(t){return function(e){t.input_focus(e)}}(this)),this.search_field.on("cut.chosen",function(t){return function(e){t.clipboard_event_checker(e)}}(this)),this.search_field.on("paste.chosen",function(t){return function(e){t.clipboard_event_checker(e)}}(this)),this.is_multiple?this.search_choices.on("click.chosen",function(t){return function(e){t.choices_click(e)}}(this)):this.container.on("click.chosen",function(t){t.preventDefault()})},o.prototype.destroy=function(){return t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.form_field_label.length>0&&this.form_field_label.off("click.chosen"),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},o.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field.disabled||this.form_field_jq.parents("fieldset").is(":disabled"),this.container.toggleClass("chosen-disabled",this.is_disabled),this.search_field[0].disabled=this.is_disabled,this.is_multiple||this.selected_item.off("focus.chosen",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void 0:this.selected_item.on("focus.chosen",this.activate_field)},o.prototype.container_mousedown=function(e){var i;if(!this.is_disabled)return!e||"mousedown"!==(i=e.type)&&"touchstart"!==i||this.results_showing||e.preventDefault(),null!=e&&t(e.target).hasClass("search-choice-close")?void 0:(this.active_field?this.is_multiple||!e||t(e.target)[0]!==this.selected_item[0]&&!t(e.target).parents("a.chosen-single").length||(e.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),t(this.container[0].ownerDocument).on("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},o.prototype.container_mouseup=function(t){if("ABBR"===t.target.nodeName&&!this.is_disabled)return this.results_reset(t)},o.prototype.search_results_mousewheel=function(t){var e;if(t.originalEvent&&(e=t.originalEvent.deltaY||-t.originalEvent.wheelDelta||t.originalEvent.detail),null!=e)return t.preventDefault(),"DOMMouseScroll"===t.type&&(e*=40),this.search_results.scrollTop(e+this.search_results.scrollTop())},o.prototype.blur_test=function(t){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},o.prototype.close_field=function(){return t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale(),this.search_field.blur()},o.prototype.activate_field=function(){if(!this.is_disabled)return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},o.prototype.test_active_click=function(e){var i;return(i=t(e.target).closest(".chosen-container")).length&&this.container[0]===i[0]?this.active_field=!0:this.close_field()},o.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=n.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},o.prototype.result_do_highlight=function(t){var e,i,n,o,s;if(t.length){if(this.result_clear_highlight(),this.result_highlight=t,this.result_highlight.addClass("highlighted"),o=(n=parseInt(this.search_results.css("maxHeight"),10))+(s=this.search_results.scrollTop()),(e=(i=this.result_highlight.position().top+this.search_results.scrollTop())+this.result_highlight.outerHeight())>=o)return this.search_results.scrollTop(e-n>0?e-n:0);if(i<s)return this.search_results.scrollTop(i)}},o.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},o.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.get_search_field_value()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},o.prototype.update_results_content=function(t){return this.search_results.html(t)},o.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},o.prototype.set_tab_index=function(t){var e;if(this.form_field.tabIndex)return e=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=e},o.prototype.set_label_behavior=function(){if(this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=t("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0)return this.form_field_label.on("click.chosen",this.label_click_handler)},o.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},o.prototype.search_results_mouseup=function(e){var i;if((i=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first()).length)return this.result_highlight=i,this.result_select(e),this.search_field.focus()},o.prototype.search_results_mouseover=function(e){var i;if(i=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first())return this.result_do_highlight(i)},o.prototype.search_results_mouseout=function(e){if(t(e.target).hasClass("active-result")||t(e.target).parents(".active-result").first())return this.result_clear_highlight()},o.prototype.choice_build=function(e){var i,n,o;return i=t("<li />",{class:"search-choice"}).html("<span>"+this.choice_label(e)+"</span>"),e.disabled?i.addClass("search-choice-disabled"):((n=t("<a />",{class:"search-choice-close","data-option-array-index":e.array_index})).on("click.chosen",(o=this,function(t){return o.choice_destroy_link_click(t)})),i.append(n)),this.search_container.before(i)},o.prototype.choice_destroy_link_click=function(e){if(e.preventDefault(),e.stopPropagation(),!this.is_disabled)return this.choice_destroy(t(e.target))},o.prototype.choice_destroy=function(t){if(this.result_deselect(t[0].getAttribute("data-option-array-index")))return this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.get_search_field_value().length<1&&this.results_hide(),t.parents("li").first().remove(),this.search_field_scale()},o.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return this.results_hide()},o.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},o.prototype.result_select=function(t){var e,i;if(this.result_highlight)return e=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?e.removeClass("active-result"):this.reset_single_select_options(),e.addClass("result-selected"),(i=this.results_data[e[0].getAttribute("data-option-array-index")]).selected=!0,this.form_field.options[i.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(i):this.single_set_selected_text(this.choice_label(i)),this.is_multiple&&(!this.hide_results_on_select||t.metaKey||t.ctrlKey)?t.metaKey||t.ctrlKey?this.winnow_results({skip_highlight:!0}):(this.search_field.val(""),this.winnow_results()):(this.results_hide(),this.show_search_field_default()),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.trigger_form_field_change({selected:this.form_field.options[i.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,t.preventDefault(),this.search_field_scale())},o.prototype.single_set_selected_text=function(t){return null==t&&(t=this.default_text),t===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(t)},o.prototype.result_deselect=function(t){var e;return e=this.results_data[t],!this.form_field.options[e.options_index].disabled&&(e.selected=!1,this.form_field.options[e.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change({deselected:this.form_field.options[e.options_index].value}),this.search_field_scale(),!0)},o.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")},o.prototype.get_search_field_value=function(){return this.search_field.val()},o.prototype.get_search_text=function(){return t.trim(this.get_search_field_value())},o.prototype.escape_html=function(e){return t("<div/>").text(e).html()},o.prototype.winnow_results_set_highlight=function(){var t,e;if(null!=(t=(e=this.is_multiple?[]:this.search_results.find(".result-selected.active-result")).length?e.first():this.search_results.find(".active-result").first()))return this.result_do_highlight(t)},o.prototype.no_results=function(t){var e;return e=this.get_no_results_html(t),this.search_results.append(e),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},o.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},o.prototype.keydown_arrow=function(){var t;return this.results_showing&&this.result_highlight?(t=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(t):void 0:this.results_show()},o.prototype.keyup_arrow=function(){var t;return this.results_showing||this.is_multiple?this.result_highlight?(t=this.result_highlight.prevAll("li.active-result")).length?this.result_do_highlight(t.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight()):void 0:this.results_show()},o.prototype.keydown_backstroke=function(){var t;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(t=this.search_container.siblings("li.search-choice").last()).length&&!t.hasClass("search-choice-disabled")?(this.pending_backstroke=t,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0},o.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},o.prototype.search_field_scale=function(){var e,i,n,o,s,r,a;if(this.is_multiple){for(s={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},i=0,n=(r=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"]).length;i<n;i++)s[o=r[i]]=this.search_field.css(o);return(e=t("<div />").css(s)).text(this.get_search_field_value()),t("body").append(e),a=e.width()+25,e.remove(),this.container.is(":visible")&&(a=Math.min(this.container.outerWidth()-10,a)),this.search_field.width(a)}},o.prototype.trigger_form_field_change=function(t){return this.form_field_jq.trigger("input",t),this.form_field_jq.trigger("change",t)},o}()}).call(this)},,,function(t,e,i){"use strict";i.r(e);i(18);var n=class{startDebugging(){this.debugging=!0,this.log({data:"Buttonizer is debugging!",style:"font-size: 30px; color: #FF0000;"})}welcomeToTheConsole(){this.debugging=!0,this.log({data:"Welcome to Buttonizer. Please do not continue without any knowledge.",style:"font-size: 30px; color: #FF0000;"}),this.log({data:"You can find errors down here. If there is any error that is related to Buttonizer you can contact us at contact@buttonizer.pro",style:"font-size: 18px; color: #FF0000;"}),this.log({data:"Check https://community.buttonizer.pro",style:"font-size: 18px; color: #FF0000;"}),this.log({data:" ",style:"font-size: 18px; color: #FF0000;"}),this.log({data:" ",style:"font-size: 18px; color: #FF0000;"}),this.log({data:"----- Logs: -----",style:"font-size: 18px; color: #FF0000;"}),this.debugging=!1}log(t){this.debugging&&t.data&&(t.color&&(t.style=""),t.color||t.style?console.log("%c "+t.data,t.style):console.log(t.data))}warning(t){this.debugging&&console.warn(t)}warn(t){this.debugging&&console.warn(t)}error(t){console.error(t)}};var o=class{constructor(t,e){this.data=t,this.modal=e,this.validate()}validate(){void 0===this.data.onClick&&(this.data.onClick=function(){}),void 0===this.data.text&&(this.data.text="Button"),void 0===this.data.confirm&&(this.data.confirm=!1),void 0===this.data.focus&&(this.data.focus=!1)}render(){let t=document.createElement("a");return t.href="javascript:void(0)",t.innerHTML=this.data.text,t.className="button",t.style.marginLeft="5px",this.data.confirm&&(t.className+=" button-primary"),t.addEventListener("click",()=>{this.data.close&&this.modal.closeDialog(),this.data.confirm&&this.modal.confirmDialog(),this.data.cancel&&this.modal.cancelDialog(),this.data.onClick()}),setTimeout(()=>{this.data.focus&&t.focus()},50),t}};var s=class{constructor(t){this.data=t,this.element=HTMLElement,"function"==typeof this.data.onConfirm?this.onConfirm=this.data.onConfirm:this.onConfirm=function(){},"function"==typeof this.data.onCancel?this.onCancel=this.data.onCancel:this.onCancel=function(){},"function"==typeof this.data.onClose?this.onClose=this.data.onClose:this.onClose=function(){},void 0===this.data.class?this.class="":this.class=this.data.class,void 0!==this.data.video&&(this.class+=" has-video"),this.render()}render(){this.element=document.createElement("div"),this.element.classList="fs-modal active"+(""!==this.class?" "+this.class:"");let t=document.createElement("div");t.classList="fs-modal-dialog",t.appendChild(this.modalHeader()),t.appendChild(this.modalBody()),void 0!==this.data.video&&t.appendChild(this.clearBoth()),t.appendChild(this.modalFooter()),this.element.appendChild(t),document.body.appendChild(this.element)}modalHeader(){let t=document.createElement("div");t.classList="fs-modal-header";let e=document.createElement("h4");e.innerHTML=this.data.title,t.appendChild(e);let i=document.createElement("a");return i.className="fs-close",i.href="javascript:void(0)",i.innerHTML='<i class="dashicons dashicons-no" title="'+window.Buttonizer.translate("modal.dismiss")+'"></i>',i.addEventListener("click",()=>{this.closeDialog()}),t.appendChild(i),t}modalBody(){let t=document.createElement("div"),e=document.createElement("div");e.className="fs-modal-body fs-modal-body-text";let i=document.createElement("div");return i.className="fs-modal-panel active","object"==typeof this.data.content?i.appendChild(this.data.content):i.innerHTML=this.data.content,e.appendChild(i),void 0!==this.data.video?(t.appendChild(e),t.appendChild(this.video()),t):e}modalFooter(){let t=document.createElement("div");return t.className="fs-modal-footer",this.data.buttons&&t.appendChild(this.renderButtons()),t}renderButtons(){let t=document.createElement("div");for(var e=0;e<this.data.buttons.length;e++){let i=new o(this.data.buttons[e],this);t.appendChild(i.render())}return t}cancelDialog(){this.onCancel(),this.closeDialog()}confirmDialog(){this.onConfirm(),this.closeDialog()}closeDialog(){this.onClose(),this.element.remove()}video(){let t=document.createElement("div");t.className="fs-modal-body fs-modal-video";let e=document.createElement("div");e.className="fs-modal-panel active";let i=document.createElement("iframe");return i.width="100%",i.style.maxWidth="560px",i.height="315",i.src=`https://www.youtube.com/embed/${this.data.video}?&autoplay=1`,i.frameBorder="0",i.allow="accelerometer",i.setAttribute("autoplay",""),i.setAttribute("encrypted-media",""),i.setAttribute("gyroscope",""),i.setAttribute("picture-in-picture",""),i.setAttribute("allowfullscreen",""),e.appendChild(i),t.appendChild(e),t}clearBoth(){let t=document.createElement("div");return t.style.clear="both",t}};class r{constructor(t){this.table=document.createElement("table"),this.table.width="100%",""!==t&&(this.table.className=t),this.currentRow=document.createElement("tr")}newRow(){return this.table.appendChild(this.currentRow),this.currentRow=document.createElement("tr"),this}addColumn(t,e,i){let n=document.createElement("td");return n.appendChild(t),"undefined"!==e&&(n.className=e),"undefined"!==i&&(n.width=i),this.currentRow.appendChild(n),this}addColumnText(t,e,i){let n=document.createElement("td");return n.innerText=t,"undefined"!==e&&(n.className=""+e),"undefined"!==i&&(n.width=i),this.currentRow.appendChild(n),this}addColumnHTML(t,e,i){let n=document.createElement("td");return n.innerHTML=t,"undefined"!==e&&(n.className=e),"undefined"!==i&&(n.width=i),this.currentRow.appendChild(n),this}build(){return this.table.appendChild(this.currentRow),this.table}}class a{constructor(t){this.windowObject=t,this.onTriggerContainer=null,this.dropdown=document.createElement("select"),this.dropdown.className="window-select"}build(){let t=document.createElement("div");t.appendChild(this.dropdown),this.onChange();let e=new r("table-relative");return e.addColumnHTML("<h2>"+window.Buttonizer.translate("page_rules.single_name")+(window.Buttonizer.hasPremium()?"":' <span class="buttonizer-premium premium-right">PRO</span>')+"</h2>","table-align-top",""),e.addColumn(t,"","370"),e.newRow(),e.build()}onChange(){this.dropdown.innerHTML="<option>"+window.Buttonizer.translate("page_rules.input_any_page")+"</option>",this.dropdown.readonly=!0,this.dropdown.addEventListener("click",()=>window.Buttonizer.showPremiumPopup(window.Buttonizer.translate("page_rules.pro_description"),"SQnAhyBWLWg"))}}class l{constructor(t){this.windowObject=t,this.onTriggerContainer=null,this.dropdown=document.createElement("select"),this.dropdown.className="window-select"}build(){let t=document.createElement("div");t.appendChild(this.dropdown),this.onChange();let e=new r("table-relative");return e.addColumnHTML("<h2>"+window.Buttonizer.translate("time_schedules.single_name")+(window.Buttonizer.hasPremium()?"":' <span class="buttonizer-premium premium-right">PRO</span>')+"</h2>","table-align-top",""),e.addColumn(t,"","370"),e.newRow(),e.build()}onChange(){this.dropdown.innerHTML="<option>Show on all times</option>",this.dropdown.readonly=!0,this.dropdown.addEventListener("click",()=>window.Buttonizer.showPremiumPopup(window.Buttonizer.translate("time_schedules.pro_description"),"C-B9ITdY6A4"))}}class u{constructor(t){this.windowObject=t}build(){let t=this.buildElements();return window.Buttonizer.hasPremium()||t.addEventListener("click",()=>{window.Buttonizer.showPremiumPopup("With this setting, you can make your button appear/hide after certain amount of time.","V4lvZ15ULWw")}),t}buildElements(){let t=document.createElement("input");t.type="checkbox",t.className="buttonizer-timeout-checkbox",t.checked=void 0!==this.windowObject.objectOwner.data.advanced_timeout&&!isNaN(this.windowObject.objectOwner.data.advanced_timeout)&&this.windowObject.objectOwner.data.advanced_timeout>0;let e=document.createElement("input");e.type="number",e.value=void 0===this.windowObject.objectOwner.data.advanced_timeout?"":this.windowObject.objectOwner.data.advanced_timeout,e.className="window-select",e.placeholder="miliseconds";let i=document.createElement("div");i.innerHTML=` Show Buttonizer after <b>${e.value/1e3}</b> seconds`,window.Buttonizer.hasPremium()||(t.setAttribute("disabled",""),e.setAttribute("readonly",""),e.value="",e.style.opacity="0.5",i.style.opacity="0.5");let n=new r("table-relative");return n.addColumnHTML("<h2>Timeout</h2>"+(window.Buttonizer.hasPremium()?"":'<span class="buttonizer-premium premium-right">PRO</span>')),n.addColumn(t,"","10"),n.addColumn(e,"","360"),n.newRow(),n.addColumnText(""),n.addColumnText(""),n.addColumn(i),n.build()}}class c{constructor(t){this.windowObject=t,this.checkbox,this.input,this.toggle,this.hide,this.toggleHide,this.select,this.info}build(){let t=this.elements().build();return window.Buttonizer.hasPremium()||t.addEventListener("click",()=>{window.Buttonizer.showPremiumPopup("With this setting, you can make your button appear/hide after scrolling for a certain amount.","hh5LBF4C1pg")}),t}elements(){this.checkbox=document.createElement("input"),this.checkbox.type="checkbox",this.checkbox.className="buttonizer-scroll-checkbox",this.input=document.createElement("input"),this.input.type="number",this.input.className="window-select",this.input.placeholder="0",this.toggle=document.createElement("input"),this.toggle.type="checkbox",this.toggle.className="buttonizer-switch",this.toggle.style.display="inline-block",this.hide=document.createElement("div"),this.hide.style.display="inline-block",window.Buttonizer.hasPremium()||(this.hide.innerHTML="Starting visibility: <b>Show</b>"),this.toggleHide=document.createElement("div"),this.toggleHide.appendChild(this.toggle),this.toggleHide.appendChild(this.hide),this.select=document.createElement("select");let t=document.createElement("option");t.value="px",t.innerHTML="px";let e=document.createElement("option");e.value="%",e.innerHTML="%",this.select.classList="window-select",this.select.appendChild(e),this.select.appendChild(t),this.info=document.createElement("div"),this.info.innerHTML=` Scroll <b>${this.input.value<=0?"0":this.input.value} ${this.select.value}</b> from top of page to <b>${"true"==this.windowObject.objectOwner.data.advanced_scroll_hide?"hide":"show"}</b> Buttonizer`,window.Buttonizer.hasPremium()||(this.checkbox.setAttribute("disabled",""),this.input.setAttribute("readonly",""),this.toggle.setAttribute("disabled",""),this.select.setAttribute("disabled",""),this.input.value="",this.input.style.opacity="0.5",this.select.style.opacity="0.5",this.info.style.opacity="0.5",this.toggleHide.style.opacity="0.5");let i=new r("table-relative");return i.addColumnHTML("<h2>Scroll</h2>"+(window.Buttonizer.hasPremium()?"":'<span class="buttonizer-premium premium-right">PRO</span>')),i.addColumn(this.checkbox,"","10"),i.addColumn(this.input,"","284"),i.addColumn(this.select,"","70"),i.newRow(),i.addColumnText(""),i.addColumnText(""),i.addColumn(this.toggleHide),i.newRow(),i.addColumnText(""),i.addColumnText(""),i.addColumn(this.info),i}}class d{constructor(t,e){this.window=HTMLElement,this.body=HTMLElement,this.footer=HTMLElement,this.background=document.createElement("div"),this.background.className="background",this.background.addEventListener("click",()=>{this.hide()}),this.title=document.createElement("div"),this.title.innerHTML=e,this.settings={},this.objectOwner=t,this.menuItems=[],this.buttonFilter=document.createElement("div"),this.build()}header(){let t=document.createElement("div");t.className="header";let e=document.createElement("a");e.className="close-btn",e.href="javascript:void(0)";let i=document.createElement("i");return i.className="fa fa-times",e.appendChild(i),e.addEventListener("click",()=>{this.hide()}),t.appendChild(e),t.appendChild(this.title),t}createBody(){let t=document.createElement("div"),e=document.createElement("div");return e.className="window-menu",this.bodyMenu=e,this.body=document.createElement("div"),this.body.className="window-body",t.appendChild(this.bodyMenu),t.appendChild(this.body),t}build(){let t=document.createElement("div");t.className="buttonizer-settings-window",t.style.display="none",t.style.top="500px",t.appendChild(this.header()),t.appendChild(this.createBody()),t.appendChild(this.background),this.window=t,document.body.appendChild(this.window),jQuery(this.window).draggable({handle:".header",containment:"body",start:()=>this.topMeUp()}),this.window.addEventListener("click",()=>this.topMeUp()),this.afterBuild(),this.render()}addItem(t,e){let i=document.createElement("a");i.href="javascript:void(0)",i.innerHTML=t;let n=document.createElement("div");n.className="body-inner animated pulse",this.menuItems.length>=1&&(n.style.display="none"),n.appendChild(e),i.addEventListener("click",()=>{this.openMenuItem(t)}),0===this.menuItems.length&&i.classList.add("selected"),this.menuItems.push({unique:t,menu:i,body:n}),this.bodyMenu.appendChild(i),this.body.appendChild(n)}openMenuItem(t){for(let e=0;e<this.menuItems.length;e++)this.menuItems[e].unique===t?(this.menuItems[e].menu.classList.add("selected"),this.menuItems[e].body.style.display="block"):(this.menuItems[e].menu.classList.remove("selected"),this.menuItems[e].body.style.display="none")}show(){this.window.style.display="block"}hide(){this.window.style.display="none"}toggle(){"block"===this.window.style.display?this.hide():this.show()}topMeUp(){Buttonizer.windowsZindex!==this.window.style.zIndex&&(Buttonizer.windowsZindex++,this.window.style.zIndex=Buttonizer.windowsZindex)}render(){}afterBuild(){}}class p{constructor(t){this.windowObject=t}build(){let t=document.createElement("input");t.className="window-select",t.placeholder=window.Buttonizer.translate("settings.custom_id.placeholder");let e=new r("table-relative");return e.addColumnHTML("<h2>"+window.Buttonizer.translate("settings.custom_id.title")+" <span class='buttonizer-premium premium-right'>PRO</span></h2>"),t.addEventListener("mousedown",()=>window.Buttonizer.showPremiumPopup(window.Buttonizer.translate("settings.custom_id.pro_description"))),e.addColumn(t,"","370"),e.build()}}class h{constructor(t){this.windowObject=t}build(){let t=document.createElement("input");t.className="window-select",t.placeholder=window.Buttonizer.translate("settings.custom_class.placeholder");let e=new r("table-relative");return e.addColumnHTML("<h2>"+window.Buttonizer.translate("settings.custom_class.title")+" <span class='buttonizer-premium premium-right'>PRO</span></h2>","table-align-top",""),t.addEventListener("mousedown",()=>window.Buttonizer.showPremiumPopup(window.Buttonizer.translate("settings.custom_class.pro_description"))),e.addColumn(t,"","370"),e.build()}}class m extends d{constructor(t){super(t,window.Buttonizer.translate("utils.advanced_settings")+" - "+t.data.name+(window.Buttonizer.hasPremium()?"":" (premium)"))}render(){this.filter(),this.styling(),this.delay()}filter(){let t=document.createElement("div");this.pageRuleSelect=new a(this),this.timeSchedule=new l(this),t.appendChild(this.timeSchedule.build()),t.appendChild(this.pageRuleSelect.build()),super.addItem(window.Buttonizer.translate("settings.button_group_window.filters"),t)}styling(){let t=document.createElement("div");t.appendChild(new h(this).build()),t.appendChild(new p(this).build()),super.addItem(window.Buttonizer.translate("settings.button_group_window.styling"),t)}delay(){let t=document.createElement("div");t.appendChild(new u(this.objectOwner.groupObject.windowObject).build()),t.appendChild(new c(this.objectOwner.groupObject.windowObject).build()),this.addItem("Timeout & Scroll",t),this.menuItems.forEach(t=>{"Timeout & Scroll"===t.unique&&(t.menu.style.display="none")})}}var b=i(4);
74
  /**!
75
  * tippy.js v4.3.0
76
  * (c) 2017-2019 atomiks
77
  * MIT License
78
+ */function f(){return(f=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}var w="undefined"!=typeof window&&"undefined"!=typeof document,g=w?navigator.userAgent:"",y=/MSIE |Trident\//.test(g),v=/UCBrowser\//.test(g),_=w&&/iPhone|iPad|iPod/.test(navigator.platform)&&!window.MSStream,k={a11y:!0,allowHTML:!0,animateFill:!0,animation:"shift-away",appendTo:function(){return document.body},aria:"describedby",arrow:!1,arrowType:"sharp",boundary:"scrollParent",content:"",delay:0,distance:10,duration:[325,275],flip:!0,flipBehavior:"flip",flipOnUpdate:!1,followCursor:!1,hideOnClick:!0,ignoreAttributes:!1,inertia:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,lazy:!0,maxWidth:350,multiple:!1,offset:0,onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},placement:"top",popperOptions:{},role:"tooltip",showOnInit:!1,size:"regular",sticky:!1,target:"",theme:"dark",touch:!0,touchHold:!1,trigger:"mouseenter focus",triggerTarget:null,updateDuration:0,wait:null,zIndex:9999},x=["arrow","arrowType","boundary","distance","flip","flipBehavior","flipOnUpdate","offset","placement","popperOptions"],B=w?Element.prototype:{},E=B.matches||B.matchesSelector||B.webkitMatchesSelector||B.mozMatchesSelector||B.msMatchesSelector;function z(t){return[].slice.call(t)}function C(t,e){return j(t,function(t){return E.call(t,e)})}function j(t,e){for(;t;){if(e(t))return t;t=t.parentElement}return null}var S={passive:!0},O=4,L="x-placement",T="x-out-of-boundaries",N="tippy-iOS",A="tippy-active",I=".tippy-popper",M=".tippy-tooltip",H=".tippy-content",q=".tippy-backdrop",P=".tippy-arrow",D=".tippy-roundarrow",F=Object.keys(k);function R(t,e){return{}.hasOwnProperty.call(t,e)}function W(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?i:n}return t}function U(t,e){var i;return function(){var n=this,o=arguments;clearTimeout(i),i=setTimeout(function(){return t.apply(n,o)},e)}}function G(t,e){return t&&t.modifiers&&t.modifiers[e]}function Q(t,e){return t.indexOf(e)>-1}function $(t){return t instanceof Element}function Y(t){return!(!t||!R(t,"isVirtual"))||$(t)}function V(t,e){return"function"==typeof t?t.apply(null,e):t}function X(t,e){t.filter(function(t){return"flip"===t.name})[0].enabled=e}function K(){return document.createElement("div")}function J(t,e){t.forEach(function(t){t&&(t.style.transitionDuration="".concat(e,"ms"))})}function Z(t,e){t.forEach(function(t){t&&t.setAttribute("data-state",e)})}function tt(t,e){var i=f({},e,{content:V(e.content,[t])},e.ignoreAttributes?{}:function(t){return F.reduce(function(e,i){var n=(t.getAttribute("data-tippy-".concat(i))||"").trim();if(!n)return e;if("content"===i)e[i]=n;else try{e[i]=JSON.parse(n)}catch(t){e[i]=n}return e},{})}(t));return(i.arrow||v)&&(i.animateFill=!1),i}function et(t,e){Object.keys(t).forEach(function(t){if(!R(e,t))throw new Error("[tippy]: `".concat(t,"` is not a valid option"))})}function it(t,e){t.innerHTML=e instanceof Element?e.innerHTML:e}function nt(t,e){if(e.content instanceof Element)it(t,""),t.appendChild(e.content);else if("function"!=typeof e.content){t[e.allowHTML?"innerHTML":"textContent"]=e.content}}function ot(t){return{tooltip:t.querySelector(M),backdrop:t.querySelector(q),content:t.querySelector(H),arrow:t.querySelector(P)||t.querySelector(D)}}function st(t){t.setAttribute("data-inertia","")}function rt(t){var e=K();return"round"===t?(e.className="tippy-roundarrow",it(e,'<svg viewBox="0 0 18 7" xmlns="http://www.w3.org/2000/svg"><path d="M0 7s2.021-.015 5.253-4.218C6.584 1.051 7.797.007 9 0c1.203-.007 2.416 1.035 3.761 2.782C16.012 7.005 18 7 18 7H0z"/></svg>')):e.className="tippy-arrow",e}function at(){var t=K();return t.className="tippy-backdrop",t.setAttribute("data-state","hidden"),t}function lt(t,e){t.setAttribute("tabindex","-1"),e.setAttribute("data-interactive","")}function ut(t,e,i){var n=v&&void 0!==document.body.style.webkitTransition?"webkitTransitionEnd":"transitionend";t[e+"EventListener"](n,i)}function ct(t){var e=t.getAttribute(L);return e?e.split("-")[0]:""}function dt(t,e,i){i.split(" ").forEach(function(i){t.classList[e](i+"-theme")})}function pt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.checkHideOnClick,i=t.exclude,n=t.duration;z(document.querySelectorAll(I)).forEach(function(t){var o,s=t._tippy;if(s){var r=!e||!0===s.props.hideOnClick,a=!1;i&&(a=(o=i)._tippy&&!E.call(o,I)?s.reference===i:t===i.popper),r&&!a&&s.hide(n)}})}var ht=!1;function mt(){ht||(ht=!0,_&&document.body.classList.add(N),window.performance&&document.addEventListener("mousemove",ft))}var bt=0;function ft(){var t=performance.now();t-bt<20&&(ht=!1,document.removeEventListener("mousemove",ft),_||document.body.classList.remove(N)),bt=t}function wt(t){if(!(t.target instanceof Element))return pt();var e=C(t.target,I);if(!(e&&e._tippy&&e._tippy.props.interactive)){var i=j(t.target,function(t){return t._tippy&&t._tippy.reference===t});if(i){var n=i._tippy;if(n){var o=Q(n.props.trigger||"","click");if(ht||o)return pt({exclude:i,checkHideOnClick:!0});if(!0!==n.props.hideOnClick||o)return;n.clearDelayTimeouts()}}pt({checkHideOnClick:!0})}}function gt(){var t=document.activeElement;t&&t.blur&&t._tippy&&t.blur()}var yt=1;function vt(t,e){var i,n,o,s,r,a=tt(t,e);if(!a.multiple&&t._tippy)return null;var l,u,c,d,p,h,m=!1,w=!1,g=!1,v=[],_=a.interactiveDebounce>0?U(_t,a.interactiveDebounce):_t,B=yt++,N=function(t,e){var i=K();i.className="tippy-popper",i.id="tippy-".concat(t),i.style.zIndex=""+e.zIndex,e.role&&i.setAttribute("role",e.role);var n=K();n.className="tippy-tooltip",n.style.maxWidth=e.maxWidth+("number"==typeof e.maxWidth?"px":""),n.setAttribute("data-size",e.size),n.setAttribute("data-animation",e.animation),n.setAttribute("data-state","hidden"),dt(n,"add",e.theme);var o=K();return o.className="tippy-content",o.setAttribute("data-state","hidden"),e.interactive&&lt(i,n),e.arrow&&n.appendChild(rt(e.arrowType)),e.animateFill&&(n.appendChild(at()),n.setAttribute("data-animatefill","")),e.inertia&&st(n),nt(o,e),n.appendChild(o),i.appendChild(n),i}(B,a),M=ot(N),H={id:B,reference:t,popper:N,popperChildren:M,popperInstance:null,props:a,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},clearDelayTimeouts:Lt,set:Tt,setContent:function(t){Tt({content:t})},show:Nt,hide:At,enable:function(){H.state.isEnabled=!0},disable:function(){H.state.isEnabled=!1},destroy:function(e){if(H.state.isDestroyed)return;H.state.isMounted&&At(0);bt(),delete t._tippy,delete D()._tippy;var i=H.props.target;i&&e&&$(t)&&z(t.querySelectorAll(i)).forEach(function(t){t._tippy&&t._tippy.destroy()});H.popperInstance&&H.popperInstance.destroy();H.state.isDestroyed=!0}};return t._tippy=H,N._tippy=H,D()._tippy=H,mt(),a.lazy||jt(),a.showOnInit&&St(),a.a11y&&!a.target&&((h=t)instanceof Element&&(!E.call(h,"a[href],area[href],button,details,input,textarea,select,iframe,[tabindex]")||h.hasAttribute("disabled")))&&D().setAttribute("tabindex","0"),N.addEventListener("mouseenter",function(t){H.props.interactive&&H.state.isVisible&&"mouseenter"===i&&St(t,!0)}),N.addEventListener("mouseleave",function(){H.props.interactive&&"mouseenter"===i&&document.addEventListener("mousemove",_)}),H;function q(){document.removeEventListener("mousemove",wt)}function P(){document.body.removeEventListener("mouseleave",Ot),document.removeEventListener("mousemove",_)}function D(){return H.props.triggerTarget||t}function F(){return[H.popperChildren.tooltip,H.popperChildren.backdrop,H.popperChildren.content]}function Y(){return H.props.followCursor&&!ht&&"focus"!==i}function it(t,e){var i=H.popperChildren.tooltip;function n(t){t.target===i&&(ut(i,"remove",n),e())}if(0===t)return e();ut(i,"remove",d),ut(i,"add",n),d=n}function pt(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];D().addEventListener(t,e,i),v.push({eventType:t,handler:e,options:i})}function mt(){H.props.touchHold&&!H.props.target&&(pt("touchstart",gt,S),pt("touchend",kt,S)),H.props.trigger.trim().split(" ").forEach(function(t){if("manual"!==t)if(H.props.target)switch(t){case"mouseenter":pt("mouseover",Bt),pt("mouseout",Et);break;case"focus":pt("focusin",Bt),pt("focusout",Et);break;case"click":pt(t,Bt)}else switch(pt(t,gt),t){case"mouseenter":pt("mouseleave",kt);break;case"focus":pt(y?"focusout":"blur",xt)}})}function bt(){v.forEach(function(t){var e=t.eventType,i=t.handler,n=t.options;D().removeEventListener(e,i,n)}),v=[]}function ft(t){return H.props.arrow?p[t]+("round"===H.props.arrowType?18:16):p[t]}function wt(e){var i=n=e,o=i.clientX,s=i.clientY;if(p){var r=t.getBoundingClientRect(),a=H.props.followCursor,l="horizontal"===a,u="vertical"===a,c=ct(N),d=Q(["top","bottom"],c),h=Q(["left","right"],c),m=f({},p);d&&(m.left=ft("left"),m.right=ft("right")),h&&(m.top=ft("top"),m.bottom=ft("bottom"));var b=d?Math.max(m.left,o):o,w=h?Math.max(m.top,s):s;d&&b>m.right&&(b=Math.min(o,window.innerWidth-m.right)),h&&w>m.bottom&&(w=Math.min(s,window.innerHeight-m.bottom)),!j(e.target,function(e){return e===t})&&H.props.interactive||(H.popperInstance.reference=f({},H.popperInstance.reference,{getBoundingClientRect:function(){return{width:0,height:0,top:l?r.top:w,bottom:l?r.bottom:w,left:u?r.left:b,right:u?r.right:b}},clientWidth:0,clientHeight:0}),H.popperInstance.scheduleUpdate()),"initial"===a&&H.state.isVisible&&q()}}function gt(t){H.state.isEnabled&&!zt(t)&&(H.state.isVisible||(i=t.type,t instanceof MouseEvent&&(n=t)),"click"===t.type&&!1!==H.props.hideOnClick&&H.state.isVisible?Ot():St(t))}function _t(e){var i=j(e.target,function(t){return t._tippy});C(e.target,I)===N||i===t||function(t,e,i,n){if(!t)return!0;var o=i.clientX,s=i.clientY,r=n.interactiveBorder,a=n.distance,l=e.top-s>("top"===t?r+a:r),u=s-e.bottom>("bottom"===t?r+a:r),c=e.left-o>("left"===t?r+a:r),d=o-e.right>("right"===t?r+a:r);return l||u||c||d}(ct(N),N.getBoundingClientRect(),e,H.props)&&(P(),Ot())}function kt(t){if(!zt(t))return H.props.interactive?(document.body.addEventListener("mouseleave",Ot),void document.addEventListener("mousemove",_)):void Ot()}function xt(t){t.target===D()&&(H.props.interactive&&t.relatedTarget&&N.contains(t.relatedTarget)||Ot())}function Bt(t){C(t.target,H.props.target)&&St(t)}function Et(t){C(t.target,H.props.target)&&Ot()}function zt(t){var e="ontouchstart"in window,i=Q(t.type,"touch"),n=H.props.touchHold;return e&&ht&&n&&!i||ht&&!n&&i}function Ct(){!g&&c&&(g=!0,function(t){t.offsetHeight}(N),c())}function jt(){var e=H.props.popperOptions,i=H.popperChildren,n=i.tooltip,o=i.arrow,s=G(e,"preventOverflow");function r(t){H.props.flip&&!H.props.flipOnUpdate&&(t.flipped&&(H.popperInstance.options.placement=t.placement),X(H.popperInstance.modifiers,!1)),n.setAttribute(L,t.placement),!1!==t.attributes[T]?n.setAttribute(T,""):n.removeAttribute(T),u&&u!==t.placement&&w&&(n.style.transition="none",requestAnimationFrame(function(){n.style.transition=""})),u=t.placement,w=H.state.isVisible;var e=ct(N),i=n.style;i.top=i.bottom=i.left=i.right="",i[e]=-(H.props.distance-10)+"px";var o=s&&void 0!==s.padding?s.padding:O,r="number"==typeof o,a=f({top:r?o:o.top,bottom:r?o:o.bottom,left:r?o:o.left,right:r?o:o.right},!r&&o);a[e]=r?o+H.props.distance:(o[e]||0)+H.props.distance,H.popperInstance.modifiers.filter(function(t){return"preventOverflow"===t.name})[0].padding=a,p=a}var a=f({eventsEnabled:!1,placement:H.props.placement},e,{modifiers:f({},e?e.modifiers:{},{preventOverflow:f({boundariesElement:H.props.boundary,padding:O},s),arrow:f({element:o,enabled:!!o},G(e,"arrow")),flip:f({enabled:H.props.flip,padding:H.props.distance+O,behavior:H.props.flipBehavior},G(e,"flip")),offset:f({offset:H.props.offset},G(e,"offset"))}),onCreate:function(t){Ct(),r(t),e&&e.onCreate&&e.onCreate(t)},onUpdate:function(t){Ct(),r(t),e&&e.onUpdate&&e.onUpdate(t)}});H.popperInstance=new b.a(t,N,a)}function St(t,i){if(Lt(),!H.state.isVisible){if(H.props.target)return function(t){if(t){var i=C(t.target,H.props.target);i&&!i._tippy&&vt(i,f({},H.props,{content:V(e.content,[i]),appendTo:e.appendTo,target:"",showOnInit:!0}))}}(t);if(m=!0,t&&!i&&H.props.onTrigger(H,t),H.props.wait)return H.props.wait(H,t);Y()&&!H.state.isMounted&&(H.popperInstance||jt(),document.addEventListener("mousemove",wt));var n=W(H.props.delay,0,k.delay);n?o=setTimeout(function(){Nt()},n):Nt()}}function Ot(){if(Lt(),!H.state.isVisible)return q();m=!1;var t=W(H.props.delay,1,k.delay);t?s=setTimeout(function(){H.state.isVisible&&At()},t):r=requestAnimationFrame(function(){At()})}function Lt(){clearTimeout(o),clearTimeout(s),cancelAnimationFrame(r)}function Tt(e){et(e=e||{},k),bt(),H.props.triggerTarget&&delete H.props.triggerTarget._tippy;var i=H.props,o=tt(t,f({},H.props,e,{ignoreAttributes:!0}));o.ignoreAttributes=R(e,"ignoreAttributes")?e.ignoreAttributes||!1:i.ignoreAttributes,H.props=o,D()._tippy=H,mt(),P(),_=U(_t,e.interactiveDebounce||0),function(t,e,i){var n=ot(t),o=n.tooltip,s=n.content,r=n.backdrop,a=n.arrow;t.style.zIndex=""+i.zIndex,o.setAttribute("data-size",i.size),o.setAttribute("data-animation",i.animation),o.style.maxWidth=i.maxWidth+("number"==typeof i.maxWidth?"px":""),i.role?t.setAttribute("role",i.role):t.removeAttribute("role"),e.content!==i.content&&nt(s,i),!e.animateFill&&i.animateFill?(o.appendChild(at()),o.setAttribute("data-animatefill","")):e.animateFill&&!i.animateFill&&(o.removeChild(r),o.removeAttribute("data-animatefill")),!e.arrow&&i.arrow?o.appendChild(rt(i.arrowType)):e.arrow&&!i.arrow&&o.removeChild(a),e.arrow&&i.arrow&&e.arrowType!==i.arrowType&&o.replaceChild(rt(i.arrowType),a),!e.interactive&&i.interactive?lt(t,o):e.interactive&&!i.interactive&&function(t,e){t.removeAttribute("tabindex"),e.removeAttribute("data-interactive")}(t,o),!e.inertia&&i.inertia?st(o):e.inertia&&!i.inertia&&function(t){t.removeAttribute("data-inertia")}(o),e.theme!==i.theme&&(dt(o,"remove",e.theme),dt(o,"add",i.theme))}(N,i,o),H.popperChildren=ot(N),H.popperInstance&&(H.popperInstance.update(),x.some(function(t){return R(e,t)&&e[t]!==i[t]})&&(H.popperInstance.destroy(),jt(),H.state.isVisible&&H.popperInstance.enableEventListeners(),H.props.followCursor&&n&&wt(n)))}function Nt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W(H.props.duration,0,k.duration[1]);if(!H.state.isDestroyed&&H.state.isEnabled&&(!ht||H.props.touch)&&!D().hasAttribute("disabled")&&!1!==H.props.onShow(H)){N.style.visibility="visible",H.state.isVisible=!0,H.props.interactive&&D().classList.add(A);var i=F();J(i.concat(N),0),c=function(){H.state.isVisible&&(Y()||H.popperInstance.update(),H.popperChildren.backdrop&&(H.popperChildren.content.style.transitionDelay=Math.round(e/12)+"ms"),H.props.sticky&&(J([N],y?0:H.props.updateDuration),function t(){H.popperInstance.scheduleUpdate(),H.state.isMounted?requestAnimationFrame(t):J([N],0)}()),J([N],H.props.updateDuration),J(i,e),Z(i,"visible"),function(t,e){it(t,e)}(e,function(){H.props.aria&&D().setAttribute("aria-".concat(H.props.aria),N.id),H.props.onShown(H),H.state.isShown=!0}))},function(){g=!1;var e=!(Y()||"initial"===H.props.followCursor&&ht);H.popperInstance?(Y()||(H.popperInstance.scheduleUpdate(),e&&H.popperInstance.enableEventListeners()),X(H.popperInstance.modifiers,H.props.flip)):(jt(),e&&H.popperInstance.enableEventListeners()),H.popperInstance.reference=t;var i=H.popperChildren.arrow;Y()?(i&&(i.style.margin="0"),n&&wt(n)):i&&(i.style.margin=""),ht&&n&&"initial"===H.props.followCursor&&(wt(n),i&&(i.style.margin="0"));var o=H.props.appendTo;(l="parent"===o?t.parentNode:V(o,[t])).contains(N)||(l.appendChild(N),H.props.onMount(H),H.state.isMounted=!0)}()}}function At(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W(H.props.duration,1,k.duration[1]);if(!H.state.isDestroyed&&H.state.isEnabled&&!1!==H.props.onHide(H)){N.style.visibility="hidden",H.state.isVisible=!1,H.state.isShown=!1,w=!1,H.props.interactive&&D().classList.remove(A);var e=F();J(e,t),Z(e,"hidden"),function(t,e){it(t,function(){!H.state.isVisible&&l&&l.contains(N)&&e()})}(t,function(){m||q(),H.props.aria&&D().removeAttribute("aria-".concat(H.props.aria)),H.popperInstance.disableEventListeners(),H.popperInstance.options.placement=H.props.placement,l.removeChild(N),H.props.onHidden(H),H.state.isMounted=!1})}}}var _t=!1;function kt(t,e){et(e||{},k),_t||(document.addEventListener("click",wt,!0),document.addEventListener("touchstart",mt,S),window.addEventListener("blur",gt),_t=!0);var i,n=f({},k,e);i=t,"[object Object]"!=={}.toString.call(i)||i.addEventListener||function(t){var e={isVirtual:!0,attributes:t.attributes||{},setAttribute:function(e,i){t.attributes[e]=i},getAttribute:function(e){return t.attributes[e]},removeAttribute:function(e){delete t.attributes[e]},hasAttribute:function(e){return e in t.attributes},addEventListener:function(){},removeEventListener:function(){},classList:{classNames:{},add:function(e){t.classList.classNames[e]=!0},remove:function(e){delete t.classList.classNames[e]},contains:function(e){return e in t.classList.classNames}}};for(var i in e)t[i]=e[i]}(t);var o=function(t){if(Y(t))return[t];if(t instanceof NodeList)return z(t);if(Array.isArray(t))return t;try{return z(document.querySelectorAll(t))}catch(t){return[]}}(t).reduce(function(t,e){var i=e&&vt(e,n);return i&&t.push(i),t},[]);return Y(t)?o[0]:o}kt.version="4.3.0",kt.defaults=k,kt.setDefaults=function(t){Object.keys(t).forEach(function(e){k[e]=t[e]})},kt.hideAll=pt,kt.group=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.delay,n=void 0===i?t[0].props.delay:i,o=e.duration,s=void 0===o?0:o,r=!1;function a(t){r=t,d()}function l(e){e._originalProps.onShow(e),t.forEach(function(t){t.set({duration:s}),t.hide()}),a(!0)}function u(t){t._originalProps.onHide(t),a(!1)}function c(t){t._originalProps.onShown(t),t.set({duration:t._originalProps.duration})}function d(){t.forEach(function(t){t.set({onShow:l,onShown:c,onHide:u,delay:r?[0,Array.isArray(n)?n[1]:n]:n,duration:r?s:t._originalProps.duration})})}t.forEach(function(t){t._originalProps?t.set(t._originalProps):t._originalProps=f({},t.props)}),d()},w&&setTimeout(function(){z(document.querySelectorAll("[data-tippy]")).forEach(function(t){var e=t.getAttribute("data-tippy");e&&kt(t,{content:e})})}),function(t){if(w){var e=document.createElement("style");e.type="text/css",e.textContent=t;var i=document.head,n=i.firstChild;n?i.insertBefore(e,n):i.appendChild(e)}}('.tippy-iOS{cursor:pointer!important;-webkit-tap-highlight-color:transparent}.tippy-popper{transition-timing-function:cubic-bezier(.165,.84,.44,1);max-width:calc(100% - 8px);pointer-events:none;outline:0}.tippy-popper[x-placement^=top] .tippy-backdrop{border-radius:40% 40% 0 0}.tippy-popper[x-placement^=top] .tippy-roundarrow{bottom:-7px;bottom:-6.5px;-webkit-transform-origin:50% 0;transform-origin:50% 0;margin:0 3px}.tippy-popper[x-placement^=top] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.tippy-popper[x-placement^=top] .tippy-arrow{border-top:8px solid #333;border-right:8px solid transparent;border-left:8px solid transparent;bottom:-7px;margin:0 3px;-webkit-transform-origin:50% 0;transform-origin:50% 0}.tippy-popper[x-placement^=top] .tippy-backdrop{-webkit-transform-origin:0 25%;transform-origin:0 25%}.tippy-popper[x-placement^=top] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-55%);transform:scale(1) translate(-50%,-55%)}.tippy-popper[x-placement^=top] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-50%,-45%);transform:scale(.2) translate(-50%,-45%);opacity:0}.tippy-popper[x-placement^=top] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateY(-20px);transform:translateY(-20px)}.tippy-popper[x-placement^=top] [data-animation=perspective]{-webkit-transform-origin:bottom;transform-origin:bottom}.tippy-popper[x-placement^=top] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateY(-10px) rotateX(0);transform:perspective(700px) translateY(-10px) rotateX(0)}.tippy-popper[x-placement^=top] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateY(0) rotateX(60deg);transform:perspective(700px) translateY(0) rotateX(60deg)}.tippy-popper[x-placement^=top] [data-animation=fade][data-state=visible]{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateY(0);transform:translateY(0)}.tippy-popper[x-placement^=top] [data-animation=scale]{-webkit-transform-origin:bottom;transform-origin:bottom}.tippy-popper[x-placement^=top] [data-animation=scale][data-state=visible]{-webkit-transform:translateY(-10px) scale(1);transform:translateY(-10px) scale(1)}.tippy-popper[x-placement^=top] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateY(-10px) scale(.5);transform:translateY(-10px) scale(.5)}.tippy-popper[x-placement^=bottom] .tippy-backdrop{border-radius:0 0 30% 30%}.tippy-popper[x-placement^=bottom] .tippy-roundarrow{top:-7px;-webkit-transform-origin:50% 100%;transform-origin:50% 100%;margin:0 3px}.tippy-popper[x-placement^=bottom] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(0);transform:rotate(0)}.tippy-popper[x-placement^=bottom] .tippy-arrow{border-bottom:8px solid #333;border-right:8px solid transparent;border-left:8px solid transparent;top:-7px;margin:0 3px;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}.tippy-popper[x-placement^=bottom] .tippy-backdrop{-webkit-transform-origin:0 -50%;transform-origin:0 -50%}.tippy-popper[x-placement^=bottom] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-45%);transform:scale(1) translate(-50%,-45%)}.tippy-popper[x-placement^=bottom] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-50%);transform:scale(.2) translate(-50%);opacity:0}.tippy-popper[x-placement^=bottom] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateY(20px);transform:translateY(20px)}.tippy-popper[x-placement^=bottom] [data-animation=perspective]{-webkit-transform-origin:top;transform-origin:top}.tippy-popper[x-placement^=bottom] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateY(10px) rotateX(0);transform:perspective(700px) translateY(10px) rotateX(0)}.tippy-popper[x-placement^=bottom] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateY(0) rotateX(-60deg);transform:perspective(700px) translateY(0) rotateX(-60deg)}.tippy-popper[x-placement^=bottom] [data-animation=fade][data-state=visible]{-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateY(0);transform:translateY(0)}.tippy-popper[x-placement^=bottom] [data-animation=scale]{-webkit-transform-origin:top;transform-origin:top}.tippy-popper[x-placement^=bottom] [data-animation=scale][data-state=visible]{-webkit-transform:translateY(10px) scale(1);transform:translateY(10px) scale(1)}.tippy-popper[x-placement^=bottom] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateY(10px) scale(.5);transform:translateY(10px) scale(.5)}.tippy-popper[x-placement^=left] .tippy-backdrop{border-radius:50% 0 0 50%}.tippy-popper[x-placement^=left] .tippy-roundarrow{right:-12px;-webkit-transform-origin:33.33333333% 50%;transform-origin:33.33333333% 50%;margin:3px 0}.tippy-popper[x-placement^=left] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.tippy-popper[x-placement^=left] .tippy-arrow{border-left:8px solid #333;border-top:8px solid transparent;border-bottom:8px solid transparent;right:-7px;margin:3px 0;-webkit-transform-origin:0 50%;transform-origin:0 50%}.tippy-popper[x-placement^=left] .tippy-backdrop{-webkit-transform-origin:50% 0;transform-origin:50% 0}.tippy-popper[x-placement^=left] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-50%);transform:scale(1) translate(-50%,-50%)}.tippy-popper[x-placement^=left] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-75%,-50%);transform:scale(.2) translate(-75%,-50%);opacity:0}.tippy-popper[x-placement^=left] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateX(-20px);transform:translateX(-20px)}.tippy-popper[x-placement^=left] [data-animation=perspective]{-webkit-transform-origin:right;transform-origin:right}.tippy-popper[x-placement^=left] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateX(-10px) rotateY(0);transform:perspective(700px) translateX(-10px) rotateY(0)}.tippy-popper[x-placement^=left] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateX(0) rotateY(-60deg);transform:perspective(700px) translateX(0) rotateY(-60deg)}.tippy-popper[x-placement^=left] [data-animation=fade][data-state=visible]{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateX(0);transform:translateX(0)}.tippy-popper[x-placement^=left] [data-animation=scale]{-webkit-transform-origin:right;transform-origin:right}.tippy-popper[x-placement^=left] [data-animation=scale][data-state=visible]{-webkit-transform:translateX(-10px) scale(1);transform:translateX(-10px) scale(1)}.tippy-popper[x-placement^=left] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateX(-10px) scale(.5);transform:translateX(-10px) scale(.5)}.tippy-popper[x-placement^=right] .tippy-backdrop{border-radius:0 50% 50% 0}.tippy-popper[x-placement^=right] .tippy-roundarrow{left:-12px;-webkit-transform-origin:66.66666666% 50%;transform-origin:66.66666666% 50%;margin:3px 0}.tippy-popper[x-placement^=right] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.tippy-popper[x-placement^=right] .tippy-arrow{border-right:8px solid #333;border-top:8px solid transparent;border-bottom:8px solid transparent;left:-7px;margin:3px 0;-webkit-transform-origin:100% 50%;transform-origin:100% 50%}.tippy-popper[x-placement^=right] .tippy-backdrop{-webkit-transform-origin:-50% 0;transform-origin:-50% 0}.tippy-popper[x-placement^=right] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(1) translate(-50%,-50%);transform:scale(1) translate(-50%,-50%)}.tippy-popper[x-placement^=right] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(.2) translate(-25%,-50%);transform:scale(.2) translate(-25%,-50%);opacity:0}.tippy-popper[x-placement^=right] [data-animation=shift-toward][data-state=visible]{-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateX(20px);transform:translateX(20px)}.tippy-popper[x-placement^=right] [data-animation=perspective]{-webkit-transform-origin:left;transform-origin:left}.tippy-popper[x-placement^=right] [data-animation=perspective][data-state=visible]{-webkit-transform:perspective(700px) translateX(10px) rotateY(0);transform:perspective(700px) translateX(10px) rotateY(0)}.tippy-popper[x-placement^=right] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:perspective(700px) translateX(0) rotateY(60deg);transform:perspective(700px) translateX(0) rotateY(60deg)}.tippy-popper[x-placement^=right] [data-animation=fade][data-state=visible]{-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=shift-away][data-state=visible]{-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateX(0);transform:translateX(0)}.tippy-popper[x-placement^=right] [data-animation=scale]{-webkit-transform-origin:left;transform-origin:left}.tippy-popper[x-placement^=right] [data-animation=scale][data-state=visible]{-webkit-transform:translateX(10px) scale(1);transform:translateX(10px) scale(1)}.tippy-popper[x-placement^=right] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateX(10px) scale(.5);transform:translateX(10px) scale(.5)}.tippy-tooltip{position:relative;color:#fff;border-radius:.25rem;font-size:.875rem;padding:.3125rem .5625rem;line-height:1.4;text-align:center;background-color:#333}.tippy-tooltip[data-size=small]{padding:.1875rem .375rem;font-size:.75rem}.tippy-tooltip[data-size=large]{padding:.375rem .75rem;font-size:1rem}.tippy-tooltip[data-animatefill]{overflow:hidden;background-color:transparent}.tippy-tooltip[data-interactive],.tippy-tooltip[data-interactive] path{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-tooltip[data-inertia][data-state=hidden]{transition-timing-function:ease}.tippy-arrow,.tippy-roundarrow{position:absolute;width:0;height:0}.tippy-roundarrow{width:18px;height:7px;fill:#333;pointer-events:none}.tippy-backdrop{position:absolute;background-color:#333;border-radius:50%;width:calc(110% + 2rem);left:50%;top:50%;z-index:-1;transition:all cubic-bezier(.46,.1,.52,.98);-webkit-backface-visibility:hidden;backface-visibility:hidden}.tippy-backdrop:after{content:"";float:left;padding-top:100%}.tippy-backdrop+.tippy-content{transition-property:opacity;will-change:opacity}.tippy-backdrop+.tippy-content[data-state=visible]{opacity:1}.tippy-backdrop+.tippy-content[data-state=hidden]{opacity:0}');var xt=kt;var Bt=class{constructor(t){this.buttonObject=t,this.buttonObject.stylingObject=this,this.groupHolder=null,this.buttonTitle=null,this.manageButtonMenu=null}build(){let t=document.createElement("div");return t.className="button-group-holder",t.appendChild(this.createTitleField()),t.appendChild(this.createButtonMobileDesktop()),t.appendChild(this.createButtonHolderButton()),t.appendChild(this.createQuickMenu()),this.groupHolder=t,t}createButtonHolderButton(){let t=document.createElement("a");t.href="javascript:void(0)",t.className="holder-button";let e=document.createElement("i");return e.className="fas fa-ellipsis-v",t.appendChild(e),t.addEventListener("click",()=>{let t=this.groupHolder.className.indexOf("holder-show-quick-menu");jQuery(".holder-show-quick-menu").removeClass("holder-show-quick-menu"),-1===t&&this.groupHolder.classList.add("holder-show-quick-menu")}),t}createQuickMenu(){let t=document.createElement("div");return t.className="group-holder-quick-menu",t.addEventListener("click",()=>{this.groupHolder.classList.remove("holder-show-quick-menu")}),t.appendChild(this.createQuickMenuButton("fas fa-wrench",window.Buttonizer.translate("common.settings"),()=>this.revealSettings(),"settings")),t.appendChild(this.createQuickMenuButton("fas fa-cog",window.Buttonizer.translate("utils.advanced_settings"),()=>this.buttonObject.windowObject.toggle(),window.Buttonizer.hasPremium()?"":"buttonizer-premium-gray-out")),t.appendChild(this.createQuickMenuButton("fas fa-pencil-alt",window.Buttonizer.translate("utils.rename"),()=>this.buttonRename(),"")),t.appendChild(this.createQuickMenuButton("far fa-copy",window.Buttonizer.translate("utils.duplicate"),()=>this.buttonDuplicate(),"")),t.appendChild(this.createQuickMenuButton("far fa-trash-alt",window.Buttonizer.translate("utils.delete"),()=>this.buttonDelete(),"delete")),this.manageButtonMenu=t,t}createQuickMenuButton(t,e,i,n=""){let o=document.createElement("a");o.href="javascript:void(0)",o.className=n;let s=document.createElement("i");return s.className=t,o.appendChild(s),o.innerHTML+=e,o.addEventListener("click",t=>i(t)),o}createTitleField(){let t=document.createElement("div");t.className+="button-title-holder";let e=document.createElement("input");e.type="text",e.className="group-title",e.value=this.buttonObject.data.name,e.setAttribute("readonly",""),e.id="buttonizer-button-title";let i=document.createElement("a");return i.href="javascript:void(0)",i.className="group-rename",i.innerHTML="<i class='fa fa-pencil-alt'></i>",e.addEventListener("change",()=>this.updateTitle()),e.addEventListener("blur",()=>this.updateTitle()),e.addEventListener("keyup",t=>{13===t.keyCode?this.updateTitle():27===t.keyCode&&(e.value=this.buttonObject.data.name,e.setAttribute("readonly",""))}),e.addEventListener("click",t=>{jQuery(".holder-show-quick-menu").removeClass("holder-show-quick-menu"),t.isTrusted&&e.hasAttribute("readonly")&&this.revealSettings()}),this.buttonTitle=e,t.appendChild(e),t.appendChild(i),e}updateTitle(){this.buttonObject.data.name=this.buttonTitle.value,window.Buttonizer.buttonChanges=!0,this.buttonTitle.setAttribute("readonly","")}buttonRename(){this.buttonTitle.hasAttribute("readonly")&&(this.buttonTitle.removeAttribute("readonly"),this.buttonTitle.focus())}buttonDelete(){1!==this.buttonObject.groupObject.getButtonsAlive()?new s({title:window.Buttonizer.translate("bar.buttons.delete_button.window_title_button"),content:"<p>"+window.Buttonizer.translate("bar.buttons.delete_button.question_remove_button").format(this.buttonObject.data.name)+"</p>",onConfirm:()=>{this.buttonObject.removeButton()},buttons:[{text:window.Buttonizer.translate("modal.changed_my_mind"),close:!0,focus:!0},{text:window.Buttonizer.translate("utils.delete"),confirm:!0}]}):new s({title:window.Buttonizer.translate("bar.buttons.delete_button.window_title_button"),content:"<p>"+window.Buttonizer.translate("bar.buttons.delete_button.cannot_delete")+"</p>",buttons:[{text:window.Buttonizer.translate("modal.close"),close:!0,focus:!0,confirm:!0}]})}buttonDuplicate(){let t=new RegExp(this.buttonObject.data.name+" - Copy \\([0-9]+\\)"),e=this.buttonObject.data.name+" - Copy";for(let i=0;i<this.buttonObject.groupObject.buttons.length;i++)if(this.buttonObject.groupObject.buttons[i].data.name.match(t)){let n=this.buttonObject.groupObject.buttons[i].data.name.match(t).toString().match(/- Copy \([0-9]+\)/).toString(),o=parseInt(n.replace(/\D/g,""));e=this.buttonObject.data.name+` - Copy (${o+1})`}else this.buttonObject.groupObject.buttons[i].data.name!==e||this.buttonObject.groupObject.buttons[i].data.name.match(t)||(e+=" (2)");let i={};for(let t in this.buttonObject.data)i[t]=this.buttonObject.data[t];i.name=e,new ge(this.buttonObject.groupObject,i),window.Buttonizer.buttonChanges=!0}createButtonMobileDesktop(){let t=document.createElement("a");t.href="javascript:void(0)",t.className="mobile-desktop",t.innerHTML="&nbsp;";let e=document.createElement("i");e.className="mobile-preview",e.innerHTML='<i class="fa fa-mobile-alt"></i>';let i=document.createElement("i");i.className="desktop-preview",i.innerHTML='<i class="fa fa-desktop"></i>',"true"!==this.buttonObject.data.show_mobile&&void 0!==this.buttonObject.data.show_mobile||(e.className+=" selected"),"true"!==this.buttonObject.data.show_desktop&&void 0!==this.buttonObject.data.show_desktop||(i.className+=" selected");let n=document.createElement("div");return n.className="new-button-visibility",n.appendChild(this.createMobile(e)),n.appendChild(this.createDesktop(i)),t.appendChild(n),t.appendChild(e),t.appendChild(i),t}createMobile(t){let e=document.createElement("a");e.href="javascript:void(0)",e.className="visibility-deskmobi";let i=document.createElement("i");return i.className="fa fa-mobile-alt",e.appendChild(i),this.buttonObject.registerUI("show_mobile",{update:i=>{!0===i||"true"===i?(e.classList.add("selected"),t.classList.add("selected")):(e.classList.remove("selected"),t.classList.remove("selected"))}}),this.buttonObject.getUI("show_mobile").forEach(t=>t.update(this.buttonObject.get("show_mobile"))),e.addEventListener("click",()=>{let t=this.buttonObject.get("show_mobile",!0);this.buttonObject.set("show_mobile",!(!0===t||"true"===t))}),e}createDesktop(t){let e=document.createElement("a");e.href="javascript:void(0)",e.className="visibility-deskmobi";let i=document.createElement("i");return i.className="fa fa-desktop",e.appendChild(i),this.buttonObject.registerUI("show_desktop",{update:i=>{!0===i||"true"===i?(e.classList.add("selected"),t.classList.add("selected")):(e.classList.remove("selected"),t.classList.remove("selected"))}}),this.buttonObject.getUI("show_desktop").forEach(t=>t.update(this.buttonObject.get("show_desktop"))),e.addEventListener("click",()=>{let t=this.buttonObject.get("show_desktop",!0);this.buttonObject.set("show_desktop",!(!0===t||"true"===t))}),e}revealSettings(){this.buttonObject.revealSettings()}};class Et{constructor(t){this.state=void 0!==t.state&&"true"==t.state,this.onChange=void 0===t.onChange?function(){console.log("FormBoolean: No binding. Use FormBoolean.onChange()")}:t.onChange,this.disabled=void 0!==t.disabled&&t.disabled,this.visible=void 0===t.visible||t.visible,this.element=HTMLElement}build(){this.element=document.createElement("a"),this.element.href="javascript:void(0)",this.element.className="buttonizer-boolean "+(!0===this.state?"boolean-selected":""),this.element.addEventListener("click",()=>this.toggle());let t=document.createElement("div");return t.className="buttonizer-boolean-circle",this.element.appendChild(t),this.element}hide(){this.element.style.display="none"}show(){this.element.style.display="block"}onToggle(t){this.onChange=t}toggle(){this.disabled?console.log("Sorry, you're not able to edit this"):(this.state=!this.state,!0===this.state?this.element.classList.add("boolean-selected"):this.element.classList.remove("boolean-selected"),this.onChange(this.state))}}class zt{constructor(t,e,i){this.title=t,this.settingHolderContent=e,this.className=void 0!==i&&i}build(){let t=document.createElement("div");t.className="buttonizer-setting-row "+(!1===this.className?"":this.className),t.style.marginTop="10px";let e=document.createElement("div");e.className="buttonizer-setting-row-c1",e.innerHTML=this.title;let i=document.createElement("div");return i.className="buttonizer-setting-row-c2",i.appendChild(this.settingHolderContent),t.appendChild(e),t.appendChild(i),t}}class Ct{constructor(t){this.buttonAction=t}build(t){let e=this.buttonAction.inputText();return e.placeholder=void 0===t?"https://www.domain.ltd/page ":t,e.addEventListener("keyup",()=>this.change(e.value)),""!==this.buttonAction.value&&(e.value=this.buttonAction.value),e}change(t){this.valid(t)&&this.buttonAction.removeError(),this.buttonAction.updateButtonActionValue(t)}valid(t){let e=!1;return/(http|https):\/\/(\w+:{0,1}\w*)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%!\-\/]))?/.test(t)||"?"===t.substring(0,1)||"#"===t.substring(0,1)?-1===t.indexOf("https://")&&"#"!==t.substring(0,1)&&(e="<p>"+window.Buttonizer.translate("settings.button_action.actions.url.insecure")+'</p><p><a href="https://community.buttonizer.pro/knowledgebase/19" target="_blank" style="text-decoration: none;">More info &raquo;</a></p>'):e="<p>"+window.Buttonizer.translate("settings.button_action.actions.url.invalid")+"</p><p>"+window.Buttonizer.translate("settings.button_action.actions.url.invalid_tip")+"</p>",!1===e||(this.buttonAction.addError(e),!1)}}class jt{constructor(t,e=!1){this.buttonAction=t,this.numbersOnly=e}build(t){let e=document.createElement("div"),i=this.buttonAction.inputText();return i.placeholder=void 0===t?"Add text here":t,i.addEventListener("keyup",()=>this.change(i.value)),""!==this.buttonAction.value&&(i.value=this.buttonAction.value),e.appendChild(i),this.numbersOnly&&(this.numbersOnlyField=document.createElement("div"),this.numbersOnlyField.className="field-error",this.numbersOnlyField.innerHTML=window.Buttonizer.translate("warnings.only_numbers"),this.numbersOnlyField.style.display="none",e.appendChild(this.numbersOnlyField)),e}change(t){this.numbersOnly&&(isNaN(t)?this.numbersOnlyField.style.display="block":this.numbersOnlyField.style.display="none"),this.buttonAction.updateButtonActionValue(t)}}class St{constructor(t){this.buttonAction=t}build(t){let e=this.buttonAction.inputText();return e.placeholder=void 0===t?"(000) 123 456 78":t,e.addEventListener("keyup",()=>this.change(e.value)),""!==this.buttonAction.value&&(e.value=this.buttonAction.value),e}change(t){this.valid(t)&&this.buttonAction.removeError(),this.buttonAction.updateButtonActionValue(t)}valid(t){let e=!1;return t=(t=t.replace("+","")).replace(" ",""),/^(?=.*\d)[\d ]+$/.test(t)||(e="<p>"+window.Buttonizer.translate("warnings.invalid_phone_number")+"</p>"),!1===e||(this.buttonAction.addError(e),!1)}}class Ot{constructor(t){this.buttonAction=t}build(t){let e=this.buttonAction.inputText();return e.placeholder=void 0===t?"account@domain.tld":t,e.addEventListener("keyup",()=>this.change(e.value)),""!==this.buttonAction.value&&(e.value=this.buttonAction.value),e}change(t){this.valid(t)&&this.buttonAction.removeError(),this.buttonAction.updateButtonActionValue(t)}valid(t){let e=!1;return t=(t=t.replace("+","")).replace(" ",""),/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,10})+$/.test(t)||(e="<p>"+window.Buttonizer.translate("warnings.invalid_email")+"</p>"),!1===e||(this.buttonAction.addError(e),!1)}}i(6);class Lt{constructor(t){this.buttonAction=t}build(){let t=document.createElement("select");return t.className="buttonizer-select-action",t.appendChild(this.selectGroup(window.Buttonizer.translate("settings.button_action.actions.group_popular"),[{value:"facebook",text:window.Buttonizer.translate("settings.button_action.actions.share_page_on").format("Facebook")},{value:"twitter",text:window.Buttonizer.translate("settings.button_action.actions.share_page_on").format("Twitter")},{value:"whatsapp",text:window.Buttonizer.translate("settings.button_action.actions.share_page_on").format("Whatsapp")},{value:"linkedin",text:window.Buttonizer.translate("settings.button_action.actions.share_page_on").format("LinkedIn")},{value:"pinterest",text:window.Buttonizer.translate("settings.button_action.actions.share_page_on").format("Pinterest")},{value:"mail",text:window.Buttonizer.translate("settings.button_action.actions.share_page_via").format("email")}])),t.appendChild(this.selectGroup("New actions",[{value:"sms",text:"Share on SMS"},{value:"reddit",text:"Share on Reddit"},{value:"tumblr",text:"Share on Tumblr"},{value:"digg",text:"Share on Digg"},{value:"weibo",text:"Share on Weibo"},{value:"vk",text:"Share on VK"},{value:"ok",text:"Share on OK.ru (Odnoklassniki)"},{value:"xing",text:"Share on Xing"},{value:"blogger",text:"Share on Blogger"},{value:"flipboard",text:"Share on Flipboard"}])),t.addEventListener("change",()=>{this.buttonAction.updateButtonActionValue(t.value)}),t}add(t,e){let i=document.createElement("option");return i.text=e,t===this.buttonAction.value&&(i.selected=!0),i.value=t,i}selectGroup(t,e){let i=document.createElement("optgroup");i.label=t;for(let t of e)i.appendChild(this.add(t.value,t.text));return i}}class Tt{constructor(t){this.element=document.createElement("div"),this.errorElement=document.createElement("div"),this.buttonSettingsObject=t,this.dropdown=null,this.value=void 0!==this.buttonSettingsObject.buttonObject.data.action?this.buttonSettingsObject.buttonObject.data.action:"",this.unique=Array.apply(0,Array(15)).map(()=>(t=>t.charAt(Math.floor(Math.random()*t.length)))("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")).join("")}build(){this.element.style.marginTop="10px",this.dropdown=document.createElement("select"),this.dropdown.style.width="199px",this.dropdown.className="buttonizer-select-action",this.dropdown.appendChild(this.selectGroup(window.Buttonizer.translate("settings.button_action.actions.group_popular"),[{value:"url",text:"Website URL"},{value:"phone",text:window.Buttonizer.translate("settings.button_action.actions.phone_number")},{value:"mail",text:window.Buttonizer.translate("settings.button_action.actions.mail")},{value:"whatsapp",text:"WhatsApp chat"},{value:"backtotop",text:window.Buttonizer.translate("settings.button_action.actions.back_to_top")},{value:"gobackpage",text:window.Buttonizer.translate("settings.button_action.actions.go_back_one_page")},{value:"socialsharing",text:"Social sharing"},{value:"javascript_pro",text:"Javascript function"}])),this.dropdown.appendChild(this.selectGroup(window.Buttonizer.translate("settings.button_action.actions.group_chat"),[{value:"sms",text:"SMS"},{value:"messenger_chat",text:"Facebook Messenger Chat Widget"},{value:"messenger",text:"Facebook Messenger Link"},{value:"twitter_dm",text:"Twitter DM"},{value:"skype",text:"Skype"},{value:"line",text:"LINE"},{value:"telegram",text:"Telegram"},{value:"wechat",text:"WeChat"},{value:"viber",text:"Viber"}])),this.dropdown.appendChild(this.selectGroup(window.Buttonizer.translate("settings.button_action.actions.group_social_media"),[{value:"facebook",text:"Facebook"},{value:"twitter",text:"Twitter"},{value:"instagram",text:"Instagram"},{value:"snapchat",text:"Snapchat"},{value:"linkedin",text:"LinkedIn"},{value:"vk",text:"VKontakte"},{value:"poptin",text:"Poptin"},{value:"waze",text:"Waze"}])),this.dropdown.appendChild(this.selectGroup(window.Buttonizer.translate("settings.button_action.actions.group_popup"),[{value:"poptin",text:"Poptin"},{value:"elementor_popup",text:"Elementor Popup"},{value:"popup_maker",text:"Popup Maker"}]));let t=document.createElement("div");return xt(t.appendChild(new zt("<label for='label-always-open'>"+window.Buttonizer.translate("settings.button_action.title")+"</label>",this.dropdown).build()).firstChild.firstChild,{content:window.Buttonizer.translate("settings.button_action.description"),animation:"shift-away",arrow:!0,hideOnClick:!1}),t.appendChild(this.element),t.appendChild(this.errorElement),this.changeForm(this.buttonSettingsObject.buttonObject.data.type),jQuery(this.dropdown).chosen({placeholder_text_single:window.Buttonizer.translate("settings.button_action.select"),no_results_text:window.Buttonizer.translate("settings.button_action.search_not_found"),hide_results_on_select:!1}).change(()=>this.update(this.dropdown.value)),t}add(t,e){let i=document.createElement("option");return i.text=e,t===this.buttonSettingsObject.buttonObject.data.type&&(i.selected=!0),-1===t.indexOf("pro")||window.Buttonizer.hasPremium()?i.value=t:(i.disabled=!0,i.text+=" (PRO ONLY)"),i}update(t,e=!1){if("javascript_pro"===this.buttonSettingsObject.buttonObject.data.type&&"javascript_pro"!==t){if(!e)return void new s({title:"<i class='fas fa-exclamation window-icon'></i> "+window.Buttonizer.translate("settings.button_action.actions.javascript.warning_modal_title"),content:"<p>"+window.Buttonizer.translate("settings.button_action.actions.javascript.warning_intro")+"</p><p>"+window.Buttonizer.translate("settings.button_action.actions.javascript.warning_question")+"</p>",class:"warning-red",buttons:[{text:window.Buttonizer.translate("modal.changed_my_mind"),close:!0,focus:!0,cancel:!0},{text:window.Buttonizer.translate("modal.yes_please"),close:!0,confirm:!0}],onConfirm:()=>{this.value="",this.update(t,!0)},onCancel:()=>{this.buttonSettingsObject.buttonObject.data.type="javascript_pro",jQuery(this.dropdown).val(this.buttonSettingsObject.buttonObject.data.type),jQuery(this.dropdown).trigger("chosen:updated")}})}else if("socialsharing"===t)this.buttonSettingsObject.buttonObject.data.action="facebook";else if("socialsharing"===this.buttonSettingsObject.buttonObject.data.type)switch(t){case"elementor_popup":this.value="elementor"+this.unique,this.updateButtonActionValue(this.value);break;case"popup_maker":this.value="popupmaker"+this.unique,this.updateButtonActionValue(this.value);break;default:this.value=""}else if("elementor_popup"===t)this.value="elementor"+this.unique,this.updateButtonActionValue(this.value),console.log(this.value);else if("elementor_popup"===this.buttonSettingsObject.buttonObject.data.type&&"popup_maker"!==t)this.value="";else if("popup_maker"===t)this.value="popupmaker"+this.unique,this.updateButtonActionValue(this.value),console.log(this.value);else if("popup_maker"===this.buttonSettingsObject.buttonObject.data.type&&"elementor_popup"!==t)this.value="";else if("messenger_chat"===t)for(let t of window.Buttonizer.buttonGroups)for(let e of t.buttons){let t=`<br>Button: <b>${e.data.name}</b>`;if("messenger_chat"===e.data.type)return void new s({title:"This is getting out of hand. Now there are two of them!",content:`<p>You currently have a button with a Facebook Messenger Chat Widget action.\n <br>\n As of now, the Facebook Messenger SDK can only support 1 Facebook Messenger Chat Widget. \n <br><br>\n Button with Facebook Messenger Widget:\n ${t}\n <p>`,class:"warning-red",buttons:[{text:"I understand",close:!0,confirm:!0}],onConfirm:()=>{jQuery(this.dropdown).val(this.buttonSettingsObject.buttonObject.data.type),jQuery(this.dropdown).trigger("chosen:updated")}})}this.buttonSettingsObject.buttonObject.data.type=t,window.Buttonizer.buttonChanges=!0,this.removeError(),this.changeForm(t)}updateButtonActionValue(t){this.buttonSettingsObject.buttonObject.data.action=t,window.Buttonizer.buttonChanges=!0,this.value=t}changeForm(t){this.element.innerHTML="",this.element.className="";let e=new Et({state:void 0===typeof this.buttonSettingsObject.buttonObject.data.action_new_tab?"false":this.buttonSettingsObject.buttonObject.data.action_new_tab});if(e.onToggle(t=>{this.buttonSettingsObject.buttonObject.data.action_new_tab=t,window.Buttonizer.buttonChanges=!0}),"phone"===t||"sms"===t)this.element.appendChild(new St(this).build()),this.addKnowledgeBaseLink();else if("viber"===t){this.element.appendChild(new St(this).build("+00123456789"));let t=document.createElement("p");t.innerHTML=window.Buttonizer.translate("settings.button_action.actions.viber"),this.element.appendChild(t)}else if("mail"===t)this.element.appendChild(new Ot(this).build(window.Buttonizer.translate("settings.button_action.placeholders.mail.recipient")));else if("whatsapp_pro"===t||"whatsapp"===t){this.element.appendChild(new St(this).build());let t=document.createElement("p");t.innerHTML=window.Buttonizer.translate("settings.button_action.actions.whatsapp_info"),this.element.appendChild(t)}else if("socialsharing"===t)this.element.appendChild(new Lt(this).build());else{if("backtotop"===t||"gobackpage"===t)return;if("skype"===t||"telegram"===t||"twitter"===t||"snapchat"===t||"instagram"===t||"vk"===t)this.element.appendChild(new jt(this).build(window.Buttonizer.translate("settings.button_action.placeholders.username"))),this.addKnowledgeBaseLink();else if("twitter_dm"===t){this.element.appendChild(new jt(this,!0).build("Account ID"));let t=document.createElement("p");t.innerHTML=window.Buttonizer.translate("settings.button_action.actions.twitter_info"),this.element.appendChild(t)}else if("messenger"===t)this.element.appendChild(new Ct(this).build("https://m.me/YOUR-PAGE-NAME")),this.addKnowledgeBaseLink();else if("messenger_chat"===t){this.element.appendChild(new jt(this).build("Facebook page ID"));let t=document.createElement("p");t.innerHTML=window.Buttonizer.translate("settings.button_action.actions.messenger_chat"),this.element.appendChild(t),this.addKnowledgeBaseLink(59,"Facebook Messenger Chat Widget")}else if("facebook"===t)this.element.appendChild(new jt(this).build("Facebook username/page")),this.addKnowledgeBaseLink();else if("linkedin"===t)this.element.appendChild(new jt(this).build('"company/COMPANY-NAME" or "in/USERNAME"')),this.addKnowledgeBaseLink();else if("line"===t)this.element.appendChild(new jt(this).build("LINE ID"));else if("wechat"===t)this.element.appendChild(new jt(this).build("User ID"));else if("waze"===t)this.element.appendChild(new Ct(this).build("https://www.waze.com/ul?q=Netherlands"));else if("popup_maker"===t){let t=document.createElement("p");t.innerHTML=`In your <b>Popup Settings</b>, add a new <b>"Click to Open"</b> trigger and copy and paste this code in <b>"Extra CSS Selectors"</b> </br> <code style="font-size: 11px;">a[href="#${this.value}"]</code>`,this.element.appendChild(t),this.addKnowledgeBaseLink(57,"Popup maker")}else if("elementor_popup"===t){let t=document.createElement("p");t.innerHTML=`Copy and paste this into your Elementor Popup's <b>"Open By Selector"</b> option. </br> <code style="font-size: 11px;">a[href="#${this.value}"]</code>`,this.element.appendChild(t),this.addKnowledgeBaseLink(57,"Elementor popup")}else if("poptin"===t){this.element.appendChild(new Ct(this).build("https://app.popt.in/APIRequest/click/0c768294b0605"));let t=document.createElement("p");t.innerHTML=window.Buttonizer.translate("settings.button_action.actions.poptin"),this.element.appendChild(t),this.addKnowledgeBaseLink(57)}else this.element.appendChild(new Ct(this).build()),xt(this.element.appendChild(new zt("<label for='label-always-open'>"+window.Buttonizer.translate("settings.open_new_tab.title")+":</label>",e.build(),"is-boolean-only").build()).firstChild.firstChild,{content:window.Buttonizer.translate("settings.open_new_tab.description"),animation:"shift-away",arrow:!0,hideOnClick:!1}),this.addKnowledgeBaseLink()}}addKnowledgeBaseLink(t="",e=""){let i=document.createElement("a");i.className="info-link has-margin-everywhere",i.innerHTML=""===e?window.Buttonizer.translate("utils.visit_knowledgebase"):window.Buttonizer.translate("utils.knowledge_link").format(e),i.href="https://community.buttonizer.pro/knowledgebase"+(""===t?"":"/"+t),i.target="_blank",this.element.appendChild(i)}inputText(){let t=document.createElement("input");return t.type="text",t.style.display="block",t.style.width="100%",t.className="buttonizer-input-action",t}addError(t){this.errorElement.innerHTML="";let e=document.createElement("div");e.innerHTML=t,e.className="field-error-container",this.errorElement.appendChild(e)}removeError(){this.errorElement.innerHTML=""}selectGroup(t,e){let i=document.createElement("optgroup");i.label=t;for(let t of e)i.appendChild(this.add(t.value,t.text));return i}}class Nt{constructor(t){this.parentObject=void 0!==t.parentObject?t.parentObject:null,this.rowName=void 0!==t.rowName?t.rowName:null,this.title=void 0!==t.title?t.title:"",this.description=void 0!==t.description?t.description:null,this.wrap=void 0!==t.wrap&&t.wrap,this.content=void 0!==t.content?t.content:[],this.className=void 0!==t.class?t.class:[],this.customBuild=void 0!==t.useCustomBuild&&t.useCustomBuild,this.hidden=void 0!==t.hidden&&t.hidden,this.element=document.createElement("div"),null!==this.parentObject?null!==this.rowName&&this.parentObject.registerUI(this.rowName+"-container",this):null!==this.rowName&&null===this.parentObject&&console.error("Row name '"+this.rowName+"' is set, but no parent has been set")}build(){if(this.element.className="buttonizer-setting-row "+(!1===this.className?"":this.className),this.element.style.marginTop="10px",this.hidden)switch(this.rowName){case"background-color":case"border-radius":case"background-image":case"label-color":this.element.classList+=" disabled";break;default:this.element.style.display="none"}let t=document.createElement("div");t.className="buttonizer-setting-row-c1";let e=document.createElement("label");e.innerHTML=this.title,null!==this.description&&xt(e,{content:this.description,animation:"shift-away",arrow:!0,hideOnClick:!1}),t.appendChild(e);let i=document.createElement("div");i.className="buttonizer-setting-row-c2";for(const t in this.content)i.appendChild(this.customBuild?this.content[t]():this.content[t].build());return this.wrap&&(i.style["flex-wrap"]="wrap"),this.element.appendChild(t),this.element.appendChild(i),this.element}hide(){this.element.style.display="none"}show(){this.element.style.display="",this.element.classList.remove("disabled")}disable(){this.element.classList+=" disabled"}}class At{constructor(t){this.parent=t.parentObject,this.element=document.createElement("div"),this.dataEntry=t.dataEntry,this.default=void 0===t.default?"":t.default,this.callback=void 0===t.callback?()=>{}:t.callback,this.onClick=void 0===t.onClick?null:t.onClick,this.input=HTMLElement,this.onlyNumbers=void 0!==t.onlyNumbers&&t.onlyNumbers,this.parent.registerUI(this.dataEntry,this),this.placeholder=void 0===t.placeholder?"":t.placeholder,this.title=void 0===t.title?"":t.title,this.fieldWidth=void 0===t.width?"default":t.width,this.hidden=void 0!==t.hidden&&t.hidden}build(){this.element=document.createElement("div"),this.element.className="buttonizer-input-container is-textfield input-field-width-"+this.fieldWidth,this.element.style.marginRight="7px";let t=document.createElement("div");t.className="buttonizer-input-item";let e=document.createElement("input");e.type="text",e.value=this.parent.get(this.dataEntry,this.default),this.onlyNumbers&&e.addEventListener("keyup",t=>{(isNaN(e.value)||e.value<0)&&(e.value=this.default,new s({title:window.Buttonizer.translate("errors.forms.only_numbers"),content:"<p>"+window.Buttonizer.translate("errors.forms.only_numbers_info")+"</p>",buttons:[{text:window.Buttonizer.translate("modal.close"),close:!0,focus:!0}]}))}),null!==this.onClick&&e.addEventListener("click",t=>this.onClick(t,e)),e.addEventListener("change",()=>{this.onlyNumbers&&(isNaN(e.value)||e.value<0)&&(e.value=this.default),this.parent.set(this.dataEntry,e.value)}),""!==this.placeholder&&e.setAttribute("placeholder",this.placeholder),t.appendChild(e),this.element.appendChild(t);let i=document.createElement("div");return i.className="buttonizer-input-info",i.innerHTML=this.title,this.element.appendChild(i),this.input=e,this.hidden&&this.hide(),""!==this.title?this.element:(this.input.className="buttonizer-input-only",this.input)}hide(){this.element.style.display="none",this.input.style.display="none"}show(){this.element.style.display="",this.input.style.display=""}update(t){this.input.value=t,this.callback(t)}}class It{constructor(t){this.parentObject=t.parentObject,this.element=document.createElement("a"),this.dataEntry=t.dataEntry,this.state=this.parentObject.get(this.dataEntry,t.default),this.parentObject.registerUI(this.dataEntry,this),this.disabled=void 0!==t.disabled&&t.disabled,this.visible=void 0===t.visible||t.visible,this.callback=void 0!==t.callback?t.callback:t=>{},this.class=void 0===t.class?"":t.class}build(){this.element.href="javascript:void(0)",this.element.className="buttonizer-boolean "+(!0===this.state||"true"===this.state?"boolean-selected":"")+" "+this.class,this.element.addEventListener("click",()=>this.toggle());let t=document.createElement("div");return t.className="buttonizer-boolean-circle",this.element.appendChild(t),this.element}hide(){this.element.style.display="none"}show(){this.element.style.display="block"}toggle(){this.disabled?console.log("Sorry, you're not able to edit this"):(!0===this.state||"true"===this.state?this.state=!1:this.state=!0,this.parentObject.set(this.dataEntry,this.state),void 0!==this.callback&&this.callback(this.state))}update(t){this.state=t,!0===t||"true"===t?this.element.classList.contains("boolean-selected")||this.element.classList.add("boolean-selected"):this.element.classList.contains("boolean-selected")&&this.element.classList.remove("boolean-selected"),this.callback(t)}enable(){this.disabled=!1}disable(){this.disabled=!0}}class Mt extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.label.title"),description:window.Buttonizer.translate("settings.label.description"),wrap:!0,class:"form-has-extra-fields",content:[new At({parentObject:t,dataEntry:"label",default:t.get("label"),placeholder:window.Buttonizer.translate("settings.label.placeholder")})]})}}var Ht=i(5),qt=i(2);const Pt="url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E\")",Dt=360,Ft="keydown",Rt="mousedown",Wt="focusin";function Ut(t,e){return(e||document).querySelector(t)}function Gt(t,e,i){t.addEventListener(e,i,!1)}function Qt(t){t.preventDefault(),t.stopPropagation()}function $t(t,e,i,n){Gt(t,Ft,function(t){e.indexOf(t.key)>=0&&(n&&Qt(t),i(t))})}const Yt=document.createElement("style");Yt.textContent=".picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.layout_default.picker_wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:'';display:block;width:100%;height:0;-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}.layout_default .picker_sl::before{content:'';display:block;padding-bottom:100%}.layout_default .picker_editor{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1;width:6rem}.layout_default .picker_editor input{width:calc(100% + 2px);height:calc(100% + 2px)}.layout_default .picker_sample{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1;-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}.layout_default .picker_done{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.picker_wrapper{-webkit-box-sizing:border-box;box-sizing:border-box;background:#f2f2f2;-webkit-box-shadow:0 0 0 1px silver;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{margin:-1px}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid white;border-radius:100%;-webkit-box-shadow:0 0 3px 1px #67b9ff;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:-webkit-gradient(linear, left top, right top, from(red), color-stop(yellow), color-stop(lime), color-stop(cyan), color-stop(blue), color-stop(magenta), to(red));background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);-webkit-box-shadow:0 0 0 1px silver;box-shadow:0 0 0 1px silver}.picker_sl{position:relative;-webkit-box-shadow:0 0 0 1px silver;box-shadow:0 0 0 1px silver;background-image:-webkit-gradient(linear, left top, left bottom, from(white), color-stop(50%, rgba(255,255,255,0))),-webkit-gradient(linear, left bottom, left top, from(black), color-stop(50%, rgba(0,0,0,0))),-webkit-gradient(linear, left top, right top, from(gray), to(rgba(128,128,128,0)));background-image:linear-gradient(180deg, white, rgba(255,255,255,0) 50%),linear-gradient(0deg, black, rgba(0,0,0,0) 50%),linear-gradient(90deg, gray, rgba(128,128,128,0))}.picker_alpha,.picker_sample{position:relative;background:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='2' height='2'%3E%3Cpath d='M1,0H0V1H2V2H1' fill='lightgrey'/%3E%3C/svg%3E\") left top/contain white;-webkit-box-shadow:0 0 0 1px silver;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:monospace;padding:.1em .2em}.picker_sample::before{content:'';position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_done button{-webkit-box-sizing:border-box;box-sizing:border-box;padding:.2em .5em;cursor:pointer}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;-webkit-box-shadow:0 0 10px 1px rgba(0,0,0,0.4);box-shadow:0 0 10px 1px rgba(0,0,0,0.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:\"\";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;-webkit-box-shadow:none;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}",document.documentElement.firstElementChild.appendChild(Yt);var Vt=class{constructor(t){this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex"},this._openProxy=(t=>this.openHandler(t)),this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(t)}setOptions(t){if(!t)return;const e=this.settings;if(t instanceof HTMLElement)e.parent=t;else{e.parent&&t.parent&&e.parent!==t.parent&&(e.parent.removeEventListener("click",this._openProxy,!1),this._popupInited=!1),function(t,e,i){for(const n in t)i&&i.indexOf(n)>=0||(e[n]=t[n])}(t,e),t.onChange&&(this.onChange=t.onChange),t.onDone&&(this.onDone=t.onDone),t.onOpen&&(this.onOpen=t.onOpen),t.onClose&&(this.onClose=t.onClose);const i=t.color||t.colour;i&&this._setColor(i)}const i=e.parent;i&&e.popup&&!this._popupInited?(Gt(i,"click",this._openProxy),$t(i,[" ","Spacebar","Enter"],this._openProxy),this._popupInited=!0):t.parent&&!e.popup&&this.show()}openHandler(t){if(this.show()){t&&t.preventDefault(),this.settings.parent.style.pointerEvents="none";const e=t&&t.type===Ft?this._domEdit:this.domElement;setTimeout(()=>e.focus(),100),this.onOpen&&this.onOpen(this.colour)}}closeHandler(t){const e=t&&t.type;let i=!1;t?("click"!==e&&e!==Ft||Qt(t),i=!0):i=!0,i&&this.hide()&&(this.settings.parent.style.pointerEvents="",e!==Rt&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}movePopup(t,e){this.closeHandler(),this.setOptions(t),e&&this.openHandler()}setColor(t,e){this._setColor(t,{silent:e})}_setColor(t,e){if("string"==typeof t&&(t=t.trim()),!t)return;let i;e=e||{};try{i=new Ht(t)}catch(t){if(e.failSilently)return;throw t}if(!this.settings.alpha){const t=i.hsla;t[3]=1,i.hsla=t}this.colour=this.color=i,this._setHSLA(null,null,null,null,e)}setColour(t,e){this.setColor(t,e)}show(){if(!this.settings.parent)return!1;if(this.domElement){const t=this._toggleDOM(!0);return this._setPosition(),t}const t=function(t){const e=document.createElement("div");return e.innerHTML=t,e.firstElementChild}(this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div></div>');return this.domElement=t,this._domH=Ut(".picker_hue",t),this._domSL=Ut(".picker_sl",t),this._domA=Ut(".picker_alpha",t),this._domEdit=Ut(".picker_editor input",t),this._domSample=Ut(".picker_sample",t),this._domOkay=Ut(".picker_done button",t),t.classList.add("layout_"+this.settings.layout),this.settings.alpha||t.classList.add("no_alpha"),this.settings.editor||t.classList.add("no_editor"),this._ifPopup(()=>t.classList.add("popup")),this._setPosition(),this.colour?this._updateUI():this._setColor("#0cf"),this._bindEvents(),!0}hide(){return this._toggleDOM(!1)}_bindEvents(){const t=this,e=this.domElement;function i(t,e){function i(i,n){const o=n[0]/t.clientWidth,s=n[1]/t.clientHeight;e(o,s)}return{container:t,dragOutside:!1,callback:i,callbackDragStart:i,propagateEvents:!0}}Gt(e,"click",t=>t.preventDefault()),qt(i(this._domH,(e,i)=>t._setHSLA(e))),qt(i(this._domSL,(e,i)=>t._setHSLA(null,e,1-i))),this.settings.alpha&&qt(i(this._domA,(e,i)=>t._setHSLA(null,null,null,1-i)));const n=this._domEdit;Gt(n,"input",function(e){t._setColor(this.value,{fromEditor:!0,failSilently:!0})}),Gt(n,"focus",function(t){const e=this;e.selectionStart===e.selectionEnd&&e.select()});const o=t=>{this._ifPopup(()=>this.closeHandler(t)),this.onDone&&this.onDone(this.colour)};this._ifPopup(()=>{const t=t=>this.closeHandler(t);Gt(window,Rt,t),Gt(window,Wt,t),$t(e,["Esc","Escape"],t),Gt(e,Rt,Qt),Gt(e,Wt,Qt),Gt(this._domEdit,Rt,t=>this._domEdit.focus())}),Gt(this._domOkay,"click",o),$t(e,["Enter"],o)}_setPosition(){const t=this.settings.parent,e=this.domElement;t!==e.parentNode&&t.appendChild(e),this._ifPopup(i=>{"static"===getComputedStyle(t).position&&(t.style.position="relative");const n=!0===i?"popup_right":"popup_"+i;["popup_top","popup_bottom","popup_left","popup_right"].forEach(t=>{t===n?e.classList.add(t):e.classList.remove(t)}),e.classList.add(n)})}_setHSLA(t,e,i,n,o){o=o||{};const s=this.colour,r=s.hsla;[t,e,i,n].forEach((t,e)=>{(t||0===t)&&(r[e]=t)}),s.hsla=r,this._updateUI(o),this.onChange&&!o.silent&&this.onChange(s)}_updateUI(t){if(!this.domElement)return;t=t||{};const e=this.colour,i=e.hsla,n=`hsl(${i[0]*Dt}, 100%, 50%)`,o=e.hslString,s=e.hslaString,r=this._domH,a=this._domSL,l=this._domA,u=Ut(".picker_selector",r),c=Ut(".picker_selector",a),d=Ut(".picker_selector",l);function p(t,e,i){e.style.left=100*i+"%"}function h(t,e,i){e.style.top=100*i+"%"}p(0,u,i[0]),this._domSL.style.backgroundColor=this._domH.style.color=n,p(0,c,i[1]),h(0,c,1-i[2]),a.style.color=o,h(0,d,1-i[3]);const m=o,b=m.replace("hsl","hsla").replace(")",", 0)"),f=`linear-gradient(${[m,b]})`;if(this._domA.style.backgroundImage=f+", "+Pt,!t.fromEditor){const t=this.settings.editorFormat,i=this.settings.alpha;let n;switch(t){case"rgb":n=e.printRGB(i);break;case"hsl":n=e.printHSL(i);break;default:n=e.printHex(i)}this._domEdit.value=n}this._domSample.style.color=s}_ifPopup(t,e){this.settings.parent&&this.settings.popup?t&&t(this.settings.popup):e&&e()}_toggleDOM(t){const e=this.domElement;if(!e)return!1;const i=t?"":"none",n=e.style.display!==i;return n&&(e.style.display=i),n}static get StyleElement(){return Yt}};class Xt{constructor(t){this.parent=t.parentObject,this.element=document.createElement("div"),this.dataEntry=t.dataEntry,this.default=void 0===t.default?"":t.default,this.callback=void 0===t.callback?()=>{}:t.callback,this.style=void 0===t.style?{}:t.style,this.parent.registerUI(this.dataEntry,this),this.currentColor=this.parent.get(this.dataEntry,this.default),this.title=void 0===t.title?"Color":t.title,this.timer=setTimeout(()=>{},0),this.opened=!1,this.element=HTMLElement,this.colorView=HTMLElement,this.colorPicker=HTMLElement,("#fffff"===this.currentColor||"#FFFFF"===this.currentColor||this.currentColor.length<=6)&&(this.currentColor="#FFFFFF")}build(){this.buildVisiblePicker();let t=new Vt({parent:this.element,popup:"bottom",alpha:!0,color:this.currentColor,onChange:t=>{this.currentColor!==t.rgbaString&&(this.currentColor=t.rgbaString,this.parent.set(this.dataEntry,t.rgbaString))}});return this.element.addEventListener("click",()=>{t.show()}),this.colorPicker=t,this.element}buildVisiblePicker(){this.element=document.createElement("div"),this.element.className="buttonizer-input-container is-color-picker",this.element.style.marginRight="7px";let t=document.createElement("div");t.className="buttonizer-input-item",this.colorView=document.createElement("div"),this.colorView.style.background=this.currentColor,this.colorView.className="colored-background",t.appendChild(this.colorView),this.element.appendChild(t);let e=document.createElement("div");e.className="buttonizer-input-info",e.innerHTML=this.title,this.element.appendChild(e)}onSelect(t){this.callback=t}hide(){this.element.style.display="none"}show(){this.element.style.display="block"}update(t){clearTimeout(this.timer),this.colorView.style.background=t,this.colorPicker.color=t,this.timer=setTimeout(()=>this.callback(t),1500)}}class Kt extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.icon_color.title"),description:window.Buttonizer.translate("settings.icon_color.description"),rowName:"icon-color",parentObject:t,hidden:window.Buttonizer.hasPremium()&&"true"==t.get("icon_is_image"),content:[new Xt({parentObject:t,dataEntry:"icon_color",title:window.Buttonizer.translate("utils.base"),default:"#FFFFFF",width:"space"}),new Xt({parentObject:t,dataEntry:"icon_color_interaction",title:window.Buttonizer.translate("utils.interaction"),default:"#FFFFFF",width:"space"})]})}}class Jt extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.icon_size.title"),description:window.Buttonizer.translate("settings.icon_size.description"),rowName:"icon-size",parentObject:t,hidden:window.Buttonizer.hasPremium()&&"true"==t.get("icon_is_image"),content:[new At({title:"px",placeholder:"button"===t.type?16:25,width:"space",dataEntry:"icon_size",parentObject:t,onlyNumbers:!0,default:"button"===t.type?16:25})]})}}class Zt extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.border_radius.title"),description:window.Buttonizer.translate("settings.border_radius.description"),hidden:"button"===t.type&&"false"!==t.get("use_main_button_style"),rowName:"border-radius",parentObject:t,content:[new At({parentObject:t,dataEntry:"border_radius",default:"",placeholder:50,title:"%",width:"space",onlyNumbers:!0})]})}}class te extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.font_size_border_radius.title"),description:window.Buttonizer.translate("settings.font_size_border_radius.description"),content:[new At({title:"px",placeholder:12,width:"space",dataEntry:"label_font_size",parentObject:t,onlyNumbers:!0}),new At({title:"px",placeholder:3,width:"space",dataEntry:"label_border_radius",parentObject:t,onlyNumbers:!0})]})}}class ee{constructor(t){this.parentObject=t.parentObject,this.element=document.createElement("a"),this.dataEntry=t.dataEntry,this.default=t.default,this.callback=t.callback,this.type=t.type,this.data=t,this.title=t.title,this.state=this.parentObject.get(this.dataEntry,this.default),this.parentObject.registerUI(this.dataEntry,this),this.disabled=void 0!==t.disabled&&t.disabled,this.visible=void 0===t.visible||t.visible}build(){this.element.href="javascript:void(0)",this.element.className=`buttonizer-checkbox ${"Mobile"===this.title?"mobile-checkbox":"desktop-checkbox"}`;let t=document.createElement("div");t.className="buttonizer-checkbox-box",t.innerHTML="&#10003;",this.element.appendChild(t),this.element.addEventListener("click",()=>this.toggle());let e=document.createElement("div");return e.className="buttonizer-checkbox-text",e.innerHTML=this.title,this.element.appendChild(e),this.update(this.state),this.eventListener(this.type),this.element}hide(){this.element.style.display="none"}show(){this.element.style.display="block"}toggle(){this.disabled?console.log("Sorry, you're not able to edit this"):(!0===this.state||"true"===this.state?this.parentObject.set(this.dataEntry,!1):this.parentObject.set(this.dataEntry,!0),"undefined"!=typeof callback&&this.callback(this.state))}update(t){this.state=t,!0===t||"true"===t?this.element.classList.contains("checkbox-selected")||this.element.classList.add("checkbox-selected"):this.element.classList.contains("checkbox-selected")&&this.element.classList.remove("checkbox-selected")}eventListener(t){"button"===t&&this.element.addEventListener("click",()=>{let t=this.parentObject.buttonHTMLObject.querySelector(".mobile-preview"),e=this.parentObject.buttonHTMLObject.querySelector(".fa-mobile-alt").parentElement,i=this.parentObject.buttonHTMLObject.querySelector(".desktop-preview"),n=this.parentObject.buttonHTMLObject.querySelector(".fa-desktop").parentElement;"Mobile"===this.title?t.classList.contains("selected")&&!1===this.state?(t.classList.remove("selected"),e.classList.remove("selected")):t.classList.contains("selected")||!0!==this.state||(t.classList+=" selected",e.classList+=" selected"):"Desktop"===this.title&&(i.classList.contains("selected")&&!1===this.state?(i.classList.remove("selected"),n.classList.remove("selected")):i.classList.contains("selected")||!0!==this.state||(i.classList+=" selected",n.classList+=" selected"))})}}class ie extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.show_mobile_desktop.title"),description:window.Buttonizer.translate("settings.show_mobile_desktop.description"),content:[new ee({parentObject:t,dataEntry:"show_mobile",title:window.Buttonizer.translate("settings.show_mobile_desktop.mobile"),default:!0,type:"button"===t.type?"button":"group"}),new ee({parentObject:t,dataEntry:"show_desktop",title:window.Buttonizer.translate("settings.show_mobile_desktop.desktop"),default:!0,type:"button"===t.type?"button":"group"})]})}}class ne extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.background_color.title"),description:window.Buttonizer.translate("settings.background_color.description"),hidden:"button"===t.type&&"false"!==t.get("use_main_button_style"),rowName:"background-color",parentObject:t,content:[new Xt({parentObject:t,dataEntry:"background_color",title:window.Buttonizer.translate("utils.base"),default:"#f08419"}),new Xt({parentObject:t,dataEntry:"background_color_interaction",title:window.Buttonizer.translate("utils.interaction"),default:"#ff9d3c"})]})}}class oe{constructor(t){this.parentObject=t.parentObject,this.element=document.createElement("select"),this.dataEntry=t.dataEntry,this.default=t.default,this.callback=t.callback,this.style=t.style,this.list=t.list,this.width=void 0===t.width?"199px":t.width,this.class=void 0===t.class?"buttonizer-select-drawer":t.class,this.parentObject.registerUI(this.dataEntry,this)}build(){this.element.style.width=this.width,this.element.className=this.class,this.element.addEventListener("change",t=>{this.parentObject.set(this.dataEntry,this.element.value)});for(let t in this.list){let e=this.list[t],i=document.createElement("option");i.text=e.text,i.value=e.value,i.selected=void 0!==typeof this.selected&&this.selected===e.value,void 0!==e.disabled&&e.disabled&&(i.disabled=!0),this.element.appendChild(i)}return this.element.value=this.parentObject.get(this.dataEntry,this.default),this.element}hide(){this.element.style.display="none"}show(){this.element.style.display="block"}update(t){this.element.value=t,void 0!==this.callback&&this.callback(t,this)}}class se extends Nt{constructor(t){super({title:'<span class="setting-icon"><i class="fa fa-desktop"></i></span> '+window.Buttonizer.translate("settings.label_desktop.title"),description:window.Buttonizer.translate("settings.label_desktop.description"),content:[new oe({parentObject:t,dataEntry:"show_label_desktop",default:"always",list:[{value:"always",text:window.Buttonizer.translate("settings.label_styles.always")},{value:"hover",text:window.Buttonizer.translate("settings.label_styles.hover")},{value:"hide",text:window.Buttonizer.translate("settings.label_styles.hide")}]})]})}}class re extends Nt{constructor(t){super({title:'<span class="setting-icon"><i class="fa fa-mobile-alt"></i></span> '+window.Buttonizer.translate("settings.label_mobile.title"),description:window.Buttonizer.translate("settings.label_mobile.description"),content:[new oe({parentObject:t,dataEntry:"show_label_mobile",default:"always",list:[{value:"always",text:window.Buttonizer.translate("settings.label_styles.always")},{value:"hide",text:window.Buttonizer.translate("settings.label_styles.hide")}]})]})}}class ae extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.label_color.title"),description:window.Buttonizer.translate("settings.label_color.description"),hidden:"button"===t.type&&"false"!==t.get("use_main_button_style"),rowName:"label-color",parentObject:t,content:[new Xt({parentObject:t,dataEntry:"label_color",title:window.Buttonizer.translate("utils.text"),default:"#FFFFFF"}),new Xt({parentObject:t,dataEntry:"label_background_color",title:window.Buttonizer.translate("utils.background"),default:"#4E4C4C"})]})}}class le extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.icon.title"),description:window.Buttonizer.translate("settings.icon.description"),rowName:"icon",parentObject:t,hidden:window.Buttonizer.hasPremium()&&"true"==t.get("icon_is_image"),content:[new At({parentObject:t,dataEntry:"icon",default:"fa fa-user",onClick:(t,e)=>{window.Buttonizer.iconSelector.open(e)}})]})}}class ue{constructor(t){this.parentObject=t.parentObject,this.button=null,this.selectedImage=null,this.dataEntry=void 0===t.dataEntry?null:t.dataEntry,this.default=void 0===t.default?"":t.default,this.value=t.parentObject.get(t.dataEntry,""),this.callback=t.callback,this.parentObject.registerUI(this.dataEntry,this)}build(){return this.buildFree()}buildFree(){let t=document.createElement("a");return t.className="button",t.href="javascript:void(0)",t.innerHTML='<i class="fa fa-image"></i>&nbsp;&nbsp;'+window.Buttonizer.translate("utils.select_image")+" <small>(premium)</small>",t.addEventListener("click",()=>{window.Buttonizer.showPremiumPopup("You can select images and set them as icon or as button background image.")}),t}}class ce extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.background_image.title"),description:window.Buttonizer.translate("settings.background_image.description"),hidden:"button"===t.type&&"false"!==t.get("use_main_button_style"),rowName:"background-image",parentObject:t,content:[new ue({parentObject:t,dataEntry:"background_image"})]})}}class de extends Nt{constructor(t){super({parentObject:t,title:window.Buttonizer.translate("settings.use_main_button_style.title"),description:window.Buttonizer.translate("settings.use_main_button_style.description"),class:"is-boolean-only",rowName:"use_main_button_style",content:[new It({parentObject:t,dataEntry:"use_main_button_style",default:"true",callback:t=>this.update(t)})]}),this.parent=t}update(t){!0===t||"true"===t?(this.parent.getUI("background-color-container").forEach(t=>{t.disable()}),this.parent.getUI("label-color-container").forEach(t=>{t.disable()}),this.parent.getUI("border-radius-container").forEach(t=>{t.disable()}),this.parent.getUI("background-image-container").forEach(t=>{t.disable()})):(this.parent.getUI("background-color-container").forEach(t=>{t.show()}),this.parent.getUI("label-color-container").forEach(t=>{t.show()}),this.parent.getUI("border-radius-container").forEach(t=>{t.show()}),this.parent.getUI("background-image-container").forEach(t=>{t.show()}))}}class pe{constructor(t){this.parentObject=t.parentObject,this.element=document.createElement("div"),this.dataEntry=void 0===t.dataEntry?null:t.dataEntry,this.default=void 0!==t.default&&t.default,this.state=void 0!==t.state&&"true"==t.state,this.first=void 0===t.first?"First":t.first,this.second=void 0===t.second?"Second":t.second,this.callback=t.callback,null!==this.dataEntry&&this.parentObject.registerUI(this.dataEntry,this)}build(){this.element.className="buttonizer-toggle"+(!0===this.state?" right-selected":" left-selected");let t=document.createElement("a");t.href="javascript:void(0)",t.innerHTML=this.first,t.addEventListener("click",()=>this.toggle()),this.element.appendChild(t);let e=document.createElement("a");return e.href="javascript:void(0)",e.innerHTML=this.second,e.addEventListener("click",()=>this.toggle()),this.element.appendChild(e),this.element}toggle(){null!==this.dataEntry?this.parentObject.set(this.dataEntry,!this.state):this.callback(!1)}update(t){this.state=t,!1===t?(this.element.classList.add("left-selected"),this.element.classList.remove("right-selected")):(this.element.classList.remove("left-selected"),this.element.classList.add("right-selected")),this.callback(t)}hide(){this.element.style.display="none"}show(){this.element.style.display="block"}}class he extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.icon_or_image.title"),description:window.Buttonizer.translate("settings.icon_or_image.description"),useCustomBuild:!0,content:[()=>this.buildBoolean()]}),this.parent=t}buildBoolean(){return new pe({parentObject:this.parent,state:!1,first:window.Buttonizer.translate("utils.icon"),second:window.Buttonizer.translate("utils.image")+" <small>(premium)</small>",callback:()=>{window.Buttonizer.showPremiumPopup("You can select an custom image as icon for your buttons and groups.")}}).build()}}class me extends Nt{constructor(t){super({parentObject:t,title:window.Buttonizer.translate("settings.menu_position.title"),description:window.Buttonizer.translate("settings.menu_position.description"),wrap:!0,class:"form-has-extra-fields",rowName:"position",content:[new oe({parentObject:t,dataEntry:"position",default:"bottomright",callback:t=>this.changePosition(t),list:[{value:"bottomright",text:window.Buttonizer.translate("settings.menu_position.positions.bottomright")},{value:"bottomleft",text:window.Buttonizer.translate("settings.menu_position.positions.bottomleft")},{value:"topright",text:window.Buttonizer.translate("settings.menu_position.positions.topright")},{value:"topleft",text:window.Buttonizer.translate("settings.menu_position.positions.topleft")},{value:"advanced",text:window.Buttonizer.translate("settings.menu_position.positions.advanced")}]}),new At({parentObject:t,dataEntry:"horizontal",title:"X&nbsp;&lpar;&percnt;&rpar;",width:"space",hidden:"advanced"!==t.get("position"),onlyNumbers:!0}),new At({parentObject:t,dataEntry:"vertical",title:"Y&nbsp;&lpar;&percnt;&rpar;",width:"space",hidden:"advanced"!==t.get("position"),onlyNumbers:!0})]}),this.translatedPositions={topleft:{x:95,y:95},topright:{x:5,y:95},bottomleft:{x:95,y:5},bottomright:{x:5,y:5}},this.parentObject=t}changePosition(t){"advanced"===t?(this.parentObject.getUI("horizontal").forEach(t=>t.show()),this.parentObject.getUI("vertical").forEach(t=>t.show())):(this.parentObject.getUI("horizontal").forEach(t=>t.hide()),this.parentObject.getUI("vertical").forEach(t=>t.hide()),this.parentObject.set("horizontal",this.translatedPositions[t].x),this.parentObject.set("vertical",this.translatedPositions[t].y))}}class be extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.menu_animation.title"),description:window.Buttonizer.translate("settings.menu_animation.description"),parentObject:t,rowName:"animation",content:[new oe({parentObject:t,dataEntry:"menu_animation",default:"none",list:[{value:"none",text:window.Buttonizer.translate("settings.menu_animation.animations.none")},{value:"hello",text:window.Buttonizer.translate("settings.menu_animation.animations.hello")},{value:"bounce",text:window.Buttonizer.translate("settings.menu_animation.animations.bounce")},{value:"pulse",text:window.Buttonizer.translate("settings.menu_animation.animations.pulse")+(window.Buttonizer.hasPremium()?"":" (PRO)"),disabled:!window.Buttonizer.hasPremium()},{value:"jelly",text:window.Buttonizer.translate("settings.menu_animation.animations.jelly")+(window.Buttonizer.hasPremium()?"":" (PRO)"),disabled:!window.Buttonizer.hasPremium()}]})]})}}class fe extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.menu_style.title"),description:window.Buttonizer.translate("settings.menu_style.description"),parentObject:t,rowName:"style",content:[new oe({parentObject:t,dataEntry:"menu_style",default:"default",list:[{value:"default",text:window.Buttonizer.translate("settings.menu_style.styles.default")},{value:"faded",text:window.Buttonizer.translate("settings.menu_style.styles.faded"),hidden:!0},{value:"corner-circle",text:window.Buttonizer.translate("settings.menu_style.styles.cornercircle"),hidden:!0},{value:"building-up",text:window.Buttonizer.translate("settings.menu_style.styles.buildingup"),hidden:!0},{value:"pop",text:window.Buttonizer.translate("settings.menu_style.styles.pop"),hidden:!0},{value:"square",text:window.Buttonizer.translate("settings.menu_style.styles.square")},{value:"rectangle",text:window.Buttonizer.translate("settings.menu_style.styles.rectangle")}]})]})}}class we{constructor(t){this.buttonObject=t,this.groupSetting=HTMLElement,this.formElements={useMainButtonStyle:void 0,buttonColor:void 0,borderColor:void 0,borderRadius:void 0,backgroundImage:void 0,buttonIconSelect:void 0,buttonIconColor:void 0,buttonIconSize:void 0,buttonImageSelect:void 0,buttonImageIcon:void 0,buttonImageIconSelect:void 0,imageBorderRadius:void 0,imageSize:void 0,label:void 0,labelColor:void 0,labelFontSizeBorderRadius:void 0,show_label:void 0,showOnOpeningTimes:void 0,buttonCustomClass:void 0}}build(){let t=document.createElement("div");return t.className="button-group-styling",t.style.display="none",this.element=t,this.buildForm(),this.buttonObject.stylingObject=t,this.element}buildForm(){this.element.appendChild(this.generalSetting()),this.element.appendChild(this.buttonStyle()),this.element.appendChild(this.iconStyle()),this.element.appendChild(this.labelStyle()),this.element.appendChild(this.advancedSettings())}advancedSettings(){let t=document.createElement("a");return t.href="javascript:void(0)",t.className="advanced-settings"+(window.Buttonizer.hasPremium()?"":" buttonizer-premium-gray-out"),t.innerHTML="<i></i> "+window.Buttonizer.translate("utils.advanced_settings")+(window.Buttonizer.hasPremium()?"":" <span class='buttonizer-premium'>PRO</span>"),t.addEventListener("click",()=>{this.buttonObject.windowObject.toggle()}),t}generalSetting(){let t=document.createElement("div");return t.className="style-top",this.groupSetting=document.createElement("div"),this.groupSetting.className="style-group",this.formElements.menuPosition=new me(this.buttonObject.groupObject),this.groupSetting.appendChild(this.formElements.menuPosition.build()),this.formElements.menuPosition.element.style.display="none",this.formElements.menuAnimation=new be(this.buttonObject.groupObject),this.groupSetting.appendChild(this.formElements.menuAnimation.build()),this.formElements.menuAnimation.element.style.display="none",this.formElements.menuStyle=new fe(this.buttonObject.groupObject),this.groupSetting.appendChild(this.formElements.menuStyle.build()),this.formElements.menuStyle.element.style.display="none",t.appendChild(this.groupSetting),this.formElements.buttonAction=new Tt(this),t.appendChild(this.formElements.buttonAction.build()),this.formElements.isMobile=new ie(this.buttonObject),t.appendChild(this.formElements.isMobile.build()),t}buttonStyle(){let t=document.createElement("div");t.className="style-button";let e=document.createElement("h2");return e.innerHTML="<i></i><span>"+window.Buttonizer.translate("settings.setting_categories.button_style")+"</span>",t.appendChild(e),this.formElements.useMainButtonStyle=new de(this.buttonObject),t.appendChild(this.formElements.useMainButtonStyle.build()),this.formElements.buttonColor=new ne(this.buttonObject),t.appendChild(this.formElements.buttonColor.build()),this.formElements.borderRadius=new Zt(this.buttonObject),t.appendChild(this.formElements.borderRadius.build()),this.formElements.backgroundImage=new ce(this.buttonObject),t.appendChild(this.formElements.backgroundImage.build()),this.formElements.labelColor=new ae(this.buttonObject),t.appendChild(this.formElements.labelColor.build()),t}iconStyle(){let t=document.createElement("div");t.className="style-icon";let e=document.createElement("h2");return e.innerHTML="<i></i><span>"+window.Buttonizer.translate("settings.setting_categories.button_icon")+"</span>",t.appendChild(e),this.formElements.buttonIconOrImage=new he(this.buttonObject),t.appendChild(this.formElements.buttonIconOrImage.build()),this.formElements.buttonIconSelect=new le(this.buttonObject),t.appendChild(this.formElements.buttonIconSelect.build()),this.formElements.buttonIconColor=new Kt(this.buttonObject),t.appendChild(this.formElements.buttonIconColor.build()),this.formElements.buttonIconSize=new Jt(this.buttonObject),t.appendChild(this.formElements.buttonIconSize.build()),t}labelStyle(){let t=document.createElement("div");t.className="style-label";let e=document.createElement("h2");return e.innerHTML="<i></i><span>"+window.Buttonizer.translate("settings.setting_categories.label")+"</span>",t.appendChild(e),this.formElements.buttonLabel=new Mt(this.buttonObject),t.appendChild(this.formElements.buttonLabel.build()),this.formElements.show_label=new se(this.buttonObject),t.appendChild(this.formElements.show_label.build()),this.formElements.show_label_mobile=new re(this.buttonObject),t.appendChild(this.formElements.show_label_mobile.build()),this.formElements.buttonLabelFontSizeBorderRadius=new te(this.buttonObject),t.appendChild(this.formElements.buttonLabelFontSizeBorderRadius.build()),t}}var ge=class{constructor(t,e){this.type="button",this.groupObject=t,this.alive=!0,this.data=e,this.ui=[],this.buttonName=e.name,this.id=-1,this.settingsOpened=!1,this.buttonHTMLObject=HTMLElement,this.buttonIconObject=HTMLElement,this.buttonTitleObject=HTMLElement,this.windowObject=HTMLElement,this.stylingObject=void 0,this.stylingObject=HTMLElement,this.settingsObject={},this.buildButton(),this.windowObject=new m(this),this.groupObject.registerButton(this)}buildButton(){let t=document.createElement("div");t.className="buttonizer-button-group group-button",t.appendChild(new Bt(this).build()),this.settingsObject=new we(this),Buttonizer.bar.settingContent.appendChild(this.settingsObject.build());var e=!1,i=!1;const n=xt(t,{content:window.Buttonizer.translate("bar.buttons.tippy_drag_warning"),animation:"shift-away",arrow:!0,hideOnClick:!1,trigger:"manual",onShow:()=>{i=!0,setTimeout(()=>{i=!1,n.hide()},5e3)}});t.addEventListener("mousedown",()=>{i||(e=!0)}),t.addEventListener("mouseout",()=>{e&&null!==jQuery(this.groupObject.groupBody).sortable("option","cancel")&&(e=!1,n.show())}),t.addEventListener("mouseup",()=>{e=!1}),this.buttonHTMLObject=t,this.groupObject.groupBody.appendChild(this.buttonHTMLObject)}removeButton(){this.alive=!1,this.buttonHTMLObject.remove(),window.Buttonizer.buttonChanges=!0,this.groupObject.buttonsAmount<=1&&jQuery(this.groupObject.groupBody).sortable("option","cancel",".group-button"),1===this.groupObject.getButtonsAlive()!==this.groupObject.singleButtonMode&&(this.groupObject.singleButtonMode=1===this.groupObject.getButtonsAlive(),this.groupObject.getButtons()[0].set("icon_size","25"),this.groupObject.groupHolder.setSingleButtonMode())}set(t,e){this.data[t]=e,this.ui[t].forEach(t=>t.update(e)),window.Buttonizer.buttonChanges=!0}get(t,e){return void 0!==this.data[t]?this.data[t]:(this.data[t]=e,window.Buttonizer.buttonChanges=!0,e)}registerUI(t,e){void 0!==this.ui[t]?this.ui[t].push(e):this.ui[t]=[e]}getUI(t){return void 0!==this.ui[t]&&this.ui[t]}revealSettings(){this.buttonHTMLObject.classList.add("opened"),this.stylingObject.style.display="block",Buttonizer.bar.showSettings(this.get("name"),()=>this.closeSettings())}closeSettings(){this.stylingObject.style.display="none",this.buttonHTMLObject.classList.remove("opened")}};var ye=class{constructor(t){this.groupObject=t,this.groupObject.stylingObject=this,this.groupHolder=null,this.titleElement=null,this.arrow=HTMLElement}build(){let t=document.createElement("div");return t.className="button-group-holder",t.appendChild(this.groupArrow()),t.appendChild(this.createTitle()),t.appendChild(this.groupSettingsButton()),t.appendChild(this.createButtonHolderButton()),t.appendChild(this.createQuickMenu()),this.groupHolder=t,t}createButtonHolderButton(){let t=document.createElement("a");t.href="javascript:void(0)",t.className="holder-button";let e=document.createElement("i");return e.className="fas fa-ellipsis-v",t.appendChild(e),t.addEventListener("click",()=>{let t=this.groupHolder.className.indexOf("holder-show-quick-menu");jQuery(".holder-show-quick-menu").removeClass("holder-show-quick-menu"),-1===t&&this.groupHolder.classList.add("holder-show-quick-menu")}),t}createQuickMenu(){let t=document.createElement("div");return t.className="group-holder-quick-menu",t.addEventListener("click",()=>{this.groupHolder.classList.remove("holder-show-quick-menu")}),t.appendChild(this.createQuickMenuButton("fas fa-plus",window.Buttonizer.translate("bar.buttons.convert_to_group"),()=>{new ge(this.groupObject,{name:window.Buttonizer.translate("common.button")+" 2",show_mobile:"true",show_desktop:"true"}),this.groupObject.getButtons()[0].set("icon_size","16"),this.groupObject.singleButtonMode=!1,this.setSingleButtonMode(),jQuery(this.groupObject.groupBody).sortable("option","cancel",null)},"convert-button")),t.appendChild(this.createQuickMenuButton("fas fa-wrench",window.Buttonizer.translate("common.settings"),()=>this.toggleStyling(),"")),t.appendChild(this.createQuickMenuButton("fas fa-cog",window.Buttonizer.translate("utils.advanced_settings"),()=>{this.groupObject.singleButtonMode?this.groupObject.getButtons()[0].windowObject.toggle():this.groupObject.windowObject.toggle()},window.Buttonizer.hasPremium()?"":"buttonizer-premium-gray-out")),t.appendChild(this.createQuickMenuButton("fas fa-pencil-alt",window.Buttonizer.translate("utils.rename"),()=>this.groupRename(),"")),t.appendChild(this.createQuickMenuButton("far fa-trash-alt",window.Buttonizer.translate("utils.delete"),()=>this.groupDelete(),"delete")),t.firstChild.style.display="none",this.quickMenu=t,t}createQuickMenuButton(t,e,i,n=""){let o=document.createElement("a");o.href="javascript:void(0)",o.className=n;let s=document.createElement("i");return s.className=t,o.appendChild(s),o.innerHTML+=e,o.addEventListener("click",t=>i(t)),o}groupArrow(){let t=document.createElement("a");t.href="javascript:void(0)",t.className="holder-button pull-left has-background group-arrow";let e=document.createElement("i");e.className="fa fa-angle-down buttonizer-arrow-down",t.appendChild(e);let i=document.createElement("i");return i.className="fa fa-angle-up buttonizer-arrow-up",t.appendChild(i),t.addEventListener("click",()=>this.revealButtons()),this.arrow=t,t}createTitle(){let t=document.createElement("input");return t.type="text",t.className="group-title",t.value=this.groupObject.get("name"),t.setAttribute("readonly",""),t.id="buttonizer-group-title",this.titleElement=t,t.addEventListener("blur",()=>this.updateTitle()),t.addEventListener("keyup",e=>{e.preventDefault(),13===e.keyCode?this.updateTitle():27===e.keyCode&&(t.value=this.groupObject.singleButtonMode?this.groupObject.getButtons()[0].data.name:this.groupObject.data.name,t.setAttribute("readonly",""))}),t.addEventListener("click",e=>{jQuery(".holder-show-quick-menu").removeClass("holder-show-quick-menu"),e.isTrusted&&t.hasAttribute("readonly")&&(this.groupObject.singleButtonMode?this.toggleStyling():this.revealButtons())}),t}updateTitle(){(this.groupObject.singleButtonMode?this.groupObject.getButtons()[0]:this.groupObject).data.name=this.titleElement.value,window.Buttonizer.buttonChanges=!0,this.titleElement.setAttribute("readonly","")}groupRename(){this.titleElement.hasAttribute("readonly")&&(this.titleElement.removeAttribute("readonly"),this.titleElement.focus())}groupSettingsButton(){let t=document.createElement("a");t.href="javascript:void(0)",t.className="holder-button group-style";let e=document.createElement("i");return e.className="fas fa-wrench",t.appendChild(e),t.addEventListener("click",t=>{jQuery(".holder-show-quick-menu").removeClass("holder-show-quick-menu"),this.toggleStyling()}),t}toggleStyling(){this.groupObject.singleButtonMode?this.groupObject.getButtons()[0].revealSettings():this.groupObject.groupSettings.show()}groupDelete(){if(this.groupObject.singleButtonMode)return window.Buttonizer.buttonGroups.length<=1?void new s({title:window.Buttonizer.translate("bar.buttons.delete_button.window_title_button"),content:"<p>"+window.Buttonizer.translate("bar.buttons.delete_button.cannot_delete")+"</p>",buttons:[{text:window.Buttonizer.translate("modal.close"),close:!0,focus:!0,confirm:!0}]}):void new s({title:window.Buttonizer.translate("bar.buttons.delete_button.window_title_button"),content:"<p>"+window.Buttonizer.translate("bar.buttons.delete_button.question_button")+"</p>",onConfirm:()=>{this.groupObject.removeGroup(),window.Buttonizer.buttonChanges=!0},buttons:[{text:window.Buttonizer.translate("modal.changed_my_mind"),close:!0,focus:!0},{text:window.Buttonizer.translate("utils.delete"),confirm:!0}]});window.Buttonizer.buttonGroups.length<=1?new s({title:window.Buttonizer.translate("bar.buttons.delete_button.window_title_button"),content:"<p>"+window.Buttonizer.translate("bar.buttons.delete_button.cannot_delete_group")+"</p>",buttons:[{text:window.Buttonizer.translate("modal.close"),close:!0,focus:!0,confirm:!0}]}):new s({title:window.Buttonizer.translate("bar.buttons.delete_button.window_title_group"),content:"<p>"+window.Buttonizer.translate("bar.buttons.delete_button.question_group_multiple_buttons").format(this.groupObject.getButtonsAlive())+"</p>",onConfirm:()=>{this.groupObject.removeGroup(),window.Buttonizer.buttonChanges=!0},buttons:[{text:window.Buttonizer.translate("modal.changed_my_mind"),close:!0,focus:!0},{text:window.Buttonizer.translate("utils.delete"),confirm:!0}]})}revealButtons(){this.groupObject.groupOpened=!this.groupObject.groupOpened,this.groupObject.groupOpened?(this.groupObject.groupObject.classList.add("opened"),jQuery(this.groupObject.groupBody).sortable("enable")):(this.groupObject.groupObject.classList.remove("opened"),jQuery(this.groupObject.groupBody).sortable("disable")),this.groupObject.groupBody.style.display=this.groupObject.groupOpened?"block":"none"}setSingleButtonMode(){if(this.groupObject.singleButtonMode){this.quickMenu.firstChild.style.display="",this.titleElement.value=void 0===this.groupObject.getButtons()[0]?this.groupObject.firstButtonName:this.groupObject.getButtons()[0].data.name,this.groupHolder.classList.add("single-button"),this.groupObject.groupOpened&&this.revealButtons(),this.groupObject.getButtons()[0].set("use_main_button_style","false"),this.groupObject.getButtons()[0].getUI("use_main_button_style-container")[0].element.style.display="none",this.groupObject.getUI("position-container")[1].element.style.display="",this.groupObject.getUI("animation-container")[1].element.style.display="",this.groupObject.getUI("style-container")[1].element.style.display="";for(let t=0;t<this.groupObject.getUI("style-container")[1].content[0].element.length;t++)!0===this.groupObject.getUI("style-container")[1].content[0].list[t].hidden&&(this.groupObject.getUI("style-container")[1].content[0].element[t].style.display="none");this.groupObject.set("single_button_mode","true")}else this.quickMenu.firstChild.style.display="none",this.groupObject.getUI("position-container")[1].element.style.display="none",this.groupObject.getUI("animation-container")[1].element.style.display="none",this.groupObject.getUI("style-container")[1].element.style.display="none",this.groupObject.getButtons()[0].set("use_main_button_style","true"),this.groupObject.getButtons()[0].getUI("use_main_button_style-container")[0].element.style.display="",this.titleElement.value=this.groupObject.data.name,this.groupHolder.classList.remove("single-button"),this.groupObject.set("single_button_mode","false")}};class ve extends Nt{constructor(t){super({title:window.Buttonizer.translate("settings.start_opened.title"),description:window.Buttonizer.translate("settings.start_opened.description"),class:"is-boolean-only",content:[new It({parentObject:t,dataEntry:"start_opened",default:"false"})]})}}var _e=class{constructor(t){this.groupObject=t,this.open=!1,this.formElements={alwaysOpen:void 0,menuStyle:void 0,isMobile:void 0,isDesktop:void 0,attentionAnimation:void 0,buttonColor:void 0,borderRadius:void 0,backgroundImage:void 0,groupPosition:void 0,buttonIconSelect:void 0,buttonIconColor:void 0,buttonIconSize:void 0,buttonImageSelect:void 0,buttonImageBackground:void 0,buttonImageIconSelect:void 0,imageSize:void 0,imageBorderRadius:void 0,buttonLabel:void 0,buttonLabelColor:void 0,buttonLabelSize:void 0,show_label:void 0},this.element=HTMLElement}build(){let t=document.createElement("div");return t.className="button-group-styling hidden",this.element=t,this.hide(),this.buildTop(),this.buildForm(),this.groupObject.stylingObject=t,this.element}buildForm(){this.element.appendChild(this.top()),this.element.appendChild(this.menuStyle()),this.element.appendChild(this.buttonStyle()),this.element.appendChild(this.iconStyle()),this.element.appendChild(this.labelStyle());let t=document.createElement("a");t.href="javascript:void(0)",t.className="advanced-settings"+(window.Buttonizer.hasPremium()?"":" buttonizer-premium-gray-out"),t.innerHTML="<i></i> "+window.Buttonizer.translate("utils.advanced_settings")+(window.Buttonizer.hasPremium()?"":" <span class='buttonizer-premium'>PRO</span>"),t.addEventListener("click",()=>{this.groupObject.windowObject.toggle()}),this.element.appendChild(t)}top(){let t=document.createElement("div");return t.className="style-top",this.formElements.menuPosition=new me(this.groupObject),t.appendChild(this.formElements.menuPosition.build()),this.formElements.isMobile=new ie(this.groupObject),t.appendChild(this.formElements.isMobile.build()),t}menuStyle(){let t=document.createElement("div");t.className="style-menu";let e=document.createElement("h2");return e.innerHTML="<i></i><span>"+window.Buttonizer.translate("settings.setting_categories.menu_style")+"</span>",t.appendChild(e),this.formElements.alwaysOpen=new ve(this.groupObject),t.appendChild(this.formElements.alwaysOpen.build()),this.formElements.menuStyle=new fe(this.groupObject),t.appendChild(this.formElements.menuStyle.build()),this.formElements.attentionAnimation=new be(this.groupObject),t.appendChild(this.formElements.attentionAnimation.build()),t}buttonStyle(){let t=document.createElement("div");t.className="style-button";let e=document.createElement("h2");return e.innerHTML="<i></i><span>"+window.Buttonizer.translate("settings.setting_categories.group_style")+"</span>",t.appendChild(e),this.formElements.buttonColor=new ne(this.groupObject),t.appendChild(this.formElements.buttonColor.build()),this.formElements.borderRadius=new Zt(this.groupObject),t.appendChild(this.formElements.borderRadius.build()),this.formElements.backgroundImage=new ce(this.groupObject),t.appendChild(this.formElements.backgroundImage.build()),t}iconStyle(){let t=document.createElement("div");t.className="style-icon";let e=document.createElement("h2");return e.innerHTML="<i></i><span>"+window.Buttonizer.translate("settings.setting_categories.group_icon")+"</span>",t.appendChild(e),this.formElements.buttonIcon=new he(this.groupObject),t.appendChild(this.formElements.buttonIcon.build()),this.formElements.buttonIconSelect=new le(this.groupObject),t.appendChild(this.formElements.buttonIconSelect.build()),this.formElements.buttonIconColor=new Kt(this.groupObject),t.appendChild(this.formElements.buttonIconColor.build()),this.formElements.buttonIconSize=new Jt(this.groupObject),t.appendChild(this.formElements.buttonIconSize.build()),t}labelStyle(){let t=document.createElement("div");t.className="style-label";let e=document.createElement("h2");return e.innerHTML="<i></i><span>"+window.Buttonizer.translate("settings.setting_categories.label")+"</span>",t.appendChild(e),this.formElements.buttonLabel=new Mt(this.groupObject),t.appendChild(this.formElements.buttonLabel.build()),this.formElements.show_label=new se(this.groupObject),t.appendChild(this.formElements.show_label.build()),this.formElements.show_label_mobile=new re(this.groupObject),t.appendChild(this.formElements.show_label_mobile.build()),this.formElements.buttonLabelColor=new ae(this.groupObject),t.appendChild(this.formElements.buttonLabelColor.build()),this.formElements.buttonLabelFontSizeBorderRadius=new te(this.groupObject),t.appendChild(this.formElements.buttonLabelFontSizeBorderRadius.build()),t}buildTop(){}toggle(){(this.open=!0)?(this.open=!1,this.hide()):(this.open=!0,this.show())}show(){this.element.className="button-group-styling",Buttonizer.bar.showSettings(this.groupObject.get("name"),()=>this.hide())}hide(){this.element.className="button-group-styling hidden"}};class ke{constructor(t){this.windowObject=t,this.checkbox=document.createElement("input"),this.mainBox}build(){let t=this.createTable();return window.Buttonizer.hasPremium()||t.addEventListener("click",()=>{window.Buttonizer.showPremiumPopup(window.Buttonizer.translate("settings.exit_intent.pro_description"))}),t}createTable(){let t=document.createElement("div");t.appendChild(this.buildTriggers()),t.appendChild(this.createTriggerDropdown()),t.appendChild(this.createTriggerAnimation()),this.mainBox=t;let e=new r("table-relative");return e.addColumnHTML("<h2>"+window.Buttonizer.translate("settings.exit_intent.title")+"</h2>"+(window.Buttonizer.hasPremium()?"":'<span class="buttonizer-premium premium-right">PRO</span>')),e.addColumn(this.createCheckbox(),window.Buttonizer.hasPremium()?"":"buttonizer-premium-ghost","10"),e.newRow(),e.addColumnHTML("","",""),e.addColumn(this.mainBox,window.Buttonizer.hasPremium()?"":"buttonizer-premium-ghost","358"),e.newRow(),e.addColumnHTML("","",""),e.addColumnHTML(window.Buttonizer.translate("settings.exit_intent.info"),window.Buttonizer.hasPremium()?"":"buttonizer-premium-ghost","358"),e.build()}buildTriggers(){let t=document.createElement("div");return t.innerHTML="<b>"+window.Buttonizer.translate("settings.exit_intent.when_to_trigger")+"</b><br /><br />",t.appendChild(this.triggerLeavingWindow()),t.appendChild(this.triggerInactive()),t}triggerLeavingWindow(){let t=document.createElement("div");if(!window.Buttonizer.hasPremium())return t.innerHTML=window.Buttonizer.translate("settings.exit_intent.trigger_window"),t.prepend(new It({parentObject:this.windowObject.objectOwner,default:"true",disabled:!0,class:"inline-toggle",callback:()=>{}}).build()),t}triggerInactive(){let t=document.createElement("div");if(t.style.marginTop="10px",t.style.marginBottom="15px",!window.Buttonizer.hasPremium())return t.innerHTML=window.Buttonizer.translate("settings.exit_intent.trigger_inactive"),t.prepend(new It({parentObject:this.windowObject.objectOwner,default:"false",disabled:!0,class:"inline-toggle",callback:()=>{}}).build()),t}createTriggerDropdown(){let t=document.createElement("div");if(t.style.marginBottom="15px",t.innerHTML="<b>"+window.Buttonizer.translate("settings.exit_intent.how_often._title")+"</b><br />",!window.Buttonizer.hasPremium())return t.appendChild(new oe({parentObject:this.windowObject.objectOwner,class:"window-select",disabled:!0,width:"100%",callback:()=>{},list:[{value:"first",text:window.Buttonizer.translate("settings.exit_intent.how_often.once_page")}]}).build()),t}createTriggerAnimation(){let t=document.createElement("div");if(t.style.marginBottom="15px",t.innerHTML="<b>"+window.Buttonizer.translate("settings.exit_intent.animation._title")+"</b><br />",!window.Buttonizer.hasPremium())return t.appendChild(new oe({parentObject:this.windowObject.objectOwner,default:"first",class:"window-select",disabled:!0,width:"100%",callback:()=>{},list:[{value:"first",text:window.Buttonizer.translate("settings.exit_intent.animation.focused")}]}).build()),t}createCheckbox(){let t=document.createElement("div");window.Buttonizer.hasPremium()||(this.checkbox=new It({parentObject:this.windowObject.objectOwner,default:"false",disabled:!0,class:"inline-toggle",callback:t=>{}})),t.appendChild(this.checkbox.build());let e=document.createElement("span");return e.className="span-middle",e.innerHTML=window.Buttonizer.translate("settings.exit_intent.enable"),e.addEventListener("click",()=>this.checkbox.toggle()),t.appendChild(e),t}}class xe extends d{constructor(t){super(t,window.Buttonizer.translate("utils.advanced_settings")+" - "+window.Buttonizer.translate("common.group")+" "+t.data.name+(window.Buttonizer.hasPremium()?"":" (premium)"))}render(){this.filter(),this.delay(),this.styling()}filter(){let t=document.createElement("div");t.appendChild(new l(this).build()),t.appendChild(new a(this).build()),super.addItem(window.Buttonizer.translate("settings.button_group_window.filters"),t)}delay(){let t=document.createElement("div");t.appendChild(new u(this).build()),t.appendChild(new c(this).build()),t.appendChild(new ke(this).build()),super.addItem(window.Buttonizer.translate("settings.button_group_window.timeout_scroll"),t)}styling(){let t=document.createElement("div");t.appendChild(new h(this).build()),t.appendChild(new p(this).build()),super.addItem(window.Buttonizer.translate("settings.button_group_window.styling"),t)}}class Be{constructor(t,e){e||(e=[]),this.type="group",this.groupOpened=!1,this.data=t,this.ui={},this.groupObject=HTMLElement,this.groupID=window.Buttonizer.buttonGroups.length,this.stylingOpened=!1,this.stylingObject=HTMLElement,this.groupBody=HTMLElement,this.windowObject=HTMLElement,this.buttons=[],this.buttonsLength=e.length,this.singleButtonMode=!1,this.buildGroup(),this.windowObject=new xe(this);for(let t in e)new ge(this,e[t]);1===this.getButtonsAlive()!==this.singleButtonMode&&(this.singleButtonMode=1===this.getButtonsAlive(),this.groupHolder.setSingleButtonMode()),this.appendAddButton(),window.Buttonizer.buttonGroups.push(this)}get buttonsAmount(){return this.getButtonsAlive()}buildGroup(){let t=document.createElement("div");t.className="buttonizer-button-group is-group",this.groupObject=t,this.groupHolder=new ye(this),t.appendChild(this.groupHolder.build()),this.groupSettings=new _e(this),Buttonizer.bar.settingContent.appendChild(this.groupSettings.build()),this.appendAddButton(),this.groupBody=document.createElement("div"),this.groupBody.style.display="none",this.groupBody.className="button-group-body",t.appendChild(this.groupBody),jQuery(this.groupBody).sortable({items:"> div",axis:"y",cursor:"move",delay:150,handle:"#buttonizer-button-title",helper:"clone",cancel:this.buttonsLength<=1?".group-button":null,connectWith:".button-group-body",disabled:!0,start:(t,e)=>{jQuery(e.item).attr("previndex",e.item.index()),jQuery(e.item).attr("prevgroup",jQuery(this.groupBody).parent().index())},stop:(t,e)=>{jQuery(e.item).removeAttr("previndex"),jQuery(e.item).removeAttr("prevgroup")},update:function(t,e){if(this===e.item.parent()[0]){let t=e.item.index(),i=jQuery(e.item).attr("previndex"),n=jQuery(this).parent().index(),o=jQuery(e.item).attr("prevgroup");e.sender&&jQuery(this).sortable("option","cancel",null),window.Buttonizer.updateButtonList(t,i,n,o),jQuery(e.item).removeAttr("previndex"),jQuery(e.item).removeAttr("prevgroup")}}}),jQuery(this.groupBody).disableSelection(),jQuery(".group-title").disableSelection(),Buttonizer.bar.groupHolder.appendChild(this.groupObject)}duplicate(){new Be(this.data,this.buttons)}appendAddButton(){let t=document.createElement("a");t.href="javascript:void(0)",t.className="create-new-button",t.innerHTML=window.Buttonizer.translate("utils.add_button")+" +",t.addEventListener("click",()=>{new ge(this,{name:window.Buttonizer.translate("common.button")+" "+(this.getButtonsAlive()+1),show_mobile:"true",show_desktop:"true"}),jQuery(this.groupBody).sortable("option","cancel",null)}),this.groupObject.appendChild(t)}registerButton(t){this.buttons.push(t)}removeGroup(){let t=window.Buttonizer.buttonGroups.indexOf(this);window.Buttonizer.buttonGroups.splice(t,1),this.groupObject.remove()}set(t,e){this.data[t]=e,void 0!==this.ui[t]&&this.ui[t].forEach(t=>t.update(e)),window.Buttonizer.buttonChanges=!0}get(t,e){return void 0!==this.data[t]?this.data[t]:(this.data[t]=e,window.Buttonizer.buttonChanges=!0,e)}getButtonsAlive(){let t=0;return this.buttons.forEach(e=>{e.alive&&t++}),t}getButtons(){return this.buttons.filter(t=>t.alive)}registerUI(t,e){void 0!==this.ui[t]?this.ui[t].push(e):this.ui[t]=[e]}getUI(t){return void 0!==this.ui[t]&&this.ui[t]}}var Ee=Be;var ze=class{constructor(t){this.buttonizerObject=t,this.topBarElement=HTMLElement,this.optionsWindow=HTMLElement,this.publishButton=HTMLElement,this.revertChangesText=HTMLElement,this.alertText=HTMLElement,this.eventListCache=[],this.eventTrackerMenuItem=null,this.eventTracker=null,this.windowOptions=[{buttons:[{title:"Buttonizer",description:window.Buttonizer.translate("bar.menu.version"),callback:()=>{window.open("https://www.buttonizer.pro/")}},{title:window.Buttonizer.translate("bar.menu.knowledgebase.title"),description:window.Buttonizer.translate("bar.menu.knowledgebase.description"),callback:()=>{window.open("https://community.buttonizer.pro/knowledgebase")}}]},{title:window.Buttonizer.translate("bar.menu.support_group"),buttons:[{title:window.Buttonizer.translate("bar.menu.support.title"),callback:()=>{window.open("https://community.buttonizer.pro/t/support")}},{title:window.Buttonizer.translate("bar.menu.community.title"),description:window.Buttonizer.translate("bar.menu.community.description"),callback:()=>{window.open("https://community.buttonizer.pro/")}},{title:window.Buttonizer.translate("bar.menu.tour.title"),description:window.Buttonizer.translate("bar.menu.tour.description"),callback:()=>{window.Buttonizer.startTour()}}]},{title:window.Buttonizer.translate("bar.menu.account_group"),buttons:[{title:window.Buttonizer.translate("bar.menu.account.title"),callback:()=>{window.open(buttonizer_admin.admin+"?page=Buttonizer-account")}},{title:window.Buttonizer.translate("bar.menu.upgrade.title"),callback:()=>{window.open(buttonizer_admin.admin+"?page=Buttonizer-pricing")}},{title:window.Buttonizer.translate("bar.menu.affiliation.title"),description:window.Buttonizer.translate("bar.menu.affiliation.description"),callback:()=>{window.open(buttonizer_admin.admin+"?page=Buttonizer-affiliation")}}]},{buttons:[{title:window.Buttonizer.translate("page_rules.name"),icon:"fas fa-filter",class:window.Buttonizer.hasPremium()?"":"buttonizer-premium-gray-out",callback:()=>{window.Buttonizer.hasPremium()?window.Buttonizer.pageRule.show():window.Buttonizer.showPremiumPopup(window.Buttonizer.translate("page_rules.pro_description"),"SQnAhyBWLWg")}},{title:window.Buttonizer.translate("time_schedules.name"),icon:"far fa-clock",class:window.Buttonizer.hasPremium()?"":"buttonizer-premium-gray-out",callback:()=>{window.Buttonizer.hasPremium()?window.Buttonizer.timeSchedule.show():window.Buttonizer.showPremiumPopup(window.Buttonizer.translate("time_schedules.pro_description"),"C-B9ITdY6A4")}}]},{buttons:[{title:window.Buttonizer.translate("bar.menu.options.title"),icon:"fa fa-cogs",class:"single-button",callback:()=>{this.buttonizerObject.settingsWindow.toggle()}}]}],document.body.appendChild(this.buildTopBar())}buildTopBar(){let t=document.createElement("div");t.className="buttonizer-topbar";let e=document.createElement("div");return e.className="revert-save",e.style.display="inline-block",e.appendChild(this.createRevertChangesButton()),e.appendChild(this.createPublishButton()),t.appendChild(this.createBackButton()),t.appendChild(this.createLogo()),t.appendChild(e),t.appendChild(this.createOptionsButton()),t.appendChild(this.createAlertText()),t.appendChild(this.createOptionsWindow()),t.appendChild(this.createEventMenuItem()),t.appendChild(this.createEventWindow()),this.topBarElement=t,t}createOptionsButton(){let t=document.createElement("a");return t.className="options-button button right fas fa-cog",t.addEventListener("click",()=>{this.optionsWindow.toggle()}),t}createEventMenuItem(){let t=document.createElement("a");return t.href="javascript:void(0)",t.className="event-tracker-button",t.style.display="none",t.innerHTML="",t.addEventListener("click",()=>{"block"===this.eventTracker.container.style.display?this.eventTracker.container.style.display="none":this.eventTracker.container.style.display="block"}),this.eventTrackerMenuItem=t,t}createEventWindow(){let t=document.createElement("div");t.className="event-track-window",t.style.display="none",t.innerHTML=`<div class="track-window-title">${window.Buttonizer.translate("event_tracker.window_title")}</div>`;let e=document.createElement("a");e.href="javascript:void(0)",e.className="close",e.innerHTML='<i class="fas fa-times"></i>',e.addEventListener("click",()=>{t.style.display="none"}),t.appendChild(e);let i=document.createElement("div");return i.className="list-container",i.innerHTML="",t.appendChild(i),this.eventTracker={container:t,list:i},t}updateEventLogs(t){if(0!==t.length){if(this.eventListCache!==t){this.eventTrackerMenuItem.style.display="block",this.eventTrackerMenuItem.innerHTML='<i class="fas fa-info"></i> ('+t.length+") "+window.Buttonizer.translate("event_tracker.title"),this.eventTracker.list.innerHTML="";for(let e=0;e<t.length;e++){let i=document.createElement("div");i.className="event-element event-"+t[e].type,i.innerHTML=t[e].message,this.eventTracker.list.appendChild(i)}}}else this.eventTrackerMenuItem.style.display="none"}createOptionsWindow(){this.optionsWindow=document.createElement("div"),this.optionsWindow.className="options-window",this.optionsWindow.hidden=!0,this.optionsWindow.toggle=(()=>{this.optionsWindow.hidden=!this.optionsWindow.hidden});let t=document.createElement("ul");for(let e=0;e<this.windowOptions.length;e++){let i=document.createElement("li");if(i.className="group-container","string"==typeof this.windowOptions[e].title){let t=document.createElement("div");t.className="group-title",t.innerHTML=this.windowOptions[e].title,i.appendChild(t)}for(let t=0;t<this.windowOptions[e].buttons.length;t++)i.appendChild(this.barMenuItem(this.windowOptions[e].buttons[t]));t.appendChild(i)}return this.optionsWindow.appendChild(t),this.optionsWindow}barMenuItem(t){let e=document.createElement("a");e.href="javascript:void(0)",e.className=t.class?"option "+t.class:"option";let i=document.createElement("span");if(i.className="button-title",i.innerHTML=t.title?t.title:"Default title",e.appendChild(i),t.hasOwnProperty("description")){let i=document.createElement("span");i.className="button-description",i.innerHTML=t.description?t.description:"",e.appendChild(i)}if(t.hasOwnProperty("icon")){let i=document.createElement("i");i.className=t.icon,e.appendChild(i)}return t.hasOwnProperty("callback")&&e.addEventListener("click",()=>{this.optionsWindow.toggle(),t.callback()}),e}createBackButton(){let t=document.createElement("a");return t.className="close-button fa fa-times",t.addEventListener("click",()=>{document.location.href=window.Buttonizer.buttonizerInitData.wordpress.admin_base}),t}createLogo(){let t=document.createElement("img");return t.className="buttonizer-logo",t.src=buttonizer_admin.assets+"/images/logo.png",t}createPublishButton(){return this.publishButton=document.createElement("a"),this.publishButton.className="publish-button button-primary right",this.publishButton.innerText=window.Buttonizer.translate("common.save_publish"),this.publishButton.enabled=!0,this.publishButton.addEventListener("click",()=>{this.publishButton.enabled&&this.buttonizerObject.savingMechanism.publish()}),this.publishButton.enable=(()=>{this.publishButton.enabled=!0,this.revertChangesText.hidden=!1,this.publishButton.innerText=window.Buttonizer.translate("common.save_publish"),this.publishButton.className=this.publishButton.className.replace(" disabled","")}),this.publishButton.disable=(t=>{this.publishButton.enabled=!1,this.revertChangesText.hidden=!0,this.publishButton.innerText=t,this.publishButton.className.includes(" disabled")||(this.publishButton.className+=" disabled")}),this.publishButton}createRevertChangesButton(){return this.revertChangesText=document.createElement("a"),this.revertChangesText.className="revert-button right",this.revertChangesText.innerText=window.Buttonizer.translate("revert.revert_changes"),this.revertChangesText.href="javascript:void(0)",this.revertChangesText.addEventListener("click",()=>{new s({title:window.Buttonizer.translate("revert.revert_changes"),content:"<p>"+window.Buttonizer.translate("revert.modal.intro")+"</p><p>"+window.Buttonizer.translate("revert.modal.action")+"</p>",onConfirm:()=>{this.buttonizerObject.savingMechanism.revert()},buttons:[{text:window.Buttonizer.translate("modal.changed_my_mind"),close:!0,focus:!0},{text:window.Buttonizer.translate("revert.revert_changes"),confirm:!0}]})}),this.revertChangesText}createAlertText(){return this.alertText=document.createElement("a"),this.alertText.className="alert-text",this.alertText.showSaving=(()=>{this.alertText.innerHTML='<i class="fas fa-mug-hot"></i> '+window.Buttonizer.translate("saving.saving"),this.alertText.hidden=!1}),this.alertText.showSaved=(()=>{this.alertText.innerHTML='<i class="fas fa-check"></i> '+window.Buttonizer.translate("saving.completed"),setTimeout(()=>{this.alertText.hidden=!0},2e3)}),this.alertText.alert=(t=>{this.alertText.innerText=t,this.alertText.hidden=!1,setTimeout(()=>{this.alertText.hidden=!0},2e3)}),this.alertText.hidden=!0,this.alertText}set changes(t){t?this.publishButton.enable():this.publishButton.disable(window.Buttonizer.translate("common.published"))}};var Ce=class{constructor(t){this.buttonizerObject=t,this.barElement=HTMLElement,this.groupContainer=HTMLElement,this.settingBar=HTMLElement,this.settingContainer=HTMLElement,this.settingContent=HTMLElement,this.settingTitle=HTMLElement,this.settingCallback=(()=>console.log("huh?")),document.body.appendChild(this.buildBar()),jQuery(this.groupContainer).scrollbar(),jQuery(this.settingContent).scrollbar()}buildBar(){let t=document.createElement("div");t.className="buttonizer-bar";let e=document.createElement("div");e.className="group-container container",e.appendChild(this.createButtonHolder()),e.appendChild(this.addButtonGroup()),t.appendChild(e),t.appendChild(this.createBarFooter()),this.barElement=t,this.groupContainer=e;let i=document.createElement("div"),n=document.createElement("div");n.className="settings-content";let o=document.createElement("div");return o.className="settings-container container hidden",o.appendChild(this.createSettingBar()),n.appendChild(i),o.appendChild(n),t.appendChild(o),this.settingContent=i,this.settingContainer=o,t}createSettingBar(){let t=document.createElement("div");t.className="top";let e=document.createElement("a");e.className="back-button fa fa-angle-left",e.addEventListener("click",()=>{jQuery(".settings-container").addClass("hidden"),jQuery(".group-container").removeClass("hidden"),setTimeout(()=>this.settingCallback(),250)}),t.appendChild(e);let i=document.createElement("div");i.className="title-wrapper";let n=document.createElement("h4");n.innerHTML=window.Buttonizer.translate("bar.buttons.now_editing");let o=document.createElement("h2");return o.innerHTML="nothing!",i.appendChild(n),i.appendChild(o),t.appendChild(i),this.settingBar=t,this.settingTitle=o,t}createButtonHolder(){return this.groupHolder=document.createElement("div"),this.groupHolder.className="buttonizer-group-holder",jQuery(this.groupHolder).sortable({items:"> div",axis:"y",cursor:"move",delay:150,handle:"#buttonizer-group-title",helper:"clone",start:function(t,e){jQuery(this).attr("data-previndex",e.item.index())},stop:function(t,e){jQuery(this).removeAttr("data-previndex")},update:function(t,e){var i=e.item.index(),n=jQuery(this).attr("data-previndex");window.Buttonizer.updateButtonGroupList(i,n),jQuery(this).removeAttr("data-previndex")},cancel:null}),jQuery(this.groupHolder).disableSelection(),jQuery(".group-title").disableSelection(),this.groupHolder}addButtonGroup(){let t=document.createElement("a");return t.href="javascript:void(0)",t.className="create-new-button is-create-group buttonizer-premium-gray-out",t.innerHTML=window.Buttonizer.translate("utils.add_group")+'+ <span class="buttonizer-premium">PRO</span>',t.addEventListener("click",()=>window.Buttonizer.showPremiumPopup(window.Buttonizer.translate("premium.multiple_button_groups"),"Qxs1oGCVATU")),t}generateLink(t,e,i,n){n||(n="");let o=document.createElement("a");return o.href="javascript:void(0)",o.className=n,o.innerHTML='<i class="'+t+'"></i> '+e,o.addEventListener("click",i),o}showSettings(t,e){jQuery(".buttonizer-bar .settings-container").removeClass("hidden"),jQuery(".buttonizer-bar .group-container").addClass("hidden"),this.settingTitle.innerHTML=t,this.settingCallback=e}createBarFooter(){let t=document.createElement("div");t.className="bar-footer";let e=document.createElement("div");e.className="footer-device-selector";let i=document.createElement("a");i.href="javascript:void(0)",i.className="active",i.innerHTML='<span class="dashicons-before dashicons-desktop"></span>',i.addEventListener("click",()=>{i.classList.add("active"),n.classList.remove("active"),o.classList.remove("active"),document.querySelector(".buttonizer-frame").className="buttonizer-frame"}),xt(i,{content:window.Buttonizer.translate("bar.preview.desktop"),animation:"shift-away",arrow:!1,placement:"top"}),e.appendChild(i);let n=document.createElement("a");n.href="javascript:void(0)",n.innerHTML='<span class="dashicons-before dashicons-tablet"></span>',n.addEventListener("click",()=>{i.classList.remove("active"),n.classList.add("active"),o.classList.remove("active"),document.querySelector(".buttonizer-frame").className="buttonizer-frame frame-size-tablet"}),xt(n,{content:window.Buttonizer.translate("bar.preview.tablet"),animation:"shift-away",arrow:!1,placement:"top"}),e.appendChild(n);let o=document.createElement("a");return o.href="javascript:void(0)",o.innerHTML='<span class="dashicons-before dashicons-smartphone"></span>',o.addEventListener("click",()=>{i.classList.remove("active"),n.classList.remove("active"),o.classList.add("active"),document.querySelector(".buttonizer-frame").className="buttonizer-frame frame-size-mobile"}),xt(o,{content:window.Buttonizer.translate("bar.preview.mobile"),animation:"shift-away",arrow:!1,placement:"top"}),e.appendChild(o),t.appendChild(e),t}};var je=class{constructor(){this.element=document.createElement("div"),this.element.className="buttonizer-loading";let t=document.createElement("div");t.className="middle";let e=document.createElement("img");e.src=buttonizer_admin.assets+"/images/buttonizer-loading.png",t.innerHTML=this.svg(),t.appendChild(e),this.textElement=document.createElement("div"),this.textElement.className="loader-text",t.appendChild(this.textElement),this.element.appendChild(t),document.body.appendChild(this.element)}svg(){return'<svg width="165" height="165" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="lds-rolling"><circle cx="50" cy="50" fill="none" stroke="#2f788a" stroke-width="7" r="35" stroke-dasharray="164.93361431346415 56.97787143782138" transform="rotate(300 50 50)">\x3c!--animateTransform attributeName="transform" type="rotate" calcMode="linear" values="0 50 50;360 50 50" keyTimes="0;1" dur="1s" begin="0s" repeatCount="indefinite"--\x3e</animateTransform></circle></svg>'}show(t,e=""){t||(t=""),this.textElement.innerHTML=t,this.element.className="buttonizer-loading "+e,this.element.style.display="block"}hide(){this.element.style.display="none"}};var Se=class{constructor(){this.updateTimer=setTimeout(()=>{},0),this.isUpdating=!1,this.tempButtons={},this.savingObject=HTMLElement,this.savedObject=HTMLElement,setInterval(()=>this.checkUpdates(),500)}checkUpdates(){window.Buttonizer.buttonChanges&&!this.isUpdating&&(window.Buttonizer.buttonChanges=!1,clearTimeout(this.updateTimer),this.updateTimer=setTimeout(()=>this.save(),1e3))}save(){window.Buttonizer.buttonChanges||(this.isUpdating=!0,window.Buttonizer.buttonChanges=!1,window.Buttonizer.topBar.alertText.showSaving(),console.log("[BUG DEBUG SAVING AND RELOADING] button changes!"),jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&item=SaveData&save=buttons",dataType:"json",method:"post",data:{security:buttonizer_admin.security,buttons:this.generateJSONObject()},success:t=>{this.isUpdating=!1,"success"===t.status?(console.log("[BUG DEBUG SAVING AND RELOADING] saved!"),window.Buttonizer.topBar.alertText.showSaved(),this.reloadPreview(),window.Buttonizer.changes=!0):window.Buttonizer.savingError(t.message)},error:t=>{this.isUpdating=!1,window.Buttonizer.savingError(t)}}))}publish(){window.Buttonizer.buttonChanges||this.isUpdating||(this.isUpdating=!0,window.Buttonizer.buttonChanges=!1,window.Buttonizer.topBar.publishButton.disable(window.Buttonizer.translate("common.publishing")),jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&item=SaveData&save=publish",dataType:"json",data:{security:buttonizer_admin.security},method:"post",success:t=>{this.isUpdating=!1,"success"===t.status?window.Buttonizer.topBar.publishButton.disable(window.Buttonizer.translate("common.published")):new s({title:window.Buttonizer.translate("errors.saving.title"),content:`<p>${window.Buttonizer.translate("errors.saving.message")}.</p><p>${t.message}</p>`,buttons:[{text:"Close",close:!0}]})},error:(t,e,i)=>{this.isUpdating=!1,window.Buttonizer.topBar.publishButton.enable(),window.bdebug.error("Couldn't complete saving: "+t)}}))}revert(){window.Buttonizer.buttonChanges||(window.Buttonizer.loader.show(window.Buttonizer.translate("revert.reverting")),this.isUpdating=!0,window.Buttonizer.buttonChanges=!1,jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&item=SaveData&save=revert",dataType:"json",method:"post",data:{security:buttonizer_admin.security},success:t=>{if(this.isUpdating=!1,"success"!==t.status)return window.Buttonizer.loader.hide(),void new s({title:window.Buttonizer.translate("revert.error.title"),content:`<p>${window.Buttonizer.translate("revert.error.message")}</p><p>${t.message}</p>`,buttons:[{text:"Close",close:!0}]});document.location.reload()},error:(t,e,i)=>{this.isUpdating=!1,window.bdebug.error("Couldn't complete saving: "+t)}}))}reloadPreview(){console.log("[BUG DEBUG SAVING AND RELOADING] requested!");try{document.getElementById("buttonizer-iframe").contentWindow.postMessage({eventType:"buttonizer",messageType:"preview-reload"},document.location.origin)}catch(t){console.log("Buttonizer tried to auto update the Buttonizer Buttons. But the message didn't came through. Well. Doesn't matter, it's just an extra function. It's nice to have."),console.log(t),document.getElementById("buttonizer-iframe").contentWindow.location.reload()}}generateJSONObject(){let t=window.Buttonizer.buttonGroups,e=[];for(let i=0;i<t.length;i++){let n=t[i].buttons,o=[];for(let t=0;t<n.length;t++)n[t].alive&&o.push(n[t].data);e.push({data:t[i].data,buttons:o})}return e}},Oe=class{constructor(){this.versionDropdown={},this.libraryPremiumCode={},this.currentSelected=window.Buttonizer.getSetting("icon_library","fontawesome"),this.currentSelectedIndex=null,this.currentSelectedVersion=window.Buttonizer.getSetting("icon_library_version","5.free"),this.currentSelectedVersionIndex=null,this.currentSelectedPremiumCode=window.Buttonizer.getSetting("icon_library_code",""),this.cachedPremium=[],this.libraries=[{name:"Font Awesome",id:"fontawesome",versions:[{id:"5.free",name:"Font Awesome 5 - "+window.Buttonizer.translate("settings_window.icon_library.free")+" - "+window.Buttonizer.translate("settings_window.icon_library.latest"),free:!0},{id:"5.paid",name:"Font Awesome 5 - Pro - "+window.Buttonizer.translate("settings_window.icon_library.latest"),free:!1},{id:"4.7.0",name:"Font Awesome 4.7",free:!0}]}]}build(){let t=document.createElement("div");return t.appendChild(this.iconLibrary()),t.appendChild(this.versionSelector()),t.appendChild(this.importIconLibrary()),t}showPremiumIcons(){return!0}iconLibrary(){let t=document.createElement("select");t.className="window-select";for(let e=0;e<this.libraries.length;e++){let i=document.createElement("option");i.value=e,i.text=this.libraries[e].name,i.setAttribute("data-index",e.toString()),this.currentSelected===this.libraries[e].id&&(i.selected=!0,this.currentSelectedIndex=e),t.appendChild(i)}t.addEventListener("change",()=>{this.currentSelected=t.value,this.currentSelectedIndex=Number(t.getAttribute("data-index")),this.currentSelectedVersion=0,window.Buttonizer.saveSettings({icon_library:t.value,icon_library_version:this.libraries[this.currentSelectedIndex].versions[0]},!1),this.buildVersionSelector(),this.reloadIframe()});let e=document.createElement("div");e.innerHTML=window.Buttonizer.translate("settings_window.icon_library.info");let i=new r;return i.addColumnHTML("<h2>"+window.Buttonizer.translate("settings_window.icon_library.title")+"</h2>"),i.addColumn(t,"","370"),i.newRow(),i.addColumnText(""),i.addColumn(e),i.build()}versionSelector(){this.versionDropdown=document.createElement("select"),this.versionDropdown.className="window-select",this.versionDropdown.addEventListener("change",()=>{this.currentSelectedVersion=this.versionDropdown.value,window.Buttonizer.saveSettings({icon_library_version:this.currentSelectedVersion},!1),this.currentSelectedVersion.indexOf("paid")>=0?(this.libraryPremiumCode.style.display="block",""!==this.currentSelectedPremiumCode&&this.reloadIcons()):(this.libraryPremiumCode.style.display="none",this.reloadIcons())});let t=document.createElement("div");t.innerHTML=window.Buttonizer.translate("settings_window.icon_library.select_version.info");let e=new r;e.addColumnHTML("<h2>"+window.Buttonizer.translate("settings_window.icon_library.select_version.title")+"</h2>"),e.addColumn(this.versionDropdown,"","370"),e.newRow(),e.addColumnText(""),e.addColumn(t);let i=document.createElement("div");return i.appendChild(e.build()),i.appendChild(this.libraryLicenseKey()),this.buildVersionSelector(),i}reloadIcons(){window.Buttonizer.iconSelector.iconListener.onReady(()=>{window.Buttonizer.iconSelector.rebuild(),window.Buttonizer.addIconLibrary(),this.reloadIframe()}),window.Buttonizer.iconSelector.iconListener.loadIcons()}libraryLicenseKey(){let t=document.createElement("div");t.innerHTML=window.Buttonizer.translate("settings_window.icon_library.library_license_key.info")+'<a href="" target="_blank" class="link-add-more" style="display: inline">'+window.Buttonizer.translate("settings_window.icon_library.library_license_key.how_does_it_work")+"</a>";let e=document.createElement("input");e.placeholder=window.Buttonizer.translate("settings_window.icon_library.library_license_key.enter_integrity_code"),e.className="window-select",e.value=this.currentSelectedPremiumCode,e.addEventListener("change",()=>{window.Buttonizer.saveSettings({icon_library_code:e.value},!1),this.reloadIcons()});let i=new r;return i.addColumnHTML(" "),i.addColumn(e,"","370"),i.newRow(),i.addColumnText(""),i.addColumn(t),this.libraryPremiumCode=i.build(),this.libraryPremiumCode}buildVersionSelector(){this.versionDropdown.innerHTML="";let t=!1;for(let e=0;e<this.libraries[this.currentSelectedIndex].versions.length;e++){let i=document.createElement("option");i.value=this.libraries[this.currentSelectedIndex].versions[e].id,i.text=this.libraries[this.currentSelectedIndex].versions[e].name,this.currentSelectedVersion===i.value&&(i.selected=!0,this.libraries[this.currentSelectedIndex].versions[e].free||(t=!0)),this.versionDropdown.appendChild(i)}this.libraryPremiumCode.style.display=t?"block":"none"}importIconLibrary(){let t=new Et({state:window.Buttonizer.getSetting("import_icon_library",!0)});t.onToggle(t=>{window.Buttonizer.saveSettings({import_icon_library:t},!1),this.reloadIframe()});let e=document.createElement("div");e.innerHTML=window.Buttonizer.translate("settings_window.icon_library.import_library.info");let i=new r;return i.addColumnHTML("<h2>"+window.Buttonizer.translate("settings_window.icon_library.import_library.title")+"</h2>"),i.addColumn(t.build(),"","370"),i.newRow(),i.addColumnText(""),i.addColumn(e),this.buildVersionSelector(),i.build()}reloadIframe(){setTimeout(()=>{document.getElementById("buttonizer-iframe").contentWindow.location.reload()},1500)}};class Le{constructor(){this.versionDropdown={},this.currentSelected=window.Buttonizer.getSetting("google_analytics","")}build(){let t=document.createElement("div");t.appendChild(this.input());let e=document.createElement("a");return e.href="https://community.buttonizer.pro/knowledgebase/17",e.target="_blank",e.className="info-link text-big",e.innerHTML='<i class="fas fa-info"></i> '+window.Buttonizer.translate("settings_window.google_analytics.info"),e.style.marginTop="40px",e.style.textAlign="center",t.appendChild(e),t}input(){let t=document.createElement("input");t.value=this.currentSelected,t.className="window-select",t.placeholder="UA-XXXXXX-Y",t.addEventListener("change",()=>{window.Buttonizer.saveSettings({google_analytics:t.value},!1)});let e=document.createElement("div");e.innerHTML=window.Buttonizer.translate("settings_window.google_analytics.input_info");let i=new r;return i.addColumnHTML("<h2>Google Analytics</h2>"),i.addColumn(t,"","375"),i.newRow(),i.addColumnText(""),i.addColumn(e),i.build()}}class Te{constructor(){}build(){let t=document.createElement("div"),e=document.createElement("div");return e.className="settings-window-information",e.innerHTML="<p>"+window.Buttonizer.translate("settings_window.reset.info")+"</p>",t.appendChild(e),t.appendChild(this.whatWillHappen()),t.appendChild(this.why()),t.appendChild(this.myLicense()),t.appendChild(this.andThen()),t.appendChild(this.ready()),t}whatWillHappen(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML=window.Buttonizer.translate("settings_window.reset.what_will_happen.title"),e.style.marginBottom="20px",t.appendChild(e);let i=document.createElement("div");return i.className="settings-window-information",i.innerHTML="<p>"+window.Buttonizer.translate("settings_window.reset.what_will_happen.info")+"</p>",t.appendChild(i),t}why(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML=window.Buttonizer.translate("settings_window.reset.why.title"),e.style.marginBottom="20px",t.appendChild(e);let i=document.createElement("div");return i.className="settings-window-information",i.innerHTML="<p>"+window.Buttonizer.translate("settings_window.reset.why.info")+"</p>",t.appendChild(i),t}myLicense(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML=window.Buttonizer.translate("settings_window.reset.license.title"),e.style.marginBottom="20px",t.appendChild(e);let i=document.createElement("div");return i.className="settings-window-information",i.innerHTML=`\n<p>${window.Buttonizer.translate("settings_window.reset.license.info")}</p>\n<p>\n<ul>\n <li>${window.Buttonizer.translate("settings_window.reset.license.list.buttons")}</li>\n <li>${window.Buttonizer.translate("settings_window.reset.license.list.groups")}</li>\n <li>${window.Buttonizer.translate("settings_window.reset.license.list.time_schedules")}</li>\n <li>${window.Buttonizer.translate("settings_window.reset.license.list.page_rules")}</li>\n <li>${window.Buttonizer.translate("settings_window.reset.license.list.settings")}</li>\n <li>${window.Buttonizer.translate("settings_window.reset.license.list.published")}</li>\n</ul>\n</p>\n`,t.appendChild(i),t}andThen(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML=window.Buttonizer.translate("settings_window.reset.default_settings.title"),e.style.marginBottom="20px",t.appendChild(e);let i=document.createElement("div");return i.className="settings-window-information",i.innerHTML="<p>"+window.Buttonizer.translate("settings_window.reset.default_settings.info")+"</p>",t.appendChild(i),t}ready(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML=window.Buttonizer.translate("settings_window.reset.ready.title"),e.style.marginBottom="20px",t.appendChild(e);let i=document.createElement("div");i.className="settings-window-information",i.innerHTML="<p>"+window.Buttonizer.translate("settings_window.reset.ready.info")+"</p>",t.appendChild(i);let n=document.createElement("a");return n.className="button button-red button-centered-reset",n.innerHTML='<i class="fas fa-sync"></i> '+window.Buttonizer.translate("settings_window.reset.ready.button"),n.href="javascript:void(0)",n.addEventListener("click",()=>this.countdown()),t.appendChild(n),t}countdown(){window.Buttonizer.loader.show(window.Buttonizer.translate("loading.initializing")),setTimeout(()=>{window.Buttonizer.loader.show(window.Buttonizer.translate("loading.resetting")),this.reset()},1500)}reset(){jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&item=SaveData&save=reset-buttonizer",dataType:"json",method:"post",data:{security:buttonizer_admin.security},success:t=>{"success"===t.status?(window.Buttonizer.loader.show(window.Buttonizer.translate("loading.finishing")),setTimeout(()=>{document.location.reload()},500)):(window.Buttonizer.loader.hide(),window.Buttonizer.savingError(t.message))},error:(t,e,i)=>{window.Buttonizer.loader.hide(),window.Buttonizer.savingError(e)}})}error(){}}class Ne{constructor(){}build(){let t=document.createElement("div"),e=document.createElement("div");return e.className="settings-window-information",e.innerHTML="<p>We have fixed the migration issues in the last couple updates. \n If you lost buttons when updating to version 2.0,\n you can try migrating your old buttons again!</p>",t.appendChild(e),t.appendChild(this.whatWillHappen()),t.appendChild(this.why()),t.appendChild(this.caution()),t.appendChild(this.ready()),t}whatWillHappen(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML="What happens when I click the red button below?",e.style.marginBottom="20px",t.appendChild(e);let i=document.createElement("div");return i.className="settings-window-information",i.innerHTML="<p>Buttonizer made a backup of your buttons from version 1.5.x in your database. \n When you click on the button below, it will convert that backup into buttons suitable for version 2.0.\n It will not remove the backup so that you can still revert back to version 1.5.7 if you want!</p>",t.appendChild(i),t}why(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML="Why would I do that?",e.style.marginBottom="20px",t.appendChild(e);let i=document.createElement("div");return i.className="settings-window-information",i.innerHTML="<p>During the first update to version 2.0, a couple of users lost their settings or buttons!\n Since then we've fixed all the reported migration issues.\n <b>This is a chance for those who lost their buttons to try and see if they can migrate their old buttons again.</b></p>",t.appendChild(i),t}caution(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML="Extra! Extra!",e.style.marginBottom="20px",t.appendChild(e);let i=document.createElement("div");return i.className="settings-window-information",i.innerHTML="\n <p>A little warning! \n This will remove your current Buttonizer version 2.0 buttons/settings. \n <b>It will not make a backup!</b></p>",t.appendChild(i),t}andThen(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML="Okay, sounds good. What then?",e.style.marginBottom="20px",t.appendChild(e);let i=document.createElement("div");return i.className="settings-window-information",i.innerHTML="<p>Buttonizer will go back to the default settings and will behave like a fresh installation. That's all.</p>",t.appendChild(i),t}ready(){let t=document.createElement("div"),e=document.createElement("div");e.className="window-splitter",e.innerHTML="Okay, I'm ready!",e.style.marginBottom="20px",t.appendChild(e);let i=document.createElement("div");i.className="settings-window-information",i.innerHTML="<p>Press the red button below to re-migrate old data. There will be no more warnings.</p>",t.appendChild(i);let n=document.createElement("a");return n.className="button button-red button-centered-reset",n.innerHTML='<i class="fas fa-sync"></i> Re-migrate old data!',n.href="javascript:void(0)",n.addEventListener("click",()=>this.countdown()),t.appendChild(n),t}countdown(){window.Buttonizer.loader.show("Initializing..."),setTimeout(()=>{window.Buttonizer.loader.show("Running migration..."),this.remigrate()},1500)}remigrate(){jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&item=SaveData&save=remigrate-buttonizer",dataType:"json",method:"post",data:{security:buttonizer_admin.security},success:t=>{"success"===t.status?(window.Buttonizer.loader.show("Finishing..."),setTimeout(()=>{document.location.reload()},500)):(window.Buttonizer.loader.hide(),window.Buttonizer.savingError(t.message))},error:(t,e,i)=>{window.Buttonizer.loader.hide(),window.Buttonizer.savingError(e)}})}error(){}}class Ae{build(){let t=document.createElement("div");return t.appendChild(this.showWPAdminTopBarButton()),t.appendChild(this.showTooltips()),t.appendChild(this.allowRequestsFromSubdomains()),t}showWPAdminTopBarButton(){let t=new Et({state:window.Buttonizer.getSetting("admin_top_bar_show_button","true")});t.onToggle(t=>{window.Buttonizer.saveSettings({admin_top_bar_show_button:t},!1)});let e=new r;return e.addColumnHTML("<h2>"+window.Buttonizer.translate("settings_window.other_settings.admin_button.title")+"</h2>"),e.addColumn(t.build(),"","370"),e.newRow(),e.addColumnText(""),e.addColumnText(window.Buttonizer.translate("settings_window.other_settings.admin_button.info")),e.build()}showTooltips(){let t=new Et({state:window.Buttonizer.getSetting("show_tooltips")});t.onToggle(t=>{window.Buttonizer.saveSettings({show_tooltips:t},!1)});let e=new r;return e.addColumnHTML("<h2>"+window.Buttonizer.translate("settings_window.other_settings.tooltips.title")+"</h2>"),e.addColumn(t.build(),"","370"),e.newRow(),e.addColumnText(""),e.addColumnText(window.Buttonizer.translate("settings_window.other_settings.tooltips.info")),e.build()}allowRequestsFromSubdomains(){let t=new Et({state:window.Buttonizer.getSetting("allow_subdomains","false")});t.onToggle(t=>{window.Buttonizer.saveSettings({allow_subdomains:t},!1)});let e=new r;return e.addColumnHTML("<h2>"+window.Buttonizer.translate("settings_window.other_settings.subdomain.title")+"</h2>"),e.addColumn(t.build(),"","370"),e.newRow(),e.addColumnText(""),e.addColumnText(window.Buttonizer.translate("settings_window.other_settings.subdomain.info")),e.build()}}var Ie=class extends d{constructor(){super({},window.Buttonizer.translate("settings_window.title"))}render(){this.fontAwesome(),this.analytics(),this.mainSettings(),this.reset()}fontAwesome(){super.addItem(window.Buttonizer.translate("settings_window.icon_library.title"),(new Oe).build())}analytics(){super.addItem("Google Analytics",(new Le).build())}mainSettings(){super.addItem(window.Buttonizer.translate("settings_window.other_settings.title"),(new Ae).build())}remigrate(){super.addItem("Re-migrate",(new Ne).build())}reset(){super.addItem(window.Buttonizer.translate("settings_window.reset.title"),(new Te).build())}},Me=class{constructor(){this.element=null,this.itemList=null,this.searchList=null,this.searchInput=null,this.fontAwesomeStylesheet=null,this.iframeContent=null,this.mayClose(),this.build(),this.iconListener=new class{constructor(){this.icons=[],this.callback=(()=>{}),this.searchResultCache=[],this.loadIcons()}onReady(t){this.callback=t}getIcons(){return this.icons}search(t){if(void 0!==this.searchResultCache[t])return this.searchResultCache[t];let e=[];for(let i=0;i<this.icons.length;i++){let n=this.icons[i];(n.searchTerms.indexOf(t)>=0||n.name.indexOf(t)>=0)&&e.push(n)}return this.searchResultCache[t]=e,e}loadIcons(){this.searchResultCache=[],this.icons=[];let t=window.Buttonizer.settings.icon_library,e=window.Buttonizer.settings.icon_library_version;jQuery.ajax({url:buttonizer_admin.assets+"/icon_definitions/"+t+"."+e+".json?buttonizer-icon-cache="+window.Buttonizer.version,dataType:"json",method:"get",success:i=>{this.icons=i,console.log("Finished loading icon library '"+t+"' version "+e),this.callback()},error:()=>{console.error("Could not load icon library '"+t+"' version "+e)}})}},this.iconLibrary=new Oe,this.currentInput=null,this.currentInputJ=null,this.searchTimeout=setTimeout(()=>{},1),setInterval(()=>this.stayOnPlace(),100),this.firstBuild=!0,this.opened=!1}build(){let t=document.createElement("div");t.className="buttonizer-icon-selector";let e=document.createElement("div");e.className="icon-selector-searchbar";let i=document.createElement("input");i.className="icon-selector-searchbar",i.placeholder=window.Buttonizer.translate("utils.search_icons"),i.addEventListener("keyup",()=>{clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.search(i.value)},200)}),this.searchInput=i,e.appendChild(this.searchInput),t.appendChild(e);let n=document.createElement("iframe");n.height="350px",n.width="100%",n.src="about:blank",n.frameborder=0,n.addEventListener("load",()=>{n.contentDocument.querySelector("head").appendChild(window.Buttonizer.iconLibraryStylesheet);let t=document.createElement("style");t.innerText='\nbody, html {\n background-color: #f5f5f5;\n margin: 0;\n padding: 0;\n font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;\n font-size: 14px;\n}\n\n.icon-selector-list {\n border-top: 1px solid #e7e7e7;\n overflow: auto;\n text-align: center;\n}\n\n.icon-selector-list a {\n background-color: #f5f5f5;\n color: #464646;\n font-size: 19px;\n width: 16%;\n height: 50px;\n line-height: 50px;\n text-decoration: none;\n display: inline-block;\n text-align: center;\n outline: none;\n}\n\n.icon-selector-list a:hover {\n background-color: #e7e7e7;\n}\n\n.icon-selector-list a:focus {\n box-shadow: none !important;\n}\n\n.fa, .fal, .far, .fas, .fab {\n line-height: 50px !important;\n}',n.contentDocument.querySelector("head").appendChild(t),this.itemList=document.createElement("div"),this.itemList.className="icon-selector-list",n.contentDocument.body.appendChild(this.itemList),this.searchList=document.createElement("div"),this.searchList.className="icon-selector-list search-list",this.searchList.style.display="none",n.contentDocument.body.appendChild(this.searchList)}),this.iframeContent=n,t.appendChild(this.iframeContent),this.element=t,document.body.appendChild(this.element)}search(t){if(""===t)return this.searchList.style.display="none",this.itemList.style.display="block",void(this.iframeContent.height="350px");this.searchList.style.display="block",this.itemList.style.display="none";let e=this.iconListener.search(t);e.length>0?(this.searchList.innerHTML="",this.showIcons(this.searchList,e),jQuery(this.searchList).height()>350?this.iframeContent.height="350px":this.iframeContent.height=jQuery(this.searchList).height()+5+"px"):(this.iframeContent.height="50px",this.searchList.innerHTML=`<p>${window.Buttonizer.translate("utils.search_not_found")} <b>${t}</b></p>`)}rebuild(){this.itemList.innerHTML="",this.searchList.innerHTML="",this.showIcons(this.itemList,this.iconListener.getIcons())}showIcons(t,e){for(let i=0;i<e.length;i++){let n=e[i];for(let e=0;e<n.icons.length;e++){let i=document.createElement("a");i.innerHTML=`<i class="${n.icons[e].icon}"></i>`,i.href="javascript:void(0)",i.title=n.name+" ("+n.icons[e].type+")",i.addEventListener("click",()=>{if(null!==this.currentInput){if(this.currentInput.value=n.icons[e].icon,"createEvent"in document){let t=document.createEvent("HTMLEvents");t.initEvent("change",!1,!0),this.currentInput.dispatchEvent(t)}else this.currentInput.fireEvent("onchange");this.close()}}),t.appendChild(i)}}}open(t){this.currentInput=t,this.currentInputJ=jQuery(this.currentInput),this.searchInput.value="",this.searchList.style.display="none",this.itemList.style.display="block",this.element.style.display="block",setTimeout(()=>{this.searchInput.focus(),this.opened=!0,this.stayOnPlace(),setTimeout(()=>{this.element.className="buttonizer-icon-selector selector-animated",this.firstBuild&&(this.firstBuild=!1,this.rebuild())},250)},50)}mayClose(){document.querySelector("body").addEventListener("click",t=>{this.opened&&"icon-selector-searchbar"!==t.target.className&&(this.element.style.display="none",this.element.className="buttonizer-icon-selector",this.opened=!1)}),setTimeout(()=>{document.querySelector("#buttonizer-iframe").contentDocument.addEventListener("click",t=>{this.opened&&"icon-selector-searchbar"!==t.target.className&&(this.element.style.display="none",this.element.className="buttonizer-icon-selector",this.opened=!1)})},500)}close(){this.element.style.display="none",this.opened=!1}stayOnPlace(){if(this.opened){let t=this.currentInputJ.offset().top+this.currentInputJ.height()+10+"px";t!==this.element.style.top&&(this.element.style.top=t,this.element.style.left=this.currentInputJ.offset().left+"px")}}},He=(i(7),i(0));const qe=i(12);class Pe{constructor(){this.tour=null,this.amount=window.Buttonizer.buttonGroups[0].groupObject.querySelectorAll(".group-button").length,this.single="",this.setupStep5=!1,this.setupStep6=!1,this.setupStep7=!1,this.setupStep10=!1,this.setupStep11=!1,this.setup2Step4=!1,this.setup2Step6=!1,this.setup2Step7=!1,this.setup2Step12=!1}build(){let t=this.intro();t.onchange(e=>this.conditions(t._currentStep,e,1)),t.start(),t.onbeforeexit(()=>this.onExit(t._currentStep,1)),t.onexit(()=>{this.tour=null,this.amount=window.Buttonizer.buttonGroups[0].groupObject.querySelectorAll(".group-button").length,this.setupStep5=!1,this.setupStep6=!1,this.setupStep7=!1,this.setupStep10=!1,this.setupStep11=!1,this.setup2Step4=!1,this.setup2Step6=!1,this.setup2Step7=!1,this.setup2Step12=!1,20===t._currentStep&&window.Buttonizer.bar.groupHolder.querySelector(".create-new-button").click()})}getAmount(){return this.amount=window.Buttonizer.buttonGroups[0].groupObject.querySelectorAll(".group-button").length,this.amount}conditions(t,e,i){if(this.amount=window.Buttonizer.buttonGroups[0].groupObject.querySelectorAll(".group-button").length,1===i)if(0===t)window.Buttonizer.bar.settingContainer.classList.contains("hidden")||window.Buttonizer.bar.settingContainer.querySelector(".back-button").click();else if(4===t){if(!this.setupStep5){this.setupStep5=!0,document.querySelector(".options-button").addEventListener("click",()=>{null!==this.tour&&this.tour.goToStep(6)})}"backward"===this.tour._direction&&(document.querySelector(".options-window").hasAttribute("hidden")||document.querySelector(".options-window").setAttribute("hidden",""))}else if(5===t)document.querySelector(".options-window").hasAttribute("hidden")&&document.querySelector(".options-window").removeAttribute("hidden"),"backward"===this.tour._direction&&document.querySelector(".options-window").classList.remove("disabled");else if(6===t){document.querySelector(".options-window").hasAttribute("hidden")&&document.querySelector(".options-window").removeAttribute("hidden"),document.querySelector(".options-window").setAttribute("style","z-index:9999999 !important"),document.querySelector(".options-window").classList+=" disabled";let t=window.Buttonizer.topBar.optionsWindow.querySelector(".single-button");t.style.pointerEvents="all",t.style.cursor="pointer",this.setupStep7||(this.setupStep7=!0,t.addEventListener("click",()=>{null!==this.tour&&this.tour.nextStep()})),"backward"===this.tour._direction&&(window.Buttonizer.settingsWindow.title.parentElement.parentElement.style.display="none")}else if(7===t)document.querySelector(".options-window").removeAttribute("style","z-index:9999999 !important"),document.querySelector(".options-window").classList.remove("disabled"),window.Buttonizer.settingsWindow.title.parentElement.parentElement.style.display="block",window.Buttonizer.settingsWindow.title.parentElement.parentElement.setAttribute("style","z-index:9999999 !important;pointer-events: none;"),document.querySelector(".options-window").hasAttribute("hidden")||document.querySelector(".options-window").setAttribute("hidden","");else if(8===t)window.Buttonizer.settingsWindow.title.parentElement.parentElement.removeAttribute("style","z-index:9999999 !important"),window.Buttonizer.settingsWindow.title.parentElement.parentElement.style.display="none";else if(9===t){if(!this.setupStep10){this.setupStep10=!0,window.Buttonizer.bar.groupHolder.querySelector(".button-group-holder").querySelector(".group-style").addEventListener("click",()=>{null!==this.tour&&!1===this.setupStep11&&this.tour.nextStep()})}"backward"===this.tour._direction&&(this.setupStep11=!1,Object(He.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style","width: 50px; height: 60px; top: 67px; left: 276px;"),document.querySelector(".introjs-helperLayer").setAttribute("style","width: 50px; height: 60px; top: 67px; left: 276px;")},100),window.Buttonizer.bar.settingContainer.querySelector(".back-button").click())}else if(10===t)"forward"===this.tour._direction&&(0==this.setupStep11&&(this.setupStep11=!0,window.Buttonizer.buttonGroups[0].groupHolder.toggleStyling()),this.tour._introItems[11].element=jQuery(".button-group-styling:visible")[0].querySelector(".style-top"),this.tour._introItems[13].element=jQuery(".button-group-styling:visible")[0].querySelector(".style-button"),this.tour._introItems[14].element=jQuery(".button-group-styling:visible")[0].querySelector(".style-icon"),this.tour._introItems[15].element=jQuery(".button-group-styling:visible")[0].querySelector(".style-label"),Object(He.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style","width: 385px; height: 966px; top: 46px; left: -5px;")},100),window.Buttonizer.bar.settingContainer.querySelector(".back-button").style.pointerEvents="none");else if(12===t)1===this.amount&&("forward"===this.tour._direction?Object(He.setTimeout)(()=>{this.tour.nextStep()},100):"backward"===this.tour._direction&&Object(He.setTimeout)(()=>{this.tour.previousStep()},100));else if(15===t)"backward"===this.tour._direction&&(window.Buttonizer.buttonGroups[0].groupHolder.toggleStyling(),Object(He.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style","width: 371px; height: 263px; top: 688px; left: 2px;")},100));else if(16===t||17===t||18===t||19===t){window.Buttonizer.bar.settingContainer.querySelector(".back-button").click(),window.Buttonizer.bar.groupHolder.querySelector(".create-new-button").addEventListener("click",()=>{null!==this.tour&&this.tour.goToStep(21)}),16===t&&(this.tour._direction="forward")&&(1===this.getAmount()&&window.Buttonizer.buttonGroups[0].groupHolder.quickMenu.querySelector(".convert-button").click(),window.Buttonizer.buttonGroups[0].groupObject.classList.contains("opened")||window.Buttonizer.buttonGroups[0].groupHolder.revealButtons(),Object(He.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style")+"width: 333px !important; height: 48px !important; left: 36px !important;"),document.querySelector(".introjs-helperLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style")+"width: 333px !important; height: 48px !important; left: 36px !important;")},100))}else 20===t&&Object(He.setTimeout)(()=>{this.tour.exit()},100);else if(2===i){let e=window.Buttonizer.buttonGroups[0].groupBody.querySelectorAll(".buttonizer-button-group")[window.Buttonizer.buttonGroups[0].groupBody.querySelectorAll(".buttonizer-button-group").length-1];if(0===t);else if(2===t)Object(He.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style")+"left: 276px !important;")},100);else if(2===t)"backward"===this.tour._direction&&(e.querySelector(".group-title").style.pointerEvents="all",e.querySelector(".mobile-desktop").style.pointerEvents="all");else if(3===t)(e.querySelector(".group-holder-quick-menu").style.visibility="visible")&&(e.querySelector(".group-holder-quick-menu").style.visibility="hidden",e.querySelector(".group-holder-quick-menu").style.top="45px",e.querySelector(".group-holder-quick-menu").style.opacity="0"),Object(He.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style"))},100),e.querySelector(".group-title").style.pointerEvents="none",e.querySelector(".mobile-desktop").style.pointerEvents="none",this.setup2Step4||(this.setup2Step4=!0,e.querySelector(".holder-button").addEventListener("click",()=>{null!==this.tour&&this.tour.nextStep()})),e.querySelector(".holder-button").style.backgroundColor="rgb(255, 255, 255)";else if(4===t){if((e.querySelector(".group-holder-quick-menu").style.visibility="hidden")&&(e.querySelector(".group-holder-quick-menu").style.visibility="visible",e.querySelector(".group-holder-quick-menu").style.top="50px",e.querySelector(".group-holder-quick-menu").style.opacity="1"),"backward"===this.tour._direction){e.querySelector(".fa-wrench").parentElement.style.pointerEvents="none",e.querySelector(".group-holder-quick-menu").style.pointerEvents="none"}else"forward"===this.tour._direction&&(e.querySelector(".group-holder-quick-menu").style.pointerEvents="none");this.amount>=8&&Object(He.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style")+"top: 684px !important;")},100)}else if(5===t){"backward"===this.tour._direction&&(this.setup2Step7=!1,e.querySelector(".group-holder-quick-menu").style.visibility="visible",e.querySelector(".group-holder-quick-menu").style.top="50px",e.querySelector(".group-holder-quick-menu").style.opacity="1",window.Buttonizer.bar.settingContainer.querySelector(".back-button").click(),Object(He.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style")+"left: 36px !important;")},100)),this.amount>=8&&Object(He.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style",document.querySelector(".introjs-tooltipReferenceLayer").getAttribute("style")+"top: 692px !important;")},100),e.querySelector(".group-holder-quick-menu").setAttribute("style",e.querySelector(".group-holder-quick-menu").getAttribute("style")+"z-index: 99999999 !important;");let t=e.querySelector(".fa-wrench").parentElement;t.style.pointerEvents="all",t.style.cursor="pointer",this.setup2Step6||(this.setup2Step6=!0,e.querySelector(".fa-wrench").parentElement.addEventListener("click",()=>{null!==this.tour&&!1===this.setup2Step7&&this.tour.nextStep()}))}else 6===t?("forward"===this.tour._direction&&(0==this.setup2Step7&&(this.setup2Step7=!0,e.querySelector(".settings").click()),Object(He.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style","width: 385px; height: 966px; top: 46px; left: -5px;")},100)),e.querySelector(".group-holder-quick-menu").style.visibility="hidden",e.querySelector(".group-holder-quick-menu").style.top="45px",e.querySelector(".group-holder-quick-menu").style.opacity="0"):10===t?(e.querySelector(".settings").click(),"backward"===this.tour._direction&&Object(He.setTimeout)(()=>{document.querySelector(".introjs-tooltipReferenceLayer").setAttribute("style","width: 371px; height: 224px; top: 630px; left: 2px;")},100)):11===t&&(window.Buttonizer.bar.settingContainer.querySelector(".back-button").click(),this.setup2Step12||(this.setup2Step12=!0,window.Buttonizer.topBar.topBarElement.querySelector(".revert-save").addEventListener("click",()=>{null!==this.tour&&this.tour.nextStep()})))}}onExit(t,e){if(this.tour=null,this.amount=window.Buttonizer.buttonGroups[0].groupObject.querySelectorAll(".group-button").length,this.setupStep5=!1,this.setupStep6=!1,this.setupStep7=!1,this.setupStep10=!1,this.setupStep11=!1,this.setup2Step4=!1,this.setup2Step6=!1,this.setup2Step7=!1,this.setup2Step12=!1,1===e)(window.Buttonizer.bar.settingContainer.querySelector(".back-button").style.pointerEvents="none")&&(window.Buttonizer.bar.settingContainer.querySelector(".back-button").style.pointerEvents="all"),5===t?document.querySelector(".options-window").setAttribute("hidden",""):6===t?document.querySelector(".options-window").classList.remove("disabled"):7===t?window.Buttonizer.settingsWindow.title.parentElement.parentElement.removeAttribute("style","z-index:9999999 !important;pointer-events: none;"):20===t&&Object(He.setTimeout)(()=>{let t=this.intro2();t.onchange(e=>this.conditions(t._currentStep,e,2)),t.start(),t.onbeforeexit(()=>this.onExit(t._currentStep,2)),t.onexit(()=>{this.tour=null,this.amount=window.Buttonizer.buttonGroups[0].groupObject.querySelectorAll(".group-button").length,this.setupStep5=!1,this.setupStep6=!1,this.setupStep7=!1,this.setupStep10=!1,this.setupStep11=!1,this.setup2Step4=!1,this.setup2Step6=!1,this.setup2Step7=!1,this.setup2Step12=!1,20===t._currentStep&&window.Buttonizer.bar.groupHolder.querySelector(".create-new-button").click()})},300);else if(2===e){let e=window.Buttonizer.buttonGroups[0].groupBody.querySelectorAll(".buttonizer-button-group")[window.Buttonizer.buttonGroups[0].groupBody.querySelectorAll(".buttonizer-button-group").length-1];3===t&&(e.querySelector(".group-title").style.pointerEvents="all",e.querySelector(".mobile-desktop").style.pointerEvents="all"),e.querySelector(".group-holder-quick-menu").hasAttribute("style")&&e.querySelector(".group-holder-quick-menu").setAttribute("style",""),e.querySelector(".group-holder-quick-menu").classList.contains("disabled")&&e.querySelector(".group-holder-quick-menu").classList.remove("disabled"),(e.querySelector(".group-holder-quick-menu").style.pointerEvents="none")&&(e.querySelector(".group-holder-quick-menu").style.pointerEvents="all"),(e.querySelector(".group-title").style.pointerEvents="none")&&(e.querySelector(".group-title").style.pointerEvents="all"),(e.querySelector(".mobile-desktop").style.pointerEvents="none")&&(e.querySelector(".mobile-desktop").style.pointerEvents="all"),(e.querySelector(".fa-wrench").parentElement.style.pointerEvents="none")&&(e.querySelector(".fa-wrench").parentElement.style.pointerEvents="all")}}intro(){return this.tour=qe(),this.tour.setOptions({showBullets:!1,exitOnOverlayClick:!1,skipLabel:window.Buttonizer.translate("welcome.exit_tour"),doneLabel:window.Buttonizer.translate("welcome.exit_tour"),nextLabel:window.Buttonizer.translate("common.next")+" →",prevLabel:"← "+window.Buttonizer.translate("common.previous"),scrollToElement:!0,showStepNumbers:!1,disableInteraction:!0}),this.tour.setOptions({steps:[{intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-0.title")+"</b></h2> "+window.Buttonizer.translate("welcome.tour-steps.step-0.description")+"<br /><br />"+window.Buttonizer.translate("welcome.tour-steps.step-0.keyboard"),position:"left",tooltipClass:"max-width"},{element:document.querySelector(".buttonizer-bar"),intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-1.title")+"</b></h2> "+window.Buttonizer.translate("welcome.tour-steps.step-1.description"),position:"left"},{element:document.querySelector(".buttonizer-frame"),intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-2.title")+"</b></h2> "+window.Buttonizer.translate("welcome.tour-steps.step-2.description"),position:"left"},{element:document.querySelector(".buttonizer-topbar"),intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-3.title")+"</b></h2> "+window.Buttonizer.translate("welcome.tour-steps.step-3.description")+`\n\n <h4 style="font-weight:400;text-align:left;padding:0 15px">\n 1. ${window.Buttonizer.translate("welcome.tour-steps.step-3.list.close")}<br>\n 2. ${window.Buttonizer.translate("welcome.tour-steps.step-3.list.revert")}<br>\n 3. ${window.Buttonizer.translate("welcome.tour-steps.step-3.list.publish")}<br>\n 4. ${window.Buttonizer.translate("welcome.tour-steps.step-3.list.general-settings")}\n </h4>`,position:"left",tooltipClass:"middle"},{element:document.querySelector(".buttonizer-topbar .options-button"),intro:window.Buttonizer.translate("welcome.tour-steps.step-4.description"),position:"left",disableInteraction:!1},{element:document.querySelector(".options-window"),intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-5.title")+"</b></h2><b>"+window.Buttonizer.translate("bar.menu.knowledgebase.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-5.list.knowledgebase")+"<br><b>"+window.Buttonizer.translate("bar.menu.support.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-5.list.support")+"<br><b>"+window.Buttonizer.translate("bar.menu.community.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-5.list.community")+"<br><b>"+window.Buttonizer.translate("bar.menu.account.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-5.list.account")+"<br><b>"+window.Buttonizer.translate("bar.menu.upgrade.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-5.list.upgrade")+"<br><b>"+window.Buttonizer.translate("bar.menu.affiliation.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-5.list.affiliation")+"<br><b>"+window.Buttonizer.translate("bar.menu.options.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-5.list.options"),position:"left",tooltipClass:"wider"},{element:window.Buttonizer.topBar.optionsWindow.querySelector(".single-button"),intro:window.Buttonizer.translate("welcome.tour-steps.step-6.description")+" &rarr;",position:"left",disableInteraction:!1,highlightClass:"introjs-custom-hidden"},{element:window.Buttonizer.settingsWindow.title.parentElement.parentElement.querySelector(".window-menu"),intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-7.title")+"</b></h2><b>"+window.Buttonizer.translate("settings_window.icon_library.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-7.list.icon-library")+"<br><b>Google Analytics:</b> "+window.Buttonizer.translate("welcome.tour-steps.step-7.list.google-analytics")+"<br><b>"+window.Buttonizer.translate("settings_window.reset.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-7.list.reset")+"<br>",position:"left",highlightClass:"introjs-custom-hidden",tooltipClass:"wider"},{element:window.Buttonizer.bar.groupHolder.querySelector(".button-group-holder"),intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-8.title")+"</b></h2>"+window.Buttonizer.translate("welcome.tour-steps.step-8.multiple_buttons")+"<br><br>"+window.Buttonizer.translate("welcome.tour-steps.step-8.visible")+"<br><br>"+window.Buttonizer.translate("welcome.tour-steps.step-8.position")+"<br>",position:"right",tooltipClass:"max-width"},{element:window.Buttonizer.bar.groupHolder.querySelector(".button-group-holder").querySelector(".group-style"),intro:"<b>&larr;</b> "+window.Buttonizer.translate("welcome.tour-steps.step-9.description"),position:"right",disableInteraction:!1},{element:window.Buttonizer.bar.settingContainer,intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-10.title")+"</b></h2>"+window.Buttonizer.translate("welcome.tour-steps.step-10.description")+"<br><br>"+window.Buttonizer.translate("welcome.tour-steps.step-10.action"),position:"right",disableInteraction:!1,highlightClass:"introjs-custom-gone",scrollTo:!1,tooltipClass:"intojs-foff-height"},{element:1===this.getAmount()?jQuery(".button-group-styling")[1].querySelector(".style-top"):window.Buttonizer.buttonGroups[0].stylingObject.querySelector(".style-top"),intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-11.title")+"</b></h2><b>"+window.Buttonizer.translate("settings.menu_position.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-11.position")+"<br><b>"+window.Buttonizer.translate("settings.show_mobile_desktop.title")+"</b> "+window.Buttonizer.translate("welcome.tour-steps.step-11.visibility")+"<br>",position:"right",disableInteraction:!1,scrollTo:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:1===this.getAmount()?jQuery(".button-group-styling")[1].querySelector(".style-menu"):window.Buttonizer.buttonGroups[0].stylingObject.querySelector(".style-menu"),intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-12.title")+"</b></h2><b>"+window.Buttonizer.translate("settings.start_opened.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-12.start_opened")+"<br><b>"+window.Buttonizer.translate("settings.menu_style.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-12.menu_style")+"<br><b>"+window.Buttonizer.translate("settings.menu_animation.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-12.animation")+"<br>",position:"right",disableInteraction:!1,scrollTo:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:1===this.getAmount()?jQuery(".button-group-styling")[1].querySelector(".style-button"):window.Buttonizer.buttonGroups[0].stylingObject.querySelector(".style-button"),intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-13.title")+"</b></h2><b>"+window.Buttonizer.translate("settings.background_color.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-13.background_color")+"<br><b>"+window.Buttonizer.translate("settings.border_radius.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-13.border_radius")+"<br><b>"+window.Buttonizer.translate("settings.background_image.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-13.background_image")+"<br>",position:"right",disableInteraction:!1,scrollTo:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:1===this.getAmount()?jQuery(".button-group-styling")[1].querySelector(".style-icon"):window.Buttonizer.buttonGroups[0].stylingObject.querySelector(".style-icon"),intro:"<h2><b>"+window.Buttonizer.translate("settings.setting_categories.group_icon")+"</b></h2><b>"+window.Buttonizer.translate("settings.icon_or_image.title")+":</b> "+window.Buttonizer.translate("settings.icon_or_image.description")+'<br><h2 style="margin: 1em 0 0 0;"><b>'+window.Buttonizer.translate("settings.icon.title")+"</b></h2><b>"+window.Buttonizer.translate("settings.icon.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-14.icon")+"<br><b>"+window.Buttonizer.translate("settings.icon_color.title")+":</b> "+window.Buttonizer.translate("settings.icon_color.description")+"<br><b>"+window.Buttonizer.translate("settings.icon_size.title")+":</b> "+window.Buttonizer.translate("settings.icon_size.description")+'<br><h2 style="margin: 1em 0 0 0;"><b>'+window.Buttonizer.translate("utils.image")+"</b></h2><b>"+window.Buttonizer.translate("settings.icon_image_select.title")+":</b> "+window.Buttonizer.translate("settings.icon_image_select.description")+"<br><b>"+window.Buttonizer.translate("settings.icon_image_border_radius.title")+":</b> "+window.Buttonizer.translate("settings.icon_image_border_radius.description")+"<br><b>"+window.Buttonizer.translate("settings.icon_image_size.title")+":</b> "+window.Buttonizer.translate("settings.icon_image_size.description")+"<br>",position:"right",disableInteraction:!1,scrollTo:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:1===this.getAmount()?jQuery(".button-group-styling")[1].querySelector(".style-label"):window.Buttonizer.buttonGroups[0].stylingObject.querySelector(".style-label"),intro:"<h2><b>"+window.Buttonizer.translate("settings.setting_categories.label")+"</b></h2><b>"+window.Buttonizer.translate("settings.label.title")+":</b> "+window.Buttonizer.translate("settings.label.description")+"<br><b>"+window.Buttonizer.translate("settings.label_desktop.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-15.label_visibility")+"<br><b>"+window.Buttonizer.translate("settings.label_color.title")+":</b> "+window.Buttonizer.translate("settings.label_color.description")+"<br><b>"+window.Buttonizer.translate("settings.font_size_border_radius.title")+":</b> "+window.Buttonizer.translate("settings.font_size_border_radius.description")+"<br>",position:"right",disableInteraction:!1,scrollTo:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:window.Buttonizer.buttonGroups[0].groupObject.querySelector(".create-new-button"),intro:"<h2><b>"+window.Buttonizer.translate("utils.new_button")+"</b></h2>&larr; "+window.Buttonizer.translate("welcome.tour-steps.step-before-button.action"),position:"right",disableInteraction:!1},{element:window.Buttonizer.buttonGroups[0].groupObject.querySelector(".create-new-button"),intro:window.Buttonizer.translate("welcome.tour-steps.step-before-button.msg1"),position:"right",disableInteraction:!1},{element:window.Buttonizer.buttonGroups[0].groupObject.querySelector(".create-new-button"),intro:window.Buttonizer.translate("welcome.tour-steps.step-before-button.msg2"),position:"right",disableInteraction:!1},{element:window.Buttonizer.buttonGroups[0].groupObject.querySelector(".create-new-button"),intro:window.Buttonizer.translate("welcome.tour-steps.step-before-button.msg3"),position:"right",disableInteraction:!1},{position:"bottom",disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"introjs-custom-gone"},{position:"bottom",intro:window.Buttonizer.translate("welcome.tour-steps.step-before-button.msg4"),disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"introjs-custom-gone"},{position:"bottom",disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"introjs-custom-gone"}]}),this.tour}intro2(){this.tour=qe(),this.tour.setOptions({showBullets:!1,exitOnOverlayClick:!1,skipLabel:window.Buttonizer.translate("welcome.exit_tour"),doneLabel:window.Buttonizer.translate("welcome.exit_tour"),nextLabel:window.Buttonizer.translate("common.next")+" →",prevLabel:"← "+window.Buttonizer.translate("common.previous"),scrollToElement:!0,showStepNumbers:!1,disableInteraction:!0});let t=window.Buttonizer.buttonGroups[0].groupBody.querySelectorAll(".buttonizer-button-group")[window.Buttonizer.buttonGroups[0].groupBody.querySelectorAll(".buttonizer-button-group").length-1],e=window.Buttonizer.bar.settingContainer;return this.tour.setOptions({steps:[{element:t,intro:"<h2><b>"+window.Buttonizer.translate("common.button")+"</b></h2> "+window.Buttonizer.translate("welcome.tour-steps.step-23"),position:"right"},{element:this.amount<=7?t.querySelector(".group-title"):t,intro:"<h2><b>"+window.Buttonizer.translate("settings.name.title")+"</b></h2> "+window.Buttonizer.translate("settings.name.description"),position:"bottom",scrollToElement:!1,highlightClass:"introjs-custom-gone"},{element:this.amount<=7?t.querySelector(".mobile-desktop"):t,intro:"<h2><b>"+window.Buttonizer.translate("settings.label_desktop.title")+"</b></h2> "+window.Buttonizer.translate("welcome.tour-steps.step-15"),position:"bottom",highlightClass:"introjs-custom-gone"},{element:this.amount<=7?t.querySelector(".holder-button"):t,intro:"&larr; "+window.Buttonizer.translate("welcome.tour-steps.step-26"),position:"right",highlightClass:"introjs-custom-gone",disableInteraction:!1},{element:this.amount<=7?t.querySelector(".group-holder-quick-menu"):t,intro:'<h2><b>Menu</b></h2><p style="text-align: left;"><b>'+window.Buttonizer.translate("common.settings")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-27.edit_button")+"<br><b>"+window.Buttonizer.translate("utils.advanced_settings")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-27.advanced_settings")+"<br><b>"+window.Buttonizer.translate("utils.rename")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-27.rename")+"<br><b>"+window.Buttonizer.translate("utils.duplicate")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-27.duplicate")+"<br><b>"+window.Buttonizer.translate("utils.delete")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-27.delete")+"<br></p>",position:"right",highlightClass:"introjs-custom-gone"},{element:this.amount<=7?t.querySelector(".group-holder-quick-menu").querySelector(".settings"):t,intro:"&larr; "+window.Buttonizer.translate("welcome.tour-steps.step-28"),position:"right",disableInteraction:!1,highlightClass:"introjs-custom-hidden"},{element:window.Buttonizer.bar.settingContainer,intro:"<b><h2>"+window.Buttonizer.translate("welcome.tour-steps.step-29.title")+"</h2></b> "+window.Buttonizer.translate("welcome.tour-steps.step-29.description"),position:"right",disableInteraction:!1,highlightClass:"introjs-custom-gone"},{element:e.querySelectorAll(".style-top")[e.querySelectorAll(".style-top").length-1],intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-30.title")+"</b></h2><b>"+window.Buttonizer.translate("settings.button_action.title")+":</b> "+window.Buttonizer.translate("settings.button_action.description")+"<br><b>"+window.Buttonizer.translate("settings.show_mobile_desktop.device_visibility")+":</b> "+window.Buttonizer.translate("settings.show_mobile_desktop.description"),position:"right",disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:e.querySelectorAll(".style-button")[e.querySelectorAll(".style-button").length-1],intro:"<h2><b>"+window.Buttonizer.translate("settings.setting_categories.button_style")+"</b></h2>"+window.Buttonizer.translate("welcome.tour-steps.step-31.enabled")+"<br>"+window.Buttonizer.translate("welcome.tour-steps.step-31.turning_off"),position:"right",disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:e.querySelectorAll(".style-icon")[e.querySelectorAll(".style-icon").length-1],intro:"<h2><b>"+window.Buttonizer.translate("settings.setting_categories.button_icon")+"</b></h2><b>"+window.Buttonizer.translate("settings.icon_or_image.title")+":</b> "+window.Buttonizer.translate("settings.icon_or_image.description")+'<br><h2 style="margin: 1em 0 0 0;"><b>'+window.Buttonizer.translate("settings.icon.title")+"</b></h2><b>"+window.Buttonizer.translate("settings.icon.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-14.icon")+"<br><b>"+window.Buttonizer.translate("settings.icon_color.title")+":</b> "+window.Buttonizer.translate("settings.icon_color.description")+"<br><b>"+window.Buttonizer.translate("settings.icon_size.title")+":</b> "+window.Buttonizer.translate("settings.icon_size.description")+'<br><h2 style="margin: 1em 0 0 0;"><b>'+window.Buttonizer.translate("utils.image")+"</b></h2><b>"+window.Buttonizer.translate("settings.icon_image_select.title")+":</b> "+window.Buttonizer.translate("settings.icon_image_select.description")+"<br><b>"+window.Buttonizer.translate("settings.icon_image_border_radius.title")+":</b> "+window.Buttonizer.translate("settings.icon_image_border_radius.description")+"<br><b>"+window.Buttonizer.translate("settings.icon_image_size.title")+":</b> "+window.Buttonizer.translate("settings.icon_image_size.description")+"<br>",position:"right",disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:e.querySelectorAll(".style-label")[e.querySelectorAll(".style-label").length-1],intro:"<h2><b>"+window.Buttonizer.translate("settings.setting_categories.label")+"</b></h2><b>"+window.Buttonizer.translate("settings.label.title")+":</b> "+window.Buttonizer.translate("settings.label.description")+"<br><b>"+window.Buttonizer.translate("settings.label_desktop.title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-15.label_visibility")+"<br><b>"+window.Buttonizer.translate("settings.label_color.title")+":</b> "+window.Buttonizer.translate("settings.label_color.description")+"<br><b>"+window.Buttonizer.translate("settings.font_size_border_radius.title")+":</b> "+window.Buttonizer.translate("settings.font_size_border_radius.description")+"<br>",position:"right",disableInteraction:!1,highlightClass:"introjs-custom-gone",tooltipClass:"wider"},{element:window.Buttonizer.topBar.topBarElement.querySelector(".revert-save"),intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-34.title")+"</b></h2><b>"+window.Buttonizer.translate("welcome.tour-steps.step-34.revert_title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-34.revert_description")+"<br><br><b>"+window.Buttonizer.translate("welcome.tour-steps.step-34.save_title")+":</b> "+window.Buttonizer.translate("welcome.tour-steps.step-34.save_description"),position:"right",disableInteraction:!0,tooltipClass:"right"},{intro:"<h2><b>"+window.Buttonizer.translate("welcome.tour-steps.final.title")+"</b></h2>"+window.Buttonizer.translate("welcome.tour-steps.final.intro")+"<br /><br />"+window.Buttonizer.translate("welcome.tour-steps.final.outro"),position:"left",tooltipClass:"max-width"}]}),this.tour}}i(13),window.bdebug=new n;String.prototype.format||(String.prototype.format=function(){var t=arguments;return this.replace(/{(\d+)}/g,function(e,i){return void 0!==t[i]?t[i]:e})}),window.Buttonizer=new class{constructor(){this.loader={},this.topBar={},this.bar={},this.assetsLink=".",this.tour=null,this.version="-",this.settings={},this.buttonGroups=[],this.savingMechanism={},this.buttonizerInitData=[],this.timeSchedule={},this.pageRule={},this.windowsZindex=9999,this.bc,this.loading=!0,this.settingsWindow={},this.iframe=null,this.iframeLoaded=!1,this.iconLibraryLoaded=!1,this.ButtonizerStartedLoading=0,this.iconSelector=null,this.iconLibraryStylesheet=null,this.previewWarning=null,this.premium=!1,this.init(!0)}set buttonChanges(t){this.loading||(this.bc=t)}get buttonChanges(){return this.bc}init(t){document.body.className+=" buttonizer-initialized",bdebug.welcomeToTheConsole(),!0===t&&bdebug.startDebugging(),bdebug.warning("Buttonizer 2.0");let e=document.createElement("link");e.rel="shortcut icon",e.href=buttonizer_admin.dir+"/favicon.ico",document.head.appendChild(e),this.loader=new je,this.loader.show(this.translate("loading.settings")),this.savingMechanism=new Se,bdebug.warning("Buttonizer settings loading"),this.ButtonizerStartedLoading=(new Date).getTime(),this.loadSettings()}loadSettings(){jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&item=ButtonizerInitializer",dataType:"json",method:"get",success:t=>{bdebug.warning("Buttonizer settings loaded: "+((new Date).getTime()-this.ButtonizerStartedLoading)/1e3+"s"),"success"===t.status?this.defineSettings(t):this.fatalErrorLoading("<b>"+t.message+"</b>","Buttonizer.loadSettings().success")},error:(t,e,i)=>{this.loader.hide(),console.log(t),this.fatalErrorLoading("<b>"+e.toUpperCase()+":</b><br />"+i,"Buttonizer.loadSettings().error")}})}fatalErrorLoading(t,e){new s({title:"Error!",content:`\n <p>Oh, that was not what I was expecting! Something went wrong while we tried to load all Buttonizer settings.</p>\n <p>Try to reload the webpage. If that did not work, send us a <a href="https://community.buttonizer.pro/" target="_blank">support request</a>.</p>\n <p>Report the following information:</p>\n <p style='color: #FF0000; display: block; border: 1px solid #FF0000; padding: 10px;'>${t}<br /><br />Function place: ${e}</p>`,onConfirm:()=>{document.location.reload()},buttons:[{text:"Reload webpage",confirm:!0}]})}fatalError(t){console.error(t);let e=document.createElement("div");e.innerHTML='<p>Oh, that was not what we were expecting! Something went wrong.</p>\n <p>Try to reload the webpage. If that did not work, send us a <a href="https://community.buttonizer.pro/" target="_blank">support request</a>.</p>';let i=document.createElement("p");i.innerHTML="Do you want to see technical details? <a href='javascript:void(0)'>Click here!</a>",e.appendChild(i);let n=document.createElement("code");n.style.overflowX="auto",n.style.whiteSpace="nowrap",n.innerText=`Error type: ${t.name}\n \n Stack trace:\n \n ${t.stack}`,n.style.display="none",e.appendChild(n),i.addEventListener("click",()=>{i.style.display="none",n.style.display="block"}),new s({title:"Error!?!?1?!1?!",content:e,buttons:[{text:"Close",confirm:!0}]})}defineSettings(t){this.settings=t.settings,this.version=t.version,this.buttonizerInitData=t,this.premium=t.premium,xt.setDefaults({onShow:()=>"true"===this.getSetting("show_tooltips","true")||!0===this.getSetting("show_tooltips")}),this.loader.show(this.translate("loading.bar")),this.topBar=new ze(this),this.bar=new Ce(this),this.previewWarning=this.leftButtonizerWarning(),this.changes=t.changes,t.changes&&this.topBar.alertText.alert(this.translate("bar.previous_session")),this.initializeSettings(t.settings),this.initializeTimeSchedules(),this.initializePageRules(),this.loadButtonGroups(),this.loading=!1,this.settingsWindow=new Ie,document.location.href.indexOf("open-settings")>=0&&this.settingsWindow.show(),this.iconSelector=new Me,1!==this.buttonGroups.length||this.buttonGroups[0].singleButtonMode||this.buttonGroups[0].groupHolder.revealButtons(),this.createIframe();let e=document.createElement("link");e.rel="stylesheet",e.type="text/css",e.href="https://use.fontawesome.com/releases/v5.8.2/css/all.css",e.integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay",e.setAttribute("crossorigin","anonymous"),document.getElementsByTagName("head")[0].appendChild(e),window.addEventListener("message",t=>{t.isTrusted&&void 0!==t.data&&void 0!==t.data.eventType&&"buttonizer"===t.data.eventType&&("warning"===t.data.messageType?this.topBar.updateEventLogs(t.data.message):"javascript_error"===t.data.messageType?new s({title:this.translate("errors.custom_javascript.title"),content:`\n <p>${this.translate("errors.custom_javascript.message")}</p> <p><code style="display: block; padding: 15px;">${t.data.message}</code></p>\n `,buttons:[{text:this.translate("common.ok_fix"),confirm:!0}]}):"(re)loaded"===t.data.messageType&&console.log("[Buttonizer ADMIN] Buttonizer is (re)loaded! So last changes can be seen in the preview window."))},!1),document.location.href.indexOf("tour")>=0&&this.startTour()}startTour(){null===this.tour&&(this.tour=new Pe),this.tour.build()}createIframe(){let t=""===document.location.hash||"#open-settings"===document.location.hash?this.buttonizerInitData.wordpress.base:decodeURIComponent(document.location.hash.substr(1)),e=document.createElement("div");e.className="buttonizer-frame";let i=document.createElement("iframe");i.src=t+"?buttonizer-preview=1",i.id="buttonizer-iframe",i.setAttribute("frameborder","0"),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.addEventListener("load",t=>{this.iframeLoaded=!0,-1===t.target.contentWindow.location.href.indexOf("buttonizer-preview")&&-1===document.body.className.indexOf("warning-left-preview-window")&&(document.body.className+=" warning-left-preview-window",this.previewWarning.style.display="block")}),e.appendChild(i),document.body.appendChild(e),this.loader.show(this.translate("loading.website"),"site-loading"),setTimeout(()=>{this.iframeLoaded||this.loader.show(this.translate("loading.website")+"<br /><br /><small>"+this.translate("loading.website_slow")+"<br /><br /><a href='javascript:void(0)' onclick='window.Buttonizer.loader.hide()'>"+this.translate("loading.website_skip")+"</a></small>")},5e3);let n=setInterval(()=>{this.iframeLoaded&&this.iconLibraryLoaded&&(this.loader.hide(),document.body.className+=" buttonizer-loaded",clearInterval(n))})}welcome(){this.loader.hide(),new s({title:this.translate("welcome.title")+" "+this.version,content:`\n <img src="${buttonizer_admin.assets}/images/plugin-icon.png" width="100" align="left" style="margin-right: 20px; margin-bottom: 10px;" />\n <p>${this.translate("welcome.intro")}</p>\n <p>${this.translate("welcome.tour")}</p>\n `,onClose:()=>{this.saveSettings({welcome:"false"},!0)},onConfirm:()=>{this.startTour()},buttons:[{text:this.translate("welcome.already_know")+' <i class="fa fa-chevron-right" style="margin-left: 10px; vertical-align: middle;" aria-hidden="true"></i>',close:!0},{text:this.translate("welcome.take_tour")+' <i class="fa fa-chevron-right" style="margin-left: 10px; vertical-align: middle;" aria-hidden="true"></i>',confirm:!0}]})}updateButtonsTo2Point0(){new s({title:this.translate("migration_modal.title"),content:`\n <p>${this.translate("migration_modal.intro")}</p>\n <p>${this.translate("migration_modal.convert")}</p>\n \n <p>${this.translate("migration_modal.popping_up")}</p> \n `,onConfirm:()=>{window.Buttonizer.loader.show(this.translate("loading.running_migration")),jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&item=SaveData&save=migrate-buttonizer",dataType:"json",method:"post",data:{security:buttonizer_admin.security},success:t=>{"success"===t.status?(window.Buttonizer.loader.show(this.translate("loading.finishing")),setTimeout(()=>{document.location.reload()},500)):(window.Buttonizer.loader.hide(),window.Buttonizer.savingError(t.message))},error:(t,e,i)=>{window.Buttonizer.loader.hide(),window.Buttonizer.savingError(e)}})},buttons:[{text:this.translate("modal.no_thanks"),close:!0},{text:this.translate("migration_modal.convert_buttons")+' <i class="fa fa-chevron-right" style="margin-left: 10px; vertical-align: middle;" aria-hidden="true"></i>',confirm:!0}]})}leftButtonizerWarning(){let t=document.createElement("div");t.className="buttonizer-warning warning-red",t.innerHTML=this.translate("bar.preview.no_changes");let e=document.createElement("a");return e.href="javascript:void(0)",e.className="buttonizer-warning-button",e.innerText=this.translate("bar.preview.return"),e.addEventListener("click",()=>{document.body.className=document.body.className.replace("warning-left-preview-window",""),this.previewWarning.style.display="none",document.getElementById("buttonizer-iframe").setAttribute("src",window.Buttonizer.buttonizerInitData.wordpress.base+"?buttonizer-preview=true")}),t.appendChild(e),document.body.appendChild(t),t}saveSettings(t,e){e&&this.loader.show(this.translate("common.saving_settings")),Object.assign(this.settings,t),jQuery.ajax({url:buttonizer_admin.ajax+"?action=buttonizer_backend&item=SaveData&save=settings",dataType:"json",method:"post",data:{data:this.settings,security:buttonizer_admin.security},success:t=>{this.loader.hide(),"success"!==t.status&&window.Buttonizer.savingError(t.message)},error:t=>{this.loader.hide(),window.Buttonizer.savingError(t)}})}registerButton(t){}saveButtons(){console.log(this.buttons)}initializeSettings(t){"true"===t.welcome.toString()&&this.welcome(),this.settings=t,this.addIconLibrary()}addIconLibrary(){let t=!1;null===this.iconLibraryStylesheet&&(this.iconLibraryStylesheet=document.createElement("link"),this.iconLibraryStylesheet.rel="stylesheet",this.iconLibraryStylesheet.type="text/css",t=!0),"fontawesome"!==this.settings.icon_library||"5.free"!==this.settings.icon_library_version&&"5.paid"!==this.settings.icon_library_version?"fontawesome"===this.settings.icon_library&&"4.7.0"===this.settings.icon_library_version&&(this.iconLibraryStylesheet.setAttribute("integrity",""),this.iconLibraryStylesheet.href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"):("5.paid"===this.settings.icon_library_version&&""!==this.settings.icon_library_code?this.iconLibraryStylesheet.setAttribute("integrity",this.settings.icon_library_code):this.iconLibraryStylesheet.setAttribute("integrity","sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay"),this.iconLibraryStylesheet.setAttribute("crossorigin","anonymous"),this.iconLibraryStylesheet.href="https://"+("5.paid"===this.settings.icon_library_version?"pro":"use")+".fontawesome.com/releases/"+this.buttonizerInitData.fontawesome_current_version+"/css/all.css"),this.iconLibraryLoaded=!0}hasPremium(){return this.premium}showPremiumPopup(t,e){new s({title:'<i class="far fa-gem window-icon"></i> '+this.translate("premium.modal.title"),content:`\n <p>${this.translate("premium.modal.describe")}</p>\n <code style="display: block; margin-bottom: 5px; padding: 10px;">${t}</code>\n <p><b>${this.translate("premium.modal.what_do_i_get")}</b></p>\n \n <ul class="buttonizer-pro-checklist">\n <li><i class="fas fa-check"></i> ${this.translate("premium.modal.list.time_schedules")}</li>\n <li><i class="fas fa-check"></i> ${this.translate("premium.modal.list.page_rules")}</li>\n <li><i class="fas fa-check"></i> ${this.translate("premium.modal.list.button_groups")}</li>\n <li><i class="fas fa-check"></i> ${this.translate("premium.modal.list.custom_images")}</li>\n <li><i class="fas fa-check"></i> ${this.translate("premium.modal.list.exit_intent")}</li>\n <li><i class="fas fa-check"></i> ${this.translate("premium.modal.list.show_on_scroll")}</li>\n <li><i class="fas fa-check"></i> ${this.translate("premium.modal.list.show_on_timeout")}</li>\n <li><i class="fas fa-check"></i> ${this.translate("premium.modal.list.custom_class")}</li>\n <li><i class="fas fa-check"></i> ${this.translate("premium.modal.list.javascript")}</li>\n </ul>`,onConfirm:()=>{document.location.href=buttonizer_admin.admin+"?page=Buttonizer-pricing"},video:e,buttons:[{text:this.translate("modal.close"),close:!0},{text:this.translate("premium.modal.go_pro")+' <i class="fas fa-chevron-right" style="margin-left: 5px;vertical-align: middle;"></i>',confirm:!0,close:!0,focus:!0}]})}getSetting(t,e){return void 0!==this.settings[t]?this.settings[t]:e}set changes(t){this.topBar.changes=t}updateButtonGroupList(t,e){this.buttonGroups.splice(t,0,this.buttonGroups.splice(e,1)[0]),this.buttonChanges=!0}updateButtonList(t,e,i,n){this.buttonGroups[i].buttons.splice(t,0,this.buttonGroups[n].buttons.splice(e,1)[0]),this.buttonGroups[i].buttons[t].groupObject=this.buttonGroups[i],this.buttonChanges=!0,this.buttonGroups[n].buttons.length<=1&&jQuery(this.buttonGroups[n].groupBody).sortable("option","cancel",".group-button")}savingError(t){new s({title:this.translate("errors.saving.title"),content:`<p>${this.translate("errors.saving.message")}.</p><p>${t}</p>`,buttons:[{text:this.translate("modal.close"),close:!0}]})}initializeTimeSchedules(){}initializePageRules(){}loadButtonGroups(){if(void 0!==this.buttonizerInitData.groups.buttonorder&&this.updateButtonsTo2Point0(),0===this.buttonizerInitData.groups.length)return new Ee({name:"Buttonizer",position:"bottomright",icon:"fa fa-plus",horizontal:5,vertical:5},[{name:window.Buttonizer.translate("utils.first_button"),show_mobile:!0,show_desktop:!0},{name:window.Buttonizer.translate("utils.second_button"),show_mobile:!0,show_desktop:!0}]),void setTimeout(()=>{this.buttonChanges=!0},1e3);new Ee(this.buttonizerInitData.groups[0].data,this.buttonizerInitData.groups[0].buttons)}translate(t=""){let e=t.split(".");if(void 0===buttonizer_translations[e[0]])return console.error("Localization not found: "+t),t;let i=buttonizer_translations[e[0]];for(let n=1,o=e.length;n<o;n++){if(void 0===i[e[n]])return console.error("Localization not found: "+t),t;i=i[e[n]]}return i}__(t=""){return this.translate(t)}}},,function(t,e){}]);
assets/frontend.css CHANGED
@@ -2146,6 +2146,242 @@
2146
  .buttonizer.buttonizer-style-square.bottom.left .buttonizer-button.button-mobile-7 {
2147
  bottom: 336px; } }
2148
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2149
  /*
2150
  * Buttonizer Animation - Hello
2151
  */
@@ -2279,6 +2515,249 @@
2279
  transform: translateY(-15px);
2280
  opacity: 1; } }
2281
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2282
  .buttonizer.button-mobile-only {
2283
  display: none; }
2284
 
2146
  .buttonizer.buttonizer-style-square.bottom.left .buttonizer-button.button-mobile-7 {
2147
  bottom: 336px; } }
2148
 
2149
+ /**
2150
+ * Default buttonizer style
2151
+ */
2152
+ .buttonizer.buttonizer-style-rectangle .buttonizer-head {
2153
+ visibility: hidden;
2154
+ opacity: 0;
2155
+ z-index: -1; }
2156
+
2157
+ .buttonizer.buttonizer-style-rectangle .buttonizer-button {
2158
+ border-radius: 0px;
2159
+ box-shadow: none;
2160
+ display: flex; }
2161
+ .buttonizer.buttonizer-style-rectangle .buttonizer-button:hover .buttonizer-label {
2162
+ opacity: 1;
2163
+ visibility: visible; }
2164
+ .buttonizer.buttonizer-style-rectangle .buttonizer-button .buttonizer-label {
2165
+ padding: 0 20px;
2166
+ height: 56px !important;
2167
+ line-height: 56px !important;
2168
+ border-radius: 0px; }
2169
+
2170
+ .buttonizer.buttonizer-style-rectangle .buttonizer-button-list {
2171
+ opacity: 0;
2172
+ visibility: hidden;
2173
+ transition: all 0.2s ease-in-out;
2174
+ -moz-transition: all 0.2s ease-in-out;
2175
+ -webkit-transition: all 0.2s ease-in-out;
2176
+ -o-transition: all 0.2s ease-in-out; }
2177
+ .buttonizer.buttonizer-style-rectangle .buttonizer-button-list .buttonizer-button {
2178
+ position: absolute;
2179
+ left: 0px;
2180
+ line-height: 53px;
2181
+ transition: all 0.2s ease-in-out;
2182
+ -moz-transition: all 0.2s ease-in-out;
2183
+ -webkit-transition: all 0.2s ease-in-out;
2184
+ -o-transition: all 0.2s ease-in-out; }
2185
+
2186
+ .buttonizer.buttonizer-style-rectangle.opened .buttonizer-button-list {
2187
+ opacity: 1;
2188
+ visibility: visible; }
2189
+ .buttonizer.buttonizer-style-rectangle.opened .buttonizer-button-list .buttonizer-button {
2190
+ opacity: 1;
2191
+ visibility: visible; }
2192
+
2193
+ @media screen and (min-width: 770px) {
2194
+ .buttonizer.buttonizer-style-rectangle.top.right .buttonizer-button .buttonizer-label {
2195
+ right: 55px;
2196
+ -webkit-border-top-right-radius: 0;
2197
+ -webkit-border-bottom-right-radius: 0;
2198
+ -moz-border-radius-topright: 0;
2199
+ -moz-border-radius-bottomright: 0;
2200
+ border-top-right-radius: 0;
2201
+ border-bottom-right-radius: 0; }
2202
+ .buttonizer.buttonizer-style-rectangle.top.right .buttonizer-button.button-desktop-1 {
2203
+ top: 0px; }
2204
+ .buttonizer.buttonizer-style-rectangle.top.right .buttonizer-button.button-desktop-2 {
2205
+ top: 56px; }
2206
+ .buttonizer.buttonizer-style-rectangle.top.right .buttonizer-button.button-desktop-3 {
2207
+ top: 112px; }
2208
+ .buttonizer.buttonizer-style-rectangle.top.right .buttonizer-button.button-desktop-4 {
2209
+ top: 168px; }
2210
+ .buttonizer.buttonizer-style-rectangle.top.right .buttonizer-button.button-desktop-5 {
2211
+ top: 224px; }
2212
+ .buttonizer.buttonizer-style-rectangle.top.right .buttonizer-button.button-desktop-6 {
2213
+ top: 280px; }
2214
+ .buttonizer.buttonizer-style-rectangle.top.right .buttonizer-button.button-desktop-7 {
2215
+ top: 336px; } }
2216
+
2217
+ @media screen and (max-width: 769px) {
2218
+ .buttonizer.buttonizer-style-rectangle.top.right .buttonizer-button .buttonizer-label {
2219
+ right: 55px;
2220
+ -webkit-border-top-right-radius: 0;
2221
+ -webkit-border-bottom-right-radius: 0;
2222
+ -moz-border-radius-topright: 0;
2223
+ -moz-border-radius-bottomright: 0;
2224
+ border-top-right-radius: 0;
2225
+ border-bottom-right-radius: 0; }
2226
+ .buttonizer.buttonizer-style-rectangle.top.right .buttonizer-button.button-mobile-1 {
2227
+ top: 0px; }
2228
+ .buttonizer.buttonizer-style-rectangle.top.right .buttonizer-button.button-mobile-2 {
2229
+ top: 56px; }
2230
+ .buttonizer.buttonizer-style-rectangle.top.right .buttonizer-button.button-mobile-3 {
2231
+ top: 112px; }
2232
+ .buttonizer.buttonizer-style-rectangle.top.right .buttonizer-button.button-mobile-4 {
2233
+ top: 168px; }
2234
+ .buttonizer.buttonizer-style-rectangle.top.right .buttonizer-button.button-mobile-5 {
2235
+ top: 224px; }
2236
+ .buttonizer.buttonizer-style-rectangle.top.right .buttonizer-button.button-mobile-6 {
2237
+ top: 280px; }
2238
+ .buttonizer.buttonizer-style-rectangle.top.right .buttonizer-button.button-mobile-7 {
2239
+ top: 336px; } }
2240
+
2241
+ @media screen and (min-width: 770px) {
2242
+ .buttonizer.buttonizer-style-rectangle.top.left .buttonizer-button .buttonizer-label {
2243
+ left: 55px;
2244
+ -webkit-border-top-left-radius: 0;
2245
+ -webkit-border-bottom-left-radius: 0;
2246
+ -moz-border-radius-topleft: 0;
2247
+ -moz-border-radius-bottomleft: 0;
2248
+ border-top-left-radius: 0;
2249
+ border-bottom-left-radius: 0; }
2250
+ .buttonizer.buttonizer-style-rectangle.top.left .buttonizer-button.button-desktop-1 {
2251
+ top: 0px; }
2252
+ .buttonizer.buttonizer-style-rectangle.top.left .buttonizer-button.button-desktop-2 {
2253
+ top: 56px; }
2254
+ .buttonizer.buttonizer-style-rectangle.top.left .buttonizer-button.button-desktop-3 {
2255
+ top: 112px; }
2256
+ .buttonizer.buttonizer-style-rectangle.top.left .buttonizer-button.button-desktop-4 {
2257
+ top: 168px; }
2258
+ .buttonizer.buttonizer-style-rectangle.top.left .buttonizer-button.button-desktop-5 {
2259
+ top: 224px; }
2260
+ .buttonizer.buttonizer-style-rectangle.top.left .buttonizer-button.button-desktop-6 {
2261
+ top: 280px; }
2262
+ .buttonizer.buttonizer-style-rectangle.top.left .buttonizer-button.button-desktop-7 {
2263
+ top: 336px; } }
2264
+
2265
+ @media screen and (max-width: 769px) {
2266
+ .buttonizer.buttonizer-style-rectangle.top.left .buttonizer-button .buttonizer-label {
2267
+ left: 55px;
2268
+ -webkit-border-top-left-radius: 0;
2269
+ -webkit-border-bottom-left-radius: 0;
2270
+ -moz-border-radius-topleft: 0;
2271
+ -moz-border-radius-bottomleft: 0;
2272
+ border-top-left-radius: 0;
2273
+ border-bottom-left-radius: 0; }
2274
+ .buttonizer.buttonizer-style-rectangle.top.left .buttonizer-button.button-mobile-1 {
2275
+ top: 0px; }
2276
+ .buttonizer.buttonizer-style-rectangle.top.left .buttonizer-button.button-mobile-2 {
2277
+ top: 56px; }
2278
+ .buttonizer.buttonizer-style-rectangle.top.left .buttonizer-button.button-mobile-3 {
2279
+ top: 112px; }
2280
+ .buttonizer.buttonizer-style-rectangle.top.left .buttonizer-button.button-mobile-4 {
2281
+ top: 168px; }
2282
+ .buttonizer.buttonizer-style-rectangle.top.left .buttonizer-button.button-mobile-5 {
2283
+ top: 224px; }
2284
+ .buttonizer.buttonizer-style-rectangle.top.left .buttonizer-button.button-mobile-6 {
2285
+ top: 280px; }
2286
+ .buttonizer.buttonizer-style-rectangle.top.left .buttonizer-button.button-mobile-7 {
2287
+ top: 336px; } }
2288
+
2289
+ @media screen and (min-width: 770px) {
2290
+ .buttonizer.buttonizer-style-rectangle.bottom.right .buttonizer-button .buttonizer-label {
2291
+ right: 55px;
2292
+ -webkit-border-top-right-radius: 0;
2293
+ -webkit-border-bottom-right-radius: 0;
2294
+ -moz-border-radius-topright: 0;
2295
+ -moz-border-radius-bottomright: 0;
2296
+ border-top-right-radius: 0;
2297
+ border-bottom-right-radius: 0; }
2298
+ .buttonizer.buttonizer-style-rectangle.bottom.right .buttonizer-button.button-desktop-1 {
2299
+ bottom: 0px; }
2300
+ .buttonizer.buttonizer-style-rectangle.bottom.right .buttonizer-button.button-desktop-2 {
2301
+ bottom: 56px; }
2302
+ .buttonizer.buttonizer-style-rectangle.bottom.right .buttonizer-button.button-desktop-3 {
2303
+ bottom: 112px; }
2304
+ .buttonizer.buttonizer-style-rectangle.bottom.right .buttonizer-button.button-desktop-4 {
2305
+ bottom: 168px; }
2306
+ .buttonizer.buttonizer-style-rectangle.bottom.right .buttonizer-button.button-desktop-5 {
2307
+ bottom: 224px; }
2308
+ .buttonizer.buttonizer-style-rectangle.bottom.right .buttonizer-button.button-desktop-6 {
2309
+ bottom: 280px; }
2310
+ .buttonizer.buttonizer-style-rectangle.bottom.right .buttonizer-button.button-desktop-7 {
2311
+ bottom: 336px; } }
2312
+
2313
+ @media screen and (max-width: 769px) {
2314
+ .buttonizer.buttonizer-style-rectangle.bottom.right .buttonizer-button .buttonizer-label {
2315
+ right: 55px;
2316
+ -webkit-border-top-right-radius: 0;
2317
+ -webkit-border-bottom-right-radius: 0;
2318
+ -moz-border-radius-topright: 0;
2319
+ -moz-border-radius-bottomright: 0;
2320
+ border-top-right-radius: 0;
2321
+ border-bottom-right-radius: 0; }
2322
+ .buttonizer.buttonizer-style-rectangle.bottom.right .buttonizer-button.button-mobile-1 {
2323
+ bottom: 0px; }
2324
+ .buttonizer.buttonizer-style-rectangle.bottom.right .buttonizer-button.button-mobile-2 {
2325
+ bottom: 56px; }
2326
+ .buttonizer.buttonizer-style-rectangle.bottom.right .buttonizer-button.button-mobile-3 {
2327
+ bottom: 112px; }
2328
+ .buttonizer.buttonizer-style-rectangle.bottom.right .buttonizer-button.button-mobile-4 {
2329
+ bottom: 168px; }
2330
+ .buttonizer.buttonizer-style-rectangle.bottom.right .buttonizer-button.button-mobile-5 {
2331
+ bottom: 224px; }
2332
+ .buttonizer.buttonizer-style-rectangle.bottom.right .buttonizer-button.button-mobile-6 {
2333
+ bottom: 280px; }
2334
+ .buttonizer.buttonizer-style-rectangle.bottom.right .buttonizer-button.button-mobile-7 {
2335
+ bottom: 336px; } }
2336
+
2337
+ @media screen and (min-width: 770px) {
2338
+ .buttonizer.buttonizer-style-rectangle.bottom.left .buttonizer-button .buttonizer-label {
2339
+ left: 55px;
2340
+ -webkit-border-top-left-radius: 0;
2341
+ -webkit-border-bottom-left-radius: 0;
2342
+ -moz-border-radius-topleft: 0;
2343
+ -moz-border-radius-bottomleft: 0;
2344
+ border-top-left-radius: 0;
2345
+ border-bottom-left-radius: 0; }
2346
+ .buttonizer.buttonizer-style-rectangle.bottom.left .buttonizer-button.button-desktop-1 {
2347
+ bottom: 0px; }
2348
+ .buttonizer.buttonizer-style-rectangle.bottom.left .buttonizer-button.button-desktop-2 {
2349
+ bottom: 56px; }
2350
+ .buttonizer.buttonizer-style-rectangle.bottom.left .buttonizer-button.button-desktop-3 {
2351
+ bottom: 112px; }
2352
+ .buttonizer.buttonizer-style-rectangle.bottom.left .buttonizer-button.button-desktop-4 {
2353
+ bottom: 168px; }
2354
+ .buttonizer.buttonizer-style-rectangle.bottom.left .buttonizer-button.button-desktop-5 {
2355
+ bottom: 224px; }
2356
+ .buttonizer.buttonizer-style-rectangle.bottom.left .buttonizer-button.button-desktop-6 {
2357
+ bottom: 280px; }
2358
+ .buttonizer.buttonizer-style-rectangle.bottom.left .buttonizer-button.button-desktop-7 {
2359
+ bottom: 336px; } }
2360
+
2361
+ @media screen and (max-width: 769px) {
2362
+ .buttonizer.buttonizer-style-rectangle.bottom.left .buttonizer-button .buttonizer-label {
2363
+ left: 55px;
2364
+ -webkit-border-top-left-radius: 0;
2365
+ -webkit-border-bottom-left-radius: 0;
2366
+ -moz-border-radius-topleft: 0;
2367
+ -moz-border-radius-bottomleft: 0;
2368
+ border-top-left-radius: 0;
2369
+ border-bottom-left-radius: 0; }
2370
+ .buttonizer.buttonizer-style-rectangle.bottom.left .buttonizer-button.button-mobile-1 {
2371
+ bottom: 0px; }
2372
+ .buttonizer.buttonizer-style-rectangle.bottom.left .buttonizer-button.button-mobile-2 {
2373
+ bottom: 56px; }
2374
+ .buttonizer.buttonizer-style-rectangle.bottom.left .buttonizer-button.button-mobile-3 {
2375
+ bottom: 112px; }
2376
+ .buttonizer.buttonizer-style-rectangle.bottom.left .buttonizer-button.button-mobile-4 {
2377
+ bottom: 168px; }
2378
+ .buttonizer.buttonizer-style-rectangle.bottom.left .buttonizer-button.button-mobile-5 {
2379
+ bottom: 224px; }
2380
+ .buttonizer.buttonizer-style-rectangle.bottom.left .buttonizer-button.button-mobile-6 {
2381
+ bottom: 280px; }
2382
+ .buttonizer.buttonizer-style-rectangle.bottom.left .buttonizer-button.button-mobile-7 {
2383
+ bottom: 336px; } }
2384
+
2385
  /*
2386
  * Buttonizer Animation - Hello
2387
  */
2515
  transform: translateY(-15px);
2516
  opacity: 1; } }
2517
 
2518
+ /*
2519
+ * Buttonizer Animation - Jumping
2520
+ */
2521
+ .buttonizer.attention-animation-true.buttonizer-animation-bounce .buttonizer-head {
2522
+ -webkit-animation: buttonizer-bounce 1s linear;
2523
+ animation: buttonizer-bounce 1s linear; }
2524
+
2525
+ .buttonizer.attention-animation-true.buttonizer-animation-bounce.buttonizer-desktop-has-1.buttonizer-mobile-has-1 .buttonizer-button {
2526
+ -webkit-animation: buttonizer-bounce 1s linear;
2527
+ animation: buttonizer-bounce 1s linear; }
2528
+
2529
+ .buttonizer.attention-animation-true.buttonizer-animation-jump .buttonizer-head {
2530
+ -webkit-animation: buttonizer-jump 1s linear;
2531
+ animation: buttonizer-jump 1s linear; }
2532
+
2533
+ .buttonizer.attention-animation-true.buttonizer-animation-jump.buttonizer-desktop-has-1.buttonizer-mobile-has-1 .buttonizer-button {
2534
+ -webkit-animation: buttonizer-jump 1s linear;
2535
+ animation: buttonizer-jump 1s linear; }
2536
+
2537
+ @-webkit-keyframes buttonizer-jump {
2538
+ 0% {
2539
+ -webkit-transform: translateY(0);
2540
+ transform: translateY(0); }
2541
+ 20% {
2542
+ -webkit-transform: translateY(0);
2543
+ transform: translateY(0); }
2544
+ 40% {
2545
+ -webkit-transform: translateY(-30px);
2546
+ transform: translateY(-30px); }
2547
+ 50% {
2548
+ -webkit-transform: translateY(0);
2549
+ transform: translateY(0); }
2550
+ 60% {
2551
+ -webkit-transform: translateY(-15px);
2552
+ transform: translateY(-15px); }
2553
+ 80% {
2554
+ -webkit-transform: translateY(0);
2555
+ transform: translateY(0); }
2556
+ 100% {
2557
+ -webkit-transform: translateY(0);
2558
+ transform: translateY(0); } }
2559
+
2560
+ @keyframes buttonizer-jump {
2561
+ 0% {
2562
+ transform: translateY(0); }
2563
+ 20% {
2564
+ transform: translateY(0); }
2565
+ 40% {
2566
+ transform: translateY(-30px); }
2567
+ 50% {
2568
+ transform: translateY(0); }
2569
+ 60% {
2570
+ transform: translateY(-15px); }
2571
+ 80% {
2572
+ transform: translateY(0); }
2573
+ 100% {
2574
+ transform: translateY(0); } }
2575
+
2576
+ /*
2577
+ * Buttonizer Animation - Flip
2578
+ */
2579
+ /* premium:start */
2580
+ .buttonizer.attention-animation-true.buttonizer-animation-flip .buttonizer-head {
2581
+ -webkit-animation: buttonizer-flip 1s linear;
2582
+ animation: buttonizer-flip 1s linear;
2583
+ -webkit-backface-visibility: visible;
2584
+ backface-visibility: visible; }
2585
+
2586
+ .buttonizer.attention-animation-true.buttonizer-animation-flip.buttonizer-desktop-has-1.buttonizer-mobile-has-1 .buttonizer-button {
2587
+ -webkit-animation: buttonizer-flip 1s linear;
2588
+ animation: buttonizer-flip 1s linear;
2589
+ -webkit-backface-visibility: visible;
2590
+ backface-visibility: visible; }
2591
+
2592
+ @-webkit-keyframes buttonizer-flip {
2593
+ 0% {
2594
+ -webkit-transform: perspective(400px) scaleX(1) translateZ(0) rotateY(-1turn);
2595
+ transform: perspective(400px) scaleX(1) translateZ(0) rotateY(-1turn);
2596
+ -webkit-animation-timing-function: ease-out;
2597
+ animation-timing-function: ease-out; }
2598
+ 40% {
2599
+ -webkit-transform: perspective(400px) scaleX(1) translateZ(150px) rotateY(-190deg);
2600
+ transform: perspective(400px) scaleX(1) translateZ(150px) rotateY(-190deg);
2601
+ -webkit-animation-timing-function: ease-out;
2602
+ animation-timing-function: ease-out; }
2603
+ 50% {
2604
+ -webkit-transform: perspective(400px) scaleX(1) translateZ(150px) rotateY(-170deg);
2605
+ transform: perspective(400px) scaleX(1) translateZ(150px) rotateY(-170deg);
2606
+ -webkit-animation-timing-function: ease-in;
2607
+ animation-timing-function: ease-in; }
2608
+ 80% {
2609
+ -webkit-transform: perspective(400px) scale3d(0.95, 0.95, 0.95) translateZ(0) rotateY(0deg);
2610
+ transform: perspective(400px) scale3d(0.95, 0.95, 0.95) translateZ(0) rotateY(0deg);
2611
+ -webkit-animation-timing-function: ease-in;
2612
+ animation-timing-function: ease-in; }
2613
+ to {
2614
+ -webkit-transform: perspective(400px) scaleX(1) translateZ(0) rotateY(0deg);
2615
+ transform: perspective(400px) scaleX(1) translateZ(0) rotateY(0deg);
2616
+ -webkit-animation-timing-function: ease-in;
2617
+ animation-timing-function: ease-in; } }
2618
+
2619
+ @keyframes buttonizer-flip {
2620
+ 0% {
2621
+ -webkit-transform: perspective(400px) scaleX(1) translateZ(0) rotateY(-1turn);
2622
+ transform: perspective(400px) scaleX(1) translateZ(0) rotateY(-1turn);
2623
+ -webkit-animation-timing-function: ease-out;
2624
+ animation-timing-function: ease-out; }
2625
+ 40% {
2626
+ -webkit-transform: perspective(400px) scaleX(1) translateZ(150px) rotateY(-190deg);
2627
+ transform: perspective(400px) scaleX(1) translateZ(150px) rotateY(-190deg);
2628
+ -webkit-animation-timing-function: ease-out;
2629
+ animation-timing-function: ease-out; }
2630
+ 50% {
2631
+ -webkit-transform: perspective(400px) scaleX(1) translateZ(150px) rotateY(-170deg);
2632
+ transform: perspective(400px) scaleX(1) translateZ(150px) rotateY(-170deg);
2633
+ -webkit-animation-timing-function: ease-in;
2634
+ animation-timing-function: ease-in; }
2635
+ 80% {
2636
+ -webkit-transform: perspective(400px) scale3d(0.95, 0.95, 0.95) translateZ(0) rotateY(0deg);
2637
+ transform: perspective(400px) scale3d(0.95, 0.95, 0.95) translateZ(0) rotateY(0deg);
2638
+ -webkit-animation-timing-function: ease-in;
2639
+ animation-timing-function: ease-in; }
2640
+ to {
2641
+ -webkit-transform: perspective(400px) scaleX(1) translateZ(0) rotateY(0deg);
2642
+ transform: perspective(400px) scaleX(1) translateZ(0) rotateY(0deg);
2643
+ -webkit-animation-timing-function: ease-in;
2644
+ animation-timing-function: ease-in; } }
2645
+
2646
+ /* premium:end */
2647
+ /*
2648
+ * Buttonizer Animation - Pulse
2649
+ */
2650
+ /* premium:start */
2651
+ .buttonizer.attention-animation-true.buttonizer-animation-pulse.buttonizer-desktop-has-1.buttonizer-mobile-has-1 .buttonizer-button:before, .buttonizer.attention-animation-true.buttonizer-animation-pulse.buttonizer-desktop-has-1.buttonizer-mobile-has-1 .buttonizer-button:after, .buttonizer.attention-animation-true.buttonizer-animation-pulse .buttonizer-head:before, .buttonizer.attention-animation-true.buttonizer-animation-pulse .buttonizer-head:after {
2652
+ content: "";
2653
+ position: absolute;
2654
+ top: 0;
2655
+ left: 0;
2656
+ right: 0;
2657
+ bottom: 0;
2658
+ z-index: -1;
2659
+ display: block;
2660
+ background: #f01938;
2661
+ border-radius: 50%; }
2662
+
2663
+ .buttonizer.attention-animation-true.buttonizer-animation-pulse.buttonizer-desktop-has-1.buttonizer-mobile-has-1 .buttonizer-button:before, .buttonizer.attention-animation-true.buttonizer-animation-pulse .buttonizer-head:before {
2664
+ animation: buttonizer-pulse 1.8s 0s ease-out;
2665
+ -webkit-animation: buttonizer-pulse 1.8s 0s ease-out; }
2666
+
2667
+ .buttonizer.attention-animation-true.buttonizer-animation-pulse.buttonizer-desktop-has-1.buttonizer-mobile-has-1 .buttonizer-button:after, .buttonizer.attention-animation-true.buttonizer-animation-pulse .buttonizer-head:after {
2668
+ animation: buttonizer-pulse 1.8s 0.333s ease-out;
2669
+ -webkit-animation: buttonizer-pulse 1.8s 0.333s ease-out; }
2670
+
2671
+ @-webkit-keyframes buttonizer-pulse {
2672
+ 0% {
2673
+ opacity: 0;
2674
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
2675
+ -webkit-transform: scale(1);
2676
+ transform: scale(1); }
2677
+ 5% {
2678
+ opacity: 1;
2679
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; }
2680
+ 100% {
2681
+ -webkit-transform: scale(1.8);
2682
+ transform: scale(1.8);
2683
+ opacity: 0;
2684
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; } }
2685
+
2686
+ @keyframes buttonizer-pulse {
2687
+ 0% {
2688
+ opacity: 0;
2689
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
2690
+ -webkit-transform: scale(1);
2691
+ transform: scale(1); }
2692
+ 5% {
2693
+ opacity: 1;
2694
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; }
2695
+ 100% {
2696
+ -webkit-transform: scale(1.8);
2697
+ transform: scale(1.8);
2698
+ opacity: 0;
2699
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; } }
2700
+
2701
+ /* premium:end */
2702
+ /*
2703
+ * Buttonizer Animation - Jelly
2704
+ */
2705
+ /* premium:start */
2706
+ .buttonizer.attention-animation-true.buttonizer-animation-jelly .buttonizer-head {
2707
+ -webkit-animation: buttonizer-jelly 1s linear;
2708
+ animation: buttonizer-jelly 1s linear; }
2709
+
2710
+ .buttonizer.attention-animation-true.buttonizer-animation-jelly.buttonizer-desktop-has-1.buttonizer-mobile-has-1 .buttonizer-button {
2711
+ -webkit-animation: buttonizer-jelly 1s linear;
2712
+ animation: buttonizer-jelly 1s linear; }
2713
+
2714
+ @-webkit-keyframes buttonizer-jelly {
2715
+ 0% {
2716
+ -webkit-transform: scaleX(1);
2717
+ transform: scaleX(1); }
2718
+ 30% {
2719
+ -webkit-transform: scale3d(1.25, 0.75, 1);
2720
+ transform: scale3d(1.25, 0.75, 1); }
2721
+ 40% {
2722
+ -webkit-transform: scale3d(0.75, 1.25, 1);
2723
+ transform: scale3d(0.75, 1.25, 1); }
2724
+ 50% {
2725
+ -webkit-transform: scale3d(1.15, 0.85, 1);
2726
+ transform: scale3d(1.15, 0.85, 1); }
2727
+ 65% {
2728
+ -webkit-transform: scale3d(0.95, 1.05, 1);
2729
+ transform: scale3d(0.95, 1.05, 1); }
2730
+ 75% {
2731
+ -webkit-transform: scale3d(1.05, 0.95, 1);
2732
+ transform: scale3d(1.05, 0.95, 1); }
2733
+ to {
2734
+ -webkit-transform: scaleX(1);
2735
+ transform: scaleX(1); } }
2736
+
2737
+ @keyframes buttonizer-jelly {
2738
+ 0% {
2739
+ -webkit-transform: scaleX(1);
2740
+ transform: scaleX(1); }
2741
+ 30% {
2742
+ -webkit-transform: scale3d(1.25, 0.75, 1);
2743
+ transform: scale3d(1.25, 0.75, 1); }
2744
+ 40% {
2745
+ -webkit-transform: scale3d(0.75, 1.25, 1);
2746
+ transform: scale3d(0.75, 1.25, 1); }
2747
+ 50% {
2748
+ -webkit-transform: scale3d(1.15, 0.85, 1);
2749
+ transform: scale3d(1.15, 0.85, 1); }
2750
+ 65% {
2751
+ -webkit-transform: scale3d(0.95, 1.05, 1);
2752
+ transform: scale3d(0.95, 1.05, 1); }
2753
+ 75% {
2754
+ -webkit-transform: scale3d(1.05, 0.95, 1);
2755
+ transform: scale3d(1.05, 0.95, 1); }
2756
+ to {
2757
+ -webkit-transform: scaleX(1);
2758
+ transform: scaleX(1); } }
2759
+
2760
+ /* premium:end */
2761
  .buttonizer.button-mobile-only {
2762
  display: none; }
2763
 
assets/frontend.js CHANGED
@@ -100,146 +100,11 @@
100
  /******/ ({
101
 
102
  /***/ 14:
103
- /***/ (function(module, exports, __webpack_require__) {
104
-
105
- var indexOf = __webpack_require__(15);
106
-
107
- var Object_keys = function (obj) {
108
- if (Object.keys) return Object.keys(obj)
109
- else {
110
- var res = [];
111
- for (var key in obj) res.push(key)
112
- return res;
113
- }
114
- };
115
-
116
- var forEach = function (xs, fn) {
117
- if (xs.forEach) return xs.forEach(fn)
118
- else for (var i = 0; i < xs.length; i++) {
119
- fn(xs[i], i, xs);
120
- }
121
- };
122
-
123
- var defineProp = (function() {
124
- try {
125
- Object.defineProperty({}, '_', {});
126
- return function(obj, name, value) {
127
- Object.defineProperty(obj, name, {
128
- writable: true,
129
- enumerable: false,
130
- configurable: true,
131
- value: value
132
- })
133
- };
134
- } catch(e) {
135
- return function(obj, name, value) {
136
- obj[name] = value;
137
- };
138
- }
139
- }());
140
-
141
- var globals = ['Array', 'Boolean', 'Date', 'Error', 'EvalError', 'Function',
142
- 'Infinity', 'JSON', 'Math', 'NaN', 'Number', 'Object', 'RangeError',
143
- 'ReferenceError', 'RegExp', 'String', 'SyntaxError', 'TypeError', 'URIError',
144
- 'decodeURI', 'decodeURIComponent', 'encodeURI', 'encodeURIComponent', 'escape',
145
- 'eval', 'isFinite', 'isNaN', 'parseFloat', 'parseInt', 'undefined', 'unescape'];
146
-
147
- function Context() {}
148
- Context.prototype = {};
149
-
150
- var Script = exports.Script = function NodeScript (code) {
151
- if (!(this instanceof Script)) return new Script(code);
152
- this.code = code;
153
- };
154
-
155
- Script.prototype.runInContext = function (context) {
156
- if (!(context instanceof Context)) {
157
- throw new TypeError("needs a 'context' argument.");
158
- }
159
-
160
- var iframe = document.createElement('iframe');
161
- if (!iframe.style) iframe.style = {};
162
- iframe.style.display = 'none';
163
-
164
- document.body.appendChild(iframe);
165
-
166
- var win = iframe.contentWindow;
167
- var wEval = win.eval, wExecScript = win.execScript;
168
-
169
- if (!wEval && wExecScript) {
170
- // win.eval() magically appears when this is called in IE:
171
- wExecScript.call(win, 'null');
172
- wEval = win.eval;
173
- }
174
-
175
- forEach(Object_keys(context), function (key) {
176
- win[key] = context[key];
177
- });
178
- forEach(globals, function (key) {
179
- if (context[key]) {
180
- win[key] = context[key];
181
- }
182
- });
183
-
184
- var winKeys = Object_keys(win);
185
-
186
- var res = wEval.call(win, this.code);
187
-
188
- forEach(Object_keys(win), function (key) {
189
- // Avoid copying circular objects like `top` and `window` by only
190
- // updating existing context properties or new properties in the `win`
191
- // that was only introduced after the eval.
192
- if (key in context || indexOf(winKeys, key) === -1) {
193
- context[key] = win[key];
194
- }
195
- });
196
-
197
- forEach(globals, function (key) {
198
- if (!(key in context)) {
199
- defineProp(context, key, win[key]);
200
- }
201
- });
202
-
203
- document.body.removeChild(iframe);
204
-
205
- return res;
206
- };
207
-
208
- Script.prototype.runInThisContext = function () {
209
- return eval(this.code); // maybe...
210
- };
211
-
212
- Script.prototype.runInNewContext = function (context) {
213
- var ctx = Script.createContext(context);
214
- var res = this.runInContext(ctx);
215
-
216
- forEach(Object_keys(ctx), function (key) {
217
- context[key] = ctx[key];
218
- });
219
-
220
- return res;
221
- };
222
-
223
- forEach(Object_keys(Script.prototype), function (name) {
224
- exports[name] = Script[name] = function (code) {
225
- var s = Script(code);
226
- return s[name].apply(s, [].slice.call(arguments, 1));
227
- };
228
- });
229
-
230
- exports.createScript = function (code) {
231
- return exports.Script(code);
232
- };
233
 
234
- exports.createContext = Script.createContext = function (context) {
235
- var copy = new Context();
236
- if(typeof context === 'object') {
237
- forEach(Object_keys(context), function (key) {
238
- copy[key] = context[key];
239
- });
240
- }
241
- return copy;
242
- };
243
 
244
 
245
  /***/ }),
@@ -247,16 +112,10 @@ exports.createContext = Script.createContext = function (context) {
247
  /***/ 15:
248
  /***/ (function(module, exports) {
249
 
 
 
 
250
 
251
- var indexOf = [].indexOf;
252
-
253
- module.exports = function(arr, obj){
254
- if (indexOf) return arr.indexOf(obj);
255
- for (var i = 0; i < arr.length; ++i) {
256
- if (arr[i] === obj) return i;
257
- }
258
- return -1;
259
- };
260
 
261
  /***/ }),
262
 
@@ -302,7 +161,7 @@ class Button
302
  button.className = 'buttonizer-button';
303
  button.setAttribute("data-buttonizer", this.unique);
304
 
305
- if(this.data.action.type === 'url' || this.data.action.type === 'elementor_popup' || this.data.action.type === 'popup_maker') {
306
  button.href = this.data.action.action;
307
 
308
  // If open new tab = true, use target=_blank
@@ -313,6 +172,12 @@ class Button
313
  button.href = 'javascript:void(0)';
314
  }
315
 
 
 
 
 
 
 
316
  // Check if set to mobile or desktop only
317
  // Just show on mobile phones
318
  if(this.show_mobile === 'true' && this.show_desktop === 'false')
@@ -372,6 +237,12 @@ class Button
372
  label.innerText = this.data.label.label;
373
  button.appendChild(label);
374
  }
 
 
 
 
 
 
375
 
376
  let icon;
377
 
@@ -419,7 +290,12 @@ class Button
419
  }
420
  else if (this.data.action.type === 'mail')
421
  {
422
- document.location.href = `mailto:${this.data.action.action}`;
 
 
 
 
 
423
  return;
424
  }
425
  else if (this.data.action.type === 'backtotop')
@@ -454,11 +330,48 @@ class Button
454
  else if (this.data.action.action === "mail"){
455
  window.location.href = "mailto:?subject=" + document.title + "&body= Hey! Check out this link: " + document.location.href;
456
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
457
  return;
458
  }
459
  else if (this.data.action.type === 'whatsapp_pro' || this.data.action.type === 'whatsapp')
460
  {
461
- window.open(`https://api.whatsapp.com/send?phone=${this.data.action.action}`)
 
 
 
 
462
 
463
  return;
464
  }
@@ -473,7 +386,13 @@ class Button
473
  return;
474
  }
475
  else if (this.data.action.type === 'sms') {
476
- document.location.href = `sms:${this.data.action.action}`;
 
 
 
 
 
 
477
  return;
478
  }
479
  else if (this.data.action.type === 'telegram') {
@@ -497,7 +416,13 @@ class Button
497
  return;
498
  }
499
  else if (this.data.action.type === 'twitter_dm') {
500
- window.open(`https://twitter.com/messages/compose?recipient_id=${this.data.action.action}`);
 
 
 
 
 
 
501
  return;
502
  }
503
  else if (this.data.action.type === 'snapchat') {
@@ -509,7 +434,7 @@ class Button
509
  return;
510
  }
511
  else if (this.data.action.type === 'viber') {
512
- document.location.href = `viber://chat?number=${this.data.action.action}`;
513
  return;
514
  }
515
  else if (this.data.action.type === 'vk') {
@@ -560,14 +485,26 @@ class Button
560
 
561
  generateStyle()
562
  {
563
- if(this.data.styling.label.size !== "14px" || this.data.styling.label.radius !== "3px")
564
  {
 
 
 
 
 
 
 
 
 
 
 
 
565
  this.group.stylesheet += `
566
  [data-buttonizer="${this.group.unique}"] [data-buttonizer="${this.unique}"] .buttonizer-label {
567
- font-size: ${this.data.styling.label.size};
568
- border-radius: ${this.data.styling.label.radius};
569
- -moz-border-radius: ${this.data.styling.label.radius};
570
- -webkit-border-radius: ${this.data.styling.label.radius};
571
  }
572
  `;
573
  }
@@ -580,10 +517,15 @@ class Button
580
 
581
 
582
  if(this.data.styling.button.radius !== "%") {
583
- extraStyle = `
584
  border-radius: ${this.data.styling.button.radius};
585
  `;
586
  }
 
 
 
 
 
587
 
588
  this.group.stylesheet += `
589
  [data-buttonizer="${this.group.unique}"] [data-buttonizer="${this.unique}"] {
@@ -622,6 +564,15 @@ class Button
622
  -o-transition: all 0.2s ease-in-out;
623
  }
624
  `;
 
 
 
 
 
 
 
 
 
625
  }
626
 
627
  /**
@@ -646,15 +597,7 @@ class Button
646
  return;
647
  }
648
 
649
- window.Buttonizer.initializedFacebookChat = this.data.action.action;
650
-
651
- // Create element
652
- let fbElement = document.createElement('div');
653
- fbElement.className = 'fb-customerchat buttonizer-facebook-messenger-overwrite-' + this.group.unique;
654
- fbElement.setAttribute("attribution", "setup_tool");
655
- fbElement.setAttribute("greeting_dialog_display", "hide");
656
- fbElement.setAttribute("page_id", this.data.action.action);
657
- document.body.appendChild(fbElement);
658
 
659
  // Initialize first
660
  window.fbAsyncInit = function() {
@@ -679,13 +622,11 @@ class Button
679
 
680
  }
681
  }
682
- // EXTERNAL MODULE: ./node_modules/vm-browserify/index.js
683
- var vm_browserify = __webpack_require__(14);
684
-
685
  // CONCATENATED MODULE: ./src/js/frontend/Group/Group.js
686
 
687
 
688
 
 
689
  class Group_Group
690
  {
691
  constructor(data, index)
@@ -699,6 +640,12 @@ class Group_Group
699
  this.isBuild = false;
700
  this.opened = false;
701
 
 
 
 
 
 
 
702
  this.show_mobile = this.data.device.show_mobile;
703
  this.show_desktop = this.data.device.show_desktop;
704
  this.single_button_mode = this.data.single_button_mode;
@@ -744,6 +691,8 @@ class Group_Group
744
 
745
  // Animate main button
746
  this.animate();
 
 
747
  }
748
 
749
  /**
@@ -815,7 +764,7 @@ class Group_Group
815
  group.classList.add('opened');
816
  }
817
 
818
- if(this.data.styling.menu.style === 'square') {
819
  group.classList.add('opened');
820
  }
821
 
@@ -865,13 +814,13 @@ class Group_Group
865
  // Add all buttons to page
866
  for(let i = 0; i < this.buttons.length; i++)
867
  {
 
868
  if(this.buttons[i].data.action.type === 'messenger_chat') {
869
  let messengerDiv = document.createElement('div');
870
  messengerDiv.className = `fb-customerchat buttonizer-facebook-messenger-overwrite-${this.unique}`;
871
  messengerDiv.setAttribute('page-id', `${this.buttons[i].data.action.action}`);
872
  messengerDiv.setAttribute('greeting_dialog_display', `hide`);
873
-
874
-
875
  group.appendChild(messengerDiv);
876
  }
877
  buttonList.appendChild(this.buttons[i].build()); // Build button
@@ -890,6 +839,10 @@ class Group_Group
890
 
891
  this.isBuild = true;
892
  this.writeCSS();
 
 
 
 
893
  }
894
 
895
  /**
@@ -986,55 +939,65 @@ class Group_Group
986
  [data-buttonizer="${this.unique}"] .buttonizer-button i:hover {
987
  color: ${this.data.styling.icon.interaction};
988
  }
989
-
990
- .fb_dialog {
991
- display: none !important;
992
- }
993
-
994
- .buttonizer-facebook-messenger-overwrite-${this.unique} span iframe {
995
- ${this.data.position.right <= 50 ? 'right' : 'left'}: ${this.data.position.right <= 50 ? +this.data.position.right - 1 : ((100 - this.data.position.right) - 1)}% !important;
996
- ${this.data.position.bottom <= 50 ? 'bottom' : 'top'}: ${this.data.position.bottom <= 50 ? +this.data.position.bottom + 4 : ((100 - this.data.position.bottom) + 6)}% !important;
997
  }
 
998
 
999
- @media screen and (max-width: 769px){
1000
- .${this.unique} span iframe {
1001
- left: 0% !important;
1002
- right: 0% !important;
1003
- top: 0% !important;
1004
- bottom: 0% !important;
1005
  }
1006
- }
1007
 
1008
- .fb_customer_chat_bounce_in_v2 {
1009
- animation-duration: 300ms;
1010
- animation-name: fb_bounce_in_v3 !important;
1011
- transition-timing-function: ease-in-out;
1012
- }
1013
 
1014
- .fb_customer_chat_bounce_out_v2 {
1015
- max-height: 0px !important;
1016
- }
 
 
 
 
1017
 
1018
- @keyframes fb_bounce_in_v3 {
1019
- 0% {
1020
- opacity: 0;
1021
- transform: scale(0, 0);
1022
- transform-origin: bottom;
1023
  }
1024
- 50% {
1025
- transform: scale(1.03, 1.03);
1026
- transform-origin: bottom;
1027
  }
1028
- 100% {
1029
- opacity: 1;
1030
- transform: scale(1, 1);
1031
- transform-origin: bottom;
 
 
 
 
 
 
 
 
 
 
 
 
1032
  }
1033
- }
1034
- ` + this.stylesheet;
1035
 
1036
 
1037
 
 
 
1038
  stylesheet.innerHTML = css;
1039
 
1040
  document.head.appendChild(stylesheet);
@@ -1094,6 +1057,8 @@ class Group_Group
1094
  // Goodbye cruel world
1095
  window.Buttonizer.destroyGroup(this);
1096
 
 
 
1097
  delete this;
1098
  }
1099
 
@@ -1111,16 +1076,48 @@ class Group_Group
1111
  this.buttons.splice(buttonIndex, 1);
1112
  }
1113
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1114
  }
1115
  // EXTERNAL MODULE: ./src/sass/frontend/frontend.scss
1116
  var frontend = __webpack_require__(37);
1117
 
 
 
 
 
 
 
1118
  // CONCATENATED MODULE: ./src/js/frontend/Buttonizer.js
1119
 
1120
 
1121
  // Import Buttonizer Dashboard style
1122
 
1123
 
 
 
1124
  class Buttonizer_Buttonizer
1125
  {
1126
  constructor(){
@@ -1129,9 +1126,12 @@ class Buttonizer_Buttonizer
1129
  this.write = HTMLElement;
1130
  this.previewInitialized = false;
1131
  this.settingsLoading = false;
 
1132
 
1133
  this.premium = false;
1134
  this.groups = [];
 
 
1135
 
1136
  this.settings = {
1137
  // Google analytics
@@ -1182,6 +1182,7 @@ class Buttonizer_Buttonizer
1182
  {
1183
  // Listen to admin
1184
  if(buttonizer_ajax.in_preview && !this.previewInitialized) {
 
1185
  this.listenToPreview();
1186
  }
1187
 
@@ -1402,6 +1403,20 @@ class Buttonizer_Buttonizer
1402
 
1403
  this.firstTimeInitialize = false;
1404
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1405
  }
1406
 
1407
  window.Buttonizer = new Buttonizer_Buttonizer();
100
  /******/ ({
101
 
102
  /***/ 14:
103
+ /***/ (function(module, exports) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
 
105
+ /**
106
+ * Exit intent
107
+ */
 
 
 
 
 
 
108
 
109
 
110
  /***/ }),
112
  /***/ 15:
113
  /***/ (function(module, exports) {
114
 
115
+ /**
116
+ * Show on scroll
117
+ */
118
 
 
 
 
 
 
 
 
 
 
119
 
120
  /***/ }),
121
 
161
  button.className = 'buttonizer-button';
162
  button.setAttribute("data-buttonizer", this.unique);
163
 
164
+ if(this.data.action.type === 'url') {
165
  button.href = this.data.action.action;
166
 
167
  // If open new tab = true, use target=_blank
172
  button.href = 'javascript:void(0)';
173
  }
174
 
175
+ // If action is Elementor popup, add attribute
176
+ if(this.data.action.type === "elementor_popup" || this.data.action.type === 'popup_maker') {
177
+ button.href = "#" + this.data.action.action;
178
+ }
179
+
180
+
181
  // Check if set to mobile or desktop only
182
  // Just show on mobile phones
183
  if(this.show_mobile === 'true' && this.show_desktop === 'false')
237
  label.innerText = this.data.label.label;
238
  button.appendChild(label);
239
  }
240
+ else if (this.data.label.label === "" && this.group.data.styling.menu.style === "rectangle") {
241
+ let label = document.createElement("div");
242
+ label.className = 'buttonizer-label';
243
+ label.innerText = this.data.name + "'s button label";
244
+ button.appendChild(label);
245
+ }
246
 
247
  let icon;
248
 
290
  }
291
  else if (this.data.action.type === 'mail')
292
  {
293
+ let mail = `mailto:${this.data.action.action}`;
294
+
295
+
296
+
297
+ document.location.href = mail;
298
+
299
  return;
300
  }
301
  else if (this.data.action.type === 'backtotop')
330
  else if (this.data.action.action === "mail"){
331
  window.location.href = "mailto:?subject=" + document.title + "&body= Hey! Check out this link: " + document.location.href;
332
  }
333
+ // New actions
334
+ else if (this.data.action.action === "reddit"){
335
+ let reddit = `https://www.reddit.com/submit?url=${encodeURI(`Hey! Check out this link: ` + document.location.href)}&title=${encodeURI(document.title)}`;
336
+ window.open(reddit)
337
+ return false;
338
+ }
339
+ else if (this.data.action.action === "tumblr"){
340
+ window.open(`https://www.tumblr.com/widgets/share/tool?shareSource=legacy&canonicalUrl=${encodeURI(document.location.href)}&posttype=link`); return false;
341
+ }
342
+ else if (this.data.action.action === "digg"){
343
+ window.open(`http://digg.com/submit?url=${encodeURI(document.location.href)}`); return false;
344
+ }
345
+ else if (this.data.action.action === "weibo"){
346
+ window.open(`http://service.weibo.com/share/share.php?url=${encodeURI(document.location.href)}&title=${encodeURI(document.title)}&pic=https://plus.google.com/_/favicon?domain=${document.location.origin}`); return false;
347
+ }
348
+ else if (this.data.action.action === "vk"){
349
+ window.open(`https://vk.com/share.php?url=${encodeURI(document.location.href)}&title=${encodeURI(document.title)}&comment=Hey%20Check%20this%20out!`); return false;
350
+ }
351
+ else if (this.data.action.action === "ok"){
352
+ window.open(`https://connect.ok.ru/dk?st.cmd=WidgetSharePreview&st.shareUrl=${encodeURI(document.location.href)}`); return false;
353
+ }
354
+ else if (this.data.action.action === "xing"){
355
+ window.open(`https://www.xing.com/spi/shares/new?url=${encodeURI(document.location.href)}`); return false;
356
+ }
357
+ else if (this.data.action.action === "blogger"){
358
+ window.open(`https://www.blogger.com/blog-this.g?u=${encodeURI(document.location.href)}&n=${encodeURI(document.title)}&t=Check%20this%20out!`); return false;
359
+ }
360
+ else if (this.data.action.action === "flipboard"){
361
+ window.open(`https://share.flipboard.com/bookmarklet/popout?v=2&title=${encodeURI(document.title)}&url=${encodeURI(document.location.href)}`); return false;
362
+ }
363
+ else if (this.data.action.action === "sms"){
364
+ window.open(`sms:?body=${encodeURI(document.title + 'Hey! Check out this link: ' + document.location.href)}`); return false;
365
+ }
366
  return;
367
  }
368
  else if (this.data.action.type === 'whatsapp_pro' || this.data.action.type === 'whatsapp')
369
  {
370
+ let whatsapp = `https://api.whatsapp.com/send?phone=${this.data.action.action}`;
371
+
372
+
373
+
374
+ window.open(whatsapp)
375
 
376
  return;
377
  }
386
  return;
387
  }
388
  else if (this.data.action.type === 'sms') {
389
+
390
+ let sms = `sms:${this.data.action.action}`;
391
+
392
+
393
+
394
+ document.location.href = sms;
395
+
396
  return;
397
  }
398
  else if (this.data.action.type === 'telegram') {
416
  return;
417
  }
418
  else if (this.data.action.type === 'twitter_dm') {
419
+
420
+ let dms = `https://twitter.com/messages/compose?recipient_id=${this.data.action.action}`;
421
+
422
+
423
+
424
+ window.open(dms);
425
+
426
  return;
427
  }
428
  else if (this.data.action.type === 'snapchat') {
434
  return;
435
  }
436
  else if (this.data.action.type === 'viber') {
437
+ document.location.href = `viber://add?number=${this.data.action.action}`;
438
  return;
439
  }
440
  else if (this.data.action.type === 'vk') {
485
 
486
  generateStyle()
487
  {
488
+ if(this.data.styling.label.size !== "12px" || this.data.styling.label.radius !== "3px")
489
  {
490
+ let size;
491
+ let radius;
492
+
493
+ if(this.data.styling.label.size === "px") {
494
+ size = "12px"
495
+ }
496
+
497
+ if(this.data.styling.label.radius === "px") {
498
+ radius = "3px"
499
+ }
500
+
501
+
502
  this.group.stylesheet += `
503
  [data-buttonizer="${this.group.unique}"] [data-buttonizer="${this.unique}"] .buttonizer-label {
504
+ font-size: ${size};
505
+ border-radius: ${radius};
506
+ -moz-border-radius: ${radius};
507
+ -webkit-border-radius: ${radius};
508
  }
509
  `;
510
  }
517
 
518
 
519
  if(this.data.styling.button.radius !== "%") {
520
+ extraStyle += `
521
  border-radius: ${this.data.styling.button.radius};
522
  `;
523
  }
524
+ else {
525
+ extraStyle += `
526
+ border-radius: 50%;
527
+ `;
528
+ }
529
 
530
  this.group.stylesheet += `
531
  [data-buttonizer="${this.group.unique}"] [data-buttonizer="${this.unique}"] {
564
  -o-transition: all 0.2s ease-in-out;
565
  }
566
  `;
567
+
568
+ if(this.data.styling.button) {
569
+ this.group.stylesheet += `
570
+ [data-buttonizer="${this.group.unique}"].attention-animation-true.buttonizer-animation-pulse.buttonizer-desktop-has-1.buttonizer-mobile-has-1 [data-buttonizer="${this.unique}"]:before,
571
+ [data-buttonizer="${this.group.unique}"].attention-animation-true.buttonizer-animation-pulse.buttonizer-desktop-has-1.buttonizer-mobile-has-1 [data-buttonizer="${this.unique}"]:after {
572
+ background-color: ${this.data.styling.button.color};
573
+ }
574
+ `;
575
+ }
576
  }
577
 
578
  /**
597
  return;
598
  }
599
 
600
+ window.Buttonizer.initializedFacebookChat = this.data.action.action === "" ? undefined : this.data.action.action;
 
 
 
 
 
 
 
 
601
 
602
  // Initialize first
603
  window.fbAsyncInit = function() {
622
 
623
  }
624
  }
 
 
 
625
  // CONCATENATED MODULE: ./src/js/frontend/Group/Group.js
626
 
627
 
628
 
629
+
630
  class Group_Group
631
  {
632
  constructor(data, index)
640
  this.isBuild = false;
641
  this.opened = false;
642
 
643
+ // Exit intent
644
+ this.usesExitIntent = false;
645
+ this.exitIntentExecuted = false;
646
+
647
+ this.usesOnSroll = false;
648
+
649
  this.show_mobile = this.data.device.show_mobile;
650
  this.show_desktop = this.data.device.show_desktop;
651
  this.single_button_mode = this.data.single_button_mode;
691
 
692
  // Animate main button
693
  this.animate();
694
+
695
+
696
  }
697
 
698
  /**
764
  group.classList.add('opened');
765
  }
766
 
767
+ if(this.data.styling.menu.style === 'square' || this.data.styling.menu.style === 'rectangle') {
768
  group.classList.add('opened');
769
  }
770
 
814
  // Add all buttons to page
815
  for(let i = 0; i < this.buttons.length; i++)
816
  {
817
+ // check if a buttons is using messenger, add messenger widget.
818
  if(this.buttons[i].data.action.type === 'messenger_chat') {
819
  let messengerDiv = document.createElement('div');
820
  messengerDiv.className = `fb-customerchat buttonizer-facebook-messenger-overwrite-${this.unique}`;
821
  messengerDiv.setAttribute('page-id', `${this.buttons[i].data.action.action}`);
822
  messengerDiv.setAttribute('greeting_dialog_display', `hide`);
823
+
 
824
  group.appendChild(messengerDiv);
825
  }
826
  buttonList.appendChild(this.buttons[i].build()); // Build button
839
 
840
  this.isBuild = true;
841
  this.writeCSS();
842
+
843
+ if(this.data.styling.menu.style === "rectangle") {
844
+ this.maxLabelWidth(group, 'rectangle');
845
+ }
846
  }
847
 
848
  /**
939
  [data-buttonizer="${this.unique}"] .buttonizer-button i:hover {
940
  color: ${this.data.styling.icon.interaction};
941
  }
942
+
943
+ [data-buttonizer="${this.unique}"].attention-animation-true.buttonizer-animation-pulse .buttonizer-head:before,
944
+ [data-buttonizer="${this.unique}"].attention-animation-true.buttonizer-animation-pulse .buttonizer-head:after {
945
+ background-color: ${this.data.styling.button.color};
 
 
 
 
946
  }
947
+ `
948
 
949
+ if(typeof window.Buttonizer.initializedFacebookChat !== "undefined"){
950
+ css += `
951
+ .fb_dialog {
952
+ display: none !important;
 
 
953
  }
 
954
 
955
+ .buttonizer-facebook-messenger-overwrite-${this.unique} span iframe {
956
+ ${this.data.position.right <= 50 ? 'right' : 'left'}: ${this.data.position.right <= 50 ? +this.data.position.right - 1 : ((100 - this.data.position.right) - 1)}% !important;
957
+ ${this.data.position.bottom <= 50 ? 'bottom' : 'top'}: ${this.data.position.bottom <= 50 ? +this.data.position.bottom + 4 : ((100 - this.data.position.bottom) + 6)}% !important;
958
+ }
 
959
 
960
+ @media screen and (max-width: 769px){
961
+ .buttonizer-facebook-messenger-overwrite-${this.unique} span iframe {
962
+ ${this.data.position.right <= 50 ? 'right' : 'left'}: ${this.data.position.right <= 50 ? +this.data.position.right - 5 : ((100 - this.data.position.right) - 1)}% !important;
963
+ ${this.data.position.bottom <= 50 ? 'bottom' : 'top'}: ${this.data.position.bottom <= 50 ? +this.data.position.bottom + 4 : ((100 - this.data.position.bottom) + 7)}% !important;
964
+
965
+ }
966
+ }
967
 
968
+ .buttonizer-facebook-messenger-overwrite-${this.unique} span .fb_customer_chat_bounce_in_v2 {
969
+ animation-duration: 300ms;
970
+ animation-name: fb_bounce_in_v3 !important;
971
+ transition-timing-function: ease-in-out;
 
972
  }
973
+
974
+ .buttonizer-facebook-messenger-overwrite-${this.unique} span .fb_customer_chat_bounce_out_v2 {
975
+ max-height: 0px !important;
976
  }
977
+
978
+ @keyframes fb_bounce_in_v3 {
979
+ 0% {
980
+ opacity: 0;
981
+ transform: scale(0, 0);
982
+ transform-origin: bottom;
983
+ }
984
+ 50% {
985
+ transform: scale(1.03, 1.03);
986
+ transform-origin: bottom;
987
+ }
988
+ 100% {
989
+ opacity: 1;
990
+ transform: scale(1, 1);
991
+ transform-origin: bottom;
992
+ }
993
  }
994
+ `
995
+ }
996
 
997
 
998
 
999
+ css += this.stylesheet;
1000
+
1001
  stylesheet.innerHTML = css;
1002
 
1003
  document.head.appendChild(stylesheet);
1057
  // Goodbye cruel world
1058
  window.Buttonizer.destroyGroup(this);
1059
 
1060
+
1061
+
1062
  delete this;
1063
  }
1064
 
1076
  this.buttons.splice(buttonIndex, 1);
1077
  }
1078
  }
1079
+
1080
+ maxLabelWidth(group, style) {
1081
+ // Calculate width
1082
+ let arr = [];
1083
+ for(let labels of group.querySelectorAll('.buttonizer-label')) {
1084
+ arr.push(labels.offsetWidth)
1085
+ }
1086
+ let max = Math.max(...arr);
1087
+
1088
+ // Add style to stylesheet
1089
+ let css = `
1090
+ [data-buttonizer="${this.unique}"].buttonizer-style-${style} .buttonizer-button .buttonizer-label {
1091
+ min-width: ${max}px;
1092
+ text-align: ${this.data.position.right <= 50 ? 'right' : 'left'};
1093
+ }
1094
+ `;
1095
+
1096
+ document.getElementById(this.unique).innerHTML += css;
1097
+ }
1098
+
1099
+ /**
1100
+ * Exit intent
1101
+ */
1102
+
1103
  }
1104
  // EXTERNAL MODULE: ./src/sass/frontend/frontend.scss
1105
  var frontend = __webpack_require__(37);
1106
 
1107
+ // EXTERNAL MODULE: ./src/js/frontend/Utils/ExitIntent.js
1108
+ var ExitIntent = __webpack_require__(14);
1109
+
1110
+ // EXTERNAL MODULE: ./src/js/frontend/Utils/OnScroll.js
1111
+ var OnScroll = __webpack_require__(15);
1112
+
1113
  // CONCATENATED MODULE: ./src/js/frontend/Buttonizer.js
1114
 
1115
 
1116
  // Import Buttonizer Dashboard style
1117
 
1118
 
1119
+
1120
+
1121
  class Buttonizer_Buttonizer
1122
  {
1123
  constructor(){
1126
  this.write = HTMLElement;
1127
  this.previewInitialized = false;
1128
  this.settingsLoading = false;
1129
+ this.isInPreviewContainer = false;
1130
 
1131
  this.premium = false;
1132
  this.groups = [];
1133
+ this.exitIntent = null;
1134
+ this.onscroll = null;
1135
 
1136
  this.settings = {
1137
  // Google analytics
1182
  {
1183
  // Listen to admin
1184
  if(buttonizer_ajax.in_preview && !this.previewInitialized) {
1185
+ this.isInPreviewContainer = true;
1186
  this.listenToPreview();
1187
  }
1188
 
1403
 
1404
  this.firstTimeInitialize = false;
1405
  }
1406
+
1407
+ /**
1408
+ * Is in preview?
1409
+ *
1410
+ * @returns {boolean}
1411
+ */
1412
+ inPreview() {
1413
+ return this.isInPreviewContainer;
1414
+ }
1415
+
1416
+ /**
1417
+ * Start exit intent and on scroll
1418
+ */
1419
+
1420
  }
1421
 
1422
  window.Buttonizer = new Buttonizer_Buttonizer();
assets/frontend.min.js CHANGED
@@ -10,4 +10,4 @@
10
  *
11
  * (C) 2017-2019 Buttonizer
12
  *
13
- */!function(t){var e={};function o(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=t,o.c=e,o.d=function(t,e,i){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(o.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)o.d(i,n,function(e){return t[e]}.bind(null,n));return i},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=17)}({14:function(module,exports,__webpack_require__){var indexOf=__webpack_require__(15),Object_keys=function(t){if(Object.keys)return Object.keys(t);var e=[];for(var o in t)e.push(o);return e},forEach=function(t,e){if(t.forEach)return t.forEach(e);for(var o=0;o<t.length;o++)e(t[o],o,t)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(t,e,o){Object.defineProperty(t,e,{writable:!0,enumerable:!1,configurable:!0,value:o})}}catch(t){return function(t,e,o){t[e]=o}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(t){if(!(this instanceof Script))return new Script(t);this.code=t};Script.prototype.runInContext=function(t){if(!(t instanceof Context))throw new TypeError("needs a 'context' argument.");var e=document.createElement("iframe");e.style||(e.style={}),e.style.display="none",document.body.appendChild(e);var o=e.contentWindow,i=o.eval,n=o.execScript;!i&&n&&(n.call(o,"null"),i=o.eval),forEach(Object_keys(t),function(e){o[e]=t[e]}),forEach(globals,function(e){t[e]&&(o[e]=t[e])});var a=Object_keys(o),s=i.call(o,this.code);return forEach(Object_keys(o),function(e){(e in t||-1===indexOf(a,e))&&(t[e]=o[e])}),forEach(globals,function(e){e in t||defineProp(t,e,o[e])}),document.body.removeChild(e),s},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(t){var e=Script.createContext(t),o=this.runInContext(e);return forEach(Object_keys(e),function(o){t[o]=e[o]}),o},forEach(Object_keys(Script.prototype),function(t){exports[t]=Script[t]=function(e){var o=Script(e);return o[t].apply(o,[].slice.call(arguments,1))}}),exports.createScript=function(t){return exports.Script(t)},exports.createContext=Script.createContext=function(t){var e=new Context;return"object"==typeof t&&forEach(Object_keys(t),function(o){e[o]=t[o]}),e}},15:function(t,e){var o=[].indexOf;t.exports=function(t,e){if(o)return t.indexOf(e);for(var i=0;i<t.length;++i)if(t[i]===e)return i;return-1}},17:function(t,e,o){"use strict";o.r(e);class i{constructor(t,e){this.group=t,this.data=e,this.icon=e.icon.buttonIcon,this.show_mobile=e.device.show_mobile,this.show_desktop=e.device.show_desktop,this.style="",this.button,this.init(),this.unique="buttonizer-button-"+Array.apply(0,Array(15)).map(()=>(t=>t.charAt(Math.floor(Math.random()*t.length)))("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")).join("")}init(){}build(){let t,e=document.createElement("a");if(e.className="buttonizer-button",e.setAttribute("data-buttonizer",this.unique),"url"===this.data.action.type||"elementor_popup"===this.data.action.type||"popup_maker"===this.data.action.type?(e.href=this.data.action.action,"url"===this.data.action.type&&"true"===this.data.action.action_new_tab&&(e.target="_blank")):e.href="javascript:void(0)","true"===this.show_mobile&&"false"===this.show_desktop?(this.group.mobileButtonCount++,e.className+=" button-mobile-"+this.group.mobileButtonCount+" button-hide-desktop"):"false"===this.show_mobile&&"true"===this.show_desktop?(this.group.desktopButtonCount++,e.className+=" button-desktop-"+this.group.desktopButtonCount+" button-hide-mobile"):"false"===this.show_mobile&&"false"===this.show_desktop?e.className+=" button-hide-desktop button-hide-mobile":(this.group.mobileButtonCount++,this.group.desktopButtonCount++,e.className+=" button-mobile-"+this.group.mobileButtonCount+" button-desktop-"+this.group.desktopButtonCount),"hover"===this.data.label.show_label_desktop?e.className+=" show-label-desktop-hover":"hide"===this.data.label.show_label_desktop&&(e.className+=" label-desktop-hidden"),"hide"===this.data.label.show_label_mobile&&(e.className+=" label-mobile-hidden"),"messenger_chat"===this.data.action.type&&this.addMessengerWindow(),this.data.label.label.length>0){let t=document.createElement("div");t.className="buttonizer-label",t.innerText=this.data.label.label,e.appendChild(t)}return(()=>{(t=document.createElement("i")).className=void 0!==typeof this.icon?this.icon:"fa fa-user",e.appendChild(t)})(),e.addEventListener("click",t=>this.onButtonClick(t)),this.generateStyle(),this.button=e,this.button}onButtonClick(t){if(window.Buttonizer.googleAnalyticsEvent({type:"button-click",groupName:this.group.data.name,buttonName:this.data.name}),"url"!==this.data.action.type)if("phone"!==this.data.action.type)if("mail"!==this.data.action.type)if("backtotop"!==this.data.action.type)if("gobackpage"!==this.data.action.type)if("socialsharing"!==this.data.action.type)"whatsapp_pro"!==this.data.action.type&&"whatsapp"!==this.data.action.type?"skype"!==this.data.action.type?"messenger"!==this.data.action.type?"sms"!==this.data.action.type?"telegram"!==this.data.action.type?"facebook"!==this.data.action.type?"instagram"!==this.data.action.type?"line"!==this.data.action.type?"twitter"!==this.data.action.type?"twitter_dm"!==this.data.action.type?"snapchat"!==this.data.action.type?"linkedin"!==this.data.action.type?"viber"!==this.data.action.type?"vk"!==this.data.action.type?"poptin"!==this.data.action.type?"popup_maker"!==this.data.action.type&&"elementor_popup"!==this.data.action.type&&("waze"!==this.data.action.type?"wechat"!==this.data.action.type?"messenger_chat"!==this.data.action.type?console.error("Buttonizer: Error! Unknown button action!"):void 0!==window.Buttonizer.initializedFacebookChat&&document.querySelectorAll(".fb-customerchat").length>0?"0px"===document.querySelector(".fb-customerchat").querySelector("iframe").style.maxHeight?FB.CustomerChat.showDialog():"100%"===document.querySelector(".fb-customerchat").querySelector("iframe").style.maxHeight&&FB.CustomerChat.hideDialog():window.Buttonizer.previewInitialized?window.Buttonizer.messageButtonizerAdminEditor("warning","Facebook Messenger button is not found, it may be blocked or this domain is not allowed to load the Facebook widget."):alert("Sorry, we were unable to open Facebook Messenger! Check the console for more information."):document.location.href=`weixin://dl/chat?${this.data.action.action}`:document.location.href=this.data.action.action):document.location.href=this.data.action.action:window.open(`https://vk.me/${this.data.action.action}`):document.location.href=`viber://chat?number=${this.data.action.action}`:window.open(`https://www.linkedin.com/${this.data.action.action}`):window.open(`https://www.snapchat.com/add/${this.data.action.action}`):window.open(`https://twitter.com/messages/compose?recipient_id=${this.data.action.action}`):window.open(`https://twitter.com/${this.data.action.action}`):window.open(`https://line.me/R/ti/p/${this.data.action.action}`):window.open(`https://www.instagram.com/${this.data.action.action}`):window.open(`https://www.facebook.com/${this.data.action.action}`):window.open(`https://telegram.me/${this.data.action.action}`):document.location.href=`sms:${this.data.action.action}`:window.open(this.data.action.action):document.location.href=`skype:${this.data.action.action}?chat`:window.open(`https://api.whatsapp.com/send?phone=${this.data.action.action}`);else{if("facebook"===this.data.action.action)return window.open("http://www.facebook.com/sharer.php?u="+document.location.href+"&t="+document.title,"popupFacebook","width=610, height=480, resizable=0, toolbar=0, menubar=0, status=0, location=0, scrollbars=0"),!1;if("twitter"===this.data.action.action)return window.open("https://twitter.com/intent/tweet?text="+encodeURI(document.title)+" Hey! Check out this link:&url="+document.location.href,"popupTwitter","width=610, height=480, resizable=0, toolbar=0, menubar=0, status=0, location=0, scrollbars=0"),!1;if("whatsapp"===this.data.action.action)window.open("https://api.whatsapp.com/send?text="+encodeURI(document.title+" Hey! Check out this link:"+document.location.href));else{if("linkedin"===this.data.action.action)return window.open("http://www.linkedin.com/shareArticle?mini=true&url="+document.location.href+"&title="+encodeURI(document.title)+"&summary="+encodeURI(document.title),"popupLinkedIn","width=610, height=480, resizable=0, toolbar=0, menubar=0, status=0, location=0, scrollbars=0"),!1;if("pinterest"===this.data.action.action)return window.open("http://www.pinterest.com/pin/create/button/?url=/node"+document.location.href+"&description="+encodeURI(document.title),"popupTwitter","width=610, height=480, resizable=0, toolbar=0, menubar=0, status=0, location=0, scrollbars=0"),!1;"mail"===this.data.action.action&&(window.location.href="mailto:?subject="+document.title+"&body= Hey! Check out this link: "+document.location.href)}}else window.history.back();else jQuery("html, body").animate({scrollTop:0},750);else document.location.href=`mailto:${this.data.action.action}`;else document.location.href=`tel:${this.data.action.action}`}generateStyle(){if("14px"===this.data.styling.label.size&&"3px"===this.data.styling.label.radius||(this.group.stylesheet+=`\n [data-buttonizer="${this.group.unique}"] [data-buttonizer="${this.unique}"] .buttonizer-label {\n font-size: ${this.data.styling.label.size};\n border-radius: ${this.data.styling.label.radius};\n -moz-border-radius: ${this.data.styling.label.radius};\n -webkit-border-radius: ${this.data.styling.label.radius};\n }\n `),this.data.styling.button){let t="";"%"!==this.data.styling.button.radius&&(t=`\n border-radius: ${this.data.styling.button.radius};\n `),this.group.stylesheet+=`\n [data-buttonizer="${this.group.unique}"] [data-buttonizer="${this.unique}"] {\n background-color: ${this.data.styling.button.color};\n ${"00"===this.data.styling.button.color.substr(-2)?"box-shadow: none;":""};\n ${t}\n }\n \n [data-buttonizer="${this.group.unique}"] [data-buttonizer="${this.unique}"]:hover {\n background-color: ${this.data.styling.button.interaction}\n }\n \n [data-buttonizer="${this.group.unique}"] [data-buttonizer="${this.unique}"] .buttonizer-label {\n background-color: ${this.data.styling.label.background};\n color: ${this.data.styling.label.text} !important;\n }`}this.group.stylesheet+=`\n [data-buttonizer="${this.group.unique}"] [data-buttonizer="${this.unique}"] i {\n color: ${this.data.styling.icon.color};\n font-size: ${this.data.styling.icon.size};\n\n transition: all 0.2s ease-in-out;\n -moz-transition: all 0.2s ease-in-out;\n -webkit-transition: all 0.2s ease-in-out;\n -o-transition: all 0.2s ease-in-out;\n }\n\n [data-buttonizer="${this.group.unique}"] [data-buttonizer="${this.unique}"]:hover i{\n color: ${this.data.styling.icon.interaction};\n\n transition: all 0.2s ease-in-out;\n -moz-transition: all 0.2s ease-in-out;\n -webkit-transition: all 0.2s ease-in-out;\n -o-transition: all 0.2s ease-in-out;\n }\n `}destroy(){this.button.remove(),this.group.removeButton(this),this.group=null,this.data=null,this.button=null}addMessengerWindow(){if(void 0!==window.Buttonizer.initializedFacebookChat)return;window.Buttonizer.initializedFacebookChat=this.data.action.action;let t=document.createElement("div");t.className="fb-customerchat buttonizer-facebook-messenger-overwrite-"+this.group.unique,t.setAttribute("attribution","setup_tool"),t.setAttribute("greeting_dialog_display","hide"),t.setAttribute("page_id",this.data.action.action),document.body.appendChild(t),window.fbAsyncInit=function(){FB.init({xfbml:!0,version:"v3.3"})};let e=document.createElement("script");e.innerHTML="\n (function(d, s, id) {\n var js, fjs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) return;\n js = d.createElement(s); js.id = id;\n js.src = 'https://connect.facebook.net/en_US/sdk/xfbml.customerchat.js';\n fjs.parentNode.insertBefore(js, fjs);\n }(document, 'script', 'facebook-jssdk'));",document.head.appendChild(e)}}o(14);class n{constructor(t,e){this.data=t,this.groupIndex=e,this.buttons=[],this.isBuild=!1,this.opened=!1,this.show_mobile=this.data.device.show_mobile,this.show_desktop=this.data.device.show_desktop,this.single_button_mode=this.data.single_button_mode,this.element=null,this.groupStyle=this.data.styling.menu.style,this.groupAnimation=this.data.styling.menu.animation,this.stylesheet="",this.mobileButtonCount=0,this.desktopButtonCount=0,this.unique="buttonizer-"+Array.apply(0,Array(15)).map(function(){return(t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789").charAt(Math.floor(Math.random()*t.length));var t}).join(""),this.init()}init(){for(let t=0;t<this.data.buttons.length;t++){let e=new i(this,this.data.buttons[t]);this.buttons.push(e)}this.build(),this.animate()}build(){if(!0===this.isBuild||0===this.buttons.length)return void console.error("Buttonizer: Cannot create group: No buttons or already build");"fade-left-to-right"===this.groupStyle&&(this.groupStyle="faded");let t=document.createElement("div");if(t.className=`buttonizer buttonizer-group buttonizer-style-${this.groupStyle} buttonizer-animation-${this.groupAnimation} ${this.data.position.bottom<=50?"bottom":"top"} ${this.data.position.right<=50?"right":"left"}`,t.setAttribute("data-buttonizer",this.unique),"true"===this.show_mobile&&"false"===this.show_desktop?t.className+=" button-mobile-only":"false"===this.show_mobile&&"true"===this.show_desktop?t.className+=" button-desktop-only":"false"===this.show_mobile&&"false"===this.show_desktop&&(t.className+=" button-hide"),this.buttons.length>1){t.classList.add("buttonizer-is-menu"),"true"===this.data.openedByDefault&&(document.cookie.match("buttonizer_open=")?document.cookie.match("buttonizer_open=closed")||document.cookie.match("buttonizer_open=opened")&&(t.classList.add("opened"),this.opened=!0):(setTimeout(function(){t.classList.add("opened")},100),this.opened=!this.opened)),"1"===buttonizer_ajax.in_preview&&document.cookie.match("buttonizer_preview_"+this.groupIndex+"=opened")&&(this.opened=!0,t.classList.add("opened")),"square"===this.data.styling.menu.style&&t.classList.add("opened");let e=document.createElement("div");e.className="buttonizer-button-list";let o=document.createElement("a");o.href="javascript:void(0)",o.className="buttonizer-button buttonizer-head","hover"===this.data.label.show_label_desktop?o.className+=" show-label-desktop-hover":"hide"===this.data.label.show_label_desktop&&(o.className+=" label-desktop-hidden"),"hide"===this.data.label.show_label_mobile&&(o.className+=" label-mobile-hidden");let i,n=`<div class="buttonizer-label">${this.data.label.groupLabel}</div>`;i=`<i class="${void 0!==typeof this.data.icon.groupIcon?this.data.icon.groupIcon:"fa fa-plus"}"></i>`,this.data.label.groupLabel.length<=0?o.innerHTML=i:o.innerHTML=n+i,o.addEventListener("click",t=>this.toggleMenu(t)),t.appendChild(e),t.appendChild(o);for(let o=0;o<this.buttons.length;o++){if("messenger_chat"===this.buttons[o].data.action.type){let e=document.createElement("div");e.className=`fb-customerchat buttonizer-facebook-messenger-overwrite-${this.unique}`,e.setAttribute("page-id",`${this.buttons[o].data.action.action}`),e.setAttribute("greeting_dialog_display","hide"),t.appendChild(e)}e.appendChild(this.buttons[o].build())}}else t.appendChild(this.buttons[0].build());t.className+=` buttonizer-desktop-has-${this.desktopButtonCount} buttonizer-mobile-has-${this.mobileButtonCount}`,this.element=t,document.body.appendChild(this.element),this.isBuild=!0,this.writeCSS()}toggleMenu(t){t.preventDefault(),window.Buttonizer.googleAnalyticsEvent({type:"group-open-close",name:this.data.name,interaction:this.opened?"close":"open"}),this.opened?this.element.classList.remove("opened"):this.element.classList.add("opened"),this.opened=!this.opened,"true"===this.data.openedByDefault&&(document.cookie.match("buttonizer_open=")?document.cookie.match("buttonizer_open=closed")?document.cookie="buttonizer_open=opened":document.cookie.match("buttonizer_open=opened")&&(document.cookie="buttonizer_open=closed"):document.cookie="buttonizer_open=closed"),"1"===buttonizer_ajax.in_preview&&this.togglePreviewOpened()}togglePreviewOpened(){this.opened?document.cookie="buttonizer_preview_"+this.groupIndex+"=opened":document.cookie="buttonizer_preview_"+this.groupIndex+"=closed"}writeCSS(){let t=document.createElement("style");t.id=this.unique;let e=` \n [data-buttonizer="${this.unique}"] {\n ${this.data.position.right<=50?"right":"left"}: ${this.data.position.right<=50?this.data.position.right:100-this.data.position.right}%;\n ${this.data.position.bottom<=50?"bottom":"top"}: ${this.data.position.bottom<=50?this.data.position.bottom:100-this.data.position.bottom}%;\n }\n \n [data-buttonizer="${this.unique}"] .buttonizer-button {\n background-color: ${this.data.styling.button.color};\n color: ${this.data.styling.icon.color};\n border-radius: ${this.data.styling.button.radius};\n ${"00"===this.data.styling.button.color.substr(-2)?"box-shadow: none;":""}\n }\n \n [data-buttonizer="${this.unique}"] .buttonizer-button:hover {\n background-color: ${this.data.styling.button.interaction};\n color: ${this.data.styling.icon.color}\n }\n \n [data-buttonizer="${this.unique}"] .buttonizer-button .buttonizer-label {\n background-color: ${this.data.styling.label.background};\n color: ${this.data.styling.label.text};\n font-size: ${this.data.styling.label.size};\n border-radius: ${this.data.styling.label.radius};\n }\n\n [data-buttonizer="${this.unique}"] .buttonizer-button i {\n color: ${this.data.styling.icon.color};\n font-size: ${this.data.styling.icon.size};\n }\n\n [data-buttonizer="${this.unique}"] .buttonizer-button i:hover {\n color: ${this.data.styling.icon.interaction};\n }\n\n .fb_dialog {\n display: none !important;\n }\n\n .buttonizer-facebook-messenger-overwrite-${this.unique} span iframe {\n ${this.data.position.right<=50?"right":"left"}: ${this.data.position.right<=50?+this.data.position.right-1:100-this.data.position.right-1}% !important;\n ${this.data.position.bottom<=50?"bottom":"top"}: ${this.data.position.bottom<=50?+this.data.position.bottom+4:100-this.data.position.bottom+6}% !important;\n }\n\n @media screen and (max-width: 769px){\n .${this.unique} span iframe {\n left: 0% !important;\n right: 0% !important;\n top: 0% !important;\n bottom: 0% !important;\n }\n }\n\n .fb_customer_chat_bounce_in_v2 {\n animation-duration: 300ms;\n animation-name: fb_bounce_in_v3 !important;\n transition-timing-function: ease-in-out; \n }\n\n .fb_customer_chat_bounce_out_v2 {\n max-height: 0px !important;\n }\n\n @keyframes fb_bounce_in_v3 {\n 0% {\n opacity: 0;\n transform: scale(0, 0);\n transform-origin: bottom;\n }\n 50% {\n transform: scale(1.03, 1.03);\n transform-origin: bottom;\n }\n 100% {\n opacity: 1;\n transform: scale(1, 1);\n transform-origin: bottom;\n }\n }\n `+this.stylesheet;t.innerHTML=e,document.head.appendChild(t)}animate(){null!==this.element&&"none"!==this.groupAnimation&&(this.element.classList.contains("opened")||(this.element.classList.add("attention-animation-true"),setTimeout(()=>{null!==this.element&&this.element.classList.remove("attention-animation-true")},2e3)),setTimeout(()=>this.animate(),1e4))}destroy(){for(let t=0;t<this.buttons.length;t++)this.buttons[t].destroy();this.element.remove(),this.element=null,document.getElementById(this.unique).remove(),window.Buttonizer.destroyGroup(this)}removeButton(t){let e=this.buttons.indexOf(t);e>=0&&this.buttons.splice(e,1)}}o(37);window.Buttonizer=new class{constructor(){if(this.getSettings(),this.firstTimeInitialize=!0,this.write=HTMLElement,this.previewInitialized=!1,this.settingsLoading=!1,this.premium=!1,this.groups=[],this.settings={ga:null},buttonizer_ajax.in_preview){let t=document.createElement("style");t.innerHTML="html { margin-top: 0 !important; }",window.document.head.appendChild(t)}}getSettings(){buttonizer_ajax.current.url=document.location.href,this.settingsLoading=!0,jQuery.ajax({url:buttonizer_ajax.ajaxurl+"?action=buttonizer",dataType:"json",data:{qpu:buttonizer_ajax.is_admin?Date.now():buttonizer_ajax.cache,preview:buttonizer_ajax.in_preview?1:0,data:buttonizer_ajax.current},method:"get",success:t=>{"success"===t.status?this.init(t):console.error("Buttonizer: Something went wrong! Buttonizer not loaded",t)},error:t=>{this.settingsLoading=!1,console.error("Buttonizer: OH NO! ERROR: '"+t.statusText+"'. That's all we know... Please check your PHP logs or contact Buttonizer support if you need help."),console.error("Buttonizer: Visit our community on https://community.buttonizer.pro/")}})}init(t){buttonizer_ajax.in_preview&&!this.previewInitialized&&this.listenToPreview(),t.result.length>0?(""===this.getCookie("buttonizer-first-visit")&&(document.cookie="buttonizer-first-visit="+(new Date).getTime()),(()=>{this.groups.push(new n(t.result[0],0))})(),this.firstTimeInitialize&&this.buttonizerInitialized()):console.log("Buttonizer: No groups/buttons to display"),buttonizer_ajax.in_preview&&this.previewInitialized&&(this.messageButtonizerAdminEditor("(re)loaded",!0),this.messageButtonizerAdminEditor("warning",t.warning)),this.settingsLoading=!1}messageButtonizerAdminEditor(t,e){try{window.parent.postMessage({eventType:"buttonizer",messageType:t,message:e},document.location.origin)}catch(t){console.log("Buttonizer tried to warn you in the front-end editor. But the message didn't came through. Well. Doesn't matter, it's just an extra function. It's nice to have."),console.log(t)}}listenToPreview(){this.previewInitialized=!0,window.addEventListener("message",t=>{t.isTrusted&&void 0!==t.data.eventType&&"buttonizer"===t.data.eventType&&(console.log("[Buttonizer] Buttonizer preview - Data received:",t.data.messageType),buttonizer_ajax.in_preview&&"preview-reload"===t.data.messageType&&this.reload())},!1)}reload(){if(this.settingsLoading)return console.log("[Buttonizer] Request too quick, first finish the previous one"),void setTimeout(()=>this.reload(),100);console.log("[Buttonizer] Reloading Buttonizer"),this.settingsLoading=!0;for(let t=0;t<this.groups.length;t++)this.groups[t].destroy();let t=document.querySelectorAll(".buttonizer-group");for(let e=0;e<t.length;e++)t[e].remove();setTimeout(()=>{this.groups=[],this.getSettings()},50)}googleAnalyticsEvent(t){if("function"==typeof ga||"function"==typeof gtag||"object"==typeof window.dataLayer&&"function"==typeof window.dataLayer.push){let e={};if("group-open-close"===t.type?(e.groupName=t.name,e.action=t.interaction):"button-click"===t.type&&(e.groupName=t.groupName,e.action="Clicked button: "+t.buttonName),"gtag"in window&&"function"==typeof gtag)gtag("event","Buttonizer",{event_category:"Buttonizer group: "+e.groupName,event_action:e.action,event_label:document.title,page_url:document.location.href});else if("ga"in window)try{let t=ga.getAll()[0];if(!t)throw"No tracker found";t.send("event","Buttonizer group: "+e.groupName,e.action,document.title)}catch(t){console.error("Buttonizer Google Analytics: Last try to push to Google Analytics."),console.error("What does this mean?","https://community.buttonizer.pro/knowledgebase/17"),ga("send","event",{eventCategory:"Buttonizer group: "+e.groupName,eventAction:e.action,eventLabel:document.title})}else console.error("Buttonizer Google Analytics: Unable to push data to Google Analytics"),console.error("What does this mean?","https://community.buttonizer.pro/knowledgebase/17")}}getCookie(t){for(var e=t+"=",o=decodeURIComponent(document.cookie).split(";"),i=0;i<o.length;i++){for(var n=o[i];" "==n.charAt(0);)n=n.substring(1);if(0==n.indexOf(e))return n.substring(e.length,n.length)}return""}destroyGroup(t){let e=this.groups.indexOf(t);e>=0&&this.groups.splice(e,1)}hasPremium(){return this.premium}buttonizerInitialized(){this.firstTimeInitialize&&("function"==typeof window.buttonizerInitialized&&window.buttonizerInitialized(),this.firstTimeInitialize=!1)}}},37:function(t,e){}});
10
  *
11
  * (C) 2017-2019 Buttonizer
12
  *
13
+ */!function(t){var e={};function i(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=t,i.c=e,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(o,n,function(e){return t[e]}.bind(null,n));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=17)}({14:function(t,e){},15:function(t,e){},17:function(t,e,i){"use strict";i.r(e);class o{constructor(t,e){this.group=t,this.data=e,this.icon=e.icon.buttonIcon,this.show_mobile=e.device.show_mobile,this.show_desktop=e.device.show_desktop,this.style="",this.button,this.init(),this.unique="buttonizer-button-"+Array.apply(0,Array(15)).map(()=>(t=>t.charAt(Math.floor(Math.random()*t.length)))("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")).join("")}init(){}build(){let t,e=document.createElement("a");if(e.className="buttonizer-button",e.setAttribute("data-buttonizer",this.unique),"url"===this.data.action.type?(e.href=this.data.action.action,"url"===this.data.action.type&&"true"===this.data.action.action_new_tab&&(e.target="_blank")):e.href="javascript:void(0)","elementor_popup"!==this.data.action.type&&"popup_maker"!==this.data.action.type||(e.href="#"+this.data.action.action),"true"===this.show_mobile&&"false"===this.show_desktop?(this.group.mobileButtonCount++,e.className+=" button-mobile-"+this.group.mobileButtonCount+" button-hide-desktop"):"false"===this.show_mobile&&"true"===this.show_desktop?(this.group.desktopButtonCount++,e.className+=" button-desktop-"+this.group.desktopButtonCount+" button-hide-mobile"):"false"===this.show_mobile&&"false"===this.show_desktop?e.className+=" button-hide-desktop button-hide-mobile":(this.group.mobileButtonCount++,this.group.desktopButtonCount++,e.className+=" button-mobile-"+this.group.mobileButtonCount+" button-desktop-"+this.group.desktopButtonCount),"hover"===this.data.label.show_label_desktop?e.className+=" show-label-desktop-hover":"hide"===this.data.label.show_label_desktop&&(e.className+=" label-desktop-hidden"),"hide"===this.data.label.show_label_mobile&&(e.className+=" label-mobile-hidden"),"messenger_chat"===this.data.action.type&&this.addMessengerWindow(),this.data.label.label.length>0){let t=document.createElement("div");t.className="buttonizer-label",t.innerText=this.data.label.label,e.appendChild(t)}else if(""===this.data.label.label&&"rectangle"===this.group.data.styling.menu.style){let t=document.createElement("div");t.className="buttonizer-label",t.innerText=this.data.name+"'s button label",e.appendChild(t)}return(()=>{(t=document.createElement("i")).className=void 0!==typeof this.icon?this.icon:"fa fa-user",e.appendChild(t)})(),e.addEventListener("click",t=>this.onButtonClick(t)),this.generateStyle(),this.button=e,this.button}onButtonClick(t){if(window.Buttonizer.googleAnalyticsEvent({type:"button-click",groupName:this.group.data.name,buttonName:this.data.name}),"url"!==this.data.action.type)if("phone"!==this.data.action.type)if("mail"!==this.data.action.type)if("backtotop"!==this.data.action.type)if("gobackpage"!==this.data.action.type)if("socialsharing"!==this.data.action.type)if("whatsapp_pro"!==this.data.action.type&&"whatsapp"!==this.data.action.type)if("skype"!==this.data.action.type)if("messenger"!==this.data.action.type)if("sms"!==this.data.action.type)if("telegram"!==this.data.action.type)if("facebook"!==this.data.action.type)if("instagram"!==this.data.action.type)if("line"!==this.data.action.type)if("twitter"!==this.data.action.type)if("twitter_dm"!==this.data.action.type)"snapchat"!==this.data.action.type?"linkedin"!==this.data.action.type?"viber"!==this.data.action.type?"vk"!==this.data.action.type?"poptin"!==this.data.action.type?"popup_maker"!==this.data.action.type&&"elementor_popup"!==this.data.action.type&&("waze"!==this.data.action.type?"wechat"!==this.data.action.type?"messenger_chat"!==this.data.action.type?console.error("Buttonizer: Error! Unknown button action!"):void 0!==window.Buttonizer.initializedFacebookChat&&document.querySelectorAll(".fb-customerchat").length>0?"0px"===document.querySelector(".fb-customerchat").querySelector("iframe").style.maxHeight?FB.CustomerChat.showDialog():"100%"===document.querySelector(".fb-customerchat").querySelector("iframe").style.maxHeight&&FB.CustomerChat.hideDialog():window.Buttonizer.previewInitialized?window.Buttonizer.messageButtonizerAdminEditor("warning","Facebook Messenger button is not found, it may be blocked or this domain is not allowed to load the Facebook widget."):alert("Sorry, we were unable to open Facebook Messenger! Check the console for more information."):document.location.href=`weixin://dl/chat?${this.data.action.action}`:document.location.href=this.data.action.action):document.location.href=this.data.action.action:window.open(`https://vk.me/${this.data.action.action}`):document.location.href=`viber://add?number=${this.data.action.action}`:window.open(`https://www.linkedin.com/${this.data.action.action}`):window.open(`https://www.snapchat.com/add/${this.data.action.action}`);else{let t=`https://twitter.com/messages/compose?recipient_id=${this.data.action.action}`;window.open(t)}else window.open(`https://twitter.com/${this.data.action.action}`);else window.open(`https://line.me/R/ti/p/${this.data.action.action}`);else window.open(`https://www.instagram.com/${this.data.action.action}`);else window.open(`https://www.facebook.com/${this.data.action.action}`);else window.open(`https://telegram.me/${this.data.action.action}`);else{let t=`sms:${this.data.action.action}`;document.location.href=t}else window.open(this.data.action.action);else document.location.href=`skype:${this.data.action.action}?chat`;else{let t=`https://api.whatsapp.com/send?phone=${this.data.action.action}`;window.open(t)}else{if("facebook"===this.data.action.action)return window.open("http://www.facebook.com/sharer.php?u="+document.location.href+"&t="+document.title,"popupFacebook","width=610, height=480, resizable=0, toolbar=0, menubar=0, status=0, location=0, scrollbars=0"),!1;if("twitter"===this.data.action.action)return window.open("https://twitter.com/intent/tweet?text="+encodeURI(document.title)+" Hey! Check out this link:&url="+document.location.href,"popupTwitter","width=610, height=480, resizable=0, toolbar=0, menubar=0, status=0, location=0, scrollbars=0"),!1;if("whatsapp"===this.data.action.action)window.open("https://api.whatsapp.com/send?text="+encodeURI(document.title+" Hey! Check out this link:"+document.location.href));else{if("linkedin"===this.data.action.action)return window.open("http://www.linkedin.com/shareArticle?mini=true&url="+document.location.href+"&title="+encodeURI(document.title)+"&summary="+encodeURI(document.title),"popupLinkedIn","width=610, height=480, resizable=0, toolbar=0, menubar=0, status=0, location=0, scrollbars=0"),!1;if("pinterest"===this.data.action.action)return window.open("http://www.pinterest.com/pin/create/button/?url=/node"+document.location.href+"&description="+encodeURI(document.title),"popupTwitter","width=610, height=480, resizable=0, toolbar=0, menubar=0, status=0, location=0, scrollbars=0"),!1;if("mail"===this.data.action.action)window.location.href="mailto:?subject="+document.title+"&body= Hey! Check out this link: "+document.location.href;else{if("reddit"===this.data.action.action){let t=`https://www.reddit.com/submit?url=${encodeURI("Hey! Check out this link: "+document.location.href)}&title=${encodeURI(document.title)}`;return window.open(t),!1}if("tumblr"===this.data.action.action)return window.open(`https://www.tumblr.com/widgets/share/tool?shareSource=legacy&canonicalUrl=${encodeURI(document.location.href)}&posttype=link`),!1;if("digg"===this.data.action.action)return window.open(`http://digg.com/submit?url=${encodeURI(document.location.href)}`),!1;if("weibo"===this.data.action.action)return window.open(`http://service.weibo.com/share/share.php?url=${encodeURI(document.location.href)}&title=${encodeURI(document.title)}&pic=https://plus.google.com/_/favicon?domain=${document.location.origin}`),!1;if("vk"===this.data.action.action)return window.open(`https://vk.com/share.php?url=${encodeURI(document.location.href)}&title=${encodeURI(document.title)}&comment=Hey%20Check%20this%20out!`),!1;if("ok"===this.data.action.action)return window.open(`https://connect.ok.ru/dk?st.cmd=WidgetSharePreview&st.shareUrl=${encodeURI(document.location.href)}`),!1;if("xing"===this.data.action.action)return window.open(`https://www.xing.com/spi/shares/new?url=${encodeURI(document.location.href)}`),!1;if("blogger"===this.data.action.action)return window.open(`https://www.blogger.com/blog-this.g?u=${encodeURI(document.location.href)}&n=${encodeURI(document.title)}&t=Check%20this%20out!`),!1;if("flipboard"===this.data.action.action)return window.open(`https://share.flipboard.com/bookmarklet/popout?v=2&title=${encodeURI(document.title)}&url=${encodeURI(document.location.href)}`),!1;if("sms"===this.data.action.action)return window.open(`sms:?body=${encodeURI(document.title+"Hey! Check out this link: "+document.location.href)}`),!1}}}else window.history.back();else jQuery("html, body").animate({scrollTop:0},750);else{let t=`mailto:${this.data.action.action}`;document.location.href=t}else document.location.href=`tel:${this.data.action.action}`}generateStyle(){if("12px"!==this.data.styling.label.size||"3px"!==this.data.styling.label.radius){let t,e;"px"===this.data.styling.label.size&&(t="12px"),"px"===this.data.styling.label.radius&&(e="3px"),this.group.stylesheet+=`\n [data-buttonizer="${this.group.unique}"] [data-buttonizer="${this.unique}"] .buttonizer-label {\n font-size: ${t};\n border-radius: ${e};\n -moz-border-radius: ${e};\n -webkit-border-radius: ${e};\n }\n `}if(this.data.styling.button){let t="";"%"!==this.data.styling.button.radius?t+=`\n border-radius: ${this.data.styling.button.radius};\n `:t+="\n border-radius: 50%;\n ",this.group.stylesheet+=`\n [data-buttonizer="${this.group.unique}"] [data-buttonizer="${this.unique}"] {\n background-color: ${this.data.styling.button.color};\n ${"00"===this.data.styling.button.color.substr(-2)?"box-shadow: none;":""};\n ${t}\n }\n \n [data-buttonizer="${this.group.unique}"] [data-buttonizer="${this.unique}"]:hover {\n background-color: ${this.data.styling.button.interaction}\n }\n \n [data-buttonizer="${this.group.unique}"] [data-buttonizer="${this.unique}"] .buttonizer-label {\n background-color: ${this.data.styling.label.background};\n color: ${this.data.styling.label.text} !important;\n }`}this.group.stylesheet+=`\n [data-buttonizer="${this.group.unique}"] [data-buttonizer="${this.unique}"] i {\n color: ${this.data.styling.icon.color};\n font-size: ${this.data.styling.icon.size};\n\n transition: all 0.2s ease-in-out;\n -moz-transition: all 0.2s ease-in-out;\n -webkit-transition: all 0.2s ease-in-out;\n -o-transition: all 0.2s ease-in-out;\n }\n\n [data-buttonizer="${this.group.unique}"] [data-buttonizer="${this.unique}"]:hover i{\n color: ${this.data.styling.icon.interaction};\n\n transition: all 0.2s ease-in-out;\n -moz-transition: all 0.2s ease-in-out;\n -webkit-transition: all 0.2s ease-in-out;\n -o-transition: all 0.2s ease-in-out;\n }\n `,this.data.styling.button&&(this.group.stylesheet+=`\n [data-buttonizer="${this.group.unique}"].attention-animation-true.buttonizer-animation-pulse.buttonizer-desktop-has-1.buttonizer-mobile-has-1 [data-buttonizer="${this.unique}"]:before, \n [data-buttonizer="${this.group.unique}"].attention-animation-true.buttonizer-animation-pulse.buttonizer-desktop-has-1.buttonizer-mobile-has-1 [data-buttonizer="${this.unique}"]:after {\n background-color: ${this.data.styling.button.color};\n }\n `)}destroy(){this.button.remove(),this.group.removeButton(this),this.group=null,this.data=null,this.button=null}addMessengerWindow(){if(void 0!==window.Buttonizer.initializedFacebookChat)return;window.Buttonizer.initializedFacebookChat=""===this.data.action.action?void 0:this.data.action.action,window.fbAsyncInit=function(){FB.init({xfbml:!0,version:"v3.3"})};let t=document.createElement("script");t.innerHTML="\n (function(d, s, id) {\n var js, fjs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) return;\n js = d.createElement(s); js.id = id;\n js.src = 'https://connect.facebook.net/en_US/sdk/xfbml.customerchat.js';\n fjs.parentNode.insertBefore(js, fjs);\n }(document, 'script', 'facebook-jssdk'));",document.head.appendChild(t)}}class n{constructor(t,e){this.data=t,this.groupIndex=e,this.buttons=[],this.isBuild=!1,this.opened=!1,this.usesExitIntent=!1,this.exitIntentExecuted=!1,this.usesOnSroll=!1,this.show_mobile=this.data.device.show_mobile,this.show_desktop=this.data.device.show_desktop,this.single_button_mode=this.data.single_button_mode,this.element=null,this.groupStyle=this.data.styling.menu.style,this.groupAnimation=this.data.styling.menu.animation,this.stylesheet="",this.mobileButtonCount=0,this.desktopButtonCount=0,this.unique="buttonizer-"+Array.apply(0,Array(15)).map(function(){return(t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789").charAt(Math.floor(Math.random()*t.length));var t}).join(""),this.init()}init(){for(let t=0;t<this.data.buttons.length;t++){let e=new o(this,this.data.buttons[t]);this.buttons.push(e)}this.build(),this.animate()}build(){if(!0===this.isBuild||0===this.buttons.length)return void console.error("Buttonizer: Cannot create group: No buttons or already build");"fade-left-to-right"===this.groupStyle&&(this.groupStyle="faded");let t=document.createElement("div");if(t.className=`buttonizer buttonizer-group buttonizer-style-${this.groupStyle} buttonizer-animation-${this.groupAnimation} ${this.data.position.bottom<=50?"bottom":"top"} ${this.data.position.right<=50?"right":"left"}`,t.setAttribute("data-buttonizer",this.unique),"true"===this.show_mobile&&"false"===this.show_desktop?t.className+=" button-mobile-only":"false"===this.show_mobile&&"true"===this.show_desktop?t.className+=" button-desktop-only":"false"===this.show_mobile&&"false"===this.show_desktop&&(t.className+=" button-hide"),this.buttons.length>1){t.classList.add("buttonizer-is-menu"),"true"===this.data.openedByDefault&&(document.cookie.match("buttonizer_open=")?document.cookie.match("buttonizer_open=closed")||document.cookie.match("buttonizer_open=opened")&&(t.classList.add("opened"),this.opened=!0):(setTimeout(function(){t.classList.add("opened")},100),this.opened=!this.opened)),"1"===buttonizer_ajax.in_preview&&document.cookie.match("buttonizer_preview_"+this.groupIndex+"=opened")&&(this.opened=!0,t.classList.add("opened")),"square"!==this.data.styling.menu.style&&"rectangle"!==this.data.styling.menu.style||t.classList.add("opened");let e=document.createElement("div");e.className="buttonizer-button-list";let i=document.createElement("a");i.href="javascript:void(0)",i.className="buttonizer-button buttonizer-head","hover"===this.data.label.show_label_desktop?i.className+=" show-label-desktop-hover":"hide"===this.data.label.show_label_desktop&&(i.className+=" label-desktop-hidden"),"hide"===this.data.label.show_label_mobile&&(i.className+=" label-mobile-hidden");let o,n=`<div class="buttonizer-label">${this.data.label.groupLabel}</div>`;o=`<i class="${void 0!==typeof this.data.icon.groupIcon?this.data.icon.groupIcon:"fa fa-plus"}"></i>`,this.data.label.groupLabel.length<=0?i.innerHTML=o:i.innerHTML=n+o,i.addEventListener("click",t=>this.toggleMenu(t)),t.appendChild(e),t.appendChild(i);for(let i=0;i<this.buttons.length;i++){if("messenger_chat"===this.buttons[i].data.action.type){let e=document.createElement("div");e.className=`fb-customerchat buttonizer-facebook-messenger-overwrite-${this.unique}`,e.setAttribute("page-id",`${this.buttons[i].data.action.action}`),e.setAttribute("greeting_dialog_display","hide"),t.appendChild(e)}e.appendChild(this.buttons[i].build())}}else t.appendChild(this.buttons[0].build());t.className+=` buttonizer-desktop-has-${this.desktopButtonCount} buttonizer-mobile-has-${this.mobileButtonCount}`,this.element=t,document.body.appendChild(this.element),this.isBuild=!0,this.writeCSS(),"rectangle"===this.data.styling.menu.style&&this.maxLabelWidth(t,"rectangle")}toggleMenu(t){t.preventDefault(),window.Buttonizer.googleAnalyticsEvent({type:"group-open-close",name:this.data.name,interaction:this.opened?"close":"open"}),this.opened?this.element.classList.remove("opened"):this.element.classList.add("opened"),this.opened=!this.opened,"true"===this.data.openedByDefault&&(document.cookie.match("buttonizer_open=")?document.cookie.match("buttonizer_open=closed")?document.cookie="buttonizer_open=opened":document.cookie.match("buttonizer_open=opened")&&(document.cookie="buttonizer_open=closed"):document.cookie="buttonizer_open=closed"),"1"===buttonizer_ajax.in_preview&&this.togglePreviewOpened()}togglePreviewOpened(){this.opened?document.cookie="buttonizer_preview_"+this.groupIndex+"=opened":document.cookie="buttonizer_preview_"+this.groupIndex+"=closed"}writeCSS(){let t=document.createElement("style");t.id=this.unique;let e=` \n [data-buttonizer="${this.unique}"] {\n ${this.data.position.right<=50?"right":"left"}: ${this.data.position.right<=50?this.data.position.right:100-this.data.position.right}%;\n ${this.data.position.bottom<=50?"bottom":"top"}: ${this.data.position.bottom<=50?this.data.position.bottom:100-this.data.position.bottom}%;\n }\n \n [data-buttonizer="${this.unique}"] .buttonizer-button {\n background-color: ${this.data.styling.button.color};\n color: ${this.data.styling.icon.color};\n border-radius: ${this.data.styling.button.radius};\n ${"00"===this.data.styling.button.color.substr(-2)?"box-shadow: none;":""}\n }\n \n [data-buttonizer="${this.unique}"] .buttonizer-button:hover {\n background-color: ${this.data.styling.button.interaction};\n color: ${this.data.styling.icon.color}\n }\n \n [data-buttonizer="${this.unique}"] .buttonizer-button .buttonizer-label {\n background-color: ${this.data.styling.label.background};\n color: ${this.data.styling.label.text};\n font-size: ${this.data.styling.label.size};\n border-radius: ${this.data.styling.label.radius};\n }\n\n [data-buttonizer="${this.unique}"] .buttonizer-button i {\n color: ${this.data.styling.icon.color};\n font-size: ${this.data.styling.icon.size};\n }\n\n [data-buttonizer="${this.unique}"] .buttonizer-button i:hover {\n color: ${this.data.styling.icon.interaction};\n }\n \n [data-buttonizer="${this.unique}"].attention-animation-true.buttonizer-animation-pulse .buttonizer-head:before, \n [data-buttonizer="${this.unique}"].attention-animation-true.buttonizer-animation-pulse .buttonizer-head:after {\n background-color: ${this.data.styling.button.color};\n }\n `;void 0!==window.Buttonizer.initializedFacebookChat&&(e+=`\n .fb_dialog {\n display: none !important;\n }\n\n .buttonizer-facebook-messenger-overwrite-${this.unique} span iframe {\n ${this.data.position.right<=50?"right":"left"}: ${this.data.position.right<=50?+this.data.position.right-1:100-this.data.position.right-1}% !important;\n ${this.data.position.bottom<=50?"bottom":"top"}: ${this.data.position.bottom<=50?+this.data.position.bottom+4:100-this.data.position.bottom+6}% !important;\n }\n\n @media screen and (max-width: 769px){\n .buttonizer-facebook-messenger-overwrite-${this.unique} span iframe {\n ${this.data.position.right<=50?"right":"left"}: ${this.data.position.right<=50?+this.data.position.right-5:100-this.data.position.right-1}% !important;\n ${this.data.position.bottom<=50?"bottom":"top"}: ${this.data.position.bottom<=50?+this.data.position.bottom+4:100-this.data.position.bottom+7}% !important;\n \n }\n }\n\n .buttonizer-facebook-messenger-overwrite-${this.unique} span .fb_customer_chat_bounce_in_v2 {\n animation-duration: 300ms;\n animation-name: fb_bounce_in_v3 !important;\n transition-timing-function: ease-in-out; \n }\n\n .buttonizer-facebook-messenger-overwrite-${this.unique} span .fb_customer_chat_bounce_out_v2 {\n max-height: 0px !important;\n }\n\n @keyframes fb_bounce_in_v3 {\n 0% {\n opacity: 0;\n transform: scale(0, 0);\n transform-origin: bottom;\n }\n 50% {\n transform: scale(1.03, 1.03);\n transform-origin: bottom;\n }\n 100% {\n opacity: 1;\n transform: scale(1, 1);\n transform-origin: bottom;\n }\n }\n `),e+=this.stylesheet,t.innerHTML=e,document.head.appendChild(t)}animate(){null!==this.element&&"none"!==this.groupAnimation&&(this.element.classList.contains("opened")||(this.element.classList.add("attention-animation-true"),setTimeout(()=>{null!==this.element&&this.element.classList.remove("attention-animation-true")},2e3)),setTimeout(()=>this.animate(),1e4))}destroy(){for(let t=0;t<this.buttons.length;t++)this.buttons[t].destroy();this.element.remove(),this.element=null,document.getElementById(this.unique).remove(),window.Buttonizer.destroyGroup(this)}removeButton(t){let e=this.buttons.indexOf(t);e>=0&&this.buttons.splice(e,1)}maxLabelWidth(t,e){let i=[];for(let e of t.querySelectorAll(".buttonizer-label"))i.push(e.offsetWidth);let o=Math.max(...i),n=`\n [data-buttonizer="${this.unique}"].buttonizer-style-${e} .buttonizer-button .buttonizer-label {\n min-width: ${o}px;\n text-align: ${this.data.position.right<=50?"right":"left"};\n }\n `;document.getElementById(this.unique).innerHTML+=n}}i(37),i(14),i(15);window.Buttonizer=new class{constructor(){if(this.getSettings(),this.firstTimeInitialize=!0,this.write=HTMLElement,this.previewInitialized=!1,this.settingsLoading=!1,this.isInPreviewContainer=!1,this.premium=!1,this.groups=[],this.exitIntent=null,this.onscroll=null,this.settings={ga:null},buttonizer_ajax.in_preview){let t=document.createElement("style");t.innerHTML="html { margin-top: 0 !important; }",window.document.head.appendChild(t)}}getSettings(){buttonizer_ajax.current.url=document.location.href,this.settingsLoading=!0,jQuery.ajax({url:buttonizer_ajax.ajaxurl+"?action=buttonizer",dataType:"json",data:{qpu:buttonizer_ajax.is_admin?Date.now():buttonizer_ajax.cache,preview:buttonizer_ajax.in_preview?1:0,data:buttonizer_ajax.current},method:"get",success:t=>{"success"===t.status?this.init(t):console.error("Buttonizer: Something went wrong! Buttonizer not loaded",t)},error:t=>{this.settingsLoading=!1,console.error("Buttonizer: OH NO! ERROR: '"+t.statusText+"'. That's all we know... Please check your PHP logs or contact Buttonizer support if you need help."),console.error("Buttonizer: Visit our community on https://community.buttonizer.pro/")}})}init(t){buttonizer_ajax.in_preview&&!this.previewInitialized&&(this.isInPreviewContainer=!0,this.listenToPreview()),t.result.length>0?(""===this.getCookie("buttonizer-first-visit")&&(document.cookie="buttonizer-first-visit="+(new Date).getTime()),(()=>{this.groups.push(new n(t.result[0],0))})(),this.firstTimeInitialize&&this.buttonizerInitialized()):console.log("Buttonizer: No groups/buttons to display"),buttonizer_ajax.in_preview&&this.previewInitialized&&(this.messageButtonizerAdminEditor("(re)loaded",!0),this.messageButtonizerAdminEditor("warning",t.warning)),this.settingsLoading=!1}messageButtonizerAdminEditor(t,e){try{window.parent.postMessage({eventType:"buttonizer",messageType:t,message:e},document.location.origin)}catch(t){console.log("Buttonizer tried to warn you in the front-end editor. But the message didn't came through. Well. Doesn't matter, it's just an extra function. It's nice to have."),console.log(t)}}listenToPreview(){this.previewInitialized=!0,window.addEventListener("message",t=>{t.isTrusted&&void 0!==t.data.eventType&&"buttonizer"===t.data.eventType&&(console.log("[Buttonizer] Buttonizer preview - Data received:",t.data.messageType),buttonizer_ajax.in_preview&&"preview-reload"===t.data.messageType&&this.reload())},!1)}reload(){if(this.settingsLoading)return console.log("[Buttonizer] Request too quick, first finish the previous one"),void setTimeout(()=>this.reload(),100);console.log("[Buttonizer] Reloading Buttonizer"),this.settingsLoading=!0;for(let t=0;t<this.groups.length;t++)this.groups[t].destroy();let t=document.querySelectorAll(".buttonizer-group");for(let e=0;e<t.length;e++)t[e].remove();setTimeout(()=>{this.groups=[],this.getSettings()},50)}googleAnalyticsEvent(t){if("function"==typeof ga||"function"==typeof gtag||"object"==typeof window.dataLayer&&"function"==typeof window.dataLayer.push){let e={};if("group-open-close"===t.type?(e.groupName=t.name,e.action=t.interaction):"button-click"===t.type&&(e.groupName=t.groupName,e.action="Clicked button: "+t.buttonName),"gtag"in window&&"function"==typeof gtag)gtag("event","Buttonizer",{event_category:"Buttonizer group: "+e.groupName,event_action:e.action,event_label:document.title,page_url:document.location.href});else if("ga"in window)try{let t=ga.getAll()[0];if(!t)throw"No tracker found";t.send("event","Buttonizer group: "+e.groupName,e.action,document.title)}catch(t){console.error("Buttonizer Google Analytics: Last try to push to Google Analytics."),console.error("What does this mean?","https://community.buttonizer.pro/knowledgebase/17"),ga("send","event",{eventCategory:"Buttonizer group: "+e.groupName,eventAction:e.action,eventLabel:document.title})}else console.error("Buttonizer Google Analytics: Unable to push data to Google Analytics"),console.error("What does this mean?","https://community.buttonizer.pro/knowledgebase/17")}}getCookie(t){for(var e=t+"=",i=decodeURIComponent(document.cookie).split(";"),o=0;o<i.length;o++){for(var n=i[o];" "==n.charAt(0);)n=n.substring(1);if(0==n.indexOf(e))return n.substring(e.length,n.length)}return""}destroyGroup(t){let e=this.groups.indexOf(t);e>=0&&this.groups.splice(e,1)}hasPremium(){return this.premium}buttonizerInitialized(){this.firstTimeInitialize&&("function"==typeof window.buttonizerInitialized&&window.buttonizerInitialized(),this.firstTimeInitialize=!1)}inPreview(){return this.isInPreviewContainer}}},37:function(t,e){}});
buttonizer.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Buttonizer - Smart Floating Action Button
4
  * Plugin URI: https://buttonizer.pro
5
  * Description: The Buttonizer is a new way to give a boost to your number of interactions, actions and conversions from your website visitor by adding one or multiple Customizable Smart Floating Button in the corner of your website.
6
- * Version: 2.0.5
7
  * Author: Buttonizer
8
  * Author URI: https://buttonizer.pro
9
  * License: GPL2
@@ -34,7 +34,7 @@ define('BUTTONIZER_NAME', 'buttonizer');
34
  define('BUTTONIZER_DIR', dirname(__FILE__));
35
  define('BUTTONIZER_SLUG', basename(BUTTONIZER_DIR));
36
  define('BUTTONIZER_PLUGIN_DIR', __FILE__ );
37
- define('BUTTONIZER_VERSION', '2.0.5');
38
  define('BUTTONIZER_DEBUG', false);
39
 
40
  define('FONTAWESOME_CURRENT_VERSION', 'v5.8.2');
@@ -139,12 +139,12 @@ if(!function_exists("buttonizer_custom_connect_message")) {
139
  return sprintf(
140
  __( 'Hey %1$s' ) . '!<br><br>
141
  <p>Thank you for trying out our plugin!</p><br>
142
- <p>Our goal is to provide you excellent support and make the Plugin better and more secure. We do that by tracking how our users are using the plugin, learning why they abandon it, which environments we need to continue supporting, etc. Those valuable data points are key to making data-driven decisions and lead to better UX (user experience), new features, better documentation and other good things.</p><br>
143
- <p>Click on Allow and Continue (blue button) so that we can learn how to improve our plugin and help you better when you have support issues.</p><br>
144
- <p>You can always use Buttonizer Free version without opting-in. Just click \'Skip\' (white button) if you don\'t want to opt-in.</p><br>
145
- <p>Click on the link below (<a href="https://community.buttonizer.pro/knowledgebase/58" target="_blank">or click here</a>) to have a quick overview what gets tracked.</p><br>
146
- <p>Much Buttonizing fun,<br />
147
- <b>Team Buttonizer</b></p>',
148
  $user_first_name,
149
  '<b>' . $plugin_title . '</b>',
150
  '<b>' . $user_login . '</b>',
@@ -158,6 +158,11 @@ if(!function_exists("buttonizer_custom_connect_message")) {
158
 
159
  $oButtonizer->get()->add_action('after_uninstall', 'buttonizer_uninstall_cleanup');
160
 
 
 
 
 
 
161
  // Localization
162
  function buttonizer_load_plugin_textdomain() {
163
  load_plugin_textdomain('buttonizer-multifunctional-button', FALSE, basename(dirname(__FILE__)) . '/languages/');
3
  * Plugin Name: Buttonizer - Smart Floating Action Button
4
  * Plugin URI: https://buttonizer.pro
5
  * Description: The Buttonizer is a new way to give a boost to your number of interactions, actions and conversions from your website visitor by adding one or multiple Customizable Smart Floating Button in the corner of your website.
6
+ * Version: 2.0.6
7
  * Author: Buttonizer
8
  * Author URI: https://buttonizer.pro
9
  * License: GPL2
34
  define('BUTTONIZER_DIR', dirname(__FILE__));
35
  define('BUTTONIZER_SLUG', basename(BUTTONIZER_DIR));
36
  define('BUTTONIZER_PLUGIN_DIR', __FILE__ );
37
+ define('BUTTONIZER_VERSION', '2.0.6');
38
  define('BUTTONIZER_DEBUG', false);
39
 
40
  define('FONTAWESOME_CURRENT_VERSION', 'v5.8.2');
139
  return sprintf(
140
  __( 'Hey %1$s' ) . '!<br><br>
141
  <p>Thank you for trying out our plugin!</p><br>
142
+ <p>Our goal is to provide you excellent support and make the Plugin better and more secure. We do that by tracking how our users are using the plugin, learning why they abandon it, which environments we need to continue supporting, etc. Those valuable data points are key to making data-driven decisions and lead to better UX (user experience), new features, better documentation and other good things.</p><br>
143
+ <p>Click on Allow and Continue (blue button) so that we can learn how to improve our plugin and help you better when you have support issues.</p><br>
144
+ <p>You can always use Buttonizer Free version without opting-in. Just click \'Skip\' (white button) if you don\'t want to opt-in.</p><br>
145
+ <p>Click on the link below (<a href="https://community.buttonizer.pro/knowledgebase/58" target="_blank">or click here</a>) to have a quick overview what gets tracked.</p><br>
146
+ <p>Much Buttonizing fun,<br />
147
+ <b>Team Buttonizer</b></p>',
148
  $user_first_name,
149
  '<b>' . $plugin_title . '</b>',
150
  '<b>' . $user_login . '</b>',
158
 
159
  $oButtonizer->get()->add_action('after_uninstall', 'buttonizer_uninstall_cleanup');
160
 
161
+ // Add Buttonizer Community
162
+ $oButtonizer->get()->add_filter( 'support_forum_url', function ($wp_org_support_url) {
163
+ return 'https://community.buttonizer.pro/';
164
+ });
165
+
166
  // Localization
167
  function buttonizer_load_plugin_textdomain() {
168
  load_plugin_textdomain('buttonizer-multifunctional-button', FALSE, basename(dirname(__FILE__)) . '/languages/');
freemius/assets/css/admin/account.css CHANGED
@@ -1 +1 @@
1
- #fs_account .postbox,#fs_account .widefat{max-width:700px}#fs_account h3{font-size:1.3em;padding:12px 15px;margin:0 0 12px 0;line-height:1.4;border-bottom:1px solid #F1F1F1}#fs_account h3 .dashicons{width:26px;height:26px;font-size:1.3em}#fs_account i.dashicons{font-size:1.2em;height:1.2em;width:1.2em}#fs_account .dashicons{vertical-align:middle}#fs_account .fs-header-actions{position:absolute;top:17px;right:15px;font-size:0.9em}#fs_account .fs-header-actions ul{margin:0}#fs_account .fs-header-actions li{float:left}#fs_account .fs-header-actions li form{display:inline-block}#fs_account .fs-header-actions li a{text-decoration:none}#fs_account_details .button-group{float:right}.rtl #fs_account .fs-header-actions{left:15px;right:auto}.fs-key-value-table{width:100%}.fs-key-value-table form{display:inline-block}.fs-key-value-table tr td:first-child{text-align:right}.fs-key-value-table tr td:first-child nobr{font-weight:bold}.fs-key-value-table tr td:first-child form{display:block}.fs-key-value-table tr td.fs-right{text-align:right}.fs-key-value-table tr.fs-odd{background:#ebebeb}.fs-key-value-table td,.fs-key-value-table th{padding:10px}.fs-key-value-table code{line-height:28px}.fs-key-value-table var,.fs-key-value-table code,.fs-key-value-table input[type="text"]{color:#0073AA;font-size:16px;background:none}.fs-key-value-table input[type="text"]{width:100%;font-weight:bold}label.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error{background:#dc3232}#fs_sites .fs-scrollable-table .fs-table-body{max-height:200px;overflow:auto;border:1px solid #e5e5e5}#fs_sites .fs-scrollable-table .fs-table-body>table.widefat{border:none !important}#fs_sites .fs-scrollable-table .fs-main-column{width:100%}#fs_sites .fs-scrollable-table .fs-site-details td:first-of-type{text-align:right;color:grey;width:1px}#fs_sites .fs-scrollable-table .fs-site-details td:last-of-type{text-align:right}#fs_sites .fs-scrollable-table .fs-install-details table tr td{width:1px;white-space:nowrap}#fs_sites .fs-scrollable-table .fs-install-details table tr td:last-of-type{width:auto}#fs_addons h3{border:none;margin-bottom:0;padding:4px 5px}#fs_addons td{vertical-align:middle}#fs_addons thead{white-space:nowrap}#fs_addons td:first-child,#fs_addons th:first-child{text-align:left;font-weight:bold}#fs_addons td:last-child,#fs_addons th:last-child{text-align:right}#fs_addons th{font-weight:bold}#fs_billing_address{width:100%}#fs_billing_address tr td{width:50%;padding:5px}#fs_billing_address tr:first-of-type td{padding-top:0}#fs_billing_address span{font-weight:bold}#fs_billing_address input,#fs_billing_address select{display:block;width:100%;margin-top:5px}#fs_billing_address input::-moz-placeholder,#fs_billing_address select::-moz-placeholder{color:transparent;opacity:1}#fs_billing_address input:-ms-input-placeholder,#fs_billing_address select:-ms-input-placeholder{color:transparent}#fs_billing_address input::-webkit-input-placeholder,#fs_billing_address select::-webkit-input-placeholder{color:transparent}#fs_billing_address input.fs-read-mode,#fs_billing_address select.fs-read-mode{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode td span{display:none}#fs_billing_address.fs-read-mode input,#fs_billing_address.fs-read-mode select{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode input::-moz-placeholder,#fs_billing_address.fs-read-mode select::-moz-placeholder{color:#ccc;opacity:1}#fs_billing_address.fs-read-mode input:-ms-input-placeholder,#fs_billing_address.fs-read-mode select:-ms-input-placeholder{color:#ccc}#fs_billing_address.fs-read-mode input::-webkit-input-placeholder,#fs_billing_address.fs-read-mode select::-webkit-input-placeholder{color:#ccc}#fs_billing_address button{display:block;width:100%}
1
+ label.fs-tag,span.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn,span.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-info,span.fs-tag.fs-info{background:#00a0d2}label.fs-tag.fs-success,span.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error,span.fs-tag.fs-error{background:#dc3232}#fs_account .postbox,#fs_account .widefat{max-width:700px}#fs_account h3{font-size:1.3em;padding:12px 15px;margin:0 0 12px 0;line-height:1.4;border-bottom:1px solid #F1F1F1}#fs_account h3 .dashicons{width:26px;height:26px;font-size:1.3em}#fs_account i.dashicons{font-size:1.2em;height:1.2em;width:1.2em}#fs_account .dashicons{vertical-align:middle}#fs_account .fs-header-actions{position:absolute;top:17px;right:15px;font-size:0.9em}#fs_account .fs-header-actions ul{margin:0}#fs_account .fs-header-actions li{float:left}#fs_account .fs-header-actions li form{display:inline-block}#fs_account .fs-header-actions li a{text-decoration:none}#fs_account_details .button-group{float:right}.rtl #fs_account .fs-header-actions{left:15px;right:auto}.fs-key-value-table{width:100%}.fs-key-value-table form{display:inline-block}.fs-key-value-table tr td:first-child{text-align:right}.fs-key-value-table tr td:first-child nobr{font-weight:bold}.fs-key-value-table tr td:first-child form{display:block}.fs-key-value-table tr td.fs-right{text-align:right}.fs-key-value-table tr.fs-odd{background:#ebebeb}.fs-key-value-table td,.fs-key-value-table th{padding:10px}.fs-key-value-table code{line-height:28px}.fs-key-value-table var,.fs-key-value-table code,.fs-key-value-table input[type="text"]{color:#0073AA;font-size:16px;background:none}.fs-key-value-table input[type="text"]{width:100%;font-weight:bold}.fs-field-beta_program label{margin-left:7px}label.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error{background:#dc3232}#fs_sites .fs-scrollable-table .fs-table-body{max-height:200px;overflow:auto;border:1px solid #e5e5e5}#fs_sites .fs-scrollable-table .fs-table-body>table.widefat{border:none !important}#fs_sites .fs-scrollable-table .fs-main-column{width:100%}#fs_sites .fs-scrollable-table .fs-site-details td:first-of-type{text-align:right;color:grey;width:1px}#fs_sites .fs-scrollable-table .fs-site-details td:last-of-type{text-align:right}#fs_sites .fs-scrollable-table .fs-install-details table tr td{width:1px;white-space:nowrap}#fs_sites .fs-scrollable-table .fs-install-details table tr td:last-of-type{width:auto}#fs_addons h3{border:none;margin-bottom:0;padding:4px 5px}#fs_addons td{vertical-align:middle}#fs_addons thead{white-space:nowrap}#fs_addons td:first-child,#fs_addons th:first-child{text-align:left;font-weight:bold}#fs_addons td:last-child,#fs_addons th:last-child{text-align:right}#fs_addons th{font-weight:bold}#fs_billing_address{width:100%}#fs_billing_address tr td{width:50%;padding:5px}#fs_billing_address tr:first-of-type td{padding-top:0}#fs_billing_address span{font-weight:bold}#fs_billing_address input,#fs_billing_address select{display:block;width:100%;margin-top:5px}#fs_billing_address input::-moz-placeholder,#fs_billing_address select::-moz-placeholder{color:transparent;opacity:1}#fs_billing_address input:-ms-input-placeholder,#fs_billing_address select:-ms-input-placeholder{color:transparent}#fs_billing_address input::-webkit-input-placeholder,#fs_billing_address select::-webkit-input-placeholder{color:transparent}#fs_billing_address input.fs-read-mode,#fs_billing_address select.fs-read-mode{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode td span{display:none}#fs_billing_address.fs-read-mode input,#fs_billing_address.fs-read-mode select{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode input::-moz-placeholder,#fs_billing_address.fs-read-mode select::-moz-placeholder{color:#ccc;opacity:1}#fs_billing_address.fs-read-mode input:-ms-input-placeholder,#fs_billing_address.fs-read-mode select:-ms-input-placeholder{color:#ccc}#fs_billing_address.fs-read-mode input::-webkit-input-placeholder,#fs_billing_address.fs-read-mode select::-webkit-input-placeholder{color:#ccc}#fs_billing_address button{display:block;width:100%}
freemius/assets/css/admin/add-ons.css CHANGED
@@ -1,2 +1,2 @@
1
- #fs_addons .fs-cards-list{list-style:none}#fs_addons .fs-cards-list .fs-card{float:left;height:152px;width:310px;padding:0;margin:0 0 30px 30px;font-size:14px;list-style:none;border:1px solid #ddd;cursor:pointer;position:relative}#fs_addons .fs-cards-list .fs-card .fs-overlay{position:absolute;left:0;right:0;bottom:0;top:0;z-index:9}#fs_addons .fs-cards-list .fs-card .fs-inner{background-color:#fff;overflow:hidden;height:100%;position:relative}#fs_addons .fs-cards-list .fs-card .fs-inner ul{-moz-transition:all,0.15s;-o-transition:all,0.15s;-ms-transition:all,0.15s;-webkit-transition:all,0.15s;transition:all,0.15s;left:0;right:0;top:0;position:absolute}#fs_addons .fs-cards-list .fs-card .fs-inner li{list-style:none;line-height:18px;padding:0 15px;width:100%;display:block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-card-banner{padding:0;margin:0;line-height:0;display:block;height:100px;background-repeat:repeat-x;background-size:100% 100%;-moz-transition:all,0.15s;-o-transition:all,0.15s;-ms-transition:all,0.15s;-webkit-transition:all,0.15s;transition:all,0.15s}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-title{margin:10px 0 0 0;height:18px;overflow:hidden;color:#000;white-space:nowrap;text-overflow:ellipsis;font-weight:bold}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-offer{font-size:0.9em}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-description{background-color:#f9f9f9;padding:10px 15px 100px 15px;border-top:1px solid #eee;margin:0 0 10px 0;color:#777}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-tag{position:absolute;top:10px;right:0px;background:greenyellow;display:block;padding:2px 10px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.3);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.3);box-shadow:1px 1px 1px rgba(0,0,0,0.3);text-transform:uppercase;font-size:0.9em;font-weight:bold}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-cta .button{position:absolute;top:112px;right:10px}@media screen and (min-width: 960px){#fs_addons .fs-cards-list .fs-card:hover .fs-overlay{border:2px solid #29abe1;margin-left:-1px;margin-top:-1px}#fs_addons .fs-cards-list .fs-card:hover .fs-inner ul{top:-100px}#fs_addons .fs-cards-list .fs-card:hover .fs-inner .fs-title,#fs_addons .fs-cards-list .fs-card:hover .fs-inner .fs-offer{color:#29abe1}}
2
- #TB_window,#TB_window iframe{width:772px !important}#plugin-information #section-description h2,#plugin-information #section-description h3,#plugin-information #section-description p,#plugin-information #section-description b,#plugin-information #section-description i,#plugin-information #section-description blockquote,#plugin-information #section-description li,#plugin-information #section-description ul,#plugin-information #section-description ol{clear:none}#plugin-information #section-description .fs-selling-points{padding-bottom:10px;border-bottom:1px solid #ddd}#plugin-information #section-description .fs-selling-points ul{margin:0}#plugin-information #section-description .fs-selling-points ul li{padding:0;list-style:none outside none}#plugin-information #section-description .fs-selling-points ul li i.dashicons{color:#71ae00;font-size:3em;vertical-align:middle;line-height:30px;float:left;margin:0 0 0 -15px}#plugin-information #section-description .fs-selling-points ul li h3{margin:1em 30px !important}#plugin-information #section-description .fs-screenshots:after{content:"";display:table;clear:both}#plugin-information #section-description .fs-screenshots ul{list-style:none;margin:0}#plugin-information #section-description .fs-screenshots ul li{width:225px;height:225px;float:left;margin-bottom:20px;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}#plugin-information #section-description .fs-screenshots ul li a{display:block;width:100%;height:100%;border:1px solid;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);background-size:cover}#plugin-information #section-description .fs-screenshots ul li.odd{margin-right:20px}#plugin-information .plugin-information-pricing{margin:-16px;border-bottom:1px solid #ddd}#plugin-information .plugin-information-pricing .fs-plan h3{margin-top:0;padding:20px;font-size:16px}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper{border-bottom:1px solid #ddd}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab{cursor:pointer;position:relative;padding:0 10px;font-size:0.9em}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab label{text-transform:uppercase;color:green;background:greenyellow;position:absolute;left:-1px;right:-1px;bottom:100%;border:1px solid darkgreen;padding:2px;text-align:center;font-size:0.9em;line-height:1em}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab.nav-tab-active{cursor:default;background:#fffeec;border-bottom-color:#fffeec}#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle h3{background:#fffeec;margin:0;padding-bottom:0;color:#0073aa}#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle .nav-tab-wrapper,#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle .fs-billing-frequency{display:none}#plugin-information .plugin-information-pricing .fs-plan .fs-pricing-body{background:#fffeec;padding:20px}#plugin-information .plugin-information-pricing .fs-plan .button{width:100%;text-align:center;font-weight:bold;text-transform:uppercase;font-size:1.1em}#plugin-information .plugin-information-pricing .fs-plan label{white-space:nowrap}#plugin-information .plugin-information-pricing .fs-plan var{font-style:normal}#plugin-information .plugin-information-pricing .fs-plan .fs-billing-frequency,#plugin-information .plugin-information-pricing .fs-plan .fs-annual-discount{text-align:center;display:block;font-weight:bold;margin-bottom:10px;text-transform:uppercase;background:#F3F3F3;padding:2px;border:1px solid #ccc}#plugin-information .plugin-information-pricing .fs-plan .fs-annual-discount{text-transform:none;color:green;background:greenyellow}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms{font-size:0.9em}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms i{float:left;margin:0 0 0 -15px}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms li{margin:10px 0 0 0}#plugin-information #section-features .fs-features{margin:-20px -26px}#plugin-information #section-features table{width:100%;border-spacing:0;border-collapse:separate}#plugin-information #section-features table thead th{padding:10px 0}#plugin-information #section-features table thead .fs-price{color:#71ae00;font-weight:normal;display:block;text-align:center}#plugin-information #section-features table tbody td{border-top:1px solid #ccc;padding:10px 0;text-align:center;width:100px;color:#71ae00}#plugin-information #section-features table tbody td:first-child{text-align:left;width:auto;color:inherit;padding-left:26px}#plugin-information #section-features table tbody tr.fs-odd td{background:#fefefe}#plugin-information #section-features .dashicons-yes{width:30px;height:30px;font-size:30px}@media screen and (max-width: 961px){#fs_addons .fs-cards-list .fs-card{height:265px}}
1
+ .fs-badge{position:absolute;top:10px;right:0;background:#71ae00;color:white;text-transform:uppercase;padding:5px 10px;-moz-border-radius:3px 0 0 3px;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;font-weight:bold;border-right:0;-moz-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);box-shadow:0 2px 1px -1px rgba(0,0,0,0.3)}#fs_addons .fs-cards-list{list-style:none}#fs_addons .fs-cards-list .fs-card{float:left;height:152px;width:310px;padding:0;margin:0 0 30px 30px;font-size:14px;list-style:none;border:1px solid #ddd;cursor:pointer;position:relative}#fs_addons .fs-cards-list .fs-card .fs-overlay{position:absolute;left:0;right:0;bottom:0;top:0;z-index:9}#fs_addons .fs-cards-list .fs-card .fs-inner{background-color:#fff;overflow:hidden;height:100%;position:relative}#fs_addons .fs-cards-list .fs-card .fs-inner>ul{-moz-transition:all,0.15s;-o-transition:all,0.15s;-ms-transition:all,0.15s;-webkit-transition:all,0.15s;transition:all,0.15s;left:0;right:0;top:0;position:absolute}#fs_addons .fs-cards-list .fs-card .fs-inner>ul>li{list-style:none;line-height:18px;padding:0 15px;width:100%;display:block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-card-banner{padding:0;margin:0;line-height:0;display:block;height:100px;background-repeat:repeat-x;background-size:100% 100%;-moz-transition:all,0.15s;-o-transition:all,0.15s;-ms-transition:all,0.15s;-webkit-transition:all,0.15s;transition:all,0.15s}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-card-banner .fs-badge.fs-installed-addon-badge{font-size:1.02em;line-height:1.3em}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-title{margin:10px 0 0 0;height:18px;overflow:hidden;color:#000;white-space:nowrap;text-overflow:ellipsis;font-weight:bold}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-offer{font-size:0.9em}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-description{background-color:#f9f9f9;padding:10px 15px 100px 15px;border-top:1px solid #eee;margin:0 0 10px 0;color:#777}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-tag{position:absolute;top:10px;right:0px;background:greenyellow;display:block;padding:2px 10px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.3);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.3);box-shadow:1px 1px 1px rgba(0,0,0,0.3);text-transform:uppercase;font-size:0.9em;font-weight:bold}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-cta .button,#fs_addons .fs-cards-list .fs-card .fs-inner .fs-cta .button-group{position:absolute;top:112px;right:10px}@media screen and (min-width: 960px){#fs_addons .fs-cards-list .fs-card:hover .fs-overlay{border:2px solid #29abe1;margin-left:-1px;margin-top:-1px}#fs_addons .fs-cards-list .fs-card:hover .fs-inner ul{top:-100px}#fs_addons .fs-cards-list .fs-card:hover .fs-inner .fs-title,#fs_addons .fs-cards-list .fs-card:hover .fs-inner .fs-offer{color:#29abe1}}
2
+ #TB_window,#TB_window iframe{width:821px !important}#plugin-information .fyi{width:266px !important}#plugin-information #section-holder{margin-right:299px}#plugin-information #section-description h2,#plugin-information #section-description h3,#plugin-information #section-description p,#plugin-information #section-description b,#plugin-information #section-description i,#plugin-information #section-description blockquote,#plugin-information #section-description li,#plugin-information #section-description ul,#plugin-information #section-description ol{clear:none}#plugin-information #section-description .fs-selling-points{padding-bottom:10px;border-bottom:1px solid #ddd}#plugin-information #section-description .fs-selling-points ul{margin:0}#plugin-information #section-description .fs-selling-points ul li{padding:0;list-style:none outside none}#plugin-information #section-description .fs-selling-points ul li i.dashicons{color:#71ae00;font-size:3em;vertical-align:middle;line-height:30px;float:left;margin:0 0 0 -15px}#plugin-information #section-description .fs-selling-points ul li h3{margin:1em 30px !important}#plugin-information #section-description .fs-screenshots:after{content:"";display:table;clear:both}#plugin-information #section-description .fs-screenshots ul{list-style:none;margin:0}#plugin-information #section-description .fs-screenshots ul li{width:225px;height:225px;float:left;margin-bottom:20px;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}#plugin-information #section-description .fs-screenshots ul li a{display:block;width:100%;height:100%;border:1px solid;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);background-size:cover}#plugin-information #section-description .fs-screenshots ul li.odd{margin-right:20px}#plugin-information .plugin-information-pricing{margin:-16px;border-bottom:1px solid #ddd}#plugin-information .plugin-information-pricing .fs-plan h3{margin-top:0;padding:20px;font-size:16px}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper{border-bottom:1px solid #ddd}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab{cursor:pointer;position:relative;padding:0 10px;font-size:0.9em}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab label{text-transform:uppercase;color:green;background:greenyellow;position:absolute;left:-1px;right:-1px;bottom:100%;border:1px solid darkgreen;padding:2px;text-align:center;font-size:0.9em;line-height:1em}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab.nav-tab-active{cursor:default;background:#fffeec;border-bottom-color:#fffeec}#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle h3{background:#fffeec;margin:0;padding-bottom:0;color:#0073aa}#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle .nav-tab-wrapper,#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle .fs-billing-frequency{display:none}#plugin-information .plugin-information-pricing .fs-plan .fs-pricing-body{background:#fffeec;padding:20px}#plugin-information .plugin-information-pricing .fs-plan .button{width:100%;text-align:center;font-weight:bold;text-transform:uppercase;font-size:1.1em}#plugin-information .plugin-information-pricing .fs-plan label{white-space:nowrap}#plugin-information .plugin-information-pricing .fs-plan var{font-style:normal}#plugin-information .plugin-information-pricing .fs-plan .fs-billing-frequency,#plugin-information .plugin-information-pricing .fs-plan .fs-annual-discount{text-align:center;display:block;font-weight:bold;margin-bottom:10px;text-transform:uppercase;background:#F3F3F3;padding:2px;border:1px solid #ccc}#plugin-information .plugin-information-pricing .fs-plan .fs-annual-discount{text-transform:none;color:green;background:greenyellow}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms{font-size:0.9em}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms i{float:left;margin:0 0 0 -15px}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms li{margin:10px 0 0 0}#plugin-information #section-features .fs-features{margin:-20px -26px}#plugin-information #section-features table{width:100%;border-spacing:0;border-collapse:separate}#plugin-information #section-features table thead th{padding:10px 0}#plugin-information #section-features table thead .fs-price{color:#71ae00;font-weight:normal;display:block;text-align:center}#plugin-information #section-features table tbody td{border-top:1px solid #ccc;padding:10px 0;text-align:center;width:100px;color:#71ae00}#plugin-information #section-features table tbody td:first-child{text-align:left;width:auto;color:inherit;padding-left:26px}#plugin-information #section-features table tbody tr.fs-odd td{background:#fefefe}#plugin-information #section-features .dashicons-yes{width:30px;height:30px;font-size:30px}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .button-group .button,#plugin-information .fs-dropdown .button-group .button{position:relative;width:auto;top:0;right:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .button-group .button:focus,#plugin-information .fs-dropdown .button-group .button:focus{z-index:10}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .button-group .fs-dropdown-arrow,#plugin-information .fs-dropdown .button-group .fs-dropdown-arrow{border-top:6px solid white;border-right:4px solid transparent;border-left:4px solid transparent;top:12px;position:relative}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active:not(.up) .button:not(.fs-dropdown-arrow-button),#plugin-information .fs-dropdown.active:not(.up) .button:not(.fs-dropdown-arrow-button){border-bottom-left-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active:not(.up) .fs-dropdown-arrow-button,#plugin-information .fs-dropdown.active:not(.up) .fs-dropdown-arrow-button{border-bottom-right-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active.up .button:not(.fs-dropdown-arrow-button),#plugin-information .fs-dropdown.active.up .button:not(.fs-dropdown-arrow-button){border-top-left-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active.up .fs-dropdown-arrow-button,#plugin-information .fs-dropdown.active.up .fs-dropdown-arrow-button{border-top-right-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list,#plugin-information .fs-dropdown .fs-dropdown-list{position:absolute;right:-1px;top:100%;margin-left:auto;padding:3px 0;border:1px solid #bfbfbf;background-color:#fff;z-index:1;width:230px;text-align:left;-moz-box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12);-webkit-box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12);box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li,#plugin-information .fs-dropdown .fs-dropdown-list li{margin:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li a,#plugin-information .fs-dropdown .fs-dropdown-list li a{display:block;padding:5px 10px;text-decoration:none;text-shadow:none}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li:hover,#plugin-information .fs-dropdown .fs-dropdown-list li:hover{background-color:#0074a3;color:#fff}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li:hover a,#plugin-information .fs-dropdown .fs-dropdown-list li:hover a{color:#fff}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown:not(.up) .fs-dropdown-list,#plugin-information .fs-dropdown:not(.up) .fs-dropdown-list{-moz-border-radius:3px 0 3px 3px;-webkit-border-radius:3px 0 3px 3px;border-radius:3px 0 3px 3px}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.up .fs-dropdown-list,#plugin-information .fs-dropdown.up .fs-dropdown-list{-moz-border-radius:3px 3px 0 3px;-webkit-border-radius:3px 3px 0 3px;border-radius:3px 3px 0 3px}#plugin-information .fs-dropdown .button-group{width:100%}#plugin-information .fs-dropdown .button-group .button{float:none;font-size:14px;font-weight:normal;text-transform:none}#plugin-information .fs-dropdown .fs-dropdown-list{margin-top:1px}#plugin-information .fs-dropdown.up .fs-dropdown-list{top:auto;bottom:100%;margin-bottom:2px}#plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group{text-align:center;display:table}#plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group .button{display:table-cell}#plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group .button:not(.fs-dropdown-arrow-button){left:1px;width:100%}#plugin-information-footer>.button,#plugin-information-footer .fs-dropdown{position:relative;top:3px}#plugin-information-footer>.button.left,#plugin-information-footer .fs-dropdown.left{float:left}#plugin-information-footer>.right,#plugin-information-footer .fs-dropdown{float:right}@media screen and (max-width: 961px){#fs_addons .fs-cards-list .fs-card{height:265px}}
freemius/assets/css/admin/common.css CHANGED
@@ -1,2 +1,2 @@
1
- .theme-browser .theme .fs-premium-theme-badge{position:absolute;top:10px;right:0;background:#71ae00;color:#fff;text-transform:uppercase;padding:5px 10px;-moz-border-radius:3px 0 0 3px;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;font-weight:bold;border-right:0;-moz-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);font-size:1.1em}#fs_frame{line-height:0;font-size:0}.fs-full-size-wrapper{margin:40px 0 -65px -20px}@media (max-width: 600px){.fs-full-size-wrapper{margin:0 0 -65px -10px}}
2
  .fs-notice{position:relative}.fs-notice.fs-has-title{margin-bottom:30px !important}.fs-notice.success{color:green}.fs-notice.promotion{border-color:#00a0d2 !important;background-color:#f2fcff !important}.fs-notice .fs-notice-body{margin:.5em 0;padding:2px}.fs-notice .fs-close{cursor:pointer;color:#aaa;float:right}.fs-notice .fs-close:hover{color:#666}.fs-notice .fs-close>*{margin-top:7px;display:inline-block}.fs-notice label.fs-plugin-title{background:rgba(0,0,0,0.3);color:#fff;padding:2px 10px;position:absolute;top:100%;bottom:auto;right:auto;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;left:10px;font-size:12px;font-weight:bold;cursor:auto}div.fs-notice.updated,div.fs-notice.success,div.fs-notice.promotion{display:block !important}.rtl .fs-notice .fs-close{float:left}.fs-secure-notice{position:fixed;top:32px;left:160px;right:0;background:#ebfdeb;padding:10px 20px;color:green;z-index:9999;-moz-box-shadow:0 2px 2px rgba(6,113,6,0.3);-webkit-box-shadow:0 2px 2px rgba(6,113,6,0.3);box-shadow:0 2px 2px rgba(6,113,6,0.3);opacity:0.95;filter:alpha(opacity=95)}.fs-secure-notice:hover{opacity:1;filter:alpha(opacity=100)}.fs-secure-notice a.fs-security-proof{color:green;text-decoration:none}@media screen and (max-width: 960px){.fs-secure-notice{left:36px}}@media screen and (max-width: 600px){.fs-secure-notice{display:none}}@media screen and (max-width: 500px){#fs_promo_tab{display:none}}@media screen and (max-width: 782px){.fs-secure-notice{left:0;top:46px;text-align:center}}span.fs-submenu-item.fs-sub:before{content:'\21B3';padding:0 5px}.rtl span.fs-submenu-item.fs-sub:before{content:'\21B2'}.fs-submenu-item.pricing.upgrade-mode{color:greenyellow}.fs-submenu-item.pricing.trial-mode{color:#83e2ff}#adminmenu .update-plugins.fs-trial{background-color:#00b9eb}.fs-ajax-spinner{border:0;width:20px;height:20px;margin-right:5px;vertical-align:sub;display:inline-block;background:url("/wp-admin/images/wpspin_light-2x.gif");background-size:contain}.wrap.fs-section h2{text-align:left}.plugins p.fs-upgrade-notice{border:0;background-color:#d54e21;padding:10px;color:#f9f9f9;margin-top:10px}
1
+ .fs-badge{position:absolute;top:10px;right:0;background:#71ae00;color:white;text-transform:uppercase;padding:5px 10px;-moz-border-radius:3px 0 0 3px;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;font-weight:bold;border-right:0;-moz-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);box-shadow:0 2px 1px -1px rgba(0,0,0,0.3)}.theme-browser .theme .fs-premium-theme-badge-container{position:absolute;right:0;top:0}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge{position:relative;top:0;margin-top:10px;text-align:center}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge.fs-premium-theme-badge{font-size:1.1em}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge.fs-beta-theme-badge{background:#00a0d2}#fs_frame{line-height:0;font-size:0}.fs-full-size-wrapper{margin:40px 0 -65px -20px}@media (max-width: 600px){.fs-full-size-wrapper{margin:0 0 -65px -10px}}
2
  .fs-notice{position:relative}.fs-notice.fs-has-title{margin-bottom:30px !important}.fs-notice.success{color:green}.fs-notice.promotion{border-color:#00a0d2 !important;background-color:#f2fcff !important}.fs-notice .fs-notice-body{margin:.5em 0;padding:2px}.fs-notice .fs-close{cursor:pointer;color:#aaa;float:right}.fs-notice .fs-close:hover{color:#666}.fs-notice .fs-close>*{margin-top:7px;display:inline-block}.fs-notice label.fs-plugin-title{background:rgba(0,0,0,0.3);color:#fff;padding:2px 10px;position:absolute;top:100%;bottom:auto;right:auto;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;left:10px;font-size:12px;font-weight:bold;cursor:auto}div.fs-notice.updated,div.fs-notice.success,div.fs-notice.promotion{display:block !important}.rtl .fs-notice .fs-close{float:left}.fs-secure-notice{position:fixed;top:32px;left:160px;right:0;background:#ebfdeb;padding:10px 20px;color:green;z-index:9999;-moz-box-shadow:0 2px 2px rgba(6,113,6,0.3);-webkit-box-shadow:0 2px 2px rgba(6,113,6,0.3);box-shadow:0 2px 2px rgba(6,113,6,0.3);opacity:0.95;filter:alpha(opacity=95)}.fs-secure-notice:hover{opacity:1;filter:alpha(opacity=100)}.fs-secure-notice a.fs-security-proof{color:green;text-decoration:none}@media screen and (max-width: 960px){.fs-secure-notice{left:36px}}@media screen and (max-width: 600px){.fs-secure-notice{display:none}}@media screen and (max-width: 500px){#fs_promo_tab{display:none}}@media screen and (max-width: 782px){.fs-secure-notice{left:0;top:46px;text-align:center}}span.fs-submenu-item.fs-sub:before{content:'\21B3';padding:0 5px}.rtl span.fs-submenu-item.fs-sub:before{content:'\21B2'}.fs-submenu-item.pricing.upgrade-mode{color:greenyellow}.fs-submenu-item.pricing.trial-mode{color:#83e2ff}#adminmenu .update-plugins.fs-trial{background-color:#00b9eb}.fs-ajax-spinner{border:0;width:20px;height:20px;margin-right:5px;vertical-align:sub;display:inline-block;background:url("/wp-admin/images/wpspin_light-2x.gif");background-size:contain}.wrap.fs-section h2{text-align:left}.plugins p.fs-upgrade-notice{border:0;background-color:#d54e21;padding:10px;color:#f9f9f9;margin-top:10px}
freemius/assets/css/admin/connect.css CHANGED
@@ -1 +1 @@
1
- #fs_connect{width:480px;-moz-box-shadow:0px 1px 2px rgba(0,0,0,0.3);-webkit-box-shadow:0px 1px 2px rgba(0,0,0,0.3);box-shadow:0px 1px 2px rgba(0,0,0,0.3);margin:20px 0}@media screen and (max-width: 479px){#fs_connect{-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;width:auto;margin:0 0 0 -10px}}#fs_connect .fs-content{background:#fff;padding:15px 20px}#fs_connect .fs-content .fs-error{background:snow;color:#d3135a;border:1px solid #d3135a;-moz-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);text-align:center;padding:5px;margin-bottom:10px}#fs_connect .fs-content p{margin:0;padding:0;font-size:1.2em}#fs_connect .fs-license-key-container{position:relative;width:280px;margin:10px auto 0 auto}#fs_connect .fs-license-key-container input{width:100%}#fs_connect .fs-license-key-container .dashicons{position:absolute;top:5px;right:5px}#fs_connect.require-license-key #sites_list_container td{cursor:pointer}#fs_connect #delegate_to_site_admins{margin-right:15px;float:right;height:26px;vertical-align:middle;line-height:37px;font-weight:bold;border-bottom:1px dashed;text-decoration:none}#fs_connect #delegate_to_site_admins.rtl{margin-left:15px;margin-right:0}#fs_connect .fs-actions{padding:10px 20px;background:#C0C7CA}#fs_connect .fs-actions .button{padding:0 10px 1px;line-height:35px;height:37px;font-size:16px;margin-bottom:0}#fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}#fs_connect .fs-actions .button.button-primary{padding-right:15px;padding-left:15px}#fs_connect .fs-actions .button.button-primary:after{content:' \279C'}#fs_connect .fs-actions .button.button-primary.fs-loading:after{content:''}#fs_connect .fs-actions .button.button-secondary{float:right}#fs_connect.fs-anonymous-disabled .fs-actions .button.button-primary{width:100%}#fs_connect .fs-permissions{padding:10px 20px;background:#FEFEFE;-moz-transition:background 0.5s ease;-o-transition:background 0.5s ease;-ms-transition:background 0.5s ease;-webkit-transition:background 0.5s ease;transition:background 0.5s ease}#fs_connect .fs-permissions .fs-license-sync-disclaimer{text-align:center;margin-top:0}#fs_connect .fs-permissions .fs-trigger{font-size:0.9em;text-decoration:none;text-align:center;display:block}#fs_connect .fs-permissions ul{height:0;overflow:hidden;margin:0}#fs_connect .fs-permissions ul li{margin-bottom:12px}#fs_connect .fs-permissions ul li:last-child{margin-bottom:0}#fs_connect .fs-permissions ul li i.dashicons{float:left;font-size:40px;width:40px;height:40px}#fs_connect .fs-permissions ul li div{margin-left:55px}#fs_connect .fs-permissions ul li div span{font-weight:bold;text-transform:uppercase;color:#23282d}#fs_connect .fs-permissions ul li div p{margin:2px 0 0 0}#fs_connect .fs-permissions.fs-open{background:#fff}#fs_connect .fs-permissions.fs-open ul{height:auto;margin:20px 20px 10px 20px}@media screen and (max-width: 479px){#fs_connect .fs-permissions{background:#fff}#fs_connect .fs-permissions .fs-trigger{display:none}#fs_connect .fs-permissions ul{height:auto;margin:20px}}#fs_connect .fs-freemium-licensing{padding:8px;background:#777;color:#fff}#fs_connect .fs-freemium-licensing p{text-align:center;display:block;margin:0;padding:0}#fs_connect .fs-freemium-licensing a{color:#C2EEFF;text-decoration:underline}#fs_connect .fs-visual{padding:12px;line-height:0;background:#fafafa;height:80px;position:relative}#fs_connect .fs-visual .fs-site-icon{position:absolute;left:20px;top:10px}#fs_connect .fs-visual .fs-connect-logo{position:absolute;right:20px;top:10px}#fs_connect .fs-visual .fs-plugin-icon{position:absolute;top:10px;left:50%;margin-left:-40px}#fs_connect .fs-visual .fs-plugin-icon,#fs_connect .fs-visual .fs-site-icon,#fs_connect .fs-visual img,#fs_connect .fs-visual object{width:80px;height:80px}#fs_connect .fs-visual .dashicons-wordpress{font-size:64px;background:#01749a;color:#fff;width:64px;height:64px;padding:8px}#fs_connect .fs-visual .dashicons-plus{position:absolute;top:50%;font-size:30px;margin-top:-10px;color:#bbb}#fs_connect .fs-visual .dashicons-plus.fs-first{left:28%}#fs_connect .fs-visual .dashicons-plus.fs-second{left:65%}#fs_connect .fs-visual .fs-plugin-icon,#fs_connect .fs-visual .fs-connect-logo,#fs_connect .fs-visual .fs-site-icon{border:1px solid #ccc;padding:1px;background:#fff}#fs_connect .fs-terms{text-align:center;font-size:0.85em;padding:5px;background:rgba(0,0,0,0.05)}#fs_connect .fs-terms,#fs_connect .fs-terms a{color:#999}#fs_connect .fs-terms a{text-decoration:none}#multisite_options_container{margin-top:10px;border:1px solid #ccc;padding:5px}#multisite_options_container a{text-decoration:none}#multisite_options_container a:focus{box-shadow:none}#multisite_options_container a.selected{font-weight:bold}#multisite_options_container.apply-on-all-sites{border:0 none;padding:0}#multisite_options_container.apply-on-all-sites #all_sites_options{border-spacing:0}#multisite_options_container.apply-on-all-sites #all_sites_options td:not(:first-child){display:none}#multisite_options_container #sites_list_container{display:none;overflow:auto}#multisite_options_container #sites_list_container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-tooltip-trigger{position:relative}.fs-tooltip-trigger:not(a){cursor:help}.fs-tooltip-trigger .fs-tooltip{opacity:0;visibility:hidden;-moz-transition:opacity 0.3s ease-in-out;-o-transition:opacity 0.3s ease-in-out;-ms-transition:opacity 0.3s ease-in-out;-webkit-transition:opacity 0.3s ease-in-out;transition:opacity 0.3s ease-in-out;position:absolute;background:rgba(0,0,0,0.8);color:#fff;font-family:'arial', serif;font-size:12px;padding:10px;z-index:999999;bottom:100%;margin-bottom:5px;left:0;right:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);line-height:1.3em;font-weight:bold;text-align:left}.rtl .fs-tooltip-trigger .fs-tooltip{text-align:right}.fs-tooltip-trigger .fs-tooltip::after{content:' ';display:block;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:rgba(0,0,0,0.8) transparent transparent transparent;position:absolute;top:100%;left:21px}.rtl .fs-tooltip-trigger .fs-tooltip::after{right:21px;left:auto}.fs-tooltip-trigger:hover .fs-tooltip{visibility:visible;opacity:1}#fs_marketing_optin{display:none;margin-top:10px;border:1px solid #ccc;padding:10px;line-height:1.5em}#fs_marketing_optin .fs-message{display:block;margin-bottom:5px;font-size:1.05em;font-weight:600}#fs_marketing_optin.error{border:1px solid #d3135a;background:#fee}#fs_marketing_optin.error .fs-message{color:#d3135a}#fs_marketing_optin .fs-input-container{margin-top:5px}#fs_marketing_optin .fs-input-container label{margin-top:5px;display:block}#fs_marketing_optin .fs-input-container label input{float:left;margin:1px 0 0 0}#fs_marketing_optin .fs-input-container label:first-child{display:block;margin-bottom:2px}#fs_marketing_optin .fs-input-label{display:block;margin-left:20px}#fs_marketing_optin .fs-input-label .underlined{text-decoration:underline}.rtl #fs_marketing_optin .fs-input-container label input{float:right}.rtl #fs_marketing_optin .fs-input-label{margin-left:0;margin-right:20px}.rtl #fs_connect .fs-actions{padding:10px 20px;background:#C0C7CA}.rtl #fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}.rtl #fs_connect .fs-actions .button.button-primary:after{content:' \000bb'}.rtl #fs_connect .fs-actions .button.button-primary.fs-loading:after{content:''}.rtl #fs_connect .fs-actions .button.button-secondary{float:left}.rtl #fs_connect .fs-permissions ul li div{margin-right:55px;margin-left:0}.rtl #fs_connect .fs-permissions ul li i.dashicons{float:right}.rtl #fs_connect .fs-visual .fs-site-icon{right:20px;left:auto}.rtl #fs_connect .fs-visual .fs-connect-logo{right:auto;left:20px}#fs_theme_connect_wrapper{position:fixed;top:0;height:100%;width:100%;z-index:99990;background:rgba(0,0,0,0.75);text-align:center;overflow-y:auto}#fs_theme_connect_wrapper:before{content:"";display:inline-block;vertical-align:middle;height:100%}#fs_theme_connect_wrapper>button.close{color:white;cursor:pointer;height:40px;width:40px;position:absolute;right:0;border:0;background-color:transparent;top:32px}#fs_theme_connect_wrapper #fs_connect{top:0;text-align:left;display:inline-block;vertical-align:middle;margin-top:52px;margin-bottom:20px}#fs_theme_connect_wrapper #fs_connect .fs-terms{background:rgba(140,140,140,0.64)}#fs_theme_connect_wrapper #fs_connect .fs-terms,#fs_theme_connect_wrapper #fs_connect .fs-terms a{color:#c5c5c5}.wp-pointer-content #fs_connect{margin:0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.fs-opt-in-pointer .wp-pointer-content{padding:0}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow{border-bottom-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow-inner{border-bottom-color:#fafafa}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow{border-top-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow-inner{border-top-color:#fafafa}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow{border-right-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow-inner{border-right-color:#fafafa}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow{border-left-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow-inner{border-left-color:#fafafa}
1
+ #fs_connect{width:480px;-moz-box-shadow:0px 1px 2px rgba(0,0,0,0.3);-webkit-box-shadow:0px 1px 2px rgba(0,0,0,0.3);box-shadow:0px 1px 2px rgba(0,0,0,0.3);margin:20px 0}@media screen and (max-width: 479px){#fs_connect{-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;width:auto;margin:0 0 0 -10px}}#fs_connect .fs-content{background:#fff;padding:15px 20px}#fs_connect .fs-content .fs-error{background:snow;color:#d3135a;border:1px solid #d3135a;-moz-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);text-align:center;padding:5px;margin-bottom:10px}#fs_connect .fs-content p{margin:0;padding:0;font-size:1.2em}#fs_connect .fs-license-key-container{position:relative;width:280px;margin:10px auto 0 auto}#fs_connect .fs-license-key-container input{width:100%}#fs_connect .fs-license-key-container .dashicons{position:absolute;top:5px;right:5px}#fs_connect.require-license-key .fs-sites-list-container td{cursor:pointer}#fs_connect #delegate_to_site_admins{margin-right:15px;float:right;height:26px;vertical-align:middle;line-height:37px;font-weight:bold;border-bottom:1px dashed;text-decoration:none}#fs_connect #delegate_to_site_admins.rtl{margin-left:15px;margin-right:0}#fs_connect .fs-actions{padding:10px 20px;background:#C0C7CA}#fs_connect .fs-actions .button{padding:0 10px 1px;line-height:35px;height:37px;font-size:16px;margin-bottom:0}#fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}#fs_connect .fs-actions .button.button-primary{padding-right:15px;padding-left:15px}#fs_connect .fs-actions .button.button-primary:after{content:' \279C'}#fs_connect .fs-actions .button.button-primary.fs-loading:after{content:''}#fs_connect .fs-actions .button.button-secondary{float:right}#fs_connect.fs-anonymous-disabled .fs-actions .button.button-primary{width:100%}#fs_connect .fs-permissions{padding:10px 20px;background:#FEFEFE;-moz-transition:background 0.5s ease;-o-transition:background 0.5s ease;-ms-transition:background 0.5s ease;-webkit-transition:background 0.5s ease;transition:background 0.5s ease}#fs_connect .fs-permissions .fs-license-sync-disclaimer{text-align:center;margin-top:0}#fs_connect .fs-permissions .fs-trigger{font-size:0.9em;text-decoration:none;text-align:center;display:block}#fs_connect .fs-permissions ul{height:0;overflow:hidden;margin:0}#fs_connect .fs-permissions ul li{margin-bottom:12px}#fs_connect .fs-permissions ul li:last-child{margin-bottom:0}#fs_connect .fs-permissions ul li i.dashicons{float:left;font-size:40px;width:40px;height:40px}#fs_connect .fs-permissions ul li div{margin-left:55px}#fs_connect .fs-permissions ul li div span{font-weight:bold;text-transform:uppercase;color:#23282d}#fs_connect .fs-permissions ul li div p{margin:2px 0 0 0}#fs_connect .fs-permissions.fs-open{background:#fff}#fs_connect .fs-permissions.fs-open ul{height:auto;margin:20px 20px 10px 20px}@media screen and (max-width: 479px){#fs_connect .fs-permissions{background:#fff}#fs_connect .fs-permissions .fs-trigger{display:none}#fs_connect .fs-permissions ul{height:auto;margin:20px}}#fs_connect .fs-freemium-licensing{padding:8px;background:#777;color:#fff}#fs_connect .fs-freemium-licensing p{text-align:center;display:block;margin:0;padding:0}#fs_connect .fs-freemium-licensing a{color:#C2EEFF;text-decoration:underline}#fs_connect .fs-visual{padding:12px;line-height:0;background:#fafafa;height:80px;position:relative}#fs_connect .fs-visual .fs-site-icon{position:absolute;left:20px;top:10px}#fs_connect .fs-visual .fs-connect-logo{position:absolute;right:20px;top:10px}#fs_connect .fs-visual .fs-plugin-icon{position:absolute;top:10px;left:50%;margin-left:-40px}#fs_connect .fs-visual .fs-plugin-icon,#fs_connect .fs-visual .fs-site-icon,#fs_connect .fs-visual img,#fs_connect .fs-visual object{width:80px;height:80px}#fs_connect .fs-visual .dashicons-wordpress{font-size:64px;background:#01749a;color:#fff;width:64px;height:64px;padding:8px}#fs_connect .fs-visual .dashicons-plus{position:absolute;top:50%;font-size:30px;margin-top:-10px;color:#bbb}#fs_connect .fs-visual .dashicons-plus.fs-first{left:28%}#fs_connect .fs-visual .dashicons-plus.fs-second{left:65%}#fs_connect .fs-visual .fs-plugin-icon,#fs_connect .fs-visual .fs-connect-logo,#fs_connect .fs-visual .fs-site-icon{border:1px solid #ccc;padding:1px;background:#fff}#fs_connect .fs-terms{text-align:center;font-size:0.85em;padding:5px;background:rgba(0,0,0,0.05)}#fs_connect .fs-terms,#fs_connect .fs-terms a{color:#999}#fs_connect .fs-terms a{text-decoration:none}.fs-multisite-options-container{margin-top:10px;border:1px solid #ccc;padding:5px}.fs-multisite-options-container a{text-decoration:none}.fs-multisite-options-container a:focus{box-shadow:none}.fs-multisite-options-container a.selected{font-weight:bold}.fs-multisite-options-container.fs-apply-on-all-sites{border:0 none;padding:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options{border-spacing:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options td:not(:first-child){display:none}.fs-multisite-options-container .fs-sites-list-container{display:none;overflow:auto}.fs-multisite-options-container .fs-sites-list-container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-tooltip-trigger{position:relative}.fs-tooltip-trigger:not(a){cursor:help}.fs-tooltip-trigger .fs-tooltip{opacity:0;visibility:hidden;-moz-transition:opacity 0.3s ease-in-out;-o-transition:opacity 0.3s ease-in-out;-ms-transition:opacity 0.3s ease-in-out;-webkit-transition:opacity 0.3s ease-in-out;transition:opacity 0.3s ease-in-out;position:absolute;background:rgba(0,0,0,0.8);color:#fff;font-family:'arial', serif;font-size:12px;padding:10px;z-index:999999;bottom:100%;margin-bottom:5px;left:0;right:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);line-height:1.3em;font-weight:bold;text-align:left}.rtl .fs-tooltip-trigger .fs-tooltip{text-align:right}.fs-tooltip-trigger .fs-tooltip::after{content:' ';display:block;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:rgba(0,0,0,0.8) transparent transparent transparent;position:absolute;top:100%;left:21px}.rtl .fs-tooltip-trigger .fs-tooltip::after{right:21px;left:auto}.fs-tooltip-trigger:hover .fs-tooltip{visibility:visible;opacity:1}#fs_marketing_optin{display:none;margin-top:10px;border:1px solid #ccc;padding:10px;line-height:1.5em}#fs_marketing_optin .fs-message{display:block;margin-bottom:5px;font-size:1.05em;font-weight:600}#fs_marketing_optin.error{border:1px solid #d3135a;background:#fee}#fs_marketing_optin.error .fs-message{color:#d3135a}#fs_marketing_optin .fs-input-container{margin-top:5px}#fs_marketing_optin .fs-input-container label{margin-top:5px;display:block}#fs_marketing_optin .fs-input-container label input{float:left;margin:1px 0 0 0}#fs_marketing_optin .fs-input-container label:first-child{display:block;margin-bottom:2px}#fs_marketing_optin .fs-input-label{display:block;margin-left:20px}#fs_marketing_optin .fs-input-label .underlined{text-decoration:underline}.rtl #fs_marketing_optin .fs-input-container label input{float:right}.rtl #fs_marketing_optin .fs-input-label{margin-left:0;margin-right:20px}.rtl #fs_connect .fs-actions{padding:10px 20px;background:#C0C7CA}.rtl #fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}.rtl #fs_connect .fs-actions .button.button-primary:after{content:' \000bb'}.rtl #fs_connect .fs-actions .button.button-primary.fs-loading:after{content:''}.rtl #fs_connect .fs-actions .button.button-secondary{float:left}.rtl #fs_connect .fs-permissions ul li div{margin-right:55px;margin-left:0}.rtl #fs_connect .fs-permissions ul li i.dashicons{float:right}.rtl #fs_connect .fs-visual .fs-site-icon{right:20px;left:auto}.rtl #fs_connect .fs-visual .fs-connect-logo{right:auto;left:20px}#fs_theme_connect_wrapper{position:fixed;top:0;height:100%;width:100%;z-index:99990;background:rgba(0,0,0,0.75);text-align:center;overflow-y:auto}#fs_theme_connect_wrapper:before{content:"";display:inline-block;vertical-align:middle;height:100%}#fs_theme_connect_wrapper>button.close{color:white;cursor:pointer;height:40px;width:40px;position:absolute;right:0;border:0;background-color:transparent;top:32px}#fs_theme_connect_wrapper #fs_connect{top:0;text-align:left;display:inline-block;vertical-align:middle;margin-top:52px;margin-bottom:20px}#fs_theme_connect_wrapper #fs_connect .fs-terms{background:rgba(140,140,140,0.64)}#fs_theme_connect_wrapper #fs_connect .fs-terms,#fs_theme_connect_wrapper #fs_connect .fs-terms a{color:#c5c5c5}.wp-pointer-content #fs_connect{margin:0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.fs-opt-in-pointer .wp-pointer-content{padding:0}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow{border-bottom-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow-inner{border-bottom-color:#fafafa}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow{border-top-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow-inner{border-top-color:#fafafa}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow{border-right-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow-inner{border-right-color:#fafafa}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow{border-left-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow-inner{border-left-color:#fafafa}
freemius/assets/css/admin/dialog-boxes.css CHANGED
@@ -1,2 +1,2 @@
1
- .fs-modal{position:fixed;overflow:auto;height:100%;width:100%;top:0;z-index:100000;display:none;background:rgba(0,0,0,0.6)}.fs-modal .fs-modal-dialog{background:transparent;position:absolute;left:50%;margin-left:-298px;padding-bottom:30px;top:-100%;z-index:100001;width:596px}@media (max-width: 650px){.fs-modal .fs-modal-dialog{margin-left:-50%;box-sizing:border-box;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}}.fs-modal.active{display:block}.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal.fs-success .fs-modal-header{border-bottom-color:#46b450}.fs-modal.fs-success .fs-modal-body{background-color:#f7fff7}.fs-modal.fs-warn .fs-modal-header{border-bottom-color:#ffb900}.fs-modal.fs-warn .fs-modal-body{background-color:#fff8e5}.fs-modal.fs-error .fs-modal-header{border-bottom-color:#dc3232}.fs-modal.fs-error .fs-modal-body{background-color:#ffeaea}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{border:0;background:#fefefe;padding:20px}.fs-modal .fs-modal-header{border-bottom:#eeeeee solid 1px;background:#fbfbfb;padding:15px 20px;position:relative;margin-bottom:-10px}.fs-modal .fs-modal-header h4{margin:0;padding:0;text-transform:uppercase;font-size:1.2em;font-weight:bold;color:#cacaca;text-shadow:1px 1px 1px #fff;letter-spacing:0.6px;-webkit-font-smoothing:antialiased}.fs-modal .fs-modal-header .fs-close{position:absolute;right:10px;top:12px;cursor:pointer;color:#bbb;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;padding:3px;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.fs-modal .fs-modal-header .fs-close:hover{color:#fff;background:#aaa}.fs-modal .fs-modal-header .fs-close .dashicons,.fs-modal .fs-modal-header .fs-close:hover .dashicons{text-decoration:none}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px;line-height:1.5em}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-weight:bold;font-size:20px;margin-top:0}.fs-modal .fs-modal-footer{border-top:#eeeeee solid 1px;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:first-child{margin:0}.fs-modal .fs-modal-panel>.notice.inline{margin:0;display:none}.fs-modal .fs-modal-panel:not(.active){display:none}.rtl .fs-modal .fs-modal-header .fs-close{right:auto;left:20px}body.has-fs-modal{overflow:hidden}.fs-modal.fs-modal-deactivation-feedback .reason-input,.fs-modal.fs-modal-deactivation-feedback .internal-message{margin:3px 0 3px 22px}.fs-modal.fs-modal-deactivation-feedback .reason-input input,.fs-modal.fs-modal-deactivation-feedback .reason-input textarea,.fs-modal.fs-modal-deactivation-feedback .internal-message input,.fs-modal.fs-modal-deactivation-feedback .internal-message textarea{width:100%}.fs-modal.fs-modal-deactivation-feedback li.reason.has-internal-message .internal-message{border:1px solid #ccc;padding:7px;display:none}@media (max-width: 650px){.fs-modal.fs-modal-deactivation-feedback li.reason li.reason{margin-bottom:10px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .reason-input,.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .internal-message{margin-left:29px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label{display:table}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label>span{display:table-cell;font-size:1.3em}}.fs-modal.fs-modal-deactivation-feedback .anonymous-feedback-label{float:left}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel{margin-top:0 !important}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel h3{margin-top:0;line-height:1.5em}#the-list .deactivate>.fs-slug{display:none}.fs-modal.fs-modal-subscription-cancellation .fs-price-increase-warning{color:red;font-weight:bold;padding:0 25px;margin-bottom:0}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:left;top:5px;position:relative}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:right}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{display:block;margin-left:24px}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{margin-left:0;margin-right:24px}.fs-modal.fs-modal-license-activation .fs-modal-body input.license_key{width:100%}#license_options_container table,#license_options_container table select,#license_options_container table #available_license_key{width:100%}#license_options_container table td:first-child{width:1%}#license_options_container table #other_license_key_container label{position:relative;top:6px;float:left;margin-right:5px}#license_options_container table #other_license_key_container div{overflow:hidden;width:auto;height:30px;display:block;top:2px;position:relative}#license_options_container table #other_license_key_container div input{margin:0}#sites_list_container td{cursor:pointer}#multisite_options_container{margin-top:10px;border:1px solid #ccc;padding:5px}#multisite_options_container a{text-decoration:none}#multisite_options_container a:focus{box-shadow:none}#multisite_options_container a.selected{font-weight:bold}#multisite_options_container.apply-on-all-sites{border:0 none;padding:0}#multisite_options_container.apply-on-all-sites #all_sites_options{border-spacing:0}#multisite_options_container.apply-on-all-sites #all_sites_options td:not(:first-child){display:none}#multisite_options_container #sites_list_container{display:none;overflow:auto}#multisite_options_container #sites_list_container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-modal.fs-modal-license-key-resend .email-address-container{overflow:hidden;padding-right:2px}.fs-modal.fs-modal-license-key-resend.fs-freemium input.email-address{width:300px}.fs-modal.fs-modal-license-key-resend.fs-freemium label{display:block;margin-bottom:10px}.fs-modal.fs-modal-license-key-resend.fs-premium input.email-address{width:100%}.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{float:right;margin-left:7px}@media (max-width: 650px){.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{margin-top:2px}}
2
  .rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{padding-left:2px;padding-right:0}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:left;margin-right:7px;margin-left:0}a.show-license-resend-modal{margin-top:4px;display:inline-block}.fs-ajax-loader{position:relative;width:170px;height:20px;margin:auto}.fs-ajax-loader .fs-ajax-loader-bar{position:absolute;top:0;background-color:#0074a3;width:20px;height:20px;-webkit-animation-name:bounce_ajaxLoader;-moz-animation-name:bounce_ajaxLoader;-ms-animation-name:bounce_ajaxLoader;-o-animation-name:bounce_ajaxLoader;animation-name:bounce_ajaxLoader;-webkit-animation-duration:1.5s;-moz-animation-duration:1.5s;-ms-animation-duration:1.5s;-o-animation-duration:1.5s;animation-duration:1.5s;animation-iteration-count:infinite;-o-animation-iteration-count:infinite;-ms-animation-iteration-count:infinite;-webkit-animation-iteration-count:infinite;-moz-animation-iteration-count:infinite;-webkit-animation-direction:normal;-moz-animation-direction:normal;-ms-animation-direction:normal;-o-animation-direction:normal;animation-direction:normal;-moz-transform:0.3;-o-transform:0.3;-ms-transform:0.3;-webkit-transform:0.3;transform:0.3}.fs-ajax-loader .fs-ajax-loader-bar-1{left:0px;animation-delay:0.6s;-o-animation-delay:0.6s;-ms-animation-delay:0.6s;-webkit-animation-delay:0.6s;-moz-animation-delay:0.6s}.fs-ajax-loader .fs-ajax-loader-bar-2{left:19px;animation-delay:0.75s;-o-animation-delay:0.75s;-ms-animation-delay:0.75s;-webkit-animation-delay:0.75s;-moz-animation-delay:0.75s}.fs-ajax-loader .fs-ajax-loader-bar-3{left:38px;animation-delay:0.9s;-o-animation-delay:0.9s;-ms-animation-delay:0.9s;-webkit-animation-delay:0.9s;-moz-animation-delay:0.9s}.fs-ajax-loader .fs-ajax-loader-bar-4{left:57px;animation-delay:1.05s;-o-animation-delay:1.05s;-ms-animation-delay:1.05s;-webkit-animation-delay:1.05s;-moz-animation-delay:1.05s}.fs-ajax-loader .fs-ajax-loader-bar-5{left:76px;animation-delay:1.2s;-o-animation-delay:1.2s;-ms-animation-delay:1.2s;-webkit-animation-delay:1.2s;-moz-animation-delay:1.2s}.fs-ajax-loader .fs-ajax-loader-bar-6{left:95px;animation-delay:1.35s;-o-animation-delay:1.35s;-ms-animation-delay:1.35s;-webkit-animation-delay:1.35s;-moz-animation-delay:1.35s}.fs-ajax-loader .fs-ajax-loader-bar-7{left:114px;animation-delay:1.5s;-o-animation-delay:1.5s;-ms-animation-delay:1.5s;-webkit-animation-delay:1.5s;-moz-animation-delay:1.5s}.fs-ajax-loader .fs-ajax-loader-bar-8{left:133px;animation-delay:1.65s;-o-animation-delay:1.65s;-ms-animation-delay:1.65s;-webkit-animation-delay:1.65s;-moz-animation-delay:1.65s}@-moz-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-ms-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-o-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-webkit-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}.fs-modal-auto-install #request-filesystem-credentials-form h2,.fs-modal-auto-install #request-filesystem-credentials-form .request-filesystem-credentials-action-buttons{display:none}.fs-modal-auto-install #request-filesystem-credentials-form input[type=password],.fs-modal-auto-install #request-filesystem-credentials-form input[type=email],.fs-modal-auto-install #request-filesystem-credentials-form input[type=text]{-webkit-appearance:none;padding:10px 10px 5px 10px;width:300px;max-width:100%}.fs-modal-auto-install #request-filesystem-credentials-form>div,.fs-modal-auto-install #request-filesystem-credentials-form label,.fs-modal-auto-install #request-filesystem-credentials-form fieldset{width:300px;max-width:100%;margin:0 auto;display:block}.button-primary.warn{box-shadow:0 1px 0 #d2593c;text-shadow:0 -1px 1px #d2593c,1px 0 1px #d2593c,0 1px 1px #d2593c,-1px 0 1px #d2593c;background:#f56a48;border-color:#ec6544 #d2593c #d2593c}.button-primary.warn:hover{background:#fd6d4a;border-color:#d2593c}.button-primary.warn:focus{box-shadow:0 1px 0 #dd6041,0 0 2px 1px #e4a796}.button-primary.warn:active{background:#dd6041;border-color:#d2593c;box-shadow:inset 0 2px 0 #d2593c}.button-primary.warn.disabled{color:#f5b3a1 !important;background:#e76444 !important;border-color:#d85e40 !important;text-shadow:0 -1px 0 rgba(0,0,0,0.1) !important}
1
+ .fs-modal{position:fixed;overflow:auto;height:100%;width:100%;top:0;z-index:100000;display:none;background:rgba(0,0,0,0.6)}.fs-modal .fs-modal-dialog{background:transparent;position:absolute;left:50%;margin-left:-298px;padding-bottom:30px;top:-100%;z-index:100001;width:596px}@media (max-width: 650px){.fs-modal .fs-modal-dialog{margin-left:-50%;box-sizing:border-box;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}}.fs-modal.active{display:block}.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal.fs-success .fs-modal-header{border-bottom-color:#46b450}.fs-modal.fs-success .fs-modal-body{background-color:#f7fff7}.fs-modal.fs-warn .fs-modal-header{border-bottom-color:#ffb900}.fs-modal.fs-warn .fs-modal-body{background-color:#fff8e5}.fs-modal.fs-error .fs-modal-header{border-bottom-color:#dc3232}.fs-modal.fs-error .fs-modal-body{background-color:#ffeaea}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{border:0;background:#fefefe;padding:20px}.fs-modal .fs-modal-header{border-bottom:#eeeeee solid 1px;background:#fbfbfb;padding:15px 20px;position:relative;margin-bottom:-10px}.fs-modal .fs-modal-header h4{margin:0;padding:0;text-transform:uppercase;font-size:1.2em;font-weight:bold;color:#cacaca;text-shadow:1px 1px 1px #fff;letter-spacing:0.6px;-webkit-font-smoothing:antialiased}.fs-modal .fs-modal-header .fs-close{position:absolute;right:10px;top:12px;cursor:pointer;color:#bbb;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;padding:3px;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.fs-modal .fs-modal-header .fs-close:hover{color:#fff;background:#aaa}.fs-modal .fs-modal-header .fs-close .dashicons,.fs-modal .fs-modal-header .fs-close:hover .dashicons{text-decoration:none}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px;line-height:1.5em}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-weight:bold;font-size:20px;margin-top:0}.fs-modal .fs-modal-footer{border-top:#eeeeee solid 1px;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:first-child{margin:0}.fs-modal .fs-modal-panel>.notice.inline{margin:0;display:none}.fs-modal .fs-modal-panel:not(.active){display:none}.rtl .fs-modal .fs-modal-header .fs-close{right:auto;left:20px}body.has-fs-modal{overflow:hidden}.fs-modal.fs-modal-deactivation-feedback .reason-input,.fs-modal.fs-modal-deactivation-feedback .internal-message{margin:3px 0 3px 22px}.fs-modal.fs-modal-deactivation-feedback .reason-input input,.fs-modal.fs-modal-deactivation-feedback .reason-input textarea,.fs-modal.fs-modal-deactivation-feedback .internal-message input,.fs-modal.fs-modal-deactivation-feedback .internal-message textarea{width:100%}.fs-modal.fs-modal-deactivation-feedback li.reason.has-internal-message .internal-message{border:1px solid #ccc;padding:7px;display:none}@media (max-width: 650px){.fs-modal.fs-modal-deactivation-feedback li.reason li.reason{margin-bottom:10px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .reason-input,.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .internal-message{margin-left:29px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label{display:table}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label>span{display:table-cell;font-size:1.3em}}.fs-modal.fs-modal-deactivation-feedback .anonymous-feedback-label{float:left}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel{margin-top:0 !important}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel h3{margin-top:0;line-height:1.5em}#the-list .deactivate>.fs-slug{display:none}.fs-modal.fs-modal-subscription-cancellation .fs-price-increase-warning{color:red;font-weight:bold;padding:0 25px;margin-bottom:0}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:left;top:5px;position:relative}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:right}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{display:block;margin-left:24px}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{margin-left:0;margin-right:24px}.fs-modal.fs-modal-license-activation .fs-modal-body input.fs-license-key{width:100%}.fs-license-options-container table,.fs-license-options-container table select,.fs-license-options-container table .fs-available-license-key{width:100%}.fs-license-options-container table td:first-child{width:1%}.fs-license-options-container table .fs-other-license-key-container label{position:relative;top:6px;float:left;margin-right:5px}.fs-license-options-container table .fs-other-license-key-container div{overflow:hidden;width:auto;height:30px;display:block;top:2px;position:relative}.fs-license-options-container table .fs-other-license-key-container div input{margin:0}.fs-sites-list-container td{cursor:pointer}.fs-multisite-options-container{margin-top:10px;border:1px solid #ccc;padding:5px}.fs-multisite-options-container a{text-decoration:none}.fs-multisite-options-container a:focus{box-shadow:none}.fs-multisite-options-container a.selected{font-weight:bold}.fs-multisite-options-container.fs-apply-on-all-sites{border:0 none;padding:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options{border-spacing:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options td:not(:first-child){display:none}.fs-multisite-options-container .fs-sites-list-container{display:none;overflow:auto}.fs-multisite-options-container .fs-sites-list-container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-modal.fs-modal-license-key-resend .email-address-container{overflow:hidden;padding-right:2px}.fs-modal.fs-modal-license-key-resend.fs-freemium input.email-address{width:300px}.fs-modal.fs-modal-license-key-resend.fs-freemium label{display:block;margin-bottom:10px}.fs-modal.fs-modal-license-key-resend.fs-premium input.email-address{width:100%}.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{float:right;margin-left:7px}@media (max-width: 650px){.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{margin-top:2px}}
2
  .rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{padding-left:2px;padding-right:0}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:left;margin-right:7px;margin-left:0}a.show-license-resend-modal{margin-top:4px;display:inline-block}.fs-ajax-loader{position:relative;width:170px;height:20px;margin:auto}.fs-ajax-loader .fs-ajax-loader-bar{position:absolute;top:0;background-color:#0074a3;width:20px;height:20px;-webkit-animation-name:bounce_ajaxLoader;-moz-animation-name:bounce_ajaxLoader;-ms-animation-name:bounce_ajaxLoader;-o-animation-name:bounce_ajaxLoader;animation-name:bounce_ajaxLoader;-webkit-animation-duration:1.5s;-moz-animation-duration:1.5s;-ms-animation-duration:1.5s;-o-animation-duration:1.5s;animation-duration:1.5s;animation-iteration-count:infinite;-o-animation-iteration-count:infinite;-ms-animation-iteration-count:infinite;-webkit-animation-iteration-count:infinite;-moz-animation-iteration-count:infinite;-webkit-animation-direction:normal;-moz-animation-direction:normal;-ms-animation-direction:normal;-o-animation-direction:normal;animation-direction:normal;-moz-transform:0.3;-o-transform:0.3;-ms-transform:0.3;-webkit-transform:0.3;transform:0.3}.fs-ajax-loader .fs-ajax-loader-bar-1{left:0px;animation-delay:0.6s;-o-animation-delay:0.6s;-ms-animation-delay:0.6s;-webkit-animation-delay:0.6s;-moz-animation-delay:0.6s}.fs-ajax-loader .fs-ajax-loader-bar-2{left:19px;animation-delay:0.75s;-o-animation-delay:0.75s;-ms-animation-delay:0.75s;-webkit-animation-delay:0.75s;-moz-animation-delay:0.75s}.fs-ajax-loader .fs-ajax-loader-bar-3{left:38px;animation-delay:0.9s;-o-animation-delay:0.9s;-ms-animation-delay:0.9s;-webkit-animation-delay:0.9s;-moz-animation-delay:0.9s}.fs-ajax-loader .fs-ajax-loader-bar-4{left:57px;animation-delay:1.05s;-o-animation-delay:1.05s;-ms-animation-delay:1.05s;-webkit-animation-delay:1.05s;-moz-animation-delay:1.05s}.fs-ajax-loader .fs-ajax-loader-bar-5{left:76px;animation-delay:1.2s;-o-animation-delay:1.2s;-ms-animation-delay:1.2s;-webkit-animation-delay:1.2s;-moz-animation-delay:1.2s}.fs-ajax-loader .fs-ajax-loader-bar-6{left:95px;animation-delay:1.35s;-o-animation-delay:1.35s;-ms-animation-delay:1.35s;-webkit-animation-delay:1.35s;-moz-animation-delay:1.35s}.fs-ajax-loader .fs-ajax-loader-bar-7{left:114px;animation-delay:1.5s;-o-animation-delay:1.5s;-ms-animation-delay:1.5s;-webkit-animation-delay:1.5s;-moz-animation-delay:1.5s}.fs-ajax-loader .fs-ajax-loader-bar-8{left:133px;animation-delay:1.65s;-o-animation-delay:1.65s;-ms-animation-delay:1.65s;-webkit-animation-delay:1.65s;-moz-animation-delay:1.65s}@-moz-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-ms-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-o-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-webkit-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}.fs-modal-auto-install #request-filesystem-credentials-form h2,.fs-modal-auto-install #request-filesystem-credentials-form .request-filesystem-credentials-action-buttons{display:none}.fs-modal-auto-install #request-filesystem-credentials-form input[type=password],.fs-modal-auto-install #request-filesystem-credentials-form input[type=email],.fs-modal-auto-install #request-filesystem-credentials-form input[type=text]{-webkit-appearance:none;padding:10px 10px 5px 10px;width:300px;max-width:100%}.fs-modal-auto-install #request-filesystem-credentials-form>div,.fs-modal-auto-install #request-filesystem-credentials-form label,.fs-modal-auto-install #request-filesystem-credentials-form fieldset{width:300px;max-width:100%;margin:0 auto;display:block}.button-primary.warn{box-shadow:0 1px 0 #d2593c;text-shadow:0 -1px 1px #d2593c,1px 0 1px #d2593c,0 1px 1px #d2593c,-1px 0 1px #d2593c;background:#f56a48;border-color:#ec6544 #d2593c #d2593c}.button-primary.warn:hover{background:#fd6d4a;border-color:#d2593c}.button-primary.warn:focus{box-shadow:0 1px 0 #dd6041,0 0 2px 1px #e4a796}.button-primary.warn:active{background:#dd6041;border-color:#d2593c;box-shadow:inset 0 2px 0 #d2593c}.button-primary.warn.disabled{color:#f5b3a1 !important;background:#e76444 !important;border-color:#d85e40 !important;text-shadow:0 -1px 0 rgba(0,0,0,0.1) !important}
freemius/assets/img/buttonizer-floating-action-button.jpg DELETED
Binary file
freemius/assets/img/buttonizer-multifunctional-button.png DELETED
Binary file
freemius/assets/scss/_colors.scss DELETED
@@ -1,79 +0,0 @@
1
- $menu-hover-color: #333;
2
- $darkest-color: #000;
3
- $fms-live-color: #71ae00;
4
- $fms-test-color: #f7941d;
5
- $fms-link-color: #29abe1;
6
- $fms-link-hover-color: darken(#29abe1, 10%);
7
- $body-bkg: #111;
8
- $special-color: #d3135a;
9
- $body-color: #f1f1f1;
10
- $fms-white: #f1f1f1;
11
- $container-bkg: #222;
12
- $container-bkg-odd: #262626;
13
- $container-border-color: #333;
14
- $table-head-bkg: #333;
15
- $table-head-color: #999;
16
- $info-color: #999;
17
- $error-color: #ff0000;
18
-
19
- $fs-logo-blue-color: #29abe1;
20
- $fs-logo-green-color: #71ae00;
21
- $fs-logo-magenta-color: #d3135a;
22
-
23
- // WordPress colors.
24
- $page-header-bkg: #333;
25
- $page-header-color: $fms-white;
26
- $text-dark-color: #333;
27
- $text-light-color: #666;
28
- $text-lightest-color: #999;
29
-
30
- // Notices.
31
- $wp-notice-success-color: #f7fff7;
32
- $wp-notice-success-dark-color: #46b450;
33
- $wp-notice-error-color: #ffeaea;
34
- $wp-notice-error-dark-color: #dc3232;
35
- $wp-notice-warn-color: #fff8e5;
36
- $wp-notice-warn-dark-color: #ffb900;
37
- $fs-notice-promotion-border-color: #00a0d2;
38
- $fs-notice-promotion-bkg: #f2fcff;
39
-
40
- // WP Buttons.
41
- $button-primary-bkg: #6bc406;
42
- $button-primary-color: $fms-white;
43
- $button-secondary-bkg: #333;
44
- $button-secondary-color: $fms-white;
45
- $featured-color: #6bc406;
46
- $wp-selected-color: #0074a3;
47
- $wp-button-alert-border-color: #d2593c;
48
- $wp-button-alert-border-top-color: #ec6544;
49
- $wp-button-alert-shadow-color: #d2593c;
50
- $wp-button-alert-focused-shadow1-color: #dd6041;
51
- $wp-button-alert-focused-shadow2-color: #e4a796;
52
- $wp-button-alert-background-color: #f56a48;
53
- $wp-button-alert-hovered-background-color: #fd6d4a;
54
- $wp-button-alert-active-background-color: #dd6041;
55
- $wp-button-alert-disabled-color: #f5b3a1;
56
- $wp-button-alert-disabled-background-color: #e76444;
57
- $wp-button-alert-disabled-border-color: #d85e40;
58
-
59
- $wordpress_color: #01749A;
60
- $blogger_color: #ff8100;
61
- $wix_color: #fac102;
62
- $shopify_color: #80d100;
63
- $addthis_color: #fe6d4e;
64
- $tumblr_color: #34506b;
65
- $zepo_color: #00baf2;
66
- $jquery_color: #000919;
67
- $javascript_color: #00baf2;
68
- $squarespace_color: #000;
69
-
70
- $blog_color: #ff6600;
71
- $facebook_color: #3b5998;
72
- $twitter_color: #4099ff;
73
- $linkedin_color: #4875b4;
74
- $youtube_color: #ff3333;
75
- $gplus_color: #c63d2d;
76
-
77
- // Tooltip
78
- $tooltip-color: #fff;
79
- $tooltip-bkg-color: rgba(0,0,0,0.8);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
freemius/assets/scss/_functions.scss DELETED
File without changes
freemius/assets/scss/_load.scss DELETED
@@ -1,4 +0,0 @@
1
- @import 'mixins';
2
- @import "vars";
3
- @import "functions";
4
- @import "colors";
 
 
 
 
freemius/assets/scss/_mixins.scss DELETED
@@ -1,270 +0,0 @@
1
- // ---- CSS3 SASS MIXINS ----
2
- // https://github.com/madr/css3-sass-mixins
3
- //
4
- // Copyright (C) 2011 by Anders Ytterström
5
- //
6
- // Permission is hereby granted, free of charge, to any person obtaining a copy
7
- // of this software and associated documentation files (the "Software"), to deal
8
- // in the Software without restriction, including without limitation the rights
9
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- // copies of the Software, and to permit persons to whom the Software is
11
- // furnished to do so, subject to the following conditions:
12
- //
13
- // The above copyright notice and this permission notice shall be included in
14
- // all copies or substantial portions of the Software.
15
- //
16
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
- // THE SOFTWARE.
23
- //
24
-
25
- // ---- LEGACY IE SUPPORT USING FILTERS ----
26
- // Should IE filters be used or not?
27
- // PROS: gradients, drop shadows etc will be handled by css.
28
- // CONS: will harm the site performance badly,
29
- // especially on sites with heavy rendering and scripting.
30
- $useIEFilters: 0;
31
- // might be 0 or 1. disabled by default.
32
- // ---- /LEGACY IE SUPPORT USING FILTERS ----
33
-
34
-
35
- @mixin background-size ($value) {
36
- -webkit-background-size: $value;
37
- background-size: $value;
38
- }
39
-
40
- @mixin border-image ($path, $offsets, $repeats) {
41
- -moz-border-image: $path $offsets $repeats;
42
- -o-border-image: $path $offsets $repeats;
43
- -webkit-border-image: $path $offsets $repeats;
44
- border-image: $path $offsets $repeats;
45
- }
46
-
47
- @mixin border-radius ($values...) {
48
- -moz-border-radius: $values;
49
- -webkit-border-radius: $values;
50
- border-radius: $values;
51
- /*-moz-background-clip: padding;
52
- -webkit-background-clip: padding-box;
53
- background-clip: padding-box;*/
54
- }
55
-
56
- @mixin box-shadow ($values...) {
57
- -moz-box-shadow: $values;
58
- -webkit-box-shadow: $values;
59
- box-shadow: $values;
60
- }
61
-
62
- //@mixin box-shadow ($x, $y, $offset, $hex, $ie: $useIEFilters, $inset: null, $spread:null) {
63
- // -moz-box-shadow: $x $y $offset $spread $hex $inset;
64
- // -webkit-box-shadow: $x $y $offset $spread $hex $inset;
65
- // box-shadow: $x $y $offset $spread $hex $inset;
66
- //
67
- // @if $ie == 1 {
68
- // $iecolor: '#' + red($hex) + green($hex) + blue($hex);
69
- // filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=#{$x}, OffY=#{$y}, Color='#{$iecolor}');
70
- // -ms-filter: quote(progid:DXImageTransform.Microsoft.dropshadow(OffX=#{$x}, OffY=#{$y}, Color='#{$iecolor}'));
71
- // }
72
- //}
73
-
74
- @mixin box-sizing($value) {
75
- -moz-box-sizing: $value;
76
- -webkit-box-sizing: $value;
77
- box-sizing: $value;
78
- }
79
-
80
- // requires sass 3.2
81
- @mixin keyframes($name){
82
- @-moz-keyframes #{$name} { @content; }
83
- @-ms-keyframes #{$name} { @content; }
84
- @-o-keyframes #{$name} { @content; }
85
- @-webkit-keyframes #{$name} { @content; }
86
- @keyframes #{$name} { @content; }
87
- }
88
-
89
- @mixin linear-gradient($from, $to, $ie: $useIEFilters) {
90
- @if $ie != 1 { background-color: $to; }
91
-
92
- background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, $from),color-stop(1, $to));
93
- background-image: -webkit-linear-gradient(top, $from, $to);
94
- background-image: -moz-linear-gradient(top, $from, $to);
95
- background-image: -ms-linear-gradient(top, $from, $to);
96
- background-image: -o-linear-gradient(top, $from, $to);
97
- background-image: linear-gradient(top, bottom, $from, $to);
98
-
99
- @if $ie == 1 {
100
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$from}', endColorstr='#{$to}');
101
- }
102
- }
103
-
104
- @mixin horizontal-gradient($startColor: #555, $endColor: #333, $ie: $useIEFilters) {
105
- @if $ie != 1 { background-color: $endColor; }
106
-
107
- background-color: $endColor;
108
- background-image: -webkit-gradient(linear, 0 0, 100% 0, from($startColor), to($endColor)); // Safari 4+, Chrome 2+
109
- background-image: -webkit-linear-gradient(left, $startColor, $endColor); // Safari 5.1+, Chrome 10+
110
- background-image: -moz-linear-gradient(left, $startColor, $endColor); // FF 3.6+
111
- background-image: -o-linear-gradient(left, $startColor, $endColor); // Opera 11.10
112
- background-image: linear-gradient(to right, $startColor, $endColor); // Standard, IE10
113
- background-repeat: repeat-x;
114
- @if $ie == 1 {
115
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$startColor}', endColorstr='#{$endColor}', GradientType=1);
116
- }
117
- }
118
-
119
- @mixin radial-gradient($from, $to, $ie: $useIEFilters) {
120
- @if $ie != 1 { background-color: $to; }
121
-
122
- background: -moz-radial-gradient(center, circle cover, $from 0%, $to 100%);
123
- background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, $from), color-stop(100%, $to));
124
- background: -webkit-radial-gradient(center, circle cover, $from 0%, $to 100%);
125
- background: -o-radial-gradient(center, circle cover, $from 0%, $to 100%);
126
- background: -ms-radial-gradient(center, circle cover, $from 0%, $to 100%);
127
- background: radial-gradient(center, circle cover, $from 0%, $to 100%);
128
- background-color: $from;
129
-
130
- @if $ie == 1 {
131
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$from}', endColorstr='#{$to}', GradientType=1); /* IE6-9 fallback on horizontal gradient */
132
- }
133
- }
134
-
135
- @mixin perspective($perspective) {
136
- -moz-perspective: $perspective;
137
- -ms-perspective: $perspective;
138
- -webkit-perspective: $perspective;
139
- perspective: $perspective;
140
- -moz-transform-style: preserve-3d;
141
- -ms-transform-style: preserve-3d;
142
- -webkit-transform-style: preserve-3d;
143
- transform-style: preserve-3d;
144
- }
145
-
146
- @mixin transform ($transforms) {
147
- -moz-transform: $transforms;
148
- -o-transform: $transforms;
149
- -ms-transform: $transforms;
150
- -webkit-transform: $transforms;
151
- transform: $transforms;
152
- }
153
-
154
- @mixin matrix ($a, $b, $c, $d, $e, $f) {
155
- -moz-transform: matrix($a, $b, $c, $d, #{$e}px, #{$f}px);
156
- -o-transform: matrix($a, $b, $c, $d, $e, $f);
157
- -ms-transform: matrix($a, $b, $c, $d, $e, $f);
158
- -webkit-transform: matrix($a, $b, $c, $d, $e, $f);
159
- transform: matrix($a, $b, $c, $d, $e, $f);
160
- }
161
-
162
- @mixin rotate ($deg) {
163
- @include transform(rotate(#{$deg}deg));
164
- }
165
-
166
- @mixin scale ($size) {
167
- @include transform(scale(#{$size}));
168
- }
169
-
170
- @mixin translate ($x, $y) {
171
- @include transform(translate($x, $y));
172
- }
173
-
174
- @mixin transition ($value...) {
175
- -moz-transition: $value;
176
- -o-transition: $value;
177
- -ms-transition: $value;
178
- -webkit-transition: $value;
179
- transition: $value;
180
- }
181
-
182
- @mixin animation($str) {
183
- -webkit-animation: #{$str};
184
- -moz-animation: #{$str};
185
- -ms-animation: #{$str};
186
- -o-animation: #{$str};
187
- animation: #{$str};
188
- }
189
-
190
- @mixin animation-name($str) {
191
- -webkit-animation-name: #{$str};
192
- -moz-animation-name: #{$str};
193
- -ms-animation-name: #{$str};
194
- -o-animation-name: #{$str};
195
- animation-name: #{$str};
196
- }
197
-
198
- @mixin animation-duration($str) {
199
- -webkit-animation-duration: #{$str};
200
- -moz-animation-duration: #{$str};
201
- -ms-animation-duration: #{$str};
202
- -o-animation-duration: #{$str};
203
- animation-duration: #{$str};
204
- }
205
-
206
- @mixin animation-direction($str) {
207
- -webkit-animation-direction: #{$str};
208
- -moz-animation-direction: #{$str};
209
- -ms-animation-direction: #{$str};
210
- -o-animation-direction: #{$str};
211
- animation-direction: #{$str};
212
- }
213
-
214
- @mixin animation-delay($str) {
215
- animation-delay:#{$str};
216
- -o-animation-delay:#{$str};
217
- -ms-animation-delay:#{$str};
218
- -webkit-animation-delay:#{$str};
219
- -moz-animation-delay:#{$str};
220
- }
221
-
222
- @mixin animation-iteration-count($str) {
223
- animation-iteration-count:#{$str};
224
- -o-animation-iteration-count:#{$str};
225
- -ms-animation-iteration-count:#{$str};
226
- -webkit-animation-iteration-count:#{$str};
227
- -moz-animation-iteration-count:#{$str};
228
- }
229
-
230
- @mixin animation-timing-function($str) {
231
- -webkit-animation-timing-function: #{$str};
232
- -moz-animation-timing-function: #{$str};
233
- -ms-animation-timing-function: #{$str};
234
- -o-animation-timing-function: #{$str};
235
- animation-timing-function: #{$str};
236
- }
237
-
238
- // ==== /CSS3 SASS MIXINS ====
239
-
240
- @mixin opacity($opacity) {
241
- opacity: $opacity;
242
- $opacity-ie: $opacity * 100;
243
- filter: alpha(opacity=$opacity-ie); //IE8
244
- }
245
-
246
- @mixin size($width, $height: $width)
247
- {
248
- width: $width;
249
- height: $height;
250
- }
251
-
252
- @mixin clearfix
253
- {
254
- &:after {
255
- content: "";
256
- display: table;
257
- clear: both;
258
- }
259
- }
260
-
261
- // Placeholder text
262
- @mixin placeholder($color: $input-color-placeholder) {
263
- // Firefox
264
- &::-moz-placeholder {
265
- color: $color;
266
- opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526
267
- }
268
- &:-ms-input-placeholder { color: $color; } // Internet Explorer 10+
269
- &::-webkit-input-placeholder { color: $color; } // Safari and Chrome
270
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
freemius/assets/scss/_start.scss DELETED
@@ -1,4 +0,0 @@
1
- @import "vars";
2
- @import "colors";
3
- @import "mixins";
4
- @import "functions";
 
 
 
 
freemius/assets/scss/_vars.scss DELETED
@@ -1,6 +0,0 @@
1
- $is_production: true;
2
-
3
- $img_common: if($is_production == true, '//img.freemius.com', 'http://img.freemius:8080');
4
-
5
- $layout_width: 960px;
6
- $admin_mobile_max_width: 782px;
 
 
 
 
 
 
freemius/assets/scss/admin/_ajax-loader.scss DELETED
@@ -1,49 +0,0 @@
1
- $color: $wp-selected-color;
2
- $bkg-color: #fff;
3
- $size: 20;
4
-
5
- .fs-ajax-loader
6
- {
7
- position: relative;
8
- width: #{8*$size + 10}px;
9
- height: #{$size}px;
10
- margin: auto;
11
-
12
- .fs-ajax-loader-bar
13
- {
14
- position: absolute;
15
- top: 0;
16
- background-color: $color;
17
- width: #{$size}px;
18
- height: #{$size}px;
19
- @include animation-name(bounce_ajaxLoader);
20
- @include animation-duration(1.5s);
21
- @include animation-iteration-count(infinite);
22
- @include animation-direction(normal);
23
- @include transform(.3);
24
- }
25
-
26
- @for $i from 0 through 7
27
- {
28
- .fs-ajax-loader-bar-#{$i + 1}
29
- {
30
- left: #{$i*($size - 1)}px;
31
- @include animation-delay(#{0.6 + $i*0.15}s);
32
- }
33
- }
34
- }
35
-
36
- @include keyframes(bounce_ajaxLoader)
37
- {
38
- 0%
39
- {
40
- @include transform(scale(1));
41
- background-color: $color;
42
- }
43
-
44
- 100%
45
- {
46
- @include transform(scale(.3));
47
- background-color: $bkg-color;
48
- }
49
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
freemius/assets/scss/admin/_auto-install.scss DELETED
@@ -1,33 +0,0 @@
1
- .fs-modal-auto-install
2
- {
3
- $max-width: 300px;
4
-
5
- #request-filesystem-credentials-form
6
- {
7
- h2,
8
- .request-filesystem-credentials-action-buttons
9
- {
10
- display: none;
11
- }
12
-
13
- input[type=password],
14
- input[type=email],
15
- input[type=text]
16
- {
17
- -webkit-appearance: none;
18
- padding: 10px 10px 5px 10px;
19
- width: $max-width;
20
- max-width: 100%;
21
- }
22
-
23
- > div,
24
- label,
25
- fieldset
26
- {
27
- width: $max-width;
28
- max-width: 100%;
29
- margin: 0 auto;
30
- display: block;
31
- }
32
- }
33
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
freemius/assets/scss/admin/_buttons.scss DELETED
@@ -1,28 +0,0 @@
1
- .button-primary.warn {
2
- box-shadow: 0 1px 0 $wp-button-alert-shadow-color;
3
- text-shadow: 0 -1px 1px $wp-button-alert-shadow-color, 1px 0 1px $wp-button-alert-shadow-color, 0 1px 1px $wp-button-alert-shadow-color, -1px 0 1px $wp-button-alert-shadow-color;
4
- background: $wp-button-alert-background-color;
5
- border-color: $wp-button-alert-border-top-color $wp-button-alert-border-color $wp-button-alert-border-color;
6
-
7
- &:hover {
8
- background: $wp-button-alert-hovered-background-color;
9
- border-color: $wp-button-alert-border-color;
10
- }
11
-
12
- &:focus {
13
- box-shadow: 0 1px 0 $wp-button-alert-focused-shadow1-color, 0 0 2px 1px $wp-button-alert-focused-shadow2-color;
14
- }
15
-
16
- &:active {
17
- background: $wp-button-alert-active-background-color;
18
- border-color: $wp-button-alert-border-color;
19
- box-shadow: inset 0 2px 0 $wp-button-alert-shadow-color;
20
- }
21
-
22
- &.disabled {
23
- color: $wp-button-alert-disabled-color !important;
24
- background: $wp-button-alert-disabled-background-color !important;
25
- border-color: $wp-button-alert-disabled-border-color !important;
26
- text-shadow: 0 -1px 0 rgba(0,0,0,.1) !important;
27
- }
28
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
freemius/assets/scss/admin/_deactivation-feedback.scss DELETED
@@ -1,55 +0,0 @@
1
- @import "../colors";
2
-
3
- .fs-modal.fs-modal-deactivation-feedback {
4
- .reason-input, .internal-message {
5
- margin: 3px 0 3px 22px;
6
-
7
- input, textarea {
8
- width: 100%;
9
- }
10
- }
11
-
12
- li.reason {
13
- &.has-internal-message .internal-message {
14
- border: 1px solid lighten($darkest-color, 80%);
15
- padding: 7px;
16
- display: none;
17
- }
18
-
19
- @media (max-width: 650px) {
20
- li.reason {
21
- margin-bottom: 10px;
22
-
23
- .reason-input, .internal-message {
24
- margin-left: 29px;
25
- }
26
-
27
- label {
28
- display: table;
29
-
30
- > span {
31
- display: table-cell;
32
- font-size: 1.3em;
33
- }
34
- }
35
- }
36
- }
37
- }
38
-
39
- .anonymous-feedback-label {
40
- float: left;
41
- }
42
-
43
- .fs-modal-panel {
44
- margin-top: 0 !important;
45
-
46
- h3 {
47
- margin-top: 0;
48
- line-height: 1.5em;
49
- }
50
- }
51
- }
52
-
53
- #the-list .deactivate > .fs-slug {
54
- display: none;
55
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
freemius/assets/scss/admin/_gdpr-consent.scss DELETED
@@ -1,81 +0,0 @@
1
- #fs_marketing_optin
2
- {
3
- display: none;
4
- margin-top: 10px;
5
- border: 1px solid #ccc;
6
- padding: 10px;
7
- line-height: 1.5em;
8
-
9
- .fs-message
10
- {
11
- display: block;
12
- margin-bottom: 5px;
13
- font-size: 1.05em;
14
- font-weight: 600;
15
- }
16
-
17
- &.error
18
- {
19
- border: 1px solid $fs-logo-magenta-color;
20
- background: #fee;
21
-
22
- .fs-message
23
- {
24
- color: $fs-logo-magenta-color;
25
- }
26
- }
27
-
28
- .fs-input-container
29
- {
30
- margin-top: 5px;
31
-
32
- label
33
- {
34
- margin-top: 5px;
35
- display: block;
36
-
37
- input
38
- {
39
- float: left;
40
- margin: 1px 0 0 0;
41
- }
42
-
43
- &:first-child
44
- {
45
- display: block;
46
- margin-bottom: 2px;
47
- }
48
- }
49
- }
50
-
51
- .fs-input-label
52
- {
53
- display: block;
54
- margin-left: 20px;
55
-
56
- .underlined
57
- {
58
- text-decoration: underline;
59
- }
60
- }
61
- }
62
-
63
- .rtl
64
- {
65
- #fs_marketing_optin
66
- {
67
- .fs-input-container
68
- {
69
- label input
70
- {
71
- float: right;
72
- }
73
- }
74
-
75
- .fs-input-label
76
- {
77
- margin-left: 0;
78
- margin-right: 20px;
79
- }
80
- }
81
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
freemius/assets/scss/admin/_license-activation.scss DELETED
@@ -1,47 +0,0 @@
1
- .fs-modal.fs-modal-license-activation {
2
- .fs-modal-body {
3
- input.license_key {
4
- width: 100%;
5
- }
6
- }
7
- }
8
-
9
- #license_options_container {
10
- table {
11
- &, select, #available_license_key {
12
- width: 100%;
13
- }
14
-
15
- td:first-child {
16
- width: 1%;
17
- }
18
-
19
- #other_license_key_container {
20
- label {
21
- position: relative;
22
- top: 6px;
23
- float: left;
24
- margin-right: 5px;
25
- }
26
-
27
- div {
28
- overflow: hidden;
29
- width: auto;
30
- height: 30px;
31
- display: block;
32
- top: 2px;
33
- position: relative;
34
-
35
- input {
36
- margin: 0;
37
- }
38
- }
39
- }
40
- }
41
- }
42
-
43
- #sites_list_container {
44
- td {
45
- cursor: pointer;
46
- }
47
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
freemius/assets/scss/admin/_license-key-resend.scss DELETED
@@ -1,68 +0,0 @@
1
- .fs-modal.fs-modal-license-key-resend
2
- {
3
- .email-address-container
4
- {
5
- overflow: hidden;
6
- padding-right: 2px;
7
- }
8
-
9
- &.fs-freemium
10
- {
11
- input.email-address
12
- {
13
- width: 300px;
14
- }
15
-
16
- label
17
- {
18
- display: block;
19
- margin-bottom: 10px;
20
- }
21
- }
22
-
23
- &.fs-premium
24
- {
25
- input.email-address
26
- {
27
- width: 100%;
28
- }
29
-
30
- .button-container
31
- {
32
- float: right;
33
- margin-left: 7px;
34
-
35
- @media (max-width: 650px) {
36
- margin-top: 2px;
37
- }
38
- }
39
- }
40
- }
41
-
42
- .rtl
43
- {
44
- .fs-modal.fs-modal-license-key-resend
45
- {
46
- .fs-modal-body
47
- {
48
- .input-container > .email-address-container
49
- {
50
- padding-left: 2px;
51
- padding-right: 0;
52
- }
53
-
54
- .button-container
55
- {
56
- float: left;
57
- margin-right: 7px;
58
- margin-left: 0;
59
- }
60
- }
61
- }
62
- }
63
-
64
- a.show-license-resend-modal
65
- {
66
- margin-top: 4px;
67
- display: inline-block;
68
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
freemius/assets/scss/admin/_modal-common.scss DELETED
@@ -1,194 +0,0 @@
1
- @import "../colors";
2
- @import "../mixins";
3
-
4
- .fs-modal {
5
- position: fixed;
6
- overflow: auto;
7
- height: 100%;
8
- width: 100%;
9
- top: 0;
10
- z-index: 100000;
11
- display: none;
12
- background: rgba(0, 0, 0, 0.6);
13
-
14
- .fs-modal-dialog {
15
- background: transparent;
16
- position: absolute;
17
- left: 50%;
18
- margin-left: -298px;
19
- padding-bottom: 30px;
20
- top: -100%;
21
- z-index: 100001;
22
- width: 596px;
23
-
24
- @media (max-width: 650px) {
25
- margin-left: -50%;
26
- box-sizing: border-box;
27
- padding-left: 10px;
28
- padding-right: 10px;
29
- width: 100%;
30
-
31
- .fs-modal-panel > h3 > strong {
32
- font-size: 1.3em;
33
- }
34
- }
35
- }
36
-
37
- &.active {
38
- display: block;
39
-
40
- &:before {
41
- display: block;
42
- }
43
-
44
- .fs-modal-dialog {
45
- top: 10%;
46
- }
47
- }
48
-
49
- &.fs-success {
50
- .fs-modal-header {
51
- border-bottom-color: $wp-notice-success-dark-color;
52
- }
53
-
54
- .fs-modal-body {
55
- background-color: $wp-notice-success-color;
56
- }
57
- }
58
-
59
- &.fs-warn {
60
- .fs-modal-header {
61
- border-bottom-color: $wp-notice-warn-dark-color;
62
- }
63
-
64
- .fs-modal-body {
65
- background-color: $wp-notice-warn-color;
66
- }
67
- }
68
-
69
- &.fs-error {
70
- .fs-modal-header {
71
- border-bottom-color: $wp-notice-error-dark-color;
72
- }
73
-
74
- .fs-modal-body {
75
- background-color: $wp-notice-error-color;
76
- }
77
- }
78
-
79
-
80
- .fs-modal-body,
81
- .fs-modal-footer {
82
- border: 0;
83
- background: #fefefe;
84
- padding: 20px;
85
- }
86
-
87
- .fs-modal-header {
88
- border-bottom: #eeeeee solid 1px;
89
- background: #fbfbfb;
90
- padding: 15px 20px;
91
- position: relative;
92
- margin-bottom: -10px;
93
- // z-index: 2;
94
-
95
- h4 {
96
- margin: 0;
97
- padding: 0;
98
- text-transform: uppercase;
99
- font-size: 1.2em;
100
- font-weight: bold;
101
- color: #cacaca;
102
- text-shadow: 1px 1px 1px #fff;
103
- letter-spacing: 0.6px;
104
- -webkit-font-smoothing: antialiased;
105
- }
106
-
107
- .fs-close {
108
- position: absolute;
109
- right: 10px;
110
- top: 12px;
111
- cursor: pointer;
112
- color: #bbb;
113
- @include border-radius(20px);
114
- padding: 3px;
115
- @include transition(all 0.2s ease-in-out);
116
-
117
- &:hover {
118
- color: #fff;
119
- background: #aaa;
120
- }
121
-
122
- &, &:hover
123
- {
124
- .dashicons
125
- {
126
- text-decoration: none;
127
- }
128
- }
129
- }
130
- }
131
-
132
- .fs-modal-body {
133
- border-bottom: 0;
134
-
135
- p {
136
- font-size: 14px;
137
- }
138
-
139
- h2 {
140
- font-size: 20px;
141
- line-height: 1.5em;
142
- }
143
-
144
- > div {
145
- margin-top: 10px;
146
-
147
- h2 {
148
- font-weight: bold;
149
- font-size: 20px;
150
- margin-top: 0;
151
- }
152
- }
153
- }
154
-
155
- .fs-modal-footer {
156
- border-top: #eeeeee solid 1px;
157
- text-align: right;
158
-
159
- > .button {
160
- margin: 0 7px;
161
-
162
- &:first-child {
163
- margin: 0;
164
- }
165
- }
166
- }
167
-
168
- .fs-modal-panel {
169
- > .notice.inline {
170
- margin: 0;
171
- display: none;
172
- }
173
-
174
- &:not(.active) {
175
- display: none;
176
- }
177
- }
178
- }
179
-
180
- .rtl
181
- {
182
- .fs-modal {
183
- .fs-modal-header {
184
- .fs-close {
185
- right: auto;
186
- left: 20px;
187
- }
188
- }
189
- }
190
- }
191
-
192
- body.has-fs-modal {
193
- overflow: hidden;
194
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
freemius/assets/scss/admin/_multisite-options.scss DELETED
@@ -1,40 +0,0 @@
1
- #multisite_options_container {
2
- margin-top: 10px;
3
- border: 1px solid #ccc;
4
- padding: 5px;
5
-
6
- a {
7
- text-decoration: none;
8
-
9
- &:focus {
10
- box-shadow: none;
11
- }
12
-
13
- &.selected {
14
- font-weight: bold;
15
- }
16
- }
17
-
18
- &.apply-on-all-sites {
19
- border: 0 none;
20
- padding: 0;
21
-
22
- #all_sites_options {
23
- border-spacing: 0;
24
-
25
- td:not(:first-child) {
26
- display: none;
27
- }
28
- }
29
- }
30
-
31
- #sites_list_container {
32
- display: none;
33
- overflow: auto;
34
-
35
- table td {
36
- border-top: 1px solid #ccc;
37
- padding: 4px 2px;
38
- }
39
- }
40
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
freemius/assets/scss/admin/_plugin-upgrade-notice.scss DELETED
@@ -1,8 +0,0 @@
1
- .plugins p.fs-upgrade-notice
2
- {
3
- border: 0;
4
- background-color: #d54e21;
5
- padding: 10px;
6
- color: #f9f9f9;
7
- margin-top: 10px;
8
- }
 
 
 
 
 
 
 
 
freemius/assets/scss/admin/_subscription-cancellation.scss DELETED
@@ -1,30 +0,0 @@
1
- .fs-modal.fs-modal-subscription-cancellation {
2
- .fs-price-increase-warning {
3
- color: red;
4
- font-weight: bold;
5
- padding: 0 25px;
6
- margin-bottom: 0;
7
- }
8
-
9
- ul.subscription-actions label {
10
- input {
11
- float: left;
12
- top: 5px;
13
- position: relative;
14
-
15
- .rtl & {
16
- float: right;
17
- }
18
- }
19
-
20
- span {
21
- display: block;
22
- margin-left: 24px;
23
-
24
- .rtl & {
25
- margin-left: 0;
26
- margin-right: 24px;
27
- }
28
- }
29
- }
30
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
freemius/assets/scss/admin/_themes.scss DELETED
@@ -1,21 +0,0 @@
1
- .theme-browser
2
- {
3
- .theme
4
- {
5
- .fs-premium-theme-badge
6
- {
7
- position: absolute;
8
- top: 10px;
9
- right: 0;
10
- background: $fs-logo-green-color;
11
- color: #fff;
12
- text-transform: uppercase;
13
- padding: 5px 10px;
14
- @include border-radius(3px 0 0 3px);
15
- font-weight: bold;
16
- border-right: 0;
17
- @include box-shadow(0 2px 1px -1px rgba(0, 0, 0, .3));
18
- font-size: 1.1em;
19
- }
20
- }
21
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
freemius/assets/scss/admin/_tooltip.scss DELETED
@@ -1,66 +0,0 @@
1
- .fs-tooltip-trigger
2
- {
3
- &:not(a)
4
- {
5
- cursor: help;
6
- }
7
-
8
- position: relative;
9
-
10
- .fs-tooltip
11
- {
12
- opacity: 0;
13
- visibility: hidden;
14
- @include transition(opacity 0.3s ease-in-out);
15
- position: absolute;
16
- background: $tooltip-bkg-color;
17
- color: $tooltip-color;
18
- font-family: 'arial', serif;
19
- font-size: 12px;
20
- padding: 10px;
21
- z-index: 999999;
22
- bottom: 100%;
23
- margin-bottom: 5px;
24
- left: 0;
25
- right: 0;
26
- @include border-radius(5px);
27
- @include box-shadow(1px 1px 1px rgba(0, 0, 0, 0.2));
28
- line-height: 1.3em;
29
- font-weight: bold;
30
- text-align: left;
31
-
32
- .rtl &
33
- {
34
- text-align: right;
35
- }
36
-
37
- &::after
38
- {
39
- content: ' ';
40
- display: block;
41
- width: 0;
42
- height: 0;
43
- border-style: solid;
44
- border-width: 5px 5px 0 5px;
45
- border-color: $tooltip-bkg-color transparent transparent transparent;
46
- position: absolute;
47
- top: 100%;
48
- left: 21px;
49
-
50
- .rtl &
51
- {
52
- right: 21px;
53
- left: auto;
54
- }
55
- }
56
- }
57
-
58
- &:hover
59
- {
60
- .fs-tooltip
61
- {
62
- visibility: visible;
63
- opacity: 1;
64
- }
65
- }
66
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
freemius/assets/scss/admin/account.scss DELETED
@@ -1,302 +0,0 @@
1
- @import "../start";
2
-
3
- #fs_account
4
- {
5
- .postbox,
6
- .widefat
7
- {
8
- max-width: 700px;
9
- }
10
-
11
- h3
12
- {
13
- font-size: 1.3em;
14
- padding: 12px 15px;
15
- margin: 0 0 12px 0;
16
- line-height: 1.4;
17
- border-bottom: 1px solid #F1F1F1;
18
-
19
- .dashicons {
20
- width: 26px;
21
- height: 26px;
22
- font-size: 1.3em;
23
- }
24
- }
25
-
26
- i.dashicons
27
- {
28
- font-size: 1.2em;
29
- height: 1.2em;
30
- width: 1.2em;
31
- }
32
-
33
- .dashicons
34
- {
35
- vertical-align: middle;
36
- }
37
-
38
- .fs-header-actions
39
- {
40
- position: absolute;
41
- top: 17px;
42
- right: 15px;
43
- font-size: 0.9em;
44
-
45
- ul
46
- {
47
- margin: 0;
48
- }
49
-
50
- li
51
- {
52
- form
53
- {
54
- display: inline-block;
55
- }
56
-
57
- float: left;
58
- a
59
- {
60
- text-decoration: none;
61
- }
62
- }
63
- }
64
- }
65
-
66
- #fs_account_details .button-group {
67
- float: right;
68
- }
69
-
70
- .rtl #fs_account .fs-header-actions
71
- {
72
- left: 15px;
73
- right: auto;
74
- }
75
-
76
- .fs-key-value-table
77
- {
78
- width: 100%;
79
-
80
- form
81
- {
82
- display: inline-block;
83
- }
84
-
85
- tr
86
- {
87
- td:first-child
88
- {
89
- nobr
90
- {
91
- font-weight: bold;
92
- }
93
-
94
- text-align: right;
95
-
96
- form
97
- {
98
- display: block;
99
- }
100
- }
101
-
102
- td.fs-right
103
- {
104
- text-align: right;
105
- }
106
-
107
- &.fs-odd
108
- {
109
- background: #ebebeb;
110
- }
111
- }
112
-
113
- td, th
114
- {
115
- padding: 10px;
116
- }
117
-
118
- code {
119
- line-height: 28px;
120
- }
121
-
122
- var, code, input[type="text"]
123
- {
124
- color: #0073AA;
125
- font-size: 16px;
126
- background: none;
127
- }
128
-
129
- input[type="text"] {
130
- width: 100%;
131
- font-weight: bold;
132
- }
133
- }
134
-
135
- label.fs-tag
136
- {
137
- background: #ffba00;
138
- color: #fff;
139
- display: inline-block;
140
- border-radius: 3px;
141
- padding: 5px;
142
- font-size: 11px;
143
- line-height: 11px;
144
- vertical-align: baseline;
145
-
146
- &.fs-warn
147
- {
148
- background: #ffba00;
149
- }
150
- &.fs-success
151
- {
152
- background: #46b450;
153
- }
154
- &.fs-error
155
- {
156
- background: #dc3232;
157
- }
158
- }
159
-
160
- #fs_sites
161
- {
162
- .fs-scrollable-table
163
- {
164
- .fs-table-body {
165
- max-height: 200px;
166
- overflow: auto;
167
- border: 1px solid #e5e5e5;
168
-
169
- & > table.widefat {
170
- border: none !important;
171
- }
172
- }
173
-
174
- .fs-main-column {
175
- width: 100%;
176
- }
177
-
178
- .fs-site-details
179
- {
180
- td:first-of-type
181
- {
182
- text-align: right;
183
- color: grey;
184
- width: 1px;
185
- }
186
-
187
- td:last-of-type
188
- {
189
- text-align: right;
190
- }
191
- }
192
-
193
- .fs-install-details table
194
- {
195
- tr td
196
- {
197
- width: 1px;
198
- white-space: nowrap;
199
-
200
- &:last-of-type
201
- {
202
- width: auto;
203
- }
204
- }
205
- }
206
- }
207
- }
208
-
209
- #fs_addons
210
- {
211
- h3
212
- {
213
- border: none;
214
- margin-bottom: 0;
215
- padding: 4px 5px;
216
- }
217
-
218
- td
219
- {
220
- vertical-align: middle;
221
- }
222
-
223
- thead {
224
- white-space: nowrap;
225
- }
226
-
227
- td:first-child,
228
- th:first-child
229
- {
230
- text-align: left;
231
- font-weight: bold;
232
- }
233
- td:last-child,
234
- th:last-child
235
- {
236
- text-align: right;
237
- }
238
- th
239
- {
240
- font-weight: bold;
241
- }
242
- }
243
-
244
- #fs_billing_address {
245
- width: 100%;
246
-
247
- tr {
248
- td {
249
- width: 50%;
250
- padding: 5px;
251
- }
252
-
253
- &:first-of-type {
254
- td {
255
- padding-top: 0;
256
- }
257
- }
258
- }
259
-
260
- @mixin read-mode {
261
- border-color: transparent;
262
- color: #777;
263
- border-bottom: 1px dashed #ccc;
264
- padding-left: 0;
265
- background: none;
266
- }
267
-
268
- span {
269
- font-weight: bold;
270
- }
271
-
272
- input, select {
273
- @include placeholder(transparent);
274
-
275
- display: block;
276
- width: 100%;
277
- margin-top: 5px;
278
-
279
- &.fs-read-mode {
280
- @include read-mode();
281
- }
282
- }
283
-
284
-
285
- &.fs-read-mode {
286
- td span {
287
- display: none;
288
- }
289
-
290
- input, select
291
- {
292
- @include read-mode();
293
- @include placeholder(#ccc);
294
- }
295
- }
296
-
297
-
298
- button {
299
- display: block;
300
- width: 100%;
301
- }
302
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
freemius/assets/scss/admin/add-ons.scss DELETED
@@ -1,449 +0,0 @@
1
- @import "../start";
2
-
3
- #fs_addons
4
- {
5
- .fs-cards-list
6
- {
7
- list-style: none;
8
-
9
- .fs-card
10
- {
11
- float: left;
12
- // height: 185px; // With reviews/ratings
13
- height: 152px;
14
- width: 310px;
15
- padding: 0;
16
- margin: 0 0 30px 30px;
17
- font-size: 14px;
18
- list-style: none;
19
- border: 1px solid #ddd;
20
- cursor: pointer;
21
- position: relative;
22
-
23
- .fs-overlay
24
- {
25
- position: absolute;
26
- left: 0;
27
- right: 0;
28
- bottom: 0;
29
- top: 0;
30
- z-index: 9;
31
- }
32
-
33
- .fs-inner
34
- {
35
- background-color: #fff;
36
- overflow: hidden;
37
- height: 100%;
38
- position: relative;
39
-
40
- ul
41
- {
42
- @include transition(all, 0.15s);
43
- left: 0;
44
- right: 0;
45
- top: 0;
46
- position: absolute;
47
- }
48
-
49
- li
50
- {
51
- list-style: none;
52
- line-height: 18px;
53
- padding: 0 15px;
54
- width: 100%;
55
- display: block;
56
- @include box-sizing(border-box);
57
- }
58
-
59
- .fs-card-banner
60
- {
61
- padding: 0;
62
- margin: 0;
63
- line-height: 0;
64
- display: block;
65
- height: 100px;
66
- background-repeat: repeat-x;
67
- background-size: 100% 100%;
68
- @include transition(all, 0.15s);
69
- }
70
-
71
- .fs-title
72
- {
73
- margin: 10px 0 0 0;
74
- height: 18px;
75
- overflow: hidden;
76
- color: #000;
77
- white-space: nowrap;
78
- text-overflow: ellipsis;
79
- font-weight: bold;
80
- }
81
-
82
- .fs-offer
83
- {
84
- font-size: 0.9em;
85
- }
86
-
87
- .fs-description
88
- {
89
- background-color: #f9f9f9;
90
- padding: 10px 15px 100px 15px;
91
- border-top: 1px solid #eee;
92
- margin: 0 0 10px 0;
93
- color: #777;
94
- }
95
-
96
- .fs-tag
97
- {
98
- position: absolute;
99
- top: 10px;
100
- right: 0px;
101
- background: greenyellow;
102
- display: block;
103
- padding: 2px 10px;
104
- @include box-shadow(1px 1px 1px rgba(0,0,0,0.3));
105
- text-transform: uppercase;
106
- font-size: 0.9em;
107
- font-weight: bold;
108
- }
109
-
110
- .fs-cta
111
- {
112
- .button
113
- {
114
- position: absolute;
115
- top: 112px;
116
- right: 10px;
117
- }
118
- }
119
- }
120
-
121
- @media screen and (min-width: 960px) {
122
- &:hover
123
- {
124
- .fs-overlay
125
- {
126
- border: 2px solid $fms-link-color;
127
- margin-left: -1px;
128
- margin-top: -1px;
129
- }
130
-
131
- .fs-inner
132
- {
133
- ul
134
- {
135
- top: -100px;
136
- }
137
-
138
- .fs-card-banner
139
- {
140
- // background-position: 50% -100px;
141
- }
142
-
143
- .fs-title,
144
- .fs-offer
145
- {
146
- color: $fms-link-color;
147
- }
148
- }
149
- }
150
- }
151
- }
152
- }
153
- }
154
-
155
- #TB_window
156
- {
157
- &, iframe
158
- {
159
- width: 772px !important;
160
- }
161
- }
162
-
163
- #plugin-information
164
- {
165
- #section-description
166
- {
167
- h2, h3, p, b, i, blockquote, li, ul, ol
168
- {
169
- clear: none;
170
- }
171
-
172
- .fs-selling-points
173
- {
174
- padding-bottom: 10px;
175
- border-bottom: 1px solid #ddd;
176
-
177
- ul
178
- {
179
- margin: 0;
180
-
181
- li
182
- {
183
- padding: 0;
184
- list-style: none outside none;
185
-
186
- i.dashicons
187
- {
188
- color: $fs-logo-green-color;
189
- font-size: 3em;
190
- vertical-align: middle;
191
- line-height: 30px;
192
- float: left;
193
- margin: 0 0 0 -15px;
194
- }
195
-
196
- h3
197
- {
198
- margin: 1em 30px !important;
199
- }
200
- }
201
- }
202
- }
203
-
204
- .fs-screenshots
205
- {
206
- @include clearfix();
207
- ul
208
- {
209
- list-style: none;
210
- margin: 0;
211
-
212
- li
213
- {
214
- width: 225px;
215
- height: 225px;
216
- float: left;
217
- margin-bottom: 20px;
218
- @include box-sizing(content-box);
219
-
220
- a
221
- {
222
- display: block;
223
- width: 100%;
224
- height: 100%;
225
- border: 1px solid;
226
- @include box-shadow(1px 1px 1px rgba(0, 0, 0, 0.2));
227
- background-size: cover;
228
- }
229
-
230
- &.odd
231
- {
232
- margin-right: 20px;
233
- }
234
- }
235
- }
236
- }
237
- }
238
-
239
- .plugin-information-pricing
240
- {
241
- $pricing_color: #FFFEEC;
242
- $borders_color: #DDD;
243
- margin: -16px;
244
- // padding: 20px;
245
- border-bottom: 1px solid $borders_color;
246
-
247
- .fs-plan
248
- {
249
-
250
- h3
251
- {
252
- margin-top: 0;
253
- padding: 20px;
254
- font-size: 16px;
255
- }
256
-
257
- .nav-tab-wrapper
258
- {
259
- border-bottom: 1px solid $borders_color;
260
-
261
- .nav-tab
262
- {
263
- cursor: pointer;
264
- position: relative;
265
- padding: 0 10px;
266
- font-size: 0.9em;
267
-
268
- label
269
- {
270
- text-transform: uppercase;
271
- color: green;
272
- background: greenyellow;
273
- position: absolute;
274
- left: -1px;
275
- right: -1px;
276
- bottom: 100%;
277
- border: 1px solid darkgreen;
278
- padding: 2px;
279
- text-align: center;
280
- font-size: 0.9em;
281
- line-height: 1em;
282
- }
283
-
284
- &.nav-tab-active
285
- {
286
- cursor: default;
287
- background: $pricing_color;
288
- border-bottom-color: $pricing_color;
289
- }
290
- }
291
- }
292
-
293
- &.fs-single-cycle
294
- {
295
- h3
296
- {
297
- background: $pricing_color;
298
- margin: 0;
299
- padding-bottom: 0;
300
- color: #0073aa;
301
- }
302
-
303
- .nav-tab-wrapper,
304
- .fs-billing-frequency
305
- {
306
- display: none;
307
- }
308
- }
309
-
310
- .fs-pricing-body
311
- {
312
- background: $pricing_color;
313
- padding: 20px;
314
- }
315
-
316
- .button
317
- {
318
- width: 100%;
319
- text-align: center;
320
- font-weight: bold;
321
- text-transform: uppercase;
322
- font-size: 1.1em;
323
- }
324
-
325
- label
326
- {
327
- white-space: nowrap;
328
- }
329
-
330
- var {
331
- font-style: normal;
332
- }
333
-
334
- .fs-billing-frequency,
335
- .fs-annual-discount
336
- {
337
- text-align: center;
338
- display: block;
339
- font-weight: bold;
340
- margin-bottom: 10px;
341
- text-transform: uppercase;
342
- background: #F3F3F3;
343
- padding: 2px;
344
- border: 1px solid #ccc;
345
- }
346
-
347
- .fs-annual-discount
348
- {
349
- text-transform: none;
350
- color: green;
351
- background: greenyellow;
352
- }
353
-
354
- ul.fs-trial-terms
355
- {
356
- font-size: 0.9em;
357
-
358
- i
359
- {
360
- float: left;
361
- margin: 0 0 0 -15px;
362
- }
363
-
364
- li
365
- {
366
- margin: 10px 0 0 0;
367
- }
368
- }
369
- }
370
- }
371
-
372
- #section-features
373
- {
374
- .fs-features
375
- {
376
- margin: -20px -26px;
377
- }
378
-
379
- table
380
- {
381
- width: 100%;
382
- border-spacing: 0;
383
- border-collapse: separate;
384
-
385
- thead
386
- {
387
- th
388
- {
389
- padding: 10px 0;
390
- }
391
-
392
- .fs-price
393
- {
394
- color: $fs-logo-green-color;
395
- font-weight: normal;
396
- display: block;
397
- text-align: center;
398
- }
399
- }
400
-
401
- tbody
402
- {
403
- td
404
- {
405
- border-top: 1px solid #ccc;
406
- padding: 10px 0;
407
- text-align: center;
408
- width: 100px;
409
- color: $fs-logo-green-color;
410
-
411
- &:first-child
412
- {
413
- text-align: left;
414
- width: auto;
415
- color: inherit;
416
- padding-left: 26px;
417
- }
418
- }
419
- tr.fs-odd
420
- {
421
- td
422
- {
423
- background: #fefefe;
424
- }
425
- }
426
- }
427
- }
428
-
429
- .dashicons-yes
430
- {
431
- width: 30px;
432
- height: 30px;
433
- font-size: 30px;
434
- }
435
- }
436
- }
437
-
438
- @media screen and (max-width: 961px) {
439
- #fs_addons
440
- {
441
- .fs-cards-list
442
- {
443
- .fs-card
444
- {
445
- height: 265px;
446
- }
447
- }
448
- }
449
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
freemius/assets/scss/admin/affiliation.scss DELETED
@@ -1,97 +0,0 @@
1
- @import "../start";
2
-
3
- #fs_affiliation_content_wrapper {
4
- #messages {
5
- margin-top: 25px;
6
- }
7
-
8
- h3 {
9
- font-size: 24px;
10
- padding: 0;
11
- margin-left: 0;
12
- }
13
-
14
- ul {
15
- li {
16
- @include box-sizing(border-box);
17
- list-style-type: none;
18
-
19
- &:before {
20
- content: '✓';
21
- margin-right: 10px;
22
- font-weight: bold;
23
- }
24
- }
25
- }
26
-
27
- p:not(.description), li, label {
28
- font-size: 16px !important;
29
- line-height: 26px !important;
30
- }
31
-
32
- .button {
33
- margin-top: 20px;
34
- margin-bottom: 7px;
35
- line-height: 35px;
36
- height: 40px;
37
- font-size: 16px;
38
-
39
- &#cancel_button {
40
- margin-right: 5px;
41
- }
42
- }
43
-
44
- form {
45
- .input-container {
46
- .input-label {
47
- font-weight: bold;
48
- display: block;
49
- width: 100%;
50
- }
51
-
52
- &.input-container-text {
53
- label, input, textarea {
54
- display: block;
55
- }
56
- }
57
-
58
- margin-bottom: 15px;
59
-
60
- #add_domain, .remove-domain {
61
- text-decoration: none;
62
- display: inline-block;
63
- margin-top: 3px;
64
-
65
- &:focus {
66
- box-shadow: none;
67
- }
68
-
69
- &.disabled {
70
- color: #aaa;
71
- cursor: default;
72
- }
73
- }
74
- }
75
-
76
- #extra_domains_container {
77
- .description {
78
- margin-top: 0;
79
- position: relative;
80
- top: -4px;
81
- }
82
-
83
- .extra-domain-input-container {
84
- margin-bottom: 15px;
85
-
86
- .domain {
87
- display: inline-block;
88
- margin-right: 5px;
89
-
90
- &:last-of-type {
91
- margin-bottom: 0;
92
- }
93
- }
94
- }
95
- }
96
- }
97
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
freemius/assets/scss/admin/checkout.scss DELETED
@@ -1,5 +0,0 @@
1
- @media screen and (max-width: 782px) {
2
- #wpbody-content {
3
- padding-bottom: 0 !important;
4
- }
5
- }
 
 
 
 
 
freemius/assets/scss/admin/common.scss DELETED
@@ -1,220 +0,0 @@
1
- @import "../start";
2
- @import "themes";
3
-
4
- #fs_frame
5
- {
6
- line-height: 0;
7
- font-size: 0;
8
- }
9
-
10
- .fs-full-size-wrapper
11
- {
12
- margin: 40px 0 -65px -20px;
13
-
14
- @media (max-width: 600px) {
15
- margin: 0 0 -65px -10px;
16
- }
17
- }
18
-
19
- .fs-notice
20
- {
21
- position: relative;
22
-
23
- &.fs-has-title
24
- {
25
- margin-bottom: 30px !important;
26
- }
27
-
28
- &.success
29
- {
30
- color: green;
31
- // font-weight: normal;
32
- }
33
-
34
- &.promotion
35
- {
36
- border-color: $fs-notice-promotion-border-color !important;
37
- background-color: $fs-notice-promotion-bkg !important;
38
- }
39
-
40
- .fs-notice-body
41
- {
42
- margin: .5em 0;
43
- padding: 2px;
44
- }
45
-
46
- .fs-close
47
- {
48
- // position: absolute;
49
- // top: 2px;
50
- // bottom: 2px;
51
- // right: 2px;
52
- // min-width: 100px;
53
- // text-align: center;
54
- // padding-right: 2px;
55
- cursor: pointer;
56
- color: #aaa;
57
- float: right;
58
-
59
- &:hover
60
- {
61
- color: #666;
62
- // background: #A9A9A9;
63
- }
64
-
65
- > *
66
- {
67
- margin-top: 7px;
68
- display: inline-block;
69
- }
70
- }
71
-
72
- label.fs-plugin-title
73
- {
74
- background: rgba(0, 0, 0, 0.3);
75
- color: #fff;
76
- padding: 2px 10px;
77
- position: absolute;
78
- top: 100%;
79
- bottom: auto;
80
- right: auto;
81
- @include border-radius(0 0 3px 3px);
82
- left: 10px;
83
- font-size: 12px;
84
- font-weight: bold;
85
- cursor: auto;
86
- }
87
- }
88
-
89
- div.fs-notice
90
- {
91
- &.updated,
92
- &.success,
93
- &.promotion
94
- {
95
- display: block !important;
96
- }
97
- }
98
-
99
- .rtl .fs-notice
100
- {
101
- .fs-close
102
- {
103
- // left: 2px;
104
- // right: auto;
105
- // padding-right: 0;
106
- // padding-left: 2px;
107
- float: left;
108
- }
109
- }
110
-
111
- .fs-secure-notice
112
- {
113
- position: fixed;
114
- top: 32px;
115
- left: 160px;
116
- right: 0;
117
- background: rgb(235, 253, 235);
118
- padding: 10px 20px;
119
- color: green;
120
- z-index: 9999;
121
- @include box-shadow(0 2px 2px rgba(6, 113, 6, 0.3));
122
- @include opacity(0.95);
123
-
124
- &:hover
125
- {
126
- @include opacity(1);
127
- }
128
-
129
- a.fs-security-proof
130
- {
131
- color: green;
132
- text-decoration: none;
133
- }
134
- }
135
-
136
- @media screen and (max-width: 960px) {
137
- .fs-secure-notice
138
- {
139
- left: 36px;
140
- }
141
- }
142
-
143
- @media screen and (max-width: 600px) {
144
- .fs-secure-notice
145
- {
146
- display: none;
147
- }
148
- }
149
-
150
- @media screen and (max-width: 500px) {
151
- #fs_promo_tab
152
- {
153
- display: none;
154
- }
155
- }
156
-
157
- @media screen and (max-width: 782px) {
158
- .fs-secure-notice
159
- {
160
- left: 0;
161
- top: 46px;
162
- text-align: center;
163
- }
164
- }
165
-
166
- span.fs-submenu-item.fs-sub:before
167
- {
168
- // Add small arrow.
169
- content: '\21B3';
170
- padding: 0 5px;
171
- }
172
-
173
- .rtl
174
- {
175
- span.fs-submenu-item.fs-sub:before
176
- {
177
- // Add small RTL arrow.
178
- content: '\21B2';
179
- }
180
- }
181
-
182
- .fs-submenu-item
183
- {
184
- &.pricing
185
- {
186
- &.upgrade-mode
187
- {
188
- color: greenyellow;
189
- }
190
-
191
- &.trial-mode
192
- {
193
- color: #83e2ff;
194
- }
195
- }
196
- }
197
-
198
- #adminmenu .update-plugins.fs-trial
199
- {
200
- background-color: #00b9eb;
201
- }
202
- .fs-ajax-spinner
203
- {
204
- border: 0;
205
- width: 20px;
206
- height: 20px;
207
- margin-right: 5px;
208
- vertical-align: sub;
209
- display: inline-block;
210
- background: url('/wp-admin/images/wpspin_light-2x.gif');
211
- background-size: contain;
212
- }
213
-
214
- .wrap.fs-section {
215
- h2 {
216
- text-align: left;
217
- }
218
- }
219
-
220
- @import "plugin-upgrade-notice";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
freemius/assets/scss/admin/connect.scss DELETED
@@ -1,548 +0,0 @@
1
- @import "../start";
2
-
3
- $form_width: 480px;
4
-
5
- #fs_connect
6
- {
7
- width: $form_width;
8
- @include box-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));
9
- margin: 20px 0;
10
-
11
- @media screen and (max-width: ($form_width - 1)) {
12
- @include box-shadow(none);
13
- width: auto;
14
- margin: 0 0 0 -10px;
15
- }
16
-
17
- .fs-content
18
- {
19
- background: #fff;
20
- padding: 15px 20px;
21
-
22
- .fs-error {
23
- background: snow;
24
- color: $fs-logo-magenta-color;
25
- border: 1px solid $fs-logo-magenta-color;
26
- @include box-shadow(0 1px 1px 0 rgba(0,0,0,.1));
27
- text-align: center;
28
- padding: 5px;
29
- margin-bottom: 10px;
30
- }
31
-
32
- p
33
- {
34
- margin: 0;
35
- padding: 0;
36
- font-size: 1.2em;
37
- }
38
- }
39
-
40
- .fs-license-key-container {
41
- position: relative;
42
- width: 280px;
43
- margin: 10px auto 0 auto;
44
-
45
- input {
46
- width: 100%;
47
- }
48
-
49
- .dashicons {
50
- position: absolute;
51
- top: 5px;
52
- right: 5px;
53
- }
54
- }
55
-
56
- &.require-license-key {
57
- #sites_list_container {
58
- td {
59
- cursor: pointer;
60
- }
61
- }
62
- }
63
-
64
- #delegate_to_site_admins {
65
- margin-right: 15px;
66
- float: right;
67
- height: 26px;
68
- vertical-align: middle;
69
- line-height: 37px;
70
- font-weight: bold;
71
- border-bottom: 1px dashed;
72
- text-decoration: none;
73
-
74
- &.rtl {
75
- margin-left: 15px;
76
- margin-right: 0;
77
- }
78
- }
79
-
80
- .fs-actions
81
- {
82
- padding: 10px 20px;
83
- background: #C0C7CA;
84
-
85
- .button
86
- {
87
- padding: 0 10px 1px;
88
- line-height: 35px;
89
- height: 37px;
90
- font-size: 16px;
91
- margin-bottom: 0;
92
-
93
- .dashicons
94
- {
95
- font-size: 37px;
96
- margin-left: -8px;
97
- margin-right: 12px;
98
- }
99
-
100
- &.button-primary
101
- {
102
- padding-right: 15px;
103
- padding-left: 15px;
104
-
105
- &:after
106
- {
107
- content: ' \279C';
108
- }
109
-
110
- &.fs-loading
111
- {
112
- &:after
113
- {
114
- content: '';
115
- }
116
- }
117
- }
118
-
119
- &.button-secondary
120
- {
121
- float: right;
122
- }
123
- }
124
-
125
- // .fs-skip
126
- // {
127
- // line-height: 38px;
128
- // vertical-align: middle;
129
- // text-decoration: none;
130
- // margin-left: 10px;
131
- // }
132
- }
133
-
134
- &.fs-anonymous-disabled
135
- {
136
- .fs-actions
137
- {
138
- .button.button-primary
139
- {
140
- width: 100%;
141
- }
142
- }
143
- }
144
-
145
- .fs-permissions
146
- {
147
- padding: 10px 20px;
148
- background: #FEFEFE;
149
- // background: #F1F1F1;
150
- @include transition(background 0.5s ease);
151
-
152
- .fs-license-sync-disclaimer {
153
- text-align: center;
154
- margin-top: 0;
155
- }
156
-
157
- .fs-trigger
158
- {
159
- font-size: 0.9em;
160
- text-decoration: none;
161
- text-align: center;
162
- display: block;
163
- }
164
-
165
- ul
166
- {
167
- height: 0;
168
- overflow: hidden;
169
- margin: 0;
170
-
171
- li
172
- {
173
- margin-bottom: 12px;
174
-
175
- &:last-child
176
- {
177
- margin-bottom: 0;
178
- }
179
-
180
- i.dashicons
181
- {
182
- float: left;
183
- font-size: 40px;
184
- width: 40px;
185
- height: 40px;
186
- }
187
-
188
- div
189
- {
190
- margin-left: 55px;
191
-
192
- span
193
- {
194
- font-weight: bold;
195
- text-transform: uppercase;
196
- color: #23282d;
197
- }
198
-
199
- p
200
- {
201
- margin: 2px 0 0 0;
202
- }
203
- }
204
- }
205
- }
206
-
207
- &.fs-open
208
- {
209
- background: #fff;
210
-
211
- ul
212
- {
213
- height: auto;
214
- margin: 20px 20px 10px 20px;
215
- }
216
- }
217
-
218
- @media screen and (max-width: ($form_width - 1)) {
219
- background: #fff;
220
-
221
- .fs-trigger
222
- {
223
- display: none;
224
- }
225
-
226
- ul
227
- {
228
- height: auto;
229
- margin: 20px;
230
- }
231
- }
232
- }
233
-
234
- .fs-freemium-licensing {
235
- padding: 8px;
236
- // background: #0085BA;
237
- background: #777;
238
- color: #fff;
239
-
240
- p {
241
- text-align: center;
242
- display: block;
243
- margin: 0;
244
- padding: 0;
245
- }
246
-
247
- a {
248
- color: #C2EEFF;
249
- text-decoration: underline;
250
- }
251
- }
252
-
253
- $icon_size: 80px;
254
- $wp_logo_padding: $icon_size / 10;
255
- $icons_top: 10px;
256
-
257
- .fs-visual
258
- {
259
- padding: 12px;
260
- line-height: 0;
261
- background: #fafafa;
262
- height: $icon_size;
263
- position: relative;
264
-
265
- .fs-site-icon
266
- {
267
- position: absolute;
268
- left: 20px;
269
- top: $icons_top;
270
- }
271
-
272
- .fs-connect-logo
273
- {
274
- position: absolute;
275
- right: 20px;
276
- top: $icons_top;
277
- }
278
-
279
- .fs-plugin-icon
280
- {
281
- position: absolute;
282
- top: $icons_top;
283
- left: 50%;
284
- margin-left: - ($icon_size / 2);
285
- }
286
-
287
- .fs-plugin-icon,
288
- .fs-site-icon,
289
- img,
290
- object
291
- {
292
- width: $icon_size;
293
- height: $icon_size;
294
- }
295
-
296
- .dashicons-wordpress
297
- {
298
- font-size: $icon_size - ($wp_logo_padding * 2);
299
- background: $wordpress_color;
300
- color: #fff;
301
- width: $icon_size - ($wp_logo_padding * 2);
302
- height: $icon_size - ($wp_logo_padding * 2);
303
- padding: $wp_logo_padding;
304
- }
305
-
306
- .dashicons-plus
307
- {
308
- position: absolute;
309
- top: 50%;
310
- font-size: 30px;
311
- margin-top: -10px;
312
- color: #bbb;
313
-
314
- &.fs-first
315
- {
316
- left: 28%;
317
- }
318
- &.fs-second
319
- {
320
- left: 65%;
321
- }
322
- }
323
-
324
- .fs-plugin-icon,
325
- .fs-connect-logo,
326
- .fs-site-icon
327
- {
328
- border: 1px solid #ccc;
329
- padding: 1px;
330
- background: #fff;
331
- }
332
- }
333
-
334
- .fs-terms
335
- {
336
- text-align: center;
337
- font-size: 0.85em;
338
- padding: 5px;
339
- background: rgba(0, 0, 0, 0.05);
340
-
341
- &, a
342
- {
343
- color: #999;
344
- }
345
-
346
- a
347
- {
348
- text-decoration: none;
349
- }
350
- }
351
- }
352
-
353
- @import "multisite-options";
354
- @import "tooltip";
355
- @import "gdpr-consent";
356
-
357
- .rtl
358
- {
359
- #fs_connect
360
- {
361
- .fs-actions
362
- {
363
- padding: 10px 20px;
364
- background: #C0C7CA;
365
-
366
- .button
367
- {
368
- .dashicons
369
- {
370
- font-size: 37px;
371
- margin-left: -8px;
372
- margin-right: 12px;
373
- }
374
-
375
- &.button-primary
376
- {
377
- &:after
378
- {
379
- content: ' \000bb';
380
- }
381
-
382
- &.fs-loading
383
- {
384
- &:after
385
- {
386
- content: '';
387
- }
388
- }
389
- }
390
-
391
- &.button-secondary
392
- {
393
- float: left;
394
- }
395
- }
396
- }
397
-
398
- .fs-permissions
399
- {
400
- ul
401
- {
402
- li
403
- {
404
- div
405
- {
406
- margin-right: 55px;
407
- margin-left: 0;
408
- }
409
-
410
- i.dashicons
411
- {
412
- float: right;
413
- }
414
-
415
- }
416
- }
417
- }
418
-
419
- .fs-visual
420
- {
421
- .fs-site-icon
422
- {
423
- right: 20px;
424
- left: auto;
425
- }
426
-
427
- .fs-connect-logo
428
- {
429
- right: auto;
430
- left: 20px;
431
- }
432
- }
433
- }
434
- }
435
-
436
- #fs_theme_connect_wrapper {
437
- position: fixed;
438
- top: 0;
439
- height: 100%;
440
- width: 100%;
441
- z-index: 99990;
442
- background: rgba(0, 0, 0, 0.75);
443
- text-align: center;
444
- overflow-y: auto;
445
-
446
- &:before {
447
- content: "";
448
- display: inline-block;
449
- vertical-align: middle;
450
- height: 100%;
451
- }
452
-
453
- > button.close {
454
- color: white;
455
- cursor: pointer;
456
- height: 40px;
457
- width: 40px;
458
- position: absolute;
459
- right: 0;
460
- border: 0;
461
- background-color: transparent;
462
- top: 32px;
463
- }
464
-
465
- #fs_connect {
466
- top: 0;
467
- text-align: left;
468
- display: inline-block;
469
- vertical-align: middle;
470
- margin-top: 52px;
471
- margin-bottom: 20px;
472
-
473
- .fs-terms
474
- {
475
- background: rgba(140, 140, 140, 0.64);
476
-
477
- &, a
478
- {
479
- color: #c5c5c5;
480
- }
481
- }
482
- }
483
- }
484
-
485
- .wp-pointer-content
486
- {
487
- #fs_connect
488
- {
489
- margin: 0;
490
- @include box-shadow(none);
491
- }
492
- }
493
-
494
- .fs-opt-in-pointer
495
- {
496
- .wp-pointer-content
497
- {
498
- padding: 0;
499
- }
500
-
501
- &.wp-pointer-top
502
- {
503
- .wp-pointer-arrow
504
- {
505
- border-bottom-color: #dfdfdf;
506
- }
507
- .wp-pointer-arrow-inner
508
- {
509
- border-bottom-color: #fafafa;
510
- }
511
- }
512
-
513
- &.wp-pointer-bottom
514
- {
515
- .wp-pointer-arrow
516
- {
517
- border-top-color: #dfdfdf;
518
- }
519
- .wp-pointer-arrow-inner
520
- {
521
- border-top-color: #fafafa;
522
- }
523
- }
524
-
525
- &.wp-pointer-left
526
- {
527
- .wp-pointer-arrow
528
- {
529
- border-right-color: #dfdfdf;
530
- }
531
- .wp-pointer-arrow-inner
532
- {
533
- border-right-color: #fafafa;
534
- }
535
- }
536
-
537
- &.wp-pointer-right
538
- {
539
- .wp-pointer-arrow
540
- {
541
- border-left-color: #dfdfdf;
542
- }
543
- .wp-pointer-arrow-inner
544
- {
545
- border-left-color: #fafafa;
546
- }
547
- }
548
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
freemius/assets/scss/admin/debug.scss DELETED
@@ -1,135 +0,0 @@
1
- @import "../start";
2
-
3
- .switch
4
- {
5
- position: relative;
6
- display: inline-block;
7
- font-size: 1.6em;
8
- font-weight: bold;
9
- color: #ccc;
10
- text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.8);
11
- height: 18px;
12
- padding: 6px 6px 5px 6px;
13
- border: 1px solid #ccc;
14
- border: 1px solid rgba(0, 0, 0, 0.2);
15
- border-radius: 4px;
16
- background: #ececec;
17
- box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.1), inset 0px 1px 3px 0px rgba(0, 0, 0, 0.1);
18
- cursor: pointer;
19
-
20
- span
21
- {
22
- display: inline-block; width: 35px;
23
- text-transform: uppercase;
24
-
25
- &.on
26
- {
27
- color: $button-primary-bkg;
28
- }
29
- }
30
-
31
- .toggle
32
- {
33
- position: absolute;
34
- top: 1px;
35
- width: 37px;
36
- height: 25px;
37
- border: 1px solid #ccc;
38
- border: 1px solid rgba(0, 0, 0, 0.3);
39
- border-radius: 4px;
40
- background: #fff;
41
- background: -moz-linear-gradient(top, #ececec 0%, #fff 100%);
42
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ececec), color-stop(100%, #fff));
43
- background: -webkit-linear-gradient(top, #ececec 0%, #fff 100%);
44
- background: -o-linear-gradient(top, #ececec 0%, #fff 100%);
45
- background: -ms-linear-gradient(top, #ececec 0%, #fff 100%);
46
- background: linear-gradient(top, #ececec 0%, #fff 100%);
47
- box-shadow: inset 0px 1px 0px 0px rgba(255, 255, 255, 0.5);
48
- z-index: 999;
49
- @include transition(all 0.15s ease-in-out);
50
- }
51
-
52
- &.on .toggle
53
- {
54
- left: 2%;
55
- }
56
- &.off .toggle
57
- {
58
- left: 54%;
59
- }
60
-
61
- /* Round switch */
62
- &.round
63
- {
64
- padding: 0px 20px;
65
- border-radius: 40px;
66
-
67
- .toggle
68
- {
69
- border-radius: 40px;
70
- width: 14px;
71
- height: 14px;
72
- }
73
-
74
- &.on .toggle
75
- {
76
- left: 3%;
77
- background: $button-primary-bkg;
78
- }
79
- &.off .toggle
80
- {
81
- left: 58%;
82
- }
83
- }
84
- }
85
-
86
- .switch-label
87
- {
88
- font-size: 20px;
89
- line-height: 31px;
90
- margin: 0 5px;
91
- }
92
-
93
- #fs_log_book {
94
- table {
95
- font-family: Consolas,Monaco,monospace;
96
- font-size: 12px;
97
-
98
- th {
99
- color: #ccc;
100
- }
101
-
102
- tr {
103
- background: #232525;
104
-
105
- &.alternate {
106
- background: #2b2b2b;
107
- }
108
-
109
- td {
110
- &.fs-col--logger {
111
- color: #5a7435;
112
- }
113
- &.fs-col--type {
114
- color: #ffc861;
115
- }
116
- &.fs-col--function {
117
- color: #a7b7b1;
118
- font-weight: bold;
119
- }
120
- &.fs-col--message {
121
- &, a
122
- {
123
- color: #9a73ac !important;
124
- }
125
- }
126
- &.fs-col--file {
127
- color: #d07922;
128
- }
129
- &.fs-col--timestamp {
130
- color: #6596be;
131
- }
132
- }
133
- }
134
- }
135
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
freemius/assets/scss/admin/dialog-boxes.scss DELETED
@@ -1,10 +0,0 @@
1
- @import "../start";
2
- @import "modal-common";
3
- @import "deactivation-feedback";
4
- @import "subscription-cancellation";
5
- @import "license-activation";
6
- @import "multisite-options";
7
- @import "license-key-resend";
8
- @import "ajax-loader";
9
- @import "auto-install";
10
- @import "buttons";
 
 
 
 
 
 
 
 
 
 
freemius/assets/scss/admin/gdpr-optin-notice.scss DELETED
@@ -1,17 +0,0 @@
1
- .fs-notice[data-id^="gdpr_optin_actions"]
2
- {
3
- .underlined {
4
- text-decoration: underline;
5
- }
6
-
7
- ul {
8
- .button, .action-description {
9
- vertical-align: middle;
10
- }
11
-
12
- .action-description {
13
- display: inline-block;
14
- margin-left: 3px;
15
- }
16
- }
17
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
freemius/assets/scss/admin/index.php DELETED
@@ -1,3 +0,0 @@
1
- <?php
2
- // Silence is golden.
3
- // Hide file structure from users on unprotected servers.
 
 
 
freemius/assets/scss/customizer.scss DELETED
@@ -1,125 +0,0 @@
1
- @import "start";
2
-
3
- #fs_customizer_upsell {
4
- .fs-customizer-plan {
5
- padding: 10px 20px 20px 20px;
6
- border-radius: 3px;
7
- background: #fff;
8
-
9
- h2 {
10
- position: relative;
11
- margin: 0;
12
- line-height: 2em;
13
- text-transform: uppercase;
14
-
15
- .button-link {
16
- top: -2px;
17
- }
18
- }
19
- }
20
-
21
- .fs-feature {
22
- position: relative;
23
- }
24
-
25
- .dashicons-yes {
26
- color: #0085ba;
27
- font-size: 2em;
28
- vertical-align: bottom;
29
- margin-left: -7px;
30
- margin-right: 10px;
31
-
32
- .rtl & {
33
- margin-left: 10px;
34
- margin-right: -7px;
35
- }
36
- }
37
-
38
- .dashicons-editor-help
39
- {
40
- color: #bbb;
41
- cursor: help;
42
-
43
- $tooltip-color: #000;
44
-
45
- .fs-feature-desc {
46
- opacity: 0;
47
- visibility: hidden;
48
- @include transition(opacity 0.3s ease-in-out);
49
-
50
- position: absolute;
51
- background: $tooltip-color;
52
- color: #fff;
53
- font-family: 'arial', serif;
54
- font-size: 12px;
55
- padding: 10px;
56
- z-index: 999999;
57
- bottom: 100%;
58
- margin-bottom: 5px;
59
- left: 0;
60
- right: 0;
61
- @include border-radius(5px);
62
- @include box-shadow(1px 1px 1px rgba(0,0,0,0.2));
63
- line-height: 1.3em;
64
- font-weight: bold;
65
- text-align: left;
66
-
67
- .rtl &
68
- {
69
- text-align: right;
70
- }
71
-
72
- &::after {
73
- content: ' ';
74
- display: block;
75
- width: 0;
76
- height: 0;
77
- border-style: solid;
78
- border-width: 5px 5px 0 5px;
79
- border-color: $tooltip-color transparent transparent transparent;
80
- position: absolute;
81
- top: 100%;
82
- left: 21px;
83
-
84
- .rtl & {
85
- right: 21px;
86
- left: auto;
87
- }
88
- }
89
- }
90
-
91
- &:hover {
92
- .fs-feature-desc {
93
- visibility: visible;
94
- opacity: 1;
95
- }
96
- }
97
- }
98
-
99
- .button-primary {
100
- display: block;
101
- text-align: center;
102
- margin-top: 10px;
103
- }
104
- }
105
-
106
- #fs_customizer_support
107
- {
108
- display: block !important;
109
-
110
- .button {
111
- float: right;
112
- }
113
-
114
- .button-group {
115
- width: 100%;
116
- display: block;
117
- margin-top: 10px;
118
-
119
- .button {
120
- float: none;
121
- width: 50%;
122
- text-align: center;
123
- }
124
- }
125
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
freemius/assets/scss/index.php DELETED
@@ -1,3 +0,0 @@
1
- <?php
2
- // Silence is golden.
3
- // Hide file structure from users on unprotected servers.
 
 
 
freemius/config.php CHANGED
@@ -1,388 +1,388 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.0.4
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- if ( ! defined( 'WP_FS__SLUG' ) ) {
14
- define( 'WP_FS__SLUG', 'freemius' );
15
- }
16
- if ( ! defined( 'WP_FS__DEV_MODE' ) ) {
17
- define( 'WP_FS__DEV_MODE', false );
18
- }
19
-
20
- #--------------------------------------------------------------------------------
21
- #region API Connectivity Issues Simulation
22
- #--------------------------------------------------------------------------------
23
-
24
- if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY' ) ) {
25
- define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY', false );
26
- }
27
- if ( ! defined( 'WP_FS__SIMULATE_NO_CURL' ) ) {
28
- define( 'WP_FS__SIMULATE_NO_CURL', false );
29
- }
30
- if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE' ) ) {
31
- define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE', false );
32
- }
33
- if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL' ) ) {
34
- define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL', false );
35
- }
36
- if ( WP_FS__SIMULATE_NO_CURL ) {
37
- define( 'FS_SDK__SIMULATE_NO_CURL', true );
38
- }
39
- if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE ) {
40
- define( 'FS_SDK__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE', true );
41
- }
42
- if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL ) {
43
- define( 'FS_SDK__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL', true );
44
- }
45
-
46
- #endregion
47
-
48
- if ( ! defined( 'WP_FS__SIMULATE_FREEMIUS_OFF' ) ) {
49
- define( 'WP_FS__SIMULATE_FREEMIUS_OFF', false );
50
- }
51
-
52
- if ( ! defined( 'WP_FS__PING_API_ON_IP_OR_HOST_CHANGES' ) ) {
53
- /**
54
- * @since 1.1.7.3
55
- * @author Vova Feldman (@svovaf)
56
- *
57
- * I'm not sure if shared servers periodically change IP, or the subdomain of the
58
- * admin dashboard. Also, I've seen sites that have strange loop of switching
59
- * between domains on a daily basis. Therefore, to eliminate the risk of
60
- * multiple unwanted connectivity test pings, temporary ignore domain or
61
- * server IP changes.
62
- */
63
- define( 'WP_FS__PING_API_ON_IP_OR_HOST_CHANGES', false );
64
- }
65
-
66
- /**
67
- * If your dev environment supports custom public network IP setup
68
- * like VVV, please update WP_FS__LOCALHOST_IP with your public IP
69
- * and uncomment it during dev.
70
- */
71
- if ( ! defined( 'WP_FS__LOCALHOST_IP' ) ) {
72
- // VVV default public network IP.
73
- define( 'WP_FS__VVV_DEFAULT_PUBLIC_IP', '192.168.50.4' );
74
-
75
- // define( 'WP_FS__LOCALHOST_IP', WP_FS__VVV_DEFAULT_PUBLIC_IP );
76
- }
77
-
78
- /**
79
- * If true and running with secret key, the opt-in process
80
- * will skip the email activation process which is invoked
81
- * when the email of the context user already exist in Freemius
82
- * database (as a security precaution, to prevent sharing user
83
- * secret with unauthorized entity).
84
- *
85
- * IMPORTANT:
86
- * AS A SECURITY PRECAUTION, WE VALIDATE THE TIMESTAMP OF THE OPT-IN REQUEST.
87
- * THEREFORE, MAKE SURE THAT WHEN USING THIS PARAMETER,YOUR TESTING ENVIRONMENT'S
88
- * CLOCK IS SYNCED.
89
- */
90
- if ( ! defined( 'WP_FS__SKIP_EMAIL_ACTIVATION' ) ) {
91
- define( 'WP_FS__SKIP_EMAIL_ACTIVATION', false );
92
- }
93
-
94
-
95
- #--------------------------------------------------------------------------------
96
- #region Directories
97
- #--------------------------------------------------------------------------------
98
-
99
- if ( ! defined( 'WP_FS__DIR' ) ) {
100
- define( 'WP_FS__DIR', dirname( __FILE__ ) );
101
- }
102
- if ( ! defined( 'WP_FS__DIR_INCLUDES' ) ) {
103
- define( 'WP_FS__DIR_INCLUDES', WP_FS__DIR . '/includes' );
104
- }
105
- if ( ! defined( 'WP_FS__DIR_TEMPLATES' ) ) {
106
- define( 'WP_FS__DIR_TEMPLATES', WP_FS__DIR . '/templates' );
107
- }
108
- if ( ! defined( 'WP_FS__DIR_ASSETS' ) ) {
109
- define( 'WP_FS__DIR_ASSETS', WP_FS__DIR . '/assets' );
110
- }
111
- if ( ! defined( 'WP_FS__DIR_CSS' ) ) {
112
- define( 'WP_FS__DIR_CSS', WP_FS__DIR_ASSETS . '/css' );
113
- }
114
- if ( ! defined( 'WP_FS__DIR_JS' ) ) {
115
- define( 'WP_FS__DIR_JS', WP_FS__DIR_ASSETS . '/js' );
116
- }
117
- if ( ! defined( 'WP_FS__DIR_IMG' ) ) {
118
- define( 'WP_FS__DIR_IMG', WP_FS__DIR_ASSETS . '/img' );
119
- }
120
- if ( ! defined( 'WP_FS__DIR_SDK' ) ) {
121
- define( 'WP_FS__DIR_SDK', WP_FS__DIR_INCLUDES . '/sdk' );
122
- }
123
-
124
- #endregion
125
-
126
- /**
127
- * Domain / URL / Address
128
- */
129
- define( 'WP_FS__ROOT_DOMAIN_PRODUCTION', 'freemius.com' );
130
- define( 'WP_FS__DOMAIN_PRODUCTION', 'wp.freemius.com' );
131
- define( 'WP_FS__ADDRESS_PRODUCTION', 'https://' . WP_FS__DOMAIN_PRODUCTION );
132
-
133
- if ( ! defined( 'WP_FS__DOMAIN_LOCALHOST' ) ) {
134
- define( 'WP_FS__DOMAIN_LOCALHOST', 'wp.freemius' );
135
- }
136
- if ( ! defined( 'WP_FS__ADDRESS_LOCALHOST' ) ) {
137
- define( 'WP_FS__ADDRESS_LOCALHOST', 'http://' . WP_FS__DOMAIN_LOCALHOST . ':8080' );
138
- }
139
-
140
- if ( ! defined( 'WP_FS__TESTING_DOMAIN' ) ) {
141
- define( 'WP_FS__TESTING_DOMAIN', 'fswp' );
142
- }
143
-
144
- #--------------------------------------------------------------------------------
145
- #region HTTP
146
- #--------------------------------------------------------------------------------
147
-
148
- if ( ! defined( 'WP_FS__IS_HTTP_REQUEST' ) ) {
149
- define( 'WP_FS__IS_HTTP_REQUEST', isset( $_SERVER['HTTP_HOST'] ) );
150
- }
151
-
152
- if ( ! defined( 'WP_FS__IS_HTTPS' ) ) {
153
- define( 'WP_FS__IS_HTTPS', ( WP_FS__IS_HTTP_REQUEST &&
154
- // Checks if CloudFlare's HTTPS (Flexible SSL support).
155
- isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) &&
156
- 'https' === strtolower( $_SERVER['HTTP_X_FORWARDED_PROTO'] )
157
- ) ||
158
- // Check if HTTPS request.
159
- ( isset( $_SERVER['HTTPS'] ) && 'on' == $_SERVER['HTTPS'] ) ||
160
- ( isset( $_SERVER['SERVER_PORT'] ) && 443 == $_SERVER['SERVER_PORT'] )
161
- );
162
- }
163
-
164
- if ( ! defined( 'WP_FS__IS_POST_REQUEST' ) ) {
165
- define( 'WP_FS__IS_POST_REQUEST', ( WP_FS__IS_HTTP_REQUEST &&
166
- strtoupper( $_SERVER['REQUEST_METHOD'] ) == 'POST' ) );
167
- }
168
-
169
- if ( ! defined( 'WP_FS__REMOTE_ADDR' ) ) {
170
- define( 'WP_FS__REMOTE_ADDR', fs_get_ip() );
171
- }
172
-
173
- if ( ! defined( 'WP_FS__IS_LOCALHOST' ) ) {
174
- if ( defined( 'WP_FS__LOCALHOST_IP' ) ) {
175
- define( 'WP_FS__IS_LOCALHOST', ( WP_FS__LOCALHOST_IP === WP_FS__REMOTE_ADDR ) );
176
- } else {
177
- define( 'WP_FS__IS_LOCALHOST', WP_FS__IS_HTTP_REQUEST &&
178
- is_string( WP_FS__REMOTE_ADDR ) &&
179
- ( substr( WP_FS__REMOTE_ADDR, 0, 4 ) === '127.' ||
180
- WP_FS__REMOTE_ADDR === '::1' )
181
- );
182
- }
183
- }
184
-
185
- if ( ! defined( 'WP_FS__IS_LOCALHOST_FOR_SERVER' ) ) {
186
- define( 'WP_FS__IS_LOCALHOST_FOR_SERVER', ( ! WP_FS__IS_HTTP_REQUEST ||
187
- false !== strpos( $_SERVER['HTTP_HOST'], 'localhost' ) ) );
188
- }
189
-
190
- #endregion
191
-
192
- if ( ! defined( 'WP_FS__IS_PRODUCTION_MODE' ) ) {
193
- // By default, run with Freemius production servers.
194
- define( 'WP_FS__IS_PRODUCTION_MODE', true );
195
- }
196
-
197
- if ( ! defined( 'WP_FS__ADDRESS' ) ) {
198
- define( 'WP_FS__ADDRESS', ( WP_FS__IS_PRODUCTION_MODE ? WP_FS__ADDRESS_PRODUCTION : WP_FS__ADDRESS_LOCALHOST ) );
199
- }
200
-
201
-
202
- #--------------------------------------------------------------------------------
203
- #region API
204
- #--------------------------------------------------------------------------------
205
-
206
- if ( ! defined( 'WP_FS__API_ADDRESS_LOCALHOST' ) ) {
207
- define( 'WP_FS__API_ADDRESS_LOCALHOST', 'http://api.freemius:8080' );
208
- }
209
- if ( ! defined( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST' ) ) {
210
- define( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST', 'http://sandbox-api.freemius:8080' );
211
- }
212
-
213
- // Set API address for local testing.
214
- if ( ! WP_FS__IS_PRODUCTION_MODE ) {
215
- if ( ! defined( 'FS_API__ADDRESS' ) ) {
216
- define( 'FS_API__ADDRESS', WP_FS__API_ADDRESS_LOCALHOST );
217
- }
218
- if ( ! defined( 'FS_API__SANDBOX_ADDRESS' ) ) {
219
- define( 'FS_API__SANDBOX_ADDRESS', WP_FS__API_SANDBOX_ADDRESS_LOCALHOST );
220
- }
221
- }
222
-
223
- #endregion
224
-
225
- #--------------------------------------------------------------------------------
226
- #region Checkout
227
- #--------------------------------------------------------------------------------
228
-
229
- if ( ! defined( 'FS_CHECKOUT__ADDRESS_PRODUCTION' ) ) {
230
- define( 'FS_CHECKOUT__ADDRESS_PRODUCTION', 'https://checkout.freemius.com' );
231
- }
232
-
233
- if ( ! defined( 'FS_CHECKOUT__ADDRESS_LOCALHOST' ) ) {
234
- define( 'FS_CHECKOUT__ADDRESS_LOCALHOST', 'http://checkout.freemius-local.com:8080' );
235
- }
236
-
237
- if ( ! defined( 'FS_CHECKOUT__ADDRESS' ) ) {
238
- define( 'FS_CHECKOUT__ADDRESS', ( WP_FS__IS_PRODUCTION_MODE ? FS_CHECKOUT__ADDRESS_PRODUCTION : FS_CHECKOUT__ADDRESS_LOCALHOST ) );
239
- }
240
-
241
- #endregion
242
-
243
- define( 'WP_FS___OPTION_PREFIX', 'fs' . ( WP_FS__IS_PRODUCTION_MODE ? '' : '_dbg' ) . '_' );
244
-
245
- if ( ! defined( 'WP_FS__ACCOUNTS_OPTION_NAME' ) ) {
246
- define( 'WP_FS__ACCOUNTS_OPTION_NAME', WP_FS___OPTION_PREFIX . 'accounts' );
247
- }
248
- if ( ! defined( 'WP_FS__API_CACHE_OPTION_NAME' ) ) {
249
- define( 'WP_FS__API_CACHE_OPTION_NAME', WP_FS___OPTION_PREFIX . 'api_cache' );
250
- }
251
- if ( ! defined( 'WP_FS__GDPR_OPTION_NAME' ) ) {
252
- define( 'WP_FS__GDPR_OPTION_NAME', WP_FS___OPTION_PREFIX . 'gdpr' );
253
- }
254
- define( 'WP_FS__OPTIONS_OPTION_NAME', WP_FS___OPTION_PREFIX . 'options' );
255
-
256
- /**
257
- * Module types
258
- *
259
- * @since 1.2.2
260
- */
261
- define( 'WP_FS__MODULE_TYPE_PLUGIN', 'plugin' );
262
- define( 'WP_FS__MODULE_TYPE_THEME', 'theme' );
263
-
264
- /**
265
- * Billing Frequencies
266
- */
267
- define( 'WP_FS__PERIOD_ANNUALLY', 'annual' );
268
- define( 'WP_FS__PERIOD_MONTHLY', 'monthly' );
269
- define( 'WP_FS__PERIOD_LIFETIME', 'lifetime' );
270
-
271
- /**
272
- * Plans
273
- */
274
- define( 'WP_FS__PLAN_DEFAULT_PAID', false );
275
- define( 'WP_FS__PLAN_FREE', 'free' );
276
- define( 'WP_FS__PLAN_TRIAL', 'trial' );
277
-
278
- /**
279
- * Times in seconds
280
- */
281
- if ( ! defined( 'WP_FS__TIME_5_MIN_IN_SEC' ) ) {
282
- define( 'WP_FS__TIME_5_MIN_IN_SEC', 300 );
283
- }
284
- if ( ! defined( 'WP_FS__TIME_10_MIN_IN_SEC' ) ) {
285
- define( 'WP_FS__TIME_10_MIN_IN_SEC', 600 );
286
- }
287
- // define( 'WP_FS__TIME_15_MIN_IN_SEC', 900 );
288
- if ( ! defined( 'WP_FS__TIME_12_HOURS_IN_SEC' ) ) {
289
- define( 'WP_FS__TIME_12_HOURS_IN_SEC', 43200 );
290
- }
291
- if ( ! defined( 'WP_FS__TIME_24_HOURS_IN_SEC' ) ) {
292
- define( 'WP_FS__TIME_24_HOURS_IN_SEC', WP_FS__TIME_12_HOURS_IN_SEC * 2 );
293
- }
294
- if ( ! defined( 'WP_FS__TIME_WEEK_IN_SEC' ) ) {
295
- define( 'WP_FS__TIME_WEEK_IN_SEC', 7 * WP_FS__TIME_24_HOURS_IN_SEC );
296
- }
297
-
298
- #--------------------------------------------------------------------------------
299
- #region Debugging
300
- #--------------------------------------------------------------------------------
301
-
302
- if ( ! defined( 'WP_FS__DEBUG_SDK' ) ) {
303
- $debug_mode = get_option( 'fs_debug_mode', null );
304
-
305
- if ( $debug_mode === null ) {
306
- $debug_mode = false;
307
- add_option( 'fs_debug_mode', $debug_mode );
308
- }
309
-
310
- define( 'WP_FS__DEBUG_SDK', is_numeric( $debug_mode ) ? ( 0 < $debug_mode ) : WP_FS__DEV_MODE );
311
- }
312
-
313
- if ( ! defined( 'WP_FS__ECHO_DEBUG_SDK' ) ) {
314
- define( 'WP_FS__ECHO_DEBUG_SDK', WP_FS__DEV_MODE && ! empty( $_GET['fs_dbg_echo'] ) );
315
- }
316
- if ( ! defined( 'WP_FS__LOG_DATETIME_FORMAT' ) ) {
317
- define( 'WP_FS__LOG_DATETIME_FORMAT', 'Y-m-d H:i:s' );
318
- }
319
- if ( ! defined( 'FS_API__LOGGER_ON' ) ) {
320
- define( 'FS_API__LOGGER_ON', WP_FS__DEBUG_SDK );
321
- }
322
-
323
- if ( WP_FS__ECHO_DEBUG_SDK ) {
324
- error_reporting( E_ALL );
325
- }
326
-
327
- #endregion
328
-
329
- if ( ! defined( 'WP_FS__SCRIPT_START_TIME' ) ) {
330
- define( 'WP_FS__SCRIPT_START_TIME', time() );
331
- }
332
- if ( ! defined( 'WP_FS__DEFAULT_PRIORITY' ) ) {
333
- define( 'WP_FS__DEFAULT_PRIORITY', 10 );
334
- }
335
- if ( ! defined( 'WP_FS__LOWEST_PRIORITY' ) ) {
336
- define( 'WP_FS__LOWEST_PRIORITY', 999999999 );
337
- }
338
-
339
- #--------------------------------------------------------------------------------
340
- #region Multisite Network
341
- #--------------------------------------------------------------------------------
342
-
343
- /**
344
- * Do not use this define directly, it will have the wrong value
345
- * during plugin uninstall/deletion when the inclusion of the plugin
346
- * is triggered due to registration with register_uninstall_hook().
347
- *
348
- * Instead, use fs_is_network_admin().
349
- *
350
- * @author Vova Feldman (@svovaf)
351
- */
352
- if ( ! defined( 'WP_FS__IS_NETWORK_ADMIN' ) ) {
353
- define( 'WP_FS__IS_NETWORK_ADMIN',
354
- is_multisite() &&
355
- ( is_network_admin() ||
356
- ( ( defined( 'DOING_AJAX' ) && DOING_AJAX &&
357
- ( isset( $_REQUEST['_fs_network_admin'] ) /*||
358
- ( ! empty( $_REQUEST['action'] ) && 'delete-plugin' === $_REQUEST['action'] )*/ )
359
- ) ||
360
- // Plugin uninstall.
361
- defined( 'WP_UNINSTALL_PLUGIN' ) )
362
- )
363
- );
364
- }
365
-
366
- /**
367
- * Do not use this define directly, it will have the wrong value
368
- * during plugin uninstall/deletion when the inclusion of the plugin
369
- * is triggered due to registration with register_uninstall_hook().
370
- *
371
- * Instead, use fs_is_blog_admin().
372
- *
373
- * @author Vova Feldman (@svovaf)
374
- */
375
- if ( ! defined( 'WP_FS__IS_BLOG_ADMIN' ) ) {
376
- define( 'WP_FS__IS_BLOG_ADMIN', is_blog_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_REQUEST['_fs_blog_admin'] ) ) );
377
- }
378
-
379
- if ( ! defined( 'WP_FS__SHOW_NETWORK_EVEN_WHEN_DELEGATED' ) ) {
380
- // Set to true to show network level settings even if delegated to site admins.
381
- define( 'WP_FS__SHOW_NETWORK_EVEN_WHEN_DELEGATED', false );
382
- }
383
-
384
- #endregion
385
-
386
- if ( ! defined( 'WP_FS__DEMO_MODE' ) ) {
387
- define( 'WP_FS__DEMO_MODE', false );
388
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.0.4
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ if ( ! defined( 'WP_FS__SLUG' ) ) {
14
+ define( 'WP_FS__SLUG', 'freemius' );
15
+ }
16
+ if ( ! defined( 'WP_FS__DEV_MODE' ) ) {
17
+ define( 'WP_FS__DEV_MODE', false );
18
+ }
19
+
20
+ #--------------------------------------------------------------------------------
21
+ #region API Connectivity Issues Simulation
22
+ #--------------------------------------------------------------------------------
23
+
24
+ if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY' ) ) {
25
+ define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY', false );
26
+ }
27
+ if ( ! defined( 'WP_FS__SIMULATE_NO_CURL' ) ) {
28
+ define( 'WP_FS__SIMULATE_NO_CURL', false );
29
+ }
30
+ if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE' ) ) {
31
+ define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE', false );
32
+ }
33
+ if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL' ) ) {
34
+ define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL', false );
35
+ }
36
+ if ( WP_FS__SIMULATE_NO_CURL ) {
37
+ define( 'FS_SDK__SIMULATE_NO_CURL', true );
38
+ }
39
+ if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE ) {
40
+ define( 'FS_SDK__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE', true );
41
+ }
42
+ if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL ) {
43
+ define( 'FS_SDK__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL', true );
44
+ }
45
+
46
+ #endregion
47
+
48
+ if ( ! defined( 'WP_FS__SIMULATE_FREEMIUS_OFF' ) ) {
49
+ define( 'WP_FS__SIMULATE_FREEMIUS_OFF', false );
50
+ }
51
+
52
+ if ( ! defined( 'WP_FS__PING_API_ON_IP_OR_HOST_CHANGES' ) ) {
53
+ /**
54
+ * @since 1.1.7.3
55
+ * @author Vova Feldman (@svovaf)
56
+ *
57
+ * I'm not sure if shared servers periodically change IP, or the subdomain of the
58
+ * admin dashboard. Also, I've seen sites that have strange loop of switching
59
+ * between domains on a daily basis. Therefore, to eliminate the risk of
60
+ * multiple unwanted connectivity test pings, temporary ignore domain or
61
+ * server IP changes.
62
+ */
63
+ define( 'WP_FS__PING_API_ON_IP_OR_HOST_CHANGES', false );
64
+ }
65
+
66
+ /**
67
+ * If your dev environment supports custom public network IP setup
68
+ * like VVV, please update WP_FS__LOCALHOST_IP with your public IP
69
+ * and uncomment it during dev.
70
+ */
71
+ if ( ! defined( 'WP_FS__LOCALHOST_IP' ) ) {
72
+ // VVV default public network IP.
73
+ define( 'WP_FS__VVV_DEFAULT_PUBLIC_IP', '192.168.50.4' );
74
+
75
+ // define( 'WP_FS__LOCALHOST_IP', WP_FS__VVV_DEFAULT_PUBLIC_IP );
76
+ }
77
+
78
+ /**
79
+ * If true and running with secret key, the opt-in process
80
+ * will skip the email activation process which is invoked
81
+ * when the email of the context user already exist in Freemius
82
+ * database (as a security precaution, to prevent sharing user
83
+ * secret with unauthorized entity).
84
+ *
85
+ * IMPORTANT:
86
+ * AS A SECURITY PRECAUTION, WE VALIDATE THE TIMESTAMP OF THE OPT-IN REQUEST.
87
+ * THEREFORE, MAKE SURE THAT WHEN USING THIS PARAMETER,YOUR TESTING ENVIRONMENT'S
88
+ * CLOCK IS SYNCED.
89
+ */
90
+ if ( ! defined( 'WP_FS__SKIP_EMAIL_ACTIVATION' ) ) {
91
+ define( 'WP_FS__SKIP_EMAIL_ACTIVATION', false );
92
+ }
93
+
94
+
95
+ #--------------------------------------------------------------------------------
96
+ #region Directories
97
+ #--------------------------------------------------------------------------------
98
+
99
+ if ( ! defined( 'WP_FS__DIR' ) ) {
100
+ define( 'WP_FS__DIR', dirname( __FILE__ ) );
101
+ }
102
+ if ( ! defined( 'WP_FS__DIR_INCLUDES' ) ) {
103
+ define( 'WP_FS__DIR_INCLUDES', WP_FS__DIR . '/includes' );
104
+ }
105
+ if ( ! defined( 'WP_FS__DIR_TEMPLATES' ) ) {
106
+ define( 'WP_FS__DIR_TEMPLATES', WP_FS__DIR . '/templates' );
107
+ }
108
+ if ( ! defined( 'WP_FS__DIR_ASSETS' ) ) {
109
+ define( 'WP_FS__DIR_ASSETS', WP_FS__DIR . '/assets' );
110
+ }
111
+ if ( ! defined( 'WP_FS__DIR_CSS' ) ) {
112
+ define( 'WP_FS__DIR_CSS', WP_FS__DIR_ASSETS . '/css' );
113
+ }
114
+ if ( ! defined( 'WP_FS__DIR_JS' ) ) {
115
+ define( 'WP_FS__DIR_JS', WP_FS__DIR_ASSETS . '/js' );
116
+ }
117
+ if ( ! defined( 'WP_FS__DIR_IMG' ) ) {
118
+ define( 'WP_FS__DIR_IMG', WP_FS__DIR_ASSETS . '/img' );
119
+ }
120
+ if ( ! defined( 'WP_FS__DIR_SDK' ) ) {
121
+ define( 'WP_FS__DIR_SDK', WP_FS__DIR_INCLUDES . '/sdk' );
122
+ }
123
+
124
+ #endregion
125
+
126
+ /**
127
+ * Domain / URL / Address
128
+ */
129
+ define( 'WP_FS__ROOT_DOMAIN_PRODUCTION', 'freemius.com' );
130
+ define( 'WP_FS__DOMAIN_PRODUCTION', 'wp.freemius.com' );
131
+ define( 'WP_FS__ADDRESS_PRODUCTION', 'https://' . WP_FS__DOMAIN_PRODUCTION );
132
+
133
+ if ( ! defined( 'WP_FS__DOMAIN_LOCALHOST' ) ) {
134
+ define( 'WP_FS__DOMAIN_LOCALHOST', 'wp.freemius' );
135
+ }
136
+ if ( ! defined( 'WP_FS__ADDRESS_LOCALHOST' ) ) {
137
+ define( 'WP_FS__ADDRESS_LOCALHOST', 'http://' . WP_FS__DOMAIN_LOCALHOST . ':8080' );
138
+ }
139
+
140
+ if ( ! defined( 'WP_FS__TESTING_DOMAIN' ) ) {
141
+ define( 'WP_FS__TESTING_DOMAIN', 'fswp' );
142
+ }
143
+
144
+ #--------------------------------------------------------------------------------
145
+ #region HTTP
146
+ #--------------------------------------------------------------------------------
147
+
148
+ if ( ! defined( 'WP_FS__IS_HTTP_REQUEST' ) ) {
149
+ define( 'WP_FS__IS_HTTP_REQUEST', isset( $_SERVER['HTTP_HOST'] ) );
150
+ }
151
+
152
+ if ( ! defined( 'WP_FS__IS_HTTPS' ) ) {
153
+ define( 'WP_FS__IS_HTTPS', ( WP_FS__IS_HTTP_REQUEST &&
154
+ // Checks if CloudFlare's HTTPS (Flexible SSL support).
155
+ isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) &&
156
+ 'https' === strtolower( $_SERVER['HTTP_X_FORWARDED_PROTO'] )
157
+ ) ||
158
+ // Check if HTTPS request.
159
+ ( isset( $_SERVER['HTTPS'] ) && 'on' == $_SERVER['HTTPS'] ) ||
160
+ ( isset( $_SERVER['SERVER_PORT'] ) && 443 == $_SERVER['SERVER_PORT'] )
161
+ );
162
+ }
163
+
164
+ if ( ! defined( 'WP_FS__IS_POST_REQUEST' ) ) {
165
+ define( 'WP_FS__IS_POST_REQUEST', ( WP_FS__IS_HTTP_REQUEST &&
166
+ strtoupper( $_SERVER['REQUEST_METHOD'] ) == 'POST' ) );
167
+ }
168
+
169
+ if ( ! defined( 'WP_FS__REMOTE_ADDR' ) ) {
170
+ define( 'WP_FS__REMOTE_ADDR', fs_get_ip() );
171
+ }
172
+
173
+ if ( ! defined( 'WP_FS__IS_LOCALHOST' ) ) {
174
+ if ( defined( 'WP_FS__LOCALHOST_IP' ) ) {
175
+ define( 'WP_FS__IS_LOCALHOST', ( WP_FS__LOCALHOST_IP === WP_FS__REMOTE_ADDR ) );
176
+ } else {
177
+ define( 'WP_FS__IS_LOCALHOST', WP_FS__IS_HTTP_REQUEST &&
178
+ is_string( WP_FS__REMOTE_ADDR ) &&
179
+ ( substr( WP_FS__REMOTE_ADDR, 0, 4 ) === '127.' ||
180
+ WP_FS__REMOTE_ADDR === '::1' )
181
+ );
182
+ }
183
+ }
184
+
185
+ if ( ! defined( 'WP_FS__IS_LOCALHOST_FOR_SERVER' ) ) {
186
+ define( 'WP_FS__IS_LOCALHOST_FOR_SERVER', ( ! WP_FS__IS_HTTP_REQUEST ||
187
+ false !== strpos( $_SERVER['HTTP_HOST'], 'localhost' ) ) );
188
+ }
189
+
190
+ #endregion
191
+
192
+ if ( ! defined( 'WP_FS__IS_PRODUCTION_MODE' ) ) {
193
+ // By default, run with Freemius production servers.
194
+ define( 'WP_FS__IS_PRODUCTION_MODE', true );
195
+ }
196
+
197
+ if ( ! defined( 'WP_FS__ADDRESS' ) ) {
198
+ define( 'WP_FS__ADDRESS', ( WP_FS__IS_PRODUCTION_MODE ? WP_FS__ADDRESS_PRODUCTION : WP_FS__ADDRESS_LOCALHOST ) );
199
+ }
200
+
201
+
202
+ #--------------------------------------------------------------------------------
203
+ #region API
204
+ #--------------------------------------------------------------------------------
205
+
206
+ if ( ! defined( 'WP_FS__API_ADDRESS_LOCALHOST' ) ) {
207
+ define( 'WP_FS__API_ADDRESS_LOCALHOST', 'http://api.freemius-local.com:8080' );
208
+ }
209
+ if ( ! defined( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST' ) ) {
210
+ define( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST', 'http://sandbox-api.freemius:8080' );
211
+ }
212
+
213
+ // Set API address for local testing.
214
+ if ( ! WP_FS__IS_PRODUCTION_MODE ) {
215
+ if ( ! defined( 'FS_API__ADDRESS' ) ) {
216
+ define( 'FS_API__ADDRESS', WP_FS__API_ADDRESS_LOCALHOST );
217
+ }
218
+ if ( ! defined( 'FS_API__SANDBOX_ADDRESS' ) ) {
219
+ define( 'FS_API__SANDBOX_ADDRESS', WP_FS__API_SANDBOX_ADDRESS_LOCALHOST );
220
+ }
221
+ }
222
+
223
+ #endregion
224
+
225
+ #--------------------------------------------------------------------------------
226
+ #region Checkout
227
+ #--------------------------------------------------------------------------------
228
+
229
+ if ( ! defined( 'FS_CHECKOUT__ADDRESS_PRODUCTION' ) ) {
230
+ define( 'FS_CHECKOUT__ADDRESS_PRODUCTION', 'https://checkout.freemius.com' );
231
+ }
232
+
233
+ if ( ! defined( 'FS_CHECKOUT__ADDRESS_LOCALHOST' ) ) {
234
+ define( 'FS_CHECKOUT__ADDRESS_LOCALHOST', 'http://checkout.freemius-local.com:8080' );
235
+ }
236
+
237
+ if ( ! defined( 'FS_CHECKOUT__ADDRESS' ) ) {
238
+ define( 'FS_CHECKOUT__ADDRESS', ( WP_FS__IS_PRODUCTION_MODE ? FS_CHECKOUT__ADDRESS_PRODUCTION : FS_CHECKOUT__ADDRESS_LOCALHOST ) );
239
+ }
240
+
241
+ #endregion
242
+
243
+ define( 'WP_FS___OPTION_PREFIX', 'fs' . ( WP_FS__IS_PRODUCTION_MODE ? '' : '_dbg' ) . '_' );
244
+
245
+ if ( ! defined( 'WP_FS__ACCOUNTS_OPTION_NAME' ) ) {
246
+ define( 'WP_FS__ACCOUNTS_OPTION_NAME', WP_FS___OPTION_PREFIX . 'accounts' );
247
+ }
248
+ if ( ! defined( 'WP_FS__API_CACHE_OPTION_NAME' ) ) {
249
+ define( 'WP_FS__API_CACHE_OPTION_NAME', WP_FS___OPTION_PREFIX . 'api_cache' );
250
+ }
251
+ if ( ! defined( 'WP_FS__GDPR_OPTION_NAME' ) ) {
252
+ define( 'WP_FS__GDPR_OPTION_NAME', WP_FS___OPTION_PREFIX . 'gdpr' );
253
+ }
254
+ define( 'WP_FS__OPTIONS_OPTION_NAME', WP_FS___OPTION_PREFIX . 'options' );
255
+
256
+ /**
257
+ * Module types
258
+ *
259
+ * @since 1.2.2
260
+ */
261
+ define( 'WP_FS__MODULE_TYPE_PLUGIN', 'plugin' );
262
+ define( 'WP_FS__MODULE_TYPE_THEME', 'theme' );
263
+
264
+ /**
265
+ * Billing Frequencies
266
+ */
267
+ define( 'WP_FS__PERIOD_ANNUALLY', 'annual' );
268
+ define( 'WP_FS__PERIOD_MONTHLY', 'monthly' );
269
+ define( 'WP_FS__PERIOD_LIFETIME', 'lifetime' );
270
+
271
+ /**
272
+ * Plans
273
+ */
274
+ define( 'WP_FS__PLAN_DEFAULT_PAID', false );
275
+ define( 'WP_FS__PLAN_FREE', 'free' );
276
+ define( 'WP_FS__PLAN_TRIAL', 'trial' );
277
+
278
+ /**
279
+ * Times in seconds
280
+ */
281
+ if ( ! defined( 'WP_FS__TIME_5_MIN_IN_SEC' ) ) {
282
+ define( 'WP_FS__TIME_5_MIN_IN_SEC', 300 );
283
+ }
284
+ if ( ! defined( 'WP_FS__TIME_10_MIN_IN_SEC' ) ) {
285
+ define( 'WP_FS__TIME_10_MIN_IN_SEC', 600 );
286
+ }
287
+ // define( 'WP_FS__TIME_15_MIN_IN_SEC', 900 );
288
+ if ( ! defined( 'WP_FS__TIME_12_HOURS_IN_SEC' ) ) {
289
+ define( 'WP_FS__TIME_12_HOURS_IN_SEC', 43200 );
290
+ }
291
+ if ( ! defined( 'WP_FS__TIME_24_HOURS_IN_SEC' ) ) {
292
+ define( 'WP_FS__TIME_24_HOURS_IN_SEC', WP_FS__TIME_12_HOURS_IN_SEC * 2 );
293
+ }
294
+ if ( ! defined( 'WP_FS__TIME_WEEK_IN_SEC' ) ) {
295
+ define( 'WP_FS__TIME_WEEK_IN_SEC', 7 * WP_FS__TIME_24_HOURS_IN_SEC );
296
+ }
297
+
298
+ #--------------------------------------------------------------------------------
299
+ #region Debugging
300
+ #--------------------------------------------------------------------------------
301
+
302
+ if ( ! defined( 'WP_FS__DEBUG_SDK' ) ) {
303
+ $debug_mode = get_option( 'fs_debug_mode', null );
304
+
305
+ if ( $debug_mode === null ) {
306
+ $debug_mode = false;
307
+ add_option( 'fs_debug_mode', $debug_mode );
308
+ }
309
+
310
+ define( 'WP_FS__DEBUG_SDK', is_numeric( $debug_mode ) ? ( 0 < $debug_mode ) : WP_FS__DEV_MODE );
311
+ }
312
+
313
+ if ( ! defined( 'WP_FS__ECHO_DEBUG_SDK' ) ) {
314
+ define( 'WP_FS__ECHO_DEBUG_SDK', WP_FS__DEV_MODE && ! empty( $_GET['fs_dbg_echo'] ) );
315
+ }
316
+ if ( ! defined( 'WP_FS__LOG_DATETIME_FORMAT' ) ) {
317
+ define( 'WP_FS__LOG_DATETIME_FORMAT', 'Y-m-d H:i:s' );
318
+ }
319
+ if ( ! defined( 'FS_API__LOGGER_ON' ) ) {
320
+ define( 'FS_API__LOGGER_ON', WP_FS__DEBUG_SDK );
321
+ }
322
+
323
+ if ( WP_FS__ECHO_DEBUG_SDK ) {
324
+ error_reporting( E_ALL );
325
+ }
326
+
327
+ #endregion
328
+
329
+ if ( ! defined( 'WP_FS__SCRIPT_START_TIME' ) ) {
330
+ define( 'WP_FS__SCRIPT_START_TIME', time() );
331
+ }
332
+ if ( ! defined( 'WP_FS__DEFAULT_PRIORITY' ) ) {
333
+ define( 'WP_FS__DEFAULT_PRIORITY', 10 );
334
+ }
335
+ if ( ! defined( 'WP_FS__LOWEST_PRIORITY' ) ) {
336
+ define( 'WP_FS__LOWEST_PRIORITY', 999999999 );
337
+ }
338
+
339
+ #--------------------------------------------------------------------------------
340
+ #region Multisite Network
341
+ #--------------------------------------------------------------------------------
342
+
343
+ /**
344
+ * Do not use this define directly, it will have the wrong value
345
+ * during plugin uninstall/deletion when the inclusion of the plugin
346
+ * is triggered due to registration with register_uninstall_hook().
347
+ *
348
+ * Instead, use fs_is_network_admin().
349
+ *
350
+ * @author Vova Feldman (@svovaf)
351
+ */
352
+ if ( ! defined( 'WP_FS__IS_NETWORK_ADMIN' ) ) {
353
+ define( 'WP_FS__IS_NETWORK_ADMIN',
354
+ is_multisite() &&
355
+ ( is_network_admin() ||
356
+ ( ( defined( 'DOING_AJAX' ) && DOING_AJAX &&
357
+ ( isset( $_REQUEST['_fs_network_admin'] ) /*||
358
+ ( ! empty( $_REQUEST['action'] ) && 'delete-plugin' === $_REQUEST['action'] )*/ )
359
+ ) ||
360
+ // Plugin uninstall.
361
+ defined( 'WP_UNINSTALL_PLUGIN' ) )
362
+ )
363
+ );
364
+ }
365
+
366
+ /**
367
+ * Do not use this define directly, it will have the wrong value
368
+ * during plugin uninstall/deletion when the inclusion of the plugin
369
+ * is triggered due to registration with register_uninstall_hook().
370
+ *
371
+ * Instead, use fs_is_blog_admin().
372
+ *
373
+ * @author Vova Feldman (@svovaf)
374
+ */
375
+ if ( ! defined( 'WP_FS__IS_BLOG_ADMIN' ) ) {
376
+ define( 'WP_FS__IS_BLOG_ADMIN', is_blog_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_REQUEST['_fs_blog_admin'] ) ) );
377
+ }
378
+
379
+ if ( ! defined( 'WP_FS__SHOW_NETWORK_EVEN_WHEN_DELEGATED' ) ) {
380
+ // Set to true to show network level settings even if delegated to site admins.
381
+ define( 'WP_FS__SHOW_NETWORK_EVEN_WHEN_DELEGATED', false );
382
+ }
383
+
384
+ #endregion
385
+
386
+ if ( ! defined( 'WP_FS__DEMO_MODE' ) ) {
387
+ define( 'WP_FS__DEMO_MODE', false );
388
  }
freemius/includes/class-freemius.php CHANGED
@@ -399,9 +399,11 @@
399
  $this->_is_multisite_integrated &&
400
  // Themes are always network activated, but the ACTUAL activation is per site.
401
  $this->is_plugin() &&
402
- ( is_plugin_active_for_network( $this->_plugin_basename ) ||
403
- // Plugin network level activation or uninstall.
404
- is_plugin_inactive( $this->_plugin_basename ) )
 
 
405
  );
406
 
407
  $this->_storage->set_network_active(
@@ -409,6 +411,17 @@
409
  $this->is_delegated_connection()
410
  );
411
 
 
 
 
 
 
 
 
 
 
 
 
412
  #region Migration
413
 
414
  if ( is_multisite() ) {
@@ -493,6 +506,188 @@
493
  $this->_version_updates_handler();
494
  }
495
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
496
  /**
497
  * Checks whether this module has a settings menu.
498
  *
@@ -1275,9 +1470,7 @@
1275
  add_filter( 'site_transient_update_plugins', array( 'Freemius', '_remove_fs_updates_from_plugin_install_page' ), 10, 2 );
1276
  } else if ( self::is_plugins_page() || self::is_updates_page() ) {
1277
  /**
1278
- * On the "Plugins" and "Updates" admin pages, if there are premium or non–org-compliant
1279
- * plugins, modify their details dialog URLs (add a Freemius-specific param) so that the SDK can
1280
- * determine if the plugin information dialog should show information from Freemius.
1281
  *
1282
  * @author Leo Fajardo (@leorw)
1283
  * @since 2.2.3
@@ -1408,6 +1601,7 @@
1408
 
1409
  add_action( 'admin_init', array( &$this, '_add_license_activation' ) );
1410
  add_action( 'admin_init', array( &$this, '_add_premium_version_upgrade_selection' ) );
 
1411
 
1412
  $this->add_ajax_action( 'update_billing', array( &$this, '_update_billing_ajax_action' ) );
1413
  $this->add_ajax_action( 'start_trial', array( &$this, '_start_trial_ajax_action' ) );
@@ -1467,7 +1661,7 @@
1467
  static function _remove_fs_updates_from_plugin_install_page( $updates, $transient = null ) {
1468
  if ( is_object( $updates ) && isset( $updates->response ) ) {
1469
  foreach ( $updates->response as $file => $plugin ) {
1470
- if ( false !== strpos( $plugin->package, 'api.freemius' ) ) {
1471
  unset( $updates->response[ $file ] );
1472
  }
1473
  }
@@ -1530,6 +1724,122 @@
1530
  <?php
1531
  }
1532
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1533
  /**
1534
  * Keeping the uninstall hook registered for free or premium plugin version may result to a fatal error that
1535
  * could happen when a user tries to uninstall either version while one of them is still active. Uninstalling a
@@ -1655,7 +1965,7 @@
1655
  // Try to load the cached value of the file path.
1656
  if ( isset( $this->_storage->plugin_main_file ) ) {
1657
  $plugin_main_file = $this->_storage->plugin_main_file;
1658
- if ( isset( $plugin_main_file->path ) ) {
1659
  $absolute_path = $this->get_absolute_path( $plugin_main_file->path );
1660
  if ( file_exists( $absolute_path ) ) {
1661
  return $absolute_path;
@@ -1676,7 +1986,7 @@
1676
  if ( ! $is_init ) {
1677
  // Fetch prev path cache.
1678
  if ( isset( $this->_storage->plugin_main_file ) &&
1679
- isset( $this->_storage->plugin_main_file->prev_path )
1680
  ) {
1681
  $absolute_path = $this->get_absolute_path( $this->_storage->plugin_main_file->prev_path );
1682
  if ( file_exists( $absolute_path ) ) {
@@ -1780,7 +2090,7 @@
1780
  $store_option = true;
1781
  }
1782
 
1783
- if ( ! isset( $id_slug_type_path_map[ $module_id ]['path'] ) ||
1784
  /**
1785
  * This verification is for cases when suddenly the same module
1786
  * is installed but with a different folder name.
@@ -1844,6 +2154,7 @@
1844
  $caller_map = array();
1845
  $module_type = WP_FS__MODULE_TYPE_PLUGIN;
1846
  $themes_dir = fs_normalize_path( get_theme_root( get_stylesheet() ) );
 
1847
 
1848
  for ( $i = 1, $bt = debug_backtrace(), $len = count( $bt ); $i < $len; $i ++ ) {
1849
  if ( empty( $bt[ $i ]['file'] ) ) {
@@ -1869,12 +2180,46 @@
1869
  'activate_plugin'
1870
  ) )
1871
  ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1872
  // Ignore call stack hooks and files inclusion.
1873
  continue;
1874
  }
1875
 
1876
  $caller_file_path = fs_normalize_path( $bt[ $i ]['file'] );
1877
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1878
  if ( 'functions.php' === basename( $caller_file_path ) ) {
1879
  /**
1880
  * 1. Assumes that theme's starting execution file is functions.php.
@@ -1934,50 +2279,84 @@
1934
  *
1935
  * @author Vova Feldman (@svovaf)
1936
  * @author Leo Fajardo (@leorw)
 
1937
  * @since 1.1.2
1938
  */
1939
  function _add_deactivation_feedback_dialog_box() {
1940
- /* Check the type of user:
1941
- * 1. Long-term (long-term)
1942
- * 2. Non-registered and non-anonymous short-term (non-registered-and-non-anonymous-short-term).
1943
- * 3. Short-term (short-term)
1944
- */
1945
- $is_long_term_user = true;
1946
-
1947
- // Check if the site is at least 2 days old.
1948
- $time_installed = $this->_storage->install_timestamp;
1949
 
1950
- // Difference in seconds.
1951
- $date_diff = time() - $time_installed;
 
 
 
 
 
 
 
 
 
 
1952
 
1953
- // Convert seconds to days.
1954
- $date_diff_days = floor( $date_diff / ( 60 * 60 * 24 ) );
1955
 
1956
- if ( $date_diff_days < 2 ) {
1957
- $is_long_term_user = false;
 
 
 
 
1958
  }
1959
 
1960
- $is_long_term_user = $this->apply_filters( 'is_long_term_user', $is_long_term_user );
1961
 
1962
- if ( $is_long_term_user ) {
1963
- $user_type = 'long-term';
1964
- } else {
1965
- if ( ! $this->is_registered() && ! $this->is_anonymous() ) {
1966
- $user_type = 'non-registered-and-non-anonymous-short-term';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1967
  } else {
1968
- $user_type = 'short-term';
 
 
 
 
1969
  }
1970
- }
1971
 
1972
- $uninstall_reasons = $this->_get_uninstall_reasons( $user_type );
1973
 
1974
- // Load the HTML template for the deactivation feedback dialog box.
1975
- $vars = array(
1976
- 'reasons' => $uninstall_reasons,
1977
- 'id' => $this->_module_id
1978
- );
 
1979
 
1980
  /**
 
 
1981
  * @todo Deactivation form core functions should be loaded only once! Otherwise, when there are multiple Freemius powered plugins the same code is loaded multiple times. The only thing that should be loaded differently is the various deactivation reasons object based on the state of the plugin.
1982
  */
1983
  fs_require_template( 'forms/deactivation/form.php', $vars );
@@ -2484,12 +2863,14 @@
2484
  function is_site_activation_mode( $and_on = true ) {
2485
  return (
2486
  ( $this->is_on() || ! $and_on ) &&
2487
- ( $this->is_premium() && true === $this->_storage->require_license_activation ) ||
2488
  (
2489
- ( ! $this->is_registered() ||
2490
- ( $this->is_only_premium() && ! $this->has_features_enabled_license() ) ) &&
2491
- ( ! $this->is_enable_anonymous() ||
2492
- ( ! $this->is_anonymous() && ! $this->is_pending_activation() ) )
 
 
 
2493
  )
2494
  );
2495
  }
@@ -2621,17 +3002,47 @@
2621
  $active_basenames = get_option( 'active_plugins' );
2622
  }
2623
 
 
 
 
 
2624
  if ( is_multisite() ) {
2625
  $network_active_basenames = get_site_option( 'active_sitewide_plugins' );
2626
 
2627
  if ( is_array( $network_active_basenames ) && ! empty( $network_active_basenames ) ) {
2628
- $active_basenames = array_merge( $active_basenames, $network_active_basenames );
2629
  }
2630
  }
2631
 
2632
  return $active_basenames;
2633
  }
2634
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2635
  /**
2636
  * Get collection of all active plugins. Including network activated plugins.
2637
  *
@@ -2879,6 +3290,18 @@
2879
  add_action( 'admin_footer', array( 'Freemius', '_enrich_ajax_url' ) );
2880
  add_action( 'admin_footer', array( 'Freemius', '_open_support_forum_in_new_page' ) );
2881
 
 
 
 
 
 
 
 
 
 
 
 
 
2882
 
2883
  self::$_statics_loaded = true;
2884
  }
@@ -3475,7 +3898,10 @@
3475
  $key = fs_strip_url_protocol( get_site_url( $blog_id ) );
3476
 
3477
  $secure_auth = SECURE_AUTH_KEY;
3478
- if ( empty( $secure_auth ) || false !== strpos( $secure_auth, ' ' ) ) {
 
 
 
3479
  // Protect against default auth key.
3480
  $secure_auth = md5( microtime() );
3481
  }
@@ -4372,9 +4798,31 @@
4372
 
4373
  return;
4374
  } else {
4375
- if ( $this->_parent->is_registered() && ! $this->is_registered() ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4376
  // If parent plugin activated, automatically install add-on for the user.
4377
- $this->_activate_addon_account( $this->_parent );
 
 
 
 
 
4378
  } else if ( ! $this->_parent->is_registered() && $this->is_registered() ) {
4379
  // If add-on activated and parent not, automatically install parent for the user.
4380
  $this->activate_parent_account( $this->_parent );
@@ -4480,14 +4928,18 @@
4480
  private function should_use_freemius_updater_and_dialog() {
4481
  return (
4482
  /**
4483
- * Unless the `fs_allow_updater_and_dialog` URL param exists and its value is `true`, disallow updater
4484
- * and dialog on the "Add Plugins" admin page (/plugin-install.php) so that they won't interfere with
4485
- * the .org plugins' functionalities on that page (e.g. installation and viewing plugin details from
4486
- * .org).
 
4487
  */
4488
- ( ! self::is_plugin_install_page() || true === fs_request_get_bool( 'fs_allow_updater_and_dialog' ) ) &&
4489
- // Disallow updater and dialog when installing a plugin, otherwise .org "add-on" plugins will be affected.
4490
- ( 'install-plugin' !== fs_request_get( 'action' ) )
 
 
 
4491
  );
4492
  }
4493
 
@@ -4943,6 +5395,7 @@
4943
  'premium_suffix' => $premium_suffix,
4944
  'is_live' => $this->get_bool_option( $plugin_info, 'is_live', true ),
4945
  'affiliate_moderation' => $this->get_option( $plugin_info, 'has_affiliation' ),
 
4946
  ) );
4947
 
4948
  if ( $plugin->is_updated() ) {
@@ -4952,6 +5405,21 @@
4952
  // Set the secret key after storing the plugin, we don't want to store the key in the storage.
4953
  $this->_plugin->secret_key = $secret_key;
4954
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4955
  if ( ! isset( $plugin_info['menu'] ) ) {
4956
  $plugin_info['menu'] = array();
4957
 
@@ -6066,7 +6534,7 @@
6066
  }
6067
 
6068
  if ( is_multisite() ) {
6069
- $this->switch_to_blog( $current_blog_id );
6070
 
6071
  $this->do_action( "after_{$name}_cron_multisite" );
6072
  }
@@ -6146,6 +6614,8 @@
6146
  */
6147
  function _sync_cron_method( array $blog_ids, $current_blog_id = null ) {
6148
  if ( $this->is_registered() ) {
 
 
6149
  if ( $this->has_paid_plan() ) {
6150
  // Initiate background plan sync.
6151
  $this->_sync_license( true, false, $current_blog_id );
@@ -6486,10 +6956,10 @@
6486
  * @author Leo Fajardo (@leorw)
6487
  * @since 1.2.2
6488
  */
6489
- if ( $this->is_theme()
6490
- && ! $this->has_settings_menu()
6491
- && ! isset( $_REQUEST['fs_action'] )
6492
- && $this->can_activate_previous_theme()
6493
  ) {
6494
  if ( $this->is_only_premium() ) {
6495
  $this->activate_previous_theme();
@@ -6804,7 +7274,7 @@
6804
  foreach ( $plans_ids_to_keep as $plan_id ) {
6805
  $plan = self::_get_plan_by_id( $plan_id );
6806
  if ( is_object( $plan ) ) {
6807
- $plans_to_keep[] = $plan;
6808
  }
6809
  }
6810
  }
@@ -6973,44 +7443,48 @@
6973
  // Clear API cache on activation.
6974
  FS_Api::clear_cache();
6975
 
6976
- $is_premium_version_activation = ( current_filter() !== ( 'activate_' . $this->_free_plugin_basename ) );
 
 
6977
 
6978
  $this->_logger->info( 'Activating ' . ( $is_premium_version_activation ? 'premium' : 'free' ) . ' plugin version.' );
6979
 
6980
- // 1. If running in the activation of the FREE module, get the basename of the PREMIUM.
6981
- // 2. If running in the activation of the PREMIUM module, get the basename of the FREE.
6982
- $other_version_basename = $is_premium_version_activation ?
6983
- $this->_free_plugin_basename :
6984
- $this->premium_plugin_basename();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6985
 
6986
- if ( ! $this->_is_network_active ) {
6987
  /**
6988
- * During the activation, the plugin isn't yet active, therefore,
6989
- * _is_network_active will be set to false even if it's a network level
6990
- * activation. So we need to fix that by looking at the is_network_admin() value.
6991
  *
6992
- * @author Vova Feldman
 
 
 
 
6993
  */
6994
- $this->_is_network_active = (
6995
- $this->_is_multisite_integrated &&
6996
- // Themes are always network activated, but the ACTUAL activation is per site.
6997
- $this->is_plugin() &&
6998
- fs_is_network_admin()
6999
- );
7000
- }
7001
-
7002
- /**
7003
- * If the other module version is activate, deactivate it.
7004
- *
7005
- * is_plugin_active() checks if the plugin active on the site or the network level
7006
- * and deactivate_plugins() deactivates the plugin whether its activated on the site
7007
- * or network level.
7008
- *
7009
- * @author Leo Fajardo (@leorw)
7010
- * @since 1.2.2
7011
- */
7012
- if ( is_plugin_active( $other_version_basename ) ) {
7013
- deactivate_plugins( $other_version_basename );
7014
  }
7015
 
7016
  if ( $this->is_registered() ) {
@@ -7060,14 +7534,41 @@
7060
  }
7061
  }
7062
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7063
  if (
7064
  $is_premium_version_activation &&
7065
  (
7066
  ( ! $this->is_registered() && $this->is_anonymous() ) ||
7067
  (
7068
  $this->is_registered() &&
7069
- ! $this->is_trial() &&
7070
- ! $this->has_features_enabled_license()
7071
  )
7072
  )
7073
  ) {
@@ -7109,6 +7610,194 @@
7109
  $this->_storage->was_plugin_loaded = true;
7110
  }
7111
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7112
  /**
7113
  * Delete account.
7114
  *
@@ -7166,6 +7855,7 @@
7166
 
7167
  // Clear all storage data.
7168
  $this->_storage->clear_all( true, array(
 
7169
  'connectivity_test',
7170
  'is_on',
7171
  ), false );
@@ -7521,7 +8211,7 @@
7521
  get_current_blog_id() == $network_or_blog_id ||
7522
  ( true === $network_or_blog_id && fs_is_network_admin() )
7523
  ) {
7524
- unset( $this->_is_anonymous );
7525
  }
7526
  }
7527
 
@@ -7985,16 +8675,18 @@
7985
  * @author Vova Feldman (@svovaf)
7986
  * @since 1.1.2
7987
  *
7988
- * @param string[] string $override
7989
- * @param bool $include_plugins Since 1.1.8 by default include plugin changes.
7990
- * @param bool $include_themes Since 1.1.8 by default include plugin changes.
 
7991
  *
7992
  * @return array
7993
  */
7994
  private function get_install_data_for_api(
7995
  array $override,
7996
  $include_plugins = true,
7997
- $include_themes = true
 
7998
  ) {
7999
  if ( ! defined( 'WP_FS__TRACK_PLUGINS' ) || false !== WP_FS__TRACK_PLUGINS ) {
8000
  /**
@@ -8022,13 +8714,18 @@
8022
 
8023
  $versions = $this->get_versions();
8024
 
8025
- return array_merge( $versions, array(
 
 
 
 
 
 
 
 
 
8026
  'version' => $this->get_plugin_version(),
8027
  'is_premium' => $this->is_premium(),
8028
- 'language' => get_bloginfo( 'language' ),
8029
- 'charset' => get_bloginfo( 'charset' ),
8030
- 'title' => get_bloginfo( 'name' ),
8031
- 'url' => get_site_url(),
8032
  // Special params.
8033
  'is_active' => true,
8034
  'is_disconnected' => $this->is_tracking_prohibited(),
@@ -8796,6 +9493,18 @@
8796
  return $this->_plugin->id;
8797
  }
8798
 
 
 
 
 
 
 
 
 
 
 
 
 
8799
  /**
8800
  * @author Vova Feldman (@svovaf)
8801
  * @since 1.2.1.5
@@ -9539,6 +10248,176 @@
9539
  return false;
9540
  }
9541
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9542
  /**
9543
  * @author Vova Feldman (@svovaf)
9544
  * @since 2.0.0
@@ -10017,7 +10896,7 @@
10017
  * @return number[]
10018
  */
10019
  private function get_plans_ids_associated_with_installs() {
10020
- if ( ! $this->_is_network_active ) {
10021
  if ( ! is_object( $this->_site ) ||
10022
  ! FS_Plugin_Plan::is_valid_id( $this->_site->plan_id )
10023
  ) {
@@ -10152,24 +11031,11 @@
10152
  $all_licenses = $this->get_user_licenses( $this->_user->id );
10153
  }
10154
 
10155
- $foreign_licenses = array(
10156
- 'ids' => array(),
10157
- 'license_keys' => array()
10158
- );
10159
 
10160
  $all_licenses_map = array();
10161
  foreach ( $all_licenses as $license ) {
10162
  $all_licenses_map[ $license->id ] = true;
10163
- if ( $license->user_id == $this->_user->id || $license->id == $site_license_id ) {
10164
- continue;
10165
- }
10166
-
10167
- $foreign_licenses['ids'][] = $license->id;
10168
- $foreign_licenses['license_keys'][] = $license->secret_key;
10169
- }
10170
-
10171
- if ( empty( $foreign_licenses['ids'] ) ) {
10172
- $foreign_licenses = array();
10173
  }
10174
 
10175
  $licenses = $this->_fetch_licenses( false, $site_license_id, $foreign_licenses, $blog_id );
@@ -10901,7 +11767,7 @@
10901
  return true;
10902
  }
10903
 
10904
- return ( 1 === count( $this->_plans ) );
10905
  }
10906
 
10907
  /**
@@ -11025,11 +11891,13 @@
11025
  * @since 2.2.1
11026
  *
11027
  * @param bool $is_license_deactivation
 
 
11028
  */
11029
- function _maybe_add_subscription_cancellation_dialog_box( $is_license_deactivation = false ) {
11030
  if ( fs_is_network_admin() ) {
11031
  // Subscription cancellation dialog box is currently not supported for multisite networks.
11032
- return;
11033
  }
11034
 
11035
  $license = $this->_get_license();
@@ -11044,7 +11912,7 @@
11044
  $license->is_lifetime() ||
11045
  ( ! $license->is_single_site() && $license->activated > 1 )
11046
  ) {
11047
- return;
11048
  }
11049
 
11050
  /**
@@ -11052,17 +11920,15 @@
11052
  */
11053
  $subscription = $this->_get_subscription( $license->id );
11054
  if ( ! is_object( $subscription ) || ! $subscription->is_active() ) {
11055
- return;
11056
  }
11057
 
11058
- $vars = array(
11059
  'id' => $this->_module_id,
11060
  'license' => $license,
11061
  'has_trial' => $this->is_paid_trial(),
11062
  'is_license_deactivation' => $is_license_deactivation,
11063
  );
11064
-
11065
- fs_require_template( 'forms/subscription-cancellation.php', $vars );
11066
  }
11067
 
11068
  /**
@@ -11127,10 +11993,17 @@
11127
 
11128
  // Add license activation link and AJAX request handler.
11129
  if ( self::is_plugins_page() ) {
11130
- /**
11131
- * @since 1.2.0 Add license action link only on plugins page.
11132
- */
11133
- $this->_add_license_action_link();
 
 
 
 
 
 
 
11134
  }
11135
 
11136
  // Add license activation AJAX callback.
@@ -11161,34 +12034,173 @@
11161
 
11162
  /**
11163
  * @author Leo Fajardo (@leorw)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11164
  *
 
11165
  * @since 1.1.9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11166
  * @since 2.0.0 When a super-admin that hasn't connected before is network activating a license and excluding some of the sites for the license activation, go over the unselected sites in the network and if a site is not connected, skipped, nor delegated, if it's a freemium product then just skip the connection for the site, if it's a premium only product, delegate the connection and license activation to the site admin (Vova Feldman @svovaf).
 
 
 
 
 
 
 
 
 
 
 
11167
  */
11168
- function _activate_license_ajax_action() {
 
 
 
 
 
 
11169
  $this->_logger->entrance();
11170
-
11171
- $this->check_ajax_referer( 'activate_license' );
11172
 
11173
- $license_key = trim( fs_request_get( 'license_key' ) );
11174
 
11175
- if ( empty( $license_key ) ) {
11176
- exit;
 
11177
  }
11178
 
11179
- $plugin_id = fs_request_get( 'module_id', '', 'post' );
11180
- $fs = ( $plugin_id == $this->_module_id ) ?
11181
  $this :
11182
  $this->get_addon_instance( $plugin_id );
11183
 
11184
  $error = false;
11185
  $next_page = false;
11186
 
11187
- $sites = fs_is_network_admin() ?
11188
- fs_request_get( 'sites', array(), 'post' ) :
11189
- array();
11190
-
11191
- $blog_id = fs_request_get( 'blog_id' );
11192
  $has_valid_blog_id = is_numeric( $blog_id );
11193
 
11194
  if ( $fs->is_registered() ) {
@@ -11278,7 +12290,7 @@
11278
  false,
11279
  false,
11280
  false,
11281
- fs_request_get_bool( 'is_marketing_allowed', null ),
11282
  $sites
11283
  );
11284
 
@@ -11332,7 +12344,7 @@
11332
  }
11333
 
11334
  if ( ! empty( $pending_sites ) ) {
11335
- if ( $this->is_freemium() ) {
11336
  $this->skip_connection( $pending_sites );
11337
  } else {
11338
  $this->delegate_connection( $pending_sites );
@@ -11351,14 +12363,24 @@
11351
  );
11352
 
11353
  if ( false !== $error ) {
11354
- $result['error'] = $error;
11355
  } else {
 
 
 
 
 
 
 
 
 
 
 
 
11356
  $result['next_page'] = $next_page;
11357
  }
11358
 
11359
- echo json_encode( $result );
11360
-
11361
- exit;
11362
  }
11363
 
11364
  /**
@@ -11393,8 +12415,12 @@
11393
  $total_sites_to_delegate = count( $sites_by_action['delegate'] );
11394
 
11395
  $next_page = '';
 
 
 
11396
  if ( $total_sites === $total_sites_to_delegate &&
11397
- ! $this->is_network_upgrade_mode()
 
11398
  ) {
11399
  $this->delegate_connection();
11400
  } else {
@@ -11406,7 +12432,19 @@
11406
  $this->skip_connection( $sites_by_action['skip'] );
11407
  }
11408
 
11409
- if ( ! empty( $sites_by_action['allow'] ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
11410
  if ( ! $fs->is_registered() || ! $this->_is_network_active ) {
11411
  $next_page = $fs->opt_in(
11412
  false,
@@ -11993,11 +13031,11 @@
11993
  $params['trial'] = 'true';
11994
  }
11995
 
11996
- if ( $this->is_addon() ) {
11997
- return $this->_parent->addon_url( $this->_slug );
11998
- }
11999
 
12000
- return $this->_get_admin_page_url( 'pricing', $params );
12001
  }
12002
 
12003
  /**
@@ -12006,16 +13044,18 @@
12006
  * @author Vova Feldman (@svovaf)
12007
  * @since 1.0.6
12008
  *
12009
- * @param string $billing_cycle Billing cycle
12010
- * @param bool $is_trial
12011
- * @param array $extra (optional) Extra parameters, override other query params.
 
12012
  *
12013
  * @return string
12014
  */
12015
  function checkout_url(
12016
  $billing_cycle = WP_FS__PERIOD_ANNUALLY,
12017
  $is_trial = false,
12018
- $extra = array()
 
12019
  ) {
12020
  $this->_logger->entrance();
12021
 
@@ -12033,7 +13073,7 @@
12033
  */
12034
  $params = array_merge( $params, $extra );
12035
 
12036
- return $this->_get_admin_page_url( 'pricing', $params );
12037
  }
12038
 
12039
  /**
@@ -12042,10 +13082,11 @@
12042
  * @author Vova Feldman (@svovaf)
12043
  * @since 1.1.7
12044
  *
12045
- * @param number $addon_id
12046
- * @param number $pricing_id
12047
- * @param string $billing_cycle
12048
- * @param bool $is_trial
 
12049
  *
12050
  * @return string
12051
  */
@@ -12053,12 +13094,13 @@
12053
  $addon_id,
12054
  $pricing_id,
12055
  $billing_cycle = WP_FS__PERIOD_ANNUALLY,
12056
- $is_trial = false
 
12057
  ) {
12058
  return $this->checkout_url( $billing_cycle, $is_trial, array(
12059
  'plugin_id' => $addon_id,
12060
  'pricing_id' => $pricing_id,
12061
- ) );
12062
  }
12063
 
12064
  #endregion
@@ -12598,6 +13640,10 @@
12598
  * @return array Active & public sites collection.
12599
  */
12600
  static function get_sites() {
 
 
 
 
12601
  /**
12602
  * For consistency with get_blog_list() which only return active public sites.
12603
  *
@@ -12769,7 +13815,7 @@
12769
  * 'blog_id' => string The associated blog ID.
12770
  * }
12771
  */
12772
- private function find_first_install() {
12773
  $sites = self::get_sites();
12774
 
12775
  foreach ( $sites as $site ) {
@@ -13445,6 +14491,18 @@
13445
  ) );
13446
  }
13447
 
 
 
 
 
 
 
 
 
 
 
 
 
13448
  /* Logger
13449
  ------------------------------------------------------------------------------------------------------------------*/
13450
  /**
@@ -13670,8 +14728,9 @@
13670
  $this->get_install_by_blog_id();
13671
 
13672
  if ( fs_is_network_admin() &&
13673
- ! is_object( $site ) &&
13674
- FS_Site::is_valid_id( $this->_storage->network_install_blog_id )
 
13675
  ) {
13676
  $first_install = $this->find_first_install();
13677
 
@@ -13850,6 +14909,47 @@
13850
  return $versions;
13851
  }
13852
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13853
  /**
13854
  * @author Vova Feldman (@svovaf)
13855
  * @since 1.1.7.4
@@ -13895,18 +14995,7 @@
13895
 
13896
  if ( true === $network_level_or_blog_id ) {
13897
  if ( ! isset( $override_with['sites'] ) ) {
13898
- $params['sites'] = array();
13899
-
13900
- $sites = self::get_sites();
13901
-
13902
- foreach ( $sites as $site ) {
13903
- $blog_id = self::get_site_blog_id( $site );
13904
- if ( ! $this->is_site_delegated_connection( $blog_id ) &&
13905
- ! $this->is_installed_on_site( $blog_id )
13906
- ) {
13907
- $params['sites'][] = $this->get_site_info( $site );
13908
- }
13909
- }
13910
  }
13911
  } else {
13912
  $site = is_numeric( $network_level_or_blog_id ) ?
@@ -14266,71 +15355,10 @@
14266
  // If Freemius was OFF before, turn it on.
14267
  $this->turn_on();
14268
 
14269
- if ( ! $this->_is_network_active || ! $is_network_level_opt_in ) {
14270
- $this->_set_account( $user, $first_install );
14271
-
14272
- $this->do_action( 'after_account_connection', $user, $first_install );
14273
- } else {
14274
- $this->_store_user();
14275
-
14276
- // Map site addresses to their blog IDs.
14277
- $address_to_blog_map = $this->get_address_to_blog_map();
14278
-
14279
- $first_blog_id = null;
14280
- $blog_2_install_map = array();
14281
- foreach ( $installs as $install ) {
14282
- $address = trailingslashit( fs_strip_url_protocol( $install->url ) );
14283
- $blog_id = $address_to_blog_map[ $address ];
14284
-
14285
- $this->_store_site( true, $blog_id, $install );
14286
-
14287
- if ( is_null( $first_blog_id ) ) {
14288
- $first_blog_id = $blog_id;
14289
- }
14290
-
14291
- $blog_2_install_map[ $blog_id ] = $install;
14292
- }
14293
-
14294
- if ( ! FS_User::is_valid_id( $this->_storage->network_user_id ) ||
14295
- ! is_object( self::_get_user_by_id( $this->_storage->network_user_id ) )
14296
- ) {
14297
- // Store network user.
14298
- $this->_storage->network_user_id = $this->_user->id;
14299
- }
14300
-
14301
- if ( ! FS_Site::is_valid_id( $this->_storage->network_install_blog_id ) ) {
14302
- $this->_storage->network_install_blog_id = $first_blog_id;
14303
- }
14304
-
14305
- if ( count( $installs ) === count( $address_to_blog_map ) ) {
14306
- // Super-admin opted-in for all sites in the network.
14307
- $this->_storage->is_network_connected = true;
14308
- }
14309
-
14310
- $this->_store_licenses( false );
14311
-
14312
- self::$_accounts->store();
14313
-
14314
- // Don't sync the installs data on network upgrade
14315
- if ( ! $this->network_upgrade_mode_completed() ) {
14316
- $this->send_installs_update();
14317
- }
14318
-
14319
- // Switch install context back to the first install.
14320
- $this->_site = $first_install;
14321
-
14322
- $current_blog = get_current_blog_id();
14323
-
14324
- foreach ( $blog_2_install_map as $blog_id => $install ) {
14325
- $this->switch_to_blog( $blog_id );
14326
-
14327
- $this->do_action( 'after_account_connection', $user, $install );
14328
- }
14329
-
14330
- $this->switch_to_blog( $current_blog );
14331
-
14332
- $this->do_action( 'after_network_account_connection', $user, $blog_2_install_map );
14333
- }
14334
 
14335
  if ( is_numeric( $first_install->license_id ) ) {
14336
  $this->_license = $this->_get_license_by_id( $first_install->license_id );
@@ -14975,27 +16003,63 @@
14975
  * @author Vova Feldman (@svovaf)
14976
  * @since 1.0.6
14977
  *
14978
- * @param Freemius $parent_fs
 
14979
  */
14980
- private function _activate_addon_account( Freemius $parent_fs ) {
14981
  if ( $this->is_registered() ) {
14982
  // Already activated.
14983
  return;
14984
  }
14985
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14986
  // Activate add-on with parent plugin credentials.
14987
- $addon_install = $parent_fs->get_api_site_scope()->call(
14988
  "/addons/{$this->_plugin->id}/installs.json",
14989
  'post',
14990
- $this->get_install_data_for_api( array(
14991
- 'uid' => $this->get_anonymous_id(),
14992
- ), false, false )
14993
  );
14994
 
14995
- if ( isset( $addon_install->error ) ) {
 
 
 
 
14996
  $this->_admin_notices->add(
14997
  sprintf( $this->get_text_inline( 'Couldn\'t activate %s.', 'could-not-activate-x' ), $this->get_plugin_name() ) . ' ' .
14998
- $this->get_text_inline( 'Please contact us with the following message:', 'contact-us-with-error-message' ) . ' ' . '<b>' . $addon_install->error->message . '</b>',
14999
  $this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...',
15000
  'error'
15001
  );
@@ -15003,27 +16067,131 @@
15003
  return;
15004
  }
15005
 
 
 
 
 
 
 
 
15006
  // Get user information based on parent's plugin.
15007
  $user = $parent_fs->get_user();
15008
 
15009
  // First of all, set site and user info - otherwise we won't
15010
  // be able to invoke API calls.
15011
- $this->_site = new FS_Site( $addon_install );
15012
  $this->_user = $user;
15013
 
15014
  // Sync add-on plans.
15015
  $this->_sync_plans();
15016
 
15017
- // Get site's current plan.
15018
- //$this->_site->plan = $this->_get_plan_by_id( $this->_site->plan->id );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15019
 
15020
- $this->_set_account( $user, $this->_site );
 
15021
 
15022
- // Sync licenses.
15023
- $this->_sync_licenses();
15024
 
15025
- // Try to activate premium license.
15026
- $this->_activate_license( true );
15027
  }
15028
 
15029
  /**
@@ -15140,6 +16308,8 @@
15140
  ! $this->is_registered()
15141
  );
15142
 
 
 
15143
  if ( ( ! $this->has_api_connectivity() && ! $this->is_enable_anonymous() ) ||
15144
  $should_hide_site_admin_settings
15145
  ) {
@@ -15346,12 +16516,18 @@
15346
  }
15347
 
15348
  if ( ! $this->_menu->has_menu() || $this->_menu->is_top_level() ) {
15349
- $this->_dynamically_added_top_level_page_hook_name = $this->_menu->add_page_and_update(
15350
- $this->get_plugin_name(),
15351
- $this->get_plugin_name(),
15352
- 'manage_options',
15353
- $this->_menu->has_menu() ? $this->_menu->get_slug() : $this->_slug
15354
- );
 
 
 
 
 
 
15355
  } else {
15356
  $this->_menu->add_subpage_and_update(
15357
  $this->_menu->get_parent_slug(),
@@ -15437,6 +16613,44 @@
15437
  );
15438
  }
15439
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15440
  /**
15441
  * Add default Freemius menu items.
15442
  *
@@ -15449,28 +16663,7 @@
15449
 
15450
  $is_activation_mode = $this->is_activation_mode();
15451
 
15452
- if ( $this->is_addon() ) {
15453
- // No submenu items for add-ons.
15454
- $add_submenu_items = false;
15455
- } else if ( $this->is_free_wp_org_theme() && ! fs_is_network_admin() ) {
15456
- // Also add submenu items when running in a free .org theme so the tabs will be visible.
15457
- $add_submenu_items = true;
15458
- } else if ( $is_activation_mode && ! $this->is_free_wp_org_theme() ) {
15459
- $add_submenu_items = false;
15460
- } else if ( fs_is_network_admin() ) {
15461
- /**
15462
- * Add submenu items to network level when plugin was network
15463
- * activated and the super-admin did NOT delegated the connection
15464
- * of all sites to site admins.
15465
- */
15466
- $add_submenu_items = (
15467
- $this->_is_network_active &&
15468
- ( WP_FS__SHOW_NETWORK_EVEN_WHEN_DELEGATED ||
15469
- ! $this->is_network_delegated_connection() )
15470
- );
15471
- } else {
15472
- $add_submenu_items = ( ! $this->_is_network_active || $this->is_delegated_connection() );
15473
- }
15474
 
15475
  if ( $add_submenu_items ) {
15476
  if ( $this->has_affiliate_program() ) {
@@ -16521,6 +17714,165 @@
16521
  self::$_accounts->set_option( 'account_addons', $all_addons, $store );
16522
  }
16523
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
399
  $this->_is_multisite_integrated &&
400
  // Themes are always network activated, but the ACTUAL activation is per site.
401
  $this->is_plugin() &&
402
+ (
403
+ is_plugin_active_for_network( $this->_plugin_basename ) ||
404
+ // Plugin network level activation or uninstall.
405
+ ( fs_is_network_admin() && is_plugin_inactive( $this->_plugin_basename ) )
406
+ )
407
  );
408
 
409
  $this->_storage->set_network_active(
411
  $this->is_delegated_connection()
412
  );
413
 
414
+ if ( ! isset( $this->_storage->is_network_activated ) ) {
415
+ $this->_storage->is_network_activated = $this->_is_network_active;
416
+ }
417
+
418
+ if ( $this->_storage->is_network_activated != $this->_is_network_active ) {
419
+ // Update last activation level.
420
+ $this->_storage->is_network_activated = $this->_is_network_active;
421
+
422
+ $this->maybe_adjust_storage();
423
+ }
424
+
425
  #region Migration
426
 
427
  if ( is_multisite() ) {
506
  $this->_version_updates_handler();
507
  }
508
 
509
+ /**
510
+ * @author Leo Fajardo (@leorw)
511
+ * @since 2.3.0
512
+ */
513
+ private function maybe_adjust_storage() {
514
+ $install_timestamp = null;
515
+ $prev_is_premium = null;
516
+
517
+ $options_to_update = array();
518
+
519
+ $is_network_admin = fs_is_network_admin();
520
+
521
+ $network_install_timestamp = $this->_storage->get( 'install_timestamp', null, true );
522
+
523
+ if ( ! $is_network_admin ) {
524
+ if ( is_null( $network_install_timestamp ) ) {
525
+ // Plugin was not network-activated before.
526
+ return;
527
+ }
528
+
529
+ if ( is_null( $this->_storage->get( 'install_timestamp', null, false ) ) ) {
530
+ // Set the `install_timestamp` only if it's not yet set.
531
+ $install_timestamp = $network_install_timestamp;
532
+ }
533
+
534
+ $prev_is_premium = $this->_storage->get( 'prev_is_premium', null, true );
535
+ } else {
536
+ $current_wp_user = self::_get_current_wp_user();
537
+ $current_fs_user = self::_get_user_by_email( $current_wp_user->user_email );
538
+ $network_user_info = array();
539
+
540
+ $skips_count = 0;
541
+
542
+ $sites = self::get_sites();
543
+ $sites_count = count( $sites );
544
+
545
+ $blog_id_2_install_map = array();
546
+
547
+ $is_first_non_ignored_blog = true;
548
+
549
+ foreach ( $sites as $site ) {
550
+ $blog_id = self::get_site_blog_id( $site );
551
+
552
+ $blog_install_timestamp = $this->_storage->get( 'install_timestamp', null, $blog_id );
553
+
554
+ if ( is_null( $blog_install_timestamp ) ) {
555
+ // Plugin has not been installed on this blog.
556
+ continue;
557
+ }
558
+
559
+ $is_earlier_install = (
560
+ ! is_null( $install_timestamp ) &&
561
+ $blog_install_timestamp < $install_timestamp
562
+ );
563
+
564
+ $install = $this->get_install_by_blog_id( $blog_id );
565
+
566
+ $update_network_user_info = false;
567
+
568
+ if ( ! is_object( $install ) ) {
569
+ if ( ! $this->_storage->get( 'is_anonymous', false, $blog_id ) ) {
570
+ // The opt-in decision (whether to skip or opt in) is yet to be made.
571
+ continue;
572
+ }
573
+
574
+ $skips_count ++;
575
+ } else {
576
+ $blog_id_2_install_map[ $blog_id ] = $install;
577
+
578
+ if ( empty( $network_user_info ) ) {
579
+ // Set the network user info for the 1st time. Choose any user information whether or not it is for the current WP user.
580
+ $update_network_user_info = true;
581
+ }
582
+
583
+ if ( ! $update_network_user_info &&
584
+ is_object( $current_fs_user ) &&
585
+ $network_user_info['user_id'] != $current_fs_user->id &&
586
+ $install->user_id == $current_fs_user->id
587
+ ) {
588
+ // If an install that is owned by the current WP user is found, use its user information instead.
589
+ $update_network_user_info = true;
590
+ }
591
+
592
+ if ( ! $update_network_user_info &&
593
+ $is_earlier_install &&
594
+ ( ! is_object( $current_fs_user ) || $current_fs_user->id == $install->user_id )
595
+ ) {
596
+ // Update to the earliest install info if there's no install found so far that is owned by the current WP user; OR only if the found install is owned by the current WP user.
597
+ $update_network_user_info = true;
598
+ }
599
+ }
600
+
601
+ if ( $update_network_user_info ) {
602
+ $network_user_info = array(
603
+ 'user_id' => $install->user_id,
604
+ 'blog_id' => $blog_id
605
+ );
606
+ }
607
+
608
+ $site_prev_is_premium = $this->_storage->get( 'prev_is_premium', null, $blog_id );
609
+
610
+ if ( $is_first_non_ignored_blog ) {
611
+ $prev_is_premium = $site_prev_is_premium;
612
+
613
+ if ( is_null( $network_install_timestamp ) ) {
614
+ $install_timestamp = $blog_install_timestamp;
615
+ }
616
+
617
+ $is_first_non_ignored_blog = false;
618
+
619
+ continue;
620
+ }
621
+
622
+ if ( ! is_null( $prev_is_premium ) && $prev_is_premium !== $site_prev_is_premium ) {
623
+ // If a different `$site_prev_is_premium` value is found, do not include the option in the collection of options to update.
624
+ $prev_is_premium = null;
625
+ }
626
+
627
+ if ( $is_earlier_install ) {
628
+ // If an earlier install timestamp is found.
629
+ $install_timestamp = $blog_install_timestamp;
630
+ }
631
+ }
632
+
633
+ $installs_count = count( $blog_id_2_install_map );
634
+
635
+ if ( $sites_count === ( $installs_count + $skips_count ) ) {
636
+ if ( ! empty( $network_user_info ) ) {
637
+ $options_to_update['network_user_id'] = $network_user_info['user_id'];
638
+ $options_to_update['network_install_blog_id'] = $network_user_info['blog_id'];
639
+
640
+ foreach ( $blog_id_2_install_map as $blog_id => $install ) {
641
+ if ( $install->user_id == $network_user_info['user_id'] ) {
642
+ continue;
643
+ }
644
+
645
+ $this->_storage->store( 'is_delegated_connection', true, $blog_id );
646
+ }
647
+ }
648
+
649
+ if ( $sites_count === $skips_count ) {
650
+ /**
651
+ * Assume network-level skipping as the intended action if all actions identified were only
652
+ * skipping of the connection (i.e., no opt-ins and delegated connections so far).
653
+ */
654
+ $options_to_update['is_anonymous_ms'] = true;
655
+ } else if ( $sites_count === $installs_count ) {
656
+ /**
657
+ * Assume network-level opt-in as the intended action if all actions identified were only opt-ins
658
+ * (i.e., no delegation and skipping of the connections so far).
659
+ */
660
+ $options_to_update['is_network_connected'] = true;
661
+ }
662
+ }
663
+ }
664
+
665
+ if ( ! is_null( $install_timestamp ) ) {
666
+ $options_to_update['install_timestamp'] = $install_timestamp;
667
+ }
668
+
669
+ if ( ! is_null( $prev_is_premium ) ) {
670
+ $options_to_update['prev_is_premium'] = $prev_is_premium;
671
+ }
672
+
673
+ if ( ! empty( $options_to_update ) ) {
674
+ $this->adjust_storage( $options_to_update, $is_network_admin );
675
+ }
676
+ }
677
+
678
+ /**
679
+ * @author Leo Fajardo (@leorw)
680
+ * @since 2.3.0
681
+ *
682
+ * @param array $options
683
+ * @param bool $is_network_admin
684
+ */
685
+ private function adjust_storage( $options, $is_network_admin ) {
686
+ foreach ( $options as $name => $value ) {
687
+ $this->_storage->store( $name, $value, $is_network_admin ? true : null );
688
+ }
689
+ }
690
+
691
  /**
692
  * Checks whether this module has a settings menu.
693
  *
1470
  add_filter( 'site_transient_update_plugins', array( 'Freemius', '_remove_fs_updates_from_plugin_install_page' ), 10, 2 );
1471
  } else if ( self::is_plugins_page() || self::is_updates_page() ) {
1472
  /**
1473
+ * On the "Plugins" and "Updates" admin pages, if there are premium or non–org-compliant plugins, modify their details dialog URLs (add a Freemius-specific param) so that the SDK can determine if the plugin information dialog should show information from Freemius.
 
 
1474
  *
1475
  * @author Leo Fajardo (@leorw)
1476
  * @since 2.2.3
1601
 
1602
  add_action( 'admin_init', array( &$this, '_add_license_activation' ) );
1603
  add_action( 'admin_init', array( &$this, '_add_premium_version_upgrade_selection' ) );
1604
+ add_action( 'admin_init', array( &$this, '_add_beta_mode_update_handler' ) );
1605
 
1606
  $this->add_ajax_action( 'update_billing', array( &$this, '_update_billing_ajax_action' ) );
1607
  $this->add_ajax_action( 'start_trial', array( &$this, '_start_trial_ajax_action' ) );
1661
  static function _remove_fs_updates_from_plugin_install_page( $updates, $transient = null ) {
1662
  if ( is_object( $updates ) && isset( $updates->response ) ) {
1663
  foreach ( $updates->response as $file => $plugin ) {
1664
+ if ( isset( $plugin->package ) && false !== strpos( $plugin->package, 'api.freemius' ) ) {
1665
  unset( $updates->response[ $file ] );
1666
  }
1667
  }
1724
  <?php
1725
  }
1726
 
1727
+ /**
1728
+ * @author Leo Fajardo (@leorw)
1729
+ * @since 2.3.0
1730
+ */
1731
+ static function _maybe_add_beta_label_styles() {
1732
+ $has_any_beta_version = false;
1733
+
1734
+ foreach ( self::$_instances as $instance ) {
1735
+ if ( $instance->is_beta() ) {
1736
+ $has_any_beta_version = true;
1737
+ break;
1738
+ }
1739
+ }
1740
+
1741
+ if ( $has_any_beta_version ) {
1742
+ fs_enqueue_local_style( 'fs_plugins', '/admin/plugins.css' );
1743
+ }
1744
+ }
1745
+
1746
+ /**
1747
+ * @author Leo Fajardo (@leorw)
1748
+ * @since 2.3.0
1749
+ */
1750
+ static function _maybe_add_beta_label_to_plugins_and_handle_confirmation() {
1751
+ $beta_data = array();
1752
+
1753
+ foreach ( self::$_instances as $instance ) {
1754
+ if ( ! $instance->is_premium() ) {
1755
+ continue;
1756
+ }
1757
+
1758
+ /**
1759
+ * If there's an available beta version update, a confirmation message will be shown when the
1760
+ * "Update now" link on the "Plugins" or "Themes" page is clicked.
1761
+ */
1762
+ $has_beta_update = $instance->has_beta_update();
1763
+
1764
+ $is_beta = (
1765
+ // The "Beta" label is added separately for themes.
1766
+ $instance->is_plugin() &&
1767
+ $instance->is_beta()
1768
+ );
1769
+
1770
+ if ( ! $is_beta && ! $has_beta_update ) {
1771
+ continue;
1772
+ }
1773
+
1774
+ $beta_data[ $instance->get_plugin_basename() ] = array( 'is_installed_version_beta' => $is_beta );
1775
+
1776
+ if ( ! $has_beta_update ) {
1777
+ continue;
1778
+ }
1779
+
1780
+ $beta_data[ $instance->get_plugin_basename() ]['beta_version_update_confirmation_message'] = sprintf(
1781
+ '%s %s',
1782
+ sprintf(
1783
+ fs_esc_attr_inline(
1784
+ 'An update to a Beta version will replace your installed version of %s with the latest Beta release - use with caution, and not on production sites. You have been warned.',
1785
+ 'beta-version-update-caution',
1786
+ $instance->get_slug()
1787
+ ),
1788
+ $instance->get_plugin_title()
1789
+ ),
1790
+ fs_esc_attr_inline( 'Would you like to proceed with the update?', 'update-confirmation', $instance->get_slug() )
1791
+ );
1792
+ }
1793
+
1794
+ if ( empty( $beta_data ) ) {
1795
+ return;
1796
+ }
1797
+ ?>
1798
+ <script type="text/javascript">
1799
+ ( function( $ ) {
1800
+ var betaData = <?php echo json_encode( $beta_data ) ?>;
1801
+
1802
+ for ( var pluginBasename in betaData ) {
1803
+ if ( ! betaData.hasOwnProperty( pluginBasename ) ) {
1804
+ continue;
1805
+ }
1806
+
1807
+ if ( ! betaData[ pluginBasename ].is_installed_version_beta ) {
1808
+ continue;
1809
+ }
1810
+
1811
+ var $parentContainer = $( '.wp-list-table.plugins tr[data-plugin="' + pluginBasename + '"]' );
1812
+ if ( 0 === $parentContainer.length ) {
1813
+ continue;
1814
+ }
1815
+
1816
+ $parentContainer.find( '.plugin-title > strong:first-child').append(
1817
+ '<span class="fs-tag fs-info"><?php fs_esc_js_echo_inline( 'Beta', 'beta' ) ?></span>'
1818
+ );
1819
+ }
1820
+
1821
+ setTimeout( function() {
1822
+ // Wait a little bit before adding the event handler, otherwise, it will be overridden by the core WP logic.
1823
+ $( '.plugins .update-message .update-link, .themes .theme .update-message' ).on( 'click', function() {
1824
+ var $parentContainer = $( this ).parents( 'tr:first' );
1825
+ pluginBasename = ( 0 !== $parentContainer.length ) ?
1826
+ $parentContainer.data( 'plugin' ) :
1827
+ $( this ).parents( '.theme:first' ).data( 'slug' );
1828
+
1829
+ if (
1830
+ betaData[ pluginBasename ] &&
1831
+ betaData[ pluginBasename ].beta_version_update_confirmation_message &&
1832
+ ! confirm( betaData[ pluginBasename ].beta_version_update_confirmation_message )
1833
+ ) {
1834
+ return false;
1835
+ }
1836
+ } );
1837
+ }, 20 );
1838
+ } )( jQuery );
1839
+ </script>
1840
+ <?php
1841
+ }
1842
+
1843
  /**
1844
  * Keeping the uninstall hook registered for free or premium plugin version may result to a fatal error that
1845
  * could happen when a user tries to uninstall either version while one of them is still active. Uninstalling a
1965
  // Try to load the cached value of the file path.
1966
  if ( isset( $this->_storage->plugin_main_file ) ) {
1967
  $plugin_main_file = $this->_storage->plugin_main_file;
1968
+ if ( ! empty( $plugin_main_file->path ) ) {
1969
  $absolute_path = $this->get_absolute_path( $plugin_main_file->path );
1970
  if ( file_exists( $absolute_path ) ) {
1971
  return $absolute_path;
1986
  if ( ! $is_init ) {
1987
  // Fetch prev path cache.
1988
  if ( isset( $this->_storage->plugin_main_file ) &&
1989
+ ! empty( $this->_storage->plugin_main_file->prev_path )
1990
  ) {
1991
  $absolute_path = $this->get_absolute_path( $this->_storage->plugin_main_file->prev_path );
1992
  if ( file_exists( $absolute_path ) ) {
2090
  $store_option = true;
2091
  }
2092
 
2093
+ if ( empty( $id_slug_type_path_map[ $module_id ]['path'] ) ||
2094
  /**
2095
  * This verification is for cases when suddenly the same module
2096
  * is installed but with a different folder name.
2154
  $caller_map = array();
2155
  $module_type = WP_FS__MODULE_TYPE_PLUGIN;
2156
  $themes_dir = fs_normalize_path( get_theme_root( get_stylesheet() ) );
2157
+ $plugin_dir_to_skip = false;
2158
 
2159
  for ( $i = 1, $bt = debug_backtrace(), $len = count( $bt ); $i < $len; $i ++ ) {
2160
  if ( empty( $bt[ $i ]['file'] ) ) {
2180
  'activate_plugin'
2181
  ) )
2182
  ) {
2183
+ if ( 'activate_plugin' === $bt[ $i ]['function'] ) {
2184
+ /**
2185
+ * Store the directory of the activator plugin so that any other file that starts with it
2186
+ * cannot be mistakenly chosen as a candidate caller file.
2187
+ *
2188
+ * @author Leo Fajardo
2189
+ *
2190
+ * @since 2.3.0
2191
+ */
2192
+ $caller_file_path = fs_normalize_path( $bt[ $i ]['file'] );
2193
+
2194
+ foreach ( $all_plugins_paths as $plugin_path ) {
2195
+ $plugin_dir = fs_normalize_path( dirname( $plugin_path ) . '/' );
2196
+ if ( false !== strpos( $caller_file_path, $plugin_dir ) ) {
2197
+ $plugin_dir_to_skip = $plugin_dir;
2198
+
2199
+ break;
2200
+ }
2201
+ }
2202
+ }
2203
+
2204
  // Ignore call stack hooks and files inclusion.
2205
  continue;
2206
  }
2207
 
2208
  $caller_file_path = fs_normalize_path( $bt[ $i ]['file'] );
2209
 
2210
+ if ( ! empty( $plugin_dir_to_skip ) ) {
2211
+ /**
2212
+ * Skip if it's an activator plugin file to avoid mistakenly choosing it as a candidate caller file.
2213
+ *
2214
+ * @author Leo Fajardo
2215
+ *
2216
+ * @since 2.3.0
2217
+ */
2218
+ if ( 0 === strpos( $caller_file_path, $plugin_dir_to_skip ) ) {
2219
+ continue;
2220
+ }
2221
+ }
2222
+
2223
  if ( 'functions.php' === basename( $caller_file_path ) ) {
2224
  /**
2225
  * 1. Assumes that theme's starting execution file is functions.php.
2279
  *
2280
  * @author Vova Feldman (@svovaf)
2281
  * @author Leo Fajardo (@leorw)
2282
+ *
2283
  * @since 1.1.2
2284
  */
2285
  function _add_deactivation_feedback_dialog_box() {
2286
+ $subscription_cancellation_dialog_box_template_params = $this->apply_filters( 'show_deactivation_subscription_cancellation', true ) ?
2287
+ $this->_get_subscription_cancellation_dialog_box_template_params() :
2288
+ array();
 
 
 
 
 
 
2289
 
2290
+ /**
2291
+ * @since 2.3.0 Developers can optionally hide the deactivation feedback form using the 'show_deactivation_feedback_form' filter.
2292
+ */
2293
+ $show_deactivation_feedback_form = true;
2294
+ if ( $this->has_filter( 'show_deactivation_feedback_form' ) ) {
2295
+ $show_deactivation_feedback_form = $this->apply_filters( 'show_deactivation_feedback_form', true );
2296
+ } else if ( $this->is_addon() ) {
2297
+ /**
2298
+ * If the add-on's 'show_deactivation_feedback_form' is not set, try to inherit the value from the parent.
2299
+ */
2300
+ $show_deactivation_feedback_form = $this->get_parent_instance()->apply_filters( 'show_deactivation_feedback_form', true );
2301
+ }
2302
 
2303
+ $uninstall_confirmation_message = $this->apply_filters( 'uninstall_confirmation_message', '' );
 
2304
 
2305
+ if (
2306
+ empty( $subscription_cancellation_dialog_box_template_params ) &&
2307
+ ! $show_deactivation_feedback_form &&
2308
+ empty( $uninstall_confirmation_message )
2309
+ ) {
2310
+ return;
2311
  }
2312
 
2313
+ $vars = array( 'id' => $this->_module_id );
2314
 
2315
+ if ( $show_deactivation_feedback_form ) {
2316
+ /* Check the type of user:
2317
+ * 1. Long-term (long-term)
2318
+ * 2. Non-registered and non-anonymous short-term (non-registered-and-non-anonymous-short-term).
2319
+ * 3. Short-term (short-term)
2320
+ */
2321
+ $is_long_term_user = true;
2322
+
2323
+ // Check if the site is at least 2 days old.
2324
+ $time_installed = $this->_storage->install_timestamp;
2325
+
2326
+ // Difference in seconds.
2327
+ $date_diff = time() - $time_installed;
2328
+
2329
+ // Convert seconds to days.
2330
+ $date_diff_days = floor( $date_diff / ( 60 * 60 * 24 ) );
2331
+
2332
+ if ( $date_diff_days < 2 ) {
2333
+ $is_long_term_user = false;
2334
+ }
2335
+
2336
+ $is_long_term_user = $this->apply_filters( 'is_long_term_user', $is_long_term_user );
2337
+
2338
+ if ( $is_long_term_user ) {
2339
+ $user_type = 'long-term';
2340
  } else {
2341
+ if ( ! $this->is_registered() && ! $this->is_anonymous() ) {
2342
+ $user_type = 'non-registered-and-non-anonymous-short-term';
2343
+ } else {
2344
+ $user_type = 'short-term';
2345
+ }
2346
  }
 
2347
 
2348
+ $uninstall_reasons = $this->_get_uninstall_reasons( $user_type );
2349
 
2350
+ $vars['reasons'] = $uninstall_reasons;
2351
+ }
2352
+
2353
+ $vars['subscription_cancellation_dialog_box_template_params'] = &$subscription_cancellation_dialog_box_template_params;
2354
+ $vars['show_deactivation_feedback_form'] = $show_deactivation_feedback_form;
2355
+ $vars['uninstall_confirmation_message'] = $uninstall_confirmation_message;
2356
 
2357
  /**
2358
+ * Load the HTML template for the deactivation feedback dialog box.
2359
+ *
2360
  * @todo Deactivation form core functions should be loaded only once! Otherwise, when there are multiple Freemius powered plugins the same code is loaded multiple times. The only thing that should be loaded differently is the various deactivation reasons object based on the state of the plugin.
2361
  */
2362
  fs_require_template( 'forms/deactivation/form.php', $vars );
2863
  function is_site_activation_mode( $and_on = true ) {
2864
  return (
2865
  ( $this->is_on() || ! $and_on ) &&
 
2866
  (
2867
+ ( $this->is_premium() && true === $this->_storage->require_license_activation ) ||
2868
+ (
2869
+ ( ! $this->is_registered() ||
2870
+ ( $this->is_only_premium() && ! $this->has_features_enabled_license() ) ) &&
2871
+ ( ! $this->is_enable_anonymous() ||
2872
+ ( ! $this->is_anonymous() && ! $this->is_pending_activation() ) )
2873
+ )
2874
  )
2875
  );
2876
  }
3002
  $active_basenames = get_option( 'active_plugins' );
3003
  }
3004
 
3005
+ if ( ! is_array( $active_basenames ) ) {
3006
+ $active_basenames = array();
3007
+ }
3008
+
3009
  if ( is_multisite() ) {
3010
  $network_active_basenames = get_site_option( 'active_sitewide_plugins' );
3011
 
3012
  if ( is_array( $network_active_basenames ) && ! empty( $network_active_basenames ) ) {
3013
+ $active_basenames = array_merge( $active_basenames, array_keys( $network_active_basenames ) );
3014
  }
3015
  }
3016
 
3017
  return $active_basenames;
3018
  }
3019
 
3020
+ /**
3021
+ * @author Leo Fajardo (@leorw)
3022
+ * @since 2.3.0
3023
+ *
3024
+ * @param int $blog_id
3025
+ *
3026
+ * @return array
3027
+ */
3028
+ static function get_active_plugins_directories_map( $blog_id = 0 ) {
3029
+ $active_basenames = self::get_active_plugins_basenames( $blog_id );
3030
+
3031
+ $map = array();
3032
+
3033
+ foreach ( $active_basenames as $active_basename ) {
3034
+ $active_basename = fs_normalize_path( $active_basename );
3035
+
3036
+ if ( false === strpos( $active_basename, '/' ) ) {
3037
+ continue;
3038
+ }
3039
+
3040
+ $map[ dirname( $active_basename ) ] = true;
3041
+ }
3042
+
3043
+ return $map;
3044
+ }
3045
+
3046
  /**
3047
  * Get collection of all active plugins. Including network activated plugins.
3048
  *
3290
  add_action( 'admin_footer', array( 'Freemius', '_enrich_ajax_url' ) );
3291
  add_action( 'admin_footer', array( 'Freemius', '_open_support_forum_in_new_page' ) );
3292
 
3293
+ if ( self::is_plugins_page() || self::is_themes_page() ) {
3294
+ add_action( 'admin_print_footer_scripts', array( 'Freemius', '_maybe_add_beta_label_styles' ), 9 );
3295
+
3296
+ /**
3297
+ * Specifically use this hook so that the JS event handlers will work properly on the "Themes"
3298
+ * page.
3299
+ *
3300
+ * @author Leo Fajardo (@leorw)
3301
+ * @since 2.3.0
3302
+ */
3303
+ add_action( 'admin_footer-' . self::get_current_page(), array( 'Freemius', '_maybe_add_beta_label_to_plugins_and_handle_confirmation') );
3304
+ }
3305
 
3306
  self::$_statics_loaded = true;
3307
  }
3898
  $key = fs_strip_url_protocol( get_site_url( $blog_id ) );
3899
 
3900
  $secure_auth = SECURE_AUTH_KEY;
3901
+ if ( empty( $secure_auth ) ||
3902
+ false !== strpos( $secure_auth, ' ' ) ||
3903
+ 'put your unique phrase here' === $secure_auth
3904
+ ) {
3905
  // Protect against default auth key.
3906
  $secure_auth = md5( microtime() );
3907
  }
4798
 
4799
  return;
4800
  } else {
4801
+ $is_network_admin = fs_is_network_admin();
4802
+
4803
+ if (
4804
+ $this->_parent->is_registered() &&
4805
+ ! $this->is_registered() &&
4806
+ /**
4807
+ * If not registered for add-on and the following conditions for the add-on are met, activate add-on account.
4808
+ * * Network active and in network admin - network activate add-on account.
4809
+ * * Network active and not in network admin - activate add-on account for the current blog.
4810
+ * * Not network active and not in network admin - activate add-on account for the current blog.
4811
+ *
4812
+ * If not registered for add-on, not network active, and in network admin, do not handle the add-on activation.
4813
+ *
4814
+ * @author Leo Fajardo (@leorw)
4815
+ * @since 2.3.0
4816
+ */
4817
+ ( $this->is_network_active() || ! $is_network_admin )
4818
+ ) {
4819
  // If parent plugin activated, automatically install add-on for the user.
4820
+ $this->_activate_addon_account(
4821
+ $this->_parent,
4822
+ ( $this->is_network_active() && $is_network_admin ) ?
4823
+ true :
4824
+ get_current_blog_id()
4825
+ );
4826
  } else if ( ! $this->_parent->is_registered() && $this->is_registered() ) {
4827
  // If add-on activated and parent not, automatically install parent for the user.
4828
  $this->activate_parent_account( $this->_parent );
4928
  private function should_use_freemius_updater_and_dialog() {
4929
  return (
4930
  /**
4931
+ * Allow updater and dialog when the `fs_allow_updater_and_dialog` URL query param exists and has `true`
4932
+ * value, or when the current page is not the "Add Plugins" page (/plugin-install.php) and the `action`
4933
+ * URL query param doesn't exist or its value is not `install-plugin` so that there will be no conflicts
4934
+ * with the .org plugins' functionalities (e.g. installation from the "Add Plugins" page and viewing
4935
+ * plugin details from .org).
4936
  */
4937
+ ( true === fs_request_get_bool( 'fs_allow_updater_and_dialog' ) ) ||
4938
+ (
4939
+ ! self::is_plugin_install_page() &&
4940
+ // Disallow updater and dialog when installing a plugin, otherwise .org "add-on" plugins will be affected.
4941
+ ( 'install-plugin' !== fs_request_get( 'action' ) )
4942
+ )
4943
  );
4944
  }
4945
 
5395
  'premium_suffix' => $premium_suffix,
5396
  'is_live' => $this->get_bool_option( $plugin_info, 'is_live', true ),
5397
  'affiliate_moderation' => $this->get_option( $plugin_info, 'has_affiliation' ),
5398
+ 'bundle_id' => $this->get_option( $plugin_info, 'bundle_id', null ),
5399
  ) );
5400
 
5401
  if ( $plugin->is_updated() ) {
5405
  // Set the secret key after storing the plugin, we don't want to store the key in the storage.
5406
  $this->_plugin->secret_key = $secret_key;
5407
 
5408
+ /**
5409
+ * If the product is network integrated and activated and the current view is in the network level Admin dashboard, if the product's network-level menu located differently from the sub-site level, then use the network menu details (when set).
5410
+ *
5411
+ * @author Vova Feldman
5412
+ * @since 2.4.5
5413
+ */
5414
+ if ( $this->is_network_active() && fs_is_network_admin() ) {
5415
+ if ( isset( $plugin_info['menu_network'] ) &&
5416
+ is_array( $plugin_info['menu_network'] ) &&
5417
+ ! empty( $plugin_info['menu_network'] )
5418
+ ) {
5419
+ $plugin_info['menu'] = $plugin_info['menu_network'];
5420
+ }
5421
+ }
5422
+
5423
  if ( ! isset( $plugin_info['menu'] ) ) {
5424
  $plugin_info['menu'] = array();
5425
 
6534
  }
6535
 
6536
  if ( is_multisite() ) {
6537
+ $this->switch_to_blog( $current_blog_id, fs_is_network_admin() ? $this->get_network_install() : null );
6538
 
6539
  $this->do_action( "after_{$name}_cron_multisite" );
6540
  }
6614
  */
6615
  function _sync_cron_method( array $blog_ids, $current_blog_id = null ) {
6616
  if ( $this->is_registered() ) {
6617
+ $this->sync_user_beta_mode();
6618
+
6619
  if ( $this->has_paid_plan() ) {
6620
  // Initiate background plan sync.
6621
  $this->_sync_license( true, false, $current_blog_id );
6956
  * @author Leo Fajardo (@leorw)
6957
  * @since 1.2.2
6958
  */
6959
+ if ( $this->is_theme() &&
6960
+ ! $this->has_settings_menu() &&
6961
+ ! isset( $_REQUEST['fs_action'] ) &&
6962
+ $this->can_activate_previous_theme()
6963
  ) {
6964
  if ( $this->is_only_premium() ) {
6965
  $this->activate_previous_theme();
7274
  foreach ( $plans_ids_to_keep as $plan_id ) {
7275
  $plan = self::_get_plan_by_id( $plan_id );
7276
  if ( is_object( $plan ) ) {
7277
+ $plans_to_keep[] = self::_encrypt_entity( $plan );
7278
  }
7279
  }
7280
  }
7443
  // Clear API cache on activation.
7444
  FS_Api::clear_cache();
7445
 
7446
+ $is_premium_version_activation = $this->is_plugin() ?
7447
+ ( current_filter() !== ( 'activate_' . $this->_free_plugin_basename ) ) :
7448
+ $this->is_premium();
7449
 
7450
  $this->_logger->info( 'Activating ' . ( $is_premium_version_activation ? 'premium' : 'free' ) . ' plugin version.' );
7451
 
7452
+ if ( $this->is_plugin() ) {
7453
+ // This logic is relevant only to plugins since both the free and premium versions of a plugin can be active at the same time.
7454
+ // 1. If running in the activation of the FREE module, get the basename of the PREMIUM.
7455
+ // 2. If running in the activation of the PREMIUM module, get the basename of the FREE.
7456
+ $other_version_basename = $is_premium_version_activation ?
7457
+ $this->_free_plugin_basename :
7458
+ $this->premium_plugin_basename();
7459
+
7460
+ if ( ! $this->_is_network_active ) {
7461
+ /**
7462
+ * Themes are always network activated, but the ACTUAL activation is per site.
7463
+ *
7464
+ * During the activation, the plugin isn't yet active, therefore,
7465
+ * _is_network_active will be set to false even if it's a network level
7466
+ * activation. So we need to fix that by looking at the is_network_admin() value.
7467
+ *
7468
+ * @author Vova Feldman
7469
+ */
7470
+ $this->_is_network_active = (
7471
+ $this->_is_multisite_integrated &&
7472
+ fs_is_network_admin()
7473
+ );
7474
+ }
7475
 
 
7476
  /**
7477
+ * If the other module version is active, deactivate it.
 
 
7478
  *
7479
+ * is_plugin_active() checks if the plugin is active on the site or the network level and
7480
+ * deactivate_plugins() deactivates the plugin whether it's activated on the site or network level.
7481
+ *
7482
+ * @author Leo Fajardo (@leorw)
7483
+ * @since 1.2.2
7484
  */
7485
+ if ( is_plugin_active( $other_version_basename ) ) {
7486
+ deactivate_plugins( $other_version_basename );
7487
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7488
  }
7489
 
7490
  if ( $this->is_registered() ) {
7534
  }
7535
  }
7536
 
7537
+ $is_trial_or_has_features_enabled_license = ( $this->is_trial() || $this->has_features_enabled_license() );
7538
+
7539
+ if ( $this->is_addon() && ! $is_trial_or_has_features_enabled_license ) {
7540
+ /**
7541
+ * When activating an add-on, try to also activate a license.
7542
+ *
7543
+ * @author Leo Fajardo (@leorw)
7544
+ * @since 2.3.0
7545
+ */
7546
+ if ( ! $this->_is_network_active ) {
7547
+ $this->maybe_activate_addon_license();
7548
+ } else {
7549
+ $this->maybe_network_activate_addon_license();
7550
+ }
7551
+
7552
+ /**
7553
+ * Avoid redirecting to the license activation screen after automatically activating an add-on license.
7554
+ *
7555
+ * @author Leo Fajardo (@leorw)
7556
+ * @since 2.3.0
7557
+ */
7558
+ $is_trial_or_has_features_enabled_license = ( $this->is_trial() || $this->has_features_enabled_license() );
7559
+
7560
+ if ( $is_trial_or_has_features_enabled_license && true === $this->_storage->require_license_activation ) {
7561
+ $this->_storage->require_license_activation = false;
7562
+ }
7563
+ }
7564
+
7565
  if (
7566
  $is_premium_version_activation &&
7567
  (
7568
  ( ! $this->is_registered() && $this->is_anonymous() ) ||
7569
  (
7570
  $this->is_registered() &&
7571
+ ! $is_trial_or_has_features_enabled_license
 
7572
  )
7573
  )
7574
  ) {
7610
  $this->_storage->was_plugin_loaded = true;
7611
  }
7612
 
7613
+ /**
7614
+ * @author Leo Fajardo (@leorw)
7615
+ * @since 2.3.0
7616
+ */
7617
+ private function maybe_activate_addon_license() {
7618
+ $parent_fs = $this->get_parent_instance();
7619
+
7620
+ if (
7621
+ ! is_object( $parent_fs ) ||
7622
+ ( ! $parent_fs->is_registered() && ! $parent_fs->is_network_registered() )
7623
+ ) {
7624
+ // Try to activate a license only if the parent plugin is active and has a valid `install`.
7625
+ return;
7626
+ }
7627
+
7628
+ $license = $this->get_addon_active_parent_license();
7629
+ if ( ! is_object( $license ) ) {
7630
+ return;
7631
+ }
7632
+
7633
+ if ( ! $this->is_registered() ) {
7634
+ // Opt in with a license key.
7635
+ $this->opt_in(
7636
+ $parent_fs->get_current_or_network_user()->email,
7637
+ false,
7638
+ false,
7639
+ $license->secret_key
7640
+ );
7641
+ } else {
7642
+ // Activate the license.
7643
+ $install = $this->get_api_site_scope()->call(
7644
+ '/',
7645
+ 'put',
7646
+ array( 'license_key' => $this->apply_filters( 'license_key', $license->secret_key ) )
7647
+ );
7648
+
7649
+ if ( ! FS_Api::is_api_error( $install ) ) {
7650
+ $this->_sync_addon_license( $this->get_id(), true );
7651
+ }
7652
+ }
7653
+ }
7654
+
7655
+
7656
+ /**
7657
+ * @author Leo Fajardo (@leorw)
7658
+ * @since 2.3.0
7659
+ *
7660
+ * @param FS_Plugin_License $license
7661
+ */
7662
+ private function maybe_network_activate_addon_license( $license = null ) {
7663
+ $parent_fs = $this->get_parent_instance();
7664
+ if ( ! is_object( $parent_fs ) || ( ! $parent_fs->is_registered() && ! $parent_fs->is_network_registered() ) ) {
7665
+ // Try to activate a license only if the parent plugin is active and has a valid `install`.
7666
+ return;
7667
+ }
7668
+
7669
+ $license = ( ! is_null( $license ) ) ?
7670
+ $license :
7671
+ $this->get_addon_active_parent_license();
7672
+
7673
+ if ( ! is_object( $license ) ) {
7674
+ return;
7675
+ }
7676
+
7677
+ if ( ! $this->is_network_registered() ) {
7678
+ $sites = $this->get_sites_for_network_level_optin();
7679
+
7680
+ if ( count( $sites ) > $license->left() ) {
7681
+ // If the add-on is network active, try to activate the license only if it can be activated on all sites.
7682
+ return;
7683
+ }
7684
+
7685
+ // Opt in with a license key.
7686
+ $this->opt_in(
7687
+ $parent_fs->get_user()->email,
7688
+ false,
7689
+ false,
7690
+ $license->secret_key,
7691
+ false,
7692
+ false,
7693
+ false,
7694
+ null,
7695
+ $sites
7696
+ );
7697
+ } else {
7698
+ $blog_2_install_map = array();
7699
+ $site_ids = array();
7700
+
7701
+ $all_sites = Freemius::get_sites();
7702
+
7703
+ foreach ( $all_sites as $site ) {
7704
+ $blog_id = Freemius::get_site_blog_id( $site );
7705
+ $install = $this->get_install_by_blog_id( $blog_id );
7706
+
7707
+ if ( is_object( $install ) && FS_Plugin_License::is_valid_id( $install->license_id ) ) {
7708
+ // Skip license activation for installs that are already associated with a license.
7709
+ continue;
7710
+ }
7711
+
7712
+ if ( is_object( $install ) ) {
7713
+ $blog_2_install_map[ $blog_id ] = $install;
7714
+ } else {
7715
+ $site_ids[] = $blog_id;
7716
+ }
7717
+ }
7718
+
7719
+ if ( ( count( $blog_2_install_map ) + count( $site_ids ) ) > $license->left() ) {
7720
+ return;
7721
+ }
7722
+
7723
+ $user = $this->get_current_or_network_user();
7724
+
7725
+ if ( ! empty( $blog_2_install_map ) ) {
7726
+ $result = $this->activate_license_on_many_installs( $user, $license->secret_key, $blog_2_install_map );
7727
+
7728
+ if ( true !== $result ) {
7729
+ return;
7730
+ }
7731
+ }
7732
+
7733
+ if ( ! empty( $site_ids ) ) {
7734
+ $this->activate_license_on_many_sites( $user, $license->secret_key, $site_ids );
7735
+ }
7736
+ }
7737
+ }
7738
+
7739
+ /**
7740
+ * @author Leo Fajardo (@leorw)
7741
+ * @since 2.3.0
7742
+ *
7743
+ * @return FS_Plugin_License
7744
+ */
7745
+ private function get_addon_active_parent_license() {
7746
+ $parent_licenses_endpoint = "/plugins/{$this->get_id()}/parent_licenses.json?filter=activatable";
7747
+ $parent_instance = $this->get_parent_instance();
7748
+
7749
+ $foreign_licenses = $parent_instance->get_foreign_licenses_info(
7750
+ self::get_all_licenses( $this->get_parent_id() )
7751
+ );
7752
+
7753
+ if ( ! empty ( $foreign_licenses ) ) {
7754
+ $foreign_licenses = array(
7755
+ // Prefix with `+` to tell the server to include foreign licenses in the licenses collection.
7756
+ 'ids' => ( urlencode( '+' ) . implode( ',', $foreign_licenses['ids'] ) ),
7757
+ 'license_keys' => implode( ',', array_map( 'urlencode', $foreign_licenses['license_keys'] ) )
7758
+ );
7759
+
7760
+ $parent_licenses_endpoint = add_query_arg( $foreign_licenses, $parent_licenses_endpoint );
7761
+ }
7762
+
7763
+ $result = $parent_instance->get_current_or_network_user_api_scope()->get( $parent_licenses_endpoint, true );
7764
+
7765
+ if (
7766
+ ! $this->is_api_result_object( $result, 'licenses' ) ||
7767
+ ! is_array( $result->licenses ) ||
7768
+ empty( $result->licenses )
7769
+ ) {
7770
+ return null;
7771
+ }
7772
+
7773
+ $license = new FS_Plugin_License( $result->licenses[ 0 ] );
7774
+
7775
+ return $license;
7776
+ }
7777
+
7778
+ /**
7779
+ * @author Leo Fajardo (@leorw)
7780
+ * @since 2.3.0
7781
+ *
7782
+ * @return array
7783
+ */
7784
+ private function get_sites_for_network_level_optin() {
7785
+ $sites = array();
7786
+ $all_sites = self::get_sites();
7787
+
7788
+ foreach ( $all_sites as $site ) {
7789
+ $blog_id = self::get_site_blog_id( $site );
7790
+
7791
+ if ( ! $this->is_site_delegated_connection( $blog_id ) &&
7792
+ ! $this->is_installed_on_site( $blog_id )
7793
+ ) {
7794
+ $sites[] = $this->get_site_info( $site );
7795
+ }
7796
+ }
7797
+
7798
+ return $sites;
7799
+ }
7800
+
7801
  /**
7802
  * Delete account.
7803
  *
7855
 
7856
  // Clear all storage data.
7857
  $this->_storage->clear_all( true, array(
7858
+ 'is_delegated_connection',
7859
  'connectivity_test',
7860
  'is_on',
7861
  ), false );
8211
  get_current_blog_id() == $network_or_blog_id ||
8212
  ( true === $network_or_blog_id && fs_is_network_admin() )
8213
  ) {
8214
+ $this->_is_anonymous = null;
8215
  }
8216
  }
8217
 
8675
  * @author Vova Feldman (@svovaf)
8676
  * @since 1.1.2
8677
  *
8678
+ * @param string[] $override
8679
+ * @param bool $include_plugins Since 1.1.8 by default include plugin changes.
8680
+ * @param bool $include_themes Since 1.1.8 by default include plugin changes.
8681
+ * @param bool $include_blog_data Since 2.3.0 by default include the current blog's data (language, charset, title, and URL).
8682
  *
8683
  * @return array
8684
  */
8685
  private function get_install_data_for_api(
8686
  array $override,
8687
  $include_plugins = true,
8688
+ $include_themes = true,
8689
+ $include_blog_data = true
8690
  ) {
8691
  if ( ! defined( 'WP_FS__TRACK_PLUGINS' ) || false !== WP_FS__TRACK_PLUGINS ) {
8692
  /**
8714
 
8715
  $versions = $this->get_versions();
8716
 
8717
+ $blog_data = $include_blog_data ?
8718
+ array(
8719
+ 'language' => get_bloginfo( 'language' ),
8720
+ 'charset' => get_bloginfo( 'charset' ),
8721
+ 'title' => get_bloginfo( 'name' ),
8722
+ 'url' => get_site_url(),
8723
+ ) :
8724
+ array();
8725
+
8726
+ return array_merge( $versions, $blog_data, array(
8727
  'version' => $this->get_plugin_version(),
8728
  'is_premium' => $this->is_premium(),
 
 
 
 
8729
  // Special params.
8730
  'is_active' => true,
8731
  'is_disconnected' => $this->is_tracking_prohibited(),
9493
  return $this->_plugin->id;
9494
  }
9495
 
9496
+ /**
9497
+ * @author Leo Fajardo (@leorw)
9498
+ * @since 2.2.4
9499
+ *
9500
+ * @return number|null Bundle ID.
9501
+ */
9502
+ function get_bundle_id() {
9503
+ return ( isset( $this->_plugin->bundle_id ) && FS_Plugin::is_valid_id( $this->_plugin->bundle_id ) ) ?
9504
+ $this->_plugin->bundle_id :
9505
+ null;
9506
+ }
9507
+
9508
  /**
9509
  * @author Vova Feldman (@svovaf)
9510
  * @since 1.2.1.5
10248
  return false;
10249
  }
10250
 
10251
+ /**
10252
+ * @var array<number,object[]> {
10253
+ * @key number Add-on ID.
10254
+ * @val object[] The add-on's plans and prices object.
10255
+ * }
10256
+ */
10257
+ private $plans_and_pricing_by_addon_id;
10258
+
10259
+ /**
10260
+ * @author Leo Fajardo (@leorw)
10261
+ * @since 2.3.0
10262
+ *
10263
+ * @return array<number,object[]> {
10264
+ * @key number Add-on ID.
10265
+ * @val object[] The add-on's plans and prices object.
10266
+ * }
10267
+ */
10268
+ function _get_addons_plans_and_pricing_map_by_id() {
10269
+ if ( ! isset( $this->plans_and_pricing_by_addon_id ) ) {
10270
+ $result = $this->get_api_plugin_scope()->get( $this->add_show_pending( "/addons/pricing.json?type=visible" ) );
10271
+
10272
+ $plans_and_pricing_by_addon_id = array();
10273
+ if ( $this->is_api_result_object( $result, 'addons' ) ) {
10274
+ foreach ( $result->addons as $addon ) {
10275
+ $plans_and_pricing_by_addon_id[ $addon->id ] = $addon->plans;
10276
+ }
10277
+ }
10278
+
10279
+ $this->plans_and_pricing_by_addon_id = $plans_and_pricing_by_addon_id;
10280
+ }
10281
+
10282
+ return $this->plans_and_pricing_by_addon_id;
10283
+ }
10284
+
10285
+ /**
10286
+ * @author Leo Fajardo (@leorw)
10287
+ * @since 2.3.0
10288
+ *
10289
+ * @param number $addon_id
10290
+ * @param bool $is_installed
10291
+ *
10292
+ * @return array
10293
+ */
10294
+ function _get_addon_info( $addon_id, $is_installed ) {
10295
+ $addon = $this->get_addon( $addon_id );
10296
+
10297
+ if ( ! is_object( $addon ) ) {
10298
+ // Unexpected call.
10299
+ return array();
10300
+ }
10301
+
10302
+ $slug = $addon->slug;
10303
+
10304
+ $addon_storage = FS_Storage::instance( WP_FS__MODULE_TYPE_PLUGIN, $slug );
10305
+
10306
+ if ( ! fs_is_network_admin() ) {
10307
+ // Get blog-level activated installations.
10308
+ $sites = self::$_accounts->get_option( 'sites', array() );
10309
+ } else {
10310
+ $sites = null;
10311
+
10312
+ if ( $this->is_addon_activated( $addon_id ) &&
10313
+ $this->get_addon_instance( $addon_id )->is_network_active()
10314
+ ) {
10315
+ if ( FS_Site::is_valid_id( $addon_storage->network_install_blog_id ) ) {
10316
+ // Get network-level activated installations.
10317
+ $sites = self::$_accounts->get_option(
10318
+ 'sites',
10319
+ array(),
10320
+ $addon_storage->network_install_blog_id
10321
+ );
10322
+ }
10323
+ }
10324
+ }
10325
+
10326
+ $addon_info = array(
10327
+ 'is_connected' => false,
10328
+ 'slug' => $slug,
10329
+ 'title' => $addon->title
10330
+ );
10331
+
10332
+ if ( ! $is_installed ) {
10333
+ $plans_and_pricing_by_addon_id = $this->_get_addons_plans_and_pricing_map_by_id();
10334
+
10335
+ if ( isset( $plans_and_pricing_by_addon_id[ $addon_id ] ) ) {
10336
+ $has_paid_plan = false;
10337
+ $plans = $plans_and_pricing_by_addon_id[ $addon_id ];
10338
+
10339
+ if ( is_array( $plans ) && count( $plans ) > 0 ) {
10340
+ foreach ( $plans as $plan ) {
10341
+ if ( isset( $plan->pricing ) &&
10342
+ is_array( $plan->pricing ) &&
10343
+ count( $plan->pricing ) > 0
10344
+ ) {
10345
+ $has_paid_plan = true;
10346
+ break;
10347
+ }
10348
+ }
10349
+ }
10350
+
10351
+ $addon_info['has_paid_plan'] = $has_paid_plan;
10352
+ }
10353
+ }
10354
+
10355
+ if ( ! is_array( $sites ) || ! isset( $sites[ $slug ] ) ) {
10356
+ return $addon_info;
10357
+ }
10358
+
10359
+ $site = $sites[ $slug ];
10360
+
10361
+ $addon_info['is_connected'] = (
10362
+ ( $addon->parent_plugin_id == $this->get_id() ) &&
10363
+ is_object( $site ) &&
10364
+ FS_Site::is_valid_id( $site->id ) &&
10365
+ FS_User::is_valid_id( $site->user_id ) &&
10366
+ FS_Plugin_Plan::is_valid_id( $site->plan_id )
10367
+ );
10368
+
10369
+ if ( $addon_info['is_connected'] && $is_installed ) {
10370
+ return $addon_info;
10371
+ }
10372
+
10373
+ $addon_info['site'] = $site;
10374
+
10375
+ $plugins_data = self::$_accounts->get_option( WP_FS__MODULE_TYPE_PLUGIN . 's', array() );
10376
+ if ( isset( $plugins_data[ $slug ] ) ) {
10377
+ $plugin_data = $plugins_data[ $slug ];
10378
+
10379
+ $addon_info['version'] = $plugin_data->version;
10380
+ }
10381
+
10382
+ $all_plans = self::$_accounts->get_option( 'plans', array() );
10383
+ if ( isset( $all_plans[ $slug ] ) ) {
10384
+ $plans = $all_plans[ $slug ];
10385
+
10386
+ foreach ( $plans as $plan ) {
10387
+ if ( $site->plan_id == Freemius::_decrypt( $plan->id ) ) {
10388
+ $addon_info['plan_name'] = Freemius::_decrypt( $plan->name );
10389
+ $addon_info['plan_title'] = Freemius::_decrypt( $plan->title );
10390
+ break;
10391
+ }
10392
+ }
10393
+ }
10394
+
10395
+ $licenses = self::$_accounts->get_option( 'all_licenses', array() );
10396
+ if ( is_array( $licenses ) && isset( $licenses[ $addon_id ] ) ) {
10397
+ foreach ( $licenses[ $addon_id ] as $license ) {
10398
+ if ( $license->id == $site->license_id ) {
10399
+ $addon_info['license'] = $license;
10400
+ break;
10401
+ }
10402
+ }
10403
+ }
10404
+
10405
+ if ( isset( $addon_info['license'] ) ) {
10406
+ if ( isset( $addon_storage->subscriptions ) &&
10407
+ ! empty( $addon_storage->subscriptions )
10408
+ ) {
10409
+ foreach ( $addon_storage->subscriptions as $subscription ) {
10410
+ if ( $subscription->license_id == $site->license_id ) {
10411
+ $addon_info['subscription'] = $subscription;
10412
+ break;
10413
+ }
10414
+ }
10415
+ }
10416
+ }
10417
+
10418
+ return $addon_info;
10419
+ }
10420
+
10421
  /**
10422
  * @author Vova Feldman (@svovaf)
10423
  * @since 2.0.0
10896
  * @return number[]
10897
  */
10898
  private function get_plans_ids_associated_with_installs() {
10899
+ if ( ! is_multisite() ) {
10900
  if ( ! is_object( $this->_site ) ||
10901
  ! FS_Plugin_Plan::is_valid_id( $this->_site->plan_id )
10902
  ) {
11031
  $all_licenses = $this->get_user_licenses( $this->_user->id );
11032
  }
11033
 
11034
+ $foreign_licenses = $this->get_foreign_licenses_info( $all_licenses, $site_license_id );
 
 
 
11035
 
11036
  $all_licenses_map = array();
11037
  foreach ( $all_licenses as $license ) {
11038
  $all_licenses_map[ $license->id ] = true;
 
 
 
 
 
 
 
 
 
 
11039
  }
11040
 
11041
  $licenses = $this->_fetch_licenses( false, $site_license_id, $foreign_licenses, $blog_id );
11767
  return true;
11768
  }
11769
 
11770
+ return ( 1 === ( count( $this->_plans ) - ( $this->has_free_plan() ? 1 : 0 ) ) );
11771
  }
11772
 
11773
  /**
11891
  * @since 2.2.1
11892
  *
11893
  * @param bool $is_license_deactivation
11894
+ *
11895
+ * @return array
11896
  */
11897
+ function _get_subscription_cancellation_dialog_box_template_params( $is_license_deactivation = false ) {
11898
  if ( fs_is_network_admin() ) {
11899
  // Subscription cancellation dialog box is currently not supported for multisite networks.
11900
+ return array();
11901
  }
11902
 
11903
  $license = $this->_get_license();
11912
  $license->is_lifetime() ||
11913
  ( ! $license->is_single_site() && $license->activated > 1 )
11914
  ) {
11915
+ return array();
11916
  }
11917
 
11918
  /**
11920
  */
11921
  $subscription = $this->_get_subscription( $license->id );
11922
  if ( ! is_object( $subscription ) || ! $subscription->is_active() ) {
11923
+ return array();
11924
  }
11925
 
11926
+ return array(
11927
  'id' => $this->_module_id,
11928
  'license' => $license,
11929
  'has_trial' => $this->is_paid_trial(),
11930
  'is_license_deactivation' => $is_license_deactivation,
11931
  );
 
 
11932
  }
11933
 
11934
  /**
11993
 
11994
  // Add license activation link and AJAX request handler.
11995
  if ( self::is_plugins_page() ) {
11996
+ $is_network_admin = fs_is_network_admin();
11997
+
11998
+ if (
11999
+ ( $is_network_admin && $this->is_network_active() && ! $this->is_network_delegated_connection() ) ||
12000
+ ( ! $is_network_admin && ( ! $this->is_network_active() || $this->is_delegated_connection() ) )
12001
+ ) {
12002
+ /**
12003
+ * @since 1.2.0 Add license action link only on plugins page.
12004
+ */
12005
+ $this->_add_license_action_link();
12006
+ }
12007
  }
12008
 
12009
  // Add license activation AJAX callback.
12034
 
12035
  /**
12036
  * @author Leo Fajardo (@leorw)
12037
+ * @since 2.3.0
12038
+ */
12039
+ function _add_beta_mode_update_handler() {
12040
+ if ( ! $this->is_user_admin() ) {
12041
+ return;
12042
+ }
12043
+
12044
+ if ( ! $this->is_premium() ) {
12045
+ return;
12046
+ }
12047
+
12048
+ $this->add_ajax_action( 'set_beta_mode', array( &$this, '_set_beta_mode_ajax_handler' ) );
12049
+ }
12050
+
12051
+ /**
12052
+ * @author Leo Fajardo (@leorw)
12053
+ * @since 2.3.0
12054
+ */
12055
+ function _set_beta_mode_ajax_handler() {
12056
+ $this->_logger->entrance();
12057
+
12058
+ $this->check_ajax_referer( 'set_beta_mode' );
12059
+
12060
+ if ( ! $this->is_user_admin() ) {
12061
+ // Only for admins.
12062
+ self::shoot_ajax_failure();
12063
+ }
12064
+
12065
+ $is_beta = trim( fs_request_get( 'is_beta', '', 'post' ) );
12066
+
12067
+ if ( empty( $is_beta ) || ! in_array( $is_beta, array( 'true', 'false' ) ) ) {
12068
+ self::shoot_ajax_failure();
12069
+ }
12070
+
12071
+ $user = $this->get_api_user_scope()->call(
12072
+ '',
12073
+ 'put',
12074
+ array(
12075
+ 'plugin_id' => $this->get_id(),
12076
+ 'is_beta' => ( 'true' == $is_beta ),
12077
+ 'fields' => 'is_beta'
12078
+ )
12079
+ );
12080
+
12081
+ if ( ! $this->is_api_result_entity( $user ) ) {
12082
+ self::shoot_ajax_failure(
12083
+ FS_Api::is_api_error_object( $user ) ?
12084
+ $user->error->message :
12085
+ fs_text_inline( "An unknown error has occurred while trying to set the user's beta mode.", 'unknown-error-occurred', $this->get_slug() )
12086
+ );
12087
+ }
12088
+
12089
+ $this->_user->is_beta = $user->is_beta;
12090
+ $this->_store_user();
12091
+
12092
+ self::shoot_ajax_response( array( 'success' => true ) );
12093
+ }
12094
+
12095
+ /**
12096
+ * License activation WP AJAX handler.
12097
  *
12098
+ * @author Leo Fajardo (@leorw)
12099
  * @since 1.1.9
12100
+ *
12101
+ * @uses Freemius::activate_license()
12102
+ */
12103
+ function _activate_license_ajax_action() {
12104
+ $this->_logger->entrance();
12105
+
12106
+ $this->check_ajax_referer( 'activate_license' );
12107
+
12108
+ $license_key = trim( fs_request_get( 'license_key' ) );
12109
+
12110
+ if ( empty( $license_key ) ) {
12111
+ exit;
12112
+ }
12113
+
12114
+ $result = $this->activate_license(
12115
+ $license_key,
12116
+ fs_is_network_admin() ?
12117
+ fs_request_get( 'sites', array(), 'post' ) :
12118
+ array(),
12119
+ fs_request_get_bool( 'is_marketing_allowed', null ),
12120
+ fs_request_get( 'blog_id', null ),
12121
+ fs_request_get( 'module_id', null, 'post' )
12122
+ );
12123
+
12124
+ echo json_encode( $result );
12125
+
12126
+ exit;
12127
+ }
12128
+
12129
+ /**
12130
+ * A helper method to activate migrated licenses. If the product is network activated and integrated, the method will network activate the license.
12131
+ *
12132
+ * @author Vova Feldman (@svovaf)
12133
+ * @since 2.3.0
12134
+ *
12135
+ * @param string $license_key
12136
+ * @param null|bool $is_marketing_allowed
12137
+ * @param null|number $plugin_id
12138
+ *
12139
+ * @return array {
12140
+ * @var bool $success
12141
+ * @var string $error
12142
+ * @var string $next_page
12143
+ * }
12144
+ *
12145
+ * @uses Freemius::activate_license()
12146
+ */
12147
+ function activate_migrated_license(
12148
+ $license_key,
12149
+ $is_marketing_allowed = null,
12150
+ $plugin_id = null
12151
+ ) {
12152
+ return $this->activate_license(
12153
+ $license_key,
12154
+ $this->is_network_active() ?
12155
+ $this->get_sites_for_network_level_optin() :
12156
+ array(),
12157
+ $is_marketing_allowed,
12158
+ null,
12159
+ $plugin_id
12160
+ );
12161
+ }
12162
+
12163
+ /**
12164
+ * The implementation of this method was previously in `_activate_license_ajax_action()`.
12165
+ *
12166
+ * @author Vova Feldman (@svovaf)
12167
+ * @since 2.2.4
12168
  * @since 2.0.0 When a super-admin that hasn't connected before is network activating a license and excluding some of the sites for the license activation, go over the unselected sites in the network and if a site is not connected, skipped, nor delegated, if it's a freemium product then just skip the connection for the site, if it's a premium only product, delegate the connection and license activation to the site admin (Vova Feldman @svovaf).
12169
+ * @param string $license_key
12170
+ * @param array $sites
12171
+ * @param null|bool $is_marketing_allowed
12172
+ * @param null|int $blog_id
12173
+ * @param null|number $plugin_id
12174
+ *
12175
+ * @return array {
12176
+ * @var bool $success
12177
+ * @var string $error
12178
+ * @var string $next_page
12179
+ * }
12180
  */
12181
+ private function activate_license(
12182
+ $license_key,
12183
+ $sites = array(),
12184
+ $is_marketing_allowed = null,
12185
+ $blog_id = null,
12186
+ $plugin_id = null
12187
+ ) {
12188
  $this->_logger->entrance();
 
 
12189
 
12190
+ $license_key = trim( $license_key );
12191
 
12192
+ if ( ! fs_is_network_admin() ) {
12193
+ // If the license activation is executed outside the context of a network admin, ignore the sites collection.
12194
+ $sites = array();
12195
  }
12196
 
12197
+ $fs = ( empty($plugin_id) || $plugin_id == $this->_module_id ) ?
 
12198
  $this :
12199
  $this->get_addon_instance( $plugin_id );
12200
 
12201
  $error = false;
12202
  $next_page = false;
12203
 
 
 
 
 
 
12204
  $has_valid_blog_id = is_numeric( $blog_id );
12205
 
12206
  if ( $fs->is_registered() ) {
12290
  false,
12291
  false,
12292
  false,
12293
+ $is_marketing_allowed,
12294
  $sites
12295
  );
12296
 
12344
  }
12345
 
12346
  if ( ! empty( $pending_sites ) ) {
12347
+ if ( $this->is_freemium() && $this->is_enable_anonymous() ) {
12348
  $this->skip_connection( $pending_sites );
12349
  } else {
12350
  $this->delegate_connection( $pending_sites );
12363
  );
12364
 
12365
  if ( false !== $error ) {
12366
+ $result['error'] = $this->apply_filters( 'opt_in_error_message', $error );
12367
  } else {
12368
+ if ( $this->is_addon() || $this->has_addons() ) {
12369
+ /**
12370
+ * Purge the valid user licenses cache so that when the "Account" or the "Add-Ons" page is loaded,
12371
+ * an updated valid user licenses collection will be fetched from the server which is used to also
12372
+ * update the account add-ons (add-ons the user has licenses for).
12373
+ *
12374
+ * @author Leo Fajardo (@leorw)
12375
+ * @since 2.2.4
12376
+ */
12377
+ $this->purge_valid_user_licenses_cache();
12378
+ }
12379
+
12380
  $result['next_page'] = $next_page;
12381
  }
12382
 
12383
+ return $result;
 
 
12384
  }
12385
 
12386
  /**
12415
  $total_sites_to_delegate = count( $sites_by_action['delegate'] );
12416
 
12417
  $next_page = '';
12418
+
12419
+ $has_any_install = fs_request_get_bool( 'has_any_install' );
12420
+
12421
  if ( $total_sites === $total_sites_to_delegate &&
12422
+ ! $this->is_network_upgrade_mode() &&
12423
+ ! $has_any_install
12424
  ) {
12425
  $this->delegate_connection();
12426
  } else {
12432
  $this->skip_connection( $sites_by_action['skip'] );
12433
  }
12434
 
12435
+ if ( empty( $sites_by_action['allow'] ) ) {
12436
+ if ( $has_any_install ) {
12437
+ $first_install = $fs->find_first_install();
12438
+
12439
+ if ( ! is_null( $first_install ) ) {
12440
+ $fs->_site = $first_install['install'];
12441
+ $fs->_storage->network_install_blog_id = $first_install['blog_id'];
12442
+
12443
+ $fs->_user = self::_get_user_by_id( $fs->_site->user_id );
12444
+ $fs->_storage->network_user_id = $fs->_user->id;
12445
+ }
12446
+ }
12447
+ } else {
12448
  if ( ! $fs->is_registered() || ! $this->_is_network_active ) {
12449
  $next_page = $fs->opt_in(
12450
  false,
13031
  $params['trial'] = 'true';
13032
  }
13033
 
13034
+ $url = $this->is_addon() ?
13035
+ $this->_parent->addon_url( $this->_slug ) :
13036
+ $this->_get_admin_page_url( 'pricing', $params );
13037
 
13038
+ return $this->apply_filters( 'pricing_url', $url );
13039
  }
13040
 
13041
  /**
13044
  * @author Vova Feldman (@svovaf)
13045
  * @since 1.0.6
13046
  *
13047
+ * @param string $billing_cycle Billing cycle
13048
+ * @param bool $is_trial
13049
+ * @param array $extra (optional) Extra parameters, override other query params.
13050
+ * @param bool|null $network
13051
  *
13052
  * @return string
13053
  */
13054
  function checkout_url(
13055
  $billing_cycle = WP_FS__PERIOD_ANNUALLY,
13056
  $is_trial = false,
13057
+ $extra = array(),
13058
+ $network = null
13059
  ) {
13060
  $this->_logger->entrance();
13061
 
13073
  */
13074
  $params = array_merge( $params, $extra );
13075
 
13076
+ return $this->_get_admin_page_url( 'pricing', $params, $network );
13077
  }
13078
 
13079
  /**
13082
  * @author Vova Feldman (@svovaf)
13083
  * @since 1.1.7
13084
  *
13085
+ * @param number $addon_id
13086
+ * @param number $pricing_id
13087
+ * @param string $billing_cycle
13088
+ * @param bool $is_trial
13089
+ * @param bool|null $network
13090
  *
13091
  * @return string
13092
  */
13094
  $addon_id,
13095
  $pricing_id,
13096
  $billing_cycle = WP_FS__PERIOD_ANNUALLY,
13097
+ $is_trial = false,
13098
+ $network = null
13099
  ) {
13100
  return $this->checkout_url( $billing_cycle, $is_trial, array(
13101
  'plugin_id' => $addon_id,
13102
  'pricing_id' => $pricing_id,
13103
+ ), $network );
13104
  }
13105
 
13106
  #endregion
13640
  * @return array Active & public sites collection.
13641
  */
13642
  static function get_sites() {
13643
+ if ( ! is_multisite() ) {
13644
+ return array();
13645
+ }
13646
+
13647
  /**
13648
  * For consistency with get_blog_list() which only return active public sites.
13649
  *
13815
  * 'blog_id' => string The associated blog ID.
13816
  * }
13817
  */
13818
+ function find_first_install() {
13819
  $sites = self::get_sites();
13820
 
13821
  foreach ( $sites as $site ) {
14491
  ) );
14492
  }
14493
 
14494
+ /**
14495
+ * Add-ons URL.
14496
+ *
14497
+ * @author Vova Feldman (@svovaf)
14498
+ * @since 2.4.5
14499
+ *
14500
+ * @return string
14501
+ */
14502
+ function get_addons_url() {
14503
+ return $this->_get_admin_page_url( 'addons' );
14504
+ }
14505
+
14506
  /* Logger
14507
  ------------------------------------------------------------------------------------------------------------------*/
14508
  /**
14728
  $this->get_install_by_blog_id();
14729
 
14730
  if ( fs_is_network_admin() &&
14731
+ $this->is_network_active() &&
14732
+ ! is_object( $site ) &&
14733
+ FS_Site::is_valid_id( $this->_storage->network_install_blog_id )
14734
  ) {
14735
  $first_install = $this->find_first_install();
14736
 
14909
  return $versions;
14910
  }
14911
 
14912
+ /**
14913
+ * @author Leo Fajardo (@leorw)
14914
+ * @since 2.3.0
14915
+ *
14916
+ * @return bool
14917
+ */
14918
+ function has_beta_update() {
14919
+ return (
14920
+ ! empty( $this->_storage->beta_data ) &&
14921
+ ( true === $this->_storage->beta_data['is_beta'] ) &&
14922
+ version_compare( $this->_storage->beta_data['version'], $this->get_plugin_version(), '>' )
14923
+ );
14924
+ }
14925
+
14926
+ /**
14927
+ * @author Leo Fajardo (@leorw)
14928
+ * @since 2.3.0
14929
+ *
14930
+ * @return bool
14931
+ */
14932
+ function is_beta() {
14933
+ return (
14934
+ ! empty( $this->_storage->beta_data ) &&
14935
+ ( true === $this->_storage->beta_data['is_beta'] ) &&
14936
+ ( $this->get_plugin_version() === $this->_storage->beta_data['version'] )
14937
+ );
14938
+ }
14939
+
14940
+ /**
14941
+ * @author Leo Fajardo (@leorw)
14942
+ * @since 2.3.0
14943
+ */
14944
+ private function sync_user_beta_mode() {
14945
+ $user = $this->get_api_user_scope()->get( '/?plugin_id=' . $this->get_id() . '&fields=is_beta' );
14946
+
14947
+ if ( $this->is_api_result_entity( $user ) ) {
14948
+ $this->_user->is_beta = $user->is_beta;
14949
+ $this->_store_user();
14950
+ }
14951
+ }
14952
+
14953
  /**
14954
  * @author Vova Feldman (@svovaf)
14955
  * @since 1.1.7.4
14995
 
14996
  if ( true === $network_level_or_blog_id ) {
14997
  if ( ! isset( $override_with['sites'] ) ) {
14998
+ $params['sites'] = $this->get_sites_for_network_level_optin();
 
 
 
 
 
 
 
 
 
 
 
14999
  }
15000
  } else {
15001
  $site = is_numeric( $network_level_or_blog_id ) ?
15355
  // If Freemius was OFF before, turn it on.
15356
  $this->turn_on();
15357
 
15358
+ $this->handle_account_connection(
15359
+ $installs,
15360
+ ( ! $this->_is_network_active || ! $is_network_level_opt_in )
15361
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15362
 
15363
  if ( is_numeric( $first_install->license_id ) ) {
15364
  $this->_license = $this->_get_license_by_id( $first_install->license_id );
16003
  * @author Vova Feldman (@svovaf)
16004
  * @since 1.0.6
16005
  *
16006
+ * @param Freemius $parent_fs
16007
+ * @param bool|int|null $network_level_or_blog_id True for network level opt-in and integer for opt-in for specified blog in the network.
16008
  */
16009
+ private function _activate_addon_account( Freemius $parent_fs, $network_level_or_blog_id = null ) {
16010
  if ( $this->is_registered() ) {
16011
  // Already activated.
16012
  return;
16013
  }
16014
 
16015
+ /**
16016
+ * Do not override the `uid` if network-level opt-in since the call to `get_sites_for_network_level_optin()`
16017
+ * already returns the data for the current blog.
16018
+ *
16019
+ * @author Leo Fajardo (@leorw)
16020
+ * @since 2.3.0
16021
+ */
16022
+ $uid_param_to_override = ( true === $network_level_or_blog_id ) ?
16023
+ array() :
16024
+ array( 'uid' => $this->get_anonymous_id() );
16025
+
16026
+ $params = $this->get_install_data_for_api(
16027
+ $uid_param_to_override,
16028
+ false,
16029
+ false,
16030
+ /**
16031
+ * Do not include the data for the current blog if network-level opt-in since the call to `get_sites_for_network_level_optin`
16032
+ * already includes the data for it.
16033
+ *
16034
+ * @author Leo Fajardo (@leorw)
16035
+ * @since 2.3.0
16036
+ */
16037
+ ( true !== $network_level_or_blog_id )
16038
+ );
16039
+
16040
+ if ( true === $network_level_or_blog_id ) {
16041
+ $params['sites'] = $this->get_sites_for_network_level_optin();
16042
+
16043
+ if ( empty( $params['sites'] ) ) {
16044
+ return;
16045
+ }
16046
+ }
16047
+
16048
  // Activate add-on with parent plugin credentials.
16049
+ $result = $parent_fs->get_api_site_scope()->call(
16050
  "/addons/{$this->_plugin->id}/installs.json",
16051
  'post',
16052
+ $params
 
 
16053
  );
16054
 
16055
+ if ( ! $this->is_api_result_object( $result, 'installs' ) ) {
16056
+ $error_message = FS_Api::is_api_error_object( $result ) ?
16057
+ $result->error->message :
16058
+ $this->get_text_inline( 'An unknown error has occurred.', 'unknown-error' );
16059
+
16060
  $this->_admin_notices->add(
16061
  sprintf( $this->get_text_inline( 'Couldn\'t activate %s.', 'could-not-activate-x' ), $this->get_plugin_name() ) . ' ' .
16062
+ $this->get_text_inline( 'Please contact us with the following message:', 'contact-us-with-error-message' ) . ' ' . '<b>' . $error_message . '</b>',
16063
  $this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...',
16064
  'error'
16065
  );
16067
  return;
16068
  }
16069
 
16070
+ $addon_installs = $result->installs;
16071
+ foreach ( $addon_installs as $key => $addon_install ) {
16072
+ $addon_installs[ $key ] = new FS_Site( $addon_install );
16073
+ }
16074
+
16075
+ $first_install = $addon_installs[0];
16076
+
16077
  // Get user information based on parent's plugin.
16078
  $user = $parent_fs->get_user();
16079
 
16080
  // First of all, set site and user info - otherwise we won't
16081
  // be able to invoke API calls.
16082
+ $this->_site = $first_install;
16083
  $this->_user = $user;
16084
 
16085
  // Sync add-on plans.
16086
  $this->_sync_plans();
16087
 
16088
+ $this->handle_account_connection( $addon_installs, ! fs_is_network_admin() );
16089
+
16090
+ // Get site's current plan.
16091
+ //$this->_site->plan = $this->_get_plan_by_id( $this->_site->plan->id );
16092
+
16093
+ // Sync licenses.
16094
+ $this->_sync_licenses();
16095
+
16096
+ if ( ! fs_is_network_admin() ) {
16097
+ // Try to activate premium license.
16098
+ $this->_activate_license( true );
16099
+ } else {
16100
+ $license_id = fs_request_get( 'license_id' );
16101
+
16102
+ if ( is_object( $this->_site ) &&
16103
+ FS_Plugin_License::is_valid_id( $license_id ) &&
16104
+ $license_id == $this->_site->license_id
16105
+ ) {
16106
+ // License is already activated.
16107
+ return;
16108
+ }
16109
+
16110
+ $premium_license = FS_Plugin_License::is_valid_id( $license_id ) ?
16111
+ $this->_get_license_by_id( $license_id ) :
16112
+ $this->_get_available_premium_license();
16113
+
16114
+ if ( is_object( $premium_license ) ) {
16115
+ $this->maybe_network_activate_addon_license( $premium_license );
16116
+ }
16117
+ }
16118
+ }
16119
+
16120
+ /**
16121
+ * @author Leo Fajardo (@leorw)
16122
+ * @since 2.3.0
16123
+ *
16124
+ * @param FS_Site[] $installs
16125
+ * @param bool $is_site_level
16126
+ */
16127
+ private function handle_account_connection( $installs, $is_site_level ) {
16128
+ $first_install = $installs[0];
16129
+
16130
+ if ( $is_site_level ) {
16131
+ $this->_set_account( $this->_user, $first_install );
16132
+
16133
+ $this->do_action( 'after_account_connection', $this->_user, $first_install );
16134
+ } else {
16135
+ $this->_store_user();
16136
+
16137
+ // Map site addresses to their blog IDs.
16138
+ $address_to_blog_map = $this->get_address_to_blog_map();
16139
+
16140
+ $first_blog_id = null;
16141
+ $blog_2_install_map = array();
16142
+ foreach ( $installs as $install ) {
16143
+ $address = trailingslashit( fs_strip_url_protocol( $install->url ) );
16144
+ $blog_id = $address_to_blog_map[ $address ];
16145
+
16146
+ $this->_store_site( true, $blog_id, $install );
16147
+
16148
+ if ( is_null( $first_blog_id ) ) {
16149
+ $first_blog_id = $blog_id;
16150
+ }
16151
+
16152
+ $blog_2_install_map[ $blog_id ] = $install;
16153
+ }
16154
+
16155
+ if ( ! FS_User::is_valid_id( $this->_storage->network_user_id ) ||
16156
+ ! is_object( self::_get_user_by_id( $this->_storage->network_user_id ) )
16157
+ ) {
16158
+ // Store network user.
16159
+ $this->_storage->network_user_id = $this->_user->id;
16160
+ }
16161
+
16162
+ if ( ! FS_Site::is_valid_id( $this->_storage->network_install_blog_id ) ) {
16163
+ $this->_storage->network_install_blog_id = $first_blog_id;
16164
+ }
16165
+
16166
+ if ( count( $installs ) === count( $address_to_blog_map ) ) {
16167
+ // Super admin opted in for all sites in the network.
16168
+ $this->_storage->is_network_connected = true;
16169
+ }
16170
+
16171
+ $this->_store_licenses( false );
16172
+
16173
+ self::$_accounts->store();
16174
+
16175
+ // Don't sync the installs data on network upgrade
16176
+ if ( ! $this->network_upgrade_mode_completed() ) {
16177
+ $this->send_installs_update();
16178
+ }
16179
+
16180
+ // Switch install context back to the first install.
16181
+ $this->_site = $first_install;
16182
+
16183
+ $current_blog = get_current_blog_id();
16184
+
16185
+ foreach ( $blog_2_install_map as $blog_id => $install ) {
16186
+ $this->switch_to_blog( $blog_id );
16187
 
16188
+ $this->do_action( 'after_account_connection', $this->_user, $install );
16189
+ }
16190
 
16191
+ $this->switch_to_blog( $current_blog );
 
16192
 
16193
+ $this->do_action( 'after_network_account_connection', $this->_user, $blog_2_install_map );
16194
+ }
16195
  }
16196
 
16197
  /**
16308
  ! $this->is_registered()
16309
  );
16310
 
16311
+ $should_hide_site_admin_settings = $this->apply_filters( 'should_hide_site_admin_settings_on_network_activation_mode', $should_hide_site_admin_settings );
16312
+
16313
  if ( ( ! $this->has_api_connectivity() && ! $this->is_enable_anonymous() ) ||
16314
  $should_hide_site_admin_settings
16315
  ) {
16516
  }
16517
 
16518
  if ( ! $this->_menu->has_menu() || $this->_menu->is_top_level() ) {
16519
+
16520
+ if ( $this->_menu->has_menu() ||
16521
+ ! $this->is_addon() ||
16522
+ $this->is_activation_mode()
16523
+ ) {
16524
+ $this->_dynamically_added_top_level_page_hook_name = $this->_menu->add_page_and_update(
16525
+ $this->get_plugin_name(),
16526
+ $this->get_plugin_name(),
16527
+ 'manage_options',
16528
+ $this->_menu->has_menu() ? $this->_menu->get_slug() : $this->_slug
16529
+ );
16530
+ }
16531
  } else {
16532
  $this->_menu->add_subpage_and_update(
16533
  $this->_menu->get_parent_slug(),
16613
  );
16614
  }
16615
 
16616
+ /**
16617
+ * @author Leo Fajardo (@leorw)
16618
+ * @since 2.3.0
16619
+ *
16620
+ * @param bool $is_activation_mode
16621
+ *
16622
+ * @return bool
16623
+ */
16624
+ private function should_add_submenu_or_action_links( $is_activation_mode ) {
16625
+ if ( $this->is_addon() ) {
16626
+ // No submenu items or action links for add-ons.
16627
+ return false;
16628
+ }
16629
+
16630
+ if ( $this->is_free_wp_org_theme() && ! fs_is_network_admin() ) {
16631
+ // Also add action links or submenu items when running in a free .org theme so the tabs will be visible.
16632
+ return true;
16633
+ }
16634
+
16635
+ if ( $is_activation_mode && ! $this->is_free_wp_org_theme() ) {
16636
+ return false;
16637
+ }
16638
+
16639
+ if ( fs_is_network_admin() ) {
16640
+ /**
16641
+ * Add submenu items or action links to network level when plugin was network activated and the super
16642
+ * admin did NOT delegate the connection of all sites to site admins.
16643
+ */
16644
+ return (
16645
+ $this->_is_network_active &&
16646
+ ( WP_FS__SHOW_NETWORK_EVEN_WHEN_DELEGATED ||
16647
+ ! $this->is_network_delegated_connection() )
16648
+ );
16649
+ }
16650
+
16651
+ return ( ! $this->_is_network_active || $this->is_delegated_connection() );
16652
+ }
16653
+
16654
  /**
16655
  * Add default Freemius menu items.
16656
  *
16663
 
16664
  $is_activation_mode = $this->is_activation_mode();
16665
 
16666
+ $add_submenu_items = $this->should_add_submenu_or_action_links( $is_activation_mode );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16667
 
16668
  if ( $add_submenu_items ) {
16669
  if ( $this->has_affiliate_program() ) {
17714
  self::$_accounts->set_option( 'account_addons', $all_addons, $store );
17715
  }
17716
 
17717
+ /**
17718
+ * Purges the cache for the valid user licenses API call so that when the `Account` or `Add-Ons` page is loaded,
17719
+ * the valid user licenses will be fetched again and the account add-ons may be updated.
17720
+ *
17721
+ * @author Leo Fajardo (@leorw)
17722
+ * @since 2.2.4
17723
+ */
17724
+ private function purge_valid_user_licenses_cache() {
17725
+ $this->get_api_user_scope()->purge_cache( $this->get_valid_user_licenses_endpoint() );
17726
+ }
17727
+
17728
+ /**
17729
+ * @author Leo Fajardo (@leorw)
17730
+ * @since 2.3.0
17731
+ *
17732
+ * @param array $all_licenses
17733
+ * @param number|null $site_license_id
17734
+ * @param bool $include_parent_licenses
17735
+ *
17736
+ * @return array
17737
+ */
17738
+ private function get_foreign_licenses_info( $all_licenses, $site_license_id = null, $include_parent_licenses = false ) {
17739
+ $foreign_licenses = array(
17740
+ 'ids' => array(),
17741
+ 'license_keys' => array()
17742
+ );
17743
+
17744
+ $parent_license_ids_map = array();
17745
+
17746
+ foreach ( $all_licenses as $license ) {
17747
+ if ( $license->user_id == $this->_user->id || $license->id == $site_license_id ) {
17748
+ continue;
17749
+ }
17750
+
17751
+ $foreign_licenses['ids'][] = $license->id;
17752
+ $foreign_licenses['license_keys'][] = $license->secret_key;
17753
+
17754
+ if (
17755
+ $include_parent_licenses &&
17756
+ is_object( $this->_license ) &&
17757
+ FS_Plugin_License::is_valid_id( $this->_license->parent_license_id ) &&
17758
+ ! isset( $parent_license_ids_map[ $this->_license->parent_license_id ] )
17759
+ ) {
17760
+ /**
17761
+ * Include the parent license's info only if it has not been included before since child licenses
17762
+ * can have the same parent license.
17763
+ */
17764
+ $foreign_licenses['ids'][] = $this->_license->parent_license_id;
17765
+ $foreign_licenses['license_keys'][] = $license->secret_key;
17766
+
17767
+ $parent_license_ids_map[ $this->_license->parent_license_id ] = true;
17768
+ }
17769
+ }
17770
+
17771
+ if ( empty( $foreign_licenses['ids'] ) ) {
17772
+ $foreign_licenses = array();
17773
+ }
17774
+
17775
+ return $foreign_licenses;
17776
+ }
17777
+
17778
+ /**
17779
+ * @author Leo Fajardo (@leorw)
17780
+ * @since 2.3.0
17781
+ *
17782
+ * @return string
17783
+ */
17784
+ private function get_valid_user_licens