Blocksy Companion - Version 1.8.34

Version Description

Download this release

Release Info

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

Code changes from version 1.8.33 to 1.8.34

Files changed (31) hide show
  1. blocksy-companion.php +1 -1
  2. framework/extensions/cookies-consent/static/bundle/main.min.css +1 -1
  3. framework/extensions/cookies-consent/static/js/lazy-load-helpers.js +0 -20
  4. framework/extensions/newsletter-subscribe/static/bundle/main.min.css +1 -1
  5. framework/extensions/product-reviews/static/bundle/main-admin.min.css +1 -1
  6. framework/extensions/product-reviews/static/bundle/main.min.css +1 -1
  7. framework/extensions/trending/static/bundle/main.js +1 -1
  8. framework/extensions/trending/static/bundle/main.min.css +1 -1
  9. framework/extensions/trending/static/js/trending-block.js +0 -4
  10. framework/extensions/widgets/static/bundle/main.min.css +1 -1
  11. framework/features/demo-install/options-import.php +2 -2
  12. framework/features/header/items/account/sync.js +8 -5
  13. framework/features/header/modal/login.php +8 -0
  14. framework/features/header/modal/lostpassword.php +8 -0
  15. framework/features/header/modal/register.php +8 -0
  16. languages/blocksy-companion.pot +13 -13
  17. readme.txt +6 -1
  18. static/bundle/account-lazy.min.css +2 -2
  19. static/bundle/account.js +1 -1
  20. static/bundle/dashboard.js +1 -1
  21. static/bundle/dashboard.min.css +1 -1
  22. static/bundle/options.min.css +1 -1
  23. static/bundle/sticky.js +1 -1
  24. static/bundle/sync.js +1 -1
  25. static/js/frontend/account.js +32 -0
  26. static/js/frontend/sticky.js +2 -0
  27. static/js/frontend/sticky/shrink-handle-logo.js +4 -0
  28. static/js/frontend/sticky/shrink-utils.js +7 -2
  29. static/js/screens/DemoInstall/DemoToInstall.js +1 -1
  30. static/js/screens/DemoInstall/Wizzard/ChildTheme.js +5 -3
  31. static/sass/account-lazy.scss +8 -0
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.8.33
7
  Author: CreativeThemes
8
  Author URI: https://creativethemes.com
9
  Text Domain: blocksy-companion
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.8.34
7
  Author: CreativeThemes
8
  Author URI: https://creativethemes.com
9
  Text Domain: blocksy-companion
framework/extensions/cookies-consent/static/bundle/main.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.33
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.34
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
framework/extensions/cookies-consent/static/js/lazy-load-helpers.js DELETED
@@ -1,20 +0,0 @@
1
- export const markImagesAsLoaded = el =>
2
- [...el.querySelectorAll('.ct-image-container.ct-lazy')].map(el => {
3
- if (el.querySelector('img')) {
4
- el.querySelector('img').setAttribute(
5
- 'src',
6
- el.querySelector('img').dataset.ctLazy
7
- )
8
-
9
- if (el.querySelector('img').dataset.ctLazySet) {
10
- el.querySelector('img').setAttribute(
11
- 'srcset',
12
- el.querySelector('img').dataset.ctLazySet
13
- )
14
- }
15
- }
16
-
17
- el.classList.remove('ct-lazy')
18
- el.classList.add('ct-lazy-loaded')
19
- })
20
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
framework/extensions/newsletter-subscribe/static/bundle/main.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.33
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.34
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
framework/extensions/product-reviews/static/bundle/main-admin.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.33
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.34
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
framework/extensions/product-reviews/static/bundle/main.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.33
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.34
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
framework/extensions/trending/static/bundle/main.js CHANGED
@@ -1 +1 @@
1
- !function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(t,e){t.exports=window.ctFrontend},function(t,e,n){"use strict";n.r(e);var r=n(0);function o(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||i(t)||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 a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=t[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!e||n.length!==e);r=!0);}catch(t){o=!0,a=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}(t,e)||i(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var f={},d=function(t){return f[t]?new Promise((function(e){e(f[t]),window.ct_customizer_localizations||(f[t]=f[t].clone())})):new Promise((function(e){return fetch(t).then((function(n){e(n),window.ct_customizer_localizations||(f[t]=n.clone())}))}))},p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((t=s({el:null,action:null},t)).el&&t.action&&!t.el.classList.contains("ct-loading")){var e=parseInt(t.el.dataset.page,10);if(("prev"!==t.action||1!==e)&&!(t.el.querySelectorAll(".ct-container > a").length<4&&1===e||t.el.dataset.page.indexOf("last")>-1&&"next"===t.action)){t.el.classList.add("ct-loading");var n="prev"===t.action?e-1:e+1;Promise.all([new Promise((function(e){t.el.classList.add("ct-leave-active"),requestAnimationFrame((function(){t.el.classList.remove("ct-leave-active"),t.el.classList.add("ct-leave"),setTimeout((function(){return e()}),650)}))})),d("".concat(ct_localizations.ajax_url,"?action=blocksy_get_trending_posts&page=").concat(n)).then((function(t){return t.json()}))]).then((function(e){var i=a(e,2),c=(i[0],i[1]),l=c.success,s=c.data;if(l){var u=s.posts,f=u.is_last_page,d=u.posts;t.el.dataset.page="".concat(n).concat(f?":last":""),o(t.el.querySelectorAll("a")).map((function(t){return t.remove()})),d.map((function(e){return t.el.insertAdjacentHTML("beforeend",'<a href="'.concat(e.url,'">\n ').concat(e.image,'\n <span class="ct-item-title">\n ').concat(e.title,"\n </span>\n </a>"))})),setTimeout((function(){t.el.classList.remove("ct-leave"),t.el.classList.add("ct-enter-active"),requestAnimationFrame((function(){t.el.classList.remove("ct-enter-active"),t.el.classList.add("ct-active"),setTimeout((function(){t.el.classList.remove("ct-active"),t.el.classList.remove("ct-loading")}),650)}))}),50),Object(r.markImagesAsLoaded)(t.el)}}))}}};Object(r.registerDynamicChunk)("blocksy_ext_trending",{mount:function(t,e){e.event;var n=t.closest("[data-page]");t.classList.contains("ct-arrow-left")&&p({el:n,action:"prev"}),t.classList.contains("ct-arrow-right")&&p({el:n,action:"next"})}})}]);
1
+ !function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(t,e){t.exports=window.ctFrontend},function(t,e,n){"use strict";function r(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||a(t)||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 o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=t[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!e||n.length!==e);r=!0);}catch(t){o=!0,a=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}(t,e)||a(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.r(e);var u={},f=function(t){return u[t]?new Promise((function(e){e(u[t]),window.ct_customizer_localizations||(u[t]=u[t].clone())})):new Promise((function(e){return fetch(t).then((function(n){e(n),window.ct_customizer_localizations||(u[t]=n.clone())}))}))},d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((t=l({el:null,action:null},t)).el&&t.action&&!t.el.classList.contains("ct-loading")){var e=parseInt(t.el.dataset.page,10);if(("prev"!==t.action||1!==e)&&!(t.el.querySelectorAll(".ct-container > a").length<4&&1===e||t.el.dataset.page.indexOf("last")>-1&&"next"===t.action)){t.el.classList.add("ct-loading");var n="prev"===t.action?e-1:e+1;Promise.all([new Promise((function(e){t.el.classList.add("ct-leave-active"),requestAnimationFrame((function(){t.el.classList.remove("ct-leave-active"),t.el.classList.add("ct-leave"),setTimeout((function(){return e()}),650)}))})),f("".concat(ct_localizations.ajax_url,"?action=blocksy_get_trending_posts&page=").concat(n)).then((function(t){return t.json()}))]).then((function(e){var a=o(e,2),i=(a[0],a[1]),c=i.success,l=i.data;if(c){var s=l.posts,u=s.is_last_page,f=s.posts;t.el.dataset.page="".concat(n).concat(u?":last":""),r(t.el.querySelectorAll("a")).map((function(t){return t.remove()})),f.map((function(e){return t.el.insertAdjacentHTML("beforeend",'<a href="'.concat(e.url,'">\n ').concat(e.image,'\n <span class="ct-item-title">\n ').concat(e.title,"\n </span>\n </a>"))})),setTimeout((function(){t.el.classList.remove("ct-leave"),t.el.classList.add("ct-enter-active"),requestAnimationFrame((function(){t.el.classList.remove("ct-enter-active"),t.el.classList.add("ct-active"),setTimeout((function(){t.el.classList.remove("ct-active"),t.el.classList.remove("ct-loading")}),650)}))}),50)}}))}}},p=n(0);Object(p.registerDynamicChunk)("blocksy_ext_trending",{mount:function(t,e){e.event;var n=t.closest("[data-page]");t.classList.contains("ct-arrow-left")&&d({el:n,action:"prev"}),t.classList.contains("ct-arrow-right")&&d({el:n,action:"next"})}})}]);
framework/extensions/trending/static/bundle/main.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.33
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.34
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
framework/extensions/trending/static/js/trending-block.js CHANGED
@@ -1,5 +1,3 @@
1
- import { markImagesAsLoaded } from 'blocksy-frontend'
2
-
3
  const store = {}
4
 
5
  const cachedFetch = (url) =>
@@ -115,7 +113,5 @@ export const loadPage = (args = {}) => {
115
  }, 650)
116
  })
117
  }, 50)
118
-
119
- markImagesAsLoaded(args.el)
120
  })
121
  }
 
 
1
  const store = {}
2
 
3
  const cachedFetch = (url) =>
113
  }, 650)
114
  })
115
  }, 50)
 
 
116
  })
117
  }
framework/extensions/widgets/static/bundle/main.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.33
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.34
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
framework/features/demo-install/options-import.php CHANGED
@@ -346,7 +346,7 @@ class DemoInstallOptionsInstaller {
346
  }
347
 
348
  // Set variables for storage, fix file filename for query strings.
349
- preg_match('/[^\?]+\.(jpe?g|jpe|gif|png|svg)\b/i', $file, $matches);
350
 
351
  $file_array = [];
352
 
