Blocksy Companion - Version 1.7.50

Version Description

Download this release

Release Info

Developer creativethemeshq
Plugin Icon wp plugin Blocksy Companion
Version 1.7.50
Comparing to
See all releases

Code changes from version 1.7.47 to 1.7.50

Files changed (71) hide show
  1. blocksy-companion.php +1 -1
  2. framework/extensions/affiliate-marketing/config.php +0 -10
  3. framework/extensions/cookies-consent/extension.php +4 -52
  4. framework/extensions/cookies-consent/helpers.php +2 -0
  5. framework/extensions/cookies-consent/static/bundle/main.css +1 -1
  6. framework/extensions/cookies-consent/static/bundle/main.js +2 -2
  7. framework/extensions/cookies-consent/static/js/main.js +5 -0
  8. framework/extensions/mailchimp/admin-static/bundle/main.js +1 -1
  9. framework/extensions/mailchimp/admin-static/js/public-path.js +1 -1
  10. framework/extensions/mailchimp/config.php +2 -2
  11. framework/extensions/mailchimp/ct-mailchimp/widget.php +2 -2
  12. framework/extensions/mailchimp/dashboard-static/bundle/main.js +2 -2
  13. framework/extensions/mailchimp/dashboard-static/js/EditCredentials.js +29 -9
  14. framework/extensions/mailchimp/dashboard-static/js/ListPicker.js +11 -11
  15. framework/extensions/mailchimp/dashboard-static/js/Mailchimp.js +1 -1
  16. framework/extensions/mailchimp/dashboard-static/js/main.js +1 -1
  17. framework/extensions/mailchimp/extension.php +12 -12
  18. framework/extensions/mailchimp/pre-boot.php +1 -1
  19. framework/extensions/mailchimp/static/bundle/main.css +1 -1
  20. framework/extensions/mailchimp/static/js/main.js +3 -3
  21. framework/extensions/product-reviews/config.php +12 -0
  22. framework/extensions/{affiliate-marketing → product-reviews}/extension.php +74 -39
  23. framework/extensions/{affiliate-marketing → product-reviews}/helpers.php +2 -2
  24. framework/extensions/{affiliate-marketing → product-reviews}/metabox.php +0 -0
  25. framework/extensions/product-reviews/pre-boot.php +65 -0
  26. framework/extensions/product-reviews/static/bundle/dashboard.js +6 -0
  27. framework/extensions/product-reviews/static/bundle/main-admin.css +8 -0
  28. framework/extensions/{affiliate-marketing → product-reviews}/static/bundle/main.css +1 -1
  29. framework/extensions/product-reviews/static/js/EditSettings.js +141 -0
  30. framework/extensions/product-reviews/static/js/ProductReviews.js +100 -0
  31. framework/extensions/product-reviews/static/js/dashboard.js +10 -0
  32. framework/extensions/{affiliate-marketing → product-reviews}/static/sass/actions.scss +0 -0
  33. framework/extensions/{affiliate-marketing → product-reviews}/static/sass/description.scss +0 -0
  34. framework/extensions/product-reviews/static/sass/main-admin.scss +8 -0
  35. framework/extensions/{affiliate-marketing → product-reviews}/static/sass/main.scss +0 -0
  36. framework/extensions/{affiliate-marketing → product-reviews}/static/sass/quick-info.scss +0 -0
  37. framework/extensions/{affiliate-marketing → product-reviews}/static/sass/scores.scss +0 -0
  38. framework/extensions/{affiliate-marketing → product-reviews}/static/sass/slider.scss +0 -0
  39. framework/extensions/{affiliate-marketing → product-reviews}/static/sass/title.scss +0 -0
  40. framework/extensions/{affiliate-marketing → product-reviews}/views/single-top.php +2 -2
  41. framework/extensions/trending/extension.php +0 -7
  42. framework/extensions/trending/static/bundle/main.css +0 -7
  43. framework/extensions/trending/static/sass/main.scss +0 -0
  44. framework/extensions/widgets/static/bundle/main.css +1 -1
  45. framework/extensions/widgets/widgets/ct-posts/view.php +2 -3
  46. framework/features/demo-install/options-import.php +10 -7
  47. framework/features/demo-install/widgets-import.php +1 -1
  48. framework/features/demo-install/wp-importer.php +3 -1
  49. framework/features/header.php +25 -3
  50. framework/features/header/account-modal.php +13 -7
  51. framework/features/header/items/account/config.php +17 -2
  52. framework/features/header/items/account/dynamic-styles.php +101 -6
  53. framework/features/header/items/account/options.php +489 -182
  54. framework/features/header/items/account/sync.js +65 -20
  55. framework/features/header/items/account/view.php +153 -60
  56. framework/theme-integration.php +28 -4
  57. framework/views/blocksy-posts.php +44 -0
  58. languages/blocksy-companion.pot +1668 -618
  59. readme.txt +26 -1
  60. static/bundle/dashboard.css +1 -1
  61. static/bundle/dashboard.js +1 -1
  62. static/bundle/main.js +1 -1
  63. static/bundle/options.css +2 -2
  64. static/bundle/options.js +1 -1
  65. static/bundle/sync.js +1 -1
  66. static/js/frontend/account.js +203 -3
  67. static/js/frontend/sticky.js +21 -14
  68. static/js/helpers/useActivationAction.js +7 -3
  69. static/js/options/CustomizerOptionsManager.js +13 -5
  70. static/js/options/file-saver.js +202 -0
  71. static/sass/options/display-conditions.scss +61 -29
blocksy-companion.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  Plugin Name: Blocksy Companion
5
  Description: This plugin is the companion for the Blocksy theme, it runs and adds its enhacements only if the Blocksy theme is installed and active.
6
- Version: 1.7.47
7
  Author: CreativeThemes
8
  Author URI: https://creativethemes.com
9
  Text Domain: blc
3
  /*
4
  Plugin Name: Blocksy Companion
5
  Description: This plugin is the companion for the Blocksy theme, it runs and adds its enhacements only if the Blocksy theme is installed and active.
6
+ Version: 1.7.50
7
  Author: CreativeThemes
8
  Author URI: https://creativethemes.com
9
  Text Domain: blc
framework/extensions/affiliate-marketing/config.php DELETED
@@ -1,10 +0,0 @@
1
- <?php
2
-
3
- $config = [
4
- 'name' => __('Affiliate Marketing', 'blc'),
5
- 'description' => __('Create affiliate marketing posts', 'blc')
6
- // 'hidden' => true
7
- ];
8
-
9
-
10
-
 
 
 
 
 
 
 
 
 
 
framework/extensions/cookies-consent/extension.php CHANGED
@@ -3,56 +3,14 @@
3
  require_once dirname(__FILE__) . '/helpers.php';
4
 
5
  class BlocksyExtensionCookiesConsent {
6
- public static function onActivation() {
7
- do_action('wpsc_add_cookie', 'blocksy_cookies_consent_accepted');
8
-
9
- if (function_exists('flush_rocket_htaccess')) {
10
- add_filter('rocket_cache_dynamic_cookies', function ($cookies) {
11
- $cookies[] = 'blocksy_cookies_consent_accepted';
12
- return $cookies;
13
- });
14
-
15
- // Update the WP Rocket rules on the .htaccess file.
16
- flush_rocket_htaccess();
17
- // Regenerate the config file.
18
- rocket_generate_config_file();
19
- // Clear WP Rocket cache.
20
- rocket_clean_domain();
21
- }
22
- }
23
-
24
- public static function onDeactivation() {
25
- do_action('wpsc_delete_cookie', 'blocksy_cookies_consent_accepted');
26
-
27
- if (function_exists('flush_rocket_htaccess')) {
28
- add_filter('rocket_cache_dynamic_cookies', function ($cookies) {
29
- return array_diff(
30
- $cookies,
31
- [ 'blocksy_cookies_consent_accepted' ]
32
- );
33
- }, 200);
34
-
35
- // Update the WP Rocket rules on the .htaccess file.
36
- flush_rocket_htaccess();
37
- // Regenerate the config file.
38
- rocket_generate_config_file();
39
- // Clear WP Rocket cache.
40
- rocket_clean_domain();
41
- }
42
- }
43
-
44
  public static function should_display_notification() {
45
  return !isset($_COOKIE['blocksy_cookies_consent_accepted']);
46
  }
47
 
48
  public function __construct() {
49
- add_action('blocksy:footer:after', function () {
50
- echo blocksy_ext_cookies_consent_output();
51
- });
52
-
53
- add_filter('rocket_cache_dynamic_cookies', function ($cookies) {
54
- $cookies[] = 'blocksy_cookies_consent_accepted';
55
- return $cookies;
56
  });
57
 
58
  add_filter('blocksy-async-scripts-handles', function ($d) {
@@ -95,12 +53,6 @@ class BlocksyExtensionCookiesConsent {
95
  return;
96
  }
97
 
98
- if (! BlocksyExtensionCookiesConsent::should_display_notification()) {
99
- if (! is_customize_preview()) {
100
- return;
101
- }
102
- }
103
-
104
  wp_enqueue_style(
105
  'blocksy-ext-cookies-consent-styles',
106
  BLOCKSY_URL . 'framework/extensions/cookies-consent/static/bundle/main.css',
@@ -131,7 +83,7 @@ class BlocksyExtensionCookiesConsent {
131
  'fn' => 'blocksy_get_options',
132
  'default' => 'array'
133
  ],
134
- dirname( __FILE__ ) . '/customizer.php',
135
  [], false
136
  );
137
 
3
  require_once dirname(__FILE__) . '/helpers.php';
4
 
5
  class BlocksyExtensionCookiesConsent {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  public static function should_display_notification() {
7
  return !isset($_COOKIE['blocksy_cookies_consent_accepted']);
8
  }
9
 
10
  public function __construct() {
11
+ add_filter('blocksy:footer:offcanvas-drawer', function ($els) {
12
+ $els[] = blocksy_ext_cookies_consent_output();
13
+ return $els;
 
 
 
 
14
  });
15
 
16
  add_filter('blocksy-async-scripts-handles', function ($d) {
53
  return;
54
  }
55
 
 
 
 
 
 
 
56
  wp_enqueue_style(
57
  'blocksy-ext-cookies-consent-styles',
58
  BLOCKSY_URL . 'framework/extensions/cookies-consent/static/bundle/main.css',
83
  'fn' => 'blocksy_get_options',
84
  'default' => 'array'
85
  ],
86
+ dirname(__FILE__) . '/customizer.php',
87
  [], false
88
  );
89
 
framework/extensions/cookies-consent/helpers.php CHANGED
@@ -17,11 +17,13 @@ function blocksy_ext_cookies_consent_output($forced = false) {
17
  blc_ext_cookies_consent_cache();
18
  }
19
 
 
20
  if (! BlocksyExtensionCookiesConsent::should_display_notification()) {
21
  if (! $forced) {
22
  return;
23
  }
24
  }
 
25
 
26
  $content = get_theme_mod(
27
  'cookie_consent_content',
17
  blc_ext_cookies_consent_cache();
18
  }
19
 
20
+ /*
21
  if (! BlocksyExtensionCookiesConsent::should_display_notification()) {
22
  if (! $forced) {
23
  return;
24
  }
25
  }
26
+ */
27
 
