Version Description
Download this release
Release Info
Developer | creativethemeshq |
Plugin | Blocksy Companion |
Version | 1.8.7 |
Comparing to | |
See all releases |
Code changes from version 1.8.6.4 to 1.8.7
- blocksy-companion.php +1 -1
- framework/extensions/cookies-consent/customizer.php +1 -1
- framework/extensions/cookies-consent/helpers.php +1 -1
- framework/extensions/cookies-consent/static/bundle/main.min.css +1 -1
- framework/extensions/newsletter-subscribe/extension.php +7 -2
- framework/extensions/newsletter-subscribe/includes/BlocksyMailchimpManager.php +4 -0
- framework/extensions/newsletter-subscribe/static/bundle/main.min.css +1 -1
- framework/extensions/product-reviews/helpers.php +7 -3
- framework/extensions/product-reviews/static/bundle/dashboard.js +1 -1
- framework/extensions/product-reviews/static/bundle/main-admin.min.css +1 -1
- framework/extensions/product-reviews/static/bundle/main.min.css +1 -1
- framework/extensions/product-reviews/views/single-top.php +14 -6
- framework/extensions/trending/static/bundle/main.min.css +1 -1
- framework/extensions/widgets/static/bundle/main.min.css +1 -1
- framework/extensions/widgets/widgets/ct-contact-info/view.php +2 -1
- framework/features/conditions-manager.php +21 -3
- framework/features/dynamic-css.php +0 -13
- framework/features/header.php +25 -33
- framework/features/header/items/account/dynamic-styles.php +122 -0
- framework/features/header/items/account/options.php +124 -24
- framework/features/header/items/account/sync.js +42 -0
- framework/features/header/modal/login.php +1 -1
- framework/helpers/helpers.php +5 -2
- framework/theme-integration.php +11 -31
- framework/views/blocksy-posts.php +25 -1
- readme.txt +13 -2
- static/bundle/account.js +1 -1
- static/bundle/dashboard.js +1 -1
- static/bundle/dashboard.min.css +1 -1
- static/bundle/main.min.css +1 -1
- static/bundle/options.js +1 -1
- static/bundle/options.min.css +2 -2
- static/bundle/sticky.js +1 -1
- static/bundle/sync.js +1 -1
- static/js/account.js +41 -31
- static/js/frontend/account.js +4 -0
- static/js/frontend/sticky.js +67 -425
- static/js/frontend/sticky/auto-hide.js +110 -0
- static/js/frontend/sticky/fade-slide.js +89 -0
- static/js/frontend/sticky/shrink-handle-logo.js +65 -0
- static/js/frontend/sticky/shrink-handle-middle-row.js +50 -0
- static/js/frontend/sticky/shrink-utils.js +41 -0
- static/js/frontend/sticky/shrink.js +83 -0
- static/js/header/PanelsManager.js +55 -9
- static/js/helpers/useActivationAction.js +2 -2
- static/js/screens/DemoInstall/Wizzard/Plugins.js +1 -0
- static/sass/options.scss +1 -0
- static/sass/options/position-option.scss +41 -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.
|
7 |
Author: CreativeThemes
|
8 |
Author URI: https://creativethemes.com
|
9 |
Text Domain: blc
|
3 |
/*
|
4 |
Plugin Name: Blocksy Companion
|
5 |
Description: This plugin is the companion for the Blocksy theme, it runs and adds its enhacements only if the Blocksy theme is installed and active.
|
6 |
+
Version: 1.8.7
|
7 |
Author: CreativeThemes
|
8 |
Author URI: https://creativethemes.com
|
9 |
Text Domain: blc
|
framework/extensions/cookies-consent/customizer.php
CHANGED
@@ -199,7 +199,7 @@ $options = [
|
|
199 |
'label' => false,
|
200 |
'type' => 'wp-editor',
|
201 |
'value' => sprintf(
|
202 |
-
__('I accept the %sPrivacy Policy%s', 'blc'),
|
203 |
'<a href="/privacy-policy">',
|
204 |
'</a>'
|
205 |
),
|
199 |
'label' => false,
|
200 |
'type' => 'wp-editor',
|
201 |
'value' => sprintf(
|
202 |
+
__('I accept the %sPrivacy Policy%s*', 'blc'),
|
203 |
'<a href="/privacy-policy">',
|
204 |
'</a>'
|
205 |
),
|
framework/extensions/cookies-consent/helpers.php
CHANGED
@@ -84,7 +84,7 @@ function blocksy_ext_cookies_checkbox($prefix = '') {
|
|
84 |
?>
|
85 |
|
86 |
<p class="gdpr-confirm-policy">
|
87 |
-
<input id="gdprconfirm<?php echo $prefix ?>" name="gdprconfirm" type="checkbox" required /><label for="gdprconfirm<?php echo $prefix ?>"><?php echo $message ?></label>
|
88 |
</p>
|
89 |
|
90 |
<?php
|
84 |
?>
|
85 |
|
86 |
<p class="gdpr-confirm-policy">
|
87 |
+
<input id="gdprconfirm<?php echo $prefix ?>" class="ct-checkbox" name="gdprconfirm" type="checkbox" required /><label for="gdprconfirm<?php echo $prefix ?>"><?php echo $message ?></label>
|
88 |
</p>
|
89 |
|
90 |
<?php
|
framework/extensions/cookies-consent/static/bundle/main.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.7
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
framework/extensions/newsletter-subscribe/extension.php
CHANGED
@@ -113,7 +113,11 @@ class BlocksyExtensionNewsletterSubscribe {
|
|
113 |
|
114 |
add_filter(
|
115 |
'blocksy_single_posts_end_customizer_options',
|
116 |
-
function ($opts) {
|
|
|
|
|
|
|
|
|
117 |
$opts['newsletter_subscribe_single_post_enabled'] = blc_call_fn(
|
118 |
['fn' => 'blocksy_get_options'],
|
119 |
dirname( __FILE__ ) . '/customizer.php',
|
@@ -121,7 +125,8 @@ class BlocksyExtensionNewsletterSubscribe {
|
|
121 |
);
|
122 |
|
123 |
return $opts;
|
124 |
-
}
|
|
|
125 |
);
|
126 |
|
127 |
add_filter('blocksy_extensions_metabox_post:elements:before', function ($opts) {
|
113 |
|
114 |
add_filter(
|
115 |
'blocksy_single_posts_end_customizer_options',
|
116 |
+
function ($opts, $prefix) {
|
117 |
+
if ($prefix !== 'single_blog_post') {
|
118 |
+
return $opts;
|
119 |
+
}
|
120 |
+
|
121 |
$opts['newsletter_subscribe_single_post_enabled'] = blc_call_fn(
|
122 |
['fn' => 'blocksy_get_options'],
|
123 |
dirname( __FILE__ ) . '/customizer.php',
|
125 |
);
|
126 |
|
127 |
return $opts;
|
128 |
+
},
|
129 |
+
10, 2
|
130 |
);
|
131 |
|
132 |
add_filter('blocksy_extensions_metabox_post:elements:before', function ($opts) {
|
framework/extensions/newsletter-subscribe/includes/BlocksyMailchimpManager.php
CHANGED
@@ -1,5 +1,9 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
3 |
class BlocksyMailchimpManager extends BlocksyNewsletterManager {
|
4 |
public function __construct() {
|
5 |
}
|
1 |
<?php
|
2 |
|
3 |
+
if (class_exists('BlocksyMailchimpManager')) {
|
4 |
+
return;
|
5 |
+
}
|
6 |
+
|
7 |
class BlocksyMailchimpManager extends BlocksyNewsletterManager {
|
8 |
public function __construct() {
|
9 |
}
|
framework/extensions/newsletter-subscribe/static/bundle/main.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.7
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
framework/extensions/product-reviews/helpers.php
CHANGED
@@ -18,9 +18,13 @@ function blocksy_get_product_review_overall_score($post_id = null) {
|
|
18 |
|
19 |
$output = '<div class="ct-overall-score-layer">';
|
20 |
|
21 |
-
$avg_score =
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
|
|
24 |
|
25 |
$output .= '<span class="ct-score-label">';
|
26 |
$output .= __('Rating', 'blc');
|
18 |
|
19 |
$output = '<div class="ct-overall-score-layer">';
|
20 |
|
21 |
+
$avg_score = apply_filters(
|
22 |
+
'blocksy:ext:product-reviews:overall-score',
|
23 |
+
round(array_reduce($scores, function ($carry, $score) {
|
24 |
+
return $carry + intval($score['score']);
|
25 |
+
}, 0) / count($scores) * 2) / 2,
|
26 |
+
$scores
|
27 |
+
);
|
28 |
|
29 |
$output .= '<span class="ct-score-label">';
|
30 |
$output .= __('Rating', 'blc');
|
framework/extensions/product-reviews/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 a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)&&r.length){var i=o.apply(null,r);i&&e.push(i)}else if("object"===a)for(var c in r)n.call(r,c)&&r[c]&&e.push(c)}}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,a=n(10),i=n(11),c=(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 u(e){return setTimeout(e,0)}e.exports=function(e,t){var n=document,o="string"==typeof e?n.querySelector(e):e,s=i({returnFocusOnDeactivate:!0,escapeDeactivates:!0},t),l={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},f={activate:function(e){if(l.active)return;j(),l.active=!0,l.paused=!1,l.nodeFocusedBeforeActivation=n.activeElement;var t=e&&e.onActivate?e.onActivate:s.onActivate;t&&t();return d(),f},deactivate:p,pause:function(){if(l.paused||!l.active)return;l.paused=!0,b()},unpause:function(){if(!l.paused||!l.active)return;l.paused=!1,j(),d()}};return f;function p(e){if(l.active){clearTimeout(r),b(),l.active=!1,l.paused=!1,c.deactivateTrap(f);var t=e&&void 0!==e.onDeactivate?e.onDeactivate:s.onDeactivate;return t&&t(),(e&&void 0!==e.returnFocus?e.returnFocus:s.returnFocusOnDeactivate)&&u((function(){var e;w((e=l.nodeFocusedBeforeActivation,m("setReturnFocus")||e))})),f}}function d(){if(l.active)return c.activateTrap(f),r=u((function(){w(v())})),n.addEventListener("focusin",h,!0),n.addEventListener("mousedown",y,{capture:!0,passive:!1}),n.addEventListener("touchstart",y,{capture:!0,passive:!1}),n.addEventListener("click",O,{capture:!0,passive:!1}),n.addEventListener("keydown",g,{capture:!0,passive:!1}),f}function b(){if(l.active)return n.removeEventListener("focusin",h,!0),n.removeEventListener("mousedown",y,!0),n.removeEventListener("touchstart",y,!0),n.removeEventListener("click",O,!0),n.removeEventListener("keydown",g,!0),f}function m(e){var t=s[e],r=t;if(!t)return null;if("string"==typeof t&&!(r=n.querySelector(t)))throw new Error("`"+e+"` refers to no known node");if("function"==typeof t&&!(r=t()))throw new Error("`"+e+"` did not return a node");return r}function v(){var e;if(!(e=null!==m("initialFocus")?m("initialFocus"):o.contains(n.activeElement)?n.activeElement:l.firstTabbableNode||m("fallbackFocus")))throw new Error("Your focus-trap needs to have at least one focusable element");return e}function y(e){o.contains(e.target)||(s.clickOutsideDeactivates?p({returnFocus:!a.isFocusable(e.target)}):s.allowOutsideClick&&s.allowOutsideClick(e)||e.preventDefault())}function h(e){o.contains(e.target)||e.target instanceof Document||(e.stopImmediatePropagation(),w(l.mostRecentlyFocusedNode||v()))}function g(e){if(!1!==s.escapeDeactivates&&function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e))return e.preventDefault(),void p();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){if(j(),e.shiftKey&&e.target===l.firstTabbableNode)return e.preventDefault(),void w(l.lastTabbableNode);if(!e.shiftKey&&e.target===l.lastTabbableNode)e.preventDefault(),w(l.firstTabbableNode)}(e)}function O(e){s.clickOutsideDeactivates||o.contains(e.target)||s.allowOutsideClick&&s.allowOutsideClick(e)||(e.preventDefault(),e.stopImmediatePropagation())}function j(){var e=a(o);l.firstTabbableNode=e[0]||v(),l.lastTabbableNode=e[e.length-1]||v()}function w(e){e!==n.activeElement&&(e&&e.focus?(e.focus(),l.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):w(v()))}}},function(e,t,n){e.exports=n(8)()},function(e,t,n){"use strict";var r=n(9);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var c=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 c.name="Invariant Violation",c}}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:a,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 a(e,t){t=t||{};var n,a,c,u=[],f=[],p=e.querySelectorAll(r);for(t.includeContainer&&o.call(e,r)&&(p=Array.prototype.slice.apply(p)).unshift(e),n=0;n<p.length;n++)i(a=p[n])&&(0===(c=s(a))?u.push(a):f.push({documentOrder:n,tabIndex:c,node:a}));return f.sort(l).map((function(e){return e.node})).concat(u)}function i(e){return!(!c(e)||function(e){return function(e){return f(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t=function(e){for(var t=0;t<e.length;t++)if(e[t].checked)return e[t]}(e.ownerDocument.querySelectorAll('input[type="radio"][name="'+e.name+'"]'));return!t||t===e}(e)}(e)||s(e)<0)}function c(e){return!(e.disabled||function(e){return f(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}a.isTabbable=function(e){if(!e)throw new Error("No node provided");return!1!==o.call(e,r)&&i(e)},a.isFocusable=function(e){if(!e)throw new Error("No node provided");return!1!==o.call(e,u)&&c(e)};var u=n.concat("iframe").join(",");function s(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}function l(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function f(e){return"INPUT"===e.tagName}e.exports=a},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var o in r)n.call(r,o)&&(e[o]=r[o])}return e};var n=Object.prototype.hasOwnProperty},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(1),a=n(2),i=n.n(a),c=n(4),u=n.n(c),s=n(3),l=n(5),f=n.n(l);n(7);function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var b=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"])},m=function(e){function t(){var n,r;p(this,t);for(var o=arguments.length,a=Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=r=d(this,e.call.apply(e,[this].concat(a))),v.call(r),d(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getArgs=function(){var e=this.state,t=this.props,n=this._setState,r=this._forceUpdate,o=this._refs;return{state:e,props:b(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:b(e),nextState:t})},t.prototype.componentWillUnmount=function(){this.props.willUnmount&&this.props.willUnmount({state:this.state,props:b(this.props),refs:this._refs})},t.prototype.componentDidUpdate=function(e,t,n){this.props.didUpdate&&this.props.didUpdate(Object.assign(this.getArgs(),{prevProps:b(e),prevState:t}),n)},t.prototype.getSnapshotBeforeUpdate=function(e,t){return this.props.getSnapshotBeforeUpdate?this.props.getSnapshotBeforeUpdate(Object.assign(this.getArgs(),{prevProps:b(e),prevState:t})):null},t.prototype.render=function(){var e=this.props,t=e.children,n=e.render;return n?n(this.getArgs()):"function"==typeof t?t(this.getArgs()):t||null},t}(f.a.Component);m.defaultProps={getInitialState:function(){},getRefs:function(){return{}}};var v=function(){var e=this;this.state=this.props.initialState||this.props.getInitialState(this.props),this._refs=this.props.refs||this.props.getRefs(this.getArgs()),this._setState=function(){return e.setState.apply(e,arguments)},this._forceUpdate=function(){return e.forceUpdate.apply(e,arguments)}},y=m,h=function(e){var t=e.children,n=e.container,o=void 0===n?document.body:n,a=e.type,i=void 0===a?"reach-portal":a;return Object(r.createElement)(y,{getRefs:function(){return{node:null}},didMount:function(e){var t=e.refs,n=e.forceUpdate,r=o.hasOwnProperty("current")?o.current:o;t.node=document.createElement(i),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 g=function(e,t){return function(n){if(e&&e(n),!n.defaultPrevented)return t(n)}},O=n(6),j=n.n(O);function w(){return(w=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function E(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var S=function(){},x=function(){},_=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})},C=function(e){var t=e.refs;t.trap.deactivate(),t.disposeAriaHider()},A=React.createContext(),N=React.forwardRef((function(e,t){var n=e.container,o=e.isOpen,a=void 0===o||o,i=e.onDismiss,c=void 0===i?S:i,u=e.initialFocusRef,s=e.onClick,l=e.onKeyDown,f=E(e,["container","isOpen","onDismiss","initialFocusRef","onClick","onKeyDown"]);return Object(r.createElement)(y,{didMount:x},a?Object(r.createElement)(h,{container:n,"data-reach-dialog-wrapper":!0},Object(r.createElement)(y,{refs:{overlayNode:null,contentNode:null},didMount:function(e){var t=e.refs;_(t,u)},willUnmount:C},(function(e){var n=e.refs;return Object(r.createElement)(A.Provider,{value:function(e){return n.contentNode=e}},Object(r.createElement)("div",w({"data-reach-dialog-overlay":!0,onClick:g(s,(function(e){e.stopPropagation(),c()})),onKeyDown:g(l,(function(e){"Escape"===e.key&&(e.stopPropagation(),c())})),ref:function(e){n.overlayNode=e,t&&t(e)}},f)))}))):null)}));N.propTypes={initialFocusRef:function(){}};var k=function(e){return e.stopPropagation()},P=React.forwardRef((function(e,t){var n=e.onClick,o=(e.onKeyDown,E(e,["onClick","onKeyDown"]));return Object(r.createElement)(A.Consumer,null,(function(e){return Object(r.createElement)("div",w({"aria-modal":"true","data-reach-dialog-content":!0,tabIndex:"-1",onClick:g(n,k),ref:function(n){e(n),t&&t(n)}},o))}))})),D=function(e){return!!e},T=function(e){var t=e.items,n=e.isVisible,o=void 0===n?D:n,a=e.render,c=e.className,u=e.onDismiss;return Object(r.createElement)(s.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)(N,{style:{opacity:t.opacity},container:document.querySelector("#wpbody"),onDismiss:function(){return u()}},Object(r.createElement)(P,{className:i()("ct-admin-modal",c),style:{transform:"translate3d(0px, ".concat(t.y,"px, 0px)")}},Object(r.createElement)("button",{className:"close-button",onClick:function(){return u()}},"×"),a(e,t)))}}))};function U(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 I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?U(Object(n),!0).forEach((function(t){M(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function M(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return L(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 L(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 L(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var F=function(e){var t=e.extsSyncLoading,n=e.extensionData,a=e.onExtsSync,c=R(Object(r.useState)(!1),2),u=c[0],l=c[1],f=R(Object(r.useState)(null),2),p=f[0],d=f[1];return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("button",{className:"ct-button ct-config-btn","data-button":"white",onClick:function(){l(!0),d(n.settings)}},Object(o.__)("Configure","blc")),Object(r.createElement)(T,{items:u,onDismiss:function(){return l(!1)},className:"ct-product-reviews-settings-modal",render:function(){return Object(r.createElement)("div",{className:i()("ct-modal-content")},Object(r.createElement)("h2",null,Object(o.__)("Product Reviews Settings","blc")),Object(r.createElement)("p",{className:"ct-modal-description"},Object(o.__)("Configure the slugs for single and category pages of the product review custom post type.","blc")),Object(r.createElement)("div",{className:"ct-controls-group"},Object(r.createElement)("section",{"data-columns":"medium:2"},Object(r.createElement)(s.OptionsPanel,{onChange:function(e,t){return d((function(n){return I(I({},n),{},M({},e,t))}))},options:{single_slug:{type:"text",value:"",label:Object(o.__)("Single Slug","blc")},category_slug:{type:"text",value:"",label:Object(o.__)("Category Slug","blc")}},value:p||{},hasRevertButton:!1}))),Object(r.createElement)("div",{className:"ct-modal-actions has-divider"},Object(r.createElement)("button",{className:"button-primary",disabled:t||!p,onClick:function(e){e.preventDefault(),p&&(a({extAction:{type:"persist",settings:p}}),l(!1))}},t?Object(r.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 100 100"},Object(r.createElement)("g",{transform:"translate(50,50)"},Object(r.createElement)("g",{transform:"scale(1)"},Object(r.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"#687c93"}),Object(r.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},Object(r.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"}))))):Object(o.__)("Save","blc"))))}}))};function B(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,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}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 q=function(e){var t=B(Object(r.useState)(!1),2),n=t[0],o=t[1];return[function(){return o(!0)},Object(r.createElement)(T,{items:n,onDismiss:function(){return o(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content",dangerouslySetInnerHTML:{__html:e.readme}})}})]},K=window.ctDashboardLocalizations.DashboardContext,H=(K.Provider,K.Consumer,K);function W(e,t,n,r,o,a,i){try{var c=e[a](i),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,o)}function $(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){W(a,r,o,i,c,"next",e)}function c(e){W(a,r,o,i,c,"throw",e)}i(void 0)}))}}function V(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,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Y(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 Y(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 Y(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 G=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=Object(r.useState)(!1),a=V(n,2),i=a[0],c=a[1],u=Object(r.useState)(!1),s=V(u,2),l=s[0],f=s[1],p=Object(r.useContext)(H),d=(p.Link,p.history),b=ctDashboardLocalizations.plugin_data.is_pro,m=function(){var n=$(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(b||!e.config.pro){n.next=3;break}return f(!0),n.abrupt("return");case 3:return(r=new FormData).append("ext",e.name),r.append("action",e.__object?"blocksy_extension_deactivate":"blocksy_extension_activate"),c(!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:c(!1);case 17:case"end":return n.stop()}}),n,null,[[7,14]])})));return function(){return n.apply(this,arguments)}}();return[i,m,!b&&e.config.pro?Object(r.createElement)(T,{items:l,className:"ct-onboarding-modal",onDismiss:function(){return f(!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(o.__)("Upgrade to the Pro version and get instant access to all premium extensions, features and future updates.","blc")),Object(r.createElement)("p",null,Object(o.__)("Hurry up, we have a 15% off discount now 🤩","blc")),Object(r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},Object(r.createElement)("a",{onClick:function(e){e.preventDefault(),f(!1),setTimeout((function(){d.navigate("/pro")}),300)},className:"button"},Object(o.__)("Free vs Pro","blocksy")),Object(r.createElement)("a",{href:"https://creativethemes.com/blocksy/pricing/?coupon=BlocksyLimited15&utm_source=getpro&utm_medium=dashboard&utm_campaign=BlocksyLimited15",target:"_blank",className:"button button-primary"},Object(o.__)("Upgrade Now","blc"))))}}):null]};function J(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,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Q(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 Q(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 Q(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 X=function(e){var t=e.extsSyncLoading,n=e.extension,a=e.onExtsSync,c=J(G(n,(function(){return a()})),2),u=c[0],s=c[1],l=J(q(n),2),f=l[0],p=l[1];return Object(r.createElement)("li",{className:i()({active:!!n.__object})},Object(r.createElement)("h4",{className:"ct-extension-title"},n.config.name,u&&Object(r.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 100 100"},Object(r.createElement)("g",{transform:"translate(50,50)"},Object(r.createElement)("g",{transform:"scale(1)"},Object(r.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"#687c93"}),Object(r.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},Object(r.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"})))))),n.config.description&&Object(r.createElement)("div",{className:"ct-extension-description"},n.config.description),Object(r.createElement)("div",{className:"ct-extension-actions"},Object(r.createElement)("button",{className:i()(n.__object?"ct-button":"ct-button-primary"),"data-button":"white",disabled:u,onClick:function(){s()}},n.__object?Object(o.__)("Deactivate","blc"):Object(o.__)("Activate","blc")),n.__object&&Object(r.createElement)(F,{extsSyncLoading:t,extensionData:n.data,onExtsSync:a}),n.readme&&Object(r.createElement)("button",{onClick:function(){return f()},"data-button":"white",className:"ct-minimal-button ct-instruction"},Object(r.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M12,2C6.477,2,2,6.477,2,12s4.477,10,10,10s10-4.477,10-10S17.523,2,12,2z M12,17L12,17c-0.552,0-1-0.448-1-1v-4 c0-0.552,0.448-1,1-1h0c0.552,0,1,0.448,1,1v4C13,16.552,12.552,17,12,17z M12.5,9h-1C11.224,9,11,8.776,11,8.5v-1 C11,7.224,11.224,7,11.5,7h1C12.776,7,13,7.224,13,7.5v1C13,8.776,12.776,9,12.5,9z"})))),p)};u.a.on("ct:extensions:card",(function(e){var t=e.CustomComponent;"product-reviews"===e.extension.name&&(t.extension=X)}))}]);
|
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 a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)&&r.length){var i=o.apply(null,r);i&&e.push(i)}else if("object"===a)for(var c in r)n.call(r,c)&&r[c]&&e.push(c)}}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,a=n(10),i=n(11),c=(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 u(e){return setTimeout(e,0)}e.exports=function(e,t){var n=document,o="string"==typeof e?n.querySelector(e):e,s=i({returnFocusOnDeactivate:!0,escapeDeactivates:!0},t),l={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},f={activate:function(e){if(l.active)return;j(),l.active=!0,l.paused=!1,l.nodeFocusedBeforeActivation=n.activeElement;var t=e&&e.onActivate?e.onActivate:s.onActivate;t&&t();return d(),f},deactivate:p,pause:function(){if(l.paused||!l.active)return;l.paused=!0,b()},unpause:function(){if(!l.paused||!l.active)return;l.paused=!1,j(),d()}};return f;function p(e){if(l.active){clearTimeout(r),b(),l.active=!1,l.paused=!1,c.deactivateTrap(f);var t=e&&void 0!==e.onDeactivate?e.onDeactivate:s.onDeactivate;return t&&t(),(e&&void 0!==e.returnFocus?e.returnFocus:s.returnFocusOnDeactivate)&&u((function(){var e;w((e=l.nodeFocusedBeforeActivation,m("setReturnFocus")||e))})),f}}function d(){if(l.active)return c.activateTrap(f),r=u((function(){w(v())})),n.addEventListener("focusin",h,!0),n.addEventListener("mousedown",y,{capture:!0,passive:!1}),n.addEventListener("touchstart",y,{capture:!0,passive:!1}),n.addEventListener("click",O,{capture:!0,passive:!1}),n.addEventListener("keydown",g,{capture:!0,passive:!1}),f}function b(){if(l.active)return n.removeEventListener("focusin",h,!0),n.removeEventListener("mousedown",y,!0),n.removeEventListener("touchstart",y,!0),n.removeEventListener("click",O,!0),n.removeEventListener("keydown",g,!0),f}function m(e){var t=s[e],r=t;if(!t)return null;if("string"==typeof t&&!(r=n.querySelector(t)))throw new Error("`"+e+"` refers to no known node");if("function"==typeof t&&!(r=t()))throw new Error("`"+e+"` did not return a node");return r}function v(){var e;if(!(e=null!==m("initialFocus")?m("initialFocus"):o.contains(n.activeElement)?n.activeElement:l.firstTabbableNode||m("fallbackFocus")))throw new Error("Your focus-trap needs to have at least one focusable element");return e}function y(e){o.contains(e.target)||(s.clickOutsideDeactivates?p({returnFocus:!a.isFocusable(e.target)}):s.allowOutsideClick&&s.allowOutsideClick(e)||e.preventDefault())}function h(e){o.contains(e.target)||e.target instanceof Document||(e.stopImmediatePropagation(),w(l.mostRecentlyFocusedNode||v()))}function g(e){if(!1!==s.escapeDeactivates&&function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e))return e.preventDefault(),void p();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){if(j(),e.shiftKey&&e.target===l.firstTabbableNode)return e.preventDefault(),void w(l.lastTabbableNode);if(!e.shiftKey&&e.target===l.lastTabbableNode)e.preventDefault(),w(l.firstTabbableNode)}(e)}function O(e){s.clickOutsideDeactivates||o.contains(e.target)||s.allowOutsideClick&&s.allowOutsideClick(e)||(e.preventDefault(),e.stopImmediatePropagation())}function j(){var e=a(o);l.firstTabbableNode=e[0]||v(),l.lastTabbableNode=e[e.length-1]||v()}function w(e){e!==n.activeElement&&(e&&e.focus?(e.focus(),l.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):w(v()))}}},function(e,t,n){e.exports=n(8)()},function(e,t,n){"use strict";var r=n(9);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var c=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 c.name="Invariant Violation",c}}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:a,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 a(e,t){t=t||{};var n,a,c,u=[],f=[],p=e.querySelectorAll(r);for(t.includeContainer&&o.call(e,r)&&(p=Array.prototype.slice.apply(p)).unshift(e),n=0;n<p.length;n++)i(a=p[n])&&(0===(c=s(a))?u.push(a):f.push({documentOrder:n,tabIndex:c,node:a}));return f.sort(l).map((function(e){return e.node})).concat(u)}function i(e){return!(!c(e)||function(e){return function(e){return f(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t=function(e){for(var t=0;t<e.length;t++)if(e[t].checked)return e[t]}(e.ownerDocument.querySelectorAll('input[type="radio"][name="'+e.name+'"]'));return!t||t===e}(e)}(e)||s(e)<0)}function c(e){return!(e.disabled||function(e){return f(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}a.isTabbable=function(e){if(!e)throw new Error("No node provided");return!1!==o.call(e,r)&&i(e)},a.isFocusable=function(e){if(!e)throw new Error("No node provided");return!1!==o.call(e,u)&&c(e)};var u=n.concat("iframe").join(",");function s(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}function l(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function f(e){return"INPUT"===e.tagName}e.exports=a},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var o in r)n.call(r,o)&&(e[o]=r[o])}return e};var n=Object.prototype.hasOwnProperty},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(1),a=n(2),i=n.n(a),c=n(4),u=n.n(c),s=n(3),l=n(5),f=n.n(l);n(7);function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var b=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"])},m=function(e){function t(){var n,r;p(this,t);for(var o=arguments.length,a=Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=r=d(this,e.call.apply(e,[this].concat(a))),v.call(r),d(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getArgs=function(){var e=this.state,t=this.props,n=this._setState,r=this._forceUpdate,o=this._refs;return{state:e,props:b(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:b(e),nextState:t})},t.prototype.componentWillUnmount=function(){this.props.willUnmount&&this.props.willUnmount({state:this.state,props:b(this.props),refs:this._refs})},t.prototype.componentDidUpdate=function(e,t,n){this.props.didUpdate&&this.props.didUpdate(Object.assign(this.getArgs(),{prevProps:b(e),prevState:t}),n)},t.prototype.getSnapshotBeforeUpdate=function(e,t){return this.props.getSnapshotBeforeUpdate?this.props.getSnapshotBeforeUpdate(Object.assign(this.getArgs(),{prevProps:b(e),prevState:t})):null},t.prototype.render=function(){var e=this.props,t=e.children,n=e.render;return n?n(this.getArgs()):"function"==typeof t?t(this.getArgs()):t||null},t}(f.a.Component);m.defaultProps={getInitialState:function(){},getRefs:function(){return{}}};var v=function(){var e=this;this.state=this.props.initialState||this.props.getInitialState(this.props),this._refs=this.props.refs||this.props.getRefs(this.getArgs()),this._setState=function(){return e.setState.apply(e,arguments)},this._forceUpdate=function(){return e.forceUpdate.apply(e,arguments)}},y=m,h=function(e){var t=e.children,n=e.container,o=void 0===n?document.body:n,a=e.type,i=void 0===a?"reach-portal":a;return Object(r.createElement)(y,{getRefs:function(){return{node:null}},didMount:function(e){var t=e.refs,n=e.forceUpdate,r=o.hasOwnProperty("current")?o.current:o;t.node=document.createElement(i),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 g=function(e,t){return function(n){if(e&&e(n),!n.defaultPrevented)return t(n)}},O=n(6),j=n.n(O);function w(){return(w=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function E(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var S=function(){},x=function(){},_=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})},C=function(e){var t=e.refs;t.trap.deactivate(),t.disposeAriaHider()},A=React.createContext(),N=React.forwardRef((function(e,t){var n=e.container,o=e.isOpen,a=void 0===o||o,i=e.onDismiss,c=void 0===i?S:i,u=e.initialFocusRef,s=e.onClick,l=e.onKeyDown,f=E(e,["container","isOpen","onDismiss","initialFocusRef","onClick","onKeyDown"]);return Object(r.createElement)(y,{didMount:x},a?Object(r.createElement)(h,{container:n,"data-reach-dialog-wrapper":!0},Object(r.createElement)(y,{refs:{overlayNode:null,contentNode:null},didMount:function(e){var t=e.refs;_(t,u)},willUnmount:C},(function(e){var n=e.refs;return Object(r.createElement)(A.Provider,{value:function(e){return n.contentNode=e}},Object(r.createElement)("div",w({"data-reach-dialog-overlay":!0,onClick:g(s,(function(e){e.stopPropagation(),c()})),onKeyDown:g(l,(function(e){"Escape"===e.key&&(e.stopPropagation(),c())})),ref:function(e){n.overlayNode=e,t&&t(e)}},f)))}))):null)}));N.propTypes={initialFocusRef:function(){}};var k=function(e){return e.stopPropagation()},P=React.forwardRef((function(e,t){var n=e.onClick,o=(e.onKeyDown,E(e,["onClick","onKeyDown"]));return Object(r.createElement)(A.Consumer,null,(function(e){return Object(r.createElement)("div",w({"aria-modal":"true","data-reach-dialog-content":!0,tabIndex:"-1",onClick:g(n,k),ref:function(n){e(n),t&&t(n)}},o))}))})),D=function(e){return!!e},T=function(e){var t=e.items,n=e.isVisible,o=void 0===n?D:n,a=e.render,c=e.className,u=e.onDismiss;return Object(r.createElement)(s.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)(N,{style:{opacity:t.opacity},container:document.querySelector("#wpbody"),onDismiss:function(){return u()}},Object(r.createElement)(P,{className:i()("ct-admin-modal",c),style:{transform:"translate3d(0px, ".concat(t.y,"px, 0px)")}},Object(r.createElement)("button",{className:"close-button",onClick:function(){return u()}},"×"),a(e,t)))}}))};function U(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 I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?U(Object(n),!0).forEach((function(t){M(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function M(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return L(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 L(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 L(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var F=function(e){var t=e.extsSyncLoading,n=e.extensionData,a=e.onExtsSync,c=R(Object(r.useState)(!1),2),u=c[0],l=c[1],f=R(Object(r.useState)(null),2),p=f[0],d=f[1];return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("button",{className:"ct-button ct-config-btn","data-button":"white",onClick:function(){l(!0),d(n.settings)}},Object(o.__)("Configure","blc")),Object(r.createElement)(T,{items:u,onDismiss:function(){return l(!1)},className:"ct-product-reviews-settings-modal",render:function(){return Object(r.createElement)("div",{className:i()("ct-modal-content")},Object(r.createElement)("h2",null,Object(o.__)("Product Reviews Settings","blc")),Object(r.createElement)("p",{className:"ct-modal-description"},Object(o.__)("Configure the slugs for single and category pages of the product review custom post type.","blc")),Object(r.createElement)("div",{className:"ct-controls-group"},Object(r.createElement)("section",{"data-columns":"medium:2"},Object(r.createElement)(s.OptionsPanel,{onChange:function(e,t){return d((function(n){return I(I({},n),{},M({},e,t))}))},options:{single_slug:{type:"text",value:"",label:Object(o.__)("Single Slug","blc")},category_slug:{type:"text",value:"",label:Object(o.__)("Category Slug","blc")}},value:p||{},hasRevertButton:!1}))),Object(r.createElement)("div",{className:"ct-modal-actions has-divider"},Object(r.createElement)("button",{className:"button-primary",disabled:t||!p,onClick:function(e){e.preventDefault(),p&&(a({extAction:{type:"persist",settings:p}}),l(!1))}},t?Object(r.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 100 100"},Object(r.createElement)("g",{transform:"translate(50,50)"},Object(r.createElement)("g",{transform:"scale(1)"},Object(r.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"#687c93"}),Object(r.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},Object(r.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"}))))):Object(o.__)("Save","blc"))))}}))};function B(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,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}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 q=function(e){var t=B(Object(r.useState)(!1),2),n=t[0],o=t[1];return[function(){return o(!0)},Object(r.createElement)(T,{items:n,onDismiss:function(){return o(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content",dangerouslySetInnerHTML:{__html:e.readme}})}})]},K=window.ctDashboardLocalizations.DashboardContext,H=(K.Provider,K.Consumer,K);function W(e,t,n,r,o,a,i){try{var c=e[a](i),u=c.value}catch(e){return void n(e)}c.done?t(u):Promise.resolve(u).then(r,o)}function $(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){W(a,r,o,i,c,"next",e)}function c(e){W(a,r,o,i,c,"throw",e)}i(void 0)}))}}function V(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,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Y(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 Y(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 Y(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 G=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=Object(r.useState)(!1),a=V(n,2),i=a[0],c=a[1],u=Object(r.useState)(!1),s=V(u,2),l=s[0],f=s[1],p=Object(r.useContext)(H),d=(p.Link,p.history),b=ctDashboardLocalizations.plugin_data.is_pro,m=function(){var n=$(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(b||!e.config.pro){n.next=3;break}return f(!0),n.abrupt("return");case 3:return(r=new FormData).append("ext",e.name),r.append("action",e.__object?"blocksy_extension_deactivate":"blocksy_extension_activate"),c(!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:c(!1);case 17:case"end":return n.stop()}}),n,null,[[7,14]])})));return function(){return n.apply(this,arguments)}}();return[i,m,!b&&e.config.pro?Object(r.createElement)(T,{items:l,className:"ct-onboarding-modal",onDismiss:function(){return f(!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(o.__)("Upgrade to the Pro version and get instant access to all premium extensions, features and future updates.","blc")),Object(r.createElement)("p",null,Object(o.__)("Hurry up, we have a 10% off discount now 🤩","blc")),Object(r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},Object(r.createElement)("a",{onClick:function(e){e.preventDefault(),f(!1),setTimeout((function(){d.navigate("/pro")}),300)},className:"button"},Object(o.__)("Free vs Pro","blocksy")),Object(r.createElement)("a",{href:"https://creativethemes.com/blocksy/pricing/?coupon=BlocksyLimited10&utm_source=getpro&utm_medium=dashboard&utm_campaign=BlocksyLimited10",target:"_blank",className:"button button-primary"},Object(o.__)("Upgrade Now","blc"))))}}):null]};function J(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,a=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Q(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 Q(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 Q(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 X=function(e){var t=e.extsSyncLoading,n=e.extension,a=e.onExtsSync,c=J(G(n,(function(){return a()})),2),u=c[0],s=c[1],l=J(q(n),2),f=l[0],p=l[1];return Object(r.createElement)("li",{className:i()({active:!!n.__object})},Object(r.createElement)("h4",{className:"ct-extension-title"},n.config.name,u&&Object(r.createElement)("svg",{width:"15",height:"15",viewBox:"0 0 100 100"},Object(r.createElement)("g",{transform:"translate(50,50)"},Object(r.createElement)("g",{transform:"scale(1)"},Object(r.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"#687c93"}),Object(r.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},Object(r.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"})))))),n.config.description&&Object(r.createElement)("div",{className:"ct-extension-description"},n.config.description),Object(r.createElement)("div",{className:"ct-extension-actions"},Object(r.createElement)("button",{className:i()(n.__object?"ct-button":"ct-button-primary"),"data-button":"white",disabled:u,onClick:function(){s()}},n.__object?Object(o.__)("Deactivate","blc"):Object(o.__)("Activate","blc")),n.__object&&Object(r.createElement)(F,{extsSyncLoading:t,extensionData:n.data,onExtsSync:a}),n.readme&&Object(r.createElement)("button",{onClick:function(){return f()},"data-button":"white",className:"ct-minimal-button ct-instruction"},Object(r.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M12,2C6.477,2,2,6.477,2,12s4.477,10,10,10s10-4.477,10-10S17.523,2,12,2z M12,17L12,17c-0.552,0-1-0.448-1-1v-4 c0-0.552,0.448-1,1-1h0c0.552,0,1,0.448,1,1v4C13,16.552,12.552,17,12,17z M12.5,9h-1C11.224,9,11,8.776,11,8.5v-1 C11,7.224,11.224,7,11.5,7h1C12.776,7,13,7.224,13,7.5v1C13,8.776,12.776,9,12.5,9z"})))),p)};u.a.on("ct:extensions:card",(function(e){var t=e.CustomComponent;"product-reviews"===e.extension.name&&(t.extension=X)}))}]);
|
framework/extensions/product-reviews/static/bundle/main-admin.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.7
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
framework/extensions/product-reviews/static/bundle/main.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.7
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
framework/extensions/product-reviews/views/single-top.php
CHANGED
@@ -1,8 +1,12 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
$atts =
|
4 |
-
'
|
5 |
-
|
|
|
|
|
|
|
|
|
6 |
|
7 |
$gallery_images = array_map(function ($item) {
|
8 |
return $item['attachment_id'];
|
@@ -103,9 +107,13 @@ if (! empty($scores)) {
|
|
103 |
|
104 |
echo '<div class="ct-overall-score">';
|
105 |
|
106 |
-
$avg_score =
|
107 |
-
|
108 |
-
|
|
|
|
|
|
|
|
|
109 |
|
110 |
echo '<span class="ct-average-score">' . $avg_score . '/5</span>';
|
111 |
|
1 |
<?php
|
2 |
|
3 |
+
$atts = apply_filters(
|
4 |
+
'blocksy:ext:product-reviews:frontend:atts',
|
5 |
+
blocksy_get_post_options(null, [
|
6 |
+
'meta_id' => 'blocksy_product_review_options'
|
7 |
+
]),
|
8 |
+
get_the_ID()
|
9 |
+
);
|
10 |
|
11 |
$gallery_images = array_map(function ($item) {
|
12 |
return $item['attachment_id'];
|
107 |
|
108 |
echo '<div class="ct-overall-score">';
|
109 |
|
110 |
+
$avg_score = apply_filters(
|
111 |
+
'blocksy:ext:product-reviews:overall-score',
|
112 |
+
round(array_reduce($scores, function ($carry, $score) {
|
113 |
+
return $carry + intval($score['score']);
|
114 |
+
}, 0) / count($scores) * 2) / 2,
|
115 |
+
$scores
|
116 |
+
);
|
117 |
|
118 |
echo '<span class="ct-average-score">' . $avg_score . '/5</span>';
|
119 |
|
framework/extensions/trending/static/bundle/main.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.7
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
framework/extensions/widgets/static/bundle/main.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.7
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
framework/extensions/widgets/widgets/ct-contact-info/view.php
CHANGED
@@ -64,7 +64,8 @@ echo blc_call_fn(['fn' => 'blc_get_contacts_output'], [
|
|
64 |
'link_target' => blocksy_default_akg('contact_link_target', $atts, 'no'),
|
65 |
'type' => blocksy_akg('contacts_icon_shape', $atts, 'rounded'),
|
66 |
'fill' => blocksy_akg('contacts_icon_fill_type', $atts, 'outline'),
|
67 |
-
'size' => blocksy_akg('contacts_icons_size', $atts, 'medium')
|
|
|
68 |
]);
|
69 |
|
70 |
echo wp_kses_post($after_widget);
|
64 |
'link_target' => blocksy_default_akg('contact_link_target', $atts, 'no'),
|
65 |
'type' => blocksy_akg('contacts_icon_shape', $atts, 'rounded'),
|
66 |
'fill' => blocksy_akg('contacts_icon_fill_type', $atts, 'outline'),
|
67 |
+
'size' => blocksy_akg('contacts_icons_size', $atts, 'medium'),
|
68 |
+
'direction' => 'vertical'
|
69 |
]);
|
70 |
|
71 |
echo wp_kses_post($after_widget);
|
framework/features/conditions-manager.php
CHANGED
@@ -227,6 +227,14 @@ class ConditionsManager {
|
|
227 |
return $payload['language'] === blocksy_get_current_language();
|
228 |
}
|
229 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
230 |
if ($rule['rule'] === 'taxonomy_ids') {
|
231 |
if (is_tax() || is_category() || is_tag()) {
|
232 |
$tax_id = get_queried_object_id();
|
@@ -516,6 +524,18 @@ class ConditionsManager {
|
|
516 |
]
|
517 |
]
|
518 |
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
519 |
] : []);
|
520 |
}
|
521 |
|
@@ -527,9 +547,7 @@ class ConditionsManager {
|
|
527 |
'Exclude', 'blc'
|
528 |
);
|
529 |
|
530 |
-
$maybe_descriptor = $this->find_rule_descriptor(
|
531 |
-
$condition['rule']
|
532 |
-
);
|
533 |
|
534 |
if (! $maybe_descriptor) {
|
535 |
continue;
|
227 |
return $payload['language'] === blocksy_get_current_language();
|
228 |
}
|
229 |
|
230 |
+
if (
|
231 |
+
$rule['rule'] === 'bbpress_profile'
|
232 |
+
&&
|
233 |
+
function_exists('bbp_is_single_user_profile')
|
234 |
+
) {
|
235 |
+
return bbp_is_single_user_profile();
|
236 |
+
}
|
237 |
+
|
238 |
if ($rule['rule'] === 'taxonomy_ids') {
|
239 |
if (is_tax() || is_category() || is_tag()) {
|
240 |
$tax_id = get_queried_object_id();
|
524 |
]
|
525 |
]
|
526 |
]
|
527 |
+
] : [],
|
528 |
+
|
529 |
+
function_exists('bbp_is_single_user_profile') ? [
|
530 |
+
[
|
531 |
+
'title' => __('bbPress', 'blc'),
|
532 |
+
'rules' => [
|
533 |
+
[
|
534 |
+
'id' => 'bbpress_profile',
|
535 |
+
'title' => __('Profile', 'blc')
|
536 |
+
]
|
537 |
+
]
|
538 |
+
]
|
539 |
] : []);
|
540 |
}
|
541 |
|
547 |
'Exclude', 'blc'
|
548 |
);
|
549 |
|
550 |
+
$maybe_descriptor = $this->find_rule_descriptor($condition['rule']);
|
|
|
|
|
551 |
|
552 |
if (! $maybe_descriptor) {
|
553 |
continue;
|
framework/features/dynamic-css.php
CHANGED
@@ -54,19 +54,6 @@ class DynamicCss {
|
|
54 |
],
|
55 |
];
|
56 |
|
57 |
-
|
58 |
-
$opts[blocksy_rand_md5()] = [
|
59 |
-
'type' => 'ct-divider',
|
60 |
-
];
|
61 |
-
|
62 |
-
$opts['emoji_scripts'] = [
|
63 |
-
'label' => __( 'Emojis Script', 'blc' ),
|
64 |
-
'type' => 'ct-switch',
|
65 |
-
'value' => 'no',
|
66 |
-
'setting' => [ 'transport' => 'postMessage' ],
|
67 |
-
'desc' => __( 'Enable this option if you want to remove WordPress emojis script in order to improve the performance.', 'blc' )
|
68 |
-
];
|
69 |
-
|
70 |
$opts[blocksy_rand_md5()] = [
|
71 |
'type' => 'ct-divider',
|
72 |
];
|
54 |
],
|
55 |
];
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
$opts[blocksy_rand_md5()] = [
|
58 |
'type' => 'ct-divider',
|
59 |
];
|
framework/features/header.php
CHANGED
@@ -213,39 +213,6 @@ class HeaderAdditions {
|
|
213 |
return $paths;
|
214 |
});
|
215 |
|
216 |
-
add_filter('blocksy:footer:offcanvas-drawer', function ($els) {
|
217 |
-
global $blocksy_has_default_header;
|
218 |
-
|
219 |
-
if (
|
220 |
-
! isset($blocksy_has_default_header)
|
221 |
-
||
|
222 |
-
! $blocksy_has_default_header
|
223 |
-
) {
|
224 |
-
return $els;
|
225 |
-
}
|
226 |
-
|
227 |
-
if (! class_exists('Blocksy_Header_Builder_Render')) {
|
228 |
-
return $els;
|
229 |
-
}
|
230 |
-
|
231 |
-
$render = new \Blocksy_Header_Builder_Render();
|
232 |
-
|
233 |
-
if (! $render->contains_item('account')) {
|
234 |
-
return $els;
|
235 |
-
}
|
236 |
-
|
237 |
-
remove_filter('lostpassword_url', 'wc_lostpassword_url', 10, 1);
|
238 |
-
|
239 |
-
$els[] = blc_call_fn(
|
240 |
-
['fn' => 'blocksy_render_view'],
|
241 |
-
dirname(__FILE__) . '/header/account-modal.php'
|
242 |
-
);
|
243 |
-
|
244 |
-
add_filter('lostpassword_url', 'wc_lostpassword_url', 10, 1);
|
245 |
-
|
246 |
-
return $els;
|
247 |
-
});
|
248 |
-
|
249 |
add_filter('blocksy:header:settings', function ($opt) {
|
250 |
$opt = blc_call_fn(
|
251 |
[
|
@@ -258,6 +225,16 @@ class HeaderAdditions {
|
|
258 |
|
259 |
return $opt;
|
260 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
}
|
262 |
|
263 |
public function enqueue_static() {
|
@@ -556,5 +533,20 @@ class HeaderAdditions {
|
|
556 |
public function set_conditions($conditions) {
|
557 |
set_theme_mod('blocksy_premium_header_conditions', $conditions);
|
558 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
559 |
}
|
560 |
|
213 |
return $paths;
|
214 |
});
|
215 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
add_filter('blocksy:header:settings', function ($opt) {
|
217 |
$opt = blc_call_fn(
|
218 |
[
|
225 |
|
226 |
return $opt;
|
227 |
});
|
228 |
+
|
229 |
+
add_action(
|
230 |
+
'wp_ajax_blc_retrieve_account_modal',
|
231 |
+
[$this, 'blc_retrieve_account_modal']
|
232 |
+
);
|
233 |
+
|
234 |
+
add_action(
|
235 |
+
'wp_ajax_nopriv_blc_retrieve_account_modal',
|
236 |
+
[$this, 'blc_retrieve_account_modal']
|
237 |
+
);
|
238 |
}
|
239 |
|
240 |
public function enqueue_static() {
|
533 |
public function set_conditions($conditions) {
|
534 |
set_theme_mod('blocksy_premium_header_conditions', $conditions);
|
535 |
}
|
536 |
+
|
537 |
+
public function blc_retrieve_account_modal() {
|
538 |
+
remove_filter('lostpassword_url', 'wc_lostpassword_url', 10, 1);
|
539 |
+
|
540 |
+
$html = blc_call_fn(
|
541 |
+
['fn' => 'blocksy_render_view'],
|
542 |
+
dirname(__FILE__) . '/header/account-modal.php'
|
543 |
+
);
|
544 |
+
|
545 |
+
add_filter('lostpassword_url', 'wc_lostpassword_url', 10, 1);
|
546 |
+
|
547 |
+
wp_send_json_success([
|
548 |
+
'html' => $html
|
549 |
+
]);
|
550 |
+
}
|
551 |
}
|
552 |
|
framework/features/header/items/account/dynamic-styles.php
CHANGED
@@ -4,6 +4,8 @@ if (! isset($root_selector)) {
|
|
4 |
$root_selector = ['.ct-header-account'];
|
5 |
}
|
6 |
|
|
|
|
|
7 |
// Icon size
|
8 |
$accountHeaderIconSize = blocksy_akg( 'accountHeaderIconSize', $atts, 15 );
|
9 |
|
@@ -420,6 +422,126 @@ blocksy_output_colors([
|
|
420 |
],
|
421 |
]);
|
422 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
423 |
blocksy_output_colors([
|
424 |
'value' => blocksy_akg('account_close_button_color', $atts),
|
425 |
'default' => [
|
4 |
$root_selector = ['.ct-header-account'];
|
5 |
}
|
6 |
|
7 |
+
$forms_type = get_theme_mod('forms_type', 'classic-forms');
|
8 |
+
|
9 |
// Icon size
|
10 |
$accountHeaderIconSize = blocksy_akg( 'accountHeaderIconSize', $atts, 15 );
|
11 |
|
422 |
],
|
423 |
]);
|
424 |
|
425 |
+
blocksy_output_colors([
|
426 |
+
'value' => blocksy_akg('account_modal_form_text_color', $atts),
|
427 |
+
'default' => [
|
428 |
+
'default' => [ 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT') ],
|
429 |
+
'focus' => [ 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT') ],
|
430 |
+
],
|
431 |
+
'css' => $css,
|
432 |
+
|
433 |
+
'variables' => [
|
434 |
+
'default' => [
|
435 |
+
'selector' => blc_call_fn([
|
436 |
+
'fn' => 'blocksy_assemble_selector',
|
437 |
+
'default' => $root_selector
|
438 |
+
], blc_call_fn([
|
439 |
+
'fn' => 'blocksy_mutate_selector',
|
440 |
+
], [
|
441 |
+
'selector' => [$root_selector[0]],
|
442 |
+
'operation' => 'suffix',
|
443 |
+
'to_add' => '#account-modal form'
|
444 |
+
])),
|
445 |
+
'variable' => 'form-text-initial-color'
|
446 |
+
],
|
447 |
+
|
448 |
+
'focus' => [
|
449 |
+
'selector' => blc_call_fn([
|
450 |
+
'fn' => 'blocksy_assemble_selector',
|
451 |
+
'default' => $root_selector
|
452 |
+
], blc_call_fn([
|
453 |
+
'fn' => 'blocksy_mutate_selector',
|
454 |
+
], [
|
455 |
+
'selector' => [$root_selector[0]],
|
456 |
+
'operation' => 'suffix',
|
457 |
+
'to_add' => '#account-modal form'
|
458 |
+
])),
|
459 |
+
'variable' => 'form-text-focus-color'
|
460 |
+
]
|
461 |
+
],
|
462 |
+
]);
|
463 |
+
|
464 |
+
blocksy_output_colors([
|
465 |
+
'value' => blocksy_akg('account_modal_form_border_color', $atts),
|
466 |
+
'default' => [
|
467 |
+
'default' => [ 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT') ],
|
468 |
+
'focus' => [ 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT') ],
|
469 |
+
],
|
470 |
+
'css' => $css,
|
471 |
+
|
472 |
+
'variables' => [
|
473 |
+
'default' => [
|
474 |
+
'selector' => blc_call_fn([
|
475 |
+
'fn' => 'blocksy_assemble_selector',
|
476 |
+
'default' => $root_selector
|
477 |
+
], blc_call_fn([
|
478 |
+
'fn' => 'blocksy_mutate_selector',
|
479 |
+
], [
|
480 |
+
'selector' => [$root_selector[0]],
|
481 |
+
'operation' => 'suffix',
|
482 |
+
'to_add' => '#account-modal form'
|
483 |
+
])),
|
484 |
+
'variable' => 'form-field-border-initial-color'
|
485 |
+
],
|
486 |
+
|
487 |
+
'focus' => [
|
488 |
+
'selector' => blc_call_fn([
|
489 |
+
'fn' => 'blocksy_assemble_selector',
|
490 |
+
'default' => $root_selector
|
491 |
+
], blc_call_fn([
|
492 |
+
'fn' => 'blocksy_mutate_selector',
|
493 |
+
], [
|
494 |
+
'selector' => [$root_selector[0]],
|
495 |
+
'operation' => 'suffix',
|
496 |
+
'to_add' => '#account-modal form'
|
497 |
+
])),
|
498 |
+
'variable' => 'form-field-border-focus-color'
|
499 |
+
]
|
500 |
+
],
|
501 |
+
]);
|
502 |
+
|
503 |
+
if ($forms_type !== 'classic-forms' || is_customize_preview()) {
|
504 |
+
blocksy_output_colors([
|
505 |
+
'value' => blocksy_akg('account_modal_form_background_color', $atts),
|
506 |
+
'default' => [
|
507 |
+
'default' => [ 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT') ],
|
508 |
+
'focus' => [ 'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT') ],
|
509 |
+
],
|
510 |
+
'css' => $css,
|
511 |
+
|
512 |
+
'variables' => [
|
513 |
+
'default' => [
|
514 |
+
'selector' => blc_call_fn([
|
515 |
+
'fn' => 'blocksy_assemble_selector',
|
516 |
+
'default' => $root_selector
|
517 |
+
], blc_call_fn([
|
518 |
+
'fn' => 'blocksy_mutate_selector',
|
519 |
+
], [
|
520 |
+
'selector' => [$root_selector[0]],
|
521 |
+
'operation' => 'suffix',
|
522 |
+
'to_add' => '#account-modal form'
|
523 |
+
])),
|
524 |
+
'variable' => 'form-field-initial-background'
|
525 |
+
],
|
526 |
+
|
527 |
+
'focus' => [
|
528 |
+
'selector' => blc_call_fn([
|
529 |
+
'fn' => 'blocksy_assemble_selector',
|
530 |
+
'default' => $root_selector
|
531 |
+
], blc_call_fn([
|
532 |
+
'fn' => 'blocksy_mutate_selector',
|
533 |
+
], [
|
534 |
+
'selector' => [$root_selector[0]],
|
535 |
+
'operation' => 'suffix',
|
536 |
+
'to_add' => '#account-modal form'
|
537 |
+
])),
|
538 |
+
'variable' => 'form-field-focus-background'
|
539 |
+
]
|
540 |
+
],
|
541 |
+
]);
|
542 |
+
}
|
543 |
+
|
544 |
+
|
545 |
blocksy_output_colors([
|
546 |
'value' => blocksy_akg('account_close_button_color', $atts),
|
547 |
'default' => [
|
framework/features/header/items/account/options.php
CHANGED
@@ -48,7 +48,7 @@ $options = [
|
|
48 |
],
|
49 |
|
50 |
blocksy_rand_md5() => [
|
51 |
-
'title' => __( 'General', '
|
52 |
'type' => 'tab',
|
53 |
'options' => [
|
54 |
|
@@ -164,32 +164,32 @@ $options = [
|
|
164 |
|
165 |
'type-1' => [
|
166 |
'src' => blocksy_image_picker_file( 'account-1' ),
|
167 |
-
'title' => __( 'Type 1', '
|
168 |
],
|
169 |
|
170 |
'type-2' => [
|
171 |
'src' => blocksy_image_picker_file( 'account-2' ),
|
172 |
-
'title' => __( 'Type 2', '
|
173 |
],
|
174 |
|
175 |
'type-3' => [
|
176 |
'src' => blocksy_image_picker_file( 'account-3' ),
|
177 |
-
'title' => __( 'Type 3', '
|
178 |
],
|
179 |
|
180 |
'type-4' => [
|
181 |
'src' => blocksy_image_picker_file( 'account-4' ),
|
182 |
-
'title' => __( 'Type 4', '
|
183 |
],
|
184 |
|
185 |
'type-5' => [
|
186 |
'src' => blocksy_image_picker_file( 'account-5' ),
|
187 |
-
'title' => __( 'Type 5', '
|
188 |
],
|
189 |
|
190 |
'type-6' => [
|
191 |
'src' => blocksy_image_picker_file( 'account-6' ),
|
192 |
-
'title' => __( 'Type 6', '
|
193 |
],
|
194 |
],
|
195 |
],
|
@@ -225,9 +225,9 @@ $options = [
|
|
225 |
],
|
226 |
|
227 |
'choices' => blocksy_ordered_keys([
|
228 |
-
'desktop' => __( 'Desktop', '
|
229 |
-
'tablet' => __( 'Tablet', '
|
230 |
-
'mobile' => __( 'Mobile', '
|
231 |
]),
|
232 |
],
|
233 |
|
@@ -370,32 +370,32 @@ $options = [
|
|
370 |
|
371 |
'type-1' => [
|
372 |
'src' => blocksy_image_picker_file( 'account-1' ),
|
373 |
-
'title' => __( 'Type 1', '
|
374 |
],
|
375 |
|
376 |
'type-2' => [
|
377 |
'src' => blocksy_image_picker_file( 'account-2' ),
|
378 |
-
'title' => __( 'Type 2', '
|
379 |
],
|
380 |
|
381 |
'type-3' => [
|
382 |
'src' => blocksy_image_picker_file( 'account-3' ),
|
383 |
-
'title' => __( 'Type 3', '
|
384 |
],
|
385 |
|
386 |
'type-4' => [
|
387 |
'src' => blocksy_image_picker_file( 'account-4' ),
|
388 |
-
'title' => __( 'Type 4', '
|
389 |
],
|
390 |
|
391 |
'type-5' => [
|
392 |
'src' => blocksy_image_picker_file( 'account-5' ),
|
393 |
-
'title' => __( 'Type 5', '
|
394 |
],
|
395 |
|
396 |
'type-6' => [
|
397 |
'src' => blocksy_image_picker_file( 'account-6' ),
|
398 |
-
'title' => __( 'Type 6', '
|
399 |
],
|
400 |
],
|
401 |
],
|
@@ -431,9 +431,9 @@ $options = [
|
|
431 |
],
|
432 |
|
433 |
'choices' => blocksy_ordered_keys([
|
434 |
-
'desktop' => __( 'Desktop', '
|
435 |
-
'tablet' => __( 'Tablet', '
|
436 |
-
'mobile' => __( 'Mobile', '
|
437 |
]),
|
438 |
],
|
439 |
|
@@ -494,7 +494,7 @@ $options = [
|
|
494 |
|
495 |
|
496 |
blocksy_rand_md5() => [
|
497 |
-
'title' => __( 'Design', '
|
498 |
'type' => 'tab',
|
499 |
'options' => [
|
500 |
|
@@ -801,7 +801,7 @@ $options = [
|
|
801 |
|
802 |
blocksy_rand_md5() => [
|
803 |
'type' => 'ct-title',
|
804 |
-
'label' => __( 'Modal Options', '
|
805 |
],
|
806 |
|
807 |
'account_modal_font_color' => [
|
@@ -836,11 +836,111 @@ $options = [
|
|
836 |
],
|
837 |
],
|
838 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
839 |
'account_form_shadow' => [
|
840 |
'label' => __( 'Modal Shadow', 'blc' ),
|
841 |
'type' => 'ct-box-shadow',
|
842 |
'design' => 'inline',
|
843 |
// 'responsive' => true,
|
|
|
844 |
'value' => blocksy_box_shadow_value([
|
845 |
'enable' => true,
|
846 |
'h_offset' => 0,
|
@@ -963,7 +1063,7 @@ $options = [
|
|
963 |
],
|
964 |
|
965 |
'header_account_visibility' => [
|
966 |
-
'label' => __( 'Element Visibility', '
|
967 |
'type' => 'ct-visibility',
|
968 |
'design' => 'block',
|
969 |
'setting' => [ 'transport' => 'postMessage' ],
|
@@ -974,8 +1074,8 @@ $options = [
|
|
974 |
],
|
975 |
|
976 |
'choices' => blocksy_ordered_keys([
|
977 |
-
'tablet' => __( 'Tablet', '
|
978 |
-
'mobile' => __( 'Mobile', '
|
979 |
]),
|
980 |
],
|
981 |
|
48 |
],
|
49 |
|
50 |
blocksy_rand_md5() => [
|
51 |
+
'title' => __( 'General', 'blc' ),
|
52 |
'type' => 'tab',
|
53 |
'options' => [
|
54 |
|
164 |
|
165 |
'type-1' => [
|
166 |
'src' => blocksy_image_picker_file( 'account-1' ),
|
167 |
+
'title' => __( 'Type 1', 'blc' ),
|
168 |
],
|
169 |
|
170 |
'type-2' => [
|
171 |
'src' => blocksy_image_picker_file( 'account-2' ),
|
172 |
+
'title' => __( 'Type 2', 'blc' ),
|
173 |
],
|
174 |
|
175 |
'type-3' => [
|
176 |
'src' => blocksy_image_picker_file( 'account-3' ),
|
177 |
+
'title' => __( 'Type 3', 'blc' ),
|
178 |
],
|
179 |
|
180 |
'type-4' => [
|
181 |
'src' => blocksy_image_picker_file( 'account-4' ),
|
182 |
+
'title' => __( 'Type 4', 'blc' ),
|
183 |
],
|
184 |
|
185 |
'type-5' => [
|
186 |
'src' => blocksy_image_picker_file( 'account-5' ),
|
187 |
+
'title' => __( 'Type 5', 'blc' ),
|
188 |
],
|
189 |
|
190 |
'type-6' => [
|
191 |
'src' => blocksy_image_picker_file( 'account-6' ),
|
192 |
+
'title' => __( 'Type 6', 'blc' ),
|
193 |
],
|
194 |
],
|
195 |
],
|
225 |
],
|
226 |
|
227 |
'choices' => blocksy_ordered_keys([
|
228 |
+
'desktop' => __( 'Desktop', 'blc' ),
|
229 |
+
'tablet' => __( 'Tablet', 'blc' ),
|
230 |
+
'mobile' => __( 'Mobile', 'blc' ),
|
231 |
]),
|
232 |
],
|
233 |
|
370 |
|
371 |
'type-1' => [
|
372 |
'src' => blocksy_image_picker_file( 'account-1' ),
|
373 |
+
'title' => __( 'Type 1', 'blc' ),
|
374 |
],
|
375 |
|
376 |
'type-2' => [
|
377 |
'src' => blocksy_image_picker_file( 'account-2' ),
|
378 |
+
'title' => __( 'Type 2', 'blc' ),
|
379 |
],
|
380 |
|
381 |
'type-3' => [
|
382 |
'src' => blocksy_image_picker_file( 'account-3' ),
|
383 |
+
'title' => __( 'Type 3', 'blc' ),
|
384 |
],
|
385 |
|
386 |
'type-4' => [
|
387 |
'src' => blocksy_image_picker_file( 'account-4' ),
|
388 |
+
'title' => __( 'Type 4', 'blc' ),
|
389 |
],
|
390 |
|
391 |
'type-5' => [
|
392 |
'src' => blocksy_image_picker_file( 'account-5' ),
|
393 |
+
'title' => __( 'Type 5', 'blc' ),
|
394 |
],
|
395 |
|
396 |
'type-6' => [
|
397 |
'src' => blocksy_image_picker_file( 'account-6' ),
|
398 |
+
'title' => __( 'Type 6', 'blc' ),
|
399 |
],
|
400 |
],
|
401 |
],
|
431 |
],
|
432 |
|
433 |
'choices' => blocksy_ordered_keys([
|
434 |
+
'desktop' => __( 'Desktop', 'blc' ),
|
435 |
+
'tablet' => __( 'Tablet', 'blc' ),
|
436 |
+
'mobile' => __( 'Mobile', 'blc' ),
|
437 |
]),
|
438 |
],
|
439 |
|
494 |
|
495 |
|
496 |
blocksy_rand_md5() => [
|
497 |
+
'title' => __( 'Design', 'blc' ),
|
498 |
'type' => 'tab',
|
499 |
'options' => [
|
500 |
|
801 |
|
802 |
blocksy_rand_md5() => [
|
803 |
'type' => 'ct-title',
|
804 |
+
'label' => __( 'Modal Options', 'blc' ),
|
805 |
],
|
806 |
|
807 |
'account_modal_font_color' => [
|
836 |
],
|
837 |
],
|
838 |
|
839 |
+
'account_modal_form_text_color' => [
|
840 |
+
'label' => __( 'Input Font Color', 'blc' ),
|
841 |
+
'type' => 'ct-color-picker',
|
842 |
+
'design' => 'inline',
|
843 |
+
'setting' => [ 'transport' => 'postMessage' ],
|
844 |
+
'value' => [
|
845 |
+
'default' => [
|
846 |
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
|
847 |
+
],
|
848 |
+
|
849 |
+
'focus' => [
|
850 |
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
|
851 |
+
],
|
852 |
+
],
|
853 |
+
|
854 |
+
'pickers' => [
|
855 |
+
[
|
856 |
+
'title' => __( 'Initial', 'blc' ),
|
857 |
+
'id' => 'default',
|
858 |
+
'inherit' => 'var(--form-text-initial-color, var(--color))'
|
859 |
+
],
|
860 |
+
|
861 |
+
[
|
862 |
+
'title' => __( 'Focus', 'blc' ),
|
863 |
+
'id' => 'focus',
|
864 |
+
'inherit' => 'var(--form-text-focus-color, var(--color))'
|
865 |
+
],
|
866 |
+
],
|
867 |
+
],
|
868 |
+
|
869 |
+
'account_modal_form_border_color' => [
|
870 |
+
'label' => __( 'Input Border Color', 'blc' ),
|
871 |
+
'type' => 'ct-color-picker',
|
872 |
+
'design' => 'inline',
|
873 |
+
'setting' => [ 'transport' => 'postMessage' ],
|
874 |
+
'value' => [
|
875 |
+
'default' => [
|
876 |
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
|
877 |
+
],
|
878 |
+
|
879 |
+
'focus' => [
|
880 |
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
|
881 |
+
],
|
882 |
+
],
|
883 |
+
|
884 |
+
'pickers' => [
|
885 |
+
[
|
886 |
+
'title' => __( 'Initial', 'blc' ),
|
887 |
+
'id' => 'default',
|
888 |
+
'inherit' => 'var(--form-field-border-initial-color)'
|
889 |
+
],
|
890 |
+
|
891 |
+
[
|
892 |
+
'title' => __( 'Focus', 'blc' ),
|
893 |
+
'id' => 'focus',
|
894 |
+
'inherit' => 'var(--form-field-border-focus-color)'
|
895 |
+
],
|
896 |
+
],
|
897 |
+
],
|
898 |
+
|
899 |
+
blocksy_rand_md5() => [
|
900 |
+
'type' => 'ct-condition',
|
901 |
+
'condition' => ['forms_type' => 'classic-forms'],
|
902 |
+
'values_source' => 'global',
|
903 |
+
'options' => [
|
904 |
+
|
905 |
+
'account_modal_form_background_color' => [
|
906 |
+
'label' => __( 'Input Background Color', 'blc' ),
|
907 |
+
'type' => 'ct-color-picker',
|
908 |
+
'design' => 'inline',
|
909 |
+
'setting' => [ 'transport' => 'postMessage' ],
|
910 |
+
'value' => [
|
911 |
+
'default' => [
|
912 |
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
|
913 |
+
],
|
914 |
+
|
915 |
+
'focus' => [
|
916 |
+
'color' => Blocksy_Css_Injector::get_skip_rule_keyword('DEFAULT'),
|
917 |
+
],
|
918 |
+
],
|
919 |
+
|
920 |
+
'pickers' => [
|
921 |
+
[
|
922 |
+
'title' => __( 'Initial', 'blc' ),
|
923 |
+
'id' => 'default',
|
924 |
+
'inherit' => 'var(--form-field-initial-background)'
|
925 |
+
],
|
926 |
+
|
927 |
+
[
|
928 |
+
'title' => __( 'Focus', 'blc' ),
|
929 |
+
'id' => 'focus',
|
930 |
+
'inherit' => 'var(--form-field-focus-background)'
|
931 |
+
],
|
932 |
+
],
|
933 |
+
],
|
934 |
+
|
935 |
+
],
|
936 |
+
],
|
937 |
+
|
938 |
'account_form_shadow' => [
|
939 |
'label' => __( 'Modal Shadow', 'blc' ),
|
940 |
'type' => 'ct-box-shadow',
|
941 |
'design' => 'inline',
|
942 |
// 'responsive' => true,
|
943 |
+
'divider' => 'top',
|
944 |
'value' => blocksy_box_shadow_value([
|
945 |
'enable' => true,
|
946 |
'h_offset' => 0,
|
1063 |
],
|
1064 |
|
1065 |
'header_account_visibility' => [
|
1066 |
+
'label' => __( 'Element Visibility', 'blc' ),
|
1067 |
'type' => 'ct-visibility',
|
1068 |
'design' => 'block',
|
1069 |
'setting' => [ 'transport' => 'postMessage' ],
|
1074 |
],
|
1075 |
|
1076 |
'choices' => blocksy_ordered_keys([
|
1077 |
+
'tablet' => __( 'Tablet', 'blc' ),
|
1078 |
+
'mobile' => __( 'Mobile', 'blc' ),
|
1079 |
]),
|
1080 |
],
|
1081 |
|
framework/features/header/items/account/sync.js
CHANGED
@@ -97,6 +97,48 @@ ctEvents.on(
|
|
97 |
},
|
98 |
],
|
99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
account_close_button_color: [
|
101 |
{
|
102 |
selector: '#account-modal .ct-close-button',
|
97 |
},
|
98 |
],
|
99 |
|
100 |
+
account_modal_form_text_color: [
|
101 |
+
{
|
102 |
+
selector: '#account-modal form',
|
103 |
+
variable: 'form-text-initial-color',
|
104 |
+
type: 'color:default',
|
105 |
+
},
|
106 |
+
|
107 |
+
{
|
108 |
+
selector: '#account-modal form',
|
109 |
+
variable: 'form-text-focus-color',
|
110 |
+
type: 'color:focus',
|
111 |
+
},
|
112 |
+
],
|
113 |
+
|
114 |
+
account_modal_form_border_color: [
|
115 |
+
{
|
116 |
+
selector: '#account-modal form',
|
117 |
+
variable: 'form-field-border-initial-color',
|
118 |
+
type: 'color:default',
|
119 |
+
},
|
120 |
+
|
121 |
+
{
|
122 |
+
selector: '#account-modal form',
|
123 |
+
variable: 'form-field-border-focus-color',
|
124 |
+
type: 'color:focus',
|
125 |
+
},
|
126 |
+
],
|
127 |
+
|
128 |
+
account_modal_form_background_color: [
|
129 |
+
{
|
130 |
+
selector: '#account-modal form',
|
131 |
+
variable: 'form-field-initial-background',
|
132 |
+
type: 'color:default',
|
133 |
+
},
|
134 |
+
|
135 |
+
{
|
136 |
+
selector: '#account-modal form',
|
137 |
+
variable: 'form-field-focus-background',
|
138 |
+
type: 'color:focus',
|
139 |
+
},
|
140 |
+
],
|
141 |
+
|
142 |
account_close_button_color: [
|
143 |
{
|
144 |
selector: '#account-modal .ct-close-button',
|
framework/features/header/modal/login.php
CHANGED
@@ -25,7 +25,7 @@ $redirect_to_url = apply_filters(
|
|
25 |
|
26 |
<p class="login-remember col-2">
|
27 |
<label>
|
28 |
-
<input name="rememberme" type="checkbox" id="rememberme" value="forever">
|
29 |
<?php echo __('Remember Me', 'blc') ?>
|
30 |
</label>
|
31 |
|
25 |
|
26 |
<p class="login-remember col-2">
|
27 |
<label>
|
28 |
+
<input name="rememberme" type="checkbox" id="rememberme" class="ct-checkbox" value="forever">
|
29 |
<?php echo __('Remember Me', 'blc') ?>
|
30 |
</label>
|
31 |
|
framework/helpers/helpers.php
CHANGED
@@ -6,7 +6,7 @@ function blc_get_ext($id) {
|
|
6 |
|
7 |
if (! function_exists('blc_load_xml_file')) {
|
8 |
function blc_load_xml_file($url, $useragent = '') {
|
9 |
-
set_time_limit(
|
10 |
|
11 |
if (ini_get('allow_url_fopen') == true) {
|
12 |
$context_options = [
|
@@ -53,7 +53,8 @@ function blc_get_contacts_output($args = []) {
|
|
53 |
'link_target' => 'no',
|
54 |
'type' => 'rounded',
|
55 |
'fill' => 'outline',
|
56 |
-
'size' => ''
|
|
|
57 |
]);
|
58 |
|
59 |
$has_enabled_layer = false;
|
@@ -106,6 +107,8 @@ function blc_get_contacts_output($args = []) {
|
|
106 |
$attr['data-icon-size'] = $args['size'];
|
107 |
}
|
108 |
|
|
|
|
|
109 |
ob_start(); ?>
|
110 |
|
111 |
<ul <?php echo blocksy_attr_to_html($attr) ?>>
|
6 |
|
7 |
if (! function_exists('blc_load_xml_file')) {
|
8 |
function blc_load_xml_file($url, $useragent = '') {
|
9 |
+
set_time_limit(300);
|
10 |
|
11 |
if (ini_get('allow_url_fopen') == true) {
|
12 |
$context_options = [
|
53 |
'link_target' => 'no',
|
54 |
'type' => 'rounded',
|
55 |
'fill' => 'outline',
|
56 |
+
'size' => '',
|
57 |
+
'direction' => 'horizontal'
|
58 |
]);
|
59 |
|
60 |
$has_enabled_layer = false;
|
107 |
$attr['data-icon-size'] = $args['size'];
|
108 |
}
|
109 |
|
110 |
+
$attr['data-items-direction'] = $args['direction'];
|
111 |
+
|
112 |
ob_start(); ?>
|
113 |
|
114 |
<ul <?php echo blocksy_attr_to_html($attr) ?>>
|
framework/theme-integration.php
CHANGED
@@ -18,7 +18,7 @@ class ThemeIntegration {
|
|
18 |
$chunks[] = [
|
19 |
'id' => 'blocksy_account',
|
20 |
'selector' => implode(', ', [
|
21 |
-
'.ct-header-account[
|
22 |
'.must-log-in a'
|
23 |
]),
|
24 |
'url' => blc_call_fn(
|
@@ -84,6 +84,8 @@ class ThemeIntegration {
|
|
84 |
'view' => 'archive',
|
85 |
'slider_image_ratio' => '2/1',
|
86 |
'slider_autoplay' => 'no',
|
|
|
|
|
87 |
]
|
88 |
);
|
89 |
|
@@ -98,6 +100,13 @@ class ThemeIntegration {
|
|
98 |
);
|
99 |
});
|
100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
add_action('wp_ajax_blocksy_conditions_get_all_taxonomies', function () {
|
102 |
if (! current_user_can('manage_options')) {
|
103 |
wp_send_json_error();
|
@@ -296,7 +305,7 @@ class ThemeIntegration {
|
|
296 |
|
297 |
if ('image/svg+xml' === $mime) {
|
298 |
$default_height = 100;
|
299 |
-
$default_width
|
300 |
|
301 |
$dimensions = $this->svg_dimensions(get_attached_file($attachment->ID));
|
302 |
|
@@ -394,35 +403,6 @@ class ThemeIntegration {
|
|
394 |
);
|
395 |
}
|
396 |
);
|
397 |
-
|
398 |
-
if (get_theme_mod('emoji_scripts', 'no') !== 'yes') {
|
399 |
-
remove_action('wp_head', 'print_emoji_detection_script', 7);
|
400 |
-
remove_action('admin_print_scripts', 'print_emoji_detection_script');
|
401 |
-
remove_action('wp_print_styles', 'print_emoji_styles');
|
402 |
-
remove_action('admin_print_styles', 'print_emoji_styles');
|
403 |
-
remove_filter('the_content_feed', 'wp_staticize_emoji');
|
404 |
-
remove_filter('comment_text_rss', 'wp_staticize_emoji');
|
405 |
-
remove_filter('wp_mail', 'wp_staticize_emoji_for_email');
|
406 |
-
|
407 |
-
add_filter('tiny_mce_plugins', function ($plugins) {
|
408 |
-
if (is_array($plugins)) {
|
409 |
-
return array_diff($plugins, array('wpemoji'));
|
410 |
-
} else {
|
411 |
-
return array();
|
412 |
-
}
|
413 |
-
});
|
414 |
-
|
415 |
-
add_filter('wp_resource_hints', function ($urls, $relation_type) {
|
416 |
-
if ('dns-prefetch' === $relation_type) {
|
417 |
-
/** This filter is documented in wp-includes/formatting.php */
|
418 |
-
$emoji_svg_url = apply_filters('emoji_svg_url', 'https://s.w.org/images/core/emoji/2/svg/');
|
419 |
-
|
420 |
-
$urls = array_diff($urls, array($emoji_svg_url));
|
421 |
-
}
|
422 |
-
|
423 |
-
return $urls;
|
424 |
-
}, 10, 2);
|
425 |
-
}
|
426 |
}
|
427 |
|
428 |
protected function svg_dimensions($svg) {
|
18 |
$chunks[] = [
|
19 |
'id' => 'blocksy_account',
|
20 |
'selector' => implode(', ', [
|
21 |
+
'.ct-header-account[href*="account-modal"]',
|
22 |
'.must-log-in a'
|
23 |
]),
|
24 |
'url' => blc_call_fn(
|
84 |
'view' => 'archive',
|
85 |
'slider_image_ratio' => '2/1',
|
86 |
'slider_autoplay' => 'no',
|
87 |
+
|
88 |
+
'filtering' => false
|
89 |
]
|
90 |
);
|
91 |
|
100 |
);
|
101 |
});
|
102 |
|
103 |
+
add_shortcode('blocksy_breadcrumbs', function ($args, $content) {
|
104 |
+
$breadcrumbs_builder = new \Blocksy_Breadcrumbs_Builder();
|
105 |
+
return $breadcrumbs_builder->render([
|
106 |
+
'class' => 'ct-breadcrumbs-shortcode'
|
107 |
+
]);
|
108 |
+
});
|
109 |
+
|
110 |
add_action('wp_ajax_blocksy_conditions_get_all_taxonomies', function () {
|
111 |
if (! current_user_can('manage_options')) {
|
112 |
wp_send_json_error();
|
305 |
|
306 |
if ('image/svg+xml' === $mime) {
|
307 |
$default_height = 100;
|
308 |
+
$default_width = 100;
|
309 |
|
310 |
$dimensions = $this->svg_dimensions(get_attached_file($attachment->ID));
|
311 |
|
403 |
);
|
404 |
}
|
405 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
406 |
}
|
407 |
|
408 |
protected function svg_dimensions($svg) {
|
framework/views/blocksy-posts.php
CHANGED
@@ -94,6 +94,16 @@ if (
|
|
94 |
$query_args['tax_query'] = $tax_query;
|
95 |
}
|
96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
$query = new WP_Query(apply_filters(
|
98 |
'blocksy:general:shortcodes:blocksy-posts:args',
|
99 |
$query_args
|
@@ -138,14 +148,28 @@ if ($args['view'] === 'slider') {
|
|
138 |
|
139 |
$custom_post_types = blocksy_manager()->post_types->get_supported_post_types();
|
140 |
|
|
|
|
|
141 |
foreach ($custom_post_types as $cpt) {
|
142 |
-
if ($cpt ===
|
143 |
$prefix = $cpt . '_archive';
|
144 |
}
|
145 |
}
|
146 |
|
147 |
echo '<div class="ct-posts-shortcode" data-prefix="' . $prefix . '">';
|
148 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
echo blocksy_render_archive_cards([
|
150 |
'prefix' => $prefix,
|
151 |
'query' => $query,
|
94 |
$query_args['tax_query'] = $tax_query;
|
95 |
}
|
96 |
|
97 |
+
if (isset($_GET['blocksy_term_id'])) {
|
98 |
+
$query_args['tax_query'] = [
|
99 |
+
[
|
100 |
+
'field' => 'term_id',
|
101 |
+
'terms' => esc_sql($_GET['blocksy_term_id']),
|
102 |
+
'taxonomy' => get_term($_GET['blocksy_term_id'])->taxonomy
|
103 |
+
]
|
104 |
+
];
|
105 |
+
}
|
106 |
+
|
107 |
$query = new WP_Query(apply_filters(
|
108 |
'blocksy:general:shortcodes:blocksy-posts:args',
|
109 |
$query_args
|
148 |
|
149 |
$custom_post_types = blocksy_manager()->post_types->get_supported_post_types();
|
150 |
|
151 |
+
$preferred_post_type = explode(',', $args['post_type'])[0];
|
152 |
+
|
153 |
foreach ($custom_post_types as $cpt) {
|
154 |
+
if ($cpt === $preferred_post_type) {
|
155 |
$prefix = $cpt . '_archive';
|
156 |
}
|
157 |
}
|
158 |
|
159 |
echo '<div class="ct-posts-shortcode" data-prefix="' . $prefix . '">';
|
160 |
|
161 |
+
if (
|
162 |
+
$args['filtering']
|
163 |
+
&&
|
164 |
+
function_exists('blc_cpt_extra_filtering_output')
|
165 |
+
) {
|
166 |
+
blc_cpt_extra_filtering_output([
|
167 |
+
'prefix' => $prefix,
|
168 |
+
'post_type' => $preferred_post_type,
|
169 |
+
'links_strategy' => 'current_page'
|
170 |
+
]);
|
171 |
+
}
|
172 |
+
|
173 |
echo blocksy_render_archive_cards([
|
174 |
'prefix' => $prefix,
|
175 |
'query' => $query,
|
readme.txt
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
Tags: widget, widgets
|
3 |
Requires at least: 5.2
|
4 |
Requires PHP: 7.0
|
5 |
-
Tested up to: 5.
|
6 |
License: GPLv2 or later
|
7 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
-
Stable tag: 1.8.
|
9 |
|
10 |
== Description ==
|
11 |
|
@@ -23,6 +23,17 @@ 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.6.4: 2021-06-24
|
27 |
- Improvement: Add CSRF nonce check for customizer importer
|
28 |
|
2 |
Tags: widget, widgets
|
3 |
Requires at least: 5.2
|
4 |
Requires PHP: 7.0
|
5 |
+
Tested up to: 5.8
|
6 |
License: GPLv2 or later
|
7 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
+
Stable tag: 1.8.7
|
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.7: 2021-07-22
|
27 |
+
- New: Account modal inputs border and background color options
|
28 |
+
- Improvement: Allow opening account modal from custom places with a specific initial view
|
29 |
+
|
30 |
+
1.8.7-beta6: 2021-07-16
|
31 |
+
- New: Account modal inputs border and background color options
|
32 |
+
- Improvement: Allow opening account modal from custom places with a specific initial view
|
33 |
+
|
34 |
+
1.8.7-beta4: 2021-07-08
|
35 |
+
- New: Account modal inputs border and background color options
|
36 |
+
|
37 |
1.8.6.4: 2021-06-24
|
38 |
- Improvement: Add CSRF nonce check for customizer importer
|
39 |
|
static/bundle/account.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function r(o){if(t[o])return t[o].exports;var c=t[o]={i:o,l:!1,exports:{}};return e[o].call(c.exports,c,c.exports,r),c.l=!0,c.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 c in e)r.d(o,c,function(t){return e[t]}.bind(null,c));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),c=r.n(o),n=r(1),a=function(e,t){var r=t.screen,o=void 0===r?"login":r;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 c=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-message");c&&c.remove();var n=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-errors");n&&n.remove()},
|
1 |
+
!function(e){var t={};function r(o){if(t[o])return t[o].exports;var c=t[o]={i:o,l:!1,exports:{}};return e[o].call(c.exports,c,c.exports,r),c.l=!0,c.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 c in e)r.d(o,c,function(t){return e[t]}.bind(null,c));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),c=r.n(o),n=r(1),a=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 c=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-message");c&&c.remove();var n=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-errors");n&&n.remove()},i=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=e.querySelector(".ct-errors");o&&o.remove(),e.closest(".ct-account-form").classList.remove("ct-error");var c=r.querySelector("#login_error");return c&&(e.insertAdjacentHTML("afterbegin",'<div class="ct-errors">'.concat(c.innerHTML,"</div>")),requestAnimationFrame((function(){e.closest(".ct-account-form").classList.add("ct-error")}))),{hasError:!!c,doc:r}},s=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=e.querySelector(".ct-message");o&&o.remove();var c=e.querySelector(".ct-errors");c&&c.remove();var n=r.querySelector(".message");return e.closest(".ct-account-form").classList.remove("ct-error"),n&&e.insertAdjacentHTML("afterbegin",'<div class="ct-message">'.concat(n.innerHTML,"</div>")),{doc:r}};Object(n.registerDynamicChunk)("blocksy_account",{mount:function(e,t){var r=t.event;r.preventDefault(),function(e){var t="#account-modal";try{document.querySelector(t)}catch(e){return}document.querySelector(t)?e(document.querySelector(t)):fetch("".concat(ct_localizations.ajax_url,"?action=blc_retrieve_account_modal"),{method:"POST"}).then((function(e){return e.json()})).then((function(r){var o=r.data.html;document.querySelector(".ct-drawer-canvas").insertAdjacentHTML("beforeend",o),setTimeout((function(){e(document.querySelector(t))}))}))}((function(t){!function(e){if(e&&!e.hasListeners){e.hasListeners=!0,e.addEventListener("click",(function(t){t.target.href&&t.target.href.indexOf("lostpassword")>-1&&(a(e,{screen:"forgot-password"}),t.preventDefault()),t.target.href&&t.target.href.indexOf("wp-login")>-1&&-1===t.target.href.indexOf("lostpassword")&&(a(e,{screen:"login"}),t.preventDefault())}),!0);var t=e.querySelector('[name="loginform"]'),r=e.querySelector('[name="registerform"]'),o=e.querySelector('[name="lostpasswordform"]');t&&t.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||fetch(t.action,{method:t.method,body:new FormData(t)}).then((function(e){return e.text()})).then((function(e){var r=i(t.closest(".ct-login-form"),e);r.doc;r.hasError||(location=t.querySelector('[name="redirect_to"]').value)}))})),r&&r.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||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=i(r.closest(".ct-register-form"),e);t.doc;t.hasError||s(r.closest(".ct-register-form"),e)}))})),o&&o.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||fetch(o.action,{method:o.method,body:new FormData(o)}).then((function(e){return e.text()})).then((function(e){var t=i(o.closest(".ct-forgot-password-form"),e);t.doc;t.hasError||s(o.closest(".ct-forgot-password-form"),e)}))})),["login","register","forgot-password"].map((function(t){Array.from(e.querySelectorAll(".ct-".concat(t))).map((function(r){r.addEventListener("click",(function(r){r.preventDefault(),a(e,{screen:t})}))}))}))}}(t),a(t,{screen:e.dataset.view||"login"}),c.a.trigger("ct:overlay:handle-click",{e:r,href:"#account-modal",options:{isModal:!0}})}))}})}]);
|
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 c(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)&&r.length){var a=c.apply(null,r);a&&e.push(a)}else if("object"===o)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?(c.default=c,e.exports=c):void 0===(r=function(){return c}.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,c,o=n(11),a=n(12),i=(c=[],{activateTrap:function(e){if(c.length>0){var t=c[c.length-1];t!==e&&t.pause()}var n=c.indexOf(e);-1===n||c.splice(n,1),c.push(e)},deactivateTrap:function(e){var t=c.indexOf(e);-1!==t&&c.splice(t,1),c.length>0&&c[c.length-1].unpause()}});function l(e){return setTimeout(e,0)}e.exports=function(e,t){var n=document,c="string"==typeof e?n.querySelector(e):e,u=a({returnFocusOnDeactivate:!0,escapeDeactivates:!0},t),s={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},f={activate:function(e){if(s.active)return;g(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=n.activeElement;var t=e&&e.onActivate?e.onActivate:u.onActivate;t&&t();return m(),f},deactivate:d,pause:function(){if(s.paused||!s.active)return;s.paused=!0,b()},unpause:function(){if(!s.paused||!s.active)return;s.paused=!1,g(),m()}};return f;function d(e){if(s.active){clearTimeout(r),b(),s.active=!1,s.paused=!1,i.deactivateTrap(f);var t=e&&void 0!==e.onDeactivate?e.onDeactivate:u.onDeactivate;return t&&t(),(e&&void 0!==e.returnFocus?e.returnFocus:u.returnFocusOnDeactivate)&&l((function(){var e;_((e=s.nodeFocusedBeforeActivation,p("setReturnFocus")||e))})),f}}function m(){if(s.active)return i.activateTrap(f),r=l((function(){_(h())})),n.addEventListener("focusin",O,!0),n.addEventListener("mousedown",v,{capture:!0,passive:!1}),n.addEventListener("touchstart",v,{capture:!0,passive:!1}),n.addEventListener("click",j,{capture:!0,passive:!1}),n.addEventListener("keydown",y,{capture:!0,passive:!1}),f}function b(){if(s.active)return n.removeEventListener("focusin",O,!0),n.removeEventListener("mousedown",v,!0),n.removeEventListener("touchstart",v,!0),n.removeEventListener("click",j,!0),n.removeEventListener("keydown",y,!0),f}function p(e){var t=u[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!==p("initialFocus")?p("initialFocus"):c.contains(n.activeElement)?n.activeElement:s.firstTabbableNode||p("fallbackFocus")))throw new Error("Your focus-trap needs to have at least one focusable element");return e}function v(e){c.contains(e.target)||(u.clickOutsideDeactivates?d({returnFocus:!o.isFocusable(e.target)}):u.allowOutsideClick&&u.allowOutsideClick(e)||e.preventDefault())}function O(e){c.contains(e.target)||e.target instanceof Document||(e.stopImmediatePropagation(),_(s.mostRecentlyFocusedNode||h()))}function y(e){if(!1!==u.escapeDeactivates&&function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e))return e.preventDefault(),void d();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){if(g(),e.shiftKey&&e.target===s.firstTabbableNode)return e.preventDefault(),void _(s.lastTabbableNode);if(!e.shiftKey&&e.target===s.lastTabbableNode)e.preventDefault(),_(s.firstTabbableNode)}(e)}function j(e){u.clickOutsideDeactivates||c.contains(e.target)||u.allowOutsideClick&&u.allowOutsideClick(e)||(e.preventDefault(),e.stopImmediatePropagation())}function g(){var e=o(c);s.firstTabbableNode=e[0]||h(),s.lastTabbableNode=e[e.length-1]||h()}function _(e){e!==n.activeElement&&(e&&e.focus?(e.focus(),s.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,c,o;c=[],void 0===(o="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 c(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 o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,a=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype?function(e,n,a){var i=o.URL||o.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?c(l):r(l.href)?t(e,n,a):c(l,l.target="_blank")):(l.href=i.createObjectURL(e),setTimeout((function(){i.revokeObjectURL(l.href)}),4e4),setTimeout((function(){c(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,o){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,o),n);else if(r(e))t(e,n,o);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout((function(){c(a)}))}}:function(e,n,r,c){if((c=c||open("","_blank"))&&(c.document.title=c.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,r);var a="application/octet-stream"===e.type,i=/constructor/i.test(o.HTMLElement)||o.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||a&&i)&&"object"==typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),c?c.location.href=e:location=e,c=null},u.readAsDataURL(e)}else{var s=o.URL||o.webkitURL,f=s.createObjectURL(e);c?c.location=f:location.href=f,c=null,setTimeout((function(){s.revokeObjectURL(f)}),4e4)}});o.saveAs=a.saveAs=a,e.exports=a})?r.apply(t,c):r)||(e.exports=o)}).call(this,n(13))},function(e,t,n){e.exports=n(9)()},function(e,t,n){"use strict";var r=n(10);function c(){}function o(){}o.resetWarningCache=c,e.exports=function(){function e(e,t,n,c,o,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:o,resetWarningCache:c};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(","),c="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function o(e,t){t=t||{};var n,o,i,l=[],f=[],d=e.querySelectorAll(r);for(t.includeContainer&&c.call(e,r)&&(d=Array.prototype.slice.apply(d)).unshift(e),n=0;n<d.length;n++)a(o=d[n])&&(0===(i=u(o))?l.push(o):f.push({documentOrder:n,tabIndex:i,node:o}));return f.sort(s).map((function(e){return e.node})).concat(l)}function a(e){return!(!i(e)||function(e){return function(e){return f(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t=function(e){for(var t=0;t<e.length;t++)if(e[t].checked)return e[t]}(e.ownerDocument.querySelectorAll('input[type="radio"][name="'+e.name+'"]'));return!t||t===e}(e)}(e)||u(e)<0)}function i(e){return!(e.disabled||function(e){return f(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}o.isTabbable=function(e){if(!e)throw new Error("No node provided");return!1!==c.call(e,r)&&a(e)},o.isFocusable=function(e){if(!e)throw new Error("No node provided");return!1!==c.call(e,l)&&i(e)};var l=n.concat("iframe").join(",");function u(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}function s(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function f(e){return"INPUT"===e.tagName}e.exports=o},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var c in r)n.call(r,c)&&(e[c]=r[c])}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),c=n(4),o=n.n(c),a=n(1),i=n(2),l=n.n(i),u=n(5),s=n.n(u);n(8);function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var m=function(e){e.initialState,e.getInitialState,e.refs,e.getRefs,e.didMount,e.didUpdate,e.willUnmount,e.getSnapshotBeforeUpdate,e.shouldUpdate,e.render;return function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["initialState","getInitialState","refs","getRefs","didMount","didUpdate","willUnmount","getSnapshotBeforeUpdate","shouldUpdate","render"])},b=function(e){function t(){var n,r;f(this,t);for(var c=arguments.length,o=Array(c),a=0;a<c;a++)o[a]=arguments[a];return n=r=d(this,e.call.apply(e,[this].concat(o))),p.call(r),d(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getArgs=function(){var e=this.state,t=this.props,n=this._setState,r=this._forceUpdate,c=this._refs;return{state:e,props:m(t),refs:c,setState:n,forceUpdate:r}},t.prototype.componentDidMount=function(){this.props.didMount&&this.props.didMount(this.getArgs())},t.prototype.shouldComponentUpdate=function(e,t){return!this.props.shouldUpdate||this.props.shouldUpdate({props:this.props,state:this.state,nextProps:m(e),nextState:t})},t.prototype.componentWillUnmount=function(){this.props.willUnmount&&this.props.willUnmount({state:this.state,props:m(this.props),refs:this._refs})},t.prototype.componentDidUpdate=function(e,t,n){this.props.didUpdate&&this.props.didUpdate(Object.assign(this.getArgs(),{prevProps:m(e),prevState:t}),n)},t.prototype.getSnapshotBeforeUpdate=function(e,t){return this.props.getSnapshotBeforeUpdate?this.props.getSnapshotBeforeUpdate(Object.assign(this.getArgs(),{prevProps:m(e),prevState:t})):null},t.prototype.render=function(){var e=this.props,t=e.children,n=e.render;return n?n(this.getArgs()):"function"==typeof t?t(this.getArgs()):t||null},t}(s.a.Component);b.defaultProps={getInitialState:function(){},getRefs:function(){return{}}};var p=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=b,v=function(e){var t=e.children,n=e.container,c=void 0===n?document.body:n,o=e.type,a=void 0===o?"reach-portal":o;return Object(r.createElement)(h,{getRefs:function(){return{node:null}},didMount:function(e){var t=e.refs,n=e.forceUpdate,r=c.hasOwnProperty("current")?c.current:c;t.node=document.createElement(a),r.appendChild(t.node),n()},willUnmount:function(e){var t=e.refs.node,n=c.hasOwnProperty("current")?c.current:c;n&&n.removeChild(t)},render:function(e){var n=e.refs.node;return n?Object(r.createPortal)(t,n):null}})};var O=function(e,t){return function(n){if(e&&e(n),!n.defaultPrevented)return t(n)}},y=n(6),j=n.n(y);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,c=function(e,t){if(null==e)return{};var n,r,c={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(c[n]=e[n]);return c}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}var E=function(){},w=function(){},x=function(e,t){var n,r,c;e.disposeAriaHider=(n=e.overlayNode,r=[],c=[],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),c.push(e),e.setAttribute("aria-hidden","true"))}})),function(){c.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})},S=function(e){var t=e.refs;t.trap.deactivate(),t.disposeAriaHider()},C=React.createContext(),k=React.forwardRef((function(e,t){var n=e.container,c=e.isOpen,o=void 0===c||c,a=e.onDismiss,i=void 0===a?E:a,l=e.initialFocusRef,u=e.onClick,s=e.onKeyDown,f=_(e,["container","isOpen","onDismiss","initialFocusRef","onClick","onKeyDown"]);return Object(r.createElement)(h,{didMount:w},o?Object(r.createElement)(v,{container:n,"data-reach-dialog-wrapper":!0},Object(r.createElement)(h,{refs:{overlayNode:null,contentNode:null},didMount:function(e){var t=e.refs;x(t,l)},willUnmount:S},(function(e){var n=e.refs;return Object(r.createElement)(C.Provider,{value:function(e){return n.contentNode=e}},Object(r.createElement)("div",g({"data-reach-dialog-overlay":!0,onClick:O(u,(function(e){e.stopPropagation(),i()})),onKeyDown:O(s,(function(e){"Escape"===e.key&&(e.stopPropagation(),i())})),ref:function(e){n.overlayNode=e,t&&t(e)}},f)))}))):null)}));k.propTypes={initialFocusRef:function(){}};var D=function(e){return e.stopPropagation()},P=React.forwardRef((function(e,t){var n=e.onClick,c=(e.onKeyDown,_(e,["onClick","onKeyDown"]));return Object(r.createElement)(C.Consumer,null,(function(e){return Object(r.createElement)("div",g({"aria-modal":"true","data-reach-dialog-content":!0,tabIndex:"-1",onClick:O(n,D),ref:function(n){e(n),t&&t(n)}},c))}))})),A=n(3),N=function(e){return!!e},M=function(e){var t=e.items,n=e.isVisible,c=void 0===n?N:n,o=e.render,a=e.className,i=e.onDismiss;return Object(r.createElement)(A.Transition,{items:t,onStart:function(){return document.body.classList[c(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 c(e)&&function(t){return Object(r.createElement)(k,{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()}},"×"),o(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,c=!1,o=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){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}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],c=t[1];return[function(){return c(!0)},Object(r.createElement)(M,{items:n,onDismiss:function(){return c(!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,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}function B(e){return function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){F(o,r,c,a,i,"next",e)}function i(e){F(o,r,c,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,c=!1,o=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){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}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),c=U(n,2),o=c[0],i=c[1],l=Object(r.useState)(!1),u=U(l,2),s=u[0],f=u[1],d=Object(r.useContext)(R),m=(d.Link,d.history),b=ctDashboardLocalizations.plugin_data.is_pro,p=function(){var n=B(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(b||!e.config.pro){n.next=3;break}return f(!0),n.abrupt("return");case 3:return(r=new FormData).append("ext",e.name),r.append("action",e.__object?"blocksy_extension_deactivate":"blocksy_extension_activate"),i(!0),n.prev=7,n.next=10,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:r});case 10:e.config.require_refresh&&location.reload(),t(),n.next=16;break;case 14:n.prev=14,n.t0=n.catch(7);case 16:i(!1);case 17:case"end":return n.stop()}}),n,null,[[7,14]])})));return function(){return n.apply(this,arguments)}}();return[o,p,!b&&e.config.pro?Object(r.createElement)(M,{items:s,className:"ct-onboarding-modal",onDismiss:function(){return f(!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.","blc")),Object(r.createElement)("p",null,Object(a.__)("Hurry up, we have a 15% off discount now 🤩","blc")),Object(r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},Object(r.createElement)("a",{onClick:function(e){e.preventDefault(),f(!1),setTimeout((function(){m.navigate("/pro")}),300)},className:"button"},Object(a.__)("Free vs Pro","blocksy")),Object(r.createElement)("a",{href:"https://creativethemes.com/blocksy/pricing/?coupon=BlocksyLimited15&utm_source=getpro&utm_medium=dashboard&utm_campaign=BlocksyLimited15",target:"_blank",className:"button button-primary"},Object(a.__)("Upgrade Now","blc"))))}}):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?","blc")),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.","blc")),Object(r.createElement)("a",{href:ctDashboardLocalizations.support_url,className:"ct-button","data-hover":"blue",target:"_blank"},Object(a.__)("Submit a Support Ticket","blc")),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","blc")))};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 K(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}function G(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,c=!1,o=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){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}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,c=G(T(t),2),o=c[0],i=c[1],u=G(H(t,(function(){n()})),3),s=u[0],f=u[1],d=u[2];return Object(r.createElement)("li",{className:l()({active:!!t.__object})},Object(r.createElement)("h4",{className:"ct-extension-title"},t.config.name,s&&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:s,onClick:function(){f()}},t.__object?Object(a.__)("Deactivate","blc"):Object(a.__)("Activate","blc")),t.readme&&Object(r.createElement)("button",{onClick:function(){return o()},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,c=e.url;return Object(r.createElement)("a",{href:c,className:"ct-button ct-config-btn",dataButton:"white"},n)}))),i,d)},Q=function(){var e=G(Object(r.useState)(!Y),2),t=e[0],n=e[1],c=G(Object(r.useState)(Y||[]),2),i=c[0],u=c[1],s=G(Object(r.useState)(!1),2),f=s[0],d=s[1],m=G(Object(r.useState)("free"),2),b=m[0],p=m[1],h=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,r,c,o,a,i,l,s,f,m=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=m.length>0&&void 0!==m[0]?m[0]:{},r=Z({verbose:!1,extension:null,extAction:null},t),c=r.verbose,o=r.extension,a=r.extAction,c&&n(!0),d(!0),e.prev=4,e.next=7,fetch("".concat(wp.ajax.settings.url,"?action=blocksy_extensions_status"),Z({method:"POST"},o&&a?{body:JSON.stringify({extension:o,extAction:a})}:{}));case 7:if(200!==(i=e.sent).status){e.next=15;break}return e.next=11,i.json();case 11:l=e.sent,s=l.success,f=l.data,s&&(u(f),Y=f);case 15:e.next=19;break;case 17:e.prev=17,e.t0=e.catch(4);case 19:d(!1),n(!1);case 21:case"end":return e.stop()}}),e,null,[[4,17]])})),function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){K(o,r,c,a,i,"next",e)}function i(e){K(o,r,c,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 o.a.on("blocksy_exts_sync_exts",e),function(){o.a.off("blocksy_exts_sync_exts",e)}}),[]);var v=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]),O=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"===b?!t.pro:t.pro}))}),[b,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...","blc"))}:function(e){return Object(r.createElement)(A.animated.div,{style:e},Object(r.createElement)(r.Fragment,null,v&&Object(r.createElement)("ul",{className:"ct-extensions-sourse"},["free","pro"].map((function(e){return Object(r.createElement)("li",{key:e,onClick:function(){return p(e)},className:l()({active:e===b})},{free:Object(a.__)("Free Extensions","blc"),pro:Object(a.__)("Pro Extensions","blc")}[e])}))),Object(r.createElement)("ul",{className:l()("ct-extensions-list",{"is-pro":"pro"===b})},O.map((function(e){var t={extension:X};return o.a.trigger("ct:extensions:card",{CustomComponent:t,extension:e}),Object(r.createElement)(t.extension,{key:e.name,extension:e,extsSyncLoading:f,onExtsSync:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i[e.name].__object=!i[e.name].__object,u(i),h(Z(Z({},t),{},{extension:e.name}))}})}))),Object(r.createElement)(q,null)))}}))))},ee=function(e){var t=e.children,n=e.activated,c=e.checked,o=e.onChange;return Object(r.createElement)("div",{onClick:function(){return o()},className:l()("ct-checkbox-container",{activated:n})},t,Object(r.createElement)("span",{className:l()("ct-checkbox",{active:c})},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 ce(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,c=!1,o=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){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return oe(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 oe(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 oe(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","recipe-card-blocks-by-wpzoom":"Recipe Card Blocks by WPZOOM","stackable-ultimate-gutenberg-blocks":"Stackable – Gutenberg Blocks","mb-custom-post-type":"MB Custom Post Types & Custom Taxonomies"}[e]||e).replace(/\b\w/,(function(e){return e.toUpperCase()}))},ie=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,c=e.style,o=Object(r.useContext)(Je),i=o.currentDemo,l=o.demos_list,u=o.pluginsStatus,s=(o.setCurrentDemo,ce((i||"").split(":"),2)),f=s[0];s[1],l.filter((function(e){return e.name===f||""}));return Object(r.createElement)("div",{style:c},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","blc")),Object(r.createElement)("p",null,Object(a.__)("The following plugins are required for this starter site in order to work properly.","blc")),t.plugins.map((function(e){var c=e.plugin,o=e.enabled;return Object(r.createElement)(r.Fragment,{key:c},!u[c]&&Object(r.createElement)(ee,{key:c,checked:o,onChange:function(){return n(ne(ne({},t),{},{plugins:t.plugins.map((function(e){return e.plugin===c?ne(ne({},e),{},{enabled:!o}):e}))}))}},ae(c)),u[c]&&Object(r.createElement)(ee,{activated:!0,checked:!0,onChange:function(){}},ae(c)))}))))},le=function(){var e=Object(r.useContext)(Je),t=e.currentlyInstalledDemo,n=e.demos_list,c=e.setCurrentDemo,o=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","blc")),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","blc")),Object(r.createElement)("button",{className:"ct-button-primary",onClick:function(){i(!1),c(e.name)},disabled:!!o},t&&t.demo.indexOf(e.name)>-1?Object(a.__)("Modify","blc"):Object(a.__)("Import","blc")))))})))};function ue(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,c=!1,o=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){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return se(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 se(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 se(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 fe=function(e){var t=e.style,n=e.nextStep,c=(Object(r.useContext)(R).is_child_theme,Object(r.useContext)(Je)),o=c.setCurrentlyInstalledDemo,i=c.setCurrentDemo,l=c.currentDemo,u=c.demos_list,s=ue(Object(r.useState)(0),2),f=s[0],d=s[1],m=ue(Object(r.useState)("idle"),2),b=m[0],p=m[1],h=ue((l||"").split(":"),2),v=h[0],O=(h[1],u.filter((function(e){return e.name===v}))),y={erase_content:{title:Object(a.__)("Erase content","blc"),query_string:"action=blocksy_demo_erase_content&wp_customize=on"},deactivate_demo_plugins:{title:Object(a.__)("Deactivate demo plugins","blc"),query_string:"action=blocksy_demo_deactivate_plugins&plugins=".concat(O[0].plugins.join(":"))},deregister_current_demo:{title:Object(a.__)("Erase content","blc"),query_string:"action=blocksy_demo_deregister_current_demo"}},j=["erase_content","deactivate_demo_plugins","deregister_current_demo"],g=j[f],_=function(){var e=y[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(),f===j.length-1)return void p("done");d(Math.min(j.length-1,f+1))}}};return Object(r.useEffect)((function(){0!==f&&"done"!==b&&_()}),[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"===b&&Object(r.createElement)("h2",null,Object(a.__)("This starter site is already installed","blc")),"loading"===b&&Object(r.createElement)("h2",null,"Removing starter site..."),"done"===b&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h2",null,Object(a.__)("Starter Site Removed","blc")),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(v,":hide"))}},Object(a.__)("Dismiss","blc")))),"idle"===b&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("p",null,Object(a.__)("What steps do you want to perform next?","blc")),Object(r.createElement)("div",{className:"ct-modify-actions"},Object(r.createElement)("button",{className:"ct-demo-btn demo-remove",onClick:function(e){p("loading"),e.preventDefault(),_(),o()}},Object(a.__)("Remove","blc")),Object(r.createElement)("button",{className:"ct-demo-btn",onClick:function(e){e.preventDefault(),n()}},Object(a.__)("Reinstall","blc")))))};function de(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 me(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?de(Object(n),!0).forEach((function(t){be(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):de(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function be(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pe=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,c=e.style,o=Object(r.useContext)(R),i=o.is_child_theme,l=o.child_theme_exists;return Object(r.createElement)("div",{className:"ct-demo-child",style:c},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","blc")):Object(r.createElement)("h2",null,Object(a.__)("Install Child Theme","blc")),!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.","blc")):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.","blc")),Object(r.createElement)(ee,{checked:t.child_theme,onChange:function(){return n(me(me({},t),{},{child_theme:!t.child_theme}))}},l?Object(a.__)("Activate Child Theme","blc"):Object(a.__)("Install Child Theme","blc"))),i&&Object(a.__)("You already have a child theme properly installed and activated. Move on.","blc"),Object(r.createElement)("a",{href:"https://developer.wordpress.org/themes/advanced-topics/child-themes/",target:"_blank"},Object(a.__)("Learn more about child themes","blc")))};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 ve(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){Oe(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 Oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ye(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,c=!1,o=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){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}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,c=e.style,o=Object(r.useContext)(Je),i=o.currentDemo,u=o.demos_list,s=(o.pluginsStatus,o.setCurrentDemo,ye((i||"").split(":"),2)),f=s[0],d=(s[1],u.filter((function(e){return e.name===f||""})));return Object(r.createElement)("div",{style:c},d.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","blc")),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.","blc")),Object(r.createElement)("ul",{"data-count":d.length},d.sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0})).map((function(e){var c=e.builder,o=e.plugins;return Object(r.createElement)("li",{className:l()({active:c===(null===t.builder?d[0].builder:t.builder)}),onClick:function(){return n(ve(ve({},t),{},{builder:c,plugins:o.map((function(e){return{plugin:e,enabled:!0}}))}))}},Object(r.createElement)("figure",null,Object(r.createElement)("span",{className:l()("ct-checkbox",{active:c===(null===t.builder?d[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 "}))),""===c&&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"===c&&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"===c&&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(c)||"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 xe=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,c=(e.currentDemo,e.style);return Object(r.createElement)("div",{style:c},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","blc")),Object(r.createElement)("p",null,Object(a.__)("This will import posts, pages, comments, navigation menus, custom fields, terms and custom posts","blc")),["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","blc"),Object(r.createElement)("i",null,Object(a.__)("This option will remove the previous imported content and will perform a fresh and clean install.","blc"))))))},Se=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","blc")),Object(r.createElement)("p",null,Object(a.__)("Now you can view your website or start customizing it","blc")),Object(r.createElement)("div",null,Object(r.createElement)("a",{href:n,className:"ct-button"},Object(a.__)("Customize","blc")),Object(r.createElement)("a",{href:t,target:"_blank",className:"ct-button-primary"},Object(a.__)("View site","blc"))))},Ce=function(e,t){var n=e.action;if("complete"===n)return"";if("import_install_child"===n)return Object(a.__)("copying child theme sources","blc");if("import_activate_child"===n)return Object(a.__)("activating child theme","blc");if("install_plugin"===n)return Object(a.sprintf)(Object(a.__)("installing plugin %s","blc"),ae(e.name)||e.name);if("activate_plugin"===n)return Object(a.sprintf)(Object(a.__)("activating plugin %s","blc"),ae(e.name)||e.name);if("download_demo_widgets"===n)return Object(a.__)("downloading demo widgets","blc");if("apply_demo_widgets"===n)return Object(a.__)("installing demo widgets","blc");if("download_demo_options"===n)return Object(a.__)("downloading demo options","blc");if("import_mods_images"===n)return Object(a.__)("importing images from customizer","blc");if("import_customizer_options"===n)return Object(a.__)("import customizer options","blc");if("activate_required_extensions"===n)return Object(a.__)("activating required extensions","blc");if("erase_previous_posts"===n)return Object(a.__)("removing previously installed posts","blc");if("erase_previous_terms"===n)return Object(a.__)("removing previously installed taxonomies","blc");if("erase_default_pages"===n)return Object(a.__)("removing default WordPress pages","blc");if("erase_customizer_settings"===n)return Object(a.__)("resetting customizer options","blc");if("erase_widgets_data"===n)return Object(a.__)("resetting widgets","blc");if("content_installer_progress"===n){if(!e.kind)return"";var r=t.content.preliminary_data["".concat(e.kind,"_count")],c=t.content["".concat(e.kind,"_count")];return"".concat(Math.min(c,r)," of ").concat(r," ").concat({users:Object(a.__)("users","blc"),term:Object(a.__)("terms","blc"),media:Object(a.__)("images","blc"),post:Object(a.__)("posts","blc"),comment:Object(a.__)("comments","blc")}[e.kind])}return""};function ke(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?ke(Object(n),!0).forEach((function(t){Pe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ke(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,c=!1,o=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){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}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,c=e.includeMetaSteps,o=[];return void 0!==c&&c&&o.push("register_current_demo"),t.child_theme&&(r||o.push("child_theme")),t.plugins.filter((function(e){var t=e.enabled,r=e.plugin;return!!t&&!n[r]})).length>0&&o.push("plugins"),t.content.erase_content&&o.push("erase_content"),t.content.options&&o.push("options"),t.content.widgets&&o.push("widgets"),t.content.content&&o.push("content"),o.push("install_finish"),o},ze=function(e){var t=e.demoConfiguration,n=e.style,c=function(e){var t=Object(r.useContext)(Je),n=t.demos_list,c=t.currentDemo,o=(t.setCurrentDemo,t.setInstallerBlockingReleased),i=t.setCurrentlyInstalledDemo,l=t.pluginsStatus,u=Object(r.useContext)(R),s=(u.home_url,u.customizer_url,u.is_child_theme),f=(u.Link,Ae(Object(r.useState)(!1),2)),d=f[0],m=f[1],b=Ae(Object(r.useState)(0),2),p=b[0],h=b[1],v=Ae((c||"").split(":"),2),O=v[0],y=(v[1],n.filter((function(e){return e.name===O})).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","blc"),query_string:"action=blocksy_demo_register_current_demo&wp_customize=on&demo_name=".concat(c,":").concat(null===e.builder?y[0].builder:e.builder),expected_signals:1},child_theme:{title:Object(a.__)("Child theme","blc"),query_string:"action=blocksy_demo_install_child_theme",expected_signals:3},plugins:{title:Object(a.__)("Required plugins","blc"),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","blc"),query_string:"action=blocksy_demo_fake_step",expected_signals:6},erase_content:{title:Object(a.__)("Erase content","blc"),query_string:"action=blocksy_demo_erase_content&wp_customize=on",expected_signals:6},install_finish:{title:Object(a.__)("Final touches","blc"),query_string:"action=blocksy_demo_install_finish&wp_customize=on",expected_signals:1},options:{title:Object(a.__)("Import options","blc"),query_string:"action=blocksy_demo_install_options&wp_customize=on&demo_name=".concat(c,":").concat(null===e.builder?y[0].builder:e.builder),expected_signals:5},widgets:{title:Object(a.__)("Import widgets","blc"),query_string:"action=blocksy_demo_install_widgets&wp_customize=on&demo_name=".concat(c,":").concat(null===e.builder?y[0].builder:e.builder),expected_signals:3},content:{title:Object(a.__)("Import content","blc"),query_string:"action=blocksy_demo_install_content&wp_customize=on&demo_name=".concat(c,":").concat(null===e.builder?y[0].builder:e.builder),expected_signals:50}}),2),_=g[0],E=g[1],w=Le({demoConfiguration:e,pluginsStatus:l,is_child_theme:s,includeMetaSteps:!0}),x=w[p],S=Ae(Object(r.useState)(0),2),C=S[0],k=S[1],D=Ae(Object(r.useState)(null),2),P=D[0],A=D[1],N=Object(r.useRef)(C),M=Object(r.useRef)(_);Object(r.useEffect)((function(){N.current=C,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>=p?e:e+L(t)}),0)+100*C/_[x].expected_signals*(L(x)/100),T=function(){var e=_[x],t=new EventSource("".concat(ctDashboardLocalizations.ajax_url,"?").concat(e.query_string));t.onmessage=function(e){var n=JSON.parse(e.data);if(k(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 c=n.data,a=(c.comment_count,c.media_count,c.post_count,c.term_count,c.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(),p===w.length-1)return m(!0),o(!0),void window.removeEventListener("beforeunload",Me);A(null),k(0),h(Math.min(w.length-1,p+1))}}};return Object(r.useEffect)((function(){d||(A(null),k(0),"fake_step"===x?(console.log("here we go delay before fake_step"),setTimeout((function(){T()}),2e3)):T())}),[x]),Object(r.useEffect)((function(){return window.addEventListener("beforeunload",Me),i({demo:"".concat(c,":").concat(e.builder)}),function(){window.removeEventListener("beforeunload",Me)}}),[]),{isCompleted:d,stepName:x,stepsDescriptors:_,lastMessage:P,progress:z}}(t),o=c.isCompleted,i=c.stepName,l=c.stepsDescriptors,u=c.lastMessage,s=c.progress;return Object(r.createElement)("div",{className:"ct-demo-install",style:n},Object(r.createElement)(A.Transition,{initial:!0,items:o,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)(Se,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","blc"),"..."),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.","blc")),Object(r.createElement)("div",{className:"ct-progress-info"},l[i].title,u&&Ce(u,l)?": ".concat(Ce(u,l)):"",Object(r.createElement)("span",null,Math.round(s),"%")),Object(r.createElement)("div",{style:{"--progress":"".concat(s,"%")},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,c=!1,o=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){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}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)),c=n.installerBlockingReleased,o=n.demos_list,i=n.currentDemo,u=n.pluginsStatus,s=n.currentlyInstalledDemo,f=n.setCurrentDemo,d=Object(r.useContext)(R).is_child_theme,m=Ie(Object(r.useState)(s),2),b=m[0],p=m[1],h=Ie(Object(r.useState)({builder:"",child_theme:!1,plugins:[],content:{options:!0,widgets:!0,content:!0,erase_content:!0}}),2),v=h[0],O=h[1],y=Ie(Object(r.useState)(0),2),j=y[0],g=y[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(!b)return!1;if(-1===b.demo.indexOf(E))return!1}if("child_theme"===e&&d)return!1;var t=o.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!u[e]})).length)&&("builder"!==e||t.length>1)}))),x=w[j];return Object(r.useEffect)((function(){if(E&&!(i.indexOf(":hide")>-1)){var e=o.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),p(s),O({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"===x||"modify_demo"===x}),onDismiss:function(){("installer"!==x||c)&&f("".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:x,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)(fe,{demoConfiguration:v,nextStep:function(){g(Math.min(j+1,w.length-1))},style:t}),"child_theme"===e&&Object(r.createElement)(pe,{style:t,demoConfiguration:v,setDemoConfiguration:O}),"plugins"===e&&Object(r.createElement)(ie,{demoConfiguration:v,style:t,setDemoConfiguration:O}),"builder"===e&&Object(r.createElement)(ge,{style:t,demoConfiguration:v,setDemoConfiguration:O}),"content"===e&&Object(r.createElement)(xe,{style:t,demoConfiguration:v,setDemoConfiguration:O}),"installer"===e&&Object(r.createElement)(ze,{style:t,demoConfiguration:v}))}}))),"installer"!==x&&"modify_demo"!==x&&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","blc")),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===x}),key:e},t+1)}))),Object(r.createElement)("button",{className:"ct-demo-btn demo-main-btn",disabled:"content"===x&&0===Le({demoConfiguration:v,pluginsStatus:u,is_child_theme:d}).length,onClick:function(){g(Math.min(j+1,w.length-1))}},"content"===x?Object(a.__)("Install","blc"):Object(a.__)("Next","blc"))))}})},Ue=n(7),Ve=n.n(Ue);function He(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}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,c=!1,o=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){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}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],c=qe(Object(r.useState)(!1),2),o=c[0],i=c[1],l=qe(Object(r.useState)(""),2),u=l[0],s=l[1],f=qe(Object(r.useState)(""),2),d=f[0],m=f[1],b=qe(Object(r.useState)("coblocks,elementor,contact-form-7"),2),p=b[0],h=b[1],v=qe(Object(r.useState)(""),2),O=v[0],y=v[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,c,o,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",u),t.append("is_pro",g),t.append("url",O),t.append("builder",d),t.append("plugins",p),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:c=e.sent,o=c.success,a=c.data,o&&(i=new Blob([JSON.stringify(a.demo)],{type:"text/plain;charset=utf-8"}),Ve.a.saveAs(i,"".concat(u,".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,c){var o=e.apply(t,n);function a(e){He(o,r,c,a,i,"next",e)}function i(e){He(o,r,c,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:o,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","blc"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Name","blc"),value:u,onChange:function(e){var t=e.target.value;return s(t)}})),Object(r.createElement)("label",null,Object(a.__)("Preview URL","blc"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Preview URL","blc"),value:O,onChange:function(e){var t=e.target.value;return y(t)}})),Object(r.createElement)("label",null,Object(a.__)("PRO","blc"),Object(r.createElement)("input",{type:"checkbox",value:g,onChange:function(e){e.target.value;return _(!g)}})),Object(r.createElement)("label",null,Object(a.__)("Builder","blc"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Builder","blc"),value:d,onChange:function(e){var t=e.target.value;return m(t)}})),Object(r.createElement)("label",null,Object(a.__)("Plugins","blc"),Object(r.createElement)("textarea",{placeholder:Object(a.__)("Plugins","blc"),value:p,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...","blc"):Object(a.__)("Export site","blc")))}})):null};function $e(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}function Ke(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,c=!1,o=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){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ge(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ge(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Je=Object(r.createContext)({demos:[]}),Ye=null,Xe=null,Qe=function(e){e.children,e.path,e.location;var t=Ke(Object(r.useState)(!Ye),2),n=t[0],c=t[1],o=Ke(Object(r.useState)(Ye||[]),2),i=o[0],l=o[1],u=Ke(Object(r.useState)(Xe||{}),2),s=u[0],f=u[1],d=Ke(Object(r.useState)(null),2),m=d[0],b=d[1],p=Ke(Object(r.useState)(null),2),h=p[0],v=p[1],O=Ke(Object(r.useState)(!1),2),y=O[0],j=O[1],g=Ke(Object(r.useState)({builder:""}),2),_=(g[0],g[1],Ke(Object(r.useState)(!1),2)),E=_[0],w=_[1],x=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,o,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]&&c(!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,o=r.success,a=r.data,o&&(l(a.demos),f(a.active_plugins),v(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:c(!1);case 20:case"end":return e.stop()}}),e,null,[[4,17]])})),function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){$e(o,r,c,a,i,"next",e)}function i(e){$e(o,r,c,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.useEffect)((function(){x(!Ye)}),[]),Object(r.createElement)("div",{className:"ct-demos-list-container"},y&&Object(r.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:y}}),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...","blc"))}: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.__)("Connection to <b>demo.creativethemes.com</b> server didn't worked -- this is required for downloading the starter sites. You need to contact your hosting provider to figure out why your server can't reach to our server.")}}),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:y,demos_list:i.filter((function(e){return!e.dev||ct_localizations.is_dev_mode})),currentDemo:m,pluginsStatus:s,installerBlockingReleased:E,setInstallerBlockingReleased:w,setCurrentDemo:b,currentlyInstalledDemo:h,setCurrentlyInstalledDemo:v}},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,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}var tt=function(){var e=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,c,o,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,c=r.success,r.data,c&&((o=document.createElement("div")).innerHTML=ctDashboardLocalizations.plugin_data.connect_template,a=o.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,c){var o=e.apply(t,n);function a(e){et(o,r,c,a,i,"next",e)}function i(e){et(o,r,c,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","blc")),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.","blc")),Object(r.createElement)("button",{className:"ct-button-primary",onClick:function(t){t.preventDefault(),e()}},Object(a.__)("Allow & Continue","blc")))};o.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"})})),o.a.on("ct:dashboard:navigation-links",(function(e){"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&e.push({text:Object(a.__)("Starter Sites","blc"),path:"demos",getProps:function(e){var t=e.isPartiallyCurrent;e.isCurrent;return t?{"aria-current":"page"}:{}}}),e.push({text:Object(a.__)("Extensions","blc"),path:"/extensions"})})),o.a.on("ct:dashboard:home:before",(function(e){ctDashboardLocalizations.plugin_data.is_anonymous&&(e.content=Object(r.createElement)(tt,null))})),o.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 c(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)&&r.length){var a=c.apply(null,r);a&&e.push(a)}else if("object"===o)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?(c.default=c,e.exports=c):void 0===(r=function(){return c}.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,c,o=n(11),a=n(12),i=(c=[],{activateTrap:function(e){if(c.length>0){var t=c[c.length-1];t!==e&&t.pause()}var n=c.indexOf(e);-1===n||c.splice(n,1),c.push(e)},deactivateTrap:function(e){var t=c.indexOf(e);-1!==t&&c.splice(t,1),c.length>0&&c[c.length-1].unpause()}});function l(e){return setTimeout(e,0)}e.exports=function(e,t){var n=document,c="string"==typeof e?n.querySelector(e):e,u=a({returnFocusOnDeactivate:!0,escapeDeactivates:!0},t),s={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},f={activate:function(e){if(s.active)return;g(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=n.activeElement;var t=e&&e.onActivate?e.onActivate:u.onActivate;t&&t();return m(),f},deactivate:d,pause:function(){if(s.paused||!s.active)return;s.paused=!0,b()},unpause:function(){if(!s.paused||!s.active)return;s.paused=!1,g(),m()}};return f;function d(e){if(s.active){clearTimeout(r),b(),s.active=!1,s.paused=!1,i.deactivateTrap(f);var t=e&&void 0!==e.onDeactivate?e.onDeactivate:u.onDeactivate;return t&&t(),(e&&void 0!==e.returnFocus?e.returnFocus:u.returnFocusOnDeactivate)&&l((function(){var e;_((e=s.nodeFocusedBeforeActivation,p("setReturnFocus")||e))})),f}}function m(){if(s.active)return i.activateTrap(f),r=l((function(){_(h())})),n.addEventListener("focusin",O,!0),n.addEventListener("mousedown",v,{capture:!0,passive:!1}),n.addEventListener("touchstart",v,{capture:!0,passive:!1}),n.addEventListener("click",j,{capture:!0,passive:!1}),n.addEventListener("keydown",y,{capture:!0,passive:!1}),f}function b(){if(s.active)return n.removeEventListener("focusin",O,!0),n.removeEventListener("mousedown",v,!0),n.removeEventListener("touchstart",v,!0),n.removeEventListener("click",j,!0),n.removeEventListener("keydown",y,!0),f}function p(e){var t=u[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!==p("initialFocus")?p("initialFocus"):c.contains(n.activeElement)?n.activeElement:s.firstTabbableNode||p("fallbackFocus")))throw new Error("Your focus-trap needs to have at least one focusable element");return e}function v(e){c.contains(e.target)||(u.clickOutsideDeactivates?d({returnFocus:!o.isFocusable(e.target)}):u.allowOutsideClick&&u.allowOutsideClick(e)||e.preventDefault())}function O(e){c.contains(e.target)||e.target instanceof Document||(e.stopImmediatePropagation(),_(s.mostRecentlyFocusedNode||h()))}function y(e){if(!1!==u.escapeDeactivates&&function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e))return e.preventDefault(),void d();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){if(g(),e.shiftKey&&e.target===s.firstTabbableNode)return e.preventDefault(),void _(s.lastTabbableNode);if(!e.shiftKey&&e.target===s.lastTabbableNode)e.preventDefault(),_(s.firstTabbableNode)}(e)}function j(e){u.clickOutsideDeactivates||c.contains(e.target)||u.allowOutsideClick&&u.allowOutsideClick(e)||(e.preventDefault(),e.stopImmediatePropagation())}function g(){var e=o(c);s.firstTabbableNode=e[0]||h(),s.lastTabbableNode=e[e.length-1]||h()}function _(e){e!==n.activeElement&&(e&&e.focus?(e.focus(),s.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,c,o;c=[],void 0===(o="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 c(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 o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,a=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype?function(e,n,a){var i=o.URL||o.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?c(l):r(l.href)?t(e,n,a):c(l,l.target="_blank")):(l.href=i.createObjectURL(e),setTimeout((function(){i.revokeObjectURL(l.href)}),4e4),setTimeout((function(){c(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,o){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,o),n);else if(r(e))t(e,n,o);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout((function(){c(a)}))}}:function(e,n,r,c){if((c=c||open("","_blank"))&&(c.document.title=c.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,r);var a="application/octet-stream"===e.type,i=/constructor/i.test(o.HTMLElement)||o.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||a&&i)&&"object"==typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),c?c.location.href=e:location=e,c=null},u.readAsDataURL(e)}else{var s=o.URL||o.webkitURL,f=s.createObjectURL(e);c?c.location=f:location.href=f,c=null,setTimeout((function(){s.revokeObjectURL(f)}),4e4)}});o.saveAs=a.saveAs=a,e.exports=a})?r.apply(t,c):r)||(e.exports=o)}).call(this,n(13))},function(e,t,n){e.exports=n(9)()},function(e,t,n){"use strict";var r=n(10);function c(){}function o(){}o.resetWarningCache=c,e.exports=function(){function e(e,t,n,c,o,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:o,resetWarningCache:c};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(","),c="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function o(e,t){t=t||{};var n,o,i,l=[],f=[],d=e.querySelectorAll(r);for(t.includeContainer&&c.call(e,r)&&(d=Array.prototype.slice.apply(d)).unshift(e),n=0;n<d.length;n++)a(o=d[n])&&(0===(i=u(o))?l.push(o):f.push({documentOrder:n,tabIndex:i,node:o}));return f.sort(s).map((function(e){return e.node})).concat(l)}function a(e){return!(!i(e)||function(e){return function(e){return f(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t=function(e){for(var t=0;t<e.length;t++)if(e[t].checked)return e[t]}(e.ownerDocument.querySelectorAll('input[type="radio"][name="'+e.name+'"]'));return!t||t===e}(e)}(e)||u(e)<0)}function i(e){return!(e.disabled||function(e){return f(e)&&"hidden"===e.type}(e)||function(e){return null===e.offsetParent||"hidden"===getComputedStyle(e).visibility}(e))}o.isTabbable=function(e){if(!e)throw new Error("No node provided");return!1!==c.call(e,r)&&a(e)},o.isFocusable=function(e){if(!e)throw new Error("No node provided");return!1!==c.call(e,l)&&i(e)};var l=n.concat("iframe").join(",");function u(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}function s(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function f(e){return"INPUT"===e.tagName}e.exports=o},function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var c in r)n.call(r,c)&&(e[c]=r[c])}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),c=n(4),o=n.n(c),a=n(1),i=n(2),l=n.n(i),u=n(5),s=n.n(u);n(8);function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var m=function(e){e.initialState,e.getInitialState,e.refs,e.getRefs,e.didMount,e.didUpdate,e.willUnmount,e.getSnapshotBeforeUpdate,e.shouldUpdate,e.render;return function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["initialState","getInitialState","refs","getRefs","didMount","didUpdate","willUnmount","getSnapshotBeforeUpdate","shouldUpdate","render"])},b=function(e){function t(){var n,r;f(this,t);for(var c=arguments.length,o=Array(c),a=0;a<c;a++)o[a]=arguments[a];return n=r=d(this,e.call.apply(e,[this].concat(o))),p.call(r),d(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getArgs=function(){var e=this.state,t=this.props,n=this._setState,r=this._forceUpdate,c=this._refs;return{state:e,props:m(t),refs:c,setState:n,forceUpdate:r}},t.prototype.componentDidMount=function(){this.props.didMount&&this.props.didMount(this.getArgs())},t.prototype.shouldComponentUpdate=function(e,t){return!this.props.shouldUpdate||this.props.shouldUpdate({props:this.props,state:this.state,nextProps:m(e),nextState:t})},t.prototype.componentWillUnmount=function(){this.props.willUnmount&&this.props.willUnmount({state:this.state,props:m(this.props),refs:this._refs})},t.prototype.componentDidUpdate=function(e,t,n){this.props.didUpdate&&this.props.didUpdate(Object.assign(this.getArgs(),{prevProps:m(e),prevState:t}),n)},t.prototype.getSnapshotBeforeUpdate=function(e,t){return this.props.getSnapshotBeforeUpdate?this.props.getSnapshotBeforeUpdate(Object.assign(this.getArgs(),{prevProps:m(e),prevState:t})):null},t.prototype.render=function(){var e=this.props,t=e.children,n=e.render;return n?n(this.getArgs()):"function"==typeof t?t(this.getArgs()):t||null},t}(s.a.Component);b.defaultProps={getInitialState:function(){},getRefs:function(){return{}}};var p=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=b,v=function(e){var t=e.children,n=e.container,c=void 0===n?document.body:n,o=e.type,a=void 0===o?"reach-portal":o;return Object(r.createElement)(h,{getRefs:function(){return{node:null}},didMount:function(e){var t=e.refs,n=e.forceUpdate,r=c.hasOwnProperty("current")?c.current:c;t.node=document.createElement(a),r.appendChild(t.node),n()},willUnmount:function(e){var t=e.refs.node,n=c.hasOwnProperty("current")?c.current:c;n&&n.removeChild(t)},render:function(e){var n=e.refs.node;return n?Object(r.createPortal)(t,n):null}})};var O=function(e,t){return function(n){if(e&&e(n),!n.defaultPrevented)return t(n)}},y=n(6),j=n.n(y);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,c=function(e,t){if(null==e)return{};var n,r,c={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(c[n]=e[n]);return c}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}var E=function(){},w=function(){},x=function(e,t){var n,r,c;e.disposeAriaHider=(n=e.overlayNode,r=[],c=[],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),c.push(e),e.setAttribute("aria-hidden","true"))}})),function(){c.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})},S=function(e){var t=e.refs;t.trap.deactivate(),t.disposeAriaHider()},k=React.createContext(),C=React.forwardRef((function(e,t){var n=e.container,c=e.isOpen,o=void 0===c||c,a=e.onDismiss,i=void 0===a?E:a,l=e.initialFocusRef,u=e.onClick,s=e.onKeyDown,f=_(e,["container","isOpen","onDismiss","initialFocusRef","onClick","onKeyDown"]);return Object(r.createElement)(h,{didMount:w},o?Object(r.createElement)(v,{container:n,"data-reach-dialog-wrapper":!0},Object(r.createElement)(h,{refs:{overlayNode:null,contentNode:null},didMount:function(e){var t=e.refs;x(t,l)},willUnmount:S},(function(e){var n=e.refs;return Object(r.createElement)(k.Provider,{value:function(e){return n.contentNode=e}},Object(r.createElement)("div",g({"data-reach-dialog-overlay":!0,onClick:O(u,(function(e){e.stopPropagation(),i()})),onKeyDown:O(s,(function(e){"Escape"===e.key&&(e.stopPropagation(),i())})),ref:function(e){n.overlayNode=e,t&&t(e)}},f)))}))):null)}));C.propTypes={initialFocusRef:function(){}};var D=function(e){return e.stopPropagation()},P=React.forwardRef((function(e,t){var n=e.onClick,c=(e.onKeyDown,_(e,["onClick","onKeyDown"]));return Object(r.createElement)(k.Consumer,null,(function(e){return Object(r.createElement)("div",g({"aria-modal":"true","data-reach-dialog-content":!0,tabIndex:"-1",onClick:O(n,D),ref:function(n){e(n),t&&t(n)}},c))}))})),A=n(3),N=function(e){return!!e},M=function(e){var t=e.items,n=e.isVisible,c=void 0===n?N:n,o=e.render,a=e.className,i=e.onDismiss;return Object(r.createElement)(A.Transition,{items:t,onStart:function(){return document.body.classList[c(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 c(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()}},"×"),o(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,c=!1,o=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){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}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],c=t[1];return[function(){return c(!0)},Object(r.createElement)(M,{items:n,onDismiss:function(){return c(!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,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}function B(e){return function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){F(o,r,c,a,i,"next",e)}function i(e){F(o,r,c,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,c=!1,o=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){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}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),c=U(n,2),o=c[0],i=c[1],l=Object(r.useState)(!1),u=U(l,2),s=u[0],f=u[1],d=Object(r.useContext)(R),m=(d.Link,d.history),b=ctDashboardLocalizations.plugin_data.is_pro,p=function(){var n=B(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(b||!e.config.pro){n.next=3;break}return f(!0),n.abrupt("return");case 3:return(r=new FormData).append("ext",e.name),r.append("action",e.__object?"blocksy_extension_deactivate":"blocksy_extension_activate"),i(!0),n.prev=7,n.next=10,fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:r});case 10:e.config.require_refresh&&location.reload(),t(),n.next=16;break;case 14:n.prev=14,n.t0=n.catch(7);case 16:i(!1);case 17:case"end":return n.stop()}}),n,null,[[7,14]])})));return function(){return n.apply(this,arguments)}}();return[o,p,!b&&e.config.pro?Object(r.createElement)(M,{items:s,className:"ct-onboarding-modal",onDismiss:function(){return f(!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.","blc")),Object(r.createElement)("p",null,Object(a.__)("Hurry up, we have a 10% off discount now 🤩","blc")),Object(r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},Object(r.createElement)("a",{onClick:function(e){e.preventDefault(),f(!1),setTimeout((function(){m.navigate("/pro")}),300)},className:"button"},Object(a.__)("Free vs Pro","blocksy")),Object(r.createElement)("a",{href:"https://creativethemes.com/blocksy/pricing/?coupon=BlocksyLimited10&utm_source=getpro&utm_medium=dashboard&utm_campaign=BlocksyLimited10",target:"_blank",className:"button button-primary"},Object(a.__)("Upgrade Now","blc"))))}}):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?","blc")),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.","blc")),Object(r.createElement)("a",{href:ctDashboardLocalizations.support_url,className:"ct-button","data-hover":"blue",target:"_blank"},Object(a.__)("Submit a Support Ticket","blc")),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","blc")))};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,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}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,c=!1,o=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){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}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,c=K(T(t),2),o=c[0],i=c[1],u=K(H(t,(function(){n()})),3),s=u[0],f=u[1],d=u[2];return Object(r.createElement)("li",{className:l()({active:!!t.__object})},Object(r.createElement)("h4",{className:"ct-extension-title"},t.config.name,s&&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:s,onClick:function(){f()}},t.__object?Object(a.__)("Deactivate","blc"):Object(a.__)("Activate","blc")),t.readme&&Object(r.createElement)("button",{onClick:function(){return o()},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,c=e.url;return Object(r.createElement)("a",{href:c,className:"ct-button ct-config-btn",dataButton:"white"},n)}))),i,d)},Q=function(){var e=K(Object(r.useState)(!Y),2),t=e[0],n=e[1],c=K(Object(r.useState)(Y||[]),2),i=c[0],u=c[1],s=K(Object(r.useState)(!1),2),f=s[0],d=s[1],m=K(Object(r.useState)("free"),2),b=m[0],p=m[1],h=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,r,c,o,a,i,l,s,f,m=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=m.length>0&&void 0!==m[0]?m[0]:{},r=Z({verbose:!1,extension:null,extAction:null},t),c=r.verbose,o=r.extension,a=r.extAction,c&&n(!0),d(!0),e.prev=4,e.next=7,fetch("".concat(wp.ajax.settings.url,"?action=blocksy_extensions_status"),Z({method:"POST"},o&&a?{body:JSON.stringify({extension:o,extAction:a})}:{}));case 7:if(200!==(i=e.sent).status){e.next=15;break}return e.next=11,i.json();case 11:l=e.sent,s=l.success,f=l.data,s&&(u(f),Y=f);case 15:e.next=19;break;case 17:e.prev=17,e.t0=e.catch(4);case 19:d(!1),n(!1);case 21:case"end":return e.stop()}}),e,null,[[4,17]])})),function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){G(o,r,c,a,i,"next",e)}function i(e){G(o,r,c,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 o.a.on("blocksy_exts_sync_exts",e),function(){o.a.off("blocksy_exts_sync_exts",e)}}),[]);var v=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]),O=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"===b?!t.pro:t.pro}))}),[b,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...","blc"))}:function(e){return Object(r.createElement)(A.animated.div,{style:e},Object(r.createElement)(r.Fragment,null,v&&Object(r.createElement)("ul",{className:"ct-extensions-sourse"},["free","pro"].map((function(e){return Object(r.createElement)("li",{key:e,onClick:function(){return p(e)},className:l()({active:e===b})},{free:Object(a.__)("Free Extensions","blc"),pro:Object(a.__)("Pro Extensions","blc")}[e])}))),Object(r.createElement)("ul",{className:l()("ct-extensions-list",{"is-pro":"pro"===b})},O.map((function(e){var t={extension:X};return o.a.trigger("ct:extensions:card",{CustomComponent:t,extension:e}),Object(r.createElement)(t.extension,{key:e.name,extension:e,extsSyncLoading:f,onExtsSync:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i[e.name].__object=!i[e.name].__object,u(i),h(Z(Z({},t),{},{extension:e.name}))}})}))),Object(r.createElement)(q,null)))}}))))},ee=function(e){var t=e.children,n=e.activated,c=e.checked,o=e.onChange;return Object(r.createElement)("div",{onClick:function(){return o()},className:l()("ct-checkbox-container",{activated:n})},t,Object(r.createElement)("span",{className:l()("ct-checkbox",{active:c})},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 ce(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,c=!1,o=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){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return oe(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 oe(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 oe(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","mb-custom-post-type":"MB Custom Post Types & Custom Taxonomies"}[e]||e).replace(/\b\w/,(function(e){return e.toUpperCase()}))},ie=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,c=e.style,o=Object(r.useContext)(Je),i=o.currentDemo,l=o.demos_list,u=o.pluginsStatus,s=(o.setCurrentDemo,ce((i||"").split(":"),2)),f=s[0];s[1],l.filter((function(e){return e.name===f||""}));return Object(r.createElement)("div",{style:c},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","blc")),Object(r.createElement)("p",null,Object(a.__)("The following plugins are required for this starter site in order to work properly.","blc")),t.plugins.map((function(e){var c=e.plugin,o=e.enabled;return Object(r.createElement)(r.Fragment,{key:c},!u[c]&&Object(r.createElement)(ee,{key:c,checked:o,onChange:function(){return n(ne(ne({},t),{},{plugins:t.plugins.map((function(e){return e.plugin===c?ne(ne({},e),{},{enabled:!o}):e}))}))}},ae(c)),u[c]&&Object(r.createElement)(ee,{activated:!0,checked:!0,onChange:function(){}},ae(c)))}))))},le=function(){var e=Object(r.useContext)(Je),t=e.currentlyInstalledDemo,n=e.demos_list,c=e.setCurrentDemo,o=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","blc")),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","blc")),Object(r.createElement)("button",{className:"ct-button-primary",onClick:function(){i(!1),c(e.name)},disabled:!!o},t&&t.demo.indexOf(e.name)>-1?Object(a.__)("Modify","blc"):Object(a.__)("Import","blc")))))})))};function ue(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,c=!1,o=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){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return se(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 se(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 se(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 fe=function(e){var t=e.style,n=e.nextStep,c=(Object(r.useContext)(R).is_child_theme,Object(r.useContext)(Je)),o=c.setCurrentlyInstalledDemo,i=c.setCurrentDemo,l=c.currentDemo,u=c.demos_list,s=ue(Object(r.useState)(0),2),f=s[0],d=s[1],m=ue(Object(r.useState)("idle"),2),b=m[0],p=m[1],h=ue((l||"").split(":"),2),v=h[0],O=(h[1],u.filter((function(e){return e.name===v}))),y={erase_content:{title:Object(a.__)("Erase content","blc"),query_string:"action=blocksy_demo_erase_content&wp_customize=on"},deactivate_demo_plugins:{title:Object(a.__)("Deactivate demo plugins","blc"),query_string:"action=blocksy_demo_deactivate_plugins&plugins=".concat(O[0].plugins.join(":"))},deregister_current_demo:{title:Object(a.__)("Erase content","blc"),query_string:"action=blocksy_demo_deregister_current_demo"}},j=["erase_content","deactivate_demo_plugins","deregister_current_demo"],g=j[f],_=function(){var e=y[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(),f===j.length-1)return void p("done");d(Math.min(j.length-1,f+1))}}};return Object(r.useEffect)((function(){0!==f&&"done"!==b&&_()}),[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"===b&&Object(r.createElement)("h2",null,Object(a.__)("This starter site is already installed","blc")),"loading"===b&&Object(r.createElement)("h2",null,"Removing starter site..."),"done"===b&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h2",null,Object(a.__)("Starter Site Removed","blc")),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(v,":hide"))}},Object(a.__)("Dismiss","blc")))),"idle"===b&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("p",null,Object(a.__)("What steps do you want to perform next?","blc")),Object(r.createElement)("div",{className:"ct-modify-actions"},Object(r.createElement)("button",{className:"ct-demo-btn demo-remove",onClick:function(e){p("loading"),e.preventDefault(),_(),o()}},Object(a.__)("Remove","blc")),Object(r.createElement)("button",{className:"ct-demo-btn",onClick:function(e){e.preventDefault(),n()}},Object(a.__)("Reinstall","blc")))))};function de(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 me(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?de(Object(n),!0).forEach((function(t){be(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):de(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function be(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pe=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,c=e.style,o=Object(r.useContext)(R),i=o.is_child_theme,l=o.child_theme_exists;return Object(r.createElement)("div",{className:"ct-demo-child",style:c},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","blc")):Object(r.createElement)("h2",null,Object(a.__)("Install Child Theme","blc")),!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.","blc")):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.","blc")),Object(r.createElement)(ee,{checked:t.child_theme,onChange:function(){return n(me(me({},t),{},{child_theme:!t.child_theme}))}},l?Object(a.__)("Activate Child Theme","blc"):Object(a.__)("Install Child Theme","blc"))),i&&Object(a.__)("You already have a child theme properly installed and activated. Move on.","blc"),Object(r.createElement)("a",{href:"https://developer.wordpress.org/themes/advanced-topics/child-themes/",target:"_blank"},Object(a.__)("Learn more about child themes","blc")))};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 ve(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){Oe(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 Oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ye(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,c=!1,o=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){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}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,c=e.style,o=Object(r.useContext)(Je),i=o.currentDemo,u=o.demos_list,s=(o.pluginsStatus,o.setCurrentDemo,ye((i||"").split(":"),2)),f=s[0],d=(s[1],u.filter((function(e){return e.name===f||""})));return Object(r.createElement)("div",{style:c},d.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","blc")),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.","blc")),Object(r.createElement)("ul",{"data-count":d.length},d.sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0})).map((function(e){var c=e.builder,o=e.plugins;return Object(r.createElement)("li",{className:l()({active:c===(null===t.builder?d[0].builder:t.builder)}),onClick:function(){return n(ve(ve({},t),{},{builder:c,plugins:o.map((function(e){return{plugin:e,enabled:!0}}))}))}},Object(r.createElement)("figure",null,Object(r.createElement)("span",{className:l()("ct-checkbox",{active:c===(null===t.builder?d[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 "}))),""===c&&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"===c&&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"===c&&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(c)||"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 xe=function(e){var t=e.demoConfiguration,n=e.setDemoConfiguration,c=(e.currentDemo,e.style);return Object(r.createElement)("div",{style:c},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","blc")),Object(r.createElement)("p",null,Object(a.__)("This will import posts, pages, comments, navigation menus, custom fields, terms and custom posts","blc")),["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","blc"),Object(r.createElement)("i",null,Object(a.__)("This option will remove the previous imported content and will perform a fresh and clean install.","blc"))))))},Se=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","blc")),Object(r.createElement)("p",null,Object(a.__)("Now you can view your website or start customizing it","blc")),Object(r.createElement)("div",null,Object(r.createElement)("a",{href:n,className:"ct-button"},Object(a.__)("Customize","blc")),Object(r.createElement)("a",{href:t,target:"_blank",className:"ct-button-primary"},Object(a.__)("View site","blc"))))},ke=function(e,t){var n=e.action;if("complete"===n)return"";if("import_install_child"===n)return Object(a.__)("copying child theme sources","blc");if("import_activate_child"===n)return Object(a.__)("activating child theme","blc");if("install_plugin"===n)return Object(a.sprintf)(Object(a.__)("installing plugin %s","blc"),ae(e.name)||e.name);if("activate_plugin"===n)return Object(a.sprintf)(Object(a.__)("activating plugin %s","blc"),ae(e.name)||e.name);if("download_demo_widgets"===n)return Object(a.__)("downloading demo widgets","blc");if("apply_demo_widgets"===n)return Object(a.__)("installing demo widgets","blc");if("download_demo_options"===n)return Object(a.__)("downloading demo options","blc");if("import_mods_images"===n)return Object(a.__)("importing images from customizer","blc");if("import_customizer_options"===n)return Object(a.__)("import customizer options","blc");if("activate_required_extensions"===n)return Object(a.__)("activating required extensions","blc");if("erase_previous_posts"===n)return Object(a.__)("removing previously installed posts","blc");if("erase_previous_terms"===n)return Object(a.__)("removing previously installed taxonomies","blc");if("erase_default_pages"===n)return Object(a.__)("removing default WordPress pages","blc");if("erase_customizer_settings"===n)return Object(a.__)("resetting customizer options","blc");if("erase_widgets_data"===n)return Object(a.__)("resetting widgets","blc");if("content_installer_progress"===n){if(!e.kind)return"";var r=t.content.preliminary_data["".concat(e.kind,"_count")],c=t.content["".concat(e.kind,"_count")];return"".concat(Math.min(c,r)," of ").concat(r," ").concat({users:Object(a.__)("users","blc"),term:Object(a.__)("terms","blc"),media:Object(a.__)("images","blc"),post:Object(a.__)("posts","blc"),comment:Object(a.__)("comments","blc")}[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,c=!1,o=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){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}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,c=e.includeMetaSteps,o=[];return void 0!==c&&c&&o.push("register_current_demo"),t.child_theme&&(r||o.push("child_theme")),t.plugins.filter((function(e){var t=e.enabled,r=e.plugin;return!!t&&!n[r]})).length>0&&o.push("plugins"),t.content.erase_content&&o.push("erase_content"),t.content.options&&o.push("options"),t.content.widgets&&o.push("widgets"),t.content.content&&o.push("content"),o.push("install_finish"),o},ze=function(e){var t=e.demoConfiguration,n=e.style,c=function(e){var t=Object(r.useContext)(Je),n=t.demos_list,c=t.currentDemo,o=(t.setCurrentDemo,t.setInstallerBlockingReleased),i=t.setCurrentlyInstalledDemo,l=t.pluginsStatus,u=Object(r.useContext)(R),s=(u.home_url,u.customizer_url,u.is_child_theme),f=(u.Link,Ae(Object(r.useState)(!1),2)),d=f[0],m=f[1],b=Ae(Object(r.useState)(0),2),p=b[0],h=b[1],v=Ae((c||"").split(":"),2),O=v[0],y=(v[1],n.filter((function(e){return e.name===O})).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","blc"),query_string:"action=blocksy_demo_register_current_demo&wp_customize=on&demo_name=".concat(c,":").concat(null===e.builder?y[0].builder:e.builder),expected_signals:1},child_theme:{title:Object(a.__)("Child theme","blc"),query_string:"action=blocksy_demo_install_child_theme",expected_signals:3},plugins:{title:Object(a.__)("Required plugins","blc"),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","blc"),query_string:"action=blocksy_demo_fake_step",expected_signals:6},erase_content:{title:Object(a.__)("Erase content","blc"),query_string:"action=blocksy_demo_erase_content&wp_customize=on",expected_signals:6},install_finish:{title:Object(a.__)("Final touches","blc"),query_string:"action=blocksy_demo_install_finish&wp_customize=on",expected_signals:1},options:{title:Object(a.__)("Import options","blc"),query_string:"action=blocksy_demo_install_options&wp_customize=on&demo_name=".concat(c,":").concat(null===e.builder?y[0].builder:e.builder),expected_signals:5},widgets:{title:Object(a.__)("Import widgets","blc"),query_string:"action=blocksy_demo_install_widgets&wp_customize=on&demo_name=".concat(c,":").concat(null===e.builder?y[0].builder:e.builder),expected_signals:3},content:{title:Object(a.__)("Import content","blc"),query_string:"action=blocksy_demo_install_content&wp_customize=on&demo_name=".concat(c,":").concat(null===e.builder?y[0].builder:e.builder),expected_signals:50}}),2),_=g[0],E=g[1],w=Le({demoConfiguration:e,pluginsStatus:l,is_child_theme:s,includeMetaSteps:!0}),x=w[p],S=Ae(Object(r.useState)(0),2),k=S[0],C=S[1],D=Ae(Object(r.useState)(null),2),P=D[0],A=D[1],N=Object(r.useRef)(k),M=Object(r.useRef)(_);Object(r.useEffect)((function(){N.current=k,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>=p?e:e+L(t)}),0)+100*k/_[x].expected_signals*(L(x)/100),T=function(){var e=_[x],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 c=n.data,a=(c.comment_count,c.media_count,c.post_count,c.term_count,c.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(),p===w.length-1)return m(!0),o(!0),void window.removeEventListener("beforeunload",Me);A(null),C(0),h(Math.min(w.length-1,p+1))}}};return Object(r.useEffect)((function(){d||(A(null),C(0),"fake_step"===x?(console.log("here we go delay before fake_step"),setTimeout((function(){T()}),2e3)):T())}),[x]),Object(r.useEffect)((function(){return window.addEventListener("beforeunload",Me),i({demo:"".concat(c,":").concat(e.builder)}),function(){window.removeEventListener("beforeunload",Me)}}),[]),{isCompleted:d,stepName:x,stepsDescriptors:_,lastMessage:P,progress:z}}(t),o=c.isCompleted,i=c.stepName,l=c.stepsDescriptors,u=c.lastMessage,s=c.progress;return Object(r.createElement)("div",{className:"ct-demo-install",style:n},Object(r.createElement)(A.Transition,{initial:!0,items:o,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)(Se,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","blc"),"..."),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.","blc")),Object(r.createElement)("div",{className:"ct-progress-info"},l[i].title,u&&ke(u,l)?": ".concat(ke(u,l)):"",Object(r.createElement)("span",null,Math.round(s),"%")),Object(r.createElement)("div",{style:{"--progress":"".concat(s,"%")},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,c=!1,o=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){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}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)),c=n.installerBlockingReleased,o=n.demos_list,i=n.currentDemo,u=n.pluginsStatus,s=n.currentlyInstalledDemo,f=n.setCurrentDemo,d=Object(r.useContext)(R).is_child_theme,m=Ie(Object(r.useState)(s),2),b=m[0],p=m[1],h=Ie(Object(r.useState)({builder:"",child_theme:!1,plugins:[],content:{options:!0,widgets:!0,content:!0,erase_content:!0}}),2),v=h[0],O=h[1],y=Ie(Object(r.useState)(0),2),j=y[0],g=y[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(!b)return!1;if(-1===b.demo.indexOf(E))return!1}if("child_theme"===e&&d)return!1;var t=o.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!u[e]})).length)&&("builder"!==e||t.length>1)}))),x=w[j];return Object(r.useEffect)((function(){if(E&&!(i.indexOf(":hide")>-1)){var e=o.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),p(s),O({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"===x||"modify_demo"===x}),onDismiss:function(){("installer"!==x||c)&&f("".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:x,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)(fe,{demoConfiguration:v,nextStep:function(){g(Math.min(j+1,w.length-1))},style:t}),"child_theme"===e&&Object(r.createElement)(pe,{style:t,demoConfiguration:v,setDemoConfiguration:O}),"plugins"===e&&Object(r.createElement)(ie,{demoConfiguration:v,style:t,setDemoConfiguration:O}),"builder"===e&&Object(r.createElement)(ge,{style:t,demoConfiguration:v,setDemoConfiguration:O}),"content"===e&&Object(r.createElement)(xe,{style:t,demoConfiguration:v,setDemoConfiguration:O}),"installer"===e&&Object(r.createElement)(ze,{style:t,demoConfiguration:v}))}}))),"installer"!==x&&"modify_demo"!==x&&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","blc")),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===x}),key:e},t+1)}))),Object(r.createElement)("button",{className:"ct-demo-btn demo-main-btn",disabled:"content"===x&&0===Le({demoConfiguration:v,pluginsStatus:u,is_child_theme:d}).length,onClick:function(){g(Math.min(j+1,w.length-1))}},"content"===x?Object(a.__)("Install","blc"):Object(a.__)("Next","blc"))))}})},Ue=n(7),Ve=n.n(Ue);function He(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}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,c=!1,o=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){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}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],c=qe(Object(r.useState)(!1),2),o=c[0],i=c[1],l=qe(Object(r.useState)(""),2),u=l[0],s=l[1],f=qe(Object(r.useState)(""),2),d=f[0],m=f[1],b=qe(Object(r.useState)("coblocks,elementor,contact-form-7"),2),p=b[0],h=b[1],v=qe(Object(r.useState)(""),2),O=v[0],y=v[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,c,o,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",u),t.append("is_pro",g),t.append("url",O),t.append("builder",d),t.append("plugins",p),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:c=e.sent,o=c.success,a=c.data,o&&(i=new Blob([JSON.stringify(a.demo)],{type:"text/plain;charset=utf-8"}),Ve.a.saveAs(i,"".concat(u,".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,c){var o=e.apply(t,n);function a(e){He(o,r,c,a,i,"next",e)}function i(e){He(o,r,c,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:o,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","blc"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Name","blc"),value:u,onChange:function(e){var t=e.target.value;return s(t)}})),Object(r.createElement)("label",null,Object(a.__)("Preview URL","blc"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Preview URL","blc"),value:O,onChange:function(e){var t=e.target.value;return y(t)}})),Object(r.createElement)("label",null,Object(a.__)("PRO","blc"),Object(r.createElement)("input",{type:"checkbox",value:g,onChange:function(e){e.target.value;return _(!g)}})),Object(r.createElement)("label",null,Object(a.__)("Builder","blc"),Object(r.createElement)("input",{type:"text",placeholder:Object(a.__)("Builder","blc"),value:d,onChange:function(e){var t=e.target.value;return m(t)}})),Object(r.createElement)("label",null,Object(a.__)("Plugins","blc"),Object(r.createElement)("textarea",{placeholder:Object(a.__)("Plugins","blc"),value:p,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...","blc"):Object(a.__)("Export site","blc")))}})):null};function $e(e,t,n,r,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}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,c=!1,o=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){c=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(c)throw o}}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],c=t[1],o=Ge(Object(r.useState)(Ye||[]),2),i=o[0],l=o[1],u=Ge(Object(r.useState)(Xe||{}),2),s=u[0],f=u[1],d=Ge(Object(r.useState)(null),2),m=d[0],b=d[1],p=Ge(Object(r.useState)(null),2),h=p[0],v=p[1],O=Ge(Object(r.useState)(!1),2),y=O[0],j=O[1],g=Ge(Object(r.useState)({builder:""}),2),_=(g[0],g[1],Ge(Object(r.useState)(!1),2)),E=_[0],w=_[1],x=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,o,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]&&c(!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,o=r.success,a=r.data,o&&(l(a.demos),f(a.active_plugins),v(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:c(!1);case 20:case"end":return e.stop()}}),e,null,[[4,17]])})),function(){var t=this,n=arguments;return new Promise((function(r,c){var o=e.apply(t,n);function a(e){$e(o,r,c,a,i,"next",e)}function i(e){$e(o,r,c,a,i,"throw",e)}a(void 0)}))});return function(){return t.apply(this,arguments)}}();return Object(r.useEffect)((function(){x(!Ye)}),[]),Object(r.createElement)("div",{className:"ct-demos-list-container"},y&&Object(r.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:y}}),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...","blc"))}: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.__)("Connection to <b>demo.creativethemes.com</b> server didn't worked -- this is required for downloading the starter sites. You need to contact your hosting provider to figure out why your server can't reach to our server.")}}),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:y,demos_list:i.filter((function(e){return!e.dev||ct_localizations.is_dev_mode})),currentDemo:m,pluginsStatus:s,installerBlockingReleased:E,setInstallerBlockingReleased:w,setCurrentDemo:b,currentlyInstalledDemo:h,setCurrentlyInstalledDemo:v}},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,c,o,a){try{var i=e[o](a),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,c)}var tt=function(){var e=function(){var e,t=(e=regeneratorRuntime.mark((function e(){var t,n,r,c,o,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,c=r.success,r.data,c&&((o=document.createElement("div")).innerHTML=ctDashboardLocalizations.plugin_data.connect_template,a=o.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,c){var o=e.apply(t,n);function a(e){et(o,r,c,a,i,"next",e)}function i(e){et(o,r,c,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","blc")),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.","blc")),Object(r.createElement)("button",{className:"ct-button-primary",onClick:function(t){t.preventDefault(),e()}},Object(a.__)("Allow & Continue","blc")))};o.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"})})),o.a.on("ct:dashboard:navigation-links",(function(e){"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&e.push({text:Object(a.__)("Starter Sites","blc"),path:"demos",getProps:function(e){var t=e.isPartiallyCurrent;e.isCurrent;return t?{"aria-current":"page"}:{}}}),e.push({text:Object(a.__)("Extensions","blc"),path:"/extensions"})})),o.a.on("ct:dashboard:home:before",(function(e){ctDashboardLocalizations.plugin_data.is_anonymous&&(e.content=Object(r.createElement)(tt,null))})),o.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.
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.7
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
static/bundle/main.min.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
1 |
/**
|
2 |
+
* - v1.8.7
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
static/bundle/options.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.wp.components},function(e,t){e.exports=window.ctEvents},function(e,t){e.exports=window.React},function(e,t,n){(function(t){function n(e){return(n="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)}var r="object"===("undefined"==typeof window?"undefined":n(window))&&window.window===window?window:"object"===("undefined"==typeof self?"undefined":n(self))&&self.self===self?self:"object"===(void 0===t?"undefined":n(t))&&t.global===t?t:this;function o(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){i(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function c(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return t.status>=200&&t.status<=299}function a(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 i="object"!==("undefined"==typeof window?"undefined":n(window))||window!==r?function(){}:"download"in HTMLAnchorElement.prototype?function(e,t,n){var i=r.URL||r.webkitURL,l=document.createElement("a");t=t||e.name||"download",l.download=t,l.rel="noopener","string"==typeof e?(l.href=e,l.origin!==location.origin?c(l.href)?o(e,t,n):a(l,l.target="_blank"):a(l)):(l.href=i.createObjectURL(e),setTimeout((function(){i.revokeObjectURL(l.href)}),4e4),setTimeout((function(){a(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,t,r){if(t=t||e.name||"download","string"==typeof e)if(c(e))o(e,t,r);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout((function(){a(i)}))}else navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!==n(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([String.fromCharCode(65279),e],{type:e.type}):e}(e,r),t)}:function(e,t,c,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof e)return o(e,t,c);var i="application/octet-stream"===e.type,l=/constructor/i.test(r.HTMLElement)||r.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||i&&l)&&"object"===("undefined"==typeof FileReader?"undefined":n(FileReader))){var s=new FileReader;s.onloadend=function(){var e=s.result;e=u?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=e:location=e,a=null},s.readAsDataURL(e)}else{var d=r.URL||r.webkitURL,p=d.createObjectURL(e);a?a.location=p:location.href=p,a=null,setTimeout((function(){d.revokeObjectURL(p)}),4e4)}};e.exports=i}).call(this,n(12))},function(e,t){e.exports=window.wp.hooks},function(e,t,n){var r=n(13);function o(e,t,n,r,c){var a=new Error(n,r,c);return a.name="UseFetchError",a.status=e,a.statusText=t,Object.setPrototypeOf(a,Object.getPrototypeOf(this)),Error.captureStackTrace&&Error.captureStackTrace(a,o),a}o.prototype=Object.create(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(o,Error),e.exports=function(e,t,n){var c=(n&&n.depends||t&&t.depends||[]).reduce((function(e,t){return e||!t}),!1);return r(!c&&function(e,t,n){return fetch(e,t).then(n&&n.formatter||t&&t.formatter||function(e){if(!e.ok)throw new o(e.status,e.statusText,"Fetch error");return e.json()})},e,t||{},n||{})}},function(e,t,n){var r=n(15);e.exports=function(){var e=function(){e.id=r(),e.subscribers.forEach((function(e){e()}))};return e.id=r(),e.subscribers=[],e.subscribe=function(t){e.subscribers.push(t)},e.unsubscribe=function(t){e.subscribers.indexOf(t)>=0&&e.subscribers.splice(e.subscribers.indexOf(t),1)},e}},function(e,t,n){var r=n(6);e.exports=function(e){var t=r.useState(e.id),n=function(){return t[1](e.id)};return r.useEffect((function(){return e.subscribe(n),function(){return e.unsubscribe(n)}}),[]),t[0]}},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){var r=n(6),o=n(14);e.exports=function(e){var t=Array.prototype.slice.call(arguments,[1]),n=r.useState({isLoading:!!e});return r.useEffect((function(){e&&(!n[0].isLoading&&n[1]({data:n[0].data,isLoading:!0}),e.apply(null,t).then((function(e){n[1]({data:e,isLoading:!1})})).catch((function(e){n[1]({error:e,isLoading:!1})})))}),o(t)),n[0]}},function(e,t){e.exports=function e(){for(var t=[],n=0;n<arguments.length;n++){var r=arguments[n];if(r instanceof Array)for(var o=0;o<r.length;o++)t=t.concat(e(r[o]));else if("undefined"!=typeof URL&&r instanceof URL)t=t.concat(r.toJSON());else if(r instanceof Object)for(var c=Object.keys(r),a=0;a<c.length;a++){var i=c[a];t=t.concat([i]).concat(e(r[i]))}else t=t.concat(r)}return t}},function(e,t,n){for(var r=self.crypto||self.msCrypto,o="-_",c=36;c--;)o+=c.toString(36);for(c=36;c---10;)o+=c.toString(36).toUpperCase();e.exports=function(e){var t="",n=r.getRandomValues(new Uint8Array(e||21));for(c=e||21;c--;)t+=o[63&n[c]];return t}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(1),a=n(2),i=n(3),l=n.n(i);function u(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||b(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 s(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 d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(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)||b(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){if(e){if("string"==typeof e)return m(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)?m(e,t):void 0}}function m(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=function(e){return e.filter((function(e,t,n){return n.findIndex((function(t){return t.ID===e.ID}))===t}))},O=[],j=function(e){var t=e.condition,n=e.onChange,o=f(Object(r.useState)(O),2),i=o[0],l=o[1],s=Object(r.useMemo)((function(){return{post_ids:"post",page_ids:"page",custom_post_type_ids:"ct_cpt"}[t.rule]}),[t.rule]),p=Object(r.useMemo)((function(){return(t.payload||{}).post_id||""}),[t.payload&&t.payload.post_id]),b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";fetch("".concat(wp.ajax.settings.url,"?action=blocksy_conditions_get_all_posts"),{headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(d(d({post_type:s},e?{search_query:e}:{}),p?{alsoInclude:p}:{})),method:"POST"}).then((function(e){return e.json()})).then((function(e){var t=e.data.posts;l((function(e){return y([].concat(u(e),u(t)))})),O=y([].concat(u(O),u(t)))}))};return Object(r.useEffect)((function(){b()}),[s]),Object(r.createElement)(a.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,searchPlaceholder:Object(c.__)("Type to search by ID or title...","blc"),placeholder:"post_ids"===t.rule?Object(c.__)("Select post","blc"):"page_ids"===t.rule?Object(c.__)("Select page","blc"):Object(c.__)("Custom Post Type ID","blc"),choices:i.filter((function(e){var t=e.post_type;return"ct_cpt"===s?"post"!==t&&"page"!==t:s===t})).map((function(e){return{key:e.ID,value:e.post_title}})),search:!0},value:p,onChange:function(e){return n(e)},onInputValueChange:function(e){i.find((function(t){return t.post_title===e}))||b(e)}})};function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,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)||S(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){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}function _(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 g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){E(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||S(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 S(e,t){if(e){if("string"==typeof e)return x(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)?x(e,t):void 0}}function x(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 C=[],k=[],A=[],P=function(e){var t=e.value,n=e.onChange,o=blocksy_admin.all_condition_rules.reduce((function(e,t){var n=t.rules,r=t.title;return[].concat(w(e),w(n.map((function(e){return g(g({},e),{},{group:r})}))))}),[]).reduce((function(e,t){var n=t.title,r=t.id,o=v(t,["title","id"]);return[].concat(w(e),[g({key:r,value:n},o)])}),[]),i=h(Object(r.useState)(C),2),u=(i[0],i[1],h(Object(r.useState)(k),2)),s=u[0],d=u[1],p=h(Object(r.useState)(A),2),f=p[0],b=p[1],m=function(e){return"post_ids"===e.rule||"page_ids"===e.rule||"custom_post_type_ids"===e.rule||"taxonomy_ids"===e.rule||"post_with_taxonomy_ids"===e.rule||"current_language"===e.rule};return Object(r.useEffect)((function(){fetch("".concat(wp.ajax.settings.url,"?action=blocksy_conditions_get_all_taxonomies"),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"}).then((function(e){return e.json()})).then((function(e){var t=e.data,n=t.taxonomies,r=t.languages;d(n),k=n,b(r),A=r}))}),[]),Object(r.createElement)("div",{className:"ct-display-conditions"},t.map((function(e,i){return Object(r.createElement)("div",{className:l()("ct-condition-group",{"ct-cols-3":m(e),"ct-cols-2":!m(e)}),key:i},Object(r.createElement)(a.Select,{key:"first",option:{inputClassName:"ct-condition-type",selectInputStart:function(){return Object(r.createElement)("span",{className:"ct-".concat(e.type)})},placeholder:Object(c.__)("Select variation","blc"),choices:{include:Object(c.__)("Include","blc"),exclude:Object(c.__)("Exclude","blc")}},value:e.type,onChange:function(r){n(t.map((function(t,n){return g({},n===i?g(g({},e),{},{type:r}):t)})))}}),Object(r.createElement)(a.Select,{key:"second",option:{appendToBody:!0,placeholder:Object(c.__)("Select rule","blc"),choices:"user"===e.category?o.filter((function(e){return 0===e.key.indexOf("user_")})):o.filter((function(e){return-1===e.key.indexOf("user_")})),search:!0},value:e.rule,onChange:function(r){n(t.map((function(t,n){return g({},n===i?g(g({},e),{},{rule:r}):t)})))}}),("post_ids"===e.rule||"custom_post_type_ids"===e.rule||"page_ids"===e.rule)&&Object(r.createElement)(j,{condition:e,onChange:function(r){n(t.map((function(t,n){return g({},n===i?g(g({},e),{},{payload:g(g({},e.payload),{},{post_id:r})}):t)})))}}),("taxonomy_ids"===e.rule||"post_with_taxonomy_ids"===e.rule)&&Object(r.createElement)(a.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,placeholder:Object(c.__)("Select taxonomy","blc"),choices:s.map((function(e){return g({key:e.id,value:e.name},e.group?{group:e.group}:{})})),search:!0},value:(e.payload||{}).taxonomy_id||"",onChange:function(r){n(t.map((function(t,n){return g({},n===i?g(g({},e),{},{payload:g(g({},e.payload),{},{taxonomy_id:r})}):t)})))}}),"current_language"===e.rule&&Object(r.createElement)(a.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,placeholder:Object(c.__)("Select language","blc"),choices:f.map((function(e){return{key:e.id,value:e.name}})),search:!0},value:(e.payload||{}).language||"",onChange:function(r){n(t.map((function(t,n){return g({},n===i?g(g({},e),{},{payload:g(g({},e.payload),{},{language:r})}):t)})))}}),Object(r.createElement)("button",{type:"button",onClick:function(e){e.preventDefault();var r=w(t);r.splice(i,1),n(r)}},"×"))})),Object(r.createElement)("div",{className:"ct-conditions-actions"},Object(r.createElement)("button",{type:"button",className:"button add-condition",onClick:function(e){e.preventDefault(),n([].concat(w(t),[{type:"include",rule:"everywhere",payload:{}}]))}},Object(c.__)("Add Display Condition","blc")),Object(r.createElement)("button",{type:"button",className:"button add-condition",onClick:function(e){e.preventDefault(),n([].concat(w(t),[{type:"include",rule:"user_logged_in",payload:{},category:"user"}]))}},Object(c.__)("Add User Condition","blc"))))};function N(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 T(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 T(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 T(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 D=function(e){var t=e.option,n=t.display,o=void 0===n?"inline":n,i=t.modalTitle,l=void 0===i?Object(c.__)("Transparent Header Display Conditions","blc"):i,u=t.modalDescription,s=void 0===u?Object(c.__)("Add one or more conditions to display the transparent header.","blc"):u,d=e.value,p=e.onChange,f=N(Object(r.useState)(!1),2),b=f[0],m=f[1],y=N(Object(r.useState)(null),2),O=y[0],j=y[1];return"inline"===o?Object(r.createElement)(P,{value:d,onChange:p}):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(e){e.preventDefault(),m(!0),j(null)}},Object(c.__)("Add/Edit Conditions","blc")),Object(r.createElement)(a.Overlay,{items:b,className:"ct-admin-modal ct-builder-conditions-modal",onDismiss:function(){m(!1),j(null)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("h2",null,l),Object(r.createElement)("p",null,s),Object(r.createElement)("div",{className:"ct-modal-scroll"},Object(r.createElement)(P,{value:O||d,onChange:function(e){j(e)}})),Object(r.createElement)("div",{className:"ct-modal-actions has-divider"},Object(r.createElement)("button",{className:"button-primary",disabled:!O,onClick:function(){p(O),m(!1)}},Object(c.__)("Save Conditions","blc"))))}}))},I=n(7),z=n.n(I);function L(e){return function(e){if(Array.isArray(e))return M(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||F(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 R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,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)||F(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 F(e,t){if(e){if("string"==typeof e)return M(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)?M(e,t):void 0}}function M(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 U=function(){var e=R(Object(r.useState)(null),2),t=e[0],n=e[1],o=R(Object(r.useState)(null),2),i=o[0],u=o[1],s=R(Object(r.useState)(!1),2),d=s[0],p=s[1],f=R(Object(r.useState)(!1),2),b=f[0],m=f[1],y=R(Object(r.useState)(["options"]),2),O=y[0],j=y[1],h=Object(r.useRef)(),v=Object(r.useRef)();return Object(r.useEffect)((function(){var e=function(e){e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="copy",p(!0)},t=function(e){e.stopPropagation(),e.preventDefault(),p(!1)},r=function(e){e.stopPropagation(),e.preventDefault(),p(!1);var t=Array.from(e.dataTransfer.files||[]);if(Array.from(e.dataTransfer.items||[]).length>0){var r=e.dataTransfer.items[0].getAsFile();n(r)}else t.length>0&&n(t[0])};return v.current.addEventListener("dragover",e,!1),v.current.addEventListener("dragleave",t,!1),v.current.addEventListener("drop",r,!1),function(){v.current.removeEventListener("dragover",e,!1),v.current.removeEventListener("dragleave",t,!1),v.current.removeEventListener("drop",r,!1)}}),[]),Object(r.createElement)("div",{className:"ct-import-export"},Object(r.createElement)("div",{className:"ct-title","data-type":"simple"},Object(r.createElement)("h3",null,Object(c.__)("Export Options","blc")),Object(r.createElement)("div",{className:"ct-option-description"},Object(c.__)("Click the button below to export the customization settings for this theme.","blc"))),Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),m(!0)}},Object(c.__)("Export Customizations","blc")))),Object(r.createElement)("div",{className:"ct-title","data-type":"simple"},Object(r.createElement)("h3",null,Object(c.__)("Import Options","blc")),Object(r.createElement)("div",{className:"ct-option-description"},Object(c.__)("Upload a file to import customization settings for this theme.","blc"))),Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("div",{className:"ct-file-upload"},Object(r.createElement)("button",{type:"button",className:l()("button ct-upload-button",{active:d}),ref:v,onClick:function(){h.current.click()}},t?t.name:Object(c.__)("Click or drop to upload a file...","blc")),Object(r.createElement)("input",{ref:h,type:"file",onChange:function(e){var t=R(e.target.files,1)[0];n(t)}}),Object(r.createElement)("button",{className:"button",onClick:function(e){if(e.preventDefault(),t){var n=new FileReader;n.readAsText(t,"UTF-8"),n.onload=function(e){var t=new FormData;t.append("action","blocksy_customizer_import"),t.append("nonce",ct_customizer_localizations.customizer_reset_none),t.append("wp_customize","on"),t.append("data",e.target.result);try{fetch(window.ajaxurl,{method:"POST",body:t}).then((function(e){200===e.status&&e.json().then((function(e){e.success,e.data;location.reload()}))}))}catch(e){}}}}},Object(c.__)("Import Customizations","blc"))))),ct_customizer_localizations.has_child_theme&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"ct-title","data-type":"simple"},Object(r.createElement)("h3",null,Object(c.__)("Copy Options","blc")),Object(r.createElement)("div",{className:"ct-option-description"},Object(c.__)("Copy and import your customizations from parent or child theme.","blc"))),ct_customizer_localizations.is_parent_theme&&Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),u("child")}},Object(c.__)("Copy From Child Theme","blc")))),!ct_customizer_localizations.is_parent_theme&&Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),u("parent")}},Object(c.__)("Copy From Parent Theme","blc"))))),Object(r.createElement)(a.Overlay,{items:i,className:"ct-admin-modal ct-import-export-modal",onDismiss:function(){return u(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("svg",{width:"35",height:"35",viewBox:"0 0 66 66"},Object(r.createElement)("path",{d:"M66 33.1c0 2.8-.4 5.5-1.1 8.2 0 0-1.7-.6-1.9-.6 3.4-13.1-2.2-27.4-14.5-34.5C41.3 2 33 .9 25 3.1c-3.5.9-6.7 2.4-9.5 4.4L20 12 6 15 9 1l5 5c3.1-2.2 6.6-3.9 10.5-4.9 2.7-.7 5.4-1.1 8-1.1 5.9-.1 11.7 1.4 17 4.4C60.1 10.5 66 21.7 66 33.1zm-49 6.3l2.4-3c-.3-1.2-.4-2.3-.4-3.4s.1-2.2.4-3.3l-2.4-3 2.5-4.3 3.8.5c1.6-1.6 3.6-2.7 5.8-3.3l1.4-3.6h5l1.4 3.6c2.2.6 4.2 1.8 5.8 3.3l3.8-.5 2.5 4.3-2.4 3c.3 1.1.4 2.2.4 3.3s-.1 2.2-.4 3.3l2.4 3-2.5 4.3-3.8-.5c-1.6 1.6-3.6 2.7-5.8 3.3L35.4 50h-5L29 46.4c-2.2-.6-4.2-1.8-5.8-3.3l-3.8.5-2.4-4.2zm8-6.4c0 4.4 3.6 8 8 8s8-3.6 8-8-3.6-8-8-8-8 3.6-8 8zm25.9 25.3c-3 2.1-6.3 3.7-9.9 4.7-8 2.1-16.4 1-23.5-3.1C5.2 52.8-.4 38.5 3 25.4c-.7-.1-1.3-.3-2-.5-.7 2.7-1 5.3-1 8 0 11.4 5.9 22.5 16.5 28.6 7.6 4.4 16.5 5.6 25 3.3 4-1.1 7.6-2.8 10.8-5.2l4.6 4.6 3-14-14 3 5 5.1z"})),Object(r.createElement)("h2",{className:"ct-modal-title"},!ct_customizer_localizations.is_parent_theme&&Object(c.__)("Copy From Parent Theme","blc"),ct_customizer_localizations.is_parent_theme&&Object(c.__)("Copy From Child Theme","blc")),Object(r.createElement)("p",null,!ct_customizer_localizations.is_parent_theme&&Object(c.__)("You are about to copy all the settings from your parent theme into the child theme. Are you sure you want to continue?","blc"),ct_customizer_localizations.is_parent_theme&&Object(c.__)("You are about to copy all the settings from your child theme into the parent theme. Are you sure you want to continue?","blc")),Object(r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},Object(r.createElement)("button",{onClick:function(e){e.preventDefault(),e.stopPropagation(),u(!1)},className:"button"},Object(c.__)("Cancel","blc")),Object(r.createElement)("button",{className:"button button-primary",onClick:function(e){e.preventDefault();var t=new FormData;t.append("action","blocksy_customizer_copy_options"),t.append("wp_customize","on"),t.append("strategy",i);try{fetch(window.ajaxurl,{method:"POST",body:t}).then((function(e){200===e.status&&e.json().then((function(e){e.success,e.data;location.reload()}))}))}catch(e){}}},Object(c.__)("Yes, I am sure","blc"))))}}),Object(r.createElement)(a.Overlay,{items:b,className:"ct-admin-modal ct-export-modal",onDismiss:function(){return m(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("h2",{className:"ct-modal-title"},Object(c.__)("Export Settings","blc")),Object(r.createElement)("p",null,Object(c.__)("Choose what set of settings you want to export.","blc")),Object(r.createElement)("div",{className:"ct-export-options"},["options","widgets"].map((function(e){return Object(r.createElement)("div",{className:"ct-checkbox-container",onClick:function(){1===O.length&&O[0]===e||j((function(t){return t.includes(e)?t.filter((function(t){return t!==e})):[].concat(L(t),[e])}))}},{options:Object(c.__)("Customizer settings","blc"),widgets:Object(c.__)("Widgets settings","blc")}[e],Object(r.createElement)("span",{className:l()("ct-checkbox",{active:O.includes(e)})},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 "}))))}))),Object(r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},Object(r.createElement)("button",{onClick:function(e){e.preventDefault(),e.stopPropagation(),m(!1)},className:"button"},Object(c.__)("Cancel","blc")),Object(r.createElement)("button",{className:"button button-primary",onClick:function(e){e.preventDefault();var t=new FormData;t.append("action","blocksy_customizer_export"),t.append("strategy",O.join(":")),t.append("wp_customize","on");try{fetch(window.ajaxurl,{method:"POST",body:t}).then((function(e){200===e.status&&e.json().then((function(e){var t=e.success,n=e.data;if(t){var r=new Blob([n.data],{type:"application/octet-stream;charset=utf-8"});z()(r,"blocksy-export.dat"),m(!1)}}))}))}catch(e){}}},Object(c.__)("Export","blc"))))}}))},B=n(5),V=n.n(B),H=n(8),G=n(9),$=n.n(G),q=n(10),J=n.n(q),Y=n(11),W=n.n(Y);function X(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function K(e){return function(e){if(Array.isArray(e))return te(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||ee(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 Q(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 Z(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)||ee(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 ee(e,t){if(e){if("string"==typeof e)return te(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)?te(e,t):void 0}}function te(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 ne=J()(),re=function(e){e.forcedEdit;var t,n,o=e.headerId,i=Z(Object(r.useState)(!1),2),l=i[0],u=i[1],s=Z(Object(r.useState)(null),2),d=s[0],p=s[1],f=Object(r.useContext)(a.PlacementsDragDropContext),b=(f.builderValueCollection,f.builderValueDispatch,Object(r.useRef)()),m=W()(ne),y=$()("".concat(blocksy_admin.ajax_url,"?action=blocksy_header_get_all_conditions"),{method:"POST",formatter:(t=regeneratorRuntime.mark((function e(t){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.json();case 2:if(n=e.sent,r=n.success,o=n.data,r&&o.conditions){e.next=7;break}throw new Error;case 7:return e.abrupt("return",o.conditions);case 8:case"end":return e.stop()}}),e)})),n=function(){var e=this,n=arguments;return new Promise((function(r,o){var c=t.apply(e,n);function a(e){Q(c,r,o,a,i,"next",e)}function i(e){Q(c,r,o,a,i,"throw",e)}a(void 0)}))},function(e){return n.apply(this,arguments)}),depends:[m]}),O=y.data,j=y.isLoading;y.error;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(e){j||(e.preventDefault(),e.stopPropagation(),u(!0))}},Object(c.__)("Add/Edit Conditions","blc")),Object(r.createElement)(a.Overlay,{items:l,initialFocusRef:b,className:"ct-admin-modal ct-builder-conditions-modal",onDismiss:function(){u(!1),p(null)},render:function(){var e;return Object(r.createElement)("div",{className:"ct-modal-content",ref:b},Object(r.createElement)("h2",null,sprintf(Object(c.__)("Display Conditions","blc"))),Object(r.createElement)("p",null,Object(c.__)("Add one or more conditions in order to display your header.","blc")),Object(r.createElement)("div",{className:"ct-modal-scroll"},Object(r.createElement)(a.OptionsPanel,{onChange:function(e,t){p((function(e){return[].concat(K((e||O).filter((function(e){return e.id!==o}))),[{id:o,conditions:t}])}))},options:{conditions:(e={type:"blocksy-display-condition",design:"none",value:[]},X(e,"design","none"),X(e,"label",!1),e)},value:{conditions:((d||O).find((function(e){return e.id===o}))||{conditions:[]}).conditions},hasRevertButton:!1})),Object(r.createElement)("div",{className:"ct-modal-actions has-divider"},Object(r.createElement)("button",{className:"button-primary",disabled:!d,onClick:function(){fetch("".concat(wp.ajax.settings.url,"?action=blocksy_header_update_all_conditions"),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify(d)}).then((function(e){return e.json()})).then((function(){ne(),u(!1)}))}},Object(c.__)("Save Conditions","blc"))))}}))};function oe(){return(oe=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 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 ae(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){ie(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 ie(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var le=function(){ct_customizer_localizations.header_builder_data.secondary_items.header,ct_customizer_localizations.header_builder_data.header;var e=Object(r.useContext)(a.PlacementsDragDropContext),t=e.builderValueDispatch,n=e.builderValue,i=(e.option,e.builderValueCollection),u=e.panelsActions,s=Object(H.applyFilters)("blocksy.header.available-sections",null,i.sections)||i.sections.filter((function(e){var t=e.id;return"type-2"!==t&&"type-3"!==t&&-1===t.indexOf("ct-custom")}));return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("ul",{className:l()("ct-panels-manager")},s.map((function(e){var o=e.name,i=e.id,s=o||{"type-1":Object(c.__)("Global Header","blocksy")}[i]||i,d="builder_header_panel_".concat(i),p=ct_customizer_localizations.header_builder_data.header_data.header_options,f={label:s,"inner-options":ae(ae({},i.indexOf("ct-custom")>-1?{conditions_button:{label:Object(c.__)("Edit Conditions","blc"),type:"jsx",design:"block",render:function(){return Object(r.createElement)(re,{headerId:i})}},divider:{type:"ct-divider"}}:{}),p)};return Object(r.createElement)(a.PanelMetaWrapper,oe({id:d,key:i,option:f},u,{getActualOption:function(e){var o=e.open;return Object(r.createElement)(r.Fragment,null,i===n.id&&Object(r.createElement)(a.Panel,{id:d,getValues:function(){return ae({id:i},n.settings||{})},option:f,onChangeFor:function(e,r){t({type:"BUILDER_GLOBAL_SETTING_ON_CHANGE",payload:{optionId:e,optionValue:r,values:Object(a.getValueFromInput)(p,Array.isArray(n.settings)?{}:n.settings||{})}})},view:"simple"}),Object(r.createElement)("li",{className:l()({active:i===n.id,"ct-global":"type-1"===i}),onClick:function(){i===n.id?o():t({type:"PICK_BUILDER_SECTION",payload:{id:i}})}},Object(r.createElement)("span",{className:"ct-panel-name"},s),i.indexOf("ct-custom")>-1&&i!==n.id&&Object(r.createElement)("span",{className:"ct-remove-instance",onClick:function(e){e.preventDefault(),e.stopPropagation(),t({type:"REMOVE_BUILDER_SECTION",payload:{id:i}})}},Object(r.createElement)("i",{className:"ct-tooltip-top"},Object(c.__)("Remove header","blc")),Object(r.createElement)("svg",{width:"11px",height:"11px",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M9.6,0l0,1.2H1.2v2.4h21.6V1.2h-8.4l0-1.2H9.6z M2.8,6l1.8,15.9C4.8,23.1,5.9,24,7.1,24h9.9c1.2,0,2.2-0.9,2.4-2.1L21.2,6H2.8z"})))))}}))}))),Object(r.createElement)(o.Slot,{name:"PlacementsBuilderPanelsManagerAfter"},(function(e){return 0===e.length?null:e})))};V.a.on("blocksy:options:before-option",(function(e){if(e.option&&"ct-header-builder"===e.option.type){var t=e.content;e.content=Object(r.createElement)(r.Fragment,null,t,Object(r.createElement)(o.Fill,{name:"PlacementsBuilderPanelsManager"},Object(r.createElement)(le,null)))}})),V.a.on("blocksy:options:register",(function(e){e["blocksy-display-condition"]=D,e["blocksy-customizer-options-manager"]=U}))}]);
|
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.wp.components},function(e,t){e.exports=window.ctEvents},function(e,t){e.exports=window.React},function(e,t,n){(function(t){function n(e){return(n="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)}var r="object"===("undefined"==typeof window?"undefined":n(window))&&window.window===window?window:"object"===("undefined"==typeof self?"undefined":n(self))&&self.self===self?self:"object"===(void 0===t?"undefined":n(t))&&t.global===t?t:this;function o(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){i(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function c(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return t.status>=200&&t.status<=299}function a(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 i="object"!==("undefined"==typeof window?"undefined":n(window))||window!==r?function(){}:"download"in HTMLAnchorElement.prototype?function(e,t,n){var i=r.URL||r.webkitURL,l=document.createElement("a");t=t||e.name||"download",l.download=t,l.rel="noopener","string"==typeof e?(l.href=e,l.origin!==location.origin?c(l.href)?o(e,t,n):a(l,l.target="_blank"):a(l)):(l.href=i.createObjectURL(e),setTimeout((function(){i.revokeObjectURL(l.href)}),4e4),setTimeout((function(){a(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,t,r){if(t=t||e.name||"download","string"==typeof e)if(c(e))o(e,t,r);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout((function(){a(i)}))}else navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!==n(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([String.fromCharCode(65279),e],{type:e.type}):e}(e,r),t)}:function(e,t,c,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof e)return o(e,t,c);var i="application/octet-stream"===e.type,l=/constructor/i.test(r.HTMLElement)||r.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||i&&l)&&"object"===("undefined"==typeof FileReader?"undefined":n(FileReader))){var s=new FileReader;s.onloadend=function(){var e=s.result;e=u?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=e:location=e,a=null},s.readAsDataURL(e)}else{var d=r.URL||r.webkitURL,f=d.createObjectURL(e);a?a.location=f:location.href=f,a=null,setTimeout((function(){d.revokeObjectURL(f)}),4e4)}};e.exports=i}).call(this,n(12))},function(e,t){e.exports=window.wp.hooks},function(e,t,n){var r=n(13);function o(e,t,n,r,c){var a=new Error(n,r,c);return a.name="UseFetchError",a.status=e,a.statusText=t,Object.setPrototypeOf(a,Object.getPrototypeOf(this)),Error.captureStackTrace&&Error.captureStackTrace(a,o),a}o.prototype=Object.create(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(o,Error),e.exports=function(e,t,n){var c=(n&&n.depends||t&&t.depends||[]).reduce((function(e,t){return e||!t}),!1);return r(!c&&function(e,t,n){return fetch(e,t).then(n&&n.formatter||t&&t.formatter||function(e){if(!e.ok)throw new o(e.status,e.statusText,"Fetch error");return e.json()})},e,t||{},n||{})}},function(e,t,n){var r=n(15);e.exports=function(){var e=function(){e.id=r(),e.subscribers.forEach((function(e){e()}))};return e.id=r(),e.subscribers=[],e.subscribe=function(t){e.subscribers.push(t)},e.unsubscribe=function(t){e.subscribers.indexOf(t)>=0&&e.subscribers.splice(e.subscribers.indexOf(t),1)},e}},function(e,t,n){var r=n(6);e.exports=function(e){var t=r.useState(e.id),n=function(){return t[1](e.id)};return r.useEffect((function(){return e.subscribe(n),function(){return e.unsubscribe(n)}}),[]),t[0]}},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){var r=n(6),o=n(14);e.exports=function(e){var t=Array.prototype.slice.call(arguments,[1]),n=r.useState({isLoading:!!e});return r.useEffect((function(){e&&(!n[0].isLoading&&n[1]({data:n[0].data,isLoading:!0}),e.apply(null,t).then((function(e){n[1]({data:e,isLoading:!1})})).catch((function(e){n[1]({error:e,isLoading:!1})})))}),o(t)),n[0]}},function(e,t){e.exports=function e(){for(var t=[],n=0;n<arguments.length;n++){var r=arguments[n];if(r instanceof Array)for(var o=0;o<r.length;o++)t=t.concat(e(r[o]));else if("undefined"!=typeof URL&&r instanceof URL)t=t.concat(r.toJSON());else if(r instanceof Object)for(var c=Object.keys(r),a=0;a<c.length;a++){var i=c[a];t=t.concat([i]).concat(e(r[i]))}else t=t.concat(r)}return t}},function(e,t,n){for(var r=self.crypto||self.msCrypto,o="-_",c=36;c--;)o+=c.toString(36);for(c=36;c---10;)o+=c.toString(36).toUpperCase();e.exports=function(e){var t="",n=r.getRandomValues(new Uint8Array(e||21));for(c=e||21;c--;)t+=o[63&n[c]];return t}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(1),a=n(2),i=n(3),l=n.n(i);function u(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||b(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 s(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 d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(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)||b(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){if(e){if("string"==typeof e)return m(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)?m(e,t):void 0}}function m(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=function(e){return e.filter((function(e,t,n){return n.findIndex((function(t){return t.ID===e.ID}))===t}))},O=[],j=function(e){var t=e.condition,n=e.onChange,o=p(Object(r.useState)(O),2),i=o[0],l=o[1],s=Object(r.useMemo)((function(){return{post_ids:"post",page_ids:"page",custom_post_type_ids:"ct_cpt"}[t.rule]}),[t.rule]),f=Object(r.useMemo)((function(){return(t.payload||{}).post_id||""}),[t.payload&&t.payload.post_id]),b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";fetch("".concat(wp.ajax.settings.url,"?action=blocksy_conditions_get_all_posts"),{headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(d(d({post_type:s},e?{search_query:e}:{}),f?{alsoInclude:f}:{})),method:"POST"}).then((function(e){return e.json()})).then((function(e){var t=e.data.posts;l((function(e){return y([].concat(u(e),u(t)))})),O=y([].concat(u(O),u(t)))}))};return Object(r.useEffect)((function(){b()}),[s]),Object(r.createElement)(a.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,searchPlaceholder:Object(c.__)("Type to search by ID or title...","blc"),placeholder:"post_ids"===t.rule?Object(c.__)("Select post","blc"):"page_ids"===t.rule?Object(c.__)("Select page","blc"):Object(c.__)("Custom Post Type ID","blc"),choices:i.filter((function(e){var t=e.post_type;return"ct_cpt"===s?"post"!==t&&"page"!==t:s===t})).map((function(e){return{key:e.ID,value:e.post_title}})),search:!0},value:f,onChange:function(e){return n(e)},onInputValueChange:function(e){i.find((function(t){return t.post_title===e}))||b(e)}})};function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,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)||S(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){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}function _(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 g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){E(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||S(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 S(e,t){if(e){if("string"==typeof e)return x(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)?x(e,t):void 0}}function x(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 C=[],k=[],A=[],N=function(e){var t=e.value,n=e.onChange,o=blocksy_admin.all_condition_rules.reduce((function(e,t){var n=t.rules,r=t.title;return[].concat(w(e),w(n.map((function(e){return g(g({},e),{},{group:r})}))))}),[]).reduce((function(e,t){var n=t.title,r=t.id,o=v(t,["title","id"]);return[].concat(w(e),[g({key:r,value:n},o)])}),[]),i=h(Object(r.useState)(C),2),u=(i[0],i[1],h(Object(r.useState)(k),2)),s=u[0],d=u[1],f=h(Object(r.useState)(A),2),p=f[0],b=f[1],m=function(e){return"post_ids"===e.rule||"page_ids"===e.rule||"custom_post_type_ids"===e.rule||"taxonomy_ids"===e.rule||"post_with_taxonomy_ids"===e.rule||"current_language"===e.rule};return Object(r.useEffect)((function(){fetch("".concat(wp.ajax.settings.url,"?action=blocksy_conditions_get_all_taxonomies"),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"}).then((function(e){return e.json()})).then((function(e){var t=e.data,n=t.taxonomies,r=t.languages;d(n),k=n,b(r),A=r}))}),[]),Object(r.createElement)("div",{className:"ct-display-conditions"},t.map((function(e,i){return Object(r.createElement)("div",{className:l()("ct-condition-group",{"ct-cols-3":m(e),"ct-cols-2":!m(e)}),key:i},Object(r.createElement)(a.Select,{key:"first",option:{inputClassName:"ct-condition-type",selectInputStart:function(){return Object(r.createElement)("span",{className:"ct-".concat(e.type)})},placeholder:Object(c.__)("Select variation","blc"),choices:{include:Object(c.__)("Include","blc"),exclude:Object(c.__)("Exclude","blc")}},value:e.type,onChange:function(r){n(t.map((function(t,n){return g({},n===i?g(g({},e),{},{type:r}):t)})))}}),Object(r.createElement)(a.Select,{key:"second",option:{appendToBody:!0,placeholder:Object(c.__)("Select rule","blc"),choices:"user"===e.category?o.filter((function(e){return 0===e.key.indexOf("user_")})):o.filter((function(e){return-1===e.key.indexOf("user_")})),search:!0},value:e.rule,onChange:function(r){n(t.map((function(t,n){return g({},n===i?g(g({},e),{},{rule:r}):t)})))}}),("post_ids"===e.rule||"custom_post_type_ids"===e.rule||"page_ids"===e.rule)&&Object(r.createElement)(j,{condition:e,onChange:function(r){n(t.map((function(t,n){return g({},n===i?g(g({},e),{},{payload:g(g({},e.payload),{},{post_id:r})}):t)})))}}),("taxonomy_ids"===e.rule||"post_with_taxonomy_ids"===e.rule)&&Object(r.createElement)(a.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,placeholder:Object(c.__)("Select taxonomy","blc"),choices:s.map((function(e){return g({key:e.id,value:e.name},e.group?{group:e.group}:{})})),search:!0},value:(e.payload||{}).taxonomy_id||"",onChange:function(r){n(t.map((function(t,n){return g({},n===i?g(g({},e),{},{payload:g(g({},e.payload),{},{taxonomy_id:r})}):t)})))}}),"current_language"===e.rule&&Object(r.createElement)(a.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,placeholder:Object(c.__)("Select language","blc"),choices:p.map((function(e){return{key:e.id,value:e.name}})),search:!0},value:(e.payload||{}).language||"",onChange:function(r){n(t.map((function(t,n){return g({},n===i?g(g({},e),{},{payload:g(g({},e.payload),{},{language:r})}):t)})))}}),Object(r.createElement)("button",{type:"button",onClick:function(e){e.preventDefault();var r=w(t);r.splice(i,1),n(r)}},"×"))})),Object(r.createElement)("div",{className:"ct-conditions-actions"},Object(r.createElement)("button",{type:"button",className:"button add-condition",onClick:function(e){e.preventDefault(),n([].concat(w(t),[{type:"include",rule:"everywhere",payload:{}}]))}},Object(c.__)("Add Display Condition","blc")),Object(r.createElement)("button",{type:"button",className:"button add-condition",onClick:function(e){e.preventDefault(),n([].concat(w(t),[{type:"include",rule:"user_logged_in",payload:{},category:"user"}]))}},Object(c.__)("Add User Condition","blc"))))};function P(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 D(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 D(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 D(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=e.option,n=t.display,o=void 0===n?"inline":n,i=t.modalTitle,l=void 0===i?Object(c.__)("Transparent Header Display Conditions","blc"):i,u=t.modalDescription,s=void 0===u?Object(c.__)("Add one or more conditions to display the transparent header.","blc"):u,d=e.value,f=e.onChange,p=P(Object(r.useState)(!1),2),b=p[0],m=p[1],y=P(Object(r.useState)(null),2),O=y[0],j=y[1];return"inline"===o?Object(r.createElement)(N,{value:d,onChange:f}):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(e){e.preventDefault(),m(!0),j(null)}},Object(c.__)("Add/Edit Conditions","blc")),Object(r.createElement)(a.Overlay,{items:b,className:"ct-admin-modal ct-builder-conditions-modal",onDismiss:function(){m(!1),j(null)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("h2",null,l),Object(r.createElement)("p",null,s),Object(r.createElement)("div",{className:"ct-modal-scroll"},Object(r.createElement)(N,{value:O||d,onChange:function(e){j(e)}})),Object(r.createElement)("div",{className:"ct-modal-actions has-divider"},Object(r.createElement)("button",{className:"button-primary",disabled:!O,onClick:function(){f(O),m(!1)}},Object(c.__)("Save Conditions","blc"))))}}))},I=n(7),z=n.n(I);function L(e){return function(e){if(Array.isArray(e))return M(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||F(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 R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,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)||F(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 F(e,t){if(e){if("string"==typeof e)return M(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)?M(e,t):void 0}}function M(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 U=function(){var e=R(Object(r.useState)(null),2),t=e[0],n=e[1],o=R(Object(r.useState)(null),2),i=o[0],u=o[1],s=R(Object(r.useState)(!1),2),d=s[0],f=s[1],p=R(Object(r.useState)(!1),2),b=p[0],m=p[1],y=R(Object(r.useState)(["options"]),2),O=y[0],j=y[1],h=Object(r.useRef)(),v=Object(r.useRef)();return Object(r.useEffect)((function(){var e=function(e){e.stopPropagation(),e.preventDefault(),e.dataTransfer.dropEffect="copy",f(!0)},t=function(e){e.stopPropagation(),e.preventDefault(),f(!1)},r=function(e){e.stopPropagation(),e.preventDefault(),f(!1);var t=Array.from(e.dataTransfer.files||[]);if(Array.from(e.dataTransfer.items||[]).length>0){var r=e.dataTransfer.items[0].getAsFile();n(r)}else t.length>0&&n(t[0])};return v.current.addEventListener("dragover",e,!1),v.current.addEventListener("dragleave",t,!1),v.current.addEventListener("drop",r,!1),function(){v.current.removeEventListener("dragover",e,!1),v.current.removeEventListener("dragleave",t,!1),v.current.removeEventListener("drop",r,!1)}}),[]),Object(r.createElement)("div",{className:"ct-import-export"},Object(r.createElement)("div",{className:"ct-title","data-type":"simple"},Object(r.createElement)("h3",null,Object(c.__)("Export Options","blc")),Object(r.createElement)("div",{className:"ct-option-description"},Object(c.__)("Click the button below to export the customization settings for this theme.","blc"))),Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),m(!0)}},Object(c.__)("Export Customizations","blc")))),Object(r.createElement)("div",{className:"ct-title","data-type":"simple"},Object(r.createElement)("h3",null,Object(c.__)("Import Options","blc")),Object(r.createElement)("div",{className:"ct-option-description"},Object(c.__)("Upload a file to import customization settings for this theme.","blc"))),Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("div",{className:"ct-file-upload"},Object(r.createElement)("button",{type:"button",className:l()("button ct-upload-button",{active:d}),ref:v,onClick:function(){h.current.click()}},t?t.name:Object(c.__)("Click or drop to upload a file...","blc")),Object(r.createElement)("input",{ref:h,type:"file",onChange:function(e){var t=R(e.target.files,1)[0];n(t)}}),Object(r.createElement)("button",{className:"button",onClick:function(e){if(e.preventDefault(),t){var n=new FileReader;n.readAsText(t,"UTF-8"),n.onload=function(e){var t=new FormData;t.append("action","blocksy_customizer_import"),t.append("nonce",ct_customizer_localizations.customizer_reset_none),t.append("wp_customize","on"),t.append("data",e.target.result);try{fetch(window.ajaxurl,{method:"POST",body:t}).then((function(e){200===e.status&&e.json().then((function(e){e.success,e.data;location.reload()}))}))}catch(e){}}}}},Object(c.__)("Import Customizations","blc"))))),ct_customizer_localizations.has_child_theme&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("div",{className:"ct-title","data-type":"simple"},Object(r.createElement)("h3",null,Object(c.__)("Copy Options","blc")),Object(r.createElement)("div",{className:"ct-option-description"},Object(c.__)("Copy and import your customizations from parent or child theme.","blc"))),ct_customizer_localizations.is_parent_theme&&Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),u("child")}},Object(c.__)("Copy From Child Theme","blc")))),!ct_customizer_localizations.is_parent_theme&&Object(r.createElement)("div",{className:"ct-control","data-design":"block"},Object(r.createElement)("header",null),Object(r.createElement)("section",null,Object(r.createElement)("button",{className:"button",onClick:function(e){e.preventDefault(),u("parent")}},Object(c.__)("Copy From Parent Theme","blc"))))),Object(r.createElement)(a.Overlay,{items:i,className:"ct-admin-modal ct-import-export-modal",onDismiss:function(){return u(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("svg",{width:"35",height:"35",viewBox:"0 0 66 66"},Object(r.createElement)("path",{d:"M66 33.1c0 2.8-.4 5.5-1.1 8.2 0 0-1.7-.6-1.9-.6 3.4-13.1-2.2-27.4-14.5-34.5C41.3 2 33 .9 25 3.1c-3.5.9-6.7 2.4-9.5 4.4L20 12 6 15 9 1l5 5c3.1-2.2 6.6-3.9 10.5-4.9 2.7-.7 5.4-1.1 8-1.1 5.9-.1 11.7 1.4 17 4.4C60.1 10.5 66 21.7 66 33.1zm-49 6.3l2.4-3c-.3-1.2-.4-2.3-.4-3.4s.1-2.2.4-3.3l-2.4-3 2.5-4.3 3.8.5c1.6-1.6 3.6-2.7 5.8-3.3l1.4-3.6h5l1.4 3.6c2.2.6 4.2 1.8 5.8 3.3l3.8-.5 2.5 4.3-2.4 3c.3 1.1.4 2.2.4 3.3s-.1 2.2-.4 3.3l2.4 3-2.5 4.3-3.8-.5c-1.6 1.6-3.6 2.7-5.8 3.3L35.4 50h-5L29 46.4c-2.2-.6-4.2-1.8-5.8-3.3l-3.8.5-2.4-4.2zm8-6.4c0 4.4 3.6 8 8 8s8-3.6 8-8-3.6-8-8-8-8 3.6-8 8zm25.9 25.3c-3 2.1-6.3 3.7-9.9 4.7-8 2.1-16.4 1-23.5-3.1C5.2 52.8-.4 38.5 3 25.4c-.7-.1-1.3-.3-2-.5-.7 2.7-1 5.3-1 8 0 11.4 5.9 22.5 16.5 28.6 7.6 4.4 16.5 5.6 25 3.3 4-1.1 7.6-2.8 10.8-5.2l4.6 4.6 3-14-14 3 5 5.1z"})),Object(r.createElement)("h2",{className:"ct-modal-title"},!ct_customizer_localizations.is_parent_theme&&Object(c.__)("Copy From Parent Theme","blc"),ct_customizer_localizations.is_parent_theme&&Object(c.__)("Copy From Child Theme","blc")),Object(r.createElement)("p",null,!ct_customizer_localizations.is_parent_theme&&Object(c.__)("You are about to copy all the settings from your parent theme into the child theme. Are you sure you want to continue?","blc"),ct_customizer_localizations.is_parent_theme&&Object(c.__)("You are about to copy all the settings from your child theme into the parent theme. Are you sure you want to continue?","blc")),Object(r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},Object(r.createElement)("button",{onClick:function(e){e.preventDefault(),e.stopPropagation(),u(!1)},className:"button"},Object(c.__)("Cancel","blc")),Object(r.createElement)("button",{className:"button button-primary",onClick:function(e){e.preventDefault();var t=new FormData;t.append("action","blocksy_customizer_copy_options"),t.append("wp_customize","on"),t.append("strategy",i);try{fetch(window.ajaxurl,{method:"POST",body:t}).then((function(e){200===e.status&&e.json().then((function(e){e.success,e.data;location.reload()}))}))}catch(e){}}},Object(c.__)("Yes, I am sure","blc"))))}}),Object(r.createElement)(a.Overlay,{items:b,className:"ct-admin-modal ct-export-modal",onDismiss:function(){return m(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("h2",{className:"ct-modal-title"},Object(c.__)("Export Settings","blc")),Object(r.createElement)("p",null,Object(c.__)("Choose what set of settings you want to export.","blc")),Object(r.createElement)("div",{className:"ct-export-options"},["options","widgets"].map((function(e){return Object(r.createElement)("div",{className:"ct-checkbox-container",onClick:function(){1===O.length&&O[0]===e||j((function(t){return t.includes(e)?t.filter((function(t){return t!==e})):[].concat(L(t),[e])}))}},{options:Object(c.__)("Customizer settings","blc"),widgets:Object(c.__)("Widgets settings","blc")}[e],Object(r.createElement)("span",{className:l()("ct-checkbox",{active:O.includes(e)})},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 "}))))}))),Object(r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},Object(r.createElement)("button",{onClick:function(e){e.preventDefault(),e.stopPropagation(),m(!1)},className:"button"},Object(c.__)("Cancel","blc")),Object(r.createElement)("button",{className:"button button-primary",onClick:function(e){e.preventDefault();var t=new FormData;t.append("action","blocksy_customizer_export"),t.append("strategy",O.join(":")),t.append("wp_customize","on");try{fetch(window.ajaxurl,{method:"POST",body:t}).then((function(e){200===e.status&&e.json().then((function(e){var t=e.success,n=e.data;if(t){var r=new Blob([n.data],{type:"application/octet-stream;charset=utf-8"});z()(r,"blocksy-export.dat"),m(!1)}}))}))}catch(e){}}},Object(c.__)("Export","blc"))))}}))},B=n(5),H=n.n(B),V=n(8),$=n(9),G=n.n($),Y=n(10),q=n.n(Y),J=n(11),W=n.n(J);function X(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function K(e){return function(e){if(Array.isArray(e))return te(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||ee(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 Q(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 Z(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)||ee(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 ee(e,t){if(e){if("string"==typeof e)return te(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)?te(e,t):void 0}}function te(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 ne=q()(),re=function(e){e.forcedEdit;var t,n,o=e.headerId,i=Z(Object(r.useState)(!1),2),l=i[0],u=i[1],s=Z(Object(r.useState)(null),2),d=s[0],f=s[1],p=Object(r.useContext)(a.PlacementsDragDropContext),b=(p.builderValueCollection,p.builderValueDispatch,Object(r.useRef)()),m=W()(ne),y=G()("".concat(blocksy_admin.ajax_url,"?action=blocksy_header_get_all_conditions"),{method:"POST",formatter:(t=regeneratorRuntime.mark((function e(t){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.json();case 2:if(n=e.sent,r=n.success,o=n.data,r&&o.conditions){e.next=7;break}throw new Error;case 7:return e.abrupt("return",o.conditions);case 8:case"end":return e.stop()}}),e)})),n=function(){var e=this,n=arguments;return new Promise((function(r,o){var c=t.apply(e,n);function a(e){Q(c,r,o,a,i,"next",e)}function i(e){Q(c,r,o,a,i,"throw",e)}a(void 0)}))},function(e){return n.apply(this,arguments)}),depends:[m]}),O=y.data,j=y.isLoading;y.error;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(e){j||(e.preventDefault(),e.stopPropagation(),u(!0))}},Object(c.__)("Add/Edit Conditions","blc")),Object(r.createElement)(a.Overlay,{items:l,initialFocusRef:b,className:"ct-admin-modal ct-builder-conditions-modal",onDismiss:function(){u(!1),f(null)},render:function(){var e;return Object(r.createElement)("div",{className:"ct-modal-content",ref:b},Object(r.createElement)("h2",null,sprintf(Object(c.__)("Display Conditions","blc"))),Object(r.createElement)("p",null,Object(c.__)("Add one or more conditions in order to display your header.","blc")),Object(r.createElement)("div",{className:"ct-modal-scroll"},Object(r.createElement)(a.OptionsPanel,{onChange:function(e,t){f((function(e){return[].concat(K((e||O).filter((function(e){return e.id!==o}))),[{id:o,conditions:t}])}))},options:{conditions:(e={type:"blocksy-display-condition",design:"none",value:[]},X(e,"design","none"),X(e,"label",!1),e)},value:{conditions:((d||O).find((function(e){return e.id===o}))||{conditions:[]}).conditions},hasRevertButton:!1})),Object(r.createElement)("div",{className:"ct-modal-actions has-divider"},Object(r.createElement)("button",{className:"button-primary",disabled:!d,onClick:function(){fetch("".concat(wp.ajax.settings.url,"?action=blocksy_header_update_all_conditions"),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify(d)}).then((function(e){return e.json()})).then((function(){ne(),u(!1)}))}},Object(c.__)("Save Conditions","blc"))))}}))};function oe(){return(oe=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 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 ae(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){ie(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 ie(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function le(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 se=function(){var e=le(Object(r.useState)(!1),2),t=e[0],n=e[1],i=(ct_customizer_localizations.header_builder_data.secondary_items.header,ct_customizer_localizations.header_builder_data.header,Object(r.useContext)(a.PlacementsDragDropContext)),u=i.builderValueDispatch,s=i.builderValue,d=(i.option,i.builderValueCollection),f=i.panelsActions,p=Object(V.applyFilters)("blocksy.header.available-sections",null,d.sections)||d.sections.filter((function(e){var t=e.id;return"type-2"!==t&&"type-3"!==t&&-1===t.indexOf("ct-custom")}));return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("ul",{className:l()("ct-panels-manager")},p.map((function(e){var t=e.name,o=e.id,i=t||{"type-1":Object(c.__)("Global Header","blocksy")}[o]||o,d="builder_header_panel_".concat(o),p=ct_customizer_localizations.header_builder_data.header_data.header_options,b={label:i,"inner-options":ae(ae({},o.indexOf("ct-custom")>-1?{conditions_button:{label:Object(c.__)("Edit Conditions","blc"),type:"jsx",design:"block",render:function(){return Object(r.createElement)(re,{headerId:o})}},divider:{type:"ct-divider"}}:{}),p)};return Object(r.createElement)(a.PanelMetaWrapper,oe({id:d,key:o,option:b},f,{getActualOption:function(e){var t=e.open;return Object(r.createElement)(r.Fragment,null,o===s.id&&Object(r.createElement)(a.Panel,{id:d,getValues:function(){return ae({id:o},s.settings||{})},option:b,onChangeFor:function(e,t){u({type:"BUILDER_GLOBAL_SETTING_ON_CHANGE",payload:{optionId:e,optionValue:t,values:Object(a.getValueFromInput)(p,Array.isArray(s.settings)?{}:s.settings||{})}})},view:"simple"}),Object(r.createElement)("li",{className:l()({active:o===s.id,"ct-global":"type-1"===o}),onClick:function(){o===s.id?t():u({type:"PICK_BUILDER_SECTION",payload:{id:o}})}},Object(r.createElement)("span",{className:"ct-panel-name"},i),o.indexOf("ct-custom")>-1&&o!==s.id&&Object(r.createElement)("span",{className:"ct-remove-instance",onClick:function(e){e.preventDefault(),e.stopPropagation(),n(o)}},Object(r.createElement)("i",{className:"ct-tooltip-top"},Object(c.__)("Remove header","blc")),Object(r.createElement)("svg",{width:"11px",height:"11px",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M9.6,0l0,1.2H1.2v2.4h21.6V1.2h-8.4l0-1.2H9.6z M2.8,6l1.8,15.9C4.8,23.1,5.9,24,7.1,24h9.9c1.2,0,2.2-0.9,2.4-2.1L21.2,6H2.8z"})))))}}))}))),Object(r.createElement)(o.Slot,{name:"PlacementsBuilderPanelsManagerAfter"},(function(e){return 0===e.length?null:e})),Object(r.createElement)(a.Overlay,{items:t,className:"ct-admin-modal ct-reset-options",onDismiss:function(){return n(!1)},render:function(){return Object(r.createElement)("div",{className:"ct-modal-content"},Object(r.createElement)("h2",{className:"ct-modal-title"},Object(c.__)("Remove Header","blc")),Object(r.createElement)("p",null,Object(c.__)("You are about to remove a custom header, are you sure you want to continue?","blc")),Object(r.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},Object(r.createElement)("button",{onClick:function(e){e.preventDefault(),e.stopPropagation(),n(!1)},className:"button"},Object(c.__)("Cancel","blc")),Object(r.createElement)("button",{className:"button button-primary",onClick:function(e){e.preventDefault(),u({type:"REMOVE_BUILDER_SECTION",payload:{id:t}}),n(!1)}},Object(c.__)("Confirm","blc"))))}}))};H.a.on("blocksy:options:before-option",(function(e){if(e.option&&"ct-header-builder"===e.option.type){var t=e.content;e.content=Object(r.createElement)(r.Fragment,null,t,Object(r.createElement)(o.Fill,{name:"PlacementsBuilderPanelsManager"},Object(r.createElement)(se,null)))}})),H.a.on("blocksy:options:register",(function(e){e["blocksy-display-condition"]=T,e["blocksy-customizer-options-manager"]=U}))}]);
|
static/bundle/options.min.css
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
/**
|
2 |
-
* - v1.8.
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
6 |
*/
|
7 |
|
8 |
-
.ct-condition-location{display:grid;grid-template-columns:1fr 100px;grid-column-gap:10px;padding-bottom:20px;border-bottom:1px dashed rgba(0,0,0,0.1);--x-select-dropdown-width: calc(100% + 110px)}.ct-new-condition-location{--options-vertical-spacing: 20px;padding:var(--options-horizontal-spacing, 0 14px)}.ct-new-condition-location .ct-new-location{--options-horizontal-spacing: 0}.ct-new-condition-location .ct-new-location .ct-control{padding-bottom:20px;border-bottom:1px dashed rgba(0,0,0,0.1)}.ct-new-condition-location .ct-new-location button{right:-24px;width:24px}.ct-new-condition-location .button{width:100%;margin-top:20px}.ct-control[data-location]{--options-vertical-spacing: 20px}.ct-control[data-location][data-design="inline"] input{text-align:center;--width: 100px}.ct-control[data-location]:after{border-bottom-style:dashed}.ct-display-conditions{padding:30px 0;margin:10px 0 0 0;border-top:1px dashed rgba(0,0,0,0.1)}.ct-condition-group{display:grid;grid-template-columns:var(--grid-template-columns);grid-column-gap:10px;grid-row-gap:10px;padding-bottom:20px;margin-bottom:20px;border-bottom:1px dashed rgba(0,0,0,0.1)}.ct-condition-group.ct-cols-2{--grid-template-columns: 110px 1fr}.ct-condition-group.ct-cols-2 .ct-select-input:nth-child(2):before{content:'ref-width'}.ct-condition-group.ct-cols-3{--grid-template-columns: 110px 1fr 1fr}.ct-condition-group.ct-cols-3 .ct-select-input:nth-child(2):before{content:'ref-width:right'}.ct-condition-group.ct-cols-3 .ct-select-input:nth-child(3):before{content:'ref-width:left'}.ct-condition-group .ct-select-dropdown{box-shadow:0 10px 15px rgba(0,0,0,0.08),0px 0px 0px 1px rgba(221,221,221,0.5)}.ct-condition-type span{position:absolute;top:6px;left:6px;display:flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:3px;background:#eee}.ct-condition-type span:before,.ct-condition-type span:after{position:absolute;content:'';width:6px;height:1px;background:currentColor}.ct-condition-type .ct-include:after{transform:rotate(90deg)}.ct-condition-type .ct-exclude:after{display:none}.ct-condition-type input{--padding: 0 0 0 30px}.ct-new-location,.ct-condition-group{position:relative}.ct-new-location button,.ct-condition-group button{position:absolute;top:0;right:-30px;font-size:18px;line-height:18px;width:30px;height:30px;padding:0;border:none;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0.5;background:transparent}.ct-new-location button:focus,.ct-condition-group button:focus{outline:none}.ct-new-location button:hover,.ct-condition-group button:hover{opacity:1;color:#a00}.ct-conditions-actions{display:grid;grid-template-columns:repeat(2, 1fr);grid-column-gap:15px}.blocksy-code-editor-trigger{display:inline-flex;align-items:center;margin:0 8px}.ct-checkbox-container{--checkMarkColor: #fff;--background: rgba(179, 189, 201, 0.8);--backgroundActive: var(--accentColor);display:flex;align-items:center;justify-content:space-between;padding:10px 0;transition:color 0.15s ease}.ct-checkbox-container:not(.activated){cursor:pointer}.ct-checkbox-container:not(.activated):hover{color:#0e8ecc}.ct-checkbox-container:not(.activated):hover .ct-checkbox:not(.active){--background: var(--backgroundActive)}.ct-checkbox-container.activated{--checkMarkColor: rgba(104, 124, 147, 0.6);--backgroundActive: rgba(179, 189, 201, 0.3)}.ct-checkbox{display:inline-flex;align-items:center;justify-content:center;position:relative;width:18px;height:18px;flex:0 0 18px}.ct-checkbox:before{position:absolute;z-index:1;content:'';width:18px;height:18px;margin:auto;border-radius:100%;box-shadow:inset 0px 0px 0px 2px var(--background);transition:all 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955)}.ct-checkbox svg{position:relative;z-index:2}.ct-checkbox.active:before{width:22px;height:22px;box-shadow:inset 0px 0px 0px 12px var(--backgroundActive)}.ct-checkbox .check{fill:none;stroke:var(--checkMarkColor);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:15;stroke-dashoffset:16;transition:stroke 0.4s cubic-bezier(0.455, 0.03, 0.515, 0.955),stroke-dashoffset 0.4s cubic-bezier(0.455, 0.03, 0.515, 0.955)}.ct-checkbox.active .check{stroke-dashoffset:0}.ct-import-export input[type="file"]{display:none}.ct-import-export .button{width:100%}.ct-import-export .button:not(:last-child){margin-bottom:20px}.toplevel_page_ct-dashboard .wp-menu-image img{max-width:18px;height:auto}.toplevel_page_ct-dashboard a[href*='ct-dashboard-pricing']{display:none !important}[data-slug='blocksy-companion'] .upgrade{display:none}.fs-field-beta_program{display:none}
|
1 |
/**
|
2 |
+
* - v1.8.7
|
3 |
*
|
4 |
* Copyright (c) 2021
|
5 |
* Licensed GPLv2+
|
6 |
*/
|
7 |
|
8 |
+
.ct-condition-location{display:grid;grid-template-columns:1fr 100px;grid-column-gap:10px;padding-bottom:20px;border-bottom:1px dashed rgba(0,0,0,0.1);--x-select-dropdown-width: calc(100% + 110px)}.ct-new-condition-location{--options-vertical-spacing: 20px;padding:var(--options-horizontal-spacing, 0 14px)}.ct-new-condition-location .ct-new-location{--options-horizontal-spacing: 0}.ct-new-condition-location .ct-new-location .ct-control{padding-bottom:20px;border-bottom:1px dashed rgba(0,0,0,0.1)}.ct-new-condition-location .ct-new-location button{right:-24px;width:24px}.ct-new-condition-location .button{width:100%;margin-top:20px}.ct-control[data-location]{--options-vertical-spacing: 20px}.ct-control[data-location][data-design="inline"] input{text-align:center;--width: 100px}.ct-control[data-location]:after{border-bottom-style:dashed}.ct-display-conditions{padding:30px 0;margin:10px 0 0 0;border-top:1px dashed rgba(0,0,0,0.1)}.ct-condition-group{display:grid;grid-template-columns:var(--grid-template-columns);grid-column-gap:10px;grid-row-gap:10px;padding-bottom:20px;margin-bottom:20px;border-bottom:1px dashed rgba(0,0,0,0.1)}.ct-condition-group.ct-cols-2{--grid-template-columns: 110px 1fr}.ct-condition-group.ct-cols-2 .ct-select-input:nth-child(2):before{content:'ref-width'}.ct-condition-group.ct-cols-3{--grid-template-columns: 110px 1fr 1fr}.ct-condition-group.ct-cols-3 .ct-select-input:nth-child(2):before{content:'ref-width:right'}.ct-condition-group.ct-cols-3 .ct-select-input:nth-child(3):before{content:'ref-width:left'}.ct-condition-group .ct-select-dropdown{box-shadow:0 10px 15px rgba(0,0,0,0.08),0px 0px 0px 1px rgba(221,221,221,0.5)}.ct-condition-type span{position:absolute;top:6px;left:6px;display:flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:3px;background:#eee}.ct-condition-type span:before,.ct-condition-type span:after{position:absolute;content:'';width:6px;height:1px;background:currentColor}.ct-condition-type .ct-include:after{transform:rotate(90deg)}.ct-condition-type .ct-exclude:after{display:none}.ct-condition-type input{--padding: 0 0 0 30px}.ct-new-location,.ct-condition-group{position:relative}.ct-new-location button,.ct-condition-group button{position:absolute;top:0;right:-30px;font-size:18px;line-height:18px;width:30px;height:30px;padding:0;border:none;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0.5;background:transparent}.ct-new-location button:focus,.ct-condition-group button:focus{outline:none}.ct-new-location button:hover,.ct-condition-group button:hover{opacity:1;color:#a00}.ct-conditions-actions{display:grid;grid-template-columns:repeat(2, 1fr);grid-column-gap:15px}.blocksy-code-editor-trigger{display:inline-flex;align-items:center;margin:0 8px}.ct-checkbox-container{--checkMarkColor: #fff;--background: rgba(179, 189, 201, 0.8);--backgroundActive: var(--accentColor);display:flex;align-items:center;justify-content:space-between;padding:10px 0;transition:color 0.15s ease}.ct-checkbox-container:not(.activated){cursor:pointer}.ct-checkbox-container:not(.activated):hover{color:#0e8ecc}.ct-checkbox-container:not(.activated):hover .ct-checkbox:not(.active){--background: var(--backgroundActive)}.ct-checkbox-container.activated{--checkMarkColor: rgba(104, 124, 147, 0.6);--backgroundActive: rgba(179, 189, 201, 0.3)}.ct-checkbox{display:inline-flex;align-items:center;justify-content:center;position:relative;width:18px;height:18px;flex:0 0 18px}.ct-checkbox:before{position:absolute;z-index:1;content:'';width:18px;height:18px;margin:auto;border-radius:100%;box-shadow:inset 0px 0px 0px 2px var(--background);transition:all 0.12s cubic-bezier(0.455, 0.03, 0.515, 0.955)}.ct-checkbox svg{position:relative;z-index:2}.ct-checkbox.active:before{width:22px;height:22px;box-shadow:inset 0px 0px 0px 12px var(--backgroundActive)}.ct-checkbox .check{fill:none;stroke:var(--checkMarkColor);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:15;stroke-dashoffset:16;transition:stroke 0.4s cubic-bezier(0.455, 0.03, 0.515, 0.955),stroke-dashoffset 0.4s cubic-bezier(0.455, 0.03, 0.515, 0.955)}.ct-checkbox.active .check{stroke-dashoffset:0}.ct-import-export input[type="file"]{display:none}.ct-import-export .button{width:100%}.ct-import-export .button:not(:last-child){margin-bottom:20px}.ct-option-position{display:grid;grid-template-columns:repeat(3, 1fr);grid-column-gap:7px;grid-row-gap:7px;margin:0}.ct-option-position li{height:40px;margin:0;cursor:pointer;border:1px solid var(--optionBorderColor);transition:border-color 0.1s ease, background 0.1s ease}.ct-option-position li.active{background:var(--accentColor);border-color:var(--accentColor)}.ct-option-position li:hover{border-color:var(--accentColor)}.ct-option-position li:nth-child(1){border-top-left-radius:4px}.ct-option-position li:nth-child(3){border-top-right-radius:4px}.ct-option-position li:nth-child(7){border-bottom-left-radius:4px}.ct-option-position li:nth-child(9){border-bottom-right-radius:4px}.toplevel_page_ct-dashboard .wp-menu-image img{max-width:18px;height:auto}.toplevel_page_ct-dashboard a[href*='ct-dashboard-pricing']{display:none !important}[data-slug='blocksy-companion'] .upgrade{display:none}.fs-field-beta_program{display:none}
|
static/bundle/sticky.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.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& |