@@ -389,7 +389,7 @@ class DemoInstallOptionsInstaller {
389
 
390
  private function is_image_url($string = '') {
391
  if (is_string($string)) {
392
- if (preg_match('/\.(jpg|jpeg|png|gif|svg)/i', $string)) {
393
  return true;
394
  }
395
  }
346
  }
347
 
348
  // Set variables for storage, fix file filename for query strings.
349
+ preg_match('/[^\?]+\.(jpe?g|jpe|gif|png|svg|webp)\b/i', $file, $matches);
350
 
351
  $file_array = [];
352
 
389
 
390
  private function is_image_url($string = '') {
391
  if (is_string($string)) {
392
+ if (preg_match('/\.(jpg|jpeg|png|gif|svg|webp)/i', $string)) {
393
  return true;
394
  }
395
  }
framework/features/header/items/account/sync.js CHANGED
@@ -8,7 +8,6 @@ import {
8
  getRootSelectorFor,
9
  responsiveClassesFor,
10
  } from 'blocksy-customizer-sync'
11
- import { markImagesAsLoaded } from 'blocksy-frontend'
12
 
13
  ctEvents.on(
14
  'ct:header:sync:collect-variable-descriptors',
@@ -155,13 +154,15 @@ ctEvents.on(
155
 
156
  account_close_button_border_color: [
157
  {
158
- selector: '#account-modal .ct-toggle-close[data-type="type-2"]',
 
159
  variable: 'toggle-button-border-color',
160
  type: 'color:default',
161
  },
162
 
163
  {
164
- selector: '#account-modal .ct-toggle-close[data-type="type-2"]:hover',
 
165
  variable: 'toggle-button-border-color',
166
  type: 'color:hover',
167
  },
@@ -169,13 +170,15 @@ ctEvents.on(
169
 
170
  account_close_button_shape_color: [
171
  {
172
- selector: '#account-modal .ct-toggle-close[data-type="type-3"]',
 
173
  variable: 'toggle-button-background',
174
  type: 'color:default',
175
  },
176
 
177
  {
178
- selector: '#account-modal .ct-toggle-close[data-type="type-3"]:hover',
 
179
  variable: 'toggle-button-background',
180
  type: 'color:hover',
181
  },
8
  getRootSelectorFor,
9
  responsiveClassesFor,
10
  } from 'blocksy-customizer-sync'
 
11
 
12
  ctEvents.on(
13
  'ct:header:sync:collect-variable-descriptors',
154
 
155
  account_close_button_border_color: [
156
  {
157
+ selector:
158
+ '#account-modal .ct-toggle-close[data-type="type-2"]',
159
  variable: 'toggle-button-border-color',
160
  type: 'color:default',
161
  },
162
 
163
  {
164
+ selector:
165
+ '#account-modal .ct-toggle-close[data-type="type-2"]:hover',
166
  variable: 'toggle-button-border-color',
167
  type: 'color:hover',
168
  },
170
 
171
  account_close_button_shape_color: [
172
  {
173
+ selector:
174
+ '#account-modal .ct-toggle-close[data-type="type-3"]',
175
  variable: 'toggle-button-background',
176
  type: 'color:default',
177
  },
178
 
179
  {
180
+ selector:
181
+ '#account-modal .ct-toggle-close[data-type="type-3"]:hover',
182
  variable: 'toggle-button-background',
183
  type: 'color:hover',
184
  },
framework/features/header/modal/login.php CHANGED
@@ -58,6 +58,14 @@ if (! $forgot_password_inline) {
58
  <p class="login-submit">
59
  <button name="wp-submit" class="ct-button">
60
  <?php echo __('Log In', 'blocksy-companion') ?>
 
 
 
 
 
 
 
 
61
  </button>
62
 
63
  <input type="hidden" name="redirect_to" value="<?php echo $redirect_to_url ?>">
58
  <p class="login-submit">
59
  <button name="wp-submit" class="ct-button">
60
  <?php echo __('Log In', 'blocksy-companion') ?>
61
+
62
+ <svg width="23" height="23" viewBox="0 0 40 40">
63
+ <path opacity=".2" fill="currentColor" d="M20.201 5.169c-8.254 0-14.946 6.692-14.946 14.946 0 8.255 6.692 14.946 14.946 14.946s14.946-6.691 14.946-14.946c-.001-8.254-6.692-14.946-14.946-14.946zm0 26.58c-6.425 0-11.634-5.208-11.634-11.634 0-6.425 5.209-11.634 11.634-11.634 6.425 0 11.633 5.209 11.633 11.634 0 6.426-5.208 11.634-11.633 11.634z"/>
64
+
65
+ <path fill="currentColor" d="m26.013 10.047 1.654-2.866a14.855 14.855 0 0 0-7.466-2.012v3.312c2.119 0 4.1.576 5.812 1.566z">
66
+ <animateTransform attributeName="transform" type="rotate" from="0 20 20" to="360 20 20" dur="1s" repeatCount="indefinite"/>
67
+ </path>
68
+ </svg>
69
  </button>
70
 
71
  <input type="hidden" name="redirect_to" value="<?php echo $redirect_to_url ?>">
framework/features/header/modal/lostpassword.php CHANGED
@@ -11,6 +11,14 @@
11
  <p>
12
  <button name="wp-submit" class="ct-button">
13
  <?php echo __('Get New Password', 'blocksy-companion') ?>
 
 
 
 
 
 
 
 
14
  </button>
15
 
16
  <!-- <input type="hidden" name="redirect_to" value="<?php echo blocksy_current_url() ?>"> -->
11
  <p>
12
  <button name="wp-submit" class="ct-button">
13
  <?php echo __('Get New Password', 'blocksy-companion') ?>
14
+
15
+ <svg width="23" height="23" viewBox="0 0 40 40">
16
+ <path opacity=".2" fill="currentColor" d="M20.201 5.169c-8.254 0-14.946 6.692-14.946 14.946 0 8.255 6.692 14.946 14.946 14.946s14.946-6.691 14.946-14.946c-.001-8.254-6.692-14.946-14.946-14.946zm0 26.58c-6.425 0-11.634-5.208-11.634-11.634 0-6.425 5.209-11.634 11.634-11.634 6.425 0 11.633 5.209 11.633 11.634 0 6.426-5.208 11.634-11.633 11.634z"/>
17
+
18
+ <path fill="currentColor" d="m26.013 10.047 1.654-2.866a14.855 14.855 0 0 0-7.466-2.012v3.312c2.119 0 4.1.576 5.812 1.566z">
19
+ <animateTransform attributeName="transform" type="rotate" from="0 20 20" to="360 20 20" dur="1s" repeatCount="indefinite"/>
20
+ </path>
21
+ </svg>
22
  </button>
23
 
24
  <!-- <input type="hidden" name="redirect_to" value="<?php echo blocksy_current_url() ?>"> -->
framework/features/header/modal/register.php CHANGED
@@ -61,6 +61,14 @@ if (
61
  <p>
62
  <button name="wp-submit" class="ct-button">
63
  <?php echo __('Register', 'blocksy-companion') ?>
 
 
 
 
 
 
 
 
64
  </button>
65
 
66
  <!-- <input type="hidden" name="redirect_to" value="<?php echo blocksy_current_url() ?>"> -->
61
  <p>
62
  <button name="wp-submit" class="ct-button">
63
  <?php echo __('Register', 'blocksy-companion') ?>
64
+
65
+ <svg width="23" height="23" viewBox="0 0 40 40">
66
+ <path opacity=".2" fill="currentColor" d="M20.201 5.169c-8.254 0-14.946 6.692-14.946 14.946 0 8.255 6.692 14.946 14.946 14.946s14.946-6.691 14.946-14.946c-.001-8.254-6.692-14.946-14.946-14.946zm0 26.58c-6.425 0-11.634-5.208-11.634-11.634 0-6.425 5.209-11.634 11.634-11.634 6.425 0 11.633 5.209 11.633 11.634 0 6.426-5.208 11.634-11.633 11.634z"/>
67
+
68
+ <path fill="currentColor" d="m26.013 10.047 1.654-2.866a14.855 14.855 0 0 0-7.466-2.012v3.312c2.119 0 4.1.576 5.812 1.566z">
69
+ <animateTransform attributeName="transform" type="rotate" from="0 20 20" to="360 20 20" dur="1s" repeatCount="indefinite"/>
70
+ </path>
71
+ </svg>
72
  </button>
73
 
74
  <!-- <input type="hidden" name="redirect_to" value="<?php echo blocksy_current_url() ?>"> -->
languages/blocksy-companion.pot CHANGED
@@ -1742,50 +1742,50 @@ msgstr ""
1742
  msgid "Hooks Locations"
1743
  msgstr ""
1744
 
1745
- #: framework/premium/features/content-blocks.php:568,
1746
- #: framework/premium/features/content-blocks.php:574
1747
  msgid "Content Blocks"
1748
  msgstr ""
1749
 
1750
- #: framework/premium/features/content-blocks.php:569,
1751
  #: framework/premium/extensions/mega-menu/options.php:333
1752
  msgid "Content Block"
1753
  msgstr ""
1754
 
1755
- #: framework/premium/features/content-blocks.php:570
1756
  msgid "Add New"
1757
  msgstr ""
1758
 
1759
- #: framework/premium/features/content-blocks.php:571
1760
  msgid "Add New Content Block"
1761
  msgstr ""
1762
 
1763
- #: framework/premium/features/content-blocks.php:572
1764
  msgid "Edit Content Block"
1765
  msgstr ""
1766
 
1767
- #: framework/premium/features/content-blocks.php:573
1768
  #: framework/premium/static/js/hooks/CreateHook.js:33
1769
  msgid "New Content Block"
1770
  msgstr ""
1771
 
1772
- #: framework/premium/features/content-blocks.php:575
1773
  msgid "View Content Block"
1774
  msgstr ""
1775
 
1776
- #: framework/premium/features/content-blocks.php:576
1777
  msgid "Search Content Blocks"
1778
  msgstr ""
1779
 
1780
- #: framework/premium/features/content-blocks.php:577
1781
  msgid "Nothing found"
1782
  msgstr ""
1783
 
1784
- #: framework/premium/features/content-blocks.php:578
1785
  msgid "Nothing found in Trash"
1786
  msgstr ""
1787
 
1788
- #: framework/premium/features/content-blocks.php:866
1789
  msgid "Close popup"
1790
  msgstr ""
1791
 
@@ -6042,7 +6042,7 @@ msgid ""
6042
  "You already have a child theme properly installed and activated. Move on."
6043
  msgstr ""
6044
 
6045
- #: static/js/screens/DemoInstall/Wizzard/ChildTheme.js:106
6046
  msgid "Learn more about child themes"
6047
  msgstr ""
6048
 
1742
  msgid "Hooks Locations"
1743
  msgstr ""
1744
 
1745
+ #: framework/premium/features/content-blocks.php:564,
1746
+ #: framework/premium/features/content-blocks.php:570
1747
  msgid "Content Blocks"
1748
  msgstr ""
1749
 
1750
+ #: framework/premium/features/content-blocks.php:565,
1751
  #: framework/premium/extensions/mega-menu/options.php:333
1752
  msgid "Content Block"
1753
  msgstr ""
1754
 
1755
+ #: framework/premium/features/content-blocks.php:566
1756
  msgid "Add New"
1757
  msgstr ""
1758
 
1759
+ #: framework/premium/features/content-blocks.php:567
1760
  msgid "Add New Content Block"
1761
  msgstr ""
1762
 
1763
+ #: framework/premium/features/content-blocks.php:568
1764
  msgid "Edit Content Block"
1765
  msgstr ""
1766
 
1767
+ #: framework/premium/features/content-blocks.php:569
1768
  #: framework/premium/static/js/hooks/CreateHook.js:33
1769
  msgid "New Content Block"
1770
  msgstr ""
1771
 
1772
+ #: framework/premium/features/content-blocks.php:571
1773
  msgid "View Content Block"
1774
  msgstr ""
1775
 
1776
+ #: framework/premium/features/content-blocks.php:572
1777
  msgid "Search Content Blocks"
1778
  msgstr ""
1779
 
1780
+ #: framework/premium/features/content-blocks.php:573
1781
  msgid "Nothing found"
1782
  msgstr ""
1783
 
1784
+ #: framework/premium/features/content-blocks.php:574
1785
  msgid "Nothing found in Trash"
1786
  msgstr ""
1787
 
1788
+ #: framework/premium/features/content-blocks.php:863
1789
  msgid "Close popup"
1790
  msgstr ""
1791
 
6042
  "You already have a child theme properly installed and activated. Move on."
6043
  msgstr ""
6044
 
6045
+ #: static/js/screens/DemoInstall/Wizzard/ChildTheme.js:108
6046
  msgid "Learn more about child themes"
6047
  msgstr ""
6048
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Requires PHP: 7.0
5
  Tested up to: 6.0
6
  License: GPLv2 or later
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
- Stable tag: 1.8.33
9
 
10
  == Description ==
11
 
@@ -23,6 +23,11 @@ It runs and adds its enhancements only if the Blocksy theme is installed and act
23
  2. Activate the plugin by going to **Plugins** page in WordPress admin and clicking on **Activate** link.
24
 
25
  == Changelog ==
 
 
 
 
 
26
  1.8.33: 2022-05-25
27
  - Improvement: Stabilize individual post selection in the conditional module
28
 
5
  Tested up to: 6.0
6
  License: GPLv2 or later
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
+ Stable tag: 1.8.34
9
 
10
  == Description ==
11
 
23
  2. Activate the plugin by going to **Plugins** page in WordPress admin and clicking on **Activate** link.
24
 
25
  == Changelog ==
26
+ 1.8.34: 2022-06-03
27
+ - Improvement: Better handling of empty rows in the sticky logic
28
+ - Improvement: Add loading indicator in account modal for all actions
29
+ - Improvement: Correctly open account modal when trigger is in offcanvas
30
+
31
  1.8.33: 2022-05-25
32
  - Improvement: Stabilize individual post selection in the conditional module
33
 
static/bundle/account-lazy.min.css CHANGED
@@ -1,8 +1,8 @@
1
  /**
2
- * - v1.8.33
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
6
  */
7
 
8
- #account-modal{--horizontal-alignment: center;--vertical-alignment: center;background-color:rgba(18,21,25,0.6)}.ct-account-form{width:100%;color:var(--color);background-color:#fff;--linkInitialColor: var(--color);border-radius:3px;box-shadow:var(--box-shadow, 0px 0px 70px rgba(0,0,0,0.35));--content-spacing: 1em}@media (max-width: 479.98px){.ct-account-form{max-width:88vw}}@media (min-width: 480px){.ct-account-form{max-width:480px}}.ct-account-form>ul{display:flex}.ct-account-form>ul li{width:50%;display:flex;align-items:center;justify-content:center;position:relative;height:60px;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:0.03em;cursor:pointer;border-bottom:1px solid rgba(0,0,0,0.1);transition:opacity 0.1s ease, background 0.1s ease}.ct-account-form>ul li.active{border-bottom-color:transparent}.ct-account-form>ul li:not(.active){opacity:0.5;background:rgba(0,0,0,0.04)}.ct-account-form>ul li:not(.active):hover{opacity:0.8}.ct-account-form>ul li:first-child{border-right:1px solid rgba(0,0,0,0.1)}@media (max-width: 479.98px){.ct-account-form .ct-account-panel{padding:40px 30px}}@media (min-width: 480px){.ct-account-form .ct-account-panel{padding:60px 70px}}.ct-account-form .ct-account-panel:not(.active){display:none}.ct-account-form form>*{--content-spacing: 20px}.ct-account-form form>*:last-of-type{margin-bottom:0}.ct-account-form label{display:block;--fontSize: 14px}.ct-account-form .ct-button{width:100%}.ct-account-form .col-2{display:flex;justify-content:space-between}.ct-account-form #reg_passmail,.ct-account-form .ct-back-to-login{font-size:14px;text-align:center}.ct-account-form .ct-back-to-login{display:block;margin-top:20px}.ct-account-form .login-remember{font-size:14px}.ct-account-form .login-remember span{display:flex}.ct-account-form .login-remember input{--top: 3px}.ct-account-form #reg_passmail{opacity:0.7}.ct-account-form [class*='ct-form-notification']{font-size:14px;margin-bottom:25px;border-radius:3px;padding:10px 15px;background:rgba(0,0,0,0.04)}.ct-account-form [class*='ct-form-notification'] a{color:inherit}.ct-account-form [class*='ct-form-notification'] a:not(:hover){text-decoration:underline}.ct-account-form .ct-form-notification-error{color:rgba(255,255,255,0.95);background:rgba(218,0,28,0.7)}@media (prefers-reduced-motion: no-preference){.ct-account-form.ct-error{animation:shake 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;transform:translate3d(0, 0, 0);-webkit-backface-visibility:hidden;backface-visibility:hidden;perspective:1000px}}.ct-account-form div.g-recaptcha,.ct-account-form .anr_captcha_field{margin:var(--content-spacing) 0 !important}#wfls-prompt-overlay-blocksy{margin-bottom:var(--content-spacing)}#wfls-prompt-overlay-blocksy #wfls-prompt-wrapper input+label{margin-top:var(--content-spacing)}#wfls-prompt-overlay-blocksy ~ *:not(.login-submit){display:none}
1
  /**
2
+ * - v1.8.34
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
6
  */
7
 
8
+ #account-modal{--horizontal-alignment: center;--vertical-alignment: center;background-color:rgba(18,21,25,0.6)}.ct-account-form{width:100%;color:var(--color);background-color:#fff;--linkInitialColor: var(--color);border-radius:3px;box-shadow:var(--box-shadow, 0px 0px 70px rgba(0,0,0,0.35));--content-spacing: 1em}@media (max-width: 479.98px){.ct-account-form{max-width:88vw}}@media (min-width: 480px){.ct-account-form{max-width:480px}}.ct-account-form>ul{display:flex}.ct-account-form>ul li{width:50%;display:flex;align-items:center;justify-content:center;position:relative;height:60px;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:0.03em;cursor:pointer;border-bottom:1px solid rgba(0,0,0,0.1);transition:opacity 0.1s ease, background 0.1s ease}.ct-account-form>ul li.active{border-bottom-color:transparent}.ct-account-form>ul li:not(.active){opacity:0.5;background:rgba(0,0,0,0.04)}.ct-account-form>ul li:not(.active):hover{opacity:0.8}.ct-account-form>ul li:first-child{border-right:1px solid rgba(0,0,0,0.1)}@media (max-width: 479.98px){.ct-account-form .ct-account-panel{padding:40px 30px}}@media (min-width: 480px){.ct-account-form .ct-account-panel{padding:60px 70px}}.ct-account-form .ct-account-panel:not(.active){display:none}.ct-account-form form>*{--content-spacing: 20px}.ct-account-form form>*:last-of-type{margin-bottom:0}.ct-account-form label{display:block;--fontSize: 14px}.ct-account-form .ct-button{width:100%}.ct-account-form .ct-button svg{-webkit-margin-start:10px;margin-inline-start:10px}.ct-account-form .ct-button:not(.ct-loading) svg{display:none}.ct-account-form .col-2{display:flex;justify-content:space-between}.ct-account-form #reg_passmail,.ct-account-form .ct-back-to-login{font-size:14px;text-align:center}.ct-account-form .ct-back-to-login{display:block;margin-top:20px}.ct-account-form .login-remember{font-size:14px}.ct-account-form .login-remember span{display:flex}.ct-account-form .login-remember input{--top: 3px}.ct-account-form #reg_passmail{opacity:0.7}.ct-account-form [class*='ct-form-notification']{font-size:14px;margin-bottom:25px;border-radius:3px;padding:10px 15px;background:rgba(0,0,0,0.04)}.ct-account-form [class*='ct-form-notification'] a{color:inherit}.ct-account-form [class*='ct-form-notification'] a:not(:hover){text-decoration:underline}.ct-account-form .ct-form-notification-error{color:rgba(255,255,255,0.95);background:rgba(218,0,28,0.7)}@media (prefers-reduced-motion: no-preference){.ct-account-form.ct-error{animation:shake 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;transform:translate3d(0, 0, 0);-webkit-backface-visibility:hidden;backface-visibility:hidden;perspective:1000px}}.ct-account-form div.g-recaptcha,.ct-account-form .anr_captcha_field{margin:var(--content-spacing) 0 !important}#wfls-prompt-overlay-blocksy{margin-bottom:var(--content-spacing)}#wfls-prompt-overlay-blocksy #wfls-prompt-wrapper input+label{margin-top:var(--content-spacing)}#wfls-prompt-overlay-blocksy ~ *:not(.login-submit){display:none}
static/bundle/account.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}([function(e,t){e.exports=window.ctEvents},function(e,t){e.exports=window.ctFrontend},function(e,t,r){"use strict";r.r(t);var o=r(0),n=r.n(o),c=r(1);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e){return function(e){if(Array.isArray(e))return l(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 l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(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 l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}var s=function(e,t){var r=function(e){var t=jQuery();return i(e.querySelectorAll("input")).map((function(e){t=t.add(e)})),t}(t);if("object"===("undefined"==typeof grecaptcha?"undefined":a(grecaptcha)))grecaptcha.ready((function(){grecaptcha.execute(WFLSVars.recaptchasitekey,{action:"login"}).then((function(t){var o=jQuery("#wfls-captcha-token");o.length?o.val(t):r.length&&((o=jQuery('<input type="hidden" name="wfls-captcha-token" id="wfls-captcha-token" />')).val(t),r.parent().append(o)),"function"==typeof e&&e(!0)}))}));else{var o=jQuery("#wfls-captcha-token");o.length?o.val("grecaptcha-missing"):r.length&&((o=jQuery('<input type="hidden" name="wfls-captcha-token" id="wfls-captcha-token" />')).val("grecaptcha-missing"),r.parent().append(o)),"function"==typeof e&&e(!0)}},u=function(e){i(e.querySelectorAll(".g-recaptcha, .anr_captcha_field")).map((function(e){e.classList.contains("anr_captcha_field")?grecaptcha.reset(parseFloat(e.firstElementChild.id.replace("anr_captcha_field_",""))-1):grecaptcha.reset(e.gID)}))},f=function(e){return new Promise((function(t){(function(e,t){return!(!window.WFLSVars||!parseInt(WFLSVars.useCAPTCHA))&&(s((function(){return e()}),t),!0)})(t,e)||t()}))},d=function(e,t){var r=t.screen,o=void 0===r?"login":r;e.querySelector(".ct-".concat(o,"-form"))||(o="login"),e.querySelector("ul")&&e.querySelector("ul .ct-".concat(o))&&(e.querySelector("ul .active").classList.remove("active"),e.querySelector("ul .ct-".concat(o)).classList.add("active")),e.querySelector('[class*="-form"].active').classList.remove("active"),e.querySelector(".ct-".concat(o,"-form")).classList.add("active"),e.querySelector(".ct-".concat(o,"-form form"))&&e.querySelector(".ct-".concat(o,"-form form")).reset(),e.querySelector(".ct-account-form").classList.remove("ct-error");var n=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-form-notification");n&&n.remove();var c=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-form-notification-error");c&&c.remove()},m=function(e,t){var r=e.querySelector(".ct-form-notification-error");r&&r.remove(),e.closest(".ct-account-form").classList.remove("ct-error"),t&&(e.insertAdjacentHTML("afterbegin",'<div class="ct-form-notification-error">'.concat(t,"</div>")),requestAnimationFrame((function(){e.closest(".ct-account-form").classList.add("ct-error")})))},p=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=r.querySelector("#login_error"),n="";return o&&(n=o.innerHTML),m(e,n),{hasError:!!o,doc:r}},y=function(e,t){var r=e.querySelector(".ct-form-notification");r&&r.remove(),e.closest(".ct-account-form").classList.remove("ct-error"),t&&e.insertAdjacentHTML("afterbegin",'<div class="ct-form-notification">'.concat(t,"</div>"))},h=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=r.querySelector(".message"),n="";return o&&(n=o.innerHTML),y(e,n),{doc:r}},v="";Object(c.registerDynamicChunk)("blocksy_account",{mount:function(e,t){var r=t.event;if(r.preventDefault(),!v){var o=document.querySelector("#account-modal");v=o.innerHTML,o.remove()}var a=document.querySelector(".ct-drawer-canvas").lastElementChild;a.id="account-modal";var i=ct_localizations.dynamic_styles_selectors.find((function(e){return a.matches(e.selector)})),l=function(){a.innerHTML=v,function(e){if(e&&!e.hasListeners){e.hasListeners=!0;var t=e.querySelector('[name="loginform"]'),r=e.querySelector('[name="registerform"]'),o=e.querySelector('[name="lostpasswordform"]');e.addEventListener("click",(function(r){r.target.href&&r.target.href.indexOf("lostpassword")>-1&&(d(e,{screen:"forgot-password"}),r.preventDefault()),r.target.href&&r.target.classList.contains("showlogin")&&(d(e,{screen:"login"}),r.preventDefault()),r.target.href&&(r.target.href.indexOf("wp-login")>-1||t&&r.target.href===t.action)&&-1===r.target.href.indexOf("lostpassword")&&(d(e,{screen:"login"}),r.preventDefault())}),!0),t&&t.addEventListener("submit",(function(e){if(e.preventDefault(),!window.ct_customizer_localizations){var r=new FormData(t),o="".concat(ct_localizations.ajax_url,"?action=blc_implement_user_login");if(window.WFLSVars&&!t.loginProceed)return r.append("action","wordfence_ls_authenticate"),o=WFLSVars.ajaxurl,void f(t).then((function(){fetch(o,{method:t.method,body:r}).then((function(e){return e.json()})).then((function(e){var r=!!e.error,o=t.closest(".ct-login-form"),n=t.closest(".ct-login-form").querySelector("form");if(r&&m(o,e.error),e.message&&y(n,e.message),e.login)if(e.jwt){if(!jQuery("#wfls-token").length){var c=jQuery('<div id="wfls-prompt-overlay-blocksy"></div>'),a=jQuery('<div id="wfls-prompt-wrapper"></div>'),i=jQuery('<label for="wfls-token">2FA Code <a href="javascript:void(0)" class="wfls-2fa-code-help wfls-tooltip-trigger" title="The 2FA Code can be found within the authenticator app you used when first activating two-factor authentication. You may also use one of your recovery codes."><i class="dashicons dashicons-editor-help"></i></a></label>'),l=jQuery('<input type="text" name="wfls-token" id="wfls-token" aria-describedby="wfls-token-error" class="input" value="" size="6" autocomplete="off"/>'),s=jQuery('<label for="wfls-remember-device"><input name="wfls-remember-device" type="checkbox" id="wfls-remember-device" class="ct-checkbox" value="1" /> Remember for 30 days</label>');a.append(i),a.append(l),parseInt(WFLSVars.allowremember)&&a.append(s),c.append(a),jQuery(n).prepend(c),new jQuery.Zebra_Tooltips(jQuery(".wfls-tooltip-trigger"))}var f=jQuery("#wfls-token-jwt");f.length||(f=jQuery('<input type="hidden" name="wfls-token-jwt" id="wfls-token-jwt" value=""/>'),jQuery("#wfls-prompt-overlay-blocksy").append(f)),jQuery("#wfls-token-jwt").val(e.jwt)}else fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_login"),{method:t.method,body:new FormData(t)}).then((function(e){return e.text()})).then((function(e){location=t.querySelector('[name="redirect_to"]').value}));e.combined&&(t.loginProceed=!0,fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_login"),{method:t.method,body:new FormData(t)}).then((function(e){return e.text()})).then((function(e){location=t.querySelector('[name="redirect_to"]').value}))),(!r||r&&-1===t.closest(".ct-login-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&u(t.closest(".ct-login-form"))}))}));f(t).then((function(){fetch(o,{method:t.method,body:r}).then((function(e){return e.text()})).then((function(e){var r=p(t.closest(".ct-login-form"),e),o=(r.doc,r.hasError);o||(location=t.querySelector('[name="redirect_to"]').value),(!o||o&&-1===t.closest(".ct-login-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&u(t.closest(".ct-login-form"))}))}))}})),r&&r.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||f(r).then((function(){return fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_registration"),{method:r.method,body:new FormData(r)}).then((function(e){return e.text()})).then((function(e){var t=p(r.closest(".ct-register-form"),e),o=(t.doc,t.hasError);o||h(r.closest(".ct-register-form"),e),n.a.trigger("blocksy:account:register:".concat(o?"error":"success")),(!o||o&&-1===r.closest(".ct-register-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&u(r.closest(".ct-register-form"))}))}))})),o&&o.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_lostpassword"),{method:o.method,body:new FormData(o)}).then((function(e){return e.text()})).then((function(e){var t=p(o.closest(".ct-forgot-password-form"),e),r=(t.doc,t.hasError);r||h(o.closest(".ct-forgot-password-form"),e),(!r||r&&-1===o.closest(".ct-forgot-password-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&u(o.closest(".ct-forgot-password-form"))}))})),["login","register","forgot-password"].map((function(t){Array.from(e.querySelectorAll(".ct-".concat(t))).map((function(r){r.addEventListener("click",(function(r){r.preventDefault(),d(e,{screen:t})})),r.addEventListener("keyup",(function(r){13===r.keyCode&&(r.preventDefault(),d(e,{screen:t}))}))}))}))}}(a),d(a,{screen:e.dataset.view||"login"}),window.anr_onloadCallback&&window.anr_onloadCallback(),n.a.trigger("ct:overlay:handle-click",{e:r,href:"#account-modal",options:{openStrategy:"skip",isModal:!0}})};i?Object(c.loadStyle)(i.url).then((function(){l()})):l()}}),n.a.on("ct:modal:closed",(function(e){e.closest("#account-modal")&&e.remove()}))}]);
1
+ !function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}([function(e,t){e.exports=window.ctEvents},function(e,t){e.exports=window.ctFrontend},function(e,t,r){"use strict";r.r(t);var o=r(0),n=r.n(o),c=r(1);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e){return function(e){if(Array.isArray(e))return l(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 l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(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 l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}var s=function(e,t){var r=function(e){var t=jQuery();return i(e.querySelectorAll("input")).map((function(e){t=t.add(e)})),t}(t);if("object"===("undefined"==typeof grecaptcha?"undefined":a(grecaptcha)))grecaptcha.ready((function(){grecaptcha.execute(WFLSVars.recaptchasitekey,{action:"login"}).then((function(t){var o=jQuery("#wfls-captcha-token");o.length?o.val(t):r.length&&((o=jQuery('<input type="hidden" name="wfls-captcha-token" id="wfls-captcha-token" />')).val(t),r.parent().append(o)),"function"==typeof e&&e(!0)}))}));else{var o=jQuery("#wfls-captcha-token");o.length?o.val("grecaptcha-missing"):r.length&&((o=jQuery('<input type="hidden" name="wfls-captcha-token" id="wfls-captcha-token" />')).val("grecaptcha-missing"),r.parent().append(o)),"function"==typeof e&&e(!0)}},u=function(e){i(e.querySelectorAll(".g-recaptcha, .anr_captcha_field")).map((function(e){e.classList.contains("anr_captcha_field")?grecaptcha.reset(parseFloat(e.firstElementChild.id.replace("anr_captcha_field_",""))-1):grecaptcha.reset(e.gID)}))},f=function(e){return new Promise((function(t){(function(e,t){return!(!window.WFLSVars||!parseInt(WFLSVars.useCAPTCHA))&&(s((function(){return e()}),t),!0)})(t,e)||t()}))},d=function(e){var t=e.querySelector('[name*="submit"]');t&&t.classList.add("ct-loading")},m=function(e){var t=e.querySelector('[name*="submit"]');t&&t.classList.remove("ct-loading")},p=function(e,t){var r=t.screen,o=void 0===r?"login":r;e.querySelector(".ct-".concat(o,"-form"))||(o="login"),e.querySelector("ul")&&e.querySelector("ul .ct-".concat(o))&&(e.querySelector("ul .active").classList.remove("active"),e.querySelector("ul .ct-".concat(o)).classList.add("active")),e.querySelector('[class*="-form"].active').classList.remove("active"),e.querySelector(".ct-".concat(o,"-form")).classList.add("active"),e.querySelector(".ct-".concat(o,"-form form"))&&e.querySelector(".ct-".concat(o,"-form form")).reset(),e.querySelector(".ct-account-form").classList.remove("ct-error");var n=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-form-notification");n&&n.remove();var c=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-form-notification-error");c&&c.remove()},y=function(e,t){var r=e.querySelector(".ct-form-notification-error");r&&r.remove(),e.closest(".ct-account-form").classList.remove("ct-error"),t&&(e.insertAdjacentHTML("afterbegin",'<div class="ct-form-notification-error">'.concat(t,"</div>")),requestAnimationFrame((function(){e.closest(".ct-account-form").classList.add("ct-error")})))},h=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=r.querySelector("#login_error"),n="";return o&&(n=o.innerHTML),y(e,n),{hasError:!!o,doc:r}},v=function(e,t){var r=e.querySelector(".ct-form-notification");r&&r.remove(),e.closest(".ct-account-form").classList.remove("ct-error"),t&&e.insertAdjacentHTML("afterbegin",'<div class="ct-form-notification">'.concat(t,"</div>"))},g=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=r.querySelector(".message"),n="";return o&&(n=o.innerHTML),v(e,n),{doc:r}},w="";Object(c.registerDynamicChunk)("blocksy_account",{mount:function(e,t){var r=t.event;if(r.preventDefault(),!w){var o=document.querySelector("#account-modal");w=o.innerHTML,o.remove()}var a=document.querySelector(".ct-drawer-canvas").lastElementChild;a.id="account-modal";var i=ct_localizations.dynamic_styles_selectors.find((function(e){return a.matches(e.selector)})),l=function(){a.innerHTML=w,function(e){if(e&&!e.hasListeners){e.hasListeners=!0;var t=e.querySelector('[name="loginform"]'),r=e.querySelector('[name="registerform"]'),o=e.querySelector('[name="lostpasswordform"]');e.addEventListener("click",(function(r){r.target.href&&r.target.href.indexOf("lostpassword")>-1&&(p(e,{screen:"forgot-password"}),r.preventDefault()),r.target.href&&r.target.classList.contains("showlogin")&&(p(e,{screen:"login"}),r.preventDefault()),r.target.href&&(r.target.href.indexOf("wp-login")>-1||t&&r.target.href===t.action)&&-1===r.target.href.indexOf("lostpassword")&&(p(e,{screen:"login"}),r.preventDefault())}),!0),t&&t.addEventListener("submit",(function(e){if(e.preventDefault(),!window.ct_customizer_localizations){d(t);var r=new FormData(t),o="".concat(ct_localizations.ajax_url,"?action=blc_implement_user_login");if(window.WFLSVars&&!t.loginProceed)return r.append("action","wordfence_ls_authenticate"),o=WFLSVars.ajaxurl,void f(t).then((function(){fetch(o,{method:t.method,body:r}).then((function(e){return e.json()})).then((function(e){m(t);var r=!!e.error,o=t.closest(".ct-login-form"),n=t.closest(".ct-login-form").querySelector("form");if(r&&y(o,e.error),e.message&&v(n,e.message),e.login)if(e.jwt){if(!jQuery("#wfls-token").length){var c=jQuery('<div id="wfls-prompt-overlay-blocksy"></div>'),a=jQuery('<div id="wfls-prompt-wrapper"></div>'),i=jQuery('<label for="wfls-token">2FA Code <a href="javascript:void(0)" class="wfls-2fa-code-help wfls-tooltip-trigger" title="The 2FA Code can be found within the authenticator app you used when first activating two-factor authentication. You may also use one of your recovery codes."><i class="dashicons dashicons-editor-help"></i></a></label>'),l=jQuery('<input type="text" name="wfls-token" id="wfls-token" aria-describedby="wfls-token-error" class="input" value="" size="6" autocomplete="off"/>'),s=jQuery('<label for="wfls-remember-device"><input name="wfls-remember-device" type="checkbox" id="wfls-remember-device" class="ct-checkbox" value="1" /> Remember for 30 days</label>');a.append(i),a.append(l),parseInt(WFLSVars.allowremember)&&a.append(s),c.append(a),jQuery(n).prepend(c),new jQuery.Zebra_Tooltips(jQuery(".wfls-tooltip-trigger"))}var f=jQuery("#wfls-token-jwt");f.length||(f=jQuery('<input type="hidden" name="wfls-token-jwt" id="wfls-token-jwt" value=""/>'),jQuery("#wfls-prompt-overlay-blocksy").append(f)),jQuery("#wfls-token-jwt").val(e.jwt)}else fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_login"),{method:t.method,body:new FormData(t)}).then((function(e){return e.text()})).then((function(e){location=t.querySelector('[name="redirect_to"]').value}));e.combined&&(t.loginProceed=!0,fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_login"),{method:t.method,body:new FormData(t)}).then((function(e){return e.text()})).then((function(e){location=t.querySelector('[name="redirect_to"]').value}))),(!r||r&&-1===t.closest(".ct-login-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&u(t.closest(".ct-login-form"))}))}));f(t).then((function(){fetch(o,{method:t.method,body:r}).then((function(e){return e.text()})).then((function(e){m(t);var r=h(t.closest(".ct-login-form"),e),o=(r.doc,r.hasError);o||(location=t.querySelector('[name="redirect_to"]').value),(!o||o&&-1===t.closest(".ct-login-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&u(t.closest(".ct-login-form"))}))}))}})),r&&r.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||(d(r),f(r).then((function(){return fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_registration"),{method:r.method,body:new FormData(r)}).then((function(e){return e.text()})).then((function(e){var t=h(r.closest(".ct-register-form"),e),o=(t.doc,t.hasError);m(r),o||g(r.closest(".ct-register-form"),e),n.a.trigger("blocksy:account:register:".concat(o?"error":"success")),(!o||o&&-1===r.closest(".ct-register-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&u(r.closest(".ct-register-form"))}))})))})),o&&o.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||(d(o),fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_lostpassword"),{method:o.method,body:new FormData(o)}).then((function(e){return e.text()})).then((function(e){var t=h(o.closest(".ct-forgot-password-form"),e),r=(t.doc,t.hasError);m(o),r||g(o.closest(".ct-forgot-password-form"),e),(!r||r&&-1===o.closest(".ct-forgot-password-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&u(o.closest(".ct-forgot-password-form"))})))})),["login","register","forgot-password"].map((function(t){Array.from(e.querySelectorAll(".ct-".concat(t))).map((function(r){r.addEventListener("click",(function(r){r.preventDefault(),p(e,{screen:t})})),r.addEventListener("keyup",(function(r){13===r.keyCode&&(r.preventDefault(),p(e,{screen:t}))}))}))}))}}(a),p(a,{screen:e.dataset.view||"login"}),window.anr_onloadCallback&&window.anr_onloadCallback(),n.a.trigger("ct:overlay:handle-click",{e:r,href:"#account-modal",options:{openStrategy:"skip",isModal:!0}})};i?Object(c.loadStyle)(i.url).then((function(){l()})):l()}}),n.a.on("ct:modal:closed",(function(e){e.closest("#account-modal")&&e.remove()}))}]);
static/bundle/dashboard.js CHANGED
@@ -3,4 +3,4 @@
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 c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===c)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}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){e.exports=window.ctEvents},function(e,t){e.exports=window.React},function(e,t,n){var r,o,c=n(11),a=n(12),i=(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 l(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),u={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},m={activate:function(e){if(u.active)return;g(),u.active=!0,u.paused=!1,u.nodeFocusedBeforeActivation=n.activeElement;var t=e&&e.onActivate?e.onActivate:s.onActivate;t&&t();return p(),m},deactivate:f,pause:function(){if(u.paused||!u.active)return;u.paused=!0,d()},unpause:function(){if(!u.paused||!u.active)return;u.paused=!1,g(),p()}};return m;function f(e){if(u.active){clearTimeout(r),d(),u.active=!1,u.paused=!1,i.deactivateTrap(m);var t=e&&void 0!==e.onDeactivate?e.onDeactivate:s.onDeactivate;return t&&t(),(e&&void 0!==e.returnFocus?e.returnFocus:s.returnFocusOnDeactivate)&&l((function(){var e;_((e=u.nodeFocusedBeforeActivation,b("setReturnFocus")||e))})),m}}function p(){if(u.active)return i.activateTrap(m),r=l((function(){_(h())})),n.addEventListener("focusin",v,!0),n.addEventListener("mousedown",y,{capture:!0,passive:!1}),n.addEventListener("touchstart",y,{capture:!0,passive:!1}),n.addEventListener("click",j,{capture:!0,passive:!1}),n.addEventListener("keydown",O,{capture:!0,passive:!1}),m}function d(){if(u.active)return n.removeEventListener("focusin",v,!0),n.removeEventListener("mousedown",y,!0),n.removeEventListener("touchstart",y,!0),n.removeEventListener("click",j,!0),n.removeEventListener("keydown",O,!0),m}function b(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 h(){var e;if(!(e=null!==b("initialFocus")?b("initialFocus"):o.contains(n.activeElement)?n.activeElement:u.firstTabbableNode||b("fallbackFocus")))throw new Error("Your focus-trap needs to have at least one focusable element");return e}function y(e){o.contains(e.target)||(s.clickOutsideDeactivates?f({returnFocus:!c.isFocusable(e.target)}):s.allowOutsideClick&&s.allowOutsideClick(e)||e.preventDefault())}function v(e){o.contains(e.target)||e.target instanceof Document||(e.stopImmediatePropagation(),_(u.mostRecentlyFocusedNode||h()))}function O(e){if(!1!==s.escapeDeactivates&&function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e))return e.preventDefault(),void f();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){if(g(),e.shiftKey&&e.target===u.firstTabbableNode)return e.preventDefault(),void _(u.lastTabbableNode);if(!e.shiftKey&&e.target===u.lastTabbableNode)e.preventDefault(),_(u.firstTabbableNode)}(e)}function j(e){s.clickOutsideDeactivates||o.contains(e.target)||s.allowOutsideClick&&s.allowOutsideClick(e)||(e.preventDefault(),e.stopImmediatePropagation())}function g(){var e=c(o);u.firstTabbableNode=e[0]||h(),u.lastTabbableNode=e[e.length-1]||h()}function _(e){e!==n.activeElement&&(e&&e.focus?(e.focus(),u.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):_(h()))}}},function(e,t,n){(function(n){var r,o,c;o=[],void 0===(c="function"==typeof(r=function(){"use strict";function t(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){a(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function r(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function o(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var c="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,a=c.saveAs||("object"!=typeof window||window!==c?function(){}:"download"in HTMLAnchorElement.prototype?function(e,n,a){var i=c.URL||c.webkitURL,l=document.createElement("a");n=n||e.name||"download",l.download=n,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?o(l):r(l.href)?t(e,n,a):o(l,l.target="_blank")):(l.href=i.createObjectURL(e),setTimeout((function(){i.revokeObjectURL(l.href)}),4e4),setTimeout((function(){o(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,c){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,c),n);else if(r(e))t(e,n,c);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout((function(){o(a)}))}}:function(e,n,r,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,r);var a="application/octet-stream"===e.type,i=/constructor/i.test(c.HTMLElement)||c.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||a&&i)&&"object"==typeof FileReader){var s=new FileReader;s.onloadend=function(){var e=s.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},s.readAsDataURL(e)}else{var u=c.URL||c.webkitURL,m=u.createObjectURL(e);o?o.location=m:location.href=m,o=null,setTimeout((function(){u.revokeObjectURL(m)}),4e4)}});c.saveAs=a.saveAs=a,e.exports=a})?r.apply(t,o):r)||(e.exports=c)}).call(this,n(13))},function(e,t,n){e.exports=n(9)()},function(e,t,n){"use strict";var r=n(10);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,a){if(a!==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:c,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 c(e,t){t=t||{};var n,c,i,l=[],m=[],f=e.querySelectorAll(r);for(t.includeContainer&&o.call(e,r)&&(f=Array.prototype.slice.apply(f)).unshift(e),n=0;n<f.length;n++)a(c=f[n])&&(0===(i=s(c))?l.push(c):m.push({documentOrder:n,tabIndex:i,node:c}));return m.sort(u).map((function(e){return e.node})).concat(l)}function a(e){return!(!i(e)||function(e){return function(e){return m(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 m(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}c.isTabbable=function(e){if(!e)throw new Error("No node provided");return!1!==o.call(e,r)&&a(e)},c.isFocusable=function(e){if(!e)throw new Error("No node provided");return!1!==o.call(e,l)&&i(e)};var l=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 u(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function m(e){return"INPUT"===e.tagName}e.exports=c},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){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n.n(o),a=n(1),i=n(2),l=n.n(i),s=n(5),u=n.n(s);n(8);function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(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 p=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"])},d=function(e){function t(){var n,r;m(this,t);for(var o=arguments.length,c=Array(o),a=0;a<o;a++)c[a]=arguments[a];return n=r=f(this,e.call.apply(e,[this].concat(c))),b.call(r),f(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:p(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:p(e),nextState:t})},t.prototype.componentWillUnmount=function(){this.props.willUnmount&&this.props.willUnmount({state:this.state,props:p(this.props),refs:this._refs})},t.prototype.componentDidUpdate=function(e,t,n){this.props.didUpdate&&this.props.didUpdate(Object.assign(this.getArgs(),{prevProps:p(e),prevState:t}),n)},t.prototype.getSnapshotBeforeUpdate=function(e,t){return this.props.getSnapshotBeforeUpdate?this.props.getSnapshotBeforeUpdate(Object.assign(this.getArgs(),{prevProps:p(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}(u.a.Component);d.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)}},h=d,y=function(e){var t=e.children,n=e.container,o=void 0===n?document.body:n,c=e.type,a=void 0===c?"reach-portal":c;return Object(r.createElement)(h,{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 v=function(e,t){return function(n){if(e&&e(n),!n.defaultPrevented)return t(n)}},O=n(6),j=n.n(O);function g(){return(g=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,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var E=function(){},w=function(){},k=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=j()(e.overlayNode,{initialFocus:t?function(){return t.current}:void 0,fallbackFocus:e.contentNode,escapeDeactivates:!1,clickOutsideDeactivates:!1})},x=function(e){var t=e.refs;t.trap.deactivate(),t.disposeAriaHider()},S=React.createContext(),C=React.forwardRef((function(e,t){var n=e.container,o=e.isOpen,c=void 0===o||o,a=e.onDismiss,i=void 0===a?E:a,l=e.initialFocusRef,s=e.onClick,u=e.onKeyDown,m=_(e,["container","isOpen","onDismiss","initialFocusRef","onClick","onKeyDown"]);return Object(r.createElement)(h,{didMount:w},c?Object(r.createElement)(y,{container:n,"data-reach-dialog-wrapper":!0},Object(r.createElement)(h,{refs:{overlayNode:null,contentNode:null},didMount:function(e){var t=e.refs;k(t,l)},willUnmount:x},(function(e){var n=e.refs;return Object(r.createElement)(S.Provider,{value:function(e){return n.contentNode=e}},Object(r.createElement)("div",g({"data-reach-dialog-overlay":!0,onClick:v(s,(function(e){e.stopPropagation(),i()})),onKeyDown:v(u,(function(e){"Escape"===e.key&&(e.stopPropagation(),i())})),ref:function(e){n.overlayNode=e,t&&t(e)}},m)))}))):null)}));C.propTypes={initialFocusRef:function(){}};var D=function(e){return e.stopPropagation()},P=React.forwardRef((function(e,t){var n=e.onClick,o=(e.onKeyDown,_(e,["onClick","onKeyDown"]));return Object(r.createElement)(S.Consumer,null,(function(e){return Object(r.createElement)("div",g({"aria-modal":"true","data-reach-dialog-content":!0,tabIndex:"-1",onClick:v(n,D),ref:function(n){e(n),t&&t(n)}},o))}))})),A=n(3),N=function(e){return!!e},M=function(e){var t=e.items,n=e.isVisible,o=void 0===n?N:n,c=e.render,a=e.className,i=e.onDismiss;return Object(r.createElement)(A.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)(C,{style:{opacity:t.opacity},container:document.querySelector("#wpbody"),onDismiss:function(){return i()}},Object(r.createElement)(P,{className:l()("ct-admin-modal",a),style:{transform:"translate3d(0px, ".concat(t.y,"px, 0px)")}},Object(r.createElement)("button",{className:"close-button",onClick:function(){return i()}},"×"),c(e,t)))}}))};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,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return z(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 z(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 z(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 T=function(e){var t=L(Object(r.useState)(!1),2),n=t[0],o=t[1];return[function(){return o(!0)},Object(r.createElement)(M,{items:n,onDismiss:function(){return o(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content",dangerouslySetInnerHTML:{__html:e.readme}})}})]},I=window.ctDashboardLocalizations.DashboardContext,R=(I.Provider,I.Consumer,I);function F(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function B(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function a(e){F(c,r,o,a,i,"next",e)}function i(e){F(c,r,o,a,i,"throw",e)}a(void 0)}))}}function U(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,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return V(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 V(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 V(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 H=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=Object(r.useState)(!1),o=U(n,2),c=o[0],i=o[1],l=Object(r.useState)(!1),s=U(l,2),u=s[0],m=s[1],f=Object(r.useContext)(R),p=(f.Link,f.history),d=ctDashboardLocalizations.plugin_data.is_pro,b=function(){var n=B(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(d||!e.config.pro){n.next=3;break}return m(!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,b,!d&&e.config.pro?Object(r.createElement)(M,{items:u,className:"ct-onboarding-modal",onDismiss:function(){return m(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("svg",{width:"55",height:"55",viewBox:"0 0 40.5 48.3"},Object(r.createElement)("path",{fill:"#2d82c8",d:"M33.4 29.4l7.1 12.3-7.4.6-4 6-7.3-12.9"}),Object(r.createElement)("path",{d:"M33.5 29.6L26 42.7l-4.2-7.3 11.6-6 .1.2zM0 41.7l7.5.6 3.9 6 7.2-12.4-11-7.3L0 41.7z",fill:"#2271b1"}),Object(r.createElement)("path",{d:"M39.5 18.7c0 1.6-2.4 2.8-2.7 4.3-.4 1.5 1 3.8.2 5.1-.8 1.3-3.4 1.2-4.5 2.3-1.1 1.1-1 3.7-2.3 4.5-1.3.8-3.6-.6-5.1-.2-1.5.4-2.7 2.7-4.3 2.7S18 35 16.5 34.7c-1.5-.4-3.8 1-5.1.2s-1.2-3.4-2.3-4.5-3.7-1-4.5-2.3.6-3.6.2-5.1-2.7-2.7-2.7-4.3 2.4-2.8 2.7-4.3c.4-1.5-1-3.8-.2-5.1C5.4 8 8.1 8.1 9.1 7c1.1-1.1 1-3.7 2.3-4.5s3.6.6 5.1.2C18 2.4 19.2 0 20.8 0c1.6 0 2.8 2.4 4.3 2.7 1.5.4 3.8-1 5.1-.2 1.3.8 1.2 3.4 2.3 4.5 1.1 1.1 3.7 1 4.5 2.3s-.6 3.6-.2 5.1c.3 1.5 2.7 2.7 2.7 4.3z",fill:"#599fd9"}),Object(r.createElement)("path",{d:"M23.6 7c-6.4-1.5-12.9 2.5-14.4 8.9-.7 3.1-.2 6.3 1.5 9.1 1.7 2.7 4.3 4.6 7.4 5.4.9.2 1.9.3 2.8.3 2.2 0 4.4-.6 6.3-1.8 2.7-1.7 4.6-4.3 5.4-7.5C34 15 30 8.5 23.6 7zm7 14c-.6 2.6-2.2 4.8-4.5 6.2-2.3 1.4-5 1.8-7.6 1.2-2.6-.6-4.8-2.2-6.2-4.5-1.4-2.3-1.8-5-1.2-7.6.6-2.6 2.2-4.8 4.5-6.2 1.6-1 3.4-1.5 5.2-1.5.8 0 1.5.1 2.3.3 5.4 1.3 8.7 6.7 7.5 12.1zm-8.2-4.5l3.7.5-2.7 2.7.7 3.7-3.4-1.8-3.3 1.8.6-3.7-2.7-2.7 3.8-.5 1.6-3.4 1.7 3.4z",fill:"#fff"})),Object(r.createElement)("h2",{className:"ct-modal-title"},"This is a Pro extension"),Object(r.createElement)("p",null,Object(a.__)("Upgrade to the Pro version and get instant access to all premium extensions, features and future updates.","blocksy-companion")),Object(r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},Object(r.createElement)("a",{onClick:function(e){e.preventDefault(),m(!1),setTimeout((function(){p.navigate("/pro")}),300)},className:"button"},Object(a.__)("Free vs Pro","blocksy")),Object(r.createElement)("a",{href:"https://creativethemes.com/blocksy/pricing/",target:"_blank",className:"button button-primary"},Object(a.__)("Upgrade Now","blocksy-companion"))))}}):null]},q=function(){return ctDashboardLocalizations.plugin_data.hide_support_section?null:Object(r.createElement)("div",{className:"ct-support-container"},Object(r.createElement)("h2",null,Object(a.__)("Need help or advice?","blocksy-companion")),Object(r.createElement)("p",null,Object(a.__)("Got a question or need help with the theme? You can always submit a support ticket or ask for help in our friendly Facebook community.","blocksy-companion")),Object(r.createElement)("a",{href:ctDashboardLocalizations.support_url,className:"ct-button","data-hover":"blue",target:"_blank"},Object(a.__)("Submit a Support Ticket","blocksy-companion")),Object(r.createElement)("a",{href:"https://www.facebook.com/groups/blocksy.community",className:"ct-button","data-hover":"blue",target:"_blank"},Object(a.__)("Join Facebook Community","blocksy-companion")))};function W(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 Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach((function(t){$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function K(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,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return J(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 J(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 J(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 Y=null,X=function(e){var t=e.extension,n=e.onExtsSync,o=K(T(t),2),c=o[0],i=o[1],s=K(H(t,(function(){n()})),3),u=s[0],m=s[1],f=s[2];return Object(r.createElement)("li",{className:l()({active:!!t.__object})},Object(r.createElement)("h4",{className:"ct-extension-title"},t.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"})))))),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:l()(t.__object?"ct-button":"ct-button-primary"),"data-hover":"white",disabled:u,onClick:function(){m()}},t.__object?Object(a.__)("Deactivate","blocksy-companion"):Object(a.__)("Activate","blocksy-companion")),t.readme&&Object(r.createElement)("button",{onClick:function(){return c()},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"}))),t.__object&&t.config&&t.config.buttons&&t.config.buttons.map((function(e,t){var n=e.text,o=e.url;return Object(r.createElement)("a",{href:o,className:"ct-button ct-config-btn",dataButton:"white"},n)}))),i,f)},Q=function(){var e=K(Object(r.useState)(!Y),2),t=e[0],n=e[1],o=K(Object(r.useState)(Y||[]),2),i=o[0],s=o[1],u=K(Object(r.useState)(!1),2),m=u[0],f=u[1],p=K(Object(r.useState)("free"),2),d=p[0],b=p[1],h=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,r,o,c,a,i,l,u,m,p=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=p.length>0&&void 0!==p[0]?p[0]:{},r=Z({verbose:!1,extension:null,extAction:null},t),o=r.verbose,c=r.extension,a=r.extAction,o&&n(!0),f(!0),e.next=6,fetch("".concat(wp.ajax.settings.url,"?action=blocksy_extensions_status"),Z({method:"POST"},c&&a?{body:JSON.stringify({extension:c,extAction:a})}:{}));case 6:if(200===(i=e.sent).status){e.next=9;break}return e.abrupt("return");case 9:return e.next=11,i.json();case 11:if(l=e.sent,u=l.success,m=l.data,u){e.next=16;break}return e.abrupt("return");case 16:if(f(!1),n(!1),s(m),Y=m,!c){e.next=22;break}return e.abrupt("return",m[c]);case 22:return e.abrupt("return",m);case 23:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function a(e){G(c,r,o,a,i,"next",e)}function i(e){G(c,r,o,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();Object(r.useEffect)((function(){h({verbose:!Y});var e=function(){h()};return c.a.on("blocksy_exts_sync_exts",e),function(){c.a.off("blocksy_exts_sync_exts",e)}}),[]);var y=Object(r.useMemo)((function(){return Object.values(i).map((function(e,t){return Z(Z({},e),{},{name:Object.keys(i)[t]})})).find((function(e){return e.config.pro}))}),[i]),v=Object(r.useMemo)((function(){return Object.values(i).map((function(e,t){return Z(Z({},e),{},{name:Object.keys(i)[t]})})).filter((function(e){return!e.config.hidden})).filter((function(e){var t=e.config;return"free"===d?!t.pro:t.pro}))}),[d,i]);return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"ct-extensions-container"},Object(r.createElement)(A.Transition,{items:t,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],initial:null,config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(e){return e?function(e){return Object(r.createElement)(A.animated.p,{style:e,className:"ct-loading-text"},Object(r.createElement)("span",null),Object(a.__)("Loading Extensions Status...","blocksy-companion"))}:function(e){return Object(r.createElement)(A.animated.div,{style:e},Object(r.createElement)(r.Fragment,null,y&&Object(r.createElement)("ul",{className:"ct-extensions-sourse"},["free","pro"].map((function(e){return Object(r.createElement)("li",{key:e,onClick:function(){return b(e)},className:l()({active:e===d})},{free:Object(a.__)("Free Extensions","blocksy-companion"),pro:Object(a.__)("Pro Extensions","blocksy-companion")}[e])}))),Object(r.createElement)("ul",{className:l()("ct-extensions-list",{"is-pro":"pro"===d})},v.map((function(e){var t={extension:X};return c.a.trigger("ct:extensions:card",{CustomComponent:t,extension:e}),Object(r.createElement)(t.extension,{key:e.name,extension:e,extsSyncLoading:m,onExtsSync:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.extAction||(i[e.name].__object=!i[e.name].__object,s(i)),h(Z(Z({},t),{},{extension:e.name}))}})}))),Object(r.createElement)(q,null)))}}))))},ee=function(e){var t=e.children,n=e.activated,o=e.checked,c=e.onChange;return Object(r.createElement)("div",{onClick:function(){return c()},className:l()("ct-checkbox-container",{activated:n})},t,Object(r.createElement)("span",{className:l()("ct-checkbox",{active:o})},Object(r.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},Object(r.createElement)("polyline",{class:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))))};function te(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 ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oe(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,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ce(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 ce(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 ce(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){return({coblocks:"CoBlocks","contact-form-7":"Contact Form 7",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","wpforms-lite":"WPForms - Contact Form","simply-gallery-block":"SimpLy Gallery Block & Lightbox","recipe-card-blocks-by-wpzoom":"Recipe Card Blocks by WPZOOM","stackable-ultimate-gutenberg-blocks":"Stackable – Gutenberg Blocks","map-block-gutenberg":"Map Block for Google Maps","mb-custom-post-type":"MB Custom Post Types & Custom Taxonomies",leadin:"HubSpot","block-slider":"Block Slider"}[e]||e).replace(/\b\w/,(function(e){return e.toUpperCase()}))},ie=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,o=e.style,c=Object(r.useContext)(Je),i=c.currentDemo,l=c.demos_list,s=c.pluginsStatus,u=(c.setCurrentDemo,oe((i||"").split(":"),2)),m=u[0];u[1],l.filter((function(e){return e.name===m||""}));return Object(r.createElement)("div",{style:o},Object(r.createElement)("div",{className:"ct-demo-plugins"},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40"},Object(r.createElement)("path",{fill:"#0C7AB3",d:"M20,0v7.6c0,0.3-0.2,0.5-0.5,0.5h-1.5c0,0,0,0,0,0c0,0,0,0-0.1,0c0,0,0,0-0.1,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c-0.5-0.7-1.3-1.1-2.1-1.1c-1.5,0-2.6,1.2-2.6,2.6c0,1.5,1.2,2.6,2.6,2.6c0.8,0,1.6-0.4,2.1-1.1c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0.1,0c0,0,0,0,0.1,0c0,0,0,0,0,0h1.5c0,0,0,0,0,0c0.3,0,0.5,0.2,0.5,0.5V20h8.1v-0.8c-0.8-0.7-1.3-1.7-1.3-2.8c0-2,1.7-3.7,3.7-3.7c2,0,3.7,1.7,3.7,3.7c0,1.1-0.5,2.1-1.3,2.8V20H40C40,9,31,0,20,0z"}),Object(r.createElement)("path",{fill:"#3497D3",d:"M20,40v-7.6c0-0.3,0.2-0.5,0.5-0.5h1.5c0,0,0,0,0,0c0,0,0,0,0.1,0c0,0,0,0,0.1,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0.5,0.7,1.3,1.1,2.1,1.1c1.5,0,2.6-1.2,2.6-2.6c0-1.5-1.2-2.6-2.6-2.6c-0.8,0-1.6,0.4-2.1,1.1c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0-0.1,0c0,0,0,0-0.1,0c0,0,0,0,0,0h-1.5c0,0,0,0,0,0c-0.3,0-0.5-0.2-0.5-0.5V20h-8.1v0.8c0.8,0.7,1.3,1.7,1.3,2.8c0,2-1.7,3.7-3.7,3.7c-2,0-3.7-1.7-3.7-3.7c0-1.1,0.5-2.1,1.3-2.8V20H0C0,31,9,40,20,40z"}))),Object(r.createElement)("h2",null,Object(a.__)("Install & Activate Plugins","blocksy-companion")),Object(r.createElement)("p",null,Object(a.__)("The following plugins are required for this starter site in order to work properly.","blocksy-companion")),t.plugins.map((function(e){var o=e.plugin,c=e.enabled;return Object(r.createElement)(r.Fragment,{key:o},!s[o]&&Object(r.createElement)(ee,{key:o,checked:c,onChange:function(){return n(ne(ne({},t),{},{plugins:t.plugins.map((function(e){return e.plugin===o?ne(ne({},e),{},{enabled:!c}):e}))}))}},ae(o)),s[o]&&Object(r.createElement)(ee,{activated:!0,checked:!0,onChange:function(){}},ae(o)))}))))},le=function(){var e=Object(r.useContext)(Je),t=e.currentlyInstalledDemo,n=e.demos_list,o=e.setCurrentDemo,c=e.demo_error,i=e.setInstallerBlockingReleased;Object(r.useContext)(R).Link;return Object(r.createElement)("ul",null,n.filter((function(e,t){return n.map((function(e){return e.name})).indexOf(e.name)===t})).map((function(e){return Object(r.createElement)("li",{key:e.name,className:l()("ct-single-demo",{"ct-is-pro":e.is_pro})},Object(r.createElement)("figure",null,Object(r.createElement)("img",{src:e.screenshot}),Object(r.createElement)("section",null,Object(r.createElement)("h3",null,Object(a.__)("Available for","blocksy-companion")),Object(r.createElement)("div",null,n.filter((function(t){return t.name===e.name||""})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0})).map((function(e){var t=e.builder;return Object(r.createElement)("span",{key:t},ae(t)||"Gutenberg")})))),e.is_pro&&Object(r.createElement)("a",{onClick:function(e){return e.preventDefault()},href:"#"},"PRO")),Object(r.createElement)("div",{className:"ct-demo-actions"},Object(r.createElement)("h4",null,e.name),Object(r.createElement)("div",null,Object(r.createElement)("a",{className:"ct-button",target:"_blank",href:e.url},Object(a.__)("Preview","blocksy-companion")),Object(r.createElement)("button",{className:"ct-button-primary",onClick:function(){i(!1),o(e.name)},disabled:!!c},t&&t.demo.indexOf(e.name)>-1?Object(a.__)("Modify","blocksy-companion"):Object(a.__)("Import","blocksy-companion")))))})))};function se(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,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ue(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 ue(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 ue(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 me=function(e){var t=e.style,n=e.nextStep,o=(Object(r.useContext)(R).is_child_theme,Object(r.useContext)(Je)),c=o.setCurrentlyInstalledDemo,i=o.setCurrentDemo,l=o.currentDemo,s=o.demos_list,u=se(Object(r.useState)(0),2),m=u[0],f=u[1],p=se(Object(r.useState)("idle"),2),d=p[0],b=p[1],h=se((l||"").split(":"),2),y=h[0],v=(h[1],s.filter((function(e){return e.name===y}))),O={erase_content:{title:Object(a.__)("Erase content","blocksy-companion"),query_string:"action=blocksy_demo_erase_content&wp_customize=on"},deactivate_demo_plugins:{title:Object(a.__)("Deactivate demo plugins","blocksy-companion"),query_string:"action=blocksy_demo_deactivate_plugins&plugins=".concat(v[0].plugins.join(":"))},deregister_current_demo:{title:Object(a.__)("Erase content","blocksy-companion"),query_string:"action=blocksy_demo_deregister_current_demo"}},j=["erase_content","deactivate_demo_plugins","deregister_current_demo"],g=j[m],_=function(){var e=O[g],t=new EventSource("".concat(ctDashboardLocalizations.ajax_url,"?").concat(e.query_string));t.onmessage=function(e){if("complete"===JSON.parse(e.data).action){if(t&&t.close&&t.close(),m===j.length-1)return void b("done");f(Math.min(j.length-1,m+1))}}};return Object(r.useEffect)((function(){0!==m&&"done"!==d&&_()}),[g]),Object(r.createElement)("div",{className:"ct-modify-demo",style:t},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"36",height:"36",viewBox:"0 0 40 40"},Object(r.createElement)("path",{d:"M5.71,40a1,1,0,0,1-1-1V21.59a1,1,0,0,1,1.91,0V39.05A1,1,0,0,1,5.71,40Zm1-31.83V1.07A1,1,0,0,0,5.71,0a1,1,0,0,0-1,1.07v7.1a1,1,0,0,0,1,1.07A1,1,0,0,0,6.67,8.17ZM21,39.05V34.29a1,1,0,1,0-1.9,0v4.76a1,1,0,1,0,1.9,0Zm0-18.14V1a1,1,0,1,0-1.9,0V20.91a1,1,0,1,0,1.9,0ZM35.24,39.05V26.35a1,1,0,0,0-1.91,0v12.7a1,1,0,0,0,1.91,0Zm0-26.25V1a1,1,0,1,0-1.91,0V12.8a1,1,0,1,0,1.91,0Z",transform:"translate(-0.71)",fill:"#dae3e8"}),Object(r.createElement)("path",{d:"M5.71,18.06a5,5,0,1,1,5-5A5,5,0,0,1,5.71,18.06ZM20,30.76a5,5,0,1,1,5-5A5,5,0,0,1,20,30.76Zm14.29-7.93a5,5,0,1,1,5-5A5,5,0,0,1,34.29,22.83Z",transform:"translate(-0.71)",fill:"#0c7ab3"}))),"idle"===d&&Object(r.createElement)("h2",null,Object(a.__)("This starter site is already installed","blocksy-companion")),"loading"===d&&Object(r.createElement)("h2",null,"Removing starter site..."),"done"===d&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h2",null,Object(a.__)("Starter Site Removed","blocksy-companion")),Object(r.createElement)("div",{className:"ct-modify-actions"},Object(r.createElement)("button",{className:"ct-demo-btn ct-dismiss",onClick:function(e){e.preventDefault(),i("".concat(y,":hide"))}},Object(a.__)("Dismiss","blocksy-companion")))),"idle"===d&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("p",null,Object(a.__)("What steps do you want to perform next?","blocksy-companion")),Object(r.createElement)("div",{className:"ct-modify-actions"},Object(r.createElement)("button",{className:"ct-demo-btn demo-remove",onClick:function(e){b("loading"),e.preventDefault(),_(),c()}},Object(a.__)("Remove","blocksy-companion")),Object(r.createElement)("button",{className:"ct-demo-btn",onClick:function(e){e.preventDefault(),n()}},Object(a.__)("Reinstall","blocksy-companion")))))};function fe(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 pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(n),!0).forEach((function(t){de(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function de(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var be=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,o=e.style,c=Object(r.useContext)(R),i=c.is_child_theme,l=c.child_theme_exists;return Object(r.createElement)("div",{className:"ct-demo-child",style:o},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 43 41.1"},Object(r.createElement)("path",{fill:"#DBE7EE",d:"M0,39.5c0,0.9,0.7,1.6,1.5,1.6h32.3c0.9,0,1.5-0.7,1.5-1.6V14H0V39.5z"}),Object(r.createElement)("path",{fill:"#BDC8D7",d:"M18.2,41.1h15.6c0.9,0,1.5-0.7,1.5-1.6V14H7.6L8,32.4L18.2,41.1z"}),Object(r.createElement)("path",{fill:"#BDC8D7",d:"M0,15.6V9.8c0-0.9,0.7-1.6,1.5-1.6h32.3c0.9,0,1.5,0.7,1.5,1.6v5.8H0z"}),Object(r.createElement)("path",{fill:"#3497D3",d:"M7.6,31.3c0,0.9,0.7,1.6,1.5,1.6h32.4c0.9,0,1.5-0.7,1.5-1.6V5.8H7.6V31.3z"}),Object(r.createElement)("path",{fill:"#0C7AB3",d:"M7.6,7.4V1.6C7.6,0.7,8.3,0,9.1,0h32.4C42.4,0,43,0.7,43,1.6v5.8H7.6z"}),Object(r.createElement)("rect",{x:"11.2",y:"11",fill:"#44ACDF",width:"16.8",height:"17.9"}),Object(r.createElement)("rect",{x:"31.5",y:"11",fill:"#44ACDF",width:"7.9",height:"17.9"}))),l?Object(r.createElement)("h2",null,Object(a.__)("Activate Child Theme","blocksy-companion")):Object(r.createElement)("h2",null,Object(a.__)("Install Child Theme","blocksy-companion")),!i&&Object(r.createElement)(r.Fragment,null,l?Object(r.createElement)("p",null,Object(a.__)("We strongly recommend to activate the child theme, this way you will have freedom to make changes without breaking the parent theme.","blocksy-companion")):Object(r.createElement)("p",null,Object(a.__)("We strongly recommend to install the child theme, this way you will have freedom to make changes without breaking the parent theme.","blocksy-companion")),Object(r.createElement)(ee,{checked:t.child_theme,onChange:function(){return n(pe(pe({},t),{},{child_theme:!t.child_theme}))}},l?Object(a.__)("Activate Child Theme","blocksy-companion"):Object(a.__)("Install Child Theme","blocksy-companion"))),i&&Object(a.__)("You already have a child theme properly installed and activated. Move on.","blocksy-companion"),Object(r.createElement)("a",{href:"https://developer.wordpress.org/themes/advanced-topics/child-themes/",target:"_blank"},Object(a.__)("Learn more about child themes","blocksy-companion")))};function he(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 ye(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){ve(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oe(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,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}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 ge=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,o=e.style,c=Object(r.useContext)(Je),i=c.currentDemo,s=c.demos_list,u=(c.pluginsStatus,c.setCurrentDemo,Oe((i||"").split(":"),2)),m=u[0],f=(u[1],s.filter((function(e){return e.name===m||""})));return Object(r.createElement)("div",{style:o},f.length>1&&Object(r.createElement)("div",{className:"ct-demo-builder"},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"52",height:"40",viewBox:"0 0 52 40"},Object(r.createElement)("path",{fill:"#DBE7EE",d:"M0,38.1C0,39.1,0.9,40,1.8,40h39.3c1.1,0,1.8-0.9,1.8-1.9v-31H0V38.1z"}),Object(r.createElement)("path",{fill:"#CFDBE4",d:"M13.8,14.6v18.8h22.6V14.6H13.8zM34.8,31.9H15.4V16.1h19.4V31.9z"}),Object(r.createElement)("path",{fill:"#BDC8D7",d:"M13.1,15.3L13.1,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C13.7,16.8,13.1,16.1,13.1,15.3z M34.1,15.3L34.1,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C34.8,16.8,34.1,16.1,34.1,15.3z M13.1,32.7L13.1,32.7c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C13.7,34.1,13.1,33.5,13.1,32.7z M34.1,32.7L34.1,32.7c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C34.8,34.1,34.1,33.5,34.1,32.7z M23.3,15.3L23.3,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C24,16.8,23.3,16.1,23.3,15.3z M4.2,13.9h5.9v7.9H4.2V13.9zM4.2,23.3h5.9v2.9H4.2V23.3zM0,9V1.9C0,0.9,0.9,0,1.8,0h39.3c1.1,0,1.8,0.9,1.8,1.9V9H0z M42.9,35.4V10.9h-9.3v15.2L42.9,35.4zM7.2,27.6c-1.6,0-3,1.3-3,3c0,1.6,1.3,3,3,3s3-1.3,3-3C10.2,28.9,8.8,27.6,7.2,27.6z"}),Object(r.createElement)("path",{fill:"#0C7AB3",d:"M50,27.8H35.6c-1.1,0-2-0.9-2-2v-18c0-1.1,0.9-2,2-2H50c1.1,0,2,0.9,2,2v18C52,26.9,51.1,27.8,50,27.8z"}),Object(r.createElement)("path",{fill:"#44ACDF",d:"M49,17.5H36.8c-0.7,0-1.2-0.5-1.2-1.2V9.1c0-0.7,0.5-1.2,1.2-1.2H49c0.7,0,1.2,0.5,1.2,1.2v7.3C50.2,17,49.6,17.5,49,17.5z M50.2,20.4v-0.1c0-0.5-0.4-1-1-1H36.5c-0.5,0-1,0.4-1,1v0.1c0,0.5,0.4,1,1,1h12.7C49.7,21.4,50.2,20.9,50.2,20.4z M40.8,25.2h-4.3c-0.5,0-1-0.4-1-1v-0.1c0-0.5,0.4-1,1-1h4.3c0.5,0,1,0.4,1,1v0.1C41.7,24.8,41.3,25.2,40.8,25.2z M49.2,25.2h-4.3c-0.5,0-1-0.4-1-1v-0.1c0-0.5,0.4-1,1-1h4.3c0.5,0,1,0.4,1,1v0.1C50.2,24.8,49.7,25.2,49.2,25.2z"}),Object(r.createElement)("path",{fill:"#C8E6F4",d:"M47.4,11.2h-9.1c-0.2,0-0.5-0.2-0.5-0.4v0c0-0.2,0.2-0.4,0.5-0.4h9.1c0.2,0,0.5,0.2,0.5,0.4v0C47.8,11,47.6,11.2,47.4,11.2z M47.9,14.7L47.9,14.7c0-0.2-0.2-0.5-0.5-0.5h-9.1c-0.2,0-0.4,0.2-0.4,0.4v0c0,0.2,0.2,0.4,0.4,0.4h9.1C47.7,15.1,47.9,14.9,47.9,14.7z"}),Object(r.createElement)("path",{fill:"#FFFFFF",d:"M26.3,20.8h-2.9l-2.9,7.9H23l0.3-0.7h2.8l0.3,0.7h2.7L26.3,20.8z M23.9,25.8l0.8-2.2h0l0.8,2.2H23.9zM46.5,10.7c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5c0-0.8,0.7-1.5,1.5-1.5S46.5,9.9,46.5,10.7zM42.1,14.7c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5S42.1,13.9,42.1,14.7z"}))),Object(r.createElement)("h2",null,Object(a.__)("Choose Page Builder","blocksy-companion")),Object(r.createElement)("p",null,Object(a.__)("This starter site can be imported and used with one of these page builders. Please select your prefered one in order to continue.","blocksy-companion")),Object(r.createElement)("ul",{"data-count":f.length},f.sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0})).map((function(e){var o=e.builder,c=e.plugins;return Object(r.createElement)("li",{className:l()({active:o===(null===t.builder?f[0].builder:t.builder)}),onClick:function(){return n(ye(ye({},t),{},{builder:o,plugins:c.map((function(e){return{plugin:e,enabled:!0}}))}))}},Object(r.createElement)("figure",null,Object(r.createElement)("span",{className:l()("ct-checkbox",{active:o===(null===t.builder?f[0].builder:t.builder)})},Object(r.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},Object(r.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))),""===o&&Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},Object(r.createElement)("path",{d:"M122.5 35.5c-1.7-1.1-4-.7-5.1 1C110.8 46.4 96.8 47 96 47h-.3c-17.4 0-24 14.8-24.3 15.4-.8 1.9.1 4 1.9 4.8.5.2 1 .3 1.5.3 1.4 0 2.7-.8 3.4-2.2.1-.1 4.6-10.3 16.3-11v19c-.5 4.1-2.4 7.3-5.8 9.7-3.6 2.5-8.3 3.8-14.1 3.8-7 0-12.7-2.4-16.9-7.2-4.3-4.8-6.4-11.5-6.4-20.2l.1-20.9c.3-7.7 2.4-13.8 6.4-18.2 4.3-4.8 9.9-7.2 16.9-7.2 5.8 0 10.6 1.3 14.1 3.8 3.6 2.5 5.6 5.9 5.9 10.3v.5c0 2.5 2.1 4.6 4.6 4.6 2.5 0 4.6-2.1 4.6-4.6v-.5c-.7-6.6-3.7-11.9-9.1-15.8-5.4-4-12.2-5.9-20.4-5.9-9.7 0-17.6 3.2-23.5 9.6-5.6 6-8.6 13.8-8.9 23.5 0 .7-.1 1.3-.1 2l.1 18.8h-.1c0 10.7 3 19.2 9 25.5 6 6.4 13.8 9.6 23.5 9.6 8.2 0 14.9-1.9 20.4-5.9 5-3.6 7.9-8.4 8.9-14.3l.2-21c6.1-1.5 14.4-4.8 19.6-12.7 1.3-1.7.8-4-1-5.1z"})),"brizy"===o&&Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},Object(r.createElement)("path",{d:"M14.6 36.7L75 0l60.4 36.7L75 73.4 14.6 36.7zm21.7.9L75 61.2l38.8-23.6L75 14 36.3 37.6z",fill:"#181c25"}),Object(r.createElement)("path",{fill:"#a7b2dd",d:"M14.6 63.2l10.8-6.5L75 86.8l49.9-30 10.5 6.4L75 100z"})),"elementor"===o&&Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},Object(r.createElement)("path",{d:"M32.5 7.6h17v84.9h-17V7.6zm34 84.9h51v-17h-51v17zm0-34h51v-17h-51v17zm0-51v17h51v-17h-51z"}))),Object(r.createElement)("div",{className:"builder-name"},ae(o)||"Gutenberg"))})))))};function _e(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 Ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(n),!0).forEach((function(t){we(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_e(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function we(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ke=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,o=(e.currentDemo,e.style);return Object(r.createElement)("div",{style:o},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40"},Object(r.createElement)("path",{d:"M25,22.67a5,5,0,0,1-10,0H0V36a3.33,3.33,0,0,0,3.33,3.33H36.67A3.33,3.33,0,0,0,40,36V22.67Z",transform:"translate(0 -0.67)",fill:"#bdc8d7"}),Object(r.createElement)("rect",{x:"2.5",y:"14",width:"35",height:"3",rx:"1.5",fill:"#0c7ab3"}),Object(r.createElement)("rect",{x:"5",y:"7",width:"30",height:"3",rx:"1.5",fill:"#3497d3"}),Object(r.createElement)("rect",{x:"7.5",width:"25",height:"3",rx:"1.5",fill:"#44acdf"}))),Object(r.createElement)("h2",null,Object(a.__)("Import Content","blocksy-companion")),Object(r.createElement)("p",null,Object(a.__)("This will import posts, pages, comments, navigation menus, custom fields, terms and custom posts","blocksy-companion")),["options","widgets","content"].map((function(e){return Object(r.createElement)(ee,{checked:t.content[e],onChange:function(){return n(Ee(Ee({},t),{},{content:Ee(Ee({},t.content),{},we({},e,!t.content[e]))}))},key:e},e.split("_").map((function(e){return e.replace(/^\w/,(function(e){return e.toUpperCase()}))})).join(" "))})),Object(r.createElement)("div",{className:"ct-demo-erase"},Object(r.createElement)(ee,{checked:t.content.erase_content,onChange:function(){return n(Ee(Ee({},t),{},{content:Ee(Ee({},t.content),{},{erase_content:!t.content.erase_content})}))}},Object(r.createElement)("div",null,Object(a.__)("Clean Install","blocksy-companion"),Object(r.createElement)("i",null,Object(a.__)("This option will remove the previous imported content and will perform a fresh and clean install.","blocksy-companion"))))))},xe=function(){var e=Object(r.useContext)(R),t=e.home_url,n=e.customizer_url;return Object(r.createElement)("div",{className:"ct-install-success"},Object(r.createElement)("h2",null,Object(a.__)("Starter Site Imported Successfully","blocksy-companion")),Object(r.createElement)("p",null,Object(a.__)("Now you can view your website or start customizing it","blocksy-companion")),Object(r.createElement)("div",null,Object(r.createElement)("a",{href:n,className:"ct-button"},Object(a.__)("Customize","blocksy-companion")),Object(r.createElement)("a",{href:t,target:"_blank",className:"ct-button-primary"},Object(a.__)("View site","blocksy-companion"))))},Se=function(e,t){var n=e.action;if("complete"===n)return"";if("import_install_child"===n)return Object(a.__)("copying child theme sources","blocksy-companion");if("import_activate_child"===n)return Object(a.__)("activating child theme","blocksy-companion");if("install_plugin"===n)return Object(a.sprintf)(Object(a.__)("installing plugin %s","blocksy-companion"),ae(e.name)||e.name);if("activate_plugin"===n)return Object(a.sprintf)(Object(a.__)("activating plugin %s","blocksy-companion"),ae(e.name)||e.name);if("download_demo_widgets"===n)return Object(a.__)("downloading demo widgets","blocksy-companion");if("apply_demo_widgets"===n)return Object(a.__)("installing demo widgets","blocksy-companion");if("download_demo_options"===n)return Object(a.__)("downloading demo options","blocksy-companion");if("import_mods_images"===n)return Object(a.__)("importing images from customizer","blocksy-companion");if("import_customizer_options"===n)return Object(a.__)("import customizer options","blocksy-companion");if("activate_required_extensions"===n)return Object(a.__)("activating required extensions","blocksy-companion");if("erase_previous_posts"===n)return Object(a.__)("removing previously installed posts","blocksy-companion");if("erase_previous_terms"===n)return Object(a.__)("removing previously installed taxonomies","blocksy-companion");if("erase_default_pages"===n)return Object(a.__)("removing default WordPress pages","blocksy-companion");if("erase_customizer_settings"===n)return Object(a.__)("resetting customizer options","blocksy-companion");if("erase_widgets_data"===n)return Object(a.__)("resetting widgets","blocksy-companion");if("content_installer_progress"===n){if(!e.kind)return"";var r=t.content.preliminary_data["".concat(e.kind,"_count")],o=t.content["".concat(e.kind,"_count")];return"".concat(Math.min(o,r)," of ").concat(r," ").concat({users:Object(a.__)("users","blocksy-companion"),term:Object(a.__)("terms","blocksy-companion"),media:Object(a.__)("images","blocksy-companion"),post:Object(a.__)("posts","blocksy-companion"),comment:Object(a.__)("comments","blocksy-companion")}[e.kind])}return""};function Ce(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 De(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ce(Object(n),!0).forEach((function(t){Pe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ae(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,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ne(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 Ne(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 Ne(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 Me=function(e){e.preventDefault(),e.returnValue=""},Le=function(e){var t=e.demoConfiguration,n=e.pluginsStatus,r=e.is_child_theme,o=e.includeMetaSteps,c=[];return void 0!==o&&o&&c.push("register_current_demo"),t.child_theme&&(r||c.push("child_theme")),t.plugins.filter((function(e){var t=e.enabled,r=e.plugin;return!!t&&!n[r]})).length>0&&c.push("plugins"),t.content.erase_content&&c.push("erase_content"),t.content.options&&c.push("options"),t.content.widgets&&c.push("widgets"),t.content.content&&c.push("content"),c.push("install_finish"),c},ze=function(e){var t=e.demoConfiguration,n=e.style,o=function(e){var t=Object(r.useContext)(Je),n=t.demos_list,o=t.currentDemo,c=(t.setCurrentDemo,t.setInstallerBlockingReleased),i=t.setCurrentlyInstalledDemo,l=t.pluginsStatus,s=Object(r.useContext)(R),u=(s.home_url,s.customizer_url,s.is_child_theme),m=(s.Link,Ae(Object(r.useState)(!1),2)),f=m[0],p=m[1],d=Ae(Object(r.useState)(0),2),b=d[0],h=d[1],y=Ae((o||"").split(":"),2),v=y[0],O=(y[1],n.filter((function(e){return e.name===v})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}))),j=e.plugins.filter((function(e){var t=e.enabled,n=e.plugin;return t&&!l[n]})).map((function(e){return e.plugin})),g=Ae(Object(r.useState)({register_current_demo:{title:Object(a.__)("Register demo","blocksy-companion"),query_string:"action=blocksy_demo_register_current_demo&wp_customize=on&demo_name=".concat(o,":").concat(null===e.builder?O[0].builder:e.builder),expected_signals:1},child_theme:{title:Object(a.__)("Child theme","blocksy-companion"),query_string:"action=blocksy_demo_install_child_theme",expected_signals:3},plugins:{title:Object(a.__)("Required plugins","blocksy-companion"),query_string:"action=blocksy_demo_activate_plugins&plugins=".concat(j.join(":")),expected_signals:2*j.length+1},fake_step:{title:Object(a.__)("Fake Required plugins","blocksy-companion"),query_string:"action=blocksy_demo_fake_step",expected_signals:6},erase_content:{title:Object(a.__)("Erase content","blocksy-companion"),query_string:"action=blocksy_demo_erase_content&wp_customize=on",expected_signals:6},install_finish:{title:Object(a.__)("Final touches","blocksy-companion"),query_string:"action=blocksy_demo_install_finish&wp_customize=on",expected_signals:1},options:{title:Object(a.__)("Import options","blocksy-companion"),query_string:"action=blocksy_demo_install_options&wp_customize=on&demo_name=".concat(o,":").concat(null===e.builder?O[0].builder:e.builder),expected_signals:5},widgets:{title:Object(a.__)("Import widgets","blocksy-companion"),query_string:"action=blocksy_demo_install_widgets&wp_customize=on&demo_name=".concat(o,":").concat(null===e.builder?O[0].builder:e.builder),expected_signals:3},content:{title:Object(a.__)("Import content","blocksy-companion"),query_string:"action=blocksy_demo_install_content&wp_customize=on&demo_name=".concat(o,":").concat(null===e.builder?O[0].builder:e.builder),expected_signals:50}}),2),_=g[0],E=g[1],w=Le({demoConfiguration:e,pluginsStatus:l,is_child_theme:u,includeMetaSteps:!0}),k=w[b],x=Ae(Object(r.useState)(0),2),S=x[0],C=x[1],D=Ae(Object(r.useState)(null),2),P=D[0],A=D[1],N=Object(r.useRef)(S),M=Object(r.useRef)(_);Object(r.useEffect)((function(){N.current=S,M.current=_}));var L=function(e){return"content"===e?1===w.length?100:50:w.indexOf("content")>-1?50/(w.length-1):100/w.length},z=w.reduce((function(e,t,n){return n>=b?e:e+L(t)}),0)+100*S/_[k].expected_signals*(L(k)/100),T=function(){var e=_[k],t=new EventSource("".concat(ctDashboardLocalizations.ajax_url,"?").concat(e.query_string));t.onmessage=function(e){var n=JSON.parse(e.data);if(C(N.current+1),"content_installer_progress"===n.action){var r=n.kind;r&&(A(n),E(De(De({},M.current),{},{content:De(De({},M.current.content),{},Pe({},"".concat(r,"_count"),M.current.content["".concat(r,"_count")]+1))})))}else A(n);if("get_content_preliminary_data"===n.action){var o=n.data,a=(o.comment_count,o.media_count,o.post_count,o.term_count,o.users,De(De({},n.data),{},{term_count:n.data.terms.length,post_count:n.data.posts.filter((function(e){return"attachment"!==e.post_type})).length,media_count:n.data.posts.filter((function(e){return"attachment"===e.post_type})).length,comment_count:n.data.posts.reduce((function(e,t){return e+(t.comments||[]).length}),0),users_count:Object.keys(n.data.authors).length}));E(De(De({},M.current),{},{content:De(De({},M.current.content),{},{preliminary_data:a,comment_count:0,media_count:0,post_count:0,term_count:0,users_count:0,expected_signals:a.comment_count+a.media_count+a.post_count+a.term_count+a.users_count+3})}))}if("complete"===n.action){if(t&&t.close&&t.close(),b===w.length-1)return p(!0),c(!0),void window.removeEventListener("beforeunload",Me);A(null),C(0),h(Math.min(w.length-1,b+1))}}};return Object(r.useEffect)((function(){f||(A(null),C(0),"fake_step"===k?(console.log("here we go delay before fake_step"),setTimeout((function(){T()}),2e3)):T())}),[k]),Object(r.useEffect)((function(){return window.addEventListener("beforeunload",Me),i({demo:"".concat(o,":").concat(e.builder)}),function(){window.removeEventListener("beforeunload",Me)}}),[]),{isCompleted:f,stepName:k,stepsDescriptors:_,lastMessage:P,progress:z}}(t),c=o.isCompleted,i=o.stepName,l=o.stepsDescriptors,s=o.lastMessage,u=o.progress;return Object(r.createElement)("div",{className:"ct-demo-install",style:n},Object(r.createElement)(A.Transition,{initial:!0,items:c,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(e){return function(t){return Object(r.createElement)("div",{style:t},e?Object(r.createElement)(xe,null):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 50 50"},Object(r.createElement)("path",{class:"g1",d:"M47,38.8c0.3-1,0.5-2,0.5-3.1c0-1.1-0.2-2.1-0.5-3.1l0.2-0.1l1.8-1.7l-1.8-3.1l-2.3,0.7l-0.2,0.1c-1.4-1.5-3.3-2.7-5.4-3.1V25l-0.6-2.4h-3.5L34.5,25v0.3c-2.1,0.5-4,1.6-5.4,3.1l-0.2-0.1l-2.3-0.7l-1.8,3.1l1.7,1.7l0.2,0.1c-0.3,1-0.5,2-0.5,3.1c0,1.1,0.2,2.1,0.5,3.1l-0.2,0.1l-1.8,1.7l1.8,3.1l2.3-0.7l0.2-0.1c1.4,1.5,3.3,2.7,5.4,3.1v0.3l0.6,2.4h3.5l0.6-2.4V46c2.1-0.5,4-1.6,5.4-3.1l0.2,0.1l2.3,0.7l1.8-3.1l-1.7-1.7L47,38.8z M36.9,41.5c-3.3,0-5.9-2.6-5.9-5.9s2.6-5.9,5.9-5.9s5.9,2.6,5.9,5.9S40.1,41.5,36.9,41.5z"}),Object(r.createElement)("path",{class:"g2",d:"M21.2,32.2c0.2-0.8,0.4-1.7,0.4-2.5c0-0.9-0.1-1.7-0.4-2.5l0.3-0.2l1.7-1.7l-1.8-3.1L19.1,23l-0.3,0.2c-1.2-1.2-2.7-2.1-4.4-2.5v-0.3l-0.6-2.4h-3.5l-0.6,2.4v0.3c-1.7,0.4-3.2,1.3-4.4,2.5L5.1,23l-2.3-0.7L1,25.4L2.7,27L3,27.2c-0.2,0.8-0.4,1.7-0.4,2.5c0,0.9,0.1,1.7,0.4,2.5l-0.3,0.1L1,34.1l1.8,3.1l2.3-0.7l0.3-0.1c1.2,1.2,2.7,2.1,4.4,2.5v0.3l0.6,2.4h3.5l0.6-2.4v-0.3c1.7-0.4,3.2-1.3,4.4-2.5l0.3,0.1l2.3,0.7l1.8-3.1l-1.7-1.7L21.2,32.2z M12.1,34.4c-2.6,0-4.7-2.1-4.7-4.7S9.5,25,12.1,25s4.7,2.1,4.7,4.7S14.7,34.4,12.1,34.4z"}),Object(r.createElement)("path",{class:"g3",d:"M37.7,15.7c0.2-0.8,0.4-1.7,0.4-2.5c0-0.9-0.1-1.7-0.4-2.5l0.3-0.2l1.7-1.7l-1.8-3.1l-2.3,0.7l-0.3,0.2c-1.2-1.2-2.7-2.1-4.4-2.5V3.8l-0.6-2.4h-3.5l-0.6,2.4v0.3c-1.7,0.4-3.2,1.3-4.4,2.5l-0.3-0.2l-2.3-0.7l-1.8,3.1l1.7,1.7l0.3,0.2c-0.2,0.8-0.4,1.7-0.4,2.5c0,0.9,0.1,1.7,0.4,2.5l-0.3,0.1l-1.7,1.7l1.8,3.1l2.3-0.7l0.3-0.1c1.2,1.2,2.7,2.1,4.4,2.5v0.3l0.6,2.4h3.5l0.6-2.4v-0.3c1.7-0.4,3.2-1.3,4.4-2.5l0.3,0.1l2.3,0.7l1.8-3.1L38,15.9L37.7,15.7z M28.6,17.9c-2.6,0-4.7-2.1-4.7-4.7s2.1-4.7,4.7-4.7s4.7,2.1,4.7,4.7S31.2,17.9,28.6,17.9z"}))),Object(r.createElement)("h2",null,Object(a.__)("Installing","blocksy-companion"),"..."),Object(r.createElement)("p",null,Object(a.__)("Please be patient and don't refresh this page, the import process may take a while, this also depends on your server.","blocksy-companion")),Object(r.createElement)("div",{className:"ct-progress-info"},l[i].title,s&&Se(s,l)?": ".concat(Se(s,l)):"",Object(r.createElement)("span",null,Math.round(u),"%")),Object(r.createElement)("div",{style:{"--progress":"".concat(u,"%")},className:"ct-installer-progress"},Object(r.createElement)("div",null))))}})))};function Te(e){return function(e){if(Array.isArray(e))return Fe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Re(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 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,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||Re(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 Re(e,t){if(e){if("string"==typeof e)return Fe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fe(e,t):void 0}}function Fe(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 Be=function(e){e.location,e.navigate;var t=Ie(Object(r.useState)(!0),2),n=(t[0],t[1],Object(r.useContext)(Je)),o=n.installerBlockingReleased,c=n.demos_list,i=n.currentDemo,s=n.pluginsStatus,u=n.currentlyInstalledDemo,m=n.setCurrentDemo,f=Object(r.useContext)(R).is_child_theme,p=Ie(Object(r.useState)(u),2),d=p[0],b=p[1],h=Ie(Object(r.useState)({builder:"",child_theme:!1,plugins:[],content:{options:!0,widgets:!0,content:!0,erase_content:!0}}),2),y=h[0],v=h[1],O=Ie(Object(r.useState)(0),2),j=O[0],g=O[1],_=Ie((i||"").split(":"),2),E=_[0],w=(_[1],["modify_demo","child_theme","builder","plugins","content","installer"].filter((function(e){if(!i)return!1;if("modify_demo"===e){if(!d)return!1;if(-1===d.demo.indexOf(E))return!1}if("child_theme"===e&&f)return!1;var t=c.filter((function(e){return e.name===E})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}));return("plugins"!==e||0!==t.reduce((function(e,t){return[].concat(Te(e),Te(t.plugins||[]))}),[]).filter((function(e){return!s[e]})).length)&&("builder"!==e||t.length>1)}))),k=w[j];return Object(r.useEffect)((function(){if(E&&!(i.indexOf(":hide")>-1)){var e=c.filter((function(e){return e.name===E})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}));g(0),b(u),v({builder:1===e.length?e[0].builder:null,child_theme:!0,plugins:e[0].plugins.map((function(e){return{plugin:e,enabled:!0}})),content:{options:!0,widgets:!0,content:!0,erase_content:!0}})}}),[i]),Object(r.createElement)(M,{items:i,isVisible:function(e){return e&&-1===e.indexOf(":hide")},className:l()("ct-demo-modal",{"ct-demo-installer":"installer"===k||"modify_demo"===k}),onDismiss:function(){("installer"!==k||o)&&m("".concat(E,":hide"))},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content ct-demo-step-container"},Object(r.createElement)("div",{className:"ct-current-step"},Object(r.createElement)(A.Transition,{items:k,from:{opacity:0},enter:{opacity:1},leave:{opacity:0},initial:!1,config:function(e,t){return"leave"===t?{duration:150}:{delay:150,duration:150}}},(function(e){return function(t){return Object(r.createElement)(r.Fragment,null,"modify_demo"===e&&Object(r.createElement)(me,{demoConfiguration:y,nextStep:function(){g(Math.min(j+1,w.length-1))},style:t}),"child_theme"===e&&Object(r.createElement)(be,{style:t,demoConfiguration:y,setDemoConfiguration:v}),"plugins"===e&&Object(r.createElement)(ie,{demoConfiguration:y,style:t,setDemoConfiguration:v}),"builder"===e&&Object(r.createElement)(ge,{style:t,demoConfiguration:y,setDemoConfiguration:v}),"content"===e&&Object(r.createElement)(ke,{style:t,demoConfiguration:y,setDemoConfiguration:v}),"installer"===e&&Object(r.createElement)(ze,{style:t,demoConfiguration:y}))}}))),"installer"!==k&&"modify_demo"!==k&&Object(r.createElement)("div",{className:"ct-demo-step-controls"},j>0&&Object(r.createElement)("button",{className:"ct-demo-btn demo-back-btn",onClick:function(){g(Math.max(j-1,0))}},Object(a.__)("Back","blocksy-companion")),w.length>2&&Object(r.createElement)("ul",{className:"ct-steps-pills"},w.map((function(e,t){return t===w.length-1?null:Object(r.createElement)("li",{className:l()({active:e===k}),key:e},t+1)}))),Object(r.createElement)("button",{className:"ct-demo-btn demo-main-btn",disabled:"content"===k&&0===Le({demoConfiguration:y,pluginsStatus:s,is_child_theme:f}).length,onClick:function(){g(Math.min(j+1,w.length-1))}},"content"===k?Object(a.__)("Install","blocksy-companion"):Object(a.__)("Next","blocksy-companion"))))}})},Ue=n(7),Ve=n.n(Ue);function He(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function qe(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,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}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 Ze=function(){var e=qe(Object(r.useState)(!1),2),t=e[0],n=e[1],o=qe(Object(r.useState)(!1),2),c=o[0],i=o[1],l=qe(Object(r.useState)(""),2),s=l[0],u=l[1],m=qe(Object(r.useState)(""),2),f=m[0],p=m[1],d=qe(Object(r.useState)("coblocks,elementor,contact-form-7"),2),b=d[0],h=d[1],y=qe(Object(r.useState)(""),2),v=y[0],O=y[1],j=qe(Object(r.useState)(!1),2),g=j[0],_=j[1],E=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,r,o,c,a,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(!0),(t=new FormData).append("action","blocksy_demo_export"),t.append("name",s),t.append("is_pro",g),t.append("url",v),t.append("builder",f),t.append("plugins",b),t.append("wp_customize","on"),e.prev=9,e.next=12,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 12:if(200!==(r=e.sent).status){e.next=20;break}return e.next=16,r.json();case 16:o=e.sent,c=o.success,a=o.data,c&&(i=new Blob([JSON.stringify(a.demo)],{type:"text/plain;charset=utf-8"}),Ve.a.saveAs(i,"".concat(s,".json")));case 20:e.next=24;break;case 22:e.prev=22,e.t0=e.catch(9);case 24:n(!1);case 25:case"end":return e.stop()}}),e,null,[[9,22]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function a(e){He(c,r,o,a,i,"next",e)}function i(e){He(c,r,o,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return ct_localizations.is_dev_mode?Object(r.createElement)("div",{className:"ct-export"},Object(r.createElement)("button",{className:"ct-button",onClick:function(e){i(!0)}},Object(a.__)("Site export")),Object(r.createElement)(M,{items:c,className:"ct-site-export-modal",onDismiss:function(){return i(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-site-export"},Object(r.createElement)("label",null,Object(a.__)("Name","blocksy-companion"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Name","blocksy-companion"),value:s,onChange:function(e){var t=e.target.value;return u(t)}})),Object(r.createElement)("label",null,Object(a.__)("Preview URL","blocksy-companion"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Preview URL","blocksy-companion"),value:v,onChange:function(e){var t=e.target.value;return O(t)}})),Object(r.createElement)("label",null,Object(a.__)("PRO","blocksy-companion"),Object(r.createElement)("input",{type:"checkbox",value:g,onChange:function(e){e.target.value;return _(!g)}})),Object(r.createElement)("label",null,Object(a.__)("Builder","blocksy-companion"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Builder","blocksy-companion"),value:f,onChange:function(e){var t=e.target.value;return p(t)}})),Object(r.createElement)("label",null,Object(a.__)("Plugins","blocksy-companion"),Object(r.createElement)("textarea",{placeholder:Object(a.__)("Plugins","blocksy-companion"),value:b,onChange:function(e){var t=e.target.value;return h(t)}})),Object(r.createElement)("button",{className:"ct-button",disabled:t,onClick:function(){return E()}},t?Object(a.__)("Loading...","blocksy-companion"):Object(a.__)("Export site","blocksy-companion")))}})):null};function $e(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function Ge(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,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ke(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 Ke(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 Ke(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 Je=Object(r.createContext)({demos:[]}),Ye=null,Xe=null,Qe=function(e){e.children,e.path,e.location;var t=Ge(Object(r.useState)(!Ye),2),n=t[0],o=t[1],c=Ge(Object(r.useState)(Ye||[]),2),i=c[0],l=c[1],s=Ge(Object(r.useState)(Xe||{}),2),u=s[0],m=s[1],f=Ge(Object(r.useState)(null),2),p=f[0],d=f[1],b=Ge(Object(r.useState)(null),2),h=b[0],y=b[1],v=Ge(Object(r.useState)(!1),2),O=v[0],j=v[1],g=Ge(Object(r.useState)({builder:""}),2),_=(g[0],g[1],Ge(Object(r.useState)(!1),2)),E=_[0],w=_[1],k=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,c,a,i=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.length>0&&void 0!==i[0]&&i[0]&&o(!0),(t=new FormData).append("action","blocksy_demo_list"),e.prev=4,e.next=7,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 7:if(200!==(n=e.sent).status){e.next=15;break}return e.next=11,n.json();case 11:r=e.sent,c=r.success,a=r.data,c&&(l(a.demos),m(a.active_plugins),y(a.current_installed_demo),j(a.demo_error),Xe=a.active_plugins,Ye=a.demos,a.demo_error);case 15:e.next=19;break;case 17:e.prev=17,e.t0=e.catch(4);case 19:o(!1);case 20:case"end":return e.stop()}}),e,null,[[4,17]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function a(e){$e(c,r,o,a,i,"next",e)}function i(e){$e(c,r,o,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.useEffect)((function(){k(!Ye)}),[]),Object(r.createElement)("div",{className:"ct-demos-list-container"},O&&Object(r.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:O}}),Object(r.createElement)(A.Transition,{items:n,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(e){return e?function(e){return Object(r.createElement)(A.animated.p,{style:e,className:"ct-loading-text"},Object(r.createElement)("span",null),Object(a.__)("Loading Starter Sites...","blocksy-companion"))}:0===i.length?function(e){return Object(r.createElement)(A.animated.div,{style:e},Object(r.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:Object(a.__)("The connection to our <b>demo.creativethemes.com</b> server didn't worked. This connection is required for importing the starter sites from our demo content server. All you have to do is to contact your hosting provider and ask them to white list our demo server address.","blocksy-companion")}}),Object(r.createElement)(q,null))}:function(e){return Object(r.createElement)(A.animated.div,{style:e},Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Je.Provider,{value:{demo_error:O,demos_list:i.filter((function(e){return!e.dev||ct_localizations.is_dev_mode})),currentDemo:p,pluginsStatus:u,installerBlockingReleased:E,setInstallerBlockingReleased:w,setCurrentDemo:d,currentlyInstalledDemo:h,setCurrentlyInstalledDemo:y}},Object(r.createElement)(le,null),Object(r.createElement)(Be,null),Object(r.createElement)(Ze,null)),Object(r.createElement)(q,null)))}})))};function et(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}var tt=function(){var e=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,o,c,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).append("action","blocksy_fs_connect_again"),e.prev=2,e.next=5,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 5:if(200!==(n=e.sent).status){e.next=13;break}return e.next=9,n.json();case 9:r=e.sent,o=r.success,r.data,o&&((c=document.createElement("div")).innerHTML=ctDashboardLocalizations.plugin_data.connect_template,a=c.querySelector("form"),document.body.appendChild(a),a.submit());case 13:e.next=17;break;case 15:e.prev=15,e.t0=e.catch(2);case 17:case"end":return e.stop()}}),e,null,[[2,15]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function a(e){et(c,r,o,a,i,"next",e)}function i(e){et(c,r,o,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.createElement)("div",{className:"ct-freemius-optin-message"},Object(r.createElement)("i",null,Object(r.createElement)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},Object(r.createElement)("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),Object(r.createElement)("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"}))),Object(r.createElement)("h2",null,Object(a.__)("Stay Updated","blocksy-companion")),Object(r.createElement)("p",null,Object(a.__)("Never miss an important update - opt in to our security & feature updates notifications, and non-sensitive diagnostic tracking.","blocksy-companion")),Object(r.createElement)("button",{className:"ct-button-primary",onClick:function(t){t.preventDefault(),e()}},Object(a.__)("Allow & Continue","blocksy-companion")))};c.a.on("ct:dashboard:routes",(function(e){e.push({Component:function(){return Object(r.createElement)(Q,null)},path:"/extensions"}),"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&e.push({Component:function(e){return Object(r.createElement)(Qe,e)},path:"/demos"})})),c.a.on("ct:dashboard:navigation-links",(function(e){"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&e.push({text:Object(a.__)("Starter Sites","blocksy-companion"),path:"demos",getProps:function(e){var t=e.isPartiallyCurrent;e.isCurrent;return t?{"aria-current":"page"}:{}}}),e.push({text:Object(a.__)("Extensions","blocksy-companion"),path:"/extensions"})})),c.a.on("ct:dashboard:home:before",(function(e){ctDashboardLocalizations.plugin_data.is_anonymous&&(e.content=Object(r.createElement)(tt,null))})),c.a.on("ct:dashboard:heading:after",(function(e){ctDashboardLocalizations.plugin_data.is_pro&&(e.content=Object(r.createElement)("span",null,"PRO"))}))}]);
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 c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===c)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}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){e.exports=window.ctEvents},function(e,t){e.exports=window.React},function(e,t,n){var r,o,c=n(11),a=n(12),i=(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 l(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),u={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},m={activate:function(e){if(u.active)return;g(),u.active=!0,u.paused=!1,u.nodeFocusedBeforeActivation=n.activeElement;var t=e&&e.onActivate?e.onActivate:s.onActivate;t&&t();return p(),m},deactivate:f,pause:function(){if(u.paused||!u.active)return;u.paused=!0,d()},unpause:function(){if(!u.paused||!u.active)return;u.paused=!1,g(),p()}};return m;function f(e){if(u.active){clearTimeout(r),d(),u.active=!1,u.paused=!1,i.deactivateTrap(m);var t=e&&void 0!==e.onDeactivate?e.onDeactivate:s.onDeactivate;return t&&t(),(e&&void 0!==e.returnFocus?e.returnFocus:s.returnFocusOnDeactivate)&&l((function(){var e;_((e=u.nodeFocusedBeforeActivation,b("setReturnFocus")||e))})),m}}function p(){if(u.active)return i.activateTrap(m),r=l((function(){_(h())})),n.addEventListener("focusin",v,!0),n.addEventListener("mousedown",y,{capture:!0,passive:!1}),n.addEventListener("touchstart",y,{capture:!0,passive:!1}),n.addEventListener("click",j,{capture:!0,passive:!1}),n.addEventListener("keydown",O,{capture:!0,passive:!1}),m}function d(){if(u.active)return n.removeEventListener("focusin",v,!0),n.removeEventListener("mousedown",y,!0),n.removeEventListener("touchstart",y,!0),n.removeEventListener("click",j,!0),n.removeEventListener("keydown",O,!0),m}function b(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 h(){var e;if(!(e=null!==b("initialFocus")?b("initialFocus"):o.contains(n.activeElement)?n.activeElement:u.firstTabbableNode||b("fallbackFocus")))throw new Error("Your focus-trap needs to have at least one focusable element");return e}function y(e){o.contains(e.target)||(s.clickOutsideDeactivates?f({returnFocus:!c.isFocusable(e.target)}):s.allowOutsideClick&&s.allowOutsideClick(e)||e.preventDefault())}function v(e){o.contains(e.target)||e.target instanceof Document||(e.stopImmediatePropagation(),_(u.mostRecentlyFocusedNode||h()))}function O(e){if(!1!==s.escapeDeactivates&&function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e))return e.preventDefault(),void f();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){if(g(),e.shiftKey&&e.target===u.firstTabbableNode)return e.preventDefault(),void _(u.lastTabbableNode);if(!e.shiftKey&&e.target===u.lastTabbableNode)e.preventDefault(),_(u.firstTabbableNode)}(e)}function j(e){s.clickOutsideDeactivates||o.contains(e.target)||s.allowOutsideClick&&s.allowOutsideClick(e)||(e.preventDefault(),e.stopImmediatePropagation())}function g(){var e=c(o);u.firstTabbableNode=e[0]||h(),u.lastTabbableNode=e[e.length-1]||h()}function _(e){e!==n.activeElement&&(e&&e.focus?(e.focus(),u.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):_(h()))}}},function(e,t,n){(function(n){var r,o,c;o=[],void 0===(c="function"==typeof(r=function(){"use strict";function t(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){a(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function r(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function o(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var c="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,a=c.saveAs||("object"!=typeof window||window!==c?function(){}:"download"in HTMLAnchorElement.prototype?function(e,n,a){var i=c.URL||c.webkitURL,l=document.createElement("a");n=n||e.name||"download",l.download=n,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?o(l):r(l.href)?t(e,n,a):o(l,l.target="_blank")):(l.href=i.createObjectURL(e),setTimeout((function(){i.revokeObjectURL(l.href)}),4e4),setTimeout((function(){o(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,c){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,c),n);else if(r(e))t(e,n,c);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout((function(){o(a)}))}}:function(e,n,r,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,r);var a="application/octet-stream"===e.type,i=/constructor/i.test(c.HTMLElement)||c.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||a&&i)&&"object"==typeof FileReader){var s=new FileReader;s.onloadend=function(){var e=s.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},s.readAsDataURL(e)}else{var u=c.URL||c.webkitURL,m=u.createObjectURL(e);o?o.location=m:location.href=m,o=null,setTimeout((function(){u.revokeObjectURL(m)}),4e4)}});c.saveAs=a.saveAs=a,e.exports=a})?r.apply(t,o):r)||(e.exports=c)}).call(this,n(13))},function(e,t,n){e.exports=n(9)()},function(e,t,n){"use strict";var r=n(10);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,a){if(a!==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:c,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 c(e,t){t=t||{};var n,c,i,l=[],m=[],f=e.querySelectorAll(r);for(t.includeContainer&&o.call(e,r)&&(f=Array.prototype.slice.apply(f)).unshift(e),n=0;n<f.length;n++)a(c=f[n])&&(0===(i=s(c))?l.push(c):m.push({documentOrder:n,tabIndex:i,node:c}));return m.sort(u).map((function(e){return e.node})).concat(l)}function a(e){return!(!i(e)||function(e){return function(e){return m(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 m(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}c.isTabbable=function(e){if(!e)throw new Error("No node provided");return!1!==o.call(e,r)&&a(e)},c.isFocusable=function(e){if(!e)throw new Error("No node provided");return!1!==o.call(e,l)&&i(e)};var l=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 u(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function m(e){return"INPUT"===e.tagName}e.exports=c},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){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n.n(o),a=n(1),i=n(2),l=n.n(i),s=n(5),u=n.n(s);n(8);function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(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 p=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"])},d=function(e){function t(){var n,r;m(this,t);for(var o=arguments.length,c=Array(o),a=0;a<o;a++)c[a]=arguments[a];return n=r=f(this,e.call.apply(e,[this].concat(c))),b.call(r),f(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:p(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:p(e),nextState:t})},t.prototype.componentWillUnmount=function(){this.props.willUnmount&&this.props.willUnmount({state:this.state,props:p(this.props),refs:this._refs})},t.prototype.componentDidUpdate=function(e,t,n){this.props.didUpdate&&this.props.didUpdate(Object.assign(this.getArgs(),{prevProps:p(e),prevState:t}),n)},t.prototype.getSnapshotBeforeUpdate=function(e,t){return this.props.getSnapshotBeforeUpdate?this.props.getSnapshotBeforeUpdate(Object.assign(this.getArgs(),{prevProps:p(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}(u.a.Component);d.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)}},h=d,y=function(e){var t=e.children,n=e.container,o=void 0===n?document.body:n,c=e.type,a=void 0===c?"reach-portal":c;return Object(r.createElement)(h,{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 v=function(e,t){return function(n){if(e&&e(n),!n.defaultPrevented)return t(n)}},O=n(6),j=n.n(O);function g(){return(g=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,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var E=function(){},w=function(){},k=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=j()(e.overlayNode,{initialFocus:t?function(){return t.current}:void 0,fallbackFocus:e.contentNode,escapeDeactivates:!1,clickOutsideDeactivates:!1})},x=function(e){var t=e.refs;t.trap.deactivate(),t.disposeAriaHider()},S=React.createContext(),C=React.forwardRef((function(e,t){var n=e.container,o=e.isOpen,c=void 0===o||o,a=e.onDismiss,i=void 0===a?E:a,l=e.initialFocusRef,s=e.onClick,u=e.onKeyDown,m=_(e,["container","isOpen","onDismiss","initialFocusRef","onClick","onKeyDown"]);return Object(r.createElement)(h,{didMount:w},c?Object(r.createElement)(y,{container:n,"data-reach-dialog-wrapper":!0},Object(r.createElement)(h,{refs:{overlayNode:null,contentNode:null},didMount:function(e){var t=e.refs;k(t,l)},willUnmount:x},(function(e){var n=e.refs;return Object(r.createElement)(S.Provider,{value:function(e){return n.contentNode=e}},Object(r.createElement)("div",g({"data-reach-dialog-overlay":!0,onClick:v(s,(function(e){e.stopPropagation(),i()})),onKeyDown:v(u,(function(e){"Escape"===e.key&&(e.stopPropagation(),i())})),ref:function(e){n.overlayNode=e,t&&t(e)}},m)))}))):null)}));C.propTypes={initialFocusRef:function(){}};var D=function(e){return e.stopPropagation()},P=React.forwardRef((function(e,t){var n=e.onClick,o=(e.onKeyDown,_(e,["onClick","onKeyDown"]));return Object(r.createElement)(S.Consumer,null,(function(e){return Object(r.createElement)("div",g({"aria-modal":"true","data-reach-dialog-content":!0,tabIndex:"-1",onClick:v(n,D),ref:function(n){e(n),t&&t(n)}},o))}))})),A=n(3),N=function(e){return!!e},M=function(e){var t=e.items,n=e.isVisible,o=void 0===n?N:n,c=e.render,a=e.className,i=e.onDismiss;return Object(r.createElement)(A.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)(C,{style:{opacity:t.opacity},container:document.querySelector("#wpbody"),onDismiss:function(){return i()}},Object(r.createElement)(P,{className:l()("ct-admin-modal",a),style:{transform:"translate3d(0px, ".concat(t.y,"px, 0px)")}},Object(r.createElement)("button",{className:"close-button",onClick:function(){return i()}},"×"),c(e,t)))}}))};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,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return z(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 z(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 z(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 T=function(e){var t=L(Object(r.useState)(!1),2),n=t[0],o=t[1];return[function(){return o(!0)},Object(r.createElement)(M,{items:n,onDismiss:function(){return o(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content",dangerouslySetInnerHTML:{__html:e.readme}})}})]},I=window.ctDashboardLocalizations.DashboardContext,R=(I.Provider,I.Consumer,I);function F(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function B(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function a(e){F(c,r,o,a,i,"next",e)}function i(e){F(c,r,o,a,i,"throw",e)}a(void 0)}))}}function U(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,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return V(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 V(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 V(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 H=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=Object(r.useState)(!1),o=U(n,2),c=o[0],i=o[1],l=Object(r.useState)(!1),s=U(l,2),u=s[0],m=s[1],f=Object(r.useContext)(R),p=(f.Link,f.history),d=ctDashboardLocalizations.plugin_data.is_pro,b=function(){var n=B(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(d||!e.config.pro){n.next=3;break}return m(!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,b,!d&&e.config.pro?Object(r.createElement)(M,{items:u,className:"ct-onboarding-modal",onDismiss:function(){return m(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("svg",{width:"55",height:"55",viewBox:"0 0 40.5 48.3"},Object(r.createElement)("path",{fill:"#2d82c8",d:"M33.4 29.4l7.1 12.3-7.4.6-4 6-7.3-12.9"}),Object(r.createElement)("path",{d:"M33.5 29.6L26 42.7l-4.2-7.3 11.6-6 .1.2zM0 41.7l7.5.6 3.9 6 7.2-12.4-11-7.3L0 41.7z",fill:"#2271b1"}),Object(r.createElement)("path",{d:"M39.5 18.7c0 1.6-2.4 2.8-2.7 4.3-.4 1.5 1 3.8.2 5.1-.8 1.3-3.4 1.2-4.5 2.3-1.1 1.1-1 3.7-2.3 4.5-1.3.8-3.6-.6-5.1-.2-1.5.4-2.7 2.7-4.3 2.7S18 35 16.5 34.7c-1.5-.4-3.8 1-5.1.2s-1.2-3.4-2.3-4.5-3.7-1-4.5-2.3.6-3.6.2-5.1-2.7-2.7-2.7-4.3 2.4-2.8 2.7-4.3c.4-1.5-1-3.8-.2-5.1C5.4 8 8.1 8.1 9.1 7c1.1-1.1 1-3.7 2.3-4.5s3.6.6 5.1.2C18 2.4 19.2 0 20.8 0c1.6 0 2.8 2.4 4.3 2.7 1.5.4 3.8-1 5.1-.2 1.3.8 1.2 3.4 2.3 4.5 1.1 1.1 3.7 1 4.5 2.3s-.6 3.6-.2 5.1c.3 1.5 2.7 2.7 2.7 4.3z",fill:"#599fd9"}),Object(r.createElement)("path",{d:"M23.6 7c-6.4-1.5-12.9 2.5-14.4 8.9-.7 3.1-.2 6.3 1.5 9.1 1.7 2.7 4.3 4.6 7.4 5.4.9.2 1.9.3 2.8.3 2.2 0 4.4-.6 6.3-1.8 2.7-1.7 4.6-4.3 5.4-7.5C34 15 30 8.5 23.6 7zm7 14c-.6 2.6-2.2 4.8-4.5 6.2-2.3 1.4-5 1.8-7.6 1.2-2.6-.6-4.8-2.2-6.2-4.5-1.4-2.3-1.8-5-1.2-7.6.6-2.6 2.2-4.8 4.5-6.2 1.6-1 3.4-1.5 5.2-1.5.8 0 1.5.1 2.3.3 5.4 1.3 8.7 6.7 7.5 12.1zm-8.2-4.5l3.7.5-2.7 2.7.7 3.7-3.4-1.8-3.3 1.8.6-3.7-2.7-2.7 3.8-.5 1.6-3.4 1.7 3.4z",fill:"#fff"})),Object(r.createElement)("h2",{className:"ct-modal-title"},"This is a Pro extension"),Object(r.createElement)("p",null,Object(a.__)("Upgrade to the Pro version and get instant access to all premium extensions, features and future updates.","blocksy-companion")),Object(r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},Object(r.createElement)("a",{onClick:function(e){e.preventDefault(),m(!1),setTimeout((function(){p.navigate("/pro")}),300)},className:"button"},Object(a.__)("Free vs Pro","blocksy")),Object(r.createElement)("a",{href:"https://creativethemes.com/blocksy/pricing/",target:"_blank",className:"button button-primary"},Object(a.__)("Upgrade Now","blocksy-companion"))))}}):null]},q=function(){return ctDashboardLocalizations.plugin_data.hide_support_section?null:Object(r.createElement)("div",{className:"ct-support-container"},Object(r.createElement)("h2",null,Object(a.__)("Need help or advice?","blocksy-companion")),Object(r.createElement)("p",null,Object(a.__)("Got a question or need help with the theme? You can always submit a support ticket or ask for help in our friendly Facebook community.","blocksy-companion")),Object(r.createElement)("a",{href:ctDashboardLocalizations.support_url,className:"ct-button","data-hover":"blue",target:"_blank"},Object(a.__)("Submit a Support Ticket","blocksy-companion")),Object(r.createElement)("a",{href:"https://www.facebook.com/groups/blocksy.community",className:"ct-button","data-hover":"blue",target:"_blank"},Object(a.__)("Join Facebook Community","blocksy-companion")))};function W(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 Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach((function(t){$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function K(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,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return J(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 J(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 J(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 Y=null,X=function(e){var t=e.extension,n=e.onExtsSync,o=K(T(t),2),c=o[0],i=o[1],s=K(H(t,(function(){n()})),3),u=s[0],m=s[1],f=s[2];return Object(r.createElement)("li",{className:l()({active:!!t.__object})},Object(r.createElement)("h4",{className:"ct-extension-title"},t.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"})))))),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:l()(t.__object?"ct-button":"ct-button-primary"),"data-hover":"white",disabled:u,onClick:function(){m()}},t.__object?Object(a.__)("Deactivate","blocksy-companion"):Object(a.__)("Activate","blocksy-companion")),t.readme&&Object(r.createElement)("button",{onClick:function(){return c()},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"}))),t.__object&&t.config&&t.config.buttons&&t.config.buttons.map((function(e,t){var n=e.text,o=e.url;return Object(r.createElement)("a",{href:o,className:"ct-button ct-config-btn",dataButton:"white"},n)}))),i,f)},Q=function(){var e=K(Object(r.useState)(!Y),2),t=e[0],n=e[1],o=K(Object(r.useState)(Y||[]),2),i=o[0],s=o[1],u=K(Object(r.useState)(!1),2),m=u[0],f=u[1],p=K(Object(r.useState)("free"),2),d=p[0],b=p[1],h=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,r,o,c,a,i,l,u,m,p=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=p.length>0&&void 0!==p[0]?p[0]:{},r=Z({verbose:!1,extension:null,extAction:null},t),o=r.verbose,c=r.extension,a=r.extAction,o&&n(!0),f(!0),e.next=6,fetch("".concat(wp.ajax.settings.url,"?action=blocksy_extensions_status"),Z({method:"POST"},c&&a?{body:JSON.stringify({extension:c,extAction:a})}:{}));case 6:if(200===(i=e.sent).status){e.next=9;break}return e.abrupt("return");case 9:return e.next=11,i.json();case 11:if(l=e.sent,u=l.success,m=l.data,u){e.next=16;break}return e.abrupt("return");case 16:if(f(!1),n(!1),s(m),Y=m,!c){e.next=22;break}return e.abrupt("return",m[c]);case 22:return e.abrupt("return",m);case 23:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function a(e){G(c,r,o,a,i,"next",e)}function i(e){G(c,r,o,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();Object(r.useEffect)((function(){h({verbose:!Y});var e=function(){h()};return c.a.on("blocksy_exts_sync_exts",e),function(){c.a.off("blocksy_exts_sync_exts",e)}}),[]);var y=Object(r.useMemo)((function(){return Object.values(i).map((function(e,t){return Z(Z({},e),{},{name:Object.keys(i)[t]})})).find((function(e){return e.config.pro}))}),[i]),v=Object(r.useMemo)((function(){return Object.values(i).map((function(e,t){return Z(Z({},e),{},{name:Object.keys(i)[t]})})).filter((function(e){return!e.config.hidden})).filter((function(e){var t=e.config;return"free"===d?!t.pro:t.pro}))}),[d,i]);return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"ct-extensions-container"},Object(r.createElement)(A.Transition,{items:t,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],initial:null,config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(e){return e?function(e){return Object(r.createElement)(A.animated.p,{style:e,className:"ct-loading-text"},Object(r.createElement)("span",null),Object(a.__)("Loading Extensions Status...","blocksy-companion"))}:function(e){return Object(r.createElement)(A.animated.div,{style:e},Object(r.createElement)(r.Fragment,null,y&&Object(r.createElement)("ul",{className:"ct-extensions-sourse"},["free","pro"].map((function(e){return Object(r.createElement)("li",{key:e,onClick:function(){return b(e)},className:l()({active:e===d})},{free:Object(a.__)("Free Extensions","blocksy-companion"),pro:Object(a.__)("Pro Extensions","blocksy-companion")}[e])}))),Object(r.createElement)("ul",{className:l()("ct-extensions-list",{"is-pro":"pro"===d})},v.map((function(e){var t={extension:X};return c.a.trigger("ct:extensions:card",{CustomComponent:t,extension:e}),Object(r.createElement)(t.extension,{key:e.name,extension:e,extsSyncLoading:m,onExtsSync:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.extAction||(i[e.name].__object=!i[e.name].__object,s(i)),h(Z(Z({},t),{},{extension:e.name}))}})}))),Object(r.createElement)(q,null)))}}))))},ee=function(e){var t=e.children,n=e.activated,o=e.checked,c=e.onChange;return Object(r.createElement)("div",{onClick:function(){return c()},className:l()("ct-checkbox-container",{activated:n})},t,Object(r.createElement)("span",{className:l()("ct-checkbox",{active:o})},Object(r.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},Object(r.createElement)("polyline",{class:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))))};function te(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 ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oe(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,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ce(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 ce(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 ce(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){return({coblocks:"CoBlocks","contact-form-7":"Contact Form 7",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","wpforms-lite":"WPForms - Contact Form","simply-gallery-block":"SimpLy Gallery Block & Lightbox","recipe-card-blocks-by-wpzoom":"Recipe Card Blocks by WPZOOM","stackable-ultimate-gutenberg-blocks":"Stackable – Gutenberg Blocks","map-block-gutenberg":"Map Block for Google Maps","mb-custom-post-type":"MB Custom Post Types & Custom Taxonomies",leadin:"HubSpot","block-slider":"Block Slider"}[e]||e).replace(/\b\w/,(function(e){return e.toUpperCase()}))},ie=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,o=e.style,c=Object(r.useContext)(Je),i=c.currentDemo,l=c.demos_list,s=c.pluginsStatus,u=(c.setCurrentDemo,oe((i||"").split(":"),2)),m=u[0];u[1],l.filter((function(e){return e.name===m||""}));return Object(r.createElement)("div",{style:o},Object(r.createElement)("div",{className:"ct-demo-plugins"},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40"},Object(r.createElement)("path",{fill:"#0C7AB3",d:"M20,0v7.6c0,0.3-0.2,0.5-0.5,0.5h-1.5c0,0,0,0,0,0c0,0,0,0-0.1,0c0,0,0,0-0.1,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c-0.5-0.7-1.3-1.1-2.1-1.1c-1.5,0-2.6,1.2-2.6,2.6c0,1.5,1.2,2.6,2.6,2.6c0.8,0,1.6-0.4,2.1-1.1c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0.1,0c0,0,0,0,0.1,0c0,0,0,0,0,0h1.5c0,0,0,0,0,0c0.3,0,0.5,0.2,0.5,0.5V20h8.1v-0.8c-0.8-0.7-1.3-1.7-1.3-2.8c0-2,1.7-3.7,3.7-3.7c2,0,3.7,1.7,3.7,3.7c0,1.1-0.5,2.1-1.3,2.8V20H40C40,9,31,0,20,0z"}),Object(r.createElement)("path",{fill:"#3497D3",d:"M20,40v-7.6c0-0.3,0.2-0.5,0.5-0.5h1.5c0,0,0,0,0,0c0,0,0,0,0.1,0c0,0,0,0,0.1,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0.5,0.7,1.3,1.1,2.1,1.1c1.5,0,2.6-1.2,2.6-2.6c0-1.5-1.2-2.6-2.6-2.6c-0.8,0-1.6,0.4-2.1,1.1c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0,0,0c0,0,0,0-0.1,0c0,0,0,0-0.1,0c0,0,0,0,0,0h-1.5c0,0,0,0,0,0c-0.3,0-0.5-0.2-0.5-0.5V20h-8.1v0.8c0.8,0.7,1.3,1.7,1.3,2.8c0,2-1.7,3.7-3.7,3.7c-2,0-3.7-1.7-3.7-3.7c0-1.1,0.5-2.1,1.3-2.8V20H0C0,31,9,40,20,40z"}))),Object(r.createElement)("h2",null,Object(a.__)("Install & Activate Plugins","blocksy-companion")),Object(r.createElement)("p",null,Object(a.__)("The following plugins are required for this starter site in order to work properly.","blocksy-companion")),t.plugins.map((function(e){var o=e.plugin,c=e.enabled;return Object(r.createElement)(r.Fragment,{key:o},!s[o]&&Object(r.createElement)(ee,{key:o,checked:c,onChange:function(){return n(ne(ne({},t),{},{plugins:t.plugins.map((function(e){return e.plugin===o?ne(ne({},e),{},{enabled:!c}):e}))}))}},ae(o)),s[o]&&Object(r.createElement)(ee,{activated:!0,checked:!0,onChange:function(){}},ae(o)))}))))},le=function(){var e=Object(r.useContext)(Je),t=e.currentlyInstalledDemo,n=e.demos_list,o=e.setCurrentDemo,c=e.demo_error,i=e.setInstallerBlockingReleased;Object(r.useContext)(R).Link;return Object(r.createElement)("ul",null,n.filter((function(e,t){return n.map((function(e){return e.name})).indexOf(e.name)===t})).map((function(e){return Object(r.createElement)("li",{key:e.name,className:l()("ct-single-demo",{"ct-is-pro":e.is_pro})},Object(r.createElement)("figure",null,Object(r.createElement)("img",{src:e.screenshot}),Object(r.createElement)("section",null,Object(r.createElement)("h3",null,Object(a.__)("Available for","blocksy-companion")),Object(r.createElement)("div",null,n.filter((function(t){return t.name===e.name||""})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0})).map((function(e){var t=e.builder;return Object(r.createElement)("span",{key:t},ae(t)||"Gutenberg")})))),e.is_pro&&Object(r.createElement)("a",{onClick:function(e){return e.preventDefault()},href:"#"},"PRO")),Object(r.createElement)("div",{className:"ct-demo-actions"},Object(r.createElement)("h4",null,e.name),Object(r.createElement)("div",null,Object(r.createElement)("a",{className:"ct-button",target:"_blank",href:e.url},Object(a.__)("Preview","blocksy-companion")),Object(r.createElement)("button",{className:"ct-button-primary",onClick:function(){i(!1),o(e.name)},disabled:!!c},t&&t.demo.indexOf(e.name)>-1?Object(a.__)("Modify","blocksy-companion"):Object(a.__)("Import","blocksy-companion")))))})))};function se(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,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ue(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 ue(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 ue(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 me=function(e){var t=e.style,n=e.nextStep,o=(Object(r.useContext)(R).is_child_theme,Object(r.useContext)(Je)),c=o.setCurrentlyInstalledDemo,i=o.setCurrentDemo,l=o.currentDemo,s=o.demos_list,u=se(Object(r.useState)(0),2),m=u[0],f=u[1],p=se(Object(r.useState)("idle"),2),d=p[0],b=p[1],h=se((l||"").split(":"),2),y=h[0],v=(h[1],s.filter((function(e){return e.name===y}))),O={erase_content:{title:Object(a.__)("Erase content","blocksy-companion"),query_string:"action=blocksy_demo_erase_content&wp_customize=on"},deactivate_demo_plugins:{title:Object(a.__)("Deactivate demo plugins","blocksy-companion"),query_string:"action=blocksy_demo_deactivate_plugins&plugins=".concat(v[0].plugins.join(":"))},deregister_current_demo:{title:Object(a.__)("Erase content","blocksy-companion"),query_string:"action=blocksy_demo_deregister_current_demo"}},j=["erase_content","deactivate_demo_plugins","deregister_current_demo"],g=j[m],_=function(){var e=O[g],t=new EventSource("".concat(ctDashboardLocalizations.ajax_url,"?").concat(e.query_string));t.onmessage=function(e){if("complete"===JSON.parse(e.data).action){if(t&&t.close&&t.close(),m===j.length-1)return void b("done");f(Math.min(j.length-1,m+1))}}};return Object(r.useEffect)((function(){0!==m&&"done"!==d&&_()}),[g]),Object(r.createElement)("div",{className:"ct-modify-demo",style:t},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"36",height:"36",viewBox:"0 0 40 40"},Object(r.createElement)("path",{d:"M5.71,40a1,1,0,0,1-1-1V21.59a1,1,0,0,1,1.91,0V39.05A1,1,0,0,1,5.71,40Zm1-31.83V1.07A1,1,0,0,0,5.71,0a1,1,0,0,0-1,1.07v7.1a1,1,0,0,0,1,1.07A1,1,0,0,0,6.67,8.17ZM21,39.05V34.29a1,1,0,1,0-1.9,0v4.76a1,1,0,1,0,1.9,0Zm0-18.14V1a1,1,0,1,0-1.9,0V20.91a1,1,0,1,0,1.9,0ZM35.24,39.05V26.35a1,1,0,0,0-1.91,0v12.7a1,1,0,0,0,1.91,0Zm0-26.25V1a1,1,0,1,0-1.91,0V12.8a1,1,0,1,0,1.91,0Z",transform:"translate(-0.71)",fill:"#dae3e8"}),Object(r.createElement)("path",{d:"M5.71,18.06a5,5,0,1,1,5-5A5,5,0,0,1,5.71,18.06ZM20,30.76a5,5,0,1,1,5-5A5,5,0,0,1,20,30.76Zm14.29-7.93a5,5,0,1,1,5-5A5,5,0,0,1,34.29,22.83Z",transform:"translate(-0.71)",fill:"#0c7ab3"}))),"idle"===d&&Object(r.createElement)("h2",null,Object(a.__)("This starter site is already installed","blocksy-companion")),"loading"===d&&Object(r.createElement)("h2",null,"Removing starter site..."),"done"===d&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h2",null,Object(a.__)("Starter Site Removed","blocksy-companion")),Object(r.createElement)("div",{className:"ct-modify-actions"},Object(r.createElement)("button",{className:"ct-demo-btn ct-dismiss",onClick:function(e){e.preventDefault(),i("".concat(y,":hide"))}},Object(a.__)("Dismiss","blocksy-companion")))),"idle"===d&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("p",null,Object(a.__)("What steps do you want to perform next?","blocksy-companion")),Object(r.createElement)("div",{className:"ct-modify-actions"},Object(r.createElement)("button",{className:"ct-demo-btn demo-remove",onClick:function(e){b("loading"),e.preventDefault(),_(),c()}},Object(a.__)("Remove","blocksy-companion")),Object(r.createElement)("button",{className:"ct-demo-btn",onClick:function(e){e.preventDefault(),n()}},Object(a.__)("Reinstall","blocksy-companion")))))};function fe(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 pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(n),!0).forEach((function(t){de(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function de(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var be=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,o=e.style,c=Object(r.useContext)(R),i=c.is_child_theme,l=c.child_theme_exists;return Object(r.createElement)("div",{className:"ct-demo-child",style:o},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 43 41.1"},Object(r.createElement)("path",{fill:"#DBE7EE",d:"M0,39.5c0,0.9,0.7,1.6,1.5,1.6h32.3c0.9,0,1.5-0.7,1.5-1.6V14H0V39.5z"}),Object(r.createElement)("path",{fill:"#BDC8D7",d:"M18.2,41.1h15.6c0.9,0,1.5-0.7,1.5-1.6V14H7.6L8,32.4L18.2,41.1z"}),Object(r.createElement)("path",{fill:"#BDC8D7",d:"M0,15.6V9.8c0-0.9,0.7-1.6,1.5-1.6h32.3c0.9,0,1.5,0.7,1.5,1.6v5.8H0z"}),Object(r.createElement)("path",{fill:"#3497D3",d:"M7.6,31.3c0,0.9,0.7,1.6,1.5,1.6h32.4c0.9,0,1.5-0.7,1.5-1.6V5.8H7.6V31.3z"}),Object(r.createElement)("path",{fill:"#0C7AB3",d:"M7.6,7.4V1.6C7.6,0.7,8.3,0,9.1,0h32.4C42.4,0,43,0.7,43,1.6v5.8H7.6z"}),Object(r.createElement)("rect",{x:"11.2",y:"11",fill:"#44ACDF",width:"16.8",height:"17.9"}),Object(r.createElement)("rect",{x:"31.5",y:"11",fill:"#44ACDF",width:"7.9",height:"17.9"}))),l?Object(r.createElement)("h2",null,Object(a.__)("Activate Child Theme","blocksy-companion")):Object(r.createElement)("h2",null,Object(a.__)("Install Child Theme","blocksy-companion")),!i&&Object(r.createElement)(r.Fragment,null,l?Object(r.createElement)("p",null,Object(a.__)("We strongly recommend to activate the child theme, this way you will have freedom to make changes without breaking the parent theme.","blocksy-companion")):Object(r.createElement)("p",null,Object(a.__)("We strongly recommend to install the child theme, this way you will have freedom to make changes without breaking the parent theme.","blocksy-companion")),Object(r.createElement)(ee,{checked:t.child_theme,onChange:function(){return n(pe(pe({},t),{},{child_theme:!t.child_theme}))}},l?Object(a.__)("Activate Child Theme","blocksy-companion"):Object(a.__)("Install Child Theme","blocksy-companion"))),i&&Object(a.__)("You already have a child theme properly installed and activated. Move on.","blocksy-companion"),Object(r.createElement)("a",{href:"https://developer.wordpress.org/themes/advanced-topics/child-themes/",target:"_blank"},Object(a.__)("Learn more about child themes","blocksy-companion")))};function he(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 ye(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){ve(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oe(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,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}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 ge=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,o=e.style,c=Object(r.useContext)(Je),i=c.currentDemo,s=c.demos_list,u=(c.pluginsStatus,c.setCurrentDemo,Oe((i||"").split(":"),2)),m=u[0],f=(u[1],s.filter((function(e){return e.name===m||""})));return Object(r.createElement)("div",{style:o},f.length>1&&Object(r.createElement)("div",{className:"ct-demo-builder"},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"52",height:"40",viewBox:"0 0 52 40"},Object(r.createElement)("path",{fill:"#DBE7EE",d:"M0,38.1C0,39.1,0.9,40,1.8,40h39.3c1.1,0,1.8-0.9,1.8-1.9v-31H0V38.1z"}),Object(r.createElement)("path",{fill:"#CFDBE4",d:"M13.8,14.6v18.8h22.6V14.6H13.8zM34.8,31.9H15.4V16.1h19.4V31.9z"}),Object(r.createElement)("path",{fill:"#BDC8D7",d:"M13.1,15.3L13.1,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C13.7,16.8,13.1,16.1,13.1,15.3z M34.1,15.3L34.1,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C34.8,16.8,34.1,16.1,34.1,15.3z M13.1,32.7L13.1,32.7c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C13.7,34.1,13.1,33.5,13.1,32.7z M34.1,32.7L34.1,32.7c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C34.8,34.1,34.1,33.5,34.1,32.7z M23.3,15.3L23.3,15.3c0-0.8,0.6-1.4,1.4-1.4l0,0c0.8,0,1.4,0.6,1.4,1.4l0,0c0,0.8-0.6,1.4-1.4,1.4l0,0C24,16.8,23.3,16.1,23.3,15.3z M4.2,13.9h5.9v7.9H4.2V13.9zM4.2,23.3h5.9v2.9H4.2V23.3zM0,9V1.9C0,0.9,0.9,0,1.8,0h39.3c1.1,0,1.8,0.9,1.8,1.9V9H0z M42.9,35.4V10.9h-9.3v15.2L42.9,35.4zM7.2,27.6c-1.6,0-3,1.3-3,3c0,1.6,1.3,3,3,3s3-1.3,3-3C10.2,28.9,8.8,27.6,7.2,27.6z"}),Object(r.createElement)("path",{fill:"#0C7AB3",d:"M50,27.8H35.6c-1.1,0-2-0.9-2-2v-18c0-1.1,0.9-2,2-2H50c1.1,0,2,0.9,2,2v18C52,26.9,51.1,27.8,50,27.8z"}),Object(r.createElement)("path",{fill:"#44ACDF",d:"M49,17.5H36.8c-0.7,0-1.2-0.5-1.2-1.2V9.1c0-0.7,0.5-1.2,1.2-1.2H49c0.7,0,1.2,0.5,1.2,1.2v7.3C50.2,17,49.6,17.5,49,17.5z M50.2,20.4v-0.1c0-0.5-0.4-1-1-1H36.5c-0.5,0-1,0.4-1,1v0.1c0,0.5,0.4,1,1,1h12.7C49.7,21.4,50.2,20.9,50.2,20.4z M40.8,25.2h-4.3c-0.5,0-1-0.4-1-1v-0.1c0-0.5,0.4-1,1-1h4.3c0.5,0,1,0.4,1,1v0.1C41.7,24.8,41.3,25.2,40.8,25.2z M49.2,25.2h-4.3c-0.5,0-1-0.4-1-1v-0.1c0-0.5,0.4-1,1-1h4.3c0.5,0,1,0.4,1,1v0.1C50.2,24.8,49.7,25.2,49.2,25.2z"}),Object(r.createElement)("path",{fill:"#C8E6F4",d:"M47.4,11.2h-9.1c-0.2,0-0.5-0.2-0.5-0.4v0c0-0.2,0.2-0.4,0.5-0.4h9.1c0.2,0,0.5,0.2,0.5,0.4v0C47.8,11,47.6,11.2,47.4,11.2z M47.9,14.7L47.9,14.7c0-0.2-0.2-0.5-0.5-0.5h-9.1c-0.2,0-0.4,0.2-0.4,0.4v0c0,0.2,0.2,0.4,0.4,0.4h9.1C47.7,15.1,47.9,14.9,47.9,14.7z"}),Object(r.createElement)("path",{fill:"#FFFFFF",d:"M26.3,20.8h-2.9l-2.9,7.9H23l0.3-0.7h2.8l0.3,0.7h2.7L26.3,20.8z M23.9,25.8l0.8-2.2h0l0.8,2.2H23.9zM46.5,10.7c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5c0-0.8,0.7-1.5,1.5-1.5S46.5,9.9,46.5,10.7zM42.1,14.7c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5S42.1,13.9,42.1,14.7z"}))),Object(r.createElement)("h2",null,Object(a.__)("Choose Page Builder","blocksy-companion")),Object(r.createElement)("p",null,Object(a.__)("This starter site can be imported and used with one of these page builders. Please select your prefered one in order to continue.","blocksy-companion")),Object(r.createElement)("ul",{"data-count":f.length},f.sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0})).map((function(e){var o=e.builder,c=e.plugins;return Object(r.createElement)("li",{className:l()({active:o===(null===t.builder?f[0].builder:t.builder)}),onClick:function(){return n(ye(ye({},t),{},{builder:o,plugins:c.map((function(e){return{plugin:e,enabled:!0}}))}))}},Object(r.createElement)("figure",null,Object(r.createElement)("span",{className:l()("ct-checkbox",{active:o===(null===t.builder?f[0].builder:t.builder)})},Object(r.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},Object(r.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))),""===o&&Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},Object(r.createElement)("path",{d:"M122.5 35.5c-1.7-1.1-4-.7-5.1 1C110.8 46.4 96.8 47 96 47h-.3c-17.4 0-24 14.8-24.3 15.4-.8 1.9.1 4 1.9 4.8.5.2 1 .3 1.5.3 1.4 0 2.7-.8 3.4-2.2.1-.1 4.6-10.3 16.3-11v19c-.5 4.1-2.4 7.3-5.8 9.7-3.6 2.5-8.3 3.8-14.1 3.8-7 0-12.7-2.4-16.9-7.2-4.3-4.8-6.4-11.5-6.4-20.2l.1-20.9c.3-7.7 2.4-13.8 6.4-18.2 4.3-4.8 9.9-7.2 16.9-7.2 5.8 0 10.6 1.3 14.1 3.8 3.6 2.5 5.6 5.9 5.9 10.3v.5c0 2.5 2.1 4.6 4.6 4.6 2.5 0 4.6-2.1 4.6-4.6v-.5c-.7-6.6-3.7-11.9-9.1-15.8-5.4-4-12.2-5.9-20.4-5.9-9.7 0-17.6 3.2-23.5 9.6-5.6 6-8.6 13.8-8.9 23.5 0 .7-.1 1.3-.1 2l.1 18.8h-.1c0 10.7 3 19.2 9 25.5 6 6.4 13.8 9.6 23.5 9.6 8.2 0 14.9-1.9 20.4-5.9 5-3.6 7.9-8.4 8.9-14.3l.2-21c6.1-1.5 14.4-4.8 19.6-12.7 1.3-1.7.8-4-1-5.1z"})),"brizy"===o&&Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},Object(r.createElement)("path",{d:"M14.6 36.7L75 0l60.4 36.7L75 73.4 14.6 36.7zm21.7.9L75 61.2l38.8-23.6L75 14 36.3 37.6z",fill:"#181c25"}),Object(r.createElement)("path",{fill:"#a7b2dd",d:"M14.6 63.2l10.8-6.5L75 86.8l49.9-30 10.5 6.4L75 100z"})),"elementor"===o&&Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},Object(r.createElement)("path",{d:"M32.5 7.6h17v84.9h-17V7.6zm34 84.9h51v-17h-51v17zm0-34h51v-17h-51v17zm0-51v17h51v-17h-51z"}))),Object(r.createElement)("div",{className:"builder-name"},ae(o)||"Gutenberg"))})))))};function _e(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 Ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(n),!0).forEach((function(t){we(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_e(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function we(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ke=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,o=(e.currentDemo,e.style);return Object(r.createElement)("div",{style:o},Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40"},Object(r.createElement)("path",{d:"M25,22.67a5,5,0,0,1-10,0H0V36a3.33,3.33,0,0,0,3.33,3.33H36.67A3.33,3.33,0,0,0,40,36V22.67Z",transform:"translate(0 -0.67)",fill:"#bdc8d7"}),Object(r.createElement)("rect",{x:"2.5",y:"14",width:"35",height:"3",rx:"1.5",fill:"#0c7ab3"}),Object(r.createElement)("rect",{x:"5",y:"7",width:"30",height:"3",rx:"1.5",fill:"#3497d3"}),Object(r.createElement)("rect",{x:"7.5",width:"25",height:"3",rx:"1.5",fill:"#44acdf"}))),Object(r.createElement)("h2",null,Object(a.__)("Import Content","blocksy-companion")),Object(r.createElement)("p",null,Object(a.__)("This will import posts, pages, comments, navigation menus, custom fields, terms and custom posts","blocksy-companion")),["options","widgets","content"].map((function(e){return Object(r.createElement)(ee,{checked:t.content[e],onChange:function(){return n(Ee(Ee({},t),{},{content:Ee(Ee({},t.content),{},we({},e,!t.content[e]))}))},key:e},e.split("_").map((function(e){return e.replace(/^\w/,(function(e){return e.toUpperCase()}))})).join(" "))})),Object(r.createElement)("div",{className:"ct-demo-erase"},Object(r.createElement)(ee,{checked:t.content.erase_content,onChange:function(){return n(Ee(Ee({},t),{},{content:Ee(Ee({},t.content),{},{erase_content:!t.content.erase_content})}))}},Object(r.createElement)("div",null,Object(a.__)("Clean Install","blocksy-companion"),Object(r.createElement)("i",null,Object(a.__)("This option will remove the previous imported content and will perform a fresh and clean install.","blocksy-companion"))))))},xe=function(){var e=Object(r.useContext)(R),t=e.home_url,n=e.customizer_url;return Object(r.createElement)("div",{className:"ct-install-success"},Object(r.createElement)("h2",null,Object(a.__)("Starter Site Imported Successfully","blocksy-companion")),Object(r.createElement)("p",null,Object(a.__)("Now you can view your website or start customizing it","blocksy-companion")),Object(r.createElement)("div",null,Object(r.createElement)("a",{href:n,className:"ct-button"},Object(a.__)("Customize","blocksy-companion")),Object(r.createElement)("a",{href:t,target:"_blank",className:"ct-button-primary"},Object(a.__)("View site","blocksy-companion"))))},Se=function(e,t){var n=e.action;if("complete"===n)return"";if("import_install_child"===n)return Object(a.__)("copying child theme sources","blocksy-companion");if("import_activate_child"===n)return Object(a.__)("activating child theme","blocksy-companion");if("install_plugin"===n)return Object(a.sprintf)(Object(a.__)("installing plugin %s","blocksy-companion"),ae(e.name)||e.name);if("activate_plugin"===n)return Object(a.sprintf)(Object(a.__)("activating plugin %s","blocksy-companion"),ae(e.name)||e.name);if("download_demo_widgets"===n)return Object(a.__)("downloading demo widgets","blocksy-companion");if("apply_demo_widgets"===n)return Object(a.__)("installing demo widgets","blocksy-companion");if("download_demo_options"===n)return Object(a.__)("downloading demo options","blocksy-companion");if("import_mods_images"===n)return Object(a.__)("importing images from customizer","blocksy-companion");if("import_customizer_options"===n)return Object(a.__)("import customizer options","blocksy-companion");if("activate_required_extensions"===n)return Object(a.__)("activating required extensions","blocksy-companion");if("erase_previous_posts"===n)return Object(a.__)("removing previously installed posts","blocksy-companion");if("erase_previous_terms"===n)return Object(a.__)("removing previously installed taxonomies","blocksy-companion");if("erase_default_pages"===n)return Object(a.__)("removing default WordPress pages","blocksy-companion");if("erase_customizer_settings"===n)return Object(a.__)("resetting customizer options","blocksy-companion");if("erase_widgets_data"===n)return Object(a.__)("resetting widgets","blocksy-companion");if("content_installer_progress"===n){if(!e.kind)return"";var r=t.content.preliminary_data["".concat(e.kind,"_count")],o=t.content["".concat(e.kind,"_count")];return"".concat(Math.min(o,r)," of ").concat(r," ").concat({users:Object(a.__)("users","blocksy-companion"),term:Object(a.__)("terms","blocksy-companion"),media:Object(a.__)("images","blocksy-companion"),post:Object(a.__)("posts","blocksy-companion"),comment:Object(a.__)("comments","blocksy-companion")}[e.kind])}return""};function Ce(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 De(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ce(Object(n),!0).forEach((function(t){Pe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ae(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,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ne(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 Ne(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 Ne(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 Me=function(e){e.preventDefault(),e.returnValue=""},Le=function(e){var t=e.demoConfiguration,n=e.pluginsStatus,r=e.is_child_theme,o=e.includeMetaSteps,c=[];return void 0!==o&&o&&c.push("register_current_demo"),t.child_theme&&(r||c.push("child_theme")),t.plugins.filter((function(e){var t=e.enabled,r=e.plugin;return!!t&&!n[r]})).length>0&&c.push("plugins"),t.content.erase_content&&c.push("erase_content"),t.content.options&&c.push("options"),t.content.widgets&&c.push("widgets"),t.content.content&&c.push("content"),c.push("install_finish"),c},ze=function(e){var t=e.demoConfiguration,n=e.style,o=function(e){var t=Object(r.useContext)(Je),n=t.demos_list,o=t.currentDemo,c=(t.setCurrentDemo,t.setInstallerBlockingReleased),i=t.setCurrentlyInstalledDemo,l=t.pluginsStatus,s=Object(r.useContext)(R),u=(s.home_url,s.customizer_url,s.is_child_theme),m=(s.Link,Ae(Object(r.useState)(!1),2)),f=m[0],p=m[1],d=Ae(Object(r.useState)(0),2),b=d[0],h=d[1],y=Ae((o||"").split(":"),2),v=y[0],O=(y[1],n.filter((function(e){return e.name===v})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}))),j=e.plugins.filter((function(e){var t=e.enabled,n=e.plugin;return t&&!l[n]})).map((function(e){return e.plugin})),g=Ae(Object(r.useState)({register_current_demo:{title:Object(a.__)("Register demo","blocksy-companion"),query_string:"action=blocksy_demo_register_current_demo&wp_customize=on&demo_name=".concat(o,":").concat(null===e.builder?O[0].builder:e.builder),expected_signals:1},child_theme:{title:Object(a.__)("Child theme","blocksy-companion"),query_string:"action=blocksy_demo_install_child_theme",expected_signals:3},plugins:{title:Object(a.__)("Required plugins","blocksy-companion"),query_string:"action=blocksy_demo_activate_plugins&plugins=".concat(j.join(":")),expected_signals:2*j.length+1},fake_step:{title:Object(a.__)("Fake Required plugins","blocksy-companion"),query_string:"action=blocksy_demo_fake_step",expected_signals:6},erase_content:{title:Object(a.__)("Erase content","blocksy-companion"),query_string:"action=blocksy_demo_erase_content&wp_customize=on",expected_signals:6},install_finish:{title:Object(a.__)("Final touches","blocksy-companion"),query_string:"action=blocksy_demo_install_finish&wp_customize=on",expected_signals:1},options:{title:Object(a.__)("Import options","blocksy-companion"),query_string:"action=blocksy_demo_install_options&wp_customize=on&demo_name=".concat(o,":").concat(null===e.builder?O[0].builder:e.builder),expected_signals:5},widgets:{title:Object(a.__)("Import widgets","blocksy-companion"),query_string:"action=blocksy_demo_install_widgets&wp_customize=on&demo_name=".concat(o,":").concat(null===e.builder?O[0].builder:e.builder),expected_signals:3},content:{title:Object(a.__)("Import content","blocksy-companion"),query_string:"action=blocksy_demo_install_content&wp_customize=on&demo_name=".concat(o,":").concat(null===e.builder?O[0].builder:e.builder),expected_signals:50}}),2),_=g[0],E=g[1],w=Le({demoConfiguration:e,pluginsStatus:l,is_child_theme:u,includeMetaSteps:!0}),k=w[b],x=Ae(Object(r.useState)(0),2),S=x[0],C=x[1],D=Ae(Object(r.useState)(null),2),P=D[0],A=D[1],N=Object(r.useRef)(S),M=Object(r.useRef)(_);Object(r.useEffect)((function(){N.current=S,M.current=_}));var L=function(e){return"content"===e?1===w.length?100:50:w.indexOf("content")>-1?50/(w.length-1):100/w.length},z=w.reduce((function(e,t,n){return n>=b?e:e+L(t)}),0)+100*S/_[k].expected_signals*(L(k)/100),T=function(){var e=_[k],t=new EventSource("".concat(ctDashboardLocalizations.ajax_url,"?").concat(e.query_string));t.onmessage=function(e){var n=JSON.parse(e.data);if(C(N.current+1),"content_installer_progress"===n.action){var r=n.kind;r&&(A(n),E(De(De({},M.current),{},{content:De(De({},M.current.content),{},Pe({},"".concat(r,"_count"),M.current.content["".concat(r,"_count")]+1))})))}else A(n);if("get_content_preliminary_data"===n.action){var o=n.data,a=(o.comment_count,o.media_count,o.post_count,o.term_count,o.users,De(De({},n.data),{},{term_count:n.data.terms.length,post_count:n.data.posts.filter((function(e){return"attachment"!==e.post_type})).length,media_count:n.data.posts.filter((function(e){return"attachment"===e.post_type})).length,comment_count:n.data.posts.reduce((function(e,t){return e+(t.comments||[]).length}),0),users_count:Object.keys(n.data.authors).length}));E(De(De({},M.current),{},{content:De(De({},M.current.content),{},{preliminary_data:a,comment_count:0,media_count:0,post_count:0,term_count:0,users_count:0,expected_signals:a.comment_count+a.media_count+a.post_count+a.term_count+a.users_count+3})}))}if("complete"===n.action){if(t&&t.close&&t.close(),b===w.length-1)return p(!0),c(!0),void window.removeEventListener("beforeunload",Me);A(null),C(0),h(Math.min(w.length-1,b+1))}}};return Object(r.useEffect)((function(){f||(A(null),C(0),"fake_step"===k?(console.log("here we go delay before fake_step"),setTimeout((function(){T()}),2e3)):T())}),[k]),Object(r.useEffect)((function(){return window.addEventListener("beforeunload",Me),i({demo:"".concat(o,":").concat(e.builder)}),function(){window.removeEventListener("beforeunload",Me)}}),[]),{isCompleted:f,stepName:k,stepsDescriptors:_,lastMessage:P,progress:z}}(t),c=o.isCompleted,i=o.stepName,l=o.stepsDescriptors,s=o.lastMessage,u=o.progress;return Object(r.createElement)("div",{className:"ct-demo-install",style:n},Object(r.createElement)(A.Transition,{initial:!0,items:c,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(e){return function(t){return Object(r.createElement)("div",{style:t},e?Object(r.createElement)(xe,null):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("i",{className:"ct-demo-icon"},Object(r.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 50 50"},Object(r.createElement)("path",{class:"g1",d:"M47,38.8c0.3-1,0.5-2,0.5-3.1c0-1.1-0.2-2.1-0.5-3.1l0.2-0.1l1.8-1.7l-1.8-3.1l-2.3,0.7l-0.2,0.1c-1.4-1.5-3.3-2.7-5.4-3.1V25l-0.6-2.4h-3.5L34.5,25v0.3c-2.1,0.5-4,1.6-5.4,3.1l-0.2-0.1l-2.3-0.7l-1.8,3.1l1.7,1.7l0.2,0.1c-0.3,1-0.5,2-0.5,3.1c0,1.1,0.2,2.1,0.5,3.1l-0.2,0.1l-1.8,1.7l1.8,3.1l2.3-0.7l0.2-0.1c1.4,1.5,3.3,2.7,5.4,3.1v0.3l0.6,2.4h3.5l0.6-2.4V46c2.1-0.5,4-1.6,5.4-3.1l0.2,0.1l2.3,0.7l1.8-3.1l-1.7-1.7L47,38.8z M36.9,41.5c-3.3,0-5.9-2.6-5.9-5.9s2.6-5.9,5.9-5.9s5.9,2.6,5.9,5.9S40.1,41.5,36.9,41.5z"}),Object(r.createElement)("path",{class:"g2",d:"M21.2,32.2c0.2-0.8,0.4-1.7,0.4-2.5c0-0.9-0.1-1.7-0.4-2.5l0.3-0.2l1.7-1.7l-1.8-3.1L19.1,23l-0.3,0.2c-1.2-1.2-2.7-2.1-4.4-2.5v-0.3l-0.6-2.4h-3.5l-0.6,2.4v0.3c-1.7,0.4-3.2,1.3-4.4,2.5L5.1,23l-2.3-0.7L1,25.4L2.7,27L3,27.2c-0.2,0.8-0.4,1.7-0.4,2.5c0,0.9,0.1,1.7,0.4,2.5l-0.3,0.1L1,34.1l1.8,3.1l2.3-0.7l0.3-0.1c1.2,1.2,2.7,2.1,4.4,2.5v0.3l0.6,2.4h3.5l0.6-2.4v-0.3c1.7-0.4,3.2-1.3,4.4-2.5l0.3,0.1l2.3,0.7l1.8-3.1l-1.7-1.7L21.2,32.2z M12.1,34.4c-2.6,0-4.7-2.1-4.7-4.7S9.5,25,12.1,25s4.7,2.1,4.7,4.7S14.7,34.4,12.1,34.4z"}),Object(r.createElement)("path",{class:"g3",d:"M37.7,15.7c0.2-0.8,0.4-1.7,0.4-2.5c0-0.9-0.1-1.7-0.4-2.5l0.3-0.2l1.7-1.7l-1.8-3.1l-2.3,0.7l-0.3,0.2c-1.2-1.2-2.7-2.1-4.4-2.5V3.8l-0.6-2.4h-3.5l-0.6,2.4v0.3c-1.7,0.4-3.2,1.3-4.4,2.5l-0.3-0.2l-2.3-0.7l-1.8,3.1l1.7,1.7l0.3,0.2c-0.2,0.8-0.4,1.7-0.4,2.5c0,0.9,0.1,1.7,0.4,2.5l-0.3,0.1l-1.7,1.7l1.8,3.1l2.3-0.7l0.3-0.1c1.2,1.2,2.7,2.1,4.4,2.5v0.3l0.6,2.4h3.5l0.6-2.4v-0.3c1.7-0.4,3.2-1.3,4.4-2.5l0.3,0.1l2.3,0.7l1.8-3.1L38,15.9L37.7,15.7z M28.6,17.9c-2.6,0-4.7-2.1-4.7-4.7s2.1-4.7,4.7-4.7s4.7,2.1,4.7,4.7S31.2,17.9,28.6,17.9z"}))),Object(r.createElement)("h2",null,Object(a.__)("Installing","blocksy-companion"),"..."),Object(r.createElement)("p",null,Object(a.__)("Please be patient and don't refresh this page, the import process may take a while, this also depends on your server.","blocksy-companion")),Object(r.createElement)("div",{className:"ct-progress-info"},l[i].title,s&&Se(s,l)?": ".concat(Se(s,l)):"",Object(r.createElement)("span",null,Math.round(u),"%")),Object(r.createElement)("div",{style:{"--progress":"".concat(u,"%")},className:"ct-installer-progress"},Object(r.createElement)("div",null))))}})))};function Te(e){return function(e){if(Array.isArray(e))return Fe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Re(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 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,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||Re(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 Re(e,t){if(e){if("string"==typeof e)return Fe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fe(e,t):void 0}}function Fe(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 Be=function(e){e.location,e.navigate;var t=Ie(Object(r.useState)(!0),2),n=(t[0],t[1],Object(r.useContext)(Je)),o=n.installerBlockingReleased,c=n.demos_list,i=n.currentDemo,s=n.pluginsStatus,u=n.currentlyInstalledDemo,m=n.setCurrentDemo,f=Object(r.useContext)(R).is_child_theme,p=Ie(Object(r.useState)(u),2),d=p[0],b=p[1],h=Ie(Object(r.useState)({builder:"",child_theme:!1,plugins:[],content:{options:!0,widgets:!0,content:!0,erase_content:!0}}),2),y=h[0],v=h[1],O=Ie(Object(r.useState)(0),2),j=O[0],g=O[1],_=Ie((i||"").split(":"),2),E=_[0],w=(_[1],["modify_demo","child_theme","builder","plugins","content","installer"].filter((function(e){if(!i)return!1;if("modify_demo"===e){if(!d)return!1;if(-1===d.demo.indexOf(E))return!1}if("child_theme"===e&&f)return!1;var t=c.filter((function(e){return e.name===E})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}));return("plugins"!==e||0!==t.reduce((function(e,t){return[].concat(Te(e),Te(t.plugins||[]))}),[]).filter((function(e){return!s[e]})).length)&&("builder"!==e||t.length>1)}))),k=w[j];return Object(r.useEffect)((function(){if(E&&!(i.indexOf(":hide")>-1)){var e=c.filter((function(e){return e.name===E})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}));g(0),b(u),v({builder:1===e.length?e[0].builder:null,child_theme:!1,plugins:e[0].plugins.map((function(e){return{plugin:e,enabled:!0}})),content:{options:!0,widgets:!0,content:!0,erase_content:!0}})}}),[i]),Object(r.createElement)(M,{items:i,isVisible:function(e){return e&&-1===e.indexOf(":hide")},className:l()("ct-demo-modal",{"ct-demo-installer":"installer"===k||"modify_demo"===k}),onDismiss:function(){("installer"!==k||o)&&m("".concat(E,":hide"))},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content ct-demo-step-container"},Object(r.createElement)("div",{className:"ct-current-step"},Object(r.createElement)(A.Transition,{items:k,from:{opacity:0},enter:{opacity:1},leave:{opacity:0},initial:!1,config:function(e,t){return"leave"===t?{duration:150}:{delay:150,duration:150}}},(function(e){return function(t){return Object(r.createElement)(r.Fragment,null,"modify_demo"===e&&Object(r.createElement)(me,{demoConfiguration:y,nextStep:function(){g(Math.min(j+1,w.length-1))},style:t}),"child_theme"===e&&Object(r.createElement)(be,{style:t,demoConfiguration:y,setDemoConfiguration:v}),"plugins"===e&&Object(r.createElement)(ie,{demoConfiguration:y,style:t,setDemoConfiguration:v}),"builder"===e&&Object(r.createElement)(ge,{style:t,demoConfiguration:y,setDemoConfiguration:v}),"content"===e&&Object(r.createElement)(ke,{style:t,demoConfiguration:y,setDemoConfiguration:v}),"installer"===e&&Object(r.createElement)(ze,{style:t,demoConfiguration:y}))}}))),"installer"!==k&&"modify_demo"!==k&&Object(r.createElement)("div",{className:"ct-demo-step-controls"},j>0&&Object(r.createElement)("button",{className:"ct-demo-btn demo-back-btn",onClick:function(){g(Math.max(j-1,0))}},Object(a.__)("Back","blocksy-companion")),w.length>2&&Object(r.createElement)("ul",{className:"ct-steps-pills"},w.map((function(e,t){return t===w.length-1?null:Object(r.createElement)("li",{className:l()({active:e===k}),key:e},t+1)}))),Object(r.createElement)("button",{className:"ct-demo-btn demo-main-btn",disabled:"content"===k&&0===Le({demoConfiguration:y,pluginsStatus:s,is_child_theme:f}).length,onClick:function(){g(Math.min(j+1,w.length-1))}},"content"===k?Object(a.__)("Install","blocksy-companion"):Object(a.__)("Next","blocksy-companion"))))}})},Ue=n(7),Ve=n.n(Ue);function He(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function qe(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,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}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 Ze=function(){var e=qe(Object(r.useState)(!1),2),t=e[0],n=e[1],o=qe(Object(r.useState)(!1),2),c=o[0],i=o[1],l=qe(Object(r.useState)(""),2),s=l[0],u=l[1],m=qe(Object(r.useState)(""),2),f=m[0],p=m[1],d=qe(Object(r.useState)("coblocks,elementor,contact-form-7"),2),b=d[0],h=d[1],y=qe(Object(r.useState)(""),2),v=y[0],O=y[1],j=qe(Object(r.useState)(!1),2),g=j[0],_=j[1],E=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,r,o,c,a,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n(!0),(t=new FormData).append("action","blocksy_demo_export"),t.append("name",s),t.append("is_pro",g),t.append("url",v),t.append("builder",f),t.append("plugins",b),t.append("wp_customize","on"),e.prev=9,e.next=12,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 12:if(200!==(r=e.sent).status){e.next=20;break}return e.next=16,r.json();case 16:o=e.sent,c=o.success,a=o.data,c&&(i=new Blob([JSON.stringify(a.demo)],{type:"text/plain;charset=utf-8"}),Ve.a.saveAs(i,"".concat(s,".json")));case 20:e.next=24;break;case 22:e.prev=22,e.t0=e.catch(9);case 24:n(!1);case 25:case"end":return e.stop()}}),e,null,[[9,22]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function a(e){He(c,r,o,a,i,"next",e)}function i(e){He(c,r,o,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return ct_localizations.is_dev_mode?Object(r.createElement)("div",{className:"ct-export"},Object(r.createElement)("button",{className:"ct-button",onClick:function(e){i(!0)}},Object(a.__)("Site export")),Object(r.createElement)(M,{items:c,className:"ct-site-export-modal",onDismiss:function(){return i(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-site-export"},Object(r.createElement)("label",null,Object(a.__)("Name","blocksy-companion"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Name","blocksy-companion"),value:s,onChange:function(e){var t=e.target.value;return u(t)}})),Object(r.createElement)("label",null,Object(a.__)("Preview URL","blocksy-companion"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Preview URL","blocksy-companion"),value:v,onChange:function(e){var t=e.target.value;return O(t)}})),Object(r.createElement)("label",null,Object(a.__)("PRO","blocksy-companion"),Object(r.createElement)("input",{type:"checkbox",value:g,onChange:function(e){e.target.value;return _(!g)}})),Object(r.createElement)("label",null,Object(a.__)("Builder","blocksy-companion"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Builder","blocksy-companion"),value:f,onChange:function(e){var t=e.target.value;return p(t)}})),Object(r.createElement)("label",null,Object(a.__)("Plugins","blocksy-companion"),Object(r.createElement)("textarea",{placeholder:Object(a.__)("Plugins","blocksy-companion"),value:b,onChange:function(e){var t=e.target.value;return h(t)}})),Object(r.createElement)("button",{className:"ct-button",disabled:t,onClick:function(){return E()}},t?Object(a.__)("Loading...","blocksy-companion"):Object(a.__)("Export site","blocksy-companion")))}})):null};function $e(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function Ge(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,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ke(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 Ke(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 Ke(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 Je=Object(r.createContext)({demos:[]}),Ye=null,Xe=null,Qe=function(e){e.children,e.path,e.location;var t=Ge(Object(r.useState)(!Ye),2),n=t[0],o=t[1],c=Ge(Object(r.useState)(Ye||[]),2),i=c[0],l=c[1],s=Ge(Object(r.useState)(Xe||{}),2),u=s[0],m=s[1],f=Ge(Object(r.useState)(null),2),p=f[0],d=f[1],b=Ge(Object(r.useState)(null),2),h=b[0],y=b[1],v=Ge(Object(r.useState)(!1),2),O=v[0],j=v[1],g=Ge(Object(r.useState)({builder:""}),2),_=(g[0],g[1],Ge(Object(r.useState)(!1),2)),E=_[0],w=_[1],k=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,c,a,i=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.length>0&&void 0!==i[0]&&i[0]&&o(!0),(t=new FormData).append("action","blocksy_demo_list"),e.prev=4,e.next=7,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 7:if(200!==(n=e.sent).status){e.next=15;break}return e.next=11,n.json();case 11:r=e.sent,c=r.success,a=r.data,c&&(l(a.demos),m(a.active_plugins),y(a.current_installed_demo),j(a.demo_error),Xe=a.active_plugins,Ye=a.demos,a.demo_error);case 15:e.next=19;break;case 17:e.prev=17,e.t0=e.catch(4);case 19:o(!1);case 20:case"end":return e.stop()}}),e,null,[[4,17]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function a(e){$e(c,r,o,a,i,"next",e)}function i(e){$e(c,r,o,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.useEffect)((function(){k(!Ye)}),[]),Object(r.createElement)("div",{className:"ct-demos-list-container"},O&&Object(r.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:O}}),Object(r.createElement)(A.Transition,{items:n,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(e){return e?function(e){return Object(r.createElement)(A.animated.p,{style:e,className:"ct-loading-text"},Object(r.createElement)("span",null),Object(a.__)("Loading Starter Sites...","blocksy-companion"))}:0===i.length?function(e){return Object(r.createElement)(A.animated.div,{style:e},Object(r.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:Object(a.__)("The connection to our <b>demo.creativethemes.com</b> server didn't worked. This connection is required for importing the starter sites from our demo content server. All you have to do is to contact your hosting provider and ask them to white list our demo server address.","blocksy-companion")}}),Object(r.createElement)(q,null))}:function(e){return Object(r.createElement)(A.animated.div,{style:e},Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Je.Provider,{value:{demo_error:O,demos_list:i.filter((function(e){return!e.dev||ct_localizations.is_dev_mode})),currentDemo:p,pluginsStatus:u,installerBlockingReleased:E,setInstallerBlockingReleased:w,setCurrentDemo:d,currentlyInstalledDemo:h,setCurrentlyInstalledDemo:y}},Object(r.createElement)(le,null),Object(r.createElement)(Be,null),Object(r.createElement)(Ze,null)),Object(r.createElement)(q,null)))}})))};function et(e,t,n,r,o,c,a){try{var i=e[c](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}var tt=function(){var e=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,o,c,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).append("action","blocksy_fs_connect_again"),e.prev=2,e.next=5,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:t});case 5:if(200!==(n=e.sent).status){e.next=13;break}return e.next=9,n.json();case 9:r=e.sent,o=r.success,r.data,o&&((c=document.createElement("div")).innerHTML=ctDashboardLocalizations.plugin_data.connect_template,a=c.querySelector("form"),document.body.appendChild(a),a.submit());case 13:e.next=17;break;case 15:e.prev=15,e.t0=e.catch(2);case 17:case"end":return e.stop()}}),e,null,[[2,15]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function a(e){et(c,r,o,a,i,"next",e)}function i(e){et(c,r,o,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.createElement)("div",{className:"ct-freemius-optin-message"},Object(r.createElement)("i",null,Object(r.createElement)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},Object(r.createElement)("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),Object(r.createElement)("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"}))),Object(r.createElement)("h2",null,Object(a.__)("Stay Updated","blocksy-companion")),Object(r.createElement)("p",null,Object(a.__)("Never miss an important update - opt in to our security & feature updates notifications, and non-sensitive diagnostic tracking.","blocksy-companion")),Object(r.createElement)("button",{className:"ct-button-primary",onClick:function(t){t.preventDefault(),e()}},Object(a.__)("Allow & Continue","blocksy-companion")))};c.a.on("ct:dashboard:routes",(function(e){e.push({Component:function(){return Object(r.createElement)(Q,null)},path:"/extensions"}),"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&e.push({Component:function(e){return Object(r.createElement)(Qe,e)},path:"/demos"})})),c.a.on("ct:dashboard:navigation-links",(function(e){"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&e.push({text:Object(a.__)("Starter Sites","blocksy-companion"),path:"demos",getProps:function(e){var t=e.isPartiallyCurrent;e.isCurrent;return t?{"aria-current":"page"}:{}}}),e.push({text:Object(a.__)("Extensions","blocksy-companion"),path:"/extensions"})})),c.a.on("ct:dashboard:home:before",(function(e){ctDashboardLocalizations.plugin_data.is_anonymous&&(e.content=Object(r.createElement)(tt,null))})),c.a.on("ct:dashboard:heading:after",(function(e){ctDashboardLocalizations.plugin_data.is_pro&&(e.content=Object(r.createElement)("span",null,"PRO"))}))}]);
static/bundle/dashboard.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.33
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.34
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
static/bundle/options.min.css CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * - v1.8.33
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
1
  /**
2
+ * - v1.8.34
3
  *
4
  * Copyright (c) 2022
5
  * Licensed GPLv2+
static/bundle/sticky.js CHANGED
@@ -1 +1 @@
1
- !function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=2)}([function(t,e){t.exports=window.ctEvents},function(t,e){t.exports=window.ctFrontend},function(t,e,r){"use strict";r.r(e);var n=r(0),i=r.n(n),o=r(1),a=function(t,e,r){return Math.max(t,Math.min(e,r))},c=function(t,e,r){return e[0]+(e[1]-e[0])/(t[1]-t[0])*(r-t[0])},s=function(t){if(t.blcInitialHeight)return t.blcInitialHeight;var e=t.firstElementChild.firstElementChild.getBoundingClientRect().height;return t.blcInitialHeight=e,e},u=function(t){var e=getComputedStyle(t),r=100;t.dataset.row.includes("middle")&&(r=e.getPropertyValue("--sticky-shrink"));var n=s(t);return r&&(n*=parseFloat(r)/100),n};function l(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return d(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(t,e)}(t)||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 d(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var y=null,f=function(t){var e=t.stickyContainer,r=t.startPosition;l(e.querySelectorAll('[data-row*="middle"]')).map((function(t){if(t.querySelector('[data-id="logo"] .site-logo-container')){var e=t.querySelector('[data-id="logo"] .site-logo-container'),n=function(t){var e=t.logo,r=t.row;if(y)return y;var n=parseFloat(getComputedStyle(e).getPropertyValue("--logo-max-height")||50),i=parseFloat(getComputedStyle(e).getPropertyValue("--logo-sticky-shrink").toString().replace(",",".")||1),o=s(r),a=u(r);return y={initialHeight:n,stickyShrink:i,rowInitialHeight:o,rowStickyHeight:a}}({logo:e,row:t}),i=n.initialHeight,o=n.stickyShrink,l=n.rowInitialHeight,d=n.rowStickyHeight,f=i*o;1!==o&&e.style.setProperty("--logo-shrink-height","".concat(c([r,r+Math.abs(l===d?i-f:l-d)],[1,o],a(r,r+Math.abs(l===d?i-f:l-d),scrollY))*i,"px"))}}))},m=null,p=function(t){var e=t.stickyContainer,r=(t.containerInitialHeight,t.startPosition);e.querySelector('[data-row*="middle"]')&&[e.querySelector('[data-row*="middle"]')].map((function(t){var e=function(t){var e=t.row;if(m)return m;var r=s(e),n=u(e);return m={rowInitialHeight:r,rowStickyHeight:n}}({row:t}),n=e.rowInitialHeight,i=e.rowStickyHeight;n!==i&&t.style.setProperty("--shrink-height","".concat(c([r,r+Math.abs(n-i)],[n,i],a(r,r+Math.abs(n-i),scrollY)),"px"))}))};function h(t){return function(t){if(Array.isArray(t))return g(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return g(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(t,e)}(t)||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 g(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function b(t){return function(t){if(Array.isArray(t))return w(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return w(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return w(t,e)}(t)||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 w(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var k=window.scrollY;function v(t){return function(t){if(Array.isArray(t))return S(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return S(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return S(t,e)}(t)||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 S(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function A(t){return function(t){if(Array.isArray(t))return O(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return O(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return O(t,e)}(t)||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 O(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var j=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yes";Array.from(t.querySelectorAll("[data-row][data-transparent-row]")).map((function(t){t.dataset.transparentRow=e}))},x=null,C=null,I=null;window.wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.selectiveRefresh.bind("partial-content-rendered",(function(t){setTimeout((function(){m=null,x=null,C=null,I=null,Y=null,q()}),500)}));var P=function(t){if(-1===t.dataset.sticky.indexOf("shrink")&&-1===t.dataset.sticky.indexOf("auto-hide"))return t.parentNode.getBoundingClientRect().height+200;var e=t.closest("header").getBoundingClientRect().top+scrollY;if(e>0){var r=document.elementFromPoint(0,3);r&&function(t){for(var e=[];t&&t!==document;t=t.parentNode)e.push(t);return e}(r).map((function(t){return getComputedStyle(t).position})).indexOf("fixed")>-1&&(e-=r.getBoundingClientRect().height)}var n=t.parentNode,i=getComputedStyle(document.body),o=parseFloat(i.getPropertyValue("--header-sticky-offset")||0);if(1===n.parentNode.children.length||n.parentNode.children[0].classList.contains("ct-sticky-container"))return e>0?e-o:e;var a=Array.from(n.parentNode.children).reduce((function(t,e,r){return t.indexOf(0)>-1||!e.dataset.row?[].concat(A(t),[0]):[].concat(A(t),[e.classList.contains("ct-sticky-container")?0:e.getBoundingClientRect().height])}),[]).reduce((function(t,e){return t+e}),e);return a>0?a-o:a},Y=null,q=function(){if(Y!==scrollY){Y=scrollY;var t=document.querySelector('[data-device="'.concat(Object(o.getCurrentScreen)(),'"] [data-sticky]'));if(t){var e=x;null===e&&(e=P(t),x=e);var r=I;r||(r=parseInt(t.getBoundingClientRect().height),I=parseInt(r),document.body.style.setProperty("--header-sticky-height-animated","".concat(A(t.querySelectorAll("[data-row]")).reduce((function(t,e){return t+u(e)}),0),"px")));var n=t.dataset.sticky.split(":").filter((function(t){return"yes"!==t&&"no"!==t&&"fixed"!==t})),i=e>0&&Math.abs(window.scrollY-e)<5||window.scrollY>e;n.indexOf("shrink")>-1&&(i=e>0?window.scrollY>=e:window.scrollY>0),setTimeout((function(){i&&-1===document.body.dataset.header.indexOf("shrink")&&(document.body.dataset.header="".concat(document.body.dataset.header,":shrink")),!i&&document.body.dataset.header.indexOf("shrink")>-1&&(document.body.dataset.header=document.body.dataset.header.replace(":shrink",""))}),300);var a=C;a||(a=C=Array.from(t.querySelectorAll("[data-row]")).reduce((function(t,e){return t+e.getBoundingClientRect().height}),0),t.parentNode.style.height="".concat(a,"px")),n.indexOf("shrink")>-1&&function(t){var e=t.containerInitialHeight,r=t.stickyContainer,n=(t.stickyContainerHeight,t.isSticky),i=t.startPosition,o=t.stickyComponents;if(0===i&&0===window.scrollY&&(r.dataset.sticky=["fixed"].concat(h(o)).join(":")),n){if(o.indexOf("yes")>-1)return;-1===r.dataset.sticky.indexOf("yes")&&(j(r,"no"),r.dataset.sticky=["yes"].concat(h(o)).join(":")),f({stickyContainer:r,startPosition:i}),p({stickyContainer:r,containerInitialHeight:e,startPosition:i})}else Array.from(r.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),Array.from(r.querySelectorAll('[data-row*="middle"] .site-logo-container')).map((function(t){return t.removeAttribute("style")})),j(r,"yes"),0===i&&0===window.scrollY?r.dataset.sticky=["fixed"].concat(h(o)).join(":"):r.dataset.sticky=o.join(":")}({stickyContainer:t,stickyContainerHeight:r,containerInitialHeight:a,isSticky:i,startPosition:e,stickyComponents:n}),n.indexOf("auto-hide")>-1&&function(t){var e=t.startPosition,r=t.stickyContainer,n=t.isSticky,i=t.stickyComponents;if(window.scrollY<e&&(k=window.scrollY),n&&window.scrollY-k==0&&document.body.style.setProperty("--header-sticky-height-animated","0px"),n&&window.scrollY-k<-5)-1===r.dataset.sticky.indexOf("yes")&&(r.dataset.sticky=["yes-start"].concat(b(i)).join(":"),requestAnimationFrame((function(){r.dataset.sticky=r.dataset.sticky.replace("yes-start","yes-end"),setTimeout((function(){r.dataset.sticky=r.dataset.sticky.replace("yes-end","yes")}),200)}))),j(r,"no"),document.body.removeAttribute("style");else{if(!n)return r.dataset.sticky=i.filter((function(t){return"yes-end"!==t})).join(":"),Array.from(r.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),j(r,"yes"),document.body.style.setProperty("--header-sticky-height-animated","0px"),void(k=window.scrollY);-1===r.dataset.sticky.indexOf("yes-hide")&&r.dataset.sticky.indexOf("yes:")>-1&&window.scrollY-k>5&&(r.dataset.sticky=["yes-hide-start"].concat(b(i)).join(":"),document.body.style.setProperty("--header-sticky-height-animated","0px"),requestAnimationFrame((function(){r.dataset.sticky=r.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){r.dataset.sticky=i.join(":"),Array.from(r.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),j(r,"yes")}),200)})))}k=window.scrollY}({stickyContainer:t,isSticky:i,startPosition:e,stickyComponents:n}),(n.indexOf("slide")>-1||n.indexOf("fade")>-1)&&function(t){var e=t.stickyContainer,r=t.isSticky,n=t.startPosition,i=t.stickyComponents;r?(-1===e.dataset.sticky.indexOf("yes")&&(e.dataset.sticky=["yes-start"].concat(v(i)).join(":"),setTimeout((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-start","yes-end"),setTimeout((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-end","yes")}),200)}),1)),j(e,"no")):-1===e.dataset.sticky.indexOf("yes-hide")&&e.dataset.sticky.indexOf("yes:")>-1&&(Math.abs(window.scrollY-n)>10?(e.dataset.sticky=i.join(":"),setTimeout((function(){Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")}))}),300),j(e,"yes")):(e.dataset.sticky=["yes-hide-start"].concat(v(i)).join(":"),requestAnimationFrame((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){e.dataset.sticky=i.join(":"),setTimeout((function(){Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")}))}),300),j(e,"yes")}),200)}))))}({stickyContainer:t,isSticky:i,startPosition:e,stickyComponents:n})}}},H=function(){document.querySelector("header [data-sticky]")&&(window.addEventListener("resize",(function(t){q(t),i.a.trigger("ct:header:update")}),!1),window.addEventListener("orientationchange",(function(t){q(t),i.a.trigger("ct:header:update")})),window.addEventListener("scroll",q,!1),window.addEventListener("load",q,!1),q())};document.body.className.indexOf("e-preview")>-1?setTimeout((function(){H()}),500):H(),Object(o.registerDynamicChunk)("blocksy_sticky_header",{mount:function(t){}})}]);
1
+ !function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=2)}([function(t,e){t.exports=window.ctEvents},function(t,e){t.exports=window.ctFrontend},function(t,e,r){"use strict";r.r(e);var n=r(0),i=r.n(n),o=r(1),a=function(t,e,r){return Math.max(t,Math.min(e,r))},c=function(t,e,r){return e[0]+(e[1]-e[0])/(t[1]-t[0])*(r-t[0])},s=function(t){if(t.blcInitialHeight)return t.blcInitialHeight;var e=t.firstElementChild;t.firstElementChild.firstElementChild&&(e=t.firstElementChild.firstElementChild);var r=e.getBoundingClientRect().height;return t.blcInitialHeight=r,r},u=function(t){var e=getComputedStyle(t),r=100;t.dataset.row.includes("middle")&&(r=e.getPropertyValue("--sticky-shrink"));var n=s(t);return r&&(n*=parseFloat(r)/100),n};function l(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return d(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(t,e)}(t)||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 d(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var y=null,f=function(t){var e=t.stickyContainer,r=t.startPosition;l(e.querySelectorAll('[data-row*="middle"]')).map((function(t){if(t.querySelector('[data-id="logo"] .site-logo-container')){var e=t.querySelector('[data-id="logo"] .site-logo-container'),n=function(t){var e=t.logo,r=t.row;if(y)return y;var n=parseFloat(getComputedStyle(e).getPropertyValue("--logo-max-height")||50),i=parseFloat(getComputedStyle(e).getPropertyValue("--logo-sticky-shrink").toString().replace(",",".")||1),o=s(r),a=u(r);return y={initialHeight:n,stickyShrink:i,rowInitialHeight:o,rowStickyHeight:a}}({logo:e,row:t}),i=n.initialHeight,o=n.stickyShrink,l=n.rowInitialHeight,d=n.rowStickyHeight,f=i*o;1!==o&&e.style.setProperty("--logo-shrink-height","".concat(c([r,r+Math.abs(l===d?i-f:l-d)],[1,o],a(r,r+Math.abs(l===d?i-f:l-d),scrollY))*i,"px"))}}))},m=null,p=function(t){var e=t.stickyContainer,r=(t.containerInitialHeight,t.startPosition);e.querySelector('[data-row*="middle"]')&&[e.querySelector('[data-row*="middle"]')].map((function(t){var e=function(t){var e=t.row;if(m)return m;var r=s(e),n=u(e);return m={rowInitialHeight:r,rowStickyHeight:n}}({row:t}),n=e.rowInitialHeight,i=e.rowStickyHeight;n!==i&&t.style.setProperty("--shrink-height","".concat(c([r,r+Math.abs(n-i)],[n,i],a(r,r+Math.abs(n-i),scrollY)),"px"))}))};function h(t){return function(t){if(Array.isArray(t))return g(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return g(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(t,e)}(t)||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 g(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function b(t){return function(t){if(Array.isArray(t))return w(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return w(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return w(t,e)}(t)||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 w(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var k=window.scrollY;function v(t){return function(t){if(Array.isArray(t))return S(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return S(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return S(t,e)}(t)||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 S(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function A(t){return function(t){if(Array.isArray(t))return O(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return O(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return O(t,e)}(t)||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 O(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var C=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yes";Array.from(t.querySelectorAll("[data-row][data-transparent-row]")).map((function(t){t.dataset.transparentRow=e}))},j=null,x=null,I=null;window.wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.selectiveRefresh.bind("partial-content-rendered",(function(t){setTimeout((function(){m=null,y=null,j=null,x=null,I=null,Y=null,q()}),500)}));var P=function(t){if(-1===t.dataset.sticky.indexOf("shrink")&&-1===t.dataset.sticky.indexOf("auto-hide"))return t.parentNode.getBoundingClientRect().height+200;var e=t.closest("header").getBoundingClientRect().top+scrollY;if(e>0){var r=document.elementFromPoint(0,3);r&&function(t){for(var e=[];t&&t!==document;t=t.parentNode)e.push(t);return e}(r).map((function(t){return getComputedStyle(t).position})).indexOf("fixed")>-1&&(e-=r.getBoundingClientRect().height)}var n=t.parentNode,i=getComputedStyle(document.body),o=parseFloat(i.getPropertyValue("--header-sticky-offset")||0);if(1===n.parentNode.children.length||n.parentNode.children[0].classList.contains("ct-sticky-container"))return e>0?e-o:e;var a=Array.from(n.parentNode.children).reduce((function(t,e,r){return t.indexOf(0)>-1||!e.dataset.row?[].concat(A(t),[0]):[].concat(A(t),[e.classList.contains("ct-sticky-container")?0:e.getBoundingClientRect().height])}),[]).reduce((function(t,e){return t+e}),e);return a>0?a-o:a},Y=null,q=function(){if(Y!==scrollY){Y=scrollY;var t=document.querySelector('[data-device="'.concat(Object(o.getCurrentScreen)(),'"] [data-sticky]'));if(t){var e=j;null===e&&(e=P(t),j=e);var r=I;r||(r=parseInt(t.getBoundingClientRect().height),I=parseInt(r),document.body.style.setProperty("--header-sticky-height-animated","".concat(A(t.querySelectorAll("[data-row]")).reduce((function(t,e){return t+u(e)}),0),"px")));var n=t.dataset.sticky.split(":").filter((function(t){return"yes"!==t&&"no"!==t&&"fixed"!==t})),i=e>0&&Math.abs(window.scrollY-e)<5||window.scrollY>e;n.indexOf("shrink")>-1&&(i=e>0?window.scrollY>=e:window.scrollY>0),setTimeout((function(){i&&-1===document.body.dataset.header.indexOf("shrink")&&(document.body.dataset.header="".concat(document.body.dataset.header,":shrink")),!i&&document.body.dataset.header.indexOf("shrink")>-1&&(document.body.dataset.header=document.body.dataset.header.replace(":shrink",""))}),300);var a=x;a||(a=x=Array.from(t.querySelectorAll("[data-row]")).reduce((function(t,e){return t+e.getBoundingClientRect().height}),0),t.parentNode.style.height="".concat(a,"px")),n.indexOf("shrink")>-1&&function(t){var e=t.containerInitialHeight,r=t.stickyContainer,n=(t.stickyContainerHeight,t.isSticky),i=t.startPosition,o=t.stickyComponents;if(0===i&&0===window.scrollY&&(r.dataset.sticky=["fixed"].concat(h(o)).join(":")),n){if(o.indexOf("yes")>-1)return;-1===r.dataset.sticky.indexOf("yes")&&(C(r,"no"),r.dataset.sticky=["yes"].concat(h(o)).join(":")),f({stickyContainer:r,startPosition:i}),p({stickyContainer:r,containerInitialHeight:e,startPosition:i})}else Array.from(r.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),Array.from(r.querySelectorAll('[data-row*="middle"] .site-logo-container')).map((function(t){return t.removeAttribute("style")})),C(r,"yes"),0===i&&0===window.scrollY?r.dataset.sticky=["fixed"].concat(h(o)).join(":"):r.dataset.sticky=o.join(":")}({stickyContainer:t,stickyContainerHeight:r,containerInitialHeight:a,isSticky:i,startPosition:e,stickyComponents:n}),n.indexOf("auto-hide")>-1&&function(t){var e=t.startPosition,r=t.stickyContainer,n=t.isSticky,i=t.stickyComponents;if(window.scrollY<e&&(k=window.scrollY),n&&window.scrollY-k==0&&document.body.style.setProperty("--header-sticky-height-animated","0px"),n&&window.scrollY-k<-5)-1===r.dataset.sticky.indexOf("yes")&&(r.dataset.sticky=["yes-start"].concat(b(i)).join(":"),requestAnimationFrame((function(){r.dataset.sticky=r.dataset.sticky.replace("yes-start","yes-end"),setTimeout((function(){r.dataset.sticky=r.dataset.sticky.replace("yes-end","yes")}),200)}))),C(r,"no"),document.body.removeAttribute("style");else{if(!n)return r.dataset.sticky=i.filter((function(t){return"yes-end"!==t})).join(":"),Array.from(r.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),C(r,"yes"),document.body.style.setProperty("--header-sticky-height-animated","0px"),void(k=window.scrollY);-1===r.dataset.sticky.indexOf("yes-hide")&&r.dataset.sticky.indexOf("yes:")>-1&&window.scrollY-k>5&&(r.dataset.sticky=["yes-hide-start"].concat(b(i)).join(":"),document.body.style.setProperty("--header-sticky-height-animated","0px"),requestAnimationFrame((function(){r.dataset.sticky=r.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){r.dataset.sticky=i.join(":"),Array.from(r.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")})),C(r,"yes")}),200)})))}k=window.scrollY}({stickyContainer:t,isSticky:i,startPosition:e,stickyComponents:n}),(n.indexOf("slide")>-1||n.indexOf("fade")>-1)&&function(t){var e=t.stickyContainer,r=t.isSticky,n=t.startPosition,i=t.stickyComponents;r?(-1===e.dataset.sticky.indexOf("yes")&&(e.dataset.sticky=["yes-start"].concat(v(i)).join(":"),setTimeout((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-start","yes-end"),setTimeout((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-end","yes")}),200)}),1)),C(e,"no")):-1===e.dataset.sticky.indexOf("yes-hide")&&e.dataset.sticky.indexOf("yes:")>-1&&(Math.abs(window.scrollY-n)>10?(e.dataset.sticky=i.join(":"),setTimeout((function(){Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")}))}),300),C(e,"yes")):(e.dataset.sticky=["yes-hide-start"].concat(v(i)).join(":"),requestAnimationFrame((function(){e.dataset.sticky=e.dataset.sticky.replace("yes-hide-start","yes-hide-end"),setTimeout((function(){e.dataset.sticky=i.join(":"),setTimeout((function(){Array.from(e.querySelectorAll("[data-row]")).map((function(t){return t.removeAttribute("style")}))}),300),C(e,"yes")}),200)}))))}({stickyContainer:t,isSticky:i,startPosition:e,stickyComponents:n})}}},H=function(){document.querySelector("header [data-sticky]")&&(window.addEventListener("resize",(function(t){q(t),i.a.trigger("ct:header:update")}),!1),window.addEventListener("orientationchange",(function(t){q(t),i.a.trigger("ct:header:update")})),window.addEventListener("scroll",q,!1),window.addEventListener("load",q,!1),q())};document.body.className.indexOf("e-preview")>-1?setTimeout((function(){H()}),500):H(),Object(o.registerDynamicChunk)("blocksy_sticky_header",{mount:function(t){}})}]);
static/bundle/sync.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t={};function o(r){if(t[r])return t[r].exports;var c=t[r]={i:r,l:!1,exports:{}};return e[r].call(c.exports,c,c.exports,o),c.l=!0,c.exports}o.m=e,o.c=t,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)o.d(r,c,function(t){return e[t]}.bind(null,c));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=3)}([function(e,t){e.exports=window.blocksyCustomizerSync},function(e,t){e.exports=window.ctEvents},function(e,t){e.exports=window.ctFrontend},function(e,t,o){"use strict";o.r(t);var r=o(1),c=o.n(r),a=o(0);o(2);function l(e){return function(e){if(Array.isArray(e))return n(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 n(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return n(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 n(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o<t;o++)r[o]=e[o];return r}function i(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function s(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?i(Object(o),!0).forEach((function(t){u(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function u(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}c.a.on("ct:header:sync:collect-variable-descriptors",(function(e){e.account=function(e){var t=e.itemId;return s(s(s(s({accountHeaderIconSize:{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"el-suffix",to_add:'[data-state="out"]'})),variable:"icon-size",responsive:!0,unit:"px"},account_loggedin_icon_size:{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"el-suffix",to_add:'[data-state="in"]'})),variable:"icon-size",responsive:!0,unit:"px"},accountHeaderAvatarSize:{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"avatar-size",responsive:!0,unit:"px"}},Object(a.handleBackgroundOptionFor)({id:"accountHeaderFormBackground",selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:[Object(a.getRootSelectorFor)({itemId:t})[0]],operation:"suffix",to_add:"#account-modal .ct-account-form"}))})),Object(a.handleBackgroundOptionFor)({id:"accountHeaderBackground",selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:[Object(a.getRootSelectorFor)({itemId:t})[0]],operation:"suffix",to_add:"#account-modal"}))})),{},{account_form_shadow:{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:[Object(a.getRootSelectorFor)({itemId:t})[0]],operation:"suffix",to_add:"#account-modal .ct-account-form"})),type:"box-shadow",variable:"box-shadow"},account_modal_font_color:[{selector:"#account-modal .ct-account-form",variable:"color",type:"color:default"},{selector:"#account-modal .ct-account-form",variable:"linkHoverColor",type:"color:hover"}],account_modal_form_text_color:[{selector:"#account-modal form",variable:"form-text-initial-color",type:"color:default"},{selector:"#account-modal form",variable:"form-text-focus-color",type:"color:focus"}],account_modal_form_border_color:[{selector:"#account-modal form",variable:"form-field-border-initial-color",type:"color:default"},{selector:"#account-modal form",variable:"form-field-border-focus-color",type:"color:focus"}],account_modal_form_background_color:[{selector:"#account-modal form",variable:"form-field-initial-background",type:"color:default"},{selector:"#account-modal form",variable:"form-field-focus-background",type:"color:focus"}],account_close_button_color:[{selector:"#account-modal .ct-toggle-close",variable:"icon-color",type:"color:default"},{selector:"#account-modal .ct-toggle-close:hover",variable:"icon-color",type:"color:hover"}],account_close_button_border_color:[{selector:'#account-modal .ct-toggle-close[data-type="type-2"]',variable:"toggle-button-border-color",type:"color:default"},{selector:'#account-modal .ct-toggle-close[data-type="type-2"]:hover',variable:"toggle-button-border-color",type:"color:hover"}],account_close_button_shape_color:[{selector:'#account-modal .ct-toggle-close[data-type="type-3"]',variable:"toggle-button-background",type:"color:default"},{selector:'#account-modal .ct-toggle-close[data-type="type-3"]:hover',variable:"toggle-button-background",type:"color:hover"}],accountHeaderMargin:{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),type:"spacing",variable:"margin",responsive:!0,important:!0}},Object(a.typographyOption)({id:"account_label_font",selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"suffix",to_add:".ct-label"}))})),{},{accountHeaderColor:[{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"linkInitialColor",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"linkHoverColor",type:"color:hover",responsive:!0}],header_account_icon_color:[{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"icon-color",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"icon-hover-color",type:"color:hover",responsive:!0}],transparentAccountHeaderColor:[{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"linkInitialColor",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"linkHoverColor",type:"color:hover",responsive:!0}],transparent_header_account_icon_color:[{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"icon-color",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"icon-hover-color",type:"color:hover",responsive:!0}],stickyAccountHeaderColor:[{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"linkInitialColor",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"linkHoverColor",type:"color:hover",responsive:!0}],sticky_header_account_icon_color:[{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"icon-color",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"icon-hover-color",type:"color:hover",responsive:!0}]})}})),c.a.on("ct:header:sync:item:account",(function(e){var t=e.optionId,o=e.optionValue,r='[data-id="account"]';if("header_account_visibility"===t&&Object(a.updateAndSaveEl)(r,(function(e){return Object(a.responsiveClassesFor)(s(s({},o),{},{desktop:!0}),e)})),"loggedin_account_label_visibility"!==t&&"loggedout_account_label_visibility"!==t||Object(a.updateAndSaveEl)(r,(function(e){l(e.querySelectorAll(".ct-label")).map((function(e){Object(a.responsiveClassesFor)(o,e)}))})),"loggedin_label"===t&&Object(a.updateAndSaveEl)(r,(function(e){l(e.querySelectorAll(".ct-label")).map((function(e){e.innerHTML=o}))})),"login_label"===t&&Object(a.updateAndSaveEl)(r,(function(e){l(e.querySelectorAll(".ct-label")).map((function(e){e.innerHTML=o}))})),"loggedout_label_position"!==t&&"loggedin_label_position"!==t||(Object(a.updateAndSaveEl)(r,(function(e){o.desktop||(o={desktop:o,mobile:o}),e.dataset.label=o.desktop}),{onlyView:"desktop"}),Object(a.updateAndSaveEl)(r,(function(e){o.desktop||(o={desktop:o,mobile:o}),e.dataset.label=o.mobile}),{onlyView:"mobile"})),"account_close_button_type"===t){var c=document.querySelector("#account-modal .ct-toggle-close");setTimeout((function(){c.classList.add("ct-disable-transitions"),requestAnimationFrame((function(){c&&(c.dataset.type=o),setTimeout((function(){c.classList.remove("ct-disable-transitions")}))}))}),300)}})),c.a.on("ct:header:sync:collect-variable-descriptors",(function(e){e.global=function(e){e.itemId;return{transparent_behaviour:{selector:'[data-header*="'.concat(document.body.dataset.header,'"]'),variable:"has-transparent-header",responsive:!0,extractValue:function(e){return{desktop:e.desktop?"var(--true)":"var(--false)",tablet:e.mobile?"var(--true)":"var(--false)",mobile:e.mobile?"var(--true)":"var(--false)"}},unit:""}}}})),c.a.on("ct:header:sync:item:global",(function(e){var t=e.optionId,o=e.optionValue,r=e.values;if("has_sticky_header"===t||"sticky_rows"===t||"sticky_behaviour"===t){var a=r.has_sticky_header,l=r.sticky_rows,n=r.sticky_behaviour;Array.from(document.querySelectorAll("[data-sticky]")).map((function(e){e.removeAttribute("data-sticky")})),"yes"===a&&Array.from(document.querySelectorAll("[data-row]")).map((function(e){var t=e.dataset.row;if(l[t]){var o=[];n.desktop&&o.push("desktop"),n.mobile&&o.push("mobile"),e.dataset.sticky=o.join(":")}})),c.a.trigger("blocksy:frontend:init")}if("transparent_behaviour"===t){if(!document.querySelector("[data-transparent]"))return;Array.from(document.querySelectorAll("[data-device]")).map((function(e){e.removeAttribute("data-transparent"),Array.from(e.querySelectorAll("[data-row]")).map((function(e){return e.removeAttribute("data-transparent-row")})),o[e.dataset.device]&&(e.dataset.transparent="",Array.from(e.querySelectorAll("[data-row]")).map((function(e){return e.dataset.transparentRow="yes"}))),c.a.trigger("blocksy:frontend:init")}))}}))}]);
1
+ !function(e){var t={};function o(r){if(t[r])return t[r].exports;var c=t[r]={i:r,l:!1,exports:{}};return e[r].call(c.exports,c,c.exports,o),c.l=!0,c.exports}o.m=e,o.c=t,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)o.d(r,c,function(t){return e[t]}.bind(null,c));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=2)}([function(e,t){e.exports=window.blocksyCustomizerSync},function(e,t){e.exports=window.ctEvents},function(e,t,o){"use strict";o.r(t);var r=o(1),c=o.n(r),a=o(0);function l(e){return function(e){if(Array.isArray(e))return n(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 n(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return n(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 n(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o<t;o++)r[o]=e[o];return r}function i(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function s(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?i(Object(o),!0).forEach((function(t){u(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function u(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}c.a.on("ct:header:sync:collect-variable-descriptors",(function(e){e.account=function(e){var t=e.itemId;return s(s(s(s({accountHeaderIconSize:{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"el-suffix",to_add:'[data-state="out"]'})),variable:"icon-size",responsive:!0,unit:"px"},account_loggedin_icon_size:{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"el-suffix",to_add:'[data-state="in"]'})),variable:"icon-size",responsive:!0,unit:"px"},accountHeaderAvatarSize:{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"avatar-size",responsive:!0,unit:"px"}},Object(a.handleBackgroundOptionFor)({id:"accountHeaderFormBackground",selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:[Object(a.getRootSelectorFor)({itemId:t})[0]],operation:"suffix",to_add:"#account-modal .ct-account-form"}))})),Object(a.handleBackgroundOptionFor)({id:"accountHeaderBackground",selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:[Object(a.getRootSelectorFor)({itemId:t})[0]],operation:"suffix",to_add:"#account-modal"}))})),{},{account_form_shadow:{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:[Object(a.getRootSelectorFor)({itemId:t})[0]],operation:"suffix",to_add:"#account-modal .ct-account-form"})),type:"box-shadow",variable:"box-shadow"},account_modal_font_color:[{selector:"#account-modal .ct-account-form",variable:"color",type:"color:default"},{selector:"#account-modal .ct-account-form",variable:"linkHoverColor",type:"color:hover"}],account_modal_form_text_color:[{selector:"#account-modal form",variable:"form-text-initial-color",type:"color:default"},{selector:"#account-modal form",variable:"form-text-focus-color",type:"color:focus"}],account_modal_form_border_color:[{selector:"#account-modal form",variable:"form-field-border-initial-color",type:"color:default"},{selector:"#account-modal form",variable:"form-field-border-focus-color",type:"color:focus"}],account_modal_form_background_color:[{selector:"#account-modal form",variable:"form-field-initial-background",type:"color:default"},{selector:"#account-modal form",variable:"form-field-focus-background",type:"color:focus"}],account_close_button_color:[{selector:"#account-modal .ct-toggle-close",variable:"icon-color",type:"color:default"},{selector:"#account-modal .ct-toggle-close:hover",variable:"icon-color",type:"color:hover"}],account_close_button_border_color:[{selector:'#account-modal .ct-toggle-close[data-type="type-2"]',variable:"toggle-button-border-color",type:"color:default"},{selector:'#account-modal .ct-toggle-close[data-type="type-2"]:hover',variable:"toggle-button-border-color",type:"color:hover"}],account_close_button_shape_color:[{selector:'#account-modal .ct-toggle-close[data-type="type-3"]',variable:"toggle-button-background",type:"color:default"},{selector:'#account-modal .ct-toggle-close[data-type="type-3"]:hover',variable:"toggle-button-background",type:"color:hover"}],accountHeaderMargin:{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),type:"spacing",variable:"margin",responsive:!0,important:!0}},Object(a.typographyOption)({id:"account_label_font",selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"suffix",to_add:".ct-label"}))})),{},{accountHeaderColor:[{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"linkInitialColor",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"linkHoverColor",type:"color:hover",responsive:!0}],header_account_icon_color:[{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"icon-color",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.getRootSelectorFor)({itemId:t})),variable:"icon-hover-color",type:"color:hover",responsive:!0}],transparentAccountHeaderColor:[{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"linkInitialColor",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"linkHoverColor",type:"color:hover",responsive:!0}],transparent_header_account_icon_color:[{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"icon-color",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-transparent-row="yes"]'})),variable:"icon-hover-color",type:"color:hover",responsive:!0}],stickyAccountHeaderColor:[{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"linkInitialColor",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"linkHoverColor",type:"color:hover",responsive:!0}],sticky_header_account_icon_color:[{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"icon-color",type:"color:default",responsive:!0},{selector:Object(a.assembleSelector)(Object(a.mutateSelector)({selector:Object(a.getRootSelectorFor)({itemId:t}),operation:"between",to_add:'[data-sticky*="yes"]'})),variable:"icon-hover-color",type:"color:hover",responsive:!0}]})}})),c.a.on("ct:header:sync:item:account",(function(e){var t=e.optionId,o=e.optionValue,r='[data-id="account"]';if("header_account_visibility"===t&&Object(a.updateAndSaveEl)(r,(function(e){return Object(a.responsiveClassesFor)(s(s({},o),{},{desktop:!0}),e)})),"loggedin_account_label_visibility"!==t&&"loggedout_account_label_visibility"!==t||Object(a.updateAndSaveEl)(r,(function(e){l(e.querySelectorAll(".ct-label")).map((function(e){Object(a.responsiveClassesFor)(o,e)}))})),"loggedin_label"===t&&Object(a.updateAndSaveEl)(r,(function(e){l(e.querySelectorAll(".ct-label")).map((function(e){e.innerHTML=o}))})),"login_label"===t&&Object(a.updateAndSaveEl)(r,(function(e){l(e.querySelectorAll(".ct-label")).map((function(e){e.innerHTML=o}))})),"loggedout_label_position"!==t&&"loggedin_label_position"!==t||(Object(a.updateAndSaveEl)(r,(function(e){o.desktop||(o={desktop:o,mobile:o}),e.dataset.label=o.desktop}),{onlyView:"desktop"}),Object(a.updateAndSaveEl)(r,(function(e){o.desktop||(o={desktop:o,mobile:o}),e.dataset.label=o.mobile}),{onlyView:"mobile"})),"account_close_button_type"===t){var c=document.querySelector("#account-modal .ct-toggle-close");setTimeout((function(){c.classList.add("ct-disable-transitions"),requestAnimationFrame((function(){c&&(c.dataset.type=o),setTimeout((function(){c.classList.remove("ct-disable-transitions")}))}))}),300)}})),c.a.on("ct:header:sync:collect-variable-descriptors",(function(e){e.global=function(e){e.itemId;return{transparent_behaviour:{selector:'[data-header*="'.concat(document.body.dataset.header,'"]'),variable:"has-transparent-header",responsive:!0,extractValue:function(e){return{desktop:e.desktop?"var(--true)":"var(--false)",tablet:e.mobile?"var(--true)":"var(--false)",mobile:e.mobile?"var(--true)":"var(--false)"}},unit:""}}}})),c.a.on("ct:header:sync:item:global",(function(e){var t=e.optionId,o=e.optionValue,r=e.values;if("has_sticky_header"===t||"sticky_rows"===t||"sticky_behaviour"===t){var a=r.has_sticky_header,l=r.sticky_rows,n=r.sticky_behaviour;Array.from(document.querySelectorAll("[data-sticky]")).map((function(e){e.removeAttribute("data-sticky")})),"yes"===a&&Array.from(document.querySelectorAll("[data-row]")).map((function(e){var t=e.dataset.row;if(l[t]){var o=[];n.desktop&&o.push("desktop"),n.mobile&&o.push("mobile"),e.dataset.sticky=o.join(":")}})),c.a.trigger("blocksy:frontend:init")}if("transparent_behaviour"===t){if(!document.querySelector("[data-transparent]"))return;Array.from(document.querySelectorAll("[data-device]")).map((function(e){e.removeAttribute("data-transparent"),Array.from(e.querySelectorAll("[data-row]")).map((function(e){return e.removeAttribute("data-transparent-row")})),o[e.dataset.device]&&(e.dataset.transparent="",Array.from(e.querySelectorAll("[data-row]")).map((function(e){return e.dataset.transparentRow="yes"}))),c.a.trigger("blocksy:frontend:init")}))}}))}]);
static/js/frontend/account.js CHANGED
@@ -2,6 +2,26 @@ import ctEvents from 'ct-events'
2
  import { formPreSubmitHook } from './account/hooks'
3
  import { resetCaptchaFor } from './account/captcha'
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  export const activateScreen = (
6
  el,
7
  {
@@ -170,6 +190,8 @@ export const handleAccountModal = (el) => {
170
  return
171
  }
172
 
 
 
173
  let body = new FormData(maybeLogin)
174
 
175
  // let url = maybeLogin.action
@@ -187,6 +209,7 @@ export const handleAccountModal = (el) => {
187
  })
188
  .then((response) => response.json())
189
  .then((res) => {
 
190
  let hasError = !!res.error
191
 
192
  const container = maybeLogin.closest(
@@ -315,6 +338,7 @@ export const handleAccountModal = (el) => {
315
  })
316
  .then((response) => response.text())
317
  .then((html) => {
 
318
  const { doc, hasError } = maybeAddErrors(
319
  maybeLogin.closest('.ct-login-form'),
320
  html
@@ -353,6 +377,8 @@ export const handleAccountModal = (el) => {
353
  return
354
  }
355
 
 
 
356
  formPreSubmitHook(maybeRegister).then(() =>
357
  fetch(
358
  // maybeRegister.action,
@@ -370,6 +396,8 @@ export const handleAccountModal = (el) => {
370
  html
371
  )
372
 
 
 
373
  if (!hasError) {
374
  maybeAddMessage(
375
  maybeRegister.closest('.ct-register-form'),
@@ -410,6 +438,8 @@ export const handleAccountModal = (el) => {
410
  return
411
  }
412
 
 
 
413
  fetch(
414
  // maybeLostPassword.action,
415
  `${ct_localizations.ajax_url}?action=blc_implement_user_lostpassword`,
@@ -426,6 +456,8 @@ export const handleAccountModal = (el) => {
426
  html
427
  )
428
 
 
 
429
  if (!hasError) {
430
  maybeAddMessage(
431
  maybeLostPassword.closest(
2
  import { formPreSubmitHook } from './account/hooks'
3
  import { resetCaptchaFor } from './account/captcha'
4
 
5
+ const maybeAddLoadingState = (form) => {
6
+ const maybeButton = form.querySelector('[name*="submit"]')
7
+
8
+ if (!maybeButton) {
9
+ return
10
+ }
11
+
12
+ maybeButton.classList.add('ct-loading')
13
+ }
14
+
15
+ const maybeCleanupLoadingState = (form) => {
16
+ const maybeButton = form.querySelector('[name*="submit"]')
17
+
18
+ if (!maybeButton) {
19
+ return
20
+ }
21
+
22
+ maybeButton.classList.remove('ct-loading')
23
+ }
24
+
25
  export const activateScreen = (
26
  el,
27
  {
190
  return
191
  }
192
 
193
+ maybeAddLoadingState(maybeLogin)
194
+
195
  let body = new FormData(maybeLogin)
196
 
197
  // let url = maybeLogin.action
209
  })
210
  .then((response) => response.json())
211
  .then((res) => {
212
+ maybeCleanupLoadingState(maybeLogin)
213
  let hasError = !!res.error
214
 
215
  const container = maybeLogin.closest(
338
  })
339
  .then((response) => response.text())
340
  .then((html) => {
341
+ maybeCleanupLoadingState(maybeLogin)
342
  const { doc, hasError } = maybeAddErrors(
343
  maybeLogin.closest('.ct-login-form'),
344
  html
377
  return
378
  }
379
 
380
+ maybeAddLoadingState(maybeRegister)
381
+
382
  formPreSubmitHook(maybeRegister).then(() =>
383
  fetch(
384
  // maybeRegister.action,
396
  html
397
  )
398
 
399
+ maybeCleanupLoadingState(maybeRegister)
400
+
401
  if (!hasError) {
402
  maybeAddMessage(
403
  maybeRegister.closest('.ct-register-form'),
438
  return
439
  }
440
 
441
+ maybeAddLoadingState(maybeLostPassword)
442
+
443
  fetch(
444
  // maybeLostPassword.action,
445
  `${ct_localizations.ajax_url}?action=blc_implement_user_lostpassword`,
456
  html
457
  )
458
 
459
+ maybeCleanupLoadingState(maybeLostPassword)
460
+
461
  if (!hasError) {
462
  maybeAddMessage(
463
  maybeLostPassword.closest(
static/js/frontend/sticky.js CHANGED
@@ -8,6 +8,7 @@ import { computeFadeSlide } from './sticky/fade-slide'
8
  import { getRowStickyHeight } from './sticky/shrink-utils'
9
 
10
  import { clearShrinkCache } from './sticky/shrink-handle-middle-row'
 
11
 
12
  export const setTransparencyFor = (deviceContainer, value = 'yes') => {
13
  Array.from(
@@ -37,6 +38,7 @@ if (window.wp && wp.customize && wp.customize.selectiveRefresh) {
37
  (placement) => {
38
  setTimeout(() => {
39
  clearShrinkCache()
 
40
 
41
  cachedStartPosition = null
42
  cachedContainerInitialHeight = null
8
  import { getRowStickyHeight } from './sticky/shrink-utils'
9
 
10
  import { clearShrinkCache } from './sticky/shrink-handle-middle-row'
11
+ import { clearLogoShrinkCache } from './sticky/shrink-handle-logo'
12
 
13
  export const setTransparencyFor = (deviceContainer, value = 'yes') => {
14
  Array.from(
38
  (placement) => {
39
  setTimeout(() => {
40
  clearShrinkCache()
41
+ clearLogoShrinkCache()
42
 
43
  cachedStartPosition = null
44
  cachedContainerInitialHeight = null
static/js/frontend/sticky/shrink-handle-logo.js CHANGED
@@ -7,6 +7,10 @@ import {
7
 
8
  let logoShrinkCache = null
9
 
 
 
 
 
10
  const getLogoShrinkData = ({ logo, row }) => {
11
  if (logoShrinkCache) {
12
  return logoShrinkCache
7
 
8
  let logoShrinkCache = null
9
 
10
+ export const clearLogoShrinkCache = () => {
11
+ logoShrinkCache = null
12
+ }
13
+
14
  const getLogoShrinkData = ({ logo, row }) => {
15
  if (logoShrinkCache) {
16
  return logoShrinkCache
static/js/frontend/sticky/shrink-utils.js CHANGED
@@ -14,8 +14,13 @@ export const getRowInitialHeight = (el) => {
14
  return el.blcInitialHeight
15
  }
16
 
17
- let initialHeight = el.firstElementChild.firstElementChild.getBoundingClientRect()
18
- .height
 
 
 
 
 
19
 
20
  el.blcInitialHeight = initialHeight
21
 
14
  return el.blcInitialHeight
15
  }
16
 
17
+ let elToCheck = el.firstElementChild
18
+
19
+ if (el.firstElementChild.firstElementChild) {
20
+ elToCheck = el.firstElementChild.firstElementChild
21
+ }
22
+
23
+ let initialHeight = elToCheck.getBoundingClientRect().height
24
 
25
  el.blcInitialHeight = initialHeight
26
 
static/js/screens/DemoInstall/DemoToInstall.js CHANGED
@@ -155,7 +155,7 @@ const DemoToInstall = ({ location, navigate }) => {
155
  builder:
156
  demoVariations.length === 1 ? demoVariations[0].builder : null,
157
 
158
- child_theme: true,
159
 
160
  plugins: demoVariations[0].plugins.map((plugin) => ({
161
  plugin,
155
  builder:
156
  demoVariations.length === 1 ? demoVariations[0].builder : null,
157
 
158
+ child_theme: false,
159
 
160
  plugins: demoVariations[0].plugins.map((plugin) => ({
161
  plugin,
static/js/screens/DemoInstall/Wizzard/ChildTheme.js CHANGED
@@ -5,7 +5,7 @@ import {
5
  useState,
6
  useContext,
7
  createContext,
8
- Fragment
9
  } from '@wordpress/element'
10
  import { __ } from 'ct-i18n'
11
  import classnames from 'classnames'
@@ -86,7 +86,7 @@ const ChildTheme = ({ demoConfiguration, setDemoConfiguration, style }) => {
86
  onChange={() =>
87
  setDemoConfiguration({
88
  ...demoConfiguration,
89
- child_theme: !demoConfiguration.child_theme
90
  })
91
  }>
92
  {!child_theme_exists
@@ -102,7 +102,9 @@ const ChildTheme = ({ demoConfiguration, setDemoConfiguration, style }) => {
102
  'blocksy-companion'
103
  )}
104
 
105
- <a href="https://developer.wordpress.org/themes/advanced-topics/child-themes/" target="_blank">
 
 
106
  {__('Learn more about child themes', 'blocksy-companion')}
107
  </a>
108
  </div>
5
  useState,
6
  useContext,
7
  createContext,
8
+ Fragment,
9
  } from '@wordpress/element'
10
  import { __ } from 'ct-i18n'
11
  import classnames from 'classnames'
86
  onChange={() =>
87
  setDemoConfiguration({
88
  ...demoConfiguration,
89
+ child_theme: !demoConfiguration.child_theme,
90
  })
91
  }>
92
  {!child_theme_exists
102
  'blocksy-companion'
103
  )}
104
 
105
+ <a
106
+ href="https://developer.wordpress.org/themes/advanced-topics/child-themes/"
107
+ target="_blank">
108
  {__('Learn more about child themes', 'blocksy-companion')}
109
  </a>
110
  </div>
static/sass/account-lazy.scss CHANGED
@@ -95,6 +95,14 @@
95
 
96
  .ct-button {
97
  width: 100%;
 
 
 
 
 
 
 
 
98
  }
99
 
100
  .col-2 {
95
 
96
  .ct-button {
97
  width: 100%;
98
+
99
+ svg {
100
+ margin-inline-start: 10px;
101
+ }
102
+
103
+ &:not(.ct-loading) svg {
104
+ display: none;
105
+ }
106
  }
107
 
108
  .col-2 {