28
  $content = get_theme_mod(
29
  'cookie_consent_content',
framework/extensions/cookies-consent/static/bundle/main.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.7.47
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.7.50
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
framework/extensions/cookies-consent/static/bundle/main.js CHANGED
@@ -1,8 +1,8 @@
1
- !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t){e.exports=ctEvents},function(e,t,n){var r,o;
2
  /*!
3
  * JavaScript Cookie v2.2.1
4
  * https://github.com/js-cookie/js-cookie
5
  *
6
  * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
7
  * Released under the MIT license
8
- */!function(i){if(void 0===(o="function"==typeof(r=i)?r.call(t,n,t,e):r)||(e.exports=o),!0,e.exports=i(),!!0){var c=window.Cookies,a=window.Cookies=i();a.noConflict=function(){return window.Cookies=c,a}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(t,n,i){if("undefined"!=typeof document){"number"==typeof(i=e({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var c=JSON.stringify(n);/^[\{\[]/.test(c)&&(n=c)}catch(e){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var a="";for(var u in i)i[u]&&(a+="; "+u,!0!==i[u]&&(a+="="+i[u].split(";")[0]));return document.cookie=t+"="+n+a}}function c(e,n){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],c=0;c<i.length;c++){var a=i[c].split("="),u=a.slice(1).join("=");n||'"'!==u.charAt(0)||(u=u.slice(1,-1));try{var f=t(a[0]);if(u=(r.read||r)(u,f)||t(u),n)try{u=JSON.parse(u)}catch(e){}if(o[f]=u,e===f)break}catch(e){}}return e?o[e]:o}}return o.set=i,o.get=function(e){return c(e,!1)},o.getJSON=function(e){return c(e,!0)},o.remove=function(t,n){i(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),i=n(1),c=n.n(i);function a(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var f,s=function(){var e=document.querySelector(".cookie-notification");e&&(requestAnimationFrame((function(){e.classList.remove("ct-fade-in-start"),e.classList.add("ct-fade-in-end"),d(e,(function(){e.classList.remove("ct-fade-in-end")}))})),a(e.querySelectorAll("button")).map((function(t){t.addEventListener("click",(function(n){if(n.preventDefault(),t.classList.contains("ct-accept")){c.a.set("blocksy_cookies_consent_accepted","true",{expires:new Date(1*new Date+{onehour:36e5,oneday:864e5,oneweek:6048e5,onemonth:26784e5,threemonths:80352e5,sixmonths:160704e5,oneyear:31536e6,forever:864e9}[t.closest("[data-period]").dataset.period])})}e.classList.add("ct-fade-start"),requestAnimationFrame((function(){e.classList.remove("ct-fade-start"),e.classList.add("ct-fade-end"),d(e,(function(){e.parentNode.removeChild(e)}))}))}))})))};function d(e,t){setTimeout((function(){t()}),300)}f=function(){s(),o.a.on("blocksy:cookies:init",(function(){s()}))},/comp|inter|loaded/.test(document.readyState)?f():document.addEventListener("DOMContentLoaded",f,!1)}]);
1
+ !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t,n){var r,o;
2
  /*!
3
  * JavaScript Cookie v2.2.1
4
  * https://github.com/js-cookie/js-cookie
5
  *
6
  * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
7
  * Released under the MIT license
8
+ */!function(i){if(void 0===(o="function"==typeof(r=i)?r.call(t,n,t,e):r)||(e.exports=o),!0,e.exports=i(),!!0){var c=window.Cookies,a=window.Cookies=i();a.noConflict=function(){return window.Cookies=c,a}}}((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(r){function o(){}function i(t,n,i){if("undefined"!=typeof document){"number"==typeof(i=e({path:"/"},o.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var c=JSON.stringify(n);/^[\{\[]/.test(c)&&(n=c)}catch(e){}n=r.write?r.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var a="";for(var u in i)i[u]&&(a+="; "+u,!0!==i[u]&&(a+="="+i[u].split(";")[0]));return document.cookie=t+"="+n+a}}function c(e,n){if("undefined"!=typeof document){for(var o={},i=document.cookie?document.cookie.split("; "):[],c=0;c<i.length;c++){var a=i[c].split("="),u=a.slice(1).join("=");n||'"'!==u.charAt(0)||(u=u.slice(1,-1));try{var f=t(a[0]);if(u=(r.read||r)(u,f)||t(u),n)try{u=JSON.parse(u)}catch(e){}if(o[f]=u,e===f)break}catch(e){}}return e?o[e]:o}}return o.set=i,o.get=function(e){return c(e,!1)},o.getJSON=function(e){return c(e,!0)},o.remove=function(t,n){i(t,"",e(n,{expires:-1}))},o.defaults={},o.withConverter=n,o}((function(){}))}))},function(e,t){e.exports=ctEvents},function(e,t,n){"use strict";n.r(t);var r=n(1),o=n.n(r),i=n(0),c=n.n(i);function a(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var f,s=function(){var e=document.querySelector(".cookie-notification");e&&(c.a.get("blocksy_cookies_consent_accepted")?e.remove():(requestAnimationFrame((function(){e.classList.remove("ct-fade-in-start"),e.classList.add("ct-fade-in-end"),d(e,(function(){e.classList.remove("ct-fade-in-end")}))})),a(e.querySelectorAll("button")).map((function(t){t.addEventListener("click",(function(n){if(n.preventDefault(),t.classList.contains("ct-accept")){c.a.set("blocksy_cookies_consent_accepted","true",{expires:new Date(1*new Date+{onehour:36e5,oneday:864e5,oneweek:6048e5,onemonth:26784e5,threemonths:80352e5,sixmonths:160704e5,oneyear:31536e6,forever:864e9}[t.closest("[data-period]").dataset.period])})}e.classList.add("ct-fade-start"),requestAnimationFrame((function(){e.classList.remove("ct-fade-start"),e.classList.add("ct-fade-end"),d(e,(function(){e.parentNode.removeChild(e)}))}))}))}))))};function d(e,t){setTimeout((function(){t()}),300)}f=function(){s(),o.a.on("blocksy:cookies:init",(function(){s()}))},/comp|inter|loaded/.test(document.readyState)?f():document.addEventListener("DOMContentLoaded",f,!1)}]);
framework/extensions/cookies-consent/static/js/main.js CHANGED
@@ -7,6 +7,11 @@ const initCookies = () => {
7
 
8
  if (!notification) return
9
 
 
 
 
 
 
10
  requestAnimationFrame(() => {
11
  notification.classList.remove('ct-fade-in-start')
12
  notification.classList.add('ct-fade-in-end')
7
 
8
  if (!notification) return
9
 
10
+ if (cookie.get('blocksy_cookies_consent_accepted')) {
11
+ notification.remove()
12
+ return
13
+ }
14
+
15
  requestAnimationFrame(() => {
16
  notification.classList.remove('ct-fade-in-start')
17
  notification.classList.add('ct-fade-in-end')
framework/extensions/mailchimp/admin-static/bundle/main.js CHANGED
@@ -1 +1 @@
1
- !function(e){function t(t){for(var n,o,c=t[0],i=t[1],u=0,l=[];u<c.length;u++)o=c[u],Object.prototype.hasOwnProperty.call(r,o)&&r[o]&&l.push(r[o][0]),r[o]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(a&&a(t);l.length;)l.shift()()}var n={},r={0:0};function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.e=function(e){var t=[],n=r[e];if(0!==n)if(n)t.push(n[2]);else{var c=new Promise((function(t,o){n=r[e]=[t,o]}));t.push(n[2]=c);var i,u=document.createElement("script");u.charset="utf-8",u.timeout=120,o.nc&&u.setAttribute("nonce",o.nc),u.src=function(e){return o.p+""+e+"."+{1:"2c9ebf0a36c6c732fee6",2:"976c8f43abfe584b1a9d"}[e]+".js"}(e);var a=new Error;i=function(t){u.onerror=u.onload=null,clearTimeout(l);var n=r[e];if(0!==n){if(n){var o=t&&("load"===t.type?"missing":t.type),c=t&&t.target&&t.target.src;a.message="Loading chunk "+e+" failed.\n("+o+": "+c+")",a.name="ChunkLoadError",a.type=o,a.request=c,n[1](a)}r[e]=void 0}};var l=setTimeout((function(){i({type:"timeout",target:u})}),12e4);u.onerror=u.onload=i,document.head.appendChild(u)}return Promise.all(t)},o.m=e,o.c=n,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var c=window.blocksyMailchimpExtJsonp=window.blocksyMailchimpExtJsonp||[],i=c.push.bind(c);c.push=t,c=c.slice();for(var u=0;u<c.length;u++)t(c[u]);var a=i;o(o.s=5)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.React},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=ctEvents},function(e,t,n){n.p=blocksy_ext_mailchimp_localization.public_url},function(e,t,n){"use strict";n.r(t);n(4);var r=n(0),o=n(2),c=n(1),i=Object(c.lazy)((function(){return Promise.all([n.e(1),n.e(2)]).then(n.bind(null,13))})),u=function(e){return Object(r.createElement)("div",null,Object(r.createElement)(c.Suspense,{fallback:Object(r.createElement)("div",{className:"ct-select-input"},Object(r.createElement)("input",{disabled:!0,placeholder:Object(o.__)("Loading...","blc")}))},Object(r.createElement)(i,e)))},a=n(3),l=n.n(a);document.addEventListener("DOMContentLoaded",(function(){return l.a.on("blocksy:options:register",(function(e){e["blocksy-mailchimp"]=u}))}))}]);
1
+ !function(e){function t(t){for(var n,o,c=t[0],i=t[1],u=0,a=[];u<c.length;u++)o=c[u],Object.prototype.hasOwnProperty.call(r,o)&&r[o]&&a.push(r[o][0]),r[o]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(l&&l(t);a.length;)a.shift()()}var n={},r={0:0};function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.e=function(e){var t=[],n=r[e];if(0!==n)if(n)t.push(n[2]);else{var c=new Promise((function(t,o){n=r[e]=[t,o]}));t.push(n[2]=c);var i,u=document.createElement("script");u.charset="utf-8",u.timeout=120,o.nc&&u.setAttribute("nonce",o.nc),u.src=function(e){return o.p+""+e+"."+{1:"2c9ebf0a36c6c732fee6",2:"976c8f43abfe584b1a9d"}[e]+".js"}(e);var l=new Error;i=function(t){u.onerror=u.onload=null,clearTimeout(a);var n=r[e];if(0!==n){if(n){var o=t&&("load"===t.type?"missing":t.type),c=t&&t.target&&t.target.src;l.message="Loading chunk "+e+" failed.\n("+o+": "+c+")",l.name="ChunkLoadError",l.type=o,l.request=c,n[1](l)}r[e]=void 0}};var a=setTimeout((function(){i({type:"timeout",target:u})}),12e4);u.onerror=u.onload=i,document.head.appendChild(u)}return Promise.all(t)},o.m=e,o.c=n,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var c=window.blocksyMailchimpExtJsonp=window.blocksyMailchimpExtJsonp||[],i=c.push.bind(c);c.push=t,c=c.slice();for(var u=0;u<c.length;u++)t(c[u]);var l=i;o(o.s=5)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.React},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=ctEvents},function(e,t,n){n.p=blocksy_ext_newsletter_subscribe_localization.public_url},function(e,t,n){"use strict";n.r(t);n(4);var r=n(0),o=n(2),c=n(1),i=Object(c.lazy)((function(){return Promise.all([n.e(1),n.e(2)]).then(n.bind(null,13))})),u=function(e){return Object(r.createElement)("div",null,Object(r.createElement)(c.Suspense,{fallback:Object(r.createElement)("div",{className:"ct-select-input"},Object(r.createElement)("input",{disabled:!0,placeholder:Object(o.__)("Loading...","blc")}))},Object(r.createElement)(i,e)))},l=n(3),a=n.n(l);document.addEventListener("DOMContentLoaded",(function(){return a.a.on("blocksy:options:register",(function(e){e["blocksy-mailchimp"]=u}))}))}]);
framework/extensions/mailchimp/admin-static/js/public-path.js CHANGED
@@ -1 +1 @@
1
- __webpack_public_path__ = blocksy_ext_mailchimp_localization.public_url
1
+ __webpack_public_path__ = blocksy_ext_newsletter_subscribe_localization.public_url
framework/extensions/mailchimp/config.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  $config = [
4
- 'name' => __('Mailchimp', 'blc'),
5
- 'description' => __('Display a Mailchimp subscribe form with the help of a widget or a block.', 'blc')
6
  ];
7
 
1
  <?php
2
 
3
  $config = [
4
+ 'name' => __('Mailchimp Subscribe', 'blc'),
5
+ 'description' => __('Display a subscribe form with the help of a widget or a block.', 'blc')
6
  ];
7
 
framework/extensions/mailchimp/ct-mailchimp/widget.php CHANGED
@@ -10,8 +10,8 @@
10
  class Blocksy_Widget_Ct_Mailchimp extends BlocksyWidgetFactory {
11
  protected function get_config() {
12
  return [
13
- 'name' => __('Mailchimp Subscribe', 'blc'),
14
- 'description' => __('Mailchimp subscribe form', 'blc'),
15
  ];
16
  }
17
 
10
  class Blocksy_Widget_Ct_Mailchimp extends BlocksyWidgetFactory {
11
  protected function get_config() {
12
  return [
13
+ 'name' => __('Newsletter Subscribe', 'blc'),
14
+ 'description' => __('Newsletter subscribe form', 'blc'),
15
  ];
16
  }
17
 
framework/extensions/mailchimp/dashboard-static/bundle/main.js CHANGED
@@ -3,7 +3,7 @@
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
- */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===i)for(var u in r)n.call(r,u)&&r[u]&&e.push(u)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";e.exports=n(13)},function(e,t){e.exports=ctEvents},function(e,t,n){var r,o,i=n(11),a=n(12),u=(o=[],{activateTrap:function(e){if(o.length>0){var t=o[o.length-1];t!==e&&t.pause()}var n=o.indexOf(e);-1===n||o.splice(n,1),o.push(e)},deactivateTrap:function(e){var t=o.indexOf(e);-1!==t&&o.splice(t,1),o.length>0&&o[o.length-1].unpause()}});function c(e){return setTimeout(e,0)}e.exports=function(e,t){var n=document,o="string"==typeof e?n.querySelector(e):e,s=a({returnFocusOnDeactivate:!0,escapeDeactivates:!0},t),l={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},d={activate:function(e){if(l.active)return;w(),l.active=!0,l.paused=!1,l.nodeFocusedBeforeActivation=n.activeElement;var t=e&&e.onActivate?e.onActivate:s.onActivate;t&&t();return f(),d},deactivate:p,pause:function(){if(l.paused||!l.active)return;l.paused=!0,h()},unpause:function(){if(!l.paused||!l.active)return;l.paused=!1,w(),f()}};return d;function p(e){if(l.active){clearTimeout(r),h(),l.active=!1,l.paused=!1,u.deactivateTrap(d);var t=e&&void 0!==e.onDeactivate?e.onDeactivate:s.onDeactivate;return t&&t(),(e&&void 0!==e.returnFocus?e.returnFocus:s.returnFocusOnDeactivate)&&c((function(){var e;O((e=l.nodeFocusedBeforeActivation,m("setReturnFocus")||e))})),d}}function f(){if(l.active)return u.activateTrap(d),r=c((function(){O(v())})),n.addEventListener("focusin",y,!0),n.addEventListener("mousedown",g,{capture:!0,passive:!1}),n.addEventListener("touchstart",g,{capture:!0,passive:!1}),n.addEventListener("click",I,{capture:!0,passive:!1}),n.addEventListener("keydown",b,{capture:!0,passive:!1}),d}function h(){if(l.active)return n.removeEventListener("focusin",y,!0),n.removeEventListener("mousedown",g,!0),n.removeEventListener("touchstart",g,!0),n.removeEventListener("click",I,!0),n.removeEventListener("keydown",b,!0),d}function m(e){var t=s[e],r=t;if(!t)return null;if("string"==typeof t&&!(r=n.querySelector(t)))throw new Error("`"+e+"` refers to no known node");if("function"==typeof t&&!(r=t()))throw new Error("`"+e+"` did not return a node");return r}function v(){var e;if(!(e=null!==m("initialFocus")?m("initialFocus"):o.contains(n.activeElement)?n.activeElement:l.firstTabbableNode||m("fallbackFocus")))throw new Error("Your focus-trap needs to have at least one focusable element");return e}function g(e){o.contains(e.target)||(s.clickOutsideDeactivates?p({returnFocus:!i.isFocusable(e.target)}):s.allowOutsideClick&&s.allowOutsideClick(e)||e.preventDefault())}function y(e){o.contains(e.target)||e.target instanceof Document||(e.stopImmediatePropagation(),O(l.mostRecentlyFocusedNode||v()))}function b(e){if(!1!==s.escapeDeactivates&&function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e))return e.preventDefault(),void p();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){if(w(),e.shiftKey&&e.target===l.firstTabbableNode)return e.preventDefault(),void O(l.lastTabbableNode);if(!e.shiftKey&&e.target===l.lastTabbableNode)e.preventDefault(),O(l.firstTabbableNode)}(e)}function I(e){s.clickOutsideDeactivates||o.contains(e.target)||s.allowOutsideClick&&s.allowOutsideClick(e)||(e.preventDefault(),e.stopImmediatePropagation())}function w(){var e=i(o);l.firstTabbableNode=e[0]||v(),l.lastTabbableNode=e[e.length-1]||v()}function O(e){e!==n.activeElement&&(e&&e.focus?(e.focus(),l.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):O(v()))}}},function(e,t){e.exports=window.blocksyOptions},function(e,t,n){"use strict";var r=n(10);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){var n=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],r=n.join(","),o="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function i(e,t){t=t||{};var n,i,u,c=[],d=[],p=e.querySelectorAll(r);for(t.includeContainer&&o.call(e,r)&&(p=Array.prototype.slice.apply(p)).unshift(e),n=0;n<p.length;n++)a(i=p[n])&&(0===(u=s(i))?c.push(i):d.push({documentOrder:n,tabIndex:u,node:i}));return d.sort(l).map((function(e){return e.node})).concat(c)}function a(e){return!(!u(e)||function(e){return function(e){return d(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t=function(e){for(var t=0;t<e.length;t++)if(e[t].checked)return e[t]}(e.ownerDocument.querySelectorAll('input[type="radio"][name="'+e.name+'"]'));return!t||t===e}(e)}(e)||s(e)<0)}function u(e){return!(e.disabled||function(e){return d(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}i.isTabbable=function(e){if(!e)throw new Error("No node provided");return!1!==o.call(e,r)&&a(e)},i.isFocusable=function(e){if(!e)throw new Error("No node provided");return!1!==o.call(e,c)&&u(e)};var c=n.concat("iframe").join(",");function s(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}function l(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function d(e){return"INPUT"===e.tagName}e.exports=i},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var o in r)n.call(r,o)&&(e[o]=r[o])}return e};var n=Object.prototype.hasOwnProperty},function(e,t,n){"use strict";
7
  /** @license React v16.13.1
8
  * react-is.production.min.js
9
  *
@@ -11,4 +11,4 @@
11
  *
12
  * This source code is licensed under the MIT license found in the
13
  * LICENSE file in the root directory of this source tree.
14
- */var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,u=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,v=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,I=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function O(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case d:case p:case a:case c:case u:case h:return e;default:switch(e=e&&e.$$typeof){case l:case f:case g:case v:case s:return e;default:return t}}case i:return t}}}function S(e){return O(e)===p}t.AsyncMode=d,t.ConcurrentMode=p,t.ContextConsumer=l,t.ContextProvider=s,t.Element=o,t.ForwardRef=f,t.Fragment=a,t.Lazy=g,t.Memo=v,t.Portal=i,t.Profiler=c,t.StrictMode=u,t.Suspense=h,t.isAsyncMode=function(e){return S(e)||O(e)===d},t.isConcurrentMode=S,t.isContextConsumer=function(e){return O(e)===l},t.isContextProvider=function(e){return O(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return O(e)===f},t.isFragment=function(e){return O(e)===a},t.isLazy=function(e){return O(e)===g},t.isMemo=function(e){return O(e)===v},t.isPortal=function(e){return O(e)===i},t.isProfiler=function(e){return O(e)===c},t.isStrictMode=function(e){return O(e)===u},t.isSuspense=function(e){return O(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===p||e===c||e===u||e===h||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===v||e.$$typeof===s||e.$$typeof===l||e.$$typeof===f||e.$$typeof===b||e.$$typeof===I||e.$$typeof===w||e.$$typeof===y)},t.typeOf=O},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(6),i=n.n(o),a=n(3),u=n(4),c=n.n(u),s=n(2),l=n.n(s),d=n(1),p=n.n(d);function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var m=function(e){e.initialState,e.getInitialState,e.refs,e.getRefs,e.didMount,e.didUpdate,e.willUnmount,e.getSnapshotBeforeUpdate,e.shouldUpdate,e.render;return function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["initialState","getInitialState","refs","getRefs","didMount","didUpdate","willUnmount","getSnapshotBeforeUpdate","shouldUpdate","render"])},v=function(e){function t(){var n,r;f(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=h(this,e.call.apply(e,[this].concat(i))),g.call(r),h(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getArgs=function(){var e=this.state,t=this.props,n=this._setState,r=this._forceUpdate,o=this._refs;return{state:e,props:m(t),refs:o,setState:n,forceUpdate:r}},t.prototype.componentDidMount=function(){this.props.didMount&&this.props.didMount(this.getArgs())},t.prototype.shouldComponentUpdate=function(e,t){return!this.props.shouldUpdate||this.props.shouldUpdate({props:this.props,state:this.state,nextProps:m(e),nextState:t})},t.prototype.componentWillUnmount=function(){this.props.willUnmount&&this.props.willUnmount({state:this.state,props:m(this.props),refs:this._refs})},t.prototype.componentDidUpdate=function(e,t,n){this.props.didUpdate&&this.props.didUpdate(Object.assign(this.getArgs(),{prevProps:m(e),prevState:t}),n)},t.prototype.getSnapshotBeforeUpdate=function(e,t){return this.props.getSnapshotBeforeUpdate?this.props.getSnapshotBeforeUpdate(Object.assign(this.getArgs(),{prevProps:m(e),prevState:t})):null},t.prototype.render=function(){var e=this.props,t=e.children,n=e.render;return n?n(this.getArgs()):"function"==typeof t?t(this.getArgs()):t||null},t}(l.a.Component);v.defaultProps={getInitialState:function(){},getRefs:function(){return{}}};var g=function(){var e=this;this.state=this.props.initialState||this.props.getInitialState(this.props),this._refs=this.props.refs||this.props.getRefs(this.getArgs()),this._setState=function(){return e.setState.apply(e,arguments)},this._forceUpdate=function(){return e.forceUpdate.apply(e,arguments)}},y=v,b=function(e){var t=e.children,n=e.container,o=void 0===n?document.body:n,i=e.type,a=void 0===i?"reach-portal":i;return Object(r.createElement)(y,{getRefs:function(){return{node:null}},didMount:function(e){var t=e.refs,n=e.forceUpdate,r=o.hasOwnProperty("current")?o.current:o;t.node=document.createElement(a),r.appendChild(t.node),n()},willUnmount:function(e){var t=e.refs.node,n=o.hasOwnProperty("current")?o.current:o;n&&n.removeChild(t)},render:function(e){var n=e.refs.node;return n?Object(r.createPortal)(t,n):null}})};var I=function(e,t){return function(n){if(e&&e(n),!n.defaultPrevented)return t(n)}},w=n(7),O=n.n(w);function S(){return(S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function x(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var E=function(){},j=function(){},C=function(e,t){var n,r,o;e.disposeAriaHider=(n=e.overlayNode,r=[],o=[],Array.prototype.forEach.call(document.querySelectorAll("body > *"),(function(e){if(e!==n.parentNode){var t=e.getAttribute("aria-hidden");null!==t&&"false"!==t||(r.push(t),o.push(e),e.setAttribute("aria-hidden","true"))}})),function(){o.forEach((function(e,t){var n=r[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)}))}),e.trap=O()(e.overlayNode,{initialFocus:t?function(){return t.current}:void 0,fallbackFocus:e.contentNode,escapeDeactivates:!1,clickOutsideDeactivates:!1})},_=function(e){var t=e.refs;t.trap.deactivate(),t.disposeAriaHider()},P=React.createContext(),k=React.forwardRef((function(e,t){var n=e.container,o=e.isOpen,i=void 0===o||o,a=e.onDismiss,u=void 0===a?E:a,c=e.initialFocusRef,s=e.onClick,l=e.onKeyDown,d=x(e,["container","isOpen","onDismiss","initialFocusRef","onClick","onKeyDown"]);return Object(r.createElement)(y,{didMount:j},i?Object(r.createElement)(b,{container:n,"data-reach-dialog-wrapper":!0},Object(r.createElement)(y,{refs:{overlayNode:null,contentNode:null},didMount:function(e){var t=e.refs;C(t,c)},willUnmount:_},(function(e){var n=e.refs;return Object(r.createElement)(P.Provider,{value:function(e){return n.contentNode=e}},Object(r.createElement)("div",S({"data-reach-dialog-overlay":!0,onClick:I(s,(function(e){e.stopPropagation(),u()})),onKeyDown:I(l,(function(e){"Escape"===e.key&&(e.stopPropagation(),u())})),ref:function(e){n.overlayNode=e,t&&t(e)}},d)))}))):null)}));k.propTypes={initialFocusRef:function(){}};var A=function(e){return e.stopPropagation()},D=React.forwardRef((function(e,t){var n=e.onClick,o=(e.onKeyDown,x(e,["onClick","onKeyDown"]));return Object(r.createElement)(P.Consumer,null,(function(e){return Object(r.createElement)("div",S({"aria-modal":"true","data-reach-dialog-content":!0,tabIndex:"-1",onClick:I(n,A),ref:function(n){e(n),t&&t(n)}},o))}))})),M=n(8),T=function(e){return!!e},H=function(e){var t=e.items,n=e.isVisible,o=void 0===n?T:n,i=e.render,a=e.className,u=e.onDismiss;return Object(r.createElement)(M.Transition,{items:t,onStart:function(){return document.body.classList[o(t)?"add":"remove"]("ct-dashboard-overlay-open")},config:{duration:200},from:{opacity:0,y:-10},enter:{opacity:1,y:0},leave:{opacity:0,y:10}},(function(e){return o(e)&&function(t){return Object(r.createElement)(k,{style:{opacity:t.opacity},container:document.querySelector("#wpbody"),onDismiss:function(){return u()}},Object(r.createElement)(D,{className:c()("ct-admin-modal",a),style:{transform:"translate3d(0px, ".concat(t.y,"px, 0px)")}},Object(r.createElement)("button",{className:"close-button",onClick:function(){return u()}},"×"),i(e,t)))}}))};function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var L=function(e){var t=R(Object(r.useState)(!1),2),n=t[0],o=t[1];return[function(){return o(!0)},Object(r.createElement)(H,{items:n,onDismiss:function(){return o(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content",dangerouslySetInnerHTML:{__html:e.readme}})}})]};function U(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function K(){return(K=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function F(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n(5);function V(e){return null!=e&&"object"==typeof e&&1===e.nodeType}function B(e,t){return(!t||"hidden"!==e)&&("visible"!==e&&"clip"!==e)}function $(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return B(n.overflowY,t)||B(n.overflowX,t)||function(e){var t=function(e){return e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView.frameElement:null}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function W(e,t,n,r,o,i,a,u){return i<e&&a>t||i>e&&a<t?0:i<=e&&u<=n||a>=t&&u>=n?i-e-r:a>t&&u<n||i<e&&u>n?a-t+o:0}var z=0;function q(e){return"function"==typeof e?e:Y}function Y(){}function X(e,t){null!==e&&function(e,t){var n=t.scrollMode,r=t.block,o=t.inline,i=t.boundary,a=t.skipOverflowHiddenElements,u="function"==typeof i?i:function(e){return e!==i};if(!V(e))throw new TypeError("Invalid target");for(var c=document.scrollingElement||document.documentElement,s=[],l=e;V(l)&&u(l);){if((l=l.parentNode)===c){s.push(l);break}l===document.body&&$(l)&&!$(document.documentElement)||$(l,a)&&s.push(l)}for(var d=window.visualViewport?visualViewport.width:innerWidth,p=window.visualViewport?visualViewport.height:innerHeight,f=window.scrollX||pageXOffset,h=window.scrollY||pageYOffset,m=e.getBoundingClientRect(),v=m.height,g=m.width,y=m.top,b=m.right,I=m.bottom,w=m.left,O="start"===r||"nearest"===r?y:"end"===r?I:y+v/2,S="center"===o?w+g/2:"end"===o?b:w,x=[],E=0;E<s.length;E++){var j=s[E],C=j.getBoundingClientRect(),_=C.height,P=C.width,k=C.top,A=C.right,D=C.bottom,M=C.left;if("if-needed"===n&&y>=0&&w>=0&&I<=p&&b<=d&&y>=k&&I<=D&&w>=M&&b<=A)return x;var T=getComputedStyle(j),H=parseInt(T.borderLeftWidth,10),R=parseInt(T.borderTopWidth,10),N=parseInt(T.borderRightWidth,10),L=parseInt(T.borderBottomWidth,10),U=0,K=0,F="offsetWidth"in j?j.offsetWidth-j.clientWidth-H-N:0,B="offsetHeight"in j?j.offsetHeight-j.clientHeight-R-L:0;if(c===j)U="start"===r?O:"end"===r?O-p:"nearest"===r?W(h,h+p,p,R,L,h+O,h+O+v,v):O-p/2,K="start"===o?S:"center"===o?S-d/2:"end"===o?S-d:W(f,f+d,d,H,N,f+S,f+S+g,g),U=Math.max(0,U+h),K=Math.max(0,K+f);else{U="start"===r?O-k-R:"end"===r?O-D+L+B:"nearest"===r?W(k,D,_,R,L+B,O,O+v,v):O-(k+_/2)+B/2,K="start"===o?S-M-H:"center"===o?S-(M+P/2)+F/2:"end"===o?S-A+N+F:W(M,A,P,H,N+F,S,S+g,g);var z=j.scrollLeft,q=j.scrollTop;O+=q-(U=Math.max(0,Math.min(q+U,j.scrollHeight-_+B))),S+=z-(K=Math.max(0,Math.min(z+K,j.scrollWidth-P+F)))}x.push({el:j,top:U,left:K})}return x}(e,{boundary:t,block:"nearest",scrollMode:"if-needed"}).forEach((function(e){var t=e.el,n=e.top,r=e.left;t.scrollTop=n,t.scrollLeft=r}))}function G(e,t){return e===t||e.contains&&e.contains(t)}function J(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];r(),n=setTimeout((function(){n=null,e.apply(void 0,i)}),t)}return o.cancel=r,o}function Q(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return t&&t.apply(void 0,[e].concat(r)),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault}))}}function Z(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){"function"==typeof t?t(e):t&&(t.current=e)}))}}function ee(e){var t=e.isOpen,n=e.selectedItem,r=e.resultCount,o=e.previousResultCount,i=e.itemToString;return t?r?r!==o?r+" result"+(1===r?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":n?i(n):""}function te(e,t){return!(e=Array.isArray(e)?e[0]:e)&&t?t:e}function ne(e){return"string"==typeof e.type}function re(e){return e.props}var oe=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function ie(e){void 0===e&&(e={});var t={};return oe.forEach((function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}function ae(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}function ue(e,t,n){var r=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:r+1);var o=t+e;return o<0?o=r:o>r&&(o=0),o}var ce=J((function(){le().textContent=""}),500);function se(e,t){var n=le(t);e&&(n.textContent=e,ce())}function le(e){void 0===e&&(e=document);var t=e.getElementById("a11y-status-message");return t||((t=e.createElement("div")).setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var de=Object.freeze({__proto__:null,unknown:0,mouseUp:1,itemMouseEnter:2,keyDownArrowUp:3,keyDownArrowDown:4,keyDownEscape:5,keyDownEnter:6,keyDownHome:7,keyDownEnd:8,clickItem:9,blurInput:10,changeInput:11,keyDownSpaceButton:12,clickButton:13,blurButton:14,controlledPropUpdatedSelectedItem:15,touchEnd:16}),pe=function(){var e=function(e){var t,n;function r(t){var n=e.call(this,t)||this;n.id=n.props.id||"downshift-"+String(z++),n.menuId=n.props.menuId||n.id+"-menu",n.labelId=n.props.labelId||n.id+"-label",n.inputId=n.props.inputId||n.id+"-input",n.getItemId=n.props.getItemId||function(e){return n.id+"-item-"+e},n.input=null,n.items=[],n.itemCount=null,n.previousResultCount=0,n.timeoutIds=[],n.internalSetTimeout=function(e,t){var r=setTimeout((function(){n.timeoutIds=n.timeoutIds.filter((function(e){return e!==r})),e()}),t);n.timeoutIds.push(r)},n.setItemCount=function(e){n.itemCount=e},n.unsetItemCount=function(){n.itemCount=null},n.setHighlightedIndex=function(e,t){void 0===e&&(e=n.props.defaultHighlightedIndex),void 0===t&&(t={}),t=ie(t),n.internalSetState(K({highlightedIndex:e},t))},n.clearSelection=function(e){n.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:n.props.defaultHighlightedIndex,isOpen:n.props.defaultIsOpen},e)},n.selectItem=function(e,t,r){t=ie(t),n.internalSetState(K({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,selectedItem:e,inputValue:n.props.itemToString(e)},t),r)},n.selectItemAtIndex=function(e,t,r){var o=n.items[e];null!=o&&n.selectItem(o,t,r)},n.selectHighlightedItem=function(e,t){return n.selectItemAtIndex(n.getState().highlightedIndex,e,t)},n.internalSetState=function(e,t){var r,o,i={},a="function"==typeof e;return!a&&e.hasOwnProperty("inputValue")&&n.props.onInputValueChange(e.inputValue,K({},n.getStateAndHelpers(),{},e)),n.setState((function(t){t=n.getState(t);var u=a?e(t):e;u=n.props.stateReducer(t,u),r=u.hasOwnProperty("selectedItem");var c={},s={};return r&&u.selectedItem!==t.selectedItem&&(o=u.selectedItem),u.type=u.type||0,Object.keys(u).forEach((function(e){t[e]!==u[e]&&(i[e]=u[e]),"type"!==e&&(s[e]=u[e],n.isControlledProp(e)||(c[e]=u[e]))})),a&&u.hasOwnProperty("inputValue")&&n.props.onInputValueChange(u.inputValue,K({},n.getStateAndHelpers(),{},u)),c}),(function(){q(t)(),Object.keys(i).length>1&&n.props.onStateChange(i,n.getStateAndHelpers()),r&&n.props.onSelect(e.selectedItem,n.getStateAndHelpers()),void 0!==o&&n.props.onChange(o,n.getStateAndHelpers()),n.props.onUserAction(i,n.getStateAndHelpers())}))},n.rootRef=function(e){return n._rootNode=e},n.getRootProps=function(e,t){var r,o=void 0===e?{}:e,i=o.refKey,a=void 0===i?"ref":i,u=o.ref,c=U(o,["refKey","ref"]),s=(void 0===t?{}:t).suppressRefError,l=void 0!==s&&s;n.getRootProps.called=!0,n.getRootProps.refKey=a,n.getRootProps.suppressRefError=l;var d=n.getState().isOpen;return K(((r={})[a]=Z(u,n.rootRef),r.role="combobox",r["aria-expanded"]=d,r["aria-haspopup"]="listbox",r["aria-owns"]=d?n.menuId:null,r["aria-labelledby"]=n.labelId,r),c)},n.keyDownHandlers={ArrowDown:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?5:1;this.moveHighlightedIndex(n,{type:4})}else this.internalSetState({isOpen:!0,type:4},(function(){var e=t.getItemCount();e>0&&t.setHighlightedIndex(ue(1,t.getState().highlightedIndex,e),{type:4})}))},ArrowUp:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?-5:-1;this.moveHighlightedIndex(n,{type:3})}else this.internalSetState({isOpen:!0,type:3},(function(){var e=t.getItemCount();e>0&&t.setHighlightedIndex(ue(-1,t.getState().highlightedIndex,e),{type:4})}))},Enter:function(e){var t=this.getState(),n=t.isOpen,r=t.highlightedIndex;if(n&&null!=r){e.preventDefault();var o=this.items[r],i=this.getItemNodeFromIndex(r);if(null==o||i&&i.hasAttribute("disabled"))return;this.selectHighlightedItem({type:6})}},Escape:function(e){e.preventDefault(),this.reset({type:5,selectedItem:null,inputValue:""})}},n.buttonKeyDownHandlers=K({},n.keyDownHandlers,{" ":function(e){e.preventDefault(),this.toggleMenu({type:12})}}),n.inputKeyDownHandlers=K({},n.keyDownHandlers,{Home:function(e){this.highlightFirstOrLastIndex(e,!0,{type:7})},End:function(e){this.highlightFirstOrLastIndex(e,!1,{type:8})}}),n.getToggleButtonProps=function(e){var t=void 0===e?{}:e,r=t.onClick,o=(t.onPress,t.onKeyDown),i=t.onKeyUp,a=t.onBlur,u=U(t,["onClick","onPress","onKeyDown","onKeyUp","onBlur"]),c=n.getState().isOpen,s={onClick:Q(r,n.buttonHandleClick),onKeyDown:Q(o,n.buttonHandleKeyDown),onKeyUp:Q(i,n.buttonHandleKeyUp),onBlur:Q(a,n.buttonHandleBlur)};return K({type:"button",role:"button","aria-label":c?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},u.disabled?{}:s,{},u)},n.buttonHandleKeyUp=function(e){e.preventDefault()},n.buttonHandleKeyDown=function(e){var t=ae(e);n.buttonKeyDownHandlers[t]&&n.buttonKeyDownHandlers[t].call(F(n),e)},n.buttonHandleClick=function(e){e.preventDefault(),n.props.environment.document.activeElement===n.props.environment.document.body&&e.target.focus(),n.internalSetTimeout((function(){return n.toggleMenu({type:13})}))},n.buttonHandleBlur=function(e){var t=e.target;n.internalSetTimeout((function(){n.isMouseDown||null!=n.props.environment.document.activeElement&&n.props.environment.document.activeElement.id===n.inputId||n.props.environment.document.activeElement===t||n.reset({type:14})}))},n.getLabelProps=function(e){return K({htmlFor:n.inputId,id:n.labelId},e)},n.getInputProps=function(e){var t=void 0===e?{}:e,r=t.onKeyDown,o=t.onBlur,i=t.onChange,a=t.onInput,u=(t.onChangeText,U(t,["onKeyDown","onBlur","onChange","onInput","onChangeText"])),c={};var s,l=n.getState(),d=l.inputValue,p=l.isOpen,f=l.highlightedIndex;u.disabled||((s={}).onChange=Q(i,a,n.inputHandleChange),s.onKeyDown=Q(r,n.inputHandleKeyDown),s.onBlur=Q(o,n.inputHandleBlur),c=s);return K({"aria-autocomplete":"list","aria-activedescendant":p&&"number"==typeof f&&f>=0?n.getItemId(f):null,"aria-controls":p?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:d,id:n.inputId},c,{},u)},n.inputHandleKeyDown=function(e){var t=ae(e);t&&n.inputKeyDownHandlers[t]&&n.inputKeyDownHandlers[t].call(F(n),e)},n.inputHandleChange=function(e){n.internalSetState({type:11,isOpen:!0,inputValue:e.target.value,highlightedIndex:n.props.defaultHighlightedIndex})},n.inputHandleBlur=function(){n.internalSetTimeout((function(){var e=n.props.environment.document&&!!n.props.environment.document.activeElement&&!!n.props.environment.document.activeElement.dataset&&n.props.environment.document.activeElement.dataset.toggle&&n._rootNode&&n._rootNode.contains(n.props.environment.document.activeElement);n.isMouseDown||e||n.reset({type:10})}))},n.menuRef=function(e){n._menuNode=e},n.getMenuProps=function(e,t){var r,o=void 0===e?{}:e,i=o.refKey,a=void 0===i?"ref":i,u=o.ref,c=U(o,["refKey","ref"]),s=(void 0===t?{}:t).suppressRefError,l=void 0!==s&&s;return n.getMenuProps.called=!0,n.getMenuProps.refKey=a,n.getMenuProps.suppressRefError=l,K(((r={})[a]=Z(u,n.menuRef),r.role="listbox",r["aria-labelledby"]=c&&c["aria-label"]?null:n.labelId,r.id=n.menuId,r),c)},n.getItemProps=function(e){var t,r=void 0===e?{}:e,o=r.onMouseMove,i=r.onMouseDown,a=r.onClick,u=(r.onPress,r.index),c=r.item,s=void 0===c?void 0:c,l=U(r,["onMouseMove","onMouseDown","onClick","onPress","index","item"]);void 0===u?(n.items.push(s),u=n.items.indexOf(s)):n.items[u]=s;var d=a,p=((t={onMouseMove:Q(o,(function(){u!==n.getState().highlightedIndex&&(n.setHighlightedIndex(u,{type:2}),n.avoidScrolling=!0,n.internalSetTimeout((function(){return n.avoidScrolling=!1}),250))})),onMouseDown:Q(i,(function(e){e.preventDefault()}))}).onClick=Q(d,(function(){n.selectItemAtIndex(u,{type:9})})),t),f=l.disabled?{onMouseDown:p.onMouseDown}:p;return K({id:n.getItemId(u),role:"option","aria-selected":n.getState().highlightedIndex===u},f,{},l)},n.clearItems=function(){n.items=[]},n.reset=function(e,t){void 0===e&&(e={}),e=ie(e),n.internalSetState((function(t){var r=t.selectedItem;return K({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,inputValue:n.props.itemToString(r)},e)}),t)},n.toggleMenu=function(e,t){void 0===e&&(e={}),e=ie(e),n.internalSetState((function(t){var r=t.isOpen;return K({isOpen:!r},r&&{highlightedIndex:n.props.defaultHighlightedIndex},{},e)}),(function(){var r=n.getState(),o=r.isOpen,i=r.highlightedIndex;o&&n.getItemCount()>0&&"number"==typeof i&&n.setHighlightedIndex(i,e),q(t)()}))},n.openMenu=function(e){n.internalSetState({isOpen:!0},e)},n.closeMenu=function(e){n.internalSetState({isOpen:!1},e)},n.updateStatus=J((function(){var e=n.getState(),t=n.items[e.highlightedIndex],r=n.getItemCount(),o=n.props.getA11yStatusMessage(K({itemToString:n.props.itemToString,previousResultCount:n.previousResultCount,resultCount:r,highlightedItem:t},e));n.previousResultCount=r,se(o,n.props.environment.document)}),200);var r=n.props,o=r.defaultHighlightedIndex,i=r.initialHighlightedIndex,a=void 0===i?o:i,u=r.defaultIsOpen,c=r.initialIsOpen,s=void 0===c?u:c,l=r.initialInputValue,d=void 0===l?"":l,p=r.initialSelectedItem,f=void 0===p?null:p,h=n.getState({highlightedIndex:a,isOpen:s,inputValue:d,selectedItem:f});return null!=h.selectedItem&&void 0===n.props.initialInputValue&&(h.inputValue=n.props.itemToString(h.selectedItem)),n.state=h,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=r.prototype;return o.internalClearTimeouts=function(){this.timeoutIds.forEach((function(e){clearTimeout(e)})),this.timeoutIds=[]},o.getState=function(e){var t=this;return void 0===e&&(e=this.state),Object.keys(e).reduce((function(n,r){return n[r]=t.isControlledProp(r)?t.props[r]:e[r],n}),{})},o.isControlledProp=function(e){return void 0!==this.props[e]},o.getItemCount=function(){var e=this.items.length;return null!=this.itemCount?e=this.itemCount:void 0!==this.props.itemCount&&(e=this.props.itemCount),e},o.getItemNodeFromIndex=function(e){return this.props.environment.document.getElementById(this.getItemId(e))},o.scrollHighlightedItemIntoView=function(){var e=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(e,this._menuNode)},o.moveHighlightedIndex=function(e,t){var n=this.getItemCount();if(n>0){var r=ue(e,this.getState().highlightedIndex,n);this.setHighlightedIndex(r,t)}},o.highlightFirstOrLastIndex=function(e,t,n){var r=this.getItemCount()-1;r<0||!this.getState().isOpen||(e.preventDefault(),this.setHighlightedIndex(t?0:r,n))},o.getStateAndHelpers=function(){var e=this.getState(),t=e.highlightedIndex,n=e.inputValue,r=e.selectedItem,o=e.isOpen,i=this.props.itemToString,a=this.id,u=this.getRootProps,c=this.getToggleButtonProps,s=this.getLabelProps,l=this.getMenuProps,d=this.getInputProps,p=this.getItemProps,f=this.openMenu,h=this.closeMenu,m=this.toggleMenu,v=this.selectItem,g=this.selectItemAtIndex,y=this.selectHighlightedItem,b=this.setHighlightedIndex,I=this.clearSelection,w=this.clearItems;return{getRootProps:u,getToggleButtonProps:c,getLabelProps:s,getMenuProps:l,getInputProps:d,getItemProps:p,reset:this.reset,openMenu:f,closeMenu:h,toggleMenu:m,selectItem:v,selectItemAtIndex:g,selectHighlightedItem:y,setHighlightedIndex:b,clearSelection:I,clearItems:w,setItemCount:this.setItemCount,unsetItemCount:this.unsetItemCount,setState:this.internalSetState,itemToString:i,id:a,highlightedIndex:t,inputValue:n,isOpen:o,selectedItem:r}},o.componentDidMount=function(){var e=this;var t=function(t,n){void 0===n&&(n=!0);var r=e.props.environment.document;return[e._rootNode,e._menuNode].some((function(e){return e&&(G(e,t)||n&&G(e,r.activeElement))}))},n=function(){e.isMouseDown=!0},r=function(n){e.isMouseDown=!1,!t(n.target)&&e.getState().isOpen&&e.reset({type:1},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},o=function(){e.isTouchMove=!1},i=function(){e.isTouchMove=!0},a=function(n){var r=t(n.target,!1);e.isTouchMove||r||!e.getState().isOpen||e.reset({type:16},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},u=this.props.environment;u.addEventListener("mousedown",n),u.addEventListener("mouseup",r),u.addEventListener("touchstart",o),u.addEventListener("touchmove",i),u.addEventListener("touchend",a),this.cleanup=function(){e.internalClearTimeouts(),e.updateStatus.cancel(),u.removeEventListener("mousedown",n),u.removeEventListener("mouseup",r),u.removeEventListener("touchstart",o),u.removeEventListener("touchmove",i),u.removeEventListener("touchend",a)}},o.shouldScroll=function(e,t){var n=(void 0===this.props.highlightedIndex?this.getState():this.props).highlightedIndex,r=(void 0===t.highlightedIndex?e:t).highlightedIndex;return n&&this.getState().isOpen&&!e.isOpen||n!==r},o.componentDidUpdate=function(e,t){this.isControlledProp("selectedItem")&&this.props.selectedItemChanged(e.selectedItem,this.props.selectedItem)&&this.internalSetState({type:15,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(t,e)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},o.componentWillUnmount=function(){this.cleanup()},o.render=function(){var e=te(this.props.children,Y);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var t=te(e(this.getStateAndHelpers()));return t?this.getRootProps.called||this.props.suppressRefError?t:ne(t)?Object(s.cloneElement)(t,this.getRootProps(re(t))):void 0:null},r}(s.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:ee,itemToString:function(e){return null==e?"":String(e)},onStateChange:Y,onInputValueChange:Y,onUserAction:Y,onChange:Y,onSelect:Y,onOuterClick:Y,selectedItemChanged:function(e,t){return e!==t},environment:"undefined"==typeof window?{}:window,stateReducer:function(e,t){return t},suppressRefError:!1,scrollIntoView:X},e.stateChangeTypes=de,e}();p.a.array.isRequired,p.a.func,p.a.func,p.a.func,p.a.bool,p.a.number,p.a.number,p.a.number,p.a.bool,p.a.bool,p.a.bool,p.a.any,p.a.any,p.a.any,p.a.string,p.a.string,p.a.string,p.a.func,p.a.string,p.a.func,p.a.func,p.a.func,p.a.func,p.a.func,p.a.shape({addEventListener:p.a.func,removeEventListener:p.a.func,document:p.a.shape({getElementById:p.a.func,activeElement:p.a.any,body:p.a.any})});"undefined"==typeof window||window;var fe=pe;function he(){return(he=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function me(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function ve(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ge(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ge(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ye=function(e){var t=e.listId,n=e.apiKey,o=e.onChange,i=ve(Object(r.useState)([]),2),u=i[0],s=i[1],l=ve(Object(r.useState)(!1),2),d=l[0],p=l[1],f=ve(Object(r.useState)({controller:null}),2),h=f[0].controller,m=f[1],v=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h&&h.abort(),p(!0),"AbortController"in window&&(h=new AbortController,m({controller:h})),(t=new FormData).append("api_key",n),t.append("action","blocksy_ext_mailchimp_maybe_get_lists"),e.prev=6,e.next=9,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",signal:h.signal,body:t});case 9:if(200!==(r=e.sent).status){e.next=19;break}return e.next=13,r.json();case 13:if(!(o=e.sent).success){e.next=19;break}if("api_key_invalid"===o.data.result){e.next=19;break}return p(!1),s(o.data.result),e.abrupt("return");case 19:e.next=23;break;case 21:e.prev=21,e.t0=e.catch(6);case 23:s([]),p(!1);case 25:case"end":return e.stop()}}),e,null,[[6,21]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){me(i,r,o,a,u,"next",e)}function u(e){me(i,r,o,a,u,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.useEffect)((function(){n&&-1!==n.indexOf("-")?v():s([])}),[n]),0===u.length?Object(r.createElement)("div",{className:"ct-select-input"},Object(r.createElement)("input",{disabled:!0,placeholder:d?Object(a.__)("Loading","blc"):Object(a.__)("Invalid API Key...","blc")})):Object(r.createElement)(fe,{selectedItem:t||"",onChange:function(e){return o(e)},itemToString:function(e){return e?(u.find((function(t){return t.id===e}))||{}).name:""}},(function(e){var t=e.getInputProps,n=e.getItemProps,o=(e.getLabelProps,e.getMenuProps),i=e.isOpen,s=(e.inputValue,e.highlightedIndex),l=e.selectedItem,d=e.openMenu;return Object(r.createElement)("div",{className:"ct-select-input"},Object(r.createElement)("input",he({},t({onFocus:function(){return d()},onClick:function(){return d()}}),{placeholder:Object(a.__)("Select list...","blc"),readOnly:!0})),i&&Object(r.createElement)("div",o({className:"ct-select-dropdown"}),u.map((function(e,t){return Object(r.createElement)("div",n({key:e.id,index:t,item:e.id,className:c()("ct-select-dropdown-item",{active:s===t,selected:l===e.id})}),e.name)}))))}))};function be(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function Ie(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return we(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return we(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function we(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Oe=function(e){var t=e.extension,n=e.isEditingCredentials,o=e.setIsEditingCredentials,i=e.onCredentialsValidated,u=Ie(Object(r.useState)(t.data.api_key),2),s=u[0],l=u[1],d=Ie(Object(r.useState)(t.data.list_id),2),p=d[0],f=d[1],h=Ie(Object(r.useState)(!1),2),m=h[0],v=h[1],g=Ie(Object(r.useState)(!1),2),y=g[0],b=g[1],I=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).append("api_key",s),t.append("list_id",p),t.append("action","blocksy_ext_mailchimp_maybe_save_credentials"),v(!0),e.prev=5,e.next=8,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 8:if(200!==(n=e.sent).status){e.next=14;break}return e.next=12,n.json();case 12:(r=e.sent).success&&"api_key_invalid"!==r.data.result&&(i(),b(!1));case 14:b(!0),e.next=20;break;case 17:e.prev=17,e.t0=e.catch(5),b(!0);case 20:return e.next=22,new Promise((function(e){return setTimeout((function(){return e()}),1e3)}));case 22:v(!1);case 23:case"end":return e.stop()}}),e,null,[[5,17]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){be(i,r,o,a,u,"next",e)}function u(e){be(i,r,o,a,u,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.createElement)(H,{items:n,onDismiss:function(){return o(!1)},className:"ct-mailchimp-modal",render:function(){return Object(r.createElement)("div",{className:c()("ct-modal-content",{"ct-key-invalid":y})},Object(r.createElement)("h2",null,Object(a.__)("MailChimp Credentials","blc")),Object(r.createElement)("p",{dangerouslySetInnerHTML:{__html:Object(a.sprintf)(Object(a.__)("Enter your MailChimp credentials in the form below. More info on how to generate an API key can be found %shere%s.","blc"),'<a target="_blank" href="https://mailchimp.com/help/about-api-keys/">',"</a>")}}),Object(r.createElement)("div",{className:"mailchimp-credentials"},Object(r.createElement)("section",null,Object(r.createElement)("label",null,Object(a.__)("API Key","blc")),Object(r.createElement)("div",{className:"ct-option-input"},Object(r.createElement)("input",{type:"text",onChange:function(e){var t=e.target.value;return l(t)},value:s||""}))),Object(r.createElement)("section",null,Object(r.createElement)("label",null,Object(a.__)("List ID","blc")),Object(r.createElement)(ye,{listId:p,onChange:function(e){return f(e)},apiKey:s})),Object(r.createElement)("section",null,Object(r.createElement)("label",null," "),Object(r.createElement)("button",{className:"ct-button","data-button":"blue",disabled:!s||!p||m,onClick:function(){return I()}},m?Object(a.__)("Loading...","blc"):t.__object?Object(a.__)("Save Settings","blc"):Object(a.__)("Activate","blc")))))}})};function Se(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function xe(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Se(i,r,o,a,u,"next",e)}function u(e){Se(i,r,o,a,u,"throw",e)}a(void 0)}))}}function Ee(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return je(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return je(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function je(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ce=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=Object(r.useState)(!1),o=Ee(n,2),i=o[0],u=o[1],c=Object(r.useState)(!1),s=Ee(c,2),l=s[0],d=s[1],p=function(){var n=xe(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return(r=new FormData).append("ext",e.name),r.append("action",e.__object?"blocksy_extension_deactivate":"blocksy_extension_activate"),u(!0),n.prev=4,n.next=7,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:r});case 7:t(),n.next=12;break;case 10:n.prev=10,n.t0=n.catch(4);case 12:u(!1);case 13:case"end":return n.stop()}}),n,null,[[4,10]])})));return function(){return n.apply(this,arguments)}}(),f=function(){e.__object||e.data.api_key?p():d(!0)};return[i,f,Object(r.createElement)(r.Fragment,null,e.__object&&e.data.api_key&&Object(r.createElement)("button",{className:"ct-button ct-config-btn","data-button":"white",title:"Edit Credentials",onClick:function(){return d(!0)}},Object(a.__)("Configure","blc")),Object(r.createElement)(Oe,{isEditingCredentials:l,setIsEditingCredentials:d,extension:e,onCredentialsValidated:function(){e.__object||p(),d(!1)}}))]};function _e(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Pe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pe(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ke=function(e){var t=e.extension,n=e.onExtsSync,o=_e(Ce(t,(function(){n()})),3),i=o[0],u=o[1],s=o[2],l=_e(L(t),2),d=l[0],p=l[1];return Object(r.createElement)("li",{className:c()({active:!!t.__object})},Object(r.createElement)("h4",{className:"ct-extension-title"},t.config.name,i&&Object(r.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 100 100"},Object(r.createElement)("g",{transform:"translate(50,50)"},Object(r.createElement)("g",{transform:"scale(1)"},Object(r.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"#687c93"}),Object(r.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},Object(r.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"})))))),t.config.description&&Object(r.createElement)("div",{className:"ct-extension-description"},t.config.description),Object(r.createElement)("div",{className:"ct-extension-actions"},Object(r.createElement)("button",{className:c()(t.__object?"ct-button":"ct-button-primary"),"data-button":"white",disabled:i,onClick:function(){return u()}},t.__object?Object(a.__)("Deactivate","blc"):Object(a.__)("Activate","blc")),s,t.readme&&Object(r.createElement)("button",{onClick:function(){return d()},"data-button":"white",className:"ct-minimal-button ct-instruction"},Object(r.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M12,2C6.477,2,2,6.477,2,12s4.477,10,10,10s10-4.477,10-10S17.523,2,12,2z M12,17L12,17c-0.552,0-1-0.448-1-1v-4 c0-0.552,0.448-1,1-1h0c0.552,0,1,0.448,1,1v4C13,16.552,12.552,17,12,17z M12.5,9h-1C11.224,9,11,8.776,11,8.5v-1 C11,7.224,11.224,7,11.5,7h1C12.776,7,13,7.224,13,7.5v1C13,8.776,12.776,9,12.5,9z"})))),p)};i.a.on("ct:extensions:card",(function(e){var t=e.CustomComponent;"mailchimp"===e.extension.name&&(t.extension=ke)}))}]);
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===i)for(var u in r)n.call(r,u)&&r[u]&&e.push(u)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=window.blocksyOptions},function(e,t,n){"use strict";e.exports=n(13)},function(e,t){e.exports=ctEvents},function(e,t,n){var r,o,i=n(11),a=n(12),u=(o=[],{activateTrap:function(e){if(o.length>0){var t=o[o.length-1];t!==e&&t.pause()}var n=o.indexOf(e);-1===n||o.splice(n,1),o.push(e)},deactivateTrap:function(e){var t=o.indexOf(e);-1!==t&&o.splice(t,1),o.length>0&&o[o.length-1].unpause()}});function c(e){return setTimeout(e,0)}e.exports=function(e,t){var n=document,o="string"==typeof e?n.querySelector(e):e,s=a({returnFocusOnDeactivate:!0,escapeDeactivates:!0},t),l={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},d={activate:function(e){if(l.active)return;w(),l.active=!0,l.paused=!1,l.nodeFocusedBeforeActivation=n.activeElement;var t=e&&e.onActivate?e.onActivate:s.onActivate;t&&t();return f(),d},deactivate:p,pause:function(){if(l.paused||!l.active)return;l.paused=!0,h()},unpause:function(){if(!l.paused||!l.active)return;l.paused=!1,w(),f()}};return d;function p(e){if(l.active){clearTimeout(r),h(),l.active=!1,l.paused=!1,u.deactivateTrap(d);var t=e&&void 0!==e.onDeactivate?e.onDeactivate:s.onDeactivate;return t&&t(),(e&&void 0!==e.returnFocus?e.returnFocus:s.returnFocusOnDeactivate)&&c((function(){var e;O((e=l.nodeFocusedBeforeActivation,m("setReturnFocus")||e))})),d}}function f(){if(l.active)return u.activateTrap(d),r=c((function(){O(v())})),n.addEventListener("focusin",y,!0),n.addEventListener("mousedown",g,{capture:!0,passive:!1}),n.addEventListener("touchstart",g,{capture:!0,passive:!1}),n.addEventListener("click",I,{capture:!0,passive:!1}),n.addEventListener("keydown",b,{capture:!0,passive:!1}),d}function h(){if(l.active)return n.removeEventListener("focusin",y,!0),n.removeEventListener("mousedown",g,!0),n.removeEventListener("touchstart",g,!0),n.removeEventListener("click",I,!0),n.removeEventListener("keydown",b,!0),d}function m(e){var t=s[e],r=t;if(!t)return null;if("string"==typeof t&&!(r=n.querySelector(t)))throw new Error("`"+e+"` refers to no known node");if("function"==typeof t&&!(r=t()))throw new Error("`"+e+"` did not return a node");return r}function v(){var e;if(!(e=null!==m("initialFocus")?m("initialFocus"):o.contains(n.activeElement)?n.activeElement:l.firstTabbableNode||m("fallbackFocus")))throw new Error("Your focus-trap needs to have at least one focusable element");return e}function g(e){o.contains(e.target)||(s.clickOutsideDeactivates?p({returnFocus:!i.isFocusable(e.target)}):s.allowOutsideClick&&s.allowOutsideClick(e)||e.preventDefault())}function y(e){o.contains(e.target)||e.target instanceof Document||(e.stopImmediatePropagation(),O(l.mostRecentlyFocusedNode||v()))}function b(e){if(!1!==s.escapeDeactivates&&function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e))return e.preventDefault(),void p();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){if(w(),e.shiftKey&&e.target===l.firstTabbableNode)return e.preventDefault(),void O(l.lastTabbableNode);if(!e.shiftKey&&e.target===l.lastTabbableNode)e.preventDefault(),O(l.firstTabbableNode)}(e)}function I(e){s.clickOutsideDeactivates||o.contains(e.target)||s.allowOutsideClick&&s.allowOutsideClick(e)||(e.preventDefault(),e.stopImmediatePropagation())}function w(){var e=i(o);l.firstTabbableNode=e[0]||v(),l.lastTabbableNode=e[e.length-1]||v()}function O(e){e!==n.activeElement&&(e&&e.focus?(e.focus(),l.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):O(v()))}}},function(e,t,n){"use strict";var r=n(10);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){var n=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],r=n.join(","),o="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function i(e,t){t=t||{};var n,i,u,c=[],d=[],p=e.querySelectorAll(r);for(t.includeContainer&&o.call(e,r)&&(p=Array.prototype.slice.apply(p)).unshift(e),n=0;n<p.length;n++)a(i=p[n])&&(0===(u=s(i))?c.push(i):d.push({documentOrder:n,tabIndex:u,node:i}));return d.sort(l).map((function(e){return e.node})).concat(c)}function a(e){return!(!u(e)||function(e){return function(e){return d(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t=function(e){for(var t=0;t<e.length;t++)if(e[t].checked)return e[t]}(e.ownerDocument.querySelectorAll('input[type="radio"][name="'+e.name+'"]'));return!t||t===e}(e)}(e)||s(e)<0)}function u(e){return!(e.disabled||function(e){return d(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}i.isTabbable=function(e){if(!e)throw new Error("No node provided");return!1!==o.call(e,r)&&a(e)},i.isFocusable=function(e){if(!e)throw new Error("No node provided");return!1!==o.call(e,c)&&u(e)};var c=n.concat("iframe").join(",");function s(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}function l(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function d(e){return"INPUT"===e.tagName}e.exports=i},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var o in r)n.call(r,o)&&(e[o]=r[o])}return e};var n=Object.prototype.hasOwnProperty},function(e,t,n){"use strict";
7
  /** @license React v16.13.1
8
  * react-is.production.min.js
9
  *
11
  *
12
  * This source code is licensed under the MIT license found in the
13
  * LICENSE file in the root directory of this source tree.
14
+ */var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,u=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,v=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,I=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function O(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case d:case p:case a:case c:case u:case h:return e;default:switch(e=e&&e.$$typeof){case l:case f:case g:case v:case s:return e;default:return t}}case i:return t}}}function S(e){return O(e)===p}t.AsyncMode=d,t.ConcurrentMode=p,t.ContextConsumer=l,t.ContextProvider=s,t.Element=o,t.ForwardRef=f,t.Fragment=a,t.Lazy=g,t.Memo=v,t.Portal=i,t.Profiler=c,t.StrictMode=u,t.Suspense=h,t.isAsyncMode=function(e){return S(e)||O(e)===d},t.isConcurrentMode=S,t.isContextConsumer=function(e){return O(e)===l},t.isContextProvider=function(e){return O(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return O(e)===f},t.isFragment=function(e){return O(e)===a},t.isLazy=function(e){return O(e)===g},t.isMemo=function(e){return O(e)===v},t.isPortal=function(e){return O(e)===i},t.isProfiler=function(e){return O(e)===c},t.isStrictMode=function(e){return O(e)===u},t.isSuspense=function(e){return O(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===p||e===c||e===u||e===h||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===v||e.$$typeof===s||e.$$typeof===l||e.$$typeof===f||e.$$typeof===b||e.$$typeof===I||e.$$typeof===w||e.$$typeof===y)},t.typeOf=O},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(7),i=n.n(o),a=n(3),u=n(4),c=n.n(u),s=n(2),l=n.n(s),d=n(1),p=n.n(d);function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var m=function(e){e.initialState,e.getInitialState,e.refs,e.getRefs,e.didMount,e.didUpdate,e.willUnmount,e.getSnapshotBeforeUpdate,e.shouldUpdate,e.render;return function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["initialState","getInitialState","refs","getRefs","didMount","didUpdate","willUnmount","getSnapshotBeforeUpdate","shouldUpdate","render"])},v=function(e){function t(){var n,r;f(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=h(this,e.call.apply(e,[this].concat(i))),g.call(r),h(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getArgs=function(){var e=this.state,t=this.props,n=this._setState,r=this._forceUpdate,o=this._refs;return{state:e,props:m(t),refs:o,setState:n,forceUpdate:r}},t.prototype.componentDidMount=function(){this.props.didMount&&this.props.didMount(this.getArgs())},t.prototype.shouldComponentUpdate=function(e,t){return!this.props.shouldUpdate||this.props.shouldUpdate({props:this.props,state:this.state,nextProps:m(e),nextState:t})},t.prototype.componentWillUnmount=function(){this.props.willUnmount&&this.props.willUnmount({state:this.state,props:m(this.props),refs:this._refs})},t.prototype.componentDidUpdate=function(e,t,n){this.props.didUpdate&&this.props.didUpdate(Object.assign(this.getArgs(),{prevProps:m(e),prevState:t}),n)},t.prototype.getSnapshotBeforeUpdate=function(e,t){return this.props.getSnapshotBeforeUpdate?this.props.getSnapshotBeforeUpdate(Object.assign(this.getArgs(),{prevProps:m(e),prevState:t})):null},t.prototype.render=function(){var e=this.props,t=e.children,n=e.render;return n?n(this.getArgs()):"function"==typeof t?t(this.getArgs()):t||null},t}(l.a.Component);v.defaultProps={getInitialState:function(){},getRefs:function(){return{}}};var g=function(){var e=this;this.state=this.props.initialState||this.props.getInitialState(this.props),this._refs=this.props.refs||this.props.getRefs(this.getArgs()),this._setState=function(){return e.setState.apply(e,arguments)},this._forceUpdate=function(){return e.forceUpdate.apply(e,arguments)}},y=v,b=function(e){var t=e.children,n=e.container,o=void 0===n?document.body:n,i=e.type,a=void 0===i?"reach-portal":i;return Object(r.createElement)(y,{getRefs:function(){return{node:null}},didMount:function(e){var t=e.refs,n=e.forceUpdate,r=o.hasOwnProperty("current")?o.current:o;t.node=document.createElement(a),r.appendChild(t.node),n()},willUnmount:function(e){var t=e.refs.node,n=o.hasOwnProperty("current")?o.current:o;n&&n.removeChild(t)},render:function(e){var n=e.refs.node;return n?Object(r.createPortal)(t,n):null}})};var I=function(e,t){return function(n){if(e&&e(n),!n.defaultPrevented)return t(n)}},w=n(8),O=n.n(w);function S(){return(S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function x(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var E=function(){},j=function(){},C=function(e,t){var n,r,o;e.disposeAriaHider=(n=e.overlayNode,r=[],o=[],Array.prototype.forEach.call(document.querySelectorAll("body > *"),(function(e){if(e!==n.parentNode){var t=e.getAttribute("aria-hidden");null!==t&&"false"!==t||(r.push(t),o.push(e),e.setAttribute("aria-hidden","true"))}})),function(){o.forEach((function(e,t){var n=r[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)}))}),e.trap=O()(e.overlayNode,{initialFocus:t?function(){return t.current}:void 0,fallbackFocus:e.contentNode,escapeDeactivates:!1,clickOutsideDeactivates:!1})},_=function(e){var t=e.refs;t.trap.deactivate(),t.disposeAriaHider()},P=React.createContext(),A=React.forwardRef((function(e,t){var n=e.container,o=e.isOpen,i=void 0===o||o,a=e.onDismiss,u=void 0===a?E:a,c=e.initialFocusRef,s=e.onClick,l=e.onKeyDown,d=x(e,["container","isOpen","onDismiss","initialFocusRef","onClick","onKeyDown"]);return Object(r.createElement)(y,{didMount:j},i?Object(r.createElement)(b,{container:n,"data-reach-dialog-wrapper":!0},Object(r.createElement)(y,{refs:{overlayNode:null,contentNode:null},didMount:function(e){var t=e.refs;C(t,c)},willUnmount:_},(function(e){var n=e.refs;return Object(r.createElement)(P.Provider,{value:function(e){return n.contentNode=e}},Object(r.createElement)("div",S({"data-reach-dialog-overlay":!0,onClick:I(s,(function(e){e.stopPropagation(),u()})),onKeyDown:I(l,(function(e){"Escape"===e.key&&(e.stopPropagation(),u())})),ref:function(e){n.overlayNode=e,t&&t(e)}},d)))}))):null)}));A.propTypes={initialFocusRef:function(){}};var k=function(e){return e.stopPropagation()},D=React.forwardRef((function(e,t){var n=e.onClick,o=(e.onKeyDown,x(e,["onClick","onKeyDown"]));return Object(r.createElement)(P.Consumer,null,(function(e){return Object(r.createElement)("div",S({"aria-modal":"true","data-reach-dialog-content":!0,tabIndex:"-1",onClick:I(n,k),ref:function(n){e(n),t&&t(n)}},o))}))})),M=n(5),T=function(e){return!!e},H=function(e){var t=e.items,n=e.isVisible,o=void 0===n?T:n,i=e.render,a=e.className,u=e.onDismiss;return Object(r.createElement)(M.Transition,{items:t,onStart:function(){return document.body.classList[o(t)?"add":"remove"]("ct-dashboard-overlay-open")},config:{duration:200},from:{opacity:0,y:-10},enter:{opacity:1,y:0},leave:{opacity:0,y:10}},(function(e){return o(e)&&function(t){return Object(r.createElement)(A,{style:{opacity:t.opacity},container:document.querySelector("#wpbody"),onDismiss:function(){return u()}},Object(r.createElement)(D,{className:c()("ct-admin-modal",a),style:{transform:"translate3d(0px, ".concat(t.y,"px, 0px)")}},Object(r.createElement)("button",{className:"close-button",onClick:function(){return u()}},"×"),i(e,t)))}}))};function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var L=function(e){var t=R(Object(r.useState)(!1),2),n=t[0],o=t[1];return[function(){return o(!0)},Object(r.createElement)(H,{items:n,onDismiss:function(){return o(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content",dangerouslySetInnerHTML:{__html:e.readme}})}})]};function U(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function K(){return(K=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function F(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n(6);function V(e){return null!=e&&"object"==typeof e&&1===e.nodeType}function B(e,t){return(!t||"hidden"!==e)&&("visible"!==e&&"clip"!==e)}function $(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return B(n.overflowY,t)||B(n.overflowX,t)||function(e){var t=function(e){return e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView.frameElement:null}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function W(e,t,n,r,o,i,a,u){return i<e&&a>t||i>e&&a<t?0:i<=e&&u<=n||a>=t&&u>=n?i-e-r:a>t&&u<n||i<e&&u>n?a-t+o:0}var z=0;function q(e){return"function"==typeof e?e:Y}function Y(){}function X(e,t){null!==e&&function(e,t){var n=t.scrollMode,r=t.block,o=t.inline,i=t.boundary,a=t.skipOverflowHiddenElements,u="function"==typeof i?i:function(e){return e!==i};if(!V(e))throw new TypeError("Invalid target");for(var c=document.scrollingElement||document.documentElement,s=[],l=e;V(l)&&u(l);){if((l=l.parentNode)===c){s.push(l);break}l===document.body&&$(l)&&!$(document.documentElement)||$(l,a)&&s.push(l)}for(var d=window.visualViewport?visualViewport.width:innerWidth,p=window.visualViewport?visualViewport.height:innerHeight,f=window.scrollX||pageXOffset,h=window.scrollY||pageYOffset,m=e.getBoundingClientRect(),v=m.height,g=m.width,y=m.top,b=m.right,I=m.bottom,w=m.left,O="start"===r||"nearest"===r?y:"end"===r?I:y+v/2,S="center"===o?w+g/2:"end"===o?b:w,x=[],E=0;E<s.length;E++){var j=s[E],C=j.getBoundingClientRect(),_=C.height,P=C.width,A=C.top,k=C.right,D=C.bottom,M=C.left;if("if-needed"===n&&y>=0&&w>=0&&I<=p&&b<=d&&y>=A&&I<=D&&w>=M&&b<=k)return x;var T=getComputedStyle(j),H=parseInt(T.borderLeftWidth,10),R=parseInt(T.borderTopWidth,10),N=parseInt(T.borderRightWidth,10),L=parseInt(T.borderBottomWidth,10),U=0,K=0,F="offsetWidth"in j?j.offsetWidth-j.clientWidth-H-N:0,B="offsetHeight"in j?j.offsetHeight-j.clientHeight-R-L:0;if(c===j)U="start"===r?O:"end"===r?O-p:"nearest"===r?W(h,h+p,p,R,L,h+O,h+O+v,v):O-p/2,K="start"===o?S:"center"===o?S-d/2:"end"===o?S-d:W(f,f+d,d,H,N,f+S,f+S+g,g),U=Math.max(0,U+h),K=Math.max(0,K+f);else{U="start"===r?O-A-R:"end"===r?O-D+L+B:"nearest"===r?W(A,D,_,R,L+B,O,O+v,v):O-(A+_/2)+B/2,K="start"===o?S-M-H:"center"===o?S-(M+P/2)+F/2:"end"===o?S-k+N+F:W(M,k,P,H,N+F,S,S+g,g);var z=j.scrollLeft,q=j.scrollTop;O+=q-(U=Math.max(0,Math.min(q+U,j.scrollHeight-_+B))),S+=z-(K=Math.max(0,Math.min(z+K,j.scrollWidth-P+F)))}x.push({el:j,top:U,left:K})}return x}(e,{boundary:t,block:"nearest",scrollMode:"if-needed"}).forEach((function(e){var t=e.el,n=e.top,r=e.left;t.scrollTop=n,t.scrollLeft=r}))}function G(e,t){return e===t||e.contains&&e.contains(t)}function J(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];r(),n=setTimeout((function(){n=null,e.apply(void 0,i)}),t)}return o.cancel=r,o}function Q(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return t&&t.apply(void 0,[e].concat(r)),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault}))}}function Z(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){"function"==typeof t?t(e):t&&(t.current=e)}))}}function ee(e){var t=e.isOpen,n=e.selectedItem,r=e.resultCount,o=e.previousResultCount,i=e.itemToString;return t?r?r!==o?r+" result"+(1===r?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":n?i(n):""}function te(e,t){return!(e=Array.isArray(e)?e[0]:e)&&t?t:e}function ne(e){return"string"==typeof e.type}function re(e){return e.props}var oe=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function ie(e){void 0===e&&(e={});var t={};return oe.forEach((function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}function ae(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}function ue(e,t,n){var r=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:r+1);var o=t+e;return o<0?o=r:o>r&&(o=0),o}var ce=J((function(){le().textContent=""}),500);function se(e,t){var n=le(t);e&&(n.textContent=e,ce())}function le(e){void 0===e&&(e=document);var t=e.getElementById("a11y-status-message");return t||((t=e.createElement("div")).setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var de=Object.freeze({__proto__:null,unknown:0,mouseUp:1,itemMouseEnter:2,keyDownArrowUp:3,keyDownArrowDown:4,keyDownEscape:5,keyDownEnter:6,keyDownHome:7,keyDownEnd:8,clickItem:9,blurInput:10,changeInput:11,keyDownSpaceButton:12,clickButton:13,blurButton:14,controlledPropUpdatedSelectedItem:15,touchEnd:16}),pe=function(){var e=function(e){var t,n;function r(t){var n=e.call(this,t)||this;n.id=n.props.id||"downshift-"+String(z++),n.menuId=n.props.menuId||n.id+"-menu",n.labelId=n.props.labelId||n.id+"-label",n.inputId=n.props.inputId||n.id+"-input",n.getItemId=n.props.getItemId||function(e){return n.id+"-item-"+e},n.input=null,n.items=[],n.itemCount=null,n.previousResultCount=0,n.timeoutIds=[],n.internalSetTimeout=function(e,t){var r=setTimeout((function(){n.timeoutIds=n.timeoutIds.filter((function(e){return e!==r})),e()}),t);n.timeoutIds.push(r)},n.setItemCount=function(e){n.itemCount=e},n.unsetItemCount=function(){n.itemCount=null},n.setHighlightedIndex=function(e,t){void 0===e&&(e=n.props.defaultHighlightedIndex),void 0===t&&(t={}),t=ie(t),n.internalSetState(K({highlightedIndex:e},t))},n.clearSelection=function(e){n.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:n.props.defaultHighlightedIndex,isOpen:n.props.defaultIsOpen},e)},n.selectItem=function(e,t,r){t=ie(t),n.internalSetState(K({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,selectedItem:e,inputValue:n.props.itemToString(e)},t),r)},n.selectItemAtIndex=function(e,t,r){var o=n.items[e];null!=o&&n.selectItem(o,t,r)},n.selectHighlightedItem=function(e,t){return n.selectItemAtIndex(n.getState().highlightedIndex,e,t)},n.internalSetState=function(e,t){var r,o,i={},a="function"==typeof e;return!a&&e.hasOwnProperty("inputValue")&&n.props.onInputValueChange(e.inputValue,K({},n.getStateAndHelpers(),{},e)),n.setState((function(t){t=n.getState(t);var u=a?e(t):e;u=n.props.stateReducer(t,u),r=u.hasOwnProperty("selectedItem");var c={},s={};return r&&u.selectedItem!==t.selectedItem&&(o=u.selectedItem),u.type=u.type||0,Object.keys(u).forEach((function(e){t[e]!==u[e]&&(i[e]=u[e]),"type"!==e&&(s[e]=u[e],n.isControlledProp(e)||(c[e]=u[e]))})),a&&u.hasOwnProperty("inputValue")&&n.props.onInputValueChange(u.inputValue,K({},n.getStateAndHelpers(),{},u)),c}),(function(){q(t)(),Object.keys(i).length>1&&n.props.onStateChange(i,n.getStateAndHelpers()),r&&n.props.onSelect(e.selectedItem,n.getStateAndHelpers()),void 0!==o&&n.props.onChange(o,n.getStateAndHelpers()),n.props.onUserAction(i,n.getStateAndHelpers())}))},n.rootRef=function(e){return n._rootNode=e},n.getRootProps=function(e,t){var r,o=void 0===e?{}:e,i=o.refKey,a=void 0===i?"ref":i,u=o.ref,c=U(o,["refKey","ref"]),s=(void 0===t?{}:t).suppressRefError,l=void 0!==s&&s;n.getRootProps.called=!0,n.getRootProps.refKey=a,n.getRootProps.suppressRefError=l;var d=n.getState().isOpen;return K(((r={})[a]=Z(u,n.rootRef),r.role="combobox",r["aria-expanded"]=d,r["aria-haspopup"]="listbox",r["aria-owns"]=d?n.menuId:null,r["aria-labelledby"]=n.labelId,r),c)},n.keyDownHandlers={ArrowDown:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?5:1;this.moveHighlightedIndex(n,{type:4})}else this.internalSetState({isOpen:!0,type:4},(function(){var e=t.getItemCount();e>0&&t.setHighlightedIndex(ue(1,t.getState().highlightedIndex,e),{type:4})}))},ArrowUp:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?-5:-1;this.moveHighlightedIndex(n,{type:3})}else this.internalSetState({isOpen:!0,type:3},(function(){var e=t.getItemCount();e>0&&t.setHighlightedIndex(ue(-1,t.getState().highlightedIndex,e),{type:4})}))},Enter:function(e){var t=this.getState(),n=t.isOpen,r=t.highlightedIndex;if(n&&null!=r){e.preventDefault();var o=this.items[r],i=this.getItemNodeFromIndex(r);if(null==o||i&&i.hasAttribute("disabled"))return;this.selectHighlightedItem({type:6})}},Escape:function(e){e.preventDefault(),this.reset({type:5,selectedItem:null,inputValue:""})}},n.buttonKeyDownHandlers=K({},n.keyDownHandlers,{" ":function(e){e.preventDefault(),this.toggleMenu({type:12})}}),n.inputKeyDownHandlers=K({},n.keyDownHandlers,{Home:function(e){this.highlightFirstOrLastIndex(e,!0,{type:7})},End:function(e){this.highlightFirstOrLastIndex(e,!1,{type:8})}}),n.getToggleButtonProps=function(e){var t=void 0===e?{}:e,r=t.onClick,o=(t.onPress,t.onKeyDown),i=t.onKeyUp,a=t.onBlur,u=U(t,["onClick","onPress","onKeyDown","onKeyUp","onBlur"]),c=n.getState().isOpen,s={onClick:Q(r,n.buttonHandleClick),onKeyDown:Q(o,n.buttonHandleKeyDown),onKeyUp:Q(i,n.buttonHandleKeyUp),onBlur:Q(a,n.buttonHandleBlur)};return K({type:"button",role:"button","aria-label":c?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},u.disabled?{}:s,{},u)},n.buttonHandleKeyUp=function(e){e.preventDefault()},n.buttonHandleKeyDown=function(e){var t=ae(e);n.buttonKeyDownHandlers[t]&&n.buttonKeyDownHandlers[t].call(F(n),e)},n.buttonHandleClick=function(e){e.preventDefault(),n.props.environment.document.activeElement===n.props.environment.document.body&&e.target.focus(),n.internalSetTimeout((function(){return n.toggleMenu({type:13})}))},n.buttonHandleBlur=function(e){var t=e.target;n.internalSetTimeout((function(){n.isMouseDown||null!=n.props.environment.document.activeElement&&n.props.environment.document.activeElement.id===n.inputId||n.props.environment.document.activeElement===t||n.reset({type:14})}))},n.getLabelProps=function(e){return K({htmlFor:n.inputId,id:n.labelId},e)},n.getInputProps=function(e){var t=void 0===e?{}:e,r=t.onKeyDown,o=t.onBlur,i=t.onChange,a=t.onInput,u=(t.onChangeText,U(t,["onKeyDown","onBlur","onChange","onInput","onChangeText"])),c={};var s,l=n.getState(),d=l.inputValue,p=l.isOpen,f=l.highlightedIndex;u.disabled||((s={}).onChange=Q(i,a,n.inputHandleChange),s.onKeyDown=Q(r,n.inputHandleKeyDown),s.onBlur=Q(o,n.inputHandleBlur),c=s);return K({"aria-autocomplete":"list","aria-activedescendant":p&&"number"==typeof f&&f>=0?n.getItemId(f):null,"aria-controls":p?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:d,id:n.inputId},c,{},u)},n.inputHandleKeyDown=function(e){var t=ae(e);t&&n.inputKeyDownHandlers[t]&&n.inputKeyDownHandlers[t].call(F(n),e)},n.inputHandleChange=function(e){n.internalSetState({type:11,isOpen:!0,inputValue:e.target.value,highlightedIndex:n.props.defaultHighlightedIndex})},n.inputHandleBlur=function(){n.internalSetTimeout((function(){var e=n.props.environment.document&&!!n.props.environment.document.activeElement&&!!n.props.environment.document.activeElement.dataset&&n.props.environment.document.activeElement.dataset.toggle&&n._rootNode&&n._rootNode.contains(n.props.environment.document.activeElement);n.isMouseDown||e||n.reset({type:10})}))},n.menuRef=function(e){n._menuNode=e},n.getMenuProps=function(e,t){var r,o=void 0===e?{}:e,i=o.refKey,a=void 0===i?"ref":i,u=o.ref,c=U(o,["refKey","ref"]),s=(void 0===t?{}:t).suppressRefError,l=void 0!==s&&s;return n.getMenuProps.called=!0,n.getMenuProps.refKey=a,n.getMenuProps.suppressRefError=l,K(((r={})[a]=Z(u,n.menuRef),r.role="listbox",r["aria-labelledby"]=c&&c["aria-label"]?null:n.labelId,r.id=n.menuId,r),c)},n.getItemProps=function(e){var t,r=void 0===e?{}:e,o=r.onMouseMove,i=r.onMouseDown,a=r.onClick,u=(r.onPress,r.index),c=r.item,s=void 0===c?void 0:c,l=U(r,["onMouseMove","onMouseDown","onClick","onPress","index","item"]);void 0===u?(n.items.push(s),u=n.items.indexOf(s)):n.items[u]=s;var d=a,p=((t={onMouseMove:Q(o,(function(){u!==n.getState().highlightedIndex&&(n.setHighlightedIndex(u,{type:2}),n.avoidScrolling=!0,n.internalSetTimeout((function(){return n.avoidScrolling=!1}),250))})),onMouseDown:Q(i,(function(e){e.preventDefault()}))}).onClick=Q(d,(function(){n.selectItemAtIndex(u,{type:9})})),t),f=l.disabled?{onMouseDown:p.onMouseDown}:p;return K({id:n.getItemId(u),role:"option","aria-selected":n.getState().highlightedIndex===u},f,{},l)},n.clearItems=function(){n.items=[]},n.reset=function(e,t){void 0===e&&(e={}),e=ie(e),n.internalSetState((function(t){var r=t.selectedItem;return K({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,inputValue:n.props.itemToString(r)},e)}),t)},n.toggleMenu=function(e,t){void 0===e&&(e={}),e=ie(e),n.internalSetState((function(t){var r=t.isOpen;return K({isOpen:!r},r&&{highlightedIndex:n.props.defaultHighlightedIndex},{},e)}),(function(){var r=n.getState(),o=r.isOpen,i=r.highlightedIndex;o&&n.getItemCount()>0&&"number"==typeof i&&n.setHighlightedIndex(i,e),q(t)()}))},n.openMenu=function(e){n.internalSetState({isOpen:!0},e)},n.closeMenu=function(e){n.internalSetState({isOpen:!1},e)},n.updateStatus=J((function(){var e=n.getState(),t=n.items[e.highlightedIndex],r=n.getItemCount(),o=n.props.getA11yStatusMessage(K({itemToString:n.props.itemToString,previousResultCount:n.previousResultCount,resultCount:r,highlightedItem:t},e));n.previousResultCount=r,se(o,n.props.environment.document)}),200);var r=n.props,o=r.defaultHighlightedIndex,i=r.initialHighlightedIndex,a=void 0===i?o:i,u=r.defaultIsOpen,c=r.initialIsOpen,s=void 0===c?u:c,l=r.initialInputValue,d=void 0===l?"":l,p=r.initialSelectedItem,f=void 0===p?null:p,h=n.getState({highlightedIndex:a,isOpen:s,inputValue:d,selectedItem:f});return null!=h.selectedItem&&void 0===n.props.initialInputValue&&(h.inputValue=n.props.itemToString(h.selectedItem)),n.state=h,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=r.prototype;return o.internalClearTimeouts=function(){this.timeoutIds.forEach((function(e){clearTimeout(e)})),this.timeoutIds=[]},o.getState=function(e){var t=this;return void 0===e&&(e=this.state),Object.keys(e).reduce((function(n,r){return n[r]=t.isControlledProp(r)?t.props[r]:e[r],n}),{})},o.isControlledProp=function(e){return void 0!==this.props[e]},o.getItemCount=function(){var e=this.items.length;return null!=this.itemCount?e=this.itemCount:void 0!==this.props.itemCount&&(e=this.props.itemCount),e},o.getItemNodeFromIndex=function(e){return this.props.environment.document.getElementById(this.getItemId(e))},o.scrollHighlightedItemIntoView=function(){var e=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(e,this._menuNode)},o.moveHighlightedIndex=function(e,t){var n=this.getItemCount();if(n>0){var r=ue(e,this.getState().highlightedIndex,n);this.setHighlightedIndex(r,t)}},o.highlightFirstOrLastIndex=function(e,t,n){var r=this.getItemCount()-1;r<0||!this.getState().isOpen||(e.preventDefault(),this.setHighlightedIndex(t?0:r,n))},o.getStateAndHelpers=function(){var e=this.getState(),t=e.highlightedIndex,n=e.inputValue,r=e.selectedItem,o=e.isOpen,i=this.props.itemToString,a=this.id,u=this.getRootProps,c=this.getToggleButtonProps,s=this.getLabelProps,l=this.getMenuProps,d=this.getInputProps,p=this.getItemProps,f=this.openMenu,h=this.closeMenu,m=this.toggleMenu,v=this.selectItem,g=this.selectItemAtIndex,y=this.selectHighlightedItem,b=this.setHighlightedIndex,I=this.clearSelection,w=this.clearItems;return{getRootProps:u,getToggleButtonProps:c,getLabelProps:s,getMenuProps:l,getInputProps:d,getItemProps:p,reset:this.reset,openMenu:f,closeMenu:h,toggleMenu:m,selectItem:v,selectItemAtIndex:g,selectHighlightedItem:y,setHighlightedIndex:b,clearSelection:I,clearItems:w,setItemCount:this.setItemCount,unsetItemCount:this.unsetItemCount,setState:this.internalSetState,itemToString:i,id:a,highlightedIndex:t,inputValue:n,isOpen:o,selectedItem:r}},o.componentDidMount=function(){var e=this;var t=function(t,n){void 0===n&&(n=!0);var r=e.props.environment.document;return[e._rootNode,e._menuNode].some((function(e){return e&&(G(e,t)||n&&G(e,r.activeElement))}))},n=function(){e.isMouseDown=!0},r=function(n){e.isMouseDown=!1,!t(n.target)&&e.getState().isOpen&&e.reset({type:1},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},o=function(){e.isTouchMove=!1},i=function(){e.isTouchMove=!0},a=function(n){var r=t(n.target,!1);e.isTouchMove||r||!e.getState().isOpen||e.reset({type:16},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},u=this.props.environment;u.addEventListener("mousedown",n),u.addEventListener("mouseup",r),u.addEventListener("touchstart",o),u.addEventListener("touchmove",i),u.addEventListener("touchend",a),this.cleanup=function(){e.internalClearTimeouts(),e.updateStatus.cancel(),u.removeEventListener("mousedown",n),u.removeEventListener("mouseup",r),u.removeEventListener("touchstart",o),u.removeEventListener("touchmove",i),u.removeEventListener("touchend",a)}},o.shouldScroll=function(e,t){var n=(void 0===this.props.highlightedIndex?this.getState():this.props).highlightedIndex,r=(void 0===t.highlightedIndex?e:t).highlightedIndex;return n&&this.getState().isOpen&&!e.isOpen||n!==r},o.componentDidUpdate=function(e,t){this.isControlledProp("selectedItem")&&this.props.selectedItemChanged(e.selectedItem,this.props.selectedItem)&&this.internalSetState({type:15,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(t,e)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},o.componentWillUnmount=function(){this.cleanup()},o.render=function(){var e=te(this.props.children,Y);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var t=te(e(this.getStateAndHelpers()));return t?this.getRootProps.called||this.props.suppressRefError?t:ne(t)?Object(s.cloneElement)(t,this.getRootProps(re(t))):void 0:null},r}(s.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:ee,itemToString:function(e){return null==e?"":String(e)},onStateChange:Y,onInputValueChange:Y,onUserAction:Y,onChange:Y,onSelect:Y,onOuterClick:Y,selectedItemChanged:function(e,t){return e!==t},environment:"undefined"==typeof window?{}:window,stateReducer:function(e,t){return t},suppressRefError:!1,scrollIntoView:X},e.stateChangeTypes=de,e}();p.a.array.isRequired,p.a.func,p.a.func,p.a.func,p.a.bool,p.a.number,p.a.number,p.a.number,p.a.bool,p.a.bool,p.a.bool,p.a.any,p.a.any,p.a.any,p.a.string,p.a.string,p.a.string,p.a.func,p.a.string,p.a.func,p.a.func,p.a.func,p.a.func,p.a.func,p.a.shape({addEventListener:p.a.func,removeEventListener:p.a.func,document:p.a.shape({getElementById:p.a.func,activeElement:p.a.any,body:p.a.any})});"undefined"==typeof window||window;var fe=pe;function he(){return(he=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function me(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function ve(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ge(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ge(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ye=function(e){var t=e.listId,n=e.apiKey,o=e.onChange,i=ve(Object(r.useState)([]),2),u=i[0],s=i[1],l=ve(Object(r.useState)(!1),2),d=l[0],p=l[1],f=ve(Object(r.useState)({controller:null}),2),h=f[0].controller,m=f[1],v=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h&&h.abort(),p(!0),"AbortController"in window&&(h=new AbortController,m({controller:h})),(t=new FormData).append("api_key",n),t.append("action","blocksy_ext_mailchimp_maybe_get_lists"),e.prev=6,e.next=9,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",signal:h.signal,body:t});case 9:if(200!==(r=e.sent).status){e.next=19;break}return e.next=13,r.json();case 13:if(!(o=e.sent).success){e.next=19;break}if("api_key_invalid"===o.data.result){e.next=19;break}return p(!1),s(o.data.result),e.abrupt("return");case 19:e.next=23;break;case 21:e.prev=21,e.t0=e.catch(6);case 23:s([]),p(!1);case 25:case"end":return e.stop()}}),e,null,[[6,21]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){me(i,r,o,a,u,"next",e)}function u(e){me(i,r,o,a,u,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.useEffect)((function(){n&&-1!==n.indexOf("-")?v():s([])}),[n]),0===u.length?Object(r.createElement)("div",{className:"ct-select-input"},Object(r.createElement)("input",{disabled:!0,placeholder:d?Object(a.__)("Loading","blc"):Object(a.__)("Invalid API Key...","blc")})):Object(r.createElement)(fe,{selectedItem:t||"",onChange:function(e){return o(e)},itemToString:function(e){return e?(u.find((function(t){return t.id===e}))||{}).name:""}},(function(e){var t=e.getInputProps,n=e.getItemProps,o=(e.getLabelProps,e.getMenuProps),i=e.isOpen,s=(e.inputValue,e.highlightedIndex),l=e.selectedItem,d=e.openMenu;return Object(r.createElement)("div",{className:"ct-select-input"},Object(r.createElement)("input",he({},t({onFocus:function(){return d()},onClick:function(){return d()}}),{placeholder:Object(a.__)("Select list...","blc"),readOnly:!0})),i&&Object(r.createElement)("div",o({className:"ct-select-dropdown"}),u.map((function(e,t){return Object(r.createElement)("div",n({key:e.id,index:t,item:e.id,className:c()("ct-select-dropdown-item",{active:s===t,selected:l===e.id})}),e.name)}))))}))};function be(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function Ie(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return we(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return we(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function we(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Oe=function(e){var t=e.extension,n=e.isEditingCredentials,o=e.setIsEditingCredentials,i=e.onCredentialsValidated,u=Ie(Object(r.useState)(t.data.api_key),2),s=u[0],l=u[1],d=Ie(Object(r.useState)(t.data.list_id),2),p=d[0],f=d[1],h=Ie(Object(r.useState)(!1),2),m=h[0],v=h[1],g=Ie(Object(r.useState)(!1),2),y=g[0],b=g[1],I=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).append("api_key",s),t.append("list_id",p),t.append("action","blocksy_ext_mailchimp_maybe_save_credentials"),v(!0),e.prev=5,e.next=8,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 8:if(200!==(n=e.sent).status){e.next=14;break}return e.next=12,n.json();case 12:(r=e.sent).success&&"api_key_invalid"!==r.data.result&&(i(),b(!1));case 14:b(!0),e.next=20;break;case 17:e.prev=17,e.t0=e.catch(5),b(!0);case 20:return e.next=22,new Promise((function(e){return setTimeout((function(){return e()}),1e3)}));case 22:v(!1);case 23:case"end":return e.stop()}}),e,null,[[5,17]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){be(i,r,o,a,u,"next",e)}function u(e){be(i,r,o,a,u,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.createElement)(H,{items:n,onDismiss:function(){return o(!1)},className:"ct-mailchimp-modal",render:function(){return Object(r.createElement)("div",{className:c()("ct-modal-content",{"ct-key-invalid":y})},Object(r.createElement)("h2",null,Object(a.__)("API Credentials","blc")),Object(r.createElement)("p",{dangerouslySetInnerHTML:{__html:Object(a.sprintf)(Object(a.__)("Enter your Mailchimp API credentials in the form below. More info on how to generate an API key can be found %shere%s.","blc"),'<a target="_blank" href="https://mailchimp.com/help/about-api-keys/">',"</a>")}}),null,Object(r.createElement)("div",{className:"mailchimp-credentials"},Object(r.createElement)("section",null,Object(r.createElement)("label",null,Object(a.__)("API Key","blc")),Object(r.createElement)("div",{className:"ct-option-input"},Object(r.createElement)("input",{type:"text",onChange:function(e){var t=e.target.value;return l(t)},value:s||""}))),Object(r.createElement)("section",null,Object(r.createElement)("label",null,Object(a.__)("List ID","blc")),Object(r.createElement)(ye,{listId:p,onChange:function(e){return f(e)},apiKey:s})),Object(r.createElement)("section",null,Object(r.createElement)("label",null," "),Object(r.createElement)("button",{className:"ct-button","data-button":"blue",disabled:!s||!p||m,onClick:function(){return I()}},m?Object(a.__)("Loading...","blc"):t.__object?Object(a.__)("Save Settings","blc"):Object(a.__)("Activate","blc")))))}})};function Se(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)}function xe(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Se(i,r,o,a,u,"next",e)}function u(e){Se(i,r,o,a,u,"throw",e)}a(void 0)}))}}function Ee(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return je(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return je(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function je(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ce=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=Object(r.useState)(!1),o=Ee(n,2),i=o[0],u=o[1],c=Object(r.useState)(!1),s=Ee(c,2),l=s[0],d=s[1],p=function(){var n=xe(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return(r=new FormData).append("ext",e.name),r.append("action",e.__object?"blocksy_extension_deactivate":"blocksy_extension_activate"),u(!0),n.prev=4,n.next=7,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:r});case 7:t(),n.next=12;break;case 10:n.prev=10,n.t0=n.catch(4);case 12:u(!1);case 13:case"end":return n.stop()}}),n,null,[[4,10]])})));return function(){return n.apply(this,arguments)}}(),f=function(){e.__object||e.data.api_key?p():d(!0)};return[i,f,Object(r.createElement)(r.Fragment,null,e.__object&&e.data.api_key&&Object(r.createElement)("button",{className:"ct-button ct-config-btn","data-button":"white",title:"Edit Credentials",onClick:function(){return d(!0)}},Object(a.__)("Configure","blc")),Object(r.createElement)(Oe,{isEditingCredentials:l,setIsEditingCredentials:d,extension:e,onCredentialsValidated:function(){e.__object||p(),d(!1)}}))]};function _e(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Pe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pe(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ae=function(e){var t=e.extension,n=e.onExtsSync,o=_e(Ce(t,(function(){n()})),3),i=o[0],u=o[1],s=o[2],l=_e(L(t),2),d=l[0],p=l[1];return Object(r.createElement)("li",{className:c()({active:!!t.__object})},Object(r.createElement)("h4",{className:"ct-extension-title"},t.config.name,i&&Object(r.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 100 100"},Object(r.createElement)("g",{transform:"translate(50,50)"},Object(r.createElement)("g",{transform:"scale(1)"},Object(r.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"#687c93"}),Object(r.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},Object(r.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"})))))),t.config.description&&Object(r.createElement)("div",{className:"ct-extension-description"},t.config.description),Object(r.createElement)("div",{className:"ct-extension-actions"},Object(r.createElement)("button",{className:c()(t.__object?"ct-button":"ct-button-primary"),"data-button":"white",disabled:i,onClick:function(){return u()}},t.__object?Object(a.__)("Deactivate","blc"):Object(a.__)("Activate","blc")),s,t.readme&&Object(r.createElement)("button",{onClick:function(){return d()},"data-button":"white",className:"ct-minimal-button ct-instruction"},Object(r.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M12,2C6.477,2,2,6.477,2,12s4.477,10,10,10s10-4.477,10-10S17.523,2,12,2z M12,17L12,17c-0.552,0-1-0.448-1-1v-4 c0-0.552,0.448-1,1-1h0c0.552,0,1,0.448,1,1v4C13,16.552,12.552,17,12,17z M12.5,9h-1C11.224,9,11,8.776,11,8.5v-1 C11,7.224,11.224,7,11.5,7h1C12.776,7,13,7.224,13,7.5v1C13,8.776,12.776,9,12.5,9z"})))),p)};i.a.on("ct:extensions:card",(function(e){var t=e.CustomComponent;"mailchimp"===e.extension.name&&(t.extension=Ae)}))}]);
framework/extensions/mailchimp/dashboard-static/js/EditCredentials.js CHANGED
@@ -10,6 +10,7 @@ import classnames from 'classnames'
10
  import { __, sprintf } from 'ct-i18n'
11
  import ListPicker from './ListPicker'
12
  import Overlay from '../../../../../static/js/helpers/Overlay'
 
13
 
14
  const EditCredentials = ({
15
  extension,
@@ -66,20 +67,16 @@ const EditCredentials = ({
66
  className={'ct-mailchimp-modal'}
67
  render={() => (
68
  <div
69
- className={classnames(
70
- 'ct-modal-content',
71
- {
72
- 'ct-key-invalid': isApiKeyInvalid,
73
- }
74
- )}>
75
-
76
- <h2>{__('MailChimp Credentials', 'blc')}</h2>
77
 
78
  <p
79
  dangerouslySetInnerHTML={{
80
  __html: sprintf(
81
  __(
82
- 'Enter your MailChimp credentials in the form below. More info on how to generate an API key can be found %shere%s.',
83
  'blc'
84
  ),
85
  '<a target="_blank" href="https://mailchimp.com/help/about-api-keys/">',
@@ -88,6 +85,29 @@ const EditCredentials = ({
88
  }}
89
  />
90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  <div className="mailchimp-credentials">
92
  <section>
93
  <label>{__('API Key', 'blc')}</label>
10
  import { __, sprintf } from 'ct-i18n'
11
  import ListPicker from './ListPicker'
12
  import Overlay from '../../../../../static/js/helpers/Overlay'
13
+ import { Select } from 'blocksy-options'
14
 
15
  const EditCredentials = ({
16
  extension,
67
  className={'ct-mailchimp-modal'}
68
  render={() => (
69
  <div
70
+ className={classnames('ct-modal-content', {
71
+ 'ct-key-invalid': isApiKeyInvalid,
72
+ })}>
73
+ <h2>{__('API Credentials', 'blc')}</h2>
 
 
 
 
74
 
75
  <p
76
  dangerouslySetInnerHTML={{
77
  __html: sprintf(
78
  __(
79
+ 'Enter your Mailchimp API credentials in the form below. More info on how to generate an API key can be found %shere%s.',
80
  'blc'
81
  ),
82
  '<a target="_blank" href="https://mailchimp.com/help/about-api-keys/">',
85
  }}
86
  />
87
 
88
+ {null && (
89
+ <Fragment>
90
+ <h4>{__('Pick service', 'blc')}</h4>
91
+
92
+ <Select
93
+ onChange={(copy) => {}}
94
+ option={{
95
+ placeholder: __(
96
+ 'Pick Mailing Service',
97
+ 'blocksy'
98
+ ),
99
+ choices: [
100
+ {
101
+ key: 'mailchimp',
102
+ value: 'Mailchimp',
103
+ },
104
+ ],
105
+ }}
106
+ value={'mailchimp'}
107
+ />
108
+ </Fragment>
109
+ )}
110
+
111
  <div className="mailchimp-credentials">
112
  <section>
113
  <label>{__('API Key', 'blc')}</label>
framework/extensions/mailchimp/dashboard-static/js/ListPicker.js CHANGED
@@ -3,7 +3,7 @@ import {
3
  Component,
4
  useEffect,
5
  useState,
6
- Fragment
7
  } from '@wordpress/element'
8
  import Downshift from 'downshift'
9
  import { __ } from 'ct-i18n'
@@ -14,7 +14,7 @@ const ListPicker = ({ listId, apiKey, onChange }) => {
14
  const [isLoadingLists, setListsLoading] = useState(false)
15
 
16
  let [{ controller }, setAbortState] = useState({
17
- controller: null
18
  })
19
 
20
  const maybeFetchLists = async () => {
@@ -28,7 +28,7 @@ const ListPicker = ({ listId, apiKey, onChange }) => {
28
  controller = new AbortController()
29
 
30
  setAbortState({
31
- controller
32
  })
33
  }
34
 
@@ -41,7 +41,7 @@ const ListPicker = ({ listId, apiKey, onChange }) => {
41
  const response = await fetch(ctDashboardLocalizations.ajax_url, {
42
  method: 'POST',
43
  signal: controller.signal,
44
- body
45
  })
46
  if (response.status === 200) {
47
  const body = await response.json()
@@ -89,8 +89,8 @@ const ListPicker = ({ listId, apiKey, onChange }) => {
89
  ) : (
90
  <Downshift
91
  selectedItem={listId || ''}
92
- onChange={selection => onChange(selection)}
93
- itemToString={item =>
94
  item ? (lists.find(({ id }) => id === item) || {}).name : ''
95
  }>
96
  {({
@@ -102,13 +102,13 @@ const ListPicker = ({ listId, apiKey, onChange }) => {
102
  inputValue,
103
  highlightedIndex,
104
  selectedItem,
105
- openMenu
106
  }) => (
107
  <div className="ct-select-input">
108
  <input
109
  {...getInputProps({
110
  onFocus: () => openMenu(),
111
- onClick: () => openMenu()
112
  })}
113
  placeholder={__('Select list...', 'blc')}
114
  readOnly
@@ -117,7 +117,7 @@ const ListPicker = ({ listId, apiKey, onChange }) => {
117
  {isOpen && (
118
  <div
119
  {...getMenuProps({
120
- className: 'ct-select-dropdown'
121
  })}>
122
  {lists.map((item, index) => (
123
  <div
@@ -131,9 +131,9 @@ const ListPicker = ({ listId, apiKey, onChange }) => {
131
  active:
132
  highlightedIndex === index,
133
  selected:
134
- selectedItem === item.id
135
  }
136
- )
137
  })}>
138
  {item.name}
139
  </div>
3
  Component,
4
  useEffect,
5
  useState,
6
+ Fragment,
7
  } from '@wordpress/element'
8
  import Downshift from 'downshift'
9
  import { __ } from 'ct-i18n'
14
  const [isLoadingLists, setListsLoading] = useState(false)
15
 
16
  let [{ controller }, setAbortState] = useState({
17
+ controller: null,
18
  })
19
 
20
  const maybeFetchLists = async () => {
28
  controller = new AbortController()
29
 
30
  setAbortState({
31
+ controller,
32
  })
33
  }
34
 
41
  const response = await fetch(ctDashboardLocalizations.ajax_url, {
42
  method: 'POST',
43
  signal: controller.signal,
44
+ body,
45
  })
46
  if (response.status === 200) {
47
  const body = await response.json()
89
  ) : (
90
  <Downshift
91
  selectedItem={listId || ''}
92
+ onChange={(selection) => onChange(selection)}
93
+ itemToString={(item) =>
94
  item ? (lists.find(({ id }) => id === item) || {}).name : ''
95
  }>
96
  {({
102
  inputValue,
103
  highlightedIndex,
104
  selectedItem,
105
+ openMenu,
106
  }) => (
107
  <div className="ct-select-input">
108
  <input
109
  {...getInputProps({
110
  onFocus: () => openMenu(),
111
+ onClick: () => openMenu(),
112
  })}
113
  placeholder={__('Select list...', 'blc')}
114
  readOnly
117
  {isOpen && (
118
  <div
119
  {...getMenuProps({
120
+ className: 'ct-select-dropdown',
121
  })}>
122
  {lists.map((item, index) => (
123
  <div
131
  active:
132
  highlightedIndex === index,
133
  selected:
134
+ selectedItem === item.id,
135
  }
136
+ ),
137
  })}>
138
  {item.name}
139
  </div>
framework/extensions/mailchimp/dashboard-static/js/Mailchimp.js CHANGED
@@ -3,7 +3,7 @@ import {
3
  Component,
4
  useEffect,
5
  useState,
6
- Fragment
7
  } from '@wordpress/element'
8
  import { __ } from 'ct-i18n'
9
  import classnames from 'classnames'
3
  Component,
4
  useEffect,
5
  useState,
6
+ Fragment,
7
  } from '@wordpress/element'
8
  import { __ } from 'ct-i18n'
9
  import classnames from 'classnames'
framework/extensions/mailchimp/dashboard-static/js/main.js CHANGED
@@ -3,7 +3,7 @@ import {
3
  Component,
4
  useEffect,
5
  useState,
6
- Fragment
7
  } from '@wordpress/element'
8
  import ctEvents from 'ct-events'
9
 
3
  Component,
4
  useEffect,
5
  useState,
6
+ Fragment,
7
  } from '@wordpress/element'
8
  import ctEvents from 'ct-events'
9
 
framework/extensions/mailchimp/extension.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
- require_once dirname( __FILE__ ) . '/helpers.php';
4
- require_once dirname( __FILE__ ) . '/mailchimp-manager.php';
5
 
6
  class BlocksyExtensionMailchimp {
7
  public function __construct() {
@@ -13,7 +13,7 @@ class BlocksyExtensionMailchimp {
13
  }, 10, 3);
14
 
15
  add_filter('blocksy-options-scripts-dependencies', function ($d) {
16
- $d[] = 'blocksy-ext-mailchimp-admin-scripts';
17
  return $d;
18
  });
19
 
@@ -25,7 +25,7 @@ class BlocksyExtensionMailchimp {
25
  $data = get_plugin_data(BLOCKSY__FILE__);
26
 
27
  wp_register_script(
28
- 'blocksy-ext-mailchimp-admin-scripts',
29
  BLOCKSY_URL . 'framework/extensions/mailchimp/admin-static/bundle/main.js',
30
  [],
31
  $data['Version'],
@@ -33,8 +33,8 @@ class BlocksyExtensionMailchimp {
33
  );
34
 
35
  wp_localize_script(
36
- 'blocksy-ext-mailchimp-admin-scripts',
37
- 'blocksy_ext_mailchimp_localization',
38
  [
39
  'public_url' => BLOCKSY_URL . 'framework/extensions/mailchimp/admin-static/bundle/',
40
  ]
@@ -49,7 +49,7 @@ class BlocksyExtensionMailchimp {
49
  $data = get_plugin_data(BLOCKSY__FILE__);
50
 
51
  wp_register_script(
52
- 'blocksy-ext-mailchimp-admin-scripts',
53
  BLOCKSY_URL . 'framework/extensions/mailchimp/admin-static/bundle/main.js',
54
  [],
55
  $data['Version'],
@@ -57,8 +57,8 @@ class BlocksyExtensionMailchimp {
57
  );
58
 
59
  wp_localize_script(
60
- 'blocksy-ext-mailchimp-admin-scripts',
61
- 'blocksy_ext_mailchimp_localization',
62
  [
63
  'public_url' => BLOCKSY_URL . 'framework/extensions/mailchimp/admin-static/bundle/',
64
  ]
@@ -77,14 +77,14 @@ class BlocksyExtensionMailchimp {
77
  }
78
 
79
  wp_enqueue_style(
80
- 'blocksy-ext-mailchimp-styles',
81
  BLOCKSY_URL . 'framework/extensions/mailchimp/static/bundle/main.css',
82
  ['ct-main-styles'],
83
  $data['Version']
84
  );
85
 
86
  wp_enqueue_script(
87
- 'blocksy-ext-mailchimp-scripts',
88
  BLOCKSY_URL . 'framework/extensions/mailchimp/static/bundle/main.js',
89
  [],
90
  $data['Version'],
@@ -130,7 +130,7 @@ class BlocksyExtensionMailchimp {
130
  $data = get_plugin_data(BLOCKSY__FILE__);
131
 
132
  wp_enqueue_script(
133
- 'blocksy-mailchimp-customizer-sync',
134
  BLOCKSY_URL . 'framework/extensions/mailchimp/admin-static/bundle/sync.js',
135
  [ 'customize-preview', 'ct-events' ],
136
  $data['Version'],
1
  <?php
2
 
3
+ require_once dirname(__FILE__) . '/helpers.php';
4
+ require_once dirname(__FILE__) . '/mailchimp-manager.php';
5
 
6
  class BlocksyExtensionMailchimp {
7
  public function __construct() {
13
  }, 10, 3);
14
 
15
  add_filter('blocksy-options-scripts-dependencies', function ($d) {
16
+ $d[] = 'blocksy-ext-newsletter-subscribe-admin-scripts';
17
  return $d;
18
  });
19
 
25
  $data = get_plugin_data(BLOCKSY__FILE__);
26
 
27
  wp_register_script(
28
+ 'blocksy-ext-newsletter-subscribe-admin-scripts',
29
  BLOCKSY_URL . 'framework/extensions/mailchimp/admin-static/bundle/main.js',
30
  [],
31
  $data['Version'],
33
  );
34
 
35
  wp_localize_script(
36
+ 'blocksy-ext-newsletter-subscribe-admin-scripts',
37
+ 'blocksy_ext_newsletter_subscribe_localization',
38
  [
39
  'public_url' => BLOCKSY_URL . 'framework/extensions/mailchimp/admin-static/bundle/',
40
  ]
49
  $data = get_plugin_data(BLOCKSY__FILE__);
50
 
51
  wp_register_script(
52
+ 'blocksy-ext-newsletter-subscribe-admin-scripts',
53
  BLOCKSY_URL . 'framework/extensions/mailchimp/admin-static/bundle/main.js',
54
  [],
55
  $data['Version'],
57
  );
58
 
59
  wp_localize_script(
60
+ 'blocksy-ext-newsletter-subscribe-admin-scripts',
61
+ 'blocksy_ext_newsletter_subscribe_localization',
62
  [
63
  'public_url' => BLOCKSY_URL . 'framework/extensions/mailchimp/admin-static/bundle/',
64
  ]
77
  }
78
 
79
  wp_enqueue_style(
80
+ 'blocksy-ext-newsletter-subscribe-styles',
81
  BLOCKSY_URL . 'framework/extensions/mailchimp/static/bundle/main.css',
82
  ['ct-main-styles'],
83
  $data['Version']
84
  );
85
 
86
  wp_enqueue_script(
87
+ 'blocksy-ext-newsletter-subscribe-scripts',
88
  BLOCKSY_URL . 'framework/extensions/mailchimp/static/bundle/main.js',
89
  [],
90
  $data['Version'],
130
  $data = get_plugin_data(BLOCKSY__FILE__);
131
 
132
  wp_enqueue_script(
133
+ 'blocksy-newsletter-subscribe-customizer-sync',
134
  BLOCKSY_URL . 'framework/extensions/mailchimp/admin-static/bundle/sync.js',
135
  [ 'customize-preview', 'ct-events' ],
136
  $data['Version'],
framework/extensions/mailchimp/pre-boot.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- require_once dirname( __FILE__ ) . '/mailchimp-manager.php';
4
 
5
  class BlocksyExtensionMailchimpPreBoot {
6
  public function __construct() {
1
  <?php
2
 
3
+ require_once dirname(__FILE__) . '/mailchimp-manager.php';
4
 
5
  class BlocksyExtensionMailchimpPreBoot {
6
  public function __construct() {
framework/extensions/mailchimp/static/bundle/main.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.7.47
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.7.50
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
framework/extensions/mailchimp/static/js/main.js CHANGED
@@ -4,13 +4,13 @@ onDocumentLoaded(() => {
4
  ;[
5
  ...document.querySelectorAll(
6
  '.ct-mailchimp-widget-form, .ct-mailchimp-block-form'
7
- )
8
- ].map(el => {
9
  if (el.matches('[data-skip-submit]')) {
10
  return
11
  }
12
 
13
- el.addEventListener('submit', e => {
14
  e.preventDefault()
15
  const form = e.target
16
 
4
  ;[
5
  ...document.querySelectorAll(
6
  '.ct-mailchimp-widget-form, .ct-mailchimp-block-form'
7
+ ),
8
+ ].map((el) => {
9
  if (el.matches('[data-skip-submit]')) {
10
  return
11
  }
12
 
13
+ el.addEventListener('submit', (e) => {
14
  e.preventDefault()
15
  const form = e.target
16
 
framework/extensions/product-reviews/config.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $config = [
4
+ 'name' => __('Product Reviews', 'blc'),
5
+ 'description' => __('A custom post type specially designed for creating product reviews.', 'blc'),
6
+ 'require_refresh' => true
7
+
8
+ // 'hidden' => true
9
+ ];
10
+
11
+
12
+
framework/extensions/{affiliate-marketing → product-reviews}/extension.php RENAMED
@@ -2,12 +2,12 @@
2
 
3
  require_once dirname(__FILE__) . '/helpers.php';
4
 
5
- class BlocksyExtensionAffiliateMarketing {
6
  public function __construct() {
7
  add_filter(
8
  'blocksy:options:cpt:page-title-args',
9
  function ($args, $cpt) {
10
- if ($cpt === 'blc-aff-product') {
11
  $args['has_hero_type'] = false;
12
  }
13
 
@@ -16,15 +16,13 @@ class BlocksyExtensionAffiliateMarketing {
16
  10, 2
17
  );
18
 
19
- add_action(
20
- 'init', [$this, 'declare_cpt']
21
- );
22
 
23
  add_action('load-post.php', [$this, 'init_metabox']);
24
  add_action('load-post-new.php', [$this, 'init_metabox']);
25
 
26
  add_filter('blocksy:single:has-default-hero', function ($def) {
27
- if (! is_singular('blc-aff-product')) {
28
  return $def;
29
  }
30
 
@@ -34,7 +32,7 @@ class BlocksyExtensionAffiliateMarketing {
34
  add_filter(
35
  'blocksy:hero:type-1:default-alignment',
36
  function ($default, $prefix) {
37
- if ($prefix === 'blc-aff-product_single') {
38
  return 'center';
39
  }
40
 
@@ -44,17 +42,17 @@ class BlocksyExtensionAffiliateMarketing {
44
  );
45
 
46
  add_filter('blocksy:archive:render-card-layers', function ($layers, $prefix) {
47
- if ($prefix !== 'blc-aff-product_archive') {
48
  return $layers;
49
  }
50
 
51
- $layers['overall_score'] = blocksy_get_aff_product_overall_score();
52
 
53
  return $layers;
54
  }, 10, 2);
55
 
56
  add_filter('blocksy:posts-listing:archive-order:default', function ($default, $prefix) {
57
- if ($prefix !== 'blc-aff-product_archive') {
58
  return $default;
59
  }
60
 
@@ -67,7 +65,7 @@ class BlocksyExtensionAffiliateMarketing {
67
  }, 10, 2);
68
 
69
  add_filter('blocksy:options:posts-listing-archive-order', function ($option, $prefix) {
70
- if ($prefix !== 'blc-aff-product_archive') {
71
  return $option;
72
  }
73
 
@@ -98,7 +96,7 @@ class BlocksyExtensionAffiliateMarketing {
98
  add_action(
99
  'blocksy:content:top',
100
  function () {
101
- if (! is_singular('blc-aff-product')) {
102
  return;
103
  }
104
 
@@ -122,8 +120,8 @@ class BlocksyExtensionAffiliateMarketing {
122
  }
123
 
124
  wp_enqueue_style(
125
- 'blocksy-ext-affiliate-marketing-styles',
126
- BLOCKSY_URL . 'framework/extensions/affiliate-marketing/static/bundle/main.css',
127
  ['ct-main-styles'],
128
  $data['Version']
129
  );
@@ -136,22 +134,24 @@ class BlocksyExtensionAffiliateMarketing {
136
  }
137
 
138
  public function declare_cpt() {
139
- register_post_type('blc-aff-product', [
140
- 'label' => __('Affiliate Products', 'blc'),
141
- 'description' => __( 'Affiliate Products', 'blc'),
142
- 'menu_icon' => 'dashicons-money-alt',
 
 
143
  'labels' => [
144
- 'name' => __('Affiliate Products', 'blc'),
145
- 'singular_name' => __('Affiliate Product', 'blc'),
146
- 'menu_name' => __('Affiliate Products', 'blc'),
147
- 'parent_item_colon' => __('Parent Affiliate Product', 'blc'),
148
- 'all_items' => __('All Affiliate Products', 'blc'),
149
- 'view_item' => __('View Affiliate Product', 'blc'),
150
- 'add_new_item' => __('Add New Affiliate Product', 'blc'),
151
- 'add_new' => __('Add New', 'blc'),
152
- 'edit_item' => __('Edit Affiliate Product', 'blc'),
153
- 'update_item' => __('Update Affiliate Product', 'blc'),
154
- 'search_items' => __('Search Affiliate Product', 'blc'),
155
  'not_found' => __('Not Found', 'blc'),
156
  'not_found_in_trash' => __('Not found in Trash', 'blc')
157
  ],
@@ -173,13 +173,16 @@ class BlocksyExtensionAffiliateMarketing {
173
  'exclude_from_search' => false,
174
  // 'taxonomies' => array('post_tag'),
175
  'publicly_queryable' => true,
176
- 'capability_type' => 'page'
 
 
 
177
  ]);
178
 
179
  register_taxonomy(
180
- 'blc-aff-categories',
181
  [
182
- 'blc-aff-product'
183
  ],
184
  [
185
  'hierarchical' => true,
@@ -199,7 +202,10 @@ class BlocksyExtensionAffiliateMarketing {
199
  'show_ui' => true,
200
  'show_admin_column' => true,
201
  'query_var' => true,
202
- 'rewrite' => array( 'slug' => 'blc-aff-category' ),
 
 
 
203
  ]
204
  );
205
  }
@@ -213,7 +219,7 @@ class BlocksyExtensionAffiliateMarketing {
213
  __( 'Blocksy', 'blocksy' )
214
  ),
215
  function ($post) {
216
- $values = get_post_meta($post->ID, 'blocksy_affiliate_marketing_options');
217
 
218
  if (empty($values)) {
219
  $values = [[]];
@@ -235,7 +241,7 @@ class BlocksyExtensionAffiliateMarketing {
235
  'options' => $options,
236
  'values' => $values[0],
237
  'id_prefix' => 'ct-post-meta-options',
238
- 'name_prefix' => 'blocksy_affiliate_marketing_options',
239
  'attr' => [
240
  'class' => 'ct-meta-box',
241
  'data-disable-reverse-button' => 'yes'
@@ -245,7 +251,7 @@ class BlocksyExtensionAffiliateMarketing {
245
 
246
  wp_nonce_field(basename(__FILE__), 'blocksy_settings_meta_box');
247
  },
248
- 'blc-aff-product', 'normal', 'default'
249
  );
250
  }
251
 
@@ -265,17 +271,46 @@ class BlocksyExtensionAffiliateMarketing {
265
 
266
  $values = [];
267
 
268
- if (isset($_POST['blocksy_affiliate_marketing_options'][blocksy_post_name()])) {
269
  $values = json_decode(
270
- wp_unslash($_POST['blocksy_affiliate_marketing_options'][blocksy_post_name()]),
271
  true
272
  );
273
  }
274
 
275
  update_post_meta(
276
  $post_id,
277
- 'blocksy_affiliate_marketing_options',
278
  $values
279
  );
280
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
281
  }
2
 
3
  require_once dirname(__FILE__) . '/helpers.php';
4
 
5
+ class BlocksyExtensionProductReviews {
6
  public function __construct() {
7
  add_filter(
8
  'blocksy:options:cpt:page-title-args',
9
  function ($args, $cpt) {
10
+ if ($cpt === 'blc-product-review') {
11
  $args['has_hero_type'] = false;
12
  }
13
 
16
  10, 2
17
  );
18
 
19
+ add_action('init', [$this, 'declare_cpt']);
 
 
20
 
21
  add_action('load-post.php', [$this, 'init_metabox']);
22
  add_action('load-post-new.php', [$this, 'init_metabox']);
23
 
24
  add_filter('blocksy:single:has-default-hero', function ($def) {
25
+ if (! is_singular('blc-product-review')) {
26
  return $def;
27
  }
28
 
32
  add_filter(
33
  'blocksy:hero:type-1:default-alignment',
34
  function ($default, $prefix) {
35
+ if ($prefix === 'blc-product-review_single') {
36
  return 'center';
37
  }
38
 
42
  );
43
 
44
  add_filter('blocksy:archive:render-card-layers', function ($layers, $prefix) {
45
+ if ($prefix !== 'blc-product-review_archive') {
46
  return $layers;
47
  }
48
 
49
+ $layers['overall_score'] = blocksy_get_product_review_overall_score();
50
 
51
  return $layers;
52
  }, 10, 2);
53
 
54
  add_filter('blocksy:posts-listing:archive-order:default', function ($default, $prefix) {
55
+ if ($prefix !== 'blc-product-review_archive') {
56
  return $default;
57
  }
58
 
65
  }, 10, 2);
66
 
67
  add_filter('blocksy:options:posts-listing-archive-order', function ($option, $prefix) {
68
+ if ($prefix !== 'blc-product-review_archive') {
69
  return $option;
70
  }
71
 
96
  add_action(
97
  'blocksy:content:top',
98
  function () {
99
+ if (! is_singular('blc-product-review')) {
100
  return;
101
  }
102
 
120
  }
121
 
122
  wp_enqueue_style(
123
+ 'blocksy-ext-product-reviews-styles',
124
+ BLOCKSY_URL . 'framework/extensions/product-reviews/static/bundle/main.css',
125
  ['ct-main-styles'],
126
  $data['Version']
127
  );
134
  }
135
 
136
  public function declare_cpt() {
137
+ $settings = $this->get_settings();
138
+
139
+ register_post_type('blc-product-review', [
140
+ 'label' => __('Product Reviews', 'blc'),
141
+ 'description' => __( 'Product Reviews', 'blc'),
142
+ 'menu_icon' => 'dashicons-star-filled',
143
  'labels' => [
144
+ 'name' => __('Product Reviews', 'blc'),
145
+ 'singular_name' => __('Product Review', 'blc'),
146
+ 'menu_name' => __('Product Reviews', 'blc'),
147
+ 'parent_item_colon' => __('Parent Product Review', 'blc'),
148
+ 'all_items' => __('All Reviews', 'blc'),
149
+ 'view_item' => __('View Product Review', 'blc'),
150
+ 'add_new_item' => __('Add New Product Review', 'blc'),
151
+ 'add_new' => __('Add New Review', 'blc'),
152
+ 'edit_item' => __('Edit Product Review', 'blc'),
153
+ 'update_item' => __('Update Product Review', 'blc'),
154
+ 'search_items' => __('Search Product Review', 'blc'),
155
  'not_found' => __('Not Found', 'blc'),
156
  'not_found_in_trash' => __('Not found in Trash', 'blc')
157
  ],
173
  'exclude_from_search' => false,
174
  // 'taxonomies' => array('post_tag'),
175
  'publicly_queryable' => true,
176
+ 'capability_type' => 'page',
177
+ 'rewrite' => [
178
+ 'slug' => $settings['single_slug']
179
+ ],
180
  ]);
181
 
182
  register_taxonomy(
183
+ 'blc-product-review-categories',
184
  [
185
+ 'blc-product-review'
186
  ],
187
  [
188
  'hierarchical' => true,
202
  'show_ui' => true,
203
  'show_admin_column' => true,
204
  'query_var' => true,
205
+ 'show_in_rest' => true,
206
+ 'rewrite' => [
207
+ 'slug' => $settings['category_slug']
208
+ ],
209
  ]
210
  );
211
  }
219
  __( 'Blocksy', 'blocksy' )
220
  ),
221
  function ($post) {
222
+ $values = get_post_meta($post->ID, 'blocksy_product_review_options');
223
 
224
  if (empty($values)) {
225
  $values = [[]];
241
  'options' => $options,
242
  'values' => $values[0],
243
  'id_prefix' => 'ct-post-meta-options',
244
+ 'name_prefix' => 'blocksy_product_review_options',
245
  'attr' => [
246
  'class' => 'ct-meta-box',
247
  'data-disable-reverse-button' => 'yes'
251
 
252
  wp_nonce_field(basename(__FILE__), 'blocksy_settings_meta_box');
253
  },
254
+ 'blc-product-review', 'normal', 'default'
255
  );
256
  }
257
 
271
 
272
  $values = [];
273
 
274
+ if (isset($_POST['blocksy_product_review_options'][blocksy_post_name()])) {
275
  $values = json_decode(
276
+ wp_unslash($_POST['blocksy_product_review_options'][blocksy_post_name()]),
277
  true
278
  );
279
  }
280
 
281
  update_post_meta(
282
  $post_id,
283
+ 'blocksy_product_review_options',
284
  $values
285
  );
286
  }
287
+
288
+ public function get_settings() {
289
+ if (wp_doing_ajax()) {
290
+ $maybe_input = json_decode(file_get_contents('php://input'), true);
291
+
292
+ if (
293
+ $maybe_input
294
+ &&
295
+ isset($maybe_input['extension'])
296
+ &&
297
+ $maybe_input['extension'] === 'product-reviews'
298
+ &&
299
+ isset($maybe_input['extAction'])
300
+ &&
301
+ $maybe_input['extAction']['type'] === 'persist'
302
+ ) {
303
+ return $maybe_input['extAction']['settings'];
304
+ }
305
+ }
306
+
307
+ return get_option('blocksy_ext_product_reviews_settings', [
308
+ 'single_slug' => 'product-review',
309
+ 'category_slug' => 'product-review-category',
310
+ ]);
311
+ }
312
+
313
+ public function set_settings($value) {
314
+ update_option('blocksy_ext_product_reviews_settings', $value);
315
+ }
316
  }
framework/extensions/{affiliate-marketing → product-reviews}/helpers.php RENAMED
@@ -1,13 +1,13 @@
1
  <?php
2
 
3
- function blocksy_get_aff_product_overall_score($post_id = null) {
4
  if (! $post_id) {
5
  global $post;
6
  $post_id = $post->ID;
7
  }
8
 
9
  $atts = blocksy_get_post_options($post_id, [
10
- 'meta_id' => 'blocksy_affiliate_marketing_options'
11
  ]);
12
 
13
  $scores = blocksy_akg('scores', $atts, []);
1
  <?php
2
 
3
+ function blocksy_get_product_review_overall_score($post_id = null) {
4
  if (! $post_id) {
5
  global $post;
6
  $post_id = $post->ID;
7
  }
8
 
9
  $atts = blocksy_get_post_options($post_id, [
10
+ 'meta_id' => 'blocksy_product_review_options'
11
  ]);
12
 
13
  $scores = blocksy_akg('scores', $atts, []);
framework/extensions/{affiliate-marketing → product-reviews}/metabox.php RENAMED
File without changes
framework/extensions/product-reviews/pre-boot.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class BlocksyExtensionProductReviewsPreBoot {
4
+ public function __construct() {
5
+ add_action('admin_enqueue_scripts', function () {
6
+ if (! function_exists('get_plugin_data')) {
7
+ require_once(ABSPATH . 'wp-admin/includes/plugin.php');
8
+ }
9
+
10
+ $data = get_plugin_data(BLOCKSY__FILE__);
11
+
12
+ if (! function_exists('blocksy_is_dashboard_page')) return;
13
+ if (! blocksy_is_dashboard_page()) return;
14
+
15
+ wp_enqueue_script(
16
+ 'blocksy-ext-product-reviews-admin-dashboard-scripts',
17
+ BLOCKSY_URL . 'framework/extensions/product-reviews/static/bundle/dashboard.js',
18
+ ['ct-options-scripts'],
19
+ $data['Version']
20
+ );
21
+
22
+ wp_enqueue_style(
23
+ 'blocksy-ext-product-reviews-admin-dashboard-styles',
24
+ BLOCKSY_URL . 'framework/extensions/product-reviews/static/bundle/main-admin.css',
25
+ [],
26
+ $data['Version']
27
+ );
28
+ });
29
+ }
30
+
31
+ public function ext_action($payload) {
32
+ $ext = \Blocksy\Plugin::instance()->extensions->get('product-reviews');
33
+
34
+ if (
35
+ ! isset($payload['type'])
36
+ ||
37
+ ! isset($payload['settings'])
38
+ ||
39
+ $payload['type'] !== 'persist'
40
+ ||
41
+ ! $ext
42
+ ) {
43
+ return;
44
+ }
45
+
46
+ $ext->set_settings($payload['settings']);
47
+
48
+ global $wp_rewrite;
49
+ $wp_rewrite->flush_rules();
50
+
51
+ return $this->ext_data([
52
+ 'settings' => $payload['settings']
53
+ ]);
54
+ }
55
+
56
+ public function ext_data($args = []) {
57
+ return wp_parse_args($args, [
58
+ 'settings' => get_option('blocksy_ext_product_reviews_settings', [
59
+ 'single_slug' => 'product-review',
60
+ 'category_slug' => 'product-review-category',
61
+ ])
62
+ ]);
63
+ }
64
+ }
65
+
framework/extensions/product-reviews/static/bundle/dashboard.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ !function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=12)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t,n){var r;
2
+ /*!
3
+ Copyright (c) 2017 Jed Watson.
4
+ Licensed under the MIT License (MIT), see
5
+ http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var n={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)&&r.length){var c=a.apply(null,r);c&&e.push(c)}else if("object"===o)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(r=function(){return a}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=window.blocksyOptions},function(e,t){e.exports=ctEvents},function(e,t){e.exports=window.React},function(e,t,n){var r,a,o=n(10),c=n(11),i=(a=[],{activateTrap:function(e){if(a.length>0){var t=a[a.length-1];t!==e&&t.pause()}var n=a.indexOf(e);-1===n||a.splice(n,1),a.push(e)},deactivateTrap:function(e){var t=a.indexOf(e);-1!==t&&a.splice(t,1),a.length>0&&a[a.length-1].unpause()}});function u(e){return setTimeout(e,0)}e.exports=function(e,t){var n=document,a="string"==typeof e?n.querySelector(e):e,s=c({returnFocusOnDeactivate:!0,escapeDeactivates:!0},t),l={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},f={activate:function(e){if(l.active)return;j(),l.active=!0,l.paused=!1,l.nodeFocusedBeforeActivation=n.activeElement;var t=e&&e.onActivate?e.onActivate:s.onActivate;t&&t();return d(),f},deactivate:p,pause:function(){if(l.paused||!l.active)return;l.paused=!0,m()},unpause:function(){if(!l.paused||!l.active)return;l.paused=!1,j(),d()}};return f;function p(e){if(l.active){clearTimeout(r),m(),l.active=!1,l.paused=!1,i.deactivateTrap(f);var t=e&&void 0!==e.onDeactivate?e.onDeactivate:s.onDeactivate;return t&&t(),(e&&void 0!==e.returnFocus?e.returnFocus:s.returnFocusOnDeactivate)&&u((function(){var e;w((e=l.nodeFocusedBeforeActivation,v("setReturnFocus")||e))})),f}}function d(){if(l.active)return i.activateTrap(f),r=u((function(){w(b())})),n.addEventListener("focusin",h,!0),n.addEventListener("mousedown",y,{capture:!0,passive:!1}),n.addEventListener("touchstart",y,{capture:!0,passive:!1}),n.addEventListener("click",O,{capture:!0,passive:!1}),n.addEventListener("keydown",g,{capture:!0,passive:!1}),f}function m(){if(l.active)return n.removeEventListener("focusin",h,!0),n.removeEventListener("mousedown",y,!0),n.removeEventListener("touchstart",y,!0),n.removeEventListener("click",O,!0),n.removeEventListener("keydown",g,!0),f}function v(e){var t=s[e],r=t;if(!t)return null;if("string"==typeof t&&!(r=n.querySelector(t)))throw new Error("`"+e+"` refers to no known node");if("function"==typeof t&&!(r=t()))throw new Error("`"+e+"` did not return a node");return r}function b(){var e;if(!(e=null!==v("initialFocus")?v("initialFocus"):a.contains(n.activeElement)?n.activeElement:l.firstTabbableNode||v("fallbackFocus")))throw new Error("Your focus-trap needs to have at least one focusable element");return e}function y(e){a.contains(e.target)||(s.clickOutsideDeactivates?p({returnFocus:!o.isFocusable(e.target)}):s.allowOutsideClick&&s.allowOutsideClick(e)||e.preventDefault())}function h(e){a.contains(e.target)||e.target instanceof Document||(e.stopImmediatePropagation(),w(l.mostRecentlyFocusedNode||b()))}function g(e){if(!1!==s.escapeDeactivates&&function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e))return e.preventDefault(),void p();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){if(j(),e.shiftKey&&e.target===l.firstTabbableNode)return e.preventDefault(),void w(l.lastTabbableNode);if(!e.shiftKey&&e.target===l.lastTabbableNode)e.preventDefault(),w(l.firstTabbableNode)}(e)}function O(e){s.clickOutsideDeactivates||a.contains(e.target)||s.allowOutsideClick&&s.allowOutsideClick(e)||(e.preventDefault(),e.stopImmediatePropagation())}function j(){var e=o(a);l.firstTabbableNode=e[0]||b(),l.lastTabbableNode=e[e.length-1]||b()}function w(e){e!==n.activeElement&&(e&&e.focus?(e.focus(),l.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):w(b()))}}},function(e,t,n){e.exports=n(8)()},function(e,t,n){"use strict";var r=n(9);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,c){if(c!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){var n=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],r=n.join(","),a="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function o(e,t){t=t||{};var n,o,i,u=[],f=[],p=e.querySelectorAll(r);for(t.includeContainer&&a.call(e,r)&&(p=Array.prototype.slice.apply(p)).unshift(e),n=0;n<p.length;n++)c(o=p[n])&&(0===(i=s(o))?u.push(o):f.push({documentOrder:n,tabIndex:i,node:o}));return f.sort(l).map((function(e){return e.node})).concat(u)}function c(e){return!(!i(e)||function(e){return function(e){return f(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t=function(e){for(var t=0;t<e.length;t++)if(e[t].checked)return e[t]}(e.ownerDocument.querySelectorAll('input[type="radio"][name="'+e.name+'"]'));return!t||t===e}(e)}(e)||s(e)<0)}function i(e){return!(e.disabled||function(e){return f(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}o.isTabbable=function(e){if(!e)throw new Error("No node provided");return!1!==a.call(e,r)&&c(e)},o.isFocusable=function(e){if(!e)throw new Error("No node provided");return!1!==a.call(e,u)&&i(e)};var u=n.concat("iframe").join(",");function s(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}function l(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function f(e){return"INPUT"===e.tagName}e.exports=o},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var a in r)n.call(r,a)&&(e[a]=r[a])}return e};var n=Object.prototype.hasOwnProperty},function(e,t,n){"use strict";n.r(t);var r=n(0),a=n(1),o=n(2),c=n.n(o),i=n(4),u=n.n(i),s=n(3),l=n(5),f=n.n(l);n(7);function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var m=function(e){e.initialState,e.getInitialState,e.refs,e.getRefs,e.didMount,e.didUpdate,e.willUnmount,e.getSnapshotBeforeUpdate,e.shouldUpdate,e.render;return function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["initialState","getInitialState","refs","getRefs","didMount","didUpdate","willUnmount","getSnapshotBeforeUpdate","shouldUpdate","render"])},v=function(e){function t(){var n,r;p(this,t);for(var a=arguments.length,o=Array(a),c=0;c<a;c++)o[c]=arguments[c];return n=r=d(this,e.call.apply(e,[this].concat(o))),b.call(r),d(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getArgs=function(){var e=this.state,t=this.props,n=this._setState,r=this._forceUpdate,a=this._refs;return{state:e,props:m(t),refs:a,setState:n,forceUpdate:r}},t.prototype.componentDidMount=function(){this.props.didMount&&this.props.didMount(this.getArgs())},t.prototype.shouldComponentUpdate=function(e,t){return!this.props.shouldUpdate||this.props.shouldUpdate({props:this.props,state:this.state,nextProps:m(e),nextState:t})},t.prototype.componentWillUnmount=function(){this.props.willUnmount&&this.props.willUnmount({state:this.state,props:m(this.props),refs:this._refs})},t.prototype.componentDidUpdate=function(e,t,n){this.props.didUpdate&&this.props.didUpdate(Object.assign(this.getArgs(),{prevProps:m(e),prevState:t}),n)},t.prototype.getSnapshotBeforeUpdate=function(e,t){return this.props.getSnapshotBeforeUpdate?this.props.getSnapshotBeforeUpdate(Object.assign(this.getArgs(),{prevProps:m(e),prevState:t})):null},t.prototype.render=function(){var e=this.props,t=e.children,n=e.render;return n?n(this.getArgs()):"function"==typeof t?t(this.getArgs()):t||null},t}(f.a.Component);v.defaultProps={getInitialState:function(){},getRefs:function(){return{}}};var b=function(){var e=this;this.state=this.props.initialState||this.props.getInitialState(this.props),this._refs=this.props.refs||this.props.getRefs(this.getArgs()),this._setState=function(){return e.setState.apply(e,arguments)},this._forceUpdate=function(){return e.forceUpdate.apply(e,arguments)}},y=v,h=function(e){var t=e.children,n=e.container,a=void 0===n?document.body:n,o=e.type,c=void 0===o?"reach-portal":o;return Object(r.createElement)(y,{getRefs:function(){return{node:null}},didMount:function(e){var t=e.refs,n=e.forceUpdate,r=a.hasOwnProperty("current")?a.current:a;t.node=document.createElement(c),r.appendChild(t.node),n()},willUnmount:function(e){var t=e.refs.node,n=a.hasOwnProperty("current")?a.current:a;n&&n.removeChild(t)},render:function(e){var n=e.refs.node;return n?Object(r.createPortal)(t,n):null}})};var g=function(e,t){return function(n){if(e&&e(n),!n.defaultPrevented)return t(n)}},O=n(6),j=n.n(O);function w(){return(w=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function E(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var S=function(){},x=function(){},_=function(e,t){var n,r,a;e.disposeAriaHider=(n=e.overlayNode,r=[],a=[],Array.prototype.forEach.call(document.querySelectorAll("body > *"),(function(e){if(e!==n.parentNode){var t=e.getAttribute("aria-hidden");null!==t&&"false"!==t||(r.push(t),a.push(e),e.setAttribute("aria-hidden","true"))}})),function(){a.forEach((function(e,t){var n=r[t];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)}))}),e.trap=j()(e.overlayNode,{initialFocus:t?function(){return t.current}:void 0,fallbackFocus:e.contentNode,escapeDeactivates:!1,clickOutsideDeactivates:!1})},A=function(e){var t=e.refs;t.trap.deactivate(),t.disposeAriaHider()},z=React.createContext(),C=React.forwardRef((function(e,t){var n=e.container,a=e.isOpen,o=void 0===a||a,c=e.onDismiss,i=void 0===c?S:c,u=e.initialFocusRef,s=e.onClick,l=e.onKeyDown,f=E(e,["container","isOpen","onDismiss","initialFocusRef","onClick","onKeyDown"]);return Object(r.createElement)(y,{didMount:x},o?Object(r.createElement)(h,{container:n,"data-reach-dialog-wrapper":!0},Object(r.createElement)(y,{refs:{overlayNode:null,contentNode:null},didMount:function(e){var t=e.refs;_(t,u)},willUnmount:A},(function(e){var n=e.refs;return Object(r.createElement)(z.Provider,{value:function(e){return n.contentNode=e}},Object(r.createElement)("div",w({"data-reach-dialog-overlay":!0,onClick:g(s,(function(e){e.stopPropagation(),i()})),onKeyDown:g(l,(function(e){"Escape"===e.key&&(e.stopPropagation(),i())})),ref:function(e){n.overlayNode=e,t&&t(e)}},f)))}))):null)}));C.propTypes={initialFocusRef:function(){}};var N=function(e){return e.stopPropagation()},P=React.forwardRef((function(e,t){var n=e.onClick,a=(e.onKeyDown,E(e,["onClick","onKeyDown"]));return Object(r.createElement)(z.Consumer,null,(function(e){return Object(r.createElement)("div",w({"aria-modal":"true","data-reach-dialog-content":!0,tabIndex:"-1",onClick:g(n,N),ref:function(n){e(n),t&&t(n)}},a))}))})),k=function(e){return!!e},D=function(e){var t=e.items,n=e.isVisible,a=void 0===n?k:n,o=e.render,i=e.className,u=e.onDismiss;return Object(r.createElement)(s.Transition,{items:t,onStart:function(){return document.body.classList[a(t)?"add":"remove"]("ct-dashboard-overlay-open")},config:{duration:200},from:{opacity:0,y:-10},enter:{opacity:1,y:0},leave:{opacity:0,y:10}},(function(e){return a(e)&&function(t){return Object(r.createElement)(C,{style:{opacity:t.opacity},container:document.querySelector("#wpbody"),onDismiss:function(){return u()}},Object(r.createElement)(P,{className:c()("ct-admin-modal",i),style:{transform:"translate3d(0px, ".concat(t.y,"px, 0px)")}},Object(r.createElement)("button",{className:"close-button",onClick:function(){return u()}},"×"),o(e,t)))}}))};function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){U(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,o=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(a)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return R(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var F=function(e){var t=e.extsSyncLoading,n=e.extensionData,o=e.onExtsSync,i=I(Object(r.useState)(!1),2),u=i[0],l=i[1],f=I(Object(r.useState)(null),2),p=f[0],d=f[1];return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("button",{className:"ct-button ct-config-btn","data-button":"white",onClick:function(){l(!0),d(n.settings)}},Object(a.__)("Configure","blc")),Object(r.createElement)(D,{items:u,onDismiss:function(){return l(!1)},className:"ct-product-reviews-settings-modal",render:function(){return Object(r.createElement)("div",{className:c()("ct-modal-content")},Object(r.createElement)("h2",null,Object(a.__)("Product Reviews Settings","blc")),Object(r.createElement)("p",{className:"ct-modal-description"},Object(a.__)("Configure the slugs for single and category pages of the product review custom post type.","blc")),Object(r.createElement)("div",{className:"ct-controls-group"},Object(r.createElement)("section",{"data-columns":"medium:2"},Object(r.createElement)(s.OptionsPanel,{onChange:function(e,t){return d((function(n){return T(T({},n),{},U({},e,t))}))},options:{single_slug:{type:"text",value:"",label:Object(a.__)("Single Slug","blc")},category_slug:{type:"text",value:"",label:Object(a.__)("Category Slug","blc")}},value:p||{},hasRevertButton:!1}))),Object(r.createElement)("div",{className:"ct-modal-actions has-divider"},Object(r.createElement)("button",{className:"button-primary",disabled:t||!p,onClick:function(e){e.preventDefault(),p&&(o({extAction:{type:"persist",settings:p}}),l(!1))}},t?Object(r.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 100 100"},Object(r.createElement)("g",{transform:"translate(50,50)"},Object(r.createElement)("g",{transform:"scale(1)"},Object(r.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"#687c93"}),Object(r.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},Object(r.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"}))))):Object(a.__)("Save","blc"))))}}))};function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,o=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(a)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return B(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return B(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var q=function(e){var t=L(Object(r.useState)(!1),2),n=t[0],a=t[1];return[function(){return a(!0)},Object(r.createElement)(D,{items:n,onDismiss:function(){return a(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content",dangerouslySetInnerHTML:{__html:e.readme}})}})]};function K(e,t,n,r,a,o,c){try{var i=e[o](c),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(r,a)}function V(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function c(e){K(o,r,a,c,i,"next",e)}function i(e){K(o,r,a,c,i,"throw",e)}c(void 0)}))}}function H(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,o=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(a)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return W(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return W(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var $=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=Object(r.useState)(!1),o=H(n,2),c=o[0],i=o[1],u=Object(r.useState)(!1),s=H(u,2),l=s[0],f=s[1],p=ctDashboardLocalizations.plugin_data.is_pro,d=function(){var n=V(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(p||!e.config.pro){n.next=3;break}return f(!0),n.abrupt("return");case 3:return(r=new FormData).append("ext",e.name),r.append("action",e.__object?"blocksy_extension_deactivate":"blocksy_extension_activate"),i(!0),n.prev=7,n.next=10,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:r});case 10:e.config.require_refresh&&location.reload(),t(),n.next=16;break;case 14:n.prev=14,n.t0=n.catch(7);case 16:i(!1);case 17:case"end":return n.stop()}}),n,null,[[7,14]])})));return function(){return n.apply(this,arguments)}}();return[c,d,!p&&e.config.pro?Object(r.createElement)(D,{items:l,onDismiss:function(){return f(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-activation-action-modal"},Object(r.createElement)("svg",{viewBox:"0 0 59.99 60"},Object(r.createElement)("path",{d:"M14.41 43.65c0 .13.08.27.11.41a5.91 5.91 0 010 2.37c-1.78 1.14-3.2 1.19-4.34.68-2.83-1.27-3.81-6-3.81-6s.38-.08 1-.15a6.08 6.08 0 012.64.91 4.17 4.17 0 01-.22-1 6.47 6.47 0 013.2 1 8.14 8.14 0 01.35-5 12.74 12.74 0 01.65-1.62s8.51 4.32 3 9.27a5.81 5.81 0 01-2.34-.68 2 2 0 01-.24-.19zM7.17 15.93q.2.22.42.45a5.74 5.74 0 002.68-.74 5.51 5.51 0 00-.28 2.76 6.79 6.79 0 001.47.81c5 1.94 6.91-5.79 6.91-5.79a13.35 13.35 0 00-4.5-.26 5.64 5.64 0 00-2.15.72 4.42 4.42 0 00.23-.81c.51-2.62-.94-5.82-.94-5.82a13.76 13.76 0 00-2.44 1.51c-2 1.51-4 4-1.53 7a.65.65 0 00.13.17zm.93 16.56a6.7 6.7 0 00.84.76c7.28-1.28 2.36-9.46 2.36-9.46a14.28 14.28 0 00-2.18 1.69 7.39 7.39 0 00-2.13 3.35v-1.19a5.49 5.49 0 00-1.27-1.71 12.75 12.75 0 00-3.94-2.44 13.32 13.32 0 00-.39 1.37c-.49 2-.91 5.69 1.85 7a4.83 4.83 0 001.75.46 8.25 8.25 0 00.86 0 6.45 6.45 0 001.14-1.76 4.41 4.41 0 001.11 1.93zM18.79 9.27c6 1.85 8.82-7.61 8.82-7.61a17.44 17.44 0 00-6.1-.58c-2.92.35-5.71 1.92-5.33 6.76a8.42 8.42 0 002.61 1.43zM49.6 40.93a6.08 6.08 0 00-2.64.91 4.21 4.21 0 00.22-1 11.57 11.57 0 00-1.19-5.59 13.88 13.88 0 00-2.36 1.58c-1.87 1.58-3.82 4.16-1.33 7 .06.08.13.15.2.23s.29.3.46.45a5.69 5.69 0 002.65-.86 5.82 5.82 0 00-.14 2.78 6.75 6.75 0 001.34.68c5.16 1.94 6.81-6 6.81-6a13.28 13.28 0 00-4.02-.18zm-6.49-27.77a10.69 10.69 0 00-1.5.26s1.15 4.53 3.91 5.79c1.18.54 2.66.47 4.47-.81a5.88 5.88 0 00-.16-2.47 1.42 1.42 0 00-.1-.29l.23.13a6 6 0 002.45.61c5.24-5.19-3.42-9.13-3.42-9.13a13.57 13.57 0 00-.54 1.51 8.37 8.37 0 00-.17 5.12 6.62 6.62 0 00-3.29-.81 12.09 12.09 0 00-1.88.09zm15.13 10.33a13.53 13.53 0 00-2.61 1.37 7.1 7.1 0 00-2.64 2.78v1.18a6.69 6.69 0 00-1.73-2.89 13.85 13.85 0 00-2.62-2.14 13.17 13.17 0 00-.82 1.69c-.83 2-1.65 5.4 1 7a6.4 6.4 0 002.16.76 7.35 7.35 0 001-.93 4.26 4.26 0 001-1.76 6.06 6.06 0 00.76 1.3 6.25 6.25 0 00.4.5c7.43.09 4.1-8.86 4.1-8.86zM38.19 9.27c1.55.52 3.41.27 5.61-1.43.51-6.56-4.81-7.11-8.33-6.76a19.24 19.24 0 00-3.1.58S34.25 8 38.19 9.27zM41.99 54h-3v-6a2 2 0 00-2-2h-14a2 2 0 00-2 2v6h-3a2 2 0 00-2 2v3h28v-3a2 2 0 00-2-2zM25.76 21.65l-5.77.84a1 1 0 00-.81.68 1 1 0 00.26 1l4.19 4.11a1 1 0 01.28.88l-.92 5.44-.07.4a1 1 0 00.4 1 1 1 0 001.06.07l3.55-1.88 1.6-.85a1 1 0 01.94 0l2.4 1.27 2.75 1.46a1 1 0 001.05-.07 1 1 0 00.4-1l-1-5.81a1 1 0 01.28-.88l4.19-4.11a1 1 0 00.26-1 1 1 0 00-.81-.68l-5.78-.84a1 1 0 01-.75-.55l-2.57-5.3a1 1 0 00-1.8 0l-1.17 2.39-1.41 2.88a1 1 0 01-.75.55z",fill:"#ffa800"}),Object(r.createElement)("path",{d:"M19.99 22.49l5.78-.84a1 1 0 00.75-.55l1.41-2.88 1.41 2.88a1 1 0 00.75.55l5.78.84a1 1 0 01.56 1.71l-4.19 4.11a1 1 0 00-.29.88l.92 5.4-2.4-1.27a1 1 0 00-.94 0l-1.6.85-1.6-.85a1 1 0 00-.93 0l-2.41 1.28.92-5.41a1 1 0 00-.28-.88l-4.2-4.11a1 1 0 01-.26-1 1 1 0 01.82-.71zm-13 8.07a4.41 4.41 0 001.14 1.93c2.67-1.61 1.85-5 1-7a7.39 7.39 0 00-2.14 3.34 3.49 3.49 0 000 1.7zm11.8-21.29c3.94-1.27 5.82-7.61 5.82-7.61a19.24 19.24 0 00-3.1-.58c-2.92.35-5.71 1.92-5.33 6.76a8.42 8.42 0 002.61 1.43zm-7.31 9.94c2.76-1.26 3.91-5.79 3.91-5.79a10.69 10.69 0 00-1.5-.26 12.35 12.35 0 00-1.9-.09 4.42 4.42 0 01-.23.81 3.48 3.48 0 00-1.46 1.75 5.51 5.51 0 00-.31 2.77 6.79 6.79 0 001.49.81zm37.4 13.28a4.41 4.41 0 001.11-1.93 3.57 3.57 0 000-1.72 7.31 7.31 0 00-2.17-3.34c-.83 2.02-1.61 5.38 1.06 6.99zM45.5 19.21a6.79 6.79 0 001.49-.81 5.51 5.51 0 00-.26-2.76 3.53 3.53 0 00-1.46-1.75 5.79 5.79 0 00-2.13-.72 10.69 10.69 0 00-1.5.26s1.1 4.57 3.86 5.78zm-7.31-9.94a8.42 8.42 0 002.61-1.43c.38-4.84-2.41-6.41-5.33-6.76a19.24 19.24 0 00-3.1.58S34.25 8 38.19 9.27zm8.8 32.57l-1.4 1.8a5.82 5.82 0 00-.14 2.78 6.75 6.75 0 001.34.68c2.83-1.27 3.81-6 3.81-6s-.38-.08-1-.15a6.08 6.08 0 00-2.61.89zm1.42-33.08a8.37 8.37 0 00-.17 5.12l1.46 1.75a1.42 1.42 0 01.1.29.65.65 0 00.13-.16c2.48-2.97.44-5.49-1.52-7zm-6.15 35.08a1.92 1.92 0 00.31-.18 3.55 3.55 0 001.42-1.79 8.1 8.1 0 00-.35-5c-1.92 1.54-3.87 4.13-1.38 6.97zm13.37-19a7.1 7.1 0 00-2.64 2.8v2.91a6.06 6.06 0 00.76 1.3c2.79-1.3 2.37-4.98 1.88-6.99zM11.41 43.65l-1.34-1.75a6.08 6.08 0 00-2.64-.91c-.6.07-1 .15-1 .15s1 4.77 3.81 6a6.75 6.75 0 001.34-.68 5.82 5.82 0 00-.14-2.78zM38.99 54h-3v-6a2 2 0 00-2-2h-11a2 2 0 00-2 2v6h-3a2 2 0 00-2 2v3h25v-3a2 2 0 00-2-2zm-25.6-17.17a8.14 8.14 0 00-.35 5 3.45 3.45 0 001.31 1.72h.05c0 .13.08.27.11.41.07-.08.14-.15.2-.23 2.5-2.73.55-5.32-1.32-6.9z",fill:"#fedd0a"}),Object(r.createElement)("path",{d:"M16.18 7.84C15.8 3 18.59 1.43 21.51 1.08a14.84 14.84 0 013 0C21.6 1.44 18.82 3 19.2 7.84a8.42 8.42 0 002.59 1.43 4.81 4.81 0 01-3 0 8.42 8.42 0 01-2.61-1.43zm-7.61.92c-2 1.51-4 4-1.53 7a.65.65 0 00.13.16q.2.22.42.45a5.91 5.91 0 002.4-.61c-2.45-3-.42-5.49 1.54-7a13.57 13.57 0 00-.54-1.51 13.76 13.76 0 00-2.42 1.51zM15.99 56v3h3v-3a2 2 0 012-2h-3a2 2 0 00-2 2zm7-10a2 2 0 00-2 2v6h3v-6a2 2 0 012-2zM4.35 24.86a13.53 13.53 0 00-2.61-1.37 13.32 13.32 0 00-.39 1.37c-.49 2-.91 5.69 1.85 7a4.83 4.83 0 001.79.46 8.25 8.25 0 00.86 0 5.84 5.84 0 00.4-.5c-2.81-1.27-2.39-4.95-1.9-6.96z",fill:"#fff"}),Object(r.createElement)("path",{d:"M59.18 23.14a1 1 0 00-1.29-.59 14.74 14.74 0 00-3.85 2.26 24.35 24.35 0 00-.45-3.4 23.39 23.39 0 00-1.21-4 1 1 0 00.71-.29 5.42 5.42 0 001.9-4.91c-.64-3.56-5.44-5.78-5.65-5.87a1 1 0 00-1.32.5 14.57 14.57 0 00-.85 2.6 26.55 26.55 0 00-2.37-2.12 6.66 6.66 0 00-2.23-5.7C38.99-1.31 32.36.61 32.08.7a1 1 0 00-.59.48 1 1 0 00-.08.76c.08.28 2.09 6.87 6.51 8.3a5.84 5.84 0 001.74.27 7.41 7.41 0 004.15-1.44 22.7 22.7 0 013.1 3 1.48 1.48 0 000 .21 13.38 13.38 0 00-5.58.15 1 1 0 00-.72 1.21c.06.22 1.39 5.34 4.79 6.59a4.42 4.42 0 001.55.28 6.3 6.3 0 003.59-1.31 1.2 1.2 0 00.26-.29 22.46 22.46 0 01.82 2.88 21.37 21.37 0 01.43 3.47 15 15 0 00-2.86-2.35 1 1 0 00-1.38.34c-.11.2-2.81 4.75-1.3 8a5.31 5.31 0 004.07 2.87c-.08.21-.15.42-.24.63a21.75 21.75 0 01-2.25 4 14.51 14.51 0 00-1.26-4 1 1 0 00-.58-.5 1 1 0 00-.76.06c-.2.1-4.9 2.53-5.38 6.11a5.19 5.19 0 001.7 4.37 22.47 22.47 0 01-2.46 1.34A3 3 0 0036.99 45h-6V34.73l4.15 2.2a2.1 2.1 0 00.94.23 2 2 0 002-2.33l-1-5.81 4.2-4.11a2 2 0 00-1.12-3.4l-5.78-.85-2.59-5.26a2 2 0 00-3.6 0l-2.58 5.26-5.77.85a2 2 0 00-1.11 3.4L22.92 29l-1 5.81a2 2 0 00.8 1.94 2 2 0 002.11.15l4.16-2.17V45h-6a3 3 0 00-2.37 1.18 21 21 0 01-2.46-1.35 5.16 5.16 0 001.7-4.36c-.48-3.58-5.18-6-5.38-6.11a1 1 0 00-.76-.06 1 1 0 00-.58.5 14.38 14.38 0 00-1.26 4 21.11 21.11 0 01-2.25-4c-.09-.21-.16-.42-.24-.64a5.26 5.26 0 004.07-2.86c1.51-3.29-1.19-7.84-1.3-8a1 1 0 00-1.38-.34 15 15 0 00-2.86 2.35 21.37 21.37 0 01.43-3.47 22.46 22.46 0 01.82-2.88 1.2 1.2 0 00.26.29 6.3 6.3 0 003.56 1.28 4.42 4.42 0 001.55-.28c3.4-1.25 4.73-6.37 4.79-6.59a1 1 0 00-.72-1.21 13.57 13.57 0 00-5.58-.15 1.48 1.48 0 000-.21 22.7 22.7 0 013.1-3 7.39 7.39 0 004.15 1.44 5.73 5.73 0 001.73-.27c4.43-1.43 6.44-8 6.52-8.3a1 1 0 00-.08-.76 1 1 0 00-.55-.5c-.28-.09-6.89-2-10.51.92a6.66 6.66 0 00-2.23 5.7 26.55 26.55 0 00-2.37 2.12 14.57 14.57 0 00-.8-2.6 1 1 0 00-1.32-.5c-.2.09-5 2.31-5.65 5.87a5.42 5.42 0 001.91 4.88 1 1 0 00.71.29 23.65 23.65 0 00-1.21 4 24.35 24.35 0 00-.44 3.43 14.74 14.74 0 00-3.9-2.26 1 1 0 00-1.29.59c-.08.21-1.89 5.18.19 8.14a5.37 5.37 0 004.71 2.08h.11a1 1 0 00.73-.36c.09-.1.16-.22.25-.33a24.67 24.67 0 001 2.89 23.67 23.67 0 002.4 4.32 14.22 14.22 0 00-4 .19 1 1 0 00-.77 1.18c0 .22 1.15 5.4 4.49 6.8a4.41 4.41 0 001.75.35 6.4 6.4 0 003.43-1.15 1 1 0 00.44-.64 6.59 6.59 0 00.11-1.08l.84.59a23 23 0 003.51 1.97V53h-2a3 3 0 00-3 3v3a1 1 0 001 1h28a1 1 0 001-1v-3a3 3 0 00-3-3h-2v-4.91a23 23 0 003.51-1.94c.29-.19.56-.41.84-.62a7 7 0 00.11 1.11 1 1 0 00.44.64 6.4 6.4 0 003.43 1.15 4.41 4.41 0 001.75-.35c3.34-1.4 4.45-6.58 4.49-6.8a1 1 0 00-.77-1.18 14.22 14.22 0 00-4-.19 23.67 23.67 0 002.4-4.32 24.67 24.67 0 001-2.89c.09.11.16.23.25.33a1 1 0 00.73.33h.11a5.37 5.37 0 004.71-2.08c2.08-2.96.27-7.93.19-8.14zM38.65 6a22.22 22.22 0 013.4 1.82 4.32 4.32 0 01-3.51.53c-2.55-.82-4.18-4.24-4.86-6 1.81-.38 5.57-.88 7.65.81a4.12 4.12 0 011.42 2.71 23.48 23.48 0 00-3.33-1.75 1 1 0 00-1.31.53A1 1 0 0038.65 6zm-20-2.8c2.08-1.71 5.84-1.2 7.65-.83-.68 1.72-2.31 5.14-4.86 6a4.32 4.32 0 01-3.51-.53A22.22 22.22 0 0121.33 6a1 1 0 00.54-1.31 1 1 0 00-1.31-.53 24 24 0 00-3.33 1.75 4.12 4.12 0 011.42-2.73zM5.92 30.41a5.66 5.66 0 01-.58.94 3.27 3.27 0 01-2.71-1.21c-1-1.37-.65-3.75-.26-5.28a8.32 8.32 0 013.62 3.05v.61a4.45 4.45 0 00-.15.9 4.12 4.12 0 00.08.99zm6-15.39c1.25-1.11 3.66-1 5.21-.83-.55 1.47-1.64 3.61-3.21 4.18a3.23 3.23 0 01-2.93-.54 3.27 3.27 0 01.89-2.83zm-4.93-2.45c.29-1.65 2.21-3.11 3.56-3.91a8.35 8.35 0 01.38 4.61 3.81 3.81 0 00-.32.24 4.52 4.52 0 00-1.05 1.37 3.53 3.53 0 01-.56.25h-.01a4.51 4.51 0 01-.95.22 3.26 3.26 0 01-1.05-2.78zm.91 17c.09-1.7 1.78-3.37 3.09-4.32.66 1.42 1.4 3.7.7 5.23a3.23 3.23 0 01-2.43 1.69 3.25 3.25 0 01-1.41-2.63zm5.78 16.29a3.26 3.26 0 01-2.94.41c-1.55-.65-2.55-2.84-3-4.34a8.39 8.39 0 014.58.65 2.92 2.92 0 00.17.36 4.51 4.51 0 001.1 1.32 4.53 4.53 0 01.04 1.57zm3.08-2.36a5 5 0 01-.85-.21h-.08A2.84 2.84 0 0114.16 42c-.8-1.46-.22-3.8.34-5.27 1.32.86 3.16 2.4 3.38 4.06a3.28 3.28 0 01-1.17 2.68zm7.19-8.3l1-5.8a2 2 0 00-.57-1.77l-4.19-4.11 5.77-.85a2 2 0 001.51-1.1l2.52-5.3 2.58 5.27a2 2 0 001.51 1.1l5.77.84-4.19 4.12a2 2 0 00-.57 1.76l1 5.8-5.15-2.73a2 2 0 00-1.88 0zM21.99 48a1 1 0 011-1h14a1 1 0 011 1v5h-16zm20 7a1 1 0 011 1v2h-26v-2a1 1 0 011-1h24zm3.83-13a2.84 2.84 0 01-1.62 1.28h-.07a6.37 6.37 0 01-.86.21 3.28 3.28 0 01-1.17-2.73c.22-1.66 2.06-3.2 3.38-4.06.56 1.45 1.14 3.79.34 5.3zm6.5-.05c-.48 1.5-1.48 3.69-3 4.34a3.26 3.26 0 01-2.94-.41 4.53 4.53 0 01.12-1.6 4.51 4.51 0 001.1-1.32c.07-.12.11-.24.17-.36a8.39 8.39 0 014.55-.7zM46.1 18.37c-1.57-.57-2.66-2.71-3.21-4.18 1.55-.22 4-.28 5.21.83a3.27 3.27 0 01.89 2.81 3.26 3.26 0 01-2.89.54zm4.67 13.8a3.23 3.23 0 01-2.43-1.69c-.7-1.52 0-3.8.71-5.23 1.25.95 3 2.62 3.08 4.29a3.25 3.25 0 01-1.36 2.63zm1.22-16.82a4.75 4.75 0 01-1-.22 3.87 3.87 0 01-.55-.25 4.52 4.52 0 00-1-1.37 3.81 3.81 0 00-.32-.24 8.45 8.45 0 01.38-4.61c1.35.8 3.27 2.25 3.56 3.9a3.27 3.27 0 01-1.07 2.79zm5.36 14.79a3.27 3.27 0 01-2.71 1.21 5.66 5.66 0 01-.58-.94 4.09 4.09 0 00.06-1 5.28 5.28 0 00-.15-.9v-.6a8.37 8.37 0 013.6-3.06c.42 1.54.74 3.92-.22 5.29zM33.99 50a1 1 0 01-1 1h-6a1 1 0 010-2h6a1 1 0 011 1z"})),Object(r.createElement)("h2",null,"Upgrade to Pro"),Object(r.createElement)("p",null,Object(a.__)("Upgrade to the Pro version and get instant full access to all premium extensions and features.","blc")),Object(r.createElement)("button",{className:"ct-button-primary"},Object(a.__)("Upgrade Now","blc")))}}):null]};function Y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,o=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(a)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return G(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return G(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var J=function(e){var t=e.extsSyncLoading,n=e.extension,o=e.onExtsSync,i=Y($(n,(function(){return o()})),2),u=i[0],s=i[1],l=Y(q(n),2),f=l[0],p=l[1];return Object(r.createElement)("li",{className:c()({active:!!n.__object})},Object(r.createElement)("h4",{className:"ct-extension-title"},n.config.name,u&&Object(r.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 100 100"},Object(r.createElement)("g",{transform:"translate(50,50)"},Object(r.createElement)("g",{transform:"scale(1)"},Object(r.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"#687c93"}),Object(r.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},Object(r.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"})))))),n.config.description&&Object(r.createElement)("div",{className:"ct-extension-description"},n.config.description),Object(r.createElement)("div",{className:"ct-extension-actions"},Object(r.createElement)("button",{className:c()(n.__object?"ct-button":"ct-button-primary"),"data-button":"white",disabled:u,onClick:function(){s()}},n.__object?Object(a.__)("Deactivate","blc"):Object(a.__)("Activate","blc")),n.__object&&Object(r.createElement)(F,{extsSyncLoading:t,extensionData:n.data,onExtsSync:o}),n.readme&&Object(r.createElement)("button",{onClick:function(){return f()},"data-button":"white",className:"ct-minimal-button ct-instruction"},Object(r.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M12,2C6.477,2,2,6.477,2,12s4.477,10,10,10s10-4.477,10-10S17.523,2,12,2z M12,17L12,17c-0.552,0-1-0.448-1-1v-4 c0-0.552,0.448-1,1-1h0c0.552,0,1,0.448,1,1v4C13,16.552,12.552,17,12,17z M12.5,9h-1C11.224,9,11,8.776,11,8.5v-1 C11,7.224,11.224,7,11.5,7h1C12.776,7,13,7.224,13,7.5v1C13,8.776,12.776,9,12.5,9z"})))),p)};u.a.on("ct:extensions:card",(function(e){var t=e.CustomComponent;"product-reviews"===e.extension.name&&(t.extension=J)}))}]);
framework/extensions/product-reviews/static/bundle/main-admin.css ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ /**
2
+ * - v1.7.50
3
+ *
4
+ * Copyright (c) 2021
5
+ * Licensed GPLv2+
6
+ */
7
+
8
+ .ct-product-reviews-settings-modal .ct-controls-group{padding-top:30px;margin-top:5px;border-top:1px dashed #eee}
framework/extensions/{affiliate-marketing → product-reviews}/static/bundle/main.css RENAMED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.7.47
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.7.50
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
framework/extensions/product-reviews/static/js/EditSettings.js ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import {
2
+ createElement,
3
+ Component,
4
+ useEffect,
5
+ useState,
6
+ Fragment,
7
+ } from '@wordpress/element'
8
+ import ctEvents from 'ct-events'
9
+
10
+ import { OptionsPanel } from 'blocksy-options'
11
+ import nanoid from 'nanoid'
12
+
13
+ import classnames from 'classnames'
14
+ import { __, sprintf } from 'ct-i18n'
15
+ import Overlay from '../../../../../static/js/helpers/Overlay'
16
+
17
+ const EditSettings = ({ extsSyncLoading, extensionData, onExtsSync }) => {
18
+ const [isEditing, setIsEditing] = useState(false)
19
+ const [settings, setSettings] = useState(null)
20
+
21
+ return (
22
+ <Fragment>
23
+ <button
24
+ className="ct-button ct-config-btn"
25
+ data-button="white"
26
+ onClick={() => {
27
+ setIsEditing(true)
28
+ setSettings(extensionData.settings)
29
+ }}>
30
+ {__('Configure', 'blc')}
31
+ </button>
32
+
33
+ <Overlay
34
+ items={isEditing}
35
+ onDismiss={() => setIsEditing(false)}
36
+ className={'ct-product-reviews-settings-modal'}
37
+ render={() => (
38
+ <div className={classnames('ct-modal-content')}>
39
+ <h2>{__('Product Reviews Settings', 'blc')}</h2>
40
+
41
+ <p className="ct-modal-description">
42
+ {__(
43
+ 'Configure the slugs for single and category pages of the product review custom post type.',
44
+ 'blc'
45
+ )}
46
+ </p>
47
+
48
+ <div className="ct-controls-group">
49
+ <section data-columns="medium:2">
50
+ <OptionsPanel
51
+ onChange={(optionId, optionValue) =>
52
+ setSettings((settings) => ({
53
+ ...settings,
54
+ [optionId]: optionValue,
55
+ }))
56
+ }
57
+ options={{
58
+ single_slug: {
59
+ type: 'text',
60
+ value: '',
61
+ label: __('Single Slug', 'blc'),
62
+ },
63
+
64
+ category_slug: {
65
+ type: 'text',
66
+ value: '',
67
+ label: __('Category Slug', 'blc'),
68
+ },
69
+ }}
70
+ value={settings || {}}
71
+ hasRevertButton={false}
72
+ />
73
+ </section>
74
+ </div>
75
+
76
+ <div className="ct-modal-actions has-divider">
77
+ <button
78
+ className="button-primary"
79
+ disabled={extsSyncLoading || !settings}
80
+ onClick={(e) => {
81
+ e.preventDefault()
82
+
83
+ if (!settings) {
84
+ return
85
+ }
86
+
87
+ onExtsSync({
88
+ extAction: {
89
+ type: 'persist',
90
+ settings,
91
+ },
92
+ })
93
+
94
+ setIsEditing(false)
95
+ }}>
96
+ {extsSyncLoading ? (
97
+ <svg
98
+ width="15"
99
+ height="15"
100
+ viewBox="0 0 100 100">
101
+ <g transform="translate(50,50)">
102
+ <g transform="scale(1)">
103
+ <circle
104
+ cx="0"
105
+ cy="0"
106
+ r="50"
107
+ fill="#687c93"
108
+ />
109
+ <circle
110
+ cx="0"
111
+ cy="-26"
112
+ r="12"
113
+ fill="#ffffff"
114
+ transform="rotate(161.634)">
115
+ <animateTransform
116
+ attributeName="transform"
117
+ type="rotate"
118
+ calcMode="linear"
119
+ values="0 0 0;360 0 0"
120
+ keyTimes="0;1"
121
+ dur="1s"
122
+ begin="0s"
123
+ repeatCount="indefinite"
124
+ />
125
+ </circle>
126
+ </g>
127
+ </g>
128
+ </svg>
129
+ ) : (
130
+ __('Save', 'blc')
131
+ )}
132
+ </button>
133
+ </div>
134
+ </div>
135
+ )}
136
+ />
137
+ </Fragment>
138
+ )
139
+ }
140
+
141
+ export default EditSettings
framework/extensions/product-reviews/static/js/ProductReviews.js ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import {
2
+ createElement,
3
+ Component,
4
+ useEffect,
5
+ useState,
6
+ Fragment,
7
+ } from '@wordpress/element'
8
+ import { __ } from 'ct-i18n'
9
+ import classnames from 'classnames'
10
+
11
+ import EditSettings from './EditSettings'
12
+ import useExtensionReadme from '../../../../../static/js/helpers/useExtensionReadme'
13
+ import useActivationAction from '../../../../../static/js/helpers/useActivationAction'
14
+
15
+ const ProductReviews = ({ extsSyncLoading, extension, onExtsSync }) => {
16
+ const [isLoading, activationAction] = useActivationAction(extension, () =>
17
+ onExtsSync()
18
+ )
19
+
20
+ const [showReadme, readme] = useExtensionReadme(extension)
21
+
22
+ return (
23
+ <li className={classnames({ active: !!extension.__object })}>
24
+ <h4 className="ct-extension-title">
25
+ {extension.config.name}
26
+
27
+ {isLoading && (
28
+ <svg width="15" height="15" viewBox="0 0 100 100">
29
+ <g transform="translate(50,50)">
30
+ <g transform="scale(1)">
31
+ <circle cx="0" cy="0" r="50" fill="#687c93" />
32
+ <circle
33
+ cx="0"
34
+ cy="-26"
35
+ r="12"
36
+ fill="#ffffff"
37
+ transform="rotate(161.634)">
38
+ <animateTransform
39
+ attributeName="transform"
40
+ type="rotate"
41
+ calcMode="linear"
42
+ values="0 0 0;360 0 0"
43
+ keyTimes="0;1"
44
+ dur="1s"
45
+ begin="0s"
46
+ repeatCount="indefinite"
47
+ />
48
+ </circle>
49
+ </g>
50
+ </g>
51
+ </svg>
52
+ )}
53
+ </h4>
54
+
55
+ {extension.config.description && (
56
+ <div className="ct-extension-description">
57
+ {extension.config.description}
58
+ </div>
59
+ )}
60
+
61
+ <div className="ct-extension-actions">
62
+ <button
63
+ className={classnames(
64
+ extension.__object ? 'ct-button' : 'ct-button-primary'
65
+ )}
66
+ data-button="white"
67
+ disabled={isLoading}
68
+ onClick={() => {
69
+ activationAction()
70
+ }}>
71
+ {extension.__object
72
+ ? __('Deactivate', 'blc')
73
+ : __('Activate', 'blc')}
74
+ </button>
75
+
76
+ {extension.__object && (
77
+ <EditSettings
78
+ extsSyncLoading={extsSyncLoading}
79
+ extensionData={extension.data}
80
+ onExtsSync={onExtsSync}
81
+ />
82
+ )}
83
+
84
+ {extension.readme && (
85
+ <button
86
+ onClick={() => showReadme()}
87
+ data-button="white"
88
+ className="ct-minimal-button ct-instruction">
89
+ <svg width="16" height="16" viewBox="0 0 24 24">
90
+ <path d="M12,2C6.477,2,2,6.477,2,12s4.477,10,10,10s10-4.477,10-10S17.523,2,12,2z M12,17L12,17c-0.552,0-1-0.448-1-1v-4 c0-0.552,0.448-1,1-1h0c0.552,0,1,0.448,1,1v4C13,16.552,12.552,17,12,17z M12.5,9h-1C11.224,9,11,8.776,11,8.5v-1 C11,7.224,11.224,7,11.5,7h1C12.776,7,13,7.224,13,7.5v1C13,8.776,12.776,9,12.5,9z" />
91
+ </svg>
92
+ </button>
93
+ )}
94
+ </div>
95
+ {readme}
96
+ </li>
97
+ )
98
+ }
99
+
100
+ export default ProductReviews
framework/extensions/product-reviews/static/js/dashboard.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ import { createElement } from '@wordpress/element'
2
+
3
+ import ProductReviews from './ProductReviews'
4
+
5
+ import ctEvents from 'ct-events'
6
+
7
+ ctEvents.on('ct:extensions:card', ({ CustomComponent, extension }) => {
8
+ if (extension.name !== 'product-reviews') return
9
+ CustomComponent.extension = ProductReviews
10
+ })
framework/extensions/{affiliate-marketing → product-reviews}/static/sass/actions.scss RENAMED
File without changes
framework/extensions/{affiliate-marketing → product-reviews}/static/sass/description.scss RENAMED
File without changes
framework/extensions/product-reviews/static/sass/main-admin.scss ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ .ct-product-reviews-settings-modal {
2
+
3
+ .ct-controls-group {
4
+ padding-top: 30px;
5
+ margin-top: 5px;
6
+ border-top: 1px dashed #eee;
7
+ }
8
+ }
framework/extensions/{affiliate-marketing → product-reviews}/static/sass/main.scss RENAMED
File without changes
framework/extensions/{affiliate-marketing → product-reviews}/static/sass/quick-info.scss RENAMED
File without changes
framework/extensions/{affiliate-marketing → product-reviews}/static/sass/scores.scss RENAMED
File without changes
framework/extensions/{affiliate-marketing → product-reviews}/static/sass/slider.scss RENAMED
File without changes
framework/extensions/{affiliate-marketing → product-reviews}/static/sass/title.scss RENAMED
File without changes
framework/extensions/{affiliate-marketing → product-reviews}/views/single-top.php RENAMED
@@ -1,7 +1,7 @@
1
  <?php
2
 
3
  $atts = blocksy_get_post_options(null, [
4
- 'meta_id' => 'blocksy_affiliate_marketing_options'
5
  ]);
6
 
7
  $gallery_images = array_map(function ($item) {
@@ -13,7 +13,7 @@ $thumb_id = get_post_thumbnail_id();
13
  if ($thumb_id) {
14
  array_unshift($gallery_images, intval($thumb_id));
15
  } else {
16
- $gallery_images = [null];
17
  }
18
 
19
  echo '<section class="ct-product-hero">';
1
  <?php
2
 
3
  $atts = blocksy_get_post_options(null, [
4
+ 'meta_id' => 'blocksy_product_review_options'
5
  ]);
6
 
7
  $gallery_images = array_map(function ($item) {
13
  if ($thumb_id) {
14
  array_unshift($gallery_images, intval($thumb_id));
15
  } else {
16
+ $gallery_images = [];
17
  }
18
 
19
  echo '<section class="ct-product-hero">';
framework/extensions/trending/extension.php CHANGED
@@ -15,13 +15,6 @@ class BlocksyExtensionTrending {
15
  return;
16
  }
17
 
18
- wp_enqueue_style(
19
- 'blocksy-ext-trending-styles',
20
- BLOCKSY_URL . 'framework/extensions/trending/static/bundle/main.css',
21
- ['ct-main-styles'],
22
- $data['Version']
23
- );
24
-
25
  wp_enqueue_script(
26
  'blocksy-ext-trending-scripts',
27
  BLOCKSY_URL . 'framework/extensions/trending/static/bundle/main.js',
15
  return;
16
  }
17
 
 
 
 
 
 
 
 
18
  wp_enqueue_script(
19
  'blocksy-ext-trending-scripts',
20
  BLOCKSY_URL . 'framework/extensions/trending/static/bundle/main.js',
framework/extensions/trending/static/bundle/main.css DELETED
@@ -1,7 +0,0 @@
1
- /**
2
- * - v1.7.43
3
- *
4
- * Copyright (c) 2020
5
- * Licensed GPLv2+
6
- */
7
-
 
 
 
 
 
 
 
framework/extensions/trending/static/sass/main.scss DELETED
File without changes
framework/extensions/widgets/static/bundle/main.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.7.47
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.7.50
3
  *
4
  * Copyright (c) 2021
5
  * Licensed GPLv2+
framework/extensions/widgets/widgets/ct-posts/view.php CHANGED
@@ -136,9 +136,9 @@ echo $before_title . wp_kses_post( $title ) . $after_title;
136
 
137
  ?>
138
 
139
- <?php if ( $query->have_posts() ) { ?>
140
  <ul <?php echo $type_output ?>>
141
- <?php while ( $query->have_posts() ) { ?>
142
  <?php $query->the_post(); ?>
143
 
144
  <li>
@@ -147,7 +147,6 @@ echo $before_title . wp_kses_post( $title ) . $after_title;
147
  if ( $has_thumbnail ) {
148
  $size = 'thumbnail';
149
  $ratio = blocksy_default_akg('post_widget_image_ratio', $atts, '1/1');
150
-
151
 
152
  if ( $posts_type === 'large-thumbs' ) {
153
  $size = 'medium';
136
 
137
  ?>
138
 
139
+ <?php if ($query->have_posts()) { ?>
140
  <ul <?php echo $type_output ?>>
141
+ <?php while ($query->have_posts()) { ?>
142
  <?php $query->the_post(); ?>
143
 
144
  <li>
147
  if ( $has_thumbnail ) {
148
  $size = 'thumbnail';
149
  $ratio = blocksy_default_akg('post_widget_image_ratio', $atts, '1/1');
 
150
 
151
  if ( $posts_type === 'large-thumbs' ) {
152
  $size = 'medium';
framework/features/demo-install/options-import.php CHANGED
@@ -80,7 +80,7 @@ class DemoInstallOptionsInstaller {
80
  }
81
 
82
  $options = $demo_content['options'];
83
- $this->import_options($options);
84
 
85
  if ($this->has_streaming) {
86
  Plugin::instance()->demo->emit_sse_message([
@@ -92,7 +92,7 @@ class DemoInstallOptionsInstaller {
92
  }
93
  }
94
 
95
- public function import_options($options) {
96
  if ($this->has_streaming) {
97
  Plugin::instance()->demo->emit_sse_message([
98
  'action' => 'import_mods_images',
@@ -100,10 +100,12 @@ class DemoInstallOptionsInstaller {
100
  ]);
101
  }
102
 
103
- $options['mods'] = $this->import_images(
104
- $demo_content,
105
- $options['mods']
106
- );
 
 
107
 
108
  global $wp_customize;
109
 
@@ -295,9 +297,10 @@ class DemoInstallOptionsInstaller {
295
  }
296
 
297
  // Set variables for storage, fix file filename for query strings.
298
- preg_match('/[^\?]+\.(jpe?g|jpe|gif|png)\b/i', $file, $matches);
299
 
300
  $file_array = [];
 
301
  $file_array['name'] = basename($matches[0]);
302
 
303
  // Download file to temp location.
80
  }
81
 
82
  $options = $demo_content['options'];
83
+ $this->import_options($options, $demo_content);
84
 
85
  if ($this->has_streaming) {
86
  Plugin::instance()->demo->emit_sse_message([
92
  }
93
  }
94
 
95
+ public function import_options($options, $demo_content = null) {
96
  if ($this->has_streaming) {
97
  Plugin::instance()->demo->emit_sse_message([
98
  'action' => 'import_mods_images',
100
  ]);
101
  }
102
 
103
+ if ($demo_content) {
104
+ $options['mods'] = $this->import_images(
105
+ $demo_content,
106
+ $options['mods']
107
+ );
108
+ }
109
 
110
  global $wp_customize;
111
 
297
  }
298
 
299
  // Set variables for storage, fix file filename for query strings.
300
+ preg_match('/[^\?]+\.(jpe?g|jpe|gif|png|svg)\b/i', $file, $matches);
301
 
302
  $file_array = [];
303
+
304
  $file_array['name'] = basename($matches[0]);
305
 
306
  // Download file to temp location.
framework/features/demo-install/widgets-import.php CHANGED
@@ -102,7 +102,7 @@ class DemoInstallWidgetsInstaller {
102
  }
103
  }
104
 
105
- private function import_data($data) {
106
  if (empty($data) || !is_object($data)) {
107
  return false;
108
  }
102
  }
103
  }
104
 
105
+ public function import_data($data) {
106
  if (empty($data) || !is_object($data)) {
107
  return false;
108
  }
framework/features/demo-install/wp-importer.php CHANGED
@@ -983,6 +983,7 @@ class Blocksy_WP_Import extends WP_Importer {
983
  if ( 'draft' == $item['status'] )
984
  return;
985
 
 
986
  $menu_slug = false;
987
  if ( isset($item['terms']) ) {
988
  // loop through terms, assume first nav_menu term is correct menu
@@ -1017,7 +1018,7 @@ class Blocksy_WP_Import extends WP_Importer {
1017
  <