!function(){var e={487:function(e){var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}};e.exports=t},184:function(e,t){var n;
/*!
  Copyright (c) 2017 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)&&n.length){var c=o.apply(null,n);c&&e.push(c)}else if("object"===a)for(var l in n)r.call(n,l)&&n[l]&&e.push(l)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},12:function(e){var t,n;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var n=[],r=0;r<e.length;r+=3)for(var o=e[r]<<16|e[r+1]<<8|e[r+2],a=0;a<4;a++)8*r+6*a<=8*e.length?n.push(t.charAt(o>>>6*(3-a)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],r=0,o=0;r<e.length;o=++r%4)0!=o&&n.push((t.indexOf(e.charAt(r-1))&Math.pow(2,-2*o+8)-1)<<2*o|t.indexOf(e.charAt(r))>>>6-2*o);return n}},e.exports=n},162:function(e,t,n){var r,o,a;o=[],void 0===(a="function"==typeof(r=function(){"use strict";function t(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}function r(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){l(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function o(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}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 c="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,l=c.saveAs||("object"!=typeof window||window!==c?function(){}:"download"in HTMLAnchorElement.prototype?function(e,t,n){var l=c.URL||c.webkitURL,i=document.createElement("a");t=t||e.name||"download",i.download=t,i.rel="noopener","string"==typeof e?(i.href=e,i.origin===location.origin?a(i):o(i.href)?r(e,t,n):a(i,i.target="_blank")):(i.href=l.createObjectURL(e),setTimeout((function(){l.revokeObjectURL(i.href)}),4e4),setTimeout((function(){a(i)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,c){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,c),n);else if(o(e))r(e,n,c);else{var l=document.createElement("a");l.href=e,l.target="_blank",setTimeout((function(){a(l)}))}}:function(e,t,n,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return r(e,t,n);var a="application/octet-stream"===e.type,l=/constructor/i.test(c.HTMLElement)||c.safari,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||a&&l)&&"object"==typeof FileReader){var s=new FileReader;s.onloadend=function(){var e=s.result;e=i?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},s.readAsDataURL(e)}else{var u=c.URL||c.webkitURL,m=u.createObjectURL(e);o?o.location=m:location.href=m,o=null,setTimeout((function(){u.revokeObjectURL(m)}),4e4)}});c.saveAs=l.saveAs=l,e.exports=l})?r.apply(t,o):r)||(e.exports=a)},738:function(e){function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}
/*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */
e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},568:function(e,t,n){var r,o,a,c,l;r=n(12),o=n(487).utf8,a=n(738),c=n(487).bin,(l=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?c.stringToBytes(e):o.stringToBytes(e):a(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var n=r.bytesToWords(e),i=8*e.length,s=1732584193,u=-271733879,m=-1732584194,p=271733878,d=0;d<n.length;d++)n[d]=16711935&(n[d]<<8|n[d]>>>24)|4278255360&(n[d]<<24|n[d]>>>8);n[i>>>5]|=128<<i%32,n[14+(i+64>>>9<<4)]=i;var f=l._ff,b=l._gg,h=l._hh,g=l._ii;for(d=0;d<n.length;d+=16){var y=s,v=u,_=m,E=p;s=f(s,u,m,p,n[d+0],7,-680876936),p=f(p,s,u,m,n[d+1],12,-389564586),m=f(m,p,s,u,n[d+2],17,606105819),u=f(u,m,p,s,n[d+3],22,-1044525330),s=f(s,u,m,p,n[d+4],7,-176418897),p=f(p,s,u,m,n[d+5],12,1200080426),m=f(m,p,s,u,n[d+6],17,-1473231341),u=f(u,m,p,s,n[d+7],22,-45705983),s=f(s,u,m,p,n[d+8],7,1770035416),p=f(p,s,u,m,n[d+9],12,-1958414417),m=f(m,p,s,u,n[d+10],17,-42063),u=f(u,m,p,s,n[d+11],22,-1990404162),s=f(s,u,m,p,n[d+12],7,1804603682),p=f(p,s,u,m,n[d+13],12,-40341101),m=f(m,p,s,u,n[d+14],17,-1502002290),s=b(s,u=f(u,m,p,s,n[d+15],22,1236535329),m,p,n[d+1],5,-165796510),p=b(p,s,u,m,n[d+6],9,-1069501632),m=b(m,p,s,u,n[d+11],14,643717713),u=b(u,m,p,s,n[d+0],20,-373897302),s=b(s,u,m,p,n[d+5],5,-701558691),p=b(p,s,u,m,n[d+10],9,38016083),m=b(m,p,s,u,n[d+15],14,-660478335),u=b(u,m,p,s,n[d+4],20,-405537848),s=b(s,u,m,p,n[d+9],5,568446438),p=b(p,s,u,m,n[d+14],9,-1019803690),m=b(m,p,s,u,n[d+3],14,-187363961),u=b(u,m,p,s,n[d+8],20,1163531501),s=b(s,u,m,p,n[d+13],5,-1444681467),p=b(p,s,u,m,n[d+2],9,-51403784),m=b(m,p,s,u,n[d+7],14,1735328473),s=h(s,u=b(u,m,p,s,n[d+12],20,-1926607734),m,p,n[d+5],4,-378558),p=h(p,s,u,m,n[d+8],11,-2022574463),m=h(m,p,s,u,n[d+11],16,1839030562),u=h(u,m,p,s,n[d+14],23,-35309556),s=h(s,u,m,p,n[d+1],4,-1530992060),p=h(p,s,u,m,n[d+4],11,1272893353),m=h(m,p,s,u,n[d+7],16,-155497632),u=h(u,m,p,s,n[d+10],23,-1094730640),s=h(s,u,m,p,n[d+13],4,681279174),p=h(p,s,u,m,n[d+0],11,-358537222),m=h(m,p,s,u,n[d+3],16,-722521979),u=h(u,m,p,s,n[d+6],23,76029189),s=h(s,u,m,p,n[d+9],4,-640364487),p=h(p,s,u,m,n[d+12],11,-421815835),m=h(m,p,s,u,n[d+15],16,530742520),s=g(s,u=h(u,m,p,s,n[d+2],23,-995338651),m,p,n[d+0],6,-198630844),p=g(p,s,u,m,n[d+7],10,1126891415),m=g(m,p,s,u,n[d+14],15,-1416354905),u=g(u,m,p,s,n[d+5],21,-57434055),s=g(s,u,m,p,n[d+12],6,1700485571),p=g(p,s,u,m,n[d+3],10,-1894986606),m=g(m,p,s,u,n[d+10],15,-1051523),u=g(u,m,p,s,n[d+1],21,-2054922799),s=g(s,u,m,p,n[d+8],6,1873313359),p=g(p,s,u,m,n[d+15],10,-30611744),m=g(m,p,s,u,n[d+6],15,-1560198380),u=g(u,m,p,s,n[d+13],21,1309151649),s=g(s,u,m,p,n[d+4],6,-145523070),p=g(p,s,u,m,n[d+11],10,-1120210379),m=g(m,p,s,u,n[d+2],15,718787259),u=g(u,m,p,s,n[d+9],21,-343485551),s=s+y>>>0,u=u+v>>>0,m=m+_>>>0,p=p+E>>>0}return r.endian([s,u,m,p])})._ff=function(e,t,n,r,o,a,c){var l=e+(t&n|~t&r)+(o>>>0)+c;return(l<<a|l>>>32-a)+t},l._gg=function(e,t,n,r,o,a,c){var l=e+(t&r|n&~r)+(o>>>0)+c;return(l<<a|l>>>32-a)+t},l._hh=function(e,t,n,r,o,a,c){var l=e+(t^n^r)+(o>>>0)+c;return(l<<a|l>>>32-a)+t},l._ii=function(e,t,n,r,o,a,c){var l=e+(n^(t|~r))+(o>>>0)+c;return(l<<a|l>>>32-a)+t},l._blocksize=16,l._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var n=r.wordsToBytes(l(e,t));return t&&t.asBytes?n:t&&t.asString?c.bytesToString(n):r.bytesToHex(n)}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";function e(t){return e="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(t)}function t(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,n||"default");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:n+""}function r(e,n,r){return(n=t(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}var o=window.wp.element,a=window.ctEvents,c=n.n(a),l=window.wp.i18n,i=window.blocksyOptions;const s=async function(){const e=await fetch(`${wp.ajax.settings.url}?action=blocksy_flush_permalinks&nonce=${ctDashboardLocalizations.dashboard_actions_nonce}`,{method:"POST"});if(200!==e.status)return;const{success:t}=await e.json()};const u=function(){const e={};return e.promise=new Promise((function(t,n){e.resolve=t,e.reject=n})),e};var m=n(568),p=n.n(m);function d(e){if(Array.isArray(e))return`[${e.map((function(e){return d(e)})).join(",")}]`;if("object"==typeof e&&null!==e){let t="";const n=Object.keys(e).sort();t+=`{${JSON.stringify(n)}`;for(let r=0;r<n.length;r++)t+=`${d(e[n[r]])},`;return`${t}}`}return`${JSON.stringify(e)}`}const f=function(e){return p()(d(e))};function b(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 h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const g=0,y=1,v=2;let _={cacheKey:{state:g,response:null,payoad:{}}},E={};const w=new class{parseOptions(e){const{fetcherName:t=null}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["fetcherName"]);return{args:{fetcherName:t},inputFetchOptions:n}}fetch(e,t,n){const{args:r}=this.parseOptions(n),o=f(h(h({},t),{},{url:e}));if(_[o]||(_[o]={state:g,response:null,payload:{waitingForResponse:[]}},r.fetcherName&&E[r.fetcherName]&&(E[r.fetcherName].forEach((function(e){e.abort()})),E[r.fetcherName]=[])),_[o].state===v){const e=u();return e.resolve(_[o].response.clone()),e.promise}if(_[o].state===y)return this.fetchLoadingState(o,e,t,n);if(_[o].state===g)return this.fetchEmptyState(o,e,t,n);throw new Error("Invalid state",{cacheEntry:_[o]})}fetchLoadingState(e,t,n,r){const o=u();return _[e].payload.waitingForResponse.push(o),o.promise}fetchEmptyState(e,t,n,r){const{args:o,inputFetchOptions:a}=this.parseOptions(r);_[e].state=y;let c=new AbortController;o.fetcherName&&(E[o.fetcherName]||(E[o.fetcherName]=[]),E[o.fetcherName].push(c));const l=u(),i=h({method:"POST",headers:{"Content-Type":"application/json"},signal:c.signal},a);return"POST"===i.method&&(i.body=JSON.stringify(n)),fetch(t,i).then((function(t){_[e].response=t.clone(),[l,..._[e].payload.waitingForResponse].forEach((function(t){t.resolve(_[e].response.clone())})),_[e].payload={waitingForResponse:[]},_[e].state=v,o.fetcherName&&(E[o.fetcherName]=[])})).catch((function(t){[l,..._[e].payload.waitingForResponse].forEach((function(t){t.reject(_[e].response)})),_[e].payload={waitingForResponse:[]},_[e].state=g})),l.promise}};var k=function(e,t,n={}){return w.fetch(e,t,n)};const O=function(){const e=new URL("https://startersites.io?route=v2/demo/get_all");return Object.keys(ctDashboardLocalizations.plugin_data.retrieve_demos_data).forEach((function(t){e.searchParams.append(t,ctDashboardLocalizations.plugin_data.retrieve_demos_data[t])})),ctDashboardLocalizations.plugin_data.is_pro&&e.searchParams.append("is_pro","true"),e.searchParams.append("companion_version",ctDashboardLocalizations.plugin_data.plugin_version),k(e.toString(),{},{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}})};function j(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 C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}let x=null,P=!1;var S=function(){const[e,t]=(0,o.useState)(!x),[n,r]=(0,o.useState)(x||[]),[a,l]=(0,o.useState)(P);let[{controller:i},u]=(0,o.useState)({controller:null});const m=async function(e={}){let{verbose:n,extension:o,extAction:a}=C({verbose:!1,extension:null,extAction:null},e);n&&t(!0),i&&i.abort();try{let e=await O();e.status&&511===e.status&&(P=!0,l(!0))}catch(c){}"AbortController"in window&&(i=new AbortController,u({controller:i}));const c=await fetch(`${wp.ajax.settings.url}?action=blocksy_extensions_status&nonce=${ctDashboardLocalizations.dashboard_actions_nonce}`,C({method:"POST",signal:i.signal},o&&a?{body:JSON.stringify({extension:o,extAction:a})}:{}));if(200!==c.status)return;const{success:m,data:p}=await c.json();return m?(null!=a&&a.require_refresh&&s(),r(p),x=p,t(!1),o?p[o]:p):void 0};return(0,o.useEffect)((function(){x||m({verbose:!0});const e=function(){m()};return c().on("blocksy_exts_sync_exts",e),function(){c().off("blocksy_exts_sync_exts",e)}}),[]),{syncExts:m,isLoading:e,exts_status:n,forceEmptyExts:a,setExtsStatus:function(e){const t=e(n);x=t,r(e)}}};var D=function(){return(0,o.createElement)("div",{class:"ct-demo-notification"},(0,o.createElement)("b",null,"Yikes! Something went wrong"),(0,o.createElement)("p",null,"Unfortunately something went wrong during initialization, please ",(0,o.createElement)("a",{href:"https://creativethemes.com/blocksy/support/",target:"_blank"},"contact us from here")," and we will assist you."))};var z=function({navigate:e}){const{forceEmptyExts:t,exts_status:n}=S();return(0,o.useEffect)((function(){t||Object.keys(n).length>0&&e(`/extensions/${Object.keys(n)[0]}`)}),[n,t]),t?(0,o.createElement)(D,null):(0,o.createElement)("div",{className:"ct-extensions-container"},(0,o.createElement)(i.Transition,{items:!0,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],initial:null,config:function(e,t){return{duration:300}}},(function(e,t){return t?(0,o.createElement)(i.animated.p,{style:e,className:"ct-loading-text"},(0,o.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 100 100"},(0,o.createElement)("g",{transform:"translate(50,50)"},(0,o.createElement)("g",{transform:"scale(1)"},(0,o.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"currentColor"}),(0,o.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},(0,o.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"}))))),(0,l.__)("Loading Extensions Status...","blocksy-companion")):null})))},M=n(184),N=n.n(M);function B(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 L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var F=function({navigate:e,currentExtension:t,exts_status:n}){const r=(0,o.useMemo)((function(){return Object.values(n).map((function(e,t){return L(L({},e),{},{name:Object.keys(n)[t]})})).find((function({config:e}){return e.pro}))}),[n]),a=(0,o.useMemo)((function(){return Object.values(n).map((function(e,t){return L(L({},e),{},{name:Object.keys(n)[t]})})).filter((function({config:e}){return!e.pro}))}),[n]),c=(0,o.useMemo)((function(){return Object.values(n).map((function(e,t){return L(L({},e),{},{name:Object.keys(n)[t]})})).filter((function({config:e}){return e.pro})).filter((function(e){return"white-label"!==e.name||!e.data||!e.data.locked}))}),[n]);return(0,o.createElement)("div",{className:"ct-extensions-menu"},[{label:(0,l.__)("Free Extensions","blocksy-companion"),exts:a,order:[]},...r?[{label:(0,l.__)("Pro Extensions","blocksy-companion"),exts:c,order:["woocommerce-extra","post-types-extra","local-google-fonts","custom-fonts","adobe-typekit"]}]:[]].map((function({label:n,exts:r,order:a}){const c=[...a.map((function(e){return r.find((function(t){return t.name===e}))})),...r.filter((function({name:e}){return!a.includes(e)})).sort((function(e,t){return e.config.name.localeCompare(t.config.name)}))].filter((function(e){return!!e}));return(0,o.createElement)(o.Fragment,{key:n},(0,o.createElement)("h4",null,n),(0,o.createElement)("ul",null,c.map((function({name:n,config:r,status:a,__object:c}){var i;let s=!!c;return!1===(null==r||null===(i=r.requirement)||void 0===i?void 0:i.check)&&(s=!1),(0,o.createElement)("li",{key:n,className:N()({selected:t&&t.name===n,active:s}),onClick:function(){e(`/extensions/${n}`)}},r.name,(0,o.createElement)("span",{"data-tooltip-reveal":"top"},(0,o.createElement)("i",{className:"ct-tooltip"},(0,l.__)("Active","blocksy-companion"))))}))))})))};const T=(window.ctDashboardLocalizations||{}).DashboardContext;(T||{}).Provider,(T||{}).Consumer;var A=T;(0,l.__)("Free","blocksy-companion"),(0,l.__)("Personal","blocksy-companion"),(0,l.__)("Business","blocksy-companion"),(0,l.__)("Agency","blocksy-companion"),(0,l.__)("Personal","blocksy-companion"),(0,l.__)("Business","blocksy-companion"),(0,l.__)("Agency","blocksy-companion");var V=function({currentPlan:e="free",requiredPlan:t="personal",personal:n={title:(0,l.__)("This is a Pro feature","blocksy-companion"),description:(0,l.__)("Upgrade to any pro plan and get instant access to this and many other feature.","blocksy-companion")},professional:r={description:(0,l.__)("Upgrade to the business or agency plan and get instant access to this and many other features.","blocksy-companion")},agency:a={description:(0,l.__)("Upgrade to the agency plan and get instant access to this and many other features.","blocksy-companion")}}={}){const[c,s]=(0,o.useState)(!1);return{showNotice:function(e){s(e||!0)},content:(0,o.createElement)(i.Overlay,{items:c,className:"ct-onboarding-modal",onDismiss:function(){return s(!1)},render:function(){return(0,o.createElement)("div",{className:"ct-modal-content"},(0,o.createElement)("svg",{width:"55",height:"55",viewBox:"0 0 40.5 48.3"},(0,o.createElement)("path",{fill:"#2d82c8",d:"M33.4 29.4l7.1 12.3-7.4.6-4 6-7.3-12.9"}),(0,o.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"}),(0,o.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"}),(0,o.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"})),"personal"===t&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("h2",{className:"ct-modal-title"},n.title),(0,o.createElement)("p",null,n.description)),"professional"===t&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("span",null,"Required plan"),(0,o.createElement)("h2",{className:"ct-modal-title"},(0,l.__)("Business or Agency","blocksy-companion")),(0,o.createElement)("p",null,r.description)),"agency"===t&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("span",null,"Required plan"),(0,o.createElement)("h2",{className:"ct-modal-title"},(0,l.__)("Agency","blocksy-companion")),(0,o.createElement)("p",null,a.description)),(0,o.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},(0,o.createElement)("a",{href:ctDashboardLocalizations.plugin_data?ctDashboardLocalizations.plugin_data.modal_links["compare-plans"]:"https://creativethemes.com/blocksy/pricing/#comparison-free-vs-pro",target:"_blank",className:"button"},(0,l.__)("Compare Plans","blocksy-companion")),(0,o.createElement)("a",{href:ctDashboardLocalizations.plugin_data.modal_links?ctDashboardLocalizations.plugin_data.modal_links.pricing:"https://creativethemes.com/blocksy/pricing/",target:"_blank",className:"button button-primary"},(0,l.__)("Upgrade Now","blocksy-companion"))))}})}};function H(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?H(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var I=function(e,t={}){t=G({strategy:"pro-ext",modalTitle:(0,l.__)("This is a Pro extension","blocksy-companion")},t);const[n,r]=(0,o.useState)(!1),a=ctDashboardLocalizations.plugin_data.is_pro,{history:c}=(0,o.useContext)(A),i=!a&&e.config.pro,s=ctDashboardLocalizations.plugin_data.current_plan;let u="personal";e.config.plans&&(e.config.plans.includes("agency_v2")&&(u="agency"),e.config.plans.includes("professional_v2")&&(u="professional"));const{content:m,showNotice:p}=V(G({currentPlan:s,requiredPlan:u},t));return{isPro:a,isProInFree:!a&&e.config.pro||e.config.plans&&e.config.plans.length&&!e.config.plans.includes(s),showNotice:p,content:"pro-ext"===t.strategy&&i||"pro"===t.strategy&&!a||e.config.plans&&e.config.plans.length&&!e.config.plans.includes(s)?m:null}};var R=function(e,t=function(){}){const[n,r]=(0,o.useState)(!1),{isProInFree:a,showNotice:c,content:l}=I(e);return[n,async function(n=function(){},o=!0){if(a)return o&&e.config.features?void n():void c();if(n(),o){const n=new FormData;n.append("ext",e.name),n.append("action",e.__object?"blocksy_extension_deactivate":"blocksy_extension_activate"),n.append("nonce",ctDashboardLocalizations.dashboard_actions_nonce),r(!0);try{await fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:n}),e.config.require_refresh&&s(),t()}catch(e){}r(!1)}},l]},q=window.wp.hooks;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 U(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){r(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}var $=function({navigate:e,currentExtension:t,onExtsSync:n,setExtsStatus:r}){const[a,c]=(0,o.useState)(!1),[i,s,u]=R(t);let m={content:null,showExtension:!0,activationStrategy:"default"};const p=t?(0,q.applyFilters)("blocksy.extensions.current_extension_content",m,{extension:t,onExtsSync:n,setExtsStatus:r,navigate:e}):m;let d=!!t&&t.__object;"from-custom-content"===p.activationStrategy&&(d=a);const f=[...t&&t.config.documentation&&!ctDashboardLocalizations.plugin_data.hide_docs_section?[(0,o.createElement)("a",{target:"_blank",href:t.config.documentation},(0,o.createElement)("svg",{width:"15px",height:"15px",viewBox:"0 0 24 24",fill:"currentColor"},(0,o.createElement)("path",{d:"M22.9,1.1h-6.5C14.6,1.1,13,2,12,3.3C11,2,9.4,1.1,7.6,1.1H1.1C0.5,1.1,0,1.6,0,2.2v16.4c0,0.6,0.5,1.1,1.1,1.1h7.6c1.2,0,2.2,1,2.2,2.2c0,0.6,0.5,1.1,1.1,1.1c0.6,0,1.1-0.5,1.1-1.1c0-1.2,1-2.2,2.2-2.2h7.6c0.6,0,1.1-0.5,1.1-1.1V2.2C24,1.6,23.5,1.1,22.9,1.1z M10.9,18c-0.6-0.4-1.4-0.6-2.2-0.6H2.2V3.3h5.5c1.8,0,3.3,1.5,3.3,3.3V18z M21.8,17.5h-6.5c-0.8,0-1.5,0.2-2.2,0.6V6.5c0-1.8,1.5-3.3,3.3-3.3h5.5V17.5z"})),(0,l.__)("Documentation","blocksy-companion"))]:[],...t&&t.config.video&&!ctDashboardLocalizations.plugin_data.hide_video_section?[(0,o.createElement)("a",{target:"_blank",href:t.config.video},(0,o.createElement)("svg",{width:"15px",height:"15px",viewBox:"0 0 24 24",fill:"currentColor"},(0,o.createElement)("path",{d:"M12,0C5.4,0,0,5.4,0,12s5.4,12,12,12s12-5.4,12-12S18.6,0,12,0z M12,21.8c-5.4,0-9.8-4.4-9.8-9.8c0-5.4,4.4-9.8,9.8-9.8c5.4,0,9.8,4.4,9.8,9.8C21.8,17.4,17.4,21.8,12,21.8z M16.1,11.3c0.2,0.2,0.4,0.4,0.4,0.7c0,0.3-0.1,0.6-0.4,0.7L11,16.1c-0.1,0.1-0.3,0.1-0.5,0.1c-0.1,0-0.3,0-0.4-0.1c-0.3-0.1-0.5-0.4-0.5-0.8V8.6c0-0.3,0.2-0.6,0.5-0.8c0.3-0.1,0.6-0.1,0.9,0L16.1,11.3z"})),(0,l.__)("Video Tutorial","blocksy-companion"))]:[],...t&&t.config.customize&&d?[(0,o.createElement)("a",{href:t.config.customize,target:"_blank",className:"ct-button"},(0,o.createElement)("svg",{width:"15px",height:"15px",viewBox:"0 0 24 24",fill:"currentColor"},(0,o.createElement)("path",{d:"M4 11c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1s-1 .4-1 1v7c0 .6.4 1 1 1zM12 11c-.6 0-1 .4-1 1v9c0 .6.4 1 1 1s1-.4 1-1v-9c0-.6-.4-1-1-1zM20 13c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1s-1 .4-1 1v9c0 .6.4 1 1 1zM7 13H1c-.6 0-1 .4-1 1s.4 1 1 1h2v6c0 .6.4 1 1 1s1-.4 1-1v-6h2c.6 0 1-.4 1-1s-.4-1-1-1zM15 7h-2V3c0-.6-.4-1-1-1s-1 .4-1 1v4H9c-.6 0-1 .4-1 1s.4 1 1 1h6c.6 0 1-.4 1-1s-.4-1-1-1zM23 15h-6c-.6 0-1 .4-1 1s.4 1 1 1h2v4c0 .6.4 1 1 1s1-.4 1-1v-4h2c.6 0 1-.4 1-1s-.4-1-1-1z"})),(0,l.__)("Customize","blocksy-companion"))]:[]];return(0,o.useEffect)((function(){t&&p.showExtension||e("/extensions")}),[]),t?(0,o.createElement)("div",{className:"ct-extension-container"},(0,o.createElement)("div",{className:"ct-extension-info"},(0,o.createElement)("h4",null,(0,o.createElement)("span",{className:"ct-extension-icon",dangerouslySetInnerHTML:{__html:t&&t.config.icon||'<svg width="16" height="16" viewBox="0 0 24 24">\n\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\tfillRule="evenodd"\n\t\t\t\t\t\t\t\td="M22.3,10.7H24V7.6l-1.5-6.2h-21L0,7.6v3.1h1.7v11.7h20.7V10.7z M20.3,10.7H3.7v9.7h5.7v-7h5.3v7h5.7V10.7zM13,3.4h2.8l0.6,4.3l0,1H13V3.4z M8.2,3.4H11v5.3H7.6l0-1L8.2,3.4z M18.4,7.5l-0.6-4.1h3.1L22,7.8v0.9h-3.6L18.4,7.5z M6.2,3.4H3.1L2,7.8v0.9h3.6l0-1.2L6.2,3.4z"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</svg>'}}),t&&t.config.name,t&&(!t.config.requirement||t.config.requirement&&t.config.requirement.check)&&(0,o.createElement)("div",{className:N()("ct-option-switch",{"ct-active":d}),onClick:function(){"from-custom-content"!==p.activationStrategy?s((function(){r((function(e){return U(U({},e),{},{[t.name]:U(U({},e[t.name]),{},{__object:e[t.name].__object?null:{}})})}))})):c(!a)}},(0,o.createElement)("span",null))),t&&t.config.description&&(0,o.createElement)("p",null,t.config.description),f.length>0&&(0,o.createElement)("div",{className:"ct-extension-actions"},f.map((function(e,t){return(0,o.createElement)(o.Fragment,{key:t},e)})))),d&&t.config.features&&(!t.config.requirement||t.config.requirement&&t.config.requirement.check)&&(0,o.createElement)("div",{className:"ct-extension-modules"},t.config.features.map((function(e){return(0,o.createElement)("div",{className:"ct-extension-module",key:e.id},(0,o.createElement)("h5",null,e.title,(0,o.createElement)("div",{className:N()("ct-option-switch",{"ct-active":t.data&&t.data.settings.features[e.id]}),onClick:function(){s((function(){n({extAction:{type:"update-features",require_refresh:!(null==e||!e.require_refresh),settings:{features:U(U({},t.data.settings.features),{},{[e.id]:!t.data.settings.features[e.id]})}}}),r((function(n){return U(U({},n),{},{[t.name]:U(U({},n[t.name]),{},{data:U(U({},n[t.name].data),{},{settings:U(U({},n[t.name].data.settings),{},{features:U(U({},n[t.name].data.settings.features),{},{[e.id]:!n[t.name].data.settings.features[e.id]})})})})})}))}),!1)}},(0,o.createElement)("span",null))),(0,o.createElement)("p",null,e.description),e.documentation&&!ctDashboardLocalizations.plugin_data.hide_docs_section||(e.customize||e.manage)&&t.data&&t.data.settings.features[e.id]?(0,o.createElement)("div",{className:"ct-extension-module-actions"},e.documentation&&!ctDashboardLocalizations.plugin_data.hide_docs_section&&(0,o.createElement)("a",{href:e.documentation,target:"_blank"},(0,o.createElement)("svg",{width:"14px",height:"14px",viewBox:"0 0 24 24",fill:"currentColor"},(0,o.createElement)("path",{d:"M23 2.1h-6.6c-1.8 0-3.4.9-4.4 2.3C11 3 9.4 2.1 7.6 2.1H1c-.6 0-1 .4-1 1v16.5c0 .6.4 1 1 1h7.7c1.3 0 2.3 1 2.3 2.3 0 .6.4 1 1 1s1-.4 1-1c0-1.3 1-2.3 2.3-2.3H23c.6 0 1-.4 1-1V3.1c0-.6-.4-1-1-1zM11 19.3c-.7-.4-1.5-.7-2.3-.7H2V4.1h5.6c1.9 0 3.4 1.5 3.4 3.4v11.8zm11-.7h-6.7c-.8 0-1.6.2-2.3.7V7.5c0-1.9 1.5-3.4 3.4-3.4H22v14.5z"})),(0,l.__)("Documentation","blocksy-companion")),(e.customize||e.manage)&&t.data&&t.data.settings.features[e.id]&&(0,o.createElement)("a",{href:e.customize||e.manage,target:"_blank"},(0,o.createElement)("svg",{width:"14px",height:"14px",viewBox:"0 0 24 24",fill:"currentColor"},(0,o.createElement)("path",{d:"M4 11c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1s-1 .4-1 1v7c0 .6.4 1 1 1zM12 11c-.6 0-1 .4-1 1v9c0 .6.4 1 1 1s1-.4 1-1v-9c0-.6-.4-1-1-1zM20 13c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1s-1 .4-1 1v9c0 .6.4 1 1 1zM7 13H1c-.6 0-1 .4-1 1s.4 1 1 1h2v6c0 .6.4 1 1 1s1-.4 1-1v-6h2c.6 0 1-.4 1-1s-.4-1-1-1zM15 7h-2V3c0-.6-.4-1-1-1s-1 .4-1 1v4H9c-.6 0-1 .4-1 1s.4 1 1 1h6c.6 0 1-.4 1-1s-.4-1-1-1zM23 15h-6c-.6 0-1 .4-1 1s.4 1 1 1h2v4c0 .6.4 1 1 1s1-.4 1-1v-4h2c.6 0 1-.4 1-1s-.4-1-1-1z"})),e.customize?(0,l.__)("Customize","blocksy-companion"):(0,l.__)("Manage","blocksy-companion"))):null)}))),t&&t.config.requirement&&!t.config.requirement.check&&t.config.requirement.message&&(0,o.createElement)("div",{className:"ct-extension-options ct-newsletter-subscribe-options"},(0,o.createElement)("div",{className:"ct-extension-requirement"},(0,o.createElement)("span",null,(0,o.createElement)("svg",{width:"16",height:"16",fill:"#ffffff",viewBox:"0 0 24 24"},(0,o.createElement)("path",{d:"M12,23.6c-1.4,0-2.6-1-2.8-2.3L8.9,20h6.2l-0.3,1.3C14.6,22.6,13.4,23.6,12,23.6z M24,17.8H0l3.1-2c0.5-0.3,0.9-0.7,1.1-1.3c0.5-1,0.5-2.2,0.5-3.2V7.6c0-4.1,3.2-7.3,7.3-7.3s7.3,3.2,7.3,7.3v3.6c0,1.1,0.1,2.3,0.5,3.2c0.3,0.5,0.6,1,1.1,1.3L24,17.8zM6.1,15.6h11.8c0,0-0.1-0.1-0.1-0.2c-0.7-1.3-0.7-2.9-0.7-4.2V7.6c0-2.8-2.2-5.1-5.1-5.1c-2.8,0-5.1,2.2-5.1,5.1v3.6c0,1.3-0.1,2.9-0.7,4.2C6.1,15.5,6.1,15.6,6.1,15.6z"}))),t.config.requirement.message)),d&&p.content,u):null};var Z=function(){return ctDashboardLocalizations.plugin_data.hide_support_section?null:(0,o.createElement)("div",{className:"ct-support-container"},(0,o.createElement)("h2",null,(0,l.__)("Need help or advice?","blocksy-companion")),(0,o.createElement)("p",null,(0,l.__)("Got a question or need help with the theme? You can always submit a support ticket or ask for help in our friendly Facebook community.","blocksy-companion")),(0,o.createElement)("div",{className:"ct-support-buttons"},(0,o.createElement)("a",{href:ctDashboardLocalizations.support_url,className:"ct-button","data-hover":"blue",target:"_blank"},(0,l.__)("Submit a Support Ticket","blocksy-companion")),(0,o.createElement)("a",{href:"https://www.facebook.com/groups/blocksy.community",className:"ct-button","data-hover":"blue",target:"_blank"},(0,l.__)("Join Facebook Community","blocksy-companion"))))};function J(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 Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var X=function(e){const{history:t}=(0,o.useContext)(A),{navigate:n}=e,{forceEmptyExts:r,exts_status:a,syncExts:c,isLoading:s,setExtsStatus:u}=S();let m=null;return a[e.extension]&&(m=Y(Y({},a[e.extension]),{},{name:e.extension})),r?(0,o.createElement)(D,null):(0,o.createElement)("div",{className:"ct-extensions-container"},(0,o.createElement)(i.Transition,{items:s,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],initial:null,config:function(e,t){return{duration:300}}},(function(e,t){return t?(0,o.createElement)(i.animated.p,{style:e,className:"ct-loading-text"},(0,o.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 100 100"},(0,o.createElement)("g",{transform:"translate(50,50)"},(0,o.createElement)("g",{transform:"scale(1)"},(0,o.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"currentColor"}),(0,o.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},(0,o.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"}))))),(0,l.__)("Loading Extensions Status...","blocksy-companion")):(0,o.createElement)(i.animated.div,{style:e},(0,o.createElement)("section",{className:"ct-extensions-list"},(0,o.createElement)(F,{currentExtension:m,exts_status:a,navigate:n}),(0,o.createElement)($,{navigate:n,currentExtension:m,setExtsStatus:u,onExtsSync:function(e={}){return c(Y(Y({},e),{},{extension:m.name}))}})),(0,o.createElement)(o.Fragment,null,(0,o.createElement)(Z,null)))})))};var K=function({children:e,activated:t,checked:n,onChange:r,className:a,position:c="end"}){const l=[..."start"===c?[e]:[],(0,o.createElement)("span",{className:N()("ct-checkbox",{active:n}),key:"icon"},(0,o.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},(0,o.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))),..."end"===c?[e]:[]];return(0,o.createElement)("div",{onClick:function(){return r()},className:N()("ct-checkbox-container",a,{activated:t})},l)};function Q(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?Q(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const te=function(e){return({gutenberg:"Gutenberg","stackable-ultimate-gutenberg-blocks":"Stackable - Gutenberg Blocks","wpforms-lite":"WPForms - Contact Form",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","simply-gallery-block":"SimpLy Gallery Block & Lightbox","recipe-card-blocks-by-wpzoom":"Recipe Card Blocks by WPZOOM","map-block-gutenberg":"Map Block for Google Maps","mb-custom-post-type":"MB Custom Post Types & Custom Taxonomies",leadin:"HubSpot","block-slider":"Block Slider","ht-slider-for-elementor":"HT Slider For Elementor","modula-best-grid-gallery":"Modula - Image Gallery","advanced-custom-fields":"Advanced Custom Fields (ACF)","greenshift-animation-and-page-builder-blocks":"Greenshift – Gutenberg Blocks",fluentform:"Fluent Forms","translatepress-multilingual":"TranslatePress","fluent-booking":"Fluent Booking"}[e]||e).replace(/\b\w/,(function(e){return e.toUpperCase()}))};var ne=function({demoConfiguration:e,setDemoConfiguration:t,style:n}){const{currentDemo:r,demos_list:a,pluginsStatus:c,setCurrentDemo:s}=(0,o.useContext)(Qe),[u,m]=(r||"").split(":");a.filter((function({name:e}){return e===u||""}));return(0,o.createElement)(i.animated.div,{style:n},(0,o.createElement)("div",{className:"ct-demo-plugins"},(0,o.createElement)("i",{className:"ct-demo-icon"},(0,o.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40"},(0,o.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"}),(0,o.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"}))),(0,o.createElement)("h2",null,(0,l.__)("Install & Activate Plugins","blocksy-companion")),(0,o.createElement)("p",null,(0,l.__)("The following plugins are required for this starter site in order to work properly.","blocksy-companion")),(0,o.createElement)("div",{className:"ct-checkboxes-container","data-type":"reversed"},e.plugins.map((function({plugin:n,enabled:r}){return(0,o.createElement)(o.Fragment,{key:n},!c[n]&&(0,o.createElement)(K,{key:n,checked:r,onChange:function(){return t(ee(ee({},e),{},{plugins:e.plugins.map((function(e){return e.plugin===n?ee(ee({},e),{},{enabled:!r}):e}))}))}},te(n)),c[n]&&(0,o.createElement)(K,{activated:!0,checked:!0,onChange:function(){}},te(n)))})))))};function re(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 oe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?re(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ae=function(e,t="conjunction"){return new Intl.ListFormat("en-GB",{style:"long",type:t}).format(e)};var ce=function({demo:e}){const{currentlyInstalledDemo:t,demos_list:n,setCurrentDemo:r,setInstallerBlockingReleased:a}=(0,o.useContext)(Qe),{isProInFree:c,showNotice:i,content:s}=I({config:oe({pro:!!e.is_pro},e.plans?{plans:e.plans}:{})},{strategy:"pro",personal:{title:(0,l.__)("This is a Pro starter site","blocksy-companion"),description:(0,l.__)("Upgrade to any pro plan and get instant access to this starter site and many other features.","blocksy-companion")},professional:{description:(0,l.__)("Upgrade to the business or agency plan and get instant access to this starter site and many other features.","blocksy-companion")},agency:{description:(0,l.__)("Upgrade to the agency plan and get instant access to this starter site and many other features.","blocksy-companion")}});return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("li",{className:N()("ct-single-demo",{"ct-is-pro":e.is_pro})},(0,o.createElement)("figure",null,(0,o.createElement)("img",{src:e.screenshot}),(0,o.createElement)("section",null,e.is_pro&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("h3",null,(0,l.__)("Required plan","blocksy-companion")),(0,o.createElement)("span",{className:"ct-required-plans"},ae((e.plans?e.plans:["personal_v2","professional_v2","agency_v2"]).filter((function(e){return e.indexOf("v2")>-1})).map((function(e){return{personal_v2:(0,l.__)("Personal","blocksy-companion"),professional_v2:(0,l.__)("Business","blocksy-companion"),agency_v2:(0,l.__)("Agency","blocksy-companion")}[e]})),"disjunction"))),(0,o.createElement)("h3",null,(0,l.__)("Available for","blocksy-companion")),(0,o.createElement)("span",{className:"ct-available-builders"},ae(n.filter((function({name:t}){return t===e.name||""})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0})).map((function({builder:e}){return te(e)||"Gutenberg"}))))),e.is_pro&&(0,o.createElement)("span",{className:"ct-pro-badge"},"PRO")),(0,o.createElement)("div",{className:"ct-demo-actions"},(0,o.createElement)("h4",null,e.name),(0,o.createElement)("div",null,(0,o.createElement)("a",{className:"ct-button",target:"_blank",href:e.url},(0,l.__)("Preview","blocksy-companion")),(0,o.createElement)("button",{className:"ct-button-primary",onClick:function(){c?i():(a(!1),r(e.name))}},t&&t.demo.indexOf(e.name)>-1?(0,l.__)("Modify","blocksy-companion"):(0,l.__)("Import","blocksy-companion"))))),s)};var le=function(){const{demos_list:e}=(0,o.useContext)(Qe);return(0,o.createElement)("ul",null,e.filter((function(t,n){return e.map((function({name:e}){return e})).indexOf(t.name)===n})).map((function(e){return(0,o.createElement)(ce,{key:e.name,demo:e})})))};const ie=function({currentDemoWithVariation:e,demoContent:{content:t}}){return[{title:(0,l.__)("Import content","blocksy-companion"),params:{action:"blocksy_demo_install_content",demo_name:e}}]};function se(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 ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?se(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const me=function(e){const t=new URLSearchParams(ue({nonce:ctDashboardLocalizations.dashboard_actions_nonce,wp_customize:"on"},e));return`${ctDashboardLocalizations.ajax_url}?${t.toString()}`},pe=(0,l.__)("Unfortunately, your hosting configuration doesn't meet the minimum requirements for importing a starter site.","blocksy-companion"),de=function(e){e.preventDefault(),e.returnValue=""},fe=function({demoConfiguration:e,pluginsStatus:t,is_child_theme:n,includeMetaSteps:r=!1}){let o=[];return r&&o.push("register_current_demo"),e.child_theme&&(n||o.push("child_theme")),e.plugins.filter((function({enabled:e,plugin:n}){return!!e&&!t[n]})).length>0&&o.push("plugins"),e.content.erase_content&&o.push("erase_content"),e.content.options&&o.push("options"),e.content.widgets&&o.push("widgets"),e.content.content&&o.push("content"),r&&o.push("install_finish"),o},be=function(e){const{demos_list:t,currentDemo:n,setInstallerBlockingReleased:r,setCurrentlyInstalledDemo:a,pluginsStatus:c}=(0,o.useContext)(Qe),{is_child_theme:i}=(0,o.useContext)(A),[s,u]=(0,o.useState)(!1),[m,p]=(0,o.useState)(null),[d,f]=(0,o.useState)(!1),[b,h]=(0,o.useState)(0),g=(0,o.useMemo)((function(){const[r,o]=(n||"").split(":"),a=t.filter((function({name:e}){return e===r})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}));return`${n}:${null===e.builder?a[0].builder:e.builder}`}),[n,e,t]),y=(0,o.useMemo)((function(){return fe({demoConfiguration:e,pluginsStatus:c,is_child_theme:i,includeMetaSteps:!0})}),[e,c,i]),v=(0,o.useCallback)((async function(t){const n=function(e){const{currentDemoWithVariation:t,demoConfiguration:n,pluginsStatus:r,demoContent:o}=e,a=n.plugins.filter((function({enabled:e,plugin:t}){return e&&!r[t]})).map((function({plugin:e}){return e}));return{register_current_demo:{requests:[{title:(0,l.__)("Preparing data...","blocksy-companion"),params:{action:"blocksy_demo_register_current_demo",demo_name:t}}]},child_theme:{requests:[{title:(0,l.__)("Child theme","blocksy-companion"),params:{action:"blocksy_demo_install_child_theme"}}]},plugins:{requests:a.map((function(e){return{title:(0,l.sprintf)((0,l.__)("Installing %s","blocksy-companion"),te(e)),params:{action:"blocksy_demo_activate_plugins",plugins:e}}}))},erase_content:{requests:[{title:(0,l.__)("Erase content","blocksy-companion"),params:{action:"blocksy_demo_erase_content"}}]},options:{requests:[{title:(0,l.__)("Import options","blocksy-companion"),params:{action:"blocksy_demo_install_options",demo_name:t}}]},widgets:{requests:[{title:(0,l.__)("Import widgets","blocksy-companion"),params:{action:"blocksy_demo_install_widgets",demo_name:t}}]},content:{requests:ie(e)},install_finish:{requests:[{title:(0,l.__)("Final touches","blocksy-companion"),params:{action:"blocksy_demo_install_finish"}}]}}}({currentDemoWithVariation:g,demoConfiguration:e,pluginsStatus:c,demoContent:t}),o=y.reduce((function(e,t){return e+n[t].requests.length}),0);let a=0,i={};for(const e of y){const t=n[e];if(t&&0!==t.requests.length)for(const e of t.requests){p(e.title);const t=await fetch(me(e.params),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ue({requestsPayload:i},e.body||{}))});if(200!==t.status){f(pe);break}const n=await t.json();if(!n){f(pe);break}if(!n.success){f(n.data&&n.data.message?n.data.message:pe);break}n.data&&null!=n.data&&"Object"===n.data.constructor.name&&(i=ue(ue({},i),n.data)),a++,h(a/o*100),o===a&&(console.timeEnd("Blocksy:Dashboard:DemoInstall"),u(!0),r(!0),window.removeEventListener("beforeunload",de))}}}),[y,h]),_=(0,o.useCallback)((async function(){window.addEventListener("beforeunload",de),console.time("Blocksy:Dashboard:DemoInstall"),a({demo:`${n}:${e.builder}`}),p((0,l.__)("Preparing data...","blocksy-companion"));const t=await fetch(me({action:"blocksy_demo_get_content_preliminary_data",demo_name:g}));if(200===t.status){const e=await t.json();if(!e.success)return void f(e.data.message||pe);v(e.data)}}),[v,g]);return(0,o.useEffect)((function(){_()}),[]),{isCompleted:s,isError:d,lastMessage:m,progress:b}};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 ge(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){r(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}var ye=function({style:e,nextStep:t}){const{is_child_theme:n}=(0,o.useContext)(A),{setCurrentlyInstalledDemo:r,setCurrentDemo:a,currentDemo:c,demos_list:s,pluginsStatus:u,setPluginsStatus:m}=(0,o.useContext)(Qe),[p,d]=(0,o.useState)("idle"),[f,b]=(c||"").split(":"),h=s.filter((function({name:e}){return e===f}));return(0,o.createElement)(i.animated.div,{className:"ct-modify-demo",style:e},(0,o.createElement)("i",{className:"ct-demo-icon"},(0,o.createElement)("svg",{width:"36",height:"36",viewBox:"0 0 40 40"},(0,o.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"}),(0,o.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"===p&&(0,o.createElement)("h2",null,(0,l.__)("This starter site is already installed","blocksy-companion")),"loading"===p&&(0,o.createElement)("h2",null,"Removing starter site..."),"done"===p&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("h2",null,(0,l.__)("Starter Site Removed","blocksy-companion")),(0,o.createElement)("div",{className:"ct-modify-actions"},(0,o.createElement)("button",{className:"ct-demo-btn ct-dismiss",onClick:function(e){e.preventDefault(),a(`${f}:hide`)}},(0,l.__)("Dismiss","blocksy-companion")))),"idle"===p&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("p",null,(0,l.__)("What steps do you want to perform next?","blocksy-companion")),(0,o.createElement)("div",{className:"ct-modify-actions"},(0,o.createElement)("button",{className:"ct-demo-btn demo-remove",onClick:function(e){d("loading"),async function(){const e={erase_content:{requests:[{title:(0,l.__)("Erase content","blocksy-companion"),params:{action:"blocksy_demo_erase_content",wp_customize:"on"}}]},deactivate_demo_plugins:{requests:[{title:(0,l.__)("Deactivate demo plugins","blocksy-companion"),params:{action:"blocksy_demo_deactivate_plugins",plugins:h[0].plugins.join(":")}}]},deregister_current_demo:{requests:[{title:(0,l.__)("Erase content","blocksy-companion"),params:{action:"blocksy_demo_deregister_current_demo"}}]}},t=["erase_content","deactivate_demo_plugins","deregister_current_demo"];for(const n of t){const t=e[n];if(t&&0!==t.requests.length)for(const e of t.requests){if(200!==(await fetch(me(e.params),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ge({},e.body||{}))})).status){d("done");break}"deactivate_demo_plugins"===n&&m(ge(ge({},u),h[0].plugins.reduce((function(e,t){return ge(ge({},e),{},{[t]:!1})}),{})))}}d("done")}(),e.preventDefault(),r()}},(0,l.__)("Remove","blocksy-companion")),(0,o.createElement)("button",{className:"ct-demo-btn",onClick:function(e){e.preventDefault(),t()}},(0,l.__)("Reinstall","blocksy-companion")))))};function ve(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 _e(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ee=function({demoConfiguration:e,setDemoConfiguration:t,style:n}){const{is_child_theme:r,child_theme_exists:a}=(0,o.useContext)(A);return(0,o.createElement)(i.animated.div,{className:"ct-demo-child",style:n},(0,o.createElement)("i",{className:"ct-demo-icon"},(0,o.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 43 41.1"},(0,o.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"}),(0,o.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"}),(0,o.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"}),(0,o.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"}),(0,o.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"}),(0,o.createElement)("rect",{x:"11.2",y:"11",fill:"#44ACDF",width:"16.8",height:"17.9"}),(0,o.createElement)("rect",{x:"31.5",y:"11",fill:"#44ACDF",width:"7.9",height:"17.9"}))),a?(0,o.createElement)("h2",null,(0,l.__)("Activate Child Theme","blocksy-companion")):(0,o.createElement)("h2",null,(0,l.__)("Install Child Theme","blocksy-companion")),!r&&(0,o.createElement)(o.Fragment,null,a?(0,o.createElement)("p",null,(0,l.__)("We strongly recommend to activate the child theme, this way you will have freedom to make changes without breaking the parent theme.","blocksy-companion")):(0,o.createElement)("p",null,(0,l.__)("We strongly recommend to install the child theme, this way you will have freedom to make changes without breaking the parent theme.","blocksy-companion")),(0,o.createElement)("div",{className:"ct-checkboxes-container","data-type":"bordered:reversed"},(0,o.createElement)(K,{checked:e.child_theme,position:"end",onChange:function(){return t(_e(_e({},e),{},{child_theme:!e.child_theme}))}},a?(0,l.__)("Activate Child Theme","blocksy-companion"):(0,l.__)("Install Child Theme","blocksy-companion")))),r&&(0,l.__)("You already have a child theme properly installed and activated. Move on.","blocksy-companion"),(0,o.createElement)("a",{href:"https://developer.wordpress.org/themes/advanced-topics/child-themes/",target:"_blank"},(0,l.__)("Learn more about child themes","blocksy-companion")))};function we(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 ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?we(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):we(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Oe=function({demoConfiguration:e,setDemoConfiguration:t,style:n}){const{currentDemo:r,demos_list:a,pluginsStatus:c,setCurrentDemo:s}=(0,o.useContext)(Qe),[u,m]=(r||"").split(":"),p=a.filter((function({name:e}){return e===u||""}));return(0,o.createElement)(i.animated.div,{style:n},p.length>1&&(0,o.createElement)("div",{className:"ct-demo-builder"},(0,o.createElement)("i",{className:"ct-demo-icon"},(0,o.createElement)("svg",{width:"52",height:"40",viewBox:"0 0 52 40"},(0,o.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"}),(0,o.createElement)("path",{fill:"#CFDBE4",d:"M13.8,14.6v18.8h22.6V14.6H13.8zM34.8,31.9H15.4V16.1h19.4V31.9z"}),(0,o.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"}),(0,o.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"}),(0,o.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"}),(0,o.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"}),(0,o.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"}))),(0,o.createElement)("h2",null,(0,l.__)("Choose Page Builder","blocksy-companion")),(0,o.createElement)("p",null,(0,l.__)("This starter site can be imported and used with one of these page builders. Please select one in order to continue.","blocksy-companion")),(0,o.createElement)("ul",{"data-count":p.length},p.sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0})).map((function({builder:n,plugins:r}){return(0,o.createElement)("li",{className:N()({active:n===(null===e.builder?p[0].builder:e.builder)}),onClick:function(){t(ke(ke({},e),{},{builder:n,plugins:r.map((function(e){return{plugin:e,enabled:!0}}))}))}},(0,o.createElement)("figure",null,(0,o.createElement)("span",{className:N()("ct-checkbox",{active:n===(null===e.builder?p[0].builder:e.builder)})},(0,o.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},(0,o.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))),""===n&&(0,o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},(0,o.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"===n&&(0,o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},(0,o.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"}),(0,o.createElement)("path",{fill:"#a7b2dd",d:"M14.6 63.2l10.8-6.5L75 86.8l49.9-30 10.5 6.4L75 100z"})),"elementor"===n&&(0,o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 150 100"},(0,o.createElement)("path",{d:"M32.5 7.6h17v84.9h-17V7.6zm34 84.9h51v-17h-51v17zm0-34h51v-17h-51v17zm0-51v17h51v-17h-51z"}))),(0,o.createElement)("div",{className:"builder-name"},te(n)||"Gutenberg"))})))))};function je(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 Ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?je(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):je(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var xe=function({demoConfiguration:e,setDemoConfiguration:t,currentDemo:n,style:r}){return(0,o.createElement)(i.animated.div,{style:r},(0,o.createElement)("div",{className:"ct-demo-content"},(0,o.createElement)("i",{className:"ct-demo-icon"},(0,o.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 40 40"},(0,o.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"}),(0,o.createElement)("rect",{x:"2.5",y:"14",width:"35",height:"3",rx:"1.5",fill:"#0c7ab3"}),(0,o.createElement)("rect",{x:"5",y:"7",width:"30",height:"3",rx:"1.5",fill:"#3497d3"}),(0,o.createElement)("rect",{x:"7.5",width:"25",height:"3",rx:"1.5",fill:"#44acdf"}))),(0,o.createElement)("h2",null,(0,l.__)("Import Content","blocksy-companion")),(0,o.createElement)("p",null,(0,l.__)("This will import posts, pages, comments, navigation menus, custom fields, terms and custom posts.","blocksy-companion")),(0,o.createElement)("div",{className:"ct-checkboxes-container","data-type":"reversed"},["options","widgets","content"].map((function(n){return(0,o.createElement)(K,{checked:e.content[n],onChange:function(){return t(Ce(Ce({},e),{},{content:Ce(Ce({},e.content),{},{[n]:!e.content[n]})}))},key:n},n.split("_").map((function(e){return e.replace(/^\w/,(function(e){return e.toUpperCase()}))})).join(" "))})),(0,o.createElement)(K,{checked:e.content.erase_content,className:"ct-demo-erase",onChange:function(){return t(Ce(Ce({},e),{},{content:Ce(Ce({},e.content),{},{erase_content:!e.content.erase_content})}))}},(0,o.createElement)("div",null,(0,l.__)("Clean Install","blocksy-companion"),(0,o.createElement)("i",null,(0,l.__)("This option will remove the previous imported content and will perform a fresh and clean install.","blocksy-companion")))))))};var Pe=function(){const{home_url:e,customizer_url:t}=(0,o.useContext)(A);return(0,o.createElement)("div",{className:"ct-install-success"},(0,o.createElement)("h2",null,(0,l.__)("Starter Site Imported Successfully","blocksy-companion")),(0,o.createElement)("p",null,(0,l.__)("Now you can view your website or start customizing it","blocksy-companion")),(0,o.createElement)("div",null,(0,o.createElement)("a",{href:t,className:"ct-button"},(0,l.__)("Customize","blocksy-companion")),(0,o.createElement)("a",{href:e,target:"_blank",className:"ct-button-primary"},(0,l.__)("View site","blocksy-companion"))))};var Se=function({lastMessage:e,progress:t}){return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("i",{className:"ct-demo-icon"},(0,o.createElement)("svg",{width:"40",height:"40",viewBox:"0 0 50 50"},(0,o.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"}),(0,o.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"}),(0,o.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"}))),(0,o.createElement)("h2",null,(0,l.__)("Installing","blocksy-companion"),"..."),(0,o.createElement)("p",null,(0,l.__)("Please be patient and don't refresh this page, the import process may take a while, this also depends on your server.","blocksy-companion")),(0,o.createElement)("div",{className:"ct-progress-info"},e,(0,o.createElement)("span",null,Math.round(t),"%")),(0,o.createElement)("div",{style:{"--progress":`${t}%`},className:"ct-installer-progress"},(0,o.createElement)("div",null)))};var De=function({isError:e}){return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("i",{className:"ct-demo-icon"},(0,o.createElement)("svg",{width:"37",height:"37",viewBox:"0 0 40 40"},(0,o.createElement)("path",{fill:"#BDC8D7",d:"M30.7,25.4L14.6,9.3c0.7-2.5,0-5.2-1.9-7.2c-2.4-2.3-6-2.7-8.8-1.3l4.5,4.5L7.9,7.9L5.3,8.4L0.8,3.9c-1.5,2.8-1,6.4,1.3,8.7c2,2,4.7,2.6,7.2,1.9l16.1,16.1c-0.7,2.5,0,5.2,1.9,7.2c2.3,2.3,5.9,2.8,8.7,1.3l-4.5-4.5L32,32l2.6-0.5l4.5,4.5c1.5-2.8,1-6.4-1.3-8.7C35.9,25.4,33.1,24.7,30.7,25.4z"}),(0,o.createElement)("polygon",{fill:"#44ACDF",points:"34.6,11.3 39.8,3.7 36.3,0.2 28.7,5.4 28.7,7.8 11.8,24.7 15.3,28.2 32.2,11.3 "}),(0,o.createElement)("path",{fill:"#0C7AB3",d:"M18.4,27.5l-5.9-5.9c-0.4-0.4-1-0.4-1.4,0s-0.4,1,0,1.4l0,0L0.7,33.5c-0.7,0.7-0.7,1.7,0,2.3l3.5,3.5c0.7,0.7,1.7,0.7,2.3,0L17,28.9l0,0c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3C18.8,28.5,18.8,27.9,18.4,27.5z"}))),(0,o.createElement)("h2",null,(0,l.__)("Can't Import Starter Site","blocksy-companion")),(0,o.createElement)("p",null,e),(0,o.createElement)("a",{href:"https://creativethemes.com/blocksy/docs/troubleshooting/starter-site-import-stuck-at-xx/",className:"ct-demo-btn",target:"_blank"},"More Information"))};var ze=function({demoConfiguration:e,style:t}){const{isCompleted:n,isError:r,lastMessage:a,progress:c}=be(e),l=n?"complete":r?"error":"progress";return(0,o.createElement)(i.animated.div,{className:"ct-demo-install",style:t},(0,o.createElement)(i.Transition,{initial:!0,items:l,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],config:function(e,t){return"leave"===t?{duration:300}:{delay:300,duration:300}}},(function(e,t){return(0,o.createElement)(i.animated.div,{style:e},"complete"===t&&(0,o.createElement)(Pe,null),"error"===t&&(0,o.createElement)(De,{isError:r}),"progress"===t&&(0,o.createElement)(Se,{lastMessage:a,progress:c}))})))};var Me=function({location:e,navigate:t}){const[n,r]=(0,o.useState)(!0),{installerBlockingReleased:a,demos_list:c,currentDemo:s,pluginsStatus:u,currentlyInstalledDemo:m,setCurrentDemo:p,filters:d}=(0,o.useContext)(Qe),{is_child_theme:f}=(0,o.useContext)(A),[b,h]=(0,o.useState)(m),[g,y]=(0,o.useState)({builder:"",child_theme:!1,plugins:[],content:{options:!0,widgets:!0,content:!0,erase_content:!0}}),[v,_]=(0,o.useState)(0),[E,w]=(s||"").split(":"),k=["modify_demo","child_theme","builder","plugins","content","installer"].filter((function(e){if(!s)return!1;if("modify_demo"===e){if(!b)return!1;if(-1===b.demo.indexOf(E))return!1}if("child_theme"===e&&f)return!1;const t=c.filter((function({name:e}){return e===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[...e,...t.plugins||[]]}),[]).filter((function(e){return!u[e]})).length)&&("builder"!==e||t.length>1)})),O=k[v];return(0,o.useEffect)((function(){if(!E)return;if(s.indexOf(":hide")>-1)return;const e=c.filter((function({name:e}){return e===E})).sort((function(e,t){return e.builder<t.builder?-1:e.builder>t.builder?1:0}));_(0),h(m);let t=e[0];if("all"!==d.builder){const n=e.find((function({builder:e}){return e===d.builder}));n&&(t=n)}y({builder:t.builder,child_theme:!1,plugins:t.plugins.map((function(e){return{plugin:e,enabled:!0}})),content:{options:!0,widgets:!0,content:!0,erase_content:!0}})}),[s]),(0,o.createElement)(i.Overlay,{items:s,isVisible:function(e){return e&&-1===e.indexOf(":hide")},className:N()("ct-demo-modal",{"ct-demo-installer":"installer"===O||"modify_demo"===O}),onDismiss:function(){"loading"!==O||a?("installer"!==O||a)&&p(`${E}:hide`):_(0)},render:function(){return(0,o.createElement)("div",{className:"ct-modal-content ct-demo-step-container"},(0,o.createElement)("div",{className:"ct-current-step"},(0,o.createElement)(i.Transition,{items:O,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,t){return(0,o.createElement)(o.Fragment,null,"modify_demo"===t&&(0,o.createElement)(ye,{demoConfiguration:g,nextStep:function(){_(Math.min(v+1,k.length-1))},style:e}),"child_theme"===t&&(0,o.createElement)(Ee,{style:e,demoConfiguration:g,setDemoConfiguration:y}),"plugins"===t&&(0,o.createElement)(ne,{demoConfiguration:g,style:e,setDemoConfiguration:y}),"builder"===t&&(0,o.createElement)(Oe,{style:e,demoConfiguration:g,setDemoConfiguration:y}),"content"===t&&(0,o.createElement)(xe,{style:e,demoConfiguration:g,setDemoConfiguration:y}),"installer"===t&&(0,o.createElement)(ze,{style:e,demoConfiguration:g}))}))),"installer"!==O&&"modify_demo"!==O&&(0,o.createElement)("div",{className:"ct-demo-step-controls"},v>0&&(0,o.createElement)("button",{className:"ct-demo-btn demo-back-btn",onClick:function(){_(Math.max(v-1,0))}},(0,l.__)("Back","blocksy-companion")),k.length>2&&(0,o.createElement)("ul",{className:"ct-steps-pills"},k.map((function(e,t){return t===k.length-1?null:(0,o.createElement)("li",{className:N()({active:e===O}),key:e},t+1)}))),(0,o.createElement)("button",{className:"ct-demo-btn demo-main-btn",disabled:"content"===O&&0===fe({demoConfiguration:g,pluginsStatus:u,is_child_theme:f}).length,onClick:function(){_(Math.min(v+1,k.length-1))}},"content"===O?(0,l.__)("Install","blocksy-companion"):(0,l.__)("Next","blocksy-companion"))))}})},Ne=window.wp.components,Be=window.React;function Le(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Le(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}var Fe=function(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Le(e))&&(r&&(r+=" "),r+=t);return r};const Te=(0,o.forwardRef)((({className:e,isPressed:t,...n},r)=>{const a={...n,className:Fe(e,{"is-pressed":t})||void 0,"aria-hidden":!0,focusable:!1};return(0,o.createElement)("svg",{...a,ref:r})}));Te.displayName="SVG";var Ae=(0,Be.createElement)(Te,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Be.createElement)((e=>(0,o.createElement)("path",e)),{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),Ve=n(162),He=n.n(Ve);function Ge(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 Ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ge(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ge(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Re=function({allPlans:e,allCategories:t}){const[n,r]=(0,o.useState)(!1),[a,c]=(0,o.useState)(!1),[s,u]=(0,o.useState)([]),[m,p]=(0,o.useState)(null),[d,f]=(0,o.useState)(""),[b,h]=(0,o.useState)([]);(0,o.useEffect)((function(){!async function(){const e=new FormData;e.append("action","blocksy_demo_get_export_data"),e.append("nonce",ctDashboardLocalizations.dashboard_actions_nonce);try{const t=await fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:e});if(200===t.status){const{success:e,data:n}=await t.json();if(e){const e=n.data;e&&e.builder&&f(e.builder),e&&e.plugins&&h(e.plugins),e&&e.demoId&&p(parseFloat(e.demoId))}}}catch(e){}}(),async function(){try{const e=await fetch("https://creativethemes.com/blocksy/wp-json/ct/v1/starter-sites",{method:"GET"});if(200===e.status){const t=await e.json();u(t)}}catch(e){}}()}),[]);return(0,o.createElement)("div",{className:"ct-filter-trigger-export"},(0,o.createElement)("button",{type:"button",className:"components-button has-icon has-text",onClick:function(e){c(!0)}},(0,o.createElement)("svg",{"aria-hidden":"true",width:"24",height:"24",viewBox:"0 0 24 24",fillRule:"evenodd",fill:"currentColor"},(0,o.createElement)("path",{d:"M20 15v5H4v-5h1.5v3.5h6V6.8l-4 4-1-1.1L12.2 4l6.3 5.7-1 1.1L13 6.7v11.8h5.5V15H20z"})),(0,l.__)("Export Site")),(0,o.createElement)(i.Overlay,{items:a,className:"ct-site-export-modal",onDismiss:function(){return c(!1)},render:function(){return(0,o.createElement)("div",{className:"ct-modal-content"},(0,o.createElement)("h2",null,"Export Settings"),(0,o.createElement)("div",{className:"ct-site-export-settings ct-modal-scroll"},(0,o.createElement)("section",{className:"general-section has-divider"},(0,o.createElement)("label",null,(0,o.createElement)("span",{className:"ct-label"},(0,l.__)("Starter site","blocksy-companion")),(0,o.createElement)("select",{value:m,onChange:function({target:{value:e}}){return p(parseFloat(e))}},(0,o.createElement)("option",{value:""},(0,l.__)("Select a starter site","blocksy-companion")),s.sort((function(e,t){const n=e.title.toLowerCase(),r=t.title.toLowerCase();return n<r?-1:n>r?1:0})).map((function(e){return(0,o.createElement)("option",{value:e.id,key:e.id},e.title)})))),(0,o.createElement)("label",null,(0,o.createElement)("span",{className:"ct-label"},(0,l.__)("Builder","blocksy-companion")),(0,o.createElement)("input",{type:"text",placeholder:(0,l.__)("Builder","blocksy-companion"),value:d,onChange:function({target:{value:e}}){return f(e)}}))),(0,o.createElement)("section",{className:"plugins-section"},(0,o.createElement)("h4",null,"Required plugins"),(0,o.createElement)("div",{className:"ct-bundled-plugins-list grid-labels"},Object.keys({gutenberg:"Gutenberg","stackable-ultimate-gutenberg-blocks":"Stackable - Gutenberg Blocks","wpforms-lite":"WPForms - Contact Form",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","simply-gallery-block":"SimpLy Gallery Block & Lightbox","recipe-card-blocks-by-wpzoom":"Recipe Card Blocks by WPZOOM","map-block-gutenberg":"Map Block for Google Maps","mb-custom-post-type":"MB Custom Post Types & Custom Taxonomies",leadin:"HubSpot","block-slider":"Block Slider","ht-slider-for-elementor":"HT Slider For Elementor","modula-best-grid-gallery":"Modula - Image Gallery","advanced-custom-fields":"Advanced Custom Fields (ACF)","greenshift-animation-and-page-builder-blocks":"Greenshift – Gutenberg Blocks",fluentform:"Fluent Forms","translatepress-multilingual":"TranslatePress","fluent-booking":"Fluent Booking"}).filter((function(e){return"gutenberg"!==e})).map((function(e){return(0,o.createElement)("label",{tabindex:"0",onClick:function(t){t.preventDefault(),h((function(t){return t.includes(e)?t.filter((function(t){return t!==e})):[...t,e]}))}},(0,o.createElement)("input",{type:"checkbox",checked:b.indexOf(e)>-1,onChange:function({target:{checked:e}}){}}),(0,o.createElement)("span",null,{gutenberg:"Gutenberg","stackable-ultimate-gutenberg-blocks":"Stackable - Gutenberg Blocks","wpforms-lite":"WPForms - Contact Form",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","simply-gallery-block":"SimpLy Gallery Block & Lightbox","recipe-card-blocks-by-wpzoom":"Recipe Card Blocks by WPZOOM","map-block-gutenberg":"Map Block for Google Maps","mb-custom-post-type":"MB Custom Post Types & Custom Taxonomies",leadin:"HubSpot","block-slider":"Block Slider","ht-slider-for-elementor":"HT Slider For Elementor","modula-best-grid-gallery":"Modula - Image Gallery","advanced-custom-fields":"Advanced Custom Fields (ACF)","greenshift-animation-and-page-builder-blocks":"Greenshift – Gutenberg Blocks",fluentform:"Fluent Forms","translatepress-multilingual":"TranslatePress","fluent-booking":"Fluent Booking"}[e]))}))))),(0,o.createElement)("div",{className:"ct-modal-actions has-divider"},(0,o.createElement)("button",{className:"button button-primary",disabled:n,onClick:function(){return async function(){r(!0);const e=new FormData;e.append("action","blocksy_demo_export"),e.append("nonce",ctDashboardLocalizations.dashboard_actions_nonce),e.append("demoId",m),e.append("builder",d),e.append("plugins",b.join(",")),e.append("wp_customize","on");try{const n=await fetch(ctDashboardLocalizations.ajax_url,{method:"POST",body:e});if(200===n.status){const{success:e,data:r}=await n.json();if(e){const e=s.find((function(e){return e.id===m})),n=Ie(Ie({name:e.title,url:e.demo_live_link,is_pro:"Pro"===e.is_pro,categories:e.categories,keywords:e.keywords},"Pro"===e.is_pro&&e.plans?{plans:["personal","professional","agency",...e.plans.map((function(e){return`${e}_v2`}))]}:{}),r.demo);"elementor"===n.builder.toLowerCase()&&(n.elementor_experiment_container=!0),console.log("Blocksy:Dashboard:DemoInstall:exported",{remoteDemo:e,finalDemo:n});var t=new Blob([JSON.stringify(n)],{type:"text/plain;charset=utf-8"});He().saveAs(t,`${e.title}.json`)}}}catch(e){}r(!1)}()}},n?(0,l.__)("Loading...","blocksy-companion"):(0,l.__)("Export site","blocksy-companion"))))}}))};function qe(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 We(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Ue={all:(0,l.__)("All Plans","blocksy-companion"),free:(0,l.__)("Free","blocksy-companion"),pro:(0,l.__)("Pro","blocksy-companion")};var $e=function(){const{unfiltered_demos_list:e,filters:t,setFilters:n,allPlans:r,allCategories:a}=(0,o.useContext)(Qe),c=e.reduce((function(e,t){let n="gutenberg";return t.builder&&(n=t.builder),e.includes(n)||e.push(n),e}),[]);return(0,o.createElement)("div",{className:"ct-demo-filters"},(0,o.createElement)(Ne.DropdownMenu,{className:"ct-filter-trigger-categories",menuProps:{className:"ct-filter-dropdown-categories"},icon:(0,o.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fillRule:"evenodd",fill:"currentColor"},(0,o.createElement)("path",{d:"M18 5.5h-3c-.3 0-.5.2-.5.5v3c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5V6c0-.3-.2-.5-.5-.5zm2 .5c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2V6zM9 14.5H6c-.3 0-.5.2-.5.5v3c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5v-3c0-.3-.2-.5-.5-.5zm2 .5c0-1.1-.9-2-2-2H6c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3zm4-.5h3c.3 0 .5.2.5.5v3c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5v-3c0-.3.2-.5.5-.5zm3-1.5c1.1 0 2 .9 2 2v3c0 1.1-.9 2-2 2h-3c-1.1 0-2-.9-2-2v-3c0-1.1.9-2 2-2h3zM9 5.5H6c-.3 0-.5.2-.5.5v3c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5V6c0-.3-.2-.5-.5-.5zm2 .5c0-1.1-.9-2-2-2H6c-1.1 0-2 .9-2 2v3c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2V6z"})),label:"all"===t.category?(0,l.__)("All Categories","blocksy-companion"):t.category,text:"all"===t.category?(0,l.__)("All Categories","blocksy-companion"):t.category},(function(){return["all",...a].map((function(e){const r=t.category===e;return(0,o.createElement)(Ne.MenuItem,{key:e,icon:r?(0,o.cloneElement)(Ae,{width:24,height:24}):null,isSelected:r,onClick:function(){n(We(We({},t),{},{category:e}))}},"all"===e?(0,l.__)("All Categories","blocksy-companion"):e)}))})),(0,o.createElement)(Ne.DropdownMenu,{className:"ct-filter-trigger-plans",menuProps:{className:"ct-filter-dropdown-plans"},icon:(0,o.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fillRule:"evenodd",fill:"currentColor"},(0,o.createElement)("path",{d:"m17.3 19.8-5.2-2.7h-.2l-5.2 2.7 1-5.8c0-.1 0-.2-.1-.2l-4.2-4L9.2 9c.1 0 .2-.1.2-.1L12 3.6l2.6 5.2c0 .1.1.1.2.1l5.8.8-4.2 4.1c-.1.1-.1.1-.1.2l1 5.8zM12 15.6c.3 0 .6.1.8.2l2.5 1.3-.5-2.8c-.1-.6.1-1.1.5-1.5l2-2-2.8-.4c-.6-.1-1.1-.4-1.3-1L12 6.9l-1.2 2.5c-.3.5-.7.9-1.3 1l-2.8.4 2 2c.4.4.6 1 .5 1.5l-.5 2.8 2.5-1.3c.2-.1.5-.2.8-.2z"})),label:Ue[t.plan],text:Ue[t.plan]},(function(){return["all","free","pro"].map((function(e){const r=t.plan===e;return(0,o.createElement)(Ne.MenuItem,{key:e,icon:r?(0,o.cloneElement)(Ae,{width:24,height:24}):null,isSelected:r,onClick:function(){n(We(We({},t),{},{plan:e}))}},Ue[e])}))})),(0,o.createElement)(Ne.DropdownMenu,{className:"ct-filter-trigger-builders",menuProps:{className:"ct-filter-dropdown-builders"},icon:(0,o.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 24 24",fillRule:"evenodd",fill:"currentColor"},(0,o.createElement)("path",{d:"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM6 5.5h12c.3 0 .5.2.5.5v3h-13V6c0-.3.2-.5.5-.5zM5.5 18v-7.5h3v8H6c-.3 0-.5-.2-.5-.5zm12.5.5h-8v-8h8.5V18c0 .3-.2.5-.5.5z"})),label:"all"===t.builder?(0,l.__)("All Builders","blocksy-companion"):{gutenberg:"Gutenberg","stackable-ultimate-gutenberg-blocks":"Stackable - Gutenberg Blocks","wpforms-lite":"WPForms - Contact Form",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","simply-gallery-block":"SimpLy Gallery Block & Lightbox","recipe-card-blocks-by-wpzoom":"Recipe Card Blocks by WPZOOM","map-block-gutenberg":"Map Block for Google Maps","mb-custom-post-type":"MB Custom Post Types & Custom Taxonomies",leadin:"HubSpot","block-slider":"Block Slider","ht-slider-for-elementor":"HT Slider For Elementor","modula-best-grid-gallery":"Modula - Image Gallery","advanced-custom-fields":"Advanced Custom Fields (ACF)","greenshift-animation-and-page-builder-blocks":"Greenshift – Gutenberg Blocks",fluentform:"Fluent Forms","translatepress-multilingual":"TranslatePress","fluent-booking":"Fluent Booking"}[t.builder],text:"all"===t.builder?(0,l.__)("All Builders","blocksy-companion"):{gutenberg:"Gutenberg","stackable-ultimate-gutenberg-blocks":"Stackable - Gutenberg Blocks","wpforms-lite":"WPForms - Contact Form",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","simply-gallery-block":"SimpLy Gallery Block & Lightbox","recipe-card-blocks-by-wpzoom":"Recipe Card Blocks by WPZOOM","map-block-gutenberg":"Map Block for Google Maps","mb-custom-post-type":"MB Custom Post Types & Custom Taxonomies",leadin:"HubSpot","block-slider":"Block Slider","ht-slider-for-elementor":"HT Slider For Elementor","modula-best-grid-gallery":"Modula - Image Gallery","advanced-custom-fields":"Advanced Custom Fields (ACF)","greenshift-animation-and-page-builder-blocks":"Greenshift – Gutenberg Blocks",fluentform:"Fluent Forms","translatepress-multilingual":"TranslatePress","fluent-booking":"Fluent Booking"}[t.builder]},(function(){return["all",...c].map((function(e){const r=t.builder===e;return(0,o.createElement)(Ne.MenuItem,{key:e,icon:r?(0,o.cloneElement)(Ae,{width:24,height:24}):null,isSelected:r,onClick:function(){n(We(We({},t),{},{builder:e}))}},"all"===e?(0,l.__)("All Builders","blocksy-companion"):{gutenberg:"Gutenberg","stackable-ultimate-gutenberg-blocks":"Stackable - Gutenberg Blocks","wpforms-lite":"WPForms - Contact Form",woocommerce:"WooCommerce",elementor:"Elementor",brizy:"Brizy",getwid:"Getwid","simply-gallery-block":"SimpLy Gallery Block & Lightbox","recipe-card-blocks-by-wpzoom":"Recipe Card Blocks by WPZOOM","map-block-gutenberg":"Map Block for Google Maps","mb-custom-post-type":"MB Custom Post Types & Custom Taxonomies",leadin:"HubSpot","block-slider":"Block Slider","ht-slider-for-elementor":"HT Slider For Elementor","modula-best-grid-gallery":"Modula - Image Gallery","advanced-custom-fields":"Advanced Custom Fields (ACF)","greenshift-animation-and-page-builder-blocks":"Greenshift – Gutenberg Blocks",fluentform:"Fluent Forms","translatepress-multilingual":"TranslatePress","fluent-booking":"Fluent Booking"}[e])}))})),ct_localizations.is_dev_mode&&(0,o.createElement)(Re,{allPlans:r,allCategories:a}),(0,o.createElement)("div",{className:"ct-filter-search"},(0,o.createElement)("svg",{"aria-hidden":"true",width:"13",height:"13",viewBox:"0 0 15 15",fill:"currentColor"},(0,o.createElement)("path",{d:"M14.8,13.7L12,11c0.9-1.2,1.5-2.6,1.5-4.2c0-3.7-3-6.8-6.8-6.8S0,3,0,6.8s3,6.8,6.8,6.8c1.6,0,3.1-0.6,4.2-1.5l2.8,2.8c0.1,0.1,0.3,0.2,0.5,0.2s0.4-0.1,0.5-0.2C15.1,14.5,15.1,14,14.8,13.7z M1.5,6.8c0-2.9,2.4-5.2,5.2-5.2S12,3.9,12,6.8S9.6,12,6.8,12S1.5,9.6,1.5,6.8z"})),(0,o.createElement)("input",{type:"text",placeholder:(0,l.__)("Search for a starter site...","blocksy-companion"),value:t.search,onChange:function(e){n(We(We({},t),{},{search:e.target.value}))}})))};const Ze=[{id:"personal",title:"Personal"},{id:"professional",title:"Professional"},{id:"agency",title:"Agency"},{id:"personal_v2",title:"Personal v2"},{id:"professional_v2",title:"Professional v2"},{id:"agency_v2",title:"Agency v2"}],Je=["Blog","Business","Ecommerce","News","Nonprofit","Personal","Portfolio","Travel"];function Ye(e,t){var n=t.length,r=e.length;if(r>n)return!1;if(r===n)return e===t;e:for(var o=0,a=0;o<r;o++){for(var c=e.charCodeAt(o);a<n;)if(t.charCodeAt(a++)===c)continue e;return!1}return!0}const Xe=function(e,t){let n=e;return"all"!==t.plan&&(n=n.filter((function(e){return!("free"===t.plan&&e.is_pro||"pro"===t.plan&&!e.is_pro)}))),"all"!==t.category&&(n=n.filter((function(e){return!!e.categories&&e.categories.includes(t.category)}))),t.search&&(n=n.filter((function(e){return!(!e.keywords||!e.keywords.split(",").some((function(e){return Ye(t.search.toLowerCase(),e.trim().toLowerCase())})))||Ye(t.search.toLowerCase(),e.name.toLowerCase())}))),"all"!==t.builder&&(n=n.filter((function(n){return!!e.find((function(e){return e.name===n.name&&(e.builder||"gutenberg")===t.builder}))}))),n};var Ke=function({demos_list:e}){const[t,n]=(0,o.useState)({search:"",category:"all",builder:"all",plan:"all"});return{filters:t,setFilters:n,unfiltered_demos_list:e,demos_list:Xe(e.filter((function(e){return!e.dev_v2||ct_localizations.is_dev_mode})),t),allPlans:Ze,allCategories:Je,display:function(){return(0,o.createElement)($e,null)}}};const Qe=(0,o.createContext)({demos:[]});let et=null;var tt=function({children:e,path:t,location:n}){const[r,a]=(0,o.useState)(!et),[c,s]=(0,o.useState)(et||[]),[u,m]=(0,o.useState)(ctDashboardLocalizations.plugin_data.active_plugins),[p,d]=(0,o.useState)(null),[f,b]=(0,o.useState)(ctDashboardLocalizations.plugin_data.current_installed_demo),h=Ke({demos_list:c}),[g,y]=(0,o.useState)(!1),[v,_]=(0,o.useState)({isError:!1,message:"",reason:"generic"}),[E,w]=(0,o.useState)({builder:""}),[k,j]=(0,o.useState)(!1);return(0,o.useEffect)((function(){ctDashboardLocalizations.plugin_data.demo_install_error?(a(!1),_({isError:!0,message:ctDashboardLocalizations.plugin_data.demo_install_error,reason:"generic"})):async function(e=!1){e&&a(!0);try{let e=await O();if(e.status&&511===e.status)return void y(!0);const t=await e.json();s(t),et=t}catch(e){console.error("Blocksy:Dashboard:DemoInstall:demos_list",{response:e,reason:"frontend_starter_sites_fetch_failed"})}a(!1)}(!et)}),[]),g?(0,o.createElement)(D,null):(0,o.createElement)("div",{className:"ct-demos-list-container"},(0,o.createElement)(i.Transition,{items:r,from:{opacity:0},enter:[{opacity:1}],leave:[{opacity:0}],initial:null,config:function(e,t){return{duration:300}}},(function(e,t){return t?(0,o.createElement)(i.animated.p,{style:e,className:"ct-loading-text"},(0,o.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 100 100"},(0,o.createElement)("g",{transform:"translate(50,50)"},(0,o.createElement)("g",{transform:"scale(1)"},(0,o.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"currentColor"}),(0,o.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"#ffffff",transform:"rotate(161.634)"},(0,o.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"}))))),(0,l.__)("Loading Starter Sites...","blocksy-companion")):v.isError?(0,o.createElement)(i.animated.div,{style:e},"ajax_request_failed"===v.reason&&(0,o.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:sprintf((0,l.__)("Your site is misconfigured and AJAX requests are not reaching your backend. Please click %shere%s to find the common causes and possible solutions to this.<br> Error code - %s","blocksy-companion"),'<a href="https://creativethemes.com/blocksy/docs/troubleshooting/starter-site-common-issues-possible-solutions/" target="_blank">',"</a>",v.message)}}),"remote_fetch_failed"===v.reason&&(0,o.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:sprintf((0,l.__)("Failed to retrieve starter sites list.<br> Error code - %s","blocksy-companion"),v.message)}}),"generic"===v.reason&&(0,o.createElement)("div",{className:"ct-demo-notification",dangerouslySetInnerHTML:{__html:v.message}}),(0,o.createElement)(Z,null)):(0,o.createElement)(i.animated.div,{style:e},(0,o.createElement)(o.Fragment,null,(0,o.createElement)(Qe.Provider,{value:{currentDemo:p,pluginsStatus:u,setPluginsStatus:m,installerBlockingReleased:k,setInstallerBlockingReleased:j,setCurrentDemo:d,currentlyInstalledDemo:f,setCurrentlyInstalledDemo:b,unfiltered_demos_list:h.unfiltered_demos_list,demos_list:h.demos_list,filters:h.filters,setFilters:h.setFilters,allPlans:h.allPlans,allCategories:h.allCategories}},h.display(),(0,o.createElement)(le,null),(0,o.createElement)(Me,null)),(0,o.createElement)(Z,null)))})))};function nt(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}O().then((function(e){511===e.status&&fetch(`${ctDashboardLocalizations.ajax_url}?action=blocksy_dashboard_handle_incorrect_license`,{method:"POST",body:JSON.stringify({}),headers:{Accept:"application/json","Content-Type":"application/json"}}).then((function({success:e,data:t}){}))})).catch((function(e){console.error("Error:",e)})),c().on("ct:dashboard:routes",(function(e){e.push({Component:function(e){return(0,o.createElement)(z,e)},path:"/extensions"}),e.push({Component:function(e){return(0,o.createElement)(X,e)},path:"/extensions/:extension"}),"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&e.push({Component:function(e){return(0,o.createElement)(tt,e)},path:"/demos"})})),c().on("ct:dashboard:navigation-links",(function(e){"yes"===ctDashboardLocalizations.plugin_data.has_demo_install&&e.push({text:(0,l.__)("Starter Sites","blocksy-companion"),path:"demos",getProps:function({isPartiallyCurrent:e,isCurrent:t}){return e?{"aria-current":"page"}:{}}}),e.push({text:(0,l.__)("Extensions","blocksy-companion"),path:"/extensions",onClick:function(e){location.hash.indexOf("extensions")>-1&&e.preventDefault()},getProps:function({isPartiallyCurrent:e,isCurrent:t}){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nt(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e||t?{"aria-current":"page"}:{})}})})),c().on("ct:dashboard:heading:after",(function(e){ctDashboardLocalizations.plugin_data.is_pro&&(e.content=(0,o.createElement)("span",null,"PRO"))}))}()